Merge git://git.infradead.org/~dwmw2/firmware-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Apr 2009 19:01:22 +0000 (12:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Apr 2009 19:01:22 +0000 (12:01 -0700)
* git://git.infradead.org/~dwmw2/firmware-2.6:
  qla1280: Fix off-by-some error in firmware loading.
  Add README.AddingFirmware file. Basically telling people not to.
  firmware: Remove newly-added slicoss and sxg firmware images
  firmware/WHENCE: Add missing origin information for Ambassador atmsar11.fw
  ALSA: wavefront - Always use request_firmware()
  Remove fdump tool for av7110 firmware
  firmware: convert av7110 driver to request_firmware()
  Partially revert "V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card"
  Revert "fix modules_install via NFS"

Add-add conflicts in firmware/WHENCE fixed manually

1486 files changed:
Documentation/DMA-mapping.txt
Documentation/DocBook/writing-an-alsa-driver.tmpl
Documentation/blockdev/00-INDEX
Documentation/blockdev/mflash.txt [new file with mode: 0644]
Documentation/cgroups/cpuacct.txt
Documentation/devices.txt
Documentation/fb/uvesafb.txt
Documentation/filesystems/00-INDEX
Documentation/filesystems/nilfs2.txt [new file with mode: 0644]
Documentation/ftrace.txt [deleted file]
Documentation/hwmon/g760a [new file with mode: 0644]
Documentation/infiniband/ipoib.txt
Documentation/isdn/README.gigaset
Documentation/kprobes.txt
Documentation/powerpc/dts-bindings/fsl/upm-nand.txt
Documentation/sound/alsa/soc/jack.txt [new file with mode: 0644]
Documentation/sysctl/vm.txt
Documentation/trace/ftrace.txt [new file with mode: 0644]
Documentation/trace/kmemtrace.txt [new file with mode: 0644]
Documentation/trace/mmiotrace.txt [new file with mode: 0644]
Documentation/trace/tracepoints.txt [new file with mode: 0644]
Documentation/tracepoints.txt [deleted file]
Documentation/tracers/mmiotrace.txt [deleted file]
Documentation/video4linux/pxa_camera.txt [new file with mode: 0644]
Documentation/video4linux/v4l2-framework.txt
Documentation/vm/kmemtrace.txt [deleted file]
MAINTAINERS
Makefile
arch/arm/configs/magician_defconfig
arch/arm/include/asm/sizes.h
arch/arm/mach-at91/include/mach/board.h
arch/arm/mach-davinci/board-evm.c
arch/arm/mach-davinci/include/mach/nand.h [new file with mode: 0644]
arch/arm/mach-davinci/usb.c
arch/arm/mach-iop13xx/setup.c
arch/arm/mach-iop13xx/tpmi.c
arch/arm/mach-kirkwood/common.c
arch/arm/mach-mx1/Makefile
arch/arm/mach-mx1/devices.c
arch/arm/mach-mx1/ksym_mx1.c [new file with mode: 0644]
arch/arm/mach-mx1/mx1_camera_fiq.S [new file with mode: 0644]
arch/arm/mach-mx3/clock.c
arch/arm/mach-omap1/clock.c
arch/arm/mach-orion5x/common.c
arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/cm-x2xx.c
arch/arm/mach-pxa/colibri-pxa300.c
arch/arm/mach-pxa/colibri-pxa320.c
arch/arm/mach-pxa/colibri-pxa3xx.c
arch/arm/mach-pxa/csb701.c
arch/arm/mach-pxa/e740.c
arch/arm/mach-pxa/e750.c
arch/arm/mach-pxa/e800.c
arch/arm/mach-pxa/em-x270.c
arch/arm/mach-pxa/include/mach/colibri.h
arch/arm/mach-pxa/include/mach/magician.h
arch/arm/mach-pxa/include/mach/palmld.h
arch/arm/mach-pxa/include/mach/palmt5.h
arch/arm/mach-pxa/include/mach/palmte2.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/palmtx.h
arch/arm/mach-pxa/include/mach/pxa2xx_spi.h
arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
arch/arm/mach-pxa/magician.c
arch/arm/mach-pxa/mioa701.c
arch/arm/mach-pxa/palmld.c
arch/arm/mach-pxa/palmt5.c
arch/arm/mach-pxa/palmte2.c [new file with mode: 0644]
arch/arm/mach-pxa/palmtx.c
arch/arm/mach-pxa/tosa.c
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/mach-n30.c
arch/arm/mach-s3c2412/mach-jive.c
arch/arm/mm/mmu.c
arch/arm/plat-iop/adma.c
arch/arm/plat-mxc/include/mach/i2c.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/memory.h
arch/arm/plat-mxc/include/mach/mx1_camera.h [new file with mode: 0644]
arch/arm/plat-s3c/dev-i2c0.c
arch/arm/plat-s3c/dev-i2c1.c
arch/arm/plat-s3c/include/plat/iic.h
arch/avr32/boards/hammerhead/flash.c
arch/avr32/mach-at32ap/at32ap700x.c
arch/blackfin/include/asm/bfin5xx_spi.h
arch/blackfin/kernel/process.c
arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
arch/cris/include/asm/ioctls.h
arch/cris/include/asm/rs485.h
arch/cris/include/asm/termios.h
arch/frv/include/asm/Kbuild [new file with mode: 0644]
arch/frv/include/asm/atomic.h [new file with mode: 0644]
arch/frv/include/asm/auxvec.h [new file with mode: 0644]
arch/frv/include/asm/ax88796.h [new file with mode: 0644]
arch/frv/include/asm/bitops.h [new file with mode: 0644]
arch/frv/include/asm/bug.h [new file with mode: 0644]
arch/frv/include/asm/bugs.h [new file with mode: 0644]
arch/frv/include/asm/busctl-regs.h [new file with mode: 0644]
arch/frv/include/asm/byteorder.h [new file with mode: 0644]
arch/frv/include/asm/cache.h [new file with mode: 0644]
arch/frv/include/asm/cacheflush.h [new file with mode: 0644]
arch/frv/include/asm/checksum.h [new file with mode: 0644]
arch/frv/include/asm/cpu-irqs.h [new file with mode: 0644]
arch/frv/include/asm/cpumask.h [new file with mode: 0644]
arch/frv/include/asm/cputime.h [new file with mode: 0644]
arch/frv/include/asm/current.h [new file with mode: 0644]
arch/frv/include/asm/delay.h [new file with mode: 0644]
arch/frv/include/asm/device.h [new file with mode: 0644]
arch/frv/include/asm/div64.h [new file with mode: 0644]
arch/frv/include/asm/dm9000.h [new file with mode: 0644]
arch/frv/include/asm/dma-mapping.h [new file with mode: 0644]
arch/frv/include/asm/dma.h [new file with mode: 0644]
arch/frv/include/asm/elf.h [new file with mode: 0644]
arch/frv/include/asm/emergency-restart.h [new file with mode: 0644]
arch/frv/include/asm/errno.h [new file with mode: 0644]
arch/frv/include/asm/fb.h [new file with mode: 0644]
arch/frv/include/asm/fcntl.h [new file with mode: 0644]
arch/frv/include/asm/fpu.h [new file with mode: 0644]
arch/frv/include/asm/ftrace.h [new file with mode: 0644]
arch/frv/include/asm/futex.h [new file with mode: 0644]
arch/frv/include/asm/gdb-stub.h [new file with mode: 0644]
arch/frv/include/asm/gpio-regs.h [new file with mode: 0644]
arch/frv/include/asm/hardirq.h [new file with mode: 0644]
arch/frv/include/asm/highmem.h [new file with mode: 0644]
arch/frv/include/asm/hw_irq.h [new file with mode: 0644]
arch/frv/include/asm/init.h [new file with mode: 0644]
arch/frv/include/asm/io.h [new file with mode: 0644]
arch/frv/include/asm/ioctl.h [new file with mode: 0644]
arch/frv/include/asm/ioctls.h [new file with mode: 0644]
arch/frv/include/asm/ipcbuf.h [new file with mode: 0644]
arch/frv/include/asm/irc-regs.h [new file with mode: 0644]
arch/frv/include/asm/irq.h [new file with mode: 0644]
arch/frv/include/asm/irq_regs.h [new file with mode: 0644]
arch/frv/include/asm/kdebug.h [new file with mode: 0644]
arch/frv/include/asm/kmap_types.h [new file with mode: 0644]
arch/frv/include/asm/linkage.h [new file with mode: 0644]
arch/frv/include/asm/local.h [new file with mode: 0644]
arch/frv/include/asm/math-emu.h [new file with mode: 0644]
arch/frv/include/asm/mb-regs.h [new file with mode: 0644]
arch/frv/include/asm/mb86943a.h [new file with mode: 0644]
arch/frv/include/asm/mb93091-fpga-irqs.h [new file with mode: 0644]
arch/frv/include/asm/mb93093-fpga-irqs.h [new file with mode: 0644]
arch/frv/include/asm/mb93493-irqs.h [new file with mode: 0644]
arch/frv/include/asm/mb93493-regs.h [new file with mode: 0644]
arch/frv/include/asm/mc146818rtc.h [new file with mode: 0644]
arch/frv/include/asm/mem-layout.h [new file with mode: 0644]
arch/frv/include/asm/mman.h [new file with mode: 0644]
arch/frv/include/asm/mmu.h [new file with mode: 0644]
arch/frv/include/asm/mmu_context.h [new file with mode: 0644]
arch/frv/include/asm/module.h [new file with mode: 0644]
arch/frv/include/asm/msgbuf.h [new file with mode: 0644]
arch/frv/include/asm/mutex.h [new file with mode: 0644]
arch/frv/include/asm/page.h [new file with mode: 0644]
arch/frv/include/asm/param.h [new file with mode: 0644]
arch/frv/include/asm/pci.h [new file with mode: 0644]
arch/frv/include/asm/percpu.h [new file with mode: 0644]
arch/frv/include/asm/pgalloc.h [new file with mode: 0644]
arch/frv/include/asm/pgtable.h [new file with mode: 0644]
arch/frv/include/asm/poll.h [new file with mode: 0644]
arch/frv/include/asm/posix_types.h [new file with mode: 0644]
arch/frv/include/asm/processor.h [new file with mode: 0644]
arch/frv/include/asm/ptrace.h [new file with mode: 0644]
arch/frv/include/asm/registers.h [new file with mode: 0644]
arch/frv/include/asm/resource.h [new file with mode: 0644]
arch/frv/include/asm/scatterlist.h [new file with mode: 0644]
arch/frv/include/asm/sections.h [new file with mode: 0644]
arch/frv/include/asm/segment.h [new file with mode: 0644]
arch/frv/include/asm/sembuf.h [new file with mode: 0644]
arch/frv/include/asm/serial-regs.h [new file with mode: 0644]
arch/frv/include/asm/serial.h [new file with mode: 0644]
arch/frv/include/asm/setup.h [new file with mode: 0644]
arch/frv/include/asm/shmbuf.h [new file with mode: 0644]
arch/frv/include/asm/shmparam.h [new file with mode: 0644]
arch/frv/include/asm/sigcontext.h [new file with mode: 0644]
arch/frv/include/asm/siginfo.h [new file with mode: 0644]
arch/frv/include/asm/signal.h [new file with mode: 0644]
arch/frv/include/asm/smp.h [new file with mode: 0644]
arch/frv/include/asm/socket.h [new file with mode: 0644]
arch/frv/include/asm/sockios.h [new file with mode: 0644]
arch/frv/include/asm/spinlock.h [new file with mode: 0644]
arch/frv/include/asm/spr-regs.h [new file with mode: 0644]
arch/frv/include/asm/stat.h [new file with mode: 0644]
arch/frv/include/asm/statfs.h [new file with mode: 0644]
arch/frv/include/asm/string.h [new file with mode: 0644]
arch/frv/include/asm/suspend.h [new file with mode: 0644]
arch/frv/include/asm/swab.h [new file with mode: 0644]
arch/frv/include/asm/system.h [new file with mode: 0644]
arch/frv/include/asm/termbits.h [new file with mode: 0644]
arch/frv/include/asm/termios.h [new file with mode: 0644]
arch/frv/include/asm/thread_info.h [new file with mode: 0644]
arch/frv/include/asm/timer-regs.h [new file with mode: 0644]
arch/frv/include/asm/timex.h [new file with mode: 0644]
arch/frv/include/asm/tlb.h [new file with mode: 0644]
arch/frv/include/asm/tlbflush.h [new file with mode: 0644]
arch/frv/include/asm/topology.h [new file with mode: 0644]
arch/frv/include/asm/types.h [new file with mode: 0644]
arch/frv/include/asm/uaccess.h [new file with mode: 0644]
arch/frv/include/asm/ucontext.h [new file with mode: 0644]
arch/frv/include/asm/unaligned.h [new file with mode: 0644]
arch/frv/include/asm/unistd.h [new file with mode: 0644]
arch/frv/include/asm/user.h [new file with mode: 0644]
arch/frv/include/asm/vga.h [new file with mode: 0644]
arch/frv/include/asm/virtconvert.h [new file with mode: 0644]
arch/frv/include/asm/xor.h [new file with mode: 0644]
arch/frv/mm/tlb-miss.S
arch/ia64/include/asm/unistd.h
arch/ia64/kernel/entry.S
arch/ia64/kernel/pci-dma.c
arch/ia64/sn/pci/pci_dma.c
arch/mips/alchemy/common/platform.c
arch/mips/alchemy/devboards/pb1200/platform.c
arch/mips/include/asm/txx9/ndfmc.h [new file with mode: 0644]
arch/mips/include/asm/txx9/rbtx4939.h
arch/mips/include/asm/txx9/tx4938.h
arch/mips/include/asm/txx9/tx4939.h
arch/mips/nxp/pnx833x/common/platform.c
arch/mips/nxp/pnx8550/common/platform.c
arch/mips/pmc-sierra/msp71xx/msp_usb.c
arch/mips/txx9/generic/setup.c
arch/mips/txx9/generic/setup_tx4938.c
arch/mips/txx9/generic/setup_tx4939.c
arch/mips/txx9/rbtx4938/setup.c
arch/mips/txx9/rbtx4939/setup.c
arch/mn10300/Kconfig
arch/mn10300/Makefile
arch/mn10300/include/asm/Kbuild [new file with mode: 0644]
arch/mn10300/include/asm/atomic.h [new file with mode: 0644]
arch/mn10300/include/asm/auxvec.h [new file with mode: 0644]
arch/mn10300/include/asm/bitops.h [new file with mode: 0644]
arch/mn10300/include/asm/bug.h [new file with mode: 0644]
arch/mn10300/include/asm/bugs.h [new file with mode: 0644]
arch/mn10300/include/asm/busctl-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/byteorder.h [new file with mode: 0644]
arch/mn10300/include/asm/cache.h [new file with mode: 0644]
arch/mn10300/include/asm/cacheflush.h [new file with mode: 0644]
arch/mn10300/include/asm/checksum.h [new file with mode: 0644]
arch/mn10300/include/asm/cpu-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/cputime.h [new file with mode: 0644]
arch/mn10300/include/asm/current.h [new file with mode: 0644]
arch/mn10300/include/asm/delay.h [new file with mode: 0644]
arch/mn10300/include/asm/device.h [new file with mode: 0644]
arch/mn10300/include/asm/div64.h [new file with mode: 0644]
arch/mn10300/include/asm/dma-mapping.h [new file with mode: 0644]
arch/mn10300/include/asm/dma.h [new file with mode: 0644]
arch/mn10300/include/asm/dmactl-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/elf.h [new file with mode: 0644]
arch/mn10300/include/asm/emergency-restart.h [new file with mode: 0644]
arch/mn10300/include/asm/errno.h [new file with mode: 0644]
arch/mn10300/include/asm/exceptions.h [new file with mode: 0644]
arch/mn10300/include/asm/fb.h [new file with mode: 0644]
arch/mn10300/include/asm/fcntl.h [new file with mode: 0644]
arch/mn10300/include/asm/fpu.h [new file with mode: 0644]
arch/mn10300/include/asm/frame.inc [new file with mode: 0644]
arch/mn10300/include/asm/ftrace.h [new file with mode: 0644]
arch/mn10300/include/asm/futex.h [new file with mode: 0644]
arch/mn10300/include/asm/gdb-stub.h [new file with mode: 0644]
arch/mn10300/include/asm/hardirq.h [new file with mode: 0644]
arch/mn10300/include/asm/highmem.h [new file with mode: 0644]
arch/mn10300/include/asm/hw_irq.h [new file with mode: 0644]
arch/mn10300/include/asm/intctl-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/io.h [new file with mode: 0644]
arch/mn10300/include/asm/ioctl.h [new file with mode: 0644]
arch/mn10300/include/asm/ioctls.h [new file with mode: 0644]
arch/mn10300/include/asm/ipc.h [new file with mode: 0644]
arch/mn10300/include/asm/ipcbuf.h [new file with mode: 0644]
arch/mn10300/include/asm/irq.h [new file with mode: 0644]
arch/mn10300/include/asm/irq_regs.h [new file with mode: 0644]
arch/mn10300/include/asm/kdebug.h [new file with mode: 0644]
arch/mn10300/include/asm/kmap_types.h [new file with mode: 0644]
arch/mn10300/include/asm/kprobes.h [new file with mode: 0644]
arch/mn10300/include/asm/linkage.h [new file with mode: 0644]
arch/mn10300/include/asm/local.h [new file with mode: 0644]
arch/mn10300/include/asm/mc146818rtc.h [new file with mode: 0644]
arch/mn10300/include/asm/mman.h [new file with mode: 0644]
arch/mn10300/include/asm/mmu.h [new file with mode: 0644]
arch/mn10300/include/asm/mmu_context.h [new file with mode: 0644]
arch/mn10300/include/asm/module.h [new file with mode: 0644]
arch/mn10300/include/asm/msgbuf.h [new file with mode: 0644]
arch/mn10300/include/asm/mutex.h [new file with mode: 0644]
arch/mn10300/include/asm/nmi.h [new file with mode: 0644]
arch/mn10300/include/asm/page.h [new file with mode: 0644]
arch/mn10300/include/asm/page_offset.h [new file with mode: 0644]
arch/mn10300/include/asm/param.h [new file with mode: 0644]
arch/mn10300/include/asm/pci.h [new file with mode: 0644]
arch/mn10300/include/asm/percpu.h [new file with mode: 0644]
arch/mn10300/include/asm/pgalloc.h [new file with mode: 0644]
arch/mn10300/include/asm/pgtable.h [new file with mode: 0644]
arch/mn10300/include/asm/pio-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/poll.h [new file with mode: 0644]
arch/mn10300/include/asm/posix_types.h [new file with mode: 0644]
arch/mn10300/include/asm/processor.h [new file with mode: 0644]
arch/mn10300/include/asm/ptrace.h [new file with mode: 0644]
arch/mn10300/include/asm/reset-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/resource.h [new file with mode: 0644]
arch/mn10300/include/asm/rtc-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/rtc.h [new file with mode: 0644]
arch/mn10300/include/asm/scatterlist.h [new file with mode: 0644]
arch/mn10300/include/asm/sections.h [new file with mode: 0644]
arch/mn10300/include/asm/sembuf.h [new file with mode: 0644]
arch/mn10300/include/asm/serial-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/serial.h [new file with mode: 0644]
arch/mn10300/include/asm/setup.h [new file with mode: 0644]
arch/mn10300/include/asm/shmbuf.h [new file with mode: 0644]
arch/mn10300/include/asm/shmparam.h [new file with mode: 0644]
arch/mn10300/include/asm/sigcontext.h [new file with mode: 0644]
arch/mn10300/include/asm/siginfo.h [new file with mode: 0644]
arch/mn10300/include/asm/signal.h [new file with mode: 0644]
arch/mn10300/include/asm/smp.h [new file with mode: 0644]
arch/mn10300/include/asm/socket.h [new file with mode: 0644]
arch/mn10300/include/asm/sockios.h [new file with mode: 0644]
arch/mn10300/include/asm/spinlock.h [new file with mode: 0644]
arch/mn10300/include/asm/stat.h [new file with mode: 0644]
arch/mn10300/include/asm/statfs.h [new file with mode: 0644]
arch/mn10300/include/asm/string.h [new file with mode: 0644]
arch/mn10300/include/asm/swab.h [new file with mode: 0644]
arch/mn10300/include/asm/system.h [new file with mode: 0644]
arch/mn10300/include/asm/termbits.h [new file with mode: 0644]
arch/mn10300/include/asm/termios.h [new file with mode: 0644]
arch/mn10300/include/asm/thread_info.h [new file with mode: 0644]
arch/mn10300/include/asm/timer-regs.h [new file with mode: 0644]
arch/mn10300/include/asm/timex.h [new file with mode: 0644]
arch/mn10300/include/asm/tlb.h [new file with mode: 0644]
arch/mn10300/include/asm/tlbflush.h [new file with mode: 0644]
arch/mn10300/include/asm/topology.h [new file with mode: 0644]
arch/mn10300/include/asm/types.h [new file with mode: 0644]
arch/mn10300/include/asm/uaccess.h [new file with mode: 0644]
arch/mn10300/include/asm/ucontext.h [new file with mode: 0644]
arch/mn10300/include/asm/unaligned.h [new file with mode: 0644]
arch/mn10300/include/asm/unistd.h [new file with mode: 0644]
arch/mn10300/include/asm/user.h [new file with mode: 0644]
arch/mn10300/include/asm/vga.h [new file with mode: 0644]
arch/mn10300/include/asm/xor.h [new file with mode: 0644]
arch/mn10300/kernel/entry.S
arch/mn10300/kernel/gdb-io-serial-low.S
arch/mn10300/kernel/gdb-io-serial.c
arch/mn10300/kernel/gdb-io-ttysm-low.S
arch/mn10300/kernel/gdb-io-ttysm.c
arch/mn10300/kernel/gdb-stub.c
arch/mn10300/kernel/head.S
arch/mn10300/kernel/irq.c
arch/mn10300/kernel/mn10300-serial-low.S
arch/mn10300/kernel/mn10300-serial.c
arch/mn10300/kernel/mn10300-watchdog.c
arch/mn10300/kernel/setup.c
arch/mn10300/kernel/traps.c
arch/mn10300/oprofile/Kconfig [deleted file]
arch/mn10300/proc-mn103e010/include/proc/cache.h [new file with mode: 0644]
arch/mn10300/proc-mn103e010/include/proc/clock.h [new file with mode: 0644]
arch/mn10300/proc-mn103e010/include/proc/irq.h [new file with mode: 0644]
arch/mn10300/proc-mn103e010/include/proc/proc.h [new file with mode: 0644]
arch/mn10300/unit-asb2303/include/unit/clock.h [new file with mode: 0644]
arch/mn10300/unit-asb2303/include/unit/leds.h [new file with mode: 0644]
arch/mn10300/unit-asb2303/include/unit/serial.h [new file with mode: 0644]
arch/mn10300/unit-asb2303/include/unit/smc91111.h [new file with mode: 0644]
arch/mn10300/unit-asb2303/include/unit/timex.h [new file with mode: 0644]
arch/mn10300/unit-asb2303/leds.c
arch/mn10300/unit-asb2303/smc91111.c
arch/mn10300/unit-asb2305/include/unit/clock.h [new file with mode: 0644]
arch/mn10300/unit-asb2305/include/unit/leds.h [new file with mode: 0644]
arch/mn10300/unit-asb2305/include/unit/serial.h [new file with mode: 0644]
arch/mn10300/unit-asb2305/include/unit/timex.h [new file with mode: 0644]
arch/mn10300/unit-asb2305/leds.c
arch/mn10300/unit-asb2305/unit-init.c
arch/powerpc/Kconfig
arch/powerpc/boot/dts/ksi8560.dts
arch/powerpc/boot/dts/pq2fads.dts
arch/powerpc/boot/dts/sbc8548.dts
arch/powerpc/boot/dts/sbc8560.dts
arch/powerpc/boot/dts/socrates.dts
arch/powerpc/boot/dts/stx_gp3_8560.dts
arch/powerpc/boot/dts/tqm8540.dts
arch/powerpc/boot/dts/tqm8541.dts
arch/powerpc/boot/dts/tqm8548-bigflash.dts
arch/powerpc/boot/dts/tqm8548.dts
arch/powerpc/boot/dts/tqm8555.dts
arch/powerpc/boot/dts/tqm8560.dts
arch/powerpc/configs/pseries_defconfig
arch/powerpc/include/asm/lppaca.h
arch/powerpc/include/asm/mpic.h
arch/powerpc/include/asm/ps3fb.h
arch/powerpc/include/asm/pte-common.h
arch/powerpc/include/asm/reg.h
arch/powerpc/include/asm/reg_booke.h
arch/powerpc/include/asm/rtas.h
arch/powerpc/include/asm/sfp-machine.h
arch/powerpc/include/asm/systbl.h
arch/powerpc/include/asm/unistd.h
arch/powerpc/kernel/dma.c
arch/powerpc/kernel/fpu.S
arch/powerpc/kernel/ftrace.c
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/lparcfg.c
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/of_platform.c
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/ptrace32.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/platforms/cell/iommu.c
arch/powerpc/platforms/iseries/iommu.c
arch/powerpc/platforms/ps3/system-bus.c
arch/powerpc/sysdev/fsl_lbc.c
arch/powerpc/sysdev/mpic.c
arch/sparc/include/asm/unistd.h
arch/sparc/kernel/of_device_64.c
arch/sparc/kernel/pci_fire.c
arch/sparc/kernel/pci_psycho.c
arch/sparc/kernel/pci_sabre.c
arch/sparc/kernel/pci_sun4v.c
arch/sparc/kernel/power.c
arch/sparc/kernel/systbls_32.S
arch/sparc/kernel/systbls_64.S
arch/sparc/mm/init_64.c
arch/x86/Kconfig
arch/x86/boot/video-vga.c
arch/x86/include/asm/apic.h
arch/x86/include/asm/cpu_debug.h [changed mode: 0755->0644]
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/dma-mapping.h
arch/x86/include/asm/fixmap.h
arch/x86/include/asm/io_apic.h
arch/x86/include/asm/paravirt.h
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/apic_flat_64.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/cpu/addon_cpuid_features.c
arch/x86/kernel/cpu/cpu_debug.c [changed mode: 0755->0644]
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/x86/kernel/cpu/cpufreq/longhaul.c
arch/x86/kernel/ftrace.c
arch/x86/kernel/irq.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-nommu.c
arch/x86/kernel/ptrace.c
arch/x86/kernel/reboot.c
arch/x86/mm/pgtable.c
arch/x86/xen/mmu.c
block/blk-core.c
block/blk-merge.c
block/blk-settings.c
block/blk-sysfs.c
block/blk.h
block/cfq-iosched.c
block/elevator.c
drivers/acpi/acpica/hwvalid.c
drivers/acpi/acpica/nsxfeval.c
drivers/acpi/battery.c
drivers/acpi/pci_slot.c
drivers/acpi/proc.c
drivers/acpi/processor_idle.c
drivers/acpi/scan.c
drivers/acpi/sleep.h
drivers/acpi/thermal.c
drivers/acpi/video.c
drivers/acpi/wakeup.c
drivers/ata/ahci.c
drivers/ata/ata_piix.c
drivers/ata/pata_cs5520.c
drivers/ata/pata_ixp4xx_cf.c
drivers/ata/pata_octeon_cf.c
drivers/ata/pdc_adma.c
drivers/ata/sata_inic162x.c
drivers/ata/sata_mv.c
drivers/ata/sata_qstor.c
drivers/ata/sata_sil24.c
drivers/ata/sata_vsc.c
drivers/atm/he.c
drivers/atm/lanai.c
drivers/base/isa.c
drivers/block/DAC960.c
drivers/block/Kconfig
drivers/block/Makefile
drivers/block/cciss.c
drivers/block/cciss.h
drivers/block/cciss_cmd.h
drivers/block/loop.c
drivers/block/mg_disk.c [new file with mode: 0644]
drivers/block/sx8.c
drivers/block/umem.c
drivers/block/xsysace.c
drivers/char/applicom.c
drivers/char/cyclades.c
drivers/char/esp.c
drivers/char/isicom.c
drivers/char/moxa.c
drivers/char/mxser.c
drivers/char/rio/rio_linux.c
drivers/char/riscom8.c
drivers/char/specialix.c
drivers/crypto/hifn_795x.c
drivers/crypto/ixp4xx_crypto.c
drivers/dma/ioat.c
drivers/firmware/dcdbas.c
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/asus_atk0110.c [new file with mode: 0644]
drivers/hwmon/g760a.c [new file with mode: 0644]
drivers/hwmon/lm95241.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-imx.c [new file with mode: 0644]
drivers/i2c/busses/i2c-mpc.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/i2c/busses/i2c-s6000.c [new file with mode: 0644]
drivers/i2c/busses/i2c-s6000.h [new file with mode: 0644]
drivers/ide/at91_ide.c
drivers/ide/cs5520.c
drivers/ide/falconide.c
drivers/ide/ide-acpi.c
drivers/ide/ide-atapi.c
drivers/ide/ide-cd.c
drivers/ide/ide-disk.c
drivers/ide/ide-disk_proc.c
drivers/ide/ide-dma-sff.c
drivers/ide/ide-h8300.c
drivers/ide/ide-io-std.c
drivers/ide/ide-io.c
drivers/ide/ide-ioctls.c
drivers/ide/ide-iops.c
drivers/ide/ide-lib.c
drivers/ide/ide-park.c
drivers/ide/ide-pm.c
drivers/ide/ide-probe.c
drivers/ide/ide-proc.c
drivers/ide/ide-taskfile.c
drivers/ide/ns87415.c
drivers/ide/q40ide.c
drivers/ide/scc_pata.c
drivers/ide/setup-pci.c
drivers/ide/tx4938ide.c
drivers/ide/tx4939ide.c
drivers/idle/i7300_idle.c
drivers/ieee1394/pcilynx.c
drivers/infiniband/core/cma.c
drivers/infiniband/hw/amso1100/c2.c
drivers/infiniband/hw/cxgb3/cxio_hal.c
drivers/infiniband/hw/cxgb3/cxio_hal.h
drivers/infiniband/hw/cxgb3/iwch.c
drivers/infiniband/hw/cxgb3/iwch.h
drivers/infiniband/hw/cxgb3/iwch_cm.c
drivers/infiniband/hw/cxgb3/iwch_cm.h
drivers/infiniband/hw/cxgb3/iwch_qp.c
drivers/infiniband/hw/ipath/ipath_driver.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mthca/mthca_main.c
drivers/infiniband/hw/nes/nes.c
drivers/infiniband/hw/nes/nes.h
drivers/infiniband/hw/nes/nes_cm.c
drivers/infiniband/hw/nes/nes_cm.h
drivers/infiniband/hw/nes/nes_hw.c
drivers/infiniband/hw/nes/nes_hw.h
drivers/infiniband/hw/nes/nes_nic.c
drivers/infiniband/ulp/ipoib/ipoib_vlan.c
drivers/isdn/gigaset/bas-gigaset.c
drivers/isdn/gigaset/interface.c
drivers/md/dm-ioctl.c
drivers/md/dm-kcopyd.c
drivers/md/dm-linear.c
drivers/md/dm-table.c
drivers/md/dm.c
drivers/md/dm.h
drivers/md/raid1.c
drivers/media/dvb/dm1105/dm1105.c
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/dvb-usb/af9015.c
drivers/media/dvb/dvb-usb/af9015.h
drivers/media/dvb/dvb-usb/ce6230.c
drivers/media/dvb/dvb-usb/dvb-usb-ids.h
drivers/media/dvb/firewire/firedtv-avc.c
drivers/media/dvb/frontends/Kconfig
drivers/media/dvb/frontends/Makefile
drivers/media/dvb/frontends/au8522_decoder.c
drivers/media/dvb/frontends/lgs8gxx.c [new file with mode: 0644]
drivers/media/dvb/frontends/lgs8gxx.h [new file with mode: 0644]
drivers/media/dvb/frontends/lgs8gxx_priv.h [new file with mode: 0644]
drivers/media/dvb/pluto2/pluto2.c
drivers/media/radio/dsbr100.c
drivers/media/radio/radio-aimslab.c
drivers/media/radio/radio-aztech.c
drivers/media/radio/radio-gemtek-pci.c
drivers/media/radio/radio-gemtek.c
drivers/media/radio/radio-maestro.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-mr800.c
drivers/media/radio/radio-rtrack2.c
drivers/media/radio/radio-sf16fmi.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-si470x.c
drivers/media/radio/radio-terratec.c
drivers/media/radio/radio-trust.c
drivers/media/radio/radio-typhoon.c
drivers/media/radio/radio-zoltrix.c
drivers/media/video/Kconfig
drivers/media/video/Makefile
drivers/media/video/adv7170.c
drivers/media/video/adv7175.c
drivers/media/video/au0828/Kconfig
drivers/media/video/au0828/au0828-cards.c
drivers/media/video/au0828/au0828-core.c
drivers/media/video/au0828/au0828-i2c.c
drivers/media/video/au0828/au0828-reg.h
drivers/media/video/au0828/au0828-video.c
drivers/media/video/au0828/au0828.h
drivers/media/video/bt819.c
drivers/media/video/bt856.c
drivers/media/video/bt866.c
drivers/media/video/bt8xx/bttv-cards.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttvp.h
drivers/media/video/cafe_ccic.c
drivers/media/video/cs5345.c
drivers/media/video/cs53l32a.c
drivers/media/video/cx18/cx18-audio.c
drivers/media/video/cx18/cx18-av-core.c
drivers/media/video/cx18/cx18-av-core.h
drivers/media/video/cx18/cx18-driver.c
drivers/media/video/cx18/cx18-fileops.c
drivers/media/video/cx18/cx18-gpio.c
drivers/media/video/cx18/cx18-i2c.c
drivers/media/video/cx18/cx18-ioctl.c
drivers/media/video/cx18/cx18-video.c
drivers/media/video/cx231xx/Kconfig [new file with mode: 0644]
drivers/media/video/cx231xx/Makefile [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-audio.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-avcore.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-cards.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-conf-reg.h [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-core.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-dvb.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-i2c.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-input.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-pcb-cfg.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-pcb-cfg.h [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-reg.h [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-vbi.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-vbi.h [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx-video.c [new file with mode: 0644]
drivers/media/video/cx231xx/cx231xx.h [new file with mode: 0644]
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx23885/cx23885.h
drivers/media/video/cx25840/cx25840-audio.c
drivers/media/video/cx25840/cx25840-core.c
drivers/media/video/cx25840/cx25840-core.h
drivers/media/video/cx25840/cx25840-firmware.c
drivers/media/video/cx88/cx88-alsa.c
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-core.c
drivers/media/video/cx88/cx88-dvb.c
drivers/media/video/cx88/cx88-mpeg.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/cx88/cx88.h
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-core.c
drivers/media/video/em28xx/em28xx-i2c.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/em28xx/em28xx.h
drivers/media/video/gspca/gspca.c
drivers/media/video/gspca/gspca.h
drivers/media/video/gspca/m5602/Makefile
drivers/media/video/gspca/m5602/m5602_bridge.h
drivers/media/video/gspca/m5602/m5602_core.c
drivers/media/video/gspca/m5602/m5602_mt9m111.c
drivers/media/video/gspca/m5602/m5602_mt9m111.h
drivers/media/video/gspca/m5602/m5602_ov9650.c
drivers/media/video/gspca/m5602/m5602_ov9650.h
drivers/media/video/gspca/m5602/m5602_po1030.c
drivers/media/video/gspca/m5602/m5602_po1030.h
drivers/media/video/gspca/m5602/m5602_s5k4aa.c
drivers/media/video/gspca/m5602/m5602_s5k4aa.h
drivers/media/video/gspca/m5602/m5602_s5k83a.c
drivers/media/video/gspca/m5602/m5602_s5k83a.h
drivers/media/video/gspca/m5602/m5602_sensor.h
drivers/media/video/gspca/sq905.c
drivers/media/video/gspca/vc032x.c
drivers/media/video/ivtv/ivtv-driver.c
drivers/media/video/ivtv/ivtv-fileops.c
drivers/media/video/ivtv/ivtv-gpio.c
drivers/media/video/ivtv/ivtv-i2c.c
drivers/media/video/ivtv/ivtv-ioctl.c
drivers/media/video/ivtv/ivtv-routing.c
drivers/media/video/ks0127.c
drivers/media/video/m52790.c
drivers/media/video/meye.c
drivers/media/video/msp3400-driver.c
drivers/media/video/msp3400-driver.h
drivers/media/video/msp3400-kthreads.c
drivers/media/video/mt9m001.c
drivers/media/video/mt9t031.c
drivers/media/video/mx1_camera.c [new file with mode: 0644]
drivers/media/video/mx3_camera.c
drivers/media/video/mxb.c
drivers/media/video/ov772x.c
drivers/media/video/pvrusb2/pvrusb2-audio.c
drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c
drivers/media/video/pvrusb2/pvrusb2-ctrl.c
drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
drivers/media/video/pvrusb2/pvrusb2-hdw.c
drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
drivers/media/video/pvrusb2/pvrusb2-sysfs.c
drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
drivers/media/video/pvrusb2/pvrusb2-wm8775.c
drivers/media/video/pwc/Kconfig
drivers/media/video/pxa_camera.c
drivers/media/video/s2255drv.c
drivers/media/video/saa7110.c
drivers/media/video/saa7115.c
drivers/media/video/saa7127.c
drivers/media/video/saa7134/saa6752hs.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/saa7134/saa7134.h
drivers/media/video/saa717x.c
drivers/media/video/saa7185.c
drivers/media/video/saa7191.c
drivers/media/video/soc_camera.c
drivers/media/video/tda9840.c
drivers/media/video/tea6415c.c
drivers/media/video/tea6420.c
drivers/media/video/tuner-core.c
drivers/media/video/tvaudio.c
drivers/media/video/tvp5150.c
drivers/media/video/upd64031a.c
drivers/media/video/upd64083.c
drivers/media/video/usbvision/usbvision-core.c
drivers/media/video/usbvision/usbvision-i2c.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/uvc/Kconfig
drivers/media/video/v4l1-compat.c
drivers/media/video/v4l2-common.c
drivers/media/video/v4l2-dev.c
drivers/media/video/v4l2-ioctl.c
drivers/media/video/v4l2-subdev.c [deleted file]
drivers/media/video/vino.c
drivers/media/video/vp27smpx.c
drivers/media/video/vpx3220.c
drivers/media/video/w9968cf.c
drivers/media/video/w9968cf.h
drivers/media/video/wm8775.c
drivers/media/video/zoran/zoran.h
drivers/media/video/zoran/zoran_card.c
drivers/media/video/zoran/zoran_device.c
drivers/media/video/zoran/zoran_driver.c
drivers/media/video/zr364xx.c
drivers/memstick/host/jmb38x_ms.c
drivers/message/fusion/mptbase.c
drivers/message/i2o/memory.c
drivers/message/i2o/pci.c
drivers/misc/tifm_7xx1.c
drivers/mmc/core/mmc.c
drivers/mmc/core/sd.c
drivers/mmc/host/imxmmc.c
drivers/mmc/host/mmc_spi.c
drivers/mmc/host/omap_hsmmc.c
drivers/mmc/host/sdhci-pci.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/wbsd.c
drivers/mtd/Makefile
drivers/mtd/ar7part.c
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/jedec_probe.c
drivers/mtd/chips/map_ram.c
drivers/mtd/chips/map_rom.c
drivers/mtd/cmdlinepart.c
drivers/mtd/devices/doc2000.c
drivers/mtd/devices/doc2001.c
drivers/mtd/devices/doc2001plus.c
drivers/mtd/devices/docecc.c
drivers/mtd/devices/m25p80.c
drivers/mtd/devices/mtd_dataflash.c
drivers/mtd/devices/mtdram.c
drivers/mtd/inftlmount.c
drivers/mtd/internal.h [new file with mode: 0644]
drivers/mtd/maps/Kconfig
drivers/mtd/maps/Makefile
drivers/mtd/maps/omap_nor.c
drivers/mtd/maps/physmap.c
drivers/mtd/maps/physmap_of.c
drivers/mtd/maps/plat-ram.c
drivers/mtd/maps/rbtx4939-flash.c [new file with mode: 0644]
drivers/mtd/maps/sa1100-flash.c
drivers/mtd/maps/sharpsl-flash.c [deleted file]
drivers/mtd/mtd_blkdevs.c
drivers/mtd/mtdbdi.c [new file with mode: 0644]
drivers/mtd/mtdchar.c
drivers/mtd/mtdconcat.c
drivers/mtd/mtdcore.c
drivers/mtd/mtdoops.c
drivers/mtd/mtdpart.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/Makefile
drivers/mtd/nand/bf5xx_nand.c
drivers/mtd/nand/cafe_nand.c
drivers/mtd/nand/davinci_nand.c [new file with mode: 0644]
drivers/mtd/nand/fsl_upm.c
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/plat_nand.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/mtd/nand/sh_flctl.c
drivers/mtd/nand/socrates_nand.c [new file with mode: 0644]
drivers/mtd/nand/txx9ndfmc.c [new file with mode: 0644]
drivers/mtd/nftlcore.c
drivers/mtd/ofpart.c
drivers/mtd/onenand/omap2.c
drivers/mtd/onenand/onenand_base.c
drivers/mtd/ubi/cdev.c
drivers/net/8139cp.c
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/acenic.c
drivers/net/amd8111e.c
drivers/net/atl1e/atl1e_main.c
drivers/net/atlx/atl1.c
drivers/net/atlx/atl2.c
drivers/net/b44.c
drivers/net/bnx2.c
drivers/net/bnx2.h
drivers/net/bnx2_fw.h
drivers/net/bnx2_fw2.h [deleted file]
drivers/net/bnx2x_main.c
drivers/net/cassini.c
drivers/net/chelsio/cxgb2.c
drivers/net/cxgb3/cxgb3_main.c
drivers/net/dl2k.c
drivers/net/e100.c
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/netdev.c
drivers/net/enic/enic_main.c
drivers/net/eql.c
drivers/net/fec.c
drivers/net/forcedeth.c
drivers/net/hp100.c
drivers/net/ibm_newemac/core.c
drivers/net/igb/igb_main.c
drivers/net/igbvf/Makefile [new file with mode: 0644]
drivers/net/igbvf/defines.h [new file with mode: 0644]
drivers/net/igbvf/ethtool.c [new file with mode: 0644]
drivers/net/igbvf/igbvf.h [new file with mode: 0644]
drivers/net/igbvf/mbx.c [new file with mode: 0644]
drivers/net/igbvf/mbx.h [new file with mode: 0644]
drivers/net/igbvf/netdev.c [new file with mode: 0644]
drivers/net/igbvf/regs.h [new file with mode: 0644]
drivers/net/igbvf/vf.c [new file with mode: 0644]
drivers/net/igbvf/vf.h [new file with mode: 0644]
drivers/net/ioc3-eth.c
drivers/net/ipg.c
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/jme.c
drivers/net/mlx4/main.c
drivers/net/mlx4/port.c
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/myri_code.h [deleted file]
drivers/net/myri_sbus.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/niu.c
drivers/net/ns83820.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/qla3xxx.c
drivers/net/qlge/qlge_main.c
drivers/net/r6040.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/sc92031.c
drivers/net/sis190.c
drivers/net/sis900.c
drivers/net/skge.c
drivers/net/sky2.c
drivers/net/smc91x.h
drivers/net/smsc911x.c
drivers/net/smsc9420.c
drivers/net/sungem.c
drivers/net/tehuti.c
drivers/net/tehuti.h
drivers/net/tg3.c
drivers/net/tlan.c
drivers/net/tokenring/lanstreamer.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/uli526x.c
drivers/net/tulip/winbond-840.c
drivers/net/typhoon.c
drivers/net/usb/usbnet.c
drivers/net/via-rhine.c
drivers/net/virtio_net.c
drivers/net/vxge/vxge-main.c
drivers/net/wan/wanxl.c
drivers/net/wireless/adm8211.c
drivers/net/wireless/ath5k/base.c
drivers/net/wireless/b43/dma.c
drivers/net/wireless/b43legacy/dma.c
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/prism54/islpci_hotplug.c
drivers/net/wireless/rt2x00/rt2x00pci.c
drivers/parport/parport_cs.c
drivers/parport/parport_pc.c
drivers/parport/parport_serial.c
drivers/pci/access.c
drivers/pci/bus.c
drivers/pci/dmar.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/intel-iommu.c
drivers/pci/intr_remapping.c
drivers/pci/iov.c
drivers/pci/pci-sysfs.c
drivers/pci/pci.c
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/pci/setup-bus.c
drivers/platform/x86/fujitsu-laptop.c
drivers/platform/x86/panasonic-laptop.c
drivers/platform/x86/sony-laptop.c
drivers/platform/x86/wmi.c
drivers/pnp/card.c
drivers/pnp/core.c
drivers/power/pcf50633-charger.c
drivers/power/pda_power.c
drivers/rapidio/rio-scan.c
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-xxxx.h
drivers/scsi/BusLogic.c
drivers/scsi/a100u2w.c
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/commsup.c
drivers/scsi/aacraid/linit.c
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
drivers/scsi/aic94xx/aic94xx_init.c
drivers/scsi/arcmsr/arcmsr_hba.c
drivers/scsi/atp870u.c
drivers/scsi/dpt_i2o.c
drivers/scsi/eata.c
drivers/scsi/gdth.c
drivers/scsi/hptiop.c
drivers/scsi/initio.c
drivers/scsi/ipr.c
drivers/scsi/ips.c
drivers/scsi/lasi700.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/megaraid.c
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_sas.c
drivers/scsi/mvsas.c
drivers/scsi/nsp32.c
drivers/scsi/qla1280.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla4xxx/ql4_os.c
drivers/scsi/sni_53c710.c
drivers/scsi/stex.c
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/scsi/sym53c8xx_2/sym_hipd.h
drivers/serial/8250_pci.c
drivers/serial/8250_pnp.c
drivers/serial/Kconfig
drivers/serial/Makefile
drivers/serial/bfin_5xx.c
drivers/serial/cpm_uart/cpm_uart_core.c
drivers/serial/crisv10.c
drivers/serial/crisv10.h
drivers/serial/icom.c
drivers/serial/jsm/jsm_driver.c
drivers/serial/jsm/jsm_neo.c
drivers/serial/jsm/jsm_tty.c
drivers/serial/max3100.c [new file with mode: 0644]
drivers/serial/pmac_zilog.c
drivers/serial/sunsu.c
drivers/serial/ucc_uart.c
drivers/sn/ioc3.c
drivers/spi/pxa2xx_spi.c
drivers/spi/spi_bfin5xx.c
drivers/spi/spi_imx.c
drivers/staging/agnx/pci.c
drivers/staging/altpciechdma/altpciechdma.c
drivers/staging/serqt_usb/serqt_usb.c
drivers/staging/slicoss/slicoss.c
drivers/staging/sxg/sxg.c
drivers/usb/class/cdc-acm.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-ps3.c
drivers/usb/host/ohci-at91.c
drivers/usb/host/ohci-ps3.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.h
drivers/usb/serial/symbolserial.c
drivers/uwb/whci.c
drivers/video/Kconfig
drivers/video/fsl-diu-fb.c
drivers/video/mx3fb.c
drivers/video/tdfxfb.c
drivers/watchdog/wdrtas.c
firmware/Makefile
firmware/WHENCE
firmware/bnx2/bnx2-mips-06-4.6.16.fw.ihex [new file with mode: 0644]
firmware/bnx2/bnx2-mips-09-4.6.17.fw.ihex [new file with mode: 0644]
firmware/bnx2/bnx2-rv2p-06-4.6.16.fw.ihex [new file with mode: 0644]
firmware/bnx2/bnx2-rv2p-09-4.6.15.fw.ihex [new file with mode: 0644]
firmware/myricom/lanai.bin.ihex [new file with mode: 0644]
fs/Kconfig
fs/Makefile
fs/afs/netdevices.c
fs/befs/super.c
fs/buffer.c
fs/ext3/Kconfig
fs/ext3/inode.c
fs/ext3/super.c
fs/ext4/extents.c
fs/ext4/inode.c
fs/ext4/super.c
fs/jffs2/acl.c
fs/jffs2/malloc.c
fs/nfs/file.c
fs/nfs/super.c
fs/nilfs2/Makefile [new file with mode: 0644]
fs/nilfs2/alloc.c [new file with mode: 0644]
fs/nilfs2/alloc.h [new file with mode: 0644]
fs/nilfs2/bmap.c [new file with mode: 0644]
fs/nilfs2/bmap.h [new file with mode: 0644]
fs/nilfs2/bmap_union.h [new file with mode: 0644]
fs/nilfs2/btnode.c [new file with mode: 0644]
fs/nilfs2/btnode.h [new file with mode: 0644]
fs/nilfs2/btree.c [new file with mode: 0644]
fs/nilfs2/btree.h [new file with mode: 0644]
fs/nilfs2/cpfile.c [new file with mode: 0644]
fs/nilfs2/cpfile.h [new file with mode: 0644]
fs/nilfs2/dat.c [new file with mode: 0644]
fs/nilfs2/dat.h [new file with mode: 0644]
fs/nilfs2/dir.c [new file with mode: 0644]
fs/nilfs2/direct.c [new file with mode: 0644]
fs/nilfs2/direct.h [new file with mode: 0644]
fs/nilfs2/file.c [new file with mode: 0644]
fs/nilfs2/gcdat.c [new file with mode: 0644]
fs/nilfs2/gcinode.c [new file with mode: 0644]
fs/nilfs2/ifile.c [new file with mode: 0644]
fs/nilfs2/ifile.h [new file with mode: 0644]
fs/nilfs2/inode.c [new file with mode: 0644]
fs/nilfs2/ioctl.c [new file with mode: 0644]
fs/nilfs2/mdt.c [new file with mode: 0644]
fs/nilfs2/mdt.h [new file with mode: 0644]
fs/nilfs2/namei.c [new file with mode: 0644]
fs/nilfs2/nilfs.h [new file with mode: 0644]
fs/nilfs2/page.c [new file with mode: 0644]
fs/nilfs2/page.h [new file with mode: 0644]
fs/nilfs2/recovery.c [new file with mode: 0644]
fs/nilfs2/sb.h [new file with mode: 0644]
fs/nilfs2/segbuf.c [new file with mode: 0644]
fs/nilfs2/segbuf.h [new file with mode: 0644]
fs/nilfs2/seglist.h [new file with mode: 0644]
fs/nilfs2/segment.c [new file with mode: 0644]
fs/nilfs2/segment.h [new file with mode: 0644]
fs/nilfs2/sufile.c [new file with mode: 0644]
fs/nilfs2/sufile.h [new file with mode: 0644]
fs/nilfs2/super.c [new file with mode: 0644]
fs/nilfs2/the_nilfs.c [new file with mode: 0644]
fs/nilfs2/the_nilfs.h [new file with mode: 0644]
fs/ocfs2/file.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c
fs/ramfs/inode.c
fs/romfs/Kconfig
fs/romfs/Makefile
fs/romfs/inode.c [deleted file]
fs/romfs/internal.h [new file with mode: 0644]
fs/romfs/mmap-nommu.c [new file with mode: 0644]
fs/romfs/storage.c [new file with mode: 0644]
fs/romfs/super.c [new file with mode: 0644]
fs/splice.c
fs/super.c
fs/ubifs/budget.c
fs/ubifs/debug.c
fs/ubifs/file.c
fs/ubifs/find.c
fs/ubifs/gc.c
fs/ubifs/journal.c
fs/ubifs/key.h
fs/ubifs/log.c
fs/ubifs/lpt_commit.c
fs/ubifs/recovery.c
fs/ubifs/replay.c
fs/ubifs/sb.c
fs/ubifs/shrinker.c
fs/ubifs/super.c
fs/ubifs/tnc.c
fs/ubifs/ubifs-media.h
fs/ubifs/ubifs.h
include/acpi/acpi_bus.h
include/acpi/acpixf.h
include/asm-frv/Kbuild [deleted file]
include/asm-frv/atomic.h [deleted file]
include/asm-frv/auxvec.h [deleted file]
include/asm-frv/ax88796.h [deleted file]
include/asm-frv/bitops.h [deleted file]
include/asm-frv/bug.h [deleted file]
include/asm-frv/bugs.h [deleted file]
include/asm-frv/busctl-regs.h [deleted file]
include/asm-frv/byteorder.h [deleted file]
include/asm-frv/cache.h [deleted file]
include/asm-frv/cacheflush.h [deleted file]
include/asm-frv/checksum.h [deleted file]
include/asm-frv/cpu-irqs.h [deleted file]
include/asm-frv/cpumask.h [deleted file]
include/asm-frv/cputime.h [deleted file]
include/asm-frv/current.h [deleted file]
include/asm-frv/delay.h [deleted file]
include/asm-frv/device.h [deleted file]
include/asm-frv/div64.h [deleted file]
include/asm-frv/dm9000.h [deleted file]
include/asm-frv/dma-mapping.h [deleted file]
include/asm-frv/dma.h [deleted file]
include/asm-frv/elf.h [deleted file]
include/asm-frv/emergency-restart.h [deleted file]
include/asm-frv/errno.h [deleted file]
include/asm-frv/fb.h [deleted file]
include/asm-frv/fcntl.h [deleted file]
include/asm-frv/fpu.h [deleted file]
include/asm-frv/ftrace.h [deleted file]
include/asm-frv/futex.h [deleted file]
include/asm-frv/gdb-stub.h [deleted file]
include/asm-frv/gpio-regs.h [deleted file]
include/asm-frv/hardirq.h [deleted file]
include/asm-frv/highmem.h [deleted file]
include/asm-frv/hw_irq.h [deleted file]
include/asm-frv/init.h [deleted file]
include/asm-frv/io.h [deleted file]
include/asm-frv/ioctl.h [deleted file]
include/asm-frv/ioctls.h [deleted file]
include/asm-frv/ipcbuf.h [deleted file]
include/asm-frv/irc-regs.h [deleted file]
include/asm-frv/irq.h [deleted file]
include/asm-frv/irq_regs.h [deleted file]
include/asm-frv/kdebug.h [deleted file]
include/asm-frv/kmap_types.h [deleted file]
include/asm-frv/linkage.h [deleted file]
include/asm-frv/local.h [deleted file]
include/asm-frv/math-emu.h [deleted file]
include/asm-frv/mb-regs.h [deleted file]
include/asm-frv/mb86943a.h [deleted file]
include/asm-frv/mb93091-fpga-irqs.h [deleted file]
include/asm-frv/mb93093-fpga-irqs.h [deleted file]
include/asm-frv/mb93493-irqs.h [deleted file]
include/asm-frv/mb93493-regs.h [deleted file]
include/asm-frv/mc146818rtc.h [deleted file]
include/asm-frv/mem-layout.h [deleted file]
include/asm-frv/mman.h [deleted file]
include/asm-frv/mmu.h [deleted file]
include/asm-frv/mmu_context.h [deleted file]
include/asm-frv/module.h [deleted file]
include/asm-frv/msgbuf.h [deleted file]
include/asm-frv/mutex.h [deleted file]
include/asm-frv/page.h [deleted file]
include/asm-frv/param.h [deleted file]
include/asm-frv/pci.h [deleted file]
include/asm-frv/percpu.h [deleted file]
include/asm-frv/pgalloc.h [deleted file]
include/asm-frv/pgtable.h [deleted file]
include/asm-frv/poll.h [deleted file]
include/asm-frv/posix_types.h [deleted file]
include/asm-frv/processor.h [deleted file]
include/asm-frv/ptrace.h [deleted file]
include/asm-frv/registers.h [deleted file]
include/asm-frv/resource.h [deleted file]
include/asm-frv/scatterlist.h [deleted file]
include/asm-frv/sections.h [deleted file]
include/asm-frv/segment.h [deleted file]
include/asm-frv/sembuf.h [deleted file]
include/asm-frv/serial-regs.h [deleted file]
include/asm-frv/serial.h [deleted file]
include/asm-frv/setup.h [deleted file]
include/asm-frv/shmbuf.h [deleted file]
include/asm-frv/shmparam.h [deleted file]
include/asm-frv/sigcontext.h [deleted file]
include/asm-frv/siginfo.h [deleted file]
include/asm-frv/signal.h [deleted file]
include/asm-frv/smp.h [deleted file]
include/asm-frv/socket.h [deleted file]
include/asm-frv/sockios.h [deleted file]
include/asm-frv/spinlock.h [deleted file]
include/asm-frv/spr-regs.h [deleted file]
include/asm-frv/stat.h [deleted file]
include/asm-frv/statfs.h [deleted file]
include/asm-frv/string.h [deleted file]
include/asm-frv/suspend.h [deleted file]
include/asm-frv/swab.h [deleted file]
include/asm-frv/system.h [deleted file]
include/asm-frv/termbits.h [deleted file]
include/asm-frv/termios.h [deleted file]
include/asm-frv/thread_info.h [deleted file]
include/asm-frv/timer-regs.h [deleted file]
include/asm-frv/timex.h [deleted file]
include/asm-frv/tlb.h [deleted file]
include/asm-frv/tlbflush.h [deleted file]
include/asm-frv/topology.h [deleted file]
include/asm-frv/types.h [deleted file]
include/asm-frv/uaccess.h [deleted file]
include/asm-frv/ucontext.h [deleted file]
include/asm-frv/unaligned.h [deleted file]
include/asm-frv/unistd.h [deleted file]
include/asm-frv/user.h [deleted file]
include/asm-frv/vga.h [deleted file]
include/asm-frv/virtconvert.h [deleted file]
include/asm-frv/xor.h [deleted file]
include/asm-mn10300/Kbuild [deleted file]
include/asm-mn10300/atomic.h [deleted file]
include/asm-mn10300/auxvec.h [deleted file]
include/asm-mn10300/bitops.h [deleted file]
include/asm-mn10300/bug.h [deleted file]
include/asm-mn10300/bugs.h [deleted file]
include/asm-mn10300/busctl-regs.h [deleted file]
include/asm-mn10300/byteorder.h [deleted file]
include/asm-mn10300/cache.h [deleted file]
include/asm-mn10300/cacheflush.h [deleted file]
include/asm-mn10300/checksum.h [deleted file]
include/asm-mn10300/cpu-regs.h [deleted file]
include/asm-mn10300/cputime.h [deleted file]
include/asm-mn10300/current.h [deleted file]
include/asm-mn10300/delay.h [deleted file]
include/asm-mn10300/device.h [deleted file]
include/asm-mn10300/div64.h [deleted file]
include/asm-mn10300/dma-mapping.h [deleted file]
include/asm-mn10300/dma.h [deleted file]
include/asm-mn10300/dmactl-regs.h [deleted file]
include/asm-mn10300/elf.h [deleted file]
include/asm-mn10300/emergency-restart.h [deleted file]
include/asm-mn10300/errno.h [deleted file]
include/asm-mn10300/exceptions.h [deleted file]
include/asm-mn10300/fb.h [deleted file]
include/asm-mn10300/fcntl.h [deleted file]
include/asm-mn10300/fpu.h [deleted file]
include/asm-mn10300/frame.inc [deleted file]
include/asm-mn10300/ftrace.h [deleted file]
include/asm-mn10300/futex.h [deleted file]
include/asm-mn10300/gdb-stub.h [deleted file]
include/asm-mn10300/hardirq.h [deleted file]
include/asm-mn10300/highmem.h [deleted file]
include/asm-mn10300/hw_irq.h [deleted file]
include/asm-mn10300/intctl-regs.h [deleted file]
include/asm-mn10300/io.h [deleted file]
include/asm-mn10300/ioctl.h [deleted file]
include/asm-mn10300/ioctls.h [deleted file]
include/asm-mn10300/ipc.h [deleted file]
include/asm-mn10300/ipcbuf.h [deleted file]
include/asm-mn10300/irq.h [deleted file]
include/asm-mn10300/irq_regs.h [deleted file]
include/asm-mn10300/kdebug.h [deleted file]
include/asm-mn10300/kmap_types.h [deleted file]
include/asm-mn10300/kprobes.h [deleted file]
include/asm-mn10300/linkage.h [deleted file]
include/asm-mn10300/local.h [deleted file]
include/asm-mn10300/mc146818rtc.h [deleted file]
include/asm-mn10300/mman.h [deleted file]
include/asm-mn10300/mmu.h [deleted file]
include/asm-mn10300/mmu_context.h [deleted file]
include/asm-mn10300/module.h [deleted file]
include/asm-mn10300/msgbuf.h [deleted file]
include/asm-mn10300/mutex.h [deleted file]
include/asm-mn10300/nmi.h [deleted file]
include/asm-mn10300/page.h [deleted file]
include/asm-mn10300/page_offset.h [deleted file]
include/asm-mn10300/param.h [deleted file]
include/asm-mn10300/pci.h [deleted file]
include/asm-mn10300/percpu.h [deleted file]
include/asm-mn10300/pgalloc.h [deleted file]
include/asm-mn10300/pgtable.h [deleted file]
include/asm-mn10300/pio-regs.h [deleted file]
include/asm-mn10300/poll.h [deleted file]
include/asm-mn10300/posix_types.h [deleted file]
include/asm-mn10300/proc-mn103e010/cache.h [deleted file]
include/asm-mn10300/proc-mn103e010/clock.h [deleted file]
include/asm-mn10300/proc-mn103e010/irq.h [deleted file]
include/asm-mn10300/proc-mn103e010/proc.h [deleted file]
include/asm-mn10300/processor.h [deleted file]
include/asm-mn10300/ptrace.h [deleted file]
include/asm-mn10300/reset-regs.h [deleted file]
include/asm-mn10300/resource.h [deleted file]
include/asm-mn10300/rtc-regs.h [deleted file]
include/asm-mn10300/rtc.h [deleted file]
include/asm-mn10300/scatterlist.h [deleted file]
include/asm-mn10300/sections.h [deleted file]
include/asm-mn10300/sembuf.h [deleted file]
include/asm-mn10300/serial-regs.h [deleted file]
include/asm-mn10300/serial.h [deleted file]
include/asm-mn10300/setup.h [deleted file]
include/asm-mn10300/shmbuf.h [deleted file]
include/asm-mn10300/shmparam.h [deleted file]
include/asm-mn10300/sigcontext.h [deleted file]
include/asm-mn10300/siginfo.h [deleted file]
include/asm-mn10300/signal.h [deleted file]
include/asm-mn10300/smp.h [deleted file]
include/asm-mn10300/socket.h [deleted file]
include/asm-mn10300/sockios.h [deleted file]
include/asm-mn10300/spinlock.h [deleted file]
include/asm-mn10300/stat.h [deleted file]
include/asm-mn10300/statfs.h [deleted file]
include/asm-mn10300/string.h [deleted file]
include/asm-mn10300/swab.h [deleted file]
include/asm-mn10300/system.h [deleted file]
include/asm-mn10300/termbits.h [deleted file]
include/asm-mn10300/termios.h [deleted file]
include/asm-mn10300/thread_info.h [deleted file]
include/asm-mn10300/timer-regs.h [deleted file]
include/asm-mn10300/timex.h [deleted file]
include/asm-mn10300/tlb.h [deleted file]
include/asm-mn10300/tlbflush.h [deleted file]
include/asm-mn10300/topology.h [deleted file]
include/asm-mn10300/types.h [deleted file]
include/asm-mn10300/uaccess.h [deleted file]
include/asm-mn10300/ucontext.h [deleted file]
include/asm-mn10300/unaligned.h [deleted file]
include/asm-mn10300/unistd.h [deleted file]
include/asm-mn10300/unit-asb2303/clock.h [deleted file]
include/asm-mn10300/unit-asb2303/leds.h [deleted file]
include/asm-mn10300/unit-asb2303/serial.h [deleted file]
include/asm-mn10300/unit-asb2303/smc91111.h [deleted file]
include/asm-mn10300/unit-asb2303/timex.h [deleted file]
include/asm-mn10300/unit-asb2305/clock.h [deleted file]
include/asm-mn10300/unit-asb2305/leds.h [deleted file]
include/asm-mn10300/unit-asb2305/serial.h [deleted file]
include/asm-mn10300/unit-asb2305/timex.h [deleted file]
include/asm-mn10300/user.h [deleted file]
include/asm-mn10300/vga.h [deleted file]
include/asm-mn10300/xor.h [deleted file]
include/linux/ata.h
include/linux/blkdev.h
include/linux/compiler.h
include/linux/device-mapper.h
include/linux/dma-mapping.h
include/linux/dmar.h
include/linux/elevator.h
include/linux/fs.h
include/linux/fsl_devices.h
include/linux/ftrace.h
include/linux/hardirq.h
include/linux/i2c-id.h
include/linux/i2c/s6000.h [new file with mode: 0644]
include/linux/ide.h
include/linux/init_task.h
include/linux/intel-iommu.h
include/linux/interrupt.h
include/linux/ipc_namespace.h
include/linux/irq.h
include/linux/irqreturn.h
include/linux/kmod.h
include/linux/kprobes.h
include/linux/mfd/pcf50633/core.h
include/linux/mfd/pcf50633/mbc.h
include/linux/mg_disk.h [new file with mode: 0644]
include/linux/mtd/mtd.h
include/linux/mtd/nand.h
include/linux/mtd/partitions.h
include/linux/nilfs2_fs.h [new file with mode: 0644]
include/linux/parport_pc.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/pda_power.h
include/linux/sched.h
include/linux/serial_core.h
include/linux/serial_max3100.h [new file with mode: 0644]
include/linux/spi/spi.h
include/linux/syscalls.h
include/linux/tty_driver.h
include/linux/videodev2.h
include/linux/writeback.h
include/media/msp3400.h
include/media/ov772x.h
include/media/saa7146.h
include/media/tvaudio.h
include/media/v4l2-common.h
include/media/v4l2-i2c-drv-legacy.h [deleted file]
include/media/v4l2-i2c-drv.h
include/media/v4l2-subdev.h
include/net/netfilter/nf_conntrack_expect.h
include/trace/syscall.h [new file with mode: 0644]
include/video/tdfx.h
init/Kconfig
ipc/Makefile
ipc/mq_sysctl.c [new file with mode: 0644]
ipc/mqueue.c
ipc/msgutil.c
ipc/namespace.c
ipc/util.c
ipc/util.h
kernel/Makefile
kernel/exit.c
kernel/fork.c
kernel/futex.c
kernel/hung_task.c [new file with mode: 0644]
kernel/irq/devres.c
kernel/irq/handle.c
kernel/irq/manage.c
kernel/irq/numa_migrate.c
kernel/kprobes.c
kernel/kthread.c
kernel/module.c
kernel/posix-cpu-timers.c
kernel/ptrace.c
kernel/sched.c
kernel/sched_cpupri.c
kernel/sched_rt.c
kernel/softlockup.c
kernel/sysctl.c
kernel/timer.c
kernel/trace/blktrace.c
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_export.c
kernel/trace/trace_output.c
kernel/trace/trace_sched_switch.c
kernel/trace/trace_sched_wakeup.c
kernel/trace/trace_syscalls.c
kernel/workqueue.c
lib/Kconfig.debug
lib/swiotlb.c
lib/vsprintf.c
mm/pdflush.c
net/802/fddi.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/xfrm6_output.c
net/netfilter/Kconfig
net/netfilter/nf_conntrack_expect.c
net/socket.c
scripts/trace/power.pl [deleted file]
scripts/tracing/power.pl [new file with mode: 0644]
security/commoncap.c
security/keys/request_key.c
security/tomoyo/common.c
security/tomoyo/common.h
security/tomoyo/domain.c
sound/arm/pxa2xx-ac97-lib.c
sound/atmel/abdac.c
sound/atmel/ac97c.c
sound/atmel/ac97c.h
sound/core/oss/mixer_oss.c
sound/isa/opl3sa2.c
sound/pci/ad1889.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/als4000.c
sound/pci/au88x0/au88x0.c
sound/pci/aw2/aw2-alsa.c
sound/pci/azt3328.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/es1938.c
sound/pci/es1968.c
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/ice1712/ice1712.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/pcxhr/pcxhr.c
sound/pci/sis7019.c
sound/pci/sonicvibes.c
sound/pci/trident/trident_main.c
sound/ppc/powermac.c
sound/soc/blackfin/bf5xx-ac97-pcm.c
sound/soc/blackfin/bf5xx-i2s-pcm.c
sound/soc/codecs/ak4535.c
sound/soc/codecs/twl4030.c
sound/soc/codecs/twl4030.h
sound/soc/codecs/wm9705.c
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/fsl_ssi.c
sound/soc/omap/omap-mcbsp.c
sound/soc/omap/omap-pcm.c
sound/soc/pxa/Kconfig
sound/soc/pxa/Makefile
sound/soc/pxa/magician.c [new file with mode: 0644]
sound/soc/pxa/pxa-ssp.c
sound/soc/pxa/pxa2xx-pcm.c
sound/soc/s3c24xx/s3c24xx-pcm.c
sound/soc/soc-core.c
sound/sparc/cs4231.c
sound/usb/usbaudio.c

index b2a4d6d..01f24e9 100644 (file)
@@ -136,7 +136,7 @@ exactly why.
 The standard 32-bit addressing PCI device would do something like
 this:
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING
                       "mydev: No suitable DMA available.\n");
                goto ignore_this_device;
@@ -155,9 +155,9 @@ all 64-bits when accessing streaming DMA:
 
        int using_dac;
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                using_dac = 1;
-       } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                using_dac = 0;
        } else {
                printk(KERN_WARNING
@@ -170,14 +170,14 @@ the case would look like this:
 
        int using_dac, consistent_using_dac;
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                using_dac = 1;
                consistent_using_dac = 1;
-               pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
-       } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+               pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+       } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                using_dac = 0;
                consistent_using_dac = 0;
-               pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        } else {
                printk(KERN_WARNING
                       "mydev: No suitable DMA available.\n");
@@ -192,7 +192,7 @@ check the return value from pci_set_consistent_dma_mask().
 Finally, if your device can only drive the low 24-bits of
 address during PCI bus mastering you might do something like:
 
-       if (pci_set_dma_mask(pdev, DMA_24BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(24))) {
                printk(KERN_WARNING
                       "mydev: 24-bit DMA addressing not available.\n");
                goto ignore_this_device;
@@ -213,7 +213,7 @@ most specific mask.
 
 Here is pseudo-code showing how this might be done:
 
-       #define PLAYBACK_ADDRESS_BITS   DMA_32BIT_MASK
+       #define PLAYBACK_ADDRESS_BITS   DMA_BIT_MASK(32)
        #define RECORD_ADDRESS_BITS     0x00ffffff
 
        struct my_sound_card *card;
index 46b08fe..7a2e0e9 100644 (file)
           if (err < 0)
                   return err;
           /* check PCI availability (28bit DMA) */
-          if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-              pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+          if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+              pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
                   printk(KERN_ERR "error to set 28bit mask DMA\n");
                   pci_disable_device(pci);
                   return -ENXIO;
   err = pci_enable_device(pci);
   if (err < 0)
           return err;
-  if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-      pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+  if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+      pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
           printk(KERN_ERR "error to set 28bit mask DMA\n");
           pci_disable_device(pci);
           return -ENXIO;
index 86f054c..c08df56 100644 (file)
@@ -8,6 +8,8 @@ cpqarray.txt
        - info on using Compaq's SMART2 Intelligent Disk Array Controllers.
 floppy.txt
        - notes and driver options for the floppy disk driver.
+mflash.txt
+       - info on mGine m(g)flash driver for linux.
 nbd.txt
        - info on a TCP implementation of a network block device.
 paride.txt
diff --git a/Documentation/blockdev/mflash.txt b/Documentation/blockdev/mflash.txt
new file mode 100644 (file)
index 0000000..1f610ec
--- /dev/null
@@ -0,0 +1,84 @@
+This document describes m[g]flash support in linux.
+
+Contents
+  1. Overview
+  2. Reserved area configuration
+  3. Example of mflash platform driver registration
+
+1. Overview
+
+Mflash and gflash are embedded flash drive. The only difference is mflash is
+MCP(Multi Chip Package) device. These two device operate exactly same way.
+So the rest mflash repersents mflash and gflash altogether.
+
+Internally, mflash has nand flash and other hardware logics and supports
+2 different operation (ATA, IO) modes. ATA mode doesn't need any new
+driver and currently works well under standard IDE subsystem. Actually it's
+one chip SSD. IO mode is ATA-like custom mode for the host that doesn't have
+IDE interface.
+
+Followings are brief descriptions about IO mode.
+A. IO mode based on ATA protocol and uses some custom command. (read confirm,
+write confirm)
+B. IO mode uses SRAM bus interface.
+C. IO mode supports 4kB boot area, so host can boot from mflash.
+
+2. Reserved area configuration
+If host boot from mflash, usually needs raw area for boot loader image. All of
+the mflash's block device operation will be taken this value as start offset.
+Note that boot loader's size of reserved area and kernel configuration value
+must be same.
+
+3. Example of mflash platform driver registration
+Working mflash is very straight forward. Adding platform device stuff to board
+configuration file is all. Here is some pseudo example.
+
+static struct mg_drv_data mflash_drv_data = {
+       /* If you want to polling driver set to 1 */
+       .use_polling = 0,
+       /* device attribution */
+       .dev_attr = MG_BOOT_DEV
+};
+
+static struct resource mg_mflash_rsc[] = {
+       /* Base address of mflash */
+       [0] = {
+               .start = 0x08000000,
+               .end = 0x08000000 + SZ_64K - 1,
+               .flags = IORESOURCE_MEM
+       },
+       /* mflash interrupt pin */
+       [1] = {
+               .start = IRQ_GPIO(84),
+               .end = IRQ_GPIO(84),
+               .flags = IORESOURCE_IRQ
+       },
+       /* mflash reset pin */
+       [2] = {
+               .start = 43,
+               .end = 43,
+               .name = MG_RST_PIN,
+               .flags = IORESOURCE_IO
+       },
+       /* mflash reset-out pin
+        * If you use mflash as storage device (i.e. other than MG_BOOT_DEV),
+        * should assign this */
+       [3] = {
+               .start = 51,
+               .end = 51,
+               .name = MG_RSTOUT_PIN,
+               .flags = IORESOURCE_IO
+       }
+};
+
+static struct platform_device mflash_dev = {
+       .name = MG_DEV_NAME,
+       .id = -1,
+       .dev = {
+               .platform_data = &mflash_drv_data,
+       },
+       .num_resources = ARRAY_SIZE(mg_mflash_rsc),
+       .resource = mg_mflash_rsc
+};
+
+platform_device_register(&mflash_dev);
index bb775fb..8b93094 100644 (file)
@@ -30,3 +30,21 @@ The above steps create a new group g1 and move the current shell
 process (bash) into it. CPU time consumed by this bash and its children
 can be obtained from g1/cpuacct.usage and the same is accumulated in
 /cgroups/cpuacct.usage also.
+
+cpuacct.stat file lists a few statistics which further divide the
+CPU time obtained by the cgroup into user and system times. Currently
+the following statistics are supported:
+
+user: Time spent by tasks of the cgroup in user mode.
+system: Time spent by tasks of the cgroup in kernel mode.
+
+user and system are in USER_HZ unit.
+
+cpuacct controller uses percpu_counter interface to collect user and
+system times. This has two side effects:
+
+- It is theoretically possible to see wrong values for user and system times.
+  This is because percpu_counter_read() on 32bit systems isn't safe
+  against concurrent writes.
+- It is possible to see slightly outdated values for user and system times
+  due to the batch processing nature of percpu_counter.
index 327de16..53d64d3 100644 (file)
@@ -3,7 +3,7 @@
 
             Maintained by Alan Cox <device@lanana.org>
 
-                     Last revised: 29 November 2006
+                     Last revised: 6th April 2009
 
 This list is the Linux Device List, the official registry of allocated
 device numbers and /dev directory nodes for the Linux operating
@@ -2797,6 +2797,10 @@ Your cooperation is appreciated.
                 206 = /dev/ttySC1              SC26xx serial port 1
                 207 = /dev/ttySC2              SC26xx serial port 2
                 208 = /dev/ttySC3              SC26xx serial port 3
+                209 = /dev/ttyMAX0             MAX3100 serial port 0
+                210 = /dev/ttyMAX1             MAX3100 serial port 1
+                211 = /dev/ttyMAX2             MAX3100 serial port 2
+                212 = /dev/ttyMAX3             MAX3100 serial port 3
 
 205 char       Low-density serial ports (alternate device)
                  0 = /dev/culu0                Callout device for ttyLU0
index 7ac3c40..eefdd91 100644 (file)
@@ -59,7 +59,8 @@ Accepted options:
 ypan    Enable display panning using the VESA protected mode
         interface.  The visible screen is just a window of the
         video memory, console scrolling is done by changing the
-        start of the window.  Available on x86 only.
+        start of the window.  This option is available on x86
+        only and is the default option on that architecture.
 
 ywrap   Same as ypan, but assumes your gfx board can wrap-around
         the video memory (i.e. starts reading from top if it
@@ -67,7 +68,7 @@ ywrap   Same as ypan, but assumes your gfx board can wrap-around
         Available on x86 only.
 
 redraw  Scroll by redrawing the affected part of the screen, this
-        is the safe (and slow) default.
+        is the default on non-x86.
 
 (If you're using uvesafb as a module, the above three options are
  used a parameter of the scroll option, e.g. scroll=ypan.)
@@ -182,7 +183,7 @@ from the Video BIOS if you set pixclock to 0 in fb_var_screeninfo.
 
 --
  Michal Januszewski <spock@gentoo.org>
- Last updated: 2007-06-16
+ Last updated: 2009-03-30
 
  Documentation of the uvesafb options is loosely based on vesafb.txt.
 
index 52cd611..8dd6db7 100644 (file)
@@ -68,6 +68,8 @@ ncpfs.txt
        - info on Novell Netware(tm) filesystem using NCP protocol.
 nfsroot.txt
        - short guide on setting up a diskless box with NFS root filesystem.
+nilfs2.txt
+       - info and mount options for the NILFS2 filesystem.
 ntfs.txt
        - info and mount options for the NTFS filesystem (Windows NT).
 ocfs2.txt
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
new file mode 100644 (file)
index 0000000..55c4300
--- /dev/null
@@ -0,0 +1,200 @@
+NILFS2
+------
+
+NILFS2 is a log-structured file system (LFS) supporting continuous
+snapshotting.  In addition to versioning capability of the entire file
+system, users can even restore files mistakenly overwritten or
+destroyed just a few seconds ago.  Since NILFS2 can keep consistency
+like conventional LFS, it achieves quick recovery after system
+crashes.
+
+NILFS2 creates a number of checkpoints every few seconds or per
+synchronous write basis (unless there is no change).  Users can select
+significant versions among continuously created checkpoints, and can
+change them into snapshots which will be preserved until they are
+changed back to checkpoints.
+
+There is no limit on the number of snapshots until the volume gets
+full.  Each snapshot is mountable as a read-only file system
+concurrently with its writable mount, and this feature is convenient
+for online backup.
+
+The userland tools are included in nilfs-utils package, which is
+available from the following download page.  At least "mkfs.nilfs2",
+"mount.nilfs2", "umount.nilfs2", and "nilfs_cleanerd" (so called
+cleaner or garbage collector) are required.  Details on the tools are
+described in the man pages included in the package.
+
+Project web page:    http://www.nilfs.org/en/
+Download page:       http://www.nilfs.org/en/download.html
+Git tree web page:   http://www.nilfs.org/git/
+NILFS mailing lists: http://www.nilfs.org/mailman/listinfo/users
+
+Caveats
+=======
+
+Features which NILFS2 does not support yet:
+
+       - atime
+       - extended attributes
+       - POSIX ACLs
+       - quotas
+       - writable snapshots
+       - remote backup (CDP)
+       - data integrity
+       - defragmentation
+
+Mount options
+=============
+
+NILFS2 supports the following mount options:
+(*) == default
+
+barrier=on(*)          This enables/disables barriers. barrier=off disables
+                       it, barrier=on enables it.
+errors=continue(*)     Keep going on a filesystem error.
+errors=remount-ro      Remount the filesystem read-only on an error.
+errors=panic           Panic and halt the machine if an error occurs.
+cp=n                   Specify the checkpoint-number of the snapshot to be
+                       mounted.  Checkpoints and snapshots are listed by lscp
+                       user command.  Only the checkpoints marked as snapshot
+                       are mountable with this option.  Snapshot is read-only,
+                       so a read-only mount option must be specified together.
+order=relaxed(*)       Apply relaxed order semantics that allows modified data
+                       blocks to be written to disk without making a
+                       checkpoint if no metadata update is going.  This mode
+                       is equivalent to the ordered data mode of the ext3
+                       filesystem except for the updates on data blocks still
+                       conserve atomicity.  This will improve synchronous
+                       write performance for overwriting.
+order=strict           Apply strict in-order semantics that preserves sequence
+                       of all file operations including overwriting of data
+                       blocks.  That means, it is guaranteed that no
+                       overtaking of events occurs in the recovered file
+                       system after a crash.
+
+NILFS2 usage
+============
+
+To use nilfs2 as a local file system, simply:
+
+ # mkfs -t nilfs2 /dev/block_device
+ # mount -t nilfs2 /dev/block_device /dir
+
+This will also invoke the cleaner through the mount helper program
+(mount.nilfs2).
+
+Checkpoints and snapshots are managed by the following commands.
+Their manpages are included in the nilfs-utils package above.
+
+  lscp     list checkpoints or snapshots.
+  mkcp     make a checkpoint or a snapshot.
+  chcp     change an existing checkpoint to a snapshot or vice versa.
+  rmcp     invalidate specified checkpoint(s).
+
+To mount a snapshot,
+
+ # mount -t nilfs2 -r -o cp=<cno> /dev/block_device /snap_dir
+
+where <cno> is the checkpoint number of the snapshot.
+
+To unmount the NILFS2 mount point or snapshot, simply:
+
+ # umount /dir
+
+Then, the cleaner daemon is automatically shut down by the umount
+helper program (umount.nilfs2).
+
+Disk format
+===========
+
+A nilfs2 volume is equally divided into a number of segments except
+for the super block (SB) and segment #0.  A segment is the container
+of logs.  Each log is composed of summary information blocks, payload
+blocks, and an optional super root block (SR):
+
+   ______________________________________________________
+  | |SB| | Segment | Segment | Segment | ... | Segment | |
+  |_|__|_|____0____|____1____|____2____|_____|____N____|_|
+  0 +1K +4K       +8M       +16M      +24M  +(8MB x N)
+       .             .            (Typical offsets for 4KB-block)
+    .                  .
+  .______________________.
+  | log | log |... | log |
+  |__1__|__2__|____|__m__|
+        .       .
+      .               .
+    .                       .
+  .______________________________.
+  | Summary | Payload blocks  |SR|
+  |_blocks__|_________________|__|
+
+The payload blocks are organized per file, and each file consists of
+data blocks and B-tree node blocks:
+
+    |<---       File-A        --->|<---       File-B        --->|
+   _______________________________________________________________
+    | Data blocks | B-tree blocks | Data blocks | B-tree blocks | ...
+   _|_____________|_______________|_____________|_______________|_
+
+
+Since only the modified blocks are written in the log, it may have
+files without data blocks or B-tree node blocks.
+
+The organization of the blocks is recorded in the summary information
+blocks, which contains a header structure (nilfs_segment_summary), per
+file structures (nilfs_finfo), and per block structures (nilfs_binfo):
+
+  _________________________________________________________________________
+ | Summary | finfo | binfo | ... | binfo | finfo | binfo | ... | binfo |...
+ |_blocks__|___A___|_(A,1)_|_____|(A,Na)_|___B___|_(B,1)_|_____|(B,Nb)_|___
+
+
+The logs include regular files, directory files, symbolic link files
+and several meta data files.  The mata data files are the files used
+to maintain file system meta data.  The current version of NILFS2 uses
+the following meta data files:
+
+ 1) Inode file (ifile)             -- Stores on-disk inodes
+ 2) Checkpoint file (cpfile)       -- Stores checkpoints
+ 3) Segment usage file (sufile)    -- Stores allocation state of segments
+ 4) Data address translation file  -- Maps virtual block numbers to usual
+    (DAT)                             block numbers.  This file serves to
+                                      make on-disk blocks relocatable.
+
+The following figure shows a typical organization of the logs:
+
+  _________________________________________________________________________
+ | Summary | regular file | file  | ... | ifile | cpfile | sufile | DAT |SR|
+ |_blocks__|_or_directory_|_______|_____|_______|________|________|_____|__|
+
+
+To stride over segment boundaries, this sequence of files may be split
+into multiple logs.  The sequence of logs that should be treated as
+logically one log, is delimited with flags marked in the segment
+summary.  The recovery code of nilfs2 looks this boundary information
+to ensure atomicity of updates.
+
+The super root block is inserted for every checkpoints.  It includes
+three special inodes, inodes for the DAT, cpfile, and sufile.  Inodes
+of regular files, directories, symlinks and other special files, are
+included in the ifile.  The inode of ifile itself is included in the
+corresponding checkpoint entry in the cpfile.  Thus, the hierarchy
+among NILFS2 files can be depicted as follows:
+
+  Super block (SB)
+       |
+       v
+  Super root block (the latest cno=xx)
+       |-- DAT
+       |-- sufile
+       `-- cpfile
+              |-- ifile (cno=c1)
+              |-- ifile (cno=c2) ---- file (ino=i1)
+              :        :          |-- file (ino=i2)
+              `-- ifile (cno=xx)  |-- file (ino=i3)
+                                  :        :
+                                  `-- file (ino=yy)
+                                    ( regular file, directory, or symlink )
+
+For detail on the format of each file, please see include/linux/nilfs2_fs.h.
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt
deleted file mode 100644 (file)
index fd9a3e6..0000000
+++ /dev/null
@@ -1,1828 +0,0 @@
-               ftrace - Function Tracer
-               ========================
-
-Copyright 2008 Red Hat Inc.
-   Author:   Steven Rostedt <srostedt@redhat.com>
-  License:   The GNU Free Documentation License, Version 1.2
-               (dual licensed under the GPL v2)
-Reviewers:   Elias Oltmanns, Randy Dunlap, Andrew Morton,
-            John Kacur, and David Teigland.
-
-Written for: 2.6.28-rc2
-
-Introduction
-------------
-
-Ftrace is an internal tracer designed to help out developers and
-designers of systems to find what is going on inside the kernel.
-It can be used for debugging or analyzing latencies and
-performance issues that take place outside of user-space.
-
-Although ftrace is the function tracer, it also includes an
-infrastructure that allows for other types of tracing. Some of
-the tracers that are currently in ftrace include a tracer to
-trace context switches, the time it takes for a high priority
-task to run after it was woken up, the time interrupts are
-disabled, and more (ftrace allows for tracer plugins, which
-means that the list of tracers can always grow).
-
-
-The File System
----------------
-
-Ftrace uses the debugfs file system to hold the control files as
-well as the files to display output.
-
-To mount the debugfs system:
-
-  # mkdir /debug
-  # mount -t debugfs nodev /debug
-
-( Note: it is more common to mount at /sys/kernel/debug, but for
-  simplicity this document will use /debug)
-
-That's it! (assuming that you have ftrace configured into your kernel)
-
-After mounting the debugfs, you can see a directory called
-"tracing".  This directory contains the control and output files
-of ftrace. Here is a list of some of the key files:
-
-
- Note: all time values are in microseconds.
-
-  current_tracer:
-
-       This is used to set or display the current tracer
-       that is configured.
-
-  available_tracers:
-
-       This holds the different types of tracers that
-       have been compiled into the kernel. The
-       tracers listed here can be configured by
-       echoing their name into current_tracer.
-
-  tracing_enabled:
-
-       This sets or displays whether the current_tracer
-       is activated and tracing or not. Echo 0 into this
-       file to disable the tracer or 1 to enable it.
-
-  trace:
-
-       This file holds the output of the trace in a human
-       readable format (described below).
-
-  latency_trace:
-
-       This file shows the same trace but the information
-       is organized more to display possible latencies
-       in the system (described below).
-
-  trace_pipe:
-
-       The output is the same as the "trace" file but this
-       file is meant to be streamed with live tracing.
-       Reads from this file will block until new data
-       is retrieved. Unlike the "trace" and "latency_trace"
-       files, this file is a consumer. This means reading
-       from this file causes sequential reads to display
-       more current data. Once data is read from this
-       file, it is consumed, and will not be read
-       again with a sequential read. The "trace" and
-       "latency_trace" files are static, and if the
-       tracer is not adding more data, they will display
-       the same information every time they are read.
-
-  trace_options:
-
-       This file lets the user control the amount of data
-       that is displayed in one of the above output
-       files.
-
-  tracing_max_latency:
-
-       Some of the tracers record the max latency.
-       For example, the time interrupts are disabled.
-       This time is saved in this file. The max trace
-       will also be stored, and displayed by either
-       "trace" or "latency_trace".  A new max trace will
-       only be recorded if the latency is greater than
-       the value in this file. (in microseconds)
-
-  buffer_size_kb:
-
-       This sets or displays the number of kilobytes each CPU
-       buffer can hold. The tracer buffers are the same size
-       for each CPU. The displayed number is the size of the
-       CPU buffer and not total size of all buffers. The
-       trace buffers are allocated in pages (blocks of memory
-       that the kernel uses for allocation, usually 4 KB in size).
-       If the last page allocated has room for more bytes
-       than requested, the rest of the page will be used,
-       making the actual allocation bigger than requested.
-       ( Note, the size may not be a multiple of the page size
-         due to buffer managment overhead. )
-
-       This can only be updated when the current_tracer
-       is set to "nop".
-
-  tracing_cpumask:
-
-       This is a mask that lets the user only trace
-       on specified CPUS. The format is a hex string
-       representing the CPUS.
-
-  set_ftrace_filter:
-
-       When dynamic ftrace is configured in (see the
-       section below "dynamic ftrace"), the code is dynamically
-       modified (code text rewrite) to disable calling of the
-       function profiler (mcount). This lets tracing be configured
-       in with practically no overhead in performance.  This also
-       has a side effect of enabling or disabling specific functions
-       to be traced. Echoing names of functions into this file
-       will limit the trace to only those functions.
-
-  set_ftrace_notrace:
-
-       This has an effect opposite to that of
-       set_ftrace_filter. Any function that is added here will not
-       be traced. If a function exists in both set_ftrace_filter
-       and set_ftrace_notrace, the function will _not_ be traced.
-
-  set_ftrace_pid:
-
-       Have the function tracer only trace a single thread.
-
-  set_graph_function:
-
-       Set a "trigger" function where tracing should start
-       with the function graph tracer (See the section
-       "dynamic ftrace" for more details).
-
-  available_filter_functions:
-
-       This lists the functions that ftrace
-       has processed and can trace. These are the function
-       names that you can pass to "set_ftrace_filter" or
-       "set_ftrace_notrace". (See the section "dynamic ftrace"
-       below for more details.)
-
-
-The Tracers
------------
-
-Here is the list of current tracers that may be configured.
-
-  "function"
-
-       Function call tracer to trace all kernel functions.
-
-  "function_graph_tracer"
-
-       Similar to the function tracer except that the
-       function tracer probes the functions on their entry
-       whereas the function graph tracer traces on both entry
-       and exit of the functions. It then provides the ability
-       to draw a graph of function calls similar to C code
-       source.
-
-  "sched_switch"
-
-       Traces the context switches and wakeups between tasks.
-
-  "irqsoff"
-
-       Traces the areas that disable interrupts and saves
-       the trace with the longest max latency.
-       See tracing_max_latency. When a new max is recorded,
-       it replaces the old trace. It is best to view this
-       trace via the latency_trace file.
-
-  "preemptoff"
-
-       Similar to irqsoff but traces and records the amount of
-       time for which preemption is disabled.
-
-  "preemptirqsoff"
-
-       Similar to irqsoff and preemptoff, but traces and
-       records the largest time for which irqs and/or preemption
-       is disabled.
-
-  "wakeup"
-
-       Traces and records the max latency that it takes for
-       the highest priority task to get scheduled after
-       it has been woken up.
-
-  "hw-branch-tracer"
-
-       Uses the BTS CPU feature on x86 CPUs to traces all
-       branches executed.
-
-  "nop"
-
-       This is the "trace nothing" tracer. To remove all
-       tracers from tracing simply echo "nop" into
-       current_tracer.
-
-
-Examples of using the tracer
-----------------------------
-
-Here are typical examples of using the tracers when controlling
-them only with the debugfs interface (without using any
-user-land utilities).
-
-Output format:
---------------
-
-Here is an example of the output format of the file "trace"
-
-                             --------
-# tracer: function
-#
-#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
-#              | |      |          |         |
-            bash-4251  [01] 10152.583854: path_put <-path_walk
-            bash-4251  [01] 10152.583855: dput <-path_put
-            bash-4251  [01] 10152.583855: _atomic_dec_and_lock <-dput
-                             --------
-
-A header is printed with the tracer name that is represented by
-the trace. In this case the tracer is "function". Then a header
-showing the format. Task name "bash", the task PID "4251", the
-CPU that it was running on "01", the timestamp in <secs>.<usecs>
-format, the function name that was traced "path_put" and the
-parent function that called this function "path_walk". The
-timestamp is the time at which the function was entered.
-
-The sched_switch tracer also includes tracing of task wakeups
-and context switches.
-
-     ksoftirqd/1-7     [01]  1453.070013:      7:115:R   +  2916:115:S
-     ksoftirqd/1-7     [01]  1453.070013:      7:115:R   +    10:115:S
-     ksoftirqd/1-7     [01]  1453.070013:      7:115:R ==>    10:115:R
-        events/1-10    [01]  1453.070013:     10:115:S ==>  2916:115:R
-     kondemand/1-2916  [01]  1453.070013:   2916:115:S ==>     7:115:R
-     ksoftirqd/1-7     [01]  1453.070013:      7:115:S ==>     0:140:R
-
-Wake ups are represented by a "+" and the context switches are
-shown as "==>".  The format is:
-
- Context switches:
-
-       Previous task              Next Task
-
-  <pid>:<prio>:<state>  ==>  <pid>:<prio>:<state>
-
- Wake ups:
-
-       Current task               Task waking up
-
-  <pid>:<prio>:<state>    +  <pid>:<prio>:<state>
-
-The prio is the internal kernel priority, which is the inverse
-of the priority that is usually displayed by user-space tools.
-Zero represents the highest priority (99). Prio 100 starts the
-"nice" priorities with 100 being equal to nice -20 and 139 being
-nice 19. The prio "140" is reserved for the idle task which is
-the lowest priority thread (pid 0).
-
-
-Latency trace format
---------------------
-
-For traces that display latency times, the latency_trace file
-gives somewhat more information to see why a latency happened.
-Here is a typical trace.
-
-# tracer: irqsoff
-#
-irqsoff latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 97 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: swapper-0 (uid:0 nice:0 policy:0 rt_prio:0)
-    -----------------
- => started at: apic_timer_interrupt
- => ended at:   do_softirq
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-  <idle>-0     0d..1    0us+: trace_hardirqs_off_thunk (apic_timer_interrupt)
-  <idle>-0     0d.s.   97us : __do_softirq (do_softirq)
-  <idle>-0     0d.s1   98us : trace_hardirqs_on (do_softirq)
-
-
-This shows that the current tracer is "irqsoff" tracing the time
-for which interrupts were disabled. It gives the trace version
-and the version of the kernel upon which this was executed on
-(2.6.26-rc8). Then it displays the max latency in microsecs (97
-us). The number of trace entries displayed and the total number
-recorded (both are three: #3/3). The type of preemption that was
-used (PREEMPT). VP, KP, SP, and HP are always zero and are
-reserved for later use. #P is the number of online CPUS (#P:2).
-
-The task is the process that was running when the latency
-occurred. (swapper pid: 0).
-
-The start and stop (the functions in which the interrupts were
-disabled and enabled respectively) that caused the latencies:
-
-  apic_timer_interrupt is where the interrupts were disabled.
-  do_softirq is where they were enabled again.
-
-The next lines after the header are the trace itself. The header
-explains which is which.
-
-  cmd: The name of the process in the trace.
-
-  pid: The PID of that process.
-
-  CPU#: The CPU which the process was running on.
-
-  irqs-off: 'd' interrupts are disabled. '.' otherwise.
-           Note: If the architecture does not support a way to
-                 read the irq flags variable, an 'X' will always
-                 be printed here.
-
-  need-resched: 'N' task need_resched is set, '.' otherwise.
-
-  hardirq/softirq:
-       'H' - hard irq occurred inside a softirq.
-       'h' - hard irq is running
-       's' - soft irq is running
-       '.' - normal context.
-
-  preempt-depth: The level of preempt_disabled
-
-The above is mostly meaningful for kernel developers.
-
-  time: This differs from the trace file output. The trace file output
-       includes an absolute timestamp. The timestamp used by the
-       latency_trace file is relative to the start of the trace.
-
-  delay: This is just to help catch your eye a bit better. And
-        needs to be fixed to be only relative to the same CPU.
-        The marks are determined by the difference between this
-        current trace and the next trace.
-         '!' - greater than preempt_mark_thresh (default 100)
-         '+' - greater than 1 microsecond
-         ' ' - less than or equal to 1 microsecond.
-
-  The rest is the same as the 'trace' file.
-
-
-trace_options
--------------
-
-The trace_options file is used to control what gets printed in
-the trace output. To see what is available, simply cat the file:
-
-  cat /debug/tracing/trace_options
-  print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \
-  noblock nostacktrace nosched-tree nouserstacktrace nosym-userobj
-
-To disable one of the options, echo in the option prepended with
-"no".
-
-  echo noprint-parent > /debug/tracing/trace_options
-
-To enable an option, leave off the "no".
-
-  echo sym-offset > /debug/tracing/trace_options
-
-Here are the available options:
-
-  print-parent - On function traces, display the calling (parent)
-                function as well as the function being traced.
-
-  print-parent:
-   bash-4000  [01]  1477.606694: simple_strtoul <-strict_strtoul
-
-  noprint-parent:
-   bash-4000  [01]  1477.606694: simple_strtoul
-
-
-  sym-offset - Display not only the function name, but also the
-              offset in the function. For example, instead of
-              seeing just "ktime_get", you will see
-              "ktime_get+0xb/0x20".
-
-  sym-offset:
-   bash-4000  [01]  1477.606694: simple_strtoul+0x6/0xa0
-
-  sym-addr - this will also display the function address as well
-            as the function name.
-
-  sym-addr:
-   bash-4000  [01]  1477.606694: simple_strtoul <c0339346>
-
-  verbose - This deals with the latency_trace file.
-
-    bash  4000 1 0 00000000 00010a95 [58127d26] 1720.415ms \
-    (+0.000ms): simple_strtoul (strict_strtoul)
-
-  raw - This will display raw numbers. This option is best for
-       use with user applications that can translate the raw
-       numbers better than having it done in the kernel.
-
-  hex - Similar to raw, but the numbers will be in a hexadecimal
-       format.
-
-  bin - This will print out the formats in raw binary.
-
-  block - TBD (needs update)
-
-  stacktrace - This is one of the options that changes the trace
-              itself. When a trace is recorded, so is the stack
-              of functions. This allows for back traces of
-              trace sites.
-
-  userstacktrace - This option changes the trace. It records a
-                  stacktrace of the current userspace thread.
-
-  sym-userobj - when user stacktrace are enabled, look up which
-               object the address belongs to, and print a
-               relative address. This is especially useful when
-               ASLR is on, otherwise you don't get a chance to
-               resolve the address to object/file/line after
-               the app is no longer running
-
-               The lookup is performed when you read
-               trace,trace_pipe,latency_trace. Example:
-
-               a.out-1623  [000] 40874.465068: /root/a.out[+0x480] <-/root/a.out[+0
-x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
-
-  sched-tree - trace all tasks that are on the runqueue, at
-              every scheduling event. Will add overhead if
-              there's a lot of tasks running at once.
-
-
-sched_switch
-------------
-
-This tracer simply records schedule switches. Here is an example
-of how to use it.
-
- # echo sched_switch > /debug/tracing/current_tracer
- # echo 1 > /debug/tracing/tracing_enabled
- # sleep 1
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/trace
-
-# tracer: sched_switch
-#
-#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
-#              | |      |          |         |
-            bash-3997  [01]   240.132281:   3997:120:R   +  4055:120:R
-            bash-3997  [01]   240.132284:   3997:120:R ==>  4055:120:R
-           sleep-4055  [01]   240.132371:   4055:120:S ==>  3997:120:R
-            bash-3997  [01]   240.132454:   3997:120:R   +  4055:120:S
-            bash-3997  [01]   240.132457:   3997:120:R ==>  4055:120:R
-           sleep-4055  [01]   240.132460:   4055:120:D ==>  3997:120:R
-            bash-3997  [01]   240.132463:   3997:120:R   +  4055:120:D
-            bash-3997  [01]   240.132465:   3997:120:R ==>  4055:120:R
-          <idle>-0     [00]   240.132589:      0:140:R   +     4:115:S
-          <idle>-0     [00]   240.132591:      0:140:R ==>     4:115:R
-     ksoftirqd/0-4     [00]   240.132595:      4:115:S ==>     0:140:R
-          <idle>-0     [00]   240.132598:      0:140:R   +     4:115:S
-          <idle>-0     [00]   240.132599:      0:140:R ==>     4:115:R
-     ksoftirqd/0-4     [00]   240.132603:      4:115:S ==>     0:140:R
-           sleep-4055  [01]   240.133058:   4055:120:S ==>  3997:120:R
- [...]
-
-
-As we have discussed previously about this format, the header
-shows the name of the trace and points to the options. The
-"FUNCTION" is a misnomer since here it represents the wake ups
-and context switches.
-
-The sched_switch file only lists the wake ups (represented with
-'+') and context switches ('==>') with the previous task or
-current task first followed by the next task or task waking up.
-The format for both of these is PID:KERNEL-PRIO:TASK-STATE.
-Remember that the KERNEL-PRIO is the inverse of the actual
-priority with zero (0) being the highest priority and the nice
-values starting at 100 (nice -20). Below is a quick chart to map
-the kernel priority to user land priorities.
-
-  Kernel priority: 0 to 99    ==> user RT priority 99 to 0
-  Kernel priority: 100 to 139 ==> user nice -20 to 19
-  Kernel priority: 140        ==> idle task priority
-
-The task states are:
-
- R - running : wants to run, may not actually be running
- S - sleep   : process is waiting to be woken up (handles signals)
- D - disk sleep (uninterruptible sleep) : process must be woken up
-                                       (ignores signals)
- T - stopped : process suspended
- t - traced  : process is being traced (with something like gdb)
- Z - zombie  : process waiting to be cleaned up
- X - unknown
-
-
-ftrace_enabled
---------------
-
-The following tracers (listed below) give different output
-depending on whether or not the sysctl ftrace_enabled is set. To
-set ftrace_enabled, one can either use the sysctl function or
-set it via the proc file system interface.
-
-  sysctl kernel.ftrace_enabled=1
-
- or
-
-  echo 1 > /proc/sys/kernel/ftrace_enabled
-
-To disable ftrace_enabled simply replace the '1' with '0' in the
-above commands.
-
-When ftrace_enabled is set the tracers will also record the
-functions that are within the trace. The descriptions of the
-tracers will also show an example with ftrace enabled.
-
-
-irqsoff
--------
-
-When interrupts are disabled, the CPU can not react to any other
-external event (besides NMIs and SMIs). This prevents the timer
-interrupt from triggering or the mouse interrupt from letting
-the kernel know of a new mouse event. The result is a latency
-with the reaction time.
-
-The irqsoff tracer tracks the time for which interrupts are
-disabled. When a new maximum latency is hit, the tracer saves
-the trace leading up to that latency point so that every time a
-new maximum is reached, the old saved trace is discarded and the
-new trace is saved.
-
-To reset the maximum, echo 0 into tracing_max_latency. Here is
-an example:
-
- # echo irqsoff > /debug/tracing/current_tracer
- # echo 0 > /debug/tracing/tracing_max_latency
- # echo 1 > /debug/tracing/tracing_enabled
- # ls -ltr
- [...]
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/latency_trace
-# tracer: irqsoff
-#
-irqsoff latency trace v1.1.5 on 2.6.26
---------------------------------------------------------------------
- latency: 12 us, #3/3, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: bash-3730 (uid:0 nice:0 policy:0 rt_prio:0)
-    -----------------
- => started at: sys_setpgid
- => ended at:   sys_setpgid
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-    bash-3730  1d...    0us : _write_lock_irq (sys_setpgid)
-    bash-3730  1d..1    1us+: _write_unlock_irq (sys_setpgid)
-    bash-3730  1d..2   14us : trace_hardirqs_on (sys_setpgid)
-
-
-Here we see that that we had a latency of 12 microsecs (which is
-very good). The _write_lock_irq in sys_setpgid disabled
-interrupts. The difference between the 12 and the displayed
-timestamp 14us occurred because the clock was incremented
-between the time of recording the max latency and the time of
-recording the function that had that latency.
-
-Note the above example had ftrace_enabled not set. If we set the
-ftrace_enabled, we get a much larger output:
-
-# tracer: irqsoff
-#
-irqsoff latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 50 us, #101/101, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: ls-4339 (uid:0 nice:0 policy:0 rt_prio:0)
-    -----------------
- => started at: __alloc_pages_internal
- => ended at:   __alloc_pages_internal
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-      ls-4339  0...1    0us+: get_page_from_freelist (__alloc_pages_internal)
-      ls-4339  0d..1    3us : rmqueue_bulk (get_page_from_freelist)
-      ls-4339  0d..1    3us : _spin_lock (rmqueue_bulk)
-      ls-4339  0d..1    4us : add_preempt_count (_spin_lock)
-      ls-4339  0d..2    4us : __rmqueue (rmqueue_bulk)
-      ls-4339  0d..2    5us : __rmqueue_smallest (__rmqueue)
-      ls-4339  0d..2    5us : __mod_zone_page_state (__rmqueue_smallest)
-      ls-4339  0d..2    6us : __rmqueue (rmqueue_bulk)
-      ls-4339  0d..2    6us : __rmqueue_smallest (__rmqueue)
-      ls-4339  0d..2    7us : __mod_zone_page_state (__rmqueue_smallest)
-      ls-4339  0d..2    7us : __rmqueue (rmqueue_bulk)
-      ls-4339  0d..2    8us : __rmqueue_smallest (__rmqueue)
-[...]
-      ls-4339  0d..2   46us : __rmqueue_smallest (__rmqueue)
-      ls-4339  0d..2   47us : __mod_zone_page_state (__rmqueue_smallest)
-      ls-4339  0d..2   47us : __rmqueue (rmqueue_bulk)
-      ls-4339  0d..2   48us : __rmqueue_smallest (__rmqueue)
-      ls-4339  0d..2   48us : __mod_zone_page_state (__rmqueue_smallest)
-      ls-4339  0d..2   49us : _spin_unlock (rmqueue_bulk)
-      ls-4339  0d..2   49us : sub_preempt_count (_spin_unlock)
-      ls-4339  0d..1   50us : get_page_from_freelist (__alloc_pages_internal)
-      ls-4339  0d..2   51us : trace_hardirqs_on (__alloc_pages_internal)
-
-
-
-Here we traced a 50 microsecond latency. But we also see all the
-functions that were called during that time. Note that by
-enabling function tracing, we incur an added overhead. This
-overhead may extend the latency times. But nevertheless, this
-trace has provided some very helpful debugging information.
-
-
-preemptoff
-----------
-
-When preemption is disabled, we may be able to receive
-interrupts but the task cannot be preempted and a higher
-priority task must wait for preemption to be enabled again
-before it can preempt a lower priority task.
-
-The preemptoff tracer traces the places that disable preemption.
-Like the irqsoff tracer, it records the maximum latency for
-which preemption was disabled. The control of preemptoff tracer
-is much like the irqsoff tracer.
-
- # echo preemptoff > /debug/tracing/current_tracer
- # echo 0 > /debug/tracing/tracing_max_latency
- # echo 1 > /debug/tracing/tracing_enabled
- # ls -ltr
- [...]
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/latency_trace
-# tracer: preemptoff
-#
-preemptoff latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 29 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0)
-    -----------------
- => started at: do_IRQ
- => ended at:   __do_softirq
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-    sshd-4261  0d.h.    0us+: irq_enter (do_IRQ)
-    sshd-4261  0d.s.   29us : _local_bh_enable (__do_softirq)
-    sshd-4261  0d.s1   30us : trace_preempt_on (__do_softirq)
-
-
-This has some more changes. Preemption was disabled when an
-interrupt came in (notice the 'h'), and was enabled while doing
-a softirq. (notice the 's'). But we also see that interrupts
-have been disabled when entering the preempt off section and
-leaving it (the 'd'). We do not know if interrupts were enabled
-in the mean time.
-
-# tracer: preemptoff
-#
-preemptoff latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 63 us, #87/87, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0)
-    -----------------
- => started at: remove_wait_queue
- => ended at:   __do_softirq
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-    sshd-4261  0d..1    0us : _spin_lock_irqsave (remove_wait_queue)
-    sshd-4261  0d..1    1us : _spin_unlock_irqrestore (remove_wait_queue)
-    sshd-4261  0d..1    2us : do_IRQ (common_interrupt)
-    sshd-4261  0d..1    2us : irq_enter (do_IRQ)
-    sshd-4261  0d..1    2us : idle_cpu (irq_enter)
-    sshd-4261  0d..1    3us : add_preempt_count (irq_enter)
-    sshd-4261  0d.h1    3us : idle_cpu (irq_enter)
-    sshd-4261  0d.h.    4us : handle_fasteoi_irq (do_IRQ)
-[...]
-    sshd-4261  0d.h.   12us : add_preempt_count (_spin_lock)
-    sshd-4261  0d.h1   12us : ack_ioapic_quirk_irq (handle_fasteoi_irq)
-    sshd-4261  0d.h1   13us : move_native_irq (ack_ioapic_quirk_irq)
-    sshd-4261  0d.h1   13us : _spin_unlock (handle_fasteoi_irq)
-    sshd-4261  0d.h1   14us : sub_preempt_count (_spin_unlock)
-    sshd-4261  0d.h1   14us : irq_exit (do_IRQ)
-    sshd-4261  0d.h1   15us : sub_preempt_count (irq_exit)
-    sshd-4261  0d..2   15us : do_softirq (irq_exit)
-    sshd-4261  0d...   15us : __do_softirq (do_softirq)
-    sshd-4261  0d...   16us : __local_bh_disable (__do_softirq)
-    sshd-4261  0d...   16us+: add_preempt_count (__local_bh_disable)
-    sshd-4261  0d.s4   20us : add_preempt_count (__local_bh_disable)
-    sshd-4261  0d.s4   21us : sub_preempt_count (local_bh_enable)
-    sshd-4261  0d.s5   21us : sub_preempt_count (local_bh_enable)
-[...]
-    sshd-4261  0d.s6   41us : add_preempt_count (__local_bh_disable)
-    sshd-4261  0d.s6   42us : sub_preempt_count (local_bh_enable)
-    sshd-4261  0d.s7   42us : sub_preempt_count (local_bh_enable)
-    sshd-4261  0d.s5   43us : add_preempt_count (__local_bh_disable)
-    sshd-4261  0d.s5   43us : sub_preempt_count (local_bh_enable_ip)
-    sshd-4261  0d.s6   44us : sub_preempt_count (local_bh_enable_ip)
-    sshd-4261  0d.s5   44us : add_preempt_count (__local_bh_disable)
-    sshd-4261  0d.s5   45us : sub_preempt_count (local_bh_enable)
-[...]
-    sshd-4261  0d.s.   63us : _local_bh_enable (__do_softirq)
-    sshd-4261  0d.s1   64us : trace_preempt_on (__do_softirq)
-
-
-The above is an example of the preemptoff trace with
-ftrace_enabled set. Here we see that interrupts were disabled
-the entire time. The irq_enter code lets us know that we entered
-an interrupt 'h'. Before that, the functions being traced still
-show that it is not in an interrupt, but we can see from the
-functions themselves that this is not the case.
-
-Notice that __do_softirq when called does not have a
-preempt_count. It may seem that we missed a preempt enabling.
-What really happened is that the preempt count is held on the
-thread's stack and we switched to the softirq stack (4K stacks
-in effect). The code does not copy the preempt count, but
-because interrupts are disabled, we do not need to worry about
-it. Having a tracer like this is good for letting people know
-what really happens inside the kernel.
-
-
-preemptirqsoff
---------------
-
-Knowing the locations that have interrupts disabled or
-preemption disabled for the longest times is helpful. But
-sometimes we would like to know when either preemption and/or
-interrupts are disabled.
-
-Consider the following code:
-
-    local_irq_disable();
-    call_function_with_irqs_off();
-    preempt_disable();
-    call_function_with_irqs_and_preemption_off();
-    local_irq_enable();
-    call_function_with_preemption_off();
-    preempt_enable();
-
-The irqsoff tracer will record the total length of
-call_function_with_irqs_off() and
-call_function_with_irqs_and_preemption_off().
-
-The preemptoff tracer will record the total length of
-call_function_with_irqs_and_preemption_off() and
-call_function_with_preemption_off().
-
-But neither will trace the time that interrupts and/or
-preemption is disabled. This total time is the time that we can
-not schedule. To record this time, use the preemptirqsoff
-tracer.
-
-Again, using this trace is much like the irqsoff and preemptoff
-tracers.
-
- # echo preemptirqsoff > /debug/tracing/current_tracer
- # echo 0 > /debug/tracing/tracing_max_latency
- # echo 1 > /debug/tracing/tracing_enabled
- # ls -ltr
- [...]
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/latency_trace
-# tracer: preemptirqsoff
-#
-preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 293 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: ls-4860 (uid:0 nice:0 policy:0 rt_prio:0)
-    -----------------
- => started at: apic_timer_interrupt
- => ended at:   __do_softirq
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-      ls-4860  0d...    0us!: trace_hardirqs_off_thunk (apic_timer_interrupt)
-      ls-4860  0d.s.  294us : _local_bh_enable (__do_softirq)
-      ls-4860  0d.s1  294us : trace_preempt_on (__do_softirq)
-
-
-
-The trace_hardirqs_off_thunk is called from assembly on x86 when
-interrupts are disabled in the assembly code. Without the
-function tracing, we do not know if interrupts were enabled
-within the preemption points. We do see that it started with
-preemption enabled.
-
-Here is a trace with ftrace_enabled set:
-
-
-# tracer: preemptirqsoff
-#
-preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 105 us, #183/183, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0)
-    -----------------
- => started at: write_chan
- => ended at:   __do_softirq
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-      ls-4473  0.N..    0us : preempt_schedule (write_chan)
-      ls-4473  0dN.1    1us : _spin_lock (schedule)
-      ls-4473  0dN.1    2us : add_preempt_count (_spin_lock)
-      ls-4473  0d..2    2us : put_prev_task_fair (schedule)
-[...]
-      ls-4473  0d..2   13us : set_normalized_timespec (ktime_get_ts)
-      ls-4473  0d..2   13us : __switch_to (schedule)
-    sshd-4261  0d..2   14us : finish_task_switch (schedule)
-    sshd-4261  0d..2   14us : _spin_unlock_irq (finish_task_switch)
-    sshd-4261  0d..1   15us : add_preempt_count (_spin_lock_irqsave)
-    sshd-4261  0d..2   16us : _spin_unlock_irqrestore (hrtick_set)
-    sshd-4261  0d..2   16us : do_IRQ (common_interrupt)
-    sshd-4261  0d..2   17us : irq_enter (do_IRQ)
-    sshd-4261  0d..2   17us : idle_cpu (irq_enter)
-    sshd-4261  0d..2   18us : add_preempt_count (irq_enter)
-    sshd-4261  0d.h2   18us : idle_cpu (irq_enter)
-    sshd-4261  0d.h.   18us : handle_fasteoi_irq (do_IRQ)
-    sshd-4261  0d.h.   19us : _spin_lock (handle_fasteoi_irq)
-    sshd-4261  0d.h.   19us : add_preempt_count (_spin_lock)
-    sshd-4261  0d.h1   20us : _spin_unlock (handle_fasteoi_irq)
-    sshd-4261  0d.h1   20us : sub_preempt_count (_spin_unlock)
-[...]
-    sshd-4261  0d.h1   28us : _spin_unlock (handle_fasteoi_irq)
-    sshd-4261  0d.h1   29us : sub_preempt_count (_spin_unlock)
-    sshd-4261  0d.h2   29us : irq_exit (do_IRQ)
-    sshd-4261  0d.h2   29us : sub_preempt_count (irq_exit)
-    sshd-4261  0d..3   30us : do_softirq (irq_exit)
-    sshd-4261  0d...   30us : __do_softirq (do_softirq)
-    sshd-4261  0d...   31us : __local_bh_disable (__do_softirq)
-    sshd-4261  0d...   31us+: add_preempt_count (__local_bh_disable)
-    sshd-4261  0d.s4   34us : add_preempt_count (__local_bh_disable)
-[...]
-    sshd-4261  0d.s3   43us : sub_preempt_count (local_bh_enable_ip)
-    sshd-4261  0d.s4   44us : sub_preempt_count (local_bh_enable_ip)
-    sshd-4261  0d.s3   44us : smp_apic_timer_interrupt (apic_timer_interrupt)
-    sshd-4261  0d.s3   45us : irq_enter (smp_apic_timer_interrupt)
-    sshd-4261  0d.s3   45us : idle_cpu (irq_enter)
-    sshd-4261  0d.s3   46us : add_preempt_count (irq_enter)
-    sshd-4261  0d.H3   46us : idle_cpu (irq_enter)
-    sshd-4261  0d.H3   47us : hrtimer_interrupt (smp_apic_timer_interrupt)
-    sshd-4261  0d.H3   47us : ktime_get (hrtimer_interrupt)
-[...]
-    sshd-4261  0d.H3   81us : tick_program_event (hrtimer_interrupt)
-    sshd-4261  0d.H3   82us : ktime_get (tick_program_event)
-    sshd-4261  0d.H3   82us : ktime_get_ts (ktime_get)
-    sshd-4261  0d.H3   83us : getnstimeofday (ktime_get_ts)
-    sshd-4261  0d.H3   83us : set_normalized_timespec (ktime_get_ts)
-    sshd-4261  0d.H3   84us : clockevents_program_event (tick_program_event)
-    sshd-4261  0d.H3   84us : lapic_next_event (clockevents_program_event)
-    sshd-4261  0d.H3   85us : irq_exit (smp_apic_timer_interrupt)
-    sshd-4261  0d.H3   85us : sub_preempt_count (irq_exit)
-    sshd-4261  0d.s4   86us : sub_preempt_count (irq_exit)
-    sshd-4261  0d.s3   86us : add_preempt_count (__local_bh_disable)
-[...]
-    sshd-4261  0d.s1   98us : sub_preempt_count (net_rx_action)
-    sshd-4261  0d.s.   99us : add_preempt_count (_spin_lock_irq)
-    sshd-4261  0d.s1   99us+: _spin_unlock_irq (run_timer_softirq)
-    sshd-4261  0d.s.  104us : _local_bh_enable (__do_softirq)
-    sshd-4261  0d.s.  104us : sub_preempt_count (_local_bh_enable)
-    sshd-4261  0d.s.  105us : _local_bh_enable (__do_softirq)
-    sshd-4261  0d.s1  105us : trace_preempt_on (__do_softirq)
-
-
-This is a very interesting trace. It started with the preemption
-of the ls task. We see that the task had the "need_resched" bit
-set via the 'N' in the trace.  Interrupts were disabled before
-the spin_lock at the beginning of the trace. We see that a
-schedule took place to run sshd.  When the interrupts were
-enabled, we took an interrupt. On return from the interrupt
-handler, the softirq ran. We took another interrupt while
-running the softirq as we see from the capital 'H'.
-
-
-wakeup
-------
-
-In a Real-Time environment it is very important to know the
-wakeup time it takes for the highest priority task that is woken
-up to the time that it executes. This is also known as "schedule
-latency". I stress the point that this is about RT tasks. It is
-also important to know the scheduling latency of non-RT tasks,
-but the average schedule latency is better for non-RT tasks.
-Tools like LatencyTop are more appropriate for such
-measurements.
-
-Real-Time environments are interested in the worst case latency.
-That is the longest latency it takes for something to happen,
-and not the average. We can have a very fast scheduler that may
-only have a large latency once in a while, but that would not
-work well with Real-Time tasks.  The wakeup tracer was designed
-to record the worst case wakeups of RT tasks. Non-RT tasks are
-not recorded because the tracer only records one worst case and
-tracing non-RT tasks that are unpredictable will overwrite the
-worst case latency of RT tasks.
-
-Since this tracer only deals with RT tasks, we will run this
-slightly differently than we did with the previous tracers.
-Instead of performing an 'ls', we will run 'sleep 1' under
-'chrt' which changes the priority of the task.
-
- # echo wakeup > /debug/tracing/current_tracer
- # echo 0 > /debug/tracing/tracing_max_latency
- # echo 1 > /debug/tracing/tracing_enabled
- # chrt -f 5 sleep 1
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/latency_trace
-# tracer: wakeup
-#
-wakeup latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 4 us, #2/2, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: sleep-4901 (uid:0 nice:0 policy:1 rt_prio:5)
-    -----------------
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-  <idle>-0     1d.h4    0us+: try_to_wake_up (wake_up_process)
-  <idle>-0     1d..4    4us : schedule (cpu_idle)
-
-
-Running this on an idle system, we see that it only took 4
-microseconds to perform the task switch.  Note, since the trace
-marker in the schedule is before the actual "switch", we stop
-the tracing when the recorded task is about to schedule in. This
-may change if we add a new marker at the end of the scheduler.
-
-Notice that the recorded task is 'sleep' with the PID of 4901
-and it has an rt_prio of 5. This priority is user-space priority
-and not the internal kernel priority. The policy is 1 for
-SCHED_FIFO and 2 for SCHED_RR.
-
-Doing the same with chrt -r 5 and ftrace_enabled set.
-
-# tracer: wakeup
-#
-wakeup latency trace v1.1.5 on 2.6.26-rc8
---------------------------------------------------------------------
- latency: 50 us, #60/60, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
-    -----------------
-    | task: sleep-4068 (uid:0 nice:0 policy:2 rt_prio:5)
-    -----------------
-
-#                _------=> CPU#
-#               / _-----=> irqs-off
-#              | / _----=> need-resched
-#              || / _---=> hardirq/softirq
-#              ||| / _--=> preempt-depth
-#              |||| /
-#              |||||     delay
-#  cmd     pid ||||| time  |   caller
-#     \   /    |||||   \   |   /
-ksoftirq-7     1d.H3    0us : try_to_wake_up (wake_up_process)
-ksoftirq-7     1d.H4    1us : sub_preempt_count (marker_probe_cb)
-ksoftirq-7     1d.H3    2us : check_preempt_wakeup (try_to_wake_up)
-ksoftirq-7     1d.H3    3us : update_curr (check_preempt_wakeup)
-ksoftirq-7     1d.H3    4us : calc_delta_mine (update_curr)
-ksoftirq-7     1d.H3    5us : __resched_task (check_preempt_wakeup)
-ksoftirq-7     1d.H3    6us : task_wake_up_rt (try_to_wake_up)
-ksoftirq-7     1d.H3    7us : _spin_unlock_irqrestore (try_to_wake_up)
-[...]
-ksoftirq-7     1d.H2   17us : irq_exit (smp_apic_timer_interrupt)
-ksoftirq-7     1d.H2   18us : sub_preempt_count (irq_exit)
-ksoftirq-7     1d.s3   19us : sub_preempt_count (irq_exit)
-ksoftirq-7     1..s2   20us : rcu_process_callbacks (__do_softirq)
-[...]
-ksoftirq-7     1..s2   26us : __rcu_process_callbacks (rcu_process_callbacks)
-ksoftirq-7     1d.s2   27us : _local_bh_enable (__do_softirq)
-ksoftirq-7     1d.s2   28us : sub_preempt_count (_local_bh_enable)
-ksoftirq-7     1.N.3   29us : sub_preempt_count (ksoftirqd)
-ksoftirq-7     1.N.2   30us : _cond_resched (ksoftirqd)
-ksoftirq-7     1.N.2   31us : __cond_resched (_cond_resched)
-ksoftirq-7     1.N.2   32us : add_preempt_count (__cond_resched)
-ksoftirq-7     1.N.2   33us : schedule (__cond_resched)
-ksoftirq-7     1.N.2   33us : add_preempt_count (schedule)
-ksoftirq-7     1.N.3   34us : hrtick_clear (schedule)
-ksoftirq-7     1dN.3   35us : _spin_lock (schedule)
-ksoftirq-7     1dN.3   36us : add_preempt_count (_spin_lock)
-ksoftirq-7     1d..4   37us : put_prev_task_fair (schedule)
-ksoftirq-7     1d..4   38us : update_curr (put_prev_task_fair)
-[...]
-ksoftirq-7     1d..5   47us : _spin_trylock (tracing_record_cmdline)
-ksoftirq-7     1d..5   48us : add_preempt_count (_spin_trylock)
-ksoftirq-7     1d..6   49us : _spin_unlock (tracing_record_cmdline)
-ksoftirq-7     1d..6   49us : sub_preempt_count (_spin_unlock)
-ksoftirq-7     1d..4   50us : schedule (__cond_resched)
-
-The interrupt went off while running ksoftirqd. This task runs
-at SCHED_OTHER. Why did not we see the 'N' set early? This may
-be a harmless bug with x86_32 and 4K stacks. On x86_32 with 4K
-stacks configured, the interrupt and softirq run with their own
-stack. Some information is held on the top of the task's stack
-(need_resched and preempt_count are both stored there). The
-setting of the NEED_RESCHED bit is done directly to the task's
-stack, but the reading of the NEED_RESCHED is done by looking at
-the current stack, which in this case is the stack for the hard
-interrupt. This hides the fact that NEED_RESCHED has been set.
-We do not see the 'N' until we switch back to the task's
-assigned stack.
-
-function
---------
-
-This tracer is the function tracer. Enabling the function tracer
-can be done from the debug file system. Make sure the
-ftrace_enabled is set; otherwise this tracer is a nop.
-
- # sysctl kernel.ftrace_enabled=1
- # echo function > /debug/tracing/current_tracer
- # echo 1 > /debug/tracing/tracing_enabled
- # usleep 1
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/trace
-# tracer: function
-#
-#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
-#              | |      |          |         |
-            bash-4003  [00]   123.638713: finish_task_switch <-schedule
-            bash-4003  [00]   123.638714: _spin_unlock_irq <-finish_task_switch
-            bash-4003  [00]   123.638714: sub_preempt_count <-_spin_unlock_irq
-            bash-4003  [00]   123.638715: hrtick_set <-schedule
-            bash-4003  [00]   123.638715: _spin_lock_irqsave <-hrtick_set
-            bash-4003  [00]   123.638716: add_preempt_count <-_spin_lock_irqsave
-            bash-4003  [00]   123.638716: _spin_unlock_irqrestore <-hrtick_set
-            bash-4003  [00]   123.638717: sub_preempt_count <-_spin_unlock_irqrestore
-            bash-4003  [00]   123.638717: hrtick_clear <-hrtick_set
-            bash-4003  [00]   123.638718: sub_preempt_count <-schedule
-            bash-4003  [00]   123.638718: sub_preempt_count <-preempt_schedule
-            bash-4003  [00]   123.638719: wait_for_completion <-__stop_machine_run
-            bash-4003  [00]   123.638719: wait_for_common <-wait_for_completion
-            bash-4003  [00]   123.638720: _spin_lock_irq <-wait_for_common
-            bash-4003  [00]   123.638720: add_preempt_count <-_spin_lock_irq
-[...]
-
-
-Note: function tracer uses ring buffers to store the above
-entries. The newest data may overwrite the oldest data.
-Sometimes using echo to stop the trace is not sufficient because
-the tracing could have overwritten the data that you wanted to
-record. For this reason, it is sometimes better to disable
-tracing directly from a program. This allows you to stop the
-tracing at the point that you hit the part that you are
-interested in. To disable the tracing directly from a C program,
-something like following code snippet can be used:
-
-int trace_fd;
-[...]
-int main(int argc, char *argv[]) {
-       [...]
-       trace_fd = open("/debug/tracing/tracing_enabled", O_WRONLY);
-       [...]
-       if (condition_hit()) {
-               write(trace_fd, "0", 1);
-       }
-       [...]
-}
-
-Note: Here we hard coded the path name. The debugfs mount is not
-guaranteed to be at /debug (and is more commonly at
-/sys/kernel/debug). For simple one time traces, the above is
-sufficent. For anything else, a search through /proc/mounts may
-be needed to find where the debugfs file-system is mounted.
-
-
-Single thread tracing
----------------------
-
-By writing into /debug/tracing/set_ftrace_pid you can trace a
-single thread. For example:
-
-# cat /debug/tracing/set_ftrace_pid
-no pid
-# echo 3111 > /debug/tracing/set_ftrace_pid
-# cat /debug/tracing/set_ftrace_pid
-3111
-# echo function > /debug/tracing/current_tracer
-# cat /debug/tracing/trace | head
- # tracer: function
- #
- #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
- #              | |       |          |         |
-     yum-updatesd-3111  [003]  1637.254676: finish_task_switch <-thread_return
-     yum-updatesd-3111  [003]  1637.254681: hrtimer_cancel <-schedule_hrtimeout_range
-     yum-updatesd-3111  [003]  1637.254682: hrtimer_try_to_cancel <-hrtimer_cancel
-     yum-updatesd-3111  [003]  1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel
-     yum-updatesd-3111  [003]  1637.254685: fget_light <-do_sys_poll
-     yum-updatesd-3111  [003]  1637.254686: pipe_poll <-do_sys_poll
-# echo -1 > /debug/tracing/set_ftrace_pid
-# cat /debug/tracing/trace |head
- # tracer: function
- #
- #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
- #              | |       |          |         |
- ##### CPU 3 buffer started ####
-     yum-updatesd-3111  [003]  1701.957688: free_poll_entry <-poll_freewait
-     yum-updatesd-3111  [003]  1701.957689: remove_wait_queue <-free_poll_entry
-     yum-updatesd-3111  [003]  1701.957691: fput <-free_poll_entry
-     yum-updatesd-3111  [003]  1701.957692: audit_syscall_exit <-sysret_audit
-     yum-updatesd-3111  [003]  1701.957693: path_put <-audit_syscall_exit
-
-If you want to trace a function when executing, you could use
-something like this simple program:
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int main (int argc, char **argv)
-{
-        if (argc < 1)
-                exit(-1);
-
-        if (fork() > 0) {
-                int fd, ffd;
-                char line[64];
-                int s;
-
-                ffd = open("/debug/tracing/current_tracer", O_WRONLY);
-                if (ffd < 0)
-                        exit(-1);
-                write(ffd, "nop", 3);
-
-                fd = open("/debug/tracing/set_ftrace_pid", O_WRONLY);
-                s = sprintf(line, "%d\n", getpid());
-                write(fd, line, s);
-
-                write(ffd, "function", 8);
-
-                close(fd);
-                close(ffd);
-
-                execvp(argv[1], argv+1);
-        }
-
-        return 0;
-}
-
-
-hw-branch-tracer (x86 only)
----------------------------
-
-This tracer uses the x86 last branch tracing hardware feature to
-collect a branch trace on all cpus with relatively low overhead.
-
-The tracer uses a fixed-size circular buffer per cpu and only
-traces ring 0 branches. The trace file dumps that buffer in the
-following format:
-
-# tracer: hw-branch-tracer
-#
-# CPU#        TO  <-  FROM
-   0  scheduler_tick+0xb5/0x1bf          <-  task_tick_idle+0x5/0x6
-   2  run_posix_cpu_timers+0x2b/0x72a    <-  run_posix_cpu_timers+0x25/0x72a
-   0  scheduler_tick+0x139/0x1bf         <-  scheduler_tick+0xed/0x1bf
-   0  scheduler_tick+0x17c/0x1bf         <-  scheduler_tick+0x148/0x1bf
-   2  run_posix_cpu_timers+0x9e/0x72a    <-  run_posix_cpu_timers+0x5e/0x72a
-   0  scheduler_tick+0x1b6/0x1bf         <-  scheduler_tick+0x1aa/0x1bf
-
-
-The tracer may be used to dump the trace for the oops'ing cpu on
-a kernel oops into the system log. To enable this,
-ftrace_dump_on_oops must be set. To set ftrace_dump_on_oops, one
-can either use the sysctl function or set it via the proc system
-interface.
-
-  sysctl kernel.ftrace_dump_on_oops=1
-
-or
-
-  echo 1 > /proc/sys/kernel/ftrace_dump_on_oops
-
-
-Here's an example of such a dump after a null pointer
-dereference in a kernel module:
-
-[57848.105921] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
-[57848.106019] IP: [<ffffffffa0000006>] open+0x6/0x14 [oops]
-[57848.106019] PGD 2354e9067 PUD 2375e7067 PMD 0
-[57848.106019] Oops: 0002 [#1] SMP
-[57848.106019] last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:20:05.0/local_cpus
-[57848.106019] Dumping ftrace buffer:
-[57848.106019] ---------------------------------
-[...]
-[57848.106019]    0  chrdev_open+0xe6/0x165      <-  cdev_put+0x23/0x24
-[57848.106019]    0  chrdev_open+0x117/0x165     <-  chrdev_open+0xfa/0x165
-[57848.106019]    0  chrdev_open+0x120/0x165     <-  chrdev_open+0x11c/0x165
-[57848.106019]    0  chrdev_open+0x134/0x165     <-  chrdev_open+0x12b/0x165
-[57848.106019]    0  open+0x0/0x14 [oops]        <-  chrdev_open+0x144/0x165
-[57848.106019]    0  page_fault+0x0/0x30         <-  open+0x6/0x14 [oops]
-[57848.106019]    0  error_entry+0x0/0x5b        <-  page_fault+0x4/0x30
-[57848.106019]    0  error_kernelspace+0x0/0x31          <-  error_entry+0x59/0x5b
-[57848.106019]    0  error_sti+0x0/0x1   <-  error_kernelspace+0x2d/0x31
-[57848.106019]    0  page_fault+0x9/0x30         <-  error_sti+0x0/0x1
-[57848.106019]    0  do_page_fault+0x0/0x881     <-  page_fault+0x1a/0x30
-[...]
-[57848.106019]    0  do_page_fault+0x66b/0x881   <-  is_prefetch+0x1ee/0x1f2
-[57848.106019]    0  do_page_fault+0x6e0/0x881   <-  do_page_fault+0x67a/0x881
-[57848.106019]    0  oops_begin+0x0/0x96         <-  do_page_fault+0x6e0/0x881
-[57848.106019]    0  trace_hw_branch_oops+0x0/0x2d       <-  oops_begin+0x9/0x96
-[...]
-[57848.106019]    0  ds_suspend_bts+0x2a/0xe3    <-  ds_suspend_bts+0x1a/0xe3
-[57848.106019] ---------------------------------
-[57848.106019] CPU 0
-[57848.106019] Modules linked in: oops
-[57848.106019] Pid: 5542, comm: cat Tainted: G        W  2.6.28 #23
-[57848.106019] RIP: 0010:[<ffffffffa0000006>]  [<ffffffffa0000006>] open+0x6/0x14 [oops]
-[57848.106019] RSP: 0018:ffff880235457d48  EFLAGS: 00010246
-[...]
-
-
-function graph tracer
----------------------------
-
-This tracer is similar to the function tracer except that it
-probes a function on its entry and its exit. This is done by
-using a dynamically allocated stack of return addresses in each
-task_struct. On function entry the tracer overwrites the return
-address of each function traced to set a custom probe. Thus the
-original return address is stored on the stack of return address
-in the task_struct.
-
-Probing on both ends of a function leads to special features
-such as:
-
-- measure of a function's time execution
-- having a reliable call stack to draw function calls graph
-
-This tracer is useful in several situations:
-
-- you want to find the reason of a strange kernel behavior and
-  need to see what happens in detail on any areas (or specific
-  ones).
-
-- you are experiencing weird latencies but it's difficult to
-  find its origin.
-
-- you want to find quickly which path is taken by a specific
-  function
-
-- you just want to peek inside a working kernel and want to see
-  what happens there.
-
-# tracer: function_graph
-#
-# CPU  DURATION                  FUNCTION CALLS
-# |     |   |                     |   |   |   |
-
- 0)               |  sys_open() {
- 0)               |    do_sys_open() {
- 0)               |      getname() {
- 0)               |        kmem_cache_alloc() {
- 0)   1.382 us    |          __might_sleep();
- 0)   2.478 us    |        }
- 0)               |        strncpy_from_user() {
- 0)               |          might_fault() {
- 0)   1.389 us    |            __might_sleep();
- 0)   2.553 us    |          }
- 0)   3.807 us    |        }
- 0)   7.876 us    |      }
- 0)               |      alloc_fd() {
- 0)   0.668 us    |        _spin_lock();
- 0)   0.570 us    |        expand_files();
- 0)   0.586 us    |        _spin_unlock();
-
-
-There are several columns that can be dynamically
-enabled/disabled. You can use every combination of options you
-want, depending on your needs.
-
-- The cpu number on which the function executed is default
-  enabled.  It is sometimes better to only trace one cpu (see
-  tracing_cpu_mask file) or you might sometimes see unordered
-  function calls while cpu tracing switch.
-
-       hide: echo nofuncgraph-cpu > /debug/tracing/trace_options
-       show: echo funcgraph-cpu > /debug/tracing/trace_options
-
-- The duration (function's time of execution) is displayed on
-  the closing bracket line of a function or on the same line
-  than the current function in case of a leaf one. It is default
-  enabled.
-
-       hide: echo nofuncgraph-duration > /debug/tracing/trace_options
-       show: echo funcgraph-duration > /debug/tracing/trace_options
-
-- The overhead field precedes the duration field in case of
-  reached duration thresholds.
-
-       hide: echo nofuncgraph-overhead > /debug/tracing/trace_options
-       show: echo funcgraph-overhead > /debug/tracing/trace_options
-       depends on: funcgraph-duration
-
-  ie:
-
-  0)               |    up_write() {
-  0)   0.646 us    |      _spin_lock_irqsave();
-  0)   0.684 us    |      _spin_unlock_irqrestore();
-  0)   3.123 us    |    }
-  0)   0.548 us    |    fput();
-  0) + 58.628 us   |  }
-
-  [...]
-
-  0)               |      putname() {
-  0)               |        kmem_cache_free() {
-  0)   0.518 us    |          __phys_addr();
-  0)   1.757 us    |        }
-  0)   2.861 us    |      }
-  0) ! 115.305 us  |    }
-  0) ! 116.402 us  |  }
-
-  + means that the function exceeded 10 usecs.
-  ! means that the function exceeded 100 usecs.
-
-
-- The task/pid field displays the thread cmdline and pid which
-  executed the function. It is default disabled.
-
-       hide: echo nofuncgraph-proc > /debug/tracing/trace_options
-       show: echo funcgraph-proc > /debug/tracing/trace_options
-
-  ie:
-
-  # tracer: function_graph
-  #
-  # CPU  TASK/PID        DURATION                  FUNCTION CALLS
-  # |    |    |           |   |                     |   |   |   |
-  0)    sh-4802     |               |                  d_free() {
-  0)    sh-4802     |               |                    call_rcu() {
-  0)    sh-4802     |               |                      __call_rcu() {
-  0)    sh-4802     |   0.616 us    |                        rcu_process_gp_end();
-  0)    sh-4802     |   0.586 us    |                        check_for_new_grace_period();
-  0)    sh-4802     |   2.899 us    |                      }
-  0)    sh-4802     |   4.040 us    |                    }
-  0)    sh-4802     |   5.151 us    |                  }
-  0)    sh-4802     | + 49.370 us   |                }
-
-
-- The absolute time field is an absolute timestamp given by the
-  system clock since it started. A snapshot of this time is
-  given on each entry/exit of functions
-
-       hide: echo nofuncgraph-abstime > /debug/tracing/trace_options
-       show: echo funcgraph-abstime > /debug/tracing/trace_options
-
-  ie:
-
-  #
-  #      TIME       CPU  DURATION                  FUNCTION CALLS
-  #       |         |     |   |                     |   |   |   |
-  360.774522 |   1)   0.541 us    |                                          }
-  360.774522 |   1)   4.663 us    |                                        }
-  360.774523 |   1)   0.541 us    |                                        __wake_up_bit();
-  360.774524 |   1)   6.796 us    |                                      }
-  360.774524 |   1)   7.952 us    |                                    }
-  360.774525 |   1)   9.063 us    |                                  }
-  360.774525 |   1)   0.615 us    |                                  journal_mark_dirty();
-  360.774527 |   1)   0.578 us    |                                  __brelse();
-  360.774528 |   1)               |                                  reiserfs_prepare_for_journal() {
-  360.774528 |   1)               |                                    unlock_buffer() {
-  360.774529 |   1)               |                                      wake_up_bit() {
-  360.774529 |   1)               |                                        bit_waitqueue() {
-  360.774530 |   1)   0.594 us    |                                          __phys_addr();
-
-
-You can put some comments on specific functions by using
-trace_printk() For example, if you want to put a comment inside
-the __might_sleep() function, you just have to include
-<linux/ftrace.h> and call trace_printk() inside __might_sleep()
-
-trace_printk("I'm a comment!\n")
-
-will produce:
-
- 1)               |             __might_sleep() {
- 1)               |                /* I'm a comment! */
- 1)   1.449 us    |             }
-
-
-You might find other useful features for this tracer in the
-following "dynamic ftrace" section such as tracing only specific
-functions or tasks.
-
-dynamic ftrace
---------------
-
-If CONFIG_DYNAMIC_FTRACE is set, the system will run with
-virtually no overhead when function tracing is disabled. The way
-this works is the mcount function call (placed at the start of
-every kernel function, produced by the -pg switch in gcc),
-starts of pointing to a simple return. (Enabling FTRACE will
-include the -pg switch in the compiling of the kernel.)
-
-At compile time every C file object is run through the
-recordmcount.pl script (located in the scripts directory). This
-script will process the C object using objdump to find all the
-locations in the .text section that call mcount. (Note, only the
-.text section is processed, since processing other sections like
-.init.text may cause races due to those sections being freed).
-
-A new section called "__mcount_loc" is created that holds
-references to all the mcount call sites in the .text section.
-This section is compiled back into the original object. The
-final linker will add all these references into a single table.
-
-On boot up, before SMP is initialized, the dynamic ftrace code
-scans this table and updates all the locations into nops. It
-also records the locations, which are added to the
-available_filter_functions list.  Modules are processed as they
-are loaded and before they are executed.  When a module is
-unloaded, it also removes its functions from the ftrace function
-list. This is automatic in the module unload code, and the
-module author does not need to worry about it.
-
-When tracing is enabled, kstop_machine is called to prevent
-races with the CPUS executing code being modified (which can
-cause the CPU to do undesireable things), and the nops are
-patched back to calls. But this time, they do not call mcount
-(which is just a function stub). They now call into the ftrace
-infrastructure.
-
-One special side-effect to the recording of the functions being
-traced is that we can now selectively choose which functions we
-wish to trace and which ones we want the mcount calls to remain
-as nops.
-
-Two files are used, one for enabling and one for disabling the
-tracing of specified functions. They are:
-
-  set_ftrace_filter
-
-and
-
-  set_ftrace_notrace
-
-A list of available functions that you can add to these files is
-listed in:
-
-   available_filter_functions
-
- # cat /debug/tracing/available_filter_functions
-put_prev_task_idle
-kmem_cache_create
-pick_next_task_rt
-get_online_cpus
-pick_next_task_fair
-mutex_lock
-[...]
-
-If I am only interested in sys_nanosleep and hrtimer_interrupt:
-
- # echo sys_nanosleep hrtimer_interrupt \
-               > /debug/tracing/set_ftrace_filter
- # echo ftrace > /debug/tracing/current_tracer
- # echo 1 > /debug/tracing/tracing_enabled
- # usleep 1
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/trace
-# tracer: ftrace
-#
-#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
-#              | |      |          |         |
-          usleep-4134  [00]  1317.070017: hrtimer_interrupt <-smp_apic_timer_interrupt
-          usleep-4134  [00]  1317.070111: sys_nanosleep <-syscall_call
-          <idle>-0     [00]  1317.070115: hrtimer_interrupt <-smp_apic_timer_interrupt
-
-To see which functions are being traced, you can cat the file:
-
- # cat /debug/tracing/set_ftrace_filter
-hrtimer_interrupt
-sys_nanosleep
-
-
-Perhaps this is not enough. The filters also allow simple wild
-cards. Only the following are currently available
-
-  <match>*  - will match functions that begin with <match>
-  *<match>  - will match functions that end with <match>
-  *<match>* - will match functions that have <match> in it
-
-These are the only wild cards which are supported.
-
-  <match>*<match> will not work.
-
-Note: It is better to use quotes to enclose the wild cards,
-      otherwise the shell may expand the parameters into names
-      of files in the local directory.
-
- # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter
-
-Produces:
-
-# tracer: ftrace
-#
-#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
-#              | |      |          |         |
-            bash-4003  [00]  1480.611794: hrtimer_init <-copy_process
-            bash-4003  [00]  1480.611941: hrtimer_start <-hrtick_set
-            bash-4003  [00]  1480.611956: hrtimer_cancel <-hrtick_clear
-            bash-4003  [00]  1480.611956: hrtimer_try_to_cancel <-hrtimer_cancel
-          <idle>-0     [00]  1480.612019: hrtimer_get_next_event <-get_next_timer_interrupt
-          <idle>-0     [00]  1480.612025: hrtimer_get_next_event <-get_next_timer_interrupt
-          <idle>-0     [00]  1480.612032: hrtimer_get_next_event <-get_next_timer_interrupt
-          <idle>-0     [00]  1480.612037: hrtimer_get_next_event <-get_next_timer_interrupt
-          <idle>-0     [00]  1480.612382: hrtimer_get_next_event <-get_next_timer_interrupt
-
-
-Notice that we lost the sys_nanosleep.
-
- # cat /debug/tracing/set_ftrace_filter
-hrtimer_run_queues
-hrtimer_run_pending
-hrtimer_init
-hrtimer_cancel
-hrtimer_try_to_cancel
-hrtimer_forward
-hrtimer_start
-hrtimer_reprogram
-hrtimer_force_reprogram
-hrtimer_get_next_event
-hrtimer_interrupt
-hrtimer_nanosleep
-hrtimer_wakeup
-hrtimer_get_remaining
-hrtimer_get_res
-hrtimer_init_sleeper
-
-
-This is because the '>' and '>>' act just like they do in bash.
-To rewrite the filters, use '>'
-To append to the filters, use '>>'
-
-To clear out a filter so that all functions will be recorded
-again:
-
- # echo > /debug/tracing/set_ftrace_filter
- # cat /debug/tracing/set_ftrace_filter
- #
-
-Again, now we want to append.
-
- # echo sys_nanosleep > /debug/tracing/set_ftrace_filter
- # cat /debug/tracing/set_ftrace_filter
-sys_nanosleep
- # echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter
- # cat /debug/tracing/set_ftrace_filter
-hrtimer_run_queues
-hrtimer_run_pending
-hrtimer_init
-hrtimer_cancel
-hrtimer_try_to_cancel
-hrtimer_forward
-hrtimer_start
-hrtimer_reprogram
-hrtimer_force_reprogram
-hrtimer_get_next_event
-hrtimer_interrupt
-sys_nanosleep
-hrtimer_nanosleep
-hrtimer_wakeup
-hrtimer_get_remaining
-hrtimer_get_res
-hrtimer_init_sleeper
-
-
-The set_ftrace_notrace prevents those functions from being
-traced.
-
- # echo '*preempt*' '*lock*' > /debug/tracing/set_ftrace_notrace
-
-Produces:
-
-# tracer: ftrace
-#
-#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
-#              | |      |          |         |
-            bash-4043  [01]   115.281644: finish_task_switch <-schedule
-            bash-4043  [01]   115.281645: hrtick_set <-schedule
-            bash-4043  [01]   115.281645: hrtick_clear <-hrtick_set
-            bash-4043  [01]   115.281646: wait_for_completion <-__stop_machine_run
-            bash-4043  [01]   115.281647: wait_for_common <-wait_for_completion
-            bash-4043  [01]   115.281647: kthread_stop <-stop_machine_run
-            bash-4043  [01]   115.281648: init_waitqueue_head <-kthread_stop
-            bash-4043  [01]   115.281648: wake_up_process <-kthread_stop
-            bash-4043  [01]   115.281649: try_to_wake_up <-wake_up_process
-
-We can see that there's no more lock or preempt tracing.
-
-
-Dynamic ftrace with the function graph tracer
----------------------------------------------
-
-Although what has been explained above concerns both the
-function tracer and the function-graph-tracer, there are some
-special features only available in the function-graph tracer.
-
-If you want to trace only one function and all of its children,
-you just have to echo its name into set_graph_function:
-
- echo __do_fault > set_graph_function
-
-will produce the following "expanded" trace of the __do_fault()
-function:
-
- 0)               |  __do_fault() {
- 0)               |    filemap_fault() {
- 0)               |      find_lock_page() {
- 0)   0.804 us    |        find_get_page();
- 0)               |        __might_sleep() {
- 0)   1.329 us    |        }
- 0)   3.904 us    |      }
- 0)   4.979 us    |    }
- 0)   0.653 us    |    _spin_lock();
- 0)   0.578 us    |    page_add_file_rmap();
- 0)   0.525 us    |    native_set_pte_at();
- 0)   0.585 us    |    _spin_unlock();
- 0)               |    unlock_page() {
- 0)   0.541 us    |      page_waitqueue();
- 0)   0.639 us    |      __wake_up_bit();
- 0)   2.786 us    |    }
- 0) + 14.237 us   |  }
- 0)               |  __do_fault() {
- 0)               |    filemap_fault() {
- 0)               |      find_lock_page() {
- 0)   0.698 us    |        find_get_page();
- 0)               |        __might_sleep() {
- 0)   1.412 us    |        }
- 0)   3.950 us    |      }
- 0)   5.098 us    |    }
- 0)   0.631 us    |    _spin_lock();
- 0)   0.571 us    |    page_add_file_rmap();
- 0)   0.526 us    |    native_set_pte_at();
- 0)   0.586 us    |    _spin_unlock();
- 0)               |    unlock_page() {
- 0)   0.533 us    |      page_waitqueue();
- 0)   0.638 us    |      __wake_up_bit();
- 0)   2.793 us    |    }
- 0) + 14.012 us   |  }
-
-You can also expand several functions at once:
-
- echo sys_open > set_graph_function
- echo sys_close >> set_graph_function
-
-Now if you want to go back to trace all functions you can clear
-this special filter via:
-
- echo > set_graph_function
-
-
-trace_pipe
-----------
-
-The trace_pipe outputs the same content as the trace file, but
-the effect on the tracing is different. Every read from
-trace_pipe is consumed. This means that subsequent reads will be
-different. The trace is live.
-
- # echo function > /debug/tracing/current_tracer
- # cat /debug/tracing/trace_pipe > /tmp/trace.out &
-[1] 4153
- # echo 1 > /debug/tracing/tracing_enabled
- # usleep 1
- # echo 0 > /debug/tracing/tracing_enabled
- # cat /debug/tracing/trace
-# tracer: function
-#
-#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
-#              | |      |          |         |
-
- #
- # cat /tmp/trace.out
-            bash-4043  [00] 41.267106: finish_task_switch <-schedule
-            bash-4043  [00] 41.267106: hrtick_set <-schedule
-            bash-4043  [00] 41.267107: hrtick_clear <-hrtick_set
-            bash-4043  [00] 41.267108: wait_for_completion <-__stop_machine_run
-            bash-4043  [00] 41.267108: wait_for_common <-wait_for_completion
-            bash-4043  [00] 41.267109: kthread_stop <-stop_machine_run
-            bash-4043  [00] 41.267109: init_waitqueue_head <-kthread_stop
-            bash-4043  [00] 41.267110: wake_up_process <-kthread_stop
-            bash-4043  [00] 41.267110: try_to_wake_up <-wake_up_process
-            bash-4043  [00] 41.267111: select_task_rq_rt <-try_to_wake_up
-
-
-Note, reading the trace_pipe file will block until more input is
-added. By changing the tracer, trace_pipe will issue an EOF. We
-needed to set the function tracer _before_ we "cat" the
-trace_pipe file.
-
-
-trace entries
--------------
-
-Having too much or not enough data can be troublesome in
-diagnosing an issue in the kernel. The file buffer_size_kb is
-used to modify the size of the internal trace buffers. The
-number listed is the number of entries that can be recorded per
-CPU. To know the full size, multiply the number of possible CPUS
-with the number of entries.
-
- # cat /debug/tracing/buffer_size_kb
-1408 (units kilobytes)
-
-Note, to modify this, you must have tracing completely disabled.
-To do that, echo "nop" into the current_tracer. If the
-current_tracer is not set to "nop", an EINVAL error will be
-returned.
-
- # echo nop > /debug/tracing/current_tracer
- # echo 10000 > /debug/tracing/buffer_size_kb
- # cat /debug/tracing/buffer_size_kb
-10000 (units kilobytes)
-
-The number of pages which will be allocated is limited to a
-percentage of available memory. Allocating too much will produce
-an error.
-
- # echo 1000000000000 > /debug/tracing/buffer_size_kb
--bash: echo: write error: Cannot allocate memory
- # cat /debug/tracing/buffer_size_kb
-85
-
------------
-
-More details can be found in the source code, in the
-kernel/tracing/*.c files.
diff --git a/Documentation/hwmon/g760a b/Documentation/hwmon/g760a
new file mode 100644 (file)
index 0000000..e032eeb
--- /dev/null
@@ -0,0 +1,36 @@
+Kernel driver g760a
+===================
+
+Supported chips:
+  * Global Mixed-mode Technology Inc. G760A
+    Prefix: 'g760a'
+    Datasheet: Publicly available at the GMT website
+      http://www.gmt.com.tw/datasheet/g760a.pdf
+
+Author: Herbert Valerio Riedel <hvr@gnu.org>
+
+Description
+-----------
+
+The GMT G760A Fan Speed PWM Controller is connected directly to a fan
+and performs closed-loop control of the fan speed.
+
+The fan speed is programmed by setting the period via 'pwm1' of two
+consecutive speed pulses. The period is defined in terms of clock
+cycle counts of an assumed 32kHz clock source.
+
+Setting a period of 0 stops the fan; setting the period to 255 sets
+fan to maximum speed.
+
+The measured fan rotation speed returned via 'fan1_input' is derived
+from the measured speed pulse period by assuming again a 32kHz clock
+source and a 2 pulse-per-revolution fan.
+
+The 'alarms' file provides access to the two alarm bits provided by
+the G760A chip's status register: Bit 0 is set when the actual fan
+speed differs more than 20% with respect to the programmed fan speed;
+bit 1 is set when fan speed is below 1920 RPM.
+
+The g760a driver will not update its values more frequently than every
+other second; reading them more often will do no harm, but will return
+'old' values.
index 864ff32..6d40f00 100644 (file)
@@ -24,6 +24,49 @@ Partitions and P_Keys
   The P_Key for any interface is given by the "pkey" file, and the
   main interface for a subinterface is in "parent."
 
+Datagram vs Connected modes
+
+  The IPoIB driver supports two modes of operation: datagram and
+  connected.  The mode is set and read through an interface's
+  /sys/class/net/<intf name>/mode file.
+
+  In datagram mode, the IB UD (Unreliable Datagram) transport is used
+  and so the interface MTU has is equal to the IB L2 MTU minus the
+  IPoIB encapsulation header (4 bytes).  For example, in a typical IB
+  fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes.
+
+  In connected mode, the IB RC (Reliable Connected) transport is used.
+  Connected mode is to takes advantage of the connected nature of the
+  IB transport and allows an MTU up to the maximal IP packet size of
+  64K, which reduces the number of IP packets needed for handling
+  large UDP datagrams, TCP segments, etc and increases the performance
+  for large messages.
+
+  In connected mode, the interface's UD QP is still used for multicast
+  and communication with peers that don't support connected mode. In
+  this case, RX emulation of ICMP PMTU packets is used to cause the
+  networking stack to use the smaller UD MTU for these neighbours.
+
+Stateless offloads
+
+  If the IB HW supports IPoIB stateless offloads, IPoIB advertises
+  TCP/IP checksum and/or Large Send (LSO) offloading capability to the
+  network stack.
+
+  Large Receive (LRO) offloading is also implemented and may be turned
+  on/off using ethtool calls.  Currently LRO is supported only for
+  checksum offload capable devices.
+
+  Stateless offloads are supported only in datagram mode.  
+
+Interrupt moderation
+
+  If the underlying IB device supports CQ event moderation, one can
+  use ethtool to set interrupt mitigation parameters and thus reduce
+  the overhead incurred by handling interrupts.  The main code path of
+  IPoIB doesn't use events for TX completion signaling so only RX
+  moderation is supported.
+
 Debugging Information
 
   By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set
@@ -55,3 +98,5 @@ References
     http://ietf.org/rfc/rfc4391.txt 
   IP over InfiniBand (IPoIB) Architecture (RFC 4392)
     http://ietf.org/rfc/rfc4392.txt 
+  IP over InfiniBand: Connected Mode (RFC 4755)
+    http://ietf.org/rfc/rfc4755.txt
index 55b2852..02c0e93 100644 (file)
@@ -61,24 +61,28 @@ GigaSet 307x Device Driver
      ---------------------
 2.1. Modules
      -------
-     To get the device working, you have to load the proper kernel module. You
-     can do this using
-         modprobe modulename
-     where modulename is ser_gigaset (M101), usb_gigaset (M105), or
-     bas_gigaset (direct USB connection to the base).
+     For the devices to work, the proper kernel modules have to be loaded.
+     This normally happens automatically when the system detects the USB
+     device (base, M105) or when the line discipline is attached (M101). It
+     can also be triggered manually using the modprobe(8) command, for example
+     for troubleshooting or to pass module parameters.
 
      The module ser_gigaset provides a serial line discipline N_GIGASET_M101
-     which drives the device through the regular serial line driver. To use it,
-     run the Gigaset M101 daemon "gigasetm101d" (also available from
-     http://sourceforge.net/projects/gigaset307x/) with the device file of the
-     RS232 port to the M101 as an argument, for example:
-        gigasetm101d /dev/ttyS1
-     This will open the device file, set its line discipline to N_GIGASET_M101,
-     and then sleep in the background, keeping the device open so that the
-     line discipline remains active. To deactivate it, kill the daemon, for
-     example with
-        killall gigasetm101d
-     before disconnecting the device.
+     which drives the device through the regular serial line driver. It must
+     be attached to the serial line to which the M101 is connected with the
+     ldattach(8) command (requires util-linux-ng release 2.14 or later), for
+     example:
+        ldattach GIGASET_M101 /dev/ttyS1
+     This will open the device file, attach the line discipline to it, and
+     then sleep in the background, keeping the device open so that the line
+     discipline remains active. To deactivate it, kill the daemon, for example
+     with
+        killall ldattach
+     before disconnecting the device. To have this happen automatically at
+     system startup/shutdown on an LSB compatible system, create and activate
+     an appropriate LSB startup script /etc/init.d/gigaset. (The init name
+     'gigaset' is officially assigned to this project by LANANA.)
+     Alternatively, just add the 'ldattach' command line to /etc/rc.local.
 
 2.2. Device nodes for user space programs
      ------------------------------------
@@ -194,10 +198,11 @@ GigaSet 307x Device Driver
      operation (for wireless access to the base), but are needed for access
      to the M105's own configuration mode (registration to the base, baudrate
      and line format settings, device status queries) via the gigacontr
-     utility. Their use is disabled in the driver by default for safety
-     reasons but can be enabled by setting the kernel configuration option
-     "Support for undocumented USB requests" (GIGASET_UNDOCREQ) to "Y" and
-     recompiling.
+     utility. Their use is controlled by the kernel configuration option
+     "Support for undocumented USB requests" (CONFIG_GIGASET_UNDOCREQ). If you
+     encounter error code -ENOTTY when trying to use some features of the
+     M105, try setting that option to "y" via 'make {x,menu}config' and
+     recompiling the driver.
 
 
 3.   Troubleshooting
@@ -228,6 +233,13 @@ GigaSet 307x Device Driver
      Solution:
         Select Unimodem mode for all DECT data adapters. (see section 2.4.)
 
+     Problem:
+        You want to configure your USB DECT data adapter (M105) but gigacontr
+        reports an error: "/dev/ttyGU0: Inappropriate ioctl for device".
+     Solution:
+        Recompile the usb_gigaset driver with the kernel configuration option
+        CONFIG_GIGASET_UNDOCREQ set to 'y'. (see section 2.6.)
+
 3.2. Telling the driver to provide more information
      ----------------------------------------------
      Building the driver with the "Gigaset debugging" kernel configuration
index 48b3de9..1e7a769 100644 (file)
@@ -212,7 +212,9 @@ hit, Kprobes calls kp->pre_handler.  After the probed instruction
 is single-stepped, Kprobe calls kp->post_handler.  If a fault
 occurs during execution of kp->pre_handler or kp->post_handler,
 or during single-stepping of the probed instruction, Kprobes calls
-kp->fault_handler.  Any or all handlers can be NULL.
+kp->fault_handler.  Any or all handlers can be NULL. If kp->flags
+is set KPROBE_FLAG_DISABLED, that kp will be registered but disabled,
+so, it's handlers aren't hit until calling enable_kprobe(kp).
 
 NOTE:
 1. With the introduction of the "symbol_name" field to struct kprobe,
@@ -363,6 +365,26 @@ probes) in the specified array, they clear the addr field of those
 incorrect probes. However, other probes in the array are
 unregistered correctly.
 
+4.7 disable_*probe
+
+#include <linux/kprobes.h>
+int disable_kprobe(struct kprobe *kp);
+int disable_kretprobe(struct kretprobe *rp);
+int disable_jprobe(struct jprobe *jp);
+
+Temporarily disables the specified *probe. You can enable it again by using
+enable_*probe(). You must specify the probe which has been registered.
+
+4.8 enable_*probe
+
+#include <linux/kprobes.h>
+int enable_kprobe(struct kprobe *kp);
+int enable_kretprobe(struct kretprobe *rp);
+int enable_jprobe(struct jprobe *jp);
+
+Enables *probe which has been disabled by disable_*probe(). You must specify
+the probe which has been registered.
+
 5. Kprobes Features and Limitations
 
 Kprobes allows multiple probes at the same address.  Currently,
@@ -500,10 +522,14 @@ the probe. If the probed function belongs to a module, the module name
 is also specified. Following columns show probe status. If the probe is on
 a virtual address that is no longer valid (module init sections, module
 virtual addresses that correspond to modules that've been unloaded),
-such probes are marked with [GONE].
+such probes are marked with [GONE]. If the probe is temporarily disabled,
+such probes are marked with [DISABLED].
 
-/debug/kprobes/enabled: Turn kprobes ON/OFF
+/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly.
 
-Provides a knob to globally turn registered kprobes ON or OFF. By default,
-all kprobes are enabled. By echoing "0" to this file, all registered probes
-will be disarmed, till such time a "1" is echoed to this file.
+Provides a knob to globally and forcibly turn registered kprobes ON or OFF.
+By default, all kprobes are enabled. By echoing "0" to this file, all
+registered probes will be disarmed, till such time a "1" is echoed to this
+file. Note that this knob just disarms and arms all kprobes and doesn't
+change each probe's disabling state. This means that disabled kprobes (marked
+[DISABLED]) will be not enabled if you turn ON all kprobes by this knob.
index 84a04d5..a48b2ca 100644 (file)
@@ -5,9 +5,21 @@ Required properties:
 - reg : should specify localbus chip select and size used for the chip.
 - fsl,upm-addr-offset : UPM pattern offset for the address latch.
 - fsl,upm-cmd-offset : UPM pattern offset for the command latch.
-- gpios : may specify optional GPIO connected to the Ready-Not-Busy pin.
 
-Example:
+Optional properties:
+- fsl,upm-wait-flags : add chip-dependent short delays after running the
+       UPM pattern (0x1), after writing a data byte (0x2) or after
+       writing out a buffer (0x4).
+- fsl,upm-addr-line-cs-offsets : address offsets for multi-chip support.
+       The corresponding address lines are used to select the chip.
+- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins
+       (R/B#). For multi-chip devices, "n" GPIO definitions are required
+       according to the number of chips.
+- chip-delay : chip dependent delay for transfering data from array to
+       read registers (tR). Required if property "gpios" is not used
+       (R/B# pins not connected).
+
+Examples:
 
 upm@1,0 {
        compatible = "fsl,upm-nand";
@@ -26,3 +38,26 @@ upm@1,0 {
                };
        };
 };
+
+upm@3,0 {
+       #address-cells = <0>;
+       #size-cells = <0>;
+       compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
+       reg = <3 0x0 0x800>;
+       fsl,upm-addr-offset = <0x10>;
+       fsl,upm-cmd-offset = <0x08>;
+       /* Multi-chip NAND device */
+       fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
+       fsl,upm-wait-flags = <0x5>;
+       chip-delay = <25>; // in micro-seconds
+
+       nand@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               partition@0 {
+                           label = "fs";
+                           reg = <0x00000000 0x10000000>;
+               };
+       };
+};
diff --git a/Documentation/sound/alsa/soc/jack.txt b/Documentation/sound/alsa/soc/jack.txt
new file mode 100644 (file)
index 0000000..fcf82a4
--- /dev/null
@@ -0,0 +1,71 @@
+ASoC jack detection
+===================
+
+ALSA has a standard API for representing physical jacks to user space,
+the kernel side of which can be seen in include/sound/jack.h.  ASoC
+provides a version of this API adding two additional features:
+
+ - It allows more than one jack detection method to work together on one
+   user visible jack.  In embedded systems it is common for multiple
+   to be present on a single jack but handled by separate bits of
+   hardware.
+
+ - Integration with DAPM, allowing DAPM endpoints to be updated
+   automatically based on the detected jack status (eg, turning off the
+   headphone outputs if no headphones are present).
+
+This is done by splitting the jacks up into three things working
+together: the jack itself represented by a struct snd_soc_jack, sets of
+snd_soc_jack_pins representing DAPM endpoints to update and blocks of
+code providing jack reporting mechanisms.
+
+For example, a system may have a stereo headset jack with two reporting
+mechanisms, one for the headphone and one for the microphone.  Some
+systems won't be able to use their speaker output while a headphone is
+connected and so will want to make sure to update both speaker and
+headphone when the headphone jack status changes.
+
+The jack - struct snd_soc_jack
+==============================
+
+This represents a physical jack on the system and is what is visible to
+user space.  The jack itself is completely passive, it is set up by the
+machine driver and updated by jack detection methods.
+
+Jacks are created by the machine driver calling snd_soc_jack_new().
+
+snd_soc_jack_pin
+================
+
+These represent a DAPM pin to update depending on some of the status
+bits supported by the jack.  Each snd_soc_jack has zero or more of these
+which are updated automatically.  They are created by the machine driver
+and associated with the jack using snd_soc_jack_add_pins().  The status
+of the endpoint may configured to be the opposite of the jack status if
+required (eg, enabling a built in microphone if a microphone is not
+connected via a jack).
+
+Jack detection methods
+======================
+
+Actual jack detection is done by code which is able to monitor some
+input to the system and update a jack by calling snd_soc_jack_report(),
+specifying a subset of bits to update.  The jack detection code should
+be set up by the machine driver, taking configuration for the jack to
+update and the set of things to report when the jack is connected.
+
+Often this is done based on the status of a GPIO - a handler for this is
+provided by the snd_soc_jack_add_gpio() function.  Other methods are
+also available, for example integrated into CODECs.  One example of
+CODEC integrated jack detection can be see in the WM8350 driver.
+
+Each jack may have multiple reporting mechanisms, though it will need at
+least one to be useful.
+
+Machine drivers
+===============
+
+These are all hooked together by the machine driver depending on the
+system hardware.  The machine driver will set up the snd_soc_jack and
+the list of pins to update then set up one or more jack detection
+mechanisms to update that jack based on their current status.
index 3197fc8..97c4b32 100644 (file)
@@ -39,6 +39,8 @@ Currently, these files are in /proc/sys/vm:
 - nr_hugepages
 - nr_overcommit_hugepages
 - nr_pdflush_threads
+- nr_pdflush_threads_min
+- nr_pdflush_threads_max
 - nr_trim_pages         (only if CONFIG_MMU=n)
 - numa_zonelist_order
 - oom_dump_tasks
@@ -463,6 +465,32 @@ The default value is 0.
 
 ==============================================================
 
+nr_pdflush_threads_min
+
+This value controls the minimum number of pdflush threads.
+
+At boot time, the kernel will create and maintain 'nr_pdflush_threads_min'
+threads for the kernel's lifetime.
+
+The default value is 2.  The minimum value you can specify is 1, and
+the maximum value is the current setting of 'nr_pdflush_threads_max'.
+
+See 'nr_pdflush_threads_max' below for more information.
+
+==============================================================
+
+nr_pdflush_threads_max
+
+This value controls the maximum number of pdflush threads that can be
+created.  The pdflush algorithm will create a new pdflush thread (up to
+this maximum) if no pdflush threads have been available for >= 1 second.
+
+The default value is 8.  The minimum value you can specify is the
+current value of 'nr_pdflush_threads_min' and the
+maximum is 1000.
+
+==============================================================
+
 overcommit_memory:
 
 This value contains a flag that enables memory overcommitment.
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
new file mode 100644 (file)
index 0000000..fd9a3e6
--- /dev/null
@@ -0,0 +1,1828 @@
+               ftrace - Function Tracer
+               ========================
+
+Copyright 2008 Red Hat Inc.
+   Author:   Steven Rostedt <srostedt@redhat.com>
+  License:   The GNU Free Documentation License, Version 1.2
+               (dual licensed under the GPL v2)
+Reviewers:   Elias Oltmanns, Randy Dunlap, Andrew Morton,
+            John Kacur, and David Teigland.
+
+Written for: 2.6.28-rc2
+
+Introduction
+------------
+
+Ftrace is an internal tracer designed to help out developers and
+designers of systems to find what is going on inside the kernel.
+It can be used for debugging or analyzing latencies and
+performance issues that take place outside of user-space.
+
+Although ftrace is the function tracer, it also includes an
+infrastructure that allows for other types of tracing. Some of
+the tracers that are currently in ftrace include a tracer to
+trace context switches, the time it takes for a high priority
+task to run after it was woken up, the time interrupts are
+disabled, and more (ftrace allows for tracer plugins, which
+means that the list of tracers can always grow).
+
+
+The File System
+---------------
+
+Ftrace uses the debugfs file system to hold the control files as
+well as the files to display output.
+
+To mount the debugfs system:
+
+  # mkdir /debug
+  # mount -t debugfs nodev /debug
+
+( Note: it is more common to mount at /sys/kernel/debug, but for
+  simplicity this document will use /debug)
+
+That's it! (assuming that you have ftrace configured into your kernel)
+
+After mounting the debugfs, you can see a directory called
+"tracing".  This directory contains the control and output files
+of ftrace. Here is a list of some of the key files:
+
+
+ Note: all time values are in microseconds.
+
+  current_tracer:
+
+       This is used to set or display the current tracer
+       that is configured.
+
+  available_tracers:
+
+       This holds the different types of tracers that
+       have been compiled into the kernel. The
+       tracers listed here can be configured by
+       echoing their name into current_tracer.
+
+  tracing_enabled:
+
+       This sets or displays whether the current_tracer
+       is activated and tracing or not. Echo 0 into this
+       file to disable the tracer or 1 to enable it.
+
+  trace:
+
+       This file holds the output of the trace in a human
+       readable format (described below).
+
+  latency_trace:
+
+       This file shows the same trace but the information
+       is organized more to display possible latencies
+       in the system (described below).
+
+  trace_pipe:
+
+       The output is the same as the "trace" file but this
+       file is meant to be streamed with live tracing.
+       Reads from this file will block until new data
+       is retrieved. Unlike the "trace" and "latency_trace"
+       files, this file is a consumer. This means reading
+       from this file causes sequential reads to display
+       more current data. Once data is read from this
+       file, it is consumed, and will not be read
+       again with a sequential read. The "trace" and
+       "latency_trace" files are static, and if the
+       tracer is not adding more data, they will display
+       the same information every time they are read.
+
+  trace_options:
+
+       This file lets the user control the amount of data
+       that is displayed in one of the above output
+       files.
+
+  tracing_max_latency:
+
+       Some of the tracers record the max latency.
+       For example, the time interrupts are disabled.
+       This time is saved in this file. The max trace
+       will also be stored, and displayed by either
+       "trace" or "latency_trace".  A new max trace will
+       only be recorded if the latency is greater than
+       the value in this file. (in microseconds)
+
+  buffer_size_kb:
+
+       This sets or displays the number of kilobytes each CPU
+       buffer can hold. The tracer buffers are the same size
+       for each CPU. The displayed number is the size of the
+       CPU buffer and not total size of all buffers. The
+       trace buffers are allocated in pages (blocks of memory
+       that the kernel uses for allocation, usually 4 KB in size).
+       If the last page allocated has room for more bytes
+       than requested, the rest of the page will be used,
+       making the actual allocation bigger than requested.
+       ( Note, the size may not be a multiple of the page size
+         due to buffer managment overhead. )
+
+       This can only be updated when the current_tracer
+       is set to "nop".
+
+  tracing_cpumask:
+
+       This is a mask that lets the user only trace
+       on specified CPUS. The format is a hex string
+       representing the CPUS.
+
+  set_ftrace_filter:
+
+       When dynamic ftrace is configured in (see the
+       section below "dynamic ftrace"), the code is dynamically
+       modified (code text rewrite) to disable calling of the
+       function profiler (mcount). This lets tracing be configured
+       in with practically no overhead in performance.  This also
+       has a side effect of enabling or disabling specific functions
+       to be traced. Echoing names of functions into this file
+       will limit the trace to only those functions.
+
+  set_ftrace_notrace:
+
+       This has an effect opposite to that of
+       set_ftrace_filter. Any function that is added here will not
+       be traced. If a function exists in both set_ftrace_filter
+       and set_ftrace_notrace, the function will _not_ be traced.
+
+  set_ftrace_pid:
+
+       Have the function tracer only trace a single thread.
+
+  set_graph_function:
+
+       Set a "trigger" function where tracing should start
+       with the function graph tracer (See the section
+       "dynamic ftrace" for more details).
+
+  available_filter_functions:
+
+       This lists the functions that ftrace
+       has processed and can trace. These are the function
+       names that you can pass to "set_ftrace_filter" or
+       "set_ftrace_notrace". (See the section "dynamic ftrace"
+       below for more details.)
+
+
+The Tracers
+-----------
+
+Here is the list of current tracers that may be configured.
+
+  "function"
+
+       Function call tracer to trace all kernel functions.
+
+  "function_graph_tracer"
+
+       Similar to the function tracer except that the
+       function tracer probes the functions on their entry
+       whereas the function graph tracer traces on both entry
+       and exit of the functions. It then provides the ability
+       to draw a graph of function calls similar to C code
+       source.
+
+  "sched_switch"
+
+       Traces the context switches and wakeups between tasks.
+
+  "irqsoff"
+
+       Traces the areas that disable interrupts and saves
+       the trace with the longest max latency.
+       See tracing_max_latency. When a new max is recorded,
+       it replaces the old trace. It is best to view this
+       trace via the latency_trace file.
+
+  "preemptoff"
+
+       Similar to irqsoff but traces and records the amount of
+       time for which preemption is disabled.
+
+  "preemptirqsoff"
+
+       Similar to irqsoff and preemptoff, but traces and
+       records the largest time for which irqs and/or preemption
+       is disabled.
+
+  "wakeup"
+
+       Traces and records the max latency that it takes for
+       the highest priority task to get scheduled after
+       it has been woken up.
+
+  "hw-branch-tracer"
+
+       Uses the BTS CPU feature on x86 CPUs to traces all
+       branches executed.
+
+  "nop"
+
+       This is the "trace nothing" tracer. To remove all
+       tracers from tracing simply echo "nop" into
+       current_tracer.
+
+
+Examples of using the tracer
+----------------------------
+
+Here are typical examples of using the tracers when controlling
+them only with the debugfs interface (without using any
+user-land utilities).
+
+Output format:
+--------------
+
+Here is an example of the output format of the file "trace"
+
+                             --------
+# tracer: function
+#
+#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
+#              | |      |          |         |
+            bash-4251  [01] 10152.583854: path_put <-path_walk
+            bash-4251  [01] 10152.583855: dput <-path_put
+            bash-4251  [01] 10152.583855: _atomic_dec_and_lock <-dput
+                             --------
+
+A header is printed with the tracer name that is represented by
+the trace. In this case the tracer is "function". Then a header
+showing the format. Task name "bash", the task PID "4251", the
+CPU that it was running on "01", the timestamp in <secs>.<usecs>
+format, the function name that was traced "path_put" and the
+parent function that called this function "path_walk". The
+timestamp is the time at which the function was entered.
+
+The sched_switch tracer also includes tracing of task wakeups
+and context switches.
+
+     ksoftirqd/1-7     [01]  1453.070013:      7:115:R   +  2916:115:S
+     ksoftirqd/1-7     [01]  1453.070013:      7:115:R   +    10:115:S
+     ksoftirqd/1-7     [01]  1453.070013:      7:115:R ==>    10:115:R
+        events/1-10    [01]  1453.070013:     10:115:S ==>  2916:115:R
+     kondemand/1-2916  [01]  1453.070013:   2916:115:S ==>     7:115:R
+     ksoftirqd/1-7     [01]  1453.070013:      7:115:S ==>     0:140:R
+
+Wake ups are represented by a "+" and the context switches are
+shown as "==>".  The format is:
+
+ Context switches:
+
+       Previous task              Next Task
+
+  <pid>:<prio>:<state>  ==>  <pid>:<prio>:<state>
+
+ Wake ups:
+
+       Current task               Task waking up
+
+  <pid>:<prio>:<state>    +  <pid>:<prio>:<state>
+
+The prio is the internal kernel priority, which is the inverse
+of the priority that is usually displayed by user-space tools.
+Zero represents the highest priority (99). Prio 100 starts the
+"nice" priorities with 100 being equal to nice -20 and 139 being
+nice 19. The prio "140" is reserved for the idle task which is
+the lowest priority thread (pid 0).
+
+
+Latency trace format
+--------------------
+
+For traces that display latency times, the latency_trace file
+gives somewhat more information to see why a latency happened.
+Here is a typical trace.
+
+# tracer: irqsoff
+#
+irqsoff latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 97 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: swapper-0 (uid:0 nice:0 policy:0 rt_prio:0)
+    -----------------
+ => started at: apic_timer_interrupt
+ => ended at:   do_softirq
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+  <idle>-0     0d..1    0us+: trace_hardirqs_off_thunk (apic_timer_interrupt)
+  <idle>-0     0d.s.   97us : __do_softirq (do_softirq)
+  <idle>-0     0d.s1   98us : trace_hardirqs_on (do_softirq)
+
+
+This shows that the current tracer is "irqsoff" tracing the time
+for which interrupts were disabled. It gives the trace version
+and the version of the kernel upon which this was executed on
+(2.6.26-rc8). Then it displays the max latency in microsecs (97
+us). The number of trace entries displayed and the total number
+recorded (both are three: #3/3). The type of preemption that was
+used (PREEMPT). VP, KP, SP, and HP are always zero and are
+reserved for later use. #P is the number of online CPUS (#P:2).
+
+The task is the process that was running when the latency
+occurred. (swapper pid: 0).
+
+The start and stop (the functions in which the interrupts were
+disabled and enabled respectively) that caused the latencies:
+
+  apic_timer_interrupt is where the interrupts were disabled.
+  do_softirq is where they were enabled again.
+
+The next lines after the header are the trace itself. The header
+explains which is which.
+
+  cmd: The name of the process in the trace.
+
+  pid: The PID of that process.
+
+  CPU#: The CPU which the process was running on.
+
+  irqs-off: 'd' interrupts are disabled. '.' otherwise.
+           Note: If the architecture does not support a way to
+                 read the irq flags variable, an 'X' will always
+                 be printed here.
+
+  need-resched: 'N' task need_resched is set, '.' otherwise.
+
+  hardirq/softirq:
+       'H' - hard irq occurred inside a softirq.
+       'h' - hard irq is running
+       's' - soft irq is running
+       '.' - normal context.
+
+  preempt-depth: The level of preempt_disabled
+
+The above is mostly meaningful for kernel developers.
+
+  time: This differs from the trace file output. The trace file output
+       includes an absolute timestamp. The timestamp used by the
+       latency_trace file is relative to the start of the trace.
+
+  delay: This is just to help catch your eye a bit better. And
+        needs to be fixed to be only relative to the same CPU.
+        The marks are determined by the difference between this
+        current trace and the next trace.
+         '!' - greater than preempt_mark_thresh (default 100)
+         '+' - greater than 1 microsecond
+         ' ' - less than or equal to 1 microsecond.
+
+  The rest is the same as the 'trace' file.
+
+
+trace_options
+-------------
+
+The trace_options file is used to control what gets printed in
+the trace output. To see what is available, simply cat the file:
+
+  cat /debug/tracing/trace_options
+  print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \
+  noblock nostacktrace nosched-tree nouserstacktrace nosym-userobj
+
+To disable one of the options, echo in the option prepended with
+"no".
+
+  echo noprint-parent > /debug/tracing/trace_options
+
+To enable an option, leave off the "no".
+
+  echo sym-offset > /debug/tracing/trace_options
+
+Here are the available options:
+
+  print-parent - On function traces, display the calling (parent)
+                function as well as the function being traced.
+
+  print-parent:
+   bash-4000  [01]  1477.606694: simple_strtoul <-strict_strtoul
+
+  noprint-parent:
+   bash-4000  [01]  1477.606694: simple_strtoul
+
+
+  sym-offset - Display not only the function name, but also the
+              offset in the function. For example, instead of
+              seeing just "ktime_get", you will see
+              "ktime_get+0xb/0x20".
+
+  sym-offset:
+   bash-4000  [01]  1477.606694: simple_strtoul+0x6/0xa0
+
+  sym-addr - this will also display the function address as well
+            as the function name.
+
+  sym-addr:
+   bash-4000  [01]  1477.606694: simple_strtoul <c0339346>
+
+  verbose - This deals with the latency_trace file.
+
+    bash  4000 1 0 00000000 00010a95 [58127d26] 1720.415ms \
+    (+0.000ms): simple_strtoul (strict_strtoul)
+
+  raw - This will display raw numbers. This option is best for
+       use with user applications that can translate the raw
+       numbers better than having it done in the kernel.
+
+  hex - Similar to raw, but the numbers will be in a hexadecimal
+       format.
+
+  bin - This will print out the formats in raw binary.
+
+  block - TBD (needs update)
+
+  stacktrace - This is one of the options that changes the trace
+              itself. When a trace is recorded, so is the stack
+              of functions. This allows for back traces of
+              trace sites.
+
+  userstacktrace - This option changes the trace. It records a
+                  stacktrace of the current userspace thread.
+
+  sym-userobj - when user stacktrace are enabled, look up which
+               object the address belongs to, and print a
+               relative address. This is especially useful when
+               ASLR is on, otherwise you don't get a chance to
+               resolve the address to object/file/line after
+               the app is no longer running
+
+               The lookup is performed when you read
+               trace,trace_pipe,latency_trace. Example:
+
+               a.out-1623  [000] 40874.465068: /root/a.out[+0x480] <-/root/a.out[+0
+x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
+
+  sched-tree - trace all tasks that are on the runqueue, at
+              every scheduling event. Will add overhead if
+              there's a lot of tasks running at once.
+
+
+sched_switch
+------------
+
+This tracer simply records schedule switches. Here is an example
+of how to use it.
+
+ # echo sched_switch > /debug/tracing/current_tracer
+ # echo 1 > /debug/tracing/tracing_enabled
+ # sleep 1
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/trace
+
+# tracer: sched_switch
+#
+#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
+#              | |      |          |         |
+            bash-3997  [01]   240.132281:   3997:120:R   +  4055:120:R
+            bash-3997  [01]   240.132284:   3997:120:R ==>  4055:120:R
+           sleep-4055  [01]   240.132371:   4055:120:S ==>  3997:120:R
+            bash-3997  [01]   240.132454:   3997:120:R   +  4055:120:S
+            bash-3997  [01]   240.132457:   3997:120:R ==>  4055:120:R
+           sleep-4055  [01]   240.132460:   4055:120:D ==>  3997:120:R
+            bash-3997  [01]   240.132463:   3997:120:R   +  4055:120:D
+            bash-3997  [01]   240.132465:   3997:120:R ==>  4055:120:R
+          <idle>-0     [00]   240.132589:      0:140:R   +     4:115:S
+          <idle>-0     [00]   240.132591:      0:140:R ==>     4:115:R
+     ksoftirqd/0-4     [00]   240.132595:      4:115:S ==>     0:140:R
+          <idle>-0     [00]   240.132598:      0:140:R   +     4:115:S
+          <idle>-0     [00]   240.132599:      0:140:R ==>     4:115:R
+     ksoftirqd/0-4     [00]   240.132603:      4:115:S ==>     0:140:R
+           sleep-4055  [01]   240.133058:   4055:120:S ==>  3997:120:R
+ [...]
+
+
+As we have discussed previously about this format, the header
+shows the name of the trace and points to the options. The
+"FUNCTION" is a misnomer since here it represents the wake ups
+and context switches.
+
+The sched_switch file only lists the wake ups (represented with
+'+') and context switches ('==>') with the previous task or
+current task first followed by the next task or task waking up.
+The format for both of these is PID:KERNEL-PRIO:TASK-STATE.
+Remember that the KERNEL-PRIO is the inverse of the actual
+priority with zero (0) being the highest priority and the nice
+values starting at 100 (nice -20). Below is a quick chart to map
+the kernel priority to user land priorities.
+
+  Kernel priority: 0 to 99    ==> user RT priority 99 to 0
+  Kernel priority: 100 to 139 ==> user nice -20 to 19
+  Kernel priority: 140        ==> idle task priority
+
+The task states are:
+
+ R - running : wants to run, may not actually be running
+ S - sleep   : process is waiting to be woken up (handles signals)
+ D - disk sleep (uninterruptible sleep) : process must be woken up
+                                       (ignores signals)
+ T - stopped : process suspended
+ t - traced  : process is being traced (with something like gdb)
+ Z - zombie  : process waiting to be cleaned up
+ X - unknown
+
+
+ftrace_enabled
+--------------
+
+The following tracers (listed below) give different output
+depending on whether or not the sysctl ftrace_enabled is set. To
+set ftrace_enabled, one can either use the sysctl function or
+set it via the proc file system interface.
+
+  sysctl kernel.ftrace_enabled=1
+
+ or
+
+  echo 1 > /proc/sys/kernel/ftrace_enabled
+
+To disable ftrace_enabled simply replace the '1' with '0' in the
+above commands.
+
+When ftrace_enabled is set the tracers will also record the
+functions that are within the trace. The descriptions of the
+tracers will also show an example with ftrace enabled.
+
+
+irqsoff
+-------
+
+When interrupts are disabled, the CPU can not react to any other
+external event (besides NMIs and SMIs). This prevents the timer
+interrupt from triggering or the mouse interrupt from letting
+the kernel know of a new mouse event. The result is a latency
+with the reaction time.
+
+The irqsoff tracer tracks the time for which interrupts are
+disabled. When a new maximum latency is hit, the tracer saves
+the trace leading up to that latency point so that every time a
+new maximum is reached, the old saved trace is discarded and the
+new trace is saved.
+
+To reset the maximum, echo 0 into tracing_max_latency. Here is
+an example:
+
+ # echo irqsoff > /debug/tracing/current_tracer
+ # echo 0 > /debug/tracing/tracing_max_latency
+ # echo 1 > /debug/tracing/tracing_enabled
+ # ls -ltr
+ [...]
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/latency_trace
+# tracer: irqsoff
+#
+irqsoff latency trace v1.1.5 on 2.6.26
+--------------------------------------------------------------------
+ latency: 12 us, #3/3, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: bash-3730 (uid:0 nice:0 policy:0 rt_prio:0)
+    -----------------
+ => started at: sys_setpgid
+ => ended at:   sys_setpgid
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+    bash-3730  1d...    0us : _write_lock_irq (sys_setpgid)
+    bash-3730  1d..1    1us+: _write_unlock_irq (sys_setpgid)
+    bash-3730  1d..2   14us : trace_hardirqs_on (sys_setpgid)
+
+
+Here we see that that we had a latency of 12 microsecs (which is
+very good). The _write_lock_irq in sys_setpgid disabled
+interrupts. The difference between the 12 and the displayed
+timestamp 14us occurred because the clock was incremented
+between the time of recording the max latency and the time of
+recording the function that had that latency.
+
+Note the above example had ftrace_enabled not set. If we set the
+ftrace_enabled, we get a much larger output:
+
+# tracer: irqsoff
+#
+irqsoff latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 50 us, #101/101, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: ls-4339 (uid:0 nice:0 policy:0 rt_prio:0)
+    -----------------
+ => started at: __alloc_pages_internal
+ => ended at:   __alloc_pages_internal
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+      ls-4339  0...1    0us+: get_page_from_freelist (__alloc_pages_internal)
+      ls-4339  0d..1    3us : rmqueue_bulk (get_page_from_freelist)
+      ls-4339  0d..1    3us : _spin_lock (rmqueue_bulk)
+      ls-4339  0d..1    4us : add_preempt_count (_spin_lock)
+      ls-4339  0d..2    4us : __rmqueue (rmqueue_bulk)
+      ls-4339  0d..2    5us : __rmqueue_smallest (__rmqueue)
+      ls-4339  0d..2    5us : __mod_zone_page_state (__rmqueue_smallest)
+      ls-4339  0d..2    6us : __rmqueue (rmqueue_bulk)
+      ls-4339  0d..2    6us : __rmqueue_smallest (__rmqueue)
+      ls-4339  0d..2    7us : __mod_zone_page_state (__rmqueue_smallest)
+      ls-4339  0d..2    7us : __rmqueue (rmqueue_bulk)
+      ls-4339  0d..2    8us : __rmqueue_smallest (__rmqueue)
+[...]
+      ls-4339  0d..2   46us : __rmqueue_smallest (__rmqueue)
+      ls-4339  0d..2   47us : __mod_zone_page_state (__rmqueue_smallest)
+      ls-4339  0d..2   47us : __rmqueue (rmqueue_bulk)
+      ls-4339  0d..2   48us : __rmqueue_smallest (__rmqueue)
+      ls-4339  0d..2   48us : __mod_zone_page_state (__rmqueue_smallest)
+      ls-4339  0d..2   49us : _spin_unlock (rmqueue_bulk)
+      ls-4339  0d..2   49us : sub_preempt_count (_spin_unlock)
+      ls-4339  0d..1   50us : get_page_from_freelist (__alloc_pages_internal)
+      ls-4339  0d..2   51us : trace_hardirqs_on (__alloc_pages_internal)
+
+
+
+Here we traced a 50 microsecond latency. But we also see all the
+functions that were called during that time. Note that by
+enabling function tracing, we incur an added overhead. This
+overhead may extend the latency times. But nevertheless, this
+trace has provided some very helpful debugging information.
+
+
+preemptoff
+----------
+
+When preemption is disabled, we may be able to receive
+interrupts but the task cannot be preempted and a higher
+priority task must wait for preemption to be enabled again
+before it can preempt a lower priority task.
+
+The preemptoff tracer traces the places that disable preemption.
+Like the irqsoff tracer, it records the maximum latency for
+which preemption was disabled. The control of preemptoff tracer
+is much like the irqsoff tracer.
+
+ # echo preemptoff > /debug/tracing/current_tracer
+ # echo 0 > /debug/tracing/tracing_max_latency
+ # echo 1 > /debug/tracing/tracing_enabled
+ # ls -ltr
+ [...]
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/latency_trace
+# tracer: preemptoff
+#
+preemptoff latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 29 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0)
+    -----------------
+ => started at: do_IRQ
+ => ended at:   __do_softirq
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+    sshd-4261  0d.h.    0us+: irq_enter (do_IRQ)
+    sshd-4261  0d.s.   29us : _local_bh_enable (__do_softirq)
+    sshd-4261  0d.s1   30us : trace_preempt_on (__do_softirq)
+
+
+This has some more changes. Preemption was disabled when an
+interrupt came in (notice the 'h'), and was enabled while doing
+a softirq. (notice the 's'). But we also see that interrupts
+have been disabled when entering the preempt off section and
+leaving it (the 'd'). We do not know if interrupts were enabled
+in the mean time.
+
+# tracer: preemptoff
+#
+preemptoff latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 63 us, #87/87, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0)
+    -----------------
+ => started at: remove_wait_queue
+ => ended at:   __do_softirq
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+    sshd-4261  0d..1    0us : _spin_lock_irqsave (remove_wait_queue)
+    sshd-4261  0d..1    1us : _spin_unlock_irqrestore (remove_wait_queue)
+    sshd-4261  0d..1    2us : do_IRQ (common_interrupt)
+    sshd-4261  0d..1    2us : irq_enter (do_IRQ)
+    sshd-4261  0d..1    2us : idle_cpu (irq_enter)
+    sshd-4261  0d..1    3us : add_preempt_count (irq_enter)
+    sshd-4261  0d.h1    3us : idle_cpu (irq_enter)
+    sshd-4261  0d.h.    4us : handle_fasteoi_irq (do_IRQ)
+[...]
+    sshd-4261  0d.h.   12us : add_preempt_count (_spin_lock)
+    sshd-4261  0d.h1   12us : ack_ioapic_quirk_irq (handle_fasteoi_irq)
+    sshd-4261  0d.h1   13us : move_native_irq (ack_ioapic_quirk_irq)
+    sshd-4261  0d.h1   13us : _spin_unlock (handle_fasteoi_irq)
+    sshd-4261  0d.h1   14us : sub_preempt_count (_spin_unlock)
+    sshd-4261  0d.h1   14us : irq_exit (do_IRQ)
+    sshd-4261  0d.h1   15us : sub_preempt_count (irq_exit)
+    sshd-4261  0d..2   15us : do_softirq (irq_exit)
+    sshd-4261  0d...   15us : __do_softirq (do_softirq)
+    sshd-4261  0d...   16us : __local_bh_disable (__do_softirq)
+    sshd-4261  0d...   16us+: add_preempt_count (__local_bh_disable)
+    sshd-4261  0d.s4   20us : add_preempt_count (__local_bh_disable)
+    sshd-4261  0d.s4   21us : sub_preempt_count (local_bh_enable)
+    sshd-4261  0d.s5   21us : sub_preempt_count (local_bh_enable)
+[...]
+    sshd-4261  0d.s6   41us : add_preempt_count (__local_bh_disable)
+    sshd-4261  0d.s6   42us : sub_preempt_count (local_bh_enable)
+    sshd-4261  0d.s7   42us : sub_preempt_count (local_bh_enable)
+    sshd-4261  0d.s5   43us : add_preempt_count (__local_bh_disable)
+    sshd-4261  0d.s5   43us : sub_preempt_count (local_bh_enable_ip)
+    sshd-4261  0d.s6   44us : sub_preempt_count (local_bh_enable_ip)
+    sshd-4261  0d.s5   44us : add_preempt_count (__local_bh_disable)
+    sshd-4261  0d.s5   45us : sub_preempt_count (local_bh_enable)
+[...]
+    sshd-4261  0d.s.   63us : _local_bh_enable (__do_softirq)
+    sshd-4261  0d.s1   64us : trace_preempt_on (__do_softirq)
+
+
+The above is an example of the preemptoff trace with
+ftrace_enabled set. Here we see that interrupts were disabled
+the entire time. The irq_enter code lets us know that we entered
+an interrupt 'h'. Before that, the functions being traced still
+show that it is not in an interrupt, but we can see from the
+functions themselves that this is not the case.
+
+Notice that __do_softirq when called does not have a
+preempt_count. It may seem that we missed a preempt enabling.
+What really happened is that the preempt count is held on the
+thread's stack and we switched to the softirq stack (4K stacks
+in effect). The code does not copy the preempt count, but
+because interrupts are disabled, we do not need to worry about
+it. Having a tracer like this is good for letting people know
+what really happens inside the kernel.
+
+
+preemptirqsoff
+--------------
+
+Knowing the locations that have interrupts disabled or
+preemption disabled for the longest times is helpful. But
+sometimes we would like to know when either preemption and/or
+interrupts are disabled.
+
+Consider the following code:
+
+    local_irq_disable();
+    call_function_with_irqs_off();
+    preempt_disable();
+    call_function_with_irqs_and_preemption_off();
+    local_irq_enable();
+    call_function_with_preemption_off();
+    preempt_enable();
+
+The irqsoff tracer will record the total length of
+call_function_with_irqs_off() and
+call_function_with_irqs_and_preemption_off().
+
+The preemptoff tracer will record the total length of
+call_function_with_irqs_and_preemption_off() and
+call_function_with_preemption_off().
+
+But neither will trace the time that interrupts and/or
+preemption is disabled. This total time is the time that we can
+not schedule. To record this time, use the preemptirqsoff
+tracer.
+
+Again, using this trace is much like the irqsoff and preemptoff
+tracers.
+
+ # echo preemptirqsoff > /debug/tracing/current_tracer
+ # echo 0 > /debug/tracing/tracing_max_latency
+ # echo 1 > /debug/tracing/tracing_enabled
+ # ls -ltr
+ [...]
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/latency_trace
+# tracer: preemptirqsoff
+#
+preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 293 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: ls-4860 (uid:0 nice:0 policy:0 rt_prio:0)
+    -----------------
+ => started at: apic_timer_interrupt
+ => ended at:   __do_softirq
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+      ls-4860  0d...    0us!: trace_hardirqs_off_thunk (apic_timer_interrupt)
+      ls-4860  0d.s.  294us : _local_bh_enable (__do_softirq)
+      ls-4860  0d.s1  294us : trace_preempt_on (__do_softirq)
+
+
+
+The trace_hardirqs_off_thunk is called from assembly on x86 when
+interrupts are disabled in the assembly code. Without the
+function tracing, we do not know if interrupts were enabled
+within the preemption points. We do see that it started with
+preemption enabled.
+
+Here is a trace with ftrace_enabled set:
+
+
+# tracer: preemptirqsoff
+#
+preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 105 us, #183/183, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0)
+    -----------------
+ => started at: write_chan
+ => ended at:   __do_softirq
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+      ls-4473  0.N..    0us : preempt_schedule (write_chan)
+      ls-4473  0dN.1    1us : _spin_lock (schedule)
+      ls-4473  0dN.1    2us : add_preempt_count (_spin_lock)
+      ls-4473  0d..2    2us : put_prev_task_fair (schedule)
+[...]
+      ls-4473  0d..2   13us : set_normalized_timespec (ktime_get_ts)
+      ls-4473  0d..2   13us : __switch_to (schedule)
+    sshd-4261  0d..2   14us : finish_task_switch (schedule)
+    sshd-4261  0d..2   14us : _spin_unlock_irq (finish_task_switch)
+    sshd-4261  0d..1   15us : add_preempt_count (_spin_lock_irqsave)
+    sshd-4261  0d..2   16us : _spin_unlock_irqrestore (hrtick_set)
+    sshd-4261  0d..2   16us : do_IRQ (common_interrupt)
+    sshd-4261  0d..2   17us : irq_enter (do_IRQ)
+    sshd-4261  0d..2   17us : idle_cpu (irq_enter)
+    sshd-4261  0d..2   18us : add_preempt_count (irq_enter)
+    sshd-4261  0d.h2   18us : idle_cpu (irq_enter)
+    sshd-4261  0d.h.   18us : handle_fasteoi_irq (do_IRQ)
+    sshd-4261  0d.h.   19us : _spin_lock (handle_fasteoi_irq)
+    sshd-4261  0d.h.   19us : add_preempt_count (_spin_lock)
+    sshd-4261  0d.h1   20us : _spin_unlock (handle_fasteoi_irq)
+    sshd-4261  0d.h1   20us : sub_preempt_count (_spin_unlock)
+[...]
+    sshd-4261  0d.h1   28us : _spin_unlock (handle_fasteoi_irq)
+    sshd-4261  0d.h1   29us : sub_preempt_count (_spin_unlock)
+    sshd-4261  0d.h2   29us : irq_exit (do_IRQ)
+    sshd-4261  0d.h2   29us : sub_preempt_count (irq_exit)
+    sshd-4261  0d..3   30us : do_softirq (irq_exit)
+    sshd-4261  0d...   30us : __do_softirq (do_softirq)
+    sshd-4261  0d...   31us : __local_bh_disable (__do_softirq)
+    sshd-4261  0d...   31us+: add_preempt_count (__local_bh_disable)
+    sshd-4261  0d.s4   34us : add_preempt_count (__local_bh_disable)
+[...]
+    sshd-4261  0d.s3   43us : sub_preempt_count (local_bh_enable_ip)
+    sshd-4261  0d.s4   44us : sub_preempt_count (local_bh_enable_ip)
+    sshd-4261  0d.s3   44us : smp_apic_timer_interrupt (apic_timer_interrupt)
+    sshd-4261  0d.s3   45us : irq_enter (smp_apic_timer_interrupt)
+    sshd-4261  0d.s3   45us : idle_cpu (irq_enter)
+    sshd-4261  0d.s3   46us : add_preempt_count (irq_enter)
+    sshd-4261  0d.H3   46us : idle_cpu (irq_enter)
+    sshd-4261  0d.H3   47us : hrtimer_interrupt (smp_apic_timer_interrupt)
+    sshd-4261  0d.H3   47us : ktime_get (hrtimer_interrupt)
+[...]
+    sshd-4261  0d.H3   81us : tick_program_event (hrtimer_interrupt)
+    sshd-4261  0d.H3   82us : ktime_get (tick_program_event)
+    sshd-4261  0d.H3   82us : ktime_get_ts (ktime_get)
+    sshd-4261  0d.H3   83us : getnstimeofday (ktime_get_ts)
+    sshd-4261  0d.H3   83us : set_normalized_timespec (ktime_get_ts)
+    sshd-4261  0d.H3   84us : clockevents_program_event (tick_program_event)
+    sshd-4261  0d.H3   84us : lapic_next_event (clockevents_program_event)
+    sshd-4261  0d.H3   85us : irq_exit (smp_apic_timer_interrupt)
+    sshd-4261  0d.H3   85us : sub_preempt_count (irq_exit)
+    sshd-4261  0d.s4   86us : sub_preempt_count (irq_exit)
+    sshd-4261  0d.s3   86us : add_preempt_count (__local_bh_disable)
+[...]
+    sshd-4261  0d.s1   98us : sub_preempt_count (net_rx_action)
+    sshd-4261  0d.s.   99us : add_preempt_count (_spin_lock_irq)
+    sshd-4261  0d.s1   99us+: _spin_unlock_irq (run_timer_softirq)
+    sshd-4261  0d.s.  104us : _local_bh_enable (__do_softirq)
+    sshd-4261  0d.s.  104us : sub_preempt_count (_local_bh_enable)
+    sshd-4261  0d.s.  105us : _local_bh_enable (__do_softirq)
+    sshd-4261  0d.s1  105us : trace_preempt_on (__do_softirq)
+
+
+This is a very interesting trace. It started with the preemption
+of the ls task. We see that the task had the "need_resched" bit
+set via the 'N' in the trace.  Interrupts were disabled before
+the spin_lock at the beginning of the trace. We see that a
+schedule took place to run sshd.  When the interrupts were
+enabled, we took an interrupt. On return from the interrupt
+handler, the softirq ran. We took another interrupt while
+running the softirq as we see from the capital 'H'.
+
+
+wakeup
+------
+
+In a Real-Time environment it is very important to know the
+wakeup time it takes for the highest priority task that is woken
+up to the time that it executes. This is also known as "schedule
+latency". I stress the point that this is about RT tasks. It is
+also important to know the scheduling latency of non-RT tasks,
+but the average schedule latency is better for non-RT tasks.
+Tools like LatencyTop are more appropriate for such
+measurements.
+
+Real-Time environments are interested in the worst case latency.
+That is the longest latency it takes for something to happen,
+and not the average. We can have a very fast scheduler that may
+only have a large latency once in a while, but that would not
+work well with Real-Time tasks.  The wakeup tracer was designed
+to record the worst case wakeups of RT tasks. Non-RT tasks are
+not recorded because the tracer only records one worst case and
+tracing non-RT tasks that are unpredictable will overwrite the
+worst case latency of RT tasks.
+
+Since this tracer only deals with RT tasks, we will run this
+slightly differently than we did with the previous tracers.
+Instead of performing an 'ls', we will run 'sleep 1' under
+'chrt' which changes the priority of the task.
+
+ # echo wakeup > /debug/tracing/current_tracer
+ # echo 0 > /debug/tracing/tracing_max_latency
+ # echo 1 > /debug/tracing/tracing_enabled
+ # chrt -f 5 sleep 1
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/latency_trace
+# tracer: wakeup
+#
+wakeup latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 4 us, #2/2, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: sleep-4901 (uid:0 nice:0 policy:1 rt_prio:5)
+    -----------------
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+  <idle>-0     1d.h4    0us+: try_to_wake_up (wake_up_process)
+  <idle>-0     1d..4    4us : schedule (cpu_idle)
+
+
+Running this on an idle system, we see that it only took 4
+microseconds to perform the task switch.  Note, since the trace
+marker in the schedule is before the actual "switch", we stop
+the tracing when the recorded task is about to schedule in. This
+may change if we add a new marker at the end of the scheduler.
+
+Notice that the recorded task is 'sleep' with the PID of 4901
+and it has an rt_prio of 5. This priority is user-space priority
+and not the internal kernel priority. The policy is 1 for
+SCHED_FIFO and 2 for SCHED_RR.
+
+Doing the same with chrt -r 5 and ftrace_enabled set.
+
+# tracer: wakeup
+#
+wakeup latency trace v1.1.5 on 2.6.26-rc8
+--------------------------------------------------------------------
+ latency: 50 us, #60/60, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
+    -----------------
+    | task: sleep-4068 (uid:0 nice:0 policy:2 rt_prio:5)
+    -----------------
+
+#                _------=> CPU#
+#               / _-----=> irqs-off
+#              | / _----=> need-resched
+#              || / _---=> hardirq/softirq
+#              ||| / _--=> preempt-depth
+#              |||| /
+#              |||||     delay
+#  cmd     pid ||||| time  |   caller
+#     \   /    |||||   \   |   /
+ksoftirq-7     1d.H3    0us : try_to_wake_up (wake_up_process)
+ksoftirq-7     1d.H4    1us : sub_preempt_count (marker_probe_cb)
+ksoftirq-7     1d.H3    2us : check_preempt_wakeup (try_to_wake_up)
+ksoftirq-7     1d.H3    3us : update_curr (check_preempt_wakeup)
+ksoftirq-7     1d.H3    4us : calc_delta_mine (update_curr)
+ksoftirq-7     1d.H3    5us : __resched_task (check_preempt_wakeup)
+ksoftirq-7     1d.H3    6us : task_wake_up_rt (try_to_wake_up)
+ksoftirq-7     1d.H3    7us : _spin_unlock_irqrestore (try_to_wake_up)
+[...]
+ksoftirq-7     1d.H2   17us : irq_exit (smp_apic_timer_interrupt)
+ksoftirq-7     1d.H2   18us : sub_preempt_count (irq_exit)
+ksoftirq-7     1d.s3   19us : sub_preempt_count (irq_exit)
+ksoftirq-7     1..s2   20us : rcu_process_callbacks (__do_softirq)
+[...]
+ksoftirq-7     1..s2   26us : __rcu_process_callbacks (rcu_process_callbacks)
+ksoftirq-7     1d.s2   27us : _local_bh_enable (__do_softirq)
+ksoftirq-7     1d.s2   28us : sub_preempt_count (_local_bh_enable)
+ksoftirq-7     1.N.3   29us : sub_preempt_count (ksoftirqd)
+ksoftirq-7     1.N.2   30us : _cond_resched (ksoftirqd)
+ksoftirq-7     1.N.2   31us : __cond_resched (_cond_resched)
+ksoftirq-7     1.N.2   32us : add_preempt_count (__cond_resched)
+ksoftirq-7     1.N.2   33us : schedule (__cond_resched)
+ksoftirq-7     1.N.2   33us : add_preempt_count (schedule)
+ksoftirq-7     1.N.3   34us : hrtick_clear (schedule)
+ksoftirq-7     1dN.3   35us : _spin_lock (schedule)
+ksoftirq-7     1dN.3   36us : add_preempt_count (_spin_lock)
+ksoftirq-7     1d..4   37us : put_prev_task_fair (schedule)
+ksoftirq-7     1d..4   38us : update_curr (put_prev_task_fair)
+[...]
+ksoftirq-7     1d..5   47us : _spin_trylock (tracing_record_cmdline)
+ksoftirq-7     1d..5   48us : add_preempt_count (_spin_trylock)
+ksoftirq-7     1d..6   49us : _spin_unlock (tracing_record_cmdline)
+ksoftirq-7     1d..6   49us : sub_preempt_count (_spin_unlock)
+ksoftirq-7     1d..4   50us : schedule (__cond_resched)
+
+The interrupt went off while running ksoftirqd. This task runs
+at SCHED_OTHER. Why did not we see the 'N' set early? This may
+be a harmless bug with x86_32 and 4K stacks. On x86_32 with 4K
+stacks configured, the interrupt and softirq run with their own
+stack. Some information is held on the top of the task's stack
+(need_resched and preempt_count are both stored there). The
+setting of the NEED_RESCHED bit is done directly to the task's
+stack, but the reading of the NEED_RESCHED is done by looking at
+the current stack, which in this case is the stack for the hard
+interrupt. This hides the fact that NEED_RESCHED has been set.
+We do not see the 'N' until we switch back to the task's
+assigned stack.
+
+function
+--------
+
+This tracer is the function tracer. Enabling the function tracer
+can be done from the debug file system. Make sure the
+ftrace_enabled is set; otherwise this tracer is a nop.
+
+ # sysctl kernel.ftrace_enabled=1
+ # echo function > /debug/tracing/current_tracer
+ # echo 1 > /debug/tracing/tracing_enabled
+ # usleep 1
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/trace
+# tracer: function
+#
+#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
+#              | |      |          |         |
+            bash-4003  [00]   123.638713: finish_task_switch <-schedule
+            bash-4003  [00]   123.638714: _spin_unlock_irq <-finish_task_switch
+            bash-4003  [00]   123.638714: sub_preempt_count <-_spin_unlock_irq
+            bash-4003  [00]   123.638715: hrtick_set <-schedule
+            bash-4003  [00]   123.638715: _spin_lock_irqsave <-hrtick_set
+            bash-4003  [00]   123.638716: add_preempt_count <-_spin_lock_irqsave
+            bash-4003  [00]   123.638716: _spin_unlock_irqrestore <-hrtick_set
+            bash-4003  [00]   123.638717: sub_preempt_count <-_spin_unlock_irqrestore
+            bash-4003  [00]   123.638717: hrtick_clear <-hrtick_set
+            bash-4003  [00]   123.638718: sub_preempt_count <-schedule
+            bash-4003  [00]   123.638718: sub_preempt_count <-preempt_schedule
+            bash-4003  [00]   123.638719: wait_for_completion <-__stop_machine_run
+            bash-4003  [00]   123.638719: wait_for_common <-wait_for_completion
+            bash-4003  [00]   123.638720: _spin_lock_irq <-wait_for_common
+            bash-4003  [00]   123.638720: add_preempt_count <-_spin_lock_irq
+[...]
+
+
+Note: function tracer uses ring buffers to store the above
+entries. The newest data may overwrite the oldest data.
+Sometimes using echo to stop the trace is not sufficient because
+the tracing could have overwritten the data that you wanted to
+record. For this reason, it is sometimes better to disable
+tracing directly from a program. This allows you to stop the
+tracing at the point that you hit the part that you are
+interested in. To disable the tracing directly from a C program,
+something like following code snippet can be used:
+
+int trace_fd;
+[...]
+int main(int argc, char *argv[]) {
+       [...]
+       trace_fd = open("/debug/tracing/tracing_enabled", O_WRONLY);
+       [...]
+       if (condition_hit()) {
+               write(trace_fd, "0", 1);
+       }
+       [...]
+}
+
+Note: Here we hard coded the path name. The debugfs mount is not
+guaranteed to be at /debug (and is more commonly at
+/sys/kernel/debug). For simple one time traces, the above is
+sufficent. For anything else, a search through /proc/mounts may
+be needed to find where the debugfs file-system is mounted.
+
+
+Single thread tracing
+---------------------
+
+By writing into /debug/tracing/set_ftrace_pid you can trace a
+single thread. For example:
+
+# cat /debug/tracing/set_ftrace_pid
+no pid
+# echo 3111 > /debug/tracing/set_ftrace_pid
+# cat /debug/tracing/set_ftrace_pid
+3111
+# echo function > /debug/tracing/current_tracer
+# cat /debug/tracing/trace | head
+ # tracer: function
+ #
+ #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
+ #              | |       |          |         |
+     yum-updatesd-3111  [003]  1637.254676: finish_task_switch <-thread_return
+     yum-updatesd-3111  [003]  1637.254681: hrtimer_cancel <-schedule_hrtimeout_range
+     yum-updatesd-3111  [003]  1637.254682: hrtimer_try_to_cancel <-hrtimer_cancel
+     yum-updatesd-3111  [003]  1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel
+     yum-updatesd-3111  [003]  1637.254685: fget_light <-do_sys_poll
+     yum-updatesd-3111  [003]  1637.254686: pipe_poll <-do_sys_poll
+# echo -1 > /debug/tracing/set_ftrace_pid
+# cat /debug/tracing/trace |head
+ # tracer: function
+ #
+ #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
+ #              | |       |          |         |
+ ##### CPU 3 buffer started ####
+     yum-updatesd-3111  [003]  1701.957688: free_poll_entry <-poll_freewait
+     yum-updatesd-3111  [003]  1701.957689: remove_wait_queue <-free_poll_entry
+     yum-updatesd-3111  [003]  1701.957691: fput <-free_poll_entry
+     yum-updatesd-3111  [003]  1701.957692: audit_syscall_exit <-sysret_audit
+     yum-updatesd-3111  [003]  1701.957693: path_put <-audit_syscall_exit
+
+If you want to trace a function when executing, you could use
+something like this simple program:
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int main (int argc, char **argv)
+{
+        if (argc < 1)
+                exit(-1);
+
+        if (fork() > 0) {
+                int fd, ffd;
+                char line[64];
+                int s;
+
+                ffd = open("/debug/tracing/current_tracer", O_WRONLY);
+                if (ffd < 0)
+                        exit(-1);
+                write(ffd, "nop", 3);
+
+                fd = open("/debug/tracing/set_ftrace_pid", O_WRONLY);
+                s = sprintf(line, "%d\n", getpid());
+                write(fd, line, s);
+
+                write(ffd, "function", 8);
+
+                close(fd);
+                close(ffd);
+
+                execvp(argv[1], argv+1);
+        }
+
+        return 0;
+}
+
+
+hw-branch-tracer (x86 only)
+---------------------------
+
+This tracer uses the x86 last branch tracing hardware feature to
+collect a branch trace on all cpus with relatively low overhead.
+
+The tracer uses a fixed-size circular buffer per cpu and only
+traces ring 0 branches. The trace file dumps that buffer in the
+following format:
+
+# tracer: hw-branch-tracer
+#
+# CPU#        TO  <-  FROM
+   0  scheduler_tick+0xb5/0x1bf          <-  task_tick_idle+0x5/0x6
+   2  run_posix_cpu_timers+0x2b/0x72a    <-  run_posix_cpu_timers+0x25/0x72a
+   0  scheduler_tick+0x139/0x1bf         <-  scheduler_tick+0xed/0x1bf
+   0  scheduler_tick+0x17c/0x1bf         <-  scheduler_tick+0x148/0x1bf
+   2  run_posix_cpu_timers+0x9e/0x72a    <-  run_posix_cpu_timers+0x5e/0x72a
+   0  scheduler_tick+0x1b6/0x1bf         <-  scheduler_tick+0x1aa/0x1bf
+
+
+The tracer may be used to dump the trace for the oops'ing cpu on
+a kernel oops into the system log. To enable this,
+ftrace_dump_on_oops must be set. To set ftrace_dump_on_oops, one
+can either use the sysctl function or set it via the proc system
+interface.
+
+  sysctl kernel.ftrace_dump_on_oops=1
+
+or
+
+  echo 1 > /proc/sys/kernel/ftrace_dump_on_oops
+
+
+Here's an example of such a dump after a null pointer
+dereference in a kernel module:
+
+[57848.105921] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
+[57848.106019] IP: [<ffffffffa0000006>] open+0x6/0x14 [oops]
+[57848.106019] PGD 2354e9067 PUD 2375e7067 PMD 0
+[57848.106019] Oops: 0002 [#1] SMP
+[57848.106019] last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:20:05.0/local_cpus
+[57848.106019] Dumping ftrace buffer:
+[57848.106019] ---------------------------------
+[...]
+[57848.106019]    0  chrdev_open+0xe6/0x165      <-  cdev_put+0x23/0x24
+[57848.106019]    0  chrdev_open+0x117/0x165     <-  chrdev_open+0xfa/0x165
+[57848.106019]    0  chrdev_open+0x120/0x165     <-  chrdev_open+0x11c/0x165
+[57848.106019]    0  chrdev_open+0x134/0x165     <-  chrdev_open+0x12b/0x165
+[57848.106019]    0  open+0x0/0x14 [oops]        <-  chrdev_open+0x144/0x165
+[57848.106019]    0  page_fault+0x0/0x30         <-  open+0x6/0x14 [oops]
+[57848.106019]    0  error_entry+0x0/0x5b        <-  page_fault+0x4/0x30
+[57848.106019]    0  error_kernelspace+0x0/0x31          <-  error_entry+0x59/0x5b
+[57848.106019]    0  error_sti+0x0/0x1   <-  error_kernelspace+0x2d/0x31
+[57848.106019]    0  page_fault+0x9/0x30         <-  error_sti+0x0/0x1
+[57848.106019]    0  do_page_fault+0x0/0x881     <-  page_fault+0x1a/0x30
+[...]
+[57848.106019]    0  do_page_fault+0x66b/0x881   <-  is_prefetch+0x1ee/0x1f2
+[57848.106019]    0  do_page_fault+0x6e0/0x881   <-  do_page_fault+0x67a/0x881
+[57848.106019]    0  oops_begin+0x0/0x96         <-  do_page_fault+0x6e0/0x881
+[57848.106019]    0  trace_hw_branch_oops+0x0/0x2d       <-  oops_begin+0x9/0x96
+[...]
+[57848.106019]    0  ds_suspend_bts+0x2a/0xe3    <-  ds_suspend_bts+0x1a/0xe3
+[57848.106019] ---------------------------------
+[57848.106019] CPU 0
+[57848.106019] Modules linked in: oops
+[57848.106019] Pid: 5542, comm: cat Tainted: G        W  2.6.28 #23
+[57848.106019] RIP: 0010:[<ffffffffa0000006>]  [<ffffffffa0000006>] open+0x6/0x14 [oops]
+[57848.106019] RSP: 0018:ffff880235457d48  EFLAGS: 00010246
+[...]
+
+
+function graph tracer
+---------------------------
+
+This tracer is similar to the function tracer except that it
+probes a function on its entry and its exit. This is done by
+using a dynamically allocated stack of return addresses in each
+task_struct. On function entry the tracer overwrites the return
+address of each function traced to set a custom probe. Thus the
+original return address is stored on the stack of return address
+in the task_struct.
+
+Probing on both ends of a function leads to special features
+such as:
+
+- measure of a function's time execution
+- having a reliable call stack to draw function calls graph
+
+This tracer is useful in several situations:
+
+- you want to find the reason of a strange kernel behavior and
+  need to see what happens in detail on any areas (or specific
+  ones).
+
+- you are experiencing weird latencies but it's difficult to
+  find its origin.
+
+- you want to find quickly which path is taken by a specific
+  function
+
+- you just want to peek inside a working kernel and want to see
+  what happens there.
+
+# tracer: function_graph
+#
+# CPU  DURATION                  FUNCTION CALLS
+# |     |   |                     |   |   |   |
+
+ 0)               |  sys_open() {
+ 0)               |    do_sys_open() {
+ 0)               |      getname() {
+ 0)               |        kmem_cache_alloc() {
+ 0)   1.382 us    |          __might_sleep();
+ 0)   2.478 us    |        }
+ 0)               |        strncpy_from_user() {
+ 0)               |          might_fault() {
+ 0)   1.389 us    |            __might_sleep();
+ 0)   2.553 us    |          }
+ 0)   3.807 us    |        }
+ 0)   7.876 us    |      }
+ 0)               |      alloc_fd() {
+ 0)   0.668 us    |        _spin_lock();
+ 0)   0.570 us    |        expand_files();
+ 0)   0.586 us    |        _spin_unlock();
+
+
+There are several columns that can be dynamically
+enabled/disabled. You can use every combination of options you
+want, depending on your needs.
+
+- The cpu number on which the function executed is default
+  enabled.  It is sometimes better to only trace one cpu (see
+  tracing_cpu_mask file) or you might sometimes see unordered
+  function calls while cpu tracing switch.
+
+       hide: echo nofuncgraph-cpu > /debug/tracing/trace_options
+       show: echo funcgraph-cpu > /debug/tracing/trace_options
+
+- The duration (function's time of execution) is displayed on
+  the closing bracket line of a function or on the same line
+  than the current function in case of a leaf one. It is default
+  enabled.
+
+       hide: echo nofuncgraph-duration > /debug/tracing/trace_options
+       show: echo funcgraph-duration > /debug/tracing/trace_options
+
+- The overhead field precedes the duration field in case of
+  reached duration thresholds.
+
+       hide: echo nofuncgraph-overhead > /debug/tracing/trace_options
+       show: echo funcgraph-overhead > /debug/tracing/trace_options
+       depends on: funcgraph-duration
+
+  ie:
+
+  0)               |    up_write() {
+  0)   0.646 us    |      _spin_lock_irqsave();
+  0)   0.684 us    |      _spin_unlock_irqrestore();
+  0)   3.123 us    |    }
+  0)   0.548 us    |    fput();
+  0) + 58.628 us   |  }
+
+  [...]
+
+  0)               |      putname() {
+  0)               |        kmem_cache_free() {
+  0)   0.518 us    |          __phys_addr();
+  0)   1.757 us    |        }
+  0)   2.861 us    |      }
+  0) ! 115.305 us  |    }
+  0) ! 116.402 us  |  }
+
+  + means that the function exceeded 10 usecs.
+  ! means that the function exceeded 100 usecs.
+
+
+- The task/pid field displays the thread cmdline and pid which
+  executed the function. It is default disabled.
+
+       hide: echo nofuncgraph-proc > /debug/tracing/trace_options
+       show: echo funcgraph-proc > /debug/tracing/trace_options
+
+  ie:
+
+  # tracer: function_graph
+  #
+  # CPU  TASK/PID        DURATION                  FUNCTION CALLS
+  # |    |    |           |   |                     |   |   |   |
+  0)    sh-4802     |               |                  d_free() {
+  0)    sh-4802     |               |                    call_rcu() {
+  0)    sh-4802     |               |                      __call_rcu() {
+  0)    sh-4802     |   0.616 us    |                        rcu_process_gp_end();
+  0)    sh-4802     |   0.586 us    |                        check_for_new_grace_period();
+  0)    sh-4802     |   2.899 us    |                      }
+  0)    sh-4802     |   4.040 us    |                    }
+  0)    sh-4802     |   5.151 us    |                  }
+  0)    sh-4802     | + 49.370 us   |                }
+
+
+- The absolute time field is an absolute timestamp given by the
+  system clock since it started. A snapshot of this time is
+  given on each entry/exit of functions
+
+       hide: echo nofuncgraph-abstime > /debug/tracing/trace_options
+       show: echo funcgraph-abstime > /debug/tracing/trace_options
+
+  ie:
+
+  #
+  #      TIME       CPU  DURATION                  FUNCTION CALLS
+  #       |         |     |   |                     |   |   |   |
+  360.774522 |   1)   0.541 us    |                                          }
+  360.774522 |   1)   4.663 us    |                                        }
+  360.774523 |   1)   0.541 us    |                                        __wake_up_bit();
+  360.774524 |   1)   6.796 us    |                                      }
+  360.774524 |   1)   7.952 us    |                                    }
+  360.774525 |   1)   9.063 us    |                                  }
+  360.774525 |   1)   0.615 us    |                                  journal_mark_dirty();
+  360.774527 |   1)   0.578 us    |                                  __brelse();
+  360.774528 |   1)               |                                  reiserfs_prepare_for_journal() {
+  360.774528 |   1)               |                                    unlock_buffer() {
+  360.774529 |   1)               |                                      wake_up_bit() {
+  360.774529 |   1)               |                                        bit_waitqueue() {
+  360.774530 |   1)   0.594 us    |                                          __phys_addr();
+
+
+You can put some comments on specific functions by using
+trace_printk() For example, if you want to put a comment inside
+the __might_sleep() function, you just have to include
+<linux/ftrace.h> and call trace_printk() inside __might_sleep()
+
+trace_printk("I'm a comment!\n")
+
+will produce:
+
+ 1)               |             __might_sleep() {
+ 1)               |                /* I'm a comment! */
+ 1)   1.449 us    |             }
+
+
+You might find other useful features for this tracer in the
+following "dynamic ftrace" section such as tracing only specific
+functions or tasks.
+
+dynamic ftrace
+--------------
+
+If CONFIG_DYNAMIC_FTRACE is set, the system will run with
+virtually no overhead when function tracing is disabled. The way
+this works is the mcount function call (placed at the start of
+every kernel function, produced by the -pg switch in gcc),
+starts of pointing to a simple return. (Enabling FTRACE will
+include the -pg switch in the compiling of the kernel.)
+
+At compile time every C file object is run through the
+recordmcount.pl script (located in the scripts directory). This
+script will process the C object using objdump to find all the
+locations in the .text section that call mcount. (Note, only the
+.text section is processed, since processing other sections like
+.init.text may cause races due to those sections being freed).
+
+A new section called "__mcount_loc" is created that holds
+references to all the mcount call sites in the .text section.
+This section is compiled back into the original object. The
+final linker will add all these references into a single table.
+
+On boot up, before SMP is initialized, the dynamic ftrace code
+scans this table and updates all the locations into nops. It
+also records the locations, which are added to the
+available_filter_functions list.  Modules are processed as they
+are loaded and before they are executed.  When a module is
+unloaded, it also removes its functions from the ftrace function
+list. This is automatic in the module unload code, and the
+module author does not need to worry about it.
+
+When tracing is enabled, kstop_machine is called to prevent
+races with the CPUS executing code being modified (which can
+cause the CPU to do undesireable things), and the nops are
+patched back to calls. But this time, they do not call mcount
+(which is just a function stub). They now call into the ftrace
+infrastructure.
+
+One special side-effect to the recording of the functions being
+traced is that we can now selectively choose which functions we
+wish to trace and which ones we want the mcount calls to remain
+as nops.
+
+Two files are used, one for enabling and one for disabling the
+tracing of specified functions. They are:
+
+  set_ftrace_filter
+
+and
+
+  set_ftrace_notrace
+
+A list of available functions that you can add to these files is
+listed in:
+
+   available_filter_functions
+
+ # cat /debug/tracing/available_filter_functions
+put_prev_task_idle
+kmem_cache_create
+pick_next_task_rt
+get_online_cpus
+pick_next_task_fair
+mutex_lock
+[...]
+
+If I am only interested in sys_nanosleep and hrtimer_interrupt:
+
+ # echo sys_nanosleep hrtimer_interrupt \
+               > /debug/tracing/set_ftrace_filter
+ # echo ftrace > /debug/tracing/current_tracer
+ # echo 1 > /debug/tracing/tracing_enabled
+ # usleep 1
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/trace
+# tracer: ftrace
+#
+#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
+#              | |      |          |         |
+          usleep-4134  [00]  1317.070017: hrtimer_interrupt <-smp_apic_timer_interrupt
+          usleep-4134  [00]  1317.070111: sys_nanosleep <-syscall_call
+          <idle>-0     [00]  1317.070115: hrtimer_interrupt <-smp_apic_timer_interrupt
+
+To see which functions are being traced, you can cat the file:
+
+ # cat /debug/tracing/set_ftrace_filter
+hrtimer_interrupt
+sys_nanosleep
+
+
+Perhaps this is not enough. The filters also allow simple wild
+cards. Only the following are currently available
+
+  <match>*  - will match functions that begin with <match>
+  *<match>  - will match functions that end with <match>
+  *<match>* - will match functions that have <match> in it
+
+These are the only wild cards which are supported.
+
+  <match>*<match> will not work.
+
+Note: It is better to use quotes to enclose the wild cards,
+      otherwise the shell may expand the parameters into names
+      of files in the local directory.
+
+ # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter
+
+Produces:
+
+# tracer: ftrace
+#
+#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
+#              | |      |          |         |
+            bash-4003  [00]  1480.611794: hrtimer_init <-copy_process
+            bash-4003  [00]  1480.611941: hrtimer_start <-hrtick_set
+            bash-4003  [00]  1480.611956: hrtimer_cancel <-hrtick_clear
+            bash-4003  [00]  1480.611956: hrtimer_try_to_cancel <-hrtimer_cancel
+          <idle>-0     [00]  1480.612019: hrtimer_get_next_event <-get_next_timer_interrupt
+          <idle>-0     [00]  1480.612025: hrtimer_get_next_event <-get_next_timer_interrupt
+          <idle>-0     [00]  1480.612032: hrtimer_get_next_event <-get_next_timer_interrupt
+          <idle>-0     [00]  1480.612037: hrtimer_get_next_event <-get_next_timer_interrupt
+          <idle>-0     [00]  1480.612382: hrtimer_get_next_event <-get_next_timer_interrupt
+
+
+Notice that we lost the sys_nanosleep.
+
+ # cat /debug/tracing/set_ftrace_filter
+hrtimer_run_queues
+hrtimer_run_pending
+hrtimer_init
+hrtimer_cancel
+hrtimer_try_to_cancel
+hrtimer_forward
+hrtimer_start
+hrtimer_reprogram
+hrtimer_force_reprogram
+hrtimer_get_next_event
+hrtimer_interrupt
+hrtimer_nanosleep
+hrtimer_wakeup
+hrtimer_get_remaining
+hrtimer_get_res
+hrtimer_init_sleeper
+
+
+This is because the '>' and '>>' act just like they do in bash.
+To rewrite the filters, use '>'
+To append to the filters, use '>>'
+
+To clear out a filter so that all functions will be recorded
+again:
+
+ # echo > /debug/tracing/set_ftrace_filter
+ # cat /debug/tracing/set_ftrace_filter
+ #
+
+Again, now we want to append.
+
+ # echo sys_nanosleep > /debug/tracing/set_ftrace_filter
+ # cat /debug/tracing/set_ftrace_filter
+sys_nanosleep
+ # echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter
+ # cat /debug/tracing/set_ftrace_filter
+hrtimer_run_queues
+hrtimer_run_pending
+hrtimer_init
+hrtimer_cancel
+hrtimer_try_to_cancel
+hrtimer_forward
+hrtimer_start
+hrtimer_reprogram
+hrtimer_force_reprogram
+hrtimer_get_next_event
+hrtimer_interrupt
+sys_nanosleep
+hrtimer_nanosleep
+hrtimer_wakeup
+hrtimer_get_remaining
+hrtimer_get_res
+hrtimer_init_sleeper
+
+
+The set_ftrace_notrace prevents those functions from being
+traced.
+
+ # echo '*preempt*' '*lock*' > /debug/tracing/set_ftrace_notrace
+
+Produces:
+
+# tracer: ftrace
+#
+#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
+#              | |      |          |         |
+            bash-4043  [01]   115.281644: finish_task_switch <-schedule
+            bash-4043  [01]   115.281645: hrtick_set <-schedule
+            bash-4043  [01]   115.281645: hrtick_clear <-hrtick_set
+            bash-4043  [01]   115.281646: wait_for_completion <-__stop_machine_run
+            bash-4043  [01]   115.281647: wait_for_common <-wait_for_completion
+            bash-4043  [01]   115.281647: kthread_stop <-stop_machine_run
+            bash-4043  [01]   115.281648: init_waitqueue_head <-kthread_stop
+            bash-4043  [01]   115.281648: wake_up_process <-kthread_stop
+            bash-4043  [01]   115.281649: try_to_wake_up <-wake_up_process
+
+We can see that there's no more lock or preempt tracing.
+
+
+Dynamic ftrace with the function graph tracer
+---------------------------------------------
+
+Although what has been explained above concerns both the
+function tracer and the function-graph-tracer, there are some
+special features only available in the function-graph tracer.
+
+If you want to trace only one function and all of its children,
+you just have to echo its name into set_graph_function:
+
+ echo __do_fault > set_graph_function
+
+will produce the following "expanded" trace of the __do_fault()
+function:
+
+ 0)               |  __do_fault() {
+ 0)               |    filemap_fault() {
+ 0)               |      find_lock_page() {
+ 0)   0.804 us    |        find_get_page();
+ 0)               |        __might_sleep() {
+ 0)   1.329 us    |        }
+ 0)   3.904 us    |      }
+ 0)   4.979 us    |    }
+ 0)   0.653 us    |    _spin_lock();
+ 0)   0.578 us    |    page_add_file_rmap();
+ 0)   0.525 us    |    native_set_pte_at();
+ 0)   0.585 us    |    _spin_unlock();
+ 0)               |    unlock_page() {
+ 0)   0.541 us    |      page_waitqueue();
+ 0)   0.639 us    |      __wake_up_bit();
+ 0)   2.786 us    |    }
+ 0) + 14.237 us   |  }
+ 0)               |  __do_fault() {
+ 0)               |    filemap_fault() {
+ 0)               |      find_lock_page() {
+ 0)   0.698 us    |        find_get_page();
+ 0)               |        __might_sleep() {
+ 0)   1.412 us    |        }
+ 0)   3.950 us    |      }
+ 0)   5.098 us    |    }
+ 0)   0.631 us    |    _spin_lock();
+ 0)   0.571 us    |    page_add_file_rmap();
+ 0)   0.526 us    |    native_set_pte_at();
+ 0)   0.586 us    |    _spin_unlock();
+ 0)               |    unlock_page() {
+ 0)   0.533 us    |      page_waitqueue();
+ 0)   0.638 us    |      __wake_up_bit();
+ 0)   2.793 us    |    }
+ 0) + 14.012 us   |  }
+
+You can also expand several functions at once:
+
+ echo sys_open > set_graph_function
+ echo sys_close >> set_graph_function
+
+Now if you want to go back to trace all functions you can clear
+this special filter via:
+
+ echo > set_graph_function
+
+
+trace_pipe
+----------
+
+The trace_pipe outputs the same content as the trace file, but
+the effect on the tracing is different. Every read from
+trace_pipe is consumed. This means that subsequent reads will be
+different. The trace is live.
+
+ # echo function > /debug/tracing/current_tracer
+ # cat /debug/tracing/trace_pipe > /tmp/trace.out &
+[1] 4153
+ # echo 1 > /debug/tracing/tracing_enabled
+ # usleep 1
+ # echo 0 > /debug/tracing/tracing_enabled
+ # cat /debug/tracing/trace
+# tracer: function
+#
+#           TASK-PID   CPU#    TIMESTAMP  FUNCTION
+#              | |      |          |         |
+
+ #
+ # cat /tmp/trace.out
+            bash-4043  [00] 41.267106: finish_task_switch <-schedule
+            bash-4043  [00] 41.267106: hrtick_set <-schedule
+            bash-4043  [00] 41.267107: hrtick_clear <-hrtick_set
+            bash-4043  [00] 41.267108: wait_for_completion <-__stop_machine_run
+            bash-4043  [00] 41.267108: wait_for_common <-wait_for_completion
+            bash-4043  [00] 41.267109: kthread_stop <-stop_machine_run
+            bash-4043  [00] 41.267109: init_waitqueue_head <-kthread_stop
+            bash-4043  [00] 41.267110: wake_up_process <-kthread_stop
+            bash-4043  [00] 41.267110: try_to_wake_up <-wake_up_process
+            bash-4043  [00] 41.267111: select_task_rq_rt <-try_to_wake_up
+
+
+Note, reading the trace_pipe file will block until more input is
+added. By changing the tracer, trace_pipe will issue an EOF. We
+needed to set the function tracer _before_ we "cat" the
+trace_pipe file.
+
+
+trace entries
+-------------
+
+Having too much or not enough data can be troublesome in
+diagnosing an issue in the kernel. The file buffer_size_kb is
+used to modify the size of the internal trace buffers. The
+number listed is the number of entries that can be recorded per
+CPU. To know the full size, multiply the number of possible CPUS
+with the number of entries.
+
+ # cat /debug/tracing/buffer_size_kb
+1408 (units kilobytes)
+
+Note, to modify this, you must have tracing completely disabled.
+To do that, echo "nop" into the current_tracer. If the
+current_tracer is not set to "nop", an EINVAL error will be
+returned.
+
+ # echo nop > /debug/tracing/current_tracer
+ # echo 10000 > /debug/tracing/buffer_size_kb
+ # cat /debug/tracing/buffer_size_kb
+10000 (units kilobytes)
+
+The number of pages which will be allocated is limited to a
+percentage of available memory. Allocating too much will produce
+an error.
+
+ # echo 1000000000000 > /debug/tracing/buffer_size_kb
+-bash: echo: write error: Cannot allocate memory
+ # cat /debug/tracing/buffer_size_kb
+85
+
+-----------
+
+More details can be found in the source code, in the
+kernel/tracing/*.c files.
diff --git a/Documentation/trace/kmemtrace.txt b/Documentation/trace/kmemtrace.txt
new file mode 100644 (file)
index 0000000..a956d9b
--- /dev/null
@@ -0,0 +1,126 @@
+                       kmemtrace - Kernel Memory Tracer
+
+                         by Eduard - Gabriel Munteanu
+                            <eduard.munteanu@linux360.ro>
+
+I. Introduction
+===============
+
+kmemtrace helps kernel developers figure out two things:
+1) how different allocators (SLAB, SLUB etc.) perform
+2) how kernel code allocates memory and how much
+
+To do this, we trace every allocation and export information to the userspace
+through the relay interface. We export things such as the number of requested
+bytes, the number of bytes actually allocated (i.e. including internal
+fragmentation), whether this is a slab allocation or a plain kmalloc() and so
+on.
+
+The actual analysis is performed by a userspace tool (see section III for
+details on where to get it from). It logs the data exported by the kernel,
+processes it and (as of writing this) can provide the following information:
+- the total amount of memory allocated and fragmentation per call-site
+- the amount of memory allocated and fragmentation per allocation
+- total memory allocated and fragmentation in the collected dataset
+- number of cross-CPU allocation and frees (makes sense in NUMA environments)
+
+Moreover, it can potentially find inconsistent and erroneous behavior in
+kernel code, such as using slab free functions on kmalloc'ed memory or
+allocating less memory than requested (but not truly failed allocations).
+
+kmemtrace also makes provisions for tracing on some arch and analysing the
+data on another.
+
+II. Design and goals
+====================
+
+kmemtrace was designed to handle rather large amounts of data. Thus, it uses
+the relay interface to export whatever is logged to userspace, which then
+stores it. Analysis and reporting is done asynchronously, that is, after the
+data is collected and stored. By design, it allows one to log and analyse
+on different machines and different arches.
+
+As of writing this, the ABI is not considered stable, though it might not
+change much. However, no guarantees are made about compatibility yet. When
+deemed stable, the ABI should still allow easy extension while maintaining
+backward compatibility. This is described further in Documentation/ABI.
+
+Summary of design goals:
+       - allow logging and analysis to be done across different machines
+       - be fast and anticipate usage in high-load environments (*)
+       - be reasonably extensible
+       - make it possible for GNU/Linux distributions to have kmemtrace
+       included in their repositories
+
+(*) - one of the reasons Pekka Enberg's original userspace data analysis
+    tool's code was rewritten from Perl to C (although this is more than a
+    simple conversion)
+
+
+III. Quick usage guide
+======================
+
+1) Get a kernel that supports kmemtrace and build it accordingly (i.e. enable
+CONFIG_KMEMTRACE).
+
+2) Get the userspace tool and build it:
+$ git-clone git://repo.or.cz/kmemtrace-user.git                # current repository
+$ cd kmemtrace-user/
+$ ./autogen.sh
+$ ./configure
+$ make
+
+3) Boot the kmemtrace-enabled kernel if you haven't, preferably in the
+'single' runlevel (so that relay buffers don't fill up easily), and run
+kmemtrace:
+# '$' does not mean user, but root here.
+$ mount -t debugfs none /sys/kernel/debug
+$ mount -t proc none /proc
+$ cd path/to/kmemtrace-user/
+$ ./kmemtraced
+Wait a bit, then stop it with CTRL+C.
+$ cat /sys/kernel/debug/kmemtrace/total_overruns       # Check if we didn't
+                                                       # overrun, should
+                                                       # be zero.
+$ (Optionally) [Run kmemtrace_check separately on each cpu[0-9]*.out file to
+               check its correctness]
+$ ./kmemtrace-report
+
+Now you should have a nice and short summary of how the allocator performs.
+
+IV. FAQ and known issues
+========================
+
+Q: 'cat /sys/kernel/debug/kmemtrace/total_overruns' is non-zero, how do I fix
+this? Should I worry?
+A: If it's non-zero, this affects kmemtrace's accuracy, depending on how
+large the number is. You can fix it by supplying a higher
+'kmemtrace.subbufs=N' kernel parameter.
+---
+
+Q: kmemtrace_check reports errors, how do I fix this? Should I worry?
+A: This is a bug and should be reported. It can occur for a variety of
+reasons:
+       - possible bugs in relay code
+       - possible misuse of relay by kmemtrace
+       - timestamps being collected unorderly
+Or you may fix it yourself and send us a patch.
+---
+
+Q: kmemtrace_report shows many errors, how do I fix this? Should I worry?
+A: This is a known issue and I'm working on it. These might be true errors
+in kernel code, which may have inconsistent behavior (e.g. allocating memory
+with kmem_cache_alloc() and freeing it with kfree()). Pekka Enberg pointed
+out this behavior may work with SLAB, but may fail with other allocators.
+
+It may also be due to lack of tracing in some unusual allocator functions.
+
+We don't want bug reports regarding this issue yet.
+---
+
+V. See also
+===========
+
+Documentation/kernel-parameters.txt
+Documentation/ABI/testing/debugfs-kmemtrace
+
diff --git a/Documentation/trace/mmiotrace.txt b/Documentation/trace/mmiotrace.txt
new file mode 100644 (file)
index 0000000..5731c67
--- /dev/null
@@ -0,0 +1,163 @@
+               In-kernel memory-mapped I/O tracing
+
+
+Home page and links to optional user space tools:
+
+       http://nouveau.freedesktop.org/wiki/MmioTrace
+
+MMIO tracing was originally developed by Intel around 2003 for their Fault
+Injection Test Harness. In Dec 2006 - Jan 2007, using the code from Intel,
+Jeff Muizelaar created a tool for tracing MMIO accesses with the Nouveau
+project in mind. Since then many people have contributed.
+
+Mmiotrace was built for reverse engineering any memory-mapped IO device with
+the Nouveau project as the first real user. Only x86 and x86_64 architectures
+are supported.
+
+Out-of-tree mmiotrace was originally modified for mainline inclusion and
+ftrace framework by Pekka Paalanen <pq@iki.fi>.
+
+
+Preparation
+-----------
+
+Mmiotrace feature is compiled in by the CONFIG_MMIOTRACE option. Tracing is
+disabled by default, so it is safe to have this set to yes. SMP systems are
+supported, but tracing is unreliable and may miss events if more than one CPU
+is on-line, therefore mmiotrace takes all but one CPU off-line during run-time
+activation. You can re-enable CPUs by hand, but you have been warned, there
+is no way to automatically detect if you are losing events due to CPUs racing.
+
+
+Usage Quick Reference
+---------------------
+
+$ mount -t debugfs debugfs /debug
+$ echo mmiotrace > /debug/tracing/current_tracer
+$ cat /debug/tracing/trace_pipe > mydump.txt &
+Start X or whatever.
+$ echo "X is up" > /debug/tracing/trace_marker
+$ echo nop > /debug/tracing/current_tracer
+Check for lost events.
+
+
+Usage
+-----
+
+Make sure debugfs is mounted to /debug. If not, (requires root privileges)
+$ mount -t debugfs debugfs /debug
+
+Check that the driver you are about to trace is not loaded.
+
+Activate mmiotrace (requires root privileges):
+$ echo mmiotrace > /debug/tracing/current_tracer
+
+Start storing the trace:
+$ cat /debug/tracing/trace_pipe > mydump.txt &
+The 'cat' process should stay running (sleeping) in the background.
+
+Load the driver you want to trace and use it. Mmiotrace will only catch MMIO
+accesses to areas that are ioremapped while mmiotrace is active.
+
+During tracing you can place comments (markers) into the trace by
+$ echo "X is up" > /debug/tracing/trace_marker
+This makes it easier to see which part of the (huge) trace corresponds to
+which action. It is recommended to place descriptive markers about what you
+do.
+
+Shut down mmiotrace (requires root privileges):
+$ echo nop > /debug/tracing/current_tracer
+The 'cat' process exits. If it does not, kill it by issuing 'fg' command and
+pressing ctrl+c.
+
+Check that mmiotrace did not lose events due to a buffer filling up. Either
+$ grep -i lost mydump.txt
+which tells you exactly how many events were lost, or use
+$ dmesg
+to view your kernel log and look for "mmiotrace has lost events" warning. If
+events were lost, the trace is incomplete. You should enlarge the buffers and
+try again. Buffers are enlarged by first seeing how large the current buffers
+are:
+$ cat /debug/tracing/buffer_size_kb
+gives you a number. Approximately double this number and write it back, for
+instance:
+$ echo 128000 > /debug/tracing/buffer_size_kb
+Then start again from the top.
+
+If you are doing a trace for a driver project, e.g. Nouveau, you should also
+do the following before sending your results:
+$ lspci -vvv > lspci.txt
+$ dmesg > dmesg.txt
+$ tar zcf pciid-nick-mmiotrace.tar.gz mydump.txt lspci.txt dmesg.txt
+and then send the .tar.gz file. The trace compresses considerably. Replace
+"pciid" and "nick" with the PCI ID or model name of your piece of hardware
+under investigation and your nick name.
+
+
+How Mmiotrace Works
+-------------------
+
+Access to hardware IO-memory is gained by mapping addresses from PCI bus by
+calling one of the ioremap_*() functions. Mmiotrace is hooked into the
+__ioremap() function and gets called whenever a mapping is created. Mapping is
+an event that is recorded into the trace log. Note, that ISA range mappings
+are not caught, since the mapping always exists and is returned directly.
+
+MMIO accesses are recorded via page faults. Just before __ioremap() returns,
+the mapped pages are marked as not present. Any access to the pages causes a
+fault. The page fault handler calls mmiotrace to handle the fault. Mmiotrace
+marks the page present, sets TF flag to achieve single stepping and exits the
+fault handler. The instruction that faulted is executed and debug trap is
+entered. Here mmiotrace again marks the page as not present. The instruction
+is decoded to get the type of operation (read/write), data width and the value
+read or written. These are stored to the trace log.
+
+Setting the page present in the page fault handler has a race condition on SMP
+machines. During the single stepping other CPUs may run freely on that page
+and events can be missed without a notice. Re-enabling other CPUs during
+tracing is discouraged.
+
+
+Trace Log Format
+----------------
+
+The raw log is text and easily filtered with e.g. grep and awk. One record is
+one line in the log. A record starts with a keyword, followed by keyword
+dependant arguments. Arguments are separated by a space, or continue until the
+end of line. The format for version 20070824 is as follows:
+
+Explanation    Keyword Space separated arguments
+---------------------------------------------------------------------------
+
+read event     R       width, timestamp, map id, physical, value, PC, PID
+write event    W       width, timestamp, map id, physical, value, PC, PID
+ioremap event  MAP     timestamp, map id, physical, virtual, length, PC, PID
+iounmap event  UNMAP   timestamp, map id, PC, PID
+marker         MARK    timestamp, text
+version                VERSION the string "20070824"
+info for reader        LSPCI   one line from lspci -v
+PCI address map        PCIDEV  space separated /proc/bus/pci/devices data
+unk. opcode    UNKNOWN timestamp, map id, physical, data, PC, PID
+
+Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual
+is a kernel virtual address. Width is the data width in bytes and value is the
+data value. Map id is an arbitrary id number identifying the mapping that was
+used in an operation. PC is the program counter and PID is process id. PC is
+zero if it is not recorded. PID is always zero as tracing MMIO accesses
+originating in user space memory is not yet supported.
+
+For instance, the following awk filter will pass all 32-bit writes that target
+physical addresses in the range [0xfb73ce40, 0xfb800000[
+
+$ awk '/W 4 / { adr=strtonum($5); if (adr >= 0xfb73ce40 &&
+adr < 0xfb800000) print; }'
+
+
+Tools for Developers
+--------------------
+
+The user space tools include utilities for:
+- replacing numeric addresses and values with hardware register names
+- replaying MMIO logs, i.e., re-executing the recorded writes
+
+
diff --git a/Documentation/trace/tracepoints.txt b/Documentation/trace/tracepoints.txt
new file mode 100644 (file)
index 0000000..c0e1cee
--- /dev/null
@@ -0,0 +1,116 @@
+                    Using the Linux Kernel Tracepoints
+
+                           Mathieu Desnoyers
+
+
+This document introduces Linux Kernel Tracepoints and their use. It
+provides examples of how to insert tracepoints in the kernel and
+connect probe functions to them and provides some examples of probe
+functions.
+
+
+* Purpose of tracepoints
+
+A tracepoint placed in code provides a hook to call a function (probe)
+that you can provide at runtime. A tracepoint can be "on" (a probe is
+connected to it) or "off" (no probe is attached). When a tracepoint is
+"off" it has no effect, except for adding a tiny time penalty
+(checking a condition for a branch) and space penalty (adding a few
+bytes for the function call at the end of the instrumented function
+and adds a data structure in a separate section).  When a tracepoint
+is "on", the function you provide is called each time the tracepoint
+is executed, in the execution context of the caller. When the function
+provided ends its execution, it returns to the caller (continuing from
+the tracepoint site).
+
+You can put tracepoints at important locations in the code. They are
+lightweight hooks that can pass an arbitrary number of parameters,
+which prototypes are described in a tracepoint declaration placed in a
+header file.
+
+They can be used for tracing and performance accounting.
+
+
+* Usage
+
+Two elements are required for tracepoints :
+
+- A tracepoint definition, placed in a header file.
+- The tracepoint statement, in C code.
+
+In order to use tracepoints, you should include linux/tracepoint.h.
+
+In include/trace/subsys.h :
+
+#include <linux/tracepoint.h>
+
+DECLARE_TRACE(subsys_eventname,
+       TP_PROTO(int firstarg, struct task_struct *p),
+       TP_ARGS(firstarg, p));
+
+In subsys/file.c (where the tracing statement must be added) :
+
+#include <trace/subsys.h>
+
+DEFINE_TRACE(subsys_eventname);
+
+void somefct(void)
+{
+       ...
+       trace_subsys_eventname(arg, task);
+       ...
+}
+
+Where :
+- subsys_eventname is an identifier unique to your event
+    - subsys is the name of your subsystem.
+    - eventname is the name of the event to trace.
+
+- TP_PROTO(int firstarg, struct task_struct *p) is the prototype of the
+  function called by this tracepoint.
+
+- TP_ARGS(firstarg, p) are the parameters names, same as found in the
+  prototype.
+
+Connecting a function (probe) to a tracepoint is done by providing a
+probe (function to call) for the specific tracepoint through
+register_trace_subsys_eventname().  Removing a probe is done through
+unregister_trace_subsys_eventname(); it will remove the probe.
+
+tracepoint_synchronize_unregister() must be called before the end of
+the module exit function to make sure there is no caller left using
+the probe. This, and the fact that preemption is disabled around the
+probe call, make sure that probe removal and module unload are safe.
+See the "Probe example" section below for a sample probe module.
+
+The tracepoint mechanism supports inserting multiple instances of the
+same tracepoint, but a single definition must be made of a given
+tracepoint name over all the kernel to make sure no type conflict will
+occur. Name mangling of the tracepoints is done using the prototypes
+to make sure typing is correct. Verification of probe type correctness
+is done at the registration site by the compiler. Tracepoints can be
+put in inline functions, inlined static functions, and unrolled loops
+as well as regular functions.
+
+The naming scheme "subsys_event" is suggested here as a convention
+intended to limit collisions. Tracepoint names are global to the
+kernel: they are considered as being the same whether they are in the
+core kernel image or in modules.
+
+If the tracepoint has to be used in kernel modules, an
+EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be
+used to export the defined tracepoints.
+
+* Probe / tracepoint example
+
+See the example provided in samples/tracepoints
+
+Compile them with your kernel.  They are built during 'make' (not
+'make modules') when CONFIG_SAMPLE_TRACEPOINTS=m.
+
+Run, as root :
+modprobe tracepoint-sample (insmod order is not important)
+modprobe tracepoint-probe-sample
+cat /proc/tracepoint-sample (returns an expected error)
+rmmod tracepoint-sample tracepoint-probe-sample
+dmesg
diff --git a/Documentation/tracepoints.txt b/Documentation/tracepoints.txt
deleted file mode 100644 (file)
index c0e1cee..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-                    Using the Linux Kernel Tracepoints
-
-                           Mathieu Desnoyers
-
-
-This document introduces Linux Kernel Tracepoints and their use. It
-provides examples of how to insert tracepoints in the kernel and
-connect probe functions to them and provides some examples of probe
-functions.
-
-
-* Purpose of tracepoints
-
-A tracepoint placed in code provides a hook to call a function (probe)
-that you can provide at runtime. A tracepoint can be "on" (a probe is
-connected to it) or "off" (no probe is attached). When a tracepoint is
-"off" it has no effect, except for adding a tiny time penalty
-(checking a condition for a branch) and space penalty (adding a few
-bytes for the function call at the end of the instrumented function
-and adds a data structure in a separate section).  When a tracepoint
-is "on", the function you provide is called each time the tracepoint
-is executed, in the execution context of the caller. When the function
-provided ends its execution, it returns to the caller (continuing from
-the tracepoint site).
-
-You can put tracepoints at important locations in the code. They are
-lightweight hooks that can pass an arbitrary number of parameters,
-which prototypes are described in a tracepoint declaration placed in a
-header file.
-
-They can be used for tracing and performance accounting.
-
-
-* Usage
-
-Two elements are required for tracepoints :
-
-- A tracepoint definition, placed in a header file.
-- The tracepoint statement, in C code.
-
-In order to use tracepoints, you should include linux/tracepoint.h.
-
-In include/trace/subsys.h :
-
-#include <linux/tracepoint.h>
-
-DECLARE_TRACE(subsys_eventname,
-       TP_PROTO(int firstarg, struct task_struct *p),
-       TP_ARGS(firstarg, p));
-
-In subsys/file.c (where the tracing statement must be added) :
-
-#include <trace/subsys.h>
-
-DEFINE_TRACE(subsys_eventname);
-
-void somefct(void)
-{
-       ...
-       trace_subsys_eventname(arg, task);
-       ...
-}
-
-Where :
-- subsys_eventname is an identifier unique to your event
-    - subsys is the name of your subsystem.
-    - eventname is the name of the event to trace.
-
-- TP_PROTO(int firstarg, struct task_struct *p) is the prototype of the
-  function called by this tracepoint.
-
-- TP_ARGS(firstarg, p) are the parameters names, same as found in the
-  prototype.
-
-Connecting a function (probe) to a tracepoint is done by providing a
-probe (function to call) for the specific tracepoint through
-register_trace_subsys_eventname().  Removing a probe is done through
-unregister_trace_subsys_eventname(); it will remove the probe.
-
-tracepoint_synchronize_unregister() must be called before the end of
-the module exit function to make sure there is no caller left using
-the probe. This, and the fact that preemption is disabled around the
-probe call, make sure that probe removal and module unload are safe.
-See the "Probe example" section below for a sample probe module.
-
-The tracepoint mechanism supports inserting multiple instances of the
-same tracepoint, but a single definition must be made of a given
-tracepoint name over all the kernel to make sure no type conflict will
-occur. Name mangling of the tracepoints is done using the prototypes
-to make sure typing is correct. Verification of probe type correctness
-is done at the registration site by the compiler. Tracepoints can be
-put in inline functions, inlined static functions, and unrolled loops
-as well as regular functions.
-
-The naming scheme "subsys_event" is suggested here as a convention
-intended to limit collisions. Tracepoint names are global to the
-kernel: they are considered as being the same whether they are in the
-core kernel image or in modules.
-
-If the tracepoint has to be used in kernel modules, an
-EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be
-used to export the defined tracepoints.
-
-* Probe / tracepoint example
-
-See the example provided in samples/tracepoints
-
-Compile them with your kernel.  They are built during 'make' (not
-'make modules') when CONFIG_SAMPLE_TRACEPOINTS=m.
-
-Run, as root :
-modprobe tracepoint-sample (insmod order is not important)
-modprobe tracepoint-probe-sample
-cat /proc/tracepoint-sample (returns an expected error)
-rmmod tracepoint-sample tracepoint-probe-sample
-dmesg
diff --git a/Documentation/tracers/mmiotrace.txt b/Documentation/tracers/mmiotrace.txt
deleted file mode 100644 (file)
index 5731c67..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-               In-kernel memory-mapped I/O tracing
-
-
-Home page and links to optional user space tools:
-
-       http://nouveau.freedesktop.org/wiki/MmioTrace
-
-MMIO tracing was originally developed by Intel around 2003 for their Fault
-Injection Test Harness. In Dec 2006 - Jan 2007, using the code from Intel,
-Jeff Muizelaar created a tool for tracing MMIO accesses with the Nouveau
-project in mind. Since then many people have contributed.
-
-Mmiotrace was built for reverse engineering any memory-mapped IO device with
-the Nouveau project as the first real user. Only x86 and x86_64 architectures
-are supported.
-
-Out-of-tree mmiotrace was originally modified for mainline inclusion and
-ftrace framework by Pekka Paalanen <pq@iki.fi>.
-
-
-Preparation
------------
-
-Mmiotrace feature is compiled in by the CONFIG_MMIOTRACE option. Tracing is
-disabled by default, so it is safe to have this set to yes. SMP systems are
-supported, but tracing is unreliable and may miss events if more than one CPU
-is on-line, therefore mmiotrace takes all but one CPU off-line during run-time
-activation. You can re-enable CPUs by hand, but you have been warned, there
-is no way to automatically detect if you are losing events due to CPUs racing.
-
-
-Usage Quick Reference
----------------------
-
-$ mount -t debugfs debugfs /debug
-$ echo mmiotrace > /debug/tracing/current_tracer
-$ cat /debug/tracing/trace_pipe > mydump.txt &
-Start X or whatever.
-$ echo "X is up" > /debug/tracing/trace_marker
-$ echo nop > /debug/tracing/current_tracer
-Check for lost events.
-
-
-Usage
------
-
-Make sure debugfs is mounted to /debug. If not, (requires root privileges)
-$ mount -t debugfs debugfs /debug
-
-Check that the driver you are about to trace is not loaded.
-
-Activate mmiotrace (requires root privileges):
-$ echo mmiotrace > /debug/tracing/current_tracer
-
-Start storing the trace:
-$ cat /debug/tracing/trace_pipe > mydump.txt &
-The 'cat' process should stay running (sleeping) in the background.
-
-Load the driver you want to trace and use it. Mmiotrace will only catch MMIO
-accesses to areas that are ioremapped while mmiotrace is active.
-
-During tracing you can place comments (markers) into the trace by
-$ echo "X is up" > /debug/tracing/trace_marker
-This makes it easier to see which part of the (huge) trace corresponds to
-which action. It is recommended to place descriptive markers about what you
-do.
-
-Shut down mmiotrace (requires root privileges):
-$ echo nop > /debug/tracing/current_tracer
-The 'cat' process exits. If it does not, kill it by issuing 'fg' command and
-pressing ctrl+c.
-
-Check that mmiotrace did not lose events due to a buffer filling up. Either
-$ grep -i lost mydump.txt
-which tells you exactly how many events were lost, or use
-$ dmesg
-to view your kernel log and look for "mmiotrace has lost events" warning. If
-events were lost, the trace is incomplete. You should enlarge the buffers and
-try again. Buffers are enlarged by first seeing how large the current buffers
-are:
-$ cat /debug/tracing/buffer_size_kb
-gives you a number. Approximately double this number and write it back, for
-instance:
-$ echo 128000 > /debug/tracing/buffer_size_kb
-Then start again from the top.
-
-If you are doing a trace for a driver project, e.g. Nouveau, you should also
-do the following before sending your results:
-$ lspci -vvv > lspci.txt
-$ dmesg > dmesg.txt
-$ tar zcf pciid-nick-mmiotrace.tar.gz mydump.txt lspci.txt dmesg.txt
-and then send the .tar.gz file. The trace compresses considerably. Replace
-"pciid" and "nick" with the PCI ID or model name of your piece of hardware
-under investigation and your nick name.
-
-
-How Mmiotrace Works
--------------------
-
-Access to hardware IO-memory is gained by mapping addresses from PCI bus by
-calling one of the ioremap_*() functions. Mmiotrace is hooked into the
-__ioremap() function and gets called whenever a mapping is created. Mapping is
-an event that is recorded into the trace log. Note, that ISA range mappings
-are not caught, since the mapping always exists and is returned directly.
-
-MMIO accesses are recorded via page faults. Just before __ioremap() returns,
-the mapped pages are marked as not present. Any access to the pages causes a
-fault. The page fault handler calls mmiotrace to handle the fault. Mmiotrace
-marks the page present, sets TF flag to achieve single stepping and exits the
-fault handler. The instruction that faulted is executed and debug trap is
-entered. Here mmiotrace again marks the page as not present. The instruction
-is decoded to get the type of operation (read/write), data width and the value
-read or written. These are stored to the trace log.
-
-Setting the page present in the page fault handler has a race condition on SMP
-machines. During the single stepping other CPUs may run freely on that page
-and events can be missed without a notice. Re-enabling other CPUs during
-tracing is discouraged.
-
-
-Trace Log Format
-----------------
-
-The raw log is text and easily filtered with e.g. grep and awk. One record is
-one line in the log. A record starts with a keyword, followed by keyword
-dependant arguments. Arguments are separated by a space, or continue until the
-end of line. The format for version 20070824 is as follows:
-
-Explanation    Keyword Space separated arguments
----------------------------------------------------------------------------
-
-read event     R       width, timestamp, map id, physical, value, PC, PID
-write event    W       width, timestamp, map id, physical, value, PC, PID
-ioremap event  MAP     timestamp, map id, physical, virtual, length, PC, PID
-iounmap event  UNMAP   timestamp, map id, PC, PID
-marker         MARK    timestamp, text
-version                VERSION the string "20070824"
-info for reader        LSPCI   one line from lspci -v
-PCI address map        PCIDEV  space separated /proc/bus/pci/devices data
-unk. opcode    UNKNOWN timestamp, map id, physical, data, PC, PID
-
-Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual
-is a kernel virtual address. Width is the data width in bytes and value is the
-data value. Map id is an arbitrary id number identifying the mapping that was
-used in an operation. PC is the program counter and PID is process id. PC is
-zero if it is not recorded. PID is always zero as tracing MMIO accesses
-originating in user space memory is not yet supported.
-
-For instance, the following awk filter will pass all 32-bit writes that target
-physical addresses in the range [0xfb73ce40, 0xfb800000[
-
-$ awk '/W 4 / { adr=strtonum($5); if (adr >= 0xfb73ce40 &&
-adr < 0xfb800000) print; }'
-
-
-Tools for Developers
---------------------
-
-The user space tools include utilities for:
-- replacing numeric addresses and values with hardware register names
-- replaying MMIO logs, i.e., re-executing the recorded writes
-
-
diff --git a/Documentation/video4linux/pxa_camera.txt b/Documentation/video4linux/pxa_camera.txt
new file mode 100644 (file)
index 0000000..b1137f9
--- /dev/null
@@ -0,0 +1,125 @@
+                              PXA-Camera Host Driver
+                              ======================
+
+Constraints
+-----------
+  a) Image size for YUV422P format
+     All YUV422P images are enforced to have width x height % 16 = 0.
+     This is due to DMA constraints, which transfers only planes of 8 byte
+     multiples.
+
+
+Global video workflow
+---------------------
+  a) QCI stopped
+     Initialy, the QCI interface is stopped.
+     When a buffer is queued (pxa_videobuf_ops->buf_queue), the QCI starts.
+
+  b) QCI started
+     More buffers can be queued while the QCI is started without halting the
+     capture.  The new buffers are "appended" at the tail of the DMA chain, and
+     smoothly captured one frame after the other.
+
+     Once a buffer is filled in the QCI interface, it is marked as "DONE" and
+     removed from the active buffers list. It can be then requeud or dequeued by
+     userland application.
+
+     Once the last buffer is filled in, the QCI interface stops.
+
+
+DMA usage
+---------
+  a) DMA flow
+     - first buffer queued for capture
+       Once a first buffer is queued for capture, the QCI is started, but data
+       transfer is not started. On "End Of Frame" interrupt, the irq handler
+       starts the DMA chain.
+     - capture of one videobuffer
+       The DMA chain starts transfering data into videobuffer RAM pages.
+       When all pages are transfered, the DMA irq is raised on "ENDINTR" status
+     - finishing one videobuffer
+       The DMA irq handler marks the videobuffer as "done", and removes it from
+       the active running queue
+       Meanwhile, the next videobuffer (if there is one), is transfered by DMA
+     - finishing the last videobuffer
+       On the DMA irq of the last videobuffer, the QCI is stopped.
+
+  b) DMA prepared buffer will have this structure
+
+     +------------+-----+---------------+-----------------+
+     | desc-sg[0] | ... | desc-sg[last] | finisher/linker |
+     +------------+-----+---------------+-----------------+
+
+     This structure is pointed by dma->sg_cpu.
+     The descriptors are used as follows :
+      - desc-sg[i]: i-th descriptor, transfering the i-th sg
+        element to the video buffer scatter gather
+      - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN
+      - linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0
+
+     For the next schema, let's assume d0=desc-sg[0] .. dN=desc-sg[N],
+     "f" stands for finisher and "l" for linker.
+     A typical running chain is :
+
+         Videobuffer 1         Videobuffer 2
+     +---------+----+---+  +----+----+----+---+
+     | d0 | .. | dN | l |  | d0 | .. | dN | f |
+     +---------+----+-|-+  ^----+----+----+---+
+                      |    |
+                      +----+
+
+     After the chaining is finished, the chain looks like :
+
+         Videobuffer 1         Videobuffer 2         Videobuffer 3
+     +---------+----+---+  +----+----+----+---+  +----+----+----+---+
+     | d0 | .. | dN | l |  | d0 | .. | dN | l |  | d0 | .. | dN | f |
+     +---------+----+-|-+  ^----+----+----+-|-+  ^----+----+----+---+
+                      |    |                |    |
+                      +----+                +----+
+                                           new_link
+
+  c) DMA hot chaining timeslice issue
+
+     As DMA chaining is done while DMA _is_ running, the linking may be done
+     while the DMA jumps from one Videobuffer to another. On the schema, that
+     would be a problem if the following sequence is encountered :
+
+      - DMA chain is Videobuffer1 + Videobuffer2
+      - pxa_videobuf_queue() is called to queue Videobuffer3
+      - DMA controller finishes Videobuffer2, and DMA stops
+      =>
+         Videobuffer 1         Videobuffer 2
+     +---------+----+---+  +----+----+----+---+
+     | d0 | .. | dN | l |  | d0 | .. | dN | f |
+     +---------+----+-|-+  ^----+----+----+-^-+
+                      |    |                |
+                      +----+                +-- DMA DDADR loads DDADR_STOP
+
+      - pxa_dma_add_tail_buf() is called, the Videobuffer2 "finisher" is
+        replaced by a "linker" to Videobuffer3 (creation of new_link)
+      - pxa_videobuf_queue() finishes
+      - the DMA irq handler is called, which terminates Videobuffer2
+      - Videobuffer3 capture is not scheduled on DMA chain (as it stopped !!!)
+
+         Videobuffer 1         Videobuffer 2         Videobuffer 3
+     +---------+----+---+  +----+----+----+---+  +----+----+----+---+
+     | d0 | .. | dN | l |  | d0 | .. | dN | l |  | d0 | .. | dN | f |
+     +---------+----+-|-+  ^----+----+----+-|-+  ^----+----+----+---+
+                      |    |                |    |
+                      +----+                +----+
+                                           new_link
+                                          DMA DDADR still is DDADR_STOP
+
+      - pxa_camera_check_link_miss() is called
+        This checks if the DMA is finished and a buffer is still on the
+        pcdev->capture list. If that's the case, the capture will be restarted,
+        and Videobuffer3 is scheduled on DMA chain.
+      - the DMA irq handler finishes
+
+     Note: if DMA stops just after pxa_camera_check_link_miss() reads DDADR()
+     value, we have the guarantee that the DMA irq handler will be called back
+     when the DMA will finish the buffer, and pxa_camera_check_link_miss() will
+     be called again, to reschedule Videobuffer3.
+
+--
+Author: Robert Jarzmik <robert.jarzmik@free.fr>
index a311773..854808b 100644 (file)
@@ -90,7 +90,7 @@ up before calling v4l2_device_register then it will be untouched. If dev is
 NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register.
 
 The first 'dev' argument is normally the struct device pointer of a pci_dev,
-usb_device or platform_device. It is rare for dev to be NULL, but it happens
+usb_interface or platform_device. It is rare for dev to be NULL, but it happens
 with ISA devices or when one device creates multiple PCI devices, thus making
 it impossible to associate v4l2_dev with a particular parent.
 
@@ -351,17 +351,6 @@ And this to go from an i2c_client to a v4l2_subdev struct:
 
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
-Finally you need to make a command function to make driver->command()
-call the right subdev_ops functions:
-
-static int subdev_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
-If driver->command is never used then you can leave this out. Eventually the
-driver->command usage should be removed from v4l.
-
 Make sure to call v4l2_device_unregister_subdev(sd) when the remove() callback
 is called. This will unregister the sub-device from the bridge driver. It is
 safe to call this even if the sub-device was never registered.
@@ -375,14 +364,12 @@ from the remove() callback ensures that this is always done correctly.
 
 The bridge driver also has some helper functions it can use:
 
-struct v4l2_subdev *sd = v4l2_i2c_new_subdev(adapter, "module_foo", "chipid", 0x36);
+struct v4l2_subdev *sd = v4l2_i2c_new_subdev(v4l2_dev, adapter,
+              "module_foo", "chipid", 0x36);
 
 This loads the given module (can be NULL if no module needs to be loaded) and
 calls i2c_new_device() with the given i2c_adapter and chip/address arguments.
-If all goes well, then it registers the subdev with the v4l2_device. It gets
-the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure
-to call i2c_set_adapdata(adapter, v4l2_device) when you setup the i2c_adapter
-in your driver.
+If all goes well, then it registers the subdev with the v4l2_device.
 
 You can also use v4l2_i2c_new_probed_subdev() which is very similar to
 v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses
diff --git a/Documentation/vm/kmemtrace.txt b/Documentation/vm/kmemtrace.txt
deleted file mode 100644 (file)
index a956d9b..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-                       kmemtrace - Kernel Memory Tracer
-
-                         by Eduard - Gabriel Munteanu
-                            <eduard.munteanu@linux360.ro>
-
-I. Introduction
-===============
-
-kmemtrace helps kernel developers figure out two things:
-1) how different allocators (SLAB, SLUB etc.) perform
-2) how kernel code allocates memory and how much
-
-To do this, we trace every allocation and export information to the userspace
-through the relay interface. We export things such as the number of requested
-bytes, the number of bytes actually allocated (i.e. including internal
-fragmentation), whether this is a slab allocation or a plain kmalloc() and so
-on.
-
-The actual analysis is performed by a userspace tool (see section III for
-details on where to get it from). It logs the data exported by the kernel,
-processes it and (as of writing this) can provide the following information:
-- the total amount of memory allocated and fragmentation per call-site
-- the amount of memory allocated and fragmentation per allocation
-- total memory allocated and fragmentation in the collected dataset
-- number of cross-CPU allocation and frees (makes sense in NUMA environments)
-
-Moreover, it can potentially find inconsistent and erroneous behavior in
-kernel code, such as using slab free functions on kmalloc'ed memory or
-allocating less memory than requested (but not truly failed allocations).
-
-kmemtrace also makes provisions for tracing on some arch and analysing the
-data on another.
-
-II. Design and goals
-====================
-
-kmemtrace was designed to handle rather large amounts of data. Thus, it uses
-the relay interface to export whatever is logged to userspace, which then
-stores it. Analysis and reporting is done asynchronously, that is, after the
-data is collected and stored. By design, it allows one to log and analyse
-on different machines and different arches.
-
-As of writing this, the ABI is not considered stable, though it might not
-change much. However, no guarantees are made about compatibility yet. When
-deemed stable, the ABI should still allow easy extension while maintaining
-backward compatibility. This is described further in Documentation/ABI.
-
-Summary of design goals:
-       - allow logging and analysis to be done across different machines
-       - be fast and anticipate usage in high-load environments (*)
-       - be reasonably extensible
-       - make it possible for GNU/Linux distributions to have kmemtrace
-       included in their repositories
-
-(*) - one of the reasons Pekka Enberg's original userspace data analysis
-    tool's code was rewritten from Perl to C (although this is more than a
-    simple conversion)
-
-
-III. Quick usage guide
-======================
-
-1) Get a kernel that supports kmemtrace and build it accordingly (i.e. enable
-CONFIG_KMEMTRACE).
-
-2) Get the userspace tool and build it:
-$ git-clone git://repo.or.cz/kmemtrace-user.git                # current repository
-$ cd kmemtrace-user/
-$ ./autogen.sh
-$ ./configure
-$ make
-
-3) Boot the kmemtrace-enabled kernel if you haven't, preferably in the
-'single' runlevel (so that relay buffers don't fill up easily), and run
-kmemtrace:
-# '$' does not mean user, but root here.
-$ mount -t debugfs none /sys/kernel/debug
-$ mount -t proc none /proc
-$ cd path/to/kmemtrace-user/
-$ ./kmemtraced
-Wait a bit, then stop it with CTRL+C.
-$ cat /sys/kernel/debug/kmemtrace/total_overruns       # Check if we didn't
-                                                       # overrun, should
-                                                       # be zero.
-$ (Optionally) [Run kmemtrace_check separately on each cpu[0-9]*.out file to
-               check its correctness]
-$ ./kmemtrace-report
-
-Now you should have a nice and short summary of how the allocator performs.
-
-IV. FAQ and known issues
-========================
-
-Q: 'cat /sys/kernel/debug/kmemtrace/total_overruns' is non-zero, how do I fix
-this? Should I worry?
-A: If it's non-zero, this affects kmemtrace's accuracy, depending on how
-large the number is. You can fix it by supplying a higher
-'kmemtrace.subbufs=N' kernel parameter.
----
-
-Q: kmemtrace_check reports errors, how do I fix this? Should I worry?
-A: This is a bug and should be reported. It can occur for a variety of
-reasons:
-       - possible bugs in relay code
-       - possible misuse of relay by kmemtrace
-       - timestamps being collected unorderly
-Or you may fix it yourself and send us a patch.
----
-
-Q: kmemtrace_report shows many errors, how do I fix this? Should I worry?
-A: This is a known issue and I'm working on it. These might be true errors
-in kernel code, which may have inconsistent behavior (e.g. allocating memory
-with kmem_cache_alloc() and freeing it with kfree()). Pekka Enberg pointed
-out this behavior may work with SLAB, but may fail with other allocators.
-
-It may also be due to lack of tracing in some unusual allocator functions.
-
-We don't want bug reports regarding this issue yet.
----
-
-V. See also
-===========
-
-Documentation/kernel-parameters.txt
-Documentation/ABI/testing/debugfs-kmemtrace
-
index 9673cd2..5d84358 100644 (file)
@@ -636,7 +636,7 @@ P:  Dirk Opfer
 M:     dirk@opfer-online.de
 S:     Maintained
 
-ARM/PALMTX,PALMT5,PALMLD SUPPORT
+ARM/PALMTX,PALMT5,PALMLD,PALMTE2 SUPPORT
 P:     Marek Vasut
 M:     marek.vasut@gmail.com
 W:     http://hackndev.com
@@ -1544,7 +1544,6 @@ S:        Maintained
 DVB SUBSYSTEM AND DRIVERS
 P:     LinuxTV.org Project
 M:     linux-media@vger.kernel.org
-L:     linux-dvb@linuxtv.org (subscription required)
 W:     http://linuxtv.org/
 T:     git kernel.org:/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
 S:     Maintained
@@ -3058,7 +3057,7 @@ S:        Supported
 
 MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
 P:     Pierre Ossman
-M:     drzeus-mmc@drzeus.cx
+M:     pierre@ossman.eu
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
@@ -3245,6 +3244,13 @@ M:       andi@lisas.de
 L:     netdev@vger.kernel.org
 S:     Maintained
 
+NILFS2 FILESYSTEM
+P:     KONISHI Ryusuke
+M:     konishi.ryusuke@lab.ntt.co.jp
+L:     users@nilfs.org
+W:     http://www.nilfs.org/en/
+S:     Supported
+
 NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
 P:     YOKOTA Hiroshi
 M:     yokota@netlab.is.tsukuba.ac.jp
@@ -3867,8 +3873,8 @@ S:        Maintained
 SCHEDULER
 P:     Ingo Molnar
 M:     mingo@elte.hu
-P:     Robert Love    [the preemptible kernel bits]
-M:     rml@tech9.net
+P:     Peter Zijlstra
+M:     peterz@infradead.org
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
@@ -3933,7 +3939,7 @@ S:        Maintained
 
 SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER
 P:     Pierre Ossman
-M:     drzeus-sdhci@drzeus.cx
+M:     pierre@ossman.eu
 L:     sdhci-devel@lists.ossman.eu
 S:     Maintained
 
@@ -4920,7 +4926,7 @@ S:        Maintained
 
 W83L51xD SD/MMC CARD INTERFACE DRIVER
 P:     Pierre Ossman
-M:     drzeus-wbsd@drzeus.cx
+M:     pierre@ossman.eu
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
index c6307b6..e5ad5fd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
-SUBLEVEL = 29
-EXTRAVERSION =
+SUBLEVEL = 30
+EXTRAVERSION = -rc1
 NAME = Temporary Tasmanian Devil
 
 # *DOCUMENTATION*
index 82428c2..f56837f 100644 (file)
@@ -1183,7 +1183,11 @@ CONFIG_RTC_INTF_DEV=y
 CONFIG_RTC_DRV_SA1100=y
 # CONFIG_RTC_DRV_PXA is not set
 # CONFIG_DMADEVICES is not set
-# CONFIG_REGULATOR is not set
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_DEBUG is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+CONFIG_REGULATOR_BQ24022=y
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 
index c10d1aa..ada93a8 100644 (file)
@@ -32,6 +32,7 @@
 #define SZ_4K                           0x00001000
 #define SZ_8K                           0x00002000
 #define SZ_16K                          0x00004000
+#define SZ_32K                          0x00008000
 #define SZ_64K                          0x00010000
 #define SZ_128K                         0x00020000
 #define SZ_256K                         0x00040000
index 793fe7b..e6afff8 100644 (file)
@@ -87,7 +87,7 @@ extern void __init at91_add_device_eth(struct at91_eth_data *data);
  /* USB Host */
 struct at91_usbh_data {
        u8              ports;          /* number of ports on root hub */
-       u8              vbus_pin[];     /* port power-control pin */
+       u8              vbus_pin[2];    /* port power-control pin */
 };
 extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
 
index 38b6a9c..0b97a52 100644 (file)
@@ -118,7 +118,7 @@ static struct resource ide_resources[] = {
        },
 };
 
-static u64 ide_dma_mask = DMA_32BIT_MASK;
+static u64 ide_dma_mask = DMA_BIT_MASK(32);
 
 static struct platform_device ide_dev = {
        .name           = "palm_bk3710",
@@ -127,7 +127,7 @@ static struct platform_device ide_dev = {
        .num_resources  = ARRAY_SIZE(ide_resources),
        .dev = {
                .dma_mask               = &ide_dma_mask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
 };
 
diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h
new file mode 100644 (file)
index 0000000..aa48284
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * mach-davinci/nand.h
+ *
+ * Copyright Â© 2006 Texas Instruments.
+ *
+ * Ported to 2.6.23 Copyright Â© 2008 by
+ *   Sander Huijsen <Shuijsen@optelecom-nkf.com>
+ *   Troy Kisky <troy.kisky@boundarydevices.com>
+ *   Dirk Behme <Dirk.Behme@gmail.com>
+ *
+ * --------------------------------------------------------------------------
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ARCH_ARM_DAVINCI_NAND_H
+#define __ARCH_ARM_DAVINCI_NAND_H
+
+#include <linux/mtd/nand.h>
+
+#define NRCSR_OFFSET           0x00
+#define AWCCR_OFFSET           0x04
+#define A1CR_OFFSET            0x10
+#define NANDFCR_OFFSET         0x60
+#define NANDFSR_OFFSET         0x64
+#define NANDF1ECC_OFFSET       0x70
+
+/* 4-bit ECC syndrome registers */
+#define NAND_4BIT_ECC_LOAD_OFFSET      0xbc
+#define NAND_4BIT_ECC1_OFFSET          0xc0
+#define NAND_4BIT_ECC2_OFFSET          0xc4
+#define NAND_4BIT_ECC3_OFFSET          0xc8
+#define NAND_4BIT_ECC4_OFFSET          0xcc
+#define NAND_ERR_ADD1_OFFSET           0xd0
+#define NAND_ERR_ADD2_OFFSET           0xd4
+#define NAND_ERR_ERRVAL1_OFFSET                0xd8
+#define NAND_ERR_ERRVAL2_OFFSET                0xdc
+
+/* NOTE:  boards don't need to use these address bits
+ * for ALE/CLE unless they support booting from NAND.
+ * They're used unless platform data overrides them.
+ */
+#define        MASK_ALE                0x08
+#define        MASK_CLE                0x10
+
+struct davinci_nand_pdata {            /* platform_data */
+       uint32_t                mask_ale;
+       uint32_t                mask_cle;
+
+       /* for packages using two chipselects */
+       uint32_t                mask_chipsel;
+
+       /* board's default static partition info */
+       struct mtd_partition    *parts;
+       unsigned                nr_parts;
+
+       /* none  == NAND_ECC_NONE (strongly *not* advised!!)
+        * soft  == NAND_ECC_SOFT
+        * 1-bit == NAND_ECC_HW
+        * 4-bit == NAND_ECC_HW_SYNDROME (not on all chips)
+        */
+       nand_ecc_modes_t        ecc_mode;
+
+       /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */
+       unsigned                options;
+};
+
+#endif /* __ARCH_ARM_DAVINCI_NAND_H */
index 6968078..2429b79 100644 (file)
@@ -64,7 +64,7 @@ static struct resource usb_resources[] = {
        },
 };
 
-static u64 usb_dmamask = DMA_32BIT_MASK;
+static u64 usb_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device usb_dev = {
        .name           = "musb_hdrc",
@@ -72,7 +72,7 @@ static struct platform_device usb_dev = {
        .dev = {
                .platform_data          = &usb_data,
                .dma_mask               = &usb_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .resource       = usb_resources,
        .num_resources  = ARRAY_SIZE(usb_resources),
index cfd4d2e..bee42c6 100644 (file)
@@ -307,7 +307,7 @@ static struct resource iop13xx_adma_2_resources[] = {
        }
 };
 
-static u64 iop13xx_adma_dmamask = DMA_64BIT_MASK;
+static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64);
 static struct iop_adma_platform_data iop13xx_adma_0_data = {
        .hw_id = 0,
        .pool_size = PAGE_SIZE,
@@ -331,7 +331,7 @@ static struct platform_device iop13xx_adma_0_channel = {
        .resource = iop13xx_adma_0_resources,
        .dev = {
                .dma_mask = &iop13xx_adma_dmamask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
                .platform_data = (void *) &iop13xx_adma_0_data,
        },
 };
@@ -343,7 +343,7 @@ static struct platform_device iop13xx_adma_1_channel = {
        .resource = iop13xx_adma_1_resources,
        .dev = {
                .dma_mask = &iop13xx_adma_dmamask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
                .platform_data = (void *) &iop13xx_adma_1_data,
        },
 };
@@ -355,7 +355,7 @@ static struct platform_device iop13xx_adma_2_channel = {
        .resource = iop13xx_adma_2_resources,
        .dev = {
                .dma_mask = &iop13xx_adma_dmamask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
                .platform_data = (void *) &iop13xx_adma_2_data,
        },
 };
index c6af1e1..6fdad7a 100644 (file)
@@ -151,7 +151,7 @@ static struct resource iop13xx_tpmi_3_resources[] = {
        }
 };
 
-u64 iop13xx_tpmi_mask = DMA_64BIT_MASK;
+u64 iop13xx_tpmi_mask = DMA_BIT_MASK(64);
 static struct platform_device iop13xx_tpmi_0_device = {
        .name = "iop-tpmi",
        .id = 0,
@@ -159,7 +159,7 @@ static struct platform_device iop13xx_tpmi_0_device = {
        .resource = iop13xx_tpmi_0_resources,
        .dev = {
                .dma_mask          = &iop13xx_tpmi_mask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
        },
 };
 
@@ -170,7 +170,7 @@ static struct platform_device iop13xx_tpmi_1_device = {
        .resource = iop13xx_tpmi_1_resources,
        .dev = {
                .dma_mask          = &iop13xx_tpmi_mask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
        },
 };
 
@@ -181,7 +181,7 @@ static struct platform_device iop13xx_tpmi_2_device = {
        .resource = iop13xx_tpmi_2_resources,
        .dev = {
                .dma_mask          = &iop13xx_tpmi_mask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
        },
 };
 
@@ -192,7 +192,7 @@ static struct platform_device iop13xx_tpmi_3_device = {
        .resource = iop13xx_tpmi_3_resources,
        .dev = {
                .dma_mask          = &iop13xx_tpmi_mask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
        },
 };
 
index 3d2fae8..16dc9ea 100644 (file)
@@ -508,7 +508,7 @@ static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = {
        .dram           = &kirkwood_mbus_dram_info,
 };
 
-static u64 kirkwood_xor_dmamask = DMA_32BIT_MASK;
+static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32);
 
 
 /*****************************************************************************
@@ -559,7 +559,7 @@ static struct platform_device kirkwood_xor00_channel = {
        .resource       = kirkwood_xor00_resources,
        .dev            = {
                .dma_mask               = &kirkwood_xor_dmamask,
-               .coherent_dma_mask      = DMA_64BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(64),
                .platform_data          = (void *)&kirkwood_xor00_data,
        },
 };
@@ -585,7 +585,7 @@ static struct platform_device kirkwood_xor01_channel = {
        .resource       = kirkwood_xor01_resources,
        .dev            = {
                .dma_mask               = &kirkwood_xor_dmamask,
-               .coherent_dma_mask      = DMA_64BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(64),
                .platform_data          = (void *)&kirkwood_xor01_data,
        },
 };
@@ -657,7 +657,7 @@ static struct platform_device kirkwood_xor10_channel = {
        .resource       = kirkwood_xor10_resources,
        .dev            = {
                .dma_mask               = &kirkwood_xor_dmamask,
-               .coherent_dma_mask      = DMA_64BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(64),
                .platform_data          = (void *)&kirkwood_xor10_data,
        },
 };
@@ -683,7 +683,7 @@ static struct platform_device kirkwood_xor11_channel = {
        .resource       = kirkwood_xor11_resources,
        .dev            = {
                .dma_mask               = &kirkwood_xor_dmamask,
-               .coherent_dma_mask      = DMA_64BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(64),
                .platform_data          = (void *)&kirkwood_xor11_data,
        },
 };
index 82f1309..7f86fe0 100644 (file)
@@ -6,6 +6,9 @@
 
 obj-y                  += generic.o clock.o devices.o
 
+# Support for CMOS sensor interface
+obj-$(CONFIG_MX1_VIDEO)        += ksym_mx1.o mx1_camera_fiq.o
+
 # Specific board support
 obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
 obj-$(CONFIG_MACH_SCB9328) += scb9328.o
\ No newline at end of file
index 97f42d9..76d1ffb 100644 (file)
@@ -44,7 +44,7 @@ static struct resource imx_csi_resources[] = {
 static u64 imx_csi_dmamask = 0xffffffffUL;
 
 struct platform_device imx_csi_device = {
-       .name           = "imx-csi",
+       .name           = "mx1-camera",
        .id             = 0, /* This is used to put cameras on this interface */
        .dev            = {
                .dma_mask = &imx_csi_dmamask,
diff --git a/arch/arm/mach-mx1/ksym_mx1.c b/arch/arm/mach-mx1/ksym_mx1.c
new file mode 100644 (file)
index 0000000..b09ee12
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Exported ksyms of ARCH_MX1
+ *
+ * Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+
+#include <mach/mx1_camera.h>
+
+/* IMX camera FIQ handler */
+EXPORT_SYMBOL(mx1_camera_sof_fiq_start);
+EXPORT_SYMBOL(mx1_camera_sof_fiq_end);
diff --git a/arch/arm/mach-mx1/mx1_camera_fiq.S b/arch/arm/mach-mx1/mx1_camera_fiq.S
new file mode 100644 (file)
index 0000000..9c69aa6
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *  Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+ *
+ *  Based on linux/arch/arm/lib/floppydma.S
+ *      Copyright (C) 1995, 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+
+               .text
+               .global mx1_camera_sof_fiq_end
+               .global mx1_camera_sof_fiq_start
+mx1_camera_sof_fiq_start:
+               @ enable dma
+               ldr     r12, [r9]
+               orr     r12, r12, #0x00000001
+               str     r12, [r9]
+               @ unmask DMA interrupt
+               ldr     r12, [r8]
+               bic     r12, r12, r13
+               str     r12, [r8]
+               @ disable SOF interrupt
+               ldr     r12, [r10]
+               bic     r12, r12, #0x00010000
+               str     r12, [r10]
+               @ clear SOF flag
+               mov     r12, #0x00010000
+               str     r12, [r11]
+               @ return from FIQ
+               subs    pc, lr, #4
+mx1_camera_sof_fiq_end:
index ca46f48..9957a11 100644 (file)
@@ -533,7 +533,7 @@ static struct clk_lookup lookups[] __initdata = {
        _REGISTER_CLOCK(NULL, "kpp", kpp_clk)
        _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1)
        _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2)
-       _REGISTER_CLOCK("mx3-camera.0", "csi", csi_clk)
+       _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk)
        _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
        _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
        _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
index dafe4f7..336e51d 100644 (file)
@@ -590,27 +590,28 @@ static void omap1_init_ext_clk(struct clk * clk)
 static int omap1_clk_enable(struct clk *clk)
 {
        int ret = 0;
+
        if (clk->usecount++ == 0) {
-               if (likely(clk->parent)) {
+               if (clk->parent) {
                        ret = omap1_clk_enable(clk->parent);
-
-                       if (unlikely(ret != 0)) {
-                               clk->usecount--;
-                               return ret;
-                       }
+                       if (ret)
+                               goto err;
 
                        if (clk->flags & CLOCK_NO_IDLE_PARENT)
                                omap1_clk_deny_idle(clk->parent);
                }
 
                ret = clk->ops->enable(clk);
-
-               if (unlikely(ret != 0) && clk->parent) {
-                       omap1_clk_disable(clk->parent);
-                       clk->usecount--;
+               if (ret) {
+                       if (clk->parent)
+                               omap1_clk_disable(clk->parent);
+                       goto err;
                }
        }
+       return ret;
 
+err:
+       clk->usecount--;
        return ret;
 }
 
index 68cc3ef..6af99dd 100644 (file)
@@ -463,7 +463,7 @@ static struct platform_device orion5x_xor_shared = {
        .resource       = orion5x_xor_shared_resources,
 };
 
-static u64 orion5x_xor_dmamask = DMA_32BIT_MASK;
+static u64 orion5x_xor_dmamask = DMA_BIT_MASK(32);
 
 static struct resource orion5x_xor0_resources[] = {
        [0] = {
@@ -486,7 +486,7 @@ static struct platform_device orion5x_xor0_channel = {
        .resource       = orion5x_xor0_resources,
        .dev            = {
                .dma_mask               = &orion5x_xor_dmamask,
-               .coherent_dma_mask      = DMA_64BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(64),
                .platform_data          = (void *)&orion5x_xor0_data,
        },
 };
@@ -512,7 +512,7 @@ static struct platform_device orion5x_xor1_channel = {
        .resource       = orion5x_xor1_resources,
        .dev            = {
                .dma_mask               = &orion5x_xor_dmamask,
-               .coherent_dma_mask      = DMA_64BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(64),
                .platform_data          = (void *)&orion5x_xor1_data,
        },
 };
index 96a2006..3e66d90 100644 (file)
@@ -343,6 +343,15 @@ config ARCH_PXA_PALM
        bool "PXA based Palm PDAs"
        select HAVE_PWM
 
+config MACH_PALMTE2
+       bool "Palm Tungsten|E2"
+       default y
+       depends on ARCH_PXA_PALM
+       select PXA25x
+       help
+         Say Y here if you intend to run this kernel on a Palm Tungsten|E2
+         handheld computer.
+
 config MACH_PALMT5
        bool "Palm Tungsten|T5"
        default y
index c80e1ba..682dbf4 100644 (file)
@@ -57,6 +57,7 @@ obj-$(CONFIG_MACH_E740)               += e740.o
 obj-$(CONFIG_MACH_E750)                += e750.o
 obj-$(CONFIG_MACH_E400)                += e400.o
 obj-$(CONFIG_MACH_E800)                += e800.o
+obj-$(CONFIG_MACH_PALMTE2)     += palmte2.o
 obj-$(CONFIG_MACH_PALMT5)      += palmt5.o
 obj-$(CONFIG_MACH_PALMTX)      += palmtx.o
 obj-$(CONFIG_MACH_PALMLD)      += palmld.o
index 117b543..b50ef39 100644 (file)
@@ -121,7 +121,7 @@ static inline void cmx2xx_init_dm9000(void) {}
 /* UCB1400 touchscreen controller */
 #if defined(CONFIG_TOUCHSCREEN_UCB1400) || defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
 static struct platform_device cmx2xx_ts_device = {
-       .name           = "ucb1400_ts",
+       .name           = "ucb1400_core",
        .id             = -1,
 };
 
index 10c2eaf..7c9c34c 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
-#include <net/ax88796.h>
+#include <linux/interrupt.h>
 
 #include <asm/mach-types.h>
 #include <asm/sizes.h>
 
 #if defined(CONFIG_AX88796)
 #define COLIBRI_ETH_IRQ_GPIO   mfp_to_gpio(GPIO26_GPIO)
+
 /*
  * Asix AX88796 Ethernet
  */
 static struct ax_plat_data colibri_asix_platdata = {
-       .flags          = AXFLG_MAC_FROMDEV,
-       .wordlength     = 2
+       .flags          = 0, /* defined later */
+       .wordlength     = 2,
 };
 
 static struct resource colibri_asix_resource[] = {
@@ -49,7 +50,7 @@ static struct resource colibri_asix_resource[] = {
        [1] = {
                .start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
                .end   = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
-               .flags = IORESOURCE_IRQ
+               .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
        }
 };
 
@@ -70,8 +71,8 @@ static mfp_cfg_t colibri_pxa300_eth_pin_config[] __initdata = {
 
 static void __init colibri_pxa300_init_eth(void)
 {
+       colibri_pxa3xx_init_eth(&colibri_asix_platdata);
        pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_eth_pin_config));
-       set_irq_type(gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), IRQ_TYPE_EDGE_FALLING);
        platform_device_register(&asix_device);
 }
 #else
index 55b74a7..a18d37b 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
-#include <net/ax88796.h>
+#include <linux/interrupt.h>
 
 #include <asm/mach-types.h>
 #include <asm/sizes.h>
@@ -38,8 +38,8 @@
  * Asix AX88796 Ethernet
  */
 static struct ax_plat_data colibri_asix_platdata = {
-       .flags          = AXFLG_MAC_FROMDEV,
-       .wordlength     = 2
+       .flags          = 0, /* defined later */
+       .wordlength     = 2,
 };
 
 static struct resource colibri_asix_resource[] = {
@@ -51,7 +51,7 @@ static struct resource colibri_asix_resource[] = {
        [1] = {
                .start = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
                .end   = gpio_to_irq(COLIBRI_ETH_IRQ_GPIO),
-               .flags = IORESOURCE_IRQ
+               .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
        }
 };
 
@@ -72,8 +72,8 @@ static mfp_cfg_t colibri_pxa320_eth_pin_config[] __initdata = {
 
 static void __init colibri_pxa320_init_eth(void)
 {
+       colibri_pxa3xx_init_eth(&colibri_asix_platdata);
        pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa320_eth_pin_config));
-       set_irq_type(gpio_to_irq(COLIBRI_ETH_IRQ_GPIO), IRQ_TYPE_EDGE_FALLING);
        platform_device_register(&asix_device);
 }
 #else
index 12d0afc..ea34e34 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
+#include <linux/etherdevice.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/sizes.h>
 #include "generic.h"
 #include "devices.h"
 
+#if defined(CONFIG_AX88796)
+#define ETHER_ADDR_LEN 6
+static u8 ether_mac_addr[ETHER_ADDR_LEN];
+
+void __init colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data)
+{
+       int i;
+       u64 serial = ((u64) system_serial_high << 32) | system_serial_low;
+
+       /*
+        * If the bootloader passed in a serial boot tag, which contains a
+        * valid ethernet MAC, pass it to the interface. Toradex ships the
+        * modules with their own bootloader which provides a valid MAC
+        * this way.
+        */
+
+       for (i = 0; i < ETHER_ADDR_LEN; i++) {
+               ether_mac_addr[i] = serial & 0xff;
+               serial >>= 8;
+       }
+
+       if (is_valid_ether_addr(ether_mac_addr)) {
+               plat_data->flags |= AXFLG_MAC_FROMPLATFORM;
+               plat_data->mac_addr = ether_mac_addr;
+               printk(KERN_INFO "%s(): taking MAC from serial boot tag\n",
+                       __func__);
+       } else {
+               plat_data->flags |= AXFLG_MAC_FROMDEV;
+               printk(KERN_INFO "%s(): no valid serial boot tag found, "
+                       "taking MAC from device\n", __func__);
+       }
+}
+#endif
+
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 static int mmc_detect_pin;
 
index 4a2a295..5a221a4 100644 (file)
@@ -5,6 +5,8 @@
 #include <linux/input.h>
 #include <linux/leds.h>
 
+#include <asm/mach-types.h>
+
 static struct gpio_keys_button csb701_buttons[] = {
        {
                .code   = 0x7,
@@ -54,6 +56,9 @@ static struct platform_device *devices[] __initdata = {
 
 static int __init csb701_init(void)
 {
+       if (!machine_is_csb726())
+               return -ENODEV;
+
        return platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
index 07500a0..a36fc17 100644 (file)
@@ -29,6 +29,7 @@
 #include <mach/udc.h>
 #include <mach/irda.h>
 #include <mach/irqs.h>
+#include <mach/audio.h>
 
 #include "generic.h"
 #include "eseries.h"
@@ -197,6 +198,7 @@ static void __init e740_init(void)
        eseries_get_tmio_gpios();
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_udc_info(&e7xx_udc_mach_info);
+       pxa_set_ac97_info(NULL);
        e7xx_irda_init();
        pxa_set_ficp_info(&e7xx_ficp_platform_data);
 }
index 6126c04..1d00110 100644 (file)
@@ -28,6 +28,7 @@
 #include <mach/udc.h>
 #include <mach/irda.h>
 #include <mach/irqs.h>
+#include <mach/audio.h>
 
 #include "generic.h"
 #include "eseries.h"
@@ -198,6 +199,7 @@ static void __init e750_init(void)
        eseries_get_tmio_gpios();
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_udc_info(&e7xx_udc_mach_info);
+       pxa_set_ac97_info(NULL);
        e7xx_irda_init();
        pxa_set_ficp_info(&e7xx_ficp_platform_data);
 }
index 74ab098..9866c7b 100644 (file)
@@ -27,6 +27,7 @@
 #include <mach/eseries-gpio.h>
 #include <mach/udc.h>
 #include <mach/irqs.h>
+#include <mach/audio.h>
 
 #include "generic.h"
 #include "eseries.h"
@@ -199,6 +200,7 @@ static void __init e800_init(void)
        eseries_get_tmio_gpios();
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_udc_info(&e800_udc_mach_info);
+       pxa_set_ac97_info(NULL);
 }
 
 MACHINE_START(E800, "Toshiba e800")
index 920dfb8..67611da 100644 (file)
 #include <linux/regulator/machine.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/tdo24m.h>
+#include <linux/spi/libertas_spi.h>
 #include <linux/power_supply.h>
 #include <linux/apm-emulation.h>
+#include <linux/delay.h>
 
 #include <media/soc_camera.h>
 
@@ -62,6 +64,8 @@
 #define GPIO93_CAM_RESET       (93)
 #define GPIO41_ETHIRQ          (41)
 #define EM_X270_ETHIRQ         IRQ_GPIO(GPIO41_ETHIRQ)
+#define GPIO115_WLAN_PWEN      (115)
+#define GPIO19_WLAN_STRAP      (19)
 
 static int mmc_cd;
 static int nand_rb;
@@ -159,8 +163,8 @@ static unsigned long common_pin_config[] = {
        GPIO57_SSP1_TXD,
 
        /* SSP2 */
-       GPIO19_SSP2_SCLK,
-       GPIO14_SSP2_SFRM,
+       GPIO19_GPIO,    /* SSP2 clock is used as GPIO for Libertas pin-strap */
+       GPIO14_GPIO,
        GPIO89_SSP2_TXD,
        GPIO88_SSP2_RXD,
 
@@ -648,20 +652,86 @@ static struct tdo24m_platform_data em_x270_tdo24m_pdata = {
        .model = TDO35S,
 };
 
+static struct pxa2xx_spi_master em_x270_spi_2_info = {
+       .num_chipselect = 1,
+       .enable_dma     = 1,
+};
+
+static struct pxa2xx_spi_chip em_x270_libertas_chip = {
+       .rx_threshold   = 1,
+       .tx_threshold   = 1,
+       .timeout        = 1000,
+};
+
+static unsigned long em_x270_libertas_pin_config[] = {
+       /* SSP2 */
+       GPIO19_SSP2_SCLK,
+       GPIO14_GPIO,
+       GPIO89_SSP2_TXD,
+       GPIO88_SSP2_RXD,
+};
+
+static int em_x270_libertas_setup(struct spi_device *spi)
+{
+       int err = gpio_request(GPIO115_WLAN_PWEN, "WLAN PWEN");
+       if (err)
+               return err;
+
+       gpio_direction_output(GPIO19_WLAN_STRAP, 1);
+       mdelay(100);
+
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_libertas_pin_config));
+
+       gpio_direction_output(GPIO115_WLAN_PWEN, 0);
+       mdelay(100);
+       gpio_set_value(GPIO115_WLAN_PWEN, 1);
+       mdelay(100);
+
+       spi->bits_per_word = 16;
+       spi_setup(spi);
+
+       return 0;
+}
+
+static int em_x270_libertas_teardown(struct spi_device *spi)
+{
+       gpio_set_value(GPIO115_WLAN_PWEN, 0);
+       gpio_free(GPIO115_WLAN_PWEN);
+
+       return 0;
+}
+
+struct libertas_spi_platform_data em_x270_libertas_pdata = {
+       .use_dummy_writes       = 1,
+       .gpio_cs                = 14,
+       .setup                  = em_x270_libertas_setup,
+       .teardown               = em_x270_libertas_teardown,
+};
+
 static struct spi_board_info em_x270_spi_devices[] __initdata = {
        {
-               .modalias = "tdo24m",
-               .max_speed_hz = 1000000,
-               .bus_num = 1,
-               .chip_select = 0,
-               .controller_data = &em_x270_tdo24m_chip,
-               .platform_data = &em_x270_tdo24m_pdata,
+               .modalias               = "tdo24m",
+               .max_speed_hz           = 1000000,
+               .bus_num                = 1,
+               .chip_select            = 0,
+               .controller_data        = &em_x270_tdo24m_chip,
+               .platform_data          = &em_x270_tdo24m_pdata,
+       },
+       {
+               .modalias               = "libertas_spi",
+               .max_speed_hz           = 13000000,
+               .bus_num                = 2,
+               .irq                    = IRQ_GPIO(116),
+               .chip_select            = 0,
+               .controller_data        = &em_x270_libertas_chip,
+               .platform_data          = &em_x270_libertas_pdata,
        },
 };
 
 static void __init em_x270_init_spi(void)
 {
        pxa2xx_set_spi_info(1, &em_x270_spi_info);
+       pxa2xx_set_spi_info(2, &em_x270_spi_2_info);
        spi_register_board_info(ARRAY_AND_SIZE(em_x270_spi_devices));
 }
 #else
index 3f2a01d..90230c6 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef _COLIBRI_H_
 #define _COLIBRI_H_
+
+#include <net/ax88796.h>
+
 /*
  * common settings for all modules
  */
@@ -16,6 +19,10 @@ extern void colibri_pxa3xx_init_lcd(int bl_pin);
 static inline void colibri_pxa3xx_init_lcd(int) {}
 #endif
 
+#if defined(CONFIG_AX88796)
+extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data);
+#endif
+
 /* physical memory regions */
 #define COLIBRI_SDRAM_BASE     0xa0000000      /* SDRAM region */
 
index 82a399f..20ef37d 100644 (file)
@@ -27,7 +27,7 @@
 #define GPIO22_MAGICIAN_VIBRA_EN               22
 #define GPIO26_MAGICIAN_GSM_POWER              26
 #define GPIO27_MAGICIAN_USBC_PUEN              27
-#define GPIO30_MAGICIAN_nCHARGE_EN             30
+#define GPIO30_MAGICIAN_BQ24022_nCHARGE_EN     30
 #define GPIO37_MAGICIAN_KEY_HANGUP             37
 #define GPIO38_MAGICIAN_KEY_CONTACTS           38
 #define GPIO40_MAGICIAN_GSM_OUT2               40
@@ -98,7 +98,7 @@
 #define EGPIO_MAGICIAN_UNKNOWN_WAVEDEV_DLL     MAGICIAN_EGPIO(2, 2)
 #define EGPIO_MAGICIAN_FLASH_VPP               MAGICIAN_EGPIO(2, 3)
 #define EGPIO_MAGICIAN_BL_POWER2               MAGICIAN_EGPIO(2, 4)
-#define EGPIO_MAGICIAN_CHARGE_EN               MAGICIAN_EGPIO(2, 5)
+#define EGPIO_MAGICIAN_BQ24022_ISET2           MAGICIAN_EGPIO(2, 5)
 #define EGPIO_MAGICIAN_GSM_POWER               MAGICIAN_EGPIO(2, 7)
 
 /* input */
index 7c295a4..fb13c82 100644 (file)
@@ -87,6 +87,7 @@
 #define PALMLD_IDE_SIZE                0x00100000
 
 #define PALMLD_PHYS_IO_START   0x40000000
+#define PALMLD_STR_BASE                0xa0200000
 
 /* BATTERY */
 #define PALMLD_BAT_MAX_VOLTAGE         4000    /* 4.00V maximum voltage */
index 94db288..052bfe7 100644 (file)
@@ -59,6 +59,7 @@
 /* Various addresses  */
 #define PALMT5_PHYS_RAM_START  0xa0000000
 #define PALMT5_PHYS_IO_START   0x40000000
+#define PALMT5_STR_BASE                0xa0200000
 
 /* TOUCHSCREEN */
 #define AC97_LINK_FRAME                21
diff --git a/arch/arm/mach-pxa/include/mach/palmte2.h b/arch/arm/mach-pxa/include/mach/palmte2.h
new file mode 100644 (file)
index 0000000..1236134
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * GPIOs and interrupts for Palm Tungsten|E2 Handheld Computer
+ *
+ * Author:
+ *             Carlos Eduardo Medaglia Dyonisio <cadu@nerdfeliz.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef _INCLUDE_PALMTE2_H_
+#define _INCLUDE_PALMTE2_H_
+
+/** HERE ARE GPIOs **/
+
+/* GPIOs */
+#define GPIO_NR_PALMTE2_POWER_DETECT           9
+#define GPIO_NR_PALMTE2_HOTSYNC_BUTTON_N       4
+#define GPIO_NR_PALMTE2_EARPHONE_DETECT                15
+
+/* SD/MMC */
+#define GPIO_NR_PALMTE2_SD_DETECT_N            10
+#define GPIO_NR_PALMTE2_SD_POWER               55
+#define GPIO_NR_PALMTE2_SD_READONLY            51
+
+/* IRDA -  disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */
+#define GPIO_NR_PALMTE2_IR_DISABLE             48
+
+/* USB */
+#define GPIO_NR_PALMTE2_USB_DETECT_N           35
+#define GPIO_NR_PALMTE2_USB_PULLUP             53
+
+/* LCD/BACKLIGHT */
+#define GPIO_NR_PALMTE2_BL_POWER               56
+#define GPIO_NR_PALMTE2_LCD_POWER              37
+
+/* KEYS */
+#define GPIO_NR_PALMTE2_KEY_NOTES      5
+#define GPIO_NR_PALMTE2_KEY_TASKS      7
+#define GPIO_NR_PALMTE2_KEY_CALENDAR   11
+#define GPIO_NR_PALMTE2_KEY_CONTACTS   13
+#define GPIO_NR_PALMTE2_KEY_CENTER     14
+#define GPIO_NR_PALMTE2_KEY_LEFT       19
+#define GPIO_NR_PALMTE2_KEY_RIGHT      20
+#define GPIO_NR_PALMTE2_KEY_DOWN       21
+#define GPIO_NR_PALMTE2_KEY_UP         22
+
+/** HERE ARE INIT VALUES **/
+
+/* BACKLIGHT */
+#define PALMTE2_MAX_INTENSITY          0xFE
+#define PALMTE2_DEFAULT_INTENSITY      0x7E
+#define PALMTE2_LIMIT_MASK             0x7F
+#define PALMTE2_PRESCALER              0x3F
+#define PALMTE2_PERIOD_NS              3500
+
+/* BATTERY */
+#define PALMTE2_BAT_MAX_VOLTAGE                4000    /* 4.00v current voltage */
+#define PALMTE2_BAT_MIN_VOLTAGE                3550    /* 3.55v critical voltage */
+#define PALMTE2_BAT_MAX_CURRENT                0       /* unknokn */
+#define PALMTE2_BAT_MIN_CURRENT                0       /* unknown */
+#define PALMTE2_BAT_MAX_CHARGE         1       /* unknown */
+#define PALMTE2_BAT_MIN_CHARGE         1       /* unknown */
+#define PALMTE2_MAX_LIFE_MINS          360     /* on-life in minutes */
+
+#endif
index 1e8bccb..9f7d62f 100644 (file)
@@ -78,6 +78,8 @@
 #define PALMTX_PHYS_RAM_START  0xa0000000
 #define PALMTX_PHYS_IO_START   0x40000000
 
+#define PALMTX_STR_BASE                0xa0200000
+
 #define PALMTX_PHYS_FLASH_START        PXA_CS0_PHYS    /* ChipSelect 0 */
 #define PALMTX_PHYS_NAND_START PXA_CS1_PHYS    /* ChipSelect 1 */
 
index 2206cb6..b87cecd 100644 (file)
@@ -38,6 +38,7 @@ struct pxa2xx_spi_chip {
        u8 dma_burst_size;
        u32 timeout;
        u8 enable_loopback;
+       int gpio_cs;
        void (*cs_control)(u32 command);
 };
 
index eb35fca..3478eae 100644 (file)
@@ -49,6 +49,9 @@ struct pxa3xx_nand_platform_data {
         */
        int     enable_arbiter;
 
+       /* allow platform code to keep OBM/bootloader defined NFC config */
+       int     keep_config;
+
        const struct mtd_partition              *parts;
        unsigned int                            nr_parts;
 
index deeea1c..c899bbd 100644 (file)
@@ -25,6 +25,8 @@
 #include <linux/mtd/physmap.h>
 #include <linux/pda_power.h>
 #include <linux/pwm_backlight.h>
+#include <linux/regulator/bq24022.h>
+#include <linux/regulator/machine.h>
 #include <linux/usb/gpio_vbus.h>
 
 #include <mach/hardware.h>
@@ -552,33 +554,7 @@ static struct platform_device gpio_vbus = {
 
 static int power_supply_init(struct device *dev)
 {
-       int ret;
-
-       ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_AC, "CABLE_STATE_AC");
-       if (ret)
-               goto err_cs_ac;
-       ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_USB, "CABLE_STATE_USB");
-       if (ret)
-               goto err_cs_usb;
-       ret = gpio_request(EGPIO_MAGICIAN_CHARGE_EN, "CHARGE_EN");
-       if (ret)
-               goto err_chg_en;
-       ret = gpio_request(GPIO30_MAGICIAN_nCHARGE_EN, "nCHARGE_EN");
-       if (!ret)
-               ret = gpio_direction_output(GPIO30_MAGICIAN_nCHARGE_EN, 0);
-       if (ret)
-               goto err_nchg_en;
-
-       return 0;
-
-err_nchg_en:
-       gpio_free(EGPIO_MAGICIAN_CHARGE_EN);
-err_chg_en:
-       gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB);
-err_cs_usb:
-       gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC);
-err_cs_ac:
-       return ret;
+       return gpio_request(EGPIO_MAGICIAN_CABLE_STATE_AC, "CABLE_STATE_AC");
 }
 
 static int magician_is_ac_online(void)
@@ -586,22 +562,8 @@ static int magician_is_ac_online(void)
        return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_AC);
 }
 
-static int magician_is_usb_online(void)
-{
-       return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_USB);
-}
-
-static void magician_set_charge(int flags)
-{
-       gpio_set_value(GPIO30_MAGICIAN_nCHARGE_EN, !flags);
-       gpio_set_value(EGPIO_MAGICIAN_CHARGE_EN, flags);
-}
-
 static void power_supply_exit(struct device *dev)
 {
-       gpio_free(GPIO30_MAGICIAN_nCHARGE_EN);
-       gpio_free(EGPIO_MAGICIAN_CHARGE_EN);
-       gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB);
        gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC);
 }
 
@@ -612,8 +574,6 @@ static char *magician_supplicants[] = {
 static struct pda_power_pdata power_supply_info = {
        .init            = power_supply_init,
        .is_ac_online    = magician_is_ac_online,
-       .is_usb_online   = magician_is_usb_online,
-       .set_charge      = magician_set_charge,
        .exit            = power_supply_exit,
        .supplied_to     = magician_supplicants,
        .num_supplicants = ARRAY_SIZE(magician_supplicants),
@@ -646,6 +606,43 @@ static struct platform_device power_supply = {
        .num_resources = ARRAY_SIZE(power_supply_resources),
 };
 
+/*
+ * Battery charger
+ */
+
+static struct regulator_consumer_supply bq24022_consumers[] = {
+       {
+               .dev = &gpio_vbus.dev,
+               .supply = "vbus_draw",
+       },
+       {
+               .dev = &power_supply.dev,
+               .supply = "ac_draw",
+       },
+};
+
+static struct regulator_init_data bq24022_init_data = {
+       .constraints = {
+               .max_uA         = 500000,
+               .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(bq24022_consumers),
+       .consumer_supplies      = bq24022_consumers,
+};
+
+static struct bq24022_mach_info bq24022_info = {
+       .gpio_nce   = GPIO30_MAGICIAN_BQ24022_nCHARGE_EN,
+       .gpio_iset2 = EGPIO_MAGICIAN_BQ24022_ISET2,
+       .init_data  = &bq24022_init_data,
+};
+
+static struct platform_device bq24022 = {
+       .name = "bq24022",
+       .id   = -1,
+       .dev  = {
+               .platform_data = &bq24022_info,
+       },
+};
 
 /*
  * MMC/SD
@@ -756,6 +753,7 @@ static struct platform_device *devices[] __initdata = {
        &egpio,
        &backlight,
        &pasic3,
+       &bq24022,
        &gpio_vbus,
        &power_supply,
        &strataflash,
index 97c93a7..9203b06 100644 (file)
@@ -50,6 +50,7 @@
 #include <mach/pxa27x-udc.h>
 #include <mach/i2c.h>
 #include <mach/camera.h>
+#include <mach/audio.h>
 #include <media/soc_camera.h>
 
 #include <mach/mioa701.h>
@@ -763,8 +764,6 @@ MIO_PARENT_DEV(mioa701_backlight, "pwm-backlight",  &pxa27x_device_pwm0.dev,
                &mioa701_backlight_data);
 MIO_SIMPLE_DEV(mioa701_led,      "leds-gpio",      &gpio_led_info)
 MIO_SIMPLE_DEV(pxa2xx_pcm,       "pxa2xx-pcm",     NULL)
-MIO_SIMPLE_DEV(pxa2xx_ac97,      "pxa2xx-ac97",    NULL)
-MIO_PARENT_DEV(mio_wm9713_codec,  "wm9713-codec",   &pxa2xx_ac97.dev, NULL)
 MIO_SIMPLE_DEV(mioa701_sound,    "mioa701-wm9713", NULL)
 MIO_SIMPLE_DEV(mioa701_board,    "mioa701-board",  NULL)
 MIO_SIMPLE_DEV(gpio_vbus,        "gpio-vbus",      &gpio_vbus_data);
@@ -774,8 +773,6 @@ static struct platform_device *devices[] __initdata = {
        &mioa701_backlight,
        &mioa701_led,
        &pxa2xx_pcm,
-       &pxa2xx_ac97,
-       &mio_wm9713_codec,
        &mioa701_sound,
        &power_dev,
        &strataflash,
@@ -818,6 +815,7 @@ static void __init mioa701_machine_init(void)
        pxa_set_keypad_info(&mioa701_keypad_info);
        wm97xx_bat_set_pdata(&mioa701_battery_data);
        pxa_set_udc_info(&mioa701_udc_info);
+       pxa_set_ac97_info(NULL);
        pm_power_off = mioa701_poweroff;
        arm_pm_restart = mioa701_restart;
        platform_add_devices(devices, ARRAY_SIZE(devices));
index 8587477..ecf5910 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/gpio.h>
 #include <linux/wm97xx_batt.h>
 #include <linux/power_supply.h>
+#include <linux/sysdev.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -68,10 +69,10 @@ static unsigned long palmld_pin_config[] __initdata = {
        GPIO47_FICP_TXD,
 
        /* MATRIX KEYPAD */
-       GPIO100_KP_MKIN_0,
-       GPIO101_KP_MKIN_1,
-       GPIO102_KP_MKIN_2,
-       GPIO97_KP_MKIN_3,
+       GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
        GPIO103_KP_MKOUT_0,
        GPIO104_KP_MKOUT_1,
        GPIO105_KP_MKOUT_2,
@@ -507,6 +508,33 @@ static struct pxafb_mach_info palmld_lcd_screen = {
 };
 
 /******************************************************************************
+ * Power management - standby
+ ******************************************************************************/
+#ifdef CONFIG_PM
+static u32 *addr __initdata;
+static u32 resume[3] __initdata = {
+       0xe3a00101,     /* mov  r0,     #0x40000000 */
+       0xe380060f,     /* orr  r0, r0, #0x00f00000 */
+       0xe590f008,     /* ldr  pc, [r0, #0x08] */
+};
+
+static int __init palmld_pm_init(void)
+{
+       int i;
+
+       /* this is where the bootloader jumps */
+       addr = phys_to_virt(PALMLD_STR_BASE);
+
+       for (i = 0; i < 3; i++)
+               addr[i] = resume[i];
+
+       return 0;
+}
+
+device_initcall(palmld_pm_init);
+#endif
+
+/******************************************************************************
  * Machine init
  ******************************************************************************/
 static struct platform_device *devices[] __initdata = {
index 9521c7b..0680f1a 100644 (file)
@@ -75,10 +75,10 @@ static unsigned long palmt5_pin_config[] __initdata = {
        GPIO95_GPIO,    /* usb power */
 
        /* MATRIX KEYPAD */
-       GPIO100_KP_MKIN_0,
-       GPIO101_KP_MKIN_1,
-       GPIO102_KP_MKIN_2,
-       GPIO97_KP_MKIN_3,
+       GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
        GPIO103_KP_MKOUT_0,
        GPIO104_KP_MKOUT_1,
        GPIO105_KP_MKOUT_2,
@@ -450,6 +450,33 @@ static struct pxafb_mach_info palmt5_lcd_screen = {
 };
 
 /******************************************************************************
+ * Power management - standby
+ ******************************************************************************/
+#ifdef CONFIG_PM
+static u32 *addr __initdata;
+static u32 resume[3] __initdata = {
+       0xe3a00101,     /* mov  r0,     #0x40000000 */
+       0xe380060f,     /* orr  r0, r0, #0x00f00000 */
+       0xe590f008,     /* ldr  pc, [r0, #0x08] */
+};
+
+static int __init palmt5_pm_init(void)
+{
+       int i;
+
+       /* this is where the bootloader jumps */
+       addr = phys_to_virt(PALMT5_STR_BASE);
+
+       for (i = 0; i < 3; i++)
+               addr[i] = resume[i];
+
+       return 0;
+}
+
+device_initcall(palmt5_pm_init);
+#endif
+
+/******************************************************************************
  * Machine init
  ******************************************************************************/
 static struct platform_device *devices[] __initdata = {
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
new file mode 100644 (file)
index 0000000..43fcf2e
--- /dev/null
@@ -0,0 +1,466 @@
+/*
+ * Hardware definitions for Palm Tungsten|E2
+ *
+ * Author:
+ *     Carlos Eduardo Medaglia Dyonisio <cadu@nerdfeliz.com>
+ *
+ * Rewrite for mainline:
+ *     Marek Vasut <marek.vasut@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * (find more info at www.hackndev.com)
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/pda_power.h>
+#include <linux/pwm_backlight.h>
+#include <linux/gpio.h>
+#include <linux/wm97xx_batt.h>
+#include <linux/power_supply.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/audio.h>
+#include <mach/palmte2.h>
+#include <mach/mmc.h>
+#include <mach/pxafb.h>
+#include <mach/mfp-pxa25x.h>
+#include <mach/irda.h>
+#include <mach/udc.h>
+
+#include "generic.h"
+#include "devices.h"
+
+/******************************************************************************
+ * Pin configuration
+ ******************************************************************************/
+static unsigned long palmte2_pin_config[] __initdata = {
+       /* MMC */
+       GPIO6_MMC_CLK,
+       GPIO8_MMC_CS0,
+       GPIO10_GPIO,    /* SD detect */
+       GPIO55_GPIO,    /* SD power */
+       GPIO51_GPIO,    /* SD r/o switch */
+
+       /* AC97 */
+       GPIO28_AC97_BITCLK,
+       GPIO29_AC97_SDATA_IN_0,
+       GPIO30_AC97_SDATA_OUT,
+       GPIO31_AC97_SYNC,
+
+       /* PWM */
+       GPIO16_PWM0_OUT,
+
+       /* USB */
+       GPIO15_GPIO,    /* usb detect */
+       GPIO53_GPIO,    /* usb power */
+
+       /* IrDA */
+       GPIO48_GPIO,    /* ir disable */
+       GPIO46_FICP_RXD,
+       GPIO47_FICP_TXD,
+
+       /* LCD */
+       GPIO58_LCD_LDD_0,
+       GPIO59_LCD_LDD_1,
+       GPIO60_LCD_LDD_2,
+       GPIO61_LCD_LDD_3,
+       GPIO62_LCD_LDD_4,
+       GPIO63_LCD_LDD_5,
+       GPIO64_LCD_LDD_6,
+       GPIO65_LCD_LDD_7,
+       GPIO66_LCD_LDD_8,
+       GPIO67_LCD_LDD_9,
+       GPIO68_LCD_LDD_10,
+       GPIO69_LCD_LDD_11,
+       GPIO70_LCD_LDD_12,
+       GPIO71_LCD_LDD_13,
+       GPIO72_LCD_LDD_14,
+       GPIO73_LCD_LDD_15,
+       GPIO74_LCD_FCLK,
+       GPIO75_LCD_LCLK,
+       GPIO76_LCD_PCLK,
+       GPIO77_LCD_BIAS,
+
+       /* GPIO KEYS */
+       GPIO5_GPIO,     /* notes */
+       GPIO7_GPIO,     /* tasks */
+       GPIO11_GPIO,    /* calendar */
+       GPIO13_GPIO,    /* contacts */
+       GPIO14_GPIO,    /* center */
+       GPIO19_GPIO,    /* left */
+       GPIO20_GPIO,    /* right */
+       GPIO21_GPIO,    /* down */
+       GPIO22_GPIO,    /* up */
+
+       /* MISC */
+       GPIO1_RST,      /* reset */
+       GPIO4_GPIO,     /* Hotsync button */
+       GPIO9_GPIO,     /* power detect */
+       GPIO37_GPIO,    /* LCD power */
+       GPIO56_GPIO,    /* Backlight power */
+};
+
+/******************************************************************************
+ * SD/MMC card controller
+ ******************************************************************************/
+static int palmte2_mci_init(struct device *dev,
+                               irq_handler_t palmte2_detect_int, void *data)
+{
+       int err = 0;
+
+       /* Setup an interrupt for detecting card insert/remove events */
+       err = gpio_request(GPIO_NR_PALMTE2_SD_DETECT_N, "SD IRQ");
+       if (err)
+               goto err;
+       err = gpio_direction_input(GPIO_NR_PALMTE2_SD_DETECT_N);
+       if (err)
+               goto err2;
+       err = request_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N),
+                       palmte2_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
+                       IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+                       "SD/MMC card detect", data);
+       if (err) {
+               printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
+                               __func__);
+               goto err2;
+       }
+
+       err = gpio_request(GPIO_NR_PALMTE2_SD_POWER, "SD_POWER");
+       if (err)
+               goto err3;
+       err = gpio_direction_output(GPIO_NR_PALMTE2_SD_POWER, 0);
+       if (err)
+               goto err4;
+
+       err = gpio_request(GPIO_NR_PALMTE2_SD_READONLY, "SD_READONLY");
+       if (err)
+               goto err4;
+       err = gpio_direction_input(GPIO_NR_PALMTE2_SD_READONLY);
+       if (err)
+               goto err5;
+
+       printk(KERN_DEBUG "%s: irq registered\n", __func__);
+
+       return 0;
+
+err5:
+       gpio_free(GPIO_NR_PALMTE2_SD_READONLY);
+err4:
+       gpio_free(GPIO_NR_PALMTE2_SD_POWER);
+err3:
+       free_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N), data);
+err2:
+       gpio_free(GPIO_NR_PALMTE2_SD_DETECT_N);
+err:
+       return err;
+}
+
+static void palmte2_mci_exit(struct device *dev, void *data)
+{
+       gpio_free(GPIO_NR_PALMTE2_SD_READONLY);
+       gpio_free(GPIO_NR_PALMTE2_SD_POWER);
+       free_irq(gpio_to_irq(GPIO_NR_PALMTE2_SD_DETECT_N), data);
+       gpio_free(GPIO_NR_PALMTE2_SD_DETECT_N);
+}
+
+static void palmte2_mci_power(struct device *dev, unsigned int vdd)
+{
+       struct pxamci_platform_data *p_d = dev->platform_data;
+       gpio_set_value(GPIO_NR_PALMTE2_SD_POWER, p_d->ocr_mask & (1 << vdd));
+}
+
+static int palmte2_mci_get_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO_NR_PALMTE2_SD_READONLY);
+}
+
+static struct pxamci_platform_data palmte2_mci_platform_data = {
+       .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34,
+       .setpower       = palmte2_mci_power,
+       .get_ro         = palmte2_mci_get_ro,
+       .init           = palmte2_mci_init,
+       .exit           = palmte2_mci_exit,
+};
+
+/******************************************************************************
+ * GPIO keys
+ ******************************************************************************/
+static struct gpio_keys_button palmte2_pxa_buttons[] = {
+       {KEY_F1,        GPIO_NR_PALMTE2_KEY_CONTACTS,   1, "Contacts" },
+       {KEY_F2,        GPIO_NR_PALMTE2_KEY_CALENDAR,   1, "Calendar" },
+       {KEY_F3,        GPIO_NR_PALMTE2_KEY_TASKS,      1, "Tasks" },
+       {KEY_F4,        GPIO_NR_PALMTE2_KEY_NOTES,      1, "Notes" },
+       {KEY_ENTER,     GPIO_NR_PALMTE2_KEY_CENTER,     1, "Center" },
+       {KEY_LEFT,      GPIO_NR_PALMTE2_KEY_LEFT,       1, "Left" },
+       {KEY_RIGHT,     GPIO_NR_PALMTE2_KEY_RIGHT,      1, "Right" },
+       {KEY_DOWN,      GPIO_NR_PALMTE2_KEY_DOWN,       1, "Down" },
+       {KEY_UP,        GPIO_NR_PALMTE2_KEY_UP,         1, "Up" },
+};
+
+static struct gpio_keys_platform_data palmte2_pxa_keys_data = {
+       .buttons        = palmte2_pxa_buttons,
+       .nbuttons       = ARRAY_SIZE(palmte2_pxa_buttons),
+};
+
+static struct platform_device palmte2_pxa_keys = {
+       .name   = "gpio-keys",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &palmte2_pxa_keys_data,
+       },
+};
+
+/******************************************************************************
+ * Backlight
+ ******************************************************************************/
+static int palmte2_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMTE2_BL_POWER, "BL POWER");
+       if (ret)
+               goto err;
+       ret = gpio_direction_output(GPIO_NR_PALMTE2_BL_POWER, 0);
+       if (ret)
+               goto err2;
+       ret = gpio_request(GPIO_NR_PALMTE2_LCD_POWER, "LCD POWER");
+       if (ret)
+               goto err2;
+       ret = gpio_direction_output(GPIO_NR_PALMTE2_LCD_POWER, 0);
+       if (ret)
+               goto err3;
+
+       return 0;
+err3:
+       gpio_free(GPIO_NR_PALMTE2_LCD_POWER);
+err2:
+       gpio_free(GPIO_NR_PALMTE2_BL_POWER);
+err:
+       return ret;
+}
+
+static int palmte2_backlight_notify(int brightness)
+{
+       gpio_set_value(GPIO_NR_PALMTE2_BL_POWER, brightness);
+       gpio_set_value(GPIO_NR_PALMTE2_LCD_POWER, brightness);
+       return brightness;
+}
+
+static void palmte2_backlight_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMTE2_BL_POWER);
+       gpio_free(GPIO_NR_PALMTE2_LCD_POWER);
+}
+
+static struct platform_pwm_backlight_data palmte2_backlight_data = {
+       .pwm_id         = 0,
+       .max_brightness = PALMTE2_MAX_INTENSITY,
+       .dft_brightness = PALMTE2_MAX_INTENSITY,
+       .pwm_period_ns  = PALMTE2_PERIOD_NS,
+       .init           = palmte2_backlight_init,
+       .notify         = palmte2_backlight_notify,
+       .exit           = palmte2_backlight_exit,
+};
+
+static struct platform_device palmte2_backlight = {
+       .name   = "pwm-backlight",
+       .dev    = {
+               .parent         = &pxa25x_device_pwm0.dev,
+               .platform_data  = &palmte2_backlight_data,
+       },
+};
+
+/******************************************************************************
+ * IrDA
+ ******************************************************************************/
+static int palmte2_irda_startup(struct device *dev)
+{
+       int err;
+       err = gpio_request(GPIO_NR_PALMTE2_IR_DISABLE, "IR DISABLE");
+       if (err)
+               goto err;
+       err = gpio_direction_output(GPIO_NR_PALMTE2_IR_DISABLE, 1);
+       if (err)
+               gpio_free(GPIO_NR_PALMTE2_IR_DISABLE);
+err:
+       return err;
+}
+
+static void palmte2_irda_shutdown(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMTE2_IR_DISABLE);
+}
+
+static void palmte2_irda_transceiver_mode(struct device *dev, int mode)
+{
+       gpio_set_value(GPIO_NR_PALMTE2_IR_DISABLE, mode & IR_OFF);
+       pxa2xx_transceiver_mode(dev, mode);
+}
+
+static struct pxaficp_platform_data palmte2_ficp_platform_data = {
+       .startup                = palmte2_irda_startup,
+       .shutdown               = palmte2_irda_shutdown,
+       .transceiver_cap        = IR_SIRMODE | IR_FIRMODE | IR_OFF,
+       .transceiver_mode       = palmte2_irda_transceiver_mode,
+};
+
+/******************************************************************************
+ * UDC
+ ******************************************************************************/
+static struct pxa2xx_udc_mach_info palmte2_udc_info __initdata = {
+       .gpio_vbus              = GPIO_NR_PALMTE2_USB_DETECT_N,
+       .gpio_vbus_inverted     = 1,
+       .gpio_pullup            = GPIO_NR_PALMTE2_USB_PULLUP,
+       .gpio_pullup_inverted   = 0,
+};
+
+/******************************************************************************
+ * Power supply
+ ******************************************************************************/
+static int power_supply_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMTE2_POWER_DETECT, "CABLE_STATE_AC");
+       if (ret)
+               goto err1;
+       ret = gpio_direction_input(GPIO_NR_PALMTE2_POWER_DETECT);
+       if (ret)
+               goto err2;
+
+       return 0;
+
+err2:
+       gpio_free(GPIO_NR_PALMTE2_POWER_DETECT);
+err1:
+       return ret;
+}
+
+static int palmte2_is_ac_online(void)
+{
+       return gpio_get_value(GPIO_NR_PALMTE2_POWER_DETECT);
+}
+
+static void power_supply_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMTE2_POWER_DETECT);
+}
+
+static char *palmte2_supplicants[] = {
+       "main-battery",
+};
+
+static struct pda_power_pdata power_supply_info = {
+       .init            = power_supply_init,
+       .is_ac_online    = palmte2_is_ac_online,
+       .exit            = power_supply_exit,
+       .supplied_to     = palmte2_supplicants,
+       .num_supplicants = ARRAY_SIZE(palmte2_supplicants),
+};
+
+static struct platform_device power_supply = {
+       .name = "pda-power",
+       .id   = -1,
+       .dev  = {
+               .platform_data = &power_supply_info,
+       },
+};
+
+/******************************************************************************
+ * WM97xx battery
+ ******************************************************************************/
+static struct wm97xx_batt_info wm97xx_batt_pdata = {
+       .batt_aux       = WM97XX_AUX_ID3,
+       .temp_aux       = WM97XX_AUX_ID2,
+       .charge_gpio    = -1,
+       .max_voltage    = PALMTE2_BAT_MAX_VOLTAGE,
+       .min_voltage    = PALMTE2_BAT_MIN_VOLTAGE,
+       .batt_mult      = 1000,
+       .batt_div       = 414,
+       .temp_mult      = 1,
+       .temp_div       = 1,
+       .batt_tech      = POWER_SUPPLY_TECHNOLOGY_LIPO,
+       .batt_name      = "main-batt",
+};
+
+/******************************************************************************
+ * Framebuffer
+ ******************************************************************************/
+static struct pxafb_mode_info palmte2_lcd_modes[] = {
+{
+       .pixclock       = 77757,
+       .xres           = 320,
+       .yres           = 320,
+       .bpp            = 16,
+
+       .left_margin    = 28,
+       .right_margin   = 7,
+       .upper_margin   = 7,
+       .lower_margin   = 5,
+
+       .hsync_len      = 4,
+       .vsync_len      = 1,
+},
+};
+
+static struct pxafb_mach_info palmte2_lcd_screen = {
+       .modes          = palmte2_lcd_modes,
+       .num_modes      = ARRAY_SIZE(palmte2_lcd_modes),
+       .lcd_conn       = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+};
+
+/******************************************************************************
+ * Machine init
+ ******************************************************************************/
+static struct platform_device *devices[] __initdata = {
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+       &palmte2_pxa_keys,
+#endif
+       &palmte2_backlight,
+       &power_supply,
+};
+
+/* setup udc GPIOs initial state */
+static void __init palmte2_udc_init(void)
+{
+       if (!gpio_request(GPIO_NR_PALMTE2_USB_PULLUP, "UDC Vbus")) {
+               gpio_direction_output(GPIO_NR_PALMTE2_USB_PULLUP, 1);
+               gpio_free(GPIO_NR_PALMTE2_USB_PULLUP);
+       }
+}
+
+static void __init palmte2_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(palmte2_pin_config));
+
+       set_pxa_fb_info(&palmte2_lcd_screen);
+       pxa_set_mci_info(&palmte2_mci_platform_data);
+       palmte2_udc_init();
+       pxa_set_udc_info(&palmte2_udc_info);
+       pxa_set_ac97_info(NULL);
+       pxa_set_ficp_info(&palmte2_ficp_platform_data);
+       wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
+
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(PALMTE2, "Palm Tungsten|E2")
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = palmte2_init
+MACHINE_END
index b490c09..59d0c1c 100644 (file)
@@ -93,10 +93,10 @@ static unsigned long palmtx_pin_config[] __initdata = {
        GPIO116_GPIO,   /* wifi ready */
 
        /* MATRIX KEYPAD */
-       GPIO100_KP_MKIN_0,
-       GPIO101_KP_MKIN_1,
-       GPIO102_KP_MKIN_2,
-       GPIO97_KP_MKIN_3,
+       GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
+       GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
        GPIO103_KP_MKOUT_0,
        GPIO104_KP_MKOUT_1,
        GPIO105_KP_MKOUT_2,
@@ -459,6 +459,33 @@ static struct pxafb_mach_info palmtx_lcd_screen = {
 };
 
 /******************************************************************************
+ * Power management - standby
+ ******************************************************************************/
+#ifdef CONFIG_PM
+static u32 *addr __initdata;
+static u32 resume[3] __initdata = {
+       0xe3a00101,     /* mov  r0,     #0x40000000 */
+       0xe380060f,     /* orr  r0, r0, #0x00f00000 */
+       0xe590f008,     /* ldr  pc, [r0, #0x08] */
+};
+
+static int __init palmtx_pm_init(void)
+{
+       int i;
+
+       /* this is where the bootloader jumps */
+       addr = phys_to_virt(PALMTX_STR_BASE);
+
+       for (i = 0; i < 3; i++)
+               addr[i] = resume[i];
+
+       return 0;
+}
+
+device_initcall(palmtx_pm_init);
+#endif
+
+/******************************************************************************
  * Machine init
  ******************************************************************************/
 static struct platform_device *devices[] __initdata = {
index 6e8ade6..afac5b6 100644 (file)
@@ -45,6 +45,7 @@
 #include <mach/udc.h>
 #include <mach/tosa_bt.h>
 #include <mach/pxa2xx_spi.h>
+#include <mach/audio.h>
 
 #include <asm/mach/arch.h>
 #include <mach/tosa.h>
@@ -914,6 +915,7 @@ static void __init tosa_init(void)
        pxa_set_udc_info(&udc_info);
        pxa_set_ficp_info(&tosa_ficp_platform_data);
        pxa_set_i2c_info(NULL);
+       pxa_set_ac97_info(NULL);
        platform_scoop_config = &tosa_pcmcia_config;
 
        pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
index 01bd767..4389c16 100644 (file)
@@ -409,8 +409,7 @@ static struct platform_device bast_sio = {
 static struct s3c2410_platform_i2c __initdata bast_i2c_info = {
        .flags          = 0,
        .slave_addr     = 0x10,
-       .bus_freq       = 100*1000,
-       .max_freq       = 130*1000,
+       .frequency      = 100*1000,
 };
 
 /* Asix AX88796 10/100 ethernet controller */
index 05a5e87..2b83f87 100644 (file)
@@ -340,8 +340,7 @@ static struct platform_device *n35_devices[] __initdata = {
 static struct s3c2410_platform_i2c n30_i2ccfg = {
        .flags          = 0,
        .slave_addr     = 0x10,
-       .bus_freq       = 10*1000,
-       .max_freq       = 10*1000,
+       .frequency      = 10*1000,
 };
 
 /* Lots of hardcoded stuff, but it sets up the hardware in a useful
index 72c266a..332bd32 100644 (file)
@@ -453,8 +453,7 @@ static struct spi_board_info __initdata jive_spi_devs[] = {
 /* I2C bus and device configuration. */
 
 static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = {
-       .max_freq       = 80 * 1000,
-       .bus_freq       = 50 * 1000,
+       .frequency      = 80 * 1000,
        .flags          = S3C_IICFLG_FILTER,
        .sda_delay      = 2,
 };
index b438fc4..e6344ec 100644 (file)
@@ -828,6 +828,17 @@ void __init reserve_node_zero(pg_data_t *pgdat)
                                BOOTMEM_DEFAULT);
        }
 
+       if (machine_is_palmld() || machine_is_palmtx()) {
+               reserve_bootmem_node(pgdat, 0xa0000000, 0x1000,
+                               BOOTMEM_EXCLUSIVE);
+               reserve_bootmem_node(pgdat, 0xa0200000, 0x1000,
+                               BOOTMEM_EXCLUSIVE);
+       }
+
+       if (machine_is_palmt5())
+               reserve_bootmem_node(pgdat, 0xa0200000, 0x1000,
+                               BOOTMEM_EXCLUSIVE);
+
 #ifdef CONFIG_SA1111
        /*
         * Because of the SA1111 DMA bug, we want to preserve our
index f724208..3c127aa 100644 (file)
@@ -119,7 +119,7 @@ static struct resource iop3xx_aau_resources[] = {
        }
 };
 
-static u64 iop3xx_adma_dmamask = DMA_32BIT_MASK;
+static u64 iop3xx_adma_dmamask = DMA_BIT_MASK(32);
 
 static struct iop_adma_platform_data iop3xx_dma_0_data = {
        .hw_id = DMA0_ID,
@@ -143,7 +143,7 @@ struct platform_device iop3xx_dma_0_channel = {
        .resource = iop3xx_dma_0_resources,
        .dev = {
                .dma_mask = &iop3xx_adma_dmamask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
                .platform_data = (void *) &iop3xx_dma_0_data,
        },
 };
@@ -155,7 +155,7 @@ struct platform_device iop3xx_dma_1_channel = {
        .resource = iop3xx_dma_1_resources,
        .dev = {
                .dma_mask = &iop3xx_adma_dmamask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
                .platform_data = (void *) &iop3xx_dma_1_data,
        },
 };
@@ -167,7 +167,7 @@ struct platform_device iop3xx_aau_channel = {
        .resource = iop3xx_aau_resources,
        .dev = {
                .dma_mask = &iop3xx_adma_dmamask,
-               .coherent_dma_mask = DMA_64BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(64),
                .platform_data = (void *) &iop3xx_aau_data,
        },
 };
diff --git a/arch/arm/plat-mxc/include/mach/i2c.h b/arch/arm/plat-mxc/include/mach/i2c.h
new file mode 100644 (file)
index 0000000..4a5dc5c
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * i2c.h - i.MX I2C driver header file
+ *
+ * Copyright (c) 2008, Darius Augulis <augulis.darius@gmail.com>
+ *
+ * This file is released under the GPLv2
+ */
+
+#ifndef __ASM_ARCH_I2C_H_
+#define __ASM_ARCH_I2C_H_
+
+/**
+ * struct imxi2c_platform_data - structure of platform data for MXC I2C driver
+ * @init:      Initialise gpio's and other board specific things
+ * @exit:      Free everything initialised by @init
+ * @bitrate:   Bus speed measured in Hz
+ *
+ **/
+struct imxi2c_platform_data {
+       int (*init)(struct device *dev);
+       void (*exit)(struct device *dev);
+       int bitrate;
+};
+
+#endif /* __ASM_ARCH_I2C_H_ */
index e0783e6..eca37d0 100644 (file)
 #define PHYS_OFFSET            UL(0x80000000)
 #endif
 
+#if defined(CONFIG_MX1_VIDEO)
+/*
+ * Increase size of DMA-consistent memory region.
+ * This is required for i.MX camera driver to capture at least four VGA frames.
+ */
+#define CONSISTENT_DMA_SIZE SZ_4M
+#endif /* CONFIG_MX1_VIDEO */
+
 #endif /* __ASM_ARCH_MXC_MEMORY_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/mx1_camera.h b/arch/arm/plat-mxc/include/mach/mx1_camera.h
new file mode 100644 (file)
index 0000000..4fd6c70
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * mx1_camera.h - i.MX1/i.MXL camera driver header file
+ *
+ * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+ * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
+ *
+ * Based on PXA camera.h file:
+ * Copyright (C) 2003, Intel Corporation
+ * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_CAMERA_H_
+#define __ASM_ARCH_CAMERA_H_
+
+#define MX1_CAMERA_DATA_HIGH   1
+#define MX1_CAMERA_PCLK_RISING 2
+#define MX1_CAMERA_VSYNC_HIGH  4
+
+extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end;
+
+/**
+ * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data
+ * @mclk_10khz:        master clock frequency in 10kHz units
+ * @flags:     MX1 camera platform flags
+ */
+struct mx1_camera_pdata {
+       unsigned long mclk_10khz;
+       unsigned long flags;
+};
+
+#endif /* __ASM_ARCH_CAMERA_H_ */
index fe32707..4283728 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/arch/arm/plat-s3c/dev-i2c0.c
  *
- * Copyright 2008 Simtec Electronics
+ * Copyright 2008,2009 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *     http://armlinux.simtec.co.uk/
  *
@@ -50,9 +50,8 @@ struct platform_device s3c_device_i2c0 = {
 static struct s3c2410_platform_i2c default_i2c_data0 __initdata = {
        .flags          = 0,
        .slave_addr     = 0x10,
-       .bus_freq       = 100*1000,
-       .max_freq       = 400*1000,
-       .sda_delay      = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON,
+       .frequency      = 100*1000,
+       .sda_delay      = 100,
 };
 
 void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
index 2387fbf..8349c46 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/arch/arm/plat-s3c/dev-i2c1.c
  *
- * Copyright 2008 Simtec Electronics
+ * Copyright 2008,2009 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *     http://armlinux.simtec.co.uk/
  *
@@ -47,9 +47,8 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = {
        .flags          = 0,
        .bus_num        = 1,
        .slave_addr     = 0x10,
-       .bus_freq       = 100*1000,
-       .max_freq       = 400*1000,
-       .sda_delay      = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON,
+       .frequency      = 100*1000,
+       .sda_delay      = 100,
 };
 
 void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
index dc1dfcb..67450f1 100644 (file)
@@ -1,9 +1,9 @@
-/* arch/arm/mach-s3c2410/include/mach/iic.h
+/* arch/arm/plat-s3c/include/plat/iic.h
  *
- * Copyright (c) 2004 Simtec Electronics
+ * Copyright 2004,2009 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *
- * S3C2410 - I2C Controller platfrom_device info
+ * S3C - I2C Controller platform_device info
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 
 #define S3C_IICFLG_FILTER      (1<<0)  /* enable s3c2440 filter */
 
-/* Notes:
- *     1) All frequencies are expressed in Hz
- *     2) A value of zero is `do not care`
-*/
-
+/**
+ *     struct s3c2410_platform_i2c - Platform data for s3c I2C.
+ *     @bus_num: The bus number to use (if possible).
+ *     @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER).
+ *     @slave_addr: The I2C address for the slave device (if enabled).
+ *     @frequency: The desired frequency in Hz of the bus.  This is
+ *                  guaranteed to not be exceeded.  If the caller does
+ *                  not care, use zero and the driver will select a
+ *                  useful default.
+ *     @sda_delay: The delay (in ns) applied to SDA edges.
+ *     @cfg_gpio: A callback to configure the pins for I2C operation.
+ */
 struct s3c2410_platform_i2c {
-       int             bus_num;        /* bus number to use */
+       int             bus_num;
        unsigned int    flags;
-       unsigned int    slave_addr;     /* slave address for controller */
-       unsigned long   bus_freq;       /* standard bus frequency */
-       unsigned long   max_freq;       /* max frequency for the bus */
-       unsigned long   min_freq;       /* min frequency for the bus */
-       unsigned int    sda_delay;      /* pclks (s3c2440 only) */
+       unsigned int    slave_addr;
+       unsigned long   frequency;
+       unsigned int    sda_delay;
 
        void    (*cfg_gpio)(struct platform_device *dev);
 };
index 559bbcb..776c3cb 100644 (file)
@@ -280,13 +280,13 @@ static struct resource hh_fpga0_resource[] = {
        },
 };
 
-static u64 hh_fpga0_dma_mask = DMA_32BIT_MASK;
+static u64 hh_fpga0_dma_mask = DMA_BIT_MASK(32);
 static struct platform_device hh_fpga0_device = {
        .name           = "hh_fpga",
        .id             = 0,
        .dev            = {
                .dma_mask = &hh_fpga0_dma_mask,
-               .coherent_dma_mask = DMA_32BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
        },
        .resource       = hh_fpga0_resource,
        .num_resources  = ARRAY_SIZE(hh_fpga0_resource),
index 7cc6537..eb9d4dc 100644 (file)
  * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
  */
 #define DEFINE_DEV(_name, _id)                                 \
-static u64 _name##_id##_dma_mask = DMA_32BIT_MASK;             \
+static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32);           \
 static struct platform_device _name##_id##_device = {          \
        .name           = #_name,                               \
        .id             = _id,                                  \
        .dev            = {                                     \
                .dma_mask = &_name##_id##_dma_mask,             \
-               .coherent_dma_mask = DMA_32BIT_MASK,            \
+               .coherent_dma_mask = DMA_BIT_MASK(32),          \
        },                                                      \
        .resource       = _name##_id##_resource,                \
        .num_resources  = ARRAY_SIZE(_name##_id##_resource),    \
 }
 #define DEFINE_DEV_DATA(_name, _id)                            \
-static u64 _name##_id##_dma_mask = DMA_32BIT_MASK;             \
+static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32);           \
 static struct platform_device _name##_id##_device = {          \
        .name           = #_name,                               \
        .id             = _id,                                  \
        .dev            = {                                     \
                .dma_mask = &_name##_id##_dma_mask,             \
                .platform_data  = &_name##_id##_data,           \
-               .coherent_dma_mask = DMA_32BIT_MASK,            \
+               .coherent_dma_mask = DMA_BIT_MASK(32),          \
        },                                                      \
        .resource       = _name##_id##_resource,                \
        .num_resources  = ARRAY_SIZE(_name##_id##_resource),    \
index 0292d58..aaeb4df 100644 (file)
@@ -11,6 +11,8 @@
 #ifndef _SPI_CHANNEL_H_
 #define _SPI_CHANNEL_H_
 
+#define MIN_SPI_BAUD_VAL       2
+
 #define SPI_READ              0
 #define SPI_WRITE             1
 
@@ -122,6 +124,9 @@ struct bfin5xx_spi_chip {
        u8 bits_per_word;
        u8 cs_change_per_word;
        u16 cs_chg_udelay; /* Some devices require 16-bit delays */
+       u32 cs_gpio;
+       /* Value to send if no TX value is supplied, usually 0x0 or 0xFFFF */
+       u16 idle_tx_val;
 };
 
 #endif /* _SPI_CHANNEL_H_ */
index f494272..e040e03 100644 (file)
@@ -337,7 +337,7 @@ int _access_ok(unsigned long addr, unsigned long size)
        if (addr >= memory_mtd_end && (addr + size) <= physical_mem_end)
                return 1;
 
-#ifdef CONFIG_ROMFS_MTD_FS
+#ifdef CONFIG_ROMFS_ON_MTD
        /* For XIP, allow user space to use pointers within the ROMFS.  */
        if (addr >= memory_mtd_start && (addr + size) <= memory_mtd_end)
                return 1;
index e21c1c3..0fb2ce5 100644 (file)
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
        struct uart_port port;
        unsigned int old_status;
+       int status_irq;
        unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        int tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
        unsigned long uart_base_addr;
        int uart_irq;
+       int uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        unsigned int uart_tx_dma_channel;
        unsigned int uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
         0xFFC00400,
         IRQ_UART0_RX,
+        IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
         CH_UART0_TX,
         CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
         0xFFC02000,
         IRQ_UART1_RX,
+        IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
         CH_UART1_TX,
         CH_UART1_RX,
index e8c41fd..a625659 100644 (file)
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
        struct uart_port port;
        unsigned int old_status;
+       int status_irq;
        unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        int tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
        unsigned long uart_base_addr;
        int uart_irq;
+       int uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        unsigned int uart_tx_dma_channel;
        unsigned int uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
         0xFFC00400,
         IRQ_UART0_RX,
+        IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
         CH_UART0_TX,
         CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
         0xFFC02000,
         IRQ_UART1_RX,
+        IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
         CH_UART1_TX,
         CH_UART1_RX,
@@ -167,29 +171,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-       peripheral_request(P_UART0_TX, DRIVER_NAME);
-       peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_UART1
-       peripheral_request(P_UART1_TX, DRIVER_NAME);
-       peripheral_request(P_UART1_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, DRIVER_NAME);
-               gpio_direction_input(uart->cts_pin);
-       }
-
-       if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, DRIVER_NAME);
-               gpio_direction_output(uart->rts_pin, 0);
-       }
-#endif
-}
index 5f517f5..a3789d7 100644 (file)
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -74,6 +74,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+       int                     status_irq;
        unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        int                     tx_done;
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
        unsigned long   uart_base_addr;
        int             uart_irq;
+       int             uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        unsigned int    uart_tx_dma_channel;
        unsigned int    uart_rx_dma_channel;
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC00400,
        IRQ_UART_RX,
+       IRQ_UART_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART_TX,
        CH_UART_RX,
@@ -142,23 +145,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-       peripheral_request(P_UART0_TX, DRIVER_NAME);
-       peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, DRIVER_NAME);
-               gpio_direction_input(uart->cts_pin);
-       }
-       if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, DRIVER_NAME);
-               gpio_direction_output(uart->rts_pin, 0);
-       }
-#endif
-}
index 9e34700..b86662f 100644 (file)
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+       int                     status_irq;
        unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        int                     tx_done;
@@ -99,7 +100,6 @@ struct bfin_serial_port {
        struct work_struct      tx_dma_workqueue;
 #endif
 #ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       struct timer_list       cts_timer;
        int             cts_pin;
        int             rts_pin;
 #endif
@@ -125,6 +125,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
        unsigned long   uart_base_addr;
        int             uart_irq;
+       int             uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        unsigned int    uart_tx_dma_channel;
        unsigned int    uart_rx_dma_channel;
@@ -140,6 +141,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC00400,
        IRQ_UART0_RX,
+       IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART0_TX,
        CH_UART0_RX,
@@ -154,6 +156,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC02000,
        IRQ_UART1_RX,
+       IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART1_TX,
        CH_UART1_RX,
@@ -167,29 +170,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-       peripheral_request(P_UART0_TX, DRIVER_NAME);
-       peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_UART1
-       peripheral_request(P_UART1_TX, DRIVER_NAME);
-       peripheral_request(P_UART1_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, DRIVER_NAME);
-               gpio_direction_input(uart->cts_pin);
-       }
-
-       if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, DRIVER_NAME);
-               gpio_direction_output(uart->rts_pin, 0);
-       }
-#endif
-}
index 3c2811e..c536551 100644 (file)
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -87,6 +87,7 @@
 struct bfin_serial_port {
        struct uart_port        port;
        unsigned int            old_status;
+       int                     status_irq;
        unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        int                     tx_done;
@@ -125,6 +126,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
        unsigned long   uart_base_addr;
        int             uart_irq;
+       int             uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        unsigned int    uart_tx_dma_channel;
        unsigned int    uart_rx_dma_channel;
@@ -140,6 +142,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC00400,
        IRQ_UART0_RX,
+       IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART0_TX,
        CH_UART0_RX,
@@ -154,6 +157,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC02000,
        IRQ_UART1_RX,
+       IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART1_TX,
        CH_UART1_RX,
index c05e79c..2d1b5fa 100644 (file)
 #define UART_PUT_CHAR(uart,v)   bfin_write16(((uart)->port.membase + OFFSET_THR),v)
 #define UART_PUT_DLL(uart,v)    bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
 #define UART_SET_IER(uart,v)    bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v)
-#define UART_CLEAR_IER(uart,v)    bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v)
+#define UART_CLEAR_IER(uart,v)  bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v)
 #define UART_PUT_DLH(uart,v)    bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
 #define UART_PUT_LSR(uart,v)   bfin_write16(((uart)->port.membase + OFFSET_LSR),v)
 #define UART_PUT_LCR(uart,v)    bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
 #define UART_CLEAR_LSR(uart)    bfin_write16(((uart)->port.membase + OFFSET_LSR), -1)
 #define UART_PUT_GCTL(uart,v)   bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
 #define UART_PUT_MCR(uart,v)    bfin_write16(((uart)->port.membase + OFFSET_MCR),v)
+#define UART_CLEAR_SCTS(uart)   bfin_write16(((uart)->port.membase + OFFSET_MSR),SCTS)
 
 #define UART_SET_DLAB(uart)     /* MMRs not muxed on BF54x */
 #define UART_CLEAR_DLAB(uart)   /* MMRs not muxed on BF54x */
 
 #define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
-#define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS))
-#define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS))
+#define UART_DISABLE_RTS(x) UART_PUT_MCR(x, UART_GET_MCR(x) & ~(ARTS|MRTS))
+#define UART_ENABLE_RTS(x) UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS | ARTS)
 #define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
 
-#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART2_CTSRTS)
-# define CONFIG_SERIAL_BFIN_CTSRTS
-
-# ifndef CONFIG_UART0_CTS_PIN
-#  define CONFIG_UART0_CTS_PIN -1
-# endif
-
-# ifndef CONFIG_UART0_RTS_PIN
-#  define CONFIG_UART0_RTS_PIN -1
-# endif
-
-# ifndef CONFIG_UART2_CTS_PIN
-#  define CONFIG_UART2_CTS_PIN -1
-# endif
-
-# ifndef CONFIG_UART2_RTS_PIN
-#  define CONFIG_UART2_RTS_PIN -1
-# endif
+#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) || \
+       defined(CONFIG_BFIN_UART2_CTSRTS) || defined(CONFIG_BFIN_UART3_CTSRTS)
+# define CONFIG_SERIAL_BFIN_HARD_CTSRTS
 #endif
 
 #define BFIN_UART_TX_FIFO_SIZE 2
@@ -91,6 +77,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+       int                     status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        int                     tx_done;
        int                     tx_count;
@@ -101,23 +88,24 @@ struct bfin_serial_port {
        unsigned int            rx_dma_channel;
        struct work_struct      tx_dma_workqueue;
 #endif
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       struct timer_list       cts_timer;
-       int             cts_pin;
-       int             rts_pin;
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       int                     scts;
+       int                     cts_pin;
+       int                     rts_pin;
 #endif
 };
 
 struct bfin_serial_res {
        unsigned long   uart_base_addr;
        int             uart_irq;
+       int             uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        unsigned int    uart_tx_dma_channel;
        unsigned int    uart_rx_dma_channel;
 #endif
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       int     uart_cts_pin;
-       int     uart_rts_pin;
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       int             uart_cts_pin;
+       int             uart_rts_pin;
 #endif
 };
 
@@ -126,13 +114,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC00400,
        IRQ_UART0_RX,
+       IRQ_UART0_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART0_TX,
        CH_UART0_RX,
 #endif
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       CONFIG_UART0_CTS_PIN,
-       CONFIG_UART0_RTS_PIN,
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       0,
+       0,
 #endif
        },
 #endif
@@ -140,13 +129,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC02000,
        IRQ_UART1_RX,
+       IRQ_UART1_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART1_TX,
        CH_UART1_RX,
 #endif
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       0,
-       0,
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       GPIO_PE10,
+       GPIO_PE9,
 #endif
        },
 #endif
@@ -154,13 +144,14 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC02100,
        IRQ_UART2_RX,
+       IRQ_UART2_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART2_TX,
        CH_UART2_RX,
 #endif
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       CONFIG_UART2_CTS_PIN,
-       CONFIG_UART2_RTS_PIN,
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       0,
+       0,
 #endif
        },
 #endif
@@ -168,61 +159,17 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC03100,
        IRQ_UART3_RX,
+       IRQ_UART3_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART3_TX,
        CH_UART3_RX,
 #endif
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       0,
-       0,
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       GPIO_PB3,
+       GPIO_PB2,
 #endif
        },
 #endif
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-#ifdef CONFIG_SERIAL_BFIN_UART0
-       peripheral_request(P_UART0_TX, DRIVER_NAME);
-       peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_UART1
-       peripheral_request(P_UART1_TX, DRIVER_NAME);
-       peripheral_request(P_UART1_RX, DRIVER_NAME);
-
-#ifdef CONFIG_BFIN_UART1_CTSRTS
-       peripheral_request(P_UART1_RTS, DRIVER_NAME);
-       peripheral_request(P_UART1_CTS, DRIVER_NAME);
-#endif
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_UART2
-       peripheral_request(P_UART2_TX, DRIVER_NAME);
-       peripheral_request(P_UART2_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_UART3
-       peripheral_request(P_UART3_TX, DRIVER_NAME);
-       peripheral_request(P_UART3_RX, DRIVER_NAME);
-
-#ifdef CONFIG_BFIN_UART3_CTSRTS
-       peripheral_request(P_UART3_RTS, DRIVER_NAME);
-       peripheral_request(P_UART3_CTS, DRIVER_NAME);
-#endif
-#endif
-       SSYNC();
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, DRIVER_NAME);
-               gpio_direction_input(uart->cts_pin);
-       }
-
-       if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, DRIVER_NAME);
-               gpio_direction_output(uart->rts_pin, 0);
-       }
-#endif
-}
index ca8c5f6..a1b5087 100644 (file)
@@ -53,9 +53,9 @@
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
-#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
-#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
-#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin))
+#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
 #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
 #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
 
@@ -74,6 +74,7 @@
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
+       int                     status_irq;
        unsigned int lsr;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        int                     tx_done;
@@ -116,6 +117,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
 struct bfin_serial_res {
        unsigned long   uart_base_addr;
        int             uart_irq;
+       int             uart_status_irq;
 #ifdef CONFIG_SERIAL_BFIN_DMA
        unsigned int    uart_tx_dma_channel;
        unsigned int    uart_rx_dma_channel;
@@ -130,6 +132,7 @@ struct bfin_serial_res bfin_serial_resource[] = {
        {
        0xFFC00400,
        IRQ_UART_RX,
+       IRQ_UART_ERROR,
 #ifdef CONFIG_SERIAL_BFIN_DMA
        CH_UART_TX,
        CH_UART_RX,
@@ -142,23 +145,3 @@ struct bfin_serial_res bfin_serial_resource[] = {
 };
 
 #define DRIVER_NAME "bfin-uart"
-
-static void bfin_serial_hw_init(struct bfin_serial_port *uart)
-{
-
-#ifdef CONFIG_SERIAL_BFIN_UART0
-       peripheral_request(P_UART0_TX, DRIVER_NAME);
-       peripheral_request(P_UART0_RX, DRIVER_NAME);
-#endif
-
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, DRIVER_NAME);
-               gpio_direction_input(uart->cts_pin);
-       }
-       if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, DRIVER_NAME);
-               gpio_direction_output(uart->rts_pin, 0);
-       }
-#endif
-}
index 4f4e525..35bbc18 100644 (file)
@@ -74,8 +74,9 @@
 #define TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
 #define FIOQSIZE       0x5460
 
-#define TIOCSERSETRS485 0x5461  /* enable rs-485 */
-#define TIOCSERWRRS485  0x5462  /* write rs-485 */
+#define TIOCSERSETRS485        0x5461  /* enable rs-485 (deprecated) */
+#define TIOCSERWRRS485 0x5462  /* write rs-485 */
+#define TIOCSRS485     0x5463  /* enable rs-485 */
 
 /* Used for packet mode */
 #define TIOCPKT_DATA            0
index c331c51..ad40f9f 100644 (file)
@@ -1,15 +1,13 @@
 /* RS-485 structures */
 
-/* RS-485 support */
-/* Used with ioctl() TIOCSERSETRS485 */
+/* Used with ioctl() TIOCSERSETRS485 for backward compatibility!
+ * XXX: Do not use it for new code!
+ */
 struct rs485_control {
         unsigned short rts_on_send;
         unsigned short rts_after_sent;
         unsigned long delay_rts_before_send;
         unsigned short enabled;
-#ifdef __KERNEL__
-        int disable_serial_loopback;
-#endif
 };
 
 /* Used with ioctl() TIOCSERWRRS485 */
index b0124e6..1265109 100644 (file)
@@ -4,6 +4,7 @@
 #include <asm/termbits.h>
 #include <asm/ioctls.h>
 #include <asm/rs485.h>
+#include <linux/serial.h>
 
 struct winsize {
        unsigned short ws_row;
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild
new file mode 100644 (file)
index 0000000..0f8956d
--- /dev/null
@@ -0,0 +1,5 @@
+include include/asm-generic/Kbuild.asm
+
+header-y += registers.h
+
+unifdef-y += termios.h
diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h
new file mode 100644 (file)
index 0000000..296c35c
--- /dev/null
@@ -0,0 +1,198 @@
+/* atomic.h: atomic operation emulation for FR-V
+ *
+ * For an explanation of how atomic ops work in this arch, see:
+ *   Documentation/frv/atomic-ops.txt
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_ATOMIC_H
+#define _ASM_ATOMIC_H
+
+#include <linux/types.h>
+#include <asm/spr-regs.h>
+#include <asm/system.h>
+
+#ifdef CONFIG_SMP
+#error not SMP safe
+#endif
+
+/*
+ * Atomic operations that C can't guarantee us.  Useful for
+ * resource counting etc..
+ *
+ * We do not have SMP systems, so we don't have to deal with that.
+ */
+
+/* Atomic operations are already serializing */
+#define smp_mb__before_atomic_dec()    barrier()
+#define smp_mb__after_atomic_dec()     barrier()
+#define smp_mb__before_atomic_inc()    barrier()
+#define smp_mb__after_atomic_inc()     barrier()
+
+#define ATOMIC_INIT(i)         { (i) }
+#define atomic_read(v)         ((v)->counter)
+#define atomic_set(v, i)       (((v)->counter) = (i))
+
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+static inline int atomic_add_return(int i, atomic_t *v)
+{
+       unsigned long val;
+
+       asm("0:                                         \n"
+           "   orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
+           "   ckeq            icc3,cc7                \n"
+           "   ld.p            %M0,%1                  \n"     /* LD.P/ORCR must be atomic */
+           "   orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
+           "   add%I2          %1,%2,%1                \n"
+           "   cst.p           %1,%M0          ,cc3,#1 \n"
+           "   corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* clear ICC3.Z if store happens */
+           "   beq             icc3,#0,0b              \n"
+           : "+U"(v->counter), "=&r"(val)
+           : "NPr"(i)
+           : "memory", "cc7", "cc3", "icc3"
+           );
+
+       return val;
+}
+
+static inline int atomic_sub_return(int i, atomic_t *v)
+{
+       unsigned long val;
+
+       asm("0:                                         \n"
+           "   orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
+           "   ckeq            icc3,cc7                \n"
+           "   ld.p            %M0,%1                  \n"     /* LD.P/ORCR must be atomic */
+           "   orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
+           "   sub%I2          %1,%2,%1                \n"
+           "   cst.p           %1,%M0          ,cc3,#1 \n"
+           "   corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* clear ICC3.Z if store happens */
+           "   beq             icc3,#0,0b              \n"
+           : "+U"(v->counter), "=&r"(val)
+           : "NPr"(i)
+           : "memory", "cc7", "cc3", "icc3"
+           );
+
+       return val;
+}
+
+#else
+
+extern int atomic_add_return(int i, atomic_t *v);
+extern int atomic_sub_return(int i, atomic_t *v);
+
+#endif
+
+static inline int atomic_add_negative(int i, atomic_t *v)
+{
+       return atomic_add_return(i, v) < 0;
+}
+
+static inline void atomic_add(int i, atomic_t *v)
+{
+       atomic_add_return(i, v);
+}
+
+static inline void atomic_sub(int i, atomic_t *v)
+{
+       atomic_sub_return(i, v);
+}
+
+static inline void atomic_inc(atomic_t *v)
+{
+       atomic_add_return(1, v);
+}
+
+static inline void atomic_dec(atomic_t *v)
+{
+       atomic_sub_return(1, v);
+}
+
+#define atomic_dec_return(v)           atomic_sub_return(1, (v))
+#define atomic_inc_return(v)           atomic_add_return(1, (v))
+
+#define atomic_sub_and_test(i,v)       (atomic_sub_return((i), (v)) == 0)
+#define atomic_dec_and_test(v)         (atomic_sub_return(1, (v)) == 0)
+#define atomic_inc_and_test(v)         (atomic_add_return(1, (v)) == 0)
+
+/*****************************************************************************/
+/*
+ * exchange value with memory
+ */
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+
+#define xchg(ptr, x)                                                           \
+({                                                                             \
+       __typeof__(ptr) __xg_ptr = (ptr);                                       \
+       __typeof__(*(ptr)) __xg_orig;                                           \
+                                                                               \
+       switch (sizeof(__xg_orig)) {                                            \
+       case 4:                                                                 \
+               asm volatile(                                                   \
+                       "swap%I0 %M0,%1"                                        \
+                       : "+m"(*__xg_ptr), "=r"(__xg_orig)                      \
+                       : "1"(x)                                                \
+                       : "memory"                                              \
+                       );                                                      \
+               break;                                                          \
+                                                                               \
+       default:                                                                \
+               __xg_orig = (__typeof__(__xg_orig))0;                           \
+               asm volatile("break");                                          \
+               break;                                                          \
+       }                                                                       \
+                                                                               \
+       __xg_orig;                                                              \
+})
+
+#else
+
+extern uint32_t __xchg_32(uint32_t i, volatile void *v);
+
+#define xchg(ptr, x)                                                                           \
+({                                                                                             \
+       __typeof__(ptr) __xg_ptr = (ptr);                                                       \
+       __typeof__(*(ptr)) __xg_orig;                                                           \
+                                                                                               \
+       switch (sizeof(__xg_orig)) {                                                            \
+       case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr);     break;  \
+       default:                                                                                \
+               __xg_orig = (__typeof__(__xg_orig))0;                                                                   \
+               asm volatile("break");                                                          \
+               break;                                                                          \
+       }                                                                                       \
+       __xg_orig;                                                                              \
+})
+
+#endif
+
+#define tas(ptr) (xchg((ptr), 1))
+
+#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
+
+static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
+{
+       int c, old;
+       c = atomic_read(v);
+       for (;;) {
+               if (unlikely(c == (u)))
+                       break;
+               old = atomic_cmpxchg((v), c, c + (a));
+               if (likely(old == c))
+                       break;
+               c = old;
+       }
+       return c != (u);
+}
+
+#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+
+#include <asm-generic/atomic.h>
+#endif /* _ASM_ATOMIC_H */
diff --git a/arch/frv/include/asm/auxvec.h b/arch/frv/include/asm/auxvec.h
new file mode 100644 (file)
index 0000000..0771077
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef __FRV_AUXVEC_H
+#define __FRV_AUXVEC_H
+
+#endif
diff --git a/arch/frv/include/asm/ax88796.h b/arch/frv/include/asm/ax88796.h
new file mode 100644 (file)
index 0000000..637e980
--- /dev/null
@@ -0,0 +1,22 @@
+/* ax88796.h: access points to the driver for the AX88796 NE2000 clone
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_AX88796_H
+#define _ASM_AX88796_H
+
+#include <asm/mb-regs.h>
+
+#define AX88796_IOADDR         (__region_CS1 + 0x200)
+#define AX88796_IRQ            IRQ_CPU_EXTERNAL7
+#define AX88796_FULL_DUPLEX    0                       /* force full duplex */
+#define AX88796_BUS_INFO       "CS1#+0x200"            /* bus info for ethtool */
+
+#endif /* _ASM_AX88796_H */
diff --git a/arch/frv/include/asm/bitops.h b/arch/frv/include/asm/bitops.h
new file mode 100644 (file)
index 0000000..287f6f6
--- /dev/null
@@ -0,0 +1,412 @@
+/* bitops.h: bit operations for the Fujitsu FR-V CPUs
+ *
+ * For an explanation of how atomic ops work in this arch, see:
+ *   Documentation/frv/atomic-ops.txt
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_BITOPS_H
+#define _ASM_BITOPS_H
+
+#include <linux/compiler.h>
+#include <asm/byteorder.h>
+
+#ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
+#include <asm-generic/bitops/ffz.h>
+
+/*
+ * clear_bit() doesn't provide any barrier for the compiler.
+ */
+#define smp_mb__before_clear_bit()     barrier()
+#define smp_mb__after_clear_bit()      barrier()
+
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+static inline
+unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v)
+{
+       unsigned long old, tmp;
+
+       asm volatile(
+               "0:                                             \n"
+               "       orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
+               "       ckeq            icc3,cc7                \n"
+               "       ld.p            %M0,%1                  \n"     /* LD.P/ORCR are atomic */
+               "       orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
+               "       and%I3          %1,%3,%2                \n"
+               "       cst.p           %2,%M0          ,cc3,#1 \n"     /* if store happens... */
+               "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* ... clear ICC3.Z */
+               "       beq             icc3,#0,0b              \n"
+               : "+U"(*v), "=&r"(old), "=r"(tmp)
+               : "NPr"(~mask)
+               : "memory", "cc7", "cc3", "icc3"
+               );
+
+       return old;
+}
+
+static inline
+unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v)
+{
+       unsigned long old, tmp;
+
+       asm volatile(
+               "0:                                             \n"
+               "       orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
+               "       ckeq            icc3,cc7                \n"
+               "       ld.p            %M0,%1                  \n"     /* LD.P/ORCR are atomic */
+               "       orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
+               "       or%I3           %1,%3,%2                \n"
+               "       cst.p           %2,%M0          ,cc3,#1 \n"     /* if store happens... */
+               "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* ... clear ICC3.Z */
+               "       beq             icc3,#0,0b              \n"
+               : "+U"(*v), "=&r"(old), "=r"(tmp)
+               : "NPr"(mask)
+               : "memory", "cc7", "cc3", "icc3"
+               );
+
+       return old;
+}
+
+static inline
+unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v)
+{
+       unsigned long old, tmp;
+
+       asm volatile(
+               "0:                                             \n"
+               "       orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
+               "       ckeq            icc3,cc7                \n"
+               "       ld.p            %M0,%1                  \n"     /* LD.P/ORCR are atomic */
+               "       orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
+               "       xor%I3          %1,%3,%2                \n"
+               "       cst.p           %2,%M0          ,cc3,#1 \n"     /* if store happens... */
+               "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* ... clear ICC3.Z */
+               "       beq             icc3,#0,0b              \n"
+               : "+U"(*v), "=&r"(old), "=r"(tmp)
+               : "NPr"(mask)
+               : "memory", "cc7", "cc3", "icc3"
+               );
+
+       return old;
+}
+
+#else
+
+extern unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v);
+extern unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v);
+extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v);
+
+#endif
+
+#define atomic_clear_mask(mask, v)     atomic_test_and_ANDNOT_mask((mask), (v))
+#define atomic_set_mask(mask, v)       atomic_test_and_OR_mask((mask), (v))
+
+static inline int test_and_clear_bit(int nr, volatile void *addr)
+{
+       volatile unsigned long *ptr = addr;
+       unsigned long mask = 1UL << (nr & 31);
+       ptr += nr >> 5;
+       return (atomic_test_and_ANDNOT_mask(mask, ptr) & mask) != 0;
+}
+
+static inline int test_and_set_bit(int nr, volatile void *addr)
+{
+       volatile unsigned long *ptr = addr;
+       unsigned long mask = 1UL << (nr & 31);
+       ptr += nr >> 5;
+       return (atomic_test_and_OR_mask(mask, ptr) & mask) != 0;
+}
+
+static inline int test_and_change_bit(int nr, volatile void *addr)
+{
+       volatile unsigned long *ptr = addr;
+       unsigned long mask = 1UL << (nr & 31);
+       ptr += nr >> 5;
+       return (atomic_test_and_XOR_mask(mask, ptr) & mask) != 0;
+}
+
+static inline void clear_bit(int nr, volatile void *addr)
+{
+       test_and_clear_bit(nr, addr);
+}
+
+static inline void set_bit(int nr, volatile void *addr)
+{
+       test_and_set_bit(nr, addr);
+}
+
+static inline void change_bit(int nr, volatile void * addr)
+{
+       test_and_change_bit(nr, addr);
+}
+
+static inline void __clear_bit(int nr, volatile void * addr)
+{
+       volatile unsigned long *a = addr;
+       int mask;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 31);
+       *a &= ~mask;
+}
+
+static inline void __set_bit(int nr, volatile void * addr)
+{
+       volatile unsigned long *a = addr;
+       int mask;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 31);
+       *a |= mask;
+}
+
+static inline void __change_bit(int nr, volatile void *addr)
+{
+       volatile unsigned long *a = addr;
+       int mask;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 31);
+       *a ^= mask;
+}
+
+static inline int __test_and_clear_bit(int nr, volatile void * addr)
+{
+       volatile unsigned long *a = addr;
+       int mask, retval;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 31);
+       retval = (mask & *a) != 0;
+       *a &= ~mask;
+       return retval;
+}
+
+static inline int __test_and_set_bit(int nr, volatile void * addr)
+{
+       volatile unsigned long *a = addr;
+       int mask, retval;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 31);
+       retval = (mask & *a) != 0;
+       *a |= mask;
+       return retval;
+}
+
+static inline int __test_and_change_bit(int nr, volatile void * addr)
+{
+       volatile unsigned long *a = addr;
+       int mask, retval;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 31);
+       retval = (mask & *a) != 0;
+       *a ^= mask;
+       return retval;
+}
+
+/*
+ * This routine doesn't need to be atomic.
+ */
+static inline int __constant_test_bit(int nr, const volatile void * addr)
+{
+       return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
+}
+
+static inline int __test_bit(int nr, const volatile void * addr)
+{
+       int     * a = (int *) addr;
+       int     mask;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 0x1f);
+       return ((mask & *a) != 0);
+}
+
+#define test_bit(nr,addr) \
+(__builtin_constant_p(nr) ? \
+ __constant_test_bit((nr),(addr)) : \
+ __test_bit((nr),(addr)))
+
+#include <asm-generic/bitops/find.h>
+
+/**
+ * fls - find last bit set
+ * @x: the word to search
+ *
+ * This is defined the same way as ffs:
+ * - return 32..1 to indicate bit 31..0 most significant bit set
+ * - return 0 to indicate no bits set
+ */
+#define fls(x)                                         \
+({                                                     \
+       int bit;                                        \
+                                                       \
+       asm("   subcc   %1,gr0,gr0,icc0         \n"     \
+           "   ckne    icc0,cc4                \n"     \
+           "   cscan.p %1,gr0,%0       ,cc4,#1 \n"     \
+           "   csub    %0,%0,%0        ,cc4,#0 \n"     \
+           "   csub    %2,%0,%0        ,cc4,#1 \n"     \
+           : "=&r"(bit)                                \
+           : "r"(x), "r"(32)                           \
+           : "icc0", "cc4"                             \
+           );                                          \
+                                                       \
+       bit;                                            \
+})
+
+/**
+ * fls64 - find last bit set in a 64-bit value
+ * @n: the value to search
+ *
+ * This is defined the same way as ffs:
+ * - return 64..1 to indicate bit 63..0 most significant bit set
+ * - return 0 to indicate no bits set
+ */
+static inline __attribute__((const))
+int fls64(u64 n)
+{
+       union {
+               u64 ll;
+               struct { u32 h, l; };
+       } _;
+       int bit, x, y;
+
+       _.ll = n;
+
+       asm("   subcc.p         %3,gr0,gr0,icc0         \n"
+           "   subcc           %4,gr0,gr0,icc1         \n"
+           "   ckne            icc0,cc4                \n"
+           "   ckne            icc1,cc5                \n"
+           "   norcr           cc4,cc5,cc6             \n"
+           "   csub.p          %0,%0,%0        ,cc6,1  \n"
+           "   orcr            cc5,cc4,cc4             \n"
+           "   andcr           cc4,cc5,cc4             \n"
+           "   cscan.p         %3,gr0,%0       ,cc4,0  \n"
+           "   setlos          #64,%1                  \n"
+           "   cscan.p         %4,gr0,%0       ,cc4,1  \n"
+           "   setlos          #32,%2                  \n"
+           "   csub.p          %1,%0,%0        ,cc4,0  \n"
+           "   csub            %2,%0,%0        ,cc4,1  \n"
+           : "=&r"(bit), "=r"(x), "=r"(y)
+           : "0r"(_.h), "r"(_.l)
+           : "icc0", "icc1", "cc4", "cc5", "cc6"
+           );
+       return bit;
+
+}
+
+/**
+ * ffs - find first bit set
+ * @x: the word to search
+ *
+ * - return 32..1 to indicate bit 31..0 most least significant bit set
+ * - return 0 to indicate no bits set
+ */
+static inline __attribute__((const))
+int ffs(int x)
+{
+       /* Note: (x & -x) gives us a mask that is the least significant
+        * (rightmost) 1-bit of the value in x.
+        */
+       return fls(x & -x);
+}
+
+/**
+ * __ffs - find first bit set
+ * @x: the word to search
+ *
+ * - return 31..0 to indicate bit 31..0 most least significant bit set
+ * - if no bits are set in x, the result is undefined
+ */
+static inline __attribute__((const))
+int __ffs(unsigned long x)
+{
+       int bit;
+       asm("scan %1,gr0,%0" : "=r"(bit) : "r"(x & -x));
+       return 31 - bit;
+}
+
+/**
+ * __fls - find last (most-significant) set bit in a long word
+ * @word: the word to search
+ *
+ * Undefined if no set bit exists, so code should check against 0 first.
+ */
+static inline unsigned long __fls(unsigned long word)
+{
+       unsigned long bit;
+       asm("scan %1,gr0,%0" : "=r"(bit) : "r"(word));
+       return bit;
+}
+
+/*
+ * special slimline version of fls() for calculating ilog2_u32()
+ * - note: no protection against n == 0
+ */
+#define ARCH_HAS_ILOG2_U32
+static inline __attribute__((const))
+int __ilog2_u32(u32 n)
+{
+       int bit;
+       asm("scan %1,gr0,%0" : "=r"(bit) : "r"(n));
+       return 31 - bit;
+}
+
+/*
+ * special slimline version of fls64() for calculating ilog2_u64()
+ * - note: no protection against n == 0
+ */
+#define ARCH_HAS_ILOG2_U64
+static inline __attribute__((const))
+int __ilog2_u64(u64 n)
+{
+       union {
+               u64 ll;
+               struct { u32 h, l; };
+       } _;
+       int bit, x, y;
+
+       _.ll = n;
+
+       asm("   subcc           %3,gr0,gr0,icc0         \n"
+           "   ckeq            icc0,cc4                \n"
+           "   cscan.p         %3,gr0,%0       ,cc4,0  \n"
+           "   setlos          #63,%1                  \n"
+           "   cscan.p         %4,gr0,%0       ,cc4,1  \n"
+           "   setlos          #31,%2                  \n"
+           "   csub.p          %1,%0,%0        ,cc4,0  \n"
+           "   csub            %2,%0,%0        ,cc4,1  \n"
+           : "=&r"(bit), "=r"(x), "=r"(y)
+           : "0r"(_.h), "r"(_.l)
+           : "icc0", "cc4"
+           );
+       return bit;
+}
+
+#include <asm-generic/bitops/sched.h>
+#include <asm-generic/bitops/hweight.h>
+#include <asm-generic/bitops/lock.h>
+
+#include <asm-generic/bitops/ext2-non-atomic.h>
+
+#define ext2_set_bit_atomic(lock,nr,addr)      test_and_set_bit  ((nr) ^ 0x18, (addr))
+#define ext2_clear_bit_atomic(lock,nr,addr)    test_and_clear_bit((nr) ^ 0x18, (addr))
+
+#include <asm-generic/bitops/minix-le.h>
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_BITOPS_H */
diff --git a/arch/frv/include/asm/bug.h b/arch/frv/include/asm/bug.h
new file mode 100644 (file)
index 0000000..6b1b44d
--- /dev/null
@@ -0,0 +1,53 @@
+/* bug.h: FRV bug trapping
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_BUG_H
+#define _ASM_BUG_H
+
+#include <linux/linkage.h>
+
+#ifdef CONFIG_BUG
+/*
+ * Tell the user there is some problem.
+ */
+extern asmlinkage void __debug_bug_trap(int signr);
+
+#ifdef CONFIG_NO_KERNEL_MSG
+#define        _debug_bug_printk()
+#else
+extern void __debug_bug_printk(const char *file, unsigned line);
+#define        _debug_bug_printk() __debug_bug_printk(__FILE__, __LINE__)
+#endif
+
+#define _debug_bug_trap(signr)                 \
+do {                                           \
+       __debug_bug_trap(signr);                \
+       asm volatile("nop");                    \
+} while(0)
+
+#define HAVE_ARCH_BUG
+#define BUG()                                  \
+do {                                           \
+       _debug_bug_printk();                    \
+       _debug_bug_trap(6 /*SIGABRT*/);         \
+} while (0)
+
+#ifdef CONFIG_GDBSTUB
+#define HAVE_ARCH_KGDB_RAISE
+#define kgdb_raise(signr) do { _debug_bug_trap(signr); } while(0)
+
+#define HAVE_ARCH_KGDB_BAD_PAGE
+#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
+#endif
+#endif
+
+#include <asm-generic/bug.h>
+
+#endif
diff --git a/arch/frv/include/asm/bugs.h b/arch/frv/include/asm/bugs.h
new file mode 100644 (file)
index 0000000..f2382be
--- /dev/null
@@ -0,0 +1,14 @@
+/* bugs.h: arch bug checking entry
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+static inline void check_bugs(void)
+{
+}
diff --git a/arch/frv/include/asm/busctl-regs.h b/arch/frv/include/asm/busctl-regs.h
new file mode 100644 (file)
index 0000000..bb0ff48
--- /dev/null
@@ -0,0 +1,41 @@
+/* busctl-regs.h: FR400-series CPU bus controller registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_BUSCTL_REGS_H
+#define _ASM_BUSCTL_REGS_H
+
+/* bus controller registers */
+#define __get_LGCR()   ({ *(volatile unsigned long *)(0xfe000010); })
+#define __get_LMAICR() ({ *(volatile unsigned long *)(0xfe000030); })
+#define __get_LEMBR()  ({ *(volatile unsigned long *)(0xfe000040); })
+#define __get_LEMAM()  ({ *(volatile unsigned long *)(0xfe000048); })
+#define __get_LCR(R)   ({ *(volatile unsigned long *)(0xfe000100 + 8*(R)); })
+#define __get_LSBR(R)  ({ *(volatile unsigned long *)(0xfe000c00 + 8*(R)); })
+#define __get_LSAM(R)  ({ *(volatile unsigned long *)(0xfe000d00 + 8*(R)); })
+
+#define __set_LGCR(V)  do { *(volatile unsigned long *)(0xfe000010) = (V); } while(0)
+#define __set_LMAICR(V)        do { *(volatile unsigned long *)(0xfe000030) = (V); } while(0)
+#define __set_LEMBR(V) do { *(volatile unsigned long *)(0xfe000040) = (V); } while(0)
+#define __set_LEMAM(V) do { *(volatile unsigned long *)(0xfe000048) = (V); } while(0)
+#define __set_LCR(R,V) do { *(volatile unsigned long *)(0xfe000100 + 8*(R)) = (V); } while(0)
+#define __set_LSBR(R,V)        do { *(volatile unsigned long *)(0xfe000c00 + 8*(R)) = (V); } while(0)
+#define __set_LSAM(R,V)        do { *(volatile unsigned long *)(0xfe000d00 + 8*(R)) = (V); } while(0)
+
+/* FR401 SDRAM controller registers */
+#define __get_DBR(R)   ({ *(volatile unsigned long *)(0xfe000e00 + 8*(R)); })
+#define __get_DAM(R)   ({ *(volatile unsigned long *)(0xfe000f00 + 8*(R)); })
+
+/* FR551 SDRAM controller registers */
+#define __get_DARS(R)  ({ *(volatile unsigned long *)(0xfeff0100 + 8*(R)); })
+#define __get_DAMK(R)  ({ *(volatile unsigned long *)(0xfeff0110 + 8*(R)); })
+
+
+#endif /* _ASM_BUSCTL_REGS_H */
diff --git a/arch/frv/include/asm/byteorder.h b/arch/frv/include/asm/byteorder.h
new file mode 100644 (file)
index 0000000..f29b759
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_BYTEORDER_H
+#define _ASM_BYTEORDER_H
+
+#include <linux/byteorder/big_endian.h>
+
+#endif /* _ASM_BYTEORDER_H */
diff --git a/arch/frv/include/asm/cache.h b/arch/frv/include/asm/cache.h
new file mode 100644 (file)
index 0000000..2797163
--- /dev/null
@@ -0,0 +1,23 @@
+/* cache.h: FRV cache definitions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef __ASM_CACHE_H
+#define __ASM_CACHE_H
+
+
+/* bytes per L1 cache line */
+#define L1_CACHE_SHIFT         (CONFIG_FRV_L1_CACHE_SHIFT)
+#define L1_CACHE_BYTES         (1 << L1_CACHE_SHIFT)
+
+#define __cacheline_aligned    __attribute__((aligned(L1_CACHE_BYTES)))
+#define ____cacheline_aligned  __attribute__((aligned(L1_CACHE_BYTES)))
+
+#endif
diff --git a/arch/frv/include/asm/cacheflush.h b/arch/frv/include/asm/cacheflush.h
new file mode 100644 (file)
index 0000000..432a69e
--- /dev/null
@@ -0,0 +1,104 @@
+/* cacheflush.h: FRV cache flushing routines
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_CACHEFLUSH_H
+#define _ASM_CACHEFLUSH_H
+
+/* Keep includes the same across arches.  */
+#include <linux/mm.h>
+
+/*
+ * virtually-indexed cache management (our cache is physically indexed)
+ */
+#define flush_cache_all()                      do {} while(0)
+#define flush_cache_mm(mm)                     do {} while(0)
+#define flush_cache_dup_mm(mm)                 do {} while(0)
+#define flush_cache_range(mm, start, end)      do {} while(0)
+#define flush_cache_page(vma, vmaddr, pfn)     do {} while(0)
+#define flush_cache_vmap(start, end)           do {} while(0)
+#define flush_cache_vunmap(start, end)         do {} while(0)
+#define flush_dcache_mmap_lock(mapping)                do {} while(0)
+#define flush_dcache_mmap_unlock(mapping)      do {} while(0)
+
+/*
+ * physically-indexed cache management
+ * - see arch/frv/lib/cache.S
+ */
+extern void frv_dcache_writeback(unsigned long start, unsigned long size);
+extern void frv_cache_invalidate(unsigned long start, unsigned long size);
+extern void frv_icache_invalidate(unsigned long start, unsigned long size);
+extern void frv_cache_wback_inv(unsigned long start, unsigned long size);
+
+static inline void __flush_cache_all(void)
+{
+       asm volatile("  dcef    @(gr0,gr0),#1   \n"
+                    "  icei    @(gr0,gr0),#1   \n"
+                    "  membar                  \n"
+                    : : : "memory"
+                    );
+}
+
+/* dcache/icache coherency... */
+#ifdef CONFIG_MMU
+extern void flush_dcache_page(struct page *page);
+#else
+static inline void flush_dcache_page(struct page *page)
+{
+       unsigned long addr = page_to_phys(page);
+       frv_dcache_writeback(addr, addr + PAGE_SIZE);
+}
+#endif
+
+static inline void flush_page_to_ram(struct page *page)
+{
+       flush_dcache_page(page);
+}
+
+static inline void flush_icache(void)
+{
+       __flush_cache_all();
+}
+
+static inline void flush_icache_range(unsigned long start, unsigned long end)
+{
+       frv_cache_wback_inv(start, end);
+}
+
+#ifdef CONFIG_MMU
+extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
+                                   unsigned long start, unsigned long len);
+#else
+static inline void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
+                                          unsigned long start, unsigned long len)
+{
+       frv_cache_wback_inv(start, start + len);
+}
+#endif
+
+static inline void flush_icache_page(struct vm_area_struct *vma, struct page *page)
+{
+       flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE);
+}
+
+/*
+ * permit ptrace to access another process's address space through the icache
+ * and the dcache
+ */
+#define copy_to_user_page(vma, page, vaddr, dst, src, len)     \
+do {                                                           \
+       memcpy((dst), (src), (len));                            \
+       flush_icache_user_range((vma), (page), (vaddr), (len)); \
+} while(0)
+
+#define copy_from_user_page(vma, page, vaddr, dst, src, len)   \
+       memcpy((dst), (src), (len))
+
+#endif /* _ASM_CACHEFLUSH_H */
diff --git a/arch/frv/include/asm/checksum.h b/arch/frv/include/asm/checksum.h
new file mode 100644 (file)
index 0000000..269da09
--- /dev/null
@@ -0,0 +1,180 @@
+/* checksum.h: FRV checksumming
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_CHECKSUM_H
+#define _ASM_CHECKSUM_H
+
+#include <linux/in6.h>
+
+/*
+ * computes the checksum of a memory block at buff, length len,
+ * and adds in "sum" (32-bit)
+ *
+ * returns a 32-bit number suitable for feeding into itself
+ * or csum_tcpudp_magic
+ *
+ * this function must be called with even lengths, except
+ * for the last fragment, which may be odd
+ *
+ * it's best to have buff aligned on a 32-bit boundary
+ */
+__wsum csum_partial(const void *buff, int len, __wsum sum);
+
+/*
+ * the same as csum_partial, but copies from src while it
+ * checksums
+ *
+ * here even more important to align src and dst on a 32-bit (or even
+ * better 64-bit) boundary
+ */
+__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
+
+/*
+ * the same as csum_partial_copy, but copies from user space.
+ *
+ * here even more important to align src and dst on a 32-bit (or even
+ * better 64-bit) boundary
+ */
+extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
+                                               int len, __wsum sum, int *csum_err);
+
+/*
+ *     This is a version of ip_compute_csum() optimized for IP headers,
+ *     which always checksum on 4 octet boundaries.
+ *
+ */
+static inline
+__sum16 ip_fast_csum(const void *iph, unsigned int ihl)
+{
+       unsigned int tmp, inc, sum = 0;
+
+       asm("   addcc           gr0,gr0,gr0,icc0\n" /* clear icc0.C */
+           "   subi            %1,#4,%1        \n"
+           "0:                                 \n"
+           "   ldu.p           @(%1,%3),%4     \n"
+           "   subicc          %2,#1,%2,icc1   \n"
+           "   addxcc.p        %4,%0,%0,icc0   \n"
+           "   bhi             icc1,#2,0b      \n"
+
+           /* fold the 33-bit result into 16-bits */
+           "   addxcc          gr0,%0,%0,icc0  \n"
+           "   srli            %0,#16,%1       \n"
+           "   sethi           #0,%0           \n"
+           "   add             %1,%0,%0        \n"
+           "   srli            %0,#16,%1       \n"
+           "   add             %1,%0,%0        \n"
+
+           : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp)
+           : "0" (sum), "1" (iph), "2" (ihl), "3" (4),
+           "m"(*(volatile struct { int _[100]; } *)iph)
+           : "icc0", "icc1", "memory"
+           );
+
+       return (__force __sum16)~sum;
+}
+
+/*
+ *     Fold a partial checksum
+ */
+static inline __sum16 csum_fold(__wsum sum)
+{
+       unsigned int tmp;
+
+       asm("   srli            %0,#16,%1       \n"
+           "   sethi           #0,%0           \n"
+           "   add             %1,%0,%0        \n"
+           "   srli            %0,#16,%1       \n"
+           "   add             %1,%0,%0        \n"
+           : "=r"(sum), "=&r"(tmp)
+           : "0"(sum)
+           );
+
+       return (__force __sum16)~sum;
+}
+
+/*
+ * computes the checksum of the TCP/UDP pseudo-header
+ * returns a 16-bit checksum, already complemented
+ */
+static inline __wsum
+csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
+                 unsigned short proto, __wsum sum)
+{
+       asm("   addcc           %1,%0,%0,icc0   \n"
+           "   addxcc          %2,%0,%0,icc0   \n"
+           "   addxcc          %3,%0,%0,icc0   \n"
+           "   addxcc          gr0,%0,%0,icc0  \n"
+           : "=r" (sum)
+           : "r" (daddr), "r" (saddr), "r" (len + proto), "0"(sum)
+           : "icc0"
+           );
+       return sum;
+}
+
+static inline __sum16
+csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
+                 unsigned short proto, __wsum sum)
+{
+       return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
+}
+
+/*
+ * this routine is used for miscellaneous IP-like checksums, mainly
+ * in icmp.c
+ */
+extern __sum16 ip_compute_csum(const void *buff, int len);
+
+#define _HAVE_ARCH_IPV6_CSUM
+static inline __sum16
+csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
+               __u32 len, unsigned short proto, __wsum sum)
+{
+       unsigned long tmp, tmp2;
+
+       asm("   addcc           %2,%0,%0,icc0   \n"
+
+           /* add up the source addr */
+           "   ldi             @(%3,0),%1      \n"
+           "   addxcc          %1,%0,%0,icc0   \n"
+           "   ldi             @(%3,4),%2      \n"
+           "   addxcc          %2,%0,%0,icc0   \n"
+           "   ldi             @(%3,8),%1      \n"
+           "   addxcc          %1,%0,%0,icc0   \n"
+           "   ldi             @(%3,12),%2     \n"
+           "   addxcc          %2,%0,%0,icc0   \n"
+
+           /* add up the dest addr */
+           "   ldi             @(%4,0),%1      \n"
+           "   addxcc          %1,%0,%0,icc0   \n"
+           "   ldi             @(%4,4),%2      \n"
+           "   addxcc          %2,%0,%0,icc0   \n"
+           "   ldi             @(%4,8),%1      \n"
+           "   addxcc          %1,%0,%0,icc0   \n"
+           "   ldi             @(%4,12),%2     \n"
+           "   addxcc          %2,%0,%0,icc0   \n"
+
+           /* fold the 33-bit result into 16-bits */
+           "   addxcc          gr0,%0,%0,icc0  \n"
+           "   srli            %0,#16,%1       \n"
+           "   sethi           #0,%0           \n"
+           "   add             %1,%0,%0        \n"
+           "   srli            %0,#16,%1       \n"
+           "   add             %1,%0,%0        \n"
+
+           : "=r" (sum), "=&r" (tmp), "=r" (tmp2)
+           : "r" (saddr), "r" (daddr), "0" (sum), "2" (len + proto)
+           : "icc0"
+           );
+
+       return (__force __sum16)~sum;
+}
+
+#endif /* _ASM_CHECKSUM_H */
diff --git a/arch/frv/include/asm/cpu-irqs.h b/arch/frv/include/asm/cpu-irqs.h
new file mode 100644 (file)
index 0000000..478f349
--- /dev/null
@@ -0,0 +1,81 @@
+/* cpu-irqs.h: on-CPU peripheral irqs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_CPU_IRQS_H
+#define _ASM_CPU_IRQS_H
+
+#ifndef __ASSEMBLY__
+
+/* IRQ to level mappings */
+#define IRQ_GDBSTUB_LEVEL      15
+#define IRQ_UART_LEVEL         13
+
+#ifdef CONFIG_GDBSTUB_UART0
+#define IRQ_UART0_LEVEL                IRQ_GDBSTUB_LEVEL
+#else
+#define IRQ_UART0_LEVEL                IRQ_UART_LEVEL
+#endif
+
+#ifdef CONFIG_GDBSTUB_UART1
+#define IRQ_UART1_LEVEL                IRQ_GDBSTUB_LEVEL
+#else
+#define IRQ_UART1_LEVEL                IRQ_UART_LEVEL
+#endif
+
+#define IRQ_DMA0_LEVEL         14
+#define IRQ_DMA1_LEVEL         14
+#define IRQ_DMA2_LEVEL         14
+#define IRQ_DMA3_LEVEL         14
+#define IRQ_DMA4_LEVEL         14
+#define IRQ_DMA5_LEVEL         14
+#define IRQ_DMA6_LEVEL         14
+#define IRQ_DMA7_LEVEL         14
+
+#define IRQ_TIMER0_LEVEL       12
+#define IRQ_TIMER1_LEVEL       11
+#define IRQ_TIMER2_LEVEL       10
+
+#define IRQ_XIRQ0_LEVEL                1
+#define IRQ_XIRQ1_LEVEL                2
+#define IRQ_XIRQ2_LEVEL                3
+#define IRQ_XIRQ3_LEVEL                4
+#define IRQ_XIRQ4_LEVEL                5
+#define IRQ_XIRQ5_LEVEL                6
+#define IRQ_XIRQ6_LEVEL                7
+#define IRQ_XIRQ7_LEVEL                8
+
+/* IRQ IDs presented to drivers */
+#define IRQ_CPU__UNUSED                IRQ_BASE_CPU
+#define IRQ_CPU_UART0          (IRQ_BASE_CPU + IRQ_UART0_LEVEL)
+#define IRQ_CPU_UART1          (IRQ_BASE_CPU + IRQ_UART1_LEVEL)
+#define IRQ_CPU_TIMER0         (IRQ_BASE_CPU + IRQ_TIMER0_LEVEL)
+#define IRQ_CPU_TIMER1         (IRQ_BASE_CPU + IRQ_TIMER1_LEVEL)
+#define IRQ_CPU_TIMER2         (IRQ_BASE_CPU + IRQ_TIMER2_LEVEL)
+#define IRQ_CPU_DMA0           (IRQ_BASE_CPU + IRQ_DMA0_LEVEL)
+#define IRQ_CPU_DMA1           (IRQ_BASE_CPU + IRQ_DMA1_LEVEL)
+#define IRQ_CPU_DMA2           (IRQ_BASE_CPU + IRQ_DMA2_LEVEL)
+#define IRQ_CPU_DMA3           (IRQ_BASE_CPU + IRQ_DMA3_LEVEL)
+#define IRQ_CPU_DMA4           (IRQ_BASE_CPU + IRQ_DMA4_LEVEL)
+#define IRQ_CPU_DMA5           (IRQ_BASE_CPU + IRQ_DMA5_LEVEL)
+#define IRQ_CPU_DMA6           (IRQ_BASE_CPU + IRQ_DMA6_LEVEL)
+#define IRQ_CPU_DMA7           (IRQ_BASE_CPU + IRQ_DMA7_LEVEL)
+#define IRQ_CPU_EXTERNAL0      (IRQ_BASE_CPU + IRQ_XIRQ0_LEVEL)
+#define IRQ_CPU_EXTERNAL1      (IRQ_BASE_CPU + IRQ_XIRQ1_LEVEL)
+#define IRQ_CPU_EXTERNAL2      (IRQ_BASE_CPU + IRQ_XIRQ2_LEVEL)
+#define IRQ_CPU_EXTERNAL3      (IRQ_BASE_CPU + IRQ_XIRQ3_LEVEL)
+#define IRQ_CPU_EXTERNAL4      (IRQ_BASE_CPU + IRQ_XIRQ4_LEVEL)
+#define IRQ_CPU_EXTERNAL5      (IRQ_BASE_CPU + IRQ_XIRQ5_LEVEL)
+#define IRQ_CPU_EXTERNAL6      (IRQ_BASE_CPU + IRQ_XIRQ6_LEVEL)
+#define IRQ_CPU_EXTERNAL7      (IRQ_BASE_CPU + IRQ_XIRQ7_LEVEL)
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_CPU_IRQS_H */
diff --git a/arch/frv/include/asm/cpumask.h b/arch/frv/include/asm/cpumask.h
new file mode 100644 (file)
index 0000000..d999c20
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_CPUMASK_H
+#define _ASM_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_CPUMASK_H */
diff --git a/arch/frv/include/asm/cputime.h b/arch/frv/include/asm/cputime.h
new file mode 100644 (file)
index 0000000..f6c373a
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_CPUTIME_H
+#define _ASM_CPUTIME_H
+
+#include <asm-generic/cputime.h>
+
+#endif /* _ASM_CPUTIME_H */
diff --git a/arch/frv/include/asm/current.h b/arch/frv/include/asm/current.h
new file mode 100644 (file)
index 0000000..86b0274
--- /dev/null
@@ -0,0 +1,30 @@
+/* current.h: FRV current task pointer
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_CURRENT_H
+#define _ASM_CURRENT_H
+
+#ifndef __ASSEMBLY__
+
+/*
+ * dedicate GR29 to keeping the current task pointer
+ */
+register struct task_struct *current asm("gr29");
+
+#define get_current() current
+
+#else
+
+#define CURRENT gr29
+
+#endif
+
+#endif /* _ASM_CURRENT_H */
diff --git a/arch/frv/include/asm/delay.h b/arch/frv/include/asm/delay.h
new file mode 100644 (file)
index 0000000..597b4eb
--- /dev/null
@@ -0,0 +1,50 @@
+/* delay.h: FRV delay code
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_DELAY_H
+#define _ASM_DELAY_H
+
+#include <asm/param.h>
+#include <asm/timer-regs.h>
+
+/*
+ * delay loop - runs at __core_clock_speed_HZ / 2 [there are 2 insns in the loop]
+ */
+extern unsigned long __delay_loops_MHz;
+
+static inline void __delay(unsigned long loops)
+{
+       asm volatile("1:        subicc  %0,#1,%0,icc0   \n"
+                    "          bnc     icc0,#2,1b      \n"
+                    : "=r" (loops)
+                    : "0" (loops)
+                    : "icc0"
+                    );
+}
+
+/*
+ * Use only for very small delays ( < 1 msec).  Should probably use a
+ * lookup table, really, as the multiplications take much too long with
+ * short delays.  This is a "reasonable" implementation, though (and the
+ * first constant multiplications gets optimized away if the delay is
+ * a constant)
+ */
+
+extern unsigned long loops_per_jiffy;
+
+static inline void udelay(unsigned long usecs)
+{
+       __delay(usecs * __delay_loops_MHz);
+}
+
+#define ndelay(n)      udelay((n) * 5)
+
+#endif /* _ASM_DELAY_H */
diff --git a/arch/frv/include/asm/device.h b/arch/frv/include/asm/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/arch/frv/include/asm/div64.h b/arch/frv/include/asm/div64.h
new file mode 100644 (file)
index 0000000..6cd978c
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/div64.h>
diff --git a/arch/frv/include/asm/dm9000.h b/arch/frv/include/asm/dm9000.h
new file mode 100644 (file)
index 0000000..f6f48fd
--- /dev/null
@@ -0,0 +1,37 @@
+/* dm9000.h: Davicom DM9000 adapter configuration
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_DM9000_H
+#define _ASM_DM9000_H
+
+#include <asm/mb-regs.h>
+
+#define DM9000_ARCH_IOBASE     (__region_CS6 + 0x300)
+#define DM9000_ARCH_IRQ                IRQ_CPU_EXTERNAL3       /* XIRQ #3 (shared with FPGA) */
+#undef DM9000_ARCH_IRQ_ACTLOW                          /* IRQ pin active high */
+#define DM9000_ARCH_BUS_INFO   "CS6#+0x300"            /* bus info for ethtool */
+
+#undef __is_PCI_IO
+#define __is_PCI_IO(addr)      0       /* not PCI */
+
+#undef inl
+#define inl(addr)                                                                              \
+({                                                                                             \
+       unsigned long __ioaddr = (unsigned long) addr;                                          \
+       uint32_t x = readl(__ioaddr);                                                           \
+       ((x & 0xff) << 24) | ((x & 0xff00) << 8) | ((x >> 8) & 0xff00) | ((x >> 24) & 0xff);    \
+})
+
+#undef insl
+#define insl(a,b,l)    __insl(a,b,l,0) /* don't byte-swap */
+
+
+#endif /* _ASM_DM9000_H */
diff --git a/arch/frv/include/asm/dma-mapping.h b/arch/frv/include/asm/dma-mapping.h
new file mode 100644 (file)
index 0000000..b289887
--- /dev/null
@@ -0,0 +1,174 @@
+#ifndef _ASM_DMA_MAPPING_H
+#define _ASM_DMA_MAPPING_H
+
+#include <linux/device.h>
+#include <asm/cache.h>
+#include <asm/cacheflush.h>
+#include <asm/scatterlist.h>
+#include <asm/io.h>
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
+#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
+
+extern unsigned long __nongprelbss dma_coherent_mem_start;
+extern unsigned long __nongprelbss dma_coherent_mem_end;
+
+void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp);
+void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle);
+
+/*
+ * Map a single buffer of the indicated size for DMA in streaming mode.
+ * The 32-bit bus address to use is returned.
+ *
+ * Once the device is given the dma address, the device owns this memory
+ * until either pci_unmap_single or pci_dma_sync_single is performed.
+ */
+extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
+                                enum dma_data_direction direction);
+
+/*
+ * Unmap a single streaming mode DMA translation.  The dma_addr and size
+ * must match what was provided for in a previous pci_map_single call.  All
+ * other usages are undefined.
+ *
+ * After this call, reads by the cpu to the buffer are guarenteed to see
+ * whatever the device wrote there.
+ */
+static inline
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+                     enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+/*
+ * Map a set of buffers described by scatterlist in streaming
+ * mode for DMA.  This is the scather-gather version of the
+ * above pci_map_single interface.  Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ *       DMA address/length pairs than there are SG table elements.
+ *       (for example via virtual mapping capabilities)
+ *       The routine returns the number of addr/length pairs actually
+ *       used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+                     enum dma_data_direction direction);
+
+/*
+ * Unmap a set of streaming mode DMA translations.
+ * Again, cpu read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
+ */
+static inline
+void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
+            enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+extern
+dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset,
+                       size_t size, enum dma_data_direction direction);
+
+static inline
+void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
+                   enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+
+static inline
+void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
+                            enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
+                               enum dma_data_direction direction)
+{
+       flush_write_buffers();
+}
+
+static inline
+void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
+                                  unsigned long offset, size_t size,
+                                  enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
+                                     unsigned long offset, size_t size,
+                                     enum dma_data_direction direction)
+{
+       flush_write_buffers();
+}
+
+static inline
+void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
+                        enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
+                           enum dma_data_direction direction)
+{
+       flush_write_buffers();
+}
+
+static inline
+int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
+{
+       return 0;
+}
+
+static inline
+int dma_supported(struct device *dev, u64 mask)
+{
+        /*
+         * we fall back to GFP_DMA when the mask isn't all 1s,
+         * so we can't guarantee allocations that must be
+         * within a tighter range than GFP_DMA..
+         */
+        if (mask < 0x00ffffff)
+                return 0;
+
+       return 1;
+}
+
+static inline
+int dma_set_mask(struct device *dev, u64 mask)
+{
+       if (!dev->dma_mask || !dma_supported(dev, mask))
+               return -EIO;
+
+       *dev->dma_mask = mask;
+
+       return 0;
+}
+
+static inline
+int dma_get_cache_alignment(void)
+{
+       return 1 << L1_CACHE_SHIFT;
+}
+
+#define dma_is_consistent(d, h)        (1)
+
+static inline
+void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+                   enum dma_data_direction direction)
+{
+       flush_write_buffers();
+}
+
+#endif  /* _ASM_DMA_MAPPING_H */
diff --git a/arch/frv/include/asm/dma.h b/arch/frv/include/asm/dma.h
new file mode 100644 (file)
index 0000000..683c47d
--- /dev/null
@@ -0,0 +1,125 @@
+/* dma.h: FRV DMA controller management
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_DMA_H
+#define _ASM_DMA_H
+
+//#define DMA_DEBUG 1
+
+#include <linux/interrupt.h>
+
+#undef MAX_DMA_CHANNELS                /* don't use kernel/dma.c */
+
+/* under 2.4 this is actually needed by the new bootmem allocator */
+#define MAX_DMA_ADDRESS                PAGE_OFFSET
+
+/*
+ * FRV DMA controller management
+ */
+typedef irqreturn_t (*dma_irq_handler_t)(int dmachan, unsigned long cstr, void *data);
+
+extern void frv_dma_init(void);
+
+extern int frv_dma_open(const char *devname,
+                       unsigned long dmamask,
+                       int dmacap,
+                       dma_irq_handler_t handler,
+                       unsigned long irq_flags,
+                       void *data);
+
+/* channels required */
+#define FRV_DMA_MASK_ANY       ULONG_MAX       /* any channel */
+
+/* capabilities required */
+#define FRV_DMA_CAP_DREQ       0x01            /* DMA request pin */
+#define FRV_DMA_CAP_DACK       0x02            /* DMA ACK pin */
+#define FRV_DMA_CAP_DONE       0x04            /* DMA done pin */
+
+extern void frv_dma_close(int dma);
+
+extern void frv_dma_config(int dma, unsigned long ccfr, unsigned long cctr, unsigned long apr);
+
+extern void frv_dma_start(int dma,
+                         unsigned long sba, unsigned long dba,
+                         unsigned long pix, unsigned long six, unsigned long bcl);
+
+extern void frv_dma_restart_circular(int dma, unsigned long six);
+
+extern void frv_dma_stop(int dma);
+
+extern int is_frv_dma_interrupting(int dma);
+
+extern void frv_dma_dump(int dma);
+
+extern void frv_dma_status_clear(int dma);
+
+#define FRV_DMA_NCHANS 8
+#define FRV_DMA_4CHANS 4
+#define FRV_DMA_8CHANS 8
+
+#define DMAC_CCFRx             0x00    /* channel configuration reg */
+#define DMAC_CCFRx_CM_SHIFT    16
+#define DMAC_CCFRx_CM_DA       0x00000000
+#define DMAC_CCFRx_CM_SCA      0x00010000
+#define DMAC_CCFRx_CM_DCA      0x00020000
+#define DMAC_CCFRx_CM_2D       0x00030000
+#define DMAC_CCFRx_ATS_SHIFT   8
+#define DMAC_CCFRx_RS_INTERN   0x00000000
+#define DMAC_CCFRx_RS_EXTERN   0x00000001
+#define DMAC_CCFRx_RS_SHIFT    0
+
+#define DMAC_CSTRx             0x08    /* channel status reg */
+#define DMAC_CSTRx_FS          0x0000003f
+#define DMAC_CSTRx_NE          0x00000100
+#define DMAC_CSTRx_FED         0x00000200
+#define DMAC_CSTRx_WER         0x00000800
+#define DMAC_CSTRx_RER         0x00001000
+#define DMAC_CSTRx_CE          0x00002000
+#define DMAC_CSTRx_INT         0x00800000
+#define DMAC_CSTRx_BUSY                0x80000000
+
+#define DMAC_CCTRx             0x10    /* channel control reg */
+#define DMAC_CCTRx_DSIZ_1      0x00000000
+#define DMAC_CCTRx_DSIZ_2      0x00000001
+#define DMAC_CCTRx_DSIZ_4      0x00000002
+#define DMAC_CCTRx_DSIZ_32     0x00000005
+#define DMAC_CCTRx_DAU_HOLD    0x00000000
+#define DMAC_CCTRx_DAU_INC     0x00000010
+#define DMAC_CCTRx_DAU_DEC     0x00000020
+#define DMAC_CCTRx_SSIZ_1      0x00000000
+#define DMAC_CCTRx_SSIZ_2      0x00000100
+#define DMAC_CCTRx_SSIZ_4      0x00000200
+#define DMAC_CCTRx_SSIZ_32     0x00000500
+#define DMAC_CCTRx_SAU_HOLD    0x00000000
+#define DMAC_CCTRx_SAU_INC     0x00001000
+#define DMAC_CCTRx_SAU_DEC     0x00002000
+#define DMAC_CCTRx_FC          0x08000000
+#define DMAC_CCTRx_ICE         0x10000000
+#define DMAC_CCTRx_IE          0x40000000
+#define DMAC_CCTRx_ACT         0x80000000
+
+#define DMAC_SBAx              0x18    /* source base address reg */
+#define DMAC_DBAx              0x20    /* data base address reg */
+#define DMAC_PIXx              0x28    /* primary index reg */
+#define DMAC_SIXx              0x30    /* secondary index reg */
+#define DMAC_BCLx              0x38    /* byte count limit reg */
+#define DMAC_APRx              0x40    /* alternate pointer reg */
+
+/*
+ * required for PCI + MODULES
+ */
+#ifdef CONFIG_PCI
+extern int isa_dma_bridge_buggy;
+#else
+#define isa_dma_bridge_buggy   (0)
+#endif
+
+#endif /* _ASM_DMA_H */
diff --git a/arch/frv/include/asm/elf.h b/arch/frv/include/asm/elf.h
new file mode 100644 (file)
index 0000000..7279ec0
--- /dev/null
@@ -0,0 +1,142 @@
+/* elf.h: FR-V ELF definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-m68knommu/elf.h
+ *
+ * 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.
+ */
+#ifndef __ASM_ELF_H
+#define __ASM_ELF_H
+
+#include <asm/ptrace.h>
+#include <asm/user.h>
+
+struct elf32_hdr;
+
+/*
+ * ELF header e_flags defines.
+ */
+#define EF_FRV_GPR_MASK         0x00000003 /* mask for # of gprs */
+#define EF_FRV_GPR32           0x00000001 /* Only uses GR on 32-register */
+#define EF_FRV_GPR64           0x00000002 /* Only uses GR on 64-register */
+#define EF_FRV_FPR_MASK         0x0000000c /* mask for # of fprs */
+#define EF_FRV_FPR32           0x00000004 /* Only uses FR on 32-register */
+#define EF_FRV_FPR64           0x00000008 /* Only uses FR on 64-register */
+#define EF_FRV_FPR_NONE                0x0000000C /* Uses software floating-point */
+#define EF_FRV_DWORD_MASK       0x00000030 /* mask for dword support */
+#define EF_FRV_DWORD_YES       0x00000010 /* Assumes stack aligned to 8-byte boundaries. */
+#define EF_FRV_DWORD_NO                0x00000020 /* Assumes stack aligned to 4-byte boundaries. */
+#define EF_FRV_DOUBLE          0x00000040 /* Uses double instructions. */
+#define EF_FRV_MEDIA           0x00000080 /* Uses media instructions. */
+#define EF_FRV_PIC             0x00000100 /* Uses position independent code. */
+#define EF_FRV_NON_PIC_RELOCS  0x00000200 /* Does not use position Independent code. */
+#define EF_FRV_MULADD           0x00000400 /* -mmuladd */
+#define EF_FRV_BIGPIC           0x00000800 /* -fPIC */
+#define EF_FRV_LIBPIC           0x00001000 /* -mlibrary-pic */
+#define EF_FRV_G0               0x00002000 /* -G 0, no small data ptr */
+#define EF_FRV_NOPACK           0x00004000 /* -mnopack */
+#define EF_FRV_FDPIC            0x00008000 /* -mfdpic */
+#define EF_FRV_CPU_MASK         0xff000000 /* specific cpu bits */
+#define EF_FRV_CPU_GENERIC     0x00000000 /* Set CPU type is FR-V */
+#define EF_FRV_CPU_FR500       0x01000000 /* Set CPU type is FR500 */
+#define EF_FRV_CPU_FR300       0x02000000 /* Set CPU type is FR300 */
+#define EF_FRV_CPU_SIMPLE       0x03000000 /* SIMPLE */
+#define EF_FRV_CPU_TOMCAT       0x04000000 /* Tomcat, FR500 prototype */
+#define EF_FRV_CPU_FR400       0x05000000 /* Set CPU type is FR400 */
+#define EF_FRV_CPU_FR550        0x06000000 /* Set CPU type is FR550 */
+#define EF_FRV_CPU_FR405       0x07000000 /* Set CPU type is FR405 */
+#define EF_FRV_CPU_FR450       0x08000000 /* Set CPU type is FR450 */
+
+/*
+ * FR-V ELF relocation types
+ */
+
+
+/*
+ * ELF register definitions..
+ */
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef struct user_fpmedia_regs elf_fpregset_t;
+
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+extern int elf_check_arch(const struct elf32_hdr *hdr);
+
+#define elf_check_fdpic(x) ((x)->e_flags & EF_FRV_FDPIC && !((x)->e_flags & EF_FRV_NON_PIC_RELOCS))
+#define elf_check_const_displacement(x) ((x)->e_flags & EF_FRV_PIC)
+
+/*
+ * These are used to set parameters in the core dumps.
+ */
+#define ELF_CLASS      ELFCLASS32
+#define ELF_DATA       ELFDATA2MSB
+#define ELF_ARCH       EM_FRV
+
+#define ELF_PLAT_INIT(_r)                      \
+do {                                           \
+       __kernel_frame0_ptr->gr16       = 0;    \
+       __kernel_frame0_ptr->gr17       = 0;    \
+       __kernel_frame0_ptr->gr18       = 0;    \
+       __kernel_frame0_ptr->gr19       = 0;    \
+       __kernel_frame0_ptr->gr20       = 0;    \
+       __kernel_frame0_ptr->gr21       = 0;    \
+       __kernel_frame0_ptr->gr22       = 0;    \
+       __kernel_frame0_ptr->gr23       = 0;    \
+       __kernel_frame0_ptr->gr24       = 0;    \
+       __kernel_frame0_ptr->gr25       = 0;    \
+       __kernel_frame0_ptr->gr26       = 0;    \
+       __kernel_frame0_ptr->gr27       = 0;    \
+       __kernel_frame0_ptr->gr29       = 0;    \
+} while(0)
+
+#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map_addr, _interp_map_addr, _dynamic_addr)    \
+do {                                                                                   \
+       __kernel_frame0_ptr->gr16       = _exec_map_addr;                               \
+       __kernel_frame0_ptr->gr17       = _interp_map_addr;                             \
+       __kernel_frame0_ptr->gr18       = _dynamic_addr;                                \
+       __kernel_frame0_ptr->gr19       = 0;                                            \
+       __kernel_frame0_ptr->gr20       = 0;                                            \
+       __kernel_frame0_ptr->gr21       = 0;                                            \
+       __kernel_frame0_ptr->gr22       = 0;                                            \
+       __kernel_frame0_ptr->gr23       = 0;                                            \
+       __kernel_frame0_ptr->gr24       = 0;                                            \
+       __kernel_frame0_ptr->gr25       = 0;                                            \
+       __kernel_frame0_ptr->gr26       = 0;                                            \
+       __kernel_frame0_ptr->gr27       = 0;                                            \
+       __kernel_frame0_ptr->gr29       = 0;                                            \
+} while(0)
+
+#define USE_ELF_CORE_DUMP
+#define ELF_FDPIC_CORE_EFLAGS  EF_FRV_FDPIC
+#define ELF_EXEC_PAGESIZE      16384
+
+/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
+   use of this is to invoke "./ld.so someprog" to test out a new version of
+   the loader.  We need to make sure that it is out of the way of the program
+   that it will "exec", and that there is sufficient room for the brk.  */
+
+#define ELF_ET_DYN_BASE         0x08000000UL
+
+/* This yields a mask that user programs can use to figure out what
+   instruction set this cpu supports.  */
+
+#define ELF_HWCAP      (0)
+
+/* This yields a string that ld.so will use to load implementation
+   specific libraries for optimization.  This is more specific in
+   intent than poking at uname or /proc/cpuinfo.  */
+
+#define ELF_PLATFORM  (NULL)
+
+#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
+
+#endif
diff --git a/arch/frv/include/asm/emergency-restart.h b/arch/frv/include/asm/emergency-restart.h
new file mode 100644 (file)
index 0000000..108d8c4
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_EMERGENCY_RESTART_H
+#define _ASM_EMERGENCY_RESTART_H
+
+#include <asm-generic/emergency-restart.h>
+
+#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/arch/frv/include/asm/errno.h b/arch/frv/include/asm/errno.h
new file mode 100644 (file)
index 0000000..d010795
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _ASM_ERRNO_H
+#define _ASM_ERRNO_H
+
+#include <asm-generic/errno.h>
+
+#endif /* _ASM_ERRNO_H */
+
diff --git a/arch/frv/include/asm/fb.h b/arch/frv/include/asm/fb.h
new file mode 100644 (file)
index 0000000..c7df380
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_FB_H_
+#define _ASM_FB_H_
+#include <linux/fb.h>
+
+#define fb_pgprotect(...) do {} while (0)
+
+static inline int fb_is_primary_device(struct fb_info *info)
+{
+       return 0;
+}
+
+#endif /* _ASM_FB_H_ */
diff --git a/arch/frv/include/asm/fcntl.h b/arch/frv/include/asm/fcntl.h
new file mode 100644 (file)
index 0000000..46ab12d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/fcntl.h>
diff --git a/arch/frv/include/asm/fpu.h b/arch/frv/include/asm/fpu.h
new file mode 100644 (file)
index 0000000..d73c60b
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef __ASM_FPU_H
+#define __ASM_FPU_H
+
+
+/*
+ * MAX floating point unit state size (FSAVE/FRESTORE)
+ */
+
+#define kernel_fpu_end() do { asm volatile("bar":::"memory"); preempt_enable(); } while(0)
+
+#endif /* __ASM_FPU_H */
diff --git a/arch/frv/include/asm/ftrace.h b/arch/frv/include/asm/ftrace.h
new file mode 100644 (file)
index 0000000..40a8c17
--- /dev/null
@@ -0,0 +1 @@
+/* empty */
diff --git a/arch/frv/include/asm/futex.h b/arch/frv/include/asm/futex.h
new file mode 100644 (file)
index 0000000..08b3d1d
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef _ASM_FUTEX_H
+#define _ASM_FUTEX_H
+
+#ifdef __KERNEL__
+
+#include <linux/futex.h>
+#include <asm/errno.h>
+#include <asm/uaccess.h>
+
+extern int futex_atomic_op_inuser(int encoded_op, int __user *uaddr);
+
+static inline int
+futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
+{
+       return -ENOSYS;
+}
+
+#endif
+#endif
diff --git a/arch/frv/include/asm/gdb-stub.h b/arch/frv/include/asm/gdb-stub.h
new file mode 100644 (file)
index 0000000..24f9738
--- /dev/null
@@ -0,0 +1,140 @@
+/* gdb-stub.h: FRV GDB stub
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from asm-mips/gdb-stub.h (c) 1995 Andreas Busse
+ *
+ * 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.
+ */
+#ifndef __ASM_GDB_STUB_H
+#define __ASM_GDB_STUB_H
+
+#undef GDBSTUB_DEBUG_PROTOCOL
+
+#include <asm/ptrace.h>
+
+/*
+ * important register numbers in GDB protocol
+ * - GR0,  GR1,  GR2,  GR3,  GR4,  GR5,  GR6,  GR7,
+ * - GR8,  GR9,  GR10, GR11, GR12, GR13, GR14, GR15,
+ * - GR16, GR17, GR18, GR19, GR20, GR21, GR22, GR23,
+ * - GR24, GR25, GR26, GR27, GR28, GR29, GR30, GR31,
+ * - GR32, GR33, GR34, GR35, GR36, GR37, GR38, GR39,
+ * - GR40, GR41, GR42, GR43, GR44, GR45, GR46, GR47,
+ * - GR48, GR49, GR50, GR51, GR52, GR53, GR54, GR55,
+ * - GR56, GR57, GR58, GR59, GR60, GR61, GR62, GR63,
+ * - FR0,  FR1,  FR2,  FR3,  FR4,  FR5,  FR6,  FR7,
+ * - FR8,  FR9,  FR10, FR11, FR12, FR13, FR14, FR15,
+ * - FR16, FR17, FR18, FR19, FR20, FR21, FR22, FR23,
+ * - FR24, FR25, FR26, FR27, FR28, FR29, FR30, FR31,
+ * - FR32, FR33, FR34, FR35, FR36, FR37, FR38, FR39,
+ * - FR40, FR41, FR42, FR43, FR44, FR45, FR46, FR47,
+ * - FR48, FR49, FR50, FR51, FR52, FR53, FR54, FR55,
+ * - FR56, FR57, FR58, FR59, FR60, FR61, FR62, FR63,
+ * - PC, PSR, CCR, CCCR,
+ * - _X132, _X133, _X134
+ * - TBR, BRR, DBAR0, DBAR1, DBAR2, DBAR3,
+ * - SCR0, SCR1, SCR2, SCR3,
+ * - LR, LCR,
+ * - IACC0H, IACC0L,
+ * - FSR0,
+ * - ACC0, ACC1, ACC2, ACC3, ACC4, ACC5, ACC6, ACC7,
+ * - ACCG0123, ACCG4567,
+ * - MSR0, MSR1,
+ * - GNER0, GNER1,
+ * - FNER0, FNER1,
+ */
+#define GDB_REG_GR(N)  (N)
+#define GDB_REG_FR(N)  (64+(N))
+#define GDB_REG_PC     128
+#define GDB_REG_PSR    129
+#define GDB_REG_CCR    130
+#define GDB_REG_CCCR   131
+#define GDB_REG_TBR    135
+#define GDB_REG_BRR    136
+#define GDB_REG_DBAR(N)        (137+(N))
+#define GDB_REG_SCR(N) (141+(N))
+#define GDB_REG_LR     145
+#define GDB_REG_LCR    146
+#define GDB_REG_FSR0   149
+#define GDB_REG_ACC(N) (150+(N))
+#define GDB_REG_ACCG(N)        (158+(N)/4)
+#define GDB_REG_MSR(N) (160+(N))
+#define GDB_REG_GNER(N)        (162+(N))
+#define GDB_REG_FNER(N)        (164+(N))
+
+#define GDB_REG_SP     GDB_REG_GR(1)
+#define GDB_REG_FP     GDB_REG_GR(2)
+
+#ifndef _LANGUAGE_ASSEMBLY
+
+/*
+ * Prototypes
+ */
+extern void show_registers_only(struct pt_regs *regs);
+
+extern void gdbstub_init(void);
+extern void gdbstub(int type);
+extern void gdbstub_exit(int status);
+
+extern void gdbstub_io_init(void);
+extern void gdbstub_set_baud(unsigned baud);
+extern int gdbstub_rx_char(unsigned char *_ch, int nonblock);
+extern void gdbstub_tx_char(unsigned char ch);
+extern void gdbstub_tx_flush(void);
+extern void gdbstub_do_rx(void);
+
+extern asmlinkage void __debug_stub_init_break(void);
+extern asmlinkage void __break_hijack_kernel_event(void);
+extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
+extern asmlinkage void start_kernel(void);
+
+extern asmlinkage void gdbstub_rx_handler(void);
+extern asmlinkage void gdbstub_rx_irq(void);
+extern asmlinkage void gdbstub_intercept(void);
+
+extern uint32_t __entry_usertrap_table[];
+extern uint32_t __entry_kerneltrap_table[];
+
+extern volatile u8     gdbstub_rx_buffer[PAGE_SIZE];
+extern volatile u32    gdbstub_rx_inp;
+extern volatile u32    gdbstub_rx_outp;
+extern volatile u8     gdbstub_rx_overflow;
+extern u8              gdbstub_rx_unget;
+
+extern void gdbstub_printk(const char *fmt, ...);
+extern void debug_to_serial(const char *p, int n);
+extern void console_set_baud(unsigned baud);
+
+#ifdef GDBSTUB_DEBUG_PROTOCOL
+#define gdbstub_proto(FMT,...) gdbstub_printk(FMT,##__VA_ARGS__)
+#else
+#define gdbstub_proto(FMT,...) ({ 0; })
+#endif
+
+/*
+ * we dedicate GR31 to keeping a pointer to the gdbstub exception frame
+ * - gr31 is destroyed on entry to the gdbstub if !MMU
+ * - gr31 is saved in scr3 on entry to the gdbstub if in !MMU
+ */
+register struct frv_frame0 *__debug_frame0 asm("gr31");
+
+#define __debug_frame          (&__debug_frame0->regs)
+#define __debug_user_context   (&__debug_frame0->uc)
+#define __debug_regs           (&__debug_frame0->debug)
+#define __debug_reg(X)         ((unsigned long *) ((unsigned long) &__debug_frame0 + (X)))
+
+struct frv_debug_status {
+       unsigned long           bpsr;
+       unsigned long           dcr;
+       unsigned long           brr;
+       unsigned long           nmar;
+};
+
+extern struct frv_debug_status __debug_status;
+
+#endif /* _LANGUAGE_ASSEMBLY */
+#endif /* __ASM_GDB_STUB_H */
diff --git a/arch/frv/include/asm/gpio-regs.h b/arch/frv/include/asm/gpio-regs.h
new file mode 100644 (file)
index 0000000..9edf5d5
--- /dev/null
@@ -0,0 +1,116 @@
+/* gpio-regs.h: on-chip general purpose I/O registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_GPIO_REGS
+#define _ASM_GPIO_REGS
+
+#define __reg(ADDR) (*(volatile unsigned long *)(ADDR))
+
+#define __get_PDR()    ({ __reg(0xfeff0400); })
+#define __set_PDR(V)   do { __reg(0xfeff0400) = (V); mb(); } while(0)
+
+#define __get_GPDR()   ({ __reg(0xfeff0408); })
+#define __set_GPDR(V)  do { __reg(0xfeff0408) = (V); mb(); } while(0)
+
+#define __get_SIR()    ({ __reg(0xfeff0410); })
+#define __set_SIR(V)   do { __reg(0xfeff0410) = (V); mb(); } while(0)
+
+#define __get_SOR()    ({ __reg(0xfeff0418); })
+#define __set_SOR(V)   do { __reg(0xfeff0418) = (V); mb(); } while(0)
+
+#define __set_PDSR(V)  do { __reg(0xfeff0420) = (V); mb(); } while(0)
+
+#define __set_PDCR(V)  do { __reg(0xfeff0428) = (V); mb(); } while(0)
+
+#define __get_RSTR()   ({ __reg(0xfeff0500); })
+#define __set_RSTR(V)  do { __reg(0xfeff0500) = (V); mb(); } while(0)
+
+
+
+/* PDR definitions */
+#define PDR_GPIO_DATA(X)       (1 << (X))
+
+/* GPDR definitions */
+#define GPDR_INPUT             0
+#define GPDR_OUTPUT            1
+#define GPDR_DREQ0_BIT         0x00001000
+#define GPDR_DREQ1_BIT         0x00008000
+#define GPDR_DREQ2_BIT         0x00040000
+#define GPDR_DREQ3_BIT         0x00080000
+#define GPDR_DREQ4_BIT         0x00004000
+#define GPDR_DREQ5_BIT         0x00020000
+#define GPDR_DREQ6_BIT         0x00100000
+#define GPDR_DREQ7_BIT         0x00200000
+#define GPDR_DACK0_BIT         0x00002000
+#define GPDR_DACK1_BIT         0x00010000
+#define GPDR_DACK2_BIT         0x00100000
+#define GPDR_DACK3_BIT         0x00200000
+#define GPDR_DONE0_BIT         0x00004000
+#define GPDR_DONE1_BIT         0x00020000
+#define GPDR_GPIO_DIR(X,D)     ((D) << (X))
+
+/* SIR definitions */
+#define SIR_GPIO_INPUT         0
+#define SIR_DREQ7_INPUT                0x00200000
+#define SIR_DREQ6_INPUT                0x00100000
+#define SIR_DREQ3_INPUT                0x00080000
+#define SIR_DREQ2_INPUT                0x00040000
+#define SIR_DREQ5_INPUT                0x00020000
+#define SIR_DREQ1_INPUT                0x00008000
+#define SIR_DREQ4_INPUT                0x00004000
+#define SIR_DREQ0_INPUT                0x00001000
+#define SIR_RXD1_INPUT         0x00000400
+#define SIR_CTS0_INPUT         0x00000100
+#define SIR_RXD0_INPUT         0x00000040
+#define SIR_GATE1_INPUT                0x00000020
+#define SIR_GATE0_INPUT                0x00000010
+#define SIR_IRQ3_INPUT         0x00000008
+#define SIR_IRQ2_INPUT         0x00000004
+#define SIR_IRQ1_INPUT         0x00000002
+#define SIR_IRQ0_INPUT         0x00000001
+#define SIR_DREQ_BITS          (SIR_DREQ0_INPUT | SIR_DREQ1_INPUT | \
+                                SIR_DREQ2_INPUT | SIR_DREQ3_INPUT | \
+                                SIR_DREQ4_INPUT | SIR_DREQ5_INPUT | \
+                                SIR_DREQ6_INPUT | SIR_DREQ7_INPUT)
+
+/* SOR definitions */
+#define SOR_GPIO_OUTPUT                0
+#define SOR_DACK3_OUTPUT       0x00200000
+#define SOR_DACK2_OUTPUT       0x00100000
+#define SOR_DONE1_OUTPUT       0x00020000
+#define SOR_DACK1_OUTPUT       0x00010000
+#define SOR_DONE0_OUTPUT       0x00004000
+#define SOR_DACK0_OUTPUT       0x00002000
+#define SOR_TXD1_OUTPUT                0x00000800
+#define SOR_RTS0_OUTPUT                0x00000200
+#define SOR_TXD0_OUTPUT                0x00000080
+#define SOR_TOUT1_OUTPUT       0x00000020
+#define SOR_TOUT0_OUTPUT       0x00000010
+#define SOR_DONE_BITS          (SOR_DONE0_OUTPUT | SOR_DONE1_OUTPUT)
+#define SOR_DACK_BITS          (SOR_DACK0_OUTPUT | SOR_DACK1_OUTPUT | \
+                                SOR_DACK2_OUTPUT | SOR_DACK3_OUTPUT)
+
+/* PDSR definitions */
+#define PDSR_UNCHANGED         0
+#define PDSR_SET_BIT(X)                (1 << (X))
+
+/* PDCR definitions */
+#define PDCR_UNCHANGED         0
+#define PDCR_CLEAR_BIT(X)      (1 << (X))
+
+/* RSTR definitions */
+/* Read Only */
+#define RSTR_POWERON           0x00000400
+#define RSTR_SOFTRESET_STATUS  0x00000100
+/* Write Only */
+#define RSTR_SOFTRESET         0x00000001
+
+#endif /* _ASM_GPIO_REGS */
diff --git a/arch/frv/include/asm/hardirq.h b/arch/frv/include/asm/hardirq.h
new file mode 100644 (file)
index 0000000..fc47515
--- /dev/null
@@ -0,0 +1,35 @@
+/* hardirq.h: FRV hardware IRQ management
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef __ASM_HARDIRQ_H
+#define __ASM_HARDIRQ_H
+
+#include <linux/threads.h>
+#include <linux/irq.h>
+
+typedef struct {
+       unsigned int __softirq_pending;
+       unsigned long idle_timestamp;
+} ____cacheline_aligned irq_cpustat_t;
+
+#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
+
+#ifdef CONFIG_SMP
+#error SMP not available on FR-V
+#endif /* CONFIG_SMP */
+
+extern atomic_t irq_err_count;
+static inline void ack_bad_irq(int irq)
+{
+       atomic_inc(&irq_err_count);
+}
+
+#endif
diff --git a/arch/frv/include/asm/highmem.h b/arch/frv/include/asm/highmem.h
new file mode 100644 (file)
index 0000000..68e4677
--- /dev/null
@@ -0,0 +1,182 @@
+/* highmem.h: virtual kernel memory mappings for high memory
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-i386/highmem.h
+ *
+ * See Documentation/frv/mmu-layout.txt for more information.
+ *
+ * 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.
+ */
+
+#ifndef _ASM_HIGHMEM_H
+#define _ASM_HIGHMEM_H
+
+#ifdef __KERNEL__
+
+#include <linux/init.h>
+#include <linux/highmem.h>
+#include <asm/mem-layout.h>
+#include <asm/spr-regs.h>
+#include <asm/mb-regs.h>
+
+#define NR_TLB_LINES           64      /* number of lines in the TLB */
+
+#ifndef __ASSEMBLY__
+
+#include <linux/interrupt.h>
+#include <asm/kmap_types.h>
+#include <asm/pgtable.h>
+
+#ifdef CONFIG_DEBUG_HIGHMEM
+#define HIGHMEM_DEBUG 1
+#else
+#define HIGHMEM_DEBUG 0
+#endif
+
+/* declarations for highmem.c */
+extern unsigned long highstart_pfn, highend_pfn;
+
+#define kmap_prot PAGE_KERNEL
+#define kmap_pte ______kmap_pte_in_TLB
+extern pte_t *pkmap_page_table;
+
+#define flush_cache_kmaps()  do { } while (0)
+
+/*
+ * Right now we initialize only a single pte table. It can be extended
+ * easily, subsequent pte tables have to be allocated in one physical
+ * chunk of RAM.
+ */
+#define LAST_PKMAP     PTRS_PER_PTE
+#define LAST_PKMAP_MASK        (LAST_PKMAP - 1)
+#define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)
+#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
+
+extern void *kmap_high(struct page *page);
+extern void kunmap_high(struct page *page);
+
+extern void *kmap(struct page *page);
+extern void kunmap(struct page *page);
+
+extern struct page *kmap_atomic_to_page(void *ptr);
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap
+ * gives a more generic (and caching) interface. But kmap_atomic can
+ * be used in IRQ contexts, so in some (very limited) cases we need
+ * it.
+ */
+#define KMAP_ATOMIC_CACHE_DAMR         8
+
+#ifndef __ASSEMBLY__
+
+#define __kmap_atomic_primary(type, paddr, ampr)                                               \
+({                                                                                             \
+       unsigned long damlr, dampr;                                                             \
+                                                                                               \
+       dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V;             \
+                                                                                               \
+       if (type != __KM_CACHE)                                                                 \
+               asm volatile("movgs %0,dampr"#ampr :: "r"(dampr) : "memory");                   \
+       else                                                                                    \
+               asm volatile("movgs %0,iampr"#ampr"\n"                                          \
+                            "movgs %0,dampr"#ampr"\n"                                          \
+                            :: "r"(dampr) : "memory"                                           \
+                            );                                                                 \
+                                                                                               \
+       asm("movsg damlr"#ampr",%0" : "=r"(damlr));                                             \
+                                                                                               \
+       /*printk("DAMR"#ampr": PRIM sl=%d L=%08lx P=%08lx\n", type, damlr, dampr);*/            \
+                                                                                               \
+       (void *) damlr;                                                                         \
+})
+
+#define __kmap_atomic_secondary(slot, paddr)                                                     \
+({                                                                                               \
+       unsigned long damlr = KMAP_ATOMIC_SECONDARY_FRAME + (slot) * PAGE_SIZE;                   \
+       unsigned long dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V; \
+                                                                                                 \
+       asm volatile("movgs %0,tplr \n"                                                           \
+                    "movgs %1,tppr \n"                                                           \
+                    "tlbpr %0,gr0,#2,#1"                                                         \
+                    : : "r"(damlr), "r"(dampr) : "memory");                                      \
+                                                                                                 \
+       /*printk("TLB: SECN sl=%d L=%08lx P=%08lx\n", slot, damlr, dampr);*/                      \
+                                                                                                 \
+       (void *) damlr;                                                                           \
+})
+
+static inline void *kmap_atomic(struct page *page, enum km_type type)
+{
+       unsigned long paddr;
+
+       pagefault_disable();
+       debug_kmap_atomic(type);
+       paddr = page_to_phys(page);
+
+       switch (type) {
+        case 0:                return __kmap_atomic_primary(0, paddr, 2);
+        case 1:                return __kmap_atomic_primary(1, paddr, 3);
+        case 2:                return __kmap_atomic_primary(2, paddr, 4);
+        case 3:                return __kmap_atomic_primary(3, paddr, 5);
+        case 4:                return __kmap_atomic_primary(4, paddr, 6);
+        case 5:                return __kmap_atomic_primary(5, paddr, 7);
+        case 6:                return __kmap_atomic_primary(6, paddr, 8);
+        case 7:                return __kmap_atomic_primary(7, paddr, 9);
+        case 8:                return __kmap_atomic_primary(8, paddr, 10);
+
+       case 9 ... 9 + NR_TLB_LINES - 1:
+               return __kmap_atomic_secondary(type - 9, paddr);
+
+       default:
+               BUG();
+               return NULL;
+       }
+}
+
+#define __kunmap_atomic_primary(type, ampr)                            \
+do {                                                                   \
+       asm volatile("movgs gr0,dampr"#ampr"\n" ::: "memory");          \
+       if (type == __KM_CACHE)                                         \
+               asm volatile("movgs gr0,iampr"#ampr"\n" ::: "memory");  \
+} while(0)
+
+#define __kunmap_atomic_secondary(slot, vaddr)                         \
+do {                                                                   \
+       asm volatile("tlbpr %0,gr0,#4,#1" : : "r"(vaddr) : "memory");   \
+} while(0)
+
+static inline void kunmap_atomic(void *kvaddr, enum km_type type)
+{
+       switch (type) {
+        case 0:                __kunmap_atomic_primary(0, 2);  break;
+        case 1:                __kunmap_atomic_primary(1, 3);  break;
+        case 2:                __kunmap_atomic_primary(2, 4);  break;
+        case 3:                __kunmap_atomic_primary(3, 5);  break;
+        case 4:                __kunmap_atomic_primary(4, 6);  break;
+        case 5:                __kunmap_atomic_primary(5, 7);  break;
+        case 6:                __kunmap_atomic_primary(6, 8);  break;
+        case 7:                __kunmap_atomic_primary(7, 9);  break;
+        case 8:                __kunmap_atomic_primary(8, 10); break;
+
+       case 9 ... 9 + NR_TLB_LINES - 1:
+               __kunmap_atomic_secondary(type - 9, kvaddr);
+               break;
+
+       default:
+               BUG();
+       }
+       pagefault_enable();
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_HIGHMEM_H */
diff --git a/arch/frv/include/asm/hw_irq.h b/arch/frv/include/asm/hw_irq.h
new file mode 100644 (file)
index 0000000..522ad37
--- /dev/null
@@ -0,0 +1,16 @@
+/* hw_irq.h: FR-V specific h/w IRQ stuff
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
+
+
+#endif /* _ASM_HW_IRQ_H */
diff --git a/arch/frv/include/asm/init.h b/arch/frv/include/asm/init.h
new file mode 100644 (file)
index 0000000..8b15838
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_INIT_H
+#define _ASM_INIT_H
+
+#define __init __attribute__ ((__section__ (".text.init")))
+#define __initdata __attribute__ ((__section__ (".data.init")))
+/* For assembly routines */
+#define __INIT         .section        ".text.init",#alloc,#execinstr
+#define __FINIT                .previous
+#define __INITDATA     .section        ".data.init",#alloc,#write
+
+#endif
+
diff --git a/arch/frv/include/asm/io.h b/arch/frv/include/asm/io.h
new file mode 100644 (file)
index 0000000..ca7475e
--- /dev/null
@@ -0,0 +1,392 @@
+/* io.h: FRV I/O operations
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ *
+ * This gets interesting when talking to the PCI bus - the CPU is in big endian
+ * mode, the PCI bus is little endian and the hardware in the middle can do
+ * byte swapping
+ */
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+
+#ifdef __KERNEL__
+
+#include <linux/types.h>
+#include <asm/virtconvert.h>
+#include <asm/string.h>
+#include <asm/mb-regs.h>
+#include <linux/delay.h>
+
+/*
+ * swap functions are sometimes needed to interface little-endian hardware
+ */
+
+static inline unsigned short _swapw(unsigned short v)
+{
+    return ((v << 8) | (v >> 8));
+}
+
+static inline unsigned long _swapl(unsigned long v)
+{
+    return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24));
+}
+
+//#define __iormb() asm volatile("membar")
+//#define __iowmb() asm volatile("membar")
+
+#define __raw_readb __builtin_read8
+#define __raw_readw __builtin_read16
+#define __raw_readl __builtin_read32
+
+#define __raw_writeb(datum, addr) __builtin_write8(addr, datum)
+#define __raw_writew(datum, addr) __builtin_write16(addr, datum)
+#define __raw_writel(datum, addr) __builtin_write32(addr, datum)
+
+static inline void io_outsb(unsigned int addr, const void *buf, int len)
+{
+       unsigned long __ioaddr = (unsigned long) addr;
+       const uint8_t *bp = buf;
+
+       while (len--)
+               __builtin_write8((volatile void __iomem *) __ioaddr, *bp++);
+}
+
+static inline void io_outsw(unsigned int addr, const void *buf, int len)
+{
+       unsigned long __ioaddr = (unsigned long) addr;
+       const uint16_t *bp = buf;
+
+       while (len--)
+               __builtin_write16((volatile void __iomem *) __ioaddr, (*bp++));
+}
+
+extern void __outsl_ns(unsigned int addr, const void *buf, int len);
+extern void __outsl_sw(unsigned int addr, const void *buf, int len);
+static inline void __outsl(unsigned int addr, const void *buf, int len, int swap)
+{
+       unsigned long __ioaddr = (unsigned long) addr;
+
+       if (!swap)
+               __outsl_ns(__ioaddr, buf, len);
+       else
+               __outsl_sw(__ioaddr, buf, len);
+}
+
+static inline void io_insb(unsigned long addr, void *buf, int len)
+{
+       uint8_t *bp = buf;
+
+       while (len--)
+               *bp++ = __builtin_read8((volatile void __iomem *) addr);
+}
+
+static inline void io_insw(unsigned long addr, void *buf, int len)
+{
+       uint16_t *bp = buf;
+
+       while (len--)
+               *bp++ = __builtin_read16((volatile void __iomem *) addr);
+}
+
+extern void __insl_ns(unsigned long addr, void *buf, int len);
+extern void __insl_sw(unsigned long addr, void *buf, int len);
+static inline void __insl(unsigned long addr, void *buf, int len, int swap)
+{
+       if (!swap)
+               __insl_ns(addr, buf, len);
+       else
+               __insl_sw(addr, buf, len);
+}
+
+#define mmiowb() mb()
+
+/*
+ *     make the short names macros so specific devices
+ *     can override them as required
+ */
+
+static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count)
+{
+       memset((void __force *) addr, val, count);
+}
+
+static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
+{
+       memcpy(dst, (void __force *) src, count);
+}
+
+static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int count)
+{
+       memcpy((void __force *) dst, src, count);
+}
+
+static inline uint8_t inb(unsigned long addr)
+{
+       return __builtin_read8((void __iomem *)addr);
+}
+
+static inline uint16_t inw(unsigned long addr)
+{
+       uint16_t ret = __builtin_read16((void __iomem *)addr);
+
+       if (__is_PCI_IO(addr))
+               ret = _swapw(ret);
+
+       return ret;
+}
+
+static inline uint32_t inl(unsigned long addr)
+{
+       uint32_t ret = __builtin_read32((void __iomem *)addr);
+
+       if (__is_PCI_IO(addr))
+               ret = _swapl(ret);
+
+       return ret;
+}
+
+static inline void outb(uint8_t datum, unsigned long addr)
+{
+       __builtin_write8((void __iomem *)addr, datum);
+}
+
+static inline void outw(uint16_t datum, unsigned long addr)
+{
+       if (__is_PCI_IO(addr))
+               datum = _swapw(datum);
+       __builtin_write16((void __iomem *)addr, datum);
+}
+
+static inline void outl(uint32_t datum, unsigned long addr)
+{
+       if (__is_PCI_IO(addr))
+               datum = _swapl(datum);
+       __builtin_write32((void __iomem *)addr, datum);
+}
+
+#define inb_p(addr)    inb(addr)
+#define inw_p(addr)    inw(addr)
+#define inl_p(addr)    inl(addr)
+#define outb_p(x,addr) outb(x,addr)
+#define outw_p(x,addr) outw(x,addr)
+#define outl_p(x,addr) outl(x,addr)
+
+#define outsb(a,b,l)   io_outsb(a,b,l)
+#define outsw(a,b,l)   io_outsw(a,b,l)
+#define outsl(a,b,l)   __outsl(a,b,l,0)
+
+#define insb(a,b,l)    io_insb(a,b,l)
+#define insw(a,b,l)    io_insw(a,b,l)
+#define insl(a,b,l)    __insl(a,b,l,0)
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+static inline uint8_t readb(const volatile void __iomem *addr)
+{
+       return __builtin_read8((__force void volatile __iomem *) addr);
+}
+
+static inline uint16_t readw(const volatile void __iomem *addr)
+{
+       uint16_t ret =  __builtin_read16((__force void volatile __iomem *)addr);
+
+       if (__is_PCI_MEM(addr))
+               ret = _swapw(ret);
+       return ret;
+}
+
+static inline uint32_t readl(const volatile void __iomem *addr)
+{
+       uint32_t ret =  __builtin_read32((__force void volatile __iomem *)addr);
+
+       if (__is_PCI_MEM(addr))
+               ret = _swapl(ret);
+
+       return ret;
+}
+
+#define readb_relaxed readb
+#define readw_relaxed readw
+#define readl_relaxed readl
+
+static inline void writeb(uint8_t datum, volatile void __iomem *addr)
+{
+       __builtin_write8(addr, datum);
+       if (__is_PCI_MEM(addr))
+               __flush_PCI_writes();
+}
+
+static inline void writew(uint16_t datum, volatile void __iomem *addr)
+{
+       if (__is_PCI_MEM(addr))
+               datum = _swapw(datum);
+
+       __builtin_write16(addr, datum);
+       if (__is_PCI_MEM(addr))
+               __flush_PCI_writes();
+}
+
+static inline void writel(uint32_t datum, volatile void __iomem *addr)
+{
+       if (__is_PCI_MEM(addr))
+               datum = _swapl(datum);
+
+       __builtin_write32(addr, datum);
+       if (__is_PCI_MEM(addr))
+               __flush_PCI_writes();
+}
+
+
+/* Values for nocacheflag and cmode */
+#define IOMAP_FULL_CACHING             0
+#define IOMAP_NOCACHE_SER              1
+#define IOMAP_NOCACHE_NONSER           2
+#define IOMAP_WRITETHROUGH             3
+
+extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);
+
+static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
+{
+       return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
+}
+
+static inline void __iomem *ioremap_nocache(unsigned long physaddr, unsigned long size)
+{
+       return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
+}
+
+static inline void __iomem *ioremap_writethrough(unsigned long physaddr, unsigned long size)
+{
+       return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
+}
+
+static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned long size)
+{
+       return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
+}
+
+#define ioremap_wc ioremap_nocache
+
+extern void iounmap(void volatile __iomem *addr);
+
+static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
+{
+       return (void __iomem *) port;
+}
+
+static inline void ioport_unmap(void __iomem *p)
+{
+}
+
+static inline void flush_write_buffers(void)
+{
+       __asm__ __volatile__ ("membar" : : :"memory");
+}
+
+/*
+ * do appropriate I/O accesses for token type
+ */
+static inline unsigned int ioread8(void __iomem *p)
+{
+       return __builtin_read8(p);
+}
+
+static inline unsigned int ioread16(void __iomem *p)
+{
+       uint16_t ret = __builtin_read16(p);
+       if (__is_PCI_addr(p))
+               ret = _swapw(ret);
+       return ret;
+}
+
+static inline unsigned int ioread32(void __iomem *p)
+{
+       uint32_t ret = __builtin_read32(p);
+       if (__is_PCI_addr(p))
+               ret = _swapl(ret);
+       return ret;
+}
+
+static inline void iowrite8(u8 val, void __iomem *p)
+{
+       __builtin_write8(p, val);
+       if (__is_PCI_MEM(p))
+               __flush_PCI_writes();
+}
+
+static inline void iowrite16(u16 val, void __iomem *p)
+{
+       if (__is_PCI_addr(p))
+               val = _swapw(val);
+       __builtin_write16(p, val);
+       if (__is_PCI_MEM(p))
+               __flush_PCI_writes();
+}
+
+static inline void iowrite32(u32 val, void __iomem *p)
+{
+       if (__is_PCI_addr(p))
+               val = _swapl(val);
+       __builtin_write32(p, val);
+       if (__is_PCI_MEM(p))
+               __flush_PCI_writes();
+}
+
+static inline void ioread8_rep(void __iomem *p, void *dst, unsigned long count)
+{
+       io_insb((unsigned long) p, dst, count);
+}
+
+static inline void ioread16_rep(void __iomem *p, void *dst, unsigned long count)
+{
+       io_insw((unsigned long) p, dst, count);
+}
+
+static inline void ioread32_rep(void __iomem *p, void *dst, unsigned long count)
+{
+       __insl_ns((unsigned long) p, dst, count);
+}
+
+static inline void iowrite8_rep(void __iomem *p, const void *src, unsigned long count)
+{
+       io_outsb((unsigned long) p, src, count);
+}
+
+static inline void iowrite16_rep(void __iomem *p, const void *src, unsigned long count)
+{
+       io_outsw((unsigned long) p, src, count);
+}
+
+static inline void iowrite32_rep(void __iomem *p, const void *src, unsigned long count)
+{
+       __outsl_ns((unsigned long) p, src, count);
+}
+
+/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
+struct pci_dev;
+extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
+static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
+{
+}
+
+
+/*
+ * Convert a physical pointer to a virtual kernel pointer for /dev/mem
+ * access
+ */
+#define xlate_dev_mem_ptr(p)   __va(p)
+
+/*
+ * Convert a virtual cached pointer to an uncached pointer
+ */
+#define xlate_dev_kmem_ptr(p)  p
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_IO_H */
diff --git a/arch/frv/include/asm/ioctl.h b/arch/frv/include/asm/ioctl.h
new file mode 100644 (file)
index 0000000..b279fe0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctl.h>
diff --git a/arch/frv/include/asm/ioctls.h b/arch/frv/include/asm/ioctls.h
new file mode 100644 (file)
index 0000000..d0c30e3
--- /dev/null
@@ -0,0 +1,86 @@
+#ifndef __ASM_IOCTLS_H__
+#define __ASM_IOCTLS_H__
+
+#include <asm/ioctl.h>
+
+/* 0x54 is just a magic number to make these relatively unique ('T') */
+
+#define TCGETS         0x5401
+#define TCSETS         0x5402
+#define TCSETSW                0x5403
+#define TCSETSF                0x5404
+#define TCGETA         0x5405
+#define TCSETA         0x5406
+#define TCSETAW                0x5407
+#define TCSETAF                0x5408
+#define TCSBRK         0x5409
+#define TCXONC         0x540A
+#define TCFLSH         0x540B
+#define TIOCEXCL       0x540C
+#define TIOCNXCL       0x540D
+#define TIOCSCTTY      0x540E
+#define TIOCGPGRP      0x540F
+#define TIOCSPGRP      0x5410
+#define TIOCOUTQ       0x5411
+#define TIOCSTI                0x5412
+#define TIOCGWINSZ     0x5413
+#define TIOCSWINSZ     0x5414
+#define TIOCMGET       0x5415
+#define TIOCMBIS       0x5416
+#define TIOCMBIC       0x5417
+#define TIOCMSET       0x5418
+#define TIOCGSOFTCAR   0x5419
+#define TIOCSSOFTCAR   0x541A
+#define FIONREAD       0x541B
+#define TIOCINQ                FIONREAD
+#define TIOCLINUX      0x541C
+#define TIOCCONS       0x541D
+#define TIOCGSERIAL    0x541E
+#define TIOCSSERIAL    0x541F
+#define TIOCPKT                0x5420
+#define FIONBIO                0x5421
+#define TIOCNOTTY      0x5422
+#define TIOCSETD       0x5423
+#define TIOCGETD       0x5424
+#define TCSBRKP                0x5425  /* Needed for POSIX tcsendbreak() */
+#define TIOCTTYGSTRUCT 0x5426  /* For debugging only */
+#define TIOCSBRK       0x5427  /* BSD compatibility */
+#define TIOCCBRK       0x5428  /* BSD compatibility */
+#define TIOCGSID       0x5429  /* Return the session ID of FD */
+#define TCGETS2                _IOR('T',0x2A, struct termios2)
+#define TCSETS2                _IOW('T',0x2B, struct termios2)
+#define TCSETSW2       _IOW('T',0x2C, struct termios2)
+#define TCSETSF2       _IOW('T',0x2D, struct termios2)
+#define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+#define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+
+#define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
+#define FIOCLEX                0x5451
+#define FIOASYNC       0x5452
+#define TIOCSERCONFIG  0x5453
+#define TIOCSERGWILD   0x5454
+#define TIOCSERSWILD   0x5455
+#define TIOCGLCKTRMIOS 0x5456
+#define TIOCSLCKTRMIOS 0x5457
+#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+#define TIOCSERGETLSR   0x5459 /* Get line status register */
+#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
+#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+
+#define TIOCMIWAIT     0x545C  /* wait for a change on serial input line(s) */
+#define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
+#define FIOQSIZE       0x545E
+
+/* Used for packet mode */
+#define TIOCPKT_DATA            0
+#define TIOCPKT_FLUSHREAD       1
+#define TIOCPKT_FLUSHWRITE      2
+#define TIOCPKT_STOP            4
+#define TIOCPKT_START           8
+#define TIOCPKT_NOSTOP         16
+#define TIOCPKT_DOSTOP         32
+
+#define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+
+#endif /* __ASM_IOCTLS_H__ */
+
diff --git a/arch/frv/include/asm/ipcbuf.h b/arch/frv/include/asm/ipcbuf.h
new file mode 100644 (file)
index 0000000..b546f67
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef __ASM_IPCBUF_H__
+#define __ASM_IPCBUF_H__
+
+/*
+ * The user_ipc_perm structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+       __kernel_key_t          key;
+       __kernel_uid32_t        uid;
+       __kernel_gid32_t        gid;
+       __kernel_uid32_t        cuid;
+       __kernel_gid32_t        cgid;
+       __kernel_mode_t         mode;
+       unsigned short          __pad1;
+       unsigned short          seq;
+       unsigned short          __pad2;
+       unsigned long           __unused1;
+       unsigned long           __unused2;
+};
+
+#endif /* __ASM_IPCBUF_H__ */
+
diff --git a/arch/frv/include/asm/irc-regs.h b/arch/frv/include/asm/irc-regs.h
new file mode 100644 (file)
index 0000000..afa30ae
--- /dev/null
@@ -0,0 +1,53 @@
+/* irc-regs.h: on-chip interrupt controller registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_IRC_REGS
+#define _ASM_IRC_REGS
+
+#define __reg(ADDR) (*(volatile unsigned long *)(ADDR))
+
+#define __get_TM0()    ({ __reg(0xfeff9800); })
+#define __get_TM1()    ({ __reg(0xfeff9808); })
+#define __set_TM1(V)   do { __reg(0xfeff9808) = (V); mb(); } while(0)
+
+#define __set_TM1x(XI,V)                       \
+do {                                           \
+       int shift = (XI) * 2 + 16;              \
+       unsigned long tm1 = __reg(0xfeff9808);  \
+       tm1 &= ~(0x3 << shift);                 \
+       tm1 |= (V) << shift;                    \
+       __reg(0xfeff9808) = tm1;                \
+       mb();                                   \
+} while(0)
+
+#define __get_RS(C)    ({ (__reg(0xfeff9810) >> ((C)+16)) & 1; })
+
+#define __clr_RC(C)    do { __reg(0xfeff9818) = 1 << ((C)+16); mb(); } while(0)
+
+#define __get_MASK(C)  ({ (__reg(0xfeff9820) >> ((C)+16)) & 1; })
+#define __set_MASK(C)  do { __reg(0xfeff9820) |=  1 << ((C)+16); mb(); } while(0)
+#define __clr_MASK(C)  do { __reg(0xfeff9820) &=  ~(1 << ((C)+16)); mb(); } while(0)
+
+#define __get_MASK_all() __get_MASK(0)
+#define __set_MASK_all() __set_MASK(0)
+#define __clr_MASK_all() __clr_MASK(0)
+
+#define __get_IRL()    ({ (__reg(0xfeff9828) >> 16) & 0xf; })
+#define __clr_IRL()    do { __reg(0xfeff9828) = 0x100000; mb(); } while(0)
+
+#define __get_IRR(N)   ({ __reg(0xfeff9840 + (N) * 8); })
+#define __set_IRR(N,V) do { __reg(0xfeff9840 + (N) * 8) = (V); } while(0)
+
+#define __get_IITMR(N) ({ __reg(0xfeff9880 + (N) * 8); })
+#define __set_IITMR(N,V) do { __reg(0xfeff9880 + (N) * 8) = (V); } while(0)
+
+
+#endif /* _ASM_IRC_REGS */
diff --git a/arch/frv/include/asm/irq.h b/arch/frv/include/asm/irq.h
new file mode 100644 (file)
index 0000000..3a66ebd
--- /dev/null
@@ -0,0 +1,30 @@
+/* irq.h: FRV IRQ definitions
+ *
+ * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_IRQ_H_
+#define _ASM_IRQ_H_
+
+#define NR_IRQS                                48
+#define IRQ_BASE_CPU                   (0 * 16)
+#define IRQ_BASE_FPGA                  (1 * 16)
+#define IRQ_BASE_MB93493               (2 * 16)
+
+/* probe returns a 32-bit IRQ mask:-/ */
+#define MIN_PROBE_IRQ                  (NR_IRQS - 32)
+
+#ifndef __ASSEMBLY__
+static inline int irq_canonicalize(int irq)
+{
+       return irq;
+}
+#endif
+
+#endif /* _ASM_IRQ_H_ */
diff --git a/arch/frv/include/asm/irq_regs.h b/arch/frv/include/asm/irq_regs.h
new file mode 100644 (file)
index 0000000..d22e832
--- /dev/null
@@ -0,0 +1,27 @@
+/* FRV per-CPU frame pointer holder
+ *
+ * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_IRQ_REGS_H
+#define _ASM_IRQ_REGS_H
+
+/*
+ * Per-cpu current frame pointer - the location of the last exception frame on
+ * the stack
+ * - on FRV, GR28 is dedicated to keeping a pointer to the current exception
+ *   frame
+ */
+#define ARCH_HAS_OWN_IRQ_REGS
+
+#ifndef __ASSEMBLY__
+#define get_irq_regs() (__frame)
+#endif
+
+#endif /* _ASM_IRQ_REGS_H */
diff --git a/arch/frv/include/asm/kdebug.h b/arch/frv/include/asm/kdebug.h
new file mode 100644 (file)
index 0000000..6ece1b0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kdebug.h>
diff --git a/arch/frv/include/asm/kmap_types.h b/arch/frv/include/asm/kmap_types.h
new file mode 100644 (file)
index 0000000..f8e16b2
--- /dev/null
@@ -0,0 +1,29 @@
+
+#ifndef _ASM_KMAP_TYPES_H
+#define _ASM_KMAP_TYPES_H
+
+enum km_type {
+       /* arch specific kmaps - change the numbers attached to these at your peril */
+       __KM_CACHE,             /* cache flush page attachment point */
+       __KM_PGD,               /* current page directory */
+       __KM_ITLB_PTD,          /* current instruction TLB miss page table lookup */
+       __KM_DTLB_PTD,          /* current data TLB miss page table lookup */
+
+       /* general kmaps */
+        KM_BOUNCE_READ,
+        KM_SKB_SUNRPC_DATA,
+        KM_SKB_DATA_SOFTIRQ,
+        KM_USER0,
+        KM_USER1,
+       KM_BIO_SRC_IRQ,
+       KM_BIO_DST_IRQ,
+       KM_PTE0,
+       KM_PTE1,
+       KM_IRQ0,
+       KM_IRQ1,
+       KM_SOFTIRQ0,
+       KM_SOFTIRQ1,
+       KM_TYPE_NR
+};
+
+#endif
diff --git a/arch/frv/include/asm/linkage.h b/arch/frv/include/asm/linkage.h
new file mode 100644 (file)
index 0000000..636c1bc
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __ASM_LINKAGE_H
+#define __ASM_LINKAGE_H
+
+#define __ALIGN                .align 4
+#define __ALIGN_STR    ".align 4"
+
+#endif
diff --git a/arch/frv/include/asm/local.h b/arch/frv/include/asm/local.h
new file mode 100644 (file)
index 0000000..c27bdf0
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_LOCAL_H
+#define _ASM_LOCAL_H
+
+#include <asm-generic/local.h>
+
+#endif /* _ASM_LOCAL_H */
diff --git a/arch/frv/include/asm/math-emu.h b/arch/frv/include/asm/math-emu.h
new file mode 100644 (file)
index 0000000..0c8f731
--- /dev/null
@@ -0,0 +1,301 @@
+#ifndef _ASM_MATH_EMU_H
+#define _ASM_MATH_EMU_H
+
+#include <asm/setup.h>
+#include <linux/linkage.h>
+
+/* Status Register bits */
+
+/* accrued exception bits */
+#define FPSR_AEXC_INEX 3
+#define FPSR_AEXC_DZ   4
+#define FPSR_AEXC_UNFL 5
+#define FPSR_AEXC_OVFL 6
+#define FPSR_AEXC_IOP  7
+
+/* exception status bits */
+#define FPSR_EXC_INEX1 8
+#define FPSR_EXC_INEX2 9
+#define FPSR_EXC_DZ    10
+#define FPSR_EXC_UNFL  11
+#define FPSR_EXC_OVFL  12
+#define FPSR_EXC_OPERR 13
+#define FPSR_EXC_SNAN  14
+#define FPSR_EXC_BSUN  15
+
+/* quotient byte, assumes big-endian, of course */
+#define FPSR_QUOTIENT(fpsr) (*((signed char *) &(fpsr) + 1))
+
+/* condition code bits */
+#define FPSR_CC_NAN    24
+#define FPSR_CC_INF    25
+#define FPSR_CC_Z      26
+#define FPSR_CC_NEG    27
+
+
+/* Control register bits */
+
+/* rounding mode */
+#define        FPCR_ROUND_RN   0               /* round to nearest/even */
+#define FPCR_ROUND_RZ  1               /* round to zero */
+#define FPCR_ROUND_RM  2               /* minus infinity */
+#define FPCR_ROUND_RP  3               /* plus infinity */
+
+/* rounding precision */
+#define FPCR_PRECISION_X       0       /* long double */
+#define FPCR_PRECISION_S       1       /* double */
+#define FPCR_PRECISION_D       2       /* float */
+
+
+/* Flags to select the debugging output */
+#define PDECODE                0
+#define PEXECUTE       1
+#define PCONV          2
+#define PNORM          3
+#define PREGISTER      4
+#define PINSTR         5
+#define PUNIMPL                6
+#define PMOVEM         7
+
+#define PMDECODE       (1<<PDECODE)
+#define PMEXECUTE      (1<<PEXECUTE)
+#define PMCONV         (1<<PCONV)
+#define PMNORM         (1<<PNORM)
+#define PMREGISTER     (1<<PREGISTER)
+#define PMINSTR                (1<<PINSTR)
+#define PMUNIMPL       (1<<PUNIMPL)
+#define PMMOVEM                (1<<PMOVEM)
+
+#ifndef __ASSEMBLY__
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
+union fp_mant64 {
+       unsigned long long m64;
+       unsigned long m32[2];
+};
+
+union fp_mant128 {
+       unsigned long long m64[2];
+       unsigned long m32[4];
+};
+
+/* internal representation of extended fp numbers */
+struct fp_ext {
+       unsigned char lowmant;
+       unsigned char sign;
+       unsigned short exp;
+       union fp_mant64 mant;
+};
+
+/* C representation of FPU registers */
+/* NOTE: if you change this, you have to change the assembler offsets
+   below and the size in <asm/fpu.h>, too */
+struct fp_data {
+       struct fp_ext fpreg[8];
+       unsigned int fpcr;
+       unsigned int fpsr;
+       unsigned int fpiar;
+       unsigned short prec;
+       unsigned short rnd;
+       struct fp_ext temp[2];
+};
+
+#if FPU_EMU_DEBUG
+extern unsigned int fp_debugprint;
+
+#define dprint(bit, fmt, args...) ({                   \
+       if (fp_debugprint & (1 << (bit)))               \
+               printk(fmt, ## args);                   \
+})
+#else
+#define dprint(bit, fmt, args...)
+#endif
+
+#define uprint(str) ({                                 \
+       static int __count = 3;                         \
+                                                       \
+       if (__count > 0) {                              \
+               printk("You just hit an unimplemented " \
+                      "fpu instruction (%s)\n", str);  \
+               printk("Please report this to ....\n"); \
+               __count--;                              \
+       }                                               \
+})
+
+#define FPDATA         ((struct fp_data *)current->thread.fp)
+
+#else  /* __ASSEMBLY__ */
+
+#define FPDATA         %a2
+
+/* offsets from the base register to the floating point data in the task struct */
+#define FPD_FPREG      (TASK_THREAD+THREAD_FPREG+0)
+#define FPD_FPCR       (TASK_THREAD+THREAD_FPREG+96)
+#define FPD_FPSR       (TASK_THREAD+THREAD_FPREG+100)
+#define FPD_FPIAR      (TASK_THREAD+THREAD_FPREG+104)
+#define FPD_PREC       (TASK_THREAD+THREAD_FPREG+108)
+#define FPD_RND                (TASK_THREAD+THREAD_FPREG+110)
+#define FPD_TEMPFP1    (TASK_THREAD+THREAD_FPREG+112)
+#define FPD_TEMPFP2    (TASK_THREAD+THREAD_FPREG+124)
+#define FPD_SIZEOF     (TASK_THREAD+THREAD_FPREG+136)
+
+/* offsets on the stack to access saved registers,
+ * these are only used during instruction decoding
+ * where we always know how deep we're on the stack.
+ */
+#define FPS_DO         (PT_D0)
+#define FPS_D1         (PT_D1)
+#define FPS_D2         (PT_D2)
+#define FPS_A0         (PT_A0)
+#define FPS_A1         (PT_A1)
+#define FPS_A2         (PT_A2)
+#define FPS_SR         (PT_SR)
+#define FPS_PC         (PT_PC)
+#define FPS_EA         (PT_PC+6)
+#define FPS_PC2                (PT_PC+10)
+
+.macro fp_get_fp_reg
+       lea     (FPD_FPREG,FPDATA,%d0.w*4),%a0
+       lea     (%a0,%d0.w*8),%a0
+.endm
+
+/* Macros used to get/put the current program counter.
+ * 020/030 use a different stack frame then 040/060, for the
+ * 040/060 the return pc points already to the next location,
+ * so this only needs to be modified for jump instructions.
+ */
+.macro fp_get_pc dest
+       move.l  (FPS_PC+4,%sp),\dest
+.endm
+
+.macro fp_put_pc src,jump=0
+       move.l  \src,(FPS_PC+4,%sp)
+.endm
+
+.macro fp_get_instr_data       f,s,dest,label
+       getuser \f,%sp@(FPS_PC+4)@(0),\dest,\label,%sp@(FPS_PC+4)
+       addq.l  #\s,%sp@(FPS_PC+4)
+.endm
+
+.macro fp_get_instr_word       dest,label,addr
+       fp_get_instr_data       w,2,\dest,\label,\addr
+.endm
+
+.macro fp_get_instr_long       dest,label,addr
+       fp_get_instr_data       l,4,\dest,\label,\addr
+.endm
+
+/* These macros are used to read from/write to user space
+ * on error we jump to the fixup section, load the fault
+ * address into %a0 and jump to the exit.
+ * (derived from <asm/uaccess.h>)
+ */
+.macro getuser size,src,dest,label,addr
+|      printf  ,"[\size<%08x]",1,\addr
+.Lu1\@:        moves\size      \src,\dest
+
+       .section .fixup,"ax"
+       .even
+.Lu2\@:        move.l  \addr,%a0
+       jra     \label
+       .previous
+
+       .section __ex_table,"a"
+       .align  4
+       .long   .Lu1\@,.Lu2\@
+       .previous
+.endm
+
+.macro putuser size,src,dest,label,addr
+|      printf  ,"[\size>%08x]",1,\addr
+.Lu1\@:        moves\size      \src,\dest
+.Lu2\@:
+
+       .section .fixup,"ax"
+       .even
+.Lu3\@:        move.l  \addr,%a0
+       jra     \label
+       .previous
+
+       .section __ex_table,"a"
+       .align  4
+       .long   .Lu1\@,.Lu3\@
+       .long   .Lu2\@,.Lu3\@
+       .previous
+.endm
+
+
+.macro movestack       nr,arg1,arg2,arg3,arg4,arg5
+       .if     \nr
+       movestack       (\nr-1),\arg2,\arg3,\arg4,\arg5
+       move.l  \arg1,-(%sp)
+       .endif
+.endm
+
+.macro printf  bit=-1,string,nr=0,arg1,arg2,arg3,arg4,arg5
+#ifdef FPU_EMU_DEBUG
+       .data
+.Lpdata\@:
+       .string "\string"
+       .previous
+
+       movem.l %d0/%d1/%a0/%a1,-(%sp)
+       .if     \bit+1
+#if 0
+       moveq   #\bit,%d0
+       andw    #7,%d0
+       btst    %d0,fp_debugprint+((31-\bit)/8)
+#else
+       btst    #\bit,fp_debugprint+((31-\bit)/8)
+#endif
+       jeq     .Lpskip\@
+       .endif
+       movestack       \nr,\arg1,\arg2,\arg3,\arg4,\arg5
+       pea     .Lpdata\@
+       jsr     printk
+       lea     ((\nr+1)*4,%sp),%sp
+.Lpskip\@:
+       movem.l (%sp)+,%d0/%d1/%a0/%a1
+#endif
+.endm
+
+.macro printx  bit,fp
+#ifdef FPU_EMU_DEBUG
+       movem.l %d0/%a0,-(%sp)
+       lea     \fp,%a0
+#if 0
+       moveq   #'+',%d0
+       tst.w   (%a0)
+       jeq     .Lx1\@
+       moveq   #'-',%d0
+.Lx1\@:        printf  \bit," %c",1,%d0
+       move.l  (4,%a0),%d0
+       bclr    #31,%d0
+       jne     .Lx2\@
+       printf  \bit,"0."
+       jra     .Lx3\@
+.Lx2\@:        printf  \bit,"1."
+.Lx3\@:        printf  \bit,"%08x%08x",2,%d0,%a0@(8)
+       move.w  (2,%a0),%d0
+       ext.l   %d0
+       printf  \bit,"E%04x",1,%d0
+#else
+       printf  \bit," %08x%08x%08x",3,%a0@,%a0@(4),%a0@(8)
+#endif
+       movem.l (%sp)+,%d0/%a0
+#endif
+.endm
+
+.macro debug   instr,args
+#ifdef FPU_EMU_DEBUG
+       \instr  \args
+#endif
+.endm
+
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_FRV_MATH_EMU_H */
+
diff --git a/arch/frv/include/asm/mb-regs.h b/arch/frv/include/asm/mb-regs.h
new file mode 100644 (file)
index 0000000..219e5f9
--- /dev/null
@@ -0,0 +1,200 @@
+/* mb-regs.h: motherboard registers
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MB_REGS_H
+#define _ASM_MB_REGS_H
+
+#include <asm/cpu-irqs.h>
+#include <asm/sections.h>
+#include <asm/mem-layout.h>
+
+#ifndef __ASSEMBLY__
+/* gcc builtins, annotated */
+
+unsigned long __builtin_read8(volatile void __iomem *);
+unsigned long __builtin_read16(volatile void __iomem *);
+unsigned long __builtin_read32(volatile void __iomem *);
+void __builtin_write8(volatile void __iomem *, unsigned char);
+void __builtin_write16(volatile void __iomem *, unsigned short);
+void __builtin_write32(volatile void __iomem *, unsigned long);
+#endif
+
+#define __region_IO    KERNEL_IO_START /* the region from 0xe0000000 to 0xffffffff has suitable
+                                        * protection laid over the top for use in memory-mapped
+                                        * I/O
+                                        */
+
+#define __region_CS0   0xff000000      /* Boot ROMs area */
+
+#ifdef CONFIG_MB93091_VDK
+/*
+ * VDK motherboard and CPU card specific stuff
+ */
+
+#include <asm/mb93091-fpga-irqs.h>
+
+#define IRQ_CPU_MB93493_0      IRQ_CPU_EXTERNAL0
+#define IRQ_CPU_MB93493_1      IRQ_CPU_EXTERNAL1
+
+#define __region_CS2   0xe0000000      /* SLBUS/PCI I/O space */
+#define __region_CS2_M         0x0fffffff /* mask */
+#define __region_CS2_C         0x00000000 /* control */
+#define __region_CS5   0xf0000000      /* MB93493 CSC area (DAV daughter board) */
+#define __region_CS5_M         0x00ffffff
+#define __region_CS5_C         0x00010000
+#define __region_CS7   0xf1000000      /* CB70 CPU-card PCMCIA port I/O space */
+#define __region_CS7_M         0x00ffffff
+#define __region_CS7_C         0x00410701
+#define __region_CS1   0xfc000000      /* SLBUS/PCI bridge control registers */
+#define __region_CS1_M         0x000fffff
+#define __region_CS1_C         0x00000000
+#define __region_CS6   0xfc100000      /* CB70 CPU-card DM9000 LAN I/O space */
+#define __region_CS6_M         0x000fffff
+#define __region_CS6_C         0x00400707
+#define __region_CS3   0xfc200000      /* MB93493 CSR area (DAV daughter board) */
+#define __region_CS3_M         0x000fffff
+#define __region_CS3_C         0xc8100000
+#define __region_CS4   0xfd000000      /* CB70 CPU-card extra flash space */
+#define __region_CS4_M         0x00ffffff
+#define __region_CS4_C         0x00000f07
+
+#define __region_PCI_IO                (__region_CS2 + 0x04000000UL)
+#define __region_PCI_MEM       (__region_CS2 + 0x08000000UL)
+#define __flush_PCI_writes()                                           \
+do {                                                                   \
+       __builtin_write8((volatile void __iomem *) __region_PCI_MEM, 0);        \
+} while(0)
+
+#define __is_PCI_IO(addr) \
+       (((unsigned long)(addr) >> 24) - (__region_PCI_IO >> 24)  < (0x04000000UL >> 24))
+
+#define __is_PCI_MEM(addr) \
+       ((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL)
+
+#define __is_PCI_addr(addr) \
+       ((unsigned long)(addr) - __region_PCI_IO < 0x0c000000UL)
+
+#define __get_CLKSW()  ({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; })
+#define __get_CLKIN()  (__get_CLKSW() * 125U * 100000U / 24U)
+
+#ifndef __ASSEMBLY__
+extern int __nongprelbss mb93090_mb00_detected;
+#endif
+
+#define __addr_LEDS()          (__region_CS2 + 0x01200004UL)
+#ifdef CONFIG_MB93090_MB00
+#define __set_LEDS(X)                                                  \
+do {                                                                   \
+       if (mb93090_mb00_detected)                                      \
+               __builtin_write32((void __iomem *) __addr_LEDS(), ~(X));        \
+} while (0)
+#else
+#define __set_LEDS(X)
+#endif
+
+#define __addr_LCD()           (__region_CS2 + 0x01200008UL)
+#define __get_LCD(B)           __builtin_read32((volatile void __iomem *) (B))
+#define __set_LCD(B,X)         __builtin_write32((volatile void __iomem *) (B), (X))
+
+#define LCD_D                  0x000000ff              /* LCD data bus */
+#define LCD_RW                 0x00000100              /* LCD R/W signal */
+#define LCD_RS                 0x00000200              /* LCD Register Select */
+#define LCD_E                  0x00000400              /* LCD Start Enable Signal */
+
+#define LCD_CMD_CLEAR          (LCD_E|0x001)
+#define LCD_CMD_HOME           (LCD_E|0x002)
+#define LCD_CMD_CURSOR_INC     (LCD_E|0x004)
+#define LCD_CMD_SCROLL_INC     (LCD_E|0x005)
+#define LCD_CMD_CURSOR_DEC     (LCD_E|0x006)
+#define LCD_CMD_SCROLL_DEC     (LCD_E|0x007)
+#define LCD_CMD_OFF            (LCD_E|0x008)
+#define LCD_CMD_ON(CRSR,BLINK) (LCD_E|0x00c|(CRSR<<1)|BLINK)
+#define LCD_CMD_CURSOR_MOVE_L  (LCD_E|0x010)
+#define LCD_CMD_CURSOR_MOVE_R  (LCD_E|0x014)
+#define LCD_CMD_DISPLAY_SHIFT_L        (LCD_E|0x018)
+#define LCD_CMD_DISPLAY_SHIFT_R        (LCD_E|0x01c)
+#define LCD_CMD_FUNCSET(DL,N,F)        (LCD_E|0x020|(DL<<4)|(N<<3)|(F<<2))
+#define LCD_CMD_SET_CG_ADDR(X) (LCD_E|0x040|X)
+#define LCD_CMD_SET_DD_ADDR(X) (LCD_E|0x080|X)
+#define LCD_CMD_READ_BUSY      (LCD_E|LCD_RW)
+#define LCD_DATA_WRITE(X)      (LCD_E|LCD_RS|(X))
+#define LCD_DATA_READ          (LCD_E|LCD_RS|LCD_RW)
+
+#else
+/*
+ * PDK unit specific stuff
+ */
+
+#include <asm/mb93093-fpga-irqs.h>
+
+#define IRQ_CPU_MB93493_0      IRQ_CPU_EXTERNAL0
+#define IRQ_CPU_MB93493_1      IRQ_CPU_EXTERNAL1
+
+#define __region_CS5   0xf0000000      /* MB93493 CSC area (DAV daughter board) */
+#define __region_CS5_M         0x00ffffff /* mask */
+#define __region_CS5_C         0x00010000 /* control */
+#define __region_CS2   0x20000000      /* FPGA registers */
+#define __region_CS2_M         0x000fffff
+#define __region_CS2_C         0x00000000
+#define __region_CS1   0xfc100000      /* LAN registers */
+#define __region_CS1_M         0x000fffff
+#define __region_CS1_C         0x00010404
+#define __region_CS3   0xfc200000      /* MB93493 CSR area (DAV daughter board) */
+#define __region_CS3_M         0x000fffff
+#define __region_CS3_C         0xc8000000
+#define __region_CS4   0xfd000000      /* extra ROMs area */
+#define __region_CS4_M         0x00ffffff
+#define __region_CS4_C         0x00000f07
+
+#define __region_CS6   0xfe000000      /* not used - hide behind CPU resource I/O regs */
+#define __region_CS6_M         0x000fffff
+#define __region_CS6_C         0x00000f07
+#define __region_CS7   0xfe000000      /* not used - hide behind CPU resource I/O regs */
+#define __region_CS7_M         0x000fffff
+#define __region_CS7_C         0x00000f07
+
+#define __is_PCI_IO(addr)      0       /* no PCI */
+#define __is_PCI_MEM(addr)     0
+#define __is_PCI_addr(addr)    0
+#define __region_PCI_IO                0
+#define __region_PCI_MEM       0
+#define __flush_PCI_writes()   do { } while(0)
+
+#define __get_CLKSW()          0UL
+#define __get_CLKIN()          66000000UL
+
+#define __addr_LEDS()          (__region_CS2 + 0x00000023UL)
+#define __set_LEDS(X)          __builtin_write8((volatile void __iomem *) __addr_LEDS(), (X))
+
+#define __addr_FPGATR()                (__region_CS2 + 0x00000030UL)
+#define __set_FPGATR(X)                __builtin_write32((volatile void __iomem *) __addr_FPGATR(), (X))
+#define __get_FPGATR()         __builtin_read32((volatile void __iomem *) __addr_FPGATR())
+
+#define MB93093_FPGA_FPGATR_AUDIO_CLK  0x00000003
+
+#define __set_FPGATR_AUDIO_CLK(V) \
+       __set_FPGATR((__get_FPGATR() & ~MB93093_FPGA_FPGATR_AUDIO_CLK) | (V))
+
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_OFF      0x0
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_11MHz    0x1
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_12MHz    0x2
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_02MHz    0x3
+
+#define MB93093_FPGA_SWR_PUSHSWMASK    (0x1F<<26)
+#define MB93093_FPGA_SWR_PUSHSW4       (1<<29)
+
+#define __addr_FPGA_SWR                ((volatile void __iomem *)(__region_CS2 + 0x28UL))
+#define __get_FPGA_PUSHSW1_5() (__builtin_read32(__addr_FPGA_SWR) & MB93093_FPGA_SWR_PUSHSWMASK)
+
+
+#endif
+
+#endif /* _ASM_MB_REGS_H */
diff --git a/arch/frv/include/asm/mb86943a.h b/arch/frv/include/asm/mb86943a.h
new file mode 100644 (file)
index 0000000..e87ef92
--- /dev/null
@@ -0,0 +1,42 @@
+/* mb86943a.h: MB86943 SPARClite <-> PCI bridge registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MB86943A_H
+#define _ASM_MB86943A_H
+
+#include <asm/mb-regs.h>
+
+#define __reg_MB86943_sl_ctl           *(volatile uint32_t *) (__region_CS1 + 0x00)
+
+#define MB86943_SL_CTL_BUS_WIDTH_64    0x00000001
+#define MB86943_SL_CTL_AS_HOST         0x00000002
+#define MB86943_SL_CTL_DRCT_MASTER_SWAP        0x00000004
+#define MB86943_SL_CTL_DRCT_SLAVE_SWAP 0x00000008
+#define MB86943_SL_CTL_PCI_CONFIG_SWAP 0x00000010
+#define MB86943_SL_CTL_ECS0_ENABLE     0x00000020
+#define MB86943_SL_CTL_ECS1_ENABLE     0x00000040
+#define MB86943_SL_CTL_ECS2_ENABLE     0x00000080
+
+#define __reg_MB86943_ecs_ctl(N)       *(volatile uint32_t *) (__region_CS1 + 0x08 + (0x08*(N)))
+#define __reg_MB86943_ecs_range(N)     *(volatile uint32_t *) (__region_CS1 + 0x20 + (0x10*(N)))
+#define __reg_MB86943_ecs_base(N)      *(volatile uint32_t *) (__region_CS1 + 0x28 + (0x10*(N)))
+
+#define __reg_MB86943_sl_pci_io_range  *(volatile uint32_t *) (__region_CS1 + 0x50)
+#define __reg_MB86943_sl_pci_io_base   *(volatile uint32_t *) (__region_CS1 + 0x58)
+#define __reg_MB86943_sl_pci_mem_range *(volatile uint32_t *) (__region_CS1 + 0x60)
+#define __reg_MB86943_sl_pci_mem_base  *(volatile uint32_t *) (__region_CS1 + 0x68)
+#define __reg_MB86943_pci_sl_io_base   *(volatile uint32_t *) (__region_CS1 + 0x70)
+#define __reg_MB86943_pci_sl_mem_base  *(volatile uint32_t *) (__region_CS1 + 0x78)
+
+#define __reg_MB86943_pci_arbiter      *(volatile uint32_t *) (__region_CS2 + 0x01300014)
+#define MB86943_PCIARB_EN              0x00000001
+
+#endif /* _ASM_MB86943A_H */
diff --git a/arch/frv/include/asm/mb93091-fpga-irqs.h b/arch/frv/include/asm/mb93091-fpga-irqs.h
new file mode 100644 (file)
index 0000000..19778c5
--- /dev/null
@@ -0,0 +1,42 @@
+/* mb93091-fpga-irqs.h: MB93091 CPU board FPGA IRQs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MB93091_FPGA_IRQS_H
+#define _ASM_MB93091_FPGA_IRQS_H
+
+#include <asm/irq.h>
+
+#ifndef __ASSEMBLY__
+
+/* IRQ IDs presented to drivers */
+enum {
+       IRQ_FPGA__UNUSED                        = IRQ_BASE_FPGA,
+       IRQ_FPGA_SYSINT_BUS_EXPANSION_1,
+       IRQ_FPGA_SL_BUS_EXPANSION_2,
+       IRQ_FPGA_PCI_INTD,
+       IRQ_FPGA_PCI_INTC,
+       IRQ_FPGA_PCI_INTB,
+       IRQ_FPGA_PCI_INTA,
+       IRQ_FPGA_SL_BUS_EXPANSION_7,
+       IRQ_FPGA_SYSINT_BUS_EXPANSION_8,
+       IRQ_FPGA_SL_BUS_EXPANSION_9,
+       IRQ_FPGA_MB86943_PCI_INTA,
+       IRQ_FPGA_MB86943_SLBUS_SIDE,
+       IRQ_FPGA_RTL8029_INTA,
+       IRQ_FPGA_SYSINT_BUS_EXPANSION_13,
+       IRQ_FPGA_SL_BUS_EXPANSION_14,
+       IRQ_FPGA_NMI,
+};
+
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_MB93091_FPGA_IRQS_H */
diff --git a/arch/frv/include/asm/mb93093-fpga-irqs.h b/arch/frv/include/asm/mb93093-fpga-irqs.h
new file mode 100644 (file)
index 0000000..590266b
--- /dev/null
@@ -0,0 +1,29 @@
+/* mb93093-fpga-irqs.h: MB93093 CPU board FPGA IRQs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MB93093_FPGA_IRQS_H
+#define _ASM_MB93093_FPGA_IRQS_H
+
+#include <asm/irq.h>
+
+#ifndef __ASSEMBLY__
+
+/* IRQ IDs presented to drivers */
+enum {
+       IRQ_FPGA_PUSH_BUTTON_SW1_5              = IRQ_BASE_FPGA + 8,
+       IRQ_FPGA_ROCKER_C_SW8                   = IRQ_BASE_FPGA + 9,
+       IRQ_FPGA_ROCKER_C_SW9                   = IRQ_BASE_FPGA + 10,
+};
+
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_MB93093_FPGA_IRQS_H */
diff --git a/arch/frv/include/asm/mb93493-irqs.h b/arch/frv/include/asm/mb93493-irqs.h
new file mode 100644 (file)
index 0000000..82c7aed
--- /dev/null
@@ -0,0 +1,50 @@
+/* mb93493-irqs.h: MB93493 companion chip IRQs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MB93493_IRQS_H
+#define _ASM_MB93493_IRQS_H
+
+#include <asm/irq.h>
+
+#ifndef __ASSEMBLY__
+
+/* IRQ IDs presented to drivers */
+enum {
+       IRQ_MB93493_VDC                 = IRQ_BASE_MB93493 + 0,
+       IRQ_MB93493_VCC                 = IRQ_BASE_MB93493 + 1,
+       IRQ_MB93493_AUDIO_OUT           = IRQ_BASE_MB93493 + 2,
+       IRQ_MB93493_I2C_0               = IRQ_BASE_MB93493 + 3,
+       IRQ_MB93493_I2C_1               = IRQ_BASE_MB93493 + 4,
+       IRQ_MB93493_USB                 = IRQ_BASE_MB93493 + 5,
+       IRQ_MB93493_LOCAL_BUS           = IRQ_BASE_MB93493 + 7,
+       IRQ_MB93493_PCMCIA              = IRQ_BASE_MB93493 + 8,
+       IRQ_MB93493_GPIO                = IRQ_BASE_MB93493 + 9,
+       IRQ_MB93493_AUDIO_IN            = IRQ_BASE_MB93493 + 10,
+};
+
+/* IRQ multiplexor mappings */
+#define ROUTE_VIA_IRQ0 0       /* route IRQ by way of CPU external IRQ 0 */
+#define ROUTE_VIA_IRQ1 1       /* route IRQ by way of CPU external IRQ 1 */
+
+#define IRQ_MB93493_VDC_ROUTE          ROUTE_VIA_IRQ0
+#define IRQ_MB93493_VCC_ROUTE          ROUTE_VIA_IRQ1
+#define IRQ_MB93493_AUDIO_OUT_ROUTE    ROUTE_VIA_IRQ1
+#define IRQ_MB93493_I2C_0_ROUTE                ROUTE_VIA_IRQ1
+#define IRQ_MB93493_I2C_1_ROUTE                ROUTE_VIA_IRQ1
+#define IRQ_MB93493_USB_ROUTE          ROUTE_VIA_IRQ1
+#define IRQ_MB93493_LOCAL_BUS_ROUTE    ROUTE_VIA_IRQ1
+#define IRQ_MB93493_PCMCIA_ROUTE       ROUTE_VIA_IRQ1
+#define IRQ_MB93493_GPIO_ROUTE         ROUTE_VIA_IRQ1
+#define IRQ_MB93493_AUDIO_IN_ROUTE     ROUTE_VIA_IRQ1
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_MB93493_IRQS_H */
diff --git a/arch/frv/include/asm/mb93493-regs.h b/arch/frv/include/asm/mb93493-regs.h
new file mode 100644 (file)
index 0000000..8a1f6aa
--- /dev/null
@@ -0,0 +1,281 @@
+/* mb93493-regs.h: MB93493 companion chip registers
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MB93493_REGS_H
+#define _ASM_MB93493_REGS_H
+
+#include <asm/mb-regs.h>
+#include <asm/mb93493-irqs.h>
+
+#define __addr_MB93493(X)      ((volatile unsigned long *)(__region_CS3 + (X)))
+#define __get_MB93493(X)       ({ *(volatile unsigned long *)(__region_CS3 + (X)); })
+
+#define __set_MB93493(X,V)                                             \
+do {                                                                   \
+       *(volatile unsigned long *)(__region_CS3 + (X)) = (V); mb();    \
+} while(0)
+
+#define __get_MB93493_STSR(X)  __get_MB93493(0x3c0 + (X) * 4)
+#define __set_MB93493_STSR(X,V)        __set_MB93493(0x3c0 + (X) * 4, (V))
+#define MB93493_STSR_EN
+
+#define __addr_MB93493_IQSR(X) __addr_MB93493(0x3d0 + (X) * 4)
+#define __get_MB93493_IQSR(X)  __get_MB93493(0x3d0 + (X) * 4)
+#define __set_MB93493_IQSR(X,V)        __set_MB93493(0x3d0 + (X) * 4, (V))
+
+#define __get_MB93493_DQSR(X)  __get_MB93493(0x3e0 + (X) * 4)
+#define __set_MB93493_DQSR(X,V)        __set_MB93493(0x3e0 + (X) * 4, (V))
+
+#define __get_MB93493_LBSER()  __get_MB93493(0x3f0)
+#define __set_MB93493_LBSER(V) __set_MB93493(0x3f0, (V))
+
+#define MB93493_LBSER_VDC      0x00010000
+#define MB93493_LBSER_VCC      0x00020000
+#define MB93493_LBSER_AUDIO    0x00040000
+#define MB93493_LBSER_I2C_0    0x00080000
+#define MB93493_LBSER_I2C_1    0x00100000
+#define MB93493_LBSER_USB      0x00200000
+#define MB93493_LBSER_GPIO     0x00800000
+#define MB93493_LBSER_PCMCIA   0x01000000
+
+#define __get_MB93493_LBSR()   __get_MB93493(0x3fc)
+#define __set_MB93493_LBSR(V)  __set_MB93493(0x3fc, (V))
+
+/*
+ * video display controller
+ */
+#define __get_MB93493_VDC(X)   __get_MB93493(MB93493_VDC_##X)
+#define __set_MB93493_VDC(X,V) __set_MB93493(MB93493_VDC_##X, (V))
+
+#define MB93493_VDC_RCURSOR    0x140   /* cursor position */
+#define MB93493_VDC_RCT1       0x144   /* cursor colour 1 */
+#define MB93493_VDC_RCT2       0x148   /* cursor colour 2 */
+#define MB93493_VDC_RHDC       0x150   /* horizontal display period */
+#define MB93493_VDC_RH_MARGINS 0x154   /* horizontal margin sizes */
+#define MB93493_VDC_RVDC       0x158   /* vertical display period */
+#define MB93493_VDC_RV_MARGINS 0x15c   /* vertical margin sizes */
+#define MB93493_VDC_RC         0x170   /* VDC control */
+#define MB93493_VDC_RCLOCK     0x174   /* clock divider, DMA req delay */
+#define MB93493_VDC_RBLACK     0x178   /* black insert sizes */
+#define MB93493_VDC_RS         0x17c   /* VDC status */
+
+#define __addr_MB93493_VDC_BCI(X)  ({ (volatile unsigned long *)(__region_CS3 + 0x000 + (X)); })
+#define __addr_MB93493_VDC_TPO(X)  (__region_CS3 + 0x1c0 + (X))
+
+#define VDC_TPO_WIDTH          32
+
+#define VDC_RC_DSR             0x00000080      /* VDC master reset */
+
+#define VDC_RS_IT              0x00060000      /* interrupt indicators */
+#define VDC_RS_IT_UNDERFLOW    0x00040000      /* - underflow event */
+#define VDC_RS_IT_VSYNC                0x00020000      /* - VSYNC event */
+#define VDC_RS_DFI             0x00010000      /* current interlace field number */
+#define VDC_RS_DFI_TOP         0x00000000      /* - top field */
+#define VDC_RS_DFI_BOTTOM      0x00010000      /* - bottom field */
+#define VDC_RS_DCSR            0x00000010      /* cursor state */
+#define VDC_RS_DCM             0x00000003      /* display mode */
+#define VDC_RS_DCM_DISABLED    0x00000000      /* - display disabled */
+#define VDC_RS_DCM_STOPPED     0x00000001      /* - VDC stopped */
+#define VDC_RS_DCM_FREERUNNING 0x00000002      /* - VDC free-running */
+#define VDC_RS_DCM_TRANSFERRING        0x00000003      /* - data being transferred to VDC */
+
+/*
+ * video capture controller
+ */
+#define __get_MB93493_VCC(X)   __get_MB93493(MB93493_VCC_##X)
+#define __set_MB93493_VCC(X,V) __set_MB93493(MB93493_VCC_##X, (V))
+
+#define MB93493_VCC_RREDUCT    0x104   /* reduction rate */
+#define MB93493_VCC_RHY                0x108   /* horizontal brightness filter coefficients */
+#define MB93493_VCC_RHC                0x10c   /* horizontal colour-difference filter coefficients */
+#define MB93493_VCC_RHSIZE     0x110   /* horizontal cycle sizes */
+#define MB93493_VCC_RHBC       0x114   /* horizontal back porch size */
+#define MB93493_VCC_RVCC       0x118   /* vertical capture period */
+#define MB93493_VCC_RVBC       0x11c   /* vertical back porch period */
+#define MB93493_VCC_RV         0x120   /* vertical filter coefficients */
+#define MB93493_VCC_RDTS       0x128   /* DMA transfer size */
+#define MB93493_VCC_RDTS_4B    0x01000000      /* 4-byte transfer */
+#define MB93493_VCC_RDTS_32B   0x03000000      /* 32-byte transfer */
+#define MB93493_VCC_RDTS_SHIFT 24
+#define MB93493_VCC_RCC                0x130   /* VCC control */
+#define MB93493_VCC_RIS                0x134   /* VCC interrupt status */
+
+#define __addr_MB93493_VCC_TPI(X)  (__region_CS3 + 0x180 + (X))
+
+#define VCC_RHSIZE_RHCC                0x000007ff
+#define VCC_RHSIZE_RHCC_SHIFT  0
+#define VCC_RHSIZE_RHTCC       0x0fff0000
+#define VCC_RHSIZE_RHTCC_SHIFT 16
+
+#define VCC_RVBC_RVBC          0x00003f00
+#define VCC_RVBC_RVBC_SHIFT    8
+
+#define VCC_RREDUCT_RHR                0x07ff0000
+#define VCC_RREDUCT_RHR_SHIFT  16
+#define VCC_RREDUCT_RVR                0x000007ff
+#define VCC_RREDUCT_RVR_SHIFT  0
+
+#define VCC_RCC_CE             0x00000001      /* VCC enable */
+#define VCC_RCC_CS             0x00000002      /* request video capture start */
+#define VCC_RCC_CPF            0x0000000c      /* pixel format */
+#define VCC_RCC_CPF_YCBCR_16   0x00000000      /* - YCbCr 4:2:2 16-bit format */
+#define VCC_RCC_CPF_RGB                0x00000004      /* - RGB 4:4:4 format */
+#define VCC_RCC_CPF_YCBCR_24   0x00000008      /* - YCbCr 4:2:2 24-bit format */
+#define VCC_RCC_CPF_BT656      0x0000000c      /* - ITU R-BT.656 format */
+#define VCC_RCC_CPF_SHIFT      2
+#define VCC_RCC_CSR            0x00000080      /* request reset */
+#define VCC_RCC_HSIP           0x00000100      /* HSYNC polarity */
+#define VCC_RCC_HSIP_LOACT     0x00000000      /* - low active */
+#define VCC_RCC_HSIP_HIACT     0x00000100      /* - high active */
+#define VCC_RCC_VSIP           0x00000200      /* VSYNC polarity */
+#define VCC_RCC_VSIP_LOACT     0x00000000      /* - low active */
+#define VCC_RCC_VSIP_HIACT     0x00000200      /* - high active */
+#define VCC_RCC_CIE            0x00000800      /* interrupt enable */
+#define VCC_RCC_CFP            0x00001000      /* RGB pixel packing */
+#define VCC_RCC_CFP_4TO3       0x00000000      /* - pack 4 pixels into 3 words */
+#define VCC_RCC_CFP_1TO1       0x00001000      /* - pack 1 pixel into 1 words */
+#define VCC_RCC_CSM            0x00006000      /* interlace specification */
+#define VCC_RCC_CSM_ONEPASS    0x00002000      /* - non-interlaced */
+#define VCC_RCC_CSM_INTERLACE  0x00004000      /* - interlaced */
+#define VCC_RCC_CSM_SHIFT      13
+#define VCC_RCC_ES             0x00008000      /* capture start polarity */
+#define VCC_RCC_ES_NEG         0x00000000      /* - negative edge */
+#define VCC_RCC_ES_POS         0x00008000      /* - positive edge */
+#define VCC_RCC_IFI            0x00080000      /* inferlace field evaluation reverse */
+#define VCC_RCC_FDTS           0x00300000      /* interlace field start */
+#define VCC_RCC_FDTS_3_8       0x00000000      /* - 3/8 of horizontal entire cycle */
+#define VCC_RCC_FDTS_1_4       0x00100000      /* - 1/4 of horizontal entire cycle */
+#define VCC_RCC_FDTS_7_16      0x00200000      /* - 7/16 of horizontal entire cycle */
+#define VCC_RCC_FDTS_SHIFT     20
+#define VCC_RCC_MOV            0x00400000      /* test bit - always set to 1 */
+#define VCC_RCC_STP            0x00800000      /* request video capture stop */
+#define VCC_RCC_TO             0x01000000      /* input during top-field only */
+
+#define VCC_RIS_VSYNC          0x01000000      /* VSYNC interrupt */
+#define VCC_RIS_OV             0x02000000      /* overflow interrupt */
+#define VCC_RIS_BOTTOM         0x08000000      /* interlace bottom field */
+#define VCC_RIS_STARTED                0x10000000      /* capture started */
+
+/*
+ * I2C
+ */
+#define MB93493_I2C_BSR        0x340           /* bus status */
+#define MB93493_I2C_BCR                0x344           /* bus control */
+#define MB93493_I2C_CCR                0x348           /* clock control */
+#define MB93493_I2C_ADR                0x34c           /* address */
+#define MB93493_I2C_DTR                0x350           /* data */
+#define MB93493_I2C_BC2R       0x35c           /* bus control 2 */
+
+#define __addr_MB93493_I2C(port,X)   (__region_CS3 + MB93493_I2C_##X + ((port)*0x20))
+#define __get_MB93493_I2C(port,X)    __get_MB93493(MB93493_I2C_##X + ((port)*0x20))
+#define __set_MB93493_I2C(port,X,V)  __set_MB93493(MB93493_I2C_##X + ((port)*0x20), (V))
+
+#define I2C_BSR_BB     (1 << 7)
+
+/*
+ * audio controller (I2S) registers
+ */
+#define __get_MB93493_I2S(X)   __get_MB93493(MB93493_I2S_##X)
+#define __set_MB93493_I2S(X,V) __set_MB93493(MB93493_I2S_##X, (V))
+
+#define MB93493_I2S_ALDR       0x300           /* L-channel data */
+#define MB93493_I2S_ARDR       0x304           /* R-channel data */
+#define MB93493_I2S_APDR       0x308           /* 16-bit packed data */
+#define MB93493_I2S_AISTR      0x310           /* status */
+#define MB93493_I2S_AICR       0x314           /* control */
+
+#define __addr_MB93493_I2S_ALDR(X)     (__region_CS3 + MB93493_I2S_ALDR + (X))
+#define __addr_MB93493_I2S_ARDR(X)     (__region_CS3 + MB93493_I2S_ARDR + (X))
+#define __addr_MB93493_I2S_APDR(X)     (__region_CS3 + MB93493_I2S_APDR + (X))
+#define __addr_MB93493_I2S_ADR(X)      (__region_CS3 + 0x320 + (X))
+
+#define I2S_AISTR_OTST         0x00000003      /* status of output data transfer */
+#define I2S_AISTR_OTR          0x00000010      /* output transfer request pending */
+#define I2S_AISTR_OUR          0x00000020      /* output FIFO underrun detected */
+#define I2S_AISTR_OOR          0x00000040      /* output FIFO overrun detected */
+#define I2S_AISTR_ODS          0x00000100      /* output DMA transfer size */
+#define I2S_AISTR_ODE          0x00000400      /* output DMA transfer request enable */
+#define I2S_AISTR_OTRIE                0x00001000      /* output transfer request interrupt enable */
+#define I2S_AISTR_OURIE                0x00002000      /* output FIFO underrun interrupt enable */
+#define I2S_AISTR_OORIE                0x00004000      /* output FIFO overrun interrupt enable */
+#define I2S_AISTR__OUT_MASK    0x00007570
+#define I2S_AISTR_ITST         0x00030000      /* status of input data transfer */
+#define I2S_AISTR_ITST_SHIFT   16
+#define I2S_AISTR_ITR          0x00100000      /* input transfer request pending */
+#define I2S_AISTR_IUR          0x00200000      /* input FIFO underrun detected */
+#define I2S_AISTR_IOR          0x00400000      /* input FIFO overrun detected */
+#define I2S_AISTR_IDS          0x01000000      /* input DMA transfer size */
+#define I2S_AISTR_IDE          0x04000000      /* input DMA transfer request enable */
+#define I2S_AISTR_ITRIE                0x10000000      /* input transfer request interrupt enable */
+#define I2S_AISTR_IURIE                0x20000000      /* input FIFO underrun interrupt enable */
+#define I2S_AISTR_IORIE                0x40000000      /* input FIFO overrun interrupt enable */
+#define I2S_AISTR__IN_MASK     0x75700000
+
+#define I2S_AICR_MI            0x00000001      /* mono input requested */
+#define I2S_AICR_AMI           0x00000002      /* relation between LRCKI/FS1 and SDI */
+#define I2S_AICR_LRI           0x00000004      /* function of LRCKI pin */
+#define I2S_AICR_SDMI          0x00000070      /* format of input audio data */
+#define I2S_AICR_SDMI_SHIFT    4
+#define I2S_AICR_CLI           0x00000080      /* input FIFO clearing control */
+#define I2S_AICR_IM            0x00000300      /* input state control */
+#define I2S_AICR_IM_SHIFT      8
+#define I2S_AICR__IN_MASK      0x000003f7
+#define I2S_AICR_MO            0x00001000      /* mono output requested */
+#define I2S_AICR_AMO           0x00002000      /* relation between LRCKO/FS0 and SDO */
+#define I2S_AICR_AMO_SHIFT     13
+#define I2S_AICR_LRO           0x00004000      /* function of LRCKO pin */
+#define I2S_AICR_SDMO          0x00070000      /* format of output audio data */
+#define I2S_AICR_SDMO_SHIFT    16
+#define I2S_AICR_CLO           0x00080000      /* output FIFO clearing control */
+#define I2S_AICR_OM            0x00100000      /* output state control */
+#define I2S_AICR__OUT_MASK     0x001f7000
+#define I2S_AICR_DIV           0x03000000      /* frequency division rate */
+#define I2S_AICR_DIV_SHIFT     24
+#define I2S_AICR_FL            0x20000000      /* frame length */
+#define I2S_AICR_FS            0x40000000      /* frame sync method */
+#define I2S_AICR_ME            0x80000000      /* master enable */
+
+/*
+ * PCMCIA
+ */
+#define __addr_MB93493_PCMCIA(X)  ((volatile unsigned long *)(__region_CS5 + (X)))
+
+/*
+ * GPIO
+ */
+#define __get_MB93493_GPIO_PDR(X)      __get_MB93493(0x380 + (X) * 0xc0)
+#define __set_MB93493_GPIO_PDR(X,V)    __set_MB93493(0x380 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_GPDR(X)     __get_MB93493(0x384 + (X) * 0xc0)
+#define __set_MB93493_GPIO_GPDR(X,V)   __set_MB93493(0x384 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_SIR(X)      __get_MB93493(0x388 + (X) * 0xc0)
+#define __set_MB93493_GPIO_SIR(X,V)    __set_MB93493(0x388 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_SOR(X)      __get_MB93493(0x38c + (X) * 0xc0)
+#define __set_MB93493_GPIO_SOR(X,V)    __set_MB93493(0x38c + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_PDSR(X)     __get_MB93493(0x390 + (X) * 0xc0)
+#define __set_MB93493_GPIO_PDSR(X,V)   __set_MB93493(0x390 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_PDCR(X)     __get_MB93493(0x394 + (X) * 0xc0)
+#define __set_MB93493_GPIO_PDCR(X,V)   __set_MB93493(0x394 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_INTST(X)    __get_MB93493(0x398 + (X) * 0xc0)
+#define __set_MB93493_GPIO_INTST(X,V)  __set_MB93493(0x398 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_IEHL(X)     __get_MB93493(0x39c + (X) * 0xc0)
+#define __set_MB93493_GPIO_IEHL(X,V)   __set_MB93493(0x39c + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_IELH(X)     __get_MB93493(0x3a0 + (X) * 0xc0)
+#define __set_MB93493_GPIO_IELH(X,V)   __set_MB93493(0x3a0 + (X) * 0xc0, (V))
+
+#endif /* _ASM_MB93493_REGS_H */
diff --git a/arch/frv/include/asm/mc146818rtc.h b/arch/frv/include/asm/mc146818rtc.h
new file mode 100644 (file)
index 0000000..90dfb7a
--- /dev/null
@@ -0,0 +1,16 @@
+/* mc146818rtc.h: RTC defs
+ *
+ * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MC146818RTC_H
+#define _ASM_MC146818RTC_H
+
+
+#endif /* _ASM_MC146818RTC_H */
diff --git a/arch/frv/include/asm/mem-layout.h b/arch/frv/include/asm/mem-layout.h
new file mode 100644 (file)
index 0000000..2947764
--- /dev/null
@@ -0,0 +1,86 @@
+/* mem-layout.h: memory layout
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MEM_LAYOUT_H
+#define _ASM_MEM_LAYOUT_H
+
+#ifndef __ASSEMBLY__
+#define __UL(X)        ((unsigned long) (X))
+#else
+#define __UL(X)        (X)
+#endif
+
+/*
+ * PAGE_SHIFT determines the page size
+ */
+#define PAGE_SHIFT                     14
+
+#ifndef __ASSEMBLY__
+#define PAGE_SIZE                      (1UL << PAGE_SHIFT)
+#else
+#define PAGE_SIZE                      (1 << PAGE_SHIFT)
+#endif
+
+#define PAGE_MASK                      (~(PAGE_SIZE-1))
+
+/*
+ * the slab must be aligned such that load- and store-double instructions don't
+ * fault if used
+ */
+#define        ARCH_KMALLOC_MINALIGN           8
+#define        ARCH_SLAB_MINALIGN              8
+
+/*****************************************************************************/
+/*
+ * virtual memory layout from kernel's point of view
+ */
+#define PAGE_OFFSET                    ((unsigned long) &__page_offset)
+
+#ifdef CONFIG_MMU
+
+/* see Documentation/frv/mmu-layout.txt */
+#define KERNEL_LOWMEM_START            __UL(0xc0000000)
+#define KERNEL_LOWMEM_END              __UL(0xd0000000)
+#define VMALLOC_START                  __UL(0xd0000000)
+#define VMALLOC_END                    __UL(0xd8000000)
+#define PKMAP_BASE                     __UL(0xd8000000)
+#define PKMAP_END                      __UL(0xdc000000)
+#define KMAP_ATOMIC_SECONDARY_FRAME    __UL(0xdc000000)
+#define KMAP_ATOMIC_PRIMARY_FRAME      __UL(0xdd000000)
+
+#endif
+
+#define KERNEL_IO_START                        __UL(0xe0000000)
+
+
+/*****************************************************************************/
+/*
+ * memory layout from userspace's point of view
+ */
+#define BRK_BASE                       __UL(2 * 1024 * 1024 + PAGE_SIZE)
+#define STACK_TOP                      __UL(2 * 1024 * 1024)
+#define STACK_TOP_MAX                  __UL(0xc0000000)
+
+/* userspace process size */
+#ifdef CONFIG_MMU
+#define TASK_SIZE                      (PAGE_OFFSET)
+#else
+#define TASK_SIZE                      __UL(0xFFFFFFFFUL)
+#endif
+
+/* base of area at which unspecified mmaps will start */
+#ifdef CONFIG_BINFMT_ELF_FDPIC
+#define TASK_UNMAPPED_BASE             __UL(16 * 1024 * 1024)
+#else
+#define TASK_UNMAPPED_BASE             __UL(TASK_SIZE / 3)
+#endif
+
+#endif /* _ASM_MEM_LAYOUT_H */
diff --git a/arch/frv/include/asm/mman.h b/arch/frv/include/asm/mman.h
new file mode 100644 (file)
index 0000000..b4371e9
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef __ASM_MMAN_H__
+#define __ASM_MMAN_H__
+
+#include <asm-generic/mman.h>
+
+#define MAP_GROWSDOWN  0x0100          /* stack-like segment */
+#define MAP_DENYWRITE  0x0800          /* ETXTBSY */
+#define MAP_EXECUTABLE 0x1000          /* mark it as an executable */
+#define MAP_LOCKED     0x2000          /* pages are locked */
+#define MAP_NORESERVE  0x4000          /* don't check for reservations */
+#define MAP_POPULATE   0x8000          /* populate (prefault) pagetables */
+#define MAP_NONBLOCK   0x10000         /* do not block on IO */
+
+#define MCL_CURRENT    1               /* lock all current mappings */
+#define MCL_FUTURE     2               /* lock all future mappings */
+
+#endif /* __ASM_MMAN_H__ */
+
diff --git a/arch/frv/include/asm/mmu.h b/arch/frv/include/asm/mmu.h
new file mode 100644 (file)
index 0000000..86ca0e8
--- /dev/null
@@ -0,0 +1,41 @@
+/* mmu.h: memory management context for FR-V with or without MMU support
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_MMU_H
+#define _ASM_MMU_H
+
+typedef struct {
+#ifdef CONFIG_MMU
+       struct list_head id_link;               /* link in list of context ID owners */
+       unsigned short  id;                     /* MMU context ID */
+       unsigned short  id_busy;                /* true if ID is in CXNR */
+       unsigned long   itlb_cached_pge;        /* [SCR0] PGE cached for insn TLB handler */
+       unsigned long   itlb_ptd_mapping;       /* [DAMR4] PTD mapping for itlb cached PGE */
+       unsigned long   dtlb_cached_pge;        /* [SCR1] PGE cached for data TLB handler */
+       unsigned long   dtlb_ptd_mapping;       /* [DAMR5] PTD mapping for dtlb cached PGE */
+
+#else
+       unsigned long           end_brk;
+
+#endif
+
+#ifdef CONFIG_BINFMT_ELF_FDPIC
+       unsigned long   exec_fdpic_loadmap;
+       unsigned long   interp_fdpic_loadmap;
+#endif
+
+} mm_context_t;
+
+#ifdef CONFIG_MMU
+extern int __nongpreldata cxn_pinned;
+extern int cxn_pin_by_pid(pid_t pid);
+#endif
+
+#endif /* _ASM_MMU_H */
diff --git a/arch/frv/include/asm/mmu_context.h b/arch/frv/include/asm/mmu_context.h
new file mode 100644 (file)
index 0000000..c7daa39
--- /dev/null
@@ -0,0 +1,50 @@
+/* mmu_context.h: MMU context management routines
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_MMU_CONTEXT_H
+#define _ASM_MMU_CONTEXT_H
+
+#include <asm/setup.h>
+#include <asm/page.h>
+#include <asm/pgalloc.h>
+#include <asm-generic/mm_hooks.h>
+
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
+{
+}
+
+#ifdef CONFIG_MMU
+extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
+extern void change_mm_context(mm_context_t *old, mm_context_t *ctx, pgd_t *_pgd);
+extern void destroy_context(struct mm_struct *mm);
+
+#else
+#define init_new_context(tsk, mm)              ({ 0; })
+#define change_mm_context(old, ctx, _pml4)     do {} while(0)
+#define destroy_context(mm)                    do {} while(0)
+#endif
+
+#define switch_mm(prev, next, tsk)                                             \
+do {                                                                           \
+       if (prev != next)                                                       \
+               change_mm_context(&prev->context, &next->context, next->pgd);   \
+} while(0)
+
+#define activate_mm(prev, next)                                                \
+do {                                                                   \
+       change_mm_context(&prev->context, &next->context, next->pgd);   \
+} while(0)
+
+#define deactivate_mm(tsk, mm)                 \
+do {                                           \
+} while(0)
+
+#endif
diff --git a/arch/frv/include/asm/module.h b/arch/frv/include/asm/module.h
new file mode 100644 (file)
index 0000000..3d5c636
--- /dev/null
@@ -0,0 +1,28 @@
+/* module.h: FRV module stuff
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_MODULE_H
+#define _ASM_MODULE_H
+
+struct mod_arch_specific
+{
+};
+
+#define Elf_Shdr       Elf32_Shdr
+#define Elf_Sym                Elf32_Sym
+#define Elf_Ehdr       Elf32_Ehdr
+
+/*
+ * Include the architecture version.
+ */
+#define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " "
+
+#endif /* _ASM_MODULE_H */
+
diff --git a/arch/frv/include/asm/msgbuf.h b/arch/frv/include/asm/msgbuf.h
new file mode 100644 (file)
index 0000000..97ceb55
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef _ASM_MSGBUF_H
+#define _ASM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+       struct ipc64_perm       msg_perm;
+       __kernel_time_t         msg_stime;      /* last msgsnd time */
+       unsigned long           __unused1;
+       __kernel_time_t         msg_rtime;      /* last msgrcv time */
+       unsigned long           __unused2;
+       __kernel_time_t         msg_ctime;      /* last change time */
+       unsigned long           __unused3;
+       unsigned long           msg_cbytes;     /* current number of bytes on queue */
+       unsigned long           msg_qnum;       /* number of messages in queue */
+       unsigned long           msg_qbytes;     /* max number of bytes on queue */
+       __kernel_pid_t          msg_lspid;      /* pid of last msgsnd */
+       __kernel_pid_t          msg_lrpid;      /* last receive pid */
+       unsigned long           __unused4;
+       unsigned long           __unused5;
+};
+
+#endif /* _ASM_MSGBUF_H */
+
diff --git a/arch/frv/include/asm/mutex.h b/arch/frv/include/asm/mutex.h
new file mode 100644 (file)
index 0000000..458c1f7
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * Pull in the generic implementation for the mutex fastpath.
+ *
+ * TODO: implement optimized primitives instead, or leave the generic
+ * implementation in place, or pick the atomic_xchg() based generic
+ * implementation. (see asm-generic/mutex-xchg.h for details)
+ */
+
+#include <asm-generic/mutex-dec.h>
diff --git a/arch/frv/include/asm/page.h b/arch/frv/include/asm/page.h
new file mode 100644 (file)
index 0000000..bd9c220
--- /dev/null
@@ -0,0 +1,78 @@
+#ifndef _ASM_PAGE_H
+#define _ASM_PAGE_H
+
+#include <asm/virtconvert.h>
+#include <asm/mem-layout.h>
+#include <asm/sections.h>
+#include <asm/setup.h>
+
+#ifndef __ASSEMBLY__
+
+#define get_user_page(vaddr)                   __get_free_page(GFP_KERNEL)
+#define free_user_page(page, addr)             free_page(addr)
+
+#define clear_page(pgaddr)                     memset((pgaddr), 0, PAGE_SIZE)
+#define copy_page(to,from)                     memcpy((to), (from), PAGE_SIZE)
+
+#define clear_user_page(pgaddr, vaddr, page)   memset((pgaddr), 0, PAGE_SIZE)
+#define copy_user_page(vto, vfrom, vaddr, topg)        memcpy((vto), (vfrom), PAGE_SIZE)
+
+/*
+ * These are used to make use of C type-checking..
+ */
+typedef struct { unsigned long pte;    } pte_t;
+typedef struct { unsigned long ste[64];} pmd_t;
+typedef struct { pmd_t         pue[1]; } pud_t;
+typedef struct { pud_t         pge[1]; } pgd_t;
+typedef struct { unsigned long pgprot; } pgprot_t;
+typedef struct page *pgtable_t;
+
+#define pte_val(x)     ((x).pte)
+#define pmd_val(x)     ((x).ste[0])
+#define pud_val(x)     ((x).pue[0])
+#define pgd_val(x)     ((x).pge[0])
+#define pgprot_val(x)  ((x).pgprot)
+
+#define __pte(x)       ((pte_t) { (x) } )
+#define __pmd(x)       ((pmd_t) { (x) } )
+#define __pud(x)       ((pud_t) { (x) } )
+#define __pgd(x)       ((pgd_t) { (x) } )
+#define __pgprot(x)    ((pgprot_t) { (x) } )
+#define PTE_MASK       PAGE_MASK
+
+#define devmem_is_allowed(pfn) 1
+
+#define __pa(vaddr)            virt_to_phys((void *) (unsigned long) (vaddr))
+#define __va(paddr)            phys_to_virt((unsigned long) (paddr))
+
+#define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)
+
+extern unsigned long max_low_pfn;
+extern unsigned long min_low_pfn;
+extern unsigned long max_pfn;
+
+#ifdef CONFIG_MMU
+#define pfn_valid(pfn)         ((pfn) < max_mapnr)
+#else
+#define ARCH_PFN_OFFSET                (PAGE_OFFSET >> PAGE_SHIFT)
+#define pfn_valid(pfn)         ((pfn) >= min_low_pfn && (pfn) < max_low_pfn)
+
+#endif
+
+#define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+
+
+#ifdef CONFIG_MMU
+#define VM_DATA_DEFAULT_FLAGS \
+       (VM_READ | VM_WRITE | \
+       ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
+                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+#endif
+
+#endif /* __ASSEMBLY__ */
+
+#include <asm-generic/memory_model.h>
+#include <asm-generic/page.h>
+
+#endif /* _ASM_PAGE_H */
diff --git a/arch/frv/include/asm/param.h b/arch/frv/include/asm/param.h
new file mode 100644 (file)
index 0000000..6859dd5
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef _ASM_PARAM_H
+#define _ASM_PARAM_H
+
+#ifdef __KERNEL__
+#define HZ             CONFIG_HZ       /* Internal kernel timer frequency */
+#define USER_HZ                100             /* .. some user interfaces are in "ticks" */
+#define CLOCKS_PER_SEC (USER_HZ)       /* like times() */
+#endif
+
+#ifndef HZ
+#define HZ 100
+#endif
+
+#define EXEC_PAGESIZE  16384
+
+#ifndef NOGROUP
+#define NOGROUP                (-1)
+#endif
+
+#define MAXHOSTNAMELEN         64      /* max length of hostname */
+
+#endif /* _ASM_PARAM_H */
diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h
new file mode 100644 (file)
index 0000000..585d9b4
--- /dev/null
@@ -0,0 +1,118 @@
+/* pci.h: FR-V specific PCI declarations
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-m68k/pci.h
+ *
+ * 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.
+ */
+
+#ifndef ASM_PCI_H
+#define        ASM_PCI_H
+
+#include <linux/mm.h>
+#include <asm/scatterlist.h>
+#include <asm-generic/pci-dma-compat.h>
+#include <asm-generic/pci.h>
+
+struct pci_dev;
+
+#define pcibios_assign_all_busses()    0
+
+extern void pcibios_set_master(struct pci_dev *dev);
+
+extern void pcibios_penalize_isa_irq(int irq);
+
+#ifdef CONFIG_MMU
+extern void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle);
+extern void consistent_free(void *vaddr);
+extern void consistent_sync(void *vaddr, size_t size, int direction);
+extern void consistent_sync_page(struct page *page, unsigned long offset,
+                                size_t size, int direction);
+#endif
+
+extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
+                                 dma_addr_t *dma_handle);
+
+extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
+                               void *vaddr, dma_addr_t dma_handle);
+
+/* Return the index of the PCI controller for device PDEV. */
+#define pci_controller_num(PDEV)       (0)
+
+/* The PCI address space does equal the physical memory
+ * address space.  The networking and block device layers use
+ * this boolean for bounce buffer decisions.
+ */
+#define PCI_DMA_BUS_IS_PHYS    (1)
+
+/* pci_unmap_{page,single} is a nop so... */
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
+#define pci_unmap_addr(PTR, ADDR_NAME)         (0)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)        do { } while (0)
+#define pci_unmap_len(PTR, LEN_NAME)           (0)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)  do { } while (0)
+
+#ifdef CONFIG_PCI
+static inline void pci_dma_burst_advice(struct pci_dev *pdev,
+                                       enum pci_dma_burst_strategy *strat,
+                                       unsigned long *strategy_parameter)
+{
+       *strat = PCI_DMA_BURST_INFINITY;
+       *strategy_parameter = ~0UL;
+}
+#endif
+
+/*
+ *     These are pretty much arbitary with the CoMEM implementation.
+ *     We have the whole address space to ourselves.
+ */
+#define PCIBIOS_MIN_IO         0x100
+#define PCIBIOS_MIN_MEM                0x00010000
+
+/* Make physical memory consistent for a single
+ * streaming mode DMA translation after a transfer.
+ *
+ * If you perform a pci_map_single() but wish to interrogate the
+ * buffer using the cpu, yet do not wish to teardown the PCI dma
+ * mapping, you must call this function before doing so.  At the
+ * next point you give the PCI dma address back to the card, the
+ * device again owns the buffer.
+ */
+static inline void pci_dma_sync_single(struct pci_dev *hwdev,
+                                      dma_addr_t dma_handle,
+                                      size_t size, int direction)
+{
+       if (direction == PCI_DMA_NONE)
+                BUG();
+
+       frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle),
+                           (unsigned long)bus_to_virt(dma_handle) + size);
+}
+
+/* Make physical memory consistent for a set of streaming
+ * mode DMA translations after a transfer.
+ *
+ * The same as pci_dma_sync_single but for a scatter-gather list,
+ * same rules and usage.
+ */
+static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
+                                  struct scatterlist *sg,
+                                  int nelems, int direction)
+{
+       int i;
+
+       if (direction == PCI_DMA_NONE)
+                BUG();
+
+       for (i = 0; i < nelems; i++)
+               frv_cache_wback_inv(sg_dma_address(&sg[i]),
+                                   sg_dma_address(&sg[i])+sg_dma_len(&sg[i]));
+}
+
+
+#endif
diff --git a/arch/frv/include/asm/percpu.h b/arch/frv/include/asm/percpu.h
new file mode 100644 (file)
index 0000000..2cad3f8
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef __ASM_PERCPU_H
+#define __ASM_PERCPU_H
+
+#include <asm-generic/percpu.h>
+
+#endif /* __ASM_PERCPU_H */
diff --git a/arch/frv/include/asm/pgalloc.h b/arch/frv/include/asm/pgalloc.h
new file mode 100644 (file)
index 0000000..971e6ad
--- /dev/null
@@ -0,0 +1,69 @@
+/* pgalloc.h: Page allocation routines for FRV
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ *
+ * Derived from:
+ *     include/asm-m68knommu/pgalloc.h
+ *     include/asm-i386/pgalloc.h
+ */
+#ifndef _ASM_PGALLOC_H
+#define _ASM_PGALLOC_H
+
+#include <asm/setup.h>
+#include <asm/virtconvert.h>
+
+#ifdef CONFIG_MMU
+
+#define pmd_populate_kernel(mm, pmd, pte) __set_pmd(pmd, __pa(pte) | _PAGE_TABLE)
+#define pmd_populate(MM, PMD, PAGE)                                            \
+do {                                                                           \
+       __set_pmd((PMD), page_to_pfn(PAGE) << PAGE_SHIFT | _PAGE_TABLE);        \
+} while(0)
+#define pmd_pgtable(pmd) pmd_page(pmd)
+
+/*
+ * Allocate and free page tables.
+ */
+
+extern pgd_t *pgd_alloc(struct mm_struct *);
+extern void pgd_free(struct mm_struct *mm, pgd_t *);
+
+extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
+
+extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long);
+
+static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
+{
+       free_page((unsigned long)pte);
+}
+
+static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
+{
+       pgtable_page_dtor(pte);
+       __free_page(pte);
+}
+
+#define __pte_free_tlb(tlb,pte)                                \
+do {                                                   \
+       pgtable_page_dtor(pte);                         \
+       tlb_remove_page((tlb),(pte));                   \
+} while (0)
+
+/*
+ * allocating and freeing a pmd is trivial: the 1-entry pmd is
+ * inside the pgd, so has no extra memory associated with it.
+ * (In the PAE case we free the pmds as part of the pgd.)
+ */
+#define pmd_alloc_one(mm, addr)                ({ BUG(); ((pmd_t *) 2); })
+#define pmd_free(mm, x)                        do { } while (0)
+#define __pmd_free_tlb(tlb,x)          do { } while (0)
+
+#endif /* CONFIG_MMU */
+
+#endif /* _ASM_PGALLOC_H */
diff --git a/arch/frv/include/asm/pgtable.h b/arch/frv/include/asm/pgtable.h
new file mode 100644 (file)
index 0000000..3323301
--- /dev/null
@@ -0,0 +1,549 @@
+/* pgtable.h: FR-V page table mangling
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ *
+ * Derived from:
+ *     include/asm-m68knommu/pgtable.h
+ *     include/asm-i386/pgtable.h
+ */
+
+#ifndef _ASM_PGTABLE_H
+#define _ASM_PGTABLE_H
+
+#include <asm/mem-layout.h>
+#include <asm/setup.h>
+#include <asm/processor.h>
+
+#ifndef __ASSEMBLY__
+#include <linux/threads.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/sched.h>
+struct vm_area_struct;
+#endif
+
+#ifndef __ASSEMBLY__
+#if defined(CONFIG_HIGHPTE)
+typedef unsigned long pte_addr_t;
+#else
+typedef pte_t *pte_addr_t;
+#endif
+#endif
+
+/*****************************************************************************/
+/*
+ * MMU-less operation case first
+ */
+#ifndef CONFIG_MMU
+
+#define pgd_present(pgd)       (1)             /* pages are always present on NO_MM */
+#define pgd_none(pgd)          (0)
+#define pgd_bad(pgd)           (0)
+#define pgd_clear(pgdp)
+#define kern_addr_valid(addr)  (1)
+#define        pmd_offset(a, b)        ((void *) 0)
+
+#define PAGE_NONE              __pgprot(0)     /* these mean nothing to NO_MM */
+#define PAGE_SHARED            __pgprot(0)     /* these mean nothing to NO_MM */
+#define PAGE_COPY              __pgprot(0)     /* these mean nothing to NO_MM */
+#define PAGE_READONLY          __pgprot(0)     /* these mean nothing to NO_MM */
+#define PAGE_KERNEL            __pgprot(0)     /* these mean nothing to NO_MM */
+
+#define __swp_type(x)          (0)
+#define __swp_offset(x)                (0)
+#define __swp_entry(typ,off)   ((swp_entry_t) { ((typ) | ((off) << 7)) })
+#define __pte_to_swp_entry(pte)        ((swp_entry_t) { pte_val(pte) })
+#define __swp_entry_to_pte(x)  ((pte_t) { (x).val })
+
+#ifndef __ASSEMBLY__
+static inline int pte_file(pte_t pte) { return 0; }
+#endif
+
+#define ZERO_PAGE(vaddr)       ({ BUG(); NULL; })
+
+#define swapper_pg_dir         ((pgd_t *) NULL)
+
+#define pgtable_cache_init()           do {} while (0)
+
+#include <asm-generic/pgtable.h>
+
+#else /* !CONFIG_MMU */
+/*****************************************************************************/
+/*
+ * then MMU operation
+ */
+
+/*
+ * ZERO_PAGE is a global shared page that is always zero: used
+ * for zero-mapped memory areas etc..
+ */
+#ifndef __ASSEMBLY__
+extern unsigned long empty_zero_page;
+#define ZERO_PAGE(vaddr)       virt_to_page(empty_zero_page)
+#endif
+
+/*
+ * we use 2-level page tables, folding the PMD (mid-level table) into the PGE (top-level entry)
+ * [see Documentation/frv/mmu-layout.txt]
+ *
+ * Page Directory:
+ *  - Size: 16KB
+ *  - 64 PGEs per PGD
+ *  - Each PGE holds 1 PUD and covers 64MB
+ *
+ * Page Upper Directory:
+ *  - Size: 256B
+ *  - 1 PUE per PUD
+ *  - Each PUE holds 1 PMD and covers 64MB
+ *
+ * Page Mid-Level Directory
+ *  - Size: 256B
+ *  - 1 PME per PMD
+ *  - Each PME holds 64 STEs, all of which point to separate chunks of the same Page Table
+ *  - All STEs are instantiated at the same time
+ *
+ * Page Table
+ *  - Size: 16KB
+ *  - 4096 PTEs per PT
+ *  - Each Linux PT is subdivided into 64 FR451 PT's, each of which holds 64 entries
+ *
+ * Pages
+ *  - Size: 4KB
+ *
+ * total PTEs
+ *     = 1 PML4E * 64 PGEs * 1 PUEs * 1 PMEs * 4096 PTEs
+ *     = 1 PML4E * 64 PGEs * 64 STEs * 64 PTEs/FR451-PT
+ *     = 262144 (or 256 * 1024)
+ */
+#define PGDIR_SHIFT            26
+#define PGDIR_SIZE             (1UL << PGDIR_SHIFT)
+#define PGDIR_MASK             (~(PGDIR_SIZE - 1))
+#define PTRS_PER_PGD           64
+
+#define PUD_SHIFT              26
+#define PTRS_PER_PUD           1
+#define PUD_SIZE               (1UL << PUD_SHIFT)
+#define PUD_MASK               (~(PUD_SIZE - 1))
+#define PUE_SIZE               256
+
+#define PMD_SHIFT              26
+#define PMD_SIZE               (1UL << PMD_SHIFT)
+#define PMD_MASK               (~(PMD_SIZE - 1))
+#define PTRS_PER_PMD           1
+#define PME_SIZE               256
+
+#define __frv_PT_SIZE          256
+
+#define PTRS_PER_PTE           4096
+
+#define USER_PGDS_IN_LAST_PML4 (TASK_SIZE / PGDIR_SIZE)
+#define FIRST_USER_ADDRESS     0
+
+#define USER_PGD_PTRS          (PAGE_OFFSET >> PGDIR_SHIFT)
+#define KERNEL_PGD_PTRS                (PTRS_PER_PGD - USER_PGD_PTRS)
+
+#define TWOLEVEL_PGDIR_SHIFT   26
+#define BOOT_USER_PGD_PTRS     (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
+#define BOOT_KERNEL_PGD_PTRS   (PTRS_PER_PGD - BOOT_USER_PGD_PTRS)
+
+#ifndef __ASSEMBLY__
+
+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+
+#define pte_ERROR(e) \
+       printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte)
+#define pmd_ERROR(e) \
+       printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pud_ERROR(e) \
+       printk("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pmd_val(pud_val(e)))
+#define pgd_ERROR(e) \
+       printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pmd_val(pud_val(pgd_val(e))))
+
+/*
+ * Certain architectures need to do special things when PTEs
+ * within a page table are directly modified.  Thus, the following
+ * hook is made available.
+ */
+#define set_pte(pteptr, pteval)                                \
+do {                                                   \
+       *(pteptr) = (pteval);                           \
+       asm volatile("dcf %M0" :: "U"(*pteptr));        \
+} while(0)
+#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
+
+/*
+ * pgd_offset() returns a (pgd_t *)
+ * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
+ */
+#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
+
+/*
+ * a shortcut which implies the use of the kernel's pgd, instead
+ * of a process's
+ */
+#define pgd_offset_k(address) pgd_offset(&init_mm, address)
+
+/*
+ * The "pgd_xxx()" functions here are trivial for a folded two-level
+ * setup: the pud is never bad, and a pud always exists (as it's folded
+ * into the pgd entry)
+ */
+static inline int pgd_none(pgd_t pgd)          { return 0; }
+static inline int pgd_bad(pgd_t pgd)           { return 0; }
+static inline int pgd_present(pgd_t pgd)       { return 1; }
+static inline void pgd_clear(pgd_t *pgd)       { }
+
+#define pgd_populate(mm, pgd, pud)             do { } while (0)
+/*
+ * (puds are folded into pgds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+#define set_pgd(pgdptr, pgdval)                                \
+do {                                                   \
+       memcpy((pgdptr), &(pgdval), sizeof(pgd_t));     \
+       asm volatile("dcf %M0" :: "U"(*(pgdptr)));      \
+} while(0)
+
+static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
+{
+       return (pud_t *) pgd;
+}
+
+#define pgd_page(pgd)                          (pud_page((pud_t){ pgd }))
+#define pgd_page_vaddr(pgd)                    (pud_page_vaddr((pud_t){ pgd }))
+
+/*
+ * allocating and freeing a pud is trivial: the 1-entry pud is
+ * inside the pgd, so has no extra memory associated with it.
+ */
+#define pud_alloc_one(mm, address)             NULL
+#define pud_free(mm, x)                                do { } while (0)
+#define __pud_free_tlb(tlb, x)                 do { } while (0)
+
+/*
+ * The "pud_xxx()" functions here are trivial for a folded two-level
+ * setup: the pmd is never bad, and a pmd always exists (as it's folded
+ * into the pud entry)
+ */
+static inline int pud_none(pud_t pud)          { return 0; }
+static inline int pud_bad(pud_t pud)           { return 0; }
+static inline int pud_present(pud_t pud)       { return 1; }
+static inline void pud_clear(pud_t *pud)       { }
+
+#define pud_populate(mm, pmd, pte)             do { } while (0)
+
+/*
+ * (pmds are folded into puds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+#define set_pud(pudptr, pudval)                        set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval })
+
+#define pud_page(pud)                          (pmd_page((pmd_t){ pud }))
+#define pud_page_vaddr(pud)                    (pmd_page_vaddr((pmd_t){ pud }))
+
+/*
+ * (pmds are folded into pgds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+extern void __set_pmd(pmd_t *pmdptr, unsigned long __pmd);
+
+#define set_pmd(pmdptr, pmdval)                        \
+do {                                           \
+       __set_pmd((pmdptr), (pmdval).ste[0]);   \
+} while(0)
+
+#define __pmd_index(address)                   0
+
+static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address)
+{
+       return (pmd_t *) dir + __pmd_index(address);
+}
+
+#define pte_same(a, b)         ((a).pte == (b).pte)
+#define pte_page(x)            (mem_map + ((unsigned long)(((x).pte >> PAGE_SHIFT))))
+#define pte_none(x)            (!(x).pte)
+#define pte_pfn(x)             ((unsigned long)(((x).pte >> PAGE_SHIFT)))
+#define pfn_pte(pfn, prot)     __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pfn_pmd(pfn, prot)     __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+
+#define VMALLOC_VMADDR(x)      ((unsigned long) (x))
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * control flags in AMPR registers and TLB entries
+ */
+#define _PAGE_BIT_PRESENT      xAMPRx_V_BIT
+#define _PAGE_BIT_WP           DAMPRx_WP_BIT
+#define _PAGE_BIT_NOCACHE      xAMPRx_C_BIT
+#define _PAGE_BIT_SUPER                xAMPRx_S_BIT
+#define _PAGE_BIT_ACCESSED     xAMPRx_RESERVED8_BIT
+#define _PAGE_BIT_DIRTY                xAMPRx_M_BIT
+#define _PAGE_BIT_NOTGLOBAL    xAMPRx_NG_BIT
+
+#define _PAGE_PRESENT          xAMPRx_V
+#define _PAGE_WP               DAMPRx_WP
+#define _PAGE_NOCACHE          xAMPRx_C
+#define _PAGE_SUPER            xAMPRx_S
+#define _PAGE_ACCESSED         xAMPRx_RESERVED8        /* accessed if set */
+#define _PAGE_DIRTY            xAMPRx_M
+#define _PAGE_NOTGLOBAL                xAMPRx_NG
+
+#define _PAGE_RESERVED_MASK    (xAMPRx_RESERVED8 | xAMPRx_RESERVED13)
+
+#define _PAGE_FILE             0x002   /* set:pagecache unset:swap */
+#define _PAGE_PROTNONE         0x000   /* If not present */
+
+#define _PAGE_CHG_MASK         (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+
+#define __PGPROT_BASE \
+       (_PAGE_PRESENT | xAMPRx_SS_16Kb | xAMPRx_D | _PAGE_NOTGLOBAL | _PAGE_ACCESSED)
+
+#define PAGE_NONE      __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
+#define PAGE_SHARED    __pgprot(__PGPROT_BASE)
+#define PAGE_COPY      __pgprot(__PGPROT_BASE | _PAGE_WP)
+#define PAGE_READONLY  __pgprot(__PGPROT_BASE | _PAGE_WP)
+
+#define __PAGE_KERNEL          (__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY)
+#define __PAGE_KERNEL_NOCACHE  (__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY | _PAGE_NOCACHE)
+#define __PAGE_KERNEL_RO       (__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY | _PAGE_WP)
+
+#define MAKE_GLOBAL(x) __pgprot((x) & ~_PAGE_NOTGLOBAL)
+
+#define PAGE_KERNEL            MAKE_GLOBAL(__PAGE_KERNEL)
+#define PAGE_KERNEL_RO         MAKE_GLOBAL(__PAGE_KERNEL_RO)
+#define PAGE_KERNEL_NOCACHE    MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
+
+#define _PAGE_TABLE            (_PAGE_PRESENT | xAMPRx_SS_16Kb)
+
+#ifndef __ASSEMBLY__
+
+/*
+ * The FR451 can do execute protection by virtue of having separate TLB miss handlers for
+ * instruction access and for data access. However, we don't have enough reserved bits to say
+ * "execute only", so we don't bother. If you can read it, you can execute it and vice versa.
+ */
+#define __P000 PAGE_NONE
+#define __P001 PAGE_READONLY
+#define __P010 PAGE_COPY
+#define __P011 PAGE_COPY
+#define __P100 PAGE_READONLY
+#define __P101 PAGE_READONLY
+#define __P110 PAGE_COPY
+#define __P111 PAGE_COPY
+
+#define __S000 PAGE_NONE
+#define __S001 PAGE_READONLY
+#define __S010 PAGE_SHARED
+#define __S011 PAGE_SHARED
+#define __S100 PAGE_READONLY
+#define __S101 PAGE_READONLY
+#define __S110 PAGE_SHARED
+#define __S111 PAGE_SHARED
+
+/*
+ * Define this to warn about kernel memory accesses that are
+ * done without a 'access_ok(VERIFY_WRITE,..)'
+ */
+#undef TEST_ACCESS_OK
+
+#define pte_present(x) (pte_val(x) & _PAGE_PRESENT)
+#define pte_clear(mm,addr,xp)  do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
+
+#define pmd_none(x)    (!pmd_val(x))
+#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
+#define        pmd_bad(x)      (pmd_val(x) & xAMPRx_SS)
+#define pmd_clear(xp)  do { __set_pmd(xp, 0); } while(0)
+
+#define pmd_page_vaddr(pmd) \
+       ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+
+#ifndef CONFIG_DISCONTIGMEM
+#define pmd_page(pmd)  (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
+#endif
+
+#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
+
+/*
+ * The following only work if pte_present() is true.
+ * Undefined behaviour if not..
+ */
+static inline int pte_dirty(pte_t pte)         { return (pte).pte & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte)         { return (pte).pte & _PAGE_ACCESSED; }
+static inline int pte_write(pte_t pte)         { return !((pte).pte & _PAGE_WP); }
+static inline int pte_special(pte_t pte)       { return 0; }
+
+static inline pte_t pte_mkclean(pte_t pte)     { (pte).pte &= ~_PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkold(pte_t pte)       { (pte).pte &= ~_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_wrprotect(pte_t pte)   { (pte).pte |= _PAGE_WP; return pte; }
+static inline pte_t pte_mkdirty(pte_t pte)     { (pte).pte |= _PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkyoung(pte_t pte)     { (pte).pte |= _PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkwrite(pte_t pte)     { (pte).pte &= ~_PAGE_WP; return pte; }
+static inline pte_t pte_mkspecial(pte_t pte)   { return pte; }
+
+static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
+{
+       int i = test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep);
+       asm volatile("dcf %M0" :: "U"(*ptep));
+       return i;
+}
+
+static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+{
+       unsigned long x = xchg(&ptep->pte, 0);
+       asm volatile("dcf %M0" :: "U"(*ptep));
+       return __pte(x);
+}
+
+static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+{
+       set_bit(_PAGE_BIT_WP, ptep);
+       asm volatile("dcf %M0" :: "U"(*ptep));
+}
+
+/*
+ * Macro to mark a page protection value as "uncacheable"
+ */
+#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NOCACHE))
+
+/*
+ * Conversion functions: convert a page and protection to a page entry,
+ * and a page entry and page directory to the page they refer to.
+ */
+
+#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
+#define mk_pte_huge(entry)     ((entry).pte_low |= _PAGE_PRESENT | _PAGE_PSE)
+
+/* This takes a physical page address that is used by the remapping functions */
+#define mk_pte_phys(physpage, pgprot)  pfn_pte((physpage) >> PAGE_SHIFT, pgprot)
+
+static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+{
+       pte.pte &= _PAGE_CHG_MASK;
+       pte.pte |= pgprot_val(newprot);
+       return pte;
+}
+
+/* to find an entry in a page-table-directory. */
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
+#define pgd_index_k(addr) pgd_index(addr)
+
+/* Find an entry in the bottom-level page table.. */
+#define __pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+
+/*
+ * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
+ *
+ * this macro returns the index of the entry in the pte page which would
+ * control the given virtual address
+ */
+#define pte_index(address) \
+               (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+#define pte_offset_kernel(dir, address) \
+       ((pte_t *) pmd_page_vaddr(*(dir)) +  pte_index(address))
+
+#if defined(CONFIG_HIGHPTE)
+#define pte_offset_map(dir, address) \
+       ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address))
+#define pte_offset_map_nested(dir, address) \
+       ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address))
+#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
+#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1)
+#else
+#define pte_offset_map(dir, address) \
+       ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address))
+#define pte_offset_map_nested(dir, address) pte_offset_map((dir), (address))
+#define pte_unmap(pte) do { } while (0)
+#define pte_unmap_nested(pte) do { } while (0)
+#endif
+
+/*
+ * Handle swap and file entries
+ * - the PTE is encoded in the following format:
+ *     bit 0:          Must be 0 (!_PAGE_PRESENT)
+ *     bit 1:          Type: 0 for swap, 1 for file (_PAGE_FILE)
+ *     bits 2-7:       Swap type
+ *     bits 8-31:      Swap offset
+ *     bits 2-31:      File pgoff
+ */
+#define __swp_type(x)                  (((x).val >> 2) & 0x1f)
+#define __swp_offset(x)                        ((x).val >> 8)
+#define __swp_entry(type, offset)      ((swp_entry_t) { ((type) << 2) | ((offset) << 8) })
+#define __pte_to_swp_entry(_pte)       ((swp_entry_t) { (_pte).pte })
+#define __swp_entry_to_pte(x)          ((pte_t) { (x).val })
+
+static inline int pte_file(pte_t pte)
+{
+       return pte.pte & _PAGE_FILE;
+}
+
+#define PTE_FILE_MAX_BITS      29
+
+#define pte_to_pgoff(PTE)      ((PTE).pte >> 2)
+#define pgoff_to_pte(off)      __pte((off) << 2 | _PAGE_FILE)
+
+/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
+#define PageSkip(page)         (0)
+#define kern_addr_valid(addr)  (1)
+
+#define io_remap_pfn_range(vma, vaddr, pfn, size, prot)                \
+               remap_pfn_range(vma, vaddr, pfn, size, prot)
+
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define __HAVE_ARCH_PTEP_SET_WRPROTECT
+#define __HAVE_ARCH_PTE_SAME
+#include <asm-generic/pgtable.h>
+
+/*
+ * preload information about a newly instantiated PTE into the SCR0/SCR1 PGE cache
+ */
+static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
+{
+       struct mm_struct *mm;
+       unsigned long ampr;
+
+       mm = current->mm;
+       if (mm) {
+               pgd_t *pge = pgd_offset(mm, address);
+               pud_t *pue = pud_offset(pge, address);
+               pmd_t *pme = pmd_offset(pue, address);
+
+               ampr = pme->ste[0] & 0xffffff00;
+               ampr |= xAMPRx_L | xAMPRx_SS_16Kb | xAMPRx_S | xAMPRx_C |
+                       xAMPRx_V;
+       } else {
+               address = ULONG_MAX;
+               ampr = 0;
+       }
+
+       asm volatile("movgs %0,scr0\n"
+                    "movgs %0,scr1\n"
+                    "movgs %1,dampr4\n"
+                    "movgs %1,dampr5\n"
+                    :
+                    : "r"(address), "r"(ampr)
+                    );
+}
+
+#ifdef CONFIG_PROC_FS
+extern char *proc_pid_status_frv_cxnr(struct mm_struct *mm, char *buffer);
+#endif
+
+extern void __init pgtable_cache_init(void);
+
+#endif /* !__ASSEMBLY__ */
+#endif /* !CONFIG_MMU */
+
+#ifndef __ASSEMBLY__
+extern void __init paging_init(void);
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_PGTABLE_H */
diff --git a/arch/frv/include/asm/poll.h b/arch/frv/include/asm/poll.h
new file mode 100644 (file)
index 0000000..0d01479
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_POLL_H
+#define _ASM_POLL_H
+
+#define POLLWRNORM     POLLOUT
+#define POLLWRBAND     256
+
+#include <asm-generic/poll.h>
+
+#undef POLLREMOVE
+
+#endif
+
diff --git a/arch/frv/include/asm/posix_types.h b/arch/frv/include/asm/posix_types.h
new file mode 100644 (file)
index 0000000..a9f1f5b
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef _ASM_POSIX_TYPES_H
+#define _ASM_POSIX_TYPES_H
+
+/*
+ * This file is generally used by user-level software, so you need to
+ * be a little careful about namespace pollution etc.  Also, we cannot
+ * assume GCC is being used.
+ */
+
+typedef unsigned long  __kernel_ino_t;
+typedef unsigned short __kernel_mode_t;
+typedef unsigned short __kernel_nlink_t;
+typedef long           __kernel_off_t;
+typedef int            __kernel_pid_t;
+typedef unsigned short __kernel_ipc_pid_t;
+typedef unsigned short __kernel_uid_t;
+typedef unsigned short __kernel_gid_t;
+typedef unsigned int   __kernel_size_t;
+typedef int            __kernel_ssize_t;
+typedef int            __kernel_ptrdiff_t;
+typedef long           __kernel_time_t;
+typedef long           __kernel_suseconds_t;
+typedef long           __kernel_clock_t;
+typedef int            __kernel_timer_t;
+typedef int            __kernel_clockid_t;
+typedef int            __kernel_daddr_t;
+typedef char *         __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int   __kernel_uid32_t;
+typedef unsigned int   __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+typedef unsigned short __kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long      __kernel_loff_t;
+#endif
+
+typedef struct {
+       int     val[2];
+} __kernel_fsid_t;
+
+#if defined(__KERNEL__)
+
+#undef __FD_SET
+#define        __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
+
+#undef __FD_CLR
+#define        __FD_CLR(d, set)        ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
+
+#undef __FD_ISSET
+#define        __FD_ISSET(d, set)      (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d)))
+
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
+
+#endif /* defined(__KERNEL__) */
+
+#endif
+
diff --git a/arch/frv/include/asm/processor.h b/arch/frv/include/asm/processor.h
new file mode 100644 (file)
index 0000000..3744f2e
--- /dev/null
@@ -0,0 +1,153 @@
+/* processor.h: FRV processor definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_PROCESSOR_H
+#define _ASM_PROCESSOR_H
+
+#include <asm/mem-layout.h>
+
+#ifndef __ASSEMBLY__
+/*
+ * Default implementation of macro that returns current
+ * instruction pointer ("program counter").
+ */
+#define current_text_addr() ({ __label__ _l; _l: &&_l;})
+
+#include <linux/compiler.h>
+#include <linux/linkage.h>
+#include <asm/sections.h>
+#include <asm/segment.h>
+#include <asm/fpu.h>
+#include <asm/registers.h>
+#include <asm/ptrace.h>
+#include <asm/current.h>
+#include <asm/cache.h>
+
+/* Forward declaration, a strange C thing */
+struct task_struct;
+
+/*
+ *  CPU type and hardware bug flags. Kept separately for each CPU.
+ */
+struct cpuinfo_frv {
+#ifdef CONFIG_MMU
+       unsigned long   *pgd_quick;
+       unsigned long   *pte_quick;
+       unsigned long   pgtable_cache_sz;
+#endif
+} __cacheline_aligned;
+
+extern struct cpuinfo_frv __nongprelbss boot_cpu_data;
+
+#define cpu_data               (&boot_cpu_data)
+#define current_cpu_data       boot_cpu_data
+
+/*
+ * Bus types
+ */
+#define EISA_bus 0
+#define MCA_bus 0
+
+struct thread_struct {
+       struct pt_regs          *frame;         /* [GR28] exception frame ptr for this thread */
+       struct task_struct      *curr;          /* [GR29] current pointer for this thread */
+       unsigned long           sp;             /* [GR1 ] kernel stack pointer */
+       unsigned long           fp;             /* [GR2 ] kernel frame pointer */
+       unsigned long           lr;             /* link register */
+       unsigned long           pc;             /* program counter */
+       unsigned long           gr[12];         /* [GR16-GR27] */
+       unsigned long           sched_lr;       /* LR from schedule() */
+
+       union {
+               struct pt_regs          *frame0;        /* top (user) stack frame */
+               struct user_context     *user;          /* userspace context */
+       };
+} __attribute__((aligned(8)));
+
+extern struct pt_regs *__kernel_frame0_ptr;
+extern struct task_struct *__kernel_current_task;
+
+#endif
+
+#ifndef __ASSEMBLY__
+#define INIT_THREAD_FRAME0 \
+       ((struct pt_regs *) \
+       (sizeof(init_stack) + (unsigned long) init_stack - sizeof(struct user_context)))
+
+#define INIT_THREAD {                          \
+       NULL,                                   \
+       (struct task_struct *) init_stack,      \
+       0, 0, 0, 0,                             \
+       { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \
+       0,                                      \
+       { INIT_THREAD_FRAME0 },                 \
+}
+
+/*
+ * do necessary setup to start up a newly executed thread.
+ * - need to discard the frame stacked by init() invoking the execve syscall
+ */
+#define start_thread(_regs, _pc, _usp)                 \
+do {                                                   \
+       set_fs(USER_DS); /* reads from user space */    \
+       __frame = __kernel_frame0_ptr;                  \
+       __frame->pc     = (_pc);                        \
+       __frame->psr    &= ~PSR_S;                      \
+       __frame->sp     = (_usp);                       \
+} while(0)
+
+extern void prepare_to_copy(struct task_struct *tsk);
+
+/* Free all resources held by a thread. */
+static inline void release_thread(struct task_struct *dead_task)
+{
+}
+
+extern asmlinkage int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
+extern asmlinkage void save_user_regs(struct user_context *target);
+extern asmlinkage void *restore_user_regs(const struct user_context *target, ...);
+
+#define copy_segments(tsk, mm)         do { } while (0)
+#define release_segments(mm)           do { } while (0)
+#define forget_segments()              do { } while (0)
+
+/*
+ * Free current thread data structures etc..
+ */
+static inline void exit_thread(void)
+{
+}
+
+/*
+ * Return saved PC of a blocked thread.
+ */
+extern unsigned long thread_saved_pc(struct task_struct *tsk);
+
+unsigned long get_wchan(struct task_struct *p);
+
+#define        KSTK_EIP(tsk)   ((tsk)->thread.frame0->pc)
+#define        KSTK_ESP(tsk)   ((tsk)->thread.frame0->sp)
+
+/* Allocation and freeing of basic task resources. */
+extern struct task_struct *alloc_task_struct(void);
+extern void free_task_struct(struct task_struct *p);
+
+#define cpu_relax()    barrier()
+
+/* data cache prefetch */
+#define ARCH_HAS_PREFETCH
+static inline void prefetch(const void *x)
+{
+       asm volatile("dcpl %0,gr0,#0" : : "r"(x));
+}
+
+#endif /* __ASSEMBLY__ */
+#endif /* _ASM_PROCESSOR_H */
diff --git a/arch/frv/include/asm/ptrace.h b/arch/frv/include/asm/ptrace.h
new file mode 100644 (file)
index 0000000..cf69340
--- /dev/null
@@ -0,0 +1,83 @@
+/* ptrace.h: ptrace() relevant definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_PTRACE_H
+#define _ASM_PTRACE_H
+
+#include <asm/registers.h>
+#ifdef __KERNEL__
+#include <asm/irq_regs.h>
+
+#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
+#endif
+
+
+#define PT_PSR         0
+#define        PT_ISR          1
+#define PT_CCR         2
+#define PT_CCCR                3
+#define PT_LR          4
+#define PT_LCR         5
+#define PT_PC          6
+
+#define PT__STATUS     7       /* exception status */
+#define PT_SYSCALLNO   8       /* syscall number or -1 */
+#define PT_ORIG_GR8    9       /* saved GR8 for signal handling */
+#define PT_GNER0       10
+#define PT_GNER1       11
+#define PT_IACC0H      12
+#define PT_IACC0L      13
+
+#define PT_GR(j)       ( 14 + (j))     /* GRj for 0<=j<=63 */
+#define PT_FR(j)       ( 78 + (j))     /* FRj for 0<=j<=63 */
+#define PT_FNER(j)     (142 + (j))     /* FNERj for 0<=j<=1 */
+#define PT_MSR(j)      (144 + (j))     /* MSRj for 0<=j<=2 */
+#define PT_ACC(j)      (146 + (j))     /* ACCj for 0<=j<=7 */
+#define PT_ACCG(jklm)  (154 + (jklm))  /* ACCGjklm for 0<=jklm<=1 (reads four regs per slot) */
+#define PT_FSR(j)      (156 + (j))     /* FSRj for 0<=j<=0 */
+#define PT__GPEND      78
+#define PT__END                157
+
+#define PT_TBR         PT_GR(0)
+#define PT_SP          PT_GR(1)
+#define PT_FP          PT_GR(2)
+#define PT_PREV_FRAME  PT_GR(28)       /* previous exception frame pointer (old gr28 value) */
+#define PT_CURR_TASK   PT_GR(29)       /* current task */
+
+
+/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
+#define PTRACE_GETREGS         12
+#define PTRACE_SETREGS         13
+#define PTRACE_GETFPREGS       14
+#define PTRACE_SETFPREGS       15
+#define PTRACE_GETFDPIC                31      /* get the ELF fdpic loadmap address */
+
+#define PTRACE_GETFDPIC_EXEC   0       /* [addr] request the executable loadmap */
+#define PTRACE_GETFDPIC_INTERP 1       /* [addr] request the interpreter loadmap */
+
+#ifdef __KERNEL__
+#ifndef __ASSEMBLY__
+
+/*
+ * we dedicate GR28 to keeping a pointer to the current exception frame
+ * - gr28 is destroyed on entry to the kernel from userspace
+ */
+register struct pt_regs *__frame asm("gr28");
+
+#define user_mode(regs)                        (!((regs)->psr & PSR_S))
+#define instruction_pointer(regs)      ((regs)->pc)
+
+extern unsigned long user_stack(const struct pt_regs *);
+extern void show_regs(struct pt_regs *);
+#define profile_pc(regs) ((regs)->pc)
+#endif
+
+#endif /* !__ASSEMBLY__ */
+#endif /* _ASM_PTRACE_H */
diff --git a/arch/frv/include/asm/registers.h b/arch/frv/include/asm/registers.h
new file mode 100644 (file)
index 0000000..9666119
--- /dev/null
@@ -0,0 +1,232 @@
+/* registers.h: register frame declarations
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+/*
+ * notes:
+ *
+ * (1) that the members of all these structures are carefully aligned to permit
+ *     usage of STD/STDF instructions
+ *
+ * (2) if you change these structures, you must change the code in
+ *     arch/frvnommu/kernel/{break.S,entry.S,switch_to.S,gdb-stub.c}
+ *
+ *
+ * the kernel stack space block looks like this:
+ *
+ *     +0x2000 +----------------------
+ *             | union {
+ *             |       struct frv_frame0 {
+ *             |               struct user_context {
+ *             |                       struct user_int_regs
+ *             |                       struct user_fpmedia_regs
+ *             |               }
+ *             |               struct frv_debug_regs
+ *             |       }
+ *             |       struct pt_regs [user exception]
+ *             | }
+ *             +---------------------- <-- __kernel_frame0_ptr (maybe GR28)
+ *             |
+ *             | kernel stack
+ *             |
+ *             |......................
+ *             | struct pt_regs [kernel exception]
+ *             |...................... <-- __kernel_frame0_ptr (maybe GR28)
+ *             |
+ *             | kernel stack
+ *             |
+ *             |...................... <-- stack pointer (GR1)
+ *             |
+ *             | unused stack space
+ *             |
+ *             +----------------------
+ *             | struct thread_info
+ *     +0x0000 +---------------------- <-- __current_thread_info (GR15);
+ *
+ * note that GR28 points to the current exception frame
+ */
+
+#ifndef _ASM_REGISTERS_H
+#define _ASM_REGISTERS_H
+
+#ifndef __ASSEMBLY__
+#define __OFFSET(X,N)  ((X)+(N)*4)
+#define __OFFSETC(X,N) xxxxxxxxxxxxxxxxxxxxxxxx
+#else
+#define __OFFSET(X,N)  ((X)+(N)*4)
+#define __OFFSETC(X,N) ((X)+(N))
+#endif
+
+/*****************************************************************************/
+/*
+ * Exception/Interrupt frame
+ * - held on kernel stack
+ * - 8-byte aligned on stack (old SP is saved in frame)
+ * - GR0 is fixed 0, so we don't save it
+ */
+#ifndef __ASSEMBLY__
+
+struct pt_regs {
+       unsigned long           psr;            /* Processor Status Register */
+       unsigned long           isr;            /* Integer Status Register */
+       unsigned long           ccr;            /* Condition Code Register */
+       unsigned long           cccr;           /* Condition Code for Conditional Insns Register */
+       unsigned long           lr;             /* Link Register */
+       unsigned long           lcr;            /* Loop Count Register */
+       unsigned long           pc;             /* Program Counter Register */
+       unsigned long           __status;       /* exception status */
+       unsigned long           syscallno;      /* syscall number or -1 */
+       unsigned long           orig_gr8;       /* original syscall arg #1 */
+       unsigned long           gner0;
+       unsigned long           gner1;
+       unsigned long long      iacc0;
+       unsigned long           tbr;            /* GR0 is fixed zero, so we use this for TBR */
+       unsigned long           sp;             /* GR1: USP/KSP */
+       unsigned long           fp;             /* GR2: FP */
+       unsigned long           gr3;
+       unsigned long           gr4;
+       unsigned long           gr5;
+       unsigned long           gr6;
+       unsigned long           gr7;            /* syscall number */
+       unsigned long           gr8;            /* 1st syscall param; syscall return */
+       unsigned long           gr9;            /* 2nd syscall param */
+       unsigned long           gr10;           /* 3rd syscall param */
+       unsigned long           gr11;           /* 4th syscall param */
+       unsigned long           gr12;           /* 5th syscall param */
+       unsigned long           gr13;           /* 6th syscall param */
+       unsigned long           gr14;
+       unsigned long           gr15;
+       unsigned long           gr16;           /* GP pointer */
+       unsigned long           gr17;           /* small data */
+       unsigned long           gr18;           /* PIC/PID */
+       unsigned long           gr19;
+       unsigned long           gr20;
+       unsigned long           gr21;
+       unsigned long           gr22;
+       unsigned long           gr23;
+       unsigned long           gr24;
+       unsigned long           gr25;
+       unsigned long           gr26;
+       unsigned long           gr27;
+       struct pt_regs          *next_frame;    /* GR28 - next exception frame */
+       unsigned long           gr29;           /* GR29 - OS reserved */
+       unsigned long           gr30;           /* GR30 - OS reserved */
+       unsigned long           gr31;           /* GR31 - OS reserved */
+} __attribute__((aligned(8)));
+
+#endif
+
+#define REG__STATUS_STEP       0x00000001      /* - reenable single stepping on return */
+#define REG__STATUS_STEPPED    0x00000002      /* - single step caused exception */
+#define REG__STATUS_BROKE      0x00000004      /* - BREAK insn caused exception */
+#define REG__STATUS_SYSC_ENTRY 0x40000000      /* - T on syscall entry (ptrace.c only) */
+#define REG__STATUS_SYSC_EXIT  0x80000000      /* - T on syscall exit (ptrace.c only) */
+
+#define REG_GR(R)      __OFFSET(REG_GR0, (R))
+
+#define REG_SP         REG_GR(1)
+#define REG_FP         REG_GR(2)
+#define REG_PREV_FRAME REG_GR(28)      /* previous exception frame pointer (old gr28 value) */
+#define REG_CURR_TASK  REG_GR(29)      /* current task */
+
+/*****************************************************************************/
+/*
+ * debugging registers
+ */
+#ifndef __ASSEMBLY__
+
+struct frv_debug_regs
+{
+       unsigned long           dcr;
+       unsigned long           ibar[4] __attribute__((aligned(8)));
+       unsigned long           dbar[4] __attribute__((aligned(8)));
+       unsigned long           dbdr[4][4] __attribute__((aligned(8)));
+       unsigned long           dbmr[4][4] __attribute__((aligned(8)));
+} __attribute__((aligned(8)));
+
+#endif
+
+/*****************************************************************************/
+/*
+ * userspace registers
+ */
+#ifndef __ASSEMBLY__
+
+struct user_int_regs
+{
+       /* integer registers
+        * - up to gr[31] mirror pt_regs
+        * - total size must be multiple of 8 bytes
+        */
+       unsigned long           psr;            /* Processor Status Register */
+       unsigned long           isr;            /* Integer Status Register */
+       unsigned long           ccr;            /* Condition Code Register */
+       unsigned long           cccr;           /* Condition Code for Conditional Insns Register */
+       unsigned long           lr;             /* Link Register */
+       unsigned long           lcr;            /* Loop Count Register */
+       unsigned long           pc;             /* Program Counter Register */
+       unsigned long           __status;       /* exception status */
+       unsigned long           syscallno;      /* syscall number or -1 */
+       unsigned long           orig_gr8;       /* original syscall arg #1 */
+       unsigned long           gner[2];
+       unsigned long long      iacc[1];
+
+       union {
+               unsigned long   tbr;
+               unsigned long   gr[64];
+       };
+};
+
+struct user_fpmedia_regs
+{
+       /* FP/Media registers */
+       unsigned long   fr[64];
+       unsigned long   fner[2];
+       unsigned long   msr[2];
+       unsigned long   acc[8];
+       unsigned char   accg[8];
+       unsigned long   fsr[1];
+};
+
+struct user_context
+{
+       struct user_int_regs            i;
+       struct user_fpmedia_regs        f;
+
+       /* we provide a context extension so that we can save the regs for CPUs that
+        * implement many more of Fujitsu's lavish register spec
+        */
+       void *extension;
+} __attribute__((aligned(8)));
+
+struct frv_frame0 {
+       union {
+               struct pt_regs          regs;
+               struct user_context     uc;
+       };
+
+       struct frv_debug_regs           debug;
+
+} __attribute__((aligned(32)));
+
+#endif
+
+#define __INT_GR(R)            __OFFSET(__INT_GR0,             (R))
+
+#define __FPMEDIA_FR(R)                __OFFSET(__FPMEDIA_FR0,         (R))
+#define __FPMEDIA_FNER(R)      __OFFSET(__FPMEDIA_FNER0,       (R))
+#define __FPMEDIA_MSR(R)       __OFFSET(__FPMEDIA_MSR0,        (R))
+#define __FPMEDIA_ACC(R)       __OFFSET(__FPMEDIA_ACC0,        (R))
+#define __FPMEDIA_ACCG(R)      __OFFSETC(__FPMEDIA_ACCG0,      (R))
+#define __FPMEDIA_FSR(R)       __OFFSET(__FPMEDIA_FSR0,        (R))
+
+#define __THREAD_GR(R)         __OFFSET(__THREAD_GR16,         (R) - 16)
+
+#endif /* _ASM_REGISTERS_H */
diff --git a/arch/frv/include/asm/resource.h b/arch/frv/include/asm/resource.h
new file mode 100644 (file)
index 0000000..5fc6054
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _ASM_RESOURCE_H
+#define _ASM_RESOURCE_H
+
+#include <asm-generic/resource.h>
+
+#endif /* _ASM_RESOURCE_H */
+
diff --git a/arch/frv/include/asm/scatterlist.h b/arch/frv/include/asm/scatterlist.h
new file mode 100644 (file)
index 0000000..4bca8a2
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef _ASM_SCATTERLIST_H
+#define _ASM_SCATTERLIST_H
+
+#include <asm/types.h>
+
+/*
+ * Drivers must set either ->address or (preferred) page and ->offset
+ * to indicate where data must be transferred to/from.
+ *
+ * Using page is recommended since it handles highmem data as well as
+ * low mem. ->address is restricted to data which has a virtual mapping, and
+ * it will go away in the future. Updating to page can be automated very
+ * easily -- something like
+ *
+ * sg->address = some_ptr;
+ *
+ * can be rewritten as
+ *
+ * sg_set_buf(sg, some_ptr, length);
+ *
+ * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
+ */
+struct scatterlist {
+#ifdef CONFIG_DEBUG_SG
+       unsigned long   sg_magic;
+#endif
+       unsigned long   page_link;
+       unsigned int    offset;         /* for highmem, page offset */
+
+       dma_addr_t      dma_address;
+       unsigned int    length;
+};
+
+/*
+ * These macros should be used after a pci_map_sg call has been done
+ * to get bus addresses of each of the SG entries and their lengths.
+ * You should only work with the number of sg entries pci_map_sg
+ * returns, or alternatively stop on the first sg_dma_len(sg) which
+ * is 0.
+ */
+#define sg_dma_address(sg)     ((sg)->dma_address)
+#define sg_dma_len(sg)         ((sg)->length)
+
+#define ISA_DMA_THRESHOLD (0xffffffffUL)
+
+#endif /* !_ASM_SCATTERLIST_H */
diff --git a/arch/frv/include/asm/sections.h b/arch/frv/include/asm/sections.h
new file mode 100644 (file)
index 0000000..17d0fb1
--- /dev/null
@@ -0,0 +1,46 @@
+/* sections.h: linkage layout variables
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SECTIONS_H
+#define _ASM_SECTIONS_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+#include <asm-generic/sections.h>
+
+#ifdef __KERNEL__
+
+/*
+ * we don't want to put variables in the GP-REL section if they're not used very much - that would
+ * be waste since GP-REL addressing is limited to GP16+/-2048
+ */
+#define __nongpreldata __attribute__((section(".data")))
+#define __nongprelbss  __attribute__((section(".bss")))
+
+/*
+ * linker symbols
+ */
+extern const void __kernel_image_start, __kernel_image_end, __page_offset;
+
+extern unsigned long __nongprelbss memory_start;
+extern unsigned long __nongprelbss memory_end;
+extern unsigned long __nongprelbss rom_length;
+
+/* determine if we're running from ROM */
+static inline int is_in_rom(unsigned long addr)
+{
+       return 0; /* default case: not in ROM */
+}
+
+#endif
+#endif
+#endif /* _ASM_SECTIONS_H */
diff --git a/arch/frv/include/asm/segment.h b/arch/frv/include/asm/segment.h
new file mode 100644 (file)
index 0000000..e3616a6
--- /dev/null
@@ -0,0 +1,45 @@
+/* segment.h: MMU segment settings
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SEGMENT_H
+#define _ASM_SEGMENT_H
+
+
+#ifndef __ASSEMBLY__
+
+typedef struct {
+       unsigned long seg;
+} mm_segment_t;
+
+#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
+
+#define KERNEL_DS              MAKE_MM_SEG(0xdfffffffUL)
+
+#ifdef CONFIG_MMU
+#define USER_DS                        MAKE_MM_SEG(TASK_SIZE - 1)
+#else
+#define USER_DS                        KERNEL_DS
+#endif
+
+#define get_ds()               (KERNEL_DS)
+#define get_fs()               (__current_thread_info->addr_limit)
+#define segment_eq(a,b)                ((a).seg == (b).seg)
+#define __kernel_ds_p()                segment_eq(get_fs(), KERNEL_DS)
+#define get_addr_limit()       (get_fs().seg)
+
+#define set_fs(_x)                                     \
+do {                                                   \
+       __current_thread_info->addr_limit = (_x);       \
+} while(0)
+
+
+#endif /* __ASSEMBLY__ */
+#endif /* _ASM_SEGMENT_H */
diff --git a/arch/frv/include/asm/sembuf.h b/arch/frv/include/asm/sembuf.h
new file mode 100644 (file)
index 0000000..164b127
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef _ASM_SEMBUF_H
+#define _ASM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+       struct ipc64_perm       sem_perm;       /* permissions .. see ipc.h */
+       __kernel_time_t         sem_otime;      /* last semop time */
+       unsigned long           __unused1;
+       __kernel_time_t         sem_ctime;      /* last change time */
+       unsigned long           __unused2;
+       unsigned long           sem_nsems;      /* no. of semaphores in array */
+       unsigned long           __unused3;
+       unsigned long           __unused4;
+};
+
+#endif /* _ASM_SEMBUF_H */
+
diff --git a/arch/frv/include/asm/serial-regs.h b/arch/frv/include/asm/serial-regs.h
new file mode 100644 (file)
index 0000000..e1286bd
--- /dev/null
@@ -0,0 +1,44 @@
+/* serial-regs.h: serial port registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SERIAL_REGS_H
+#define _ASM_SERIAL_REGS_H
+
+#include <linux/serial_reg.h>
+#include <asm/irc-regs.h>
+
+#define SERIAL_ICLK    33333333        /* the target serial input clock */
+#define UART0_BASE     0xfeff9c00
+#define UART1_BASE     0xfeff9c40
+
+#define __get_UART0(R) ({ __reg(UART0_BASE + (R) * 8) >> 24; })
+#define __get_UART1(R) ({ __reg(UART1_BASE + (R) * 8) >> 24; })
+#define __set_UART0(R,V) do { __reg(UART0_BASE + (R) * 8) = (V) << 24; } while(0)
+#define __set_UART1(R,V) do { __reg(UART1_BASE + (R) * 8) = (V) << 24; } while(0)
+
+#define __get_UART0_LSR() ({ __get_UART0(UART_LSR); })
+#define __get_UART1_LSR() ({ __get_UART1(UART_LSR); })
+
+#define __set_UART0_IER(V) __set_UART0(UART_IER,(V))
+#define __set_UART1_IER(V) __set_UART1(UART_IER,(V))
+
+/* serial prescaler select register */
+#define __get_UCPSR()  ({ *(volatile unsigned long *)(0xfeff9c90); })
+#define __set_UCPSR(V) do { *(volatile unsigned long *)(0xfeff9c90) = (V); } while(0)
+#define UCPSR_SELECT0  0x07000000
+#define UCPSR_SELECT1  0x38000000
+
+/* serial prescaler base value register */
+#define __get_UCPVR()  ({ *(volatile unsigned long *)(0xfeff9c98); mb(); })
+#define __set_UCPVR(V) do { *(volatile unsigned long *)(0xfeff9c98) = (V) << 24; mb(); } while(0)
+
+
+#endif /* _ASM_SERIAL_REGS_H */
diff --git a/arch/frv/include/asm/serial.h b/arch/frv/include/asm/serial.h
new file mode 100644 (file)
index 0000000..dbb8259
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * serial.h
+ *
+ * Copyright (C) 2003 Develer S.r.l. (http://www.develer.com/)
+ * Author: Bernardo Innocenti <bernie@codewiz.org>
+ *
+ * Based on linux/include/asm-i386/serial.h
+ */
+#include <asm/serial-regs.h>
+
+/*
+ * the base baud is derived from the clock speed and so is variable
+ */
+#define BASE_BAUD 0
+
+#define STD_COM_FLAGS          ASYNC_BOOT_AUTOCONF
+
+#define SERIAL_PORT_DFNS
diff --git a/arch/frv/include/asm/setup.h b/arch/frv/include/asm/setup.h
new file mode 100644 (file)
index 0000000..afd787c
--- /dev/null
@@ -0,0 +1,31 @@
+/* setup.h: setup stuff
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SETUP_H
+#define _ASM_SETUP_H
+
+#define COMMAND_LINE_SIZE       512
+
+#ifdef __KERNEL__
+
+#include <linux/init.h>
+
+#ifndef __ASSEMBLY__
+
+#ifdef CONFIG_MMU
+extern unsigned long __initdata num_mappedpages;
+#endif
+
+#endif /* !__ASSEMBLY__ */
+
+#endif  /*  __KERNEL__  */
+
+#endif /* _ASM_SETUP_H */
diff --git a/arch/frv/include/asm/shmbuf.h b/arch/frv/include/asm/shmbuf.h
new file mode 100644 (file)
index 0000000..4c6e711
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef _ASM_SHMBUF_H
+#define _ASM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+       struct ipc64_perm       shm_perm;       /* operation perms */
+       size_t                  shm_segsz;      /* size of segment (bytes) */
+       __kernel_time_t         shm_atime;      /* last attach time */
+       unsigned long           __unused1;
+       __kernel_time_t         shm_dtime;      /* last detach time */
+       unsigned long           __unused2;
+       __kernel_time_t         shm_ctime;      /* last change time */
+       unsigned long           __unused3;
+       __kernel_pid_t          shm_cpid;       /* pid of creator */
+       __kernel_pid_t          shm_lpid;       /* pid of last operator */
+       unsigned long           shm_nattch;     /* no. of current attaches */
+       unsigned long           __unused4;
+       unsigned long           __unused5;
+};
+
+struct shminfo64 {
+       unsigned long   shmmax;
+       unsigned long   shmmin;
+       unsigned long   shmmni;
+       unsigned long   shmseg;
+       unsigned long   shmall;
+       unsigned long   __unused1;
+       unsigned long   __unused2;
+       unsigned long   __unused3;
+       unsigned long   __unused4;
+};
+
+#endif /* _ASM_SHMBUF_H */
+
diff --git a/arch/frv/include/asm/shmparam.h b/arch/frv/include/asm/shmparam.h
new file mode 100644 (file)
index 0000000..ab71100
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _ASM_SHMPARAM_H
+#define _ASM_SHMPARAM_H
+
+#define        SHMLBA PAGE_SIZE                 /* attach addr a multiple of this */
+
+#endif /* _ASM_SHMPARAM_H */
+
diff --git a/arch/frv/include/asm/sigcontext.h b/arch/frv/include/asm/sigcontext.h
new file mode 100644 (file)
index 0000000..3b263f3
--- /dev/null
@@ -0,0 +1,26 @@
+/* sigcontext.h: FRV signal context
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_SIGCONTEXT_H
+#define _ASM_SIGCONTEXT_H
+
+#include <asm/registers.h>
+
+/*
+ * Signal context structure - contains all info to do with the state
+ * before the signal handler was invoked.  Note: only add new entries
+ * to the end of the structure.
+ */
+struct sigcontext {
+       struct user_context     sc_context;
+       unsigned long           sc_oldmask;     /* old sigmask */
+} __attribute__((aligned(8)));
+
+#endif
diff --git a/arch/frv/include/asm/siginfo.h b/arch/frv/include/asm/siginfo.h
new file mode 100644 (file)
index 0000000..d3fd1ca
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_SIGINFO_H
+#define _ASM_SIGINFO_H
+
+#include <linux/types.h>
+#include <asm-generic/siginfo.h>
+
+#define FPE_MDAOVF     (__SI_FAULT|9)  /* media overflow */
+#undef NSIGFPE
+#define NSIGFPE                9
+
+#endif
+
diff --git a/arch/frv/include/asm/signal.h b/arch/frv/include/asm/signal.h
new file mode 100644 (file)
index 0000000..2079197
--- /dev/null
@@ -0,0 +1,161 @@
+#ifndef _ASM_SIGNAL_H
+#define _ASM_SIGNAL_H
+
+#include <linux/types.h>
+
+/* Avoid too many header ordering problems.  */
+struct siginfo;
+
+#ifdef __KERNEL__
+/* Most things should be clean enough to redefine this at will, if care
+   is taken to make libc match.  */
+
+#define _NSIG          64
+#define _NSIG_BPW      32
+#define _NSIG_WORDS    (_NSIG / _NSIG_BPW)
+
+typedef unsigned long old_sigset_t;            /* at least 32 bits */
+
+typedef struct {
+       unsigned long sig[_NSIG_WORDS];
+} sigset_t;
+
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+#define NSIG           32
+typedef unsigned long sigset_t;
+
+#endif /* __KERNEL__ */
+
+#define SIGHUP          1
+#define SIGINT          2
+#define SIGQUIT                 3
+#define SIGILL          4
+#define SIGTRAP                 5
+#define SIGABRT                 6
+#define SIGIOT          6
+#define SIGBUS          7
+#define SIGFPE          8
+#define SIGKILL                 9
+#define SIGUSR1                10
+#define SIGSEGV                11
+#define SIGUSR2                12
+#define SIGPIPE                13
+#define SIGALRM                14
+#define SIGTERM                15
+#define SIGSTKFLT      16
+#define SIGCHLD                17
+#define SIGCONT                18
+#define SIGSTOP                19
+#define SIGTSTP                20
+#define SIGTTIN                21
+#define SIGTTOU                22
+#define SIGURG         23
+#define SIGXCPU                24
+#define SIGXFSZ                25
+#define SIGVTALRM      26
+#define SIGPROF                27
+#define SIGWINCH       28
+#define SIGIO          29
+#define SIGPOLL                SIGIO
+/*
+#define SIGLOST                29
+*/
+#define SIGPWR         30
+#define SIGSYS         31
+#define        SIGUNUSED       31
+
+/* These should not be considered constants from userland.  */
+#define SIGRTMIN       32
+#define SIGRTMAX       (_NSIG-1)
+
+/*
+ * SA_FLAGS values:
+ *
+ * SA_ONSTACK indicates that a registered stack_t will be used.
+ * SA_RESTART flag to get restarting signals (which were the default long ago)
+ * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
+ * SA_RESETHAND clears the handler when the signal is delivered.
+ * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
+ * SA_NODEFER prevents the current signal from being masked in the handler.
+ *
+ * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
+ * Unix names RESETHAND and NODEFER respectively.
+ */
+#define SA_NOCLDSTOP   0x00000001
+#define SA_NOCLDWAIT   0x00000002 /* not supported yet */
+#define SA_SIGINFO     0x00000004
+#define SA_ONSTACK     0x08000000
+#define SA_RESTART     0x10000000
+#define SA_NODEFER     0x40000000
+#define SA_RESETHAND   0x80000000
+
+#define SA_NOMASK      SA_NODEFER
+#define SA_ONESHOT     SA_RESETHAND
+
+#define SA_RESTORER    0x04000000
+
+/*
+ * sigaltstack controls
+ */
+#define SS_ONSTACK     1
+#define SS_DISABLE     2
+
+#define MINSIGSTKSZ    2048
+#define SIGSTKSZ       8192
+
+#include <asm-generic/signal.h>
+
+#ifdef __KERNEL__
+struct old_sigaction {
+       __sighandler_t sa_handler;
+       old_sigset_t sa_mask;
+       unsigned long sa_flags;
+       __sigrestore_t sa_restorer;
+};
+
+struct sigaction {
+       __sighandler_t sa_handler;
+       unsigned long sa_flags;
+       __sigrestore_t sa_restorer;
+       sigset_t sa_mask;               /* mask last for extensibility */
+};
+
+struct k_sigaction {
+       struct sigaction sa;
+};
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+struct sigaction {
+       union {
+         __sighandler_t _sa_handler;
+         void (*_sa_sigaction)(int, struct siginfo *, void *);
+       } _u;
+       sigset_t sa_mask;
+       unsigned long sa_flags;
+       void (*sa_restorer)(void);
+};
+
+#define sa_handler     _u._sa_handler
+#define sa_sigaction   _u._sa_sigaction
+
+#endif /* __KERNEL__ */
+
+typedef struct sigaltstack {
+       void __user *ss_sp;
+       int ss_flags;
+       size_t ss_size;
+} stack_t;
+
+#define ptrace_signal_deliver(regs, cookie) do { } while (0)
+
+#ifdef __KERNEL__
+
+#include <asm/sigcontext.h>
+#undef __HAVE_ARCH_SIG_BITOPS
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_SIGNAL_H */
diff --git a/arch/frv/include/asm/smp.h b/arch/frv/include/asm/smp.h
new file mode 100644 (file)
index 0000000..38349ec
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
+
+
+#ifdef CONFIG_SMP
+#error SMP not supported
+#endif
+
+#endif
diff --git a/arch/frv/include/asm/socket.h b/arch/frv/include/asm/socket.h
new file mode 100644 (file)
index 0000000..57c3d40
--- /dev/null
@@ -0,0 +1,61 @@
+#ifndef _ASM_SOCKET_H
+#define _ASM_SOCKET_H
+
+#include <asm/sockios.h>
+
+/* For setsockopt(2) */
+#define SOL_SOCKET     1
+
+#define SO_DEBUG       1
+#define SO_REUSEADDR   2
+#define SO_TYPE                3
+#define SO_ERROR       4
+#define SO_DONTROUTE   5
+#define SO_BROADCAST   6
+#define SO_SNDBUF      7
+#define SO_RCVBUF      8
+#define SO_SNDBUFFORCE 32
+#define SO_RCVBUFFORCE 33
+#define SO_KEEPALIVE   9
+#define SO_OOBINLINE   10
+#define SO_NO_CHECK    11
+#define SO_PRIORITY    12
+#define SO_LINGER      13
+#define SO_BSDCOMPAT   14
+/* To add :#define SO_REUSEPORT 15 */
+#define SO_PASSCRED    16
+#define SO_PEERCRED    17
+#define SO_RCVLOWAT    18
+#define SO_SNDLOWAT    19
+#define SO_RCVTIMEO    20
+#define SO_SNDTIMEO    21
+
+/* Security levels - as per NRL IPv6 - don't actually do anything */
+#define SO_SECURITY_AUTHENTICATION             22
+#define SO_SECURITY_ENCRYPTION_TRANSPORT       23
+#define SO_SECURITY_ENCRYPTION_NETWORK         24
+
+#define SO_BINDTODEVICE        25
+
+/* Socket filtering */
+#define SO_ATTACH_FILTER        26
+#define SO_DETACH_FILTER        27
+
+#define SO_PEERNAME             28
+#define SO_TIMESTAMP           29
+#define SCM_TIMESTAMP          SO_TIMESTAMP
+
+#define SO_ACCEPTCONN          30
+
+#define SO_PEERSEC             31
+#define SO_PASSSEC             34
+#define SO_TIMESTAMPNS         35
+#define SCM_TIMESTAMPNS                SO_TIMESTAMPNS
+
+#define SO_MARK                        36
+
+#define SO_TIMESTAMPING                37
+#define SCM_TIMESTAMPING       SO_TIMESTAMPING
+
+#endif /* _ASM_SOCKET_H */
+
diff --git a/arch/frv/include/asm/sockios.h b/arch/frv/include/asm/sockios.h
new file mode 100644 (file)
index 0000000..5dbdd13
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef _ASM_SOCKIOS__
+#define _ASM_SOCKIOS__
+
+/* Socket-level I/O control calls. */
+#define FIOSETOWN      0x8901
+#define SIOCSPGRP      0x8902
+#define FIOGETOWN      0x8903
+#define SIOCGPGRP      0x8904
+#define SIOCATMARK     0x8905
+#define SIOCGSTAMP     0x8906          /* Get stamp (timeval) */
+#define SIOCGSTAMPNS   0x8907          /* Get stamp (timespec) */
+
+#endif /* _ASM_SOCKIOS__ */
+
diff --git a/arch/frv/include/asm/spinlock.h b/arch/frv/include/asm/spinlock.h
new file mode 100644 (file)
index 0000000..fe385f4
--- /dev/null
@@ -0,0 +1,17 @@
+/* spinlock.h: spinlocks for FR-V
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SPINLOCK_H
+#define _ASM_SPINLOCK_H
+
+#error no spinlocks for FR-V yet
+
+#endif /* _ASM_SPINLOCK_H */
diff --git a/arch/frv/include/asm/spr-regs.h b/arch/frv/include/asm/spr-regs.h
new file mode 100644 (file)
index 0000000..01e6af5
--- /dev/null
@@ -0,0 +1,416 @@
+/* spr-regs.h: special-purpose registers on the FRV
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SPR_REGS_H
+#define _ASM_SPR_REGS_H
+
+/*
+ * PSR - Processor Status Register
+ */
+#define PSR_ET                 0x00000001      /* enable interrupts/exceptions flag */
+#define PSR_PS                 0x00000002      /* previous supervisor mode flag */
+#define PSR_S                  0x00000004      /* supervisor mode flag */
+#define PSR_PIL                        0x00000078      /* processor external interrupt level */
+#define PSR_PIL_0              0x00000000      /* - no interrupt in progress */
+#define PSR_PIL_13             0x00000068      /* - debugging only */
+#define PSR_PIL_14             0x00000070      /* - debugging in progress */
+#define PSR_PIL_15             0x00000078      /* - NMI in progress */
+#define PSR_EM                 0x00000080      /* enable media operation */
+#define PSR_EF                 0x00000100      /* enable FPU operation */
+#define PSR_BE                 0x00001000      /* endianness mode */
+#define PSR_BE_LE              0x00000000      /* - little endian mode */
+#define PSR_BE_BE              0x00001000      /* - big endian mode */
+#define PSR_CM                 0x00002000      /* conditional mode */
+#define PSR_NEM                        0x00004000      /* non-excepting mode */
+#define PSR_ICE                        0x00010000      /* in-circuit emulation mode */
+#define PSR_VERSION_SHIFT      24              /* CPU silicon ID */
+#define PSR_IMPLE_SHIFT                28              /* CPU core ID */
+
+#define PSR_VERSION(psr)       (((psr) >> PSR_VERSION_SHIFT) & 0xf)
+#define PSR_IMPLE(psr)         (((psr) >> PSR_IMPLE_SHIFT) & 0xf)
+
+#define PSR_IMPLE_FR401                0x2
+#define PSR_VERSION_FR401_MB93401      0x0
+#define PSR_VERSION_FR401_MB93401A     0x1
+#define PSR_VERSION_FR401_MB93403      0x2
+
+#define PSR_IMPLE_FR405                0x4
+#define PSR_VERSION_FR405_MB93405      0x0
+
+#define PSR_IMPLE_FR451                0x5
+#define PSR_VERSION_FR451_MB93451      0x0
+
+#define PSR_IMPLE_FR501                0x1
+#define PSR_VERSION_FR501_MB93501      0x1
+#define PSR_VERSION_FR501_MB93501A     0x2
+
+#define PSR_IMPLE_FR551                0x3
+#define PSR_VERSION_FR551_MB93555      0x1
+
+#define __get_PSR()    ({ unsigned long x; asm volatile("movsg psr,%0" : "=r"(x)); x; })
+#define __set_PSR(V)   do { asm volatile("movgs %0,psr" : : "r"(V)); } while(0)
+
+/*
+ * TBR - Trap Base Register
+ */
+#define TBR_TT                 0x00000ff0
+#define TBR_TT_INSTR_MMU_MISS  (0x01 << 4)
+#define TBR_TT_INSTR_ACC_ERROR (0x02 << 4)
+#define TBR_TT_INSTR_ACC_EXCEP (0x03 << 4)
+#define TBR_TT_PRIV_INSTR      (0x06 << 4)
+#define TBR_TT_ILLEGAL_INSTR   (0x07 << 4)
+#define TBR_TT_FP_EXCEPTION    (0x0d << 4)
+#define TBR_TT_MP_EXCEPTION    (0x0e << 4)
+#define TBR_TT_DATA_ACC_ERROR  (0x11 << 4)
+#define TBR_TT_DATA_MMU_MISS   (0x12 << 4)
+#define TBR_TT_DATA_ACC_EXCEP  (0x13 << 4)
+#define TBR_TT_DATA_STR_ERROR  (0x14 << 4)
+#define TBR_TT_DIVISION_EXCEP  (0x17 << 4)
+#define TBR_TT_COMMIT_EXCEP    (0x19 << 4)
+#define TBR_TT_INSTR_TLB_MISS  (0x1a << 4)
+#define TBR_TT_DATA_TLB_MISS   (0x1b << 4)
+#define TBR_TT_DATA_DAT_EXCEP  (0x1d << 4)
+#define TBR_TT_DECREMENT_TIMER (0x1f << 4)
+#define TBR_TT_COMPOUND_EXCEP  (0x20 << 4)
+#define TBR_TT_INTERRUPT_1     (0x21 << 4)
+#define TBR_TT_INTERRUPT_2     (0x22 << 4)
+#define TBR_TT_INTERRUPT_3     (0x23 << 4)
+#define TBR_TT_INTERRUPT_4     (0x24 << 4)
+#define TBR_TT_INTERRUPT_5     (0x25 << 4)
+#define TBR_TT_INTERRUPT_6     (0x26 << 4)
+#define TBR_TT_INTERRUPT_7     (0x27 << 4)
+#define TBR_TT_INTERRUPT_8     (0x28 << 4)
+#define TBR_TT_INTERRUPT_9     (0x29 << 4)
+#define TBR_TT_INTERRUPT_10    (0x2a << 4)
+#define TBR_TT_INTERRUPT_11    (0x2b << 4)
+#define TBR_TT_INTERRUPT_12    (0x2c << 4)
+#define TBR_TT_INTERRUPT_13    (0x2d << 4)
+#define TBR_TT_INTERRUPT_14    (0x2e << 4)
+#define TBR_TT_INTERRUPT_15    (0x2f << 4)
+#define TBR_TT_TRAP0           (0x80 << 4)
+#define TBR_TT_TRAP1           (0x81 << 4)
+#define TBR_TT_TRAP2           (0x82 << 4)
+#define TBR_TT_TRAP3           (0x83 << 4)
+#define TBR_TT_TRAP120         (0xf8 << 4)
+#define TBR_TT_TRAP121         (0xf9 << 4)
+#define TBR_TT_TRAP122         (0xfa << 4)
+#define TBR_TT_TRAP123         (0xfb << 4)
+#define TBR_TT_TRAP124         (0xfc << 4)
+#define TBR_TT_TRAP125         (0xfd << 4)
+#define TBR_TT_TRAP126         (0xfe << 4)
+#define TBR_TT_BREAK           (0xff << 4)
+
+#define TBR_TT_ATOMIC_CMPXCHG32        TBR_TT_TRAP120
+#define TBR_TT_ATOMIC_XCHG32   TBR_TT_TRAP121
+#define TBR_TT_ATOMIC_XOR      TBR_TT_TRAP122
+#define TBR_TT_ATOMIC_OR       TBR_TT_TRAP123
+#define TBR_TT_ATOMIC_AND      TBR_TT_TRAP124
+#define TBR_TT_ATOMIC_SUB      TBR_TT_TRAP125
+#define TBR_TT_ATOMIC_ADD      TBR_TT_TRAP126
+
+#define __get_TBR()    ({ unsigned long x; asm volatile("movsg tbr,%0" : "=r"(x)); x; })
+
+/*
+ * HSR0 - Hardware Status Register 0
+ */
+#define HSR0_PDM               0x00000007      /* power down mode */
+#define HSR0_PDM_NORMAL                0x00000000      /* - normal mode */
+#define HSR0_PDM_CORE_SLEEP    0x00000001      /* - CPU core sleep mode */
+#define HSR0_PDM_BUS_SLEEP     0x00000003      /* - bus sleep mode */
+#define HSR0_PDM_PLL_RUN       0x00000005      /* - PLL run */
+#define HSR0_PDM_PLL_STOP      0x00000007      /* - PLL stop */
+#define HSR0_GRLE              0x00000040      /* GR lower register set enable */
+#define HSR0_GRHE              0x00000080      /* GR higher register set enable */
+#define HSR0_FRLE              0x00000100      /* FR lower register set enable */
+#define HSR0_FRHE              0x00000200      /* FR higher register set enable */
+#define HSR0_GRN               0x00000400      /* GR quantity */
+#define HSR0_GRN_64            0x00000000      /* - 64 GR registers */
+#define HSR0_GRN_32            0x00000400      /* - 32 GR registers */
+#define HSR0_FRN               0x00000800      /* FR quantity */
+#define HSR0_FRN_64            0x00000000      /* - 64 FR registers */
+#define HSR0_FRN_32            0x00000800      /* - 32 FR registers */
+#define HSR0_SA                        0x00001000      /* start address (RAMBOOT#) */
+#define HSR0_ETMI              0x00008000      /* enable TIMERI (64-bit up timer) */
+#define HSR0_ETMD              0x00004000      /* enable TIMERD (32-bit down timer) */
+#define HSR0_PEDAT             0x00010000      /* previous DAT mode */
+#define HSR0_XEDAT             0x00020000      /* exception DAT mode */
+#define HSR0_EDAT              0x00080000      /* enable DAT mode */
+#define HSR0_RME               0x00400000      /* enable RAM mode */
+#define HSR0_EMEM              0x00800000      /* enable MMU_Miss mask */
+#define HSR0_EXMMU             0x01000000      /* enable extended MMU mode */
+#define HSR0_EDMMU             0x02000000      /* enable data MMU */
+#define HSR0_EIMMU             0x04000000      /* enable instruction MMU */
+#define HSR0_CBM               0x08000000      /* copy back mode */
+#define HSR0_CBM_WRITE_THRU    0x00000000      /* - write through */
+#define HSR0_CBM_COPY_BACK     0x08000000      /* - copy back */
+#define HSR0_NWA               0x10000000      /* no write allocate */
+#define HSR0_DCE               0x40000000      /* data cache enable */
+#define HSR0_ICE               0x80000000      /* instruction cache enable */
+
+#define __get_HSR(R)   ({ unsigned long x; asm volatile("movsg hsr"#R",%0" : "=r"(x)); x; })
+#define __set_HSR(R,V) do { asm volatile("movgs %0,hsr"#R : : "r"(V)); } while(0)
+
+/*
+ * CCR - Condition Codes Register
+ */
+#define CCR_FCC0               0x0000000f      /* FP/Media condition 0 (fcc0 reg) */
+#define CCR_FCC1               0x000000f0      /* FP/Media condition 1 (fcc1 reg) */
+#define CCR_FCC2               0x00000f00      /* FP/Media condition 2 (fcc2 reg) */
+#define CCR_FCC3               0x0000f000      /* FP/Media condition 3 (fcc3 reg) */
+#define CCR_ICC0               0x000f0000      /* Integer condition 0 (icc0 reg) */
+#define CCR_ICC0_C             0x00010000      /* - Carry flag */
+#define CCR_ICC0_V             0x00020000      /* - Overflow flag */
+#define CCR_ICC0_Z             0x00040000      /* - Zero flag */
+#define CCR_ICC0_N             0x00080000      /* - Negative flag */
+#define CCR_ICC1               0x00f00000      /* Integer condition 1 (icc1 reg) */
+#define CCR_ICC2               0x0f000000      /* Integer condition 2 (icc2 reg) */
+#define CCR_ICC3               0xf0000000      /* Integer condition 3 (icc3 reg) */
+
+/*
+ * CCCR - Condition Codes for Conditional Instructions Register
+ */
+#define CCCR_CC0               0x00000003      /* condition 0 (cc0 reg) */
+#define CCCR_CC0_FALSE         0x00000002      /* - condition is false */
+#define CCCR_CC0_TRUE          0x00000003      /* - condition is true */
+#define CCCR_CC1               0x0000000c      /* condition 1 (cc1 reg) */
+#define CCCR_CC2               0x00000030      /* condition 2 (cc2 reg) */
+#define CCCR_CC3               0x000000c0      /* condition 3 (cc3 reg) */
+#define CCCR_CC4               0x00000300      /* condition 4 (cc4 reg) */
+#define CCCR_CC5               0x00000c00      /* condition 5 (cc5 reg) */
+#define CCCR_CC6               0x00003000      /* condition 6 (cc6 reg) */
+#define CCCR_CC7               0x0000c000      /* condition 7 (cc7 reg) */
+
+/*
+ * ISR - Integer Status Register
+ */
+#define ISR_EMAM               0x00000001      /* memory misaligned access handling */
+#define ISR_EMAM_EXCEPTION     0x00000000      /* - generate exception */
+#define ISR_EMAM_FUDGE         0x00000001      /* - mask out invalid address bits */
+#define ISR_AEXC               0x00000004      /* accrued [overflow] exception */
+#define ISR_DTT                        0x00000018      /* division type trap */
+#define ISR_DTT_IGNORE         0x00000000      /* - ignore division error */
+#define ISR_DTT_DIVBYZERO      0x00000008      /* - generate exception */
+#define ISR_DTT_OVERFLOW       0x00000010      /* - record overflow */
+#define ISR_EDE                        0x00000020      /* enable division exception */
+#define ISR_PLI                        0x20000000      /* pre-load instruction information */
+#define ISR_QI                 0x80000000      /* quad data implementation information */
+
+/*
+ * EPCR0 - Exception PC Register
+ */
+#define EPCR0_V                        0x00000001      /* register content validity indicator */
+#define EPCR0_PC               0xfffffffc      /* faulting instruction address */
+
+/*
+ * ESR0/14/15 - Exception Status Register
+ */
+#define ESRx_VALID             0x00000001      /* register content validity indicator */
+#define ESRx_EC                        0x0000003e      /* exception type */
+#define ESRx_EC_DATA_STORE     0x00000000      /* - data_store_error */
+#define ESRx_EC_INSN_ACCESS    0x00000006      /* - instruction_access_error */
+#define ESRx_EC_PRIV_INSN      0x00000008      /* - privileged_instruction */
+#define ESRx_EC_ILL_INSN       0x0000000a      /* - illegal_instruction */
+#define ESRx_EC_MP_EXCEP       0x0000001c      /* - mp_exception */
+#define ESRx_EC_DATA_ACCESS    0x00000020      /* - data_access_error */
+#define ESRx_EC_DIVISION       0x00000026      /* - division_exception */
+#define ESRx_EC_ITLB_MISS      0x00000034      /* - instruction_access_TLB_miss */
+#define ESRx_EC_DTLB_MISS      0x00000036      /* - data_access_TLB_miss */
+#define ESRx_EC_DATA_ACCESS_DAT        0x0000003a      /* - data_access_DAT_exception */
+
+#define ESR0_IAEC              0x00000100      /* info for instruction-access-exception */
+#define ESR0_IAEC_RESV         0x00000000      /* - reserved */
+#define ESR0_IAEC_PROT_VIOL    0x00000100      /* - protection violation */
+
+#define ESR0_ATXC              0x00f00000      /* address translation exception code */
+#define ESR0_ATXC_MMU_MISS     0x00000000      /* - MMU miss exception and more (?) */
+#define ESR0_ATXC_MULTI_DAT    0x00800000      /* - multiple DAT entry hit */
+#define ESR0_ATXC_MULTI_SAT    0x00900000      /* - multiple SAT entry hit */
+#define ESR0_ATXC_AMRTLB_MISS  0x00a00000      /* - MMU/TLB miss exception */
+#define ESR0_ATXC_PRIV_EXCEP   0x00c00000      /* - privilege protection fault */
+#define ESR0_ATXC_WP_EXCEP     0x00d00000      /* - write protection fault */
+
+#define ESR0_EAV               0x00000800      /* true if EAR0 register valid */
+#define ESR15_EAV              0x00000800      /* true if EAR15 register valid */
+
+/*
+ * ESFR1 - Exception Status Valid Flag Register
+ */
+#define ESFR1_ESR0             0x00000001      /* true if ESR0 is valid */
+#define ESFR1_ESR14            0x00004000      /* true if ESR14 is valid */
+#define ESFR1_ESR15            0x00008000      /* true if ESR15 is valid */
+
+/*
+ * MSR - Media Status Register
+ */
+#define MSR0_AOVF              0x00000001      /* overflow exception accrued */
+#define MSRx_OVF               0x00000002      /* overflow exception detected */
+#define MSRx_SIE               0x0000003c      /* last SIMD instruction exception detected */
+#define MSRx_SIE_NONE          0x00000000      /* - none detected */
+#define MSRx_SIE_FRkHI_ACCk    0x00000020      /* - exception at FRkHI or ACCk */
+#define MSRx_SIE_FRkLO_ACCk1   0x00000010      /* - exception at FRkLO or ACCk+1 */
+#define MSRx_SIE_FRk1HI_ACCk2  0x00000008      /* - exception at FRk+1HI or ACCk+2 */
+#define MSRx_SIE_FRk1LO_ACCk3  0x00000004      /* - exception at FRk+1LO or ACCk+3 */
+#define MSR0_MTT               0x00007000      /* type of last media trap detected */
+#define MSR0_MTT_NONE          0x00000000      /* - none detected */
+#define MSR0_MTT_OVERFLOW      0x00001000      /* - overflow detected */
+#define MSR0_HI                        0x00c00000      /* hardware implementation */
+#define MSR0_HI_ROUNDING       0x00000000      /* - rounding mode */
+#define MSR0_HI_NONROUNDING    0x00c00000      /* - non-rounding mode */
+#define MSR0_EMCI              0x01000000      /* enable media custom instructions */
+#define MSR0_SRDAV             0x10000000      /* select rounding mode of MAVEH */
+#define MSR0_SRDAV_RDAV                0x00000000      /* - controlled by MSR.RDAV */
+#define MSR0_SRDAV_RD          0x10000000      /* - controlled by MSR.RD */
+#define MSR0_RDAV              0x20000000      /* rounding mode of MAVEH */
+#define MSR0_RDAV_NEAREST_MI   0x00000000      /* - round to nearest minus */
+#define MSR0_RDAV_NEAREST_PL   0x20000000      /* - round to nearest plus */
+#define MSR0_RD                        0xc0000000      /* rounding mode */
+#define MSR0_RD_NEAREST                0x00000000      /* - nearest */
+#define MSR0_RD_ZERO           0x40000000      /* - zero */
+#define MSR0_RD_POS_INF                0x80000000      /* - postive infinity */
+#define MSR0_RD_NEG_INF                0xc0000000      /* - negative infinity */
+
+/*
+ * IAMPR0-7 - Instruction Address Mapping Register
+ * DAMPR0-7 - Data Address Mapping Register
+ */
+#define xAMPRx_V               0x00000001      /* register content validity indicator */
+#define DAMPRx_WP              0x00000002      /* write protect */
+#define DAMPRx_WP_RW           0x00000000      /* - read/write */
+#define DAMPRx_WP_RO           0x00000002      /* - read-only */
+#define xAMPRx_C               0x00000004      /* cached/uncached */
+#define xAMPRx_C_CACHED                0x00000000      /* - cached */
+#define xAMPRx_C_UNCACHED      0x00000004      /* - uncached */
+#define xAMPRx_S               0x00000008      /* supervisor only */
+#define xAMPRx_S_USER          0x00000000      /* - userspace can access */
+#define xAMPRx_S_KERNEL                0x00000008      /* - kernel only */
+#define xAMPRx_SS              0x000000f0      /* segment size */
+#define xAMPRx_SS_16Kb         0x00000000      /* - 16 kilobytes */
+#define xAMPRx_SS_64Kb         0x00000010      /* - 64 kilobytes */
+#define xAMPRx_SS_256Kb                0x00000020      /* - 256 kilobytes */
+#define xAMPRx_SS_1Mb          0x00000030      /* - 1 megabyte */
+#define xAMPRx_SS_2Mb          0x00000040      /* - 2 megabytes */
+#define xAMPRx_SS_4Mb          0x00000050      /* - 4 megabytes */
+#define xAMPRx_SS_8Mb          0x00000060      /* - 8 megabytes */
+#define xAMPRx_SS_16Mb         0x00000070      /* - 16 megabytes */
+#define xAMPRx_SS_32Mb         0x00000080      /* - 32 megabytes */
+#define xAMPRx_SS_64Mb         0x00000090      /* - 64 megabytes */
+#define xAMPRx_SS_128Mb                0x000000a0      /* - 128 megabytes */
+#define xAMPRx_SS_256Mb                0x000000b0      /* - 256 megabytes */
+#define xAMPRx_SS_512Mb                0x000000c0      /* - 512 megabytes */
+#define xAMPRx_RESERVED8       0x00000100      /* reserved bit */
+#define xAMPRx_NG              0x00000200      /* non-global */
+#define xAMPRx_L               0x00000400      /* locked */
+#define xAMPRx_M               0x00000800      /* modified */
+#define xAMPRx_D               0x00001000      /* DAT entry */
+#define xAMPRx_RESERVED13      0x00002000      /* reserved bit */
+#define xAMPRx_PPFN            0xfff00000      /* physical page frame number */
+
+#define xAMPRx_V_BIT           0
+#define DAMPRx_WP_BIT          1
+#define xAMPRx_C_BIT           2
+#define xAMPRx_S_BIT           3
+#define xAMPRx_RESERVED8_BIT   8
+#define xAMPRx_NG_BIT          9
+#define xAMPRx_L_BIT           10
+#define xAMPRx_M_BIT           11
+#define xAMPRx_D_BIT           12
+#define xAMPRx_RESERVED13_BIT  13
+
+#define __get_IAMPR(R) ({ unsigned long x; asm volatile("movsg iampr"#R",%0" : "=r"(x)); x; })
+#define __get_DAMPR(R) ({ unsigned long x; asm volatile("movsg dampr"#R",%0" : "=r"(x)); x; })
+
+#define __get_IAMLR(R) ({ unsigned long x; asm volatile("movsg iamlr"#R",%0" : "=r"(x)); x; })
+#define __get_DAMLR(R) ({ unsigned long x; asm volatile("movsg damlr"#R",%0" : "=r"(x)); x; })
+
+#define __set_IAMPR(R,V)       do { asm volatile("movgs %0,iampr"#R : : "r"(V)); } while(0)
+#define __set_DAMPR(R,V)       do { asm volatile("movgs %0,dampr"#R : : "r"(V)); } while(0)
+
+#define __set_IAMLR(R,V)       do { asm volatile("movgs %0,iamlr"#R : : "r"(V)); } while(0)
+#define __set_DAMLR(R,V)       do { asm volatile("movgs %0,damlr"#R : : "r"(V)); } while(0)
+
+#define save_dampr(R, _dampr)                                  \
+do {                                                           \
+       asm volatile("movsg dampr"R",%0" : "=r"(_dampr));       \
+} while(0)
+
+#define restore_dampr(R, _dampr)                       \
+do {                                                   \
+       asm volatile("movgs %0,dampr"R :: "r"(_dampr)); \
+} while(0)
+
+/*
+ * AMCR - Address Mapping Control Register
+ */
+#define AMCR_IAMRN             0x000000ff      /* quantity of IAMPR registers */
+#define AMCR_DAMRN             0x0000ff00      /* quantity of DAMPR registers */
+
+/*
+ * TTBR - Address Translation Table Base Register
+ */
+#define __get_TTBR()           ({ unsigned long x; asm volatile("movsg ttbr,%0" : "=r"(x)); x; })
+
+/*
+ * TPXR - TLB Probe Extend Register
+ */
+#define TPXR_E                 0x00000001
+#define TPXR_LMAX_SHIFT                20
+#define TPXR_LMAX_SMASK                0xf
+#define TPXR_WMAX_SHIFT                24
+#define TPXR_WMAX_SMASK                0xf
+#define TPXR_WAY_SHIFT         28
+#define TPXR_WAY_SMASK         0xf
+
+/*
+ * DCR - Debug Control Register
+ */
+#define DCR_IBCE3              0x00000001      /* break on conditional insn pointed to by IBAR3 */
+#define DCR_IBE3               0x00000002      /* break on insn pointed to by IBAR3 */
+#define DCR_IBCE1              0x00000004      /* break on conditional insn pointed to by IBAR2 */
+#define DCR_IBE1               0x00000008      /* break on insn pointed to by IBAR2 */
+#define DCR_IBCE2              0x00000010      /* break on conditional insn pointed to by IBAR1 */
+#define DCR_IBE2               0x00000020      /* break on insn pointed to by IBAR1 */
+#define DCR_IBCE0              0x00000040      /* break on conditional insn pointed to by IBAR0 */
+#define DCR_IBE0               0x00000080      /* break on insn pointed to by IBAR0 */
+
+#define DCR_DDBE1              0x00004000      /* use DBDR1x when checking DBAR1 */
+#define DCR_DWBE1              0x00008000      /* break on store to address in DBAR1/DBMR1x */
+#define DCR_DRBE1              0x00010000      /* break on load from address in DBAR1/DBMR1x */
+#define DCR_DDBE0              0x00020000      /* use DBDR0x when checking DBAR0 */
+#define DCR_DWBE0              0x00040000      /* break on store to address in DBAR0/DBMR0x */
+#define DCR_DRBE0              0x00080000      /* break on load from address in DBAR0/DBMR0x */
+
+#define DCR_EIM                        0x0c000000      /* external interrupt disable */
+#define DCR_IBM                        0x10000000      /* instruction break disable */
+#define DCR_SE                 0x20000000      /* single step enable */
+#define DCR_EBE                        0x40000000      /* exception break enable */
+
+/*
+ * BRR - Break Interrupt Request Register
+ */
+#define BRR_ST                 0x00000001      /* single-step detected */
+#define BRR_SB                 0x00000002      /* break instruction detected */
+#define BRR_BB                 0x00000004      /* branch with hint detected */
+#define BRR_CBB                        0x00000008      /* branch to LR detected */
+#define BRR_IBx                        0x000000f0      /* hardware breakpoint detected */
+#define BRR_DBx                        0x00000f00      /* hardware watchpoint detected */
+#define BRR_DBNEx              0x0000f000      /* ? */
+#define BRR_EBTT               0x00ff0000      /* trap type of exception break */
+#define BRR_TB                 0x10000000      /* external break request detected */
+#define BRR_CB                 0x20000000      /* ICE break command detected */
+#define BRR_EB                 0x40000000      /* exception break detected */
+
+/*
+ * BPSR - Break PSR Save Register
+ */
+#define BPSR_BET               0x00000001      /* former PSR.ET */
+#define BPSR_BS                        0x00001000      /* former PSR.S */
+
+#endif /* _ASM_SPR_REGS_H */
diff --git a/arch/frv/include/asm/stat.h b/arch/frv/include/asm/stat.h
new file mode 100644 (file)
index 0000000..ce56de9
--- /dev/null
@@ -0,0 +1,100 @@
+#ifndef _ASM_STAT_H
+#define _ASM_STAT_H
+
+struct __old_kernel_stat {
+       unsigned short st_dev;
+       unsigned short st_ino;
+       unsigned short st_mode;
+       unsigned short st_nlink;
+       unsigned short st_uid;
+       unsigned short st_gid;
+       unsigned short st_rdev;
+       unsigned long  st_size;
+       unsigned long  st_atime;
+       unsigned long  st_mtime;
+       unsigned long  st_ctime;
+};
+
+/* This matches struct stat in uClibc/glibc.  */
+struct stat {
+       unsigned char __pad1[6];
+       unsigned short st_dev;
+
+       unsigned long __pad2;
+       unsigned long st_ino;
+
+       unsigned short __pad3;
+       unsigned short st_mode;
+       unsigned short __pad4;
+       unsigned short st_nlink;
+
+       unsigned short __pad5;
+       unsigned short st_uid;
+       unsigned short __pad6;
+       unsigned short st_gid;
+
+       unsigned char __pad7[6];
+       unsigned short st_rdev;
+
+       unsigned long __pad8;
+       unsigned long st_size;
+
+       unsigned long __pad9;           /* align 64-bit st_blocks to 2-word */
+       unsigned long st_blksize;
+
+       unsigned long __pad10;  /* future possible st_blocks high bits */
+       unsigned long st_blocks;        /* Number 512-byte blocks allocated. */
+
+       unsigned long __unused1;
+       unsigned long st_atime;
+
+       unsigned long __unused2;
+       unsigned long st_mtime;
+
+       unsigned long __unused3;
+       unsigned long st_ctime;
+
+       unsigned long long __unused4;
+};
+
+/* This matches struct stat64 in uClibc/glibc.  The layout is exactly
+   the same as that of struct stat above, with 64-bit types taking up
+   space that was formerly used by padding.  stat syscalls are still
+   different from stat64, though, in that the former tests for
+   overflow.  */
+struct stat64 {
+       unsigned char __pad1[6];
+       unsigned short st_dev;
+
+       unsigned long long st_ino;
+
+       unsigned int st_mode;
+       unsigned int st_nlink;
+
+       unsigned long st_uid;
+       unsigned long st_gid;
+
+       unsigned char __pad2[6];
+       unsigned short st_rdev;
+
+       long long st_size;
+
+       unsigned long __pad3;           /* align 64-bit st_blocks to 2-word */
+       unsigned long st_blksize;
+
+       unsigned long __pad4;           /* future possible st_blocks high bits */
+       unsigned long st_blocks;        /* Number 512-byte blocks allocated. */
+
+       unsigned long st_atime_nsec;
+       unsigned long st_atime;
+
+       unsigned int st_mtime_nsec;
+       unsigned long st_mtime;
+
+       unsigned long st_ctime_nsec;
+       unsigned long st_ctime;
+
+       unsigned long long __unused4;
+};
+
+#endif /* _ASM_STAT_H */
diff --git a/arch/frv/include/asm/statfs.h b/arch/frv/include/asm/statfs.h
new file mode 100644 (file)
index 0000000..741f586
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _ASM_STATFS_H
+#define _ASM_STATFS_H
+
+#include <asm-generic/statfs.h>
+
+#endif /* _ASM_STATFS_H */
+
diff --git a/arch/frv/include/asm/string.h b/arch/frv/include/asm/string.h
new file mode 100644 (file)
index 0000000..5ed310f
--- /dev/null
@@ -0,0 +1,51 @@
+/* string.h: FRV string handling
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_STRING_H_
+#define _ASM_STRING_H_
+
+#ifdef __KERNEL__ /* only set these up for kernel code */
+
+#define __HAVE_ARCH_MEMSET 1
+#define __HAVE_ARCH_MEMCPY 1
+
+extern void *memset(void *, int, __kernel_size_t);
+extern void *memcpy(void *, const void *, __kernel_size_t);
+
+#else /* KERNEL */
+
+/*
+ *     let user libraries deal with these,
+ *     IMHO the kernel has no place defining these functions for user apps
+ */
+
+#define __HAVE_ARCH_STRCPY 1
+#define __HAVE_ARCH_STRNCPY 1
+#define __HAVE_ARCH_STRCAT 1
+#define __HAVE_ARCH_STRNCAT 1
+#define __HAVE_ARCH_STRCMP 1
+#define __HAVE_ARCH_STRNCMP 1
+#define __HAVE_ARCH_STRNICMP 1
+#define __HAVE_ARCH_STRCHR 1
+#define __HAVE_ARCH_STRRCHR 1
+#define __HAVE_ARCH_STRSTR 1
+#define __HAVE_ARCH_STRLEN 1
+#define __HAVE_ARCH_STRNLEN 1
+#define __HAVE_ARCH_MEMSET 1
+#define __HAVE_ARCH_MEMCPY 1
+#define __HAVE_ARCH_MEMMOVE 1
+#define __HAVE_ARCH_MEMSCAN 1
+#define __HAVE_ARCH_MEMCMP 1
+#define __HAVE_ARCH_MEMCHR 1
+#define __HAVE_ARCH_STRTOK 1
+
+#endif /* KERNEL */
+#endif /* _ASM_STRING_H_ */
diff --git a/arch/frv/include/asm/suspend.h b/arch/frv/include/asm/suspend.h
new file mode 100644 (file)
index 0000000..5fa7b5a
--- /dev/null
@@ -0,0 +1,20 @@
+/* suspend.h: suspension stuff
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SUSPEND_H
+#define _ASM_SUSPEND_H
+
+static inline int arch_prepare_suspend(void)
+{
+       return 0;
+}
+
+#endif /* _ASM_SUSPEND_H */
diff --git a/arch/frv/include/asm/swab.h b/arch/frv/include/asm/swab.h
new file mode 100644 (file)
index 0000000..f305834
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef _ASM_SWAB_H
+#define _ASM_SWAB_H
+
+#include <linux/types.h>
+
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#  define __SWAB_64_THRU_32__
+#endif
+
+#endif /* _ASM_SWAB_H */
diff --git a/arch/frv/include/asm/system.h b/arch/frv/include/asm/system.h
new file mode 100644 (file)
index 0000000..7742ec0
--- /dev/null
@@ -0,0 +1,301 @@
+/* system.h: FR-V CPU control definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_SYSTEM_H
+#define _ASM_SYSTEM_H
+
+#include <linux/types.h>
+#include <linux/linkage.h>
+#include <linux/kernel.h>
+
+struct thread_struct;
+
+/*
+ * switch_to(prev, next) should switch from task `prev' to `next'
+ * `prev' will never be the same as `next'.
+ * The `mb' is to tell GCC not to cache `current' across this call.
+ */
+extern asmlinkage
+struct task_struct *__switch_to(struct thread_struct *prev_thread,
+                               struct thread_struct *next_thread,
+                               struct task_struct *prev);
+
+#define switch_to(prev, next, last)                                    \
+do {                                                                   \
+       (prev)->thread.sched_lr =                                       \
+               (unsigned long) __builtin_return_address(0);            \
+       (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
+       mb();                                                           \
+} while(0)
+
+/*
+ * interrupt flag manipulation
+ * - use virtual interrupt management since touching the PSR is slow
+ *   - ICC2.Z: T if interrupts virtually disabled
+ *   - ICC2.C: F if interrupts really disabled
+ * - if Z==1 upon interrupt:
+ *   - C is set to 0
+ *   - interrupts are really disabled
+ *   - entry.S returns immediately
+ * - uses TIHI (TRAP if Z==0 && C==0) #2 to really reenable interrupts
+ *   - if taken, the trap:
+ *     - sets ICC2.C
+ *     - enables interrupts
+ */
+#define local_irq_disable()                                    \
+do {                                                           \
+       /* set Z flag, but don't change the C flag */           \
+       asm volatile("  andcc   gr0,gr0,gr0,icc2        \n"     \
+                    :                                          \
+                    :                                          \
+                    : "memory", "icc2"                         \
+                    );                                         \
+} while(0)
+
+#define local_irq_enable()                                     \
+do {                                                           \
+       /* clear Z flag and then test the C flag */             \
+       asm volatile("  oricc   gr0,#1,gr0,icc2         \n"     \
+                    "  tihi    icc2,gr0,#2             \n"     \
+                    :                                          \
+                    :                                          \
+                    : "memory", "icc2"                         \
+                    );                                         \
+} while(0)
+
+#define local_save_flags(flags)                                        \
+do {                                                           \
+       typecheck(unsigned long, flags);                        \
+       asm volatile("movsg ccr,%0"                             \
+                    : "=r"(flags)                              \
+                    :                                          \
+                    : "memory");                               \
+                                                               \
+       /* shift ICC2.Z to bit 0 */                             \
+       flags >>= 26;                                           \
+                                                               \
+       /* make flags 1 if interrupts disabled, 0 otherwise */  \
+       flags &= 1UL;                                           \
+} while(0)
+
+#define irqs_disabled() \
+       ({unsigned long flags; local_save_flags(flags); !!flags; })
+
+#define        local_irq_save(flags)                   \
+do {                                           \
+       typecheck(unsigned long, flags);        \
+       local_save_flags(flags);                \
+       local_irq_disable();                    \
+} while(0)
+
+#define        local_irq_restore(flags)                                        \
+do {                                                                   \
+       typecheck(unsigned long, flags);                                \
+                                                                       \
+       /* load the Z flag by turning 1 if disabled into 0 if disabled  \
+        * and thus setting the Z flag but not the C flag */            \
+       asm volatile("  xoricc  %0,#1,gr0,icc2          \n"             \
+                    /* then test Z=0 and C=0 */                        \
+                    "  tihi    icc2,gr0,#2             \n"             \
+                    :                                                  \
+                    : "r"(flags)                                       \
+                    : "memory", "icc2"                                 \
+                    );                                                 \
+                                                                       \
+} while(0)
+
+/*
+ * real interrupt flag manipulation
+ */
+#define __local_irq_disable()                          \
+do {                                                   \
+       unsigned long psr;                              \
+       asm volatile("  movsg   psr,%0          \n"     \
+                    "  andi    %0,%2,%0        \n"     \
+                    "  ori     %0,%1,%0        \n"     \
+                    "  movgs   %0,psr          \n"     \
+                    : "=r"(psr)                        \
+                    : "i" (PSR_PIL_14), "i" (~PSR_PIL) \
+                    : "memory");                       \
+} while(0)
+
+#define __local_irq_enable()                           \
+do {                                                   \
+       unsigned long psr;                              \
+       asm volatile("  movsg   psr,%0          \n"     \
+                    "  andi    %0,%1,%0        \n"     \
+                    "  movgs   %0,psr          \n"     \
+                    : "=r"(psr)                        \
+                    : "i" (~PSR_PIL)                   \
+                    : "memory");                       \
+} while(0)
+
+#define __local_save_flags(flags)              \
+do {                                           \
+       typecheck(unsigned long, flags);        \
+       asm("movsg psr,%0"                      \
+           : "=r"(flags)                       \
+           :                                   \
+           : "memory");                        \
+} while(0)
+
+#define        __local_irq_save(flags)                         \
+do {                                                   \
+       unsigned long npsr;                             \
+       typecheck(unsigned long, flags);                \
+       asm volatile("  movsg   psr,%0          \n"     \
+                    "  andi    %0,%3,%1        \n"     \
+                    "  ori     %1,%2,%1        \n"     \
+                    "  movgs   %1,psr          \n"     \
+                    : "=r"(flags), "=r"(npsr)          \
+                    : "i" (PSR_PIL_14), "i" (~PSR_PIL) \
+                    : "memory");                       \
+} while(0)
+
+#define        __local_irq_restore(flags)                      \
+do {                                                   \
+       typecheck(unsigned long, flags);                \
+       asm volatile("  movgs   %0,psr          \n"     \
+                    :                                  \
+                    : "r" (flags)                      \
+                    : "memory");                       \
+} while(0)
+
+#define __irqs_disabled() \
+       ((__get_PSR() & PSR_PIL) >= PSR_PIL_14)
+
+/*
+ * Force strict CPU ordering.
+ */
+#define nop()                  asm volatile ("nop"::)
+#define mb()                   asm volatile ("membar" : : :"memory")
+#define rmb()                  asm volatile ("membar" : : :"memory")
+#define wmb()                  asm volatile ("membar" : : :"memory")
+#define read_barrier_depends() do { } while (0)
+
+#ifdef CONFIG_SMP
+#define smp_mb()                       mb()
+#define smp_rmb()                      rmb()
+#define smp_wmb()                      wmb()
+#define smp_read_barrier_depends()     read_barrier_depends()
+#define set_mb(var, value) \
+       do { xchg(&var, (value)); } while (0)
+#else
+#define smp_mb()                       barrier()
+#define smp_rmb()                      barrier()
+#define smp_wmb()                      barrier()
+#define smp_read_barrier_depends()     do {} while(0)
+#define set_mb(var, value) \
+       do { var = (value); barrier(); } while (0)
+#endif
+
+extern void die_if_kernel(const char *, ...) __attribute__((format(printf, 1, 2)));
+extern void free_initmem(void);
+
+#define arch_align_stack(x) (x)
+
+/*****************************************************************************/
+/*
+ * compare and conditionally exchange value with memory
+ * - if (*ptr == test) then orig = *ptr; *ptr = test;
+ * - if (*ptr != test) then orig = *ptr;
+ */
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+
+#define cmpxchg(ptr, test, new)                                                        \
+({                                                                             \
+       __typeof__(ptr) __xg_ptr = (ptr);                                       \
+       __typeof__(*(ptr)) __xg_orig, __xg_tmp;                                 \
+       __typeof__(*(ptr)) __xg_test = (test);                                  \
+       __typeof__(*(ptr)) __xg_new = (new);                                    \
+                                                                               \
+       switch (sizeof(__xg_orig)) {                                            \
+       case 4:                                                                 \
+               asm volatile(                                                   \
+                       "0:                                             \n"     \
+                       "       orcc            gr0,gr0,gr0,icc3        \n"     \
+                       "       ckeq            icc3,cc7                \n"     \
+                       "       ld.p            %M0,%1                  \n"     \
+                       "       orcr            cc7,cc7,cc3             \n"     \
+                       "       sub%I4cc        %1,%4,%2,icc0           \n"     \
+                       "       bne             icc0,#0,1f              \n"     \
+                       "       cst.p           %3,%M0          ,cc3,#1 \n"     \
+                       "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     \
+                       "       beq             icc3,#0,0b              \n"     \
+                       "1:                                             \n"     \
+                       : "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp)    \
+                       : "r"(__xg_new), "NPr"(__xg_test)                       \
+                       : "memory", "cc7", "cc3", "icc3", "icc0"                \
+                       );                                                      \
+               break;                                                          \
+                                                                               \
+       default:                                                                \
+               __xg_orig = (__typeof__(__xg_orig))0;                           \
+               asm volatile("break");                                          \
+               break;                                                          \
+       }                                                                       \
+                                                                               \
+       __xg_orig;                                                              \
+})
+
+#else
+
+extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
+
+#define cmpxchg(ptr, test, new)                                                        \
+({                                                                             \
+       __typeof__(ptr) __xg_ptr = (ptr);                                       \
+       __typeof__(*(ptr)) __xg_orig;                                           \
+       __typeof__(*(ptr)) __xg_test = (test);                                  \
+       __typeof__(*(ptr)) __xg_new = (new);                                    \
+                                                                               \
+       switch (sizeof(__xg_orig)) {                                            \
+       case 4: __xg_orig = (__force __typeof__(*ptr))                          \
+                       __cmpxchg_32((__force uint32_t *)__xg_ptr,              \
+                                        (__force uint32_t)__xg_test,           \
+                                        (__force uint32_t)__xg_new); break;    \
+       default:                                                                \
+               __xg_orig = (__typeof__(__xg_orig))0;                           \
+               asm volatile("break");                                          \
+               break;                                                          \
+       }                                                                       \
+                                                                               \
+       __xg_orig;                                                              \
+})
+
+#endif
+
+#include <asm-generic/cmpxchg-local.h>
+
+static inline unsigned long __cmpxchg_local(volatile void *ptr,
+                                     unsigned long old,
+                                     unsigned long new, int size)
+{
+       switch (size) {
+       case 4:
+               return cmpxchg((unsigned long *)ptr, old, new);
+       default:
+               return __cmpxchg_local_generic(ptr, old, new, size);
+       }
+
+       return old;
+}
+
+/*
+ * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
+ * them available.
+ */
+#define cmpxchg_local(ptr, o, n)                                       \
+       ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
+                       (unsigned long)(n), sizeof(*(ptr))))
+#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
+
+#endif /* _ASM_SYSTEM_H */
diff --git a/arch/frv/include/asm/termbits.h b/arch/frv/include/asm/termbits.h
new file mode 100644 (file)
index 0000000..5568492
--- /dev/null
@@ -0,0 +1,202 @@
+#ifndef _ASM_TERMBITS_H__
+#define _ASM_TERMBITS_H__
+
+#include <linux/posix_types.h>
+
+typedef unsigned char  cc_t;
+typedef unsigned int   speed_t;
+typedef unsigned int   tcflag_t;
+
+#define NCCS 19
+struct termios {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+};
+
+struct termios2 {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+       speed_t c_ispeed;               /* input speed */
+       speed_t c_ospeed;               /* output speed */
+};
+
+struct ktermios {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+       speed_t c_ispeed;               /* input speed */
+       speed_t c_ospeed;               /* output speed */
+};
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
+
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK  0000020
+#define ISTRIP 0000040
+#define INLCR  0000100
+#define IGNCR  0000200
+#define ICRNL  0000400
+#define IUCLC  0001000
+#define IXON   0002000
+#define IXANY  0004000
+#define IXOFF  0010000
+#define IMAXBEL        0020000
+#define IUTF8  0040000
+
+/* c_oflag bits */
+#define OPOST  0000001
+#define OLCUC  0000002
+#define ONLCR  0000004
+#define OCRNL  0000010
+#define ONOCR  0000020
+#define ONLRET 0000040
+#define OFILL  0000100
+#define OFDEL  0000200
+#define NLDLY  0000400
+#define   NL0  0000000
+#define   NL1  0000400
+#define CRDLY  0003000
+#define   CR0  0000000
+#define   CR1  0001000
+#define   CR2  0002000
+#define   CR3  0003000
+#define TABDLY 0014000
+#define   TAB0 0000000
+#define   TAB1 0004000
+#define   TAB2 0010000
+#define   TAB3 0014000
+#define   XTABS        0014000
+#define BSDLY  0020000
+#define   BS0  0000000
+#define   BS1  0020000
+#define VTDLY  0040000
+#define   VT0  0000000
+#define   VT1  0040000
+#define FFDLY  0100000
+#define   FF0  0000000
+#define   FF1  0100000
+
+/* c_cflag bit meaning */
+#define CBAUD  0010017
+#define  B0    0000000         /* hang up */
+#define  B50   0000001
+#define  B75   0000002
+#define  B110  0000003
+#define  B134  0000004
+#define  B150  0000005
+#define  B200  0000006
+#define  B300  0000007
+#define  B600  0000010
+#define  B1200 0000011
+#define  B1800 0000012
+#define  B2400 0000013
+#define  B4800 0000014
+#define  B9600 0000015
+#define  B19200        0000016
+#define  B38400        0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CSIZE  0000060
+#define   CS5  0000000
+#define   CS6  0000020
+#define   CS7  0000040
+#define   CS8  0000060
+#define CSTOPB 0000100
+#define CREAD  0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL  0002000
+#define CLOCAL 0004000
+#define CBAUDEX 0010000
+#define    BOTHER 0010000
+#define    B57600 0010001
+#define   B115200 0010002
+#define   B230400 0010003
+#define   B460800 0010004
+#define   B500000 0010005
+#define   B576000 0010006
+#define   B921600 0010007
+#define  B1000000 0010010
+#define  B1152000 0010011
+#define  B1500000 0010012
+#define  B2000000 0010013
+#define  B2500000 0010014
+#define  B3000000 0010015
+#define  B3500000 0010016
+#define  B4000000 0010017
+#define CIBAUD   002003600000          /* Input baud rate */
+#define CTVB     004000000000          /* VisioBraille Terminal flow control */
+#define CMSPAR   010000000000          /* mark or space (stick) parity */
+#define CRTSCTS          020000000000          /* flow control */
+
+#define IBSHIFT        16                      /* Shift from CBAUD to CIBAUD */
+
+/* c_lflag bits */
+#define ISIG   0000001
+#define ICANON 0000002
+#define XCASE  0000004
+#define ECHO   0000010
+#define ECHOE  0000020
+#define ECHOK  0000040
+#define ECHONL 0000100
+#define NOFLSH 0000200
+#define TOSTOP 0000400
+#define ECHOCTL        0001000
+#define ECHOPRT        0002000
+#define ECHOKE 0004000
+#define FLUSHO 0010000
+#define PENDIN 0040000
+#define IEXTEN 0100000
+
+
+/* tcflow() and TCXONC use these */
+#define        TCOOFF          0
+#define        TCOON           1
+#define        TCIOFF          2
+#define        TCION           3
+
+/* tcflush() and TCFLSH use these */
+#define        TCIFLUSH        0
+#define        TCOFLUSH        1
+#define        TCIOFLUSH       2
+
+/* tcsetattr uses these */
+#define        TCSANOW         0
+#define        TCSADRAIN       1
+#define        TCSAFLUSH       2
+
+#endif /* _ASM_TERMBITS_H__ */
+
diff --git a/arch/frv/include/asm/termios.h b/arch/frv/include/asm/termios.h
new file mode 100644 (file)
index 0000000..a62fb58
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef _ASM_TERMIOS_H
+#define _ASM_TERMIOS_H
+
+#include <asm/termbits.h>
+#include <asm/ioctls.h>
+
+struct winsize {
+       unsigned short ws_row;
+       unsigned short ws_col;
+       unsigned short ws_xpixel;
+       unsigned short ws_ypixel;
+};
+
+#define NCC 8
+struct termio {
+       unsigned short c_iflag;         /* input mode flags */
+       unsigned short c_oflag;         /* output mode flags */
+       unsigned short c_cflag;         /* control mode flags */
+       unsigned short c_lflag;         /* local mode flags */
+       unsigned char c_line;           /* line discipline */
+       unsigned char c_cc[NCC];        /* control characters */
+};
+
+#ifdef __KERNEL__
+/*     intr=^C         quit=^|         erase=del       kill=^U
+       eof=^D          vtime=\0        vmin=\1         sxtc=\0
+       start=^Q        stop=^S         susp=^Z         eol=\0
+       reprint=^R      discard=^U      werase=^W       lnext=^V
+       eol2=\0
+*/
+#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
+#endif
+
+/* modem lines */
+#define TIOCM_LE       0x001
+#define TIOCM_DTR      0x002
+#define TIOCM_RTS      0x004
+#define TIOCM_ST       0x008
+#define TIOCM_SR       0x010
+#define TIOCM_CTS      0x020
+#define TIOCM_CAR      0x040
+#define TIOCM_RNG      0x080
+#define TIOCM_DSR      0x100
+#define TIOCM_CD       TIOCM_CAR
+#define TIOCM_RI       TIOCM_RNG
+#define TIOCM_OUT1     0x2000
+#define TIOCM_OUT2     0x4000
+#define TIOCM_LOOP     0x8000
+
+#define TIOCM_MODEM_BITS       TIOCM_OUT2      /* IRDA support */
+
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+
+#ifdef __KERNEL__
+#include <asm-generic/termios.h>
+#endif
+
+#endif /* _ASM_TERMIOS_H */
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h
new file mode 100644 (file)
index 0000000..bb53ab7
--- /dev/null
@@ -0,0 +1,144 @@
+/* thread_info.h: description
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * Derived from include/asm-i386/thread_info.h
+ *
+ * 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.
+ */
+
+#ifndef _ASM_THREAD_INFO_H
+#define _ASM_THREAD_INFO_H
+
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+#include <asm/processor.h>
+#endif
+
+#define THREAD_SIZE            8192
+
+/*
+ * low level task data that entry.S needs immediate access to
+ * - this struct should fit entirely inside of one cache line
+ * - this struct shares the supervisor stack pages
+ * - if the contents of this structure are changed, the assembly constants must also be changed
+ */
+#ifndef __ASSEMBLY__
+
+struct thread_info {
+       struct task_struct      *task;          /* main task structure */
+       struct exec_domain      *exec_domain;   /* execution domain */
+       unsigned long           flags;          /* low level flags */
+       unsigned long           status;         /* thread-synchronous flags */
+       __u32                   cpu;            /* current CPU */
+       int                     preempt_count;  /* 0 => preemptable, <0 => BUG */
+
+       mm_segment_t            addr_limit;     /* thread address space:
+                                                * 0-0xBFFFFFFF for user-thead
+                                                * 0-0xFFFFFFFF for kernel-thread
+                                                */
+       struct restart_block    restart_block;
+
+       __u8                    supervisor_stack[0];
+};
+
+#else /* !__ASSEMBLY__ */
+
+#include <asm/asm-offsets.h>
+
+#endif
+
+#define PREEMPT_ACTIVE         0x10000000
+
+/*
+ * macros/functions for gaining access to the thread information structure
+ *
+ * preempt_count needs to be 1 initially, until the scheduler is functional.
+ */
+#ifndef __ASSEMBLY__
+
+#define INIT_THREAD_INFO(tsk)                  \
+{                                              \
+       .task           = &tsk,                 \
+       .exec_domain    = &default_exec_domain, \
+       .flags          = 0,                    \
+       .cpu            = 0,                    \
+       .preempt_count  = 1,                    \
+       .addr_limit     = KERNEL_DS,            \
+       .restart_block = {                      \
+               .fn = do_no_restart_syscall,    \
+       },                                      \
+}
+
+#define init_thread_info       (init_thread_union.thread_info)
+#define init_stack             (init_thread_union.stack)
+
+/* how to get the thread information struct from C */
+register struct thread_info *__current_thread_info asm("gr15");
+
+#define current_thread_info() ({ __current_thread_info; })
+
+#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
+
+/* thread information allocation */
+#ifdef CONFIG_DEBUG_STACK_USAGE
+#define alloc_thread_info(tsk)                                 \
+       ({                                                      \
+               struct thread_info *ret;                        \
+                                                               \
+               ret = kzalloc(THREAD_SIZE, GFP_KERNEL);         \
+                                                               \
+               ret;                                            \
+       })
+#else
+#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#endif
+
+#define free_thread_info(info) kfree(info)
+
+#endif /* __ASSEMBLY__ */
+
+/*
+ * thread information flags
+ * - these are process state flags that various assembly files may need to access
+ * - pending work-to-be-done flags are in LSW
+ * - other flags in MSW
+ */
+#define TIF_SYSCALL_TRACE      0       /* syscall trace active */
+#define TIF_SIGPENDING         1       /* signal pending */
+#define TIF_NEED_RESCHED       2       /* rescheduling necessary */
+#define TIF_SINGLESTEP         3       /* restore singlestep on return to user mode */
+#define TIF_IRET               4       /* return with iret */
+#define TIF_RESTORE_SIGMASK    5       /* restore signal mask in do_signal() */
+#define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
+#define TIF_MEMDIE             17      /* OOM killer killed process */
+#define TIF_FREEZE             18      /* freezing for suspend */
+
+#define _TIF_SYSCALL_TRACE     (1 << TIF_SYSCALL_TRACE)
+#define _TIF_SIGPENDING                (1 << TIF_SIGPENDING)
+#define _TIF_NEED_RESCHED      (1 << TIF_NEED_RESCHED)
+#define _TIF_SINGLESTEP                (1 << TIF_SINGLESTEP)
+#define _TIF_IRET              (1 << TIF_IRET)
+#define _TIF_RESTORE_SIGMASK   (1 << TIF_RESTORE_SIGMASK)
+#define _TIF_POLLING_NRFLAG    (1 << TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE            (1 << TIF_FREEZE)
+
+#define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
+#define _TIF_ALLWORK_MASK      0x0000FFFF      /* work to do on any return to u-space */
+
+/*
+ * Thread-synchronous status.
+ *
+ * This is different from the flags in that nobody else
+ * ever touches our thread-synchronous status, so we don't
+ * have to worry about atomic accesses.
+ */
+#define TS_USEDFPM             0x0001  /* FPU/Media was used by this task this quantum (SMP) */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_THREAD_INFO_H */
diff --git a/arch/frv/include/asm/timer-regs.h b/arch/frv/include/asm/timer-regs.h
new file mode 100644 (file)
index 0000000..6c5a871
--- /dev/null
@@ -0,0 +1,106 @@
+/* timer-regs.h: hardware timer register definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_TIMER_REGS_H
+#define _ASM_TIMER_REGS_H
+
+#include <asm/sections.h>
+
+extern unsigned long __nongprelbss __clkin_clock_speed_HZ;
+extern unsigned long __nongprelbss __ext_bus_clock_speed_HZ;
+extern unsigned long __nongprelbss __res_bus_clock_speed_HZ;
+extern unsigned long __nongprelbss __sdram_clock_speed_HZ;
+extern unsigned long __nongprelbss __core_bus_clock_speed_HZ;
+extern unsigned long __nongprelbss __core_clock_speed_HZ;
+extern unsigned long __nongprelbss __dsu_clock_speed_HZ;
+extern unsigned long __nongprelbss __serial_clock_speed_HZ;
+
+#define __get_CLKC()   ({ *(volatile unsigned long *)(0xfeff9a00); })
+
+static inline void __set_CLKC(unsigned long v)
+{
+       int tmp;
+
+       asm volatile("  st%I0.p %2,%M0          \n"
+                    "  setlos  %3,%1           \n"
+                    "  membar                  \n"
+                    "0:                        \n"
+                    "  subicc  %1,#1,%1,icc0   \n"
+                    "  bnc     icc0,#1,0b      \n"
+                    : "=m"(*(volatile unsigned long *) 0xfeff9a00), "=r"(tmp)
+                    : "r"(v), "i"(256)
+                    : "icc0");
+}
+
+#define __get_TCTR()   ({ *(volatile unsigned long *)(0xfeff9418); })
+#define __get_TPRV()   ({ *(volatile unsigned long *)(0xfeff9420); })
+#define __get_TPRCKSL()        ({ *(volatile unsigned long *)(0xfeff9428); })
+#define __get_TCSR(T)  ({ *(volatile unsigned long *)(0xfeff9400 + 8 * (T)); })
+#define __get_TxCKSL(T)        ({ *(volatile unsigned long *)(0xfeff9430 + 8 * (T)); })
+
+#define __get_TCSR_DATA(T) ({ __get_TCSR(T) >> 24; })
+
+#define __set_TCTR(V)  do { *(volatile unsigned long *)(0xfeff9418) = (V); mb(); } while(0)
+#define __set_TPRV(V)  do { *(volatile unsigned long *)(0xfeff9420) = (V) << 24; mb(); } while(0)
+#define __set_TPRCKSL(V) do { *(volatile unsigned long *)(0xfeff9428) = (V); mb(); } while(0)
+#define __set_TCSR(T,V)        \
+do { *(volatile unsigned long *)(0xfeff9400 + 8 * (T)) = (V); mb(); } while(0)
+
+#define __set_TxCKSL(T,V) \
+do { *(volatile unsigned long *)(0xfeff9430 + 8 * (T)) = (V); mb(); } while(0)
+
+#define __set_TCSR_DATA(T,V) __set_TCSR(T, (V) << 24)
+#define __set_TxCKSL_DATA(T,V) __set_TxCKSL(T, TxCKSL_EIGHT | __TxCKSL_SELECT((V)))
+
+/* clock control register */
+#define CLKC_CMODE             0x0f000000
+#define CLKC_SLPL              0x000f0000
+#define CLKC_P0                        0x00000100
+#define CLKC_CM                        0x00000003
+
+#define CLKC_CMODE_s           24
+
+/* timer control register - non-readback mode */
+#define TCTR_MODE_0            0x00000000
+#define TCTR_MODE_2            0x04000000
+#define TCTR_MODE_4            0x08000000
+#define TCTR_MODE_5            0x0a000000
+#define TCTR_RL_LATCH          0x00000000
+#define TCTR_RL_RW_LOW8                0x10000000
+#define TCTR_RL_RW_HIGH8       0x20000000
+#define TCTR_RL_RW_LH8         0x30000000
+#define TCTR_SC_CTR0           0x00000000
+#define TCTR_SC_CTR1           0x40000000
+#define TCTR_SC_CTR2           0x80000000
+
+/* timer control register - readback mode */
+#define TCTR_CNT0              0x02000000
+#define TCTR_CNT1              0x04000000
+#define TCTR_CNT2              0x08000000
+#define TCTR_NSTATUS           0x10000000
+#define TCTR_NCOUNT            0x20000000
+#define TCTR_SC_READBACK       0xc0000000
+
+/* timer control status registers - non-readback mode */
+#define TCSRx_DATA             0xff000000
+
+/* timer control status registers - readback mode */
+#define TCSRx_OUTPUT           0x80000000
+#define TCSRx_NULLCOUNT                0x40000000
+#define TCSRx_RL               0x30000000
+#define TCSRx_MODE             0x07000000
+
+/* timer clock select registers */
+#define TxCKSL_SELECT          0x0f000000
+#define __TxCKSL_SELECT(X)     ((X) << 24)
+#define TxCKSL_EIGHT           0xf0000000
+
+#endif /* _ASM_TIMER_REGS_H */
diff --git a/arch/frv/include/asm/timex.h b/arch/frv/include/asm/timex.h
new file mode 100644 (file)
index 0000000..a89bdde
--- /dev/null
@@ -0,0 +1,20 @@
+/* timex.h: FR-V architecture timex specifications
+ */
+#ifndef _ASM_TIMEX_H
+#define _ASM_TIMEX_H
+
+#define CLOCK_TICK_RATE                1193180 /* Underlying HZ */
+#define CLOCK_TICK_FACTOR      20      /* Factor of both 1000000 and CLOCK_TICK_RATE */
+
+typedef unsigned long cycles_t;
+
+static inline cycles_t get_cycles(void)
+{
+       return 0;
+}
+
+#define vxtime_lock()          do {} while (0)
+#define vxtime_unlock()                do {} while (0)
+
+#endif
+
diff --git a/arch/frv/include/asm/tlb.h b/arch/frv/include/asm/tlb.h
new file mode 100644 (file)
index 0000000..cd458eb
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef _ASM_TLB_H
+#define _ASM_TLB_H
+
+#include <asm/tlbflush.h>
+
+#ifdef CONFIG_MMU
+extern void check_pgt_cache(void);
+#else
+#define check_pgt_cache() do {} while(0)
+#endif
+
+/*
+ * we don't need any special per-pte or per-vma handling...
+ */
+#define tlb_start_vma(tlb, vma)                                do { } while (0)
+#define tlb_end_vma(tlb, vma)                          do { } while (0)
+#define __tlb_remove_tlb_entry(tlb, ptep, address)     do { } while (0)
+
+/*
+ * .. because we flush the whole mm when it fills up
+ */
+#define tlb_flush(tlb)         flush_tlb_mm((tlb)->mm)
+
+#include <asm-generic/tlb.h>
+
+#endif /* _ASM_TLB_H */
+
diff --git a/arch/frv/include/asm/tlbflush.h b/arch/frv/include/asm/tlbflush.h
new file mode 100644 (file)
index 0000000..7ac5eaf
--- /dev/null
@@ -0,0 +1,73 @@
+/* tlbflush.h: TLB flushing functions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_TLBFLUSH_H
+#define _ASM_TLBFLUSH_H
+
+#include <linux/mm.h>
+#include <asm/processor.h>
+
+#ifdef CONFIG_MMU
+
+#ifndef __ASSEMBLY__
+extern void asmlinkage __flush_tlb_all(void);
+extern void asmlinkage __flush_tlb_mm(unsigned long contextid);
+extern void asmlinkage __flush_tlb_page(unsigned long contextid, unsigned long start);
+extern void asmlinkage __flush_tlb_range(unsigned long contextid,
+                                        unsigned long start, unsigned long end);
+#endif /* !__ASSEMBLY__ */
+
+#define flush_tlb_all()                                \
+do {                                           \
+       preempt_disable();                      \
+       __flush_tlb_all();                      \
+       preempt_enable();                       \
+} while(0)
+
+#define flush_tlb_mm(mm)                       \
+do {                                           \
+       preempt_disable();                      \
+       __flush_tlb_mm((mm)->context.id);       \
+       preempt_enable();                       \
+} while(0)
+
+#define flush_tlb_range(vma,start,end)                                 \
+do {                                                                   \
+       preempt_disable();                                              \
+       __flush_tlb_range((vma)->vm_mm->context.id, start, end);        \
+       preempt_enable();                                               \
+} while(0)
+
+#define flush_tlb_page(vma,addr)                               \
+do {                                                           \
+       preempt_disable();                                      \
+       __flush_tlb_page((vma)->vm_mm->context.id, addr);       \
+       preempt_enable();                                       \
+} while(0)
+
+
+#define __flush_tlb_global()                   flush_tlb_all()
+#define flush_tlb()                            flush_tlb_all()
+#define flush_tlb_kernel_range(start, end)     flush_tlb_all()
+
+#else
+
+#define flush_tlb()                            BUG()
+#define flush_tlb_all()                                BUG()
+#define flush_tlb_mm(mm)                       BUG()
+#define flush_tlb_page(vma,addr)               BUG()
+#define flush_tlb_range(mm,start,end)          BUG()
+#define flush_tlb_kernel_range(start, end)     BUG()
+
+#endif
+
+
+#endif /* _ASM_TLBFLUSH_H */
diff --git a/arch/frv/include/asm/topology.h b/arch/frv/include/asm/topology.h
new file mode 100644 (file)
index 0000000..9427243
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_TOPOLOGY_H
+#define _ASM_TOPOLOGY_H
+
+#ifdef CONFIG_NUMA
+
+#error NUMA not supported yet
+
+#endif /* CONFIG_NUMA */
+
+#include <asm-generic/topology.h>
+
+#endif /* _ASM_TOPOLOGY_H */
diff --git a/arch/frv/include/asm/types.h b/arch/frv/include/asm/types.h
new file mode 100644 (file)
index 0000000..613bf1e
--- /dev/null
@@ -0,0 +1,40 @@
+/* types.h: FRV types
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_TYPES_H
+#define _ASM_TYPES_H
+
+#include <asm-generic/int-ll64.h>
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned short umode_t;
+
+#endif /* __ASSEMBLY__ */
+
+/*
+ * These aren't exported outside the kernel to avoid name space clashes
+ */
+#ifdef __KERNEL__
+
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
+/* Dma addresses are 32-bits wide.  */
+
+typedef u32 dma_addr_t;
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_TYPES_H */
diff --git a/arch/frv/include/asm/uaccess.h b/arch/frv/include/asm/uaccess.h
new file mode 100644 (file)
index 0000000..53650c9
--- /dev/null
@@ -0,0 +1,321 @@
+/* uaccess.h: userspace accessor functions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_UACCESS_H
+#define _ASM_UACCESS_H
+
+/*
+ * User space memory access functions
+ */
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <asm/segment.h>
+#include <asm/sections.h>
+
+#define HAVE_ARCH_UNMAPPED_AREA        /* we decide where to put mmaps */
+
+#define __ptr(x) ((unsigned long __force *)(x))
+
+#define VERIFY_READ    0
+#define VERIFY_WRITE   1
+
+#define __addr_ok(addr) ((unsigned long)(addr) < get_addr_limit())
+
+/*
+ * check that a range of addresses falls within the current address limit
+ */
+static inline int ___range_ok(unsigned long addr, unsigned long size)
+{
+#ifdef CONFIG_MMU
+       int flag = -EFAULT, tmp;
+
+       asm volatile (
+               "       addcc   %3,%2,%1,icc0   \n"     /* set C-flag if addr+size>4GB */
+               "       subcc.p %1,%4,gr0,icc1  \n"     /* jump if addr+size>limit */
+               "       bc      icc0,#0,0f      \n"
+               "       bhi     icc1,#0,0f      \n"
+               "       setlos  #0,%0           \n"     /* mark okay */
+               "0:                             \n"
+               : "=r"(flag), "=&r"(tmp)
+               : "r"(addr), "r"(size), "r"(get_addr_limit()), "0"(flag)
+               );
+
+       return flag;
+
+#else
+
+       if (addr < memory_start ||
+           addr > memory_end ||
+           size > memory_end - memory_start ||
+           addr + size > memory_end)
+               return -EFAULT;
+
+       return 0;
+#endif
+}
+
+#define __range_ok(addr,size) ___range_ok((unsigned long) (addr), (unsigned long) (size))
+
+#define access_ok(type,addr,size) (__range_ok((void __user *)(addr), (size)) == 0)
+#define __access_ok(addr,size) (__range_ok((addr), (size)) == 0)
+
+/*
+ * The exception table consists of pairs of addresses: the first is the
+ * address of an instruction that is allowed to fault, and the second is
+ * the address at which the program should continue.  No registers are
+ * modified, so it is entirely up to the continuation code to figure out
+ * what to do.
+ *
+ * All the routines below use bits of fixup code that are out of line
+ * with the main instruction path.  This means when everything is well,
+ * we don't even have to jump over them.  Further, they do not intrude
+ * on our cache or tlb entries.
+ */
+struct exception_table_entry
+{
+       unsigned long insn, fixup;
+};
+
+/* Returns 0 if exception not found and fixup otherwise.  */
+extern unsigned long search_exception_table(unsigned long);
+
+
+/*
+ * These are the main single-value transfer routines.  They automatically
+ * use the right size if we just have the right pointer type.
+ */
+#define __put_user(x, ptr)                                             \
+({                                                                     \
+       int __pu_err = 0;                                               \
+                                                                       \
+       typeof(*(ptr)) __pu_val = (x);                                  \
+       __chk_user_ptr(ptr);                                            \
+                                                                       \
+       switch (sizeof (*(ptr))) {                                      \
+       case 1:                                                         \
+               __put_user_asm(__pu_err, __pu_val, ptr, "b", "r");      \
+               break;                                                  \
+       case 2:                                                         \
+               __put_user_asm(__pu_err, __pu_val, ptr, "h", "r");      \
+               break;                                                  \
+       case 4:                                                         \
+               __put_user_asm(__pu_err, __pu_val, ptr, "",  "r");      \
+               break;                                                  \
+       case 8:                                                         \
+               __put_user_asm(__pu_err, __pu_val, ptr, "d", "e");      \
+               break;                                                  \
+       default:                                                        \
+               __pu_err = __put_user_bad();                            \
+               break;                                                  \
+       }                                                               \
+       __pu_err;                                                       \
+})
+
+#define put_user(x, ptr)                       \
+({                                             \
+       typeof(*(ptr)) __user *_p = (ptr);      \
+       int _e;                                 \
+                                               \
+       _e = __range_ok(_p, sizeof(*_p));       \
+       if (_e == 0)                            \
+               _e = __put_user((x), _p);       \
+       _e;                                     \
+})
+
+extern int __put_user_bad(void);
+
+/*
+ * Tell gcc we read from memory instead of writing: this is because
+ * we do not write to any memory gcc knows about, so there are no
+ * aliasing issues.
+ */
+
+#ifdef CONFIG_MMU
+
+#define __put_user_asm(err,x,ptr,dsize,constraint)                                     \
+do {                                                                                   \
+       asm volatile("1:        st"dsize"%I1    %2,%M1  \n"                             \
+                    "2:                                \n"                             \
+                    ".subsection 2                     \n"                             \
+                    "3:        setlos          %3,%0   \n"                             \
+                    "          bra             2b      \n"                             \
+                    ".previous                         \n"                             \
+                    ".section __ex_table,\"a\"         \n"                             \
+                    "          .balign         8       \n"                             \
+                    "          .long           1b,3b   \n"                             \
+                    ".previous"                                                        \
+                    : "=r" (err)                                                       \
+                    : "m" (*__ptr(ptr)), constraint (x), "i"(-EFAULT), "0"(err)        \
+                    : "memory");                                                       \
+} while (0)
+
+#else
+
+#define __put_user_asm(err,x,ptr,bwl,con)      \
+do {                                           \
+       asm("   st"bwl"%I0      %1,%M0  \n"     \
+           "   membar                  \n"     \
+           :                                   \
+           : "m" (*__ptr(ptr)), con (x)        \
+           : "memory");                        \
+} while (0)
+
+#endif
+
+/*****************************************************************************/
+/*
+ *
+ */
+#define __get_user(x, ptr)                                             \
+({                                                                     \
+       int __gu_err = 0;                                               \
+       __chk_user_ptr(ptr);                                            \
+                                                                       \
+       switch (sizeof(*(ptr))) {                                       \
+       case 1: {                                                       \
+               unsigned char __gu_val;                                 \
+               __get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r");    \
+               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
+               break;                                                  \
+       }                                                               \
+       case 2: {                                                       \
+               unsigned short __gu_val;                                \
+               __get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r");    \
+               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
+               break;                                                  \
+       }                                                               \
+       case 4: {                                                       \
+               unsigned int __gu_val;                                  \
+               __get_user_asm(__gu_err, __gu_val, ptr, "", "=r");      \
+               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
+               break;                                                  \
+       }                                                               \
+       case 8: {                                                       \
+               unsigned long long __gu_val;                            \
+               __get_user_asm(__gu_err, __gu_val, ptr, "d", "=e");     \
+               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
+               break;                                                  \
+       }                                                               \
+       default:                                                        \
+               __gu_err = __get_user_bad();                            \
+               break;                                                  \
+       }                                                               \
+       __gu_err;                                                       \
+})
+
+#define get_user(x, ptr)                       \
+({                                             \
+       const typeof(*(ptr)) __user *_p = (ptr);\
+       int _e;                                 \
+                                               \
+       _e = __range_ok(_p, sizeof(*_p));       \
+       if (likely(_e == 0))                    \
+               _e = __get_user((x), _p);       \
+       else                                    \
+               (x) = (typeof(x)) 0;            \
+       _e;                                     \
+})
+
+extern int __get_user_bad(void);
+
+#ifdef CONFIG_MMU
+
+#define __get_user_asm(err,x,ptr,dtype,constraint)     \
+do {                                                   \
+       asm("1:         ld"dtype"%I2    %M2,%1  \n"     \
+           "2:                                 \n"     \
+           ".subsection 2                      \n"     \
+           "3:         setlos          %3,%0   \n"     \
+           "           setlos          #0,%1   \n"     \
+           "           bra             2b      \n"     \
+           ".previous                          \n"     \
+           ".section __ex_table,\"a\"          \n"     \
+           "           .balign         8       \n"     \
+           "           .long           1b,3b   \n"     \
+           ".previous"                                 \
+           : "=r" (err), constraint (x)                \
+           : "m" (*__ptr(ptr)), "i"(-EFAULT), "0"(err) \
+           );                                          \
+} while(0)
+
+#else
+
+#define __get_user_asm(err,x,ptr,bwl,con)      \
+       asm("   ld"bwl"%I1      %M1,%0  \n"     \
+           "   membar                  \n"     \
+           : con(x)                            \
+           : "m" (*__ptr(ptr)))
+
+#endif
+
+/*****************************************************************************/
+/*
+ *
+ */
+#define ____force(x) (__force void *)(void __user *)(x)
+#ifdef CONFIG_MMU
+extern long __memset_user(void *dst, unsigned long count);
+extern long __memcpy_user(void *dst, const void *src, unsigned long count);
+
+#define clear_user(dst,count)                  __memset_user(____force(dst), (count))
+#define __copy_from_user_inatomic(to, from, n) __memcpy_user((to), ____force(from), (n))
+#define __copy_to_user_inatomic(to, from, n)   __memcpy_user(____force(to), (from), (n))
+
+#else
+
+#define clear_user(dst,count)                  (memset(____force(dst), 0, (count)), 0)
+#define __copy_from_user_inatomic(to, from, n) (memcpy((to), ____force(from), (n)), 0)
+#define __copy_to_user_inatomic(to, from, n)   (memcpy(____force(to), (from), (n)), 0)
+
+#endif
+
+#define __clear_user clear_user
+
+static inline unsigned long __must_check
+__copy_to_user(void __user *to, const void *from, unsigned long n)
+{
+       might_sleep();
+       return __copy_to_user_inatomic(to, from, n);
+}
+
+static inline unsigned long
+__copy_from_user(void *to, const void __user *from, unsigned long n)
+{
+       might_sleep();
+       return __copy_from_user_inatomic(to, from, n);
+}
+
+static inline long copy_from_user(void *to, const void __user *from, unsigned long n)
+{
+       unsigned long ret = n;
+
+       if (likely(__access_ok(from, n)))
+               ret = __copy_from_user(to, from, n);
+
+       if (unlikely(ret != 0))
+               memset(to + (n - ret), 0, ret);
+
+       return ret;
+}
+
+static inline long copy_to_user(void __user *to, const void *from, unsigned long n)
+{
+       return likely(__access_ok(to, n)) ? __copy_to_user(to, from, n) : n;
+}
+
+extern long strncpy_from_user(char *dst, const char __user *src, long count);
+extern long strnlen_user(const char __user *src, long count);
+
+#define strlen_user(str) strnlen_user(str, 32767)
+
+extern unsigned long search_exception_table(unsigned long addr);
+
+#endif /* _ASM_UACCESS_H */
diff --git a/arch/frv/include/asm/ucontext.h b/arch/frv/include/asm/ucontext.h
new file mode 100644 (file)
index 0000000..8d8c0c9
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_UCONTEXT_H
+#define _ASM_UCONTEXT_H
+
+struct ucontext {
+       unsigned long           uc_flags;
+       struct ucontext         *uc_link;
+       stack_t                 uc_stack;
+       struct sigcontext       uc_mcontext;
+       sigset_t                uc_sigmask;     /* mask last for extensibility */
+};
+
+#endif
diff --git a/arch/frv/include/asm/unaligned.h b/arch/frv/include/asm/unaligned.h
new file mode 100644 (file)
index 0000000..6c61c05
--- /dev/null
@@ -0,0 +1,22 @@
+/* unaligned.h: unaligned access handler
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_UNALIGNED_H
+#define _ASM_UNALIGNED_H
+
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_struct.h>
+#include <linux/unaligned/generic.h>
+
+#define get_unaligned  __get_unaligned_be
+#define put_unaligned  __put_unaligned_be
+
+#endif /* _ASM_UNALIGNED_H */
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h
new file mode 100644 (file)
index 0000000..edcfaf5
--- /dev/null
@@ -0,0 +1,382 @@
+#ifndef _ASM_UNISTD_H_
+#define _ASM_UNISTD_H_
+
+/*
+ * This file contains the system call numbers.
+ */
+
+#define __NR_restart_syscall      0
+#define __NR_exit                1
+#define __NR_fork                2
+#define __NR_read                3
+#define __NR_write               4
+#define __NR_open                5
+#define __NR_close               6
+#define __NR_waitpid             7
+#define __NR_creat               8
+#define __NR_link                9
+#define __NR_unlink             10
+#define __NR_execve             11
+#define __NR_chdir              12
+#define __NR_time               13
+#define __NR_mknod              14
+#define __NR_chmod              15
+#define __NR_lchown             16
+#define __NR_break              17
+#define __NR_oldstat            18
+#define __NR_lseek              19
+#define __NR_getpid             20
+#define __NR_mount              21
+#define __NR_umount             22
+#define __NR_setuid             23
+#define __NR_getuid             24
+#define __NR_stime              25
+#define __NR_ptrace             26
+#define __NR_alarm              27
+#define __NR_oldfstat           28
+#define __NR_pause              29
+#define __NR_utime              30
+#define __NR_stty               31
+#define __NR_gtty               32
+#define __NR_access             33
+#define __NR_nice               34
+#define __NR_ftime              35
+#define __NR_sync               36
+#define __NR_kill               37
+#define __NR_rename             38
+#define __NR_mkdir              39
+#define __NR_rmdir              40
+#define __NR_dup                41
+#define __NR_pipe               42
+#define __NR_times              43
+#define __NR_prof               44
+#define __NR_brk                45
+#define __NR_setgid             46
+#define __NR_getgid             47
+#define __NR_signal             48
+#define __NR_geteuid            49
+#define __NR_getegid            50
+#define __NR_acct               51
+#define __NR_umount2            52
+#define __NR_lock               53
+#define __NR_ioctl              54
+#define __NR_fcntl              55
+#define __NR_mpx                56
+#define __NR_setpgid            57
+#define __NR_ulimit             58
+// #define __NR_oldolduname     /* 59 */ obsolete
+#define __NR_umask              60
+#define __NR_chroot             61
+#define __NR_ustat              62
+#define __NR_dup2               63
+#define __NR_getppid            64
+#define __NR_getpgrp            65
+#define __NR_setsid             66
+#define __NR_sigaction          67
+#define __NR_sgetmask           68
+#define __NR_ssetmask           69
+#define __NR_setreuid           70
+#define __NR_setregid           71
+#define __NR_sigsuspend                 72
+#define __NR_sigpending                 73
+#define __NR_sethostname        74
+#define __NR_setrlimit          75
+#define __NR_getrlimit          76     /* Back compatible 2Gig limited rlimit */
+#define __NR_getrusage          77
+#define __NR_gettimeofday       78
+#define __NR_settimeofday       79
+#define __NR_getgroups          80
+#define __NR_setgroups          81
+#define __NR_select             82
+#define __NR_symlink            83
+#define __NR_oldlstat           84
+#define __NR_readlink           85
+#define __NR_uselib             86
+#define __NR_swapon             87
+#define __NR_reboot             88
+#define __NR_readdir            89
+// #define __NR_mmap            90     /* obsolete - not implemented */
+#define __NR_munmap             91
+#define __NR_truncate           92
+#define __NR_ftruncate          93
+#define __NR_fchmod             94
+#define __NR_fchown             95
+#define __NR_getpriority        96
+#define __NR_setpriority        97
+// #define __NR_profil          /* 98 */ obsolete
+#define __NR_statfs             99
+#define __NR_fstatfs           100
+// #define __NR_ioperm         /* 101 */ not supported
+#define __NR_socketcall                102
+#define __NR_syslog            103
+#define __NR_setitimer         104
+#define __NR_getitimer         105
+#define __NR_stat              106
+#define __NR_lstat             107
+#define __NR_fstat             108
+// #define __NR_olduname               /* 109 */ obsolete
+// #define __NR_iopl           /* 110 */ not supported
+#define __NR_vhangup           111
+// #define __NR_idle           /* 112 */ Obsolete
+// #define __NR_vm86old                /* 113 */ not supported
+#define __NR_wait4             114
+#define __NR_swapoff           115
+#define __NR_sysinfo           116
+#define __NR_ipc               117
+#define __NR_fsync             118
+#define __NR_sigreturn         119
+#define __NR_clone             120
+#define __NR_setdomainname     121
+#define __NR_uname             122
+// #define __NR_modify_ldt     /* 123 */ not supported
+#define __NR_cacheflush                123
+#define __NR_adjtimex          124
+#define __NR_mprotect          125
+#define __NR_sigprocmask       126
+#define __NR_create_module     127
+#define __NR_init_module       128
+#define __NR_delete_module     129
+#define __NR_get_kernel_syms   130
+#define __NR_quotactl          131
+#define __NR_getpgid           132
+#define __NR_fchdir            133
+#define __NR_bdflush           134
+#define __NR_sysfs             135
+#define __NR_personality       136
+#define __NR_afs_syscall       137 /* Syscall for Andrew File System */
+#define __NR_setfsuid          138
+#define __NR_setfsgid          139
+#define __NR__llseek           140
+#define __NR_getdents          141
+#define __NR__newselect                142
+#define __NR_flock             143
+#define __NR_msync             144
+#define __NR_readv             145
+#define __NR_writev            146
+#define __NR_getsid            147
+#define __NR_fdatasync         148
+#define __NR__sysctl           149
+#define __NR_mlock             150
+#define __NR_munlock           151
+#define __NR_mlockall          152
+#define __NR_munlockall                153
+#define __NR_sched_setparam            154
+#define __NR_sched_getparam            155
+#define __NR_sched_setscheduler                156
+#define __NR_sched_getscheduler                157
+#define __NR_sched_yield               158
+#define __NR_sched_get_priority_max    159
+#define __NR_sched_get_priority_min    160
+#define __NR_sched_rr_get_interval     161
+#define __NR_nanosleep         162
+#define __NR_mremap            163
+#define __NR_setresuid         164
+#define __NR_getresuid         165
+// #define __NR_vm86           /* 166 */ not supported
+#define __NR_query_module      167
+#define __NR_poll              168
+#define __NR_nfsservctl                169
+#define __NR_setresgid         170
+#define __NR_getresgid         171
+#define __NR_prctl             172
+#define __NR_rt_sigreturn      173
+#define __NR_rt_sigaction      174
+#define __NR_rt_sigprocmask    175
+#define __NR_rt_sigpending     176
+#define __NR_rt_sigtimedwait   177
+#define __NR_rt_sigqueueinfo   178
+#define __NR_rt_sigsuspend     179
+#define __NR_pread64           180
+#define __NR_pwrite64          181
+#define __NR_chown             182
+#define __NR_getcwd            183
+#define __NR_capget            184
+#define __NR_capset            185
+#define __NR_sigaltstack       186
+#define __NR_sendfile          187
+#define __NR_getpmsg           188     /* some people actually want streams */
+#define __NR_putpmsg           189     /* some people actually want streams */
+#define __NR_vfork             190
+#define __NR_ugetrlimit                191     /* SuS compliant getrlimit */
+#define __NR_mmap2             192
+#define __NR_truncate64                193
+#define __NR_ftruncate64       194
+#define __NR_stat64            195
+#define __NR_lstat64           196
+#define __NR_fstat64           197
+#define __NR_lchown32          198
+#define __NR_getuid32          199
+#define __NR_getgid32          200
+#define __NR_geteuid32         201
+#define __NR_getegid32         202
+#define __NR_setreuid32                203
+#define __NR_setregid32                204
+#define __NR_getgroups32       205
+#define __NR_setgroups32       206
+#define __NR_fchown32          207
+#define __NR_setresuid32       208
+#define __NR_getresuid32       209
+#define __NR_setresgid32       210
+#define __NR_getresgid32       211
+#define __NR_chown32           212
+#define __NR_setuid32          213
+#define __NR_setgid32          214
+#define __NR_setfsuid32                215
+#define __NR_setfsgid32                216
+#define __NR_pivot_root                217
+#define __NR_mincore           218
+#define __NR_madvise           219
+
+#define __NR_getdents64                220
+#define __NR_fcntl64           221
+#define __NR_security          223     /* syscall for security modules */
+#define __NR_gettid            224
+#define __NR_readahead         225
+#define __NR_setxattr          226
+#define __NR_lsetxattr         227
+#define __NR_fsetxattr         228
+#define __NR_getxattr          229
+#define __NR_lgetxattr         230
+#define __NR_fgetxattr         231
+#define __NR_listxattr         232
+#define __NR_llistxattr                233
+#define __NR_flistxattr                234
+#define __NR_removexattr       235
+#define __NR_lremovexattr      236
+#define __NR_fremovexattr      237
+#define __NR_tkill             238
+#define __NR_sendfile64                239
+#define __NR_futex             240
+#define __NR_sched_setaffinity 241
+#define __NR_sched_getaffinity 242
+#define __NR_set_thread_area   243
+#define __NR_get_thread_area   244
+#define __NR_io_setup          245
+#define __NR_io_destroy                246
+#define __NR_io_getevents      247
+#define __NR_io_submit         248
+#define __NR_io_cancel         249
+#define __NR_fadvise64         250
+
+#define __NR_exit_group                252
+#define __NR_lookup_dcookie    253
+#define __NR_epoll_create      254
+#define __NR_epoll_ctl         255
+#define __NR_epoll_wait                256
+#define __NR_remap_file_pages  257
+#define __NR_set_tid_address   258
+#define __NR_timer_create      259
+#define __NR_timer_settime     (__NR_timer_create+1)
+#define __NR_timer_gettime     (__NR_timer_create+2)
+#define __NR_timer_getoverrun  (__NR_timer_create+3)
+#define __NR_timer_delete      (__NR_timer_create+4)
+#define __NR_clock_settime     (__NR_timer_create+5)
+#define __NR_clock_gettime     (__NR_timer_create+6)
+#define __NR_clock_getres      (__NR_timer_create+7)
+#define __NR_clock_nanosleep   (__NR_timer_create+8)
+#define __NR_statfs64          268
+#define __NR_fstatfs64         269
+#define __NR_tgkill            270
+#define __NR_utimes            271
+#define __NR_fadvise64_64      272
+#define __NR_vserver           273
+#define __NR_mbind             274
+#define __NR_get_mempolicy     275
+#define __NR_set_mempolicy     276
+#define __NR_mq_open           277
+#define __NR_mq_unlink         (__NR_mq_open+1)
+#define __NR_mq_timedsend      (__NR_mq_open+2)
+#define __NR_mq_timedreceive   (__NR_mq_open+3)
+#define __NR_mq_notify         (__NR_mq_open+4)
+#define __NR_mq_getsetattr     (__NR_mq_open+5)
+#define __NR_kexec_load                283
+#define __NR_waitid            284
+/* #define __NR_sys_setaltroot 285 */
+#define __NR_add_key           286
+#define __NR_request_key       287
+#define __NR_keyctl            288
+#define __NR_ioprio_set                289
+#define __NR_ioprio_get                290
+#define __NR_inotify_init      291
+#define __NR_inotify_add_watch 292
+#define __NR_inotify_rm_watch  293
+#define __NR_migrate_pages     294
+#define __NR_openat            295
+#define __NR_mkdirat           296
+#define __NR_mknodat           297
+#define __NR_fchownat          298
+#define __NR_futimesat         299
+#define __NR_fstatat64         300
+#define __NR_unlinkat          301
+#define __NR_renameat          302
+#define __NR_linkat            303
+#define __NR_symlinkat         304
+#define __NR_readlinkat                305
+#define __NR_fchmodat          306
+#define __NR_faccessat         307
+#define __NR_pselect6          308
+#define __NR_ppoll             309
+#define __NR_unshare           310
+#define __NR_set_robust_list   311
+#define __NR_get_robust_list   312
+#define __NR_splice            313
+#define __NR_sync_file_range   314
+#define __NR_tee               315
+#define __NR_vmsplice          316
+#define __NR_move_pages                317
+#define __NR_getcpu            318
+#define __NR_epoll_pwait       319
+#define __NR_utimensat         320
+#define __NR_signalfd          321
+#define __NR_timerfd_create    322
+#define __NR_eventfd           323
+#define __NR_fallocate         324
+#define __NR_timerfd_settime   325
+#define __NR_timerfd_gettime   326
+#define __NR_signalfd4         327
+#define __NR_eventfd2          328
+#define __NR_epoll_create1     329
+#define __NR_dup3              330
+#define __NR_pipe2             331
+#define __NR_inotify_init1     332
+
+#ifdef __KERNEL__
+
+#define NR_syscalls 333
+
+#define __ARCH_WANT_IPC_PARSE_VERSION
+/* #define __ARCH_WANT_OLD_READDIR */
+#define __ARCH_WANT_OLD_STAT
+#define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYS_ALARM
+/* #define __ARCH_WANT_SYS_GETHOSTNAME */
+#define __ARCH_WANT_SYS_PAUSE
+/* #define __ARCH_WANT_SYS_SGETMASK */
+/* #define __ARCH_WANT_SYS_SIGNAL */
+#define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_SYS_UTIME
+#define __ARCH_WANT_SYS_WAITPID
+#define __ARCH_WANT_SYS_SOCKETCALL
+#define __ARCH_WANT_SYS_FADVISE64
+#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
+#define __ARCH_WANT_SYS_NICE
+/* #define __ARCH_WANT_SYS_OLD_GETRLIMIT */
+#define __ARCH_WANT_SYS_OLDUMOUNT
+/* #define __ARCH_WANT_SYS_SIGPENDING */
+#define __ARCH_WANT_SYS_SIGPROCMASK
+#define __ARCH_WANT_SYS_RT_SIGACTION
+#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+
+/*
+ * "Conditional" syscalls
+ *
+ * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
+ * but it doesn't work on all toolchains, so we just do it by hand
+ */
+#ifndef cond_syscall
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
+#endif
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_UNISTD_H_ */
diff --git a/arch/frv/include/asm/user.h b/arch/frv/include/asm/user.h
new file mode 100644 (file)
index 0000000..82fa8fa
--- /dev/null
@@ -0,0 +1,80 @@
+/* user.h: FR-V core file format stuff
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_USER_H
+#define _ASM_USER_H
+
+#include <asm/page.h>
+#include <asm/registers.h>
+
+/* Core file format: The core file is written in such a way that gdb
+ * can understand it and provide useful information to the user (under
+ * linux we use the 'trad-core' bfd).  There are quite a number of
+ * obstacles to being able to view the contents of the floating point
+ * registers, and until these are solved you will not be able to view
+ * the contents of them.  Actually, you can read in the core file and
+ * look at the contents of the user struct to find out what the
+ * floating point registers contain.
+ *
+ * The actual file contents are as follows:
+ * UPAGE:
+ *   1 page consisting of a user struct that tells gdb what is present
+ *   in the file.  Directly after this is a copy of the task_struct,
+ *   which is currently not used by gdb, but it may come in useful at
+ *   some point.  All of the registers are stored as part of the
+ *   upage.  The upage should always be only one page.
+ *
+ * DATA:
+ *   The data area is stored.  We use current->end_text to
+ *   current->brk to pick up all of the user variables, plus any
+ *   memory that may have been malloced.  No attempt is made to
+ *   determine if a page is demand-zero or if a page is totally
+ *   unused, we just cover the entire range.  All of the addresses are
+ *   rounded in such a way that an integral number of pages is
+ *   written.
+ *
+ * STACK:
+ *   We need the stack information in order to get a meaningful
+ *   backtrace.  We need to write the data from (esp) to
+ *   current->start_stack, so we round each of these off in order to
+ *   be able to write an integer number of pages.  The minimum core
+ *   file size is 3 pages, or 12288 bytes.
+ */
+
+/* When the kernel dumps core, it starts by dumping the user struct -
+ * this will be used by gdb to figure out where the data and stack segments
+ *  are within the file, and what virtual addresses to use.
+ */
+struct user {
+       /* We start with the registers, to mimic the way that "memory" is returned
+        * from the ptrace(3,...) function.  */
+       struct user_context     regs;
+
+       /* The rest of this junk is to help gdb figure out what goes where */
+       unsigned long           u_tsize;        /* Text segment size (pages). */
+       unsigned long           u_dsize;        /* Data segment size (pages). */
+       unsigned long           u_ssize;        /* Stack segment size (pages). */
+       unsigned long           start_code;     /* Starting virtual address of text. */
+       unsigned long           start_stack;    /* Starting virtual address of stack area.
+                                                * This is actually the bottom of the stack,
+                                                * the top of the stack is always found in the
+                                                * esp register.  */
+       long int                signal;         /* Signal that caused the core dump. */
+
+       unsigned long           magic;          /* To uniquely identify a core file */
+       char                    u_comm[32];     /* User command that was responsible */
+};
+
+#define NBPG                   PAGE_SIZE
+#define UPAGES                 1
+#define HOST_TEXT_START_ADDR   (u.start_code)
+#define HOST_STACK_END_ADDR    (u.start_stack + u.u_ssize * NBPG)
+
+#endif
diff --git a/arch/frv/include/asm/vga.h b/arch/frv/include/asm/vga.h
new file mode 100644 (file)
index 0000000..a702c80
--- /dev/null
@@ -0,0 +1,17 @@
+/* vga.h: VGA register stuff
+ *
+ * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+#ifndef _ASM_VGA_H
+#define _ASM_VGA_H
+
+
+
+#endif /* _ASM_VGA_H */
diff --git a/arch/frv/include/asm/virtconvert.h b/arch/frv/include/asm/virtconvert.h
new file mode 100644 (file)
index 0000000..59788fa
--- /dev/null
@@ -0,0 +1,41 @@
+/* virtconvert.h: virtual/physical/page address convertion
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+#ifndef _ASM_VIRTCONVERT_H
+#define _ASM_VIRTCONVERT_H
+
+/*
+ * Macros used for converting between virtual and physical mappings.
+ */
+
+#ifdef __KERNEL__
+
+#include <asm/setup.h>
+
+#ifdef CONFIG_MMU
+
+#define phys_to_virt(vaddr)    ((void *) ((unsigned long)(vaddr) + PAGE_OFFSET))
+#define virt_to_phys(vaddr)    ((unsigned long) (vaddr) - PAGE_OFFSET)
+
+#else
+
+#define phys_to_virt(vaddr)    ((void *) (vaddr))
+#define virt_to_phys(vaddr)    ((unsigned long) (vaddr))
+
+#endif
+
+#define virt_to_bus virt_to_phys
+#define bus_to_virt phys_to_virt
+
+#define __page_address(page)   (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
+#define page_to_phys(page)     virt_to_phys((void *)__page_address(page))
+
+#endif
+#endif
diff --git a/arch/frv/include/asm/xor.h b/arch/frv/include/asm/xor.h
new file mode 100644 (file)
index 0000000..c82eb12
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/xor.h>
index 0764348..7f392bc 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/linkage.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/highmem.h>
 #include <asm/spr-regs.h>
 
        .section        .text.tlbmiss
index 9015979..10a9eb0 100644 (file)
 #define __NR_dup3                      1316
 #define __NR_pipe2                     1317
 #define __NR_inotify_init1             1318
+#define __NR_preadv                    1319
+#define __NR_pwritev                   1320
 
 #ifdef __KERNEL__
 
 
-#define NR_syscalls                    295 /* length of syscall table */
+#define NR_syscalls                    297 /* length of syscall table */
 
 /*
  * The following defines stop scripts/checksyscalls.sh from complaining about
index 8dc6966..7bebac0 100644 (file)
@@ -1803,6 +1803,8 @@ sys_call_table:
        data8 sys_dup3
        data8 sys_pipe2
        data8 sys_inotify_init1
+       data8 sys_preadv
+       data8 sys_pwritev                       // 1320
 
        .org sys_call_table + 8*NR_syscalls     // guard against failures to increase NR_syscalls
 #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
index e4cb443..eb98738 100644 (file)
@@ -37,7 +37,7 @@ int force_iommu __read_mostly;
    to i386. */
 struct device fallback_dev = {
        .init_name = "fallback device",
-       .coherent_dma_mask = DMA_32BIT_MASK,
+       .coherent_dma_mask = DMA_BIT_MASK(32),
        .dma_mask = &fallback_dev.coherent_dma_mask,
 };
 
@@ -75,7 +75,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
        /* Copied from i386. Doesn't make much sense, because it will
           only work for pci_alloc_coherent.
           The caller just has to use GFP_DMA in this case. */
-       if (mask < DMA_24BIT_MASK)
+       if (mask < DMA_BIT_MASK(24))
                return 0;
 
        /* Tell the device to use SAC when IOMMU force is on.  This
@@ -90,7 +90,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
           SAC for these.  Assume all masks <= 40 bits are of this
           type. Normally this doesn't make any difference, but gives
           more gentle handling of IOMMU overflow. */
-       if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
+       if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
                dev_info(dev, "Force SAC with mask %lx\n", mask);
                return 0;
        }
index 8c130e8..d876423 100644 (file)
@@ -349,7 +349,7 @@ static int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 
 u64 sn_dma_get_required_mask(struct device *dev)
 {
-       return DMA_64BIT_MASK;
+       return DMA_BIT_MASK(64);
 }
 EXPORT_SYMBOL_GPL(sn_dma_get_required_mask);
 
index 5c76c64..117f99f 100644 (file)
@@ -80,14 +80,14 @@ static struct resource au1xxx_usb_ohci_resources[] = {
 };
 
 /* The dmamask must be set for OHCI to work */
-static u64 ohci_dmamask = DMA_32BIT_MASK;
+static u64 ohci_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device au1xxx_usb_ohci_device = {
        .name           = "au1xxx-ohci",
        .id             = 0,
        .dev = {
                .dma_mask               = &ohci_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(au1xxx_usb_ohci_resources),
        .resource       = au1xxx_usb_ohci_resources,
@@ -109,14 +109,14 @@ static struct resource au1100_lcd_resources[] = {
        }
 };
 
-static u64 au1100_lcd_dmamask = DMA_32BIT_MASK;
+static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device au1100_lcd_device = {
        .name           = "au1100-lcd",
        .id             = 0,
        .dev = {
                .dma_mask               = &au1100_lcd_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(au1100_lcd_resources),
        .resource       = au1100_lcd_resources,
@@ -138,14 +138,14 @@ static struct resource au1xxx_usb_ehci_resources[] = {
        },
 };
 
-static u64 ehci_dmamask = DMA_32BIT_MASK;
+static u64 ehci_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device au1xxx_usb_ehci_device = {
        .name           = "au1xxx-ehci",
        .id             = 0,
        .dev = {
                .dma_mask               = &ehci_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(au1xxx_usb_ehci_resources),
        .resource       = au1xxx_usb_ehci_resources,
@@ -165,14 +165,14 @@ static struct resource au1xxx_usb_gdt_resources[] = {
        },
 };
 
-static u64 udc_dmamask = DMA_32BIT_MASK;
+static u64 udc_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device au1xxx_usb_gdt_device = {
        .name           = "au1xxx-udc",
        .id             = 0,
        .dev = {
                .dma_mask               = &udc_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(au1xxx_usb_gdt_resources),
        .resource       = au1xxx_usb_gdt_resources,
@@ -192,14 +192,14 @@ static struct resource au1xxx_usb_otg_resources[] = {
        },
 };
 
-static u64 uoc_dmamask = DMA_32BIT_MASK;
+static u64 uoc_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device au1xxx_usb_otg_device = {
        .name           = "au1xxx-uoc",
        .id             = 0,
        .dev = {
                .dma_mask               = &uoc_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(au1xxx_usb_otg_resources),
        .resource       = au1xxx_usb_otg_resources,
@@ -218,20 +218,20 @@ static struct resource au1200_lcd_resources[] = {
        }
 };
 
-static u64 au1200_lcd_dmamask = DMA_32BIT_MASK;
+static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device au1200_lcd_device = {
        .name           = "au1200-lcd",
        .id             = 0,
        .dev = {
                .dma_mask               = &au1200_lcd_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(au1200_lcd_resources),
        .resource       = au1200_lcd_resources,
 };
 
-static u64 au1xxx_mmc_dmamask =  DMA_32BIT_MASK;
+static u64 au1xxx_mmc_dmamask =  DMA_BIT_MASK(32);
 
 extern struct au1xmmc_platform_data au1xmmc_platdata[2];
 
@@ -263,7 +263,7 @@ static struct platform_device au1200_mmc0_device = {
        .id = 0,
        .dev = {
                .dma_mask               = &au1xxx_mmc_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
                .platform_data          = &au1xmmc_platdata[0],
        },
        .num_resources  = ARRAY_SIZE(au1200_mmc0_resources),
@@ -299,7 +299,7 @@ static struct platform_device au1200_mmc1_device = {
        .id = 1,
        .dev = {
                .dma_mask               = &au1xxx_mmc_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
                .platform_data          = &au1xmmc_platdata[1],
        },
        .num_resources  = ARRAY_SIZE(au1200_mmc1_resources),
index 0d68e19..b93dff4 100644 (file)
@@ -119,14 +119,14 @@ static struct resource ide_resources[] = {
        }
 };
 
-static u64 ide_dmamask = DMA_32BIT_MASK;
+static u64 ide_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device ide_device = {
        .name           = "au1200-ide",
        .id             = 0,
        .dev = {
                .dma_mask               = &ide_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(ide_resources),
        .resource       = ide_resources
diff --git a/arch/mips/include/asm/txx9/ndfmc.h b/arch/mips/include/asm/txx9/ndfmc.h
new file mode 100644 (file)
index 0000000..fa67f3d
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * (C) Copyright TOSHIBA CORPORATION 2007
+ */
+#ifndef __ASM_TXX9_NDFMC_H
+#define __ASM_TXX9_NDFMC_H
+
+#define NDFMC_PLAT_FLAG_USE_BSPRT      0x01
+#define NDFMC_PLAT_FLAG_NO_RSTR                0x02
+#define NDFMC_PLAT_FLAG_HOLDADD                0x04
+#define NDFMC_PLAT_FLAG_DUMMYWRITE     0x08
+
+struct txx9ndfmc_platform_data {
+       unsigned int shift;
+       unsigned int gbus_clock;
+       unsigned int hold;              /* hold time in nanosecond */
+       unsigned int spw;               /* strobe pulse width in nanosecond */
+       unsigned int flags;
+       unsigned char ch_mask;          /* available channel bitmask */
+       unsigned char wp_mask;          /* write-protect bitmask */
+       unsigned char wide_mask;        /* 16bit-nand bitmask */
+};
+
+void txx9_ndfmc_init(unsigned long baseaddr,
+                    const struct txx9ndfmc_platform_data *plat_data);
+
+#endif /* __ASM_TXX9_NDFMC_H */
index 1acf428..e517899 100644 (file)
 void rbtx4939_prom_init(void);
 void rbtx4939_irq_setup(void);
 
+struct mtd_partition;
+struct map_info;
+struct rbtx4939_flash_data {
+       unsigned int width;
+       unsigned int nr_parts;
+       struct mtd_partition *parts;
+       void (*map_init)(struct map_info *map);
+};
+
 #endif /* __ASM_TXX9_RBTX4939_H */
index 0b06815..cd8bc20 100644 (file)
@@ -291,6 +291,7 @@ int tx4938_pcic1_map_irq(const struct pci_dev *dev, u8 slot);
 void tx4938_setup_pcierr_irq(void);
 void tx4938_irq_init(void);
 void tx4938_mtd_init(int ch);
+void tx4938_ndfmc_init(unsigned int hold, unsigned int spw);
 
 struct tx4938ide_platform_info {
        /*
index 964ef7e..f02c50b 100644 (file)
@@ -542,5 +542,7 @@ int tx4939_irq(void);
 void tx4939_mtd_init(int ch);
 void tx4939_ata_init(void);
 void tx4939_rtc_init(void);
+void tx4939_ndfmc_init(unsigned int hold, unsigned int spw,
+                      unsigned char ch_mask, unsigned char wide_mask);
 
 #endif /* __ASM_TXX9_TX4939_H */
index b1ccbcc..01f8345 100644 (file)
@@ -42,7 +42,7 @@
 #include <irq-mapping.h>
 #include <pnx833x.h>
 
-static u64 uart_dmamask     = DMA_32BIT_MASK;
+static u64 uart_dmamask     = DMA_BIT_MASK(32);
 
 static struct resource pnx833x_uart_resources[] = {
        [0] = {
@@ -101,14 +101,14 @@ static struct platform_device pnx833x_uart_device = {
        .id             = -1,
        .dev = {
                .dma_mask               = &uart_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
                .platform_data          = pnx8xxx_ports,
        },
        .num_resources  = ARRAY_SIZE(pnx833x_uart_resources),
        .resource       = pnx833x_uart_resources,
 };
 
-static u64 ehci_dmamask     = DMA_32BIT_MASK;
+static u64 ehci_dmamask     = DMA_BIT_MASK(32);
 
 static struct resource pnx833x_usb_ehci_resources[] = {
        [0] = {
@@ -128,7 +128,7 @@ static struct platform_device pnx833x_usb_ehci_device = {
        .id             = -1,
        .dev = {
                .dma_mask               = &ehci_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(pnx833x_usb_ehci_resources),
        .resource       = pnx833x_usb_ehci_resources,
@@ -198,7 +198,7 @@ static struct platform_device pnx833x_i2c1_device = {
 };
 #endif
 
-static u64 ethernet_dmamask = DMA_32BIT_MASK;
+static u64 ethernet_dmamask = DMA_BIT_MASK(32);
 
 static struct resource pnx833x_ethernet_resources[] = {
        [0] = {
@@ -218,7 +218,7 @@ static struct platform_device pnx833x_ethernet_device = {
        .id   = -1,
        .dev  = {
                .dma_mask          = &ethernet_dmamask,
-               .coherent_dma_mask = DMA_32BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
        },
        .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources),
        .resource      = pnx833x_ethernet_resources,
index 21d2955..5264cc0 100644 (file)
@@ -92,16 +92,16 @@ struct pnx8xxx_port pnx8xxx_ports[] = {
 };
 
 /* The dmamask must be set for OHCI to work */
-static u64 ohci_dmamask = DMA_32BIT_MASK;
+static u64 ohci_dmamask = DMA_BIT_MASK(32);
 
-static u64 uart_dmamask = DMA_32BIT_MASK;
+static u64 uart_dmamask = DMA_BIT_MASK(32);
 
 static struct platform_device pnx8550_usb_ohci_device = {
        .name           = "pnx8550-ohci",
        .id             = -1,
        .dev = {
                .dma_mask               = &ohci_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(pnx8550_usb_ohci_resources),
        .resource       = pnx8550_usb_ohci_resources,
@@ -112,7 +112,7 @@ static struct platform_device pnx8550_uart_device = {
        .id             = -1,
        .dev = {
                .dma_mask               = &uart_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
                .platform_data = pnx8xxx_ports,
        },
        .num_resources  = ARRAY_SIZE(pnx8550_uart_resources),
index f7ca4f5..0ee01e3 100644 (file)
@@ -49,14 +49,14 @@ static struct resource msp_usbhost_resources [] = {
        },
 };
 
-static u64 msp_usbhost_dma_mask = DMA_32BIT_MASK;
+static u64 msp_usbhost_dma_mask = DMA_BIT_MASK(32);
 
 static struct platform_device msp_usbhost_device = {
        .name   = "pmcmsp-ehci",
        .id     = 0,
        .dev    = {
                .dma_mask = &msp_usbhost_dma_mask,
-               .coherent_dma_mask = DMA_32BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(msp_usbhost_resources),
        .resource       = msp_usbhost_resources,
@@ -77,14 +77,14 @@ static struct resource msp_usbdev_resources [] = {
        },
 };
 
-static u64 msp_usbdev_dma_mask = DMA_32BIT_MASK;
+static u64 msp_usbdev_dma_mask = DMA_BIT_MASK(32);
 
 static struct platform_device msp_usbdev_device = {
        .name   = "msp71xx_udc",
        .id     = 0,
        .dev    = {
                .dma_mask = &msp_usbdev_dma_mask,
-               .coherent_dma_mask = DMA_32BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(msp_usbdev_resources),
        .resource       = msp_usbdev_resources,
index a13a08b..8a266c6 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/txx9/generic.h>
 #include <asm/txx9/pci.h>
 #include <asm/txx9tmr.h>
+#include <asm/txx9/ndfmc.h>
 #ifdef CONFIG_CPU_TX49XX
 #include <asm/txx9/tx4938.h>
 #endif
@@ -691,6 +692,26 @@ void __init txx9_physmap_flash_init(int no, unsigned long addr,
 #endif
 }
 
+void __init txx9_ndfmc_init(unsigned long baseaddr,
+                           const struct txx9ndfmc_platform_data *pdata)
+{
+#if defined(CONFIG_MTD_NAND_TXX9NDFMC) || \
+       defined(CONFIG_MTD_NAND_TXX9NDFMC_MODULE)
+       struct resource res = {
+               .start = baseaddr,
+               .end = baseaddr + 0x1000 - 1,
+               .flags = IORESOURCE_MEM,
+       };
+       struct platform_device *pdev = platform_device_alloc("txx9ndfmc", -1);
+
+       if (!pdev ||
+           platform_device_add_resources(pdev, &res, 1) ||
+           platform_device_add_data(pdev, pdata, sizeof(*pdata)) ||
+           platform_device_add(pdev))
+               platform_device_put(pdev);
+#endif
+}
+
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
 static DEFINE_SPINLOCK(txx9_iocled_lock);
 
index 25819ff..f0844f8 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/txx9tmr.h>
 #include <asm/txx9pio.h>
 #include <asm/txx9/generic.h>
+#include <asm/txx9/ndfmc.h>
 #include <asm/txx9/tx4938.h>
 
 static void __init tx4938_wdr_init(void)
@@ -382,6 +383,26 @@ void __init tx4938_ata_init(unsigned int irq, unsigned int shift, int tune)
                platform_device_put(pdev);
 }
 
+void __init tx4938_ndfmc_init(unsigned int hold, unsigned int spw)
+{
+       struct txx9ndfmc_platform_data plat_data = {
+               .shift = 1,
+               .gbus_clock = txx9_gbus_clock,
+               .hold = hold,
+               .spw = spw,
+               .ch_mask = 1,
+       };
+       unsigned long baseaddr = TX4938_NDFMC_REG & 0xfffffffffULL;
+
+#ifdef __BIG_ENDIAN
+       baseaddr += 4;
+#endif
+       if ((__raw_readq(&tx4938_ccfgptr->pcfg) &
+            (TX4938_PCFG_ATA_SEL|TX4938_PCFG_ISA_SEL|TX4938_PCFG_NDF_SEL)) ==
+           TX4938_PCFG_NDF_SEL)
+               txx9_ndfmc_init(baseaddr, &plat_data);
+}
+
 static void __init tx4938_stop_unused_modules(void)
 {
        __u64 pcfg, rst = 0, ckd = 0;
index 5544096..7a25b57 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/txx9irq.h>
 #include <asm/txx9tmr.h>
 #include <asm/txx9/generic.h>
+#include <asm/txx9/ndfmc.h>
 #include <asm/txx9/tx4939.h>
 
 static void __init tx4939_wdr_init(void)
@@ -457,6 +458,22 @@ void __init tx4939_rtc_init(void)
        platform_device_register(&rtc_dev);
 }
 
+void __init tx4939_ndfmc_init(unsigned int hold, unsigned int spw,
+                             unsigned char ch_mask, unsigned char wide_mask)
+{
+       struct txx9ndfmc_platform_data plat_data = {
+               .shift = 1,
+               .gbus_clock = txx9_gbus_clock,
+               .hold = hold,
+               .spw = spw,
+               .flags = NDFMC_PLAT_FLAG_NO_RSTR | NDFMC_PLAT_FLAG_HOLDADD |
+                        NDFMC_PLAT_FLAG_DUMMYWRITE,
+               .ch_mask = ch_mask,
+               .wide_mask = wide_mask,
+       };
+       txx9_ndfmc_init(TX4939_NDFMC_REG & 0xfffffffffULL, &plat_data);
+}
+
 static void __init tx4939_stop_unused_modules(void)
 {
        __u64 pcfg, rst = 0, ckd = 0;
index 547ff29..65d13df 100644 (file)
@@ -352,6 +352,8 @@ static void __init rbtx4938_device_init(void)
        rbtx4938_ne_init();
        tx4938_wdt_init();
        rbtx4938_mtd_init();
+       /* TC58DVM82A1FT: tDH=10ns, tWP=tRP=tREADID=35ns */
+       tx4938_ndfmc_init(10, 35);
        tx4938_ata_init(RBTX4938_IRQ_IOC_ATA, 0, 1);
        txx9_iocled_init(RBTX4938_LED_ADDR - IO_BASE, -1, 8, 1, "green", NULL);
 }
index 656603b..011e1e3 100644 (file)
@@ -16,6 +16,9 @@
 #include <linux/leds.h>
 #include <linux/interrupt.h>
 #include <linux/smc91x.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/map.h>
 #include <asm/reboot.h>
 #include <asm/txx9/generic.h>
 #include <asm/txx9/pci.h>
@@ -282,6 +285,159 @@ static void rbtx4939_7segled_putc(unsigned int pos, unsigned char val)
        __rbtx4939_7segled_putc(pos, val);
 }
 
+#if defined(CONFIG_MTD_RBTX4939) || defined(CONFIG_MTD_RBTX4939_MODULE)
+/* special mapping for boot rom */
+static unsigned long rbtx4939_flash_fixup_ofs(unsigned long ofs)
+{
+       u8 bdipsw = readb(rbtx4939_bdipsw_addr) & 0x0f;
+       unsigned char shift;
+
+       if (bdipsw & 8) {
+               /* BOOT Mode: USER ROM1 / USER ROM2 */
+               shift = bdipsw & 3;
+               /* rotate A[23:22] */
+               return (ofs & ~0xc00000) | ((((ofs >> 22) + shift) & 3) << 22);
+       }
+#ifdef __BIG_ENDIAN
+       if (bdipsw == 0)
+               /* BOOT Mode: Monitor ROM */
+               ofs ^= 0x400000;        /* swap A[22] */
+#endif
+       return ofs;
+}
+
+static map_word rbtx4939_flash_read16(struct map_info *map, unsigned long ofs)
+{
+       map_word r;
+
+       ofs = rbtx4939_flash_fixup_ofs(ofs);
+       r.x[0] = __raw_readw(map->virt + ofs);
+       return r;
+}
+
+static void rbtx4939_flash_write16(struct map_info *map, const map_word datum,
+                                  unsigned long ofs)
+{
+       ofs = rbtx4939_flash_fixup_ofs(ofs);
+       __raw_writew(datum.x[0], map->virt + ofs);
+       mb();   /* see inline_map_write() in mtd/map.h */
+}
+
+static void rbtx4939_flash_copy_from(struct map_info *map, void *to,
+                                    unsigned long from, ssize_t len)
+{
+       u8 bdipsw = readb(rbtx4939_bdipsw_addr) & 0x0f;
+       unsigned char shift;
+       ssize_t curlen;
+
+       from += (unsigned long)map->virt;
+       if (bdipsw & 8) {
+               /* BOOT Mode: USER ROM1 / USER ROM2 */
+               shift = bdipsw & 3;
+               while (len) {
+                       curlen = min_t(unsigned long, len,
+                                    0x400000 - (from & (0x400000 - 1)));
+                       memcpy(to,
+                              (void *)((from & ~0xc00000) |
+                                       ((((from >> 22) + shift) & 3) << 22)),
+                              curlen);
+                       len -= curlen;
+                       from += curlen;
+                       to += curlen;
+               }
+               return;
+       }
+#ifdef __BIG_ENDIAN
+       if (bdipsw == 0) {
+               /* BOOT Mode: Monitor ROM */
+               while (len) {
+                       curlen = min_t(unsigned long, len,
+                                    0x400000 - (from & (0x400000 - 1)));
+                       memcpy(to, (void *)(from ^ 0x400000), curlen);
+                       len -= curlen;
+                       from += curlen;
+                       to += curlen;
+               }
+               return;
+       }
+#endif
+       memcpy(to, (void *)from, len);
+}
+
+static void rbtx4939_flash_map_init(struct map_info *map)
+{
+       map->read = rbtx4939_flash_read16;
+       map->write = rbtx4939_flash_write16;
+       map->copy_from = rbtx4939_flash_copy_from;
+}
+
+static void __init rbtx4939_mtd_init(void)
+{
+       static struct {
+               struct platform_device dev;
+               struct resource res;
+               struct rbtx4939_flash_data data;
+       } pdevs[4];
+       int i;
+       static char names[4][8];
+       static struct mtd_partition parts[4];
+       struct rbtx4939_flash_data *boot_pdata = &pdevs[0].data;
+       u8 bdipsw = readb(rbtx4939_bdipsw_addr) & 0x0f;
+
+       if (bdipsw & 8) {
+               /* BOOT Mode: USER ROM1 / USER ROM2 */
+               boot_pdata->nr_parts = 4;
+               for (i = 0; i < boot_pdata->nr_parts; i++) {
+                       sprintf(names[i], "img%d", 4 - i);
+                       parts[i].name = names[i];
+                       parts[i].size = 0x400000;
+                       parts[i].offset = MTDPART_OFS_NXTBLK;
+               }
+       } else if (bdipsw == 0) {
+               /* BOOT Mode: Monitor ROM */
+               boot_pdata->nr_parts = 2;
+               strcpy(names[0], "big");
+               strcpy(names[1], "little");
+               for (i = 0; i < boot_pdata->nr_parts; i++) {
+                       parts[i].name = names[i];
+                       parts[i].size = 0x400000;
+                       parts[i].offset = MTDPART_OFS_NXTBLK;
+               }
+       } else {
+               /* BOOT Mode: ROM Emulator */
+               boot_pdata->nr_parts = 2;
+               parts[0].name = "boot";
+               parts[0].offset = 0xc00000;
+               parts[0].size = 0x400000;
+               parts[1].name = "user";
+               parts[1].offset = 0;
+               parts[1].size = 0xc00000;
+       }
+       boot_pdata->parts = parts;
+       boot_pdata->map_init = rbtx4939_flash_map_init;
+
+       for (i = 0; i < ARRAY_SIZE(pdevs); i++) {
+               struct resource *r = &pdevs[i].res;
+               struct platform_device *dev = &pdevs[i].dev;
+
+               r->start = 0x1f000000 - i * 0x1000000;
+               r->end = r->start + 0x1000000 - 1;
+               r->flags = IORESOURCE_MEM;
+               pdevs[i].data.width = 2;
+               dev->num_resources = 1;
+               dev->resource = r;
+               dev->id = i;
+               dev->name = "rbtx4939-flash";
+               dev->dev.platform_data = &pdevs[i].data;
+               platform_device_register(dev);
+       }
+}
+#else
+static void __init rbtx4939_mtd_init(void)
+{
+}
+#endif
+
 static void __init rbtx4939_arch_init(void)
 {
        rbtx4939_pci_setup();
@@ -333,6 +489,11 @@ static void __init rbtx4939_device_init(void)
            platform_device_add_data(pdev, &smc_pdata, sizeof(smc_pdata)) ||
            platform_device_add(pdev))
                platform_device_put(pdev);
+       rbtx4939_mtd_init();
+       /* TC58DVM82A1FT: tDH=10ns, tWP=tRP=tREADID=35ns */
+       tx4939_ndfmc_init(10, 35,
+                         (1 << 1) | (1 << 2),
+                         (1 << 2)); /* ch1:8bit, ch2:16bit */
        rbtx4939_led_setup();
        tx4939_wdt_init();
        tx4939_ata_init();
index 41d1682..3559267 100644 (file)
@@ -370,5 +370,3 @@ source "security/Kconfig"
 source "crypto/Kconfig"
 
 source "lib/Kconfig"
-
-source "arch/mn10300/oprofile/Kconfig"
index 6673a28..dd0c8ff 100644 (file)
@@ -94,42 +94,8 @@ ifdef CONFIG_DEBUG_INFO
 KBUILD_AFLAGS  += -Wa,--gdwarf2
 endif
 
-###################################################################################################
 #
-# juggle some symlinks in the MN10300 asm include dir
+# include the appropriate processor- and unit-specific headers
 #
-#      Update machine proc and unit symlinks if something which affects
-#      them changed.  We use .proc / .unit to indicate when they were
-#      updated last, otherwise make uses the target directory mtime.
-#
-###################################################################################################
-
-# processor specific definitions
-include/asm-mn10300/.proc: $(wildcard include/config/proc/*.h) include/config/auto.conf
-       @echo '  SYMLINK include/asm-mn10300/proc -> include/asm-mn10300/proc-$(PROCESSOR)'
-ifneq ($(KBUILD_SRC),)
-       $(Q)mkdir -p include/asm-mn10300
-       $(Q)ln -fsn $(srctree)/include/asm-mn10300/proc-$(PROCESSOR) include/asm-mn10300/proc
-else
-       $(Q)ln -fsn proc-$(PROCESSOR) include/asm-mn10300/proc
-endif
-       @touch $@
-
-CLEAN_FILES += include/asm-mn10300/proc include/asm-mn10300/.proc
-
-prepare: include/asm-mn10300/.proc
-
-# unit specific definitions
-include/asm-mn10300/.unit: $(wildcard include/config/unit/*.h) include/config/auto.conf
-       @echo '  SYMLINK include/asm-mn10300/unit -> include/asm-mn10300/unit-$(UNIT)'
-ifneq ($(KBUILD_SRC),)
-       $(Q)mkdir -p include/asm-mn10300
-       $(Q)ln -fsn $(srctree)/include/asm-mn10300/unit-$(UNIT) include/asm-mn10300/unit
-else
-       $(Q)ln -fsn unit-$(UNIT) include/asm-mn10300/unit
-endif
-       @touch $@
-
-CLEAN_FILES += include/asm-mn10300/unit include/asm-mn10300/.unit
-
-prepare: include/asm-mn10300/.unit
+KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/proc-$(PROCESSOR)/include
+KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/unit-$(UNIT)/include
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild
new file mode 100644 (file)
index 0000000..c68e168
--- /dev/null
@@ -0,0 +1 @@
+include include/asm-generic/Kbuild.asm
diff --git a/arch/mn10300/include/asm/atomic.h b/arch/mn10300/include/asm/atomic.h
new file mode 100644 (file)
index 0000000..bc06482
--- /dev/null
@@ -0,0 +1,157 @@
+/* MN10300 Atomic counter operations
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_ATOMIC_H
+#define _ASM_ATOMIC_H
+
+#ifdef CONFIG_SMP
+#error not SMP safe
+#endif
+
+/*
+ * Atomic operations that C can't guarantee us.  Useful for
+ * resource counting etc..
+ */
+
+#define ATOMIC_INIT(i) { (i) }
+
+#ifdef __KERNEL__
+
+/**
+ * atomic_read - read atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically reads the value of @v.  Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_read(v) ((v)->counter)
+
+/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Atomically sets the value of @v to @i.  Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_set(v, i) (((v)->counter) = (i))
+
+#include <asm/system.h>
+
+/**
+ * atomic_add_return - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+ *
+ * Atomically adds @i to @v and returns the result
+ * Note that the guaranteed useful range of an atomic_t is only 24 bits.
+ */
+static inline int atomic_add_return(int i, atomic_t *v)
+{
+       unsigned long flags;
+       int temp;
+
+       local_irq_save(flags);
+       temp = v->counter;
+       temp += i;
+       v->counter = temp;
+       local_irq_restore(flags);
+
+       return temp;
+}
+
+/**
+ * atomic_sub_return - subtract integer from atomic variable
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v and returns the result
+ * Note that the guaranteed useful range of an atomic_t is only 24 bits.
+ */
+static inline int atomic_sub_return(int i, atomic_t *v)
+{
+       unsigned long flags;
+       int temp;
+
+       local_irq_save(flags);
+       temp = v->counter;
+       temp -= i;
+       v->counter = temp;
+       local_irq_restore(flags);
+
+       return temp;
+}
+
+static inline int atomic_add_negative(int i, atomic_t *v)
+{
+       return atomic_add_return(i, v) < 0;
+}
+
+static inline void atomic_add(int i, atomic_t *v)
+{
+       atomic_add_return(i, v);
+}
+
+static inline void atomic_sub(int i, atomic_t *v)
+{
+       atomic_sub_return(i, v);
+}
+
+static inline void atomic_inc(atomic_t *v)
+{
+       atomic_add_return(1, v);
+}
+
+static inline void atomic_dec(atomic_t *v)
+{
+       atomic_sub_return(1, v);
+}
+
+#define atomic_dec_return(v)           atomic_sub_return(1, (v))
+#define atomic_inc_return(v)           atomic_add_return(1, (v))
+
+#define atomic_sub_and_test(i, v)      (atomic_sub_return((i), (v)) == 0)
+#define atomic_dec_and_test(v)         (atomic_sub_return(1, (v)) == 0)
+#define atomic_inc_and_test(v)         (atomic_add_return(1, (v)) == 0)
+
+#define atomic_add_unless(v, a, u)                             \
+({                                                             \
+       int c, old;                                             \
+       c = atomic_read(v);                                     \
+       while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
+               c = old;                                        \
+       c != (u);                                               \
+})
+
+#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+
+static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
+{
+       unsigned long flags;
+
+       mask = ~mask;
+       local_irq_save(flags);
+       *addr &= mask;
+       local_irq_restore(flags);
+}
+
+#define atomic_xchg(ptr, v)            (xchg(&(ptr)->counter, (v)))
+#define atomic_cmpxchg(v, old, new)    (cmpxchg(&((v)->counter), (old), (new)))
+
+/* Atomic operations are already serializing on MN10300??? */
+#define smp_mb__before_atomic_dec()    barrier()
+#define smp_mb__after_atomic_dec()     barrier()
+#define smp_mb__before_atomic_inc()    barrier()
+#define smp_mb__after_atomic_inc()     barrier()
+
+#include <asm-generic/atomic.h>
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_ATOMIC_H */
diff --git a/arch/mn10300/include/asm/auxvec.h b/arch/mn10300/include/asm/auxvec.h
new file mode 100644 (file)
index 0000000..4fdb60b
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef _ASM_AUXVEC_H
+#define _ASM_AUXVEC_H
+
+#endif
diff --git a/arch/mn10300/include/asm/bitops.h b/arch/mn10300/include/asm/bitops.h
new file mode 100644 (file)
index 0000000..0b610f4
--- /dev/null
@@ -0,0 +1,240 @@
+/* MN10300 bit operations
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ *
+ * These have to be done with inline assembly: that way the bit-setting
+ * is guaranteed to be atomic. All bit operations return 0 if the bit
+ * was cleared before the operation and != 0 if it was not.
+ *
+ * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
+ */
+#ifndef __ASM_BITOPS_H
+#define __ASM_BITOPS_H
+
+#include <asm/cpu-regs.h>
+
+#define smp_mb__before_clear_bit()     barrier()
+#define smp_mb__after_clear_bit()      barrier()
+
+/*
+ * set bit
+ */
+#define __set_bit(nr, addr)                                    \
+({                                                             \
+       volatile unsigned char *_a = (unsigned char *)(addr);   \
+       const unsigned shift = (nr) & 7;                        \
+       _a += (nr) >> 3;                                        \
+                                                               \
+       asm volatile("bset %2,(%1) # set_bit reg"               \
+                    : "=m"(*_a)                                \
+                    : "a"(_a), "d"(1 << shift),  "m"(*_a)      \
+                    : "memory", "cc");                         \
+})
+
+#define set_bit(nr, addr) __set_bit((nr), (addr))
+
+/*
+ * clear bit
+ */
+#define ___clear_bit(nr, addr)                                 \
+({                                                             \
+       volatile unsigned char *_a = (unsigned char *)(addr);   \
+       const unsigned shift = (nr) & 7;                        \
+       _a += (nr) >> 3;                                        \
+                                                               \
+       asm volatile("bclr %2,(%1) # clear_bit reg"             \
+                    : "=m"(*_a)                                \
+                    : "a"(_a), "d"(1 << shift), "m"(*_a)       \
+                    : "memory", "cc");                         \
+})
+
+#define clear_bit(nr, addr) ___clear_bit((nr), (addr))
+
+
+static inline void __clear_bit(int nr, volatile void *addr)
+{
+       unsigned int *a = (unsigned int *) addr;
+       int mask;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 0x1f);
+       *a &= ~mask;
+}
+
+/*
+ * test bit
+ */
+static inline int test_bit(int nr, const volatile void *addr)
+{
+       return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
+}
+
+/*
+ * change bit
+ */
+static inline void __change_bit(int nr, volatile void *addr)
+{
+       int     mask;
+       unsigned int *a = (unsigned int *) addr;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 0x1f);
+       *a ^= mask;
+}
+
+extern void change_bit(int nr, volatile void *addr);
+
+/*
+ * test and set bit
+ */
+#define __test_and_set_bit(nr,addr)                            \
+({                                                             \
+       volatile unsigned char *_a = (unsigned char *)(addr);   \
+       const unsigned shift = (nr) & 7;                        \
+       unsigned epsw;                                          \
+       _a += (nr) >> 3;                                        \
+                                                               \
+       asm volatile("bset %3,(%2) # test_set_bit reg\n"        \
+                    "mov epsw,%1"                              \
+                    : "=m"(*_a), "=d"(epsw)                    \
+                    : "a"(_a), "d"(1 << shift), "m"(*_a)       \
+                    : "memory", "cc");                         \
+                                                               \
+       !(epsw & EPSW_FLAG_Z);                                  \
+})
+
+#define test_and_set_bit(nr, addr) __test_and_set_bit((nr), (addr))
+
+/*
+ * test and clear bit
+ */
+#define __test_and_clear_bit(nr, addr)                         \
+({                                                             \
+        volatile unsigned char *_a = (unsigned char *)(addr);  \
+       const unsigned shift = (nr) & 7;                        \
+       unsigned epsw;                                          \
+       _a += (nr) >> 3;                                        \
+                                                               \
+       asm volatile("bclr %3,(%2) # test_clear_bit reg\n"      \
+                    "mov epsw,%1"                              \
+                    : "=m"(*_a), "=d"(epsw)                    \
+                    : "a"(_a), "d"(1 << shift), "m"(*_a)       \
+                    : "memory", "cc");                         \
+                                                               \
+       !(epsw & EPSW_FLAG_Z);                                  \
+})
+
+#define test_and_clear_bit(nr, addr) __test_and_clear_bit((nr), (addr))
+
+/*
+ * test and change bit
+ */
+static inline int __test_and_change_bit(int nr, volatile void *addr)
+{
+       int     mask, retval;
+       unsigned int *a = (unsigned int *)addr;
+
+       a += nr >> 5;
+       mask = 1 << (nr & 0x1f);
+       retval = (mask & *a) != 0;
+       *a ^= mask;
+
+       return retval;
+}
+
+extern int test_and_change_bit(int nr, volatile void *addr);
+
+#include <asm-generic/bitops/lock.h>
+
+#ifdef __KERNEL__
+
+/**
+ * __ffs - find first bit set
+ * @x: the word to search
+ *
+ * - return 31..0 to indicate bit 31..0 most least significant bit set
+ * - if no bits are set in x, the result is undefined
+ */
+static inline __attribute__((const))
+unsigned long __ffs(unsigned long x)
+{
+       int bit;
+       asm("bsch %2,%0" : "=r"(bit) : "0"(0), "r"(x & -x));
+       return bit;
+}
+
+/*
+ * special slimline version of fls() for calculating ilog2_u32()
+ * - note: no protection against n == 0
+ */
+static inline __attribute__((const))
+int __ilog2_u32(u32 n)
+{
+       int bit;
+       asm("bsch %2,%0" : "=r"(bit) : "0"(0), "r"(n));
+       return bit;
+}
+
+/**
+ * fls - find last bit set
+ * @x: the word to search
+ *
+ * This is defined the same way as ffs:
+ * - return 32..1 to indicate bit 31..0 most significant bit set
+ * - return 0 to indicate no bits set
+ */
+static inline __attribute__((const))
+int fls(int x)
+{
+       return (x != 0) ? __ilog2_u32(x) + 1 : 0;
+}
+
+/**
+ * __fls - find last (most-significant) set bit in a long word
+ * @word: the word to search
+ *
+ * Undefined if no set bit exists, so code should check against 0 first.
+ */
+static inline unsigned long __fls(unsigned long word)
+{
+       return __ilog2_u32(word);
+}
+
+/**
+ * ffs - find first bit set
+ * @x: the word to search
+ *
+ * - return 32..1 to indicate bit 31..0 most least significant bit set
+ * - return 0 to indicate no bits set
+ */
+static inline __attribute__((const))
+int ffs(int x)
+{
+       /* Note: (x & -x) gives us a mask that is the least significant
+        * (rightmost) 1-bit of the value in x.
+        */
+       return fls(x & -x);
+}
+
+#include <asm-generic/bitops/ffz.h>
+#include <asm-generic/bitops/fls64.h>
+#include <asm-generic/bitops/find.h>
+#include <asm-generic/bitops/sched.h>
+#include <asm-generic/bitops/hweight.h>
+
+#define ext2_set_bit_atomic(lock, nr, addr) \
+       test_and_set_bit((nr) ^ 0x18, (addr))
+#define ext2_clear_bit_atomic(lock, nr, addr) \
+       test_and_clear_bit((nr) ^ 0x18, (addr))
+
+#include <asm-generic/bitops/ext2-non-atomic.h>
+#include <asm-generic/bitops/minix-le.h>
+
+#endif /* __KERNEL__ */
+#endif /* __ASM_BITOPS_H */
diff --git a/arch/mn10300/include/asm/bug.h b/arch/mn10300/include/asm/bug.h
new file mode 100644 (file)
index 0000000..4fcf338
--- /dev/null
@@ -0,0 +1,35 @@
+/* MN10300 Kernel bug reporting
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_BUG_H
+#define _ASM_BUG_H
+
+/*
+ * Tell the user there is some problem.
+ */
+#define _debug_bug_trap()                                      \
+do {                                                           \
+       asm volatile(                                           \
+               "       syscall 15                      \n"     \
+               "0:                                     \n"     \
+               "       .section __bug_table,\"a\"      \n"     \
+               "       .long 0b,%0,%1                  \n"     \
+               "       .previous                       \n"     \
+               :                                               \
+               : "i"(__FILE__), "i"(__LINE__)                  \
+               );                                              \
+} while (0)
+
+#define BUG() _debug_bug_trap()
+
+#define HAVE_ARCH_BUG
+#include <asm-generic/bug.h>
+
+#endif /* _ASM_BUG_H */
diff --git a/arch/mn10300/include/asm/bugs.h b/arch/mn10300/include/asm/bugs.h
new file mode 100644 (file)
index 0000000..31c8bc5
--- /dev/null
@@ -0,0 +1,20 @@
+/* MN10300 Checks for architecture-dependent bugs
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_BUGS_H
+#define _ASM_BUGS_H
+
+#include <asm/processor.h>
+
+static inline void __init check_bugs(void)
+{
+}
+
+#endif /* _ASM_BUGS_H */
diff --git a/arch/mn10300/include/asm/busctl-regs.h b/arch/mn10300/include/asm/busctl-regs.h
new file mode 100644 (file)
index 0000000..1632aef
--- /dev/null
@@ -0,0 +1,151 @@
+/* AM33v2 on-board bus controller registers
+ *
+ * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_BUSCTL_REGS_H
+#define _ASM_BUSCTL_REGS_H
+
+#include <asm/cpu-regs.h>
+
+#ifdef __KERNEL__
+
+/* bus controller registers */
+#define BCCR                   __SYSREG(0xc0002000, u32)       /* bus controller control reg */
+#define BCCR_B0AD              0x00000003      /* block 0 (80000000-83ffffff) bus allocation */
+#define BCCR_B1AD              0x0000000c      /* block 1 (84000000-87ffffff) bus allocation */
+#define BCCR_B2AD              0x00000030      /* block 2 (88000000-8bffffff) bus allocation */
+#define BCCR_B3AD              0x000000c0      /* block 3 (8c000000-8fffffff) bus allocation */
+#define BCCR_B4AD              0x00000300      /* block 4 (90000000-93ffffff) bus allocation */
+#define BCCR_B5AD              0x00000c00      /* block 5 (94000000-97ffffff) bus allocation */
+#define BCCR_B6AD              0x00003000      /* block 6 (98000000-9bffffff) bus allocation */
+#define BCCR_B7AD              0x0000c000      /* block 7 (9c000000-9fffffff) bus allocation */
+#define BCCR_BxAD_EXBUS                0x0             /* - direct to system bus controller */
+#define BCCR_BxAD_OPEXBUS      0x1             /* - direct to memory bus controller */
+#define BCCR_BxAD_OCMBUS       0x2             /* - direct to on chip memory */
+#define BCCR_API               0x00070000      /* bus arbitration priority */
+#define BCCR_API_DMACICD       0x00000000      /* - DMA > CI > CD */
+#define BCCR_API_DMACDCI       0x00010000      /* - DMA > CD > CI */
+#define BCCR_API_CICDDMA       0x00020000      /* - CI > CD > DMA */
+#define BCCR_API_CDCIDMA       0x00030000      /* - CD > CI > DMA */
+#define BCCR_API_ROUNDROBIN    0x00040000      /* - round robin */
+#define BCCR_BEPRI_DMACICD     0x00c00000      /* bus error address priority */
+#define BCCR_BEPRI_DMACDCI     0x00000000      /* - DMA > CI > CD */
+#define BCCR_BEPRI_CICDDMA     0x00400000      /* - DMA > CD > CI */
+#define BCCR_BEPRI_CDCIDMA     0x00800000      /* - CI > CD > DMA */
+#define BCCR_BEPRI             0x00c00000      /* - CD > CI > DMA */
+#define BCCR_TMON              0x03000000      /* timeout value settings */
+#define BCCR_TMON_16IOCLK      0x00000000      /* - 16 IOCLK cycles */
+#define BCCR_TMON_256IOCLK     0x01000000      /* - 256 IOCLK cycles */
+#define BCCR_TMON_4096IOCLK    0x02000000      /* - 4096 IOCLK cycles */
+#define BCCR_TMON_65536IOCLK   0x03000000      /* - 65536 IOCLK cycles */
+#define BCCR_TMOE              0x10000000      /* timeout detection enable */
+
+#define BCBERR                 __SYSREG(0xc0002010, u32)       /* bus error source reg */
+#define BCBERR_BESB            0x0000001f      /* erroneous access destination space */
+#define BCBERR_BESB_MON                0x00000001      /* - monitor space */
+#define BCBERR_BESB_IO         0x00000002      /* - IO bus */
+#define BCBERR_BESB_EX         0x00000004      /* - EX bus */
+#define BCBERR_BESB_OPEX       0x00000008      /* - OpEX bus */
+#define BCBERR_BESB_OCM                0x00000010      /* - on chip memory */
+#define BCBERR_BERW            0x00000100      /* type of access */
+#define BCBERR_BERW_WRITE      0x00000000      /* - write */
+#define BCBERR_BERW_READ       0x00000100      /* - read */
+#define BCBERR_BESD            0x00000200      /* error detector */
+#define BCBERR_BESD_BCU                0x00000000      /* - BCU detected error */
+#define BCBERR_BESD_SLAVE_BUS  0x00000200      /* - slave bus detected error */
+#define BCBERR_BEBST           0x00000400      /* type of access */
+#define BCBERR_BEBST_SINGLE    0x00000000      /* - single */
+#define BCBERR_BEBST_BURST     0x00000400      /* - burst */
+#define BCBERR_BEME            0x00000800      /* multiple bus error flag */
+#define BCBERR_BEMR            0x00007000      /* master bus that caused the error */
+#define BCBERR_BEMR_NOERROR    0x00000000      /* - no error */
+#define BCBERR_BEMR_CI         0x00001000      /* - CPU instruction fetch bus caused error */
+#define BCBERR_BEMR_CD         0x00002000      /* - CPU data bus caused error */
+#define BCBERR_BEMR_DMA                0x00004000      /* - DMA bus caused error */
+
+#define BCBEAR                 __SYSREGC(0xc0002020, u32)      /* bus error address reg */
+
+/* system bus controller registers */
+#define SBBASE(X)              __SYSREG(0xd8c00100 + (X) * 0x10, u32)  /* SBC base addr regs */
+#define SBBASE_BE              0x00000001      /* bank enable */
+#define SBBASE_BAM             0x0000fffe      /* bank address mask [31:17] */
+#define SBBASE_BBA             0xfffe0000      /* bank base address [31:17] */
+
+#define SBCNTRL0(X)            __SYSREG(0xd8c00200 + (X) * 0x10, u32)  /* SBC bank ctrl0 regs */
+#define SBCNTRL0_WEH           0x00000f00      /* write enable hold */
+#define SBCNTRL0_REH           0x0000f000      /* read enable hold */
+#define SBCNTRL0_RWH           0x000f0000      /* SRW signal hold */
+#define SBCNTRL0_CSH           0x00f00000      /* chip select hold */
+#define SBCNTRL0_DAH           0x0f000000      /* data hold */
+#define SBCNTRL0_ADH           0xf0000000      /* address hold */
+
+#define SBCNTRL1(X)            __SYSREG(0xd8c00204 + (X) * 0x10, u32)  /* SBC bank ctrl1 regs */
+#define SBCNTRL1_WED           0x00000f00      /* write enable delay */
+#define SBCNTRL1_RED           0x0000f000      /* read enable delay */
+#define SBCNTRL1_RWD           0x000f0000      /* SRW signal delay */
+#define SBCNTRL1_ASW           0x00f00000      /* address strobe width */
+#define SBCNTRL1_CSD           0x0f000000      /* chip select delay */
+#define SBCNTRL1_ASD           0xf0000000      /* address strobe delay */
+
+#define SBCNTRL2(X)            __SYSREG(0xd8c00208 + (X) * 0x10, u32)  /* SBC bank ctrl2 regs */
+#define SBCNTRL2_WC            0x000000ff      /* wait count */
+#define SBCNTRL2_BWC           0x00000f00      /* burst wait count */
+#define SBCNTRL2_WM            0x01000000      /* wait mode setting */
+#define SBCNTRL2_WM_FIXEDWAIT  0x00000000      /* - fixed wait access */
+#define SBCNTRL2_WM_HANDSHAKE  0x01000000      /* - handshake access */
+#define SBCNTRL2_BM            0x02000000      /* bus synchronisation mode */
+#define SBCNTRL2_BM_SYNC       0x00000000      /* - synchronous mode */
+#define SBCNTRL2_BM_ASYNC      0x02000000      /* - asynchronous mode */
+#define SBCNTRL2_BW            0x04000000      /* bus width */
+#define SBCNTRL2_BW_32         0x00000000      /* - 32 bits */
+#define SBCNTRL2_BW_16         0x04000000      /* - 16 bits */
+#define SBCNTRL2_RWINV         0x08000000      /* R/W signal invert polarity */
+#define SBCNTRL2_RWINV_NORM    0x00000000      /* - normal (read high) */
+#define SBCNTRL2_RWINV_INV     0x08000000      /* - inverted (read low) */
+#define SBCNTRL2_BT            0x70000000      /* bus type setting */
+#define SBCNTRL2_BT_SRAM       0x00000000      /* - SRAM interface */
+#define SBCNTRL2_BT_ADMUX      0x00000000      /* - addr/data multiplexed interface */
+#define SBCNTRL2_BT_BROM       0x00000000      /* - burst ROM interface */
+#define SBCNTRL2_BTSE          0x80000000      /* burst enable */
+
+/* memory bus controller */
+#define SDBASE(X)              __SYSREG(0xda000008 + (X) * 0x4, u32)   /* MBC base addr regs */
+#define SDBASE_CE              0x00000001      /* chip enable */
+#define SDBASE_CBAM            0x0000fff0      /* chip base address mask [31:20] */
+#define SDBASE_CBAM_SHIFT      16
+#define SDBASE_CBA             0xfff00000      /* chip base address [31:20] */
+
+#define SDRAMBUS               __SYSREG(0xda000000, u32)       /* bus mode control reg */
+#define SDRAMBUS_REFEN         0x00000004      /* refresh enable */
+#define SDRAMBUS_TRC           0x00000018      /* refresh command delay time */
+#define SDRAMBUS_BSTPT         0x00000020      /* burst stop command enable */
+#define SDRAMBUS_PONSEQ                0x00000040      /* power on sequence */
+#define SDRAMBUS_SELFREQ       0x00000080      /* self-refresh mode request */
+#define SDRAMBUS_SELFON                0x00000100      /* self-refresh mode on */
+#define SDRAMBUS_SIZE          0x00030000      /* SDRAM size */
+#define SDRAMBUS_SIZE_64Mbit   0x00010000      /* 64Mbit SDRAM (x16) */
+#define SDRAMBUS_SIZE_128Mbit  0x00020000      /* 128Mbit SDRAM (x16) */
+#define SDRAMBUS_SIZE_256Mbit  0x00030000      /* 256Mbit SDRAM (x16) */
+#define SDRAMBUS_TRASWAIT      0x000c0000      /* row address precharge command cycle number */
+#define SDRAMBUS_REFNUM                0x00300000      /* refresh command number */
+#define SDRAMBUS_BSTWAIT       0x00c00000      /* burst stop command cycle */
+#define SDRAMBUS_SETWAIT       0x03000000      /* mode register setting command cycle */
+#define SDRAMBUS_PREWAIT       0x0c000000      /* precharge command cycle */
+#define SDRAMBUS_RASLATE       0x30000000      /* RAS latency */
+#define SDRAMBUS_CASLATE       0xc0000000      /* CAS latency */
+
+#define SDREFCNT               __SYSREG(0xda000004, u32)       /* refresh period reg */
+#define SDREFCNT_PERI          0x00000fff      /* refresh period */
+
+#define SDSHDW                 __SYSREG(0xda000010, u32)       /* test reg */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_BUSCTL_REGS_H */
diff --git a/arch/mn10300/include/asm/byteorder.h b/arch/mn10300/include/asm/byteorder.h
new file mode 100644 (file)
index 0000000..5dd0bdd
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_BYTEORDER_H
+#define _ASM_BYTEORDER_H
+
+#include <linux/byteorder/little_endian.h>
+
+#endif /* _ASM_BYTEORDER_H */
diff --git a/arch/mn10300/include/asm/cache.h b/arch/mn10300/include/asm/cache.h
new file mode 100644 (file)
index 0000000..e03cfa2
--- /dev/null
@@ -0,0 +1,54 @@
+/* MN10300 cache management registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_CACHE_H
+#define _ASM_CACHE_H
+
+#include <asm/cpu-regs.h>
+#include <proc/cache.h>
+
+#ifndef __ASSEMBLY__
+#define L1_CACHE_DISPARITY     (L1_CACHE_NENTRIES * L1_CACHE_BYTES)
+#else
+#define L1_CACHE_DISPARITY     L1_CACHE_NENTRIES * L1_CACHE_BYTES
+#endif
+
+/* data cache purge registers
+ * - read from the register to unconditionally purge that cache line
+ * - write address & 0xffffff00 to conditionally purge that cache line
+ *   - clear LSB to request invalidation as well
+ */
+#define DCACHE_PURGE(WAY, ENTRY) \
+       __SYSREG(0xc8400000 + (WAY) * L1_CACHE_WAYDISP + \
+                (ENTRY) * L1_CACHE_BYTES, u32)
+
+#define DCACHE_PURGE_WAY0(ENTRY) \
+       __SYSREG(0xc8400000 + 0 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
+#define DCACHE_PURGE_WAY1(ENTRY) \
+       __SYSREG(0xc8400000 + 1 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
+#define DCACHE_PURGE_WAY2(ENTRY) \
+       __SYSREG(0xc8400000 + 2 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
+#define DCACHE_PURGE_WAY3(ENTRY) \
+       __SYSREG(0xc8400000 + 3 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
+
+/* instruction cache access registers */
+#define ICACHE_DATA(WAY, ENTRY, OFF) \
+       __SYSREG(0xc8000000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10 + (OFF) * 4, u32)
+#define ICACHE_TAG(WAY, ENTRY)  \
+       __SYSREG(0xc8100000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10, u32)
+
+/* instruction cache access registers */
+#define DCACHE_DATA(WAY, ENTRY, OFF) \
+       __SYSREG(0xc8200000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10 + (OFF) * 4, u32)
+#define DCACHE_TAG(WAY, ENTRY)  \
+       __SYSREG(0xc8300000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10, u32)
+
+#endif /* _ASM_CACHE_H */
diff --git a/arch/mn10300/include/asm/cacheflush.h b/arch/mn10300/include/asm/cacheflush.h
new file mode 100644 (file)
index 0000000..2db746a
--- /dev/null
@@ -0,0 +1,116 @@
+/* MN10300 Cache flushing
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_CACHEFLUSH_H
+#define _ASM_CACHEFLUSH_H
+
+#ifndef __ASSEMBLY__
+
+/* Keep includes the same across arches.  */
+#include <linux/mm.h>
+
+/*
+ * virtually-indexed cache managment (our cache is physically indexed)
+ */
+#define flush_cache_all()                      do {} while (0)
+#define flush_cache_mm(mm)                     do {} while (0)
+#define flush_cache_dup_mm(mm)                 do {} while (0)
+#define flush_cache_range(mm, start, end)      do {} while (0)
+#define flush_cache_page(vma, vmaddr, pfn)     do {} while (0)
+#define flush_cache_vmap(start, end)           do {} while (0)
+#define flush_cache_vunmap(start, end)         do {} while (0)
+#define flush_dcache_page(page)                        do {} while (0)
+#define flush_dcache_mmap_lock(mapping)                do {} while (0)
+#define flush_dcache_mmap_unlock(mapping)      do {} while (0)
+
+/*
+ * physically-indexed cache managment
+ */
+#ifndef CONFIG_MN10300_CACHE_DISABLED
+
+extern void flush_icache_range(unsigned long start, unsigned long end);
+extern void flush_icache_page(struct vm_area_struct *vma, struct page *pg);
+
+#else
+
+#define flush_icache_range(start, end)         do {} while (0)
+#define flush_icache_page(vma, pg)             do {} while (0)
+
+#endif
+
+#define flush_icache_user_range(vma, pg, adr, len) \
+       flush_icache_range(adr, adr + len)
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
+       do {                                    \
+               memcpy(dst, src, len);          \
+               flush_icache_page(vma, page);   \
+       } while (0)
+
+#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
+       memcpy(dst, src, len)
+
+/*
+ * primitive routines
+ */
+#ifndef CONFIG_MN10300_CACHE_DISABLED
+extern void mn10300_icache_inv(void);
+extern void mn10300_dcache_inv(void);
+extern void mn10300_dcache_inv_page(unsigned start);
+extern void mn10300_dcache_inv_range(unsigned start, unsigned end);
+extern void mn10300_dcache_inv_range2(unsigned start, unsigned size);
+#ifdef CONFIG_MN10300_CACHE_WBACK
+extern void mn10300_dcache_flush(void);
+extern void mn10300_dcache_flush_page(unsigned start);
+extern void mn10300_dcache_flush_range(unsigned start, unsigned end);
+extern void mn10300_dcache_flush_range2(unsigned start, unsigned size);
+extern void mn10300_dcache_flush_inv(void);
+extern void mn10300_dcache_flush_inv_page(unsigned start);
+extern void mn10300_dcache_flush_inv_range(unsigned start, unsigned end);
+extern void mn10300_dcache_flush_inv_range2(unsigned start, unsigned size);
+#else
+#define mn10300_dcache_flush()                         do {} while (0)
+#define mn10300_dcache_flush_page(start)               do {} while (0)
+#define mn10300_dcache_flush_range(start, end)         do {} while (0)
+#define mn10300_dcache_flush_range2(start, size)       do {} while (0)
+#define mn10300_dcache_flush_inv()                     mn10300_dcache_inv()
+#define mn10300_dcache_flush_inv_page(start) \
+       mn10300_dcache_inv_page((start))
+#define mn10300_dcache_flush_inv_range(start, end) \
+       mn10300_dcache_inv_range((start), (end))
+#define mn10300_dcache_flush_inv_range2(start, size) \
+       mn10300_dcache_inv_range2((start), (size))
+#endif /* CONFIG_MN10300_CACHE_WBACK */
+#else
+#define mn10300_icache_inv()                           do {} while (0)
+#define mn10300_dcache_inv()                           do {} while (0)
+#define mn10300_dcache_inv_page(start)                 do {} while (0)
+#define mn10300_dcache_inv_range(start, end)           do {} while (0)
+#define mn10300_dcache_inv_range2(start, size)         do {} while (0)
+#define mn10300_dcache_flush()                         do {} while (0)
+#define mn10300_dcache_flush_inv_page(start)           do {} while (0)
+#define mn10300_dcache_flush_inv()                     do {} while (0)
+#define mn10300_dcache_flush_inv_range(start, end)     do {} while (0)
+#define mn10300_dcache_flush_inv_range2(start, size)   do {} while (0)
+#define mn10300_dcache_flush_page(start)               do {} while (0)
+#define mn10300_dcache_flush_range(start, end)         do {} while (0)
+#define mn10300_dcache_flush_range2(start, size)       do {} while (0)
+#endif /* CONFIG_MN10300_CACHE_DISABLED */
+
+/*
+ * internal debugging function
+ */
+#ifdef CONFIG_DEBUG_PAGEALLOC
+extern void kernel_map_pages(struct page *page, int numpages, int enable);
+#endif
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_CACHEFLUSH_H */
diff --git a/arch/mn10300/include/asm/checksum.h b/arch/mn10300/include/asm/checksum.h
new file mode 100644 (file)
index 0000000..9fb2a8d
--- /dev/null
@@ -0,0 +1,86 @@
+/* MN10300 Optimised checksumming code
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_CHECKSUM_H
+#define _ASM_CHECKSUM_H
+
+extern __wsum csum_partial(const void *buff, int len, __wsum sum);
+extern __wsum csum_partial_copy_nocheck(const void *src, void *dst,
+                                       int len, __wsum sum);
+extern __wsum csum_partial_copy_from_user(const void *src, void *dst,
+                                         int len, __wsum sum,
+                                         int *err_ptr);
+extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl);
+extern __wsum csum_partial(const void *buff, int len, __wsum sum);
+extern __sum16 ip_compute_csum(const void *buff, int len);
+
+#define csum_partial_copy_fromuser csum_partial_copy
+extern __wsum csum_partial_copy(const void *src, void *dst, int len,
+                               __wsum sum);
+
+static inline __sum16 csum_fold(__wsum sum)
+{
+       asm(
+               "       add     %1,%0           \n"
+               "       addc    0xffff,%0       \n"
+               : "=r" (sum)
+               : "r" (sum << 16), "0" (sum & 0xffff0000)
+               : "cc"
+           );
+       return (~sum) >> 16;
+}
+
+static inline __wsum csum_tcpudp_nofold(unsigned long saddr,
+                                       unsigned long daddr,
+                                       unsigned short len,
+                                       unsigned short proto,
+                                       __wsum sum)
+{
+       __wsum tmp;
+
+       tmp = (__wsum) ntohs(len) << 16;
+       tmp += (__wsum) proto << 8;
+
+       asm(
+               "       add     %1,%0           \n"
+               "       addc    %2,%0           \n"
+               "       addc    %3,%0           \n"
+               "       addc    0,%0            \n"
+               : "=r" (sum)
+               : "r" (daddr), "r"(saddr), "r"(tmp), "0"(sum)
+               : "cc"
+           );
+       return sum;
+}
+
+/*
+ * computes the checksum of the TCP/UDP pseudo-header
+ * returns a 16-bit checksum, already complemented
+ */
+static inline __sum16 csum_tcpudp_magic(unsigned long saddr,
+                                       unsigned long daddr,
+                                       unsigned short len,
+                                       unsigned short proto,
+                                       __wsum sum)
+{
+       return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
+}
+
+#undef _HAVE_ARCH_IPV6_CSUM
+
+/*
+ *     Copy and checksum to user
+ */
+#define HAVE_CSUM_COPY_USER
+extern __wsum csum_and_copy_to_user(const void *src, void *dst, int len,
+                                   __wsum sum, int *err_ptr);
+
+
+#endif /* _ASM_CHECKSUM_H */
diff --git a/arch/mn10300/include/asm/cpu-regs.h b/arch/mn10300/include/asm/cpu-regs.h
new file mode 100644 (file)
index 0000000..757e9b5
--- /dev/null
@@ -0,0 +1,290 @@
+/* MN10300 Core system registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_CPU_REGS_H
+#define _ASM_CPU_REGS_H
+
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+#endif
+
+#ifdef CONFIG_MN10300_CPU_AM33V2
+/* we tell the compiler to pretend to be AM33 so that it doesn't try and use
+ * the FP regs, but tell the assembler that we're actually allowed AM33v2
+ * instructions */
+#ifndef __ASSEMBLY__
+asm(" .am33_2\n");
+#else
+.am33_2
+#endif
+#endif
+
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+#define __SYSREG(ADDR, TYPE) (*(volatile TYPE *)(ADDR))
+#define __SYSREGC(ADDR, TYPE) (*(const volatile TYPE *)(ADDR))
+#else
+#define __SYSREG(ADDR, TYPE) ADDR
+#define __SYSREGC(ADDR, TYPE) ADDR
+#endif
+
+/* CPU registers */
+#define EPSW_FLAG_Z            0x00000001      /* zero flag */
+#define EPSW_FLAG_N            0x00000002      /* negative flag */
+#define EPSW_FLAG_C            0x00000004      /* carry flag */
+#define EPSW_FLAG_V            0x00000008      /* overflow flag */
+#define EPSW_IM                        0x00000700      /* interrupt mode */
+#define EPSW_IM_0              0x00000000      /* interrupt mode 0 */
+#define EPSW_IM_1              0x00000100      /* interrupt mode 1 */
+#define EPSW_IM_2              0x00000200      /* interrupt mode 2 */
+#define EPSW_IM_3              0x00000300      /* interrupt mode 3 */
+#define EPSW_IM_4              0x00000400      /* interrupt mode 4 */
+#define EPSW_IM_5              0x00000500      /* interrupt mode 5 */
+#define EPSW_IM_6              0x00000600      /* interrupt mode 6 */
+#define EPSW_IM_7              0x00000700      /* interrupt mode 7 */
+#define EPSW_IE                        0x00000800      /* interrupt enable */
+#define EPSW_S                 0x00003000      /* software auxilliary bits */
+#define EPSW_T                 0x00008000      /* trace enable */
+#define EPSW_nSL               0x00010000      /* not supervisor level */
+#define EPSW_NMID              0x00020000      /* nonmaskable interrupt disable */
+#define EPSW_nAR               0x00040000      /* register bank control */
+#define EPSW_ML                        0x00080000      /* monitor level */
+#define EPSW_FE                        0x00100000      /* FPU enable */
+
+/* FPU registers */
+#define FPCR_EF_I              0x00000001      /* inexact result FPU exception flag */
+#define FPCR_EF_U              0x00000002      /* underflow FPU exception flag */
+#define FPCR_EF_O              0x00000004      /* overflow FPU exception flag */
+#define FPCR_EF_Z              0x00000008      /* zero divide FPU exception flag */
+#define FPCR_EF_V              0x00000010      /* invalid operand FPU exception flag */
+#define FPCR_EE_I              0x00000020      /* inexact result FPU exception enable */
+#define FPCR_EE_U              0x00000040      /* underflow FPU exception enable */
+#define FPCR_EE_O              0x00000080      /* overflow FPU exception enable */
+#define FPCR_EE_Z              0x00000100      /* zero divide FPU exception enable */
+#define FPCR_EE_V              0x00000200      /* invalid operand FPU exception enable */
+#define FPCR_EC_I              0x00000400      /* inexact result FPU exception cause */
+#define FPCR_EC_U              0x00000800      /* underflow FPU exception cause */
+#define FPCR_EC_O              0x00001000      /* overflow FPU exception cause */
+#define FPCR_EC_Z              0x00002000      /* zero divide FPU exception cause */
+#define FPCR_EC_V              0x00004000      /* invalid operand FPU exception cause */
+#define FPCR_RM                        0x00030000      /* rounding mode */
+#define FPCR_RM_NEAREST                0x00000000      /* - round to nearest value */
+#define FPCR_FCC_U             0x00040000      /* FPU unordered condition code */
+#define FPCR_FCC_E             0x00080000      /* FPU equal condition code */
+#define FPCR_FCC_G             0x00100000      /* FPU greater than condition code */
+#define FPCR_FCC_L             0x00200000      /* FPU less than condition code */
+#define FPCR_INIT              0x00000000      /* no exceptions, rounding to nearest */
+
+/* CPU control registers */
+#define CPUP                   __SYSREG(0xc0000020, u16)       /* CPU pipeline register */
+#define CPUP_DWBD              0x0020          /* write buffer disable flag */
+#define CPUP_IPFD              0x0040          /* instruction prefetch disable flag */
+#define CPUP_EXM               0x0080          /* exception operation mode */
+#define CPUP_EXM_AM33V1                0x0000          /* - AM33 v1 exception mode */
+#define CPUP_EXM_AM33V2                0x0080          /* - AM33 v2 exception mode */
+
+#define CPUM                   __SYSREG(0xc0000040, u16)       /* CPU mode register */
+#define CPUM_SLEEP             0x0004          /* set to enter sleep state */
+#define CPUM_HALT              0x0008          /* set to enter halt state */
+#define CPUM_STOP              0x0010          /* set to enter stop state */
+
+#define CPUREV                 __SYSREGC(0xc0000050, u32)      /* CPU revision register */
+#define CPUREV_TYPE            0x0000000f      /* CPU type */
+#define CPUREV_TYPE_S          0
+#define CPUREV_TYPE_AM33V1     0x00000000      /* - AM33 V1 core, AM33/1.00 arch */
+#define CPUREV_TYPE_AM33V2     0x00000001      /* - AM33 V2 core, AM33/2.00 arch */
+#define CPUREV_TYPE_AM34V1     0x00000002      /* - AM34 V1 core, AM33/2.00 arch */
+#define CPUREV_REVISION                0x000000f0      /* CPU revision */
+#define CPUREV_REVISION_S      4
+#define CPUREV_ICWAY           0x00000f00      /* number of instruction cache ways */
+#define CPUREV_ICWAY_S         8
+#define CPUREV_ICSIZE          0x0000f000      /* instruction cache way size */
+#define CPUREV_ICSIZE_S                12
+#define CPUREV_DCWAY           0x000f0000      /* number of data cache ways */
+#define CPUREV_DCWAY_S         16
+#define CPUREV_DCSIZE          0x00f00000      /* data cache way size */
+#define CPUREV_DCSIZE_S                20
+#define CPUREV_FPUTYPE         0x0f000000      /* FPU core type */
+#define CPUREV_FPUTYPE_NONE    0x00000000      /* - no FPU core implemented */
+#define CPUREV_OCDCTG          0xf0000000      /* on-chip debug function category */
+
+#define DCR                    __SYSREG(0xc0000030, u16)       /* Debug control register */
+
+/* interrupt/exception control registers */
+#define IVAR0                  __SYSREG(0xc0000000, u16)       /* interrupt vector 0 */
+#define IVAR1                  __SYSREG(0xc0000004, u16)       /* interrupt vector 1 */
+#define IVAR2                  __SYSREG(0xc0000008, u16)       /* interrupt vector 2 */
+#define IVAR3                  __SYSREG(0xc000000c, u16)       /* interrupt vector 3 */
+#define IVAR4                  __SYSREG(0xc0000010, u16)       /* interrupt vector 4 */
+#define IVAR5                  __SYSREG(0xc0000014, u16)       /* interrupt vector 5 */
+#define IVAR6                  __SYSREG(0xc0000018, u16)       /* interrupt vector 6 */
+
+#define TBR                    __SYSREG(0xc0000024, u32)       /* Trap table base */
+#define TBR_TB                 0xff000000      /* table base address bits 31-24 */
+#define TBR_INT_CODE           0x00ffffff      /* interrupt code */
+
+#define DEAR                   __SYSREG(0xc0000038, u32)       /* Data access exception address */
+
+#define sISR                   __SYSREG(0xc0000044, u32)       /* Supervisor interrupt status */
+#define        sISR_IRQICE             0x00000001      /* ICE interrupt */
+#define        sISR_ISTEP              0x00000002      /* single step interrupt */
+#define        sISR_MISSA              0x00000004      /* memory access address misalignment fault */
+#define        sISR_UNIMP              0x00000008      /* unimplemented instruction execution fault */
+#define        sISR_PIEXE              0x00000010      /* program interrupt */
+#define        sISR_MEMERR             0x00000020      /* illegal memory access fault */
+#define        sISR_IBREAK             0x00000040      /* instraction break interrupt */
+#define        sISR_DBSRL              0x00000080      /* debug serial interrupt */
+#define        sISR_PERIDB             0x00000100      /* peripheral debug interrupt */
+#define        sISR_EXUNIMP            0x00000200      /* unimplemented ex-instruction execution fault */
+#define        sISR_OBREAK             0x00000400      /* operand break interrupt */
+#define        sISR_PRIV               0x00000800      /* privileged instruction execution fault */
+#define        sISR_BUSERR             0x00001000      /* bus error fault */
+#define        sISR_DBLFT              0x00002000      /* double fault */
+#define        sISR_DBG                0x00008000      /* debug reserved interrupt */
+#define sISR_ITMISS            0x00010000      /* instruction TLB miss */
+#define sISR_DTMISS            0x00020000      /* data TLB miss */
+#define sISR_ITEX              0x00040000      /* instruction TLB access exception */
+#define sISR_DTEX              0x00080000      /* data TLB access exception */
+#define sISR_ILGIA             0x00100000      /* illegal instruction access exception */
+#define sISR_ILGDA             0x00200000      /* illegal data access exception */
+#define sISR_IOIA              0x00400000      /* internal I/O space instruction access excep */
+#define sISR_PRIVA             0x00800000      /* privileged space instruction access excep */
+#define sISR_PRIDA             0x01000000      /* privileged space data access excep */
+#define sISR_DISA              0x02000000      /* data space instruction access excep */
+#define sISR_SYSC              0x04000000      /* system call instruction excep */
+#define sISR_FPUD              0x08000000      /* FPU disabled excep */
+#define sISR_FPUUI             0x10000000      /* FPU unimplemented instruction excep */
+#define sISR_FPUOP             0x20000000      /* FPU operation excep */
+#define sISR_NE                        0x80000000      /* multiple synchronous exceptions excep */
+
+/* cache control registers */
+#define CHCTR                  __SYSREG(0xc0000070, u16)       /* cache control */
+#define CHCTR_ICEN             0x0001          /* instruction cache enable */
+#define CHCTR_DCEN             0x0002          /* data cache enable */
+#define CHCTR_ICBUSY           0x0004          /* instruction cache busy */
+#define CHCTR_DCBUSY           0x0008          /* data cache busy */
+#define CHCTR_ICINV            0x0010          /* instruction cache invalidate */
+#define CHCTR_DCINV            0x0020          /* data cache invalidate */
+#define CHCTR_DCWTMD           0x0040          /* data cache writing mode */
+#define CHCTR_DCWTMD_WRBACK    0x0000          /* - write back mode */
+#define CHCTR_DCWTMD_WRTHROUGH 0x0040          /* - write through mode */
+#define CHCTR_DCALMD           0x0080          /* data cache allocation mode */
+#define CHCTR_ICWMD            0x0f00          /* instruction cache way mode */
+#define CHCTR_DCWMD            0xf000          /* data cache way mode */
+
+/* MMU control registers */
+#define MMUCTR                 __SYSREG(0xc0000090, u32)       /* MMU control register */
+#define MMUCTR_IRP             0x0000003f      /* instruction TLB replace pointer */
+#define MMUCTR_ITE             0x00000040      /* instruction TLB enable */
+#define MMUCTR_IIV             0x00000080      /* instruction TLB invalidate */
+#define MMUCTR_ITL             0x00000700      /* instruction TLB lock pointer */
+#define MMUCTR_ITL_NOLOCK      0x00000000      /* - no lock */
+#define MMUCTR_ITL_LOCK0       0x00000100      /* - entry 0 locked */
+#define MMUCTR_ITL_LOCK0_1     0x00000200      /* - entry 0-1 locked */
+#define MMUCTR_ITL_LOCK0_3     0x00000300      /* - entry 0-3 locked */
+#define MMUCTR_ITL_LOCK0_7     0x00000400      /* - entry 0-7 locked */
+#define MMUCTR_ITL_LOCK0_15    0x00000500      /* - entry 0-15 locked */
+#define MMUCTR_CE              0x00008000      /* cacheable bit enable */
+#define MMUCTR_DRP             0x003f0000      /* data TLB replace pointer */
+#define MMUCTR_DTE             0x00400000      /* data TLB enable */
+#define MMUCTR_DIV             0x00800000      /* data TLB invalidate */
+#define MMUCTR_DTL             0x07000000      /* data TLB lock pointer */
+#define MMUCTR_DTL_NOLOCK      0x00000000      /* - no lock */
+#define MMUCTR_DTL_LOCK0       0x01000000      /* - entry 0 locked */
+#define MMUCTR_DTL_LOCK0_1     0x02000000      /* - entry 0-1 locked */
+#define MMUCTR_DTL_LOCK0_3     0x03000000      /* - entry 0-3 locked */
+#define MMUCTR_DTL_LOCK0_7     0x04000000      /* - entry 0-7 locked */
+#define MMUCTR_DTL_LOCK0_15    0x05000000      /* - entry 0-15 locked */
+
+#define PIDR                   __SYSREG(0xc0000094, u16)       /* PID register */
+#define PIDR_PID               0x00ff          /* process identifier */
+
+#define PTBR                   __SYSREG(0xc0000098, unsigned long) /* Page table base register */
+
+#define IPTEL                  __SYSREG(0xc00000a0, u32)       /* instruction TLB entry */
+#define DPTEL                  __SYSREG(0xc00000b0, u32)       /* data TLB entry */
+#define xPTEL_V                        0x00000001      /* TLB entry valid */
+#define xPTEL_UNUSED1          0x00000002      /* unused bit */
+#define xPTEL_UNUSED2          0x00000004      /* unused bit */
+#define xPTEL_C                        0x00000008      /* cached if set */
+#define xPTEL_PV               0x00000010      /* page valid */
+#define xPTEL_D                        0x00000020      /* dirty */
+#define xPTEL_PR               0x000001c0      /* page protection */
+#define xPTEL_PR_ROK           0x00000000      /* - R/O kernel */
+#define xPTEL_PR_RWK           0x00000100      /* - R/W kernel */
+#define xPTEL_PR_ROK_ROU       0x00000080      /* - R/O kernel and R/O user */
+#define xPTEL_PR_RWK_ROU       0x00000180      /* - R/W kernel and R/O user */
+#define xPTEL_PR_RWK_RWU       0x000001c0      /* - R/W kernel and R/W user */
+#define xPTEL_G                        0x00000200      /* global (use PID if 0) */
+#define xPTEL_PS               0x00000c00      /* page size */
+#define xPTEL_PS_4Kb           0x00000000      /* - 4Kb page */
+#define xPTEL_PS_128Kb         0x00000400      /* - 128Kb page */
+#define xPTEL_PS_1Kb           0x00000800      /* - 1Kb page */
+#define xPTEL_PS_4Mb           0x00000c00      /* - 4Mb page */
+#define xPTEL_PPN              0xfffff006      /* physical page number */
+
+#define xPTEL_V_BIT            0       /* bit numbers corresponding to above masks */
+#define xPTEL_UNUSED1_BIT      1
+#define xPTEL_UNUSED2_BIT      2
+#define xPTEL_C_BIT            3
+#define xPTEL_PV_BIT           4
+#define xPTEL_D_BIT            5
+#define xPTEL_G_BIT            9
+
+#define IPTEU                  __SYSREG(0xc00000a4, u32)       /* instruction TLB virtual addr */
+#define DPTEU                  __SYSREG(0xc00000b4, u32)       /* data TLB virtual addr */
+#define xPTEU_VPN              0xfffffc00      /* virtual page number */
+#define xPTEU_PID              0x000000ff      /* process identifier to which applicable */
+
+#define IPTEL2                 __SYSREG(0xc00000a8, u32)       /* instruction TLB entry */
+#define DPTEL2                 __SYSREG(0xc00000b8, u32)       /* data TLB entry */
+#define xPTEL2_V               0x00000001      /* TLB entry valid */
+#define xPTEL2_C               0x00000002      /* cacheable */
+#define xPTEL2_PV              0x00000004      /* page valid */
+#define xPTEL2_D               0x00000008      /* dirty */
+#define xPTEL2_PR              0x00000070      /* page protection */
+#define xPTEL2_PR_ROK          0x00000000      /* - R/O kernel */
+#define xPTEL2_PR_RWK          0x00000040      /* - R/W kernel */
+#define xPTEL2_PR_ROK_ROU      0x00000020      /* - R/O kernel and R/O user */
+#define xPTEL2_PR_RWK_ROU      0x00000060      /* - R/W kernel and R/O user */
+#define xPTEL2_PR_RWK_RWU      0x00000070      /* - R/W kernel and R/W user */
+#define xPTEL2_G               0x00000080      /* global (use PID if 0) */
+#define xPTEL2_PS              0x00000300      /* page size */
+#define xPTEL2_PS_4Kb          0x00000000      /* - 4Kb page */
+#define xPTEL2_PS_128Kb                0x00000100      /* - 128Kb page */
+#define xPTEL2_PS_1Kb          0x00000200      /* - 1Kb page */
+#define xPTEL2_PS_4Mb          0x00000300      /* - 4Mb page */
+#define xPTEL2_PPN             0xfffffc00      /* physical page number */
+
+#define MMUFCR                 __SYSREGC(0xc000009c, u32)      /* MMU exception cause */
+#define MMUFCR_IFC             __SYSREGC(0xc000009c, u16)      /* MMU instruction excep cause */
+#define MMUFCR_DFC             __SYSREGC(0xc000009e, u16)      /* MMU data exception cause */
+#define MMUFCR_xFC_TLBMISS     0x0001          /* TLB miss flag */
+#define MMUFCR_xFC_INITWR      0x0002          /* initial write excep flag */
+#define MMUFCR_xFC_PGINVAL     0x0004          /* page invalid excep flag */
+#define MMUFCR_xFC_PROTVIOL    0x0008          /* protection violation excep flag */
+#define MMUFCR_xFC_ACCESS      0x0010          /* access level flag */
+#define MMUFCR_xFC_ACCESS_USR  0x0000          /* - user mode */
+#define MMUFCR_xFC_ACCESS_SR   0x0010          /* - supervisor mode */
+#define MMUFCR_xFC_TYPE                0x0020          /* access type flag */
+#define MMUFCR_xFC_TYPE_READ   0x0000          /* - read */
+#define MMUFCR_xFC_TYPE_WRITE  0x0020          /* - write */
+#define MMUFCR_xFC_PR          0x01c0          /* page protection flag */
+#define MMUFCR_xFC_PR_ROK      0x0000          /* - R/O kernel */
+#define MMUFCR_xFC_PR_RWK      0x0100          /* - R/W kernel */
+#define MMUFCR_xFC_PR_ROK_ROU  0x0080          /* - R/O kernel and R/O user */
+#define MMUFCR_xFC_PR_RWK_ROU  0x0180          /* - R/W kernel and R/O user */
+#define MMUFCR_xFC_PR_RWK_RWU  0x01c0          /* - R/W kernel and R/W user */
+#define MMUFCR_xFC_ILLADDR     0x0200          /* illegal address excep flag */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_CPU_REGS_H */
diff --git a/arch/mn10300/include/asm/cputime.h b/arch/mn10300/include/asm/cputime.h
new file mode 100644 (file)
index 0000000..6d68ad7
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/cputime.h>
diff --git a/arch/mn10300/include/asm/current.h b/arch/mn10300/include/asm/current.h
new file mode 100644 (file)
index 0000000..ca6027d
--- /dev/null
@@ -0,0 +1,37 @@
+/* MN10300 Current task structure accessor
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_CURRENT_H
+#define _ASM_CURRENT_H
+
+#include <linux/thread_info.h>
+
+/*
+ * dedicate E2 to keeping the current task pointer
+ */
+#ifdef CONFIG_MN10300_CURRENT_IN_E2
+
+register struct task_struct *const current asm("e2") __attribute__((used));
+
+#define get_current() current
+
+extern struct task_struct *__current;
+
+#else
+static inline __attribute__((const))
+struct task_struct *get_current(void)
+{
+       return current_thread_info()->task;
+}
+
+#define current get_current()
+#endif
+
+#endif /* _ASM_CURRENT_H */
diff --git a/arch/mn10300/include/asm/delay.h b/arch/mn10300/include/asm/delay.h
new file mode 100644 (file)
index 0000000..34517b3
--- /dev/null
@@ -0,0 +1,19 @@
+/* MN10300 Uninterruptible delay routines
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_DELAY_H
+#define _ASM_DELAY_H
+
+extern void __udelay(unsigned long usecs);
+extern void __delay(unsigned long loops);
+
+#define udelay(n) __udelay(n)
+
+#endif /* _ASM_DELAY_H */
diff --git a/arch/mn10300/include/asm/device.h b/arch/mn10300/include/asm/device.h
new file mode 100644 (file)
index 0000000..f0a4c25
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/device.h>
diff --git a/arch/mn10300/include/asm/div64.h b/arch/mn10300/include/asm/div64.h
new file mode 100644 (file)
index 0000000..3a8329b
--- /dev/null
@@ -0,0 +1,100 @@
+/* MN10300 64-bit division
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_DIV64
+#define _ASM_DIV64
+
+#include <linux/types.h>
+
+extern void ____unhandled_size_in_do_div___(void);
+
+/*
+ * divide n by base, leaving the result in n and returning the remainder
+ * - we can do this quite efficiently on the MN10300 by cascading the divides
+ *   through the MDR register
+ */
+#define do_div(n, base)                                                        \
+({                                                                     \
+       unsigned __rem = 0;                                             \
+       if (sizeof(n) <= 4) {                                           \
+               asm("mov        %1,mdr  \n"                             \
+                   "divu       %2,%0   \n"                             \
+                   "mov        mdr,%1  \n"                             \
+                   : "+r"(n), "=d"(__rem)                              \
+                   : "r"(base), "1"(__rem)                             \
+                   : "cc"                                              \
+                   );                                                  \
+       } else if (sizeof(n) <= 8) {                                    \
+               union {                                                 \
+                       unsigned long long l;                           \
+                       u32 w[2];                                       \
+               } __quot;                                               \
+               __quot.l = n;                                           \
+               asm("mov        %0,mdr  \n"     /* MDR = 0 */           \
+                   "divu       %3,%1   \n"                             \
+                   /* __quot.MSL = __div.MSL / base, */                \
+                   /* MDR = MDR:__div.MSL % base */                    \
+                   "divu       %3,%2   \n"                             \
+                   /* __quot.LSL = MDR:__div.LSL / base, */            \
+                   /* MDR = MDR:__div.LSL % base */                    \
+                   "mov        mdr,%0  \n"                             \
+                   : "=d"(__rem), "=r"(__quot.w[1]), "=r"(__quot.w[0]) \
+                   : "r"(base), "0"(__rem), "1"(__quot.w[1]),          \
+                     "2"(__quot.w[0])                                  \
+                   : "cc"                                              \
+                   );                                                  \
+               n = __quot.l;                                           \
+       } else {                                                        \
+               ____unhandled_size_in_do_div___();                      \
+       }                                                               \
+       __rem;                                                          \
+})
+
+/*
+ * do an unsigned 32-bit multiply and divide with intermediate 64-bit product
+ * so as not to lose accuracy
+ * - we use the MDR register to hold the MSW of the product
+ */
+static inline __attribute__((const))
+unsigned __muldiv64u(unsigned val, unsigned mult, unsigned div)
+{
+       unsigned result;
+
+       asm("mulu       %2,%0   \n"     /* MDR:val = val*mult */
+           "divu       %3,%0   \n"     /* val = MDR:val/div;
+                                        * MDR = MDR:val%div */
+           : "=r"(result)
+           : "0"(val), "ir"(mult), "r"(div)
+           );
+
+       return result;
+}
+
+/*
+ * do a signed 32-bit multiply and divide with intermediate 64-bit product so
+ * as not to lose accuracy
+ * - we use the MDR register to hold the MSW of the product
+ */
+static inline __attribute__((const))
+signed __muldiv64s(signed val, signed mult, signed div)
+{
+       signed result;
+
+       asm("mul        %2,%0   \n"     /* MDR:val = val*mult */
+           "div        %3,%0   \n"     /* val = MDR:val/div;
+                                        * MDR = MDR:val%div */
+           : "=r"(result)
+           : "0"(val), "ir"(mult), "r"(div)
+           );
+
+       return result;
+}
+
+#endif /* _ASM_DIV64 */
diff --git a/arch/mn10300/include/asm/dma-mapping.h b/arch/mn10300/include/asm/dma-mapping.h
new file mode 100644 (file)
index 0000000..ccae8f6
--- /dev/null
@@ -0,0 +1,234 @@
+/* DMA mapping routines for the MN10300 arch
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_DMA_MAPPING_H
+#define _ASM_DMA_MAPPING_H
+
+#include <linux/mm.h>
+#include <linux/scatterlist.h>
+
+#include <asm/cache.h>
+#include <asm/io.h>
+
+extern void *dma_alloc_coherent(struct device *dev, size_t size,
+                               dma_addr_t *dma_handle, int flag);
+
+extern void dma_free_coherent(struct device *dev, size_t size,
+                             void *vaddr, dma_addr_t dma_handle);
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent((d), (s), (h), (f))
+#define dma_free_noncoherent(d, s, v, h)  dma_free_coherent((d), (s), (v), (h))
+
+/*
+ * Map a single buffer of the indicated size for DMA in streaming mode.  The
+ * 32-bit bus address to use is returned.
+ *
+ * Once the device is given the dma address, the device owns this memory until
+ * either pci_unmap_single or pci_dma_sync_single is performed.
+ */
+static inline
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
+                         enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+       mn10300_dcache_flush_inv();
+       return virt_to_bus(ptr);
+}
+
+/*
+ * Unmap a single streaming mode DMA translation.  The dma_addr and size must
+ * match what was provided for in a previous pci_map_single call.  All other
+ * usages are undefined.
+ *
+ * After this call, reads by the cpu to the buffer are guarenteed to see
+ * whatever the device wrote there.
+ */
+static inline
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+                     enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+/*
+ * Map a set of buffers described by scatterlist in streaming mode for DMA.
+ * This is the scather-gather version of the above pci_map_single interface.
+ * Here the scatter gather list elements are each tagged with the appropriate
+ * dma address and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of DMA
+ *       address/length pairs than there are SG table elements.  (for example
+ *       via virtual mapping capabilities) The routine returns the number of
+ *       addr/length pairs actually used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are the same
+ * here.
+ */
+static inline
+int dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
+              enum dma_data_direction direction)
+{
+       struct scatterlist *sg;
+       int i;
+
+       BUG_ON(!valid_dma_direction(direction));
+       WARN_ON(nents == 0 || sglist[0].length == 0);
+
+       for_each_sg(sglist, sg, nents, i) {
+               BUG_ON(!sg_page(sg));
+
+               sg->dma_address = sg_phys(sg);
+       }
+
+       mn10300_dcache_flush_inv();
+       return nents;
+}
+
+/*
+ * Unmap a set of streaming mode DMA translations.
+ * Again, cpu read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
+ */
+static inline
+void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
+                 enum dma_data_direction direction)
+{
+       BUG_ON(!valid_dma_direction(direction));
+}
+
+/*
+ * pci_{map,unmap}_single_page maps a kernel page to a dma_addr_t. identical
+ * to pci_map_single, but takes a struct page instead of a virtual address
+ */
+static inline
+dma_addr_t dma_map_page(struct device *dev, struct page *page,
+                       unsigned long offset, size_t size,
+                       enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+       return page_to_bus(page) + offset;
+}
+
+static inline
+void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
+                   enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+/*
+ * Make physical memory consistent for a single streaming mode DMA translation
+ * after a transfer.
+ *
+ * If you perform a pci_map_single() but wish to interrogate the buffer using
+ * the cpu, yet do not wish to teardown the PCI dma mapping, you must call this
+ * function before doing so.  At the next point you give the PCI dma address
+ * back to the card, the device again owns the buffer.
+ */
+static inline
+void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
+                            size_t size, enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
+                               size_t size, enum dma_data_direction direction)
+{
+       mn10300_dcache_flush_inv();
+}
+
+static inline
+void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
+                                  unsigned long offset, size_t size,
+                                  enum dma_data_direction direction)
+{
+}
+
+static inline void
+dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
+                                unsigned long offset, size_t size,
+                                enum dma_data_direction direction)
+{
+       mn10300_dcache_flush_inv();
+}
+
+
+/*
+ * Make physical memory consistent for a set of streaming mode DMA translations
+ * after a transfer.
+ *
+ * The same as pci_dma_sync_single but for a scatter-gather list, same rules
+ * and usage.
+ */
+static inline
+void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
+                        int nelems, enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
+                           int nelems, enum dma_data_direction direction)
+{
+       mn10300_dcache_flush_inv();
+}
+
+static inline
+int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
+{
+       return 0;
+}
+
+/*
+ * Return whether the given PCI device DMA address mask can be supported
+ * properly.  For example, if your device can only drive the low 24-bits during
+ * PCI bus mastering, then you would pass 0x00ffffff as the mask to this
+ * function.
+ */
+static inline
+int dma_supported(struct device *dev, u64 mask)
+{
+       /*
+        * we fall back to GFP_DMA when the mask isn't all 1s, so we can't
+        * guarantee allocations that must be within a tighter range than
+        * GFP_DMA
+        */
+       if (mask < 0x00ffffff)
+               return 0;
+       return 1;
+}
+
+static inline
+int dma_set_mask(struct device *dev, u64 mask)
+{
+       if (!dev->dma_mask || !dma_supported(dev, mask))
+               return -EIO;
+
+       *dev->dma_mask = mask;
+       return 0;
+}
+
+static inline
+int dma_get_cache_alignment(void)
+{
+       return 1 << L1_CACHE_SHIFT;
+}
+
+#define dma_is_consistent(d)   (1)
+
+static inline
+void dma_cache_sync(void *vaddr, size_t size,
+                   enum dma_data_direction direction)
+{
+       mn10300_dcache_flush_inv();
+}
+
+#endif
diff --git a/arch/mn10300/include/asm/dma.h b/arch/mn10300/include/asm/dma.h
new file mode 100644 (file)
index 0000000..098df2e
--- /dev/null
@@ -0,0 +1,118 @@
+/* MN10300 ISA DMA handlers and definitions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_DMA_H
+#define _ASM_DMA_H
+
+#include <asm/system.h>
+#include <linux/spinlock.h>
+#include <asm/io.h>
+#include <linux/delay.h>
+
+#undef MAX_DMA_CHANNELS                /* switch off linux/kernel/dma.c */
+#define MAX_DMA_ADDRESS                0xbfffffff
+
+extern spinlock_t dma_spin_lock;
+
+static inline unsigned long claim_dma_lock(void)
+{
+       unsigned long flags;
+       spin_lock_irqsave(&dma_spin_lock, flags);
+       return flags;
+}
+
+static inline void release_dma_lock(unsigned long flags)
+{
+       spin_unlock_irqrestore(&dma_spin_lock, flags);
+}
+
+/* enable/disable a specific DMA channel */
+static inline void enable_dma(unsigned int dmanr)
+{
+}
+
+static inline void disable_dma(unsigned int dmanr)
+{
+}
+
+/* Clear the 'DMA Pointer Flip Flop'.
+ * Write 0 for LSB/MSB, 1 for MSB/LSB access.
+ * Use this once to initialize the FF to a known state.
+ * After that, keep track of it. :-)
+ * --- In order to do that, the DMA routines below should ---
+ * --- only be used while holding the DMA lock ! ---
+ */
+static inline void clear_dma_ff(unsigned int dmanr)
+{
+}
+
+/* set mode (above) for a specific DMA channel */
+static inline void set_dma_mode(unsigned int dmanr, char mode)
+{
+}
+
+/* Set only the page register bits of the transfer address.
+ * This is used for successive transfers when we know the contents of
+ * the lower 16 bits of the DMA current address register, but a 64k boundary
+ * may have been crossed.
+ */
+static inline void set_dma_page(unsigned int dmanr, char pagenr)
+{
+}
+
+
+/* Set transfer address & page bits for specific DMA channel.
+ * Assumes dma flipflop is clear.
+ */
+static inline void set_dma_addr(unsigned int dmanr, unsigned int a)
+{
+}
+
+
+/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
+ * a specific DMA channel.
+ * You must ensure the parameters are valid.
+ * NOTE: from a manual: "the number of transfers is one more
+ * than the initial word count"! This is taken into account.
+ * Assumes dma flip-flop is clear.
+ * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
+ */
+static inline void set_dma_count(unsigned int dmanr, unsigned int count)
+{
+}
+
+
+/* Get DMA residue count. After a DMA transfer, this
+ * should return zero. Reading this while a DMA transfer is
+ * still in progress will return unpredictable results.
+ * If called before the channel has been used, it may return 1.
+ * Otherwise, it returns the number of _bytes_ left to transfer.
+ *
+ * Assumes DMA flip-flop is clear.
+ */
+static inline int get_dma_residue(unsigned int dmanr)
+{
+       return 0;
+}
+
+
+/* These are in kernel/dma.c: */
+extern int request_dma(unsigned int dmanr, const char *device_id);
+extern void free_dma(unsigned int dmanr);
+
+/* From PCI */
+
+#ifdef CONFIG_PCI
+extern int isa_dma_bridge_buggy;
+#else
+#define isa_dma_bridge_buggy   (0)
+#endif
+
+#endif /* _ASM_DMA_H */
diff --git a/arch/mn10300/include/asm/dmactl-regs.h b/arch/mn10300/include/asm/dmactl-regs.h
new file mode 100644 (file)
index 0000000..58a199d
--- /dev/null
@@ -0,0 +1,101 @@
+/* MN10300 on-board DMA controller registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_DMACTL_REGS_H
+#define _ASM_DMACTL_REGS_H
+
+#include <asm/cpu-regs.h>
+
+#ifdef __KERNEL__
+
+/* DMA registers */
+#define        DMxCTR(N)               __SYSREG(0xd2000000 + ((N) * 0x100), u32)       /* control reg */
+#define        DMxCTR_BG               0x0000001f      /* transfer request source */
+#define        DMxCTR_BG_SOFT          0x00000000      /* - software source */
+#define        DMxCTR_BG_SC0TX         0x00000002      /* - serial port 0 transmission */
+#define        DMxCTR_BG_SC0RX         0x00000003      /* - serial port 0 reception */
+#define        DMxCTR_BG_SC1TX         0x00000004      /* - serial port 1 transmission */
+#define        DMxCTR_BG_SC1RX         0x00000005      /* - serial port 1 reception */
+#define        DMxCTR_BG_SC2TX         0x00000006      /* - serial port 2 transmission */
+#define        DMxCTR_BG_SC2RX         0x00000007      /* - serial port 2 reception */
+#define        DMxCTR_BG_TM0UFLOW      0x00000008      /* - timer 0 underflow */
+#define        DMxCTR_BG_TM1UFLOW      0x00000009      /* - timer 1 underflow */
+#define        DMxCTR_BG_TM2UFLOW      0x0000000a      /* - timer 2 underflow */
+#define        DMxCTR_BG_TM3UFLOW      0x0000000b      /* - timer 3 underflow */
+#define        DMxCTR_BG_TM6ACMPCAP    0x0000000c      /* - timer 6A compare/capture */
+#define        DMxCTR_BG_AFE           0x0000000d      /* - analogue front-end interrupt source */
+#define        DMxCTR_BG_ADC           0x0000000e      /* - A/D conversion end interrupt source */
+#define        DMxCTR_BG_IRDA          0x0000000f      /* - IrDA interrupt source */
+#define        DMxCTR_BG_RTC           0x00000010      /* - RTC interrupt source */
+#define        DMxCTR_BG_XIRQ0         0x00000011      /* - XIRQ0 pin interrupt source */
+#define        DMxCTR_BG_XIRQ1         0x00000012      /* - XIRQ1 pin interrupt source */
+#define        DMxCTR_BG_XDMR0         0x00000013      /* - external request 0 source (XDMR0 pin) */
+#define        DMxCTR_BG_XDMR1         0x00000014      /* - external request 1 source (XDMR1 pin) */
+#define        DMxCTR_SAM              0x000000e0      /* DMA transfer src addr mode */
+#define        DMxCTR_SAM_INCR         0x00000000      /* - increment */
+#define        DMxCTR_SAM_DECR         0x00000020      /* - decrement */
+#define        DMxCTR_SAM_FIXED        0x00000040      /* - fixed */
+#define        DMxCTR_DAM              0x00000000      /* DMA transfer dest addr mode */
+#define        DMxCTR_DAM_INCR         0x00000000      /* - increment */
+#define        DMxCTR_DAM_DECR         0x00000100      /* - decrement */
+#define        DMxCTR_DAM_FIXED        0x00000200      /* - fixed */
+#define        DMxCTR_TM               0x00001800      /* DMA transfer mode */
+#define        DMxCTR_TM_BATCH         0x00000000      /* - batch transfer */
+#define        DMxCTR_TM_INTERM        0x00001000      /* - intermittent transfer */
+#define        DMxCTR_UT               0x00006000      /* DMA transfer unit */
+#define        DMxCTR_UT_1             0x00000000      /* - 1 byte */
+#define        DMxCTR_UT_2             0x00002000      /* - 2 byte */
+#define        DMxCTR_UT_4             0x00004000      /* - 4 byte */
+#define        DMxCTR_UT_16            0x00006000      /* - 16 byte */
+#define        DMxCTR_TEN              0x00010000      /* DMA channel transfer enable */
+#define        DMxCTR_RQM              0x00060000      /* external request input source mode */
+#define        DMxCTR_RQM_FALLEDGE     0x00000000      /* - falling edge */
+#define        DMxCTR_RQM_RISEEDGE     0x00020000      /* - rising edge */
+#define        DMxCTR_RQM_LOLEVEL      0x00040000      /* - low level */
+#define        DMxCTR_RQM_HILEVEL      0x00060000      /* - high level */
+#define        DMxCTR_RQF              0x01000000      /* DMA transfer request flag */
+#define        DMxCTR_XEND             0x80000000      /* DMA transfer end flag */
+
+#define        DMxSRC(N)               __SYSREG(0xd2000004 + ((N) * 0x100), u32)       /* control reg */
+
+#define        DMxDST(N)               __SYSREG(0xd2000008 + ((N) * 0x100), u32)       /* src addr reg */
+
+#define        DMxSIZ(N)               __SYSREG(0xd200000c + ((N) * 0x100), u32)       /* dest addr reg */
+#define DMxSIZ_CT              0x000fffff      /* number of bytes to transfer */
+
+#define        DMxCYC(N)               __SYSREG(0xd2000010 + ((N) * 0x100), u32)       /* intermittent
+                                                                                * size reg */
+#define DMxCYC_CYC             0x000000ff      /* number of interrmittent transfers -1 */
+
+#define DM0IRQ                 16              /* DMA channel 0 complete IRQ */
+#define DM1IRQ                 17              /* DMA channel 1 complete IRQ */
+#define DM2IRQ                 18              /* DMA channel 2 complete IRQ */
+#define DM3IRQ                 19              /* DMA channel 3 complete IRQ */
+
+#define        DM0ICR                  GxICR(DM0IRQ)   /* DMA channel 0 complete intr ctrl reg */
+#define        DM1ICR                  GxICR(DM0IR1)   /* DMA channel 1 complete intr ctrl reg */
+#define        DM2ICR                  GxICR(DM0IR2)   /* DMA channel 2 complete intr ctrl reg */
+#define        DM3ICR                  GxICR(DM0IR3)   /* DMA channel 3 complete intr ctrl reg */
+
+#ifndef __ASSEMBLY__
+
+struct mn10300_dmactl_regs {
+       u32             ctr;
+       const void      *src;
+       void            *dst;
+       u32             siz;
+       u32             cyc;
+} __attribute__((aligned(0x100)));
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_DMACTL_REGS_H */
diff --git a/arch/mn10300/include/asm/elf.h b/arch/mn10300/include/asm/elf.h
new file mode 100644 (file)
index 0000000..bf09f8b
--- /dev/null
@@ -0,0 +1,147 @@
+/* MN10300 ELF constant and register definitions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_ELF_H
+#define _ASM_ELF_H
+
+#include <linux/utsname.h>
+#include <asm/ptrace.h>
+#include <asm/user.h>
+
+/*
+ * AM33 relocations
+ */
+#define R_MN10300_NONE         0       /* No reloc.  */
+#define R_MN10300_32           1       /* Direct 32 bit.  */
+#define R_MN10300_16           2       /* Direct 16 bit.  */
+#define R_MN10300_8            3       /* Direct 8 bit.  */
+#define R_MN10300_PCREL32      4       /* PC-relative 32-bit.  */
+#define R_MN10300_PCREL16      5       /* PC-relative 16-bit signed.  */
+#define R_MN10300_PCREL8       6       /* PC-relative 8-bit signed.  */
+#define R_MN10300_24           9       /* Direct 24 bit.  */
+#define R_MN10300_RELATIVE     23      /* Adjust by program base.  */
+
+/*
+ * ELF register definitions..
+ */
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+#define ELF_NFPREG 32
+typedef float elf_fpreg_t;
+
+typedef struct {
+       elf_fpreg_t     fpregs[ELF_NFPREG];
+       u_int32_t       fpcr;
+} elf_fpregset_t;
+
+extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
+
+/*
+ * This is used to ensure we don't load something for the wrong architecture
+ */
+#define elf_check_arch(x) \
+       (((x)->e_machine == EM_CYGNUS_MN10300) ||       \
+        ((x)->e_machine == EM_MN10300))
+
+/*
+ * These are used to set parameters in the core dumps.
+ */
+#define ELF_CLASS      ELFCLASS32
+#define ELF_DATA       ELFDATA2LSB
+#define ELF_ARCH       EM_MN10300
+
+/*
+ * ELF process initialiser
+ */
+#define ELF_PLAT_INIT(_r, load_addr)                                   \
+do {                                                                   \
+       struct pt_regs *_ur = current->thread.uregs;                    \
+       _ur->a3   = 0;  _ur->a2   = 0;  _ur->d3   = 0;  _ur->d2   = 0;  \
+       _ur->mcvf = 0;  _ur->mcrl = 0;  _ur->mcrh = 0;  _ur->mdrq = 0;  \
+       _ur->e1   = 0;  _ur->e0   = 0;  _ur->e7   = 0;  _ur->e6   = 0;  \
+       _ur->e5   = 0;  _ur->e4   = 0;  _ur->e3   = 0;  _ur->e2   = 0;  \
+       _ur->lar  = 0;  _ur->lir  = 0;  _ur->mdr  = 0;                  \
+       _ur->a1   = 0;  _ur->a0   = 0;  _ur->d1   = 0;  _ur->d0   = 0;  \
+} while (0)
+
+#define USE_ELF_CORE_DUMP
+#define ELF_EXEC_PAGESIZE      4096
+
+/*
+ * This is the location that an ET_DYN program is loaded if exec'ed.  Typical
+ * use of this is to invoke "./ld.so someprog" to test out a new version of
+ * the loader.  We need to make sure that it is out of the way of the program
+ * that it will "exec", and that there is sufficient room for the brk.
+ * - must clear the VMALLOC area
+ */
+#define ELF_ET_DYN_BASE         0x04000000
+
+/*
+ * regs is struct pt_regs, pr_reg is elf_gregset_t (which is
+ * now struct user_regs, they are different)
+ * - ELF_CORE_COPY_REGS has been guessed, and may be wrong
+ */
+#define ELF_CORE_COPY_REGS(pr_reg, regs)       \
+do {                                           \
+       pr_reg[0]       = regs->a3;             \
+       pr_reg[1]       = regs->a2;             \
+       pr_reg[2]       = regs->d3;             \
+       pr_reg[3]       = regs->d2;             \
+       pr_reg[4]       = regs->mcvf;           \
+       pr_reg[5]       = regs->mcrl;           \
+       pr_reg[6]       = regs->mcrh;           \
+       pr_reg[7]       = regs->mdrq;           \
+       pr_reg[8]       = regs->e1;             \
+       pr_reg[9]       = regs->e0;             \
+       pr_reg[10]      = regs->e7;             \
+       pr_reg[11]      = regs->e6;             \
+       pr_reg[12]      = regs->e5;             \
+       pr_reg[13]      = regs->e4;             \
+       pr_reg[14]      = regs->e3;             \
+       pr_reg[15]      = regs->e2;             \
+       pr_reg[16]      = regs->sp;             \
+       pr_reg[17]      = regs->lar;            \
+       pr_reg[18]      = regs->lir;            \
+       pr_reg[19]      = regs->mdr;            \
+       pr_reg[20]      = regs->a1;             \
+       pr_reg[21]      = regs->a0;             \
+       pr_reg[22]      = regs->d1;             \
+       pr_reg[23]      = regs->d0;             \
+       pr_reg[24]      = regs->orig_d0;        \
+       pr_reg[25]      = regs->epsw;           \
+       pr_reg[26]      = regs->pc;             \
+} while (0);
+
+/*
+ * This yields a mask that user programs can use to figure out what
+ * instruction set this CPU supports.  This could be done in user space,
+ * but it's not easy, and we've already done it here.
+ */
+#define ELF_HWCAP      (0)
+
+/*
+ * This yields a string that ld.so will use to load implementation
+ * specific libraries for optimization.  This is more specific in
+ * intent than poking at uname or /proc/cpuinfo.
+ *
+ * For the moment, we have only optimizations for the Intel generations,
+ * but that could change...
+ */
+#define ELF_PLATFORM  (NULL)
+
+#ifdef __KERNEL__
+#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
+#endif
+
+#endif /* _ASM_ELF_H */
diff --git a/arch/mn10300/include/asm/emergency-restart.h b/arch/mn10300/include/asm/emergency-restart.h
new file mode 100644 (file)
index 0000000..3711bd9
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/emergency-restart.h>
diff --git a/arch/mn10300/include/asm/errno.h b/arch/mn10300/include/asm/errno.h
new file mode 100644 (file)
index 0000000..4c82b50
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/errno.h>
diff --git a/arch/mn10300/include/asm/exceptions.h b/arch/mn10300/include/asm/exceptions.h
new file mode 100644 (file)
index 0000000..fa16466
--- /dev/null
@@ -0,0 +1,121 @@
+/* MN10300 Microcontroller core exceptions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_EXCEPTIONS_H
+#define _ASM_EXCEPTIONS_H
+
+#include <linux/linkage.h>
+
+/*
+ * define the breakpoint instruction opcode to use
+ * - note that the JTAG unit steals 0xFF, so we want to avoid that if we can
+ *   (can use 0xF7)
+ */
+#define GDBSTUB_BKPT           0xFF
+
+#ifndef __ASSEMBLY__
+
+/*
+ * enumeration of exception codes (as extracted from TBR MSW)
+ */
+enum exception_code {
+       EXCEP_RESET             = 0x000000,     /* reset */
+
+       /* MMU exceptions */
+       EXCEP_ITLBMISS          = 0x000100,     /* instruction TLB miss */
+       EXCEP_DTLBMISS          = 0x000108,     /* data TLB miss */
+       EXCEP_IAERROR           = 0x000110,     /* instruction address */
+       EXCEP_DAERROR           = 0x000118,     /* data address */
+
+       /* system exceptions */
+       EXCEP_TRAP              = 0x000128,     /* program interrupt (PI instruction) */
+       EXCEP_ISTEP             = 0x000130,     /* single step */
+       EXCEP_IBREAK            = 0x000150,     /* instruction breakpoint */
+       EXCEP_OBREAK            = 0x000158,     /* operand breakpoint */
+       EXCEP_PRIVINS           = 0x000160,     /* privileged instruction execution */
+       EXCEP_UNIMPINS          = 0x000168,     /* unimplemented instruction execution */
+       EXCEP_UNIMPEXINS        = 0x000170,     /* unimplemented extended instruction execution */
+       EXCEP_MEMERR            = 0x000178,     /* illegal memory access */
+       EXCEP_MISALIGN          = 0x000180,     /* misalignment */
+       EXCEP_BUSERROR          = 0x000188,     /* bus error */
+       EXCEP_ILLINSACC         = 0x000190,     /* illegal instruction access */
+       EXCEP_ILLDATACC         = 0x000198,     /* illegal data access */
+       EXCEP_IOINSACC          = 0x0001a0,     /* I/O space instruction access */
+       EXCEP_PRIVINSACC        = 0x0001a8,     /* privileged space instruction access */
+       EXCEP_PRIVDATACC        = 0x0001b0,     /* privileged space data access */
+       EXCEP_DATINSACC         = 0x0001b8,     /* data space instruction access */
+       EXCEP_DOUBLE_FAULT      = 0x000200,     /* double fault */
+
+       /* FPU exceptions */
+       EXCEP_FPU_DISABLED      = 0x0001c0,     /* FPU disabled */
+       EXCEP_FPU_UNIMPINS      = 0x0001c8,     /* FPU unimplemented operation */
+       EXCEP_FPU_OPERATION     = 0x0001d0,     /* FPU operation */
+
+       /* interrupts */
+       EXCEP_WDT               = 0x000240,     /* watchdog timer overflow */
+       EXCEP_NMI               = 0x000248,     /* non-maskable interrupt */
+       EXCEP_IRQ_LEVEL0        = 0x000280,     /* level 0 maskable interrupt */
+       EXCEP_IRQ_LEVEL1        = 0x000288,     /* level 1 maskable interrupt */
+       EXCEP_IRQ_LEVEL2        = 0x000290,     /* level 2 maskable interrupt */
+       EXCEP_IRQ_LEVEL3        = 0x000298,     /* level 3 maskable interrupt */
+       EXCEP_IRQ_LEVEL4        = 0x0002a0,     /* level 4 maskable interrupt */
+       EXCEP_IRQ_LEVEL5        = 0x0002a8,     /* level 5 maskable interrupt */
+       EXCEP_IRQ_LEVEL6        = 0x0002b0,     /* level 6 maskable interrupt */
+
+       /* system calls */
+       EXCEP_SYSCALL0          = 0x000300,     /* system call 0 */
+       EXCEP_SYSCALL1          = 0x000308,     /* system call 1 */
+       EXCEP_SYSCALL2          = 0x000310,     /* system call 2 */
+       EXCEP_SYSCALL3          = 0x000318,     /* system call 3 */
+       EXCEP_SYSCALL4          = 0x000320,     /* system call 4 */
+       EXCEP_SYSCALL5          = 0x000328,     /* system call 5 */
+       EXCEP_SYSCALL6          = 0x000330,     /* system call 6 */
+       EXCEP_SYSCALL7          = 0x000338,     /* system call 7 */
+       EXCEP_SYSCALL8          = 0x000340,     /* system call 8 */
+       EXCEP_SYSCALL9          = 0x000348,     /* system call 9 */
+       EXCEP_SYSCALL10         = 0x000350,     /* system call 10 */
+       EXCEP_SYSCALL11         = 0x000358,     /* system call 11 */
+       EXCEP_SYSCALL12         = 0x000360,     /* system call 12 */
+       EXCEP_SYSCALL13         = 0x000368,     /* system call 13 */
+       EXCEP_SYSCALL14         = 0x000370,     /* system call 14 */
+       EXCEP_SYSCALL15         = 0x000378,     /* system call 15 */
+};
+
+extern void __set_intr_stub(enum exception_code code, void *handler);
+extern void set_intr_stub(enum exception_code code, void *handler);
+extern void set_jtag_stub(enum exception_code code, void *handler);
+
+struct pt_regs;
+
+extern asmlinkage void __common_exception(void);
+extern asmlinkage void itlb_miss(void);
+extern asmlinkage void dtlb_miss(void);
+extern asmlinkage void itlb_aerror(void);
+extern asmlinkage void dtlb_aerror(void);
+extern asmlinkage void raw_bus_error(void);
+extern asmlinkage void double_fault(void);
+extern asmlinkage int  system_call(struct pt_regs *);
+extern asmlinkage void fpu_exception(struct pt_regs *, enum exception_code);
+extern asmlinkage void nmi(struct pt_regs *, enum exception_code);
+extern asmlinkage void uninitialised_exception(struct pt_regs *,
+                                              enum exception_code);
+extern asmlinkage void irq_handler(void);
+extern asmlinkage void profile_handler(void);
+extern asmlinkage void nmi_handler(void);
+extern asmlinkage void misalignment(struct pt_regs *, enum exception_code);
+
+extern void die(const char *, struct pt_regs *, enum exception_code)
+       ATTRIB_NORET;
+
+extern int die_if_no_fixup(const char *, struct pt_regs *, enum exception_code);
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_EXCEPTIONS_H */
diff --git a/arch/mn10300/include/asm/fb.h b/arch/mn10300/include/asm/fb.h
new file mode 100644 (file)
index 0000000..697b24a
--- /dev/null
@@ -0,0 +1,23 @@
+/* MN10300 Frame buffer stuff
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_FB_H
+#define _ASM_FB_H
+
+#include <linux/fb.h>
+
+#define fb_pgprotect(...) do {} while (0)
+
+static inline int fb_is_primary_device(struct fb_info *info)
+{
+       return 0;
+}
+
+#endif /* _ASM_FB_H */
diff --git a/arch/mn10300/include/asm/fcntl.h b/arch/mn10300/include/asm/fcntl.h
new file mode 100644 (file)
index 0000000..46ab12d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/fcntl.h>
diff --git a/arch/mn10300/include/asm/fpu.h b/arch/mn10300/include/asm/fpu.h
new file mode 100644 (file)
index 0000000..64a2b83
--- /dev/null
@@ -0,0 +1,85 @@
+/* MN10300 FPU definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * Derived from include/asm-i386/i387.h: Copyright (C) 1994 Linus Torvalds
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_FPU_H
+#define _ASM_FPU_H
+
+#include <asm/processor.h>
+#include <asm/sigcontext.h>
+#include <asm/user.h>
+
+#ifdef __KERNEL__
+
+/* the task that owns the FPU state */
+extern struct task_struct *fpu_state_owner;
+
+#define set_using_fpu(tsk)                             \
+do {                                                   \
+       (tsk)->thread.fpu_flags |= THREAD_USING_FPU;    \
+} while (0)
+
+#define clear_using_fpu(tsk)                           \
+do {                                                   \
+       (tsk)->thread.fpu_flags &= ~THREAD_USING_FPU;   \
+} while (0)
+
+#define is_using_fpu(tsk) ((tsk)->thread.fpu_flags & THREAD_USING_FPU)
+
+#define unlazy_fpu(tsk)                                        \
+do {                                                   \
+       preempt_disable();                              \
+       if (fpu_state_owner == (tsk))                   \
+               fpu_save(&tsk->thread.fpu_state);       \
+       preempt_enable();                               \
+} while (0)
+
+#define exit_fpu()                             \
+do {                                           \
+       struct task_struct *__tsk = current;    \
+       preempt_disable();                      \
+       if (fpu_state_owner == __tsk)           \
+               fpu_state_owner = NULL;         \
+       preempt_enable();                       \
+} while (0)
+
+#define flush_fpu()                                    \
+do {                                                   \
+       struct task_struct *__tsk = current;            \
+       preempt_disable();                              \
+       if (fpu_state_owner == __tsk) {                 \
+               fpu_state_owner = NULL;                 \
+               __tsk->thread.uregs->epsw &= ~EPSW_FE;  \
+       }                                               \
+       preempt_enable();                               \
+       clear_using_fpu(__tsk);                         \
+} while (0)
+
+extern asmlinkage void fpu_init_state(void);
+extern asmlinkage void fpu_kill_state(struct task_struct *);
+extern asmlinkage void fpu_disabled(struct pt_regs *, enum exception_code);
+extern asmlinkage void fpu_exception(struct pt_regs *, enum exception_code);
+
+#ifdef CONFIG_FPU
+extern asmlinkage void fpu_save(struct fpu_state_struct *);
+extern asmlinkage void fpu_restore(struct fpu_state_struct *);
+#else
+#define fpu_save(a)
+#define fpu_restore(a)
+#endif /* CONFIG_FPU  */
+
+/*
+ * signal frame handlers
+ */
+extern int fpu_setup_sigcontext(struct fpucontext *buf);
+extern int fpu_restore_sigcontext(struct fpucontext *buf);
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_FPU_H */
diff --git a/arch/mn10300/include/asm/frame.inc b/arch/mn10300/include/asm/frame.inc
new file mode 100644 (file)
index 0000000..5b1949b
--- /dev/null
@@ -0,0 +1,91 @@
+/* MN10300 Microcontroller core system register definitions -*- asm -*-
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_FRAME_INC
+#define _ASM_FRAME_INC
+
+#ifndef __ASSEMBLY__
+#error not for use in C files
+#endif
+
+#ifndef __ASM_OFFSETS_H__
+#include <asm/asm-offsets.h>
+#endif
+
+#define pi break
+
+#define fp a3
+
+###############################################################################
+#
+# build a stack frame from the registers
+# - the caller has subtracted 4 from SP before coming here
+#
+###############################################################################
+.macro SAVE_ALL
+       add     -4,sp                           # next exception frame ptr save area
+       movm    [other],(sp)
+       mov     usp,a1
+       mov     a1,(sp)                         # USP in MOVM[other] dummy slot
+       movm    [d2,d3,a2,a3,exreg0,exreg1,exother],(sp)
+       mov     sp,fp                           # FRAME pointer in A3
+       add     -12,sp                          # allow for calls to be made
+       mov     (__frame),a1
+       mov     a1,(REG_NEXT,fp)
+       mov     fp,(__frame)
+
+       and     ~EPSW_FE,epsw                   # disable the FPU inside the kernel
+
+       # we may be holding current in E2
+#ifdef CONFIG_MN10300_CURRENT_IN_E2
+       mov     (__current),e2
+#endif
+.endm
+
+###############################################################################
+#
+# restore the registers from a stack frame
+#
+###############################################################################
+.macro RESTORE_ALL
+       # peel back the stack to the calling frame
+       # - this permits execve() to discard extra frames due to kernel syscalls
+       mov     (__frame),fp
+       mov     fp,sp
+       mov     (REG_NEXT,fp),d0                # userspace has regs->next == 0
+       mov     d0,(__frame)
+
+#ifndef CONFIG_MN10300_USING_JTAG
+       mov     (REG_EPSW,fp),d0
+       btst    EPSW_T,d0
+       beq     99f
+
+       or      EPSW_NMID,epsw
+       movhu   (DCR),d1
+       or      0x0001, d1
+       movhu   d1,(DCR)
+
+99:
+#endif
+       movm    (sp),[d2,d3,a2,a3,exreg0,exreg1,exother]
+
+       # must restore usp even if returning to kernel space,
+       # when CONFIG_PREEMPT is enabled.
+       mov     (sp),a1                         # USP in MOVM[other] dummy slot
+       mov     a1,usp
+
+       movm    (sp),[other]
+       add     8,sp
+       rti
+
+.endm
+
+
+#endif /* _ASM_FRAME_INC */
diff --git a/arch/mn10300/include/asm/ftrace.h b/arch/mn10300/include/asm/ftrace.h
new file mode 100644 (file)
index 0000000..40a8c17
--- /dev/null
@@ -0,0 +1 @@
+/* empty */
diff --git a/arch/mn10300/include/asm/futex.h b/arch/mn10300/include/asm/futex.h
new file mode 100644 (file)
index 0000000..0b74582
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/futex.h>
diff --git a/arch/mn10300/include/asm/gdb-stub.h b/arch/mn10300/include/asm/gdb-stub.h
new file mode 100644 (file)
index 0000000..e5a6368
--- /dev/null
@@ -0,0 +1,183 @@
+/* MN10300 Kernel GDB stub definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from asm-mips/gdb-stub.h (c) 1995 Andreas Busse
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_GDB_STUB_H
+#define _ASM_GDB_STUB_H
+
+#include <asm/exceptions.h>
+
+/*
+ * register ID numbers in GDB remote protocol
+ */
+
+#define GDB_REGID_PC           9
+#define GDB_REGID_FP           7
+#define GDB_REGID_SP           8
+
+/*
+ * virtual stack layout for the GDB exception handler
+ */
+#define NUMREGS                        64
+
+#define GDB_FR_D0              (0 * 4)
+#define GDB_FR_D1              (1 * 4)
+#define GDB_FR_D2              (2 * 4)
+#define GDB_FR_D3              (3 * 4)
+#define GDB_FR_A0              (4 * 4)
+#define GDB_FR_A1              (5 * 4)
+#define GDB_FR_A2              (6 * 4)
+#define GDB_FR_A3              (7 * 4)
+
+#define GDB_FR_SP              (8 * 4)
+#define GDB_FR_PC              (9 * 4)
+#define GDB_FR_MDR             (10 * 4)
+#define GDB_FR_EPSW            (11 * 4)
+#define GDB_FR_LIR             (12 * 4)
+#define GDB_FR_LAR             (13 * 4)
+#define GDB_FR_MDRQ            (14 * 4)
+
+#define GDB_FR_E0              (15 * 4)
+#define GDB_FR_E1              (16 * 4)
+#define GDB_FR_E2              (17 * 4)
+#define GDB_FR_E3              (18 * 4)
+#define GDB_FR_E4              (19 * 4)
+#define GDB_FR_E5              (20 * 4)
+#define GDB_FR_E6              (21 * 4)
+#define GDB_FR_E7              (22 * 4)
+
+#define GDB_FR_SSP             (23 * 4)
+#define GDB_FR_MSP             (24 * 4)
+#define GDB_FR_USP             (25 * 4)
+#define GDB_FR_MCRH            (26 * 4)
+#define GDB_FR_MCRL            (27 * 4)
+#define GDB_FR_MCVF            (28 * 4)
+
+#define GDB_FR_FPCR            (29 * 4)
+#define GDB_FR_DUMMY0          (30 * 4)
+#define GDB_FR_DUMMY1          (31 * 4)
+
+#define GDB_FR_FS0             (32 * 4)
+
+#define GDB_FR_SIZE            (NUMREGS * 4)
+
+#ifndef __ASSEMBLY__
+
+/*
+ * This is the same as above, but for the high-level
+ * part of the GDB stub.
+ */
+
+struct gdb_regs {
+       /* saved main processor registers */
+       u32     d0, d1, d2, d3, a0, a1, a2, a3;
+       u32     sp, pc, mdr, epsw, lir, lar, mdrq;
+       u32     e0, e1, e2, e3, e4, e5, e6, e7;
+       u32     ssp, msp, usp, mcrh, mcrl, mcvf;
+
+       /* saved floating point registers */
+       u32     fpcr, _dummy0, _dummy1;
+       u32     fs0,  fs1,  fs2,  fs3,  fs4,  fs5,  fs6,  fs7;
+       u32     fs8,  fs9,  fs10, fs11, fs12, fs13, fs14, fs15;
+       u32     fs16, fs17, fs18, fs19, fs20, fs21, fs22, fs23;
+       u32     fs24, fs25, fs26, fs27, fs28, fs29, fs30, fs31;
+};
+
+/*
+ * Prototypes
+ */
+extern void show_registers_only(struct pt_regs *regs);
+
+extern asmlinkage void gdbstub_init(void);
+extern asmlinkage void gdbstub_exit(int status);
+extern asmlinkage void gdbstub_io_init(void);
+extern asmlinkage void gdbstub_io_set_baud(unsigned baud);
+extern asmlinkage int  gdbstub_io_rx_char(unsigned char *_ch, int nonblock);
+extern asmlinkage void gdbstub_io_tx_char(unsigned char ch);
+extern asmlinkage void gdbstub_io_tx_flush(void);
+
+extern asmlinkage void gdbstub_io_rx_handler(void);
+extern asmlinkage void gdbstub_rx_irq(struct pt_regs *, enum exception_code);
+extern asmlinkage int  gdbstub_intercept(struct pt_regs *, enum exception_code);
+extern asmlinkage void gdbstub_exception(struct pt_regs *, enum exception_code);
+extern asmlinkage void __gdbstub_bug_trap(void);
+extern asmlinkage void __gdbstub_pause(void);
+extern asmlinkage void start_kernel(void);
+
+#ifndef CONFIG_MN10300_CACHE_DISABLED
+extern asmlinkage void gdbstub_purge_cache(void);
+#else
+#define gdbstub_purge_cache()  do {} while (0)
+#endif
+
+/* Used to prevent crashes in memory access */
+extern asmlinkage int  gdbstub_read_byte(const u8 *, u8 *);
+extern asmlinkage int  gdbstub_read_word(const u8 *, u8 *);
+extern asmlinkage int  gdbstub_read_dword(const u8 *, u8 *);
+extern asmlinkage int  gdbstub_write_byte(u32, u8 *);
+extern asmlinkage int  gdbstub_write_word(u32, u8 *);
+extern asmlinkage int  gdbstub_write_dword(u32, u8 *);
+
+extern asmlinkage void gdbstub_read_byte_guard(void);
+extern asmlinkage void gdbstub_read_byte_cont(void);
+extern asmlinkage void gdbstub_read_word_guard(void);
+extern asmlinkage void gdbstub_read_word_cont(void);
+extern asmlinkage void gdbstub_read_dword_guard(void);
+extern asmlinkage void gdbstub_read_dword_cont(void);
+extern asmlinkage void gdbstub_write_byte_guard(void);
+extern asmlinkage void gdbstub_write_byte_cont(void);
+extern asmlinkage void gdbstub_write_word_guard(void);
+extern asmlinkage void gdbstub_write_word_cont(void);
+extern asmlinkage void gdbstub_write_dword_guard(void);
+extern asmlinkage void gdbstub_write_dword_cont(void);
+
+extern u8      gdbstub_rx_buffer[PAGE_SIZE];
+extern u32     gdbstub_rx_inp;
+extern u32     gdbstub_rx_outp;
+extern u8      gdbstub_rx_overflow;
+extern u8      gdbstub_busy;
+extern u8      gdbstub_rx_unget;
+
+#ifdef CONFIG_GDBSTUB_DEBUGGING
+extern void gdbstub_printk(const char *fmt, ...)
+       __attribute__((format(printf, 1, 2)));
+#else
+static inline __attribute__((format(printf, 1, 2)))
+void gdbstub_printk(const char *fmt, ...)
+{
+}
+#endif
+
+#ifdef CONFIG_GDBSTUB_DEBUG_ENTRY
+#define gdbstub_entry(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
+#else
+#define gdbstub_entry(FMT, ...) ({ 0; })
+#endif
+
+#ifdef CONFIG_GDBSTUB_DEBUG_PROTOCOL
+#define gdbstub_proto(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
+#else
+#define gdbstub_proto(FMT, ...) ({ 0; })
+#endif
+
+#ifdef CONFIG_GDBSTUB_DEBUG_IO
+#define gdbstub_io(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
+#else
+#define gdbstub_io(FMT, ...) ({ 0; })
+#endif
+
+#ifdef CONFIG_GDBSTUB_DEBUG_BREAKPOINT
+#define gdbstub_bkpt(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
+#else
+#define gdbstub_bkpt(FMT, ...) ({ 0; })
+#endif
+
+#endif /* !__ASSEMBLY__ */
+#endif /* _ASM_GDB_STUB_H */
diff --git a/arch/mn10300/include/asm/hardirq.h b/arch/mn10300/include/asm/hardirq.h
new file mode 100644 (file)
index 0000000..54d9501
--- /dev/null
@@ -0,0 +1,48 @@
+/* MN10300 Hardware IRQ statistics and management
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Modified by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_HARDIRQ_H
+#define _ASM_HARDIRQ_H
+
+#include <linux/threads.h>
+#include <linux/irq.h>
+#include <asm/exceptions.h>
+
+/* assembly code in softirq.h is sensitive to the offsets of these fields */
+typedef struct {
+       unsigned int    __softirq_pending;
+       unsigned long   idle_timestamp;
+       unsigned int    __nmi_count;    /* arch dependent */
+       unsigned int    __irq_count;    /* arch dependent */
+} ____cacheline_aligned irq_cpustat_t;
+
+#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
+
+extern void ack_bad_irq(int irq);
+
+/*
+ * manipulate stubs in the MN10300 CPU Trap/Interrupt Vector table
+ * - these should jump to __common_exception in entry.S unless there's a good
+ *   reason to do otherwise (see trap_preinit() in traps.c)
+ */
+typedef void (*intr_stub_fnx)(struct pt_regs *regs,
+                             enum exception_code intcode);
+
+/*
+ * manipulate pointers in the Exception table (see entry.S)
+ * - these are indexed by decoding the lower 24 bits of the TBR register
+ * - note that the MN103E010 doesn't always trap through the correct vector,
+ *   but does always set the TBR correctly
+ */
+extern asmlinkage void set_excp_vector(enum exception_code code,
+                                      intr_stub_fnx handler);
+
+#endif /* _ASM_HARDIRQ_H */
diff --git a/arch/mn10300/include/asm/highmem.h b/arch/mn10300/include/asm/highmem.h
new file mode 100644 (file)
index 0000000..90f2abb
--- /dev/null
@@ -0,0 +1,116 @@
+/* MN10300 Virtual kernel memory mappings for high memory
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-i386/highmem.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_HIGHMEM_H
+#define _ASM_HIGHMEM_H
+
+#ifdef __KERNEL__
+
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/highmem.h>
+#include <asm/kmap_types.h>
+#include <asm/pgtable.h>
+
+/* undef for production */
+#undef HIGHMEM_DEBUG
+
+/* declarations for highmem.c */
+extern unsigned long highstart_pfn, highend_pfn;
+
+extern pte_t *kmap_pte;
+extern pgprot_t kmap_prot;
+extern pte_t *pkmap_page_table;
+
+extern void __init kmap_init(void);
+
+/*
+ * Right now we initialize only a single pte table. It can be extended
+ * easily, subsequent pte tables have to be allocated in one physical
+ * chunk of RAM.
+ */
+#define PKMAP_BASE     0xfe000000UL
+#define LAST_PKMAP     1024
+#define LAST_PKMAP_MASK (LAST_PKMAP - 1)
+#define PKMAP_NR(virt)  ((virt - PKMAP_BASE) >> PAGE_SHIFT)
+#define PKMAP_ADDR(nr)  (PKMAP_BASE + ((nr) << PAGE_SHIFT))
+
+extern unsigned long kmap_high(struct page *page);
+extern void kunmap_high(struct page *page);
+
+static inline unsigned long kmap(struct page *page)
+{
+       if (in_interrupt())
+               BUG();
+       if (page < highmem_start_page)
+               return page_address(page);
+       return kmap_high(page);
+}
+
+static inline void kunmap(struct page *page)
+{
+       if (in_interrupt())
+               BUG();
+       if (page < highmem_start_page)
+               return;
+       kunmap_high(page);
+}
+
+/*
+ * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap
+ * gives a more generic (and caching) interface. But kmap_atomic can
+ * be used in IRQ contexts, so in some (very limited) cases we need
+ * it.
+ */
+static inline unsigned long kmap_atomic(struct page *page, enum km_type type)
+{
+       enum fixed_addresses idx;
+       unsigned long vaddr;
+
+       if (page < highmem_start_page)
+               return page_address(page);
+
+       debug_kmap_atomic(type);
+       idx = type + KM_TYPE_NR * smp_processor_id();
+       vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+#if HIGHMEM_DEBUG
+       if (!pte_none(*(kmap_pte - idx)))
+               BUG();
+#endif
+       set_pte(kmap_pte - idx, mk_pte(page, kmap_prot));
+       __flush_tlb_one(vaddr);
+
+       return vaddr;
+}
+
+static inline void kunmap_atomic(unsigned long vaddr, enum km_type type)
+{
+#if HIGHMEM_DEBUG
+       enum fixed_addresses idx = type + KM_TYPE_NR * smp_processor_id();
+
+       if (vaddr < FIXADDR_START) /* FIXME */
+               return;
+
+       if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx))
+               BUG();
+
+       /*
+        * force other mappings to Oops if they'll try to access
+        * this pte without first remap it
+        */
+       pte_clear(kmap_pte - idx);
+       __flush_tlb_one(vaddr);
+#endif
+}
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_HIGHMEM_H */
diff --git a/arch/mn10300/include/asm/hw_irq.h b/arch/mn10300/include/asm/hw_irq.h
new file mode 100644 (file)
index 0000000..7061990
--- /dev/null
@@ -0,0 +1,14 @@
+/* MN10300 Hardware interrupt definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
+
+#endif /* _ASM_HW_IRQ_H */
diff --git a/arch/mn10300/include/asm/intctl-regs.h b/arch/mn10300/include/asm/intctl-regs.h
new file mode 100644 (file)
index 0000000..ba544c7
--- /dev/null
@@ -0,0 +1,73 @@
+/* MN10300 On-board interrupt controller registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_INTCTL_REGS_H
+#define _ASM_INTCTL_REGS_H
+
+#include <asm/cpu-regs.h>
+
+#ifdef __KERNEL__
+
+/* interrupt controller registers */
+#define GxICR(X)               __SYSREG(0xd4000000 + (X) * 4, u16)     /* group irq ctrl regs */
+
+#define IAGR                   __SYSREG(0xd4000100, u16)       /* intr acceptance group reg */
+#define IAGR_GN                        0x00fc          /* group number register
+                                                * (documentation _has_ to be wrong)
+                                                */
+
+#define EXTMD                  __SYSREG(0xd4000200, u16)       /* external pin intr spec reg */
+#define GET_XIRQ_TRIGGER(X) ((EXTMD >> ((X) * 2)) & 3)
+
+#define SET_XIRQ_TRIGGER(X,Y)                  \
+do {                                           \
+       u16 x = EXTMD;                          \
+       x &= ~(3 << ((X) * 2));                 \
+       x |= ((Y) & 3) << ((X) * 2);            \
+       EXTMD = x;                              \
+} while (0)
+
+#define XIRQ_TRIGGER_LOWLEVEL  0
+#define XIRQ_TRIGGER_HILEVEL   1
+#define XIRQ_TRIGGER_NEGEDGE   2
+#define XIRQ_TRIGGER_POSEDGE   3
+
+/* non-maskable interrupt control */
+#define NMIIRQ                 0
+#define NMICR                  GxICR(NMIIRQ)   /* NMI control register */
+#define NMICR_NMIF             0x0001          /* NMI pin interrupt flag */
+#define NMICR_WDIF             0x0002          /* watchdog timer overflow flag */
+#define NMICR_ABUSERR          0x0008          /* async bus error flag */
+
+/* maskable interrupt control */
+#define GxICR_DETECT           0x0001          /* interrupt detect flag */
+#define GxICR_REQUEST          0x0010          /* interrupt request flag */
+#define GxICR_ENABLE           0x0100          /* interrupt enable flag */
+#define GxICR_LEVEL            0x7000          /* interrupt priority level */
+#define GxICR_LEVEL_0          0x0000          /* - level 0 */
+#define GxICR_LEVEL_1          0x1000          /* - level 1 */
+#define GxICR_LEVEL_2          0x2000          /* - level 2 */
+#define GxICR_LEVEL_3          0x3000          /* - level 3 */
+#define GxICR_LEVEL_4          0x4000          /* - level 4 */
+#define GxICR_LEVEL_5          0x5000          /* - level 5 */
+#define GxICR_LEVEL_6          0x6000          /* - level 6 */
+#define GxICR_LEVEL_SHIFT      12
+
+#ifndef __ASSEMBLY__
+extern void set_intr_level(int irq, u16 level);
+extern void set_intr_postackable(int irq);
+#endif
+
+/* external interrupts */
+#define XIRQxICR(X)            GxICR((X))      /* external interrupt control regs */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_INTCTL_REGS_H */
diff --git a/arch/mn10300/include/asm/io.h b/arch/mn10300/include/asm/io.h
new file mode 100644 (file)
index 0000000..c1a4119
--- /dev/null
@@ -0,0 +1,301 @@
+/* MN10300 I/O port emulation and memory-mapped I/O
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+
+#include <asm/page.h> /* I/O is all done through memory accesses */
+#include <asm/cpu-regs.h>
+#include <asm/cacheflush.h>
+
+#define mmiowb() do {} while (0)
+
+/*****************************************************************************/
+/*
+ * readX/writeX() are used to access memory mapped devices. On some
+ * architectures the memory mapped IO stuff needs to be accessed
+ * differently. On the x86 architecture, we just read/write the
+ * memory location directly.
+ */
+static inline u8 readb(const volatile void __iomem *addr)
+{
+       return *(const volatile u8 *) addr;
+}
+
+static inline u16 readw(const volatile void __iomem *addr)
+{
+       return *(const volatile u16 *) addr;
+}
+
+static inline u32 readl(const volatile void __iomem *addr)
+{
+       return *(const volatile u32 *) addr;
+}
+
+#define __raw_readb readb
+#define __raw_readw readw
+#define __raw_readl readl
+
+#define readb_relaxed readb
+#define readw_relaxed readw
+#define readl_relaxed readl
+
+static inline void writeb(u8 b, volatile void __iomem *addr)
+{
+       *(volatile u8 *) addr = b;
+}
+
+static inline void writew(u16 b, volatile void __iomem *addr)
+{
+       *(volatile u16 *) addr = b;
+}
+
+static inline void writel(u32 b, volatile void __iomem *addr)
+{
+       *(volatile u32 *) addr = b;
+}
+
+#define __raw_writeb writeb
+#define __raw_writew writew
+#define __raw_writel writel
+
+/*****************************************************************************/
+/*
+ * traditional input/output functions
+ */
+static inline u8 inb_local(unsigned long addr)
+{
+       return readb((volatile void __iomem *) addr);
+}
+
+static inline void outb_local(u8 b, unsigned long addr)
+{
+       return writeb(b, (volatile void __iomem *) addr);
+}
+
+static inline u8 inb(unsigned long addr)
+{
+       return readb((volatile void __iomem *) addr);
+}
+
+static inline u16 inw(unsigned long addr)
+{
+       return readw((volatile void __iomem *) addr);
+}
+
+static inline u32 inl(unsigned long addr)
+{
+       return readl((volatile void __iomem *) addr);
+}
+
+static inline void outb(u8 b, unsigned long addr)
+{
+       return writeb(b, (volatile void __iomem *) addr);
+}
+
+static inline void outw(u16 b, unsigned long addr)
+{
+       return writew(b, (volatile void __iomem *) addr);
+}
+
+static inline void outl(u32 b, unsigned long addr)
+{
+       return writel(b, (volatile void __iomem *) addr);
+}
+
+#define inb_p(addr)    inb(addr)
+#define inw_p(addr)    inw(addr)
+#define inl_p(addr)    inl(addr)
+#define outb_p(x, addr)        outb((x), (addr))
+#define outw_p(x, addr)        outw((x), (addr))
+#define outl_p(x, addr)        outl((x), (addr))
+
+static inline void insb(unsigned long addr, void *buffer, int count)
+{
+       if (count) {
+               u8 *buf = buffer;
+               do {
+                       u8 x = inb(addr);
+                       *buf++ = x;
+               } while (--count);
+       }
+}
+
+static inline void insw(unsigned long addr, void *buffer, int count)
+{
+       if (count) {
+               u16 *buf = buffer;
+               do {
+                       u16 x = inw(addr);
+                       *buf++ = x;
+               } while (--count);
+       }
+}
+
+static inline void insl(unsigned long addr, void *buffer, int count)
+{
+       if (count) {
+               u32 *buf = buffer;
+               do {
+                       u32 x = inl(addr);
+                       *buf++ = x;
+               } while (--count);
+       }
+}
+
+static inline void outsb(unsigned long addr, const void *buffer, int count)
+{
+       if (count) {
+               const u8 *buf = buffer;
+               do {
+                       outb(*buf++, addr);
+               } while (--count);
+       }
+}
+
+static inline void outsw(unsigned long addr, const void *buffer, int count)
+{
+       if (count) {
+               const u16 *buf = buffer;
+               do {
+                       outw(*buf++, addr);
+               } while (--count);
+       }
+}
+
+extern void __outsl(unsigned long addr, const void *buffer, int count);
+static inline void outsl(unsigned long addr, const void *buffer, int count)
+{
+       if ((unsigned long) buffer & 0x3)
+               return __outsl(addr, buffer, count);
+
+       if (count) {
+               const u32 *buf = buffer;
+               do {
+                       outl(*buf++, addr);
+               } while (--count);
+       }
+}
+
+#define ioread8(addr)          readb(addr)
+#define ioread16(addr)         readw(addr)
+#define ioread32(addr)         readl(addr)
+
+#define iowrite8(v, addr)      writeb((v), (addr))
+#define iowrite16(v, addr)     writew((v), (addr))
+#define iowrite32(v, addr)     writel((v), (addr))
+
+#define ioread8_rep(p, dst, count) \
+       insb((unsigned long) (p), (dst), (count))
+#define ioread16_rep(p, dst, count) \
+       insw((unsigned long) (p), (dst), (count))
+#define ioread32_rep(p, dst, count) \
+       insl((unsigned long) (p), (dst), (count))
+
+#define iowrite8_rep(p, src, count) \
+       outsb((unsigned long) (p), (src), (count))
+#define iowrite16_rep(p, src, count) \
+       outsw((unsigned long) (p), (src), (count))
+#define iowrite32_rep(p, src, count) \
+       outsl((unsigned long) (p), (src), (count))
+
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+#ifdef __KERNEL__
+
+#include <linux/vmalloc.h>
+#define __io_virt(x) ((void *) (x))
+
+/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
+struct pci_dev;
+extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
+static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
+{
+}
+
+/*
+ * Change virtual addresses to physical addresses and vv.
+ * These are pretty trivial
+ */
+static inline unsigned long virt_to_phys(volatile void *address)
+{
+       return __pa(address);
+}
+
+static inline void *phys_to_virt(unsigned long address)
+{
+       return __va(address);
+}
+
+/*
+ * Change "struct page" to physical address.
+ */
+static inline void *__ioremap(unsigned long offset, unsigned long size,
+                             unsigned long flags)
+{
+       return (void *) offset;
+}
+
+static inline void *ioremap(unsigned long offset, unsigned long size)
+{
+       return (void *) offset;
+}
+
+/*
+ * This one maps high address device memory and turns off caching for that
+ * area.  it's useful if some control registers are in such an area and write
+ * combining or read caching is not desirable:
+ */
+static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
+{
+       return (void *) (offset | 0x20000000);
+}
+
+#define ioremap_wc ioremap_nocache
+
+static inline void iounmap(void *addr)
+{
+}
+
+static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
+{
+       return (void __iomem *) port;
+}
+
+static inline void ioport_unmap(void __iomem *p)
+{
+}
+
+#define xlate_dev_kmem_ptr(p)  ((void *) (p))
+#define xlate_dev_mem_ptr(p)   ((void *) (p))
+
+/*
+ * PCI bus iomem addresses must be in the region 0x80000000-0x9fffffff
+ */
+static inline unsigned long virt_to_bus(volatile void *address)
+{
+       return ((unsigned long) address) & ~0x20000000;
+}
+
+static inline void *bus_to_virt(unsigned long address)
+{
+       return (void *) address;
+}
+
+#define page_to_bus page_to_phys
+
+#define memset_io(a, b, c)     memset(__io_virt(a), (b), (c))
+#define memcpy_fromio(a, b, c) memcpy((a), __io_virt(b), (c))
+#define memcpy_toio(a, b, c)   memcpy(__io_virt(a), (b), (c))
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_IO_H */
diff --git a/arch/mn10300/include/asm/ioctl.h b/arch/mn10300/include/asm/ioctl.h
new file mode 100644 (file)
index 0000000..b279fe0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctl.h>
diff --git a/arch/mn10300/include/asm/ioctls.h b/arch/mn10300/include/asm/ioctls.h
new file mode 100644 (file)
index 0000000..dcbfb45
--- /dev/null
@@ -0,0 +1,88 @@
+#ifndef _ASM_IOCTLS_H
+#define _ASM_IOCTLS_H
+
+#include <asm/ioctl.h>
+
+/* 0x54 is just a magic number to make these relatively unique ('T') */
+
+#define TCGETS         0x5401
+#define TCSETS         0x5402
+#define TCSETSW                0x5403
+#define TCSETSF                0x5404
+#define TCGETA         0x5405
+#define TCSETA         0x5406
+#define TCSETAW                0x5407
+#define TCSETAF                0x5408
+#define TCSBRK         0x5409
+#define TCXONC         0x540A
+#define TCFLSH         0x540B
+#define TIOCEXCL       0x540C
+#define TIOCNXCL       0x540D
+#define TIOCSCTTY      0x540E
+#define TIOCGPGRP      0x540F
+#define TIOCSPGRP      0x5410
+#define TIOCOUTQ       0x5411
+#define TIOCSTI                0x5412
+#define TIOCGWINSZ     0x5413
+#define TIOCSWINSZ     0x5414
+#define TIOCMGET       0x5415
+#define TIOCMBIS       0x5416
+#define TIOCMBIC       0x5417
+#define TIOCMSET       0x5418
+#define TIOCGSOFTCAR   0x5419
+#define TIOCSSOFTCAR   0x541A
+#define FIONREAD       0x541B
+#define TIOCINQ                FIONREAD
+#define TIOCLINUX      0x541C
+#define TIOCCONS       0x541D
+#define TIOCGSERIAL    0x541E
+#define TIOCSSERIAL    0x541F
+#define TIOCPKT                0x5420
+#define FIONBIO                0x5421
+#define TIOCNOTTY      0x5422
+#define TIOCSETD       0x5423
+#define TIOCGETD       0x5424
+#define TCSBRKP                0x5425  /* Needed for POSIX tcsendbreak() */
+/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
+#define TIOCSBRK       0x5427  /* BSD compatibility */
+#define TIOCCBRK       0x5428  /* BSD compatibility */
+#define TIOCGSID       0x5429  /* Return the session ID of FD */
+#define TCGETS2                _IOR('T', 0x2A, struct termios2)
+#define TCSETS2                _IOW('T', 0x2B, struct termios2)
+#define TCSETSW2       _IOW('T', 0x2C, struct termios2)
+#define TCSETSF2       _IOW('T', 0x2D, struct termios2)
+#define TIOCGPTN       _IOR('T', 0x30, unsigned int) /* Get Pty Number
+                                                      * (of pty-mux device) */
+#define TIOCSPTLCK     _IOW('T', 0x31, int)  /* Lock/unlock Pty */
+
+#define FIONCLEX       0x5450
+#define FIOCLEX                0x5451
+#define FIOASYNC       0x5452
+#define TIOCSERCONFIG  0x5453
+#define TIOCSERGWILD   0x5454
+#define TIOCSERSWILD   0x5455
+#define TIOCGLCKTRMIOS 0x5456
+#define TIOCSLCKTRMIOS 0x5457
+#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+#define TIOCSERGETLSR   0x5459 /* Get line status register */
+#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
+#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+
+#define TIOCMIWAIT     0x545C  /* wait for a change on serial input line(s) */
+#define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
+#define TIOCGHAYESESP   0x545E  /* Get Hayes ESP configuration */
+#define TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
+#define FIOQSIZE       0x5460
+
+/* Used for packet mode */
+#define TIOCPKT_DATA            0
+#define TIOCPKT_FLUSHREAD       1
+#define TIOCPKT_FLUSHWRITE      2
+#define TIOCPKT_STOP            4
+#define TIOCPKT_START           8
+#define TIOCPKT_NOSTOP         16
+#define TIOCPKT_DOSTOP         32
+
+#define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+
+#endif /* _ASM_IOCTLS_H */
diff --git a/arch/mn10300/include/asm/ipc.h b/arch/mn10300/include/asm/ipc.h
new file mode 100644 (file)
index 0000000..a46e3d9
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ipc.h>
diff --git a/arch/mn10300/include/asm/ipcbuf.h b/arch/mn10300/include/asm/ipcbuf.h
new file mode 100644 (file)
index 0000000..f6f63d4
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef _ASM_IPCBUF_H
+#define _ASM_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for MN10300 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+       __kernel_key_t          key;
+       __kernel_uid32_t        uid;
+       __kernel_gid32_t        gid;
+       __kernel_uid32_t        cuid;
+       __kernel_gid32_t        cgid;
+       __kernel_mode_t         mode;
+       unsigned short          __pad1;
+       unsigned short          seq;
+       unsigned short          __pad2;
+       unsigned long           __unused1;
+       unsigned long           __unused2;
+};
+
+#endif /* _ASM_IPCBUF_H */
diff --git a/arch/mn10300/include/asm/irq.h b/arch/mn10300/include/asm/irq.h
new file mode 100644 (file)
index 0000000..25c045d
--- /dev/null
@@ -0,0 +1,32 @@
+/* MN10300 Hardware interrupt definitions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Modified by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-i386/irq.h:
+ *   - (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_IRQ_H
+#define _ASM_IRQ_H
+
+#include <asm/intctl-regs.h>
+#include <asm/reset-regs.h>
+#include <proc/irq.h>
+
+/* this number is used when no interrupt has been assigned */
+#define NO_IRQ         INT_MAX
+
+/* hardware irq numbers */
+#define NR_IRQS                GxICR_NUM_IRQS
+
+/* external hardware irq numbers */
+#define NR_XIRQS       GxICR_NUM_XIRQS
+
+#define irq_canonicalize(IRQ) (IRQ)
+
+#endif /* _ASM_IRQ_H */
diff --git a/arch/mn10300/include/asm/irq_regs.h b/arch/mn10300/include/asm/irq_regs.h
new file mode 100644 (file)
index 0000000..a848cd2
--- /dev/null
@@ -0,0 +1,24 @@
+/* MN10300 IRQ registers pointer definition
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_IRQ_REGS_H
+#define _ASM_IRQ_REGS_H
+
+/*
+ * Per-cpu current frame pointer - the location of the last exception frame on
+ * the stack
+ */
+#define ARCH_HAS_OWN_IRQ_REGS
+
+#ifndef __ASSEMBLY__
+#define get_irq_regs() (__frame)
+#endif
+
+#endif /* _ASM_IRQ_REGS_H */
diff --git a/arch/mn10300/include/asm/kdebug.h b/arch/mn10300/include/asm/kdebug.h
new file mode 100644 (file)
index 0000000..0f47e11
--- /dev/null
@@ -0,0 +1,22 @@
+/* MN10300 In-kernel death knells
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_KDEBUG_H
+#define _ASM_KDEBUG_H
+
+/* Grossly misnamed. */
+enum die_val {
+       DIE_OOPS = 1,
+       DIE_BREAKPOINT,
+       DIE_GPF,
+};
+
+#endif /* _ASM_KDEBUG_H */
diff --git a/arch/mn10300/include/asm/kmap_types.h b/arch/mn10300/include/asm/kmap_types.h
new file mode 100644 (file)
index 0000000..3398f9f
--- /dev/null
@@ -0,0 +1,31 @@
+/* MN10300 kmap_atomic() slot IDs
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_KMAP_TYPES_H
+#define _ASM_KMAP_TYPES_H
+
+enum km_type {
+       KM_BOUNCE_READ,
+       KM_SKB_SUNRPC_DATA,
+       KM_SKB_DATA_SOFTIRQ,
+       KM_USER0,
+       KM_USER1,
+       KM_BIO_SRC_IRQ,
+       KM_BIO_DST_IRQ,
+       KM_PTE0,
+       KM_PTE1,
+       KM_IRQ0,
+       KM_IRQ1,
+       KM_SOFTIRQ0,
+       KM_SOFTIRQ1,
+       KM_TYPE_NR
+};
+
+#endif /* _ASM_KMAP_TYPES_H */
diff --git a/arch/mn10300/include/asm/kprobes.h b/arch/mn10300/include/asm/kprobes.h
new file mode 100644 (file)
index 0000000..c800b59
--- /dev/null
@@ -0,0 +1,50 @@
+/* MN10300 Kernel Probes support
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by Mark Salter (msalter@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public Licence as published by
+ * the Free Software Foundation; either version 2 of the Licence, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public Licence for more details.
+ *
+ * You should have received a copy of the GNU General Public Licence
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+#ifndef _ASM_KPROBES_H
+#define _ASM_KPROBES_H
+
+#include <linux/types.h>
+#include <linux/ptrace.h>
+
+struct kprobe;
+
+typedef unsigned char kprobe_opcode_t;
+#define BREAKPOINT_INSTRUCTION 0xff
+#define MAX_INSN_SIZE 8
+#define MAX_STACK_SIZE 128
+
+/* Architecture specific copy of original instruction */
+struct arch_specific_insn {
+       /*  copy of original instruction
+        */
+       kprobe_opcode_t insn[MAX_INSN_SIZE];
+};
+
+extern const int kretprobe_blacklist_size;
+
+extern int kprobe_exceptions_notify(struct notifier_block *self,
+                                   unsigned long val, void *data);
+
+#define flush_insn_slot(p)  do {} while (0)
+
+extern void arch_remove_kprobe(struct kprobe *p);
+
+#endif /* _ASM_KPROBES_H */
diff --git a/arch/mn10300/include/asm/linkage.h b/arch/mn10300/include/asm/linkage.h
new file mode 100644 (file)
index 0000000..dda3002
--- /dev/null
@@ -0,0 +1,20 @@
+/* MN10300 Linkage and calling-convention overrides
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_LINKAGE_H
+#define _ASM_LINKAGE_H
+
+/* don't override anything */
+#define asmlinkage
+
+#define __ALIGN                .align 4,0xcb
+#define __ALIGN_STR    ".align 4,0xcb"
+
+#endif
diff --git a/arch/mn10300/include/asm/local.h b/arch/mn10300/include/asm/local.h
new file mode 100644 (file)
index 0000000..c11c530
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/local.h>
diff --git a/arch/mn10300/include/asm/mc146818rtc.h b/arch/mn10300/include/asm/mc146818rtc.h
new file mode 100644 (file)
index 0000000..df6bc6e
--- /dev/null
@@ -0,0 +1 @@
+#include <asm/rtc-regs.h>
diff --git a/arch/mn10300/include/asm/mman.h b/arch/mn10300/include/asm/mman.h
new file mode 100644 (file)
index 0000000..b7986b6
--- /dev/null
@@ -0,0 +1,28 @@
+/* MN10300 Constants for mmap and co.
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * - Derived from asm-x86/mman.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_MMAN_H
+#define _ASM_MMAN_H
+
+#include <asm-generic/mman.h>
+
+#define MAP_GROWSDOWN  0x0100          /* stack-like segment */
+#define MAP_DENYWRITE  0x0800          /* ETXTBSY */
+#define MAP_EXECUTABLE 0x1000          /* mark it as an executable */
+#define MAP_LOCKED     0x2000          /* pages are locked */
+#define MAP_NORESERVE  0x4000          /* don't check for reservations */
+#define MAP_POPULATE   0x8000          /* populate (prefault) pagetables */
+#define MAP_NONBLOCK   0x10000         /* do not block on IO */
+
+#define MCL_CURRENT    1               /* lock all current mappings */
+#define MCL_FUTURE     2               /* lock all future mappings */
+
+#endif /* _ASM_MMAN_H */
diff --git a/arch/mn10300/include/asm/mmu.h b/arch/mn10300/include/asm/mmu.h
new file mode 100644 (file)
index 0000000..2d2d097
--- /dev/null
@@ -0,0 +1,19 @@
+/* MN10300 Memory management context
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-frv/mmu.h
+ */
+
+#ifndef _ASM_MMU_H
+#define _ASM_MMU_H
+
+/*
+ * MMU context
+ */
+typedef struct {
+       unsigned long   tlbpid[NR_CPUS];        /* TLB PID for this process on
+                                                * each CPU */
+} mm_context_t;
+
+#endif /* _ASM_MMU_H */
diff --git a/arch/mn10300/include/asm/mmu_context.h b/arch/mn10300/include/asm/mmu_context.h
new file mode 100644 (file)
index 0000000..a9e2e34
--- /dev/null
@@ -0,0 +1,138 @@
+/* MN10300 MMU context management
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Modified by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-m32r/mmu_context.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ *
+ *
+ * This implements an algorithm to provide TLB PID mappings to provide
+ * selective access to the TLB for processes, thus reducing the number of TLB
+ * flushes required.
+ *
+ * Note, however, that the M32R algorithm is technically broken as it does not
+ * handle version wrap-around, and could, theoretically, have a problem with a
+ * very long lived program that sleeps long enough for the version number to
+ * wrap all the way around so that its TLB mappings appear valid once again.
+ */
+#ifndef _ASM_MMU_CONTEXT_H
+#define _ASM_MMU_CONTEXT_H
+
+#include <asm/atomic.h>
+#include <asm/pgalloc.h>
+#include <asm/tlbflush.h>
+#include <asm-generic/mm_hooks.h>
+
+#define MMU_CONTEXT_TLBPID_MASK                0x000000ffUL
+#define MMU_CONTEXT_VERSION_MASK       0xffffff00UL
+#define MMU_CONTEXT_FIRST_VERSION      0x00000100UL
+#define MMU_NO_CONTEXT                 0x00000000UL
+
+extern unsigned long mmu_context_cache[NR_CPUS];
+#define mm_context(mm) (mm->context.tlbpid[smp_processor_id()])
+
+#define enter_lazy_tlb(mm, tsk)        do {} while (0)
+
+#ifdef CONFIG_SMP
+#define cpu_ran_vm(cpu, task) \
+       cpu_set((cpu), (task)->cpu_vm_mask)
+#define cpu_maybe_ran_vm(cpu, task) \
+       cpu_test_and_set((cpu), (task)->cpu_vm_mask)
+#else
+#define cpu_ran_vm(cpu, task)          do {} while (0)
+#define cpu_maybe_ran_vm(cpu, task)    true
+#endif /* CONFIG_SMP */
+
+/*
+ * allocate an MMU context
+ */
+static inline unsigned long allocate_mmu_context(struct mm_struct *mm)
+{
+       unsigned long *pmc = &mmu_context_cache[smp_processor_id()];
+       unsigned long mc = ++(*pmc);
+
+       if (!(mc & MMU_CONTEXT_TLBPID_MASK)) {
+               /* we exhausted the TLB PIDs of this version on this CPU, so we
+                * flush this CPU's TLB in its entirety and start new cycle */
+               flush_tlb_all();
+
+               /* fix the TLB version if needed (we avoid version #0 so as to
+                * distingush MMU_NO_CONTEXT) */
+               if (!mc)
+                       *pmc = mc = MMU_CONTEXT_FIRST_VERSION;
+       }
+       mm_context(mm) = mc;
+       return mc;
+}
+
+/*
+ * get an MMU context if one is needed
+ */
+static inline unsigned long get_mmu_context(struct mm_struct *mm)
+{
+       unsigned long mc = MMU_NO_CONTEXT, cache;
+
+       if (mm) {
+               cache = mmu_context_cache[smp_processor_id()];
+               mc = mm_context(mm);
+
+               /* if we have an old version of the context, replace it */
+               if ((mc ^ cache) & MMU_CONTEXT_VERSION_MASK)
+                       mc = allocate_mmu_context(mm);
+       }
+       return mc;
+}
+
+/*
+ * initialise the context related info for a new mm_struct instance
+ */
+static inline int init_new_context(struct task_struct *tsk,
+                                  struct mm_struct *mm)
+{
+       int num_cpus = NR_CPUS, i;
+
+       for (i = 0; i < num_cpus; i++)
+               mm->context.tlbpid[i] = MMU_NO_CONTEXT;
+       return 0;
+}
+
+/*
+ * destroy context related info for an mm_struct that is about to be put to
+ * rest
+ */
+#define destroy_context(mm)    do { } while (0)
+
+/*
+ * after we have set current->mm to a new value, this activates the context for
+ * the new mm so we see the new mappings.
+ */
+static inline void activate_context(struct mm_struct *mm, int cpu)
+{
+       PIDR = get_mmu_context(mm) & MMU_CONTEXT_TLBPID_MASK;
+}
+
+/*
+ * change between virtual memory sets
+ */
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
+                            struct task_struct *tsk)
+{
+       int cpu = smp_processor_id();
+
+       if (prev != next) {
+               cpu_ran_vm(cpu, next);
+               activate_context(next, cpu);
+               PTBR = (unsigned long) next->pgd;
+       } else if (!cpu_maybe_ran_vm(cpu, next)) {
+               activate_context(next, cpu);
+       }
+}
+
+#define deactivate_mm(tsk, mm) do {} while (0)
+#define activate_mm(prev, next)        switch_mm((prev), (next), NULL)
+
+#endif /* _ASM_MMU_CONTEXT_H */
diff --git a/arch/mn10300/include/asm/module.h b/arch/mn10300/include/asm/module.h
new file mode 100644 (file)
index 0000000..5d7057d
--- /dev/null
@@ -0,0 +1,27 @@
+/* MN10300 Arch-specific module definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by Mark Salter (msalter@redhat.com)
+ * Derived from include/asm-i386/module.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_MODULE_H
+#define _ASM_MODULE_H
+
+struct mod_arch_specific {
+};
+
+#define Elf_Shdr       Elf32_Shdr
+#define Elf_Sym                Elf32_Sym
+#define Elf_Ehdr       Elf32_Ehdr
+
+/*
+ * Include the MN10300 architecture version.
+ */
+#define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " "
+
+#endif /* _ASM_MODULE_H */
diff --git a/arch/mn10300/include/asm/msgbuf.h b/arch/mn10300/include/asm/msgbuf.h
new file mode 100644 (file)
index 0000000..8b60245
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef _ASM_MSGBUF_H
+#define _ASM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for MN10300 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+       struct ipc64_perm       msg_perm;
+       __kernel_time_t         msg_stime;      /* last msgsnd time */
+       unsigned long           __unused1;
+       __kernel_time_t         msg_rtime;      /* last msgrcv time */
+       unsigned long           __unused2;
+       __kernel_time_t         msg_ctime;      /* last change time */
+       unsigned long           __unused3;
+       unsigned long           msg_cbytes;     /* current number of bytes on queue */
+       unsigned long           msg_qnum;       /* number of messages in queue */
+       unsigned long           msg_qbytes;     /* max number of bytes on queue */
+       __kernel_pid_t          msg_lspid;      /* pid of last msgsnd */
+       __kernel_pid_t          msg_lrpid;      /* last receive pid */
+       unsigned long           __unused4;
+       unsigned long           __unused5;
+};
+
+#endif /* _ASM_MSGBUF_H */
diff --git a/arch/mn10300/include/asm/mutex.h b/arch/mn10300/include/asm/mutex.h
new file mode 100644 (file)
index 0000000..84f5490
--- /dev/null
@@ -0,0 +1,16 @@
+/* MN10300 Mutex fastpath
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ *
+ *
+ * TODO: implement optimized primitives instead, or leave the generic
+ * implementation in place, or pick the atomic_xchg() based generic
+ * implementation. (see asm-generic/mutex-xchg.h for details)
+ */
+#include <asm-generic/mutex-null.h>
diff --git a/arch/mn10300/include/asm/nmi.h b/arch/mn10300/include/asm/nmi.h
new file mode 100644 (file)
index 0000000..f3671cb
--- /dev/null
@@ -0,0 +1,14 @@
+/* MN10300 NMI handling
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_NMI_H
+#define _ASM_NMI_H
+
+#endif /* _ASM_NMI_H */
diff --git a/arch/mn10300/include/asm/page.h b/arch/mn10300/include/asm/page.h
new file mode 100644 (file)
index 0000000..8288e12
--- /dev/null
@@ -0,0 +1,128 @@
+/* MN10300 Page table definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PAGE_H
+#define _ASM_PAGE_H
+
+/* PAGE_SHIFT determines the page size */
+#define PAGE_SHIFT     12
+
+#ifndef __ASSEMBLY__
+#define PAGE_SIZE      (1UL << PAGE_SHIFT)
+#define PAGE_MASK      (~(PAGE_SIZE - 1))
+#else
+#define PAGE_SIZE      +(1 << PAGE_SHIFT)      /* unary plus marks an
+                                                * immediate val not an addr */
+#define PAGE_MASK      +(~(PAGE_SIZE - 1))
+#endif
+
+#ifdef __KERNEL__
+#ifndef __ASSEMBLY__
+
+#define clear_page(page)       memset((void *)(page), 0, PAGE_SIZE)
+#define copy_page(to, from)    memcpy((void *)(to), (void *)(from), PAGE_SIZE)
+
+#define clear_user_page(addr, vaddr, page)     clear_page(addr)
+#define copy_user_page(vto, vfrom, vaddr, to)  copy_page(vto, vfrom)
+
+/*
+ * These are used to make use of C type-checking..
+ */
+typedef struct { unsigned long pte; } pte_t;
+typedef struct { unsigned long pgd; } pgd_t;
+typedef struct { unsigned long pgprot; } pgprot_t;
+typedef struct page *pgtable_t;
+
+#define PTE_MASK       PAGE_MASK
+#define HPAGE_SHIFT    22
+
+#ifdef CONFIG_HUGETLB_PAGE
+#define HPAGE_SIZE             ((1UL) << HPAGE_SHIFT)
+#define HPAGE_MASK             (~(HPAGE_SIZE - 1))
+#define HUGETLB_PAGE_ORDER     (HPAGE_SHIFT - PAGE_SHIFT)
+#endif
+
+#define pte_val(x)     ((x).pte)
+#define pgd_val(x)     ((x).pgd)
+#define pgprot_val(x)  ((x).pgprot)
+
+#define __pte(x)       ((pte_t) { (x) })
+#define __pgd(x)       ((pgd_t) { (x) })
+#define __pgprot(x)    ((pgprot_t) { (x) })
+
+#include <asm-generic/pgtable-nopmd.h>
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * This handles the memory map.. We could make this a config
+ * option, but too many people screw it up, and too few need
+ * it.
+ *
+ * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
+ * a virtual address space of one gigabyte, which limits the
+ * amount of physical memory you can use to about 950MB.
+ */
+
+#ifndef __ASSEMBLY__
+
+/* Pure 2^n version of get_order */
+static inline int get_order(unsigned long size) __attribute__((const));
+static inline int get_order(unsigned long size)
+{
+       int order;
+
+       size = (size - 1) >> (PAGE_SHIFT - 1);
+       order = -1;
+       do {
+               size >>= 1;
+               order++;
+       } while (size);
+       return order;
+}
+
+#endif /* __ASSEMBLY__ */
+
+#include <asm/page_offset.h>
+
+#define __PAGE_OFFSET          (PAGE_OFFSET_RAW)
+#define PAGE_OFFSET            ((unsigned long) __PAGE_OFFSET)
+
+/*
+ * main RAM and kernel working space are coincident at 0x90000000, but to make
+ * life more interesting, there's also an uncached virtual shadow at 0xb0000000
+ * - these mappings are fixed in the MMU
+ */
+#define __pfn_disp             (CONFIG_KERNEL_RAM_BASE_ADDRESS >> PAGE_SHIFT)
+
+#define __pa(x)                        ((unsigned long)(x))
+#define __va(x)                        ((void *)(unsigned long)(x))
+#define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)
+#define pfn_to_page(pfn)       (mem_map + ((pfn) - __pfn_disp))
+#define page_to_pfn(page)      ((unsigned long)((page) - mem_map) + __pfn_disp)
+
+#define pfn_valid(pfn)                                 \
+({                                                     \
+       unsigned long __pfn = (pfn) - __pfn_disp;       \
+       __pfn < max_mapnr;                              \
+})
+
+#define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+#define page_to_phys(page)     (page_to_pfn(page) << PAGE_SHIFT)
+
+#define VM_DATA_DEFAULT_FLAGS \
+       (VM_READ | VM_WRITE | \
+       ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
+                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_PAGE_H */
diff --git a/arch/mn10300/include/asm/page_offset.h b/arch/mn10300/include/asm/page_offset.h
new file mode 100644 (file)
index 0000000..8eb5b16
--- /dev/null
@@ -0,0 +1,11 @@
+/* MN10300 Kernel base address
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ */
+#ifndef _ASM_PAGE_OFFSET_H
+#define _ASM_PAGE_OFFSET_H
+
+#define PAGE_OFFSET_RAW CONFIG_KERNEL_RAM_BASE_ADDRESS
+
+#endif
diff --git a/arch/mn10300/include/asm/param.h b/arch/mn10300/include/asm/param.h
new file mode 100644 (file)
index 0000000..789b1df
--- /dev/null
@@ -0,0 +1,34 @@
+/* MN10300 Kernel parameters
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PARAM_H
+#define _ASM_PARAM_H
+
+#ifdef __KERNEL__
+#define HZ             CONFIG_HZ       /* Internal kernel timer frequency */
+#define USER_HZ                100             /* .. some user interfaces are in
+                                        * "ticks" */
+#define CLOCKS_PER_SEC (USER_HZ)       /* like times() */
+#endif
+
+#ifndef HZ
+#define HZ             100
+#endif
+
+#define EXEC_PAGESIZE  4096
+
+#ifndef NOGROUP
+#define NOGROUP                (-1)
+#endif
+
+#define MAXHOSTNAMELEN 64      /* max length of hostname */
+#define COMMAND_LINE_SIZE 256
+
+#endif /* _ASM_PARAM_H */
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h
new file mode 100644 (file)
index 0000000..0517b45
--- /dev/null
@@ -0,0 +1,129 @@
+/* MN10300 PCI definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PCI_H
+#define _ASM_PCI_H
+
+#ifdef __KERNEL__
+#include <linux/mm.h>          /* for struct page */
+
+#if 0
+#define __pcbdebug(FMT, ADDR, ...) \
+       printk(KERN_DEBUG "PCIBRIDGE[%08x]: "FMT"\n", \
+              (u32)(ADDR), ##__VA_ARGS__)
+
+#define __pcidebug(FMT, BUS, DEVFN, WHERE,...)         \
+do {                                                   \
+       printk(KERN_DEBUG "PCI[%02x:%02x.%x + %02x]: "FMT"\n",  \
+              (BUS)->number,                                   \
+              PCI_SLOT(DEVFN),                                 \
+              PCI_FUNC(DEVFN),                                 \
+              (u32)(WHERE), ##__VA_ARGS__);                    \
+} while (0)
+
+#else
+#define __pcbdebug(FMT, ADDR, ...)             do {} while (0)
+#define __pcidebug(FMT, BUS, DEVFN, WHERE, ...)        do {} while (0)
+#endif
+
+/* Can be used to override the logic in pci_scan_bus for skipping
+ * already-configured bus numbers - to be used for buggy BIOSes or
+ * architectures with incomplete PCI setup by the loader */
+
+#ifdef CONFIG_PCI
+#define pcibios_assign_all_busses()    1
+extern void unit_pci_init(void);
+#else
+#define pcibios_assign_all_busses()    0
+#endif
+
+extern unsigned long pci_mem_start;
+#define PCIBIOS_MIN_IO         0xBE000004
+#define PCIBIOS_MIN_MEM                0xB8000000
+
+void pcibios_set_master(struct pci_dev *dev);
+void pcibios_penalize_isa_irq(int irq);
+
+/* Dynamic DMA mapping stuff.
+ * i386 has everything mapped statically.
+ */
+
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <asm/scatterlist.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <asm/io.h>
+
+struct pci_dev;
+
+/* The PCI address space does equal the physical memory
+ * address space.  The networking and block device layers use
+ * this boolean for bounce buffer decisions.
+ */
+#define PCI_DMA_BUS_IS_PHYS    (1)
+
+
+/* This is always fine. */
+#define pci_dac_dma_supported(pci_dev, mask)   (0)
+
+/* Return the index of the PCI controller for device. */
+static inline int pci_controller_num(struct pci_dev *dev)
+{
+       return 0;
+}
+
+#define HAVE_PCI_MMAP
+extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+                              enum pci_mmap_state mmap_state,
+                              int write_combine);
+
+#endif /* __KERNEL__ */
+
+/* implement the pci_ DMA API in terms of the generic device dma_ one */
+#include <asm-generic/pci-dma-compat.h>
+
+/**
+ * pcibios_resource_to_bus - convert resource to PCI bus address
+ * @dev: device which owns this resource
+ * @region: converted bus-centric region (start,end)
+ * @res: resource to convert
+ *
+ * Convert a resource to a PCI device bus address or bus window.
+ */
+extern void pcibios_resource_to_bus(struct pci_dev *dev,
+                                   struct pci_bus_region *region,
+                                   struct resource *res);
+
+extern void pcibios_bus_to_resource(struct pci_dev *dev,
+                                   struct resource *res,
+                                   struct pci_bus_region *region);
+
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+       struct resource *root = NULL;
+
+       if (res->flags & IORESOURCE_IO)
+               root = &ioport_resource;
+       if (res->flags & IORESOURCE_MEM)
+               root = &iomem_resource;
+
+       return root;
+}
+
+#define pcibios_scan_all_fns(a, b)     0
+
+static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
+{
+       return channel ? 15 : 14;
+}
+
+#endif /* _ASM_PCI_H */
diff --git a/arch/mn10300/include/asm/percpu.h b/arch/mn10300/include/asm/percpu.h
new file mode 100644 (file)
index 0000000..06a959d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/percpu.h>
diff --git a/arch/mn10300/include/asm/pgalloc.h b/arch/mn10300/include/asm/pgalloc.h
new file mode 100644 (file)
index 0000000..ec057e1
--- /dev/null
@@ -0,0 +1,56 @@
+/* MN10300 Page and page table/directory allocation
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PGALLOC_H
+#define _ASM_PGALLOC_H
+
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <linux/threads.h>
+#include <linux/mm.h>          /* for struct page */
+
+struct mm_struct;
+struct page;
+
+/* attach a page table to a PMD entry */
+#define pmd_populate_kernel(mm, pmd, pte) \
+       set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE))
+
+static inline
+void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
+{
+       set_pmd(pmd, __pmd((page_to_pfn(pte) << PAGE_SHIFT) | _PAGE_TABLE));
+}
+#define pmd_pgtable(pmd) pmd_page(pmd)
+
+/*
+ * Allocate and free page tables.
+ */
+
+extern pgd_t *pgd_alloc(struct mm_struct *);
+extern void pgd_free(struct mm_struct *, pgd_t *);
+
+extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
+extern struct page *pte_alloc_one(struct mm_struct *, unsigned long);
+
+static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
+{
+       free_page((unsigned long) pte);
+}
+
+static inline void pte_free(struct mm_struct *mm, struct page *pte)
+{
+       __free_page(pte);
+}
+
+
+#define __pte_free_tlb(tlb, pte) tlb_remove_page((tlb), (pte))
+
+#endif /* _ASM_PGALLOC_H */
diff --git a/arch/mn10300/include/asm/pgtable.h b/arch/mn10300/include/asm/pgtable.h
new file mode 100644 (file)
index 0000000..6dc30fc
--- /dev/null
@@ -0,0 +1,492 @@
+/* MN10300 Page table manipulators and constants
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ *
+ *
+ * The Linux memory management assumes a three-level page table setup. On
+ * the i386, we use that, but "fold" the mid level into the top-level page
+ * table, so that we physically have the same two-level page table as the
+ * i386 mmu expects.
+ *
+ * This file contains the functions and defines necessary to modify and use
+ * the i386 page table tree for the purposes of the MN10300 TLB handler
+ * functions.
+ */
+#ifndef _ASM_PGTABLE_H
+#define _ASM_PGTABLE_H
+
+#include <asm/cpu-regs.h>
+
+#ifndef __ASSEMBLY__
+#include <asm/processor.h>
+#include <asm/cache.h>
+#include <linux/threads.h>
+
+#include <asm/bitops.h>
+
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+
+/*
+ * ZERO_PAGE is a global shared page that is always zero: used
+ * for zero-mapped memory areas etc..
+ */
+#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
+extern unsigned long empty_zero_page[1024];
+extern spinlock_t pgd_lock;
+extern struct page *pgd_list;
+
+extern void pmd_ctor(void *, struct kmem_cache *, unsigned long);
+extern void pgtable_cache_init(void);
+extern void paging_init(void);
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * The Linux mn10300 paging architecture only implements both the traditional
+ * 2-level page tables
+ */
+#define PGDIR_SHIFT    22
+#define PTRS_PER_PGD   1024
+#define PTRS_PER_PUD   1       /* we don't really have any PUD physically */
+#define PTRS_PER_PMD   1       /* we don't really have any PMD physically */
+#define PTRS_PER_PTE   1024
+
+#define PGD_SIZE       PAGE_SIZE
+#define PMD_SIZE       (1UL << PMD_SHIFT)
+#define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
+#define PGDIR_MASK     (~(PGDIR_SIZE - 1))
+
+#define USER_PTRS_PER_PGD      (TASK_SIZE / PGDIR_SIZE)
+#define FIRST_USER_ADDRESS     0
+
+#define USER_PGD_PTRS          (PAGE_OFFSET >> PGDIR_SHIFT)
+#define KERNEL_PGD_PTRS                (PTRS_PER_PGD - USER_PGD_PTRS)
+
+#define TWOLEVEL_PGDIR_SHIFT   22
+#define BOOT_USER_PGD_PTRS     (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
+#define BOOT_KERNEL_PGD_PTRS   (1024 - BOOT_USER_PGD_PTRS)
+
+#ifndef __ASSEMBLY__
+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+#endif
+
+/*
+ * Unfortunately, due to the way the MMU works on the MN10300, the vmalloc VM
+ * area has to be in the lower half of the virtual address range (the upper
+ * half is not translated through the TLB).
+ *
+ * So in this case, the vmalloc area goes at the bottom of the address map
+ * (leaving a hole at the very bottom to catch addressing errors), and
+ * userspace starts immediately above.
+ *
+ * The vmalloc() routines also leaves a hole of 4kB between each vmalloced
+ * area to catch addressing errors.
+ */
+#define VMALLOC_OFFSET (8 * 1024 * 1024)
+#define VMALLOC_START  (0x70000000)
+#define VMALLOC_END    (0x7C000000)
+
+#ifndef __ASSEMBLY__
+extern pte_t kernel_vmalloc_ptes[(VMALLOC_END - VMALLOC_START) / PAGE_SIZE];
+#endif
+
+/* IPTEL/DPTEL bit assignments */
+#define _PAGE_BIT_VALID                xPTEL_V_BIT
+#define _PAGE_BIT_ACCESSED     xPTEL_UNUSED1_BIT       /* mustn't be loaded into IPTEL/DPTEL */
+#define _PAGE_BIT_NX           xPTEL_UNUSED2_BIT       /* mustn't be loaded into IPTEL/DPTEL */
+#define _PAGE_BIT_CACHE                xPTEL_C_BIT
+#define _PAGE_BIT_PRESENT      xPTEL_PV_BIT
+#define _PAGE_BIT_DIRTY                xPTEL_D_BIT
+#define _PAGE_BIT_GLOBAL       xPTEL_G_BIT
+
+#define _PAGE_VALID            xPTEL_V
+#define _PAGE_ACCESSED         xPTEL_UNUSED1
+#define _PAGE_NX               xPTEL_UNUSED2           /* no-execute bit */
+#define _PAGE_CACHE            xPTEL_C
+#define _PAGE_PRESENT          xPTEL_PV
+#define _PAGE_DIRTY            xPTEL_D
+#define _PAGE_PROT             xPTEL_PR
+#define _PAGE_PROT_RKNU                xPTEL_PR_ROK
+#define _PAGE_PROT_WKNU                xPTEL_PR_RWK
+#define _PAGE_PROT_RKRU                xPTEL_PR_ROK_ROU
+#define _PAGE_PROT_WKRU                xPTEL_PR_RWK_ROU
+#define _PAGE_PROT_WKWU                xPTEL_PR_RWK_RWU
+#define _PAGE_GLOBAL           xPTEL_G
+#define _PAGE_PSE              xPTEL_PS_4Mb            /* 4MB page */
+
+#define _PAGE_FILE             xPTEL_UNUSED1_BIT       /* set:pagecache unset:swap */
+
+#define __PAGE_PROT_UWAUX      0x040
+#define __PAGE_PROT_USER       0x080
+#define __PAGE_PROT_WRITE      0x100
+
+#define _PAGE_PRESENTV         (_PAGE_PRESENT|_PAGE_VALID)
+#define _PAGE_PROTNONE         0x000   /* If not present */
+
+#ifndef __ASSEMBLY__
+
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+
+#define _PAGE_TABLE    (_PAGE_PRESENTV | _PAGE_PROT_WKNU | _PAGE_ACCESSED | _PAGE_DIRTY)
+#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+
+#define __PAGE_NONE    (_PAGE_PRESENTV | _PAGE_PROT_RKNU | _PAGE_ACCESSED | _PAGE_CACHE)
+#define __PAGE_SHARED  (_PAGE_PRESENTV | _PAGE_PROT_WKWU | _PAGE_ACCESSED | _PAGE_CACHE)
+#define __PAGE_COPY    (_PAGE_PRESENTV | _PAGE_PROT_RKRU | _PAGE_ACCESSED | _PAGE_CACHE)
+#define __PAGE_READONLY        (_PAGE_PRESENTV | _PAGE_PROT_RKRU | _PAGE_ACCESSED | _PAGE_CACHE)
+
+#define PAGE_NONE              __pgprot(__PAGE_NONE     | _PAGE_NX)
+#define PAGE_SHARED_NOEXEC     __pgprot(__PAGE_SHARED   | _PAGE_NX)
+#define PAGE_COPY_NOEXEC       __pgprot(__PAGE_COPY     | _PAGE_NX)
+#define PAGE_READONLY_NOEXEC   __pgprot(__PAGE_READONLY | _PAGE_NX)
+#define PAGE_SHARED_EXEC       __pgprot(__PAGE_SHARED)
+#define PAGE_COPY_EXEC         __pgprot(__PAGE_COPY)
+#define PAGE_READONLY_EXEC     __pgprot(__PAGE_READONLY)
+#define PAGE_COPY              PAGE_COPY_NOEXEC
+#define PAGE_READONLY          PAGE_READONLY_NOEXEC
+#define PAGE_SHARED            PAGE_SHARED_EXEC
+
+#define __PAGE_KERNEL_BASE (_PAGE_PRESENTV | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
+
+#define __PAGE_KERNEL          (__PAGE_KERNEL_BASE | _PAGE_PROT_WKNU | _PAGE_CACHE | _PAGE_NX)
+#define __PAGE_KERNEL_NOCACHE  (__PAGE_KERNEL_BASE | _PAGE_PROT_WKNU | _PAGE_NX)
+#define __PAGE_KERNEL_EXEC     (__PAGE_KERNEL & ~_PAGE_NX)
+#define __PAGE_KERNEL_RO       (__PAGE_KERNEL_BASE | _PAGE_PROT_RKNU | _PAGE_CACHE | _PAGE_NX)
+#define __PAGE_KERNEL_LARGE    (__PAGE_KERNEL | _PAGE_PSE)
+#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
+
+#define PAGE_KERNEL            __pgprot(__PAGE_KERNEL)
+#define PAGE_KERNEL_RO         __pgprot(__PAGE_KERNEL_RO)
+#define PAGE_KERNEL_EXEC       __pgprot(__PAGE_KERNEL_EXEC)
+#define PAGE_KERNEL_NOCACHE    __pgprot(__PAGE_KERNEL_NOCACHE)
+#define PAGE_KERNEL_LARGE      __pgprot(__PAGE_KERNEL_LARGE)
+#define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC)
+
+/*
+ * Whilst the MN10300 can do page protection for execute (given separate data
+ * and insn TLBs), we are not supporting it at the moment. Write permission,
+ * however, always implies read permission (but not execute permission).
+ */
+#define __P000 PAGE_NONE
+#define __P001 PAGE_READONLY_NOEXEC
+#define __P010 PAGE_COPY_NOEXEC
+#define __P011 PAGE_COPY_NOEXEC
+#define __P100 PAGE_READONLY_EXEC
+#define __P101 PAGE_READONLY_EXEC
+#define __P110 PAGE_COPY_EXEC
+#define __P111 PAGE_COPY_EXEC
+
+#define __S000 PAGE_NONE
+#define __S001 PAGE_READONLY_NOEXEC
+#define __S010 PAGE_SHARED_NOEXEC
+#define __S011 PAGE_SHARED_NOEXEC
+#define __S100 PAGE_READONLY_EXEC
+#define __S101 PAGE_READONLY_EXEC
+#define __S110 PAGE_SHARED_EXEC
+#define __S111 PAGE_SHARED_EXEC
+
+/*
+ * Define this to warn about kernel memory accesses that are
+ * done without a 'verify_area(VERIFY_WRITE,..)'
+ */
+#undef TEST_VERIFY_AREA
+
+#define pte_present(x) (pte_val(x) & _PAGE_VALID)
+#define pte_clear(mm, addr, xp)                                \
+do {                                                   \
+       set_pte_at((mm), (addr), (xp), __pte(0));       \
+} while (0)
+
+#define pmd_none(x)    (!pmd_val(x))
+#define pmd_present(x) (!pmd_none(x))
+#define pmd_clear(xp)  do { set_pmd(xp, __pmd(0)); } while (0)
+#define        pmd_bad(x)      0
+
+
+#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))
+
+#ifndef __ASSEMBLY__
+
+/*
+ * The following only work if pte_present() is true.
+ * Undefined behaviour if not..
+ */
+static inline int pte_user(pte_t pte)  { return pte_val(pte) & __PAGE_PROT_USER; }
+static inline int pte_read(pte_t pte)  { return pte_val(pte) & __PAGE_PROT_USER; }
+static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
+static inline int pte_write(pte_t pte) { return pte_val(pte) & __PAGE_PROT_WRITE; }
+static inline int pte_special(pte_t pte){ return 0; }
+
+/*
+ * The following only works if pte_present() is not true.
+ */
+static inline int pte_file(pte_t pte)  { return pte_val(pte) & _PAGE_FILE; }
+
+static inline pte_t pte_rdprotect(pte_t pte)
+{
+       pte_val(pte) &= ~(__PAGE_PROT_USER|__PAGE_PROT_UWAUX); return pte;
+}
+static inline pte_t pte_exprotect(pte_t pte)
+{
+       pte_val(pte) |= _PAGE_NX; return pte;
+}
+
+static inline pte_t pte_wrprotect(pte_t pte)
+{
+       pte_val(pte) &= ~(__PAGE_PROT_WRITE|__PAGE_PROT_UWAUX); return pte;
+}
+
+static inline pte_t pte_mkclean(pte_t pte)     { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkold(pte_t pte)       { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkdirty(pte_t pte)     { pte_val(pte) |= _PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkyoung(pte_t pte)     { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkexec(pte_t pte)      { pte_val(pte) &= ~_PAGE_NX; return pte; }
+
+static inline pte_t pte_mkread(pte_t pte)
+{
+       pte_val(pte) |= __PAGE_PROT_USER;
+       if (pte_write(pte))
+               pte_val(pte) |= __PAGE_PROT_UWAUX;
+       return pte;
+}
+static inline pte_t pte_mkwrite(pte_t pte)
+{
+       pte_val(pte) |= __PAGE_PROT_WRITE;
+       if (pte_val(pte) & __PAGE_PROT_USER)
+               pte_val(pte) |= __PAGE_PROT_UWAUX;
+       return pte;
+}
+
+static inline pte_t pte_mkspecial(pte_t pte)   { return pte; }
+
+#define pte_ERROR(e) \
+       printk(KERN_ERR "%s:%d: bad pte %08lx.\n", \
+              __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+       printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", \
+              __FILE__, __LINE__, pgd_val(e))
+
+/*
+ * The "pgd_xxx()" functions here are trivial for a folded two-level
+ * setup: the pgd is never bad, and a pmd always exists (as it's folded
+ * into the pgd entry)
+ */
+#define pgd_clear(xp)                          do { } while (0)
+
+/*
+ * Certain architectures need to do special things when PTEs
+ * within a page table are directly modified.  Thus, the following
+ * hook is made available.
+ */
+#define set_pte(pteptr, pteval)                        (*(pteptr) = pteval)
+#define set_pte_at(mm, addr, ptep, pteval)     set_pte((ptep), (pteval))
+#define set_pte_atomic(pteptr, pteval)         set_pte((pteptr), (pteval))
+
+/*
+ * (pmds are folded into pgds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
+
+#define ptep_get_and_clear(mm, addr, ptep) \
+       __pte(xchg(&(ptep)->pte, 0))
+#define pte_same(a, b)         (pte_val(a) == pte_val(b))
+#define pte_page(x)            pfn_to_page(pte_pfn(x))
+#define pte_none(x)            (!pte_val(x))
+#define pte_pfn(x)             ((unsigned long) (pte_val(x) >> PAGE_SHIFT))
+#define __pfn_addr(pfn)                ((pfn) << PAGE_SHIFT)
+#define pfn_pte(pfn, prot)     __pte(__pfn_addr(pfn) | pgprot_val(prot))
+#define pfn_pmd(pfn, prot)     __pmd(__pfn_addr(pfn) | pgprot_val(prot))
+
+/*
+ * All present user pages are user-executable:
+ */
+static inline int pte_exec(pte_t pte)
+{
+       return pte_user(pte);
+}
+
+/*
+ * All present pages are kernel-executable:
+ */
+static inline int pte_exec_kernel(pte_t pte)
+{
+       return 1;
+}
+
+/*
+ * Bits 0 and 1 are taken, split up the 29 bits of offset
+ * into this range:
+ */
+#define PTE_FILE_MAX_BITS      29
+
+#define pte_to_pgoff(pte)      (pte_val(pte) >> 2)
+#define pgoff_to_pte(off)      __pte((off) << 2 | _PAGE_FILE)
+
+/* Encode and de-code a swap entry */
+#define __swp_type(x)                  (((x).val >> 2) & 0x3f)
+#define __swp_offset(x)                        ((x).val >> 8)
+#define __swp_entry(type, offset) \
+       ((swp_entry_t) { ((type) << 2) | ((offset) << 8) })
+#define __pte_to_swp_entry(pte)                ((swp_entry_t) { pte_val(pte) })
+#define __swp_entry_to_pte(x)          __pte((x).val)
+
+static inline
+int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr,
+                             pte_t *ptep)
+{
+       if (!pte_dirty(*ptep))
+               return 0;
+       return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
+}
+
+static inline
+int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr,
+                             pte_t *ptep)
+{
+       if (!pte_young(*ptep))
+               return 0;
+       return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte);
+}
+
+static inline
+void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+{
+       pte_val(*ptep) &= ~(__PAGE_PROT_WRITE|__PAGE_PROT_UWAUX);
+}
+
+static inline void ptep_mkdirty(pte_t *ptep)
+{
+       set_bit(_PAGE_BIT_DIRTY, &ptep->pte);
+}
+
+/*
+ * Macro to mark a page protection value as "uncacheable".  On processors which
+ * do not support it, this is a no-op.
+ */
+#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_CACHE)
+
+
+/*
+ * Conversion functions: convert a page and protection to a page entry,
+ * and a page entry and page directory to the page they refer to.
+ */
+
+#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
+#define mk_pte_huge(entry) \
+       ((entry).pte |= _PAGE_PRESENT | _PAGE_PSE | _PAGE_VALID)
+
+static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+{
+       pte_val(pte) &= _PAGE_CHG_MASK;
+       pte_val(pte) |= pgprot_val(newprot);
+       return pte;
+}
+
+#define page_pte(page) page_pte_prot((page), __pgprot(0))
+
+#define pmd_page_kernel(pmd) \
+       ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+
+#define pmd_page(pmd)  pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
+
+#define pmd_large(pmd) \
+       ((pmd_val(pmd) & (_PAGE_PSE | _PAGE_PRESENT)) == \
+        (_PAGE_PSE | _PAGE_PRESENT))
+
+/*
+ * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
+ *
+ * this macro returns the index of the entry in the pgd page which would
+ * control the given virtual address
+ */
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
+
+/*
+ * pgd_offset() returns a (pgd_t *)
+ * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
+ */
+#define pgd_offset(mm, address)        ((mm)->pgd + pgd_index(address))
+
+/*
+ * a shortcut which implies the use of the kernel's pgd, instead
+ * of a process's
+ */
+#define pgd_offset_k(address)  pgd_offset(&init_mm, address)
+
+/*
+ * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD]
+ *
+ * this macro returns the index of the entry in the pmd page which would
+ * control the given virtual address
+ */
+#define pmd_index(address) \
+       (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
+
+/*
+ * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
+ *
+ * this macro returns the index of the entry in the pte page which would
+ * control the given virtual address
+ */
+#define pte_index(address) \
+       (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+
+#define pte_offset_kernel(dir, address) \
+       ((pte_t *) pmd_page_kernel(*(dir)) +  pte_index(address))
+
+/*
+ * Make a given kernel text page executable/non-executable.
+ * Returns the previous executability setting of that page (which
+ * is used to restore the previous state). Used by the SMP bootup code.
+ * NOTE: this is an __init function for security reasons.
+ */
+static inline int set_kernel_exec(unsigned long vaddr, int enable)
+{
+       return 0;
+}
+
+#define pte_offset_map(dir, address) \
+       ((pte_t *) page_address(pmd_page(*(dir))) + pte_index(address))
+#define pte_offset_map_nested(dir, address) pte_offset_map(dir, address)
+#define pte_unmap(pte)         do {} while (0)
+#define pte_unmap_nested(pte)  do {} while (0)
+
+/*
+ * The MN10300 has external MMU info in the form of a TLB: this is adapted from
+ * the kernel page tables containing the necessary information by tlb-mn10300.S
+ */
+extern void update_mmu_cache(struct vm_area_struct *vma,
+                            unsigned long address, pte_t pte);
+
+#endif /* !__ASSEMBLY__ */
+
+#define kern_addr_valid(addr)  (1)
+
+#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
+       remap_pfn_range((vma), (vaddr), (pfn), (size), (prot))
+
+#define MK_IOSPACE_PFN(space, pfn)     (pfn)
+#define GET_IOSPACE(pfn)               0
+#define GET_PFN(pfn)                   (pfn)
+
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define __HAVE_ARCH_PTEP_SET_WRPROTECT
+#define __HAVE_ARCH_PTEP_MKDIRTY
+#define __HAVE_ARCH_PTE_SAME
+#include <asm-generic/pgtable.h>
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_PGTABLE_H */
diff --git a/arch/mn10300/include/asm/pio-regs.h b/arch/mn10300/include/asm/pio-regs.h
new file mode 100644 (file)
index 0000000..96bc818
--- /dev/null
@@ -0,0 +1,233 @@
+/* MN10300 On-board I/O port module registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PIO_REGS_H
+#define _ASM_PIO_REGS_H
+
+#include <asm/cpu-regs.h>
+#include <asm/intctl-regs.h>
+
+#ifdef __KERNEL__
+
+/* I/O port 0 */
+#define        P0MD                    __SYSREG(0xdb000000, u16)       /* mode reg */
+#define P0MD_0                 0x0003  /* mask */
+#define P0MD_0_IN              0x0000  /* input mode */
+#define P0MD_0_OUT             0x0001  /* output mode */
+#define P0MD_0_TM0IO           0x0002  /* timer 0 I/O mode */
+#define P0MD_0_EYECLK          0x0003  /* test signal output (clock) */
+#define P0MD_1                 0x000c
+#define P0MD_1_IN              0x0000
+#define P0MD_1_OUT             0x0004
+#define P0MD_1_TM1IO           0x0008  /* timer 1 I/O mode */
+#define P0MD_1_EYED            0x000c  /* test signal output (data) */
+#define P0MD_2                 0x0030
+#define P0MD_2_IN              0x0000
+#define P0MD_2_OUT             0x0010
+#define P0MD_2_TM2IO           0x0020  /* timer 2 I/O mode */
+#define P0MD_3                 0x00c0
+#define P0MD_3_IN              0x0000
+#define P0MD_3_OUT             0x0040
+#define P0MD_3_TM3IO           0x0080  /* timer 3 I/O mode */
+#define P0MD_4                 0x0300
+#define P0MD_4_IN              0x0000
+#define P0MD_4_OUT             0x0100
+#define P0MD_4_TM4IO           0x0200  /* timer 4 I/O mode */
+#define P0MD_4_XCTS            0x0300  /* XCTS input for serial port 2 */
+#define P0MD_5                 0x0c00
+#define P0MD_5_IN              0x0000
+#define P0MD_5_OUT             0x0400
+#define P0MD_5_TM5IO           0x0800  /* timer 5 I/O mode */
+#define P0MD_6                 0x3000
+#define P0MD_6_IN              0x0000
+#define P0MD_6_OUT             0x1000
+#define P0MD_6_TM6IOA          0x2000  /* timer 6 I/O mode A */
+#define P0MD_7                 0xc000
+#define P0MD_7_IN              0x0000
+#define P0MD_7_OUT             0x4000
+#define P0MD_7_TM6IOB          0x8000  /* timer 6 I/O mode B */
+
+#define        P0IN                    __SYSREG(0xdb000004, u8)        /* in reg */
+#define        P0OUT                   __SYSREG(0xdb000008, u8)        /* out reg */
+
+#define        P0TMIO                  __SYSREG(0xdb00000c, u8)        /* TM pin I/O control reg */
+#define P0TMIO_TM0_IN          0x00
+#define P0TMIO_TM0_OUT         0x01
+#define P0TMIO_TM1_IN          0x00
+#define P0TMIO_TM1_OUT         0x02
+#define P0TMIO_TM2_IN          0x00
+#define P0TMIO_TM2_OUT         0x04
+#define P0TMIO_TM3_IN          0x00
+#define P0TMIO_TM3_OUT         0x08
+#define P0TMIO_TM4_IN          0x00
+#define P0TMIO_TM4_OUT         0x10
+#define P0TMIO_TM5_IN          0x00
+#define P0TMIO_TM5_OUT         0x20
+#define P0TMIO_TM6A_IN         0x00
+#define P0TMIO_TM6A_OUT                0x40
+#define P0TMIO_TM6B_IN         0x00
+#define P0TMIO_TM6B_OUT                0x80
+
+/* I/O port 1 */
+#define        P1MD                    __SYSREG(0xdb000100, u16)       /* mode reg */
+#define P1MD_0                 0x0003  /* mask */
+#define P1MD_0_IN              0x0000  /* input mode */
+#define P1MD_0_OUT             0x0001  /* output mode */
+#define P1MD_0_TM7IO           0x0002  /* timer 7 I/O mode */
+#define P1MD_0_ADTRG           0x0003  /* A/D converter trigger mode */
+#define P1MD_1                 0x000c
+#define P1MD_1_IN              0x0000
+#define P1MD_1_OUT             0x0004
+#define P1MD_1_TM8IO           0x0008  /* timer 8 I/O mode */
+#define P1MD_1_XDMR0           0x000c  /* DMA request input 0 mode */
+#define P1MD_2                 0x0030
+#define P1MD_2_IN              0x0000
+#define P1MD_2_OUT             0x0010
+#define P1MD_2_TM9IO           0x0020  /* timer 9 I/O mode */
+#define P1MD_2_XDMR1           0x0030  /* DMA request input 1 mode */
+#define P1MD_3                 0x00c0
+#define P1MD_3_IN              0x0000
+#define P1MD_3_OUT             0x0040
+#define P1MD_3_TM10IO          0x0080  /* timer 10 I/O mode */
+#define P1MD_3_FRQS0           0x00c0  /* CPU clock multiplier setting input 0 mode */
+#define P1MD_4                 0x0300
+#define P1MD_4_IN              0x0000
+#define P1MD_4_OUT             0x0100
+#define P1MD_4_TM11IO          0x0200  /* timer 11 I/O mode */
+#define P1MD_4_FRQS1           0x0300  /* CPU clock multiplier setting input 1 mode */
+
+#define        P1IN                    __SYSREG(0xdb000104, u8)        /* in reg */
+#define        P1OUT                   __SYSREG(0xdb000108, u8)        /* out reg */
+#define        P1TMIO                  __SYSREG(0xdb00010c, u8)        /* TM pin I/O control reg */
+#define P1TMIO_TM11_IN         0x00
+#define P1TMIO_TM11_OUT                0x01
+#define P1TMIO_TM10_IN         0x00
+#define P1TMIO_TM10_OUT                0x02
+#define P1TMIO_TM9_IN          0x00
+#define P1TMIO_TM9_OUT         0x04
+#define P1TMIO_TM8_IN          0x00
+#define P1TMIO_TM8_OUT         0x08
+#define P1TMIO_TM7_IN          0x00
+#define P1TMIO_TM7_OUT         0x10
+
+/* I/O port 2 */
+#define        P2MD                    __SYSREG(0xdb000200, u16)       /* mode reg */
+#define P2MD_0                 0x0003  /* mask */
+#define P2MD_0_IN              0x0000  /* input mode */
+#define P2MD_0_OUT             0x0001  /* output mode */
+#define P2MD_0_BOOTBW          0x0003  /* boot bus width selector mode */
+#define P2MD_1                 0x000c
+#define P2MD_1_IN              0x0000
+#define P2MD_1_OUT             0x0004
+#define P2MD_1_BOOTSEL         0x000c  /* boot device selector mode */
+#define P2MD_2                 0x0030
+#define P2MD_2_IN              0x0000
+#define P2MD_2_OUT             0x0010
+#define P2MD_3                 0x00c0
+#define P2MD_3_IN              0x0000
+#define P2MD_3_OUT             0x0040
+#define P2MD_3_CKIO            0x00c0  /* mode */
+#define P2MD_4                 0x0300
+#define P2MD_4_IN              0x0000
+#define P2MD_4_OUT             0x0100
+#define P2MD_4_CMOD            0x0300  /* mode */
+
+#define        P2IN                    __SYSREG(0xdb000204, u8)        /* in reg */
+#define        P2OUT                   __SYSREG(0xdb000208, u8)        /* out reg */
+#define        P2TMIO                  __SYSREG(0xdb00020c, u8)        /* TM pin I/O control reg */
+
+/* I/O port 3 */
+#define        P3MD                    __SYSREG(0xdb000300, u16)       /* mode reg */
+#define P3MD_0                 0x0003  /* mask */
+#define P3MD_0_IN              0x0000  /* input mode */
+#define P3MD_0_OUT             0x0001  /* output mode */
+#define P3MD_0_AFRXD           0x0002  /* AFR interface mode */
+#define P3MD_1                 0x000c
+#define P3MD_1_IN              0x0000
+#define P3MD_1_OUT             0x0004
+#define P3MD_1_AFTXD           0x0008  /* AFR interface mode */
+#define P3MD_2                 0x0030
+#define P3MD_2_IN              0x0000
+#define P3MD_2_OUT             0x0010
+#define P3MD_2_AFSCLK          0x0020  /* AFR interface mode */
+#define P3MD_3                 0x00c0
+#define P3MD_3_IN              0x0000
+#define P3MD_3_OUT             0x0040
+#define P3MD_3_AFFS            0x0080  /* AFR interface mode */
+#define P3MD_4                 0x0300
+#define P3MD_4_IN              0x0000
+#define P3MD_4_OUT             0x0100
+#define P3MD_4_AFEHC           0x0200  /* AFR interface mode */
+
+#define        P3IN                    __SYSREG(0xdb000304, u8)        /* in reg */
+#define        P3OUT                   __SYSREG(0xdb000308, u8)        /* out reg */
+
+/* I/O port 4 */
+#define        P4MD                    __SYSREG(0xdb000400, u16)       /* mode reg */
+#define P4MD_0                 0x0003  /* mask */
+#define P4MD_0_IN              0x0000  /* input mode */
+#define P4MD_0_OUT             0x0001  /* output mode */
+#define P4MD_0_SCL0            0x0002  /* I2C/serial mode */
+#define P4MD_1                 0x000c
+#define P4MD_1_IN              0x0000
+#define P4MD_1_OUT             0x0004
+#define P4MD_1_SDA0            0x0008
+#define P4MD_2                 0x0030
+#define P4MD_2_IN              0x0000
+#define P4MD_2_OUT             0x0010
+#define P4MD_2_SCL1            0x0020
+#define P4MD_3                 0x00c0
+#define P4MD_3_IN              0x0000
+#define P4MD_3_OUT             0x0040
+#define P4MD_3_SDA1            0x0080
+#define P4MD_4                 0x0300
+#define P4MD_4_IN              0x0000
+#define P4MD_4_OUT             0x0100
+#define P4MD_4_SBO0            0x0200
+#define P4MD_5                 0x0c00
+#define P4MD_5_IN              0x0000
+#define P4MD_5_OUT             0x0400
+#define P4MD_5_SBO1            0x0800
+#define P4MD_6                 0x3000
+#define P4MD_6_IN              0x0000
+#define P4MD_6_OUT             0x1000
+#define P4MD_6_SBT0            0x2000
+#define P4MD_7                 0xc000
+#define P4MD_7_IN              0x0000
+#define P4MD_7_OUT             0x4000
+#define P4MD_7_SBT1            0x8000
+
+#define        P4IN                    __SYSREG(0xdb000404, u8)        /* in reg */
+#define        P4OUT                   __SYSREG(0xdb000408, u8)        /* out reg */
+
+/* I/O port 5 */
+#define        P5MD                    __SYSREG(0xdb000500, u16)       /* mode reg */
+#define P5MD_0                 0x0003  /* mask */
+#define P5MD_0_IN              0x0000  /* input mode */
+#define P5MD_0_OUT             0x0001  /* output mode */
+#define P5MD_0_IRTXD           0x0002  /* IrDA mode */
+#define P5MD_0_SOUT            0x0004  /* serial mode */
+#define P5MD_1                 0x000c
+#define P5MD_1_IN              0x0000
+#define P5MD_1_OUT             0x0004
+#define P5MD_1_IRRXDS          0x0008  /* IrDA mode */
+#define P5MD_1_SIN             0x000c  /* serial mode */
+#define P5MD_2                 0x0030
+#define P5MD_2_IN              0x0000
+#define P5MD_2_OUT             0x0010
+#define P5MD_2_IRRXDF          0x0020  /* IrDA mode */
+
+#define        P5IN                    __SYSREG(0xdb000504, u8)        /* in reg */
+#define        P5OUT                   __SYSREG(0xdb000508, u8)        /* out reg */
+
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_PIO_REGS_H */
diff --git a/arch/mn10300/include/asm/poll.h b/arch/mn10300/include/asm/poll.h
new file mode 100644 (file)
index 0000000..c98509d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/poll.h>
diff --git a/arch/mn10300/include/asm/posix_types.h b/arch/mn10300/include/asm/posix_types.h
new file mode 100644 (file)
index 0000000..077567c
--- /dev/null
@@ -0,0 +1,132 @@
+/* MN10300 POSIX types
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_POSIX_TYPES_H
+#define _ASM_POSIX_TYPES_H
+
+/*
+ * This file is generally used by user-level software, so you need to
+ * be a little careful about namespace pollution etc.  Also, we cannot
+ * assume GCC is being used.
+ */
+
+typedef unsigned long  __kernel_ino_t;
+typedef unsigned short __kernel_mode_t;
+typedef unsigned short __kernel_nlink_t;
+typedef long           __kernel_off_t;
+typedef int            __kernel_pid_t;
+typedef unsigned short __kernel_ipc_pid_t;
+typedef unsigned short __kernel_uid_t;
+typedef unsigned short __kernel_gid_t;
+typedef unsigned long  __kernel_size_t;
+typedef long           __kernel_ssize_t;
+typedef int            __kernel_ptrdiff_t;
+typedef long           __kernel_time_t;
+typedef long           __kernel_suseconds_t;
+typedef long           __kernel_clock_t;
+typedef int            __kernel_timer_t;
+typedef int            __kernel_clockid_t;
+typedef int            __kernel_daddr_t;
+typedef char *         __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int   __kernel_uid32_t;
+typedef unsigned int   __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+typedef unsigned short __kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long      __kernel_loff_t;
+#endif
+
+typedef struct {
+#if defined(__KERNEL__) || defined(__USE_ALL)
+       int     val[2];
+#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+       int     __val[2];
+#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+} __kernel_fsid_t;
+
+#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+
+#undef __FD_SET
+static inline void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
+{
+       unsigned long __tmp = __fd / __NFDBITS;
+       unsigned long __rem = __fd % __NFDBITS;
+       __fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
+}
+
+#undef __FD_CLR
+static inline void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
+{
+       unsigned long __tmp = __fd / __NFDBITS;
+       unsigned long __rem = __fd % __NFDBITS;
+       __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
+}
+
+
+#undef __FD_ISSET
+static inline int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p)
+{
+       unsigned long __tmp = __fd / __NFDBITS;
+       unsigned long __rem = __fd % __NFDBITS;
+       return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0;
+}
+
+/*
+ * This will unroll the loop for the normal constant case (8 ints,
+ * for a 256-bit fd_set)
+ */
+#undef __FD_ZERO
+static inline void __FD_ZERO(__kernel_fd_set *__p)
+{
+       unsigned long *__tmp = __p->fds_bits;
+       int __i;
+
+       if (__builtin_constant_p(__FDSET_LONGS)) {
+               switch (__FDSET_LONGS) {
+               case 16:
+                       __tmp[ 0] = 0; __tmp[ 1] = 0;
+                       __tmp[ 2] = 0; __tmp[ 3] = 0;
+                       __tmp[ 4] = 0; __tmp[ 5] = 0;
+                       __tmp[ 6] = 0; __tmp[ 7] = 0;
+                       __tmp[ 8] = 0; __tmp[ 9] = 0;
+                       __tmp[10] = 0; __tmp[11] = 0;
+                       __tmp[12] = 0; __tmp[13] = 0;
+                       __tmp[14] = 0; __tmp[15] = 0;
+                       return;
+
+               case 8:
+                       __tmp[ 0] = 0; __tmp[ 1] = 0;
+                       __tmp[ 2] = 0; __tmp[ 3] = 0;
+                       __tmp[ 4] = 0; __tmp[ 5] = 0;
+                       __tmp[ 6] = 0; __tmp[ 7] = 0;
+                       return;
+
+               case 4:
+                       __tmp[ 0] = 0; __tmp[ 1] = 0;
+                       __tmp[ 2] = 0; __tmp[ 3] = 0;
+                       return;
+               }
+       }
+       __i = __FDSET_LONGS;
+       while (__i) {
+               __i--;
+               *__tmp = 0;
+               __tmp++;
+       }
+}
+
+#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
+
+#endif /* _ASM_POSIX_TYPES_H */
diff --git a/arch/mn10300/include/asm/processor.h b/arch/mn10300/include/asm/processor.h
new file mode 100644 (file)
index 0000000..7323927
--- /dev/null
@@ -0,0 +1,186 @@
+/* MN10300 Processor specifics
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_PROCESSOR_H
+#define _ASM_PROCESSOR_H
+
+#include <asm/page.h>
+#include <asm/ptrace.h>
+#include <asm/cpu-regs.h>
+#include <linux/threads.h>
+
+/* Forward declaration, a strange C thing */
+struct task_struct;
+struct mm_struct;
+
+/*
+ * Default implementation of macro that returns current
+ * instruction pointer ("program counter").
+ */
+#define current_text_addr()                    \
+({                                             \
+       void *__pc;                             \
+       asm("mov pc,%0" : "=a"(__pc));          \
+       __pc;                                   \
+})
+
+extern void show_registers(struct pt_regs *regs);
+
+/*
+ *  CPU type and hardware bug flags. Kept separately for each CPU.
+ *  Members of this structure are referenced in head.S, so think twice
+ *  before touching them. [mj]
+ */
+
+struct mn10300_cpuinfo {
+       int             type;
+       unsigned long   loops_per_sec;
+       char            hard_math;
+       unsigned long   *pgd_quick;
+       unsigned long   *pte_quick;
+       unsigned long   pgtable_cache_sz;
+};
+
+extern struct mn10300_cpuinfo boot_cpu_data;
+
+#define cpu_data &boot_cpu_data
+#define current_cpu_data boot_cpu_data
+
+extern void identify_cpu(struct mn10300_cpuinfo *);
+extern void print_cpu_info(struct mn10300_cpuinfo *);
+extern void dodgy_tsc(void);
+#define cpu_relax() barrier()
+
+/*
+ * User space process size: 1.75GB (default).
+ */
+#define TASK_SIZE              0x70000000
+
+/*
+ * Where to put the userspace stack by default
+ */
+#define STACK_TOP              0x70000000
+#define STACK_TOP_MAX          STACK_TOP
+
+/* This decides where the kernel will search for a free chunk of vm
+ * space during mmap's.
+ */
+#define TASK_UNMAPPED_BASE     0x30000000
+
+typedef struct {
+       unsigned long   seg;
+} mm_segment_t;
+
+struct fpu_state_struct {
+       unsigned long   fs[32];         /* fpu registers */
+       unsigned long   fpcr;           /* fpu control register */
+};
+
+struct thread_struct {
+       struct pt_regs          *uregs;         /* userspace register frame */
+       unsigned long           pc;             /* kernel PC */
+       unsigned long           sp;             /* kernel SP */
+       unsigned long           a3;             /* kernel FP */
+       unsigned long           wchan;
+       unsigned long           usp;
+       struct pt_regs          *__frame;
+       unsigned long           fpu_flags;
+#define THREAD_USING_FPU       0x00000001      /* T if this task is using the FPU */
+       struct fpu_state_struct fpu_state;
+};
+
+#define INIT_THREAD                            \
+{                                              \
+       .uregs          = init_uregs,           \
+       .pc             = 0,                    \
+       .sp             = 0,                    \
+       .a3             = 0,                    \
+       .wchan          = 0,                    \
+       .__frame        = NULL,                 \
+}
+
+#define INIT_MMAP \
+{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, \
+  NULL, NULL }
+
+/*
+ * do necessary setup to start up a newly executed thread
+ * - need to discard the frame stacked by the kernel thread invoking the execve
+ *   syscall (see RESTORE_ALL macro)
+ */
+#define start_thread(regs, new_pc, new_sp) do {                \
+       set_fs(USER_DS);                                \
+       __frame = current->thread.uregs;                \
+       __frame->epsw = EPSW_nSL | EPSW_IE | EPSW_IM;   \
+       __frame->pc = new_pc;                           \
+       __frame->sp = new_sp;                           \
+} while (0)
+
+/* Free all resources held by a thread. */
+extern void release_thread(struct task_struct *);
+
+/* Prepare to copy thread state - unlazy all lazy status */
+extern void prepare_to_copy(struct task_struct *tsk);
+
+/*
+ * create a kernel thread without removing it from tasklists
+ */
+extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
+
+/*
+ * Return saved PC of a blocked thread.
+ */
+extern unsigned long thread_saved_pc(struct task_struct *tsk);
+
+unsigned long get_wchan(struct task_struct *p);
+
+#define task_pt_regs(task)                                             \
+({                                                                     \
+       struct pt_regs *__regs__;                                       \
+       __regs__ = (struct pt_regs *) (KSTK_TOP(task_stack_page(task)) - 8); \
+       __regs__ - 1;                                                   \
+})
+
+#define KSTK_EIP(task) (task_pt_regs(task)->pc)
+#define KSTK_ESP(task) (task_pt_regs(task)->sp)
+
+#define KSTK_TOP(info)                         \
+({                                             \
+       (unsigned long)(info) + THREAD_SIZE;    \
+})
+
+#define ARCH_HAS_PREFETCH
+#define ARCH_HAS_PREFETCHW
+
+static inline void prefetch(const void *x)
+{
+#ifndef CONFIG_MN10300_CACHE_DISABLED
+#ifdef CONFIG_MN10300_PROC_MN103E010
+       asm volatile ("nop; nop; dcpf (%0)" : : "r"(x));
+#else
+       asm volatile ("dcpf (%0)" : : "r"(x));
+#endif
+#endif
+}
+
+static inline void prefetchw(const void *x)
+{
+#ifndef CONFIG_MN10300_CACHE_DISABLED
+#ifdef CONFIG_MN10300_PROC_MN103E010
+       asm volatile ("nop; nop; dcpf (%0)" : : "r"(x));
+#else
+       asm volatile ("dcpf (%0)" : : "r"(x));
+#endif
+#endif
+}
+
+#endif /* _ASM_PROCESSOR_H */
diff --git a/arch/mn10300/include/asm/ptrace.h b/arch/mn10300/include/asm/ptrace.h
new file mode 100644 (file)
index 0000000..7b06cc6
--- /dev/null
@@ -0,0 +1,103 @@
+/* MN10300 Exception frame layout and ptrace constants
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PTRACE_H
+#define _ASM_PTRACE_H
+
+#define PT_A3          0
+#define PT_A2          1
+#define PT_D3          2
+#define        PT_D2           3
+#define PT_MCVF                4
+#define        PT_MCRL         5
+#define PT_MCRH                6
+#define        PT_MDRQ         7
+#define        PT_E1           8
+#define        PT_E0           9
+#define        PT_E7           10
+#define        PT_E6           11
+#define        PT_E5           12
+#define        PT_E4           13
+#define        PT_E3           14
+#define        PT_E2           15
+#define        PT_SP           16
+#define        PT_LAR          17
+#define        PT_LIR          18
+#define        PT_MDR          19
+#define        PT_A1           20
+#define        PT_A0           21
+#define        PT_D1           22
+#define        PT_D0           23
+#define PT_ORIG_D0     24
+#define        PT_EPSW         25
+#define        PT_PC           26
+#define NR_PTREGS      27
+
+#ifndef __ASSEMBLY__
+/*
+ * This defines the way registers are stored in the event of an exception
+ * - the strange order is due to the MOVM instruction
+ */
+struct pt_regs {
+       unsigned long           a3;             /* syscall arg 3 */
+       unsigned long           a2;             /* syscall arg 4 */
+       unsigned long           d3;             /* syscall arg 5 */
+       unsigned long           d2;             /* syscall arg 6 */
+       unsigned long           mcvf;
+       unsigned long           mcrl;
+       unsigned long           mcrh;
+       unsigned long           mdrq;
+       unsigned long           e1;
+       unsigned long           e0;
+       unsigned long           e7;
+       unsigned long           e6;
+       unsigned long           e5;
+       unsigned long           e4;
+       unsigned long           e3;
+       unsigned long           e2;
+       unsigned long           sp;
+       unsigned long           lar;
+       unsigned long           lir;
+       unsigned long           mdr;
+       unsigned long           a1;
+       unsigned long           a0;             /* syscall arg 1 */
+       unsigned long           d1;             /* syscall arg 2 */
+       unsigned long           d0;             /* syscall ret */
+       struct pt_regs          *next;          /* next frame pointer */
+       unsigned long           orig_d0;        /* syscall number */
+       unsigned long           epsw;
+       unsigned long           pc;
+};
+#endif
+
+extern struct pt_regs *__frame; /* current frame pointer */
+
+/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
+#define PTRACE_GETREGS            12
+#define PTRACE_SETREGS            13
+#define PTRACE_GETFPREGS          14
+#define PTRACE_SETFPREGS          15
+
+/* options set using PTRACE_SETOPTIONS */
+#define PTRACE_O_TRACESYSGOOD     0x00000001
+
+#if defined(__KERNEL__)
+
+#if !defined(__ASSEMBLY__)
+#define user_mode(regs)                        (((regs)->epsw & EPSW_nSL) == EPSW_nSL)
+#define instruction_pointer(regs)      ((regs)->pc)
+extern void show_regs(struct pt_regs *);
+#endif  /*  !__ASSEMBLY  */
+
+#define profile_pc(regs) ((regs)->pc)
+
+#endif  /*  __KERNEL__  */
+
+#endif /* _ASM_PTRACE_H */
diff --git a/arch/mn10300/include/asm/reset-regs.h b/arch/mn10300/include/asm/reset-regs.h
new file mode 100644 (file)
index 0000000..174523d
--- /dev/null
@@ -0,0 +1,64 @@
+/* MN10300 Reset controller and watchdog timer definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_RESET_REGS_H
+#define _ASM_RESET_REGS_H
+
+#include <asm/cpu-regs.h>
+#include <asm/exceptions.h>
+
+#ifdef __KERNEL__
+
+#ifdef CONFIG_MN10300_WD_TIMER
+#define ARCH_HAS_NMI_WATCHDOG          /* See include/linux/nmi.h */
+#endif
+
+/*
+ * watchdog timer registers
+ */
+#define WDBC                   __SYSREGC(0xc0001000, u8) /* watchdog binary counter reg */
+
+#define WDCTR                  __SYSREG(0xc0001002, u8)  /* watchdog timer control reg */
+#define WDCTR_WDCK             0x07    /* clock source selection */
+#define WDCTR_WDCK_256th       0x00    /* - OSCI/256 */
+#define WDCTR_WDCK_1024th      0x01    /* - OSCI/1024 */
+#define WDCTR_WDCK_2048th      0x02    /* - OSCI/2048 */
+#define WDCTR_WDCK_16384th     0x03    /* - OSCI/16384 */
+#define WDCTR_WDCK_65536th     0x04    /* - OSCI/65536 */
+#define WDCTR_WDRST            0x40    /* binary counter reset */
+#define WDCTR_WDCNE            0x80    /* watchdog timer enable */
+
+#define RSTCTR                 __SYSREG(0xc0001004, u8) /* reset control reg */
+#define RSTCTR_CHIPRST         0x01    /* chip reset */
+#define RSTCTR_DBFRST          0x02    /* double fault reset flag */
+#define RSTCTR_WDTRST          0x04    /* watchdog timer reset flag */
+#define RSTCTR_WDREN           0x08    /* watchdog timer reset enable */
+
+#ifndef __ASSEMBLY__
+
+static inline void mn10300_proc_hard_reset(void)
+{
+       RSTCTR &= ~RSTCTR_CHIPRST;
+       RSTCTR |= RSTCTR_CHIPRST;
+}
+
+extern unsigned int watchdog_alert_counter;
+
+extern void watchdog_go(void);
+extern asmlinkage void watchdog_handler(void);
+extern asmlinkage
+void watchdog_interrupt(struct pt_regs *, enum exception_code);
+
+#endif
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_RESET_REGS_H */
diff --git a/arch/mn10300/include/asm/resource.h b/arch/mn10300/include/asm/resource.h
new file mode 100644 (file)
index 0000000..04bc4db
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/resource.h>
diff --git a/arch/mn10300/include/asm/rtc-regs.h b/arch/mn10300/include/asm/rtc-regs.h
new file mode 100644 (file)
index 0000000..c42deef
--- /dev/null
@@ -0,0 +1,86 @@
+/* MN10300 on-chip Real-Time Clock registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_RTC_REGS_H
+#define _ASM_RTC_REGS_H
+
+#include <asm/intctl-regs.h>
+
+#ifdef __KERNEL__
+
+#define RTSCR                  __SYSREG(0xd8600000, u8) /* RTC seconds count reg */
+#define RTSAR                  __SYSREG(0xd8600001, u8) /* RTC seconds alarm reg */
+#define RTMCR                  __SYSREG(0xd8600002, u8) /* RTC minutes count reg */
+#define RTMAR                  __SYSREG(0xd8600003, u8) /* RTC minutes alarm reg */
+#define RTHCR                  __SYSREG(0xd8600004, u8) /* RTC hours count reg */
+#define RTHAR                  __SYSREG(0xd8600005, u8) /* RTC hours alarm reg */
+#define RTDWCR                 __SYSREG(0xd8600006, u8) /* RTC day of the week count reg */
+#define RTDMCR                 __SYSREG(0xd8600007, u8) /* RTC days count reg */
+#define RTMTCR                 __SYSREG(0xd8600008, u8) /* RTC months count reg */
+#define RTYCR                  __SYSREG(0xd8600009, u8) /* RTC years count reg */
+
+#define RTCRA                  __SYSREG(0xd860000a, u8)/* RTC control reg A */
+#define RTCRA_RS               0x0f    /* periodic timer interrupt cycle setting */
+#define RTCRA_RS_NONE          0x00    /* - off */
+#define RTCRA_RS_3_90625ms     0x01    /* - 3.90625ms  (1/256s) */
+#define RTCRA_RS_7_8125ms      0x02    /* - 7.8125ms   (1/128s) */
+#define RTCRA_RS_122_070us     0x03    /* - 122.070us  (1/8192s) */
+#define RTCRA_RS_244_141us     0x04    /* - 244.141us  (1/4096s) */
+#define RTCRA_RS_488_281us     0x05    /* - 488.281us  (1/2048s) */
+#define RTCRA_RS_976_5625us    0x06    /* - 976.5625us (1/1024s) */
+#define RTCRA_RS_1_953125ms    0x07    /* - 1.953125ms (1/512s) */
+#define RTCRA_RS_3_90624ms     0x08    /* - 3.90624ms  (1/256s) */
+#define RTCRA_RS_7_8125ms_b    0x09    /* - 7.8125ms   (1/128s) */
+#define RTCRA_RS_15_625ms      0x0a    /* - 15.625ms   (1/64s) */
+#define RTCRA_RS_31_25ms       0x0b    /* - 31.25ms    (1/32s) */
+#define RTCRA_RS_62_5ms                0x0c    /* - 62.5ms     (1/16s) */
+#define RTCRA_RS_125ms         0x0d    /* - 125ms      (1/8s) */
+#define RTCRA_RS_250ms         0x0e    /* - 250ms      (1/4s) */
+#define RTCRA_RS_500ms         0x0f    /* - 500ms      (1/2s) */
+#define RTCRA_DVR              0x40    /* divider reset */
+#define RTCRA_UIP              0x80    /* clock update flag */
+
+#define RTCRB                  __SYSREG(0xd860000b, u8) /* RTC control reg B */
+#define RTCRB_DSE              0x01    /* daylight savings time enable */
+#define RTCRB_TM               0x02    /* time format */
+#define RTCRB_TM_12HR          0x00    /* - 12 hour format */
+#define RTCRB_TM_24HR          0x02    /* - 24 hour format */
+#define RTCRB_DM               0x04    /* numeric value format */
+#define RTCRB_DM_BCD           0x00    /* - BCD */
+#define RTCRB_DM_BINARY                0x04    /* - binary */
+#define RTCRB_UIE              0x10    /* update interrupt disable */
+#define RTCRB_AIE              0x20    /* alarm interrupt disable */
+#define RTCRB_PIE              0x40    /* periodic interrupt disable */
+#define RTCRB_SET              0x80    /* clock update enable */
+
+#define RTSRC                  __SYSREG(0xd860000c, u8) /* RTC status reg C */
+#define RTSRC_UF               0x10    /* update end interrupt flag */
+#define RTSRC_AF               0x20    /* alarm interrupt flag */
+#define RTSRC_PF               0x40    /* periodic interrupt flag */
+#define RTSRC_IRQF             0x80    /* interrupt flag */
+
+#define RTIRQ                  32
+#define RTICR                  GxICR(RTIRQ)
+
+/*
+ * MC146818 RTC compatibility defs for the MN10300 on-chip RTC
+ */
+#define RTC_PORT(x)            0xd8600000
+#define RTC_ALWAYS_BCD         1       /* RTC operates in binary mode */
+
+#define CMOS_READ(addr)                __SYSREG(0xd8600000 + (addr), u8)
+#define CMOS_WRITE(val, addr)  \
+       do { __SYSREG(0xd8600000 + (addr), u8) = val; } while (0)
+
+#define RTC_IRQ                        RTIRQ
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_RTC_REGS_H */
diff --git a/arch/mn10300/include/asm/rtc.h b/arch/mn10300/include/asm/rtc.h
new file mode 100644 (file)
index 0000000..c295194
--- /dev/null
@@ -0,0 +1,41 @@
+/* MN10300 Real time clock definitions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_RTC_H
+#define _ASM_RTC_H
+
+#ifdef CONFIG_MN10300_RTC
+
+#include <linux/init.h>
+
+extern void check_rtc_time(void);
+extern void __init calibrate_clock(void);
+extern unsigned long __init get_initial_rtc_time(void);
+
+#else /* !CONFIG_MN10300_RTC */
+
+static inline void check_rtc_time(void)
+{
+}
+
+static inline void calibrate_clock(void)
+{
+}
+
+static inline unsigned long get_initial_rtc_time(void)
+{
+       return 0;
+}
+
+#endif /* !CONFIG_MN10300_RTC */
+
+#include <asm-generic/rtc.h>
+
+#endif /* _ASM_RTC_H */
diff --git a/arch/mn10300/include/asm/scatterlist.h b/arch/mn10300/include/asm/scatterlist.h
new file mode 100644 (file)
index 0000000..6753590
--- /dev/null
@@ -0,0 +1,55 @@
+/* MN10300 Scatterlist definitions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SCATTERLIST_H
+#define _ASM_SCATTERLIST_H
+
+#include <asm/types.h>
+
+/*
+ * Drivers must set either ->address or (preferred) page and ->offset
+ * to indicate where data must be transferred to/from.
+ *
+ * Using page is recommended since it handles highmem data as well as
+ * low mem. ->address is restricted to data which has a virtual mapping, and
+ * it will go away in the future. Updating to page can be automated very
+ * easily -- something like
+ *
+ * sg->address = some_ptr;
+ *
+ * can be rewritten as
+ *
+ * sg_set_page(virt_to_page(some_ptr));
+ * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
+ *
+ * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
+ */
+struct scatterlist {
+#ifdef CONFIG_DEBUG_SG
+       unsigned long   sg_magic;
+#endif
+       unsigned long   page_link;
+       unsigned int    offset;         /* for highmem, page offset */
+       dma_addr_t      dma_address;
+       unsigned int    length;
+};
+
+#define ISA_DMA_THRESHOLD (0x00ffffff)
+
+/*
+ * These macros should be used after a pci_map_sg call has been done
+ * to get bus addresses of each of the SG entries and their lengths.
+ * You should only work with the number of sg entries pci_map_sg
+ * returns.
+ */
+#define sg_dma_address(sg)     ((sg)->dma_address)
+#define sg_dma_len(sg)         ((sg)->length)
+
+#endif /* _ASM_SCATTERLIST_H */
diff --git a/arch/mn10300/include/asm/sections.h b/arch/mn10300/include/asm/sections.h
new file mode 100644 (file)
index 0000000..2b8c516
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/sections.h>
diff --git a/arch/mn10300/include/asm/sembuf.h b/arch/mn10300/include/asm/sembuf.h
new file mode 100644 (file)
index 0000000..301f3f9
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef _ASM_SEMBUF_H
+#define _ASM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for MN10300 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+       struct ipc64_perm sem_perm;             /* permissions .. see ipc.h */
+       __kernel_time_t sem_otime;              /* last semop time */
+       unsigned long   __unused1;
+       __kernel_time_t sem_ctime;              /* last change time */
+       unsigned long   __unused2;
+       unsigned long   sem_nsems;              /* no. of semaphores in array */
+       unsigned long   __unused3;
+       unsigned long   __unused4;
+};
+
+#endif /* _ASM_SEMBUF_H */
diff --git a/arch/mn10300/include/asm/serial-regs.h b/arch/mn10300/include/asm/serial-regs.h
new file mode 100644 (file)
index 0000000..6498469
--- /dev/null
@@ -0,0 +1,160 @@
+/* MN10300 on-board serial port module registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_SERIAL_REGS_H
+#define _ASM_SERIAL_REGS_H
+
+#include <asm/cpu-regs.h>
+#include <asm/intctl-regs.h>
+
+#ifdef __KERNEL__
+
+/* serial port 0 */
+#define        SC0CTR                  __SYSREG(0xd4002000, u16)       /* control reg */
+#define        SC01CTR_CK              0x0007  /* clock source select */
+#define        SC0CTR_CK_TM8UFLOW_8    0x0000  /* - 1/8 timer 8 underflow (serial port 0 only) */
+#define        SC1CTR_CK_TM9UFLOW_8    0x0000  /* - 1/8 timer 9 underflow (serial port 1 only) */
+#define        SC01CTR_CK_IOCLK_8      0x0001  /* - 1/8 IOCLK */
+#define        SC01CTR_CK_IOCLK_32     0x0002  /* - 1/32 IOCLK */
+#define        SC0CTR_CK_TM2UFLOW_2    0x0003  /* - 1/2 timer 2 underflow (serial port 0 only) */
+#define        SC1CTR_CK_TM3UFLOW_2    0x0003  /* - 1/2 timer 3 underflow (serial port 1 only) */
+#define        SC0CTR_CK_TM0UFLOW_8    0x0004  /* - 1/8 timer 1 underflow (serial port 0 only) */
+#define        SC1CTR_CK_TM1UFLOW_8    0x0004  /* - 1/8 timer 2 underflow (serial port 1 only) */
+#define        SC0CTR_CK_TM2UFLOW_8    0x0005  /* - 1/8 timer 2 underflow (serial port 0 only) */
+#define        SC1CTR_CK_TM3UFLOW_8    0x0005  /* - 1/8 timer 3 underflow (serial port 1 only) */
+#define        SC01CTR_CK_EXTERN_8     0x0006  /* - 1/8 external closk */
+#define        SC01CTR_CK_EXTERN       0x0007  /* - external closk */
+#define        SC01CTR_STB             0x0008  /* stop bit select */
+#define        SC01CTR_STB_1BIT        0x0000  /* - 1 stop bit */
+#define        SC01CTR_STB_2BIT        0x0008  /* - 2 stop bits */
+#define        SC01CTR_PB              0x0070  /* parity bit select */
+#define        SC01CTR_PB_NONE         0x0000  /* - no parity */
+#define        SC01CTR_PB_FIXED0       0x0040  /* - fixed at 0 */
+#define        SC01CTR_PB_FIXED1       0x0050  /* - fixed at 1 */
+#define        SC01CTR_PB_EVEN         0x0060  /* - even parity */
+#define        SC01CTR_PB_ODD          0x0070  /* - odd parity */
+#define        SC01CTR_CLN             0x0080  /* character length */
+#define        SC01CTR_CLN_7BIT        0x0000  /* - 7 bit chars */
+#define        SC01CTR_CLN_8BIT        0x0080  /* - 8 bit chars */
+#define        SC01CTR_TOE             0x0100  /* T input output enable */
+#define        SC01CTR_OD              0x0200  /* bit order select */
+#define        SC01CTR_OD_LSBFIRST     0x0000  /* - LSB first */
+#define        SC01CTR_OD_MSBFIRST     0x0200  /* - MSB first */
+#define        SC01CTR_MD              0x0c00  /* mode select */
+#define SC01CTR_MD_STST_SYNC   0x0000  /* - start-stop synchronous */
+#define SC01CTR_MD_CLOCK_SYNC1 0x0400  /* - clock synchronous 1 */
+#define SC01CTR_MD_I2C         0x0800  /* - I2C mode */
+#define SC01CTR_MD_CLOCK_SYNC2 0x0c00  /* - clock synchronous 2 */
+#define        SC01CTR_IIC             0x1000  /* I2C mode select */
+#define        SC01CTR_BKE             0x2000  /* break transmit enable */
+#define        SC01CTR_RXE             0x4000  /* receive enable */
+#define        SC01CTR_TXE             0x8000  /* transmit enable */
+
+#define        SC0ICR                  __SYSREG(0xd4002004, u8)        /* interrupt control reg */
+#define SC01ICR_DMD            0x80    /* output data mode */
+#define SC01ICR_TD             0x20    /* transmit DMA trigger cause */
+#define SC01ICR_TI             0x10    /* transmit interrupt cause */
+#define SC01ICR_RES            0x04    /* receive error select */
+#define SC01ICR_RI             0x01    /* receive interrupt cause */
+
+#define        SC0TXB                  __SYSREG(0xd4002008, u8)        /* transmit buffer reg */
+#define        SC0RXB                  __SYSREG(0xd4002009, u8)        /* receive buffer reg */
+
+#define        SC0STR                  __SYSREG(0xd400200c, u16)       /* status reg */
+#define SC01STR_OEF            0x0001  /* overrun error found */
+#define SC01STR_PEF            0x0002  /* parity error found */
+#define SC01STR_FEF            0x0004  /* framing error found */
+#define SC01STR_RBF            0x0010  /* receive buffer status */
+#define SC01STR_TBF            0x0020  /* transmit buffer status */
+#define SC01STR_RXF            0x0040  /* receive status */
+#define SC01STR_TXF            0x0080  /* transmit status */
+#define SC01STR_STF            0x0100  /* I2C start sequence found */
+#define SC01STR_SPF            0x0200  /* I2C stop sequence found */
+
+#define SC0RXIRQ               20      /* timer 0 Receive IRQ */
+#define SC0TXIRQ               21      /* timer 0 Transmit IRQ */
+
+#define        SC0RXICR                GxICR(SC0RXIRQ) /* serial 0 receive intr ctrl reg */
+#define        SC0TXICR                GxICR(SC0TXIRQ) /* serial 0 transmit intr ctrl reg */
+
+/* serial port 1 */
+#define        SC1CTR                  __SYSREG(0xd4002010, u16)       /* serial port 1 control */
+#define        SC1ICR                  __SYSREG(0xd4002014, u8)        /* interrupt control reg */
+#define        SC1TXB                  __SYSREG(0xd4002018, u8)        /* transmit buffer reg */
+#define        SC1RXB                  __SYSREG(0xd4002019, u8)        /* receive buffer reg */
+#define        SC1STR                  __SYSREG(0xd400201c, u16)       /* status reg */
+
+#define SC1RXIRQ               22      /* timer 1 Receive IRQ */
+#define SC1TXIRQ               23      /* timer 1 Transmit IRQ */
+
+#define        SC1RXICR                GxICR(SC1RXIRQ) /* serial 1 receive intr ctrl reg */
+#define        SC1TXICR                GxICR(SC1TXIRQ) /* serial 1 transmit intr ctrl reg */
+
+/* serial port 2 */
+#define        SC2CTR                  __SYSREG(0xd4002020, u16)       /* control reg */
+#define        SC2CTR_CK               0x0003  /* clock source select */
+#define        SC2CTR_CK_TM10UFLOW     0x0000  /* - timer 10 underflow */
+#define        SC2CTR_CK_TM2UFLOW      0x0001  /* - timer 2 underflow */
+#define        SC2CTR_CK_EXTERN        0x0002  /* - external closk */
+#define        SC2CTR_CK_TM3UFLOW      0x0003  /* - timer 3 underflow */
+#define        SC2CTR_STB              0x0008  /* stop bit select */
+#define        SC2CTR_STB_1BIT         0x0000  /* - 1 stop bit */
+#define        SC2CTR_STB_2BIT         0x0008  /* - 2 stop bits */
+#define        SC2CTR_PB               0x0070  /* parity bit select */
+#define        SC2CTR_PB_NONE          0x0000  /* - no parity */
+#define        SC2CTR_PB_FIXED0        0x0040  /* - fixed at 0 */
+#define        SC2CTR_PB_FIXED1        0x0050  /* - fixed at 1 */
+#define        SC2CTR_PB_EVEN          0x0060  /* - even parity */
+#define        SC2CTR_PB_ODD           0x0070  /* - odd parity */
+#define        SC2CTR_CLN              0x0080  /* character length */
+#define        SC2CTR_CLN_7BIT         0x0000  /* - 7 bit chars */
+#define        SC2CTR_CLN_8BIT         0x0080  /* - 8 bit chars */
+#define        SC2CTR_TWE              0x0100  /* transmit wait enable (enable XCTS control) */
+#define        SC2CTR_OD               0x0200  /* bit order select */
+#define        SC2CTR_OD_LSBFIRST      0x0000  /* - LSB first */
+#define        SC2CTR_OD_MSBFIRST      0x0200  /* - MSB first */
+#define        SC2CTR_TWS              0x1000  /* transmit wait select */
+#define        SC2CTR_TWS_XCTS_HIGH    0x0000  /* - interrupt TX when XCTS high */
+#define        SC2CTR_TWS_XCTS_LOW     0x1000  /* - interrupt TX when XCTS low */
+#define        SC2CTR_BKE              0x2000  /* break transmit enable */
+#define        SC2CTR_RXE              0x4000  /* receive enable */
+#define        SC2CTR_TXE              0x8000  /* transmit enable */
+
+#define        SC2ICR                  __SYSREG(0xd4002024, u8)        /* interrupt control reg */
+#define SC2ICR_TD              0x20    /* transmit DMA trigger cause */
+#define SC2ICR_TI              0x10    /* transmit interrupt cause */
+#define SC2ICR_RES             0x04    /* receive error select */
+#define SC2ICR_RI              0x01    /* receive interrupt cause */
+
+#define        SC2TXB                  __SYSREG(0xd4002018, u8)        /* transmit buffer reg */
+#define        SC2RXB                  __SYSREG(0xd4002019, u8)        /* receive buffer reg */
+#define        SC2STR                  __SYSREG(0xd400201c, u8)        /* status reg */
+#define SC2STR_OEF             0x0001  /* overrun error found */
+#define SC2STR_PEF             0x0002  /* parity error found */
+#define SC2STR_FEF             0x0004  /* framing error found */
+#define SC2STR_CTS             0x0008  /* XCTS input pin status (0 means high) */
+#define SC2STR_RBF             0x0010  /* receive buffer status */
+#define SC2STR_TBF             0x0020  /* transmit buffer status */
+#define SC2STR_RXF             0x0040  /* receive status */
+#define SC2STR_TXF             0x0080  /* transmit status */
+
+#define        SC2TIM                  __SYSREG(0xd400202d, u8)        /* status reg */
+
+#define SC2RXIRQ               24      /* serial 2 Receive IRQ */
+#define SC2TXIRQ               25      /* serial 2 Transmit IRQ */
+
+#define        SC2RXICR                GxICR(SC2RXIRQ) /* serial 2 receive intr ctrl reg */
+#define        SC2TXICR                GxICR(SC2TXIRQ) /* serial 2 transmit intr ctrl reg */
+
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_SERIAL_REGS_H */
diff --git a/arch/mn10300/include/asm/serial.h b/arch/mn10300/include/asm/serial.h
new file mode 100644 (file)
index 0000000..a29445c
--- /dev/null
@@ -0,0 +1,36 @@
+/* Standard UART definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+/*
+ * The ASB2305 has an 18.432 MHz clock the UART
+ */
+#define BASE_BAUD      (18432000 / 16)
+
+/* Standard COM flags (except for COM4, because of the 8514 problem) */
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS  (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
+#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS  (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
+#endif
+
+#ifdef CONFIG_SERIAL_MANY_PORTS
+#define FOURPORT_FLAGS ASYNC_FOURPORT
+#define ACCENT_FLAGS   0
+#define BOCA_FLAGS     0
+#define HUB6_FLAGS     0
+#define RS_TABLE_SIZE  64
+#else
+#define RS_TABLE_SIZE
+#endif
+
+#include <unit/serial.h>
diff --git a/arch/mn10300/include/asm/setup.h b/arch/mn10300/include/asm/setup.h
new file mode 100644 (file)
index 0000000..08356c8
--- /dev/null
@@ -0,0 +1,17 @@
+/* MN10300 Setup declarations
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SETUP_H
+#define _ASM_SETUP_H
+
+extern void __init unit_setup(void);
+extern void __init unit_init_IRQ(void);
+
+#endif /* _ASM_SETUP_H */
diff --git a/arch/mn10300/include/asm/shmbuf.h b/arch/mn10300/include/asm/shmbuf.h
new file mode 100644 (file)
index 0000000..8f300cc
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef _ASM_SHMBUF_H
+#define _ASM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for MN10300 architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+       struct ipc64_perm       shm_perm;       /* operation perms */
+       size_t                  shm_segsz;      /* size of segment (bytes) */
+       __kernel_time_t         shm_atime;      /* last attach time */
+       unsigned long           __unused1;
+       __kernel_time_t         shm_dtime;      /* last detach time */
+       unsigned long           __unused2;
+       __kernel_time_t         shm_ctime;      /* last change time */
+       unsigned long           __unused3;
+       __kernel_pid_t          shm_cpid;       /* pid of creator */
+       __kernel_pid_t          shm_lpid;       /* pid of last operator */
+       unsigned long           shm_nattch;     /* no. of current attaches */
+       unsigned long           __unused4;
+       unsigned long           __unused5;
+};
+
+struct shminfo64 {
+       unsigned long   shmmax;
+       unsigned long   shmmin;
+       unsigned long   shmmni;
+       unsigned long   shmseg;
+       unsigned long   shmall;
+       unsigned long   __unused1;
+       unsigned long   __unused2;
+       unsigned long   __unused3;
+       unsigned long   __unused4;
+};
+
+#endif /* _ASM_SHMBUF_H */
diff --git a/arch/mn10300/include/asm/shmparam.h b/arch/mn10300/include/asm/shmparam.h
new file mode 100644 (file)
index 0000000..ab666ed
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_SHMPARAM_H
+#define _ASM_SHMPARAM_H
+
+#define        SHMLBA PAGE_SIZE                 /* attach addr a multiple of this */
+
+#endif /* _ASM_SHMPARAM_H */
diff --git a/arch/mn10300/include/asm/sigcontext.h b/arch/mn10300/include/asm/sigcontext.h
new file mode 100644 (file)
index 0000000..4de3aff
--- /dev/null
@@ -0,0 +1,52 @@
+/* MN10300 Userspace signal context
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SIGCONTEXT_H
+#define _ASM_SIGCONTEXT_H
+
+struct fpucontext {
+       /* Regular FPU environment */
+       unsigned long   fs[32];         /* fpu registers */
+       unsigned long   fpcr;           /* fpu control register */
+};
+
+struct sigcontext {
+       unsigned long   d0;
+       unsigned long   d1;
+       unsigned long   d2;
+       unsigned long   d3;
+       unsigned long   a0;
+       unsigned long   a1;
+       unsigned long   a2;
+       unsigned long   a3;
+       unsigned long   e0;
+       unsigned long   e1;
+       unsigned long   e2;
+       unsigned long   e3;
+       unsigned long   e4;
+       unsigned long   e5;
+       unsigned long   e6;
+       unsigned long   e7;
+       unsigned long   lar;
+       unsigned long   lir;
+       unsigned long   mdr;
+       unsigned long   mcvf;
+       unsigned long   mcrl;
+       unsigned long   mcrh;
+       unsigned long   mdrq;
+       unsigned long   sp;
+       unsigned long   epsw;
+       unsigned long   pc;
+       struct fpucontext *fpucontext;
+       unsigned long   oldmask;
+};
+
+
+#endif /* _ASM_SIGCONTEXT_H */
diff --git a/arch/mn10300/include/asm/siginfo.h b/arch/mn10300/include/asm/siginfo.h
new file mode 100644 (file)
index 0000000..0815d29
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/siginfo.h>
diff --git a/arch/mn10300/include/asm/signal.h b/arch/mn10300/include/asm/signal.h
new file mode 100644 (file)
index 0000000..e98817c
--- /dev/null
@@ -0,0 +1,171 @@
+/* MN10300 Signal definitions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SIGNAL_H
+#define _ASM_SIGNAL_H
+
+#include <linux/types.h>
+
+/* Avoid too many header ordering problems.  */
+struct siginfo;
+
+#ifdef __KERNEL__
+/* Most things should be clean enough to redefine this at will, if care
+   is taken to make libc match.  */
+
+#define _NSIG          64
+#define _NSIG_BPW      32
+#define _NSIG_WORDS    (_NSIG / _NSIG_BPW)
+
+typedef unsigned long old_sigset_t;            /* at least 32 bits */
+
+typedef struct {
+       unsigned long   sig[_NSIG_WORDS];
+} sigset_t;
+
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+#define NSIG           32
+typedef unsigned long sigset_t;
+
+#endif /* __KERNEL__ */
+
+#define SIGHUP          1
+#define SIGINT          2
+#define SIGQUIT                 3
+#define SIGILL          4
+#define SIGTRAP                 5
+#define SIGABRT                 6
+#define SIGIOT          6
+#define SIGBUS          7
+#define SIGFPE          8
+#define SIGKILL                 9
+#define SIGUSR1                10
+#define SIGSEGV                11
+#define SIGUSR2                12
+#define SIGPIPE                13
+#define SIGALRM                14
+#define SIGTERM                15
+#define SIGSTKFLT      16
+#define SIGCHLD                17
+#define SIGCONT                18
+#define SIGSTOP                19
+#define SIGTSTP                20
+#define SIGTTIN                21
+#define SIGTTOU                22
+#define SIGURG         23
+#define SIGXCPU                24
+#define SIGXFSZ                25
+#define SIGVTALRM      26
+#define SIGPROF                27
+#define SIGWINCH       28
+#define SIGIO          29
+#define SIGPOLL                SIGIO
+/*
+#define SIGLOST                29
+*/
+#define SIGPWR         30
+#define SIGSYS         31
+#define        SIGUNUSED       31
+
+/* These should not be considered constants from userland.  */
+#define SIGRTMIN       32
+#define SIGRTMAX       (_NSIG-1)
+
+/*
+ * SA_FLAGS values:
+ *
+ * SA_ONSTACK indicates that a registered stack_t will be used.
+ * SA_RESTART flag to get restarting signals (which were the default long ago)
+ * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
+ * SA_RESETHAND clears the handler when the signal is delivered.
+ * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
+ * SA_NODEFER prevents the current signal from being masked in the handler.
+ *
+ * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
+ * Unix names RESETHAND and NODEFER respectively.
+ */
+#define SA_NOCLDSTOP   0x00000001U
+#define SA_NOCLDWAIT   0x00000002U
+#define SA_SIGINFO     0x00000004U
+#define SA_ONSTACK     0x08000000U
+#define SA_RESTART     0x10000000U
+#define SA_NODEFER     0x40000000U
+#define SA_RESETHAND   0x80000000U
+
+#define SA_NOMASK      SA_NODEFER
+#define SA_ONESHOT     SA_RESETHAND
+
+#define SA_RESTORER    0x04000000
+
+/*
+ * sigaltstack controls
+ */
+#define SS_ONSTACK     1
+#define SS_DISABLE     2
+
+#define MINSIGSTKSZ    2048
+#define SIGSTKSZ       8192
+
+#include <asm-generic/signal.h>
+
+#ifdef __KERNEL__
+struct old_sigaction {
+       __sighandler_t sa_handler;
+       old_sigset_t sa_mask;
+       unsigned long sa_flags;
+       __sigrestore_t sa_restorer;
+};
+
+struct sigaction {
+       __sighandler_t sa_handler;
+       unsigned long sa_flags;
+       __sigrestore_t sa_restorer;
+       sigset_t sa_mask;               /* mask last for extensibility */
+};
+
+struct k_sigaction {
+       struct sigaction sa;
+};
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+struct sigaction {
+       union {
+         __sighandler_t _sa_handler;
+         void (*_sa_sigaction)(int, struct siginfo *, void *);
+       } _u;
+       sigset_t sa_mask;
+       unsigned long sa_flags;
+       void (*sa_restorer)(void);
+};
+
+#define sa_handler     _u._sa_handler
+#define sa_sigaction   _u._sa_sigaction
+
+#endif /* __KERNEL__ */
+
+typedef struct sigaltstack {
+       void __user     *ss_sp;
+       int             ss_flags;
+       size_t          ss_size;
+} stack_t;
+
+#ifdef __KERNEL__
+#include <asm/sigcontext.h>
+
+
+struct pt_regs;
+#define ptrace_signal_deliver(regs, cookie) do { } while (0)
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_SIGNAL_H */
diff --git a/arch/mn10300/include/asm/smp.h b/arch/mn10300/include/asm/smp.h
new file mode 100644 (file)
index 0000000..4eb8c61
--- /dev/null
@@ -0,0 +1,18 @@
+/* MN10300 SMP support
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SMP_H
+#define _ASM_SMP_H
+
+#ifdef CONFIG_SMP
+#error SMP not yet supported for MN10300
+#endif
+
+#endif
diff --git a/arch/mn10300/include/asm/socket.h b/arch/mn10300/include/asm/socket.h
new file mode 100644 (file)
index 0000000..fb5daf4
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef _ASM_SOCKET_H
+#define _ASM_SOCKET_H
+
+#include <asm/sockios.h>
+
+/* For setsockopt(2) */
+#define SOL_SOCKET     1
+
+#define SO_DEBUG       1
+#define SO_REUSEADDR   2
+#define SO_TYPE                3
+#define SO_ERROR       4
+#define SO_DONTROUTE   5
+#define SO_BROADCAST   6
+#define SO_SNDBUF      7
+#define SO_RCVBUF      8
+#define SO_SNDBUFFORCE 32
+#define SO_RCVBUFFORCE 33
+#define SO_KEEPALIVE   9
+#define SO_OOBINLINE   10
+#define SO_NO_CHECK    11
+#define SO_PRIORITY    12
+#define SO_LINGER      13
+#define SO_BSDCOMPAT   14
+/* To add :#define SO_REUSEPORT 15 */
+#define SO_PASSCRED    16
+#define SO_PEERCRED    17
+#define SO_RCVLOWAT    18
+#define SO_SNDLOWAT    19
+#define SO_RCVTIMEO    20
+#define SO_SNDTIMEO    21
+
+/* Security levels - as per NRL IPv6 - don't actually do anything */
+#define SO_SECURITY_AUTHENTICATION             22
+#define SO_SECURITY_ENCRYPTION_TRANSPORT       23
+#define SO_SECURITY_ENCRYPTION_NETWORK         24
+
+#define SO_BINDTODEVICE        25
+
+/* Socket filtering */
+#define SO_ATTACH_FILTER        26
+#define SO_DETACH_FILTER        27
+
+#define SO_PEERNAME            28
+#define SO_TIMESTAMP           29
+#define SCM_TIMESTAMP          SO_TIMESTAMP
+
+#define SO_ACCEPTCONN          30
+
+#define SO_PEERSEC             31
+#define SO_PASSSEC             34
+#define SO_TIMESTAMPNS         35
+#define SCM_TIMESTAMPNS                SO_TIMESTAMPNS
+
+#define SO_MARK                        36
+
+#define SO_TIMESTAMPING                37
+#define SCM_TIMESTAMPING       SO_TIMESTAMPING
+
+#endif /* _ASM_SOCKET_H */
diff --git a/arch/mn10300/include/asm/sockios.h b/arch/mn10300/include/asm/sockios.h
new file mode 100644 (file)
index 0000000..b03043a
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef _ASM_SOCKIOS_H
+#define _ASM_SOCKIOS_H
+
+/* Socket-level I/O control calls. */
+#define FIOSETOWN      0x8901
+#define SIOCSPGRP      0x8902
+#define FIOGETOWN      0x8903
+#define SIOCGPGRP      0x8904
+#define SIOCATMARK     0x8905
+#define SIOCGSTAMP     0x8906          /* Get stamp */
+#define SIOCGSTAMPNS   0x8907          /* Get stamp (timespec) */
+
+#endif /* _ASM_SOCKIOS_H */
diff --git a/arch/mn10300/include/asm/spinlock.h b/arch/mn10300/include/asm/spinlock.h
new file mode 100644 (file)
index 0000000..4bf9c8b
--- /dev/null
@@ -0,0 +1,16 @@
+/* MN10300 spinlock support
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SPINLOCK_H
+#define _ASM_SPINLOCK_H
+
+#error SMP spinlocks not implemented for MN10300
+
+#endif /* _ASM_SPINLOCK_H */
diff --git a/arch/mn10300/include/asm/stat.h b/arch/mn10300/include/asm/stat.h
new file mode 100644 (file)
index 0000000..63ff837
--- /dev/null
@@ -0,0 +1,78 @@
+#ifndef _ASM_STAT_H
+#define _ASM_STAT_H
+
+struct __old_kernel_stat {
+       unsigned short st_dev;
+       unsigned short st_ino;
+       unsigned short st_mode;
+       unsigned short st_nlink;
+       unsigned short st_uid;
+       unsigned short st_gid;
+       unsigned short st_rdev;
+       unsigned long  st_size;
+       unsigned long  st_atime;
+       unsigned long  st_mtime;
+       unsigned long  st_ctime;
+};
+
+struct stat {
+       unsigned long  st_dev;
+       unsigned long  st_ino;
+       unsigned short st_mode;
+       unsigned short st_nlink;
+       unsigned short st_uid;
+       unsigned short st_gid;
+       unsigned long  st_rdev;
+       unsigned long  st_size;
+       unsigned long  st_blksize;
+       unsigned long  st_blocks;
+       unsigned long  st_atime;
+       unsigned long  st_atime_nsec;
+       unsigned long  st_mtime;
+       unsigned long  st_mtime_nsec;
+       unsigned long  st_ctime;
+       unsigned long  st_ctime_nsec;
+       unsigned long  __unused4;
+       unsigned long  __unused5;
+};
+
+/* This matches struct stat64 in glibc2.1, hence the absolutely
+ * insane amounts of padding around dev_t's.
+ */
+struct stat64 {
+       unsigned long long      st_dev;
+       unsigned char   __pad0[4];
+
+#define STAT64_HAS_BROKEN_ST_INO       1
+       unsigned long   __st_ino;
+
+       unsigned int    st_mode;
+       unsigned int    st_nlink;
+
+       unsigned long   st_uid;
+       unsigned long   st_gid;
+
+       unsigned long long      st_rdev;
+       unsigned char   __pad3[4];
+
+       long long       st_size;
+       unsigned long   st_blksize;
+
+       unsigned long   st_blocks;      /* Number 512-byte blocks allocated. */
+       unsigned long   __pad4;         /* future possible st_blocks high bits */
+
+       unsigned long   st_atime;
+       unsigned long   st_atime_nsec;
+
+       unsigned long   st_mtime;
+       unsigned int    st_mtime_nsec;
+
+       unsigned long   st_ctime;
+       unsigned long   st_ctime_nsec;
+
+       unsigned long long      st_ino;
+};
+
+#define STAT_HAVE_NSEC 1
+
+#endif /* _ASM_STAT_H */
diff --git a/arch/mn10300/include/asm/statfs.h b/arch/mn10300/include/asm/statfs.h
new file mode 100644 (file)
index 0000000..0b91fe1
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/statfs.h>
diff --git a/arch/mn10300/include/asm/string.h b/arch/mn10300/include/asm/string.h
new file mode 100644 (file)
index 0000000..47dbd43
--- /dev/null
@@ -0,0 +1,32 @@
+/* MN10300 Optimised string functions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Modified by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_STRING_H
+#define _ASM_STRING_H
+
+#define __HAVE_ARCH_MEMSET
+#define __HAVE_ARCH_MEMCPY
+#define __HAVE_ARCH_MEMMOVE
+
+extern void *memset(void *dest, int ch, size_t count);
+extern void *memcpy(void *dest, const void *src, size_t count);
+extern void *memmove(void *dest, const void *src, size_t count);
+
+
+extern void __struct_cpy_bug(void);
+#define struct_cpy(x, y)                       \
+({                                              \
+       if (sizeof(*(x)) != sizeof(*(y)))       \
+               __struct_cpy_bug;               \
+       memcpy(x, y, sizeof(*(x)));             \
+})
+
+#endif /* _ASM_STRING_H */
diff --git a/arch/mn10300/include/asm/swab.h b/arch/mn10300/include/asm/swab.h
new file mode 100644 (file)
index 0000000..bd818a8
--- /dev/null
@@ -0,0 +1,42 @@
+/* MN10300 Byte-order primitive construction
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SWAB_H
+#define _ASM_SWAB_H
+
+#include <linux/types.h>
+
+#ifdef __GNUC__
+
+static inline __attribute__((const))
+__u32 __arch_swab32(__u32 x)
+{
+       __u32 ret;
+       asm("swap %1,%0" : "=r" (ret) : "r" (x));
+       return ret;
+}
+#define __arch_swab32 __arch_swab32
+
+static inline __attribute__((const))
+__u16 __arch_swab16(__u16 x)
+{
+       __u16 ret;
+       asm("swaph %1,%0" : "=r" (ret) : "r" (x));
+       return ret;
+}
+#define __arch_swab32 __arch_swab32
+
+#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#  define __SWAB_64_THRU_32__
+#endif
+
+#endif /* __GNUC__ */
+
+#endif /* _ASM_SWAB_H */
diff --git a/arch/mn10300/include/asm/system.h b/arch/mn10300/include/asm/system.h
new file mode 100644 (file)
index 0000000..8214fb7
--- /dev/null
@@ -0,0 +1,237 @@
+/* MN10300 System definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_SYSTEM_H
+#define _ASM_SYSTEM_H
+
+#include <asm/cpu-regs.h>
+
+#ifdef __KERNEL__
+#ifndef __ASSEMBLY__
+
+#include <linux/kernel.h>
+
+struct task_struct;
+struct thread_struct;
+
+extern asmlinkage
+struct task_struct *__switch_to(struct thread_struct *prev,
+                               struct thread_struct *next,
+                               struct task_struct *prev_task);
+
+/* context switching is now performed out-of-line in switch_to.S */
+#define switch_to(prev, next, last)                                    \
+do {                                                                   \
+       current->thread.wchan = (u_long) __builtin_return_address(0);   \
+       (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
+       mb();                                                           \
+       current->thread.wchan = 0;                                      \
+} while (0)
+
+#define arch_align_stack(x) (x)
+
+#define nop() asm volatile ("nop")
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * Force strict CPU ordering.
+ * And yes, this is required on UP too when we're talking
+ * to devices.
+ *
+ * For now, "wmb()" doesn't actually do anything, as all
+ * Intel CPU's follow what Intel calls a *Processor Order*,
+ * in which all writes are seen in the program order even
+ * outside the CPU.
+ *
+ * I expect future Intel CPU's to have a weaker ordering,
+ * but I'd also expect them to finally get their act together
+ * and add some real memory barriers if so.
+ *
+ * Some non intel clones support out of order store. wmb() ceases to be a
+ * nop for these.
+ */
+
+#define mb()   asm volatile ("": : :"memory")
+#define rmb()  mb()
+#define wmb()  asm volatile ("": : :"memory")
+
+#ifdef CONFIG_SMP
+#define smp_mb()       mb()
+#define smp_rmb()      rmb()
+#define smp_wmb()      wmb()
+#else
+#define smp_mb()       barrier()
+#define smp_rmb()      barrier()
+#define smp_wmb()      barrier()
+#endif
+
+#define set_mb(var, value)  do { var = value;  mb(); } while (0)
+#define set_wmb(var, value) do { var = value; wmb(); } while (0)
+
+#define read_barrier_depends()         do {} while (0)
+#define smp_read_barrier_depends()     do {} while (0)
+
+/*****************************************************************************/
+/*
+ * interrupt control
+ * - "disabled": run in IM1/2
+ *   - level 0 - GDB stub
+ *   - level 1 - virtual serial DMA (if present)
+ *   - level 5 - normal interrupt priority
+ *   - level 6 - timer interrupt
+ * - "enabled":  run in IM7
+ */
+#ifdef CONFIG_MN10300_TTYSM
+#define MN10300_CLI_LEVEL      EPSW_IM_2
+#else
+#define MN10300_CLI_LEVEL      EPSW_IM_1
+#endif
+
+#define local_save_flags(x)                    \
+do {                                           \
+       typecheck(unsigned long, x);            \
+       asm volatile(                           \
+               "       mov epsw,%0     \n"     \
+               : "=d"(x)                       \
+               );                              \
+} while (0)
+
+#define local_irq_disable()                                            \
+do {                                                                   \
+       asm volatile(                                                   \
+               "       and %0,epsw     \n"                             \
+               "       or %1,epsw      \n"                             \
+               "       nop             \n"                             \
+               "       nop             \n"                             \
+               "       nop             \n"                             \
+               :                                                       \
+               : "i"(~EPSW_IM), "i"(EPSW_IE | MN10300_CLI_LEVEL)       \
+               );                                                      \
+} while (0)
+
+#define local_irq_save(x)                      \
+do {                                           \
+       local_save_flags(x);                    \
+       local_irq_disable();                    \
+} while (0)
+
+/*
+ * we make sure local_irq_enable() doesn't cause priority inversion
+ */
+#ifndef __ASSEMBLY__
+
+extern unsigned long __mn10300_irq_enabled_epsw;
+
+#endif
+
+#define local_irq_enable()                                             \
+do {                                                                   \
+       unsigned long tmp;                                              \
+                                                                       \
+       asm volatile(                                                   \
+               "       mov     epsw,%0         \n"                     \
+               "       and     %1,%0           \n"                     \
+               "       or      %2,%0           \n"                     \
+               "       mov     %0,epsw         \n"                     \
+               : "=&d"(tmp)                                            \
+               : "i"(~EPSW_IM), "r"(__mn10300_irq_enabled_epsw)        \
+               );                                                      \
+} while (0)
+
+#define local_irq_restore(x)                   \
+do {                                           \
+       typecheck(unsigned long, x);            \
+       asm volatile(                           \
+               "       mov %0,epsw     \n"     \
+               "       nop             \n"     \
+               "       nop             \n"     \
+               "       nop             \n"     \
+               :                               \
+               : "d"(x)                        \
+               : "memory", "cc"                \
+               );                              \
+} while (0)
+
+#define irqs_disabled()                                \
+({                                             \
+       unsigned long flags;                    \
+       local_save_flags(flags);                \
+       (flags & EPSW_IM) <= MN10300_CLI_LEVEL; \
+})
+
+/* hook to save power by halting the CPU
+ * - called from the idle loop
+ * - must reenable interrupts (which takes three instruction cycles to complete)
+ */
+#define safe_halt()                                                    \
+do {                                                                   \
+       asm volatile("  or      %0,epsw \n"                             \
+                    "  nop             \n"                             \
+                    "  nop             \n"                             \
+                    "  bset    %2,(%1) \n"                             \
+                    :                                                  \
+                    : "i"(EPSW_IE|EPSW_IM), "n"(&CPUM), "i"(CPUM_SLEEP)\
+                    : "cc"                                             \
+                    );                                                 \
+} while (0)
+
+#define STI    or EPSW_IE|EPSW_IM,epsw
+#define CLI    and ~EPSW_IM,epsw; or EPSW_IE|MN10300_CLI_LEVEL,epsw; nop; nop; nop
+
+/*****************************************************************************/
+/*
+ * MN10300 doesn't actually have an exchange instruction
+ */
+#ifndef __ASSEMBLY__
+
+struct __xchg_dummy { unsigned long a[100]; };
+#define __xg(x) ((struct __xchg_dummy *)(x))
+
+static inline
+unsigned long __xchg(volatile unsigned long *m, unsigned long val)
+{
+       unsigned long retval;
+       unsigned long flags;
+
+       local_irq_save(flags);
+       retval = *m;
+       *m = val;
+       local_irq_restore(flags);
+       return retval;
+}
+
+#define xchg(ptr, v)                                           \
+       ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr),    \
+                                    (unsigned long)(v)))
+
+static inline unsigned long __cmpxchg(volatile unsigned long *m,
+                                     unsigned long old, unsigned long new)
+{
+       unsigned long retval;
+       unsigned long flags;
+
+       local_irq_save(flags);
+       retval = *m;
+       if (retval == old)
+               *m = new;
+       local_irq_restore(flags);
+       return retval;
+}
+
+#define cmpxchg(ptr, o, n)                                     \
+       ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \
+                                       (unsigned long)(o),     \
+                                       (unsigned long)(n)))
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_SYSTEM_H */
diff --git a/arch/mn10300/include/asm/termbits.h b/arch/mn10300/include/asm/termbits.h
new file mode 100644 (file)
index 0000000..eb2b0dc
--- /dev/null
@@ -0,0 +1,200 @@
+#ifndef _ASM_TERMBITS_H
+#define _ASM_TERMBITS_H
+
+#include <linux/posix_types.h>
+
+typedef unsigned char  cc_t;
+typedef unsigned int   speed_t;
+typedef unsigned int   tcflag_t;
+
+#define NCCS 19
+struct termios {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+};
+
+struct termios2 {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+       speed_t c_ispeed;               /* input speed */
+       speed_t c_ospeed;               /* output speed */
+};
+
+struct ktermios {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+       speed_t c_ispeed;               /* input speed */
+       speed_t c_ospeed;               /* output speed */
+};
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
+
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK  0000020
+#define ISTRIP 0000040
+#define INLCR  0000100
+#define IGNCR  0000200
+#define ICRNL  0000400
+#define IUCLC  0001000
+#define IXON   0002000
+#define IXANY  0004000
+#define IXOFF  0010000
+#define IMAXBEL        0020000
+#define IUTF8  0040000
+
+/* c_oflag bits */
+#define OPOST  0000001
+#define OLCUC  0000002
+#define ONLCR  0000004
+#define OCRNL  0000010
+#define ONOCR  0000020
+#define ONLRET 0000040
+#define OFILL  0000100
+#define OFDEL  0000200
+#define NLDLY  0000400
+#define   NL0  0000000
+#define   NL1  0000400
+#define CRDLY  0003000
+#define   CR0  0000000
+#define   CR1  0001000
+#define   CR2  0002000
+#define   CR3  0003000
+#define TABDLY 0014000
+#define   TAB0 0000000
+#define   TAB1 0004000
+#define   TAB2 0010000
+#define   TAB3 0014000
+#define   XTABS        0014000
+#define BSDLY  0020000
+#define   BS0  0000000
+#define   BS1  0020000
+#define VTDLY  0040000
+#define   VT0  0000000
+#define   VT1  0040000
+#define FFDLY  0100000
+#define   FF0  0000000
+#define   FF1  0100000
+
+/* c_cflag bit meaning */
+#define CBAUD  0010017
+#define  B0    0000000         /* hang up */
+#define  B50   0000001
+#define  B75   0000002
+#define  B110  0000003
+#define  B134  0000004
+#define  B150  0000005
+#define  B200  0000006
+#define  B300  0000007
+#define  B600  0000010
+#define  B1200 0000011
+#define  B1800 0000012
+#define  B2400 0000013
+#define  B4800 0000014
+#define  B9600 0000015
+#define  B19200        0000016
+#define  B38400        0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CSIZE  0000060
+#define   CS5  0000000
+#define   CS6  0000020
+#define   CS7  0000040
+#define   CS8  0000060
+#define CSTOPB 0000100
+#define CREAD  0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL  0002000
+#define CLOCAL 0004000
+#define CBAUDEX 0010000
+#define   BOTHER  0010000
+#define    B57600 0010001
+#define   B115200 0010002
+#define   B230400 0010003
+#define   B460800 0010004
+#define   B500000 0010005
+#define   B576000 0010006
+#define   B921600 0010007
+#define  B1000000 0010010
+#define  B1152000 0010011
+#define  B1500000 0010012
+#define  B2000000 0010013
+#define  B2500000 0010014
+#define  B3000000 0010015
+#define  B3500000 0010016
+#define  B4000000 0010017
+#define CIBAUD   002003600000  /* input baud rate (not used) */
+#define CTVB     004000000000          /* VisioBraille Terminal flow control */
+#define CMSPAR   010000000000          /* mark or space (stick) parity */
+#define CRTSCTS          020000000000          /* flow control */
+
+#define IBSHIFT          16            /* Shift from CBAUD to CIBAUD */
+
+/* c_lflag bits */
+#define ISIG   0000001
+#define ICANON 0000002
+#define XCASE  0000004
+#define ECHO   0000010
+#define ECHOE  0000020
+#define ECHOK  0000040
+#define ECHONL 0000100
+#define NOFLSH 0000200
+#define TOSTOP 0000400
+#define ECHOCTL        0001000
+#define ECHOPRT        0002000
+#define ECHOKE 0004000
+#define FLUSHO 0010000
+#define PENDIN 0040000
+#define IEXTEN 0100000
+
+/* tcflow() and TCXONC use these */
+#define        TCOOFF          0
+#define        TCOON           1
+#define        TCIOFF          2
+#define        TCION           3
+
+/* tcflush() and TCFLSH use these */
+#define        TCIFLUSH        0
+#define        TCOFLUSH        1
+#define        TCIOFLUSH       2
+
+/* tcsetattr uses these */
+#define        TCSANOW         0
+#define        TCSADRAIN       1
+#define        TCSAFLUSH       2
+
+#endif /* _ASM_TERMBITS_H */
diff --git a/arch/mn10300/include/asm/termios.h b/arch/mn10300/include/asm/termios.h
new file mode 100644 (file)
index 0000000..dd7cf61
--- /dev/null
@@ -0,0 +1,92 @@
+#ifndef _ASM_TERMIOS_H
+#define _ASM_TERMIOS_H
+
+#include <asm/termbits.h>
+#include <asm/ioctls.h>
+
+struct winsize {
+       unsigned short ws_row;
+       unsigned short ws_col;
+       unsigned short ws_xpixel;
+       unsigned short ws_ypixel;
+};
+
+#define NCC 8
+struct termio {
+       unsigned short c_iflag;         /* input mode flags */
+       unsigned short c_oflag;         /* output mode flags */
+       unsigned short c_cflag;         /* control mode flags */
+       unsigned short c_lflag;         /* local mode flags */
+       unsigned char c_line;           /* line discipline */
+       unsigned char c_cc[NCC];        /* control characters */
+};
+
+#ifdef __KERNEL__
+/*     intr=^C         quit=^|         erase=del       kill=^U
+       eof=^D          vtime=\0        vmin=\1         sxtc=\0
+       start=^Q        stop=^S         susp=^Z         eol=\0
+       reprint=^R      discard=^U      werase=^W       lnext=^V
+       eol2=\0
+*/
+#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
+#endif
+
+/* modem lines */
+#define TIOCM_LE       0x001
+#define TIOCM_DTR      0x002
+#define TIOCM_RTS      0x004
+#define TIOCM_ST       0x008
+#define TIOCM_SR       0x010
+#define TIOCM_CTS      0x020
+#define TIOCM_CAR      0x040
+#define TIOCM_RNG      0x080
+#define TIOCM_DSR      0x100
+#define TIOCM_CD       TIOCM_CAR
+#define TIOCM_RI       TIOCM_RNG
+#define TIOCM_OUT1     0x2000
+#define TIOCM_OUT2     0x4000
+#define TIOCM_LOOP     0x8000
+
+#define TIOCM_MODEM_BITS       TIOCM_OUT2      /* IRDA support */
+
+/*
+ * Translate a "termio" structure into a "termios". Ugh.
+ */
+#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
+       unsigned short __tmp; \
+       get_user(__tmp, &(termio)->x); \
+       *(unsigned short *) &(termios)->x = __tmp; \
+}
+
+#define user_termio_to_kernel_termios(termios, termio) \
+({ \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
+       copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
+})
+
+/*
+ * Translate a "termios" structure into a "termio". Ugh.
+ */
+#define kernel_termios_to_user_termio(termio, termios) \
+({ \
+       put_user((termios)->c_iflag, &(termio)->c_iflag); \
+       put_user((termios)->c_oflag, &(termio)->c_oflag); \
+       put_user((termios)->c_cflag, &(termio)->c_cflag); \
+       put_user((termios)->c_lflag, &(termio)->c_lflag); \
+       put_user((termios)->c_line,  &(termio)->c_line); \
+       copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
+})
+
+#define user_termios_to_kernel_termios(k, u) \
+       copy_from_user(k, u, sizeof(struct termios2))
+#define kernel_termios_to_user_termios(u, k) \
+       copy_to_user(u, k, sizeof(struct termios2))
+#define user_termios_to_kernel_termios_1(k, u) \
+       copy_from_user(k, u, sizeof(struct termios))
+#define kernel_termios_to_user_termios_1(u, k) \
+       copy_to_user(u, k, sizeof(struct termios))
+
+#endif /* _ASM_TERMIOS_H */
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h
new file mode 100644 (file)
index 0000000..78a3881
--- /dev/null
@@ -0,0 +1,170 @@
+/* MN10300 Low-level thread information
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_THREAD_INFO_H
+#define _ASM_THREAD_INFO_H
+
+#ifdef __KERNEL__
+
+#include <asm/page.h>
+
+#ifndef __ASSEMBLY__
+#include <asm/processor.h>
+#endif
+
+#define PREEMPT_ACTIVE         0x10000000
+
+#ifdef CONFIG_4KSTACKS
+#define THREAD_SIZE            (4096)
+#else
+#define THREAD_SIZE            (8192)
+#endif
+
+#define STACK_WARN             (THREAD_SIZE / 8)
+
+/*
+ * low level task data that entry.S needs immediate access to
+ * - this struct should fit entirely inside of one cache line
+ * - this struct shares the supervisor stack pages
+ * - if the contents of this structure are changed, the assembly constants
+ *   must also be changed
+ */
+#ifndef __ASSEMBLY__
+
+struct thread_info {
+       struct task_struct      *task;          /* main task structure */
+       struct exec_domain      *exec_domain;   /* execution domain */
+       unsigned long           flags;          /* low level flags */
+       __u32                   cpu;            /* current CPU */
+       __s32                   preempt_count;  /* 0 => preemptable, <0 => BUG */
+
+       mm_segment_t            addr_limit;     /* thread address space:
+                                                  0-0xBFFFFFFF for user-thead
+                                                  0-0xFFFFFFFF for kernel-thread
+                                               */
+       struct restart_block    restart_block;
+
+       __u8                    supervisor_stack[0];
+};
+
+#else /* !__ASSEMBLY__ */
+
+#ifndef __ASM_OFFSETS_H__
+#include <asm/asm-offsets.h>
+#endif
+
+#endif
+
+/*
+ * macros/functions for gaining access to the thread information structure
+ *
+ * preempt_count needs to be 1 initially, until the scheduler is functional.
+ */
+#ifndef __ASSEMBLY__
+
+#define INIT_THREAD_INFO(tsk)                  \
+{                                              \
+       .task           = &tsk,                 \
+       .exec_domain    = &default_exec_domain, \
+       .flags          = 0,                    \
+       .cpu            = 0,                    \
+       .preempt_count  = 1,                    \
+       .addr_limit     = KERNEL_DS,            \
+       .restart_block = {                      \
+               .fn = do_no_restart_syscall,    \
+       },                                      \
+}
+
+#define init_thread_info       (init_thread_union.thread_info)
+#define init_stack             (init_thread_union.stack)
+#define init_uregs                                                     \
+       ((struct pt_regs *)                                             \
+        ((unsigned long) init_stack + THREAD_SIZE - sizeof(struct pt_regs)))
+
+extern struct thread_info *__current_ti;
+
+/* how to get the thread information struct from C */
+static inline __attribute__((const))
+struct thread_info *current_thread_info(void)
+{
+       struct thread_info *ti;
+       asm("mov sp,%0\n"
+           "and %1,%0\n"
+           : "=d" (ti)
+           : "i" (~(THREAD_SIZE - 1))
+           : "cc");
+       return ti;
+}
+
+/* how to get the current stack pointer from C */
+static inline unsigned long current_stack_pointer(void)
+{
+       unsigned long sp;
+       asm("mov sp,%0; ":"=r" (sp));
+       return sp;
+}
+
+#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
+
+/* thread information allocation */
+#ifdef CONFIG_DEBUG_STACK_USAGE
+#define alloc_thread_info(tsk) kzalloc(THREAD_SIZE, GFP_KERNEL)
+#else
+#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#endif
+
+#define free_thread_info(ti)   kfree((ti))
+#define get_thread_info(ti)    get_task_struct((ti)->task)
+#define put_thread_info(ti)    put_task_struct((ti)->task)
+
+#else /* !__ASSEMBLY__ */
+
+#ifndef __VMLINUX_LDS__
+/* how to get the thread information struct from ASM */
+.macro GET_THREAD_INFO reg
+       mov     sp,\reg
+       and     -THREAD_SIZE,\reg
+.endm
+#endif
+#endif
+
+/*
+ * thread information flags
+ * - these are process state flags that various assembly files may need to
+ *   access
+ * - pending work-to-be-done flags are in LSW
+ * - other flags in MSW
+ */
+#define TIF_SYSCALL_TRACE      0       /* syscall trace active */
+#define TIF_NOTIFY_RESUME      1       /* resumption notification requested */
+#define TIF_SIGPENDING         2       /* signal pending */
+#define TIF_NEED_RESCHED       3       /* rescheduling necessary */
+#define TIF_SINGLESTEP         4       /* restore singlestep on return to user mode */
+#define TIF_RESTORE_SIGMASK    5       /* restore signal mask in do_signal() */
+#define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
+#define TIF_MEMDIE             17      /* OOM killer killed process */
+#define TIF_FREEZE             18      /* freezing for suspend */
+
+#define _TIF_SYSCALL_TRACE     +(1 << TIF_SYSCALL_TRACE)
+#define _TIF_NOTIFY_RESUME     +(1 << TIF_NOTIFY_RESUME)
+#define _TIF_SIGPENDING                +(1 << TIF_SIGPENDING)
+#define _TIF_NEED_RESCHED      +(1 << TIF_NEED_RESCHED)
+#define _TIF_SINGLESTEP                +(1 << TIF_SINGLESTEP)
+#define _TIF_RESTORE_SIGMASK   +(1 << TIF_RESTORE_SIGMASK)
+#define _TIF_POLLING_NRFLAG    +(1 << TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE            +(1 << TIF_FREEZE)
+
+#define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
+#define _TIF_ALLWORK_MASK      0x0000FFFF      /* work to do on any return to u-space */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_THREAD_INFO_H */
diff --git a/arch/mn10300/include/asm/timer-regs.h b/arch/mn10300/include/asm/timer-regs.h
new file mode 100644 (file)
index 0000000..1d883b7
--- /dev/null
@@ -0,0 +1,293 @@
+/* AM33v2 on-board timer module registers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_TIMER_REGS_H
+#define _ASM_TIMER_REGS_H
+
+#include <asm/cpu-regs.h>
+#include <asm/intctl-regs.h>
+
+#ifdef __KERNEL__
+
+/* timer prescalar control */
+#define        TMPSCNT                 __SYSREG(0xd4003071, u8) /* timer prescaler control */
+#define        TMPSCNT_ENABLE          0x80    /* timer prescaler enable */
+#define        TMPSCNT_DISABLE         0x00    /* timer prescaler disable */
+
+/* 8 bit timers */
+#define        TM0MD                   __SYSREG(0xd4003000, u8) /* timer 0 mode register */
+#define        TM0MD_SRC               0x07    /* timer source */
+#define        TM0MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM0MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM0MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM0MD_SRC_TM2IO         0x03    /* - TM2IO pin input */
+#define        TM0MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM0MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM0MD_SRC_TM0IO         0x07    /* - TM0IO pin input */
+#define        TM0MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM0MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM1MD                   __SYSREG(0xd4003001, u8) /* timer 1 mode register */
+#define        TM1MD_SRC               0x07    /* timer source */
+#define        TM1MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM1MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM1MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM1MD_SRC_TM0CASCADE    0x03    /* - cascade with timer 0 */
+#define        TM1MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM1MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM1MD_SRC_TM1IO         0x07    /* - TM1IO pin input */
+#define        TM1MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM1MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM2MD                   __SYSREG(0xd4003002, u8) /* timer 2 mode register */
+#define        TM2MD_SRC               0x07    /* timer source */
+#define        TM2MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM2MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM2MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM2MD_SRC_TM1CASCADE    0x03    /* - cascade with timer 1 */
+#define        TM2MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM2MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM2MD_SRC_TM2IO         0x07    /* - TM2IO pin input */
+#define        TM2MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM2MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM3MD                   __SYSREG(0xd4003003, u8) /* timer 3 mode register */
+#define        TM3MD_SRC               0x07    /* timer source */
+#define        TM3MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM3MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM3MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM3MD_SRC_TM1CASCADE    0x03    /* - cascade with timer 2 */
+#define        TM3MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM3MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM3MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM3MD_SRC_TM3IO         0x07    /* - TM3IO pin input */
+#define        TM3MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM3MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM01MD                  __SYSREG(0xd4003000, u16)  /* timer 0:1 mode register */
+
+#define        TM0BR                   __SYSREG(0xd4003010, u8)   /* timer 0 base register */
+#define        TM1BR                   __SYSREG(0xd4003011, u8)   /* timer 1 base register */
+#define        TM2BR                   __SYSREG(0xd4003012, u8)   /* timer 2 base register */
+#define        TM3BR                   __SYSREG(0xd4003013, u8)   /* timer 3 base register */
+#define        TM01BR                  __SYSREG(0xd4003010, u16)  /* timer 0:1 base register */
+
+#define        TM0BC                   __SYSREGC(0xd4003020, u8)  /* timer 0 binary counter */
+#define        TM1BC                   __SYSREGC(0xd4003021, u8)  /* timer 1 binary counter */
+#define        TM2BC                   __SYSREGC(0xd4003022, u8)  /* timer 2 binary counter */
+#define        TM3BC                   __SYSREGC(0xd4003023, u8)  /* timer 3 binary counter */
+#define        TM01BC                  __SYSREGC(0xd4003020, u16) /* timer 0:1 binary counter */
+
+#define TM0IRQ                 2       /* timer 0 IRQ */
+#define TM1IRQ                 3       /* timer 1 IRQ */
+#define TM2IRQ                 4       /* timer 2 IRQ */
+#define TM3IRQ                 5       /* timer 3 IRQ */
+
+#define        TM0ICR                  GxICR(TM0IRQ)   /* timer 0 uflow intr ctrl reg */
+#define        TM1ICR                  GxICR(TM1IRQ)   /* timer 1 uflow intr ctrl reg */
+#define        TM2ICR                  GxICR(TM2IRQ)   /* timer 2 uflow intr ctrl reg */
+#define        TM3ICR                  GxICR(TM3IRQ)   /* timer 3 uflow intr ctrl reg */
+
+/* 16-bit timers 4,5 & 7-11 */
+#define        TM4MD                   __SYSREG(0xd4003080, u8)   /* timer 4 mode register */
+#define        TM4MD_SRC               0x07    /* timer source */
+#define        TM4MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM4MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM4MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM4MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM4MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM4MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM4MD_SRC_TM4IO         0x07    /* - TM4IO pin input */
+#define        TM4MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM4MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM5MD                   __SYSREG(0xd4003082, u8)   /* timer 5 mode register */
+#define        TM5MD_SRC               0x07    /* timer source */
+#define        TM5MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM5MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM5MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM5MD_SRC_TM4CASCADE    0x03    /* - cascade with timer 4 */
+#define        TM5MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM5MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM5MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM5MD_SRC_TM5IO         0x07    /* - TM5IO pin input */
+#define        TM5MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM5MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM7MD                   __SYSREG(0xd4003086, u8)   /* timer 7 mode register */
+#define        TM7MD_SRC               0x07    /* timer source */
+#define        TM7MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM7MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM7MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM7MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM7MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM7MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM7MD_SRC_TM7IO         0x07    /* - TM7IO pin input */
+#define        TM7MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM7MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM8MD                   __SYSREG(0xd4003088, u8)   /* timer 8 mode register */
+#define        TM8MD_SRC               0x07    /* timer source */
+#define        TM8MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM8MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM8MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM8MD_SRC_TM7CASCADE    0x03    /* - cascade with timer 7 */
+#define        TM8MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM8MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM8MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM8MD_SRC_TM8IO         0x07    /* - TM8IO pin input */
+#define        TM8MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM8MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM9MD                   __SYSREG(0xd400308a, u8)   /* timer 9 mode register */
+#define        TM9MD_SRC               0x07    /* timer source */
+#define        TM9MD_SRC_IOCLK         0x00    /* - IOCLK */
+#define        TM9MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
+#define        TM9MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
+#define        TM9MD_SRC_TM8CASCADE    0x03    /* - cascade with timer 8 */
+#define        TM9MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
+#define        TM9MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
+#define        TM9MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
+#define        TM9MD_SRC_TM9IO         0x07    /* - TM9IO pin input */
+#define        TM9MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
+#define        TM9MD_COUNT_ENABLE      0x80    /* timer count enable */
+
+#define        TM10MD                  __SYSREG(0xd400308c, u8)   /* timer 10 mode register */
+#define        TM10MD_SRC              0x07    /* timer source */
+#define        TM10MD_SRC_IOCLK        0x00    /* - IOCLK */
+#define        TM10MD_SRC_IOCLK_8      0x01    /* - 1/8 IOCLK */
+#define        TM10MD_SRC_IOCLK_32     0x02    /* - 1/32 IOCLK */
+#define        TM10MD_SRC_TM9CASCADE   0x03    /* - cascade with timer 9 */
+#define        TM10MD_SRC_TM0UFLOW     0x04    /* - timer 0 underflow */
+#define        TM10MD_SRC_TM1UFLOW     0x05    /* - timer 1 underflow */
+#define        TM10MD_SRC_TM2UFLOW     0x06    /* - timer 2 underflow */
+#define        TM10MD_SRC_TM10IO       0x07    /* - TM10IO pin input */
+#define        TM10MD_INIT_COUNTER     0x40    /* initialize TMnBC = TMnBR */
+#define        TM10MD_COUNT_ENABLE     0x80    /* timer count enable */
+
+#define        TM11MD                  __SYSREG(0xd400308e, u8)   /* timer 11 mode register */
+#define        TM11MD_SRC              0x07    /* timer source */
+#define        TM11MD_SRC_IOCLK        0x00    /* - IOCLK */
+#define        TM11MD_SRC_IOCLK_8      0x01    /* - 1/8 IOCLK */
+#define        TM11MD_SRC_IOCLK_32     0x02    /* - 1/32 IOCLK */
+#define        TM11MD_SRC_TM7CASCADE   0x03    /* - cascade with timer 7 */
+#define        TM11MD_SRC_TM0UFLOW     0x04    /* - timer 0 underflow */
+#define        TM11MD_SRC_TM1UFLOW     0x05    /* - timer 1 underflow */
+#define        TM11MD_SRC_TM2UFLOW     0x06    /* - timer 2 underflow */
+#define        TM11MD_SRC_TM11IO       0x07    /* - TM11IO pin input */
+#define        TM11MD_INIT_COUNTER     0x40    /* initialize TMnBC = TMnBR */
+#define        TM11MD_COUNT_ENABLE     0x80    /* timer count enable */
+
+#define        TM4BR                   __SYSREG(0xd4003090, u16)  /* timer 4 base register */
+#define        TM5BR                   __SYSREG(0xd4003092, u16)  /* timer 5 base register */
+#define        TM7BR                   __SYSREG(0xd4003096, u16)  /* timer 7 base register */
+#define        TM8BR                   __SYSREG(0xd4003098, u16)  /* timer 8 base register */
+#define        TM9BR                   __SYSREG(0xd400309a, u16)  /* timer 9 base register */
+#define        TM10BR                  __SYSREG(0xd400309c, u16)  /* timer 10 base register */
+#define        TM11BR                  __SYSREG(0xd400309e, u16)  /* timer 11 base register */
+#define        TM45BR                  __SYSREG(0xd4003090, u32)  /* timer 4:5 base register */
+
+#define        TM4BC                   __SYSREG(0xd40030a0, u16)  /* timer 4 binary counter */
+#define        TM5BC                   __SYSREG(0xd40030a2, u16)  /* timer 5 binary counter */
+#define        TM45BC                  __SYSREG(0xd40030a0, u32)  /* timer 4:5 binary counter */
+
+#define        TM7BC                   __SYSREG(0xd40030a6, u16)  /* timer 7 binary counter */
+#define        TM8BC                   __SYSREG(0xd40030a8, u16)  /* timer 8 binary counter */
+#define        TM9BC                   __SYSREG(0xd40030aa, u16)  /* timer 9 binary counter */
+#define        TM10BC                  __SYSREG(0xd40030ac, u16)  /* timer 10 binary counter */
+#define        TM11BC                  __SYSREG(0xd40030ae, u16)  /* timer 11 binary counter */
+
+#define TM4IRQ                 6       /* timer 4 IRQ */
+#define TM5IRQ                 7       /* timer 5 IRQ */
+#define TM7IRQ                 11      /* timer 7 IRQ */
+#define TM8IRQ                 12      /* timer 8 IRQ */
+#define TM9IRQ                 13      /* timer 9 IRQ */
+#define TM10IRQ                        14      /* timer 10 IRQ */
+#define TM11IRQ                        15      /* timer 11 IRQ */
+
+#define        TM4ICR                  GxICR(TM4IRQ)   /* timer 4 uflow intr ctrl reg */
+#define        TM5ICR                  GxICR(TM5IRQ)   /* timer 5 uflow intr ctrl reg */
+#define        TM7ICR                  GxICR(TM7IRQ)   /* timer 7 uflow intr ctrl reg */
+#define        TM8ICR                  GxICR(TM8IRQ)   /* timer 8 uflow intr ctrl reg */
+#define        TM9ICR                  GxICR(TM9IRQ)   /* timer 9 uflow intr ctrl reg */
+#define        TM10ICR                 GxICR(TM10IRQ)  /* timer 10 uflow intr ctrl reg */
+#define        TM11ICR                 GxICR(TM11IRQ)  /* timer 11 uflow intr ctrl reg */
+
+/* 16-bit timer 6 */
+#define        TM6MD                   __SYSREG(0xd4003084, u16)  /* timer6 mode register */
+#define        TM6MD_SRC               0x0007  /* timer source */
+#define        TM6MD_SRC_IOCLK         0x0000  /* - IOCLK */
+#define        TM6MD_SRC_IOCLK_8       0x0001  /* - 1/8 IOCLK */
+#define        TM6MD_SRC_IOCLK_32      0x0002  /* - 1/32 IOCLK */
+#define        TM6MD_SRC_TM0UFLOW      0x0004  /* - timer 0 underflow */
+#define        TM6MD_SRC_TM1UFLOW      0x0005  /* - timer 1 underflow */
+#define        TM6MD_SRC_TM6IOB_BOTH   0x0006  /* - TM6IOB pin input (both edges) */
+#define        TM6MD_SRC_TM6IOB_SINGLE 0x0007  /* - TM6IOB pin input (single edge) */
+#define        TM6MD_CLR_ENABLE        0x0010  /* clear count enable */
+#define        TM6MD_ONESHOT_ENABLE    0x0040  /* oneshot count */
+#define        TM6MD_TRIG_ENABLE       0x0080  /* TM6IOB pin trigger enable */
+#define TM6MD_PWM              0x3800  /* PWM output mode */
+#define TM6MD_PWM_DIS          0x0000  /* - disabled */
+#define        TM6MD_PWM_10BIT         0x1000  /* - 10 bits mode */
+#define        TM6MD_PWM_11BIT         0x1800  /* - 11 bits mode */
+#define        TM6MD_PWM_12BIT         0x3000  /* - 12 bits mode */
+#define        TM6MD_PWM_14BIT         0x3800  /* - 14 bits mode */
+#define        TM6MD_INIT_COUNTER      0x4000  /* initialize TMnBC to zero */
+#define        TM6MD_COUNT_ENABLE      0x8000  /* timer count enable */
+
+#define        TM6MDA                  __SYSREG(0xd40030b4, u8)   /* timer6 cmp/cap A mode reg */
+#define TM6MDA_OUT             0x07    /* output select */
+#define        TM6MDA_OUT_SETA_RESETB  0x00    /* - set at match A, reset at match B */
+#define        TM6MDA_OUT_SETA_RESETOV 0x01    /* - set at match A, reset at overflow */
+#define        TM6MDA_OUT_SETA         0x02    /* - set at match A */
+#define        TM6MDA_OUT_RESETA       0x03    /* - reset at match A */
+#define        TM6MDA_OUT_TOGGLE       0x04    /* - toggle on match A */
+#define TM6MDA_MODE            0xc0    /* compare A register mode */
+#define        TM6MDA_MODE_CMP_SINGLE  0x00    /* - compare, single buffer mode */
+#define        TM6MDA_MODE_CMP_DOUBLE  0x40    /* - compare, double buffer mode */
+#define        TM6MDA_MODE_CAP_S_EDGE  0x80    /* - capture, single edge mode */
+#define        TM6MDA_MODE_CAP_D_EDGE  0xc0    /* - capture, double edge mode */
+#define TM6MDA_EDGE            0x20    /* compare A edge select */
+#define        TM6MDA_EDGE_FALLING     0x00    /* capture on falling edge */
+#define        TM6MDA_EDGE_RISING      0x20    /* capture on rising edge */
+#define        TM6MDA_CAPTURE_ENABLE   0x10    /* capture enable */
+
+#define        TM6MDB                  __SYSREG(0xd40030b5, u8)   /* timer6 cmp/cap B mode reg */
+#define TM6MDB_OUT             0x07    /* output select */
+#define        TM6MDB_OUT_SETB_RESETA  0x00    /* - set at match B, reset at match A */
+#define        TM6MDB_OUT_SETB_RESETOV 0x01    /* - set at match B */
+#define        TM6MDB_OUT_RESETB       0x03    /* - reset at match B */
+#define        TM6MDB_OUT_TOGGLE       0x04    /* - toggle on match B */
+#define TM6MDB_MODE            0xc0    /* compare B register mode */
+#define        TM6MDB_MODE_CMP_SINGLE  0x00    /* - compare, single buffer mode */
+#define        TM6MDB_MODE_CMP_DOUBLE  0x40    /* - compare, double buffer mode */
+#define        TM6MDB_MODE_CAP_S_EDGE  0x80    /* - capture, single edge mode */
+#define        TM6MDB_MODE_CAP_D_EDGE  0xc0    /* - capture, double edge mode */
+#define TM6MDB_EDGE            0x20    /* compare B edge select */
+#define        TM6MDB_EDGE_FALLING     0x00    /* capture on falling edge */
+#define        TM6MDB_EDGE_RISING      0x20    /* capture on rising edge */
+#define        TM6MDB_CAPTURE_ENABLE   0x10    /* capture enable */
+
+#define        TM6CA                   __SYSREG(0xd40030c4, u16)   /* timer6 cmp/capture reg A */
+#define        TM6CB                   __SYSREG(0xd40030d4, u16)   /* timer6 cmp/capture reg B */
+#define        TM6BC                   __SYSREG(0xd40030a4, u16)   /* timer6 binary counter */
+
+#define TM6IRQ                 6       /* timer 6 IRQ */
+#define TM6AIRQ                        9       /* timer 6A IRQ */
+#define TM6BIRQ                        10      /* timer 6B IRQ */
+
+#define        TM6ICR                  GxICR(TM6IRQ)   /* timer 6 uflow intr ctrl reg */
+#define        TM6AICR                 GxICR(TM6AIRQ)  /* timer 6A intr control reg */
+#define        TM6BICR                 GxICR(TM6BIRQ)  /* timer 6B intr control reg */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_TIMER_REGS_H */
diff --git a/arch/mn10300/include/asm/timex.h b/arch/mn10300/include/asm/timex.h
new file mode 100644 (file)
index 0000000..8d031f9
--- /dev/null
@@ -0,0 +1,33 @@
+/* MN10300 Architecture time management specifications
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_TIMEX_H
+#define _ASM_TIMEX_H
+
+#include <asm/hardirq.h>
+#include <unit/timex.h>
+
+#define TICK_SIZE (tick_nsec / 1000)
+
+#define CLOCK_TICK_RATE 1193180 /* Underlying HZ - this should probably be set
+                                * to something appropriate, but what? */
+
+extern cycles_t cacheflush_time;
+
+#ifdef __KERNEL__
+
+static inline cycles_t get_cycles(void)
+{
+       return read_timestamp_counter();
+}
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_TIMEX_H */
diff --git a/arch/mn10300/include/asm/tlb.h b/arch/mn10300/include/asm/tlb.h
new file mode 100644 (file)
index 0000000..65d232b
--- /dev/null
@@ -0,0 +1,34 @@
+/* MN10300 TLB definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_TLB_H
+#define _ASM_TLB_H
+
+#include <asm/tlbflush.h>
+
+extern void check_pgt_cache(void);
+
+/*
+ * we don't need any special per-pte or per-vma handling...
+ */
+#define tlb_start_vma(tlb, vma)                                do { } while (0)
+#define tlb_end_vma(tlb, vma)                          do { } while (0)
+#define __tlb_remove_tlb_entry(tlb, ptep, address)     do { } while (0)
+
+/*
+ * .. because we flush the whole mm when it fills up
+ */
+#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
+
+/* for now, just use the generic stuff */
+#include <asm-generic/tlb.h>
+
+#endif /* _ASM_TLB_H */
diff --git a/arch/mn10300/include/asm/tlbflush.h b/arch/mn10300/include/asm/tlbflush.h
new file mode 100644 (file)
index 0000000..e023986
--- /dev/null
@@ -0,0 +1,80 @@
+/* MN10300 TLB flushing functions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_TLBFLUSH_H
+#define _ASM_TLBFLUSH_H
+
+#include <asm/processor.h>
+
+#define __flush_tlb()                                          \
+do {                                                           \
+       int w;                                                  \
+       __asm__ __volatile__                                    \
+               ("      mov %1,%0               \n"             \
+                "      or %2,%0                \n"             \
+                "      mov %0,%1               \n"             \
+                : "=d"(w)                                      \
+                : "m"(MMUCTR), "i"(MMUCTR_IIV|MMUCTR_DIV)      \
+                : "memory"                                     \
+                );                                             \
+} while (0)
+
+#define __flush_tlb_all() __flush_tlb()
+#define __flush_tlb_one(addr) __flush_tlb()
+
+
+/*
+ * TLB flushing:
+ *
+ *  - flush_tlb() flushes the current mm struct TLBs
+ *  - flush_tlb_all() flushes all processes TLBs
+ *  - flush_tlb_mm(mm) flushes the specified mm context TLB's
+ *  - flush_tlb_page(vma, vmaddr) flushes one page
+ *  - flush_tlb_range(mm, start, end) flushes a range of pages
+ *  - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
+ */
+#define flush_tlb_all()                                \
+do {                                           \
+       preempt_disable();                      \
+       __flush_tlb_all();                      \
+       preempt_enable();                       \
+} while (0)
+
+#define flush_tlb_mm(mm)                       \
+do {                                           \
+       preempt_disable();                      \
+       __flush_tlb_all();                      \
+       preempt_enable();                       \
+} while (0)
+
+#define flush_tlb_range(vma, start, end)                       \
+do {                                                           \
+       unsigned long __s __attribute__((unused)) = (start);    \
+       unsigned long __e __attribute__((unused)) = (end);      \
+       preempt_disable();                                      \
+       __flush_tlb_all();                                      \
+       preempt_enable();                                       \
+} while (0)
+
+
+#define __flush_tlb_global()                   flush_tlb_all()
+#define flush_tlb()                            flush_tlb_all()
+#define flush_tlb_kernel_range(start, end)                     \
+do {                                                           \
+       unsigned long __s __attribute__((unused)) = (start);    \
+       unsigned long __e __attribute__((unused)) = (end);      \
+       flush_tlb_all();                                        \
+} while (0)
+
+extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
+
+#define flush_tlb_pgtables(mm, start, end)     do {} while (0)
+
+#endif /* _ASM_TLBFLUSH_H */
diff --git a/arch/mn10300/include/asm/topology.h b/arch/mn10300/include/asm/topology.h
new file mode 100644 (file)
index 0000000..5428f33
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/topology.h>
diff --git a/arch/mn10300/include/asm/types.h b/arch/mn10300/include/asm/types.h
new file mode 100644 (file)
index 0000000..7b9f010
--- /dev/null
@@ -0,0 +1,38 @@
+/* MN10300 Basic type definitions
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_TYPES_H
+#define _ASM_TYPES_H
+
+#include <asm-generic/int-ll64.h>
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned short umode_t;
+
+#endif /* __ASSEMBLY__ */
+
+/*
+ * These aren't exported outside the kernel to avoid name space clashes
+ */
+#ifdef __KERNEL__
+
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
+/* Dma addresses are 32-bits wide.  */
+typedef u32 dma_addr_t;
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_TYPES_H */
diff --git a/arch/mn10300/include/asm/uaccess.h b/arch/mn10300/include/asm/uaccess.h
new file mode 100644 (file)
index 0000000..8a3a4dd
--- /dev/null
@@ -0,0 +1,490 @@
+/* MN10300 userspace access functions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_UACCESS_H
+#define _ASM_UACCESS_H
+
+/*
+ * User space memory access functions
+ */
+#include <linux/sched.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/errno.h>
+
+#define VERIFY_READ 0
+#define VERIFY_WRITE 1
+
+/*
+ * The fs value determines whether argument validity checking should be
+ * performed or not.  If get_fs() == USER_DS, checking is performed, with
+ * get_fs() == KERNEL_DS, checking is bypassed.
+ *
+ * For historical reasons, these macros are grossly misnamed.
+ */
+
+#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
+
+#define KERNEL_XDS     MAKE_MM_SEG(0xBFFFFFFF)
+#define KERNEL_DS      MAKE_MM_SEG(0x9FFFFFFF)
+#define USER_DS                MAKE_MM_SEG(TASK_SIZE)
+
+#define get_ds()       (KERNEL_DS)
+#define get_fs()       (current_thread_info()->addr_limit)
+#define set_fs(x)      (current_thread_info()->addr_limit = (x))
+#define __kernel_ds_p() (current_thread_info()->addr_limit.seg == 0x9FFFFFFF)
+
+#define segment_eq(a, b) ((a).seg == (b).seg)
+
+#define __addr_ok(addr) \
+       ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg))
+
+/*
+ * check that a range of addresses falls within the current address limit
+ */
+static inline int ___range_ok(unsigned long addr, unsigned int size)
+{
+       int flag = 1, tmp;
+
+       asm("   add     %3,%1   \n"     /* set C-flag if addr + size > 4Gb */
+           "   bcs     0f      \n"
+           "   cmp     %4,%1   \n"     /* jump if addr+size>limit (error) */
+           "   bhi     0f      \n"
+           "   clr     %0      \n"     /* mark okay */
+           "0:                 \n"
+           : "=r"(flag), "=&r"(tmp)
+           : "1"(addr), "ir"(size),
+             "r"(current_thread_info()->addr_limit.seg), "0"(flag)
+           : "cc"
+           );
+
+       return flag;
+}
+
+#define __range_ok(addr, size) ___range_ok((unsigned long)(addr), (u32)(size))
+
+#define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0)
+#define __access_ok(addr, size)     (__range_ok((addr), (size)) == 0)
+
+static inline int verify_area(int type, const void *addr, unsigned long size)
+{
+       return access_ok(type, addr, size) ? 0 : -EFAULT;
+}
+
+
+/*
+ * The exception table consists of pairs of addresses: the first is the
+ * address of an instruction that is allowed to fault, and the second is
+ * the address at which the program should continue.  No registers are
+ * modified, so it is entirely up to the continuation code to figure out
+ * what to do.
+ *
+ * All the routines below use bits of fixup code that are out of line
+ * with the main instruction path.  This means when everything is well,
+ * we don't even have to jump over them.  Further, they do not intrude
+ * on our cache or tlb entries.
+ */
+
+struct exception_table_entry
+{
+       unsigned long insn, fixup;
+};
+
+/* Returns 0 if exception not found and fixup otherwise.  */
+extern int fixup_exception(struct pt_regs *regs);
+
+#define put_user(x, ptr) __put_user_check((x), (ptr), sizeof(*(ptr)))
+#define get_user(x, ptr) __get_user_check((x), (ptr), sizeof(*(ptr)))
+
+/*
+ * The "__xxx" versions do not do address space checking, useful when
+ * doing multiple accesses to the same area (the user has to do the
+ * checks by hand with "access_ok()")
+ */
+#define __put_user(x, ptr) __put_user_nocheck((x), (ptr), sizeof(*(ptr)))
+#define __get_user(x, ptr) __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
+
+/*
+ * The "xxx_ret" versions return constant specified in third argument, if
+ * something bad happens. These macros can be optimized for the
+ * case of just returning from the function xxx_ret is used.
+ */
+
+#define put_user_ret(x, ptr, ret) \
+       ({ if (put_user((x), (ptr)))    return (ret); })
+#define get_user_ret(x, ptr, ret) \
+       ({ if (get_user((x), (ptr)))    return (ret); })
+#define __put_user_ret(x, ptr, ret) \
+       ({ if (__put_user((x), (ptr)))  return (ret); })
+#define __get_user_ret(x, ptr, ret) \
+       ({ if (__get_user((x), (ptr)))  return (ret); })
+
+struct __large_struct { unsigned long buf[100]; };
+#define __m(x) (*(struct __large_struct *)(x))
+
+#define __get_user_nocheck(x, ptr, size)       \
+({                                             \
+       __typeof(*(ptr)) __gu_val;              \
+       unsigned long __gu_addr;                \
+       int __gu_err;                           \
+       __gu_addr = (unsigned long) (ptr);      \
+       switch (size) {                         \
+       case 1:  __get_user_asm("bu"); break;   \
+       case 2:  __get_user_asm("hu"); break;   \
+       case 4:  __get_user_asm(""  ); break;   \
+       default: __get_user_unknown(); break;   \
+       }                                       \
+       x = (__typeof__(*(ptr))) __gu_val;      \
+       __gu_err;                               \
+})
+
+#define __get_user_check(x, ptr, size)                 \
+({                                                     \
+       __typeof__(*(ptr)) __gu_val;                    \
+       unsigned long __gu_addr;                        \
+       int __gu_err;                                   \
+       __gu_addr = (unsigned long) (ptr);              \
+       if (likely(__access_ok(__gu_addr,size))) {      \
+               switch (size) {                         \
+               case 1:  __get_user_asm("bu"); break;   \
+               case 2:  __get_user_asm("hu"); break;   \
+               case 4:  __get_user_asm(""  ); break;   \
+               default: __get_user_unknown(); break;   \
+               }                                       \
+       }                                               \
+       else {                                          \
+               __gu_err = -EFAULT;                     \
+               __gu_val = 0;                           \
+       }                                               \
+       x = (__typeof__(*(ptr))) __gu_val;              \
+       __gu_err;                                       \
+})
+
+#define __get_user_asm(INSN)                                   \
+({                                                             \
+       asm volatile(                                   \
+               "1:\n"                                          \
+               "       mov"INSN"       %2,%1\n"                \
+               "       mov             0,%0\n"                 \
+               "2:\n"                                          \
+               "       .section        .fixup,\"ax\"\n"        \
+               "3:\n\t"                                        \
+               "       mov             %3,%0\n"                \
+               "       jmp             2b\n"                   \
+               "       .previous\n"                            \
+               "       .section        __ex_table,\"a\"\n"     \
+               "       .balign         4\n"                    \
+               "       .long           1b, 3b\n"               \
+               "       .previous"                              \
+               : "=&r" (__gu_err), "=&r" (__gu_val)            \
+               : "m" (__m(__gu_addr)), "i" (-EFAULT));         \
+})
+
+extern int __get_user_unknown(void);
+
+#define __put_user_nocheck(x, ptr, size)                       \
+({                                                             \
+       union {                                                 \
+               __typeof__(*(ptr)) val;                         \
+               u32 bits[2];                                    \
+       } __pu_val;                                             \
+       unsigned long __pu_addr;                                \
+       int __pu_err;                                           \
+       __pu_val.val = (x);                                     \
+       __pu_addr = (unsigned long) (ptr);                      \
+       switch (size) {                                         \
+       case 1:  __put_user_asm("bu"); break;                   \
+       case 2:  __put_user_asm("hu"); break;                   \
+       case 4:  __put_user_asm(""  ); break;                   \
+       case 8:  __put_user_asm8();    break;                   \
+       default: __pu_err = __put_user_unknown(); break;        \
+       }                                                       \
+       __pu_err;                                               \
+})
+
+#define __put_user_check(x, ptr, size)                                 \
+({                                                                     \
+       union {                                                         \
+               __typeof__(*(ptr)) val;                                 \
+               u32 bits[2];                                            \
+       } __pu_val;                                                     \
+       unsigned long __pu_addr;                                        \
+       int __pu_err;                                                   \
+       __pu_val.val = (x);                                             \
+       __pu_addr = (unsigned long) (ptr);                              \
+       if (likely(__access_ok(__pu_addr, size))) {                     \
+               switch (size) {                                         \
+               case 1:  __put_user_asm("bu"); break;                   \
+               case 2:  __put_user_asm("hu"); break;                   \
+               case 4:  __put_user_asm(""  ); break;                   \
+               case 8:  __put_user_asm8();    break;                   \
+               default: __pu_err = __put_user_unknown(); break;        \
+               }                                                       \
+       }                                                               \
+       else {                                                          \
+               __pu_err = -EFAULT;                                     \
+       }                                                               \
+       __pu_err;                                                       \
+})
+
+#define __put_user_asm(INSN)                                   \
+({                                                             \
+       asm volatile(                                           \
+               "1:\n"                                          \
+               "       mov"INSN"       %1,%2\n"                \
+               "       mov             0,%0\n"                 \
+               "2:\n"                                          \
+               "       .section        .fixup,\"ax\"\n"        \
+               "3:\n"                                          \
+               "       mov             %3,%0\n"                \
+               "       jmp             2b\n"                   \
+               "       .previous\n"                            \
+               "       .section        __ex_table,\"a\"\n"     \
+               "       .balign         4\n"                    \
+               "       .long           1b, 3b\n"               \
+               "       .previous"                              \
+               : "=&r" (__pu_err)                              \
+               : "r" (__pu_val.val), "m" (__m(__pu_addr)),     \
+                 "i" (-EFAULT)                                 \
+               );                                              \
+})
+
+#define __put_user_asm8()                                              \
+({                                                                     \
+       asm volatile(                                                   \
+               "1:     mov             %1,%3           \n"             \
+               "2:     mov             %2,%4           \n"             \
+               "       mov             0,%0            \n"             \
+               "3:                                     \n"             \
+               "       .section        .fixup,\"ax\"   \n"             \
+               "4:                                     \n"             \
+               "       mov             %5,%0           \n"             \
+               "       jmp             3b              \n"             \
+               "       .previous                       \n"             \
+               "       .section        __ex_table,\"a\"\n"             \
+               "       .balign         4               \n"             \
+               "       .long           1b, 4b          \n"             \
+               "       .long           2b, 4b          \n"             \
+               "       .previous                       \n"             \
+               : "=&r" (__pu_err)                                      \
+               : "r" (__pu_val.bits[0]), "r" (__pu_val.bits[1]),       \
+                 "m" (__m(__pu_addr)), "m" (__m(__pu_addr+4)),         \
+                 "i" (-EFAULT)                                         \
+               );                                                      \
+})
+
+extern int __put_user_unknown(void);
+
+
+/*
+ * Copy To/From Userspace
+ */
+/* Generic arbitrary sized copy.  */
+#define __copy_user(to, from, size)                                    \
+do {                                                                   \
+       if (size) {                                                     \
+               void *__to = to;                                        \
+               const void *__from = from;                              \
+               int w;                                                  \
+               asm volatile(                                           \
+                       "0:     movbu   (%0),%3;\n"                     \
+                       "1:     movbu   %3,(%1);\n"                     \
+                       "       inc     %0;\n"                          \
+                       "       inc     %1;\n"                          \
+                       "       add     -1,%2;\n"                       \
+                       "       bne     0b;\n"                          \
+                       "2:\n"                                          \
+                       "       .section .fixup,\"ax\"\n"               \
+                       "3:     jmp     2b\n"                           \
+                       "       .previous\n"                            \
+                       "       .section __ex_table,\"a\"\n"            \
+                       "       .balign 4\n"                            \
+                       "       .long   0b,3b\n"                        \
+                       "       .long   1b,3b\n"                        \
+                       "       .previous\n"                            \
+                       : "=a"(__from), "=a"(__to), "=r"(size), "=&r"(w)\
+                       : "0"(__from), "1"(__to), "2"(size)             \
+                       : "memory");                                    \
+       }                                                               \
+} while (0)
+
+#define __copy_user_zeroing(to, from, size)                            \
+do {                                                                   \
+       if (size) {                                                     \
+               void *__to = to;                                        \
+               const void *__from = from;                              \
+               int w;                                                  \
+               asm volatile(                                           \
+                       "0:     movbu   (%0),%3;\n"                     \
+                       "1:     movbu   %3,(%1);\n"                     \
+                       "       inc     %0;\n"                          \
+                       "       inc     %1;\n"                          \
+                       "       add     -1,%2;\n"                       \
+                       "       bne     0b;\n"                          \
+                       "2:\n"                                          \
+                       "       .section .fixup,\"ax\"\n"               \
+                       "3:\n"                                          \
+                       "       mov     %2,%0\n"                        \
+                       "       clr     %3\n"                           \
+                       "4:     movbu   %3,(%1);\n"                     \
+                       "       inc     %1;\n"                          \
+                       "       add     -1,%2;\n"                       \
+                       "       bne     4b;\n"                          \
+                       "       mov     %0,%2\n"                        \
+                       "       jmp     2b\n"                           \
+                       "       .previous\n"                            \
+                       "       .section __ex_table,\"a\"\n"            \
+                       "       .balign 4\n"                            \
+                       "       .long   0b,3b\n"                        \
+                       "       .long   1b,3b\n"                        \
+                       "       .previous\n"                            \
+                       : "=a"(__from), "=a"(__to), "=r"(size), "=&r"(w)\
+                       : "0"(__from), "1"(__to), "2"(size)             \
+                       : "memory");                                    \
+       }                                                               \
+} while (0)
+
+/* We let the __ versions of copy_from/to_user inline, because they're often
+ * used in fast paths and have only a small space overhead.
+ */
+static inline
+unsigned long __generic_copy_from_user_nocheck(void *to, const void *from,
+                                              unsigned long n)
+{
+       __copy_user_zeroing(to, from, n);
+       return n;
+}
+
+static inline
+unsigned long __generic_copy_to_user_nocheck(void *to, const void *from,
+                                            unsigned long n)
+{
+       __copy_user(to, from, n);
+       return n;
+}
+
+
+#if 0
+#error don't use - these macros don't increment to & from pointers
+/* Optimize just a little bit when we know the size of the move. */
+#define __constant_copy_user(to, from, size)   \
+do {                                           \
+       asm volatile(                           \
+               "       mov %0,a0;\n"           \
+               "0:     movbu (%1),d3;\n"       \
+               "1:     movbu d3,(%2);\n"       \
+               "       add -1,a0;\n"           \
+               "       bne 0b;\n"              \
+               "2:;"                           \
+               ".section .fixup,\"ax\"\n"      \
+               "3:     jmp 2b\n"               \
+               ".previous\n"                   \
+               ".section __ex_table,\"a\"\n"   \
+               "       .balign 4\n"            \
+               "       .long 0b,3b\n"          \
+               "       .long 1b,3b\n"          \
+               ".previous"                     \
+               :                               \
+               : "d"(size), "d"(to), "d"(from) \
+               : "d3", "a0");                  \
+} while (0)
+
+/* Optimize just a little bit when we know the size of the move. */
+#define __constant_copy_user_zeroing(to, from, size)   \
+do {                                                   \
+       asm volatile(                                   \
+               "       mov %0,a0;\n"                   \
+               "0:     movbu (%1),d3;\n"               \
+               "1:     movbu d3,(%2);\n"               \
+               "       add -1,a0;\n"                   \
+               "       bne 0b;\n"                      \
+               "2:;"                                   \
+               ".section .fixup,\"ax\"\n"              \
+               "3:     jmp 2b\n"                       \
+               ".previous\n"                           \
+               ".section __ex_table,\"a\"\n"           \
+               "       .balign 4\n"                    \
+               "       .long 0b,3b\n"                  \
+               "       .long 1b,3b\n"                  \
+               ".previous"                             \
+               :                                       \
+               : "d"(size), "d"(to), "d"(from)         \
+               : "d3", "a0");                          \
+} while (0)
+
+static inline
+unsigned long __constant_copy_to_user(void *to, const void *from,
+                                     unsigned long n)
+{
+       if (access_ok(VERIFY_WRITE, to, n))
+               __constant_copy_user(to, from, n);
+       return n;
+}
+
+static inline
+unsigned long __constant_copy_from_user(void *to, const void *from,
+                                       unsigned long n)
+{
+       if (access_ok(VERIFY_READ, from, n))
+               __constant_copy_user_zeroing(to, from, n);
+       return n;
+}
+
+static inline
+unsigned long __constant_copy_to_user_nocheck(void *to, const void *from,
+                                             unsigned long n)
+{
+       __constant_copy_user(to, from, n);
+       return n;
+}
+
+static inline
+unsigned long __constant_copy_from_user_nocheck(void *to, const void *from,
+                                               unsigned long n)
+{
+       __constant_copy_user_zeroing(to, from, n);
+       return n;
+}
+#endif
+
+extern unsigned long __generic_copy_to_user(void __user *, const void *,
+                                           unsigned long);
+extern unsigned long __generic_copy_from_user(void *, const void __user *,
+                                             unsigned long);
+
+#define __copy_to_user_inatomic(to, from, n) \
+       __generic_copy_to_user_nocheck((to), (from), (n))
+#define __copy_from_user_inatomic(to, from, n) \
+       __generic_copy_from_user_nocheck((to), (from), (n))
+
+#define __copy_to_user(to, from, n)                    \
+({                                                     \
+       might_sleep();                                  \
+       __copy_to_user_inatomic((to), (from), (n));     \
+})
+
+#define __copy_from_user(to, from, n)                  \
+({                                                     \
+       might_sleep();                                  \
+       __copy_from_user_inatomic((to), (from), (n));   \
+})
+
+
+#define copy_to_user(to, from, n)   __generic_copy_to_user((to), (from), (n))
+#define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
+
+extern long strncpy_from_user(char *dst, const char __user *src, long count);
+extern long __strncpy_from_user(char *dst, const char __user *src, long count);
+extern long strnlen_user(const char __user *str, long n);
+#define strlen_user(str) strnlen_user(str, ~0UL >> 1)
+extern unsigned long clear_user(void __user *mem, unsigned long len);
+extern unsigned long __clear_user(void __user *mem, unsigned long len);
+
+#endif /* _ASM_UACCESS_H */
diff --git a/arch/mn10300/include/asm/ucontext.h b/arch/mn10300/include/asm/ucontext.h
new file mode 100644 (file)
index 0000000..fcab5c1
--- /dev/null
@@ -0,0 +1,22 @@
+/* MN10300 User context
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_UCONTEXT_H
+#define _ASM_UCONTEXT_H
+
+struct ucontext {
+       unsigned long     uc_flags;
+       struct ucontext  *uc_link;
+       stack_t           uc_stack;
+       struct sigcontext uc_mcontext;
+       sigset_t          uc_sigmask;   /* mask last for extensibility */
+};
+
+#endif /* _ASM_UCONTEXT_H */
diff --git a/arch/mn10300/include/asm/unaligned.h b/arch/mn10300/include/asm/unaligned.h
new file mode 100644 (file)
index 0000000..0df6713
--- /dev/null
@@ -0,0 +1,20 @@
+/* MN10300 Unaligned memory access handling
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_MN10300_UNALIGNED_H
+#define _ASM_MN10300_UNALIGNED_H
+
+#include <linux/unaligned/access_ok.h>
+#include <linux/unaligned/generic.h>
+
+#define get_unaligned  __get_unaligned_le
+#define put_unaligned  __put_unaligned_le
+
+#endif /* _ASM_MN10300_UNALIGNED_H */
diff --git a/arch/mn10300/include/asm/unistd.h b/arch/mn10300/include/asm/unistd.h
new file mode 100644 (file)
index 0000000..543a4f9
--- /dev/null
@@ -0,0 +1,390 @@
+/* MN10300 System call number list
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_UNISTD_H
+#define _ASM_UNISTD_H
+
+#define __NR_restart_syscall      0
+#define __NR_exit                1
+#define __NR_fork                2
+#define __NR_read                3
+#define __NR_write               4
+#define __NR_open                5
+#define __NR_close               6
+#define __NR_waitpid             7
+#define __NR_creat               8
+#define __NR_link                9
+#define __NR_unlink             10
+#define __NR_execve             11
+#define __NR_chdir              12
+#define __NR_time               13
+#define __NR_mknod              14
+#define __NR_chmod              15
+#define __NR_lchown             16
+#define __NR_break              17
+#define __NR_oldstat            18
+#define __NR_lseek              19
+#define __NR_getpid             20
+#define __NR_mount              21
+#define __NR_umount             22
+#define __NR_setuid             23
+#define __NR_getuid             24
+#define __NR_stime              25
+#define __NR_ptrace             26
+#define __NR_alarm              27
+#define __NR_oldfstat           28
+#define __NR_pause              29
+#define __NR_utime              30
+#define __NR_stty               31
+#define __NR_gtty               32
+#define __NR_access             33
+#define __NR_nice               34
+#define __NR_ftime              35
+#define __NR_sync               36
+#define __NR_kill               37
+#define __NR_rename             38
+#define __NR_mkdir              39
+#define __NR_rmdir              40
+#define __NR_dup                41
+#define __NR_pipe               42
+#define __NR_times              43
+#define __NR_prof               44
+#define __NR_brk                45
+#define __NR_setgid             46
+#define __NR_getgid             47
+#define __NR_signal             48
+#define __NR_geteuid            49
+#define __NR_getegid            50
+#define __NR_acct               51
+#define __NR_umount2            52
+#define __NR_lock               53
+#define __NR_ioctl              54
+#define __NR_fcntl              55
+#define __NR_mpx                56
+#define __NR_setpgid            57
+#define __NR_ulimit             58
+#define __NR_oldolduname        59
+#define __NR_umask              60
+#define __NR_chroot             61
+#define __NR_ustat              62
+#define __NR_dup2               63
+#define __NR_getppid            64
+#define __NR_getpgrp            65
+#define __NR_setsid             66
+#define __NR_sigaction          67
+#define __NR_sgetmask           68
+#define __NR_ssetmask           69
+#define __NR_setreuid           70
+#define __NR_setregid           71
+#define __NR_sigsuspend                 72
+#define __NR_sigpending                 73
+#define __NR_sethostname        74
+#define __NR_setrlimit          75
+#define __NR_getrlimit          76     /* Back compatible 2Gig limited rlimit */
+#define __NR_getrusage          77
+#define __NR_gettimeofday       78
+#define __NR_settimeofday       79
+#define __NR_getgroups          80
+#define __NR_setgroups          81
+#define __NR_select             82
+#define __NR_symlink            83
+#define __NR_oldlstat           84
+#define __NR_readlink           85
+#define __NR_uselib             86
+#define __NR_swapon             87
+#define __NR_reboot             88
+#define __NR_readdir            89
+#define __NR_mmap               90
+#define __NR_munmap             91
+#define __NR_truncate           92
+#define __NR_ftruncate          93
+#define __NR_fchmod             94
+#define __NR_fchown             95
+#define __NR_getpriority        96
+#define __NR_setpriority        97
+#define __NR_profil             98
+#define __NR_statfs             99
+#define __NR_fstatfs           100
+#define __NR_ioperm            101
+#define __NR_socketcall                102
+#define __NR_syslog            103
+#define __NR_setitimer         104
+#define __NR_getitimer         105
+#define __NR_stat              106
+#define __NR_lstat             107
+#define __NR_fstat             108
+#define __NR_olduname          109
+#define __NR_iopl              110
+#define __NR_vhangup           111
+#define __NR_idle              112
+#define __NR_vm86old           113
+#define __NR_wait4             114
+#define __NR_swapoff           115
+#define __NR_sysinfo           116
+#define __NR_ipc               117
+#define __NR_fsync             118
+#define __NR_sigreturn         119
+#define __NR_clone             120
+#define __NR_setdomainname     121
+#define __NR_uname             122
+#define __NR_modify_ldt                123
+#define __NR_adjtimex          124
+#define __NR_mprotect          125
+#define __NR_sigprocmask       126
+#define __NR_create_module     127
+#define __NR_init_module       128
+#define __NR_delete_module     129
+#define __NR_get_kernel_syms   130
+#define __NR_quotactl          131
+#define __NR_getpgid           132
+#define __NR_fchdir            133
+#define __NR_bdflush           134
+#define __NR_sysfs             135
+#define __NR_personality       136
+#define __NR_afs_syscall       137 /* Syscall for Andrew File System */
+#define __NR_setfsuid          138
+#define __NR_setfsgid          139
+#define __NR__llseek           140
+#define __NR_getdents          141
+#define __NR__newselect                142
+#define __NR_flock             143
+#define __NR_msync             144
+#define __NR_readv             145
+#define __NR_writev            146
+#define __NR_getsid            147
+#define __NR_fdatasync         148
+#define __NR__sysctl           149
+#define __NR_mlock             150
+#define __NR_munlock           151
+#define __NR_mlockall          152
+#define __NR_munlockall                153
+#define __NR_sched_setparam            154
+#define __NR_sched_getparam            155
+#define __NR_sched_setscheduler                156
+#define __NR_sched_getscheduler                157
+#define __NR_sched_yield               158
+#define __NR_sched_get_priority_max    159
+#define __NR_sched_get_priority_min    160
+#define __NR_sched_rr_get_interval     161
+#define __NR_nanosleep         162
+#define __NR_mremap            163
+#define __NR_setresuid         164
+#define __NR_getresuid         165
+#define __NR_vm86              166
+#define __NR_query_module      167
+#define __NR_poll              168
+#define __NR_nfsservctl                169
+#define __NR_setresgid         170
+#define __NR_getresgid         171
+#define __NR_prctl              172
+#define __NR_rt_sigreturn      173
+#define __NR_rt_sigaction      174
+#define __NR_rt_sigprocmask    175
+#define __NR_rt_sigpending     176
+#define __NR_rt_sigtimedwait   177
+#define __NR_rt_sigqueueinfo   178
+#define __NR_rt_sigsuspend     179
+#define __NR_pread64           180
+#define __NR_pwrite64          181
+#define __NR_chown             182
+#define __NR_getcwd            183
+#define __NR_capget            184
+#define __NR_capset            185
+#define __NR_sigaltstack       186
+#define __NR_sendfile          187
+#define __NR_getpmsg           188     /* some people actually want streams */
+#define __NR_putpmsg           189     /* some people actually want streams */
+#define __NR_vfork             190
+#define __NR_ugetrlimit                191     /* SuS compliant getrlimit */
+#define __NR_mmap2             192
+#define __NR_truncate64                193
+#define __NR_ftruncate64       194
+#define __NR_stat64            195
+#define __NR_lstat64           196
+#define __NR_fstat64           197
+#define __NR_lchown32          198
+#define __NR_getuid32          199
+#define __NR_getgid32          200
+#define __NR_geteuid32         201
+#define __NR_getegid32         202
+#define __NR_setreuid32                203
+#define __NR_setregid32                204
+#define __NR_getgroups32       205
+#define __NR_setgroups32       206
+#define __NR_fchown32          207
+#define __NR_setresuid32       208
+#define __NR_getresuid32       209
+#define __NR_setresgid32       210
+#define __NR_getresgid32       211
+#define __NR_chown32           212
+#define __NR_setuid32          213
+#define __NR_setgid32          214
+#define __NR_setfsuid32                215
+#define __NR_setfsgid32                216
+#define __NR_pivot_root                217
+#define __NR_mincore           218
+#define __NR_madvise           219
+#define __NR_madvise1          219     /* delete when C lib stub is removed */
+#define __NR_getdents64                220
+#define __NR_fcntl64           221
+/* 223 is unused */
+#define __NR_gettid            224
+#define __NR_readahead         225
+#define __NR_setxattr          226
+#define __NR_lsetxattr         227
+#define __NR_fsetxattr         228
+#define __NR_getxattr          229
+#define __NR_lgetxattr         230
+#define __NR_fgetxattr         231
+#define __NR_listxattr         232
+#define __NR_llistxattr                233
+#define __NR_flistxattr                234
+#define __NR_removexattr       235
+#define __NR_lremovexattr      236
+#define __NR_fremovexattr      237
+#define __NR_tkill             238
+#define __NR_sendfile64                239
+#define __NR_futex             240
+#define __NR_sched_setaffinity 241
+#define __NR_sched_getaffinity 242
+#define __NR_set_thread_area   243
+#define __NR_get_thread_area   244
+#define __NR_io_setup          245
+#define __NR_io_destroy                246
+#define __NR_io_getevents      247
+#define __NR_io_submit         248
+#define __NR_io_cancel         249
+#define __NR_fadvise64         250
+
+#define __NR_exit_group                252
+#define __NR_lookup_dcookie    253
+#define __NR_epoll_create      254
+#define __NR_epoll_ctl         255
+#define __NR_epoll_wait                256
+#define __NR_remap_file_pages  257
+#define __NR_set_tid_address   258
+#define __NR_timer_create      259
+#define __NR_timer_settime     (__NR_timer_create+1)
+#define __NR_timer_gettime     (__NR_timer_create+2)
+#define __NR_timer_getoverrun  (__NR_timer_create+3)
+#define __NR_timer_delete      (__NR_timer_create+4)
+#define __NR_clock_settime     (__NR_timer_create+5)
+#define __NR_clock_gettime     (__NR_timer_create+6)
+#define __NR_clock_getres      (__NR_timer_create+7)
+#define __NR_clock_nanosleep   (__NR_timer_create+8)
+#define __NR_statfs64          268
+#define __NR_fstatfs64         269
+#define __NR_tgkill            270
+#define __NR_utimes            271
+#define __NR_fadvise64_64      272
+#define __NR_vserver           273
+#define __NR_mbind             274
+#define __NR_get_mempolicy     275
+#define __NR_set_mempolicy     276
+#define __NR_mq_open           277
+#define __NR_mq_unlink         (__NR_mq_open+1)
+#define __NR_mq_timedsend      (__NR_mq_open+2)
+#define __NR_mq_timedreceive   (__NR_mq_open+3)
+#define __NR_mq_notify         (__NR_mq_open+4)
+#define __NR_mq_getsetattr     (__NR_mq_open+5)
+#define __NR_kexec_load                283
+#define __NR_waitid            284
+#define __NR_add_key           286
+#define __NR_request_key       287
+#define __NR_keyctl            288
+#define __NR_cacheflush                289
+#define __NR_ioprio_set                290
+#define __NR_ioprio_get                291
+#define __NR_inotify_init      292
+#define __NR_inotify_add_watch 293
+#define __NR_inotify_rm_watch  294
+#define __NR_migrate_pages     295
+#define __NR_openat            296
+#define __NR_mkdirat           297
+#define __NR_mknodat           298
+#define __NR_fchownat          299
+#define __NR_futimesat         300
+#define __NR_fstatat64         301
+#define __NR_unlinkat          302
+#define __NR_renameat          303
+#define __NR_linkat            304
+#define __NR_symlinkat         305
+#define __NR_readlinkat                306
+#define __NR_fchmodat          307
+#define __NR_faccessat         308
+#define __NR_pselect6          309
+#define __NR_ppoll             310
+#define __NR_unshare           311
+#define __NR_set_robust_list   312
+#define __NR_get_robust_list   313
+#define __NR_splice            314
+#define __NR_sync_file_range   315
+#define __NR_tee               316
+#define __NR_vmsplice          317
+#define __NR_move_pages                318
+#define __NR_getcpu            319
+#define __NR_epoll_pwait       320
+#define __NR_utimensat         321
+#define __NR_signalfd          322
+#define __NR_timerfd_create    323
+#define __NR_eventfd           324
+#define __NR_fallocate         325
+#define __NR_timerfd_settime   326
+#define __NR_timerfd_gettime   327
+#define __NR_signalfd4         328
+#define __NR_eventfd2          329
+#define __NR_epoll_create1     330
+#define __NR_dup3              331
+#define __NR_pipe2             332
+#define __NR_inotify_init1     333
+
+#ifdef __KERNEL__
+
+#define NR_syscalls 326
+
+/*
+ * specify the deprecated syscalls we want to support on this arch
+ */
+#define __ARCH_WANT_IPC_PARSE_VERSION
+#define __ARCH_WANT_OLD_READDIR
+#define __ARCH_WANT_OLD_STAT
+#define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYS_ALARM
+#define __ARCH_WANT_SYS_GETHOSTNAME
+#define __ARCH_WANT_SYS_PAUSE
+#define __ARCH_WANT_SYS_SGETMASK
+#define __ARCH_WANT_SYS_SIGNAL
+#define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_SYS_UTIME
+#define __ARCH_WANT_SYS_WAITPID
+#define __ARCH_WANT_SYS_SOCKETCALL
+#define __ARCH_WANT_SYS_FADVISE64
+#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
+#define __ARCH_WANT_SYS_NICE
+#define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLDUMOUNT
+#define __ARCH_WANT_SYS_SIGPENDING
+#define __ARCH_WANT_SYS_SIGPROCMASK
+#define __ARCH_WANT_SYS_RT_SIGACTION
+#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+
+/*
+ * "Conditional" syscalls
+ *
+ * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
+ * but it doesn't work on all toolchains, so we just do it by hand
+ */
+#ifndef cond_syscall
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#endif
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_UNISTD_H */
diff --git a/arch/mn10300/include/asm/user.h b/arch/mn10300/include/asm/user.h
new file mode 100644 (file)
index 0000000..e119390
--- /dev/null
@@ -0,0 +1,53 @@
+/* MN10300 User process data
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_USER_H
+#define _ASM_USER_H
+
+#include <asm/page.h>
+#include <linux/ptrace.h>
+
+#ifndef __ASSEMBLY__
+/*
+ * When the kernel dumps core, it starts by dumping the user struct - this will
+ * be used by gdb to figure out where the data and stack segments are within
+ * the file, and what virtual addresses to use.
+ */
+struct user {
+       /* We start with the registers, to mimic the way that "memory" is
+        * returned from the ptrace(3,...) function.
+        */
+       struct pt_regs regs;            /* Where the registers are actually stored */
+
+       /* The rest of this junk is to help gdb figure out what goes where */
+       unsigned long int u_tsize;      /* Text segment size (pages). */
+       unsigned long int u_dsize;      /* Data segment size (pages). */
+       unsigned long int u_ssize;      /* Stack segment size (pages). */
+       unsigned long start_code;       /* Starting virtual address of text. */
+       unsigned long start_stack;      /* Starting virtual address of stack area.
+                                          This is actually the bottom of the stack,
+                                          the top of the stack is always found in the
+                                          esp register.  */
+       long int signal;                /* Signal that caused the core dump. */
+       int reserved;                   /* No longer used */
+       struct user_pt_regs *u_ar0;     /* Used by gdb to help find the values for */
+
+       /* the registers */
+       unsigned long magic;            /* To uniquely identify a core file */
+       char u_comm[32];                /* User command that was responsible */
+};
+#endif
+
+#define NBPG PAGE_SIZE
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR   +(u.start_code)
+#define HOST_STACK_END_ADDR    +(u.start_stack + u.u_ssize * NBPG)
+
+#endif /* _ASM_USER_H */
diff --git a/arch/mn10300/include/asm/vga.h b/arch/mn10300/include/asm/vga.h
new file mode 100644 (file)
index 0000000..0163e50
--- /dev/null
@@ -0,0 +1,17 @@
+/* MN10300 VGA register definitions
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_VGA_H
+#define _ASM_VGA_H
+
+
+
+#endif /* _ASM_VGA_H */
diff --git a/arch/mn10300/include/asm/xor.h b/arch/mn10300/include/asm/xor.h
new file mode 100644 (file)
index 0000000..c82eb12
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/xor.h>
index ceeaaaa..34ab5a2 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/intctl-regs.h>
 #include <asm/busctl-regs.h>
 #include <asm/timer-regs.h>
-#include <asm/unit/leds.h>
+#include <unit/leds.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/errno.h>
index c68dcd0..4998b24 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/thread_info.h>
 #include <asm/frame.inc>
 #include <asm/intctl-regs.h>
-#include <asm/unit/serial.h>
+#include <unit/serial.h>
 
        .text
 
index 11584c5..ae663dc 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/gdb-stub.h>
 #include <asm/exceptions.h>
 #include <asm/serial-regs.h>
-#include <asm/unit/serial.h>
+#include <unit/serial.h>
 
 /*
  * initialise the GDB stub
index 677c787..060b7cc 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/cpu-regs.h>
 #include <asm/frame.inc>
 #include <asm/intctl-regs.h>
-#include <asm/unit/serial.h>
+#include <unit/serial.h>
 #include "mn10300-serial.h"
 
        .text
index e94c25e..a560bbc 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/system.h>
 #include <asm/gdb-stub.h>
 #include <asm/exceptions.h>
-#include <asm/unit/clock.h>
+#include <unit/clock.h>
 #include "mn10300-serial.h"
 
 #if defined(CONFIG_GDBSTUB_ON_TTYSM0)
index 0ea7482..41b1170 100644 (file)
 #include <asm/cacheflush.h>
 #include <asm/serial-regs.h>
 #include <asm/busctl-regs.h>
-#include <asm/unit/leds.h>
-#include <asm/unit/serial.h>
+#include <unit/leds.h>
+#include <unit/serial.h>
 
 /* define to use F7F7 rather than FF which is subverted by JTAG debugger */
 #undef GDBSTUB_USE_F7F7_AS_BREAKPOINT
index 606bd8c..8a8309f 100644 (file)
@@ -17,7 +17,7 @@
 #include <asm/pgtable.h>
 #include <asm/frame.inc>
 #include <asm/param.h>
-#include <asm/unit/serial.h>
+#include <unit/serial.h>
 
        .section .text.head,"ax"
 
index 50fdb5c..4c3c58e 100644 (file)
@@ -140,7 +140,7 @@ void __init init_IRQ(void)
        int irq;
 
        for (irq = 0; irq < NR_IRQS; irq++)
-               if (irq_desc[irq].chip == &no_irq_type)
+               if (irq_desc[irq].chip == &no_irq_chip)
                        /* due to the PIC latching interrupt requests, even
                         * when the IRQ is disabled, IRQ_PENDING is superfluous
                         * and we can use handle_level_irq() for edge-triggered
index ef3f4c1..2244853 100644 (file)
@@ -18,8 +18,8 @@
 #include <asm/cpu-regs.h>
 #include <asm/frame.inc>
 #include <asm/timer-regs.h>
-#include <asm/proc/cache.h>
-#include <asm/unit/timex.h>
+#include <proc/cache.h>
+#include <unit/timex.h>
 #include "mn10300-serial.h"
 
 #define        SCxCTR  0x00
index 59b9c4b..2fd5966 100644 (file)
@@ -41,7 +41,7 @@ static const char serial_revdate[] = "2007-11-06";
 #include <asm/irq.h>
 #include <asm/bitops.h>
 #include <asm/serial-regs.h>
-#include <asm/unit/timex.h>
+#include <unit/timex.h>
 #include "mn10300-serial.h"
 
 static inline __attribute__((format(printf, 1, 2)))
index 2e370d8..f362d9d 100644 (file)
@@ -25,7 +25,7 @@
 #include <asm/div64.h>
 #include <asm/smp.h>
 #include <asm/gdb-stub.h>
-#include <asm/proc/clock.h>
+#include <proc/clock.h>
 
 static DEFINE_SPINLOCK(watchdog_print_lock);
 static unsigned int watchdog;
index e1d88ab..71414e1 100644 (file)
@@ -30,7 +30,7 @@
 #include <asm/setup.h>
 #include <asm/io.h>
 #include <asm/smp.h>
-#include <asm/proc/proc.h>
+#include <proc/proc.h>
 #include <asm/busctl-regs.h>
 #include <asm/fpu.h>
 #include <asm/sections.h>
index fcb9a03..681ad8c 100644 (file)
@@ -37,7 +37,7 @@
 #include <asm/cacheflush.h>
 #include <asm/cpu-regs.h>
 #include <asm/busctl-regs.h>
-#include <asm/unit/leds.h>
+#include <unit/leds.h>
 #include <asm/fpu.h>
 #include <asm/gdb-stub.h>
 #include <asm/sections.h>
diff --git a/arch/mn10300/oprofile/Kconfig b/arch/mn10300/oprofile/Kconfig
deleted file mode 100644 (file)
index 19d3773..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-menu "Profiling support"
-       depends on EXPERIMENTAL
-
-config PROFILING
-       bool "Profiling support (EXPERIMENTAL)"
-       help
-         Say Y here to enable the extended profiling support mechanisms used
-         by profilers such as OProfile.
-
-
-config OPROFILE
-       tristate "OProfile system profiling (EXPERIMENTAL)"
-       depends on PROFILING
-       help
-         OProfile is a profiling system capable of profiling the
-         whole system, include the kernel, kernel modules, libraries,
-         and applications.
-
-         If unsure, say N.
-
-endmenu
-
diff --git a/arch/mn10300/proc-mn103e010/include/proc/cache.h b/arch/mn10300/proc-mn103e010/include/proc/cache.h
new file mode 100644 (file)
index 0000000..bdc1f9a
--- /dev/null
@@ -0,0 +1,33 @@
+/* MN103E010 Cache specification
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PROC_CACHE_H
+#define _ASM_PROC_CACHE_H
+
+/* L1 cache */
+
+#define L1_CACHE_NWAYS         4       /* number of ways in caches */
+#define L1_CACHE_NENTRIES      256     /* number of entries in each way */
+#define L1_CACHE_BYTES         16      /* bytes per entry */
+#define L1_CACHE_SHIFT         4       /* shift for bytes per entry */
+#define L1_CACHE_WAYDISP       0x1000  /* displacement of one way from the next */
+
+#define L1_CACHE_TAG_VALID     0x00000001      /* cache tag valid bit */
+#define L1_CACHE_TAG_DIRTY     0x00000008      /* data cache tag dirty bit */
+#define L1_CACHE_TAG_ENTRY     0x00000ff0      /* cache tag entry address mask */
+#define L1_CACHE_TAG_ADDRESS   0xfffff000      /* cache tag line address mask */
+
+/*
+ * specification of the interval between interrupt checking intervals whilst
+ * managing the cache with the interrupts disabled
+ */
+#define MN10300_DCACHE_INV_RANGE_INTR_LOG2_INTERVAL    4
+
+#endif /* _ASM_PROC_CACHE_H */
diff --git a/arch/mn10300/proc-mn103e010/include/proc/clock.h b/arch/mn10300/proc-mn103e010/include/proc/clock.h
new file mode 100644 (file)
index 0000000..aa23e14
--- /dev/null
@@ -0,0 +1,18 @@
+/* MN103E010-specific clocks
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_PROC_CLOCK_H
+#define _ASM_PROC_CLOCK_H
+
+#include <unit/clock.h>
+
+#define MN10300_WDCLK          MN10300_IOCLK
+
+#endif /* _ASM_PROC_CLOCK_H */
diff --git a/arch/mn10300/proc-mn103e010/include/proc/irq.h b/arch/mn10300/proc-mn103e010/include/proc/irq.h
new file mode 100644 (file)
index 0000000..aa6ee8f
--- /dev/null
@@ -0,0 +1,34 @@
+/* MN103E010 On-board interrupt controller numbers
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_PROC_IRQ_H
+#define _ASM_PROC_IRQ_H
+
+#ifdef __KERNEL__
+
+#define GxICR_NUM_IRQS         42
+
+#define GxICR_NUM_XIRQS                8
+
+#define XIRQ0          34
+#define XIRQ1          35
+#define XIRQ2          36
+#define XIRQ3          37
+#define XIRQ4          38
+#define XIRQ5          39
+#define XIRQ6          40
+#define XIRQ7          41
+
+#define XIRQ2IRQ(num)  (XIRQ0 + num)
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_PROC_IRQ_H */
diff --git a/arch/mn10300/proc-mn103e010/include/proc/proc.h b/arch/mn10300/proc-mn103e010/include/proc/proc.h
new file mode 100644 (file)
index 0000000..22a2b93
--- /dev/null
@@ -0,0 +1,18 @@
+/* MN103E010 Processor description
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_PROC_PROC_H
+#define _ASM_PROC_PROC_H
+
+#define PROCESSOR_VENDOR_NAME  "Matsushita"
+#define PROCESSOR_MODEL_NAME   "mn103e010"
+
+#endif /* _ASM_PROC_PROC_H */
diff --git a/arch/mn10300/unit-asb2303/include/unit/clock.h b/arch/mn10300/unit-asb2303/include/unit/clock.h
new file mode 100644 (file)
index 0000000..8b450e9
--- /dev/null
@@ -0,0 +1,45 @@
+/* ASB2303-specific clocks
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_UNIT_CLOCK_H
+#define _ASM_UNIT_CLOCK_H
+
+#ifndef __ASSEMBLY__
+
+#ifdef CONFIG_MN10300_RTC
+
+extern unsigned long mn10300_ioclk;    /* IOCLK (crystal speed) in HZ */
+extern unsigned long mn10300_iobclk;
+extern unsigned long mn10300_tsc_per_HZ;
+
+#define MN10300_IOCLK          ((unsigned long)mn10300_ioclk)
+/* If this processors has a another clock, uncomment the below. */
+/* #define MN10300_IOBCLK      ((unsigned long)mn10300_iobclk) */
+
+#else /* !CONFIG_MN10300_RTC */
+
+#define MN10300_IOCLK          33333333UL
+/* #define MN10300_IOBCLK      66666666UL */
+
+#endif /* !CONFIG_MN10300_RTC */
+
+#define MN10300_JCCLK          MN10300_IOCLK
+#define MN10300_TSCCLK         MN10300_IOCLK
+
+#ifdef CONFIG_MN10300_RTC
+#define MN10300_TSC_PER_HZ     ((unsigned long)mn10300_tsc_per_HZ)
+#else /* !CONFIG_MN10300_RTC */
+#define MN10300_TSC_PER_HZ     (MN10300_TSCCLK/HZ)
+#endif /* !CONFIG_MN10300_RTC */
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_UNIT_CLOCK_H */
diff --git a/arch/mn10300/unit-asb2303/include/unit/leds.h b/arch/mn10300/unit-asb2303/include/unit/leds.h
new file mode 100644 (file)
index 0000000..3a7543e
--- /dev/null
@@ -0,0 +1,43 @@
+/* ASB2303-specific LEDs
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_UNIT_LEDS_H
+#define _ASM_UNIT_LEDS_H
+
+#include <asm/pio-regs.h>
+#include <asm/cpu-regs.h>
+#include <asm/exceptions.h>
+
+#define ASB2303_GPIO0DEF       __SYSREG(0xDB000000, u32)
+#define ASB2303_7SEGLEDS       __SYSREG(0xDB000008, u32)
+
+/*
+ * use the 7-segment LEDs to indicate states
+ */
+
+/* flip the 7-segment LEDs between "G" and "-" */
+#define mn10300_set_gdbleds(ONOFF)                     \
+do {                                                   \
+       ASB2303_7SEGLEDS = (ONOFF) ? 0x85 : 0x7f;       \
+} while (0)
+
+/* indicate double-fault by displaying "d" on the LEDs */
+#define mn10300_set_dbfleds                    \
+       mov     0x43,d0                 ;       \
+       movbu   d0,(ASB2303_7SEGLEDS)
+
+#ifndef __ASSEMBLY__
+extern void peripheral_leds_display_exception(enum exception_code code);
+extern void peripheral_leds_led_chase(void);
+extern void debug_to_serial(const char *p, int n);
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_UNIT_LEDS_H */
diff --git a/arch/mn10300/unit-asb2303/include/unit/serial.h b/arch/mn10300/unit-asb2303/include/unit/serial.h
new file mode 100644 (file)
index 0000000..047566c
--- /dev/null
@@ -0,0 +1,136 @@
+/* ASB2303-specific 8250 serial ports
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_UNIT_SERIAL_H
+#define _ASM_UNIT_SERIAL_H
+
+#include <asm/cpu-regs.h>
+#include <proc/irq.h>
+#include <linux/serial_reg.h>
+
+#define SERIAL_PORT0_BASE_ADDRESS      0xA6FB0000
+#define SERIAL_PORT1_BASE_ADDRESS      0xA6FC0000
+
+#define SERIAL_IRQ     XIRQ0   /* Dual serial (PC16552)        (Hi) */
+
+/*
+ * dispose of the /dev/ttyS0 and /dev/ttyS1 serial ports
+ */
+#ifndef CONFIG_GDBSTUB_ON_TTYSx
+
+#define SERIAL_PORT_DFNS                                               \
+       {                                                               \
+       .baud_base              = BASE_BAUD,                            \
+       .irq                    = SERIAL_IRQ,                           \
+       .flags                  = STD_COM_FLAGS,                        \
+       .iomem_base             = (u8 *) SERIAL_PORT0_BASE_ADDRESS,     \
+       .iomem_reg_shift        = 2,                                    \
+       .io_type                = SERIAL_IO_MEM,                        \
+       },                                                              \
+       {                                                               \
+       .baud_base              = BASE_BAUD,                            \
+       .irq                    = SERIAL_IRQ,                           \
+       .flags                  = STD_COM_FLAGS,                        \
+       .iomem_base             = (u8 *) SERIAL_PORT1_BASE_ADDRESS,     \
+       .iomem_reg_shift        = 2,                                    \
+       .io_type                = SERIAL_IO_MEM,                        \
+       },
+
+#ifndef __ASSEMBLY__
+
+static inline void __debug_to_serial(const char *p, int n)
+{
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#else /* CONFIG_GDBSTUB_ON_TTYSx */
+
+#define SERIAL_PORT_DFNS /* both stolen by gdb-stub because they share an IRQ */
+
+#if defined(CONFIG_GDBSTUB_ON_TTYS0)
+#define GDBPORT_SERIAL_RX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_RX  * 4, u8)
+#define GDBPORT_SERIAL_TX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_TX  * 4, u8)
+#define GDBPORT_SERIAL_DLL     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLL * 4, u8)
+#define GDBPORT_SERIAL_DLM     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLM * 4, u8)
+#define GDBPORT_SERIAL_IER     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IER * 4, u8)
+#define GDBPORT_SERIAL_IIR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IIR * 4, u8)
+#define GDBPORT_SERIAL_FCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_FCR * 4, u8)
+#define GDBPORT_SERIAL_LCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LCR * 4, u8)
+#define GDBPORT_SERIAL_MCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MCR * 4, u8)
+#define GDBPORT_SERIAL_LSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LSR * 4, u8)
+#define GDBPORT_SERIAL_MSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MSR * 4, u8)
+#define GDBPORT_SERIAL_SCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_SCR * 4, u8)
+#define GDBPORT_SERIAL_IRQ     SERIAL_IRQ
+
+#elif defined(CONFIG_GDBSTUB_ON_TTYS1)
+#define GDBPORT_SERIAL_RX      __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_RX  * 4, u8)
+#define GDBPORT_SERIAL_TX      __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_TX  * 4, u8)
+#define GDBPORT_SERIAL_DLL     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_DLL * 4, u8)
+#define GDBPORT_SERIAL_DLM     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_DLM * 4, u8)
+#define GDBPORT_SERIAL_IER     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_IER * 4, u8)
+#define GDBPORT_SERIAL_IIR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_IIR * 4, u8)
+#define GDBPORT_SERIAL_FCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_FCR * 4, u8)
+#define GDBPORT_SERIAL_LCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_LCR * 4, u8)
+#define GDBPORT_SERIAL_MCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_MCR * 4, u8)
+#define GDBPORT_SERIAL_LSR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_LSR * 4, u8)
+#define GDBPORT_SERIAL_MSR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_MSR * 4, u8)
+#define GDBPORT_SERIAL_SCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_SCR * 4, u8)
+#define GDBPORT_SERIAL_IRQ     SERIAL_IRQ
+#endif
+
+#ifndef __ASSEMBLY__
+
+#define LSR_WAIT_FOR(STATE)                                    \
+do {                                                           \
+       while (!(GDBPORT_SERIAL_LSR & UART_LSR_##STATE)) {}     \
+} while (0)
+#define FLOWCTL_WAIT_FOR(LINE)                                 \
+do {                                                           \
+       while (!(GDBPORT_SERIAL_MSR & UART_MSR_##LINE)) {}      \
+} while (0)
+#define FLOWCTL_CLEAR(LINE)                    \
+do {                                           \
+       GDBPORT_SERIAL_MCR &= ~UART_MCR_##LINE; \
+} while (0)
+#define FLOWCTL_SET(LINE)                      \
+do {                                           \
+       GDBPORT_SERIAL_MCR |= UART_MCR_##LINE;  \
+} while (0)
+#define FLOWCTL_QUERY(LINE)    ({ GDBPORT_SERIAL_MSR & UART_MSR_##LINE; })
+
+static inline void __debug_to_serial(const char *p, int n)
+{
+       char ch;
+
+       FLOWCTL_SET(DTR);
+
+       for (; n > 0; n--) {
+               LSR_WAIT_FOR(THRE);
+               FLOWCTL_WAIT_FOR(CTS);
+
+               ch = *p++;
+               if (ch == 0x0a) {
+                       GDBPORT_SERIAL_TX = 0x0d;
+                       LSR_WAIT_FOR(THRE);
+                       FLOWCTL_WAIT_FOR(CTS);
+               }
+               GDBPORT_SERIAL_TX = ch;
+       }
+
+       FLOWCTL_CLEAR(DTR);
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* CONFIG_GDBSTUB_ON_TTYSx */
+
+#endif /* _ASM_UNIT_SERIAL_H */
diff --git a/arch/mn10300/unit-asb2303/include/unit/smc91111.h b/arch/mn10300/unit-asb2303/include/unit/smc91111.h
new file mode 100644 (file)
index 0000000..dd456e9
--- /dev/null
@@ -0,0 +1,50 @@
+/* Support for the SMC91C111 NIC on an ASB2303
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_UNIT_SMC91111_H
+#define _ASM_UNIT_SMC91111_H
+
+#include <asm/intctl-regs.h>
+
+#define SMC91111_BASE          0xAA000300UL
+#define SMC91111_BASE_END      0xAA000400UL
+#define SMC91111_IRQ           XIRQ3
+
+#define SMC_CAN_USE_8BIT       0
+#define SMC_CAN_USE_16BIT      1
+#define SMC_CAN_USE_32BIT      0
+#define SMC_NOWAIT             1
+#define SMC_IRQ_FLAGS          (0)
+
+#if SMC_CAN_USE_8BIT
+#define SMC_inb(a, r)          inb((unsigned long) ((a) + (r)))
+#define SMC_outb(v, a, r)      outb(v, (unsigned long) ((a) + (r)))
+#endif
+
+#if SMC_CAN_USE_16BIT
+#define SMC_inw(a, r)          inw((unsigned long) ((a) + (r)))
+#define SMC_outw(v, a, r)      outw(v, (unsigned long) ((a) + (r)))
+#define SMC_insw(a, r, p, l)   insw((unsigned long) ((a) + (r)), (p), (l))
+#define SMC_outsw(a, r, p, l)  outsw((unsigned long) ((a) + (r)), (p), (l))
+#endif
+
+#if SMC_CAN_USE_32BIT
+#define SMC_inl(a, r)          inl((unsigned long) ((a) + (r)))
+#define SMC_outl(v, a, r)      outl(v, (unsigned long) ((a) + (r)))
+#define SMC_insl(a, r, p, l)   insl((unsigned long) ((a) + (r)), (p), (l))
+#define SMC_outsl(a, r, p, l)  outsl((unsigned long) ((a) + (r)), (p), (l))
+#endif
+
+#define RPC_LSA_DEFAULT                RPC_LED_100_10
+#define RPC_LSB_DEFAULT                RPC_LED_TX_RX
+
+#define set_irq_type(irq, type)
+
+#endif /*  _ASM_UNIT_SMC91111_H */
diff --git a/arch/mn10300/unit-asb2303/include/unit/timex.h b/arch/mn10300/unit-asb2303/include/unit/timex.h
new file mode 100644 (file)
index 0000000..f206b63
--- /dev/null
@@ -0,0 +1,135 @@
+/* ASB2303-specific timer specifcations
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_UNIT_TIMEX_H
+#define _ASM_UNIT_TIMEX_H
+
+#ifndef __ASSEMBLY__
+#include <linux/irq.h>
+#endif /* __ASSEMBLY__ */
+
+#include <asm/timer-regs.h>
+#include <unit/clock.h>
+
+/*
+ * jiffies counter specifications
+ */
+
+#define        TMJCBR_MAX              0xffff
+#define        TMJCBC                  TM01BC
+
+#define        TMJCMD                  TM01MD
+#define        TMJCBR                  TM01BR
+#define        TMJCIRQ                 TM1IRQ
+#define        TMJCICR                 TM1ICR
+#define        TMJCICR_LEVEL           GxICR_LEVEL_5
+
+#ifndef __ASSEMBLY__
+
+static inline void startup_jiffies_counter(void)
+{
+       unsigned rate;
+       u16 md, t16;
+
+       /* use as little prescaling as possible to avoid losing accuracy */
+       md = TM0MD_SRC_IOCLK;
+       rate = MN10300_JCCLK / HZ;
+
+       if (rate > TMJCBR_MAX) {
+               md = TM0MD_SRC_IOCLK_8;
+               rate = MN10300_JCCLK / 8 / HZ;
+
+               if (rate > TMJCBR_MAX) {
+                       md = TM0MD_SRC_IOCLK_32;
+                       rate = MN10300_JCCLK / 32 / HZ;
+
+                       if (rate > TMJCBR_MAX)
+                               BUG();
+               }
+       }
+
+       TMJCBR = rate - 1;
+       t16 = TMJCBR;
+
+       TMJCMD =
+               md |
+               TM1MD_SRC_TM0CASCADE << 8 |
+               TM0MD_INIT_COUNTER |
+               TM1MD_INIT_COUNTER << 8;
+
+       TMJCMD =
+               md |
+               TM1MD_SRC_TM0CASCADE << 8 |
+               TM0MD_COUNT_ENABLE |
+               TM1MD_COUNT_ENABLE << 8;
+
+       t16 = TMJCMD;
+
+       TMJCICR |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST;
+       t16 = TMJCICR;
+}
+
+static inline void shutdown_jiffies_counter(void)
+{
+}
+
+#endif /* !__ASSEMBLY__ */
+
+
+/*
+ * timestamp counter specifications
+ */
+
+#define        TMTSCBR_MAX             0xffffffff
+#define        TMTSCBC                 TM45BC
+
+#ifndef __ASSEMBLY__
+
+static inline void startup_timestamp_counter(void)
+{
+       /* set up timer 4 & 5 cascaded as a 32-bit counter to count real time
+        * - count down from 4Gig-1 to 0 and wrap at IOCLK rate
+        */
+       TM45BR = TMTSCBR_MAX;
+
+       TM4MD = TM4MD_SRC_IOCLK;
+       TM4MD |= TM4MD_INIT_COUNTER;
+       TM4MD &= ~TM4MD_INIT_COUNTER;
+       TM4ICR = 0;
+
+       TM5MD = TM5MD_SRC_TM4CASCADE;
+       TM5MD |= TM5MD_INIT_COUNTER;
+       TM5MD &= ~TM5MD_INIT_COUNTER;
+       TM5ICR = 0;
+
+       TM5MD |= TM5MD_COUNT_ENABLE;
+       TM4MD |= TM4MD_COUNT_ENABLE;
+}
+
+static inline void shutdown_timestamp_counter(void)
+{
+       TM4MD = 0;
+       TM5MD = 0;
+}
+
+/*
+ * we use a cascaded pair of 16-bit down-counting timers to count I/O
+ * clock cycles for the purposes of time keeping
+ */
+typedef unsigned long cycles_t;
+
+static inline cycles_t read_timestamp_counter(void)
+{
+       return (cycles_t)TMTSCBC;
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_UNIT_TIMEX_H */
index cd4bc78..c038393 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/processor.h>
 #include <asm/intctl-regs.h>
 #include <asm/rtc-regs.h>
-#include <asm/unit/leds.h>
+#include <unit/leds.h>
 
 #if 0
 static const u8 asb2303_led_hex_tbl[16] = {
index 30875dd..43c2464 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/timex.h>
 #include <asm/processor.h>
 #include <asm/intctl-regs.h>
-#include <asm/unit/smc91111.h>
+#include <unit/smc91111.h>
 
 static struct resource smc91c111_resources[] = {
        [0] = {
diff --git a/arch/mn10300/unit-asb2305/include/unit/clock.h b/arch/mn10300/unit-asb2305/include/unit/clock.h
new file mode 100644 (file)
index 0000000..7d51484
--- /dev/null
@@ -0,0 +1,45 @@
+/* ASB2305-specific clocks
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_UNIT_CLOCK_H
+#define _ASM_UNIT_CLOCK_H
+
+#ifndef __ASSEMBLY__
+
+#ifdef CONFIG_MN10300_RTC
+
+extern unsigned long mn10300_ioclk;    /* IOCLK (crystal speed) in HZ */
+extern unsigned long mn10300_iobclk;
+extern unsigned long mn10300_tsc_per_HZ;
+
+#define MN10300_IOCLK          ((unsigned long)mn10300_ioclk)
+/* If this processors has a another clock, uncomment the below. */
+/* #define MN10300_IOBCLK      ((unsigned long)mn10300_iobclk) */
+
+#else /* !CONFIG_MN10300_RTC */
+
+#define MN10300_IOCLK          33333333UL
+/* #define MN10300_IOBCLK      66666666UL */
+
+#endif /* !CONFIG_MN10300_RTC */
+
+#define MN10300_JCCLK          MN10300_IOCLK
+#define MN10300_TSCCLK         MN10300_IOCLK
+
+#ifdef CONFIG_MN10300_RTC
+#define MN10300_TSC_PER_HZ     ((unsigned long)mn10300_tsc_per_HZ)
+#else /* !CONFIG_MN10300_RTC */
+#define MN10300_TSC_PER_HZ     (MN10300_TSCCLK/HZ)
+#endif /* !CONFIG_MN10300_RTC */
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_UNIT_CLOCK_H */
diff --git a/arch/mn10300/unit-asb2305/include/unit/leds.h b/arch/mn10300/unit-asb2305/include/unit/leds.h
new file mode 100644 (file)
index 0000000..bc471f6
--- /dev/null
@@ -0,0 +1,51 @@
+/* ASB2305-specific LEDs
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#ifndef _ASM_UNIT_LEDS_H
+#define _ASM_UNIT_LEDS_H
+
+#include <asm/pio-regs.h>
+#include <asm/cpu-regs.h>
+#include <asm/exceptions.h>
+
+#define ASB2305_7SEGLEDS       __SYSREG(0xA6F90000, u32)
+
+/* perform a hard reset by driving PIO06 low */
+#define mn10300_unit_hard_reset()              \
+do {                                           \
+       P0OUT &= 0xbf;                          \
+       P0MD = (P0MD & P0MD_6) | P0MD_6_OUT;    \
+} while (0)
+
+/*
+ * use the 7-segment LEDs to indicate states
+ */
+/* indicate double-fault by displaying "db-f" on the LEDs */
+#define mn10300_set_dbfleds                    \
+       mov     0x43077f1d,d0           ;       \
+       mov     d0,(ASB2305_7SEGLEDS)
+
+/* flip the 7-segment LEDs between "Gdb-" and "----" */
+#define mn10300_set_gdbleds(ONOFF)                             \
+do {                                                           \
+       ASB2305_7SEGLEDS = (ONOFF) ? 0x8543077f : 0x7f7f7f7f;   \
+} while (0)
+
+#ifndef __ASSEMBLY__
+extern void peripheral_leds_display_exception(enum exception_code);
+extern void peripheral_leds_led_chase(void);
+extern void peripheral_leds7x4_display_dec(unsigned int, unsigned int);
+extern void peripheral_leds7x4_display_hex(unsigned int, unsigned int);
+extern void peripheral_leds7x4_display_minssecs(unsigned int, unsigned int);
+extern void peripheral_leds7x4_display_rtc(void);
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_UNIT_LEDS_H */
diff --git a/arch/mn10300/unit-asb2305/include/unit/serial.h b/arch/mn10300/unit-asb2305/include/unit/serial.h
new file mode 100644 (file)
index 0000000..3bfc909
--- /dev/null
@@ -0,0 +1,120 @@
+/* ASB2305-specific 8250 serial ports
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_UNIT_SERIAL_H
+#define _ASM_UNIT_SERIAL_H
+
+#include <asm/cpu/cpu-regs.h>
+#include <proc/irq.h>
+#include <linux/serial_reg.h>
+
+#define SERIAL_PORT0_BASE_ADDRESS      0xA6FB0000
+#define ASB2305_DEBUG_MCR      __SYSREG(0xA6FB0000 + UART_MCR * 2, u8)
+
+#define SERIAL_IRQ     XIRQ0   /* Dual serial (PC16552)        (Hi) */
+
+/*
+ * dispose of the /dev/ttyS0 serial port
+ */
+#ifndef CONFIG_GDBSTUB_ON_TTYSx
+
+#define SERIAL_PORT_DFNS                                               \
+       {                                                               \
+       .baud_base              = BASE_BAUD,                            \
+       .irq                    = SERIAL_IRQ,                           \
+       .flags                  = STD_COM_FLAGS,                        \
+       .iomem_base             = (u8 *) SERIAL_PORT0_BASE_ADDRESS,     \
+       .iomem_reg_shift        = 2,                                    \
+       .io_type                = SERIAL_IO_MEM,                        \
+       },
+
+#ifndef __ASSEMBLY__
+
+static inline void __debug_to_serial(const char *p, int n)
+{
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#else /* CONFIG_GDBSTUB_ON_TTYSx */
+
+#define SERIAL_PORT_DFNS /* stolen by gdb-stub */
+
+#if defined(CONFIG_GDBSTUB_ON_TTYS0)
+#define GDBPORT_SERIAL_RX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_RX  * 4, u8)
+#define GDBPORT_SERIAL_TX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_TX  * 4, u8)
+#define GDBPORT_SERIAL_DLL     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLL * 4, u8)
+#define GDBPORT_SERIAL_DLM     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLM * 4, u8)
+#define GDBPORT_SERIAL_IER     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IER * 4, u8)
+#define GDBPORT_SERIAL_IIR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IIR * 4, u8)
+#define GDBPORT_SERIAL_FCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_FCR * 4, u8)
+#define GDBPORT_SERIAL_LCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LCR * 4, u8)
+#define GDBPORT_SERIAL_MCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MCR * 4, u8)
+#define GDBPORT_SERIAL_LSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LSR * 4, u8)
+#define GDBPORT_SERIAL_MSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MSR * 4, u8)
+#define GDBPORT_SERIAL_SCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_SCR * 4, u8)
+#define GDBPORT_SERIAL_IRQ     SERIAL_IRQ
+
+#elif defined(CONFIG_GDBSTUB_ON_TTYS1)
+#error The ASB2305 doesnt have a /dev/ttyS1
+#endif
+
+#ifndef __ASSEMBLY__
+
+#define TTYS0_TX       __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_TX  * 4, u8)
+#define TTYS0_MCR      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MCR * 4, u8)
+#define TTYS0_LSR      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LSR * 4, u8)
+#define TTYS0_MSR      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MSR * 4, u8)
+
+#define LSR_WAIT_FOR(STATE)                            \
+do {                                                   \
+       while (!(TTYS0_LSR & UART_LSR_##STATE)) {}      \
+} while (0)
+#define FLOWCTL_WAIT_FOR(LINE)                         \
+do {                                                   \
+       while (!(TTYS0_MSR & UART_MSR_##LINE)) {}       \
+} while (0)
+#define FLOWCTL_CLEAR(LINE)                    \
+do {                                           \
+       TTYS0_MCR &= ~UART_MCR_##LINE;          \
+} while (0)
+#define FLOWCTL_SET(LINE)                      \
+do {                                           \
+       TTYS0_MCR |= UART_MCR_##LINE;           \
+} while (0)
+#define FLOWCTL_QUERY(LINE)    ({ TTYS0_MSR & UART_MSR_##LINE; })
+
+static inline void __debug_to_serial(const char *p, int n)
+{
+       char ch;
+
+       FLOWCTL_SET(DTR);
+
+       for (; n > 0; n--) {
+               LSR_WAIT_FOR(THRE);
+               FLOWCTL_WAIT_FOR(CTS);
+
+               ch = *p++;
+               if (ch == 0x0a) {
+                       TTYS0_TX = 0x0d;
+                       LSR_WAIT_FOR(THRE);
+                       FLOWCTL_WAIT_FOR(CTS);
+               }
+               TTYS0_TX = ch;
+       }
+
+       FLOWCTL_CLEAR(DTR);
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* CONFIG_GDBSTUB_ON_TTYSx */
+
+#endif /* _ASM_UNIT_SERIAL_H */
diff --git a/arch/mn10300/unit-asb2305/include/unit/timex.h b/arch/mn10300/unit-asb2305/include/unit/timex.h
new file mode 100644 (file)
index 0000000..a71c49a
--- /dev/null
@@ -0,0 +1,135 @@
+/* ASB2305 timer specifcations
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#ifndef _ASM_UNIT_TIMEX_H
+#define _ASM_UNIT_TIMEX_H
+
+#ifndef __ASSEMBLY__
+#include <linux/irq.h>
+#endif /* __ASSEMBLY__ */
+
+#include <asm/cpu/timer-regs.h>
+#include <unit/clock.h>
+
+/*
+ * jiffies counter specifications
+ */
+
+#define        TMJCBR_MAX              0xffff
+#define        TMJCBC                  TM01BC
+
+#define        TMJCMD                  TM01MD
+#define        TMJCBR                  TM01BR
+#define        TMJCIRQ                 TM1IRQ
+#define        TMJCICR                 TM1ICR
+#define        TMJCICR_LEVEL           GxICR_LEVEL_5
+
+#ifndef __ASSEMBLY__
+
+static inline void startup_jiffies_counter(void)
+{
+       unsigned rate;
+       u16 md, t16;
+
+       /* use as little prescaling as possible to avoid losing accuracy */
+       md = TM0MD_SRC_IOCLK;
+       rate = MN10300_JCCLK / HZ;
+
+       if (rate > TMJCBR_MAX) {
+               md = TM0MD_SRC_IOCLK_8;
+               rate = MN10300_JCCLK / 8 / HZ;
+
+               if (rate > TMJCBR_MAX) {
+                       md = TM0MD_SRC_IOCLK_32;
+                       rate = MN10300_JCCLK / 32 / HZ;
+
+                       if (rate > TMJCBR_MAX)
+                               BUG();
+               }
+       }
+
+       TMJCBR = rate - 1;
+       t16 = TMJCBR;
+
+       TMJCMD =
+               md |
+               TM1MD_SRC_TM0CASCADE << 8 |
+               TM0MD_INIT_COUNTER |
+               TM1MD_INIT_COUNTER << 8;
+
+       TMJCMD =
+               md |
+               TM1MD_SRC_TM0CASCADE << 8 |
+               TM0MD_COUNT_ENABLE |
+               TM1MD_COUNT_ENABLE << 8;
+
+       t16 = TMJCMD;
+
+       TMJCICR |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST;
+       t16 = TMJCICR;
+}
+
+static inline void shutdown_jiffies_counter(void)
+{
+}
+
+#endif /* !__ASSEMBLY__ */
+
+
+/*
+ * timestamp counter specifications
+ */
+
+#define        TMTSCBR_MAX             0xffffffff
+#define        TMTSCBC                 TM45BC
+
+#ifndef __ASSEMBLY__
+
+static inline void startup_timestamp_counter(void)
+{
+       /* set up timer 4 & 5 cascaded as a 32-bit counter to count real time
+        * - count down from 4Gig-1 to 0 and wrap at IOCLK rate
+        */
+       TM45BR = TMTSCBR_MAX;
+
+       TM4MD = TM4MD_SRC_IOCLK;
+       TM4MD |= TM4MD_INIT_COUNTER;
+       TM4MD &= ~TM4MD_INIT_COUNTER;
+       TM4ICR = 0;
+
+       TM5MD = TM5MD_SRC_TM4CASCADE;
+       TM5MD |= TM5MD_INIT_COUNTER;
+       TM5MD &= ~TM5MD_INIT_COUNTER;
+       TM5ICR = 0;
+
+       TM5MD |= TM5MD_COUNT_ENABLE;
+       TM4MD |= TM4MD_COUNT_ENABLE;
+}
+
+static inline void shutdown_timestamp_counter(void)
+{
+       TM4MD = 0;
+       TM5MD = 0;
+}
+
+/*
+ * we use a cascaded pair of 16-bit down-counting timers to count I/O
+ * clock cycles for the purposes of time keeping
+ */
+typedef unsigned long cycles_t;
+
+static inline cycles_t read_timestamp_counter(void)
+{
+       return (cycles_t) TMTSCBC;
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_UNIT_TIMEX_H */
index e99dcc9..d345ff9 100644 (file)
@@ -15,7 +15,7 @@
 #include <asm/processor.h>
 #include <asm/cpu/intctl-regs.h>
 #include <asm/cpu/rtc-regs.h>
-#include <asm/unit/leds.h>
+#include <unit/leds.h>
 
 static const u8 asb2305_led_hex_tbl[16] = {
        0x80, 0xf2, 0x48, 0x60, 0x32, 0x24, 0x04, 0xf0,
index 72812a9..1c452cc 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/cpu/intctl-regs.h>
 #include <asm/cpu/rtc-regs.h>
 #include <asm/cpu/serial-regs.h>
-#include <asm/unit/serial.h>
+#include <unit/serial.h>
 
 /*
  * initialise some of the unit hardware before gdbstub is set up
index 9e08d8a..5b50e1a 100644 (file)
@@ -316,7 +316,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE
 
 config KEXEC
        bool "kexec system call (EXPERIMENTAL)"
-       depends on BOOK3S && EXPERIMENTAL
+       depends on PPC_BOOK3S && EXPERIMENTAL
        help
          kexec is a system call that implements the ability to shutdown your
          current kernel, and to start another kernel.  It is like a reboot
@@ -775,6 +775,7 @@ config LOWMEM_CAM_NUM_BOOL
          Say N here unless you know what you are doing.
 
 config LOWMEM_CAM_NUM
+       depends on FSL_BOOKE
        int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
        default 3
 
index 308fe7c..c9cfd37 100644 (file)
                bus-frequency = <0>;                            /* Fixed by bootwrapper */
 
                memory-controller@2000 {
-                       compatible = "fsl,8540-memory-controller";
+                       compatible = "fsl,mpc8540-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <0x12 0x2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8540-l2-cache-controller";
+                       compatible = "fsl,mpc8540-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <0x20>;               /* 32 bytes */
                        cache-size = <0x40000>;                 /* L2, 256K */
index b2d6109..0bb6693 100644 (file)
        #address-cells = <1>;
        #size-cells = <1>;
 
+       aliases {
+               ethernet0 = &enet0;
+               ethernet1 = &enet1;
+               serial0 = &serial0;
+               serial1 = &serial1;
+               pci0 = &pci0;
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -45,7 +53,7 @@
                #size-cells = <1>;
                reg = <0xf0010100 0x60>;
 
-               ranges = <0x0 0x0 0xfe000000 0x800000
+               ranges = <0x0 0x0 0xff800000 0x800000
                          0x1 0x0 0xf4500000 0x8000
                          0x8 0x0 0xf8200000 0x8000>;
 
@@ -71,7 +79,7 @@
                };
        };
 
-       pci@f0010800 {
+       pci0: pci@f0010800 {
                device_type = "pci";
                reg = <0xf0010800 0x10c 0xf00101ac 0x8 0xf00101c4 0x8>;
                compatible = "fsl,mpc8280-pci", "fsl,pq2-pci";
                                reg = <0x119f0 0x10 0x115f0 0x10>;
                        };
 
-                       serial@11a00 {
+                       serial0: serial@11a00 {
                                device_type = "serial";
                                compatible = "fsl,mpc8280-scc-uart",
                                             "fsl,cpm2-scc-uart";
                                fsl,cpm-command = <0x800000>;
                        };
 
-                       serial@11a20 {
+                       serial1: serial@11a20 {
                                device_type = "serial";
                                compatible = "fsl,mpc8280-scc-uart",
                                             "fsl,cpm2-scc-uart";
                                fsl,cpm-command = <0x4a00000>;
                        };
 
-                       ethernet@11320 {
+                       enet0: ethernet@11320 {
                                device_type = "network";
                                compatible = "fsl,mpc8280-fcc-enet",
                                             "fsl,cpm2-fcc-enet";
                                fsl,cpm-command = <0x16200300>;
                        };
 
-                       ethernet@11340 {
+                       enet1: ethernet@11340 {
                                device_type = "network";
                                compatible = "fsl,mpc8280-fcc-enet",
                                             "fsl,cpm2-fcc-enet";
index 9c5079f..b1f1416 100644 (file)
                compatible = "simple-bus";
 
                memory-controller@2000 {
-                       compatible = "fsl,8548-memory-controller";
+                       compatible = "fsl,mpc8548-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <0x12 0x2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8548-l2-cache-controller";
+                       compatible = "fsl,mpc8548-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <0x20>;       // 32 bytes
                        cache-size = <0x80000>; // L2, 512K
index b772405..c4564b8 100644 (file)
                clock-frequency = <0>;
 
                memory-controller@2000 {
-                       compatible = "fsl,8560-memory-controller";
+                       compatible = "fsl,mpc8560-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <0x12 0x2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8560-l2-cache-controller";
+                       compatible = "fsl,mpc8560-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <0x20>;       // 32 bytes
                        cache-size = <0x40000>;         // L2, 256K
index b8d0fc6..7a6ae75 100644 (file)
@@ -52,6 +52,7 @@
        soc8544@e0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
+               device_type = "soc";
 
                ranges = <0x00000000 0xe0000000 0x00100000>;
                reg = <0xe0000000 0x00001000>;  // CCSRBAR 1M
                        #address-cells = <1>;
                        #size-cells = <0>;
                        cell-index = <0>;
-                       compatible = "fsl-i2c";
+                       compatible = "fsl,mpc8544-i2c", "fsl-i2c";
                        reg = <0x3000 0x100>;
                        interrupts = <43 2>;
                        interrupt-parent = <&mpic>;
-                       dfsrr;
+                       fsl,preserve-clocking;
 
                        dtt@28 {
                                compatible = "winbond,w83782d";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        cell-index = <1>;
-                       compatible = "fsl-i2c";
+                       compatible = "fsl,mpc8544-i2c", "fsl-i2c";
                        reg = <0x3100 0x100>;
                        interrupts = <43 2>;
                        interrupt-parent = <&mpic>;
-                       dfsrr;
+                       fsl,preserve-clocking;
                };
 
                enet0: ethernet@24000 {
index 8b17395..ea6b151 100644 (file)
                compatible = "fsl,mpc8560-immr", "simple-bus";
 
                memory-controller@2000 {
-                       compatible = "fsl,8540-memory-controller";
+                       compatible = "fsl,mpc8540-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <18 2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8540-l2-cache-controller";
+                       compatible = "fsl,mpc8540-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <32>;
                        cache-size = <0x40000>; // L2, 256K
index ac9413a..231bae7 100644 (file)
                compatible = "fsl,mpc8540-immr", "simple-bus";
 
                memory-controller@2000 {
-                       compatible = "fsl,8540-memory-controller";
+                       compatible = "fsl,mpc8540-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <18 2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8540-l2-cache-controller";
+                       compatible = "fsl,mpc8540-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <32>;
                        cache-size = <0x40000>; // L2, 256K
index c71bb5d..4356a1f 100644 (file)
                compatible = "fsl,mpc8541-immr", "simple-bus";
 
                memory-controller@2000 {
-                       compatible = "fsl,8540-memory-controller";
+                       compatible = "fsl,mpc8540-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <18 2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8540-l2-cache-controller";
+                       compatible = "fsl,mpc8540-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <32>;
                        cache-size = <0x40000>; // L2, 256K
index 28b1a95..19aa723 100644 (file)
                upm@3,0 {
                        #address-cells = <0>;
                        #size-cells = <0>;
-                       compatible = "fsl,upm-nand";
+                       compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
                        reg = <3 0x0 0x800>;
                        fsl,upm-addr-offset = <0x10>;
                        fsl,upm-cmd-offset = <0x08>;
+                       /* Micron MT29F8G08FAB multi-chip device */
+                       fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
+                       fsl,upm-wait-flags = <0x5>;
                        chip-delay = <25>; // in micro-seconds
 
                        nand@0 {
 
                                partition@0 {
                                            label = "fs";
-                                           reg = <0x00000000 0x01000000>;
+                                           reg = <0x00000000 0x10000000>;
                                };
                        };
                };
index 826fb62..49145a0 100644 (file)
                upm@3,0 {
                        #address-cells = <0>;
                        #size-cells = <0>;
-                       compatible = "fsl,upm-nand";
+                       compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
                        reg = <3 0x0 0x800>;
                        fsl,upm-addr-offset = <0x10>;
                        fsl,upm-cmd-offset = <0x08>;
+                       /* Micron MT29F8G08FAB multi-chip device */
+                       fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
+                       fsl,upm-wait-flags = <0x5>;
                        chip-delay = <25>; // in micro-seconds
 
                        nand@0 {
 
                                partition@0 {
                                            label = "fs";
-                                           reg = <0x00000000 0x01000000>;
+                                           reg = <0x00000000 0x10000000>;
                                };
                        };
                };
index a133ded..06d366e 100644 (file)
                compatible = "fsl,mpc8555-immr", "simple-bus";
 
                memory-controller@2000 {
-                       compatible = "fsl,8540-memory-controller";
+                       compatible = "fsl,mpc8540-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <18 2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8540-l2-cache-controller";
+                       compatible = "fsl,mpc8540-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <32>;
                        cache-size = <0x40000>; // L2, 256K
index 649e2e5..feff915 100644 (file)
                compatible = "fsl,mpc8560-immr", "simple-bus";
 
                memory-controller@2000 {
-                       compatible = "fsl,8540-memory-controller";
+                       compatible = "fsl,mpc8540-memory-controller";
                        reg = <0x2000 0x1000>;
                        interrupt-parent = <&mpic>;
                        interrupts = <18 2>;
                };
 
                L2: l2-cache-controller@20000 {
-                       compatible = "fsl,8540-l2-cache-controller";
+                       compatible = "fsl,mpc8540-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <32>;
                        cache-size = <0x40000>; // L2, 256K
index 61b1008..f1889ab 100644 (file)
@@ -95,7 +95,7 @@ CONFIG_CGROUP_CPUACCT=y
 CONFIG_SYSFS_DEPRECATED=y
 CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_PROC_PID_CPUSET=y
-# CONFIG_RELAY is not set
+CONFIG_RELAY=y
 CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_IPC_NS is not set
index 68235f7..d2a65e8 100644 (file)
@@ -125,7 +125,7 @@ struct lppaca {
        // NOTE: This value will ALWAYS be zero for dedicated processors and
        // will NEVER be zero for shared processors (ie, initialized to a 1).
        volatile u32 yield_count;       // PLIC increments each dispatchx00-x03
-       u32 reserved6;
+       volatile u32 dispersion_count;  // dispatch changed phys cpu    x04-x07
        volatile u64 cmo_faults;        // CMO page fault count         x08-x0F
        volatile u64 cmo_fault_time;    // CMO page fault time          x10-x17
        u8      reserved7[104];         // Reserved                     x18-x7F
index c2ccca5..a002682 100644 (file)
 #define MPIC_GREG_FEATURE_1            0x00010
 #define MPIC_GREG_GLOBAL_CONF_0                0x00020
 #define                MPIC_GREG_GCONF_RESET                   0x80000000
+/* On the FSL mpic implementations the Mode field is expand to be
+ * 2 bits wide:
+ *     0b00 = pass through (interrupts routed to IRQ0)
+ *     0b01 = Mixed mode
+ *     0b10 = reserved
+ *     0b11 = External proxy / coreint
+ */
+#define                MPIC_GREG_GCONF_COREINT                 0x60000000
 #define                MPIC_GREG_GCONF_8259_PTHROU_DIS         0x20000000
 #define                MPIC_GREG_GCONF_NO_BIAS                 0x10000000
 #define                MPIC_GREG_GCONF_BASE_MASK               0x000fffff
@@ -357,6 +365,8 @@ struct mpic
 #define MPIC_BROKEN_FRR_NIRQS          0x00000800
 /* Destination only supports a single CPU at a time */
 #define MPIC_SINGLE_DEST_CPU           0x00001000
+/* Enable CoreInt delivery of interrupts */
+#define MPIC_ENABLE_COREINT            0x00002000
 
 /* MPIC HW modification ID */
 #define MPIC_REGSET_MASK               0xf0000000
@@ -470,6 +480,8 @@ extern void mpic_end_irq(unsigned int irq);
 extern unsigned int mpic_get_one_irq(struct mpic *mpic);
 /* This one gets from the primary mpic */
 extern unsigned int mpic_get_irq(void);
+/* This one gets from the primary mpic via CoreInt*/
+extern unsigned int mpic_get_coreint_irq(void);
 /* Fetch Machine Check interrupt from primary mpic */
 extern unsigned int mpic_get_mcirq(void);
 
index 90dbefb..e7233a8 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
-#include <linux/types.h>
 
 /* ioctl */
 #define PS3FB_IOCTL_SETMODE       _IOW('r',  1, int) /* set video mode */
index d9740e8..a7e210b 100644 (file)
@@ -151,9 +151,11 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
                                 _PAGE_NO_CACHE)
 #define PAGE_KERNEL_NCG        __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
                                 _PAGE_NO_CACHE | _PAGE_GUARDED)
-#define PAGE_KERNEL_X  __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC)
+#define PAGE_KERNEL_X  __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | \
+                                _PAGE_HWEXEC)
 #define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
-#define PAGE_KERNEL_ROX        __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC)
+#define PAGE_KERNEL_ROX        __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC | \
+                                _PAGE_HWEXEC)
 
 /* Protection used for kernel text. We want the debuggers to be able to
  * set breakpoints anywhere, so don't write protect the kernel text
index c9ff1ec..e8018d5 100644 (file)
 #define FPSCR_NI       0x00000004      /* FPU non IEEE-Mode */
 #define FPSCR_RN       0x00000003      /* FPU rounding control */
 
+/* Bit definitions for SPEFSCR. */
+#define SPEFSCR_SOVH   0x80000000      /* Summary integer overflow high */
+#define SPEFSCR_OVH    0x40000000      /* Integer overflow high */
+#define SPEFSCR_FGH    0x20000000      /* Embedded FP guard bit high */
+#define SPEFSCR_FXH    0x10000000      /* Embedded FP sticky bit high */
+#define SPEFSCR_FINVH  0x08000000      /* Embedded FP invalid operation high */
+#define SPEFSCR_FDBZH  0x04000000      /* Embedded FP div by zero high */
+#define SPEFSCR_FUNFH  0x02000000      /* Embedded FP underflow high */
+#define SPEFSCR_FOVFH  0x01000000      /* Embedded FP overflow high */
+#define SPEFSCR_FINXS  0x00200000      /* Embedded FP inexact sticky */
+#define SPEFSCR_FINVS  0x00100000      /* Embedded FP invalid op. sticky */
+#define SPEFSCR_FDBZS  0x00080000      /* Embedded FP div by zero sticky */
+#define SPEFSCR_FUNFS  0x00040000      /* Embedded FP underflow sticky */
+#define SPEFSCR_FOVFS  0x00020000      /* Embedded FP overflow sticky */
+#define SPEFSCR_MODE   0x00010000      /* Embedded FP mode */
+#define SPEFSCR_SOV    0x00008000      /* Integer summary overflow */
+#define SPEFSCR_OV     0x00004000      /* Integer overflow */
+#define SPEFSCR_FG     0x00002000      /* Embedded FP guard bit */
+#define SPEFSCR_FX     0x00001000      /* Embedded FP sticky bit */
+#define SPEFSCR_FINV   0x00000800      /* Embedded FP invalid operation */
+#define SPEFSCR_FDBZ   0x00000400      /* Embedded FP div by zero */
+#define SPEFSCR_FUNF   0x00000200      /* Embedded FP underflow */
+#define SPEFSCR_FOVF   0x00000100      /* Embedded FP overflow */
+#define SPEFSCR_FINXE  0x00000040      /* Embedded FP inexact enable */
+#define SPEFSCR_FINVE  0x00000020      /* Embedded FP invalid op. enable */
+#define SPEFSCR_FDBZE  0x00000010      /* Embedded FP div by zero enable */
+#define SPEFSCR_FUNFE  0x00000008      /* Embedded FP underflow enable */
+#define SPEFSCR_FOVFE  0x00000004      /* Embedded FP overflow enable */
+#define SPEFSCR_FRMC   0x00000003      /* Embedded FP rounding mode control */
+
 /* Special Purpose Registers (SPRNs)*/
 #define SPRN_CTR       0x009   /* Count Register */
 #define SPRN_DSCR      0x11
index a56f4d6..601ddbc 100644 (file)
 #define SGR_NORMAL     0               /* Speculative fetching allowed. */
 #define SGR_GUARDED    1               /* Speculative fetching disallowed. */
 
-/* Bit definitions for SPEFSCR. */
-#define SPEFSCR_SOVH   0x80000000      /* Summary integer overflow high */
-#define SPEFSCR_OVH    0x40000000      /* Integer overflow high */
-#define SPEFSCR_FGH    0x20000000      /* Embedded FP guard bit high */
-#define SPEFSCR_FXH    0x10000000      /* Embedded FP sticky bit high */
-#define SPEFSCR_FINVH  0x08000000      /* Embedded FP invalid operation high */
-#define SPEFSCR_FDBZH  0x04000000      /* Embedded FP div by zero high */
-#define SPEFSCR_FUNFH  0x02000000      /* Embedded FP underflow high */
-#define SPEFSCR_FOVFH  0x01000000      /* Embedded FP overflow high */
-#define SPEFSCR_FINXS  0x00200000      /* Embedded FP inexact sticky */
-#define SPEFSCR_FINVS  0x00100000      /* Embedded FP invalid op. sticky */
-#define SPEFSCR_FDBZS  0x00080000      /* Embedded FP div by zero sticky */
-#define SPEFSCR_FUNFS  0x00040000      /* Embedded FP underflow sticky */
-#define SPEFSCR_FOVFS  0x00020000      /* Embedded FP overflow sticky */
-#define SPEFSCR_MODE   0x00010000      /* Embedded FP mode */
-#define SPEFSCR_SOV    0x00008000      /* Integer summary overflow */
-#define SPEFSCR_OV     0x00004000      /* Integer overflow */
-#define SPEFSCR_FG     0x00002000      /* Embedded FP guard bit */
-#define SPEFSCR_FX     0x00001000      /* Embedded FP sticky bit */
-#define SPEFSCR_FINV   0x00000800      /* Embedded FP invalid operation */
-#define SPEFSCR_FDBZ   0x00000400      /* Embedded FP div by zero */
-#define SPEFSCR_FUNF   0x00000200      /* Embedded FP underflow */
-#define SPEFSCR_FOVF   0x00000100      /* Embedded FP overflow */
-#define SPEFSCR_FINXE  0x00000040      /* Embedded FP inexact enable */
-#define SPEFSCR_FINVE  0x00000020      /* Embedded FP invalid op. enable */
-#define SPEFSCR_FDBZE  0x00000010      /* Embedded FP div by zero enable */
-#define SPEFSCR_FUNFE  0x00000008      /* Embedded FP underflow enable */
-#define SPEFSCR_FOVFE  0x00000004      /* Embedded FP overflow enable */
-#define SPEFSCR_FRMC   0x00000003      /* Embedded FP rounding mode control */
-
 /*
  * The IBM-403 is an even more odd special case, as it is much
  * older than the IBM-405 series.  We put these down here incase someone
index 0aa0315..01c1233 100644 (file)
@@ -68,7 +68,8 @@ struct rtas_t {
 #define RTAS_EPOW_WARNING              0x40000000 /* set bit 1 */
 #define RTAS_POWERMGM_EVENTS           0x20000000 /* set bit 2 */
 #define RTAS_HOTPLUG_EVENTS            0x10000000 /* set bit 3 */
-#define RTAS_EVENT_SCAN_ALL_EVENTS     0xf0000000
+#define RTAS_IO_EVENTS                 0x08000000 /* set bit 4 */
+#define RTAS_EVENT_SCAN_ALL_EVENTS     0xffffffff
 
 /* RTAS event severity */
 #define RTAS_SEVERITY_FATAL            0x5
index 3d9f831..3a7a67a 100644 (file)
@@ -29,9 +29,9 @@
 
 /* basic word size definitions */
 #define _FP_W_TYPE_SIZE                32
-#define _FP_W_TYPE             unsigned long
-#define _FP_WS_TYPE            signed long
-#define _FP_I_TYPE             long
+#define _FP_W_TYPE             unsigned int
+#define _FP_WS_TYPE            signed int
+#define _FP_I_TYPE             int
 
 #define __ll_B                 ((UWtype) 1 << (W_TYPE_SIZE / 2))
 #define __ll_lowpart(t)                ((UWtype) (t) & (__ll_B - 1))
index fe16649..d98a30d 100644 (file)
@@ -322,3 +322,6 @@ SYSCALL_SPU(epoll_create1)
 SYSCALL_SPU(dup3)
 SYSCALL_SPU(pipe2)
 SYSCALL(inotify_init1)
+SYSCALL(ni_syscall)
+COMPAT_SYS_SPU(preadv)
+COMPAT_SYS_SPU(pwritev)
index e07d0c7..3f06f8e 100644 (file)
 #define __NR_dup3              316
 #define __NR_pipe2             317
 #define __NR_inotify_init1     318
+#define __NR_preadv            320
+#define __NR_pwritev           321
 
 #ifdef __KERNEL__
 
-#define __NR_syscalls          319
+#define __NR_syscalls          322
 
 #define __NR__exit __NR_exit
 #define NR_syscalls    __NR_syscalls
index 1c5c8a6..53c7788 100644 (file)
@@ -94,7 +94,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
         * done via some global so platforms can set the limit in case
         * they have limited DMA windows
         */
-       return mask >= DMA_32BIT_MASK;
+       return mask >= DMA_BIT_MASK(32);
 #else
        return 1;
 #endif
index a088c06..2436df3 100644 (file)
@@ -145,6 +145,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
        beq     1f
        PPC_LL  r4,_MSR-STACK_FRAME_OVERHEAD(r5)
        li      r3,MSR_FP|MSR_FE0|MSR_FE1
+#ifdef CONFIG_VSX
+BEGIN_FTR_SECTION
+       oris    r3,r3,MSR_VSX@h
+END_FTR_SECTION_IFSET(CPU_FTR_VSX)
+#endif
        andc    r4,r4,r3                /* disable FP for previous task */
        PPC_STL r4,_MSR-STACK_FRAME_OVERHEAD(r5)
 1:
index 5455943..70e2a73 100644 (file)
@@ -293,7 +293,7 @@ __ftrace_make_nop(struct module *mod,
        if (tramp & 0x8000)
                tramp -= 0x10000;
 
-       pr_debug(" %x ", tramp);
+       pr_debug(" %lx ", tramp);
 
        if (tramp != addr) {
                printk(KERN_ERR
@@ -564,7 +564,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
        if (unlikely(atomic_read(&current->tracing_graph_pause)))
                return;
 
-#if CONFIG_PPC64
+#ifdef CONFIG_PPC64
        /* non core kernel code needs to save and restore the TOC */
        if (REGION_ID(self_addr) != KERNEL_REGION_ID)
                return_hooker = (unsigned long)&mod_return_to_handler;
index 5576147..8c1a496 100644 (file)
@@ -672,11 +672,13 @@ unsigned int irq_create_mapping(struct irq_host *host,
                        return NO_IRQ;
                }
        }
-       pr_debug("irq: -> obtained virq %d\n", virq);
 
        if (irq_setup_virq(host, virq, hwirq))
                return NO_IRQ;
 
+       printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n",
+               hwirq, host->of_node ? host->of_node->full_name : "null", virq);
+
        return virq;
 }
 EXPORT_SYMBOL_GPL(irq_create_mapping);
index 182e0f6..78b3f78 100644 (file)
@@ -434,6 +434,21 @@ static void pseries_cmo_data(struct seq_file *m)
        seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size());
 }
 
+static void splpar_dispatch_data(struct seq_file *m)
+{
+       int cpu;
+       unsigned long dispatches = 0;
+       unsigned long dispatch_dispersions = 0;
+
+       for_each_possible_cpu(cpu) {
+               dispatches += lppaca[cpu].yield_count;
+               dispatch_dispersions += lppaca[cpu].dispersion_count;
+       }
+
+       seq_printf(m, "dispatches=%lu\n", dispatches);
+       seq_printf(m, "dispatch_dispersions=%lu\n", dispatch_dispersions);
+}
+
 static int pseries_lparcfg_data(struct seq_file *m, void *v)
 {
        int partition_potential_processors;
@@ -460,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
                parse_ppp_data(m);
                parse_mpp_data(m);
                pseries_cmo_data(m);
+               splpar_dispatch_data(m);
 
                seq_printf(m, "purr=%ld\n", get_purr());
        } else {                /* non SPLPAR case */
index 3053fe5..b9530b2 100644 (file)
@@ -495,7 +495,15 @@ _GLOBAL(giveup_altivec)
        stvx    vr0,r4,r3
        beq     1f
        ld      r4,_MSR-STACK_FRAME_OVERHEAD(r5)
+#ifdef CONFIG_VSX
+BEGIN_FTR_SECTION
+       lis     r3,(MSR_VEC|MSR_VSX)@h
+FTR_SECTION_ELSE
+       lis     r3,MSR_VEC@h
+ALT_FTR_SECTION_END_IFSET(CPU_FTR_VSX)
+#else
        lis     r3,MSR_VEC@h
+#endif
        andc    r4,r4,r3                /* disable FP for previous task */
        std     r4,_MSR-STACK_FRAME_OVERHEAD(r5)
 1:
index 3f37a6e..87df428 100644 (file)
@@ -76,7 +76,7 @@ struct of_device* of_platform_device_create(struct device_node *np,
                return NULL;
 
        dev->dma_mask = 0xffffffffUL;
-       dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+       dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
        dev->dev.bus = &of_platform_bus_type;
 
index 2e026c0..2f0e64b 100644 (file)
@@ -614,7 +614,7 @@ static unsigned char ibm_architecture_vec[] = {
        W(0xffffffff),                  /* virt_base */
        W(0xffffffff),                  /* virt_size */
        W(0xffffffff),                  /* load_base */
-       W(64),                          /* 128MB min RMA */
+       W(64),                          /* 64MB min RMA */
        W(0xffffffff),                  /* full client load */
        0,                              /* min RMA percentage of total RAM */
        48,                             /* max log_2(hash table size) */
@@ -732,15 +732,17 @@ static void __init prom_send_capabilities(void)
        root = call_prom("open", 1, 1, ADDR("/"));
        if (root != 0) {
                /* try calling the ibm,client-architecture-support method */
+               prom_printf("Calling ibm,client-architecture...");
                if (call_prom_ret("call-method", 3, 2, &ret,
                                  ADDR("ibm,client-architecture-support"),
                                  root,
                                  ADDR(ibm_architecture_vec)) == 0) {
                        /* the call exists... */
                        if (ret)
-                               prom_printf("WARNING: ibm,client-architecture"
+                               prom_printf("\nWARNING: ibm,client-architecture"
                                            "-support call FAILED!\n");
                        call_prom("close", 1, 0, root);
+                       prom_printf(" done\n");
                        return;
                }
                call_prom("close", 1, 0, root);
@@ -1083,7 +1085,7 @@ static void __init prom_instantiate_rtas(void)
                return;
        }
 
-       prom_printf("instantiating rtas at 0x%x ...", base);
+       prom_printf("instantiating rtas at 0x%x...", base);
 
        if (call_prom_ret("call-method", 3, 2, &entry,
                          ADDR("instantiate-rtas"),
@@ -1495,7 +1497,7 @@ static int __init prom_find_machine_type(void)
                return PLATFORM_GENERIC;
        x = prom_getproplen(rtas, "ibm,hypertas-functions");
        if (x != PROM_ERROR) {
-               prom_printf("Hypertas detected, assuming LPAR !\n");
+               prom_debug("Hypertas detected, assuming LPAR !\n");
                return PLATFORM_PSERIES_LPAR;
        }
        return PLATFORM_PSERIES;
@@ -1544,7 +1546,7 @@ static void __init prom_check_displays(void)
        };
        const unsigned char *clut;
 
-       prom_printf("Looking for displays\n");
+       prom_debug("Looking for displays\n");
        for (node = 0; prom_next_node(&node); ) {
                memset(type, 0, sizeof(type));
                prom_getprop(node, "device_type", type, sizeof(type));
@@ -1562,7 +1564,7 @@ static void __init prom_check_displays(void)
                if (call_prom("package-to-path", 3, 1, node, path,
                              PROM_SCRATCH_SIZE-10) == PROM_ERROR)
                        continue;
-               prom_printf("found display   : %s, opening ... ", path);
+               prom_printf("found display   : %s, opening... ", path);
                
                ih = call_prom("open", 1, 1, path);
                if (ih == 0) {
@@ -2387,7 +2389,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
        /*
         * Now finally create the flattened device-tree
         */
-       prom_printf("copying OF device tree ...\n");
+       prom_printf("copying OF device tree...\n");
        flatten_device_tree();
 
        /*
@@ -2402,7 +2404,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
         * Call OF "quiesce" method to shut down pending DMA's from
         * devices etc...
         */
-       prom_printf("Calling quiesce ...\n");
+       prom_printf("Calling quiesce...\n");
        call_prom("quiesce", 0, 0);
 
        /*
index 197d49c..297632c 100644 (file)
@@ -67,7 +67,8 @@ static long compat_ptrace_old(struct task_struct *child, long request,
 /* Macros to workout the correct index for the FPR in the thread struct */
 #define FPRNUMBER(i) (((i) - PT_FPR0) >> 1)
 #define FPRHALF(i) (((i) - PT_FPR0) & 1)
-#define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) + FPRHALF(i)
+#define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) * 2 + FPRHALF(i)
+#define FPRINDEX_3264(i) (TS_FPRWIDTH * ((i) - PT_FPR0))
 
 long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        compat_ulong_t caddr, compat_ulong_t cdata)
@@ -168,8 +169,9 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                CHECK_FULL_REGS(child->thread.regs);
                if (numReg >= PT_FPR0) {
                        flush_fp_to_thread(child);
-                       tmp = ((unsigned long int *)child->thread.fpr)
-                               [FPRINDEX(numReg)];
+                       /* get 64 bit FPR */
+                       tmp = ((u64 *)child->thread.fpr)
+                               [FPRINDEX_3264(numReg)];
                } else { /* register within PT_REGS struct */
                        tmp = ptrace_get_reg(child, numReg);
                } 
@@ -262,8 +264,13 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                                freg = (freg & 0xfffffffful) | (data << 32);
                        ret = ptrace_put_reg(child, numReg, freg);
                } else {
+                       u64 *tmp;
                        flush_fp_to_thread(child);
-                       ((unsigned int *)child->thread.regs)[index] = data;
+                       /* get 64 bit FPR ... */
+                       tmp = &(((u64 *)child->thread.fpr)
+                               [FPRINDEX_3264(numReg)]);
+                       /* ... write the 32 bit part we want */
+                       ((u32 *)tmp)[index % 2] = data;
                        ret = 0;
                }
                break;
index 9774f9f..02fed27 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/percpu.h>
 #include <linux/lmb.h>
 #include <linux/of_platform.h>
-#include <linux/platform_device.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/processor.h>
index 5744527..bed4690 100644 (file)
@@ -644,7 +644,7 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
 
 static int dma_fixed_dma_supported(struct device *dev, u64 mask)
 {
-       return mask == DMA_64BIT_MASK;
+       return mask == DMA_BIT_MASK(64);
 }
 
 static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
index 6ed75bf..ff43f1f 100644 (file)
@@ -202,7 +202,7 @@ static struct iommu_table vio_iommu_table;
 void *iseries_hv_alloc(size_t size, dma_addr_t *dma_handle, gfp_t flag)
 {
        return iommu_alloc_coherent(NULL, &vio_iommu_table, size, dma_handle,
-                               DMA_32BIT_MASK, flag, -1);
+                               DMA_BIT_MASK(32), flag, -1);
 }
 EXPORT_SYMBOL_GPL(iseries_hv_alloc);
 
@@ -217,7 +217,7 @@ dma_addr_t iseries_hv_map(void *vaddr, size_t size,
 {
        return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr),
                              (unsigned long)vaddr % PAGE_SIZE, size,
-                             DMA_32BIT_MASK, direction, NULL);
+                             DMA_BIT_MASK(32), direction, NULL);
 }
 
 void iseries_hv_unmap(dma_addr_t dma_handle, size_t size,
index a705fff..9a73d02 100644 (file)
@@ -689,7 +689,7 @@ static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
 
 static int ps3_dma_supported(struct device *_dev, u64 mask)
 {
-       return mask >= DMA_32BIT_MASK;
+       return mask >= DMA_BIT_MASK(32);
 }
 
 static struct dma_mapping_ops ps3_sb_dma_ops = {
index 0494ee5..dceb8d1 100644 (file)
@@ -150,7 +150,7 @@ int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar)
 
        spin_lock_irqsave(&fsl_lbc_lock, flags);
 
-       out_be32(&fsl_lbc_regs->mar, mar << (32 - upm->width));
+       out_be32(&fsl_lbc_regs->mar, mar);
 
        switch (upm->width) {
        case 8:
index 532e205..21b9567 100644 (file)
@@ -1170,6 +1170,12 @@ struct mpic * __init mpic_alloc(struct device_node *node,
                        mb();
        }
 
+       /* CoreInt */
+       if (flags & MPIC_ENABLE_COREINT)
+               mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
+                          mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
+                          | MPIC_GREG_GCONF_COREINT);
+
        if (flags & MPIC_ENABLE_MCK)
                mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
                           mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
@@ -1525,6 +1531,34 @@ unsigned int mpic_get_irq(void)
        return mpic_get_one_irq(mpic);
 }
 
+unsigned int mpic_get_coreint_irq(void)
+{
+#ifdef CONFIG_BOOKE
+       struct mpic *mpic = mpic_primary;
+       u32 src;
+
+       BUG_ON(mpic == NULL);
+
+       src = mfspr(SPRN_EPR);
+
+       if (unlikely(src == mpic->spurious_vec)) {
+               if (mpic->flags & MPIC_SPV_EOI)
+                       mpic_eoi(mpic);
+               return NO_IRQ;
+       }
+       if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
+               if (printk_ratelimit())
+                       printk(KERN_WARNING "%s: Got protected source %d !\n",
+                              mpic->name, (int)src);
+               return NO_IRQ;
+       }
+
+       return irq_linear_revmap(mpic->irqhost, src);
+#else
+       return NO_IRQ;
+#endif
+}
+
 unsigned int mpic_get_mcirq(void)
 {
        struct mpic *mpic = mpic_primary;
index 031f038..b8eb71e 100644 (file)
 #define __NR_pipe2             321
 #define __NR_inotify_init1     322
 #define __NR_accept4           323
+#define __NR_preadv            324
+#define __NR_pwritev           325
 
-#define NR_SYSCALLS            324
+#define NR_SYSCALLS            326
 
 #ifdef __32bit_syscall_numbers__
 /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
index b4a12c9..27381f1 100644 (file)
@@ -99,8 +99,7 @@ static inline u64 of_read_addr(const u32 *cell, int size)
        return r;
 }
 
-static void __init get_cells(struct device_node *dp,
-                            int *addrc, int *sizec)
+static void get_cells(struct device_node *dp, int *addrc, int *sizec)
 {
        if (addrc)
                *addrc = of_n_addr_cells(dp);
index 9462b68..d53f45b 100644 (file)
@@ -409,8 +409,8 @@ static void pci_fire_hw_init(struct pci_pbm_info *pbm)
        upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB);
 }
 
-static int __init pci_fire_pbm_init(struct pci_pbm_info *pbm,
-                                   struct of_device *op, u32 portid)
+static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
+                                      struct of_device *op, u32 portid)
 {
        const struct linux_prom64_registers *regs;
        struct device_node *dp = op->node;
index 3b34344..142b9d6 100644 (file)
@@ -365,8 +365,8 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
        pci_config_write8(addr, 64);
 }
 
-static void __init psycho_scan_bus(struct pci_pbm_info *pbm,
-                                  struct device *parent)
+static void __devinit psycho_scan_bus(struct pci_pbm_info *pbm,
+                                     struct device *parent)
 {
        pbm_config_busmastering(pbm);
        pbm->is_66mhz_capable = 0;
@@ -482,8 +482,8 @@ static void psycho_pbm_strbuf_init(struct pci_pbm_info *pbm,
 #define PSYCHO_MEMSPACE_B      0x180000000UL
 #define PSYCHO_MEMSPACE_SIZE   0x07fffffffUL
 
-static void __init psycho_pbm_init(struct pci_pbm_info *pbm,
-                                  struct of_device *op, int is_pbm_a)
+static void __devinit psycho_pbm_init(struct pci_pbm_info *pbm,
+                                     struct of_device *op, int is_pbm_a)
 {
        psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO);
        psycho_pbm_strbuf_init(pbm, is_pbm_a);
index 713257b..ba6fbeb 100644 (file)
@@ -402,8 +402,8 @@ static void apb_init(struct pci_bus *sabre_bus)
        }
 }
 
-static void __init sabre_scan_bus(struct pci_pbm_info *pbm,
-                                 struct device *parent)
+static void __devinit sabre_scan_bus(struct pci_pbm_info *pbm,
+                                    struct device *parent)
 {
        static int once;
 
@@ -442,8 +442,8 @@ static void __init sabre_scan_bus(struct pci_pbm_info *pbm,
        sabre_register_error_handlers(pbm);
 }
 
-static void __init sabre_pbm_init(struct pci_pbm_info *pbm,
-                                 struct of_device *op)
+static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm,
+                                    struct of_device *op)
 {
        psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE);
        pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR;
index 0ef0ab3..5db5ebe 100644 (file)
@@ -545,8 +545,8 @@ static const struct dma_ops sun4v_dma_ops = {
        .sync_sg_for_cpu                = dma_4v_sync_sg_for_cpu,
 };
 
-static void __init pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
-                                     struct device *parent)
+static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
+                                        struct device *parent)
 {
        struct property *prop;
        struct device_node *dp;
@@ -559,8 +559,8 @@ static void __init pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
        /* XXX register error interrupt handlers XXX */
 }
 
-static unsigned long __init probe_existing_entries(struct pci_pbm_info *pbm,
-                                                  struct iommu *iommu)
+static unsigned long __devinit probe_existing_entries(struct pci_pbm_info *pbm,
+                                                     struct iommu *iommu)
 {
        struct iommu_arena *arena = &iommu->arena;
        unsigned long i, cnt = 0;
@@ -587,7 +587,7 @@ static unsigned long __init probe_existing_entries(struct pci_pbm_info *pbm,
        return cnt;
 }
 
-static int __init pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
+static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
 {
        static const u32 vdma_default[] = { 0x80000000, 0x80000000 };
        struct iommu *iommu = pbm->iommu;
@@ -889,8 +889,8 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
 }
 #endif /* !(CONFIG_PCI_MSI) */
 
-static int __init pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
-                                    struct of_device *op, u32 devhandle)
+static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
+                                       struct of_device *op, u32 devhandle)
 {
        struct device_node *dp = op->node;
        int err;
index ae88f06..e2a045c 100644 (file)
@@ -23,7 +23,7 @@ static irqreturn_t power_handler(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static int __init has_button_interrupt(unsigned int irq, struct device_node *dp)
+static int __devinit has_button_interrupt(unsigned int irq, struct device_node *dp)
 {
        if (irq == 0xffffffff)
                return 0;
index dccc95d..00ec3b1 100644 (file)
@@ -81,4 +81,4 @@ sys_call_table:
 /*305*/        .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
 /*310*/        .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
 /*315*/        .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
+/*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv, sys_pwritev
index a8000b1..82b5bf8 100644 (file)
@@ -82,7 +82,7 @@ sys_call_table32:
        .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait
 /*310*/        .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate
        .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
+/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv, compat_sys_pwritev
 
 #endif /* CONFIG_COMPAT */
 
@@ -156,4 +156,4 @@ sys_call_table:
        .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
 /*310*/        .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
        .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
+/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv, sys_pwritev
index 2c8dfeb..f26a352 100644 (file)
@@ -70,8 +70,8 @@ extern struct tsb swapper_4m_tsb[KERNEL_TSB4M_NENTRIES];
 
 #define MAX_BANKS      32
 
-static struct linux_prom64_registers pavail[MAX_BANKS] __initdata;
-static int pavail_ents __initdata;
+static struct linux_prom64_registers pavail[MAX_BANKS] __devinitdata;
+static int pavail_ents __devinitdata;
 
 static int cmp_p64(const void *a, const void *b)
 {
@@ -968,7 +968,7 @@ int of_node_to_nid(struct device_node *dp)
        return nid;
 }
 
-static void add_node_ranges(void)
+static void __init add_node_ranges(void)
 {
        int i;
 
@@ -1841,7 +1841,7 @@ void __init paging_init(void)
        printk("Booting Linux...\n");
 }
 
-int __init page_in_phys_avail(unsigned long paddr)
+int __devinit page_in_phys_avail(unsigned long paddr)
 {
        int i;
 
index 5b2196a..bc25b9f 100644 (file)
@@ -252,16 +252,13 @@ config SMP
 
 config X86_X2APIC
        bool "Support x2apic"
-       depends on X86_LOCAL_APIC && X86_64
+       depends on X86_LOCAL_APIC && X86_64 && INTR_REMAP
        ---help---
          This enables x2apic support on CPUs that have this feature.
 
          This allows 32-bit apic IDs (so it can support very large systems),
          and accesses the local apic via MSRs not via mmio.
 
-         ( On certain CPU models you may need to enable INTR_REMAP too,
-           to get functional x2apic mode. )
-
          If you don't know what to do here, say N.
 
 config SPARSE_IRQ
@@ -1881,7 +1878,6 @@ config DMAR_FLOPPY_WA
 config INTR_REMAP
        bool "Support for Interrupt Remapping (EXPERIMENTAL)"
        depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
-       select X86_X2APIC
        ---help---
          Supports Interrupt remapping for IO-APIC and MSI devices.
          To use x2apic mode in the CPU's which support x2APIC enhancements or
index 95d86ce..9e0587a 100644 (file)
@@ -129,22 +129,18 @@ u16 vga_crtc(void)
        return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4;
 }
 
-static void vga_set_480_scanlines(int lines)
+static void vga_set_480_scanlines(void)
 {
        u16 crtc;               /* CRTC base address */
        u8  csel;               /* CRTC miscellaneous output register */
-       u8  ovfw;               /* CRTC overflow register */
-       int end = lines-1;
 
        crtc = vga_crtc();
 
-       ovfw = 0x3c | ((end >> (8-1)) & 0x02) | ((end >> (9-6)) & 0x40);
-
        out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */
        out_idx(0x0b, crtc, 0x06); /* Vertical total */
-       out_idx(ovfw, crtc, 0x07); /* Vertical overflow */
+       out_idx(0x3e, crtc, 0x07); /* Vertical overflow */
        out_idx(0xea, crtc, 0x10); /* Vertical sync start */
-       out_idx(end,  crtc, 0x12); /* Vertical display end */
+       out_idx(0xdf, crtc, 0x12); /* Vertical display end */
        out_idx(0xe7, crtc, 0x15); /* Vertical blank start */
        out_idx(0x04, crtc, 0x16); /* Vertical blank end */
        csel = inb(0x3cc);
@@ -153,21 +149,38 @@ static void vga_set_480_scanlines(int lines)
        outb(csel, 0x3c2);
 }
 
+static void vga_set_vertical_end(int lines)
+{
+       u16 crtc;               /* CRTC base address */
+       u8  ovfw;               /* CRTC overflow register */
+       int end = lines-1;
+
+       crtc = vga_crtc();
+
+       ovfw = 0x3c | ((end >> (8-1)) & 0x02) | ((end >> (9-6)) & 0x40);
+
+       out_idx(ovfw, crtc, 0x07); /* Vertical overflow */
+       out_idx(end,  crtc, 0x12); /* Vertical display end */
+}
+
 static void vga_set_80x30(void)
 {
-       vga_set_480_scanlines(30*16);
+       vga_set_480_scanlines();
+       vga_set_vertical_end(30*16);
 }
 
 static void vga_set_80x34(void)
 {
+       vga_set_480_scanlines();
        vga_set_14font();
-       vga_set_480_scanlines(34*14);
+       vga_set_vertical_end(34*14);
 }
 
 static void vga_set_80x60(void)
 {
+       vga_set_480_scanlines();
        vga_set_8font();
-       vga_set_480_scanlines(60*8);
+       vga_set_vertical_end(60*8);
 }
 
 static int vga_set_mode(struct mode_info *mode)
index df8a300..42f2f83 100644 (file)
@@ -107,6 +107,9 @@ extern u32 native_safe_apic_wait_icr_idle(void);
 extern void native_apic_icr_write(u32 low, u32 id);
 extern u64 native_apic_icr_read(void);
 
+#define EIM_8BIT_APIC_ID       0
+#define EIM_32BIT_APIC_ID      1
+
 #ifdef CONFIG_X86_X2APIC
 /*
  * Make previous memory operations globally visible before
old mode 100755 (executable)
new mode 100644 (file)
index 0beba0d..bb83b1c 100644 (file)
  * CPUID levels like 0x6, 0xA etc
  */
 #define X86_FEATURE_IDA                (7*32+ 0) /* Intel Dynamic Acceleration */
+#define X86_FEATURE_ARAT       (7*32+ 1) /* Always Running APIC Timer */
 
 /* Virtualization flags: Linux defined */
 #define X86_FEATURE_TPR_SHADOW  (8*32+ 0) /* Intel TPR Shadow */
index cea7b74..f82fdc4 100644 (file)
@@ -238,7 +238,7 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
 
        dma_mask = dev->coherent_dma_mask;
        if (!dma_mask)
-               dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK;
+               dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32);
 
        return dma_mask;
 }
@@ -247,10 +247,10 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
 {
        unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
 
-       if (dma_mask <= DMA_24BIT_MASK)
+       if (dma_mask <= DMA_BIT_MASK(24))
                gfp |= GFP_DMA;
 #ifdef CONFIG_X86_64
-       if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
+       if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
                gfp |= GFP_DMA32;
 #endif
        return gfp;
index 81937a5..2d81af3 100644 (file)
@@ -151,11 +151,11 @@ extern pte_t *pkmap_page_table;
 
 void __native_set_fixmap(enum fixed_addresses idx, pte_t pte);
 void native_set_fixmap(enum fixed_addresses idx,
-                      unsigned long phys, pgprot_t flags);
+                      phys_addr_t phys, pgprot_t flags);
 
 #ifndef CONFIG_PARAVIRT
 static inline void __set_fixmap(enum fixed_addresses idx,
-                               unsigned long phys, pgprot_t flags)
+                               phys_addr_t phys, pgprot_t flags)
 {
        native_set_fixmap(idx, phys, flags);
 }
index 373cc2b..9d826e4 100644 (file)
@@ -162,10 +162,13 @@ extern int (*ioapic_renumber_irq)(int ioapic, int irq);
 extern void ioapic_init_mappings(void);
 
 #ifdef CONFIG_X86_64
-extern int save_IO_APIC_setup(void);
-extern void mask_IO_APIC_setup(void);
-extern void restore_IO_APIC_setup(void);
-extern void reinit_intr_remapped_IO_APIC(int);
+extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
+extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
+extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
+extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
+extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
+extern void reinit_intr_remapped_IO_APIC(int intr_remapping,
+       struct IO_APIC_route_entry **ioapic_entries);
 #endif
 
 extern void probe_nr_irqs_gsi(void);
index 7727aa8..378e369 100644 (file)
@@ -347,7 +347,7 @@ struct pv_mmu_ops {
        /* Sometimes the physical address is a pfn, and sometimes its
           an mfn.  We can tell which is which from the index. */
        void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
-                          unsigned long phys, pgprot_t flags);
+                          phys_addr_t phys, pgprot_t flags);
 };
 
 struct raw_spinlock;
@@ -1432,7 +1432,7 @@ static inline void arch_leave_lazy_mmu_mode(void)
 void arch_flush_lazy_mmu_mode(void);
 
 static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
-                               unsigned long phys, pgprot_t flags)
+                               phys_addr_t phys, pgprot_t flags)
 {
        pv_mmu_ops.set_fixmap(idx, phys, flags);
 }
index 85eb8e1..f287092 100644 (file)
@@ -431,6 +431,12 @@ static void __cpuinit setup_APIC_timer(void)
 {
        struct clock_event_device *levt = &__get_cpu_var(lapic_events);
 
+       if (cpu_has(&current_cpu_data, X86_FEATURE_ARAT)) {
+               lapic_clockevent.features &= ~CLOCK_EVT_FEAT_C3STOP;
+               /* Make LAPIC timer preferrable over percpu HPET */
+               lapic_clockevent.rating = 150;
+       }
+
        memcpy(levt, &lapic_clockevent, sizeof(*levt));
        levt->cpumask = cpumask_of(smp_processor_id());
 
@@ -1304,6 +1310,7 @@ void __init enable_IR_x2apic(void)
 #ifdef CONFIG_INTR_REMAP
        int ret;
        unsigned long flags;
+       struct IO_APIC_route_entry **ioapic_entries = NULL;
 
        if (!cpu_has_x2apic)
                return;
@@ -1334,17 +1341,23 @@ void __init enable_IR_x2apic(void)
                return;
        }
 
-       ret = save_IO_APIC_setup();
+       ioapic_entries = alloc_ioapic_entries();
+       if (!ioapic_entries) {
+               pr_info("Allocate ioapic_entries failed: %d\n", ret);
+               goto end;
+       }
+
+       ret = save_IO_APIC_setup(ioapic_entries);
        if (ret) {
                pr_info("Saving IO-APIC state failed: %d\n", ret);
                goto end;
        }
 
        local_irq_save(flags);
-       mask_IO_APIC_setup();
+       mask_IO_APIC_setup(ioapic_entries);
        mask_8259A();
 
-       ret = enable_intr_remapping(1);
+       ret = enable_intr_remapping(EIM_32BIT_APIC_ID);
 
        if (ret && x2apic_preenabled) {
                local_irq_restore(flags);
@@ -1364,9 +1377,9 @@ end_restore:
                /*
                 * IR enabling failed
                 */
-               restore_IO_APIC_setup();
+               restore_IO_APIC_setup(ioapic_entries);
        else
-               reinit_intr_remapped_IO_APIC(x2apic_preenabled);
+               reinit_intr_remapped_IO_APIC(x2apic_preenabled, ioapic_entries);
 
        unmask_8259A();
        local_irq_restore(flags);
@@ -1379,6 +1392,8 @@ end:
                        pr_info("Enabled Interrupt-remapping\n");
        } else
                pr_err("Failed to enable Interrupt-remapping and x2apic\n");
+       if (ioapic_entries)
+               free_ioapic_entries(ioapic_entries);
 #else
        if (!cpu_has_x2apic)
                return;
@@ -1954,6 +1969,10 @@ static int lapic_suspend(struct sys_device *dev, pm_message_t state)
 
        local_irq_save(flags);
        disable_local_APIC();
+#ifdef CONFIG_INTR_REMAP
+       if (intr_remapping_enabled)
+               disable_intr_remapping();
+#endif
        local_irq_restore(flags);
        return 0;
 }
@@ -1964,15 +1983,41 @@ static int lapic_resume(struct sys_device *dev)
        unsigned long flags;
        int maxlvt;
 
+#ifdef CONFIG_INTR_REMAP
+       int ret;
+       struct IO_APIC_route_entry **ioapic_entries = NULL;
+
        if (!apic_pm_state.active)
                return 0;
 
-       maxlvt = lapic_get_maxlvt();
-
        local_irq_save(flags);
+       if (x2apic) {
+               ioapic_entries = alloc_ioapic_entries();
+               if (!ioapic_entries) {
+                       WARN(1, "Alloc ioapic_entries in lapic resume failed.");
+                       return -ENOMEM;
+               }
+
+               ret = save_IO_APIC_setup(ioapic_entries);
+               if (ret) {
+                       WARN(1, "Saving IO-APIC state failed: %d\n", ret);
+                       free_ioapic_entries(ioapic_entries);
+                       return ret;
+               }
+
+               mask_IO_APIC_setup(ioapic_entries);
+               mask_8259A();
+               enable_x2apic();
+       }
+#else
+       if (!apic_pm_state.active)
+               return 0;
 
+       local_irq_save(flags);
        if (x2apic)
                enable_x2apic();
+#endif
+
        else {
                /*
                 * Make sure the APICBASE points to the right address
@@ -1986,6 +2031,7 @@ static int lapic_resume(struct sys_device *dev)
                wrmsr(MSR_IA32_APICBASE, l, h);
        }
 
+       maxlvt = lapic_get_maxlvt();
        apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
        apic_write(APIC_ID, apic_pm_state.apic_id);
        apic_write(APIC_DFR, apic_pm_state.apic_dfr);
@@ -2009,8 +2055,20 @@ static int lapic_resume(struct sys_device *dev)
        apic_write(APIC_ESR, 0);
        apic_read(APIC_ESR);
 
+#ifdef CONFIG_INTR_REMAP
+       if (intr_remapping_enabled)
+               reenable_intr_remapping(EIM_32BIT_APIC_ID);
+
+       if (x2apic) {
+               unmask_8259A();
+               restore_IO_APIC_setup(ioapic_entries);
+               free_ioapic_entries(ioapic_entries);
+       }
+#endif
+
        local_irq_restore(flags);
 
+
        return 0;
 }
 
@@ -2048,7 +2106,9 @@ static int __init init_lapic_sysfs(void)
                error = sysdev_register(&device_lapic);
        return error;
 }
-device_initcall(init_lapic_sysfs);
+
+/* local apic needs to resume before other devices access its registers. */
+core_initcall(init_lapic_sysfs);
 
 #else  /* CONFIG_PM */
 
index 0014714..306e5e8 100644 (file)
@@ -212,7 +212,7 @@ struct apic apic_flat =  {
        .trampoline_phys_high           = DEFAULT_TRAMPOLINE_PHYS_HIGH,
        .wait_for_init_deassert         = NULL,
        .smp_callin_clear_local_apic    = NULL,
-       .inquire_remote_apic            = NULL,
+       .inquire_remote_apic            = default_inquire_remote_apic,
 
        .read                           = native_apic_mem_read,
        .write                          = native_apic_mem_write,
@@ -362,7 +362,7 @@ struct apic apic_physflat =  {
        .trampoline_phys_high           = DEFAULT_TRAMPOLINE_PHYS_HIGH,
        .wait_for_init_deassert         = NULL,
        .smp_callin_clear_local_apic    = NULL,
-       .inquire_remote_apic            = NULL,
+       .inquire_remote_apic            = default_inquire_remote_apic,
 
        .read                           = native_apic_mem_read,
        .write                          = native_apic_mem_write,
index 1bb5c6c..767fe7e 100644 (file)
@@ -851,63 +851,74 @@ __setup("pirq=", ioapic_pirq_setup);
 #endif /* CONFIG_X86_32 */
 
 #ifdef CONFIG_INTR_REMAP
-/* I/O APIC RTE contents at the OS boot up */
-static struct IO_APIC_route_entry *early_ioapic_entries[MAX_IO_APICS];
+struct IO_APIC_route_entry **alloc_ioapic_entries(void)
+{
+       int apic;
+       struct IO_APIC_route_entry **ioapic_entries;
+
+       ioapic_entries = kzalloc(sizeof(*ioapic_entries) * nr_ioapics,
+                               GFP_ATOMIC);
+       if (!ioapic_entries)
+               return 0;
+
+       for (apic = 0; apic < nr_ioapics; apic++) {
+               ioapic_entries[apic] =
+                       kzalloc(sizeof(struct IO_APIC_route_entry) *
+                               nr_ioapic_registers[apic], GFP_ATOMIC);
+               if (!ioapic_entries[apic])
+                       goto nomem;
+       }
+
+       return ioapic_entries;
+
+nomem:
+       while (--apic >= 0)
+               kfree(ioapic_entries[apic]);
+       kfree(ioapic_entries);
+
+       return 0;
+}
 
 /*
  * Saves all the IO-APIC RTE's
  */
-int save_IO_APIC_setup(void)
+int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
 {
-       union IO_APIC_reg_01 reg_01;
-       unsigned long flags;
        int apic, pin;
 
-       /*
-        * The number of IO-APIC IRQ registers (== #pins):
-        */
-       for (apic = 0; apic < nr_ioapics; apic++) {
-               spin_lock_irqsave(&ioapic_lock, flags);
-               reg_01.raw = io_apic_read(apic, 1);
-               spin_unlock_irqrestore(&ioapic_lock, flags);
-               nr_ioapic_registers[apic] = reg_01.bits.entries+1;
-       }
+       if (!ioapic_entries)
+               return -ENOMEM;
 
        for (apic = 0; apic < nr_ioapics; apic++) {
-               early_ioapic_entries[apic] =
-                       kzalloc(sizeof(struct IO_APIC_route_entry) *
-                               nr_ioapic_registers[apic], GFP_KERNEL);
-               if (!early_ioapic_entries[apic])
-                       goto nomem;
-       }
+               if (!ioapic_entries[apic])
+                       return -ENOMEM;
 
-       for (apic = 0; apic < nr_ioapics; apic++)
                for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
-                       early_ioapic_entries[apic][pin] =
+                       ioapic_entries[apic][pin] =
                                ioapic_read_entry(apic, pin);
+       }
 
        return 0;
-
-nomem:
-       while (apic >= 0)
-               kfree(early_ioapic_entries[apic--]);
-       memset(early_ioapic_entries, 0,
-               ARRAY_SIZE(early_ioapic_entries));
-
-       return -ENOMEM;
 }
 
-void mask_IO_APIC_setup(void)
+/*
+ * Mask all IO APIC entries.
+ */
+void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
 {
        int apic, pin;
 
+       if (!ioapic_entries)
+               return;
+
        for (apic = 0; apic < nr_ioapics; apic++) {
-               if (!early_ioapic_entries[apic])
+               if (!ioapic_entries[apic])
                        break;
+
                for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
                        struct IO_APIC_route_entry entry;
 
-                       entry = early_ioapic_entries[apic][pin];
+                       entry = ioapic_entries[apic][pin];
                        if (!entry.mask) {
                                entry.mask = 1;
                                ioapic_write_entry(apic, pin, entry);
@@ -916,22 +927,30 @@ void mask_IO_APIC_setup(void)
        }
 }
 
-void restore_IO_APIC_setup(void)
+/*
+ * Restore IO APIC entries which was saved in ioapic_entries.
+ */
+int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
 {
        int apic, pin;
 
+       if (!ioapic_entries)
+               return -ENOMEM;
+
        for (apic = 0; apic < nr_ioapics; apic++) {
-               if (!early_ioapic_entries[apic])
-                       break;
+               if (!ioapic_entries[apic])
+                       return -ENOMEM;
+
                for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
                        ioapic_write_entry(apic, pin,
-                                          early_ioapic_entries[apic][pin]);
-               kfree(early_ioapic_entries[apic]);
-               early_ioapic_entries[apic] = NULL;
+                                       ioapic_entries[apic][pin]);
        }
+       return 0;
 }
 
-void reinit_intr_remapped_IO_APIC(int intr_remapping)
+void reinit_intr_remapped_IO_APIC(int intr_remapping,
+       struct IO_APIC_route_entry **ioapic_entries)
+
 {
        /*
         * for now plain restore of previous settings.
@@ -940,7 +959,17 @@ void reinit_intr_remapped_IO_APIC(int intr_remapping)
         * table entries. for now, do a plain restore, and wait for
         * the setup_IO_APIC_irqs() to do proper initialization.
         */
-       restore_IO_APIC_setup();
+       restore_IO_APIC_setup(ioapic_entries);
+}
+
+void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries)
+{
+       int apic;
+
+       for (apic = 0; apic < nr_ioapics; apic++)
+               kfree(ioapic_entries[apic]);
+
+       kfree(ioapic_entries);
 }
 #endif
 
@@ -2495,7 +2524,7 @@ static void irq_complete_move(struct irq_desc **descp)
 static inline void irq_complete_move(struct irq_desc **descp) {}
 #endif
 
-#ifdef CONFIG_INTR_REMAP
+#ifdef CONFIG_X86_X2APIC
 static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
 {
        int apic, pin;
@@ -2540,7 +2569,6 @@ static void ack_x2apic_edge(unsigned int irq)
 {
        ack_x2APIC_irq();
 }
-
 #endif
 
 static void ack_apic_edge(unsigned int irq)
@@ -2651,6 +2679,26 @@ static void ack_apic_level(unsigned int irq)
 #endif
 }
 
+#ifdef CONFIG_INTR_REMAP
+static void ir_ack_apic_edge(unsigned int irq)
+{
+#ifdef CONFIG_X86_X2APIC
+       if (x2apic_enabled())
+               return ack_x2apic_edge(irq);
+#endif
+       return ack_apic_edge(irq);
+}
+
+static void ir_ack_apic_level(unsigned int irq)
+{
+#ifdef CONFIG_X86_X2APIC
+       if (x2apic_enabled())
+               return ack_x2apic_level(irq);
+#endif
+       return ack_apic_level(irq);
+}
+#endif /* CONFIG_INTR_REMAP */
+
 static struct irq_chip ioapic_chip __read_mostly = {
        .name           = "IO-APIC",
        .startup        = startup_ioapic_irq,
@@ -2670,8 +2718,8 @@ static struct irq_chip ir_ioapic_chip __read_mostly = {
        .mask           = mask_IO_APIC_irq,
        .unmask         = unmask_IO_APIC_irq,
 #ifdef CONFIG_INTR_REMAP
-       .ack            = ack_x2apic_edge,
-       .eoi            = ack_x2apic_level,
+       .ack            = ir_ack_apic_edge,
+       .eoi            = ir_ack_apic_level,
 #ifdef CONFIG_SMP
        .set_affinity   = set_ir_ioapic_affinity_irq,
 #endif
@@ -3397,7 +3445,7 @@ static struct irq_chip msi_ir_chip = {
        .unmask         = unmask_msi_irq,
        .mask           = mask_msi_irq,
 #ifdef CONFIG_INTR_REMAP
-       .ack            = ack_x2apic_edge,
+       .ack            = ir_ack_apic_edge,
 #ifdef CONFIG_SMP
        .set_affinity   = ir_set_msi_irq_affinity,
 #endif
index 8220ae6..c965e52 100644 (file)
@@ -31,6 +31,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
 
        static const struct cpuid_bit __cpuinitconst cpuid_bits[] = {
                { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
+               { X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006 },
                { 0, 0, 0, 0 }
        };
 
old mode 100755 (executable)
new mode 100644 (file)
index 19f6b9d..9d3af38 100644 (file)
@@ -68,6 +68,7 @@ struct acpi_cpufreq_data {
        unsigned int max_freq;
        unsigned int resume;
        unsigned int cpu_feature;
+       u64 saved_aperf, saved_mperf;
 };
 
 static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data);
@@ -241,26 +242,23 @@ static u32 get_cur_val(const struct cpumask *mask)
        return cmd.val;
 }
 
-struct perf_cur {
+struct perf_pair {
        union {
                struct {
                        u32 lo;
                        u32 hi;
                } split;
                u64 whole;
-       } aperf_cur, mperf_cur;
+       } aperf, mperf;
 };
 
 
 static long read_measured_perf_ctrs(void *_cur)
 {
-       struct perf_cur *cur = _cur;
+       struct perf_pair *cur = _cur;
 
-       rdmsr(MSR_IA32_APERF, cur->aperf_cur.split.lo, cur->aperf_cur.split.hi);
-       rdmsr(MSR_IA32_MPERF, cur->mperf_cur.split.lo, cur->mperf_cur.split.hi);
-
-       wrmsr(MSR_IA32_APERF, 0, 0);
-       wrmsr(MSR_IA32_MPERF, 0, 0);
+       rdmsr(MSR_IA32_APERF, cur->aperf.split.lo, cur->aperf.split.hi);
+       rdmsr(MSR_IA32_MPERF, cur->mperf.split.lo, cur->mperf.split.hi);
 
        return 0;
 }
@@ -281,52 +279,57 @@ static long read_measured_perf_ctrs(void *_cur)
 static unsigned int get_measured_perf(struct cpufreq_policy *policy,
                                      unsigned int cpu)
 {
-       struct perf_cur cur;
+       struct perf_pair readin, cur;
        unsigned int perf_percent;
        unsigned int retval;
 
-       if (!work_on_cpu(cpu, read_measured_perf_ctrs, &cur))
+       if (!work_on_cpu(cpu, read_measured_perf_ctrs, &readin))
                return 0;
 
+       cur.aperf.whole = readin.aperf.whole -
+                               per_cpu(drv_data, cpu)->saved_aperf;
+       cur.mperf.whole = readin.mperf.whole -
+                               per_cpu(drv_data, cpu)->saved_mperf;
+       per_cpu(drv_data, cpu)->saved_aperf = readin.aperf.whole;
+       per_cpu(drv_data, cpu)->saved_mperf = readin.mperf.whole;
+
 #ifdef __i386__
        /*
         * We dont want to do 64 bit divide with 32 bit kernel
         * Get an approximate value. Return failure in case we cannot get
         * an approximate value.
         */
-       if (unlikely(cur.aperf_cur.split.hi || cur.mperf_cur.split.hi)) {
+       if (unlikely(cur.aperf.split.hi || cur.mperf.split.hi)) {
                int shift_count;
                u32 h;
 
-               h = max_t(u32, cur.aperf_cur.split.hi, cur.mperf_cur.split.hi);
+               h = max_t(u32, cur.aperf.split.hi, cur.mperf.split.hi);
                shift_count = fls(h);
 
-               cur.aperf_cur.whole >>= shift_count;
-               cur.mperf_cur.whole >>= shift_count;
+               cur.aperf.whole >>= shift_count;
+               cur.mperf.whole >>= shift_count;
        }
 
-       if (((unsigned long)(-1) / 100) < cur.aperf_cur.split.lo) {
+       if (((unsigned long)(-1) / 100) < cur.aperf.split.lo) {
                int shift_count = 7;
-               cur.aperf_cur.split.lo >>= shift_count;
-               cur.mperf_cur.split.lo >>= shift_count;
+               cur.aperf.split.lo >>= shift_count;
+               cur.mperf.split.lo >>= shift_count;
        }
 
-       if (cur.aperf_cur.split.lo && cur.mperf_cur.split.lo)
-               perf_percent = (cur.aperf_cur.split.lo * 100) /
-                               cur.mperf_cur.split.lo;
+       if (cur.aperf.split.lo && cur.mperf.split.lo)
+               perf_percent = (cur.aperf.split.lo * 100) / cur.mperf.split.lo;
        else
                perf_percent = 0;
 
 #else
-       if (unlikely(((unsigned long)(-1) / 100) < cur.aperf_cur.whole)) {
+       if (unlikely(((unsigned long)(-1) / 100) < cur.aperf.whole)) {
                int shift_count = 7;
-               cur.aperf_cur.whole >>= shift_count;
-               cur.mperf_cur.whole >>= shift_count;
+               cur.aperf.whole >>= shift_count;
+               cur.mperf.whole >>= shift_count;
        }
 
-       if (cur.aperf_cur.whole && cur.mperf_cur.whole)
-               perf_percent = (cur.aperf_cur.whole * 100) /
-                               cur.mperf_cur.whole;
+       if (cur.aperf.whole && cur.mperf.whole)
+               perf_percent = (cur.aperf.whole * 100) / cur.mperf.whole;
        else
                perf_percent = 0;
 
index 0bd48e6..ce2ed3e 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/timex.h>
 #include <linux/io.h>
 #include <linux/acpi.h>
-#include <linux/kernel.h>
 
 #include <asm/msr.h>
 #include <acpi/processor.h>
index 61df775..18dfa30 100644 (file)
 #include <linux/init.h>
 #include <linux/list.h>
 
+#include <trace/syscall.h>
+
 #include <asm/cacheflush.h>
 #include <asm/ftrace.h>
-#include <linux/ftrace.h>
 #include <asm/nops.h>
 #include <asm/nmi.h>
 
index 3aaf7b9..c3fe010 100644 (file)
@@ -65,7 +65,7 @@ static int show_other_interrupts(struct seq_file *p, int prec)
        seq_printf(p, "  Spurious interrupts\n");
 #endif
        if (generic_interrupt_extension) {
-               seq_printf(p, "PLT: ");
+               seq_printf(p, "%*s: ", prec, "PLT");
                for_each_online_cpu(j)
                        seq_printf(p, "%10u ", irq_stats(j)->generic_irqs);
                seq_printf(p, "  Platform interrupts\n");
index 90f5b9e..745579b 100644 (file)
@@ -40,7 +40,7 @@ EXPORT_SYMBOL(bad_dma_address);
    to older i386. */
 struct device x86_dma_fallback_dev = {
        .init_name = "fallback device",
-       .coherent_dma_mask = DMA_32BIT_MASK,
+       .coherent_dma_mask = DMA_BIT_MASK(32),
        .dma_mask = &x86_dma_fallback_dev.coherent_dma_mask,
 };
 EXPORT_SYMBOL(x86_dma_fallback_dev);
@@ -148,7 +148,7 @@ again:
        if (!is_buffer_dma_capable(dma_mask, addr, size)) {
                __free_pages(page, get_order(size));
 
-               if (dma_mask < DMA_32BIT_MASK && !(flag & GFP_DMA)) {
+               if (dma_mask < DMA_BIT_MASK(32) && !(flag & GFP_DMA)) {
                        flag = (flag & ~GFP_DMA32) | GFP_DMA;
                        goto again;
                }
@@ -243,7 +243,7 @@ int dma_supported(struct device *dev, u64 mask)
        /* Copied from i386. Doesn't make much sense, because it will
           only work for pci_alloc_coherent.
           The caller just has to use GFP_DMA in this case. */
-       if (mask < DMA_24BIT_MASK)
+       if (mask < DMA_BIT_MASK(24))
                return 0;
 
        /* Tell the device to use SAC when IOMMU force is on.  This
@@ -258,7 +258,7 @@ int dma_supported(struct device *dev, u64 mask)
           SAC for these.  Assume all masks <= 40 bits are of this
           type. Normally this doesn't make any difference, but gives
           more gentle handling of IOMMU overflow. */
-       if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
+       if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
                dev_info(dev, "Force SAC with mask %Lx\n", mask);
                return 0;
        }
index c6d703b..71d412a 100644 (file)
@@ -15,7 +15,7 @@ static int
 check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
 {
        if (hwdev && !is_buffer_dma_capable(*hwdev->dma_mask, bus, size)) {
-               if (*hwdev->dma_mask >= DMA_32BIT_MASK)
+               if (*hwdev->dma_mask >= DMA_BIT_MASK(32))
                        printk(KERN_ERR
                            "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
                                name, (long long)bus, size,
index fe9345c..23b7c8f 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/audit.h>
 #include <linux/seccomp.h>
 #include <linux/signal.h>
-#include <linux/ftrace.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -35,6 +34,8 @@
 #include <asm/proto.h>
 #include <asm/ds.h>
 
+#include <trace/syscall.h>
+
 #include "tls.h"
 
 enum x86_regset {
index 2aef36d..1340dad 100644 (file)
@@ -224,6 +224,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "Dell XPS710"),
                },
        },
+       {       /* Handle problems with rebooting on Dell DXP061 */
+               .callback = set_bios_reboot,
+               .ident = "Dell DXP061",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Dell DXP061"),
+               },
+       },
        { }
 };
 
index 5b7c7c8..7aa03a5 100644 (file)
@@ -345,7 +345,8 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
        fixmaps_set++;
 }
 
-void native_set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
+void native_set_fixmap(enum fixed_addresses idx, phys_addr_t phys,
+                      pgprot_t flags)
 {
        __native_set_fixmap(idx, pfn_pte(phys >> PAGE_SHIFT, flags));
 }
index db3802f..2a81838 100644 (file)
@@ -1750,7 +1750,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
 }
 #endif /* CONFIG_X86_64 */
 
-static void xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot)
+static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
 {
        pte_t pte;
 
index 2557280..07ab754 100644 (file)
@@ -64,12 +64,11 @@ static struct workqueue_struct *kblockd_workqueue;
 
 static void drive_stat_acct(struct request *rq, int new_io)
 {
-       struct gendisk *disk = rq->rq_disk;
        struct hd_struct *part;
        int rw = rq_data_dir(rq);
        int cpu;
 
-       if (!blk_fs_request(rq) || !disk || !blk_do_io_stat(disk->queue))
+       if (!blk_fs_request(rq) || !blk_do_io_stat(rq))
                return;
 
        cpu = part_stat_lock();
@@ -132,6 +131,7 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
        INIT_HLIST_NODE(&rq->hash);
        RB_CLEAR_NODE(&rq->rb_node);
        rq->cmd = rq->__cmd;
+       rq->cmd_len = BLK_MAX_CDB;
        rq->tag = -1;
        rq->ref_count = 1;
 }
@@ -1124,8 +1124,6 @@ void init_request_from_bio(struct request *req, struct bio *bio)
 
        if (bio_sync(bio))
                req->cmd_flags |= REQ_RW_SYNC;
-       if (bio_unplug(bio))
-               req->cmd_flags |= REQ_UNPLUG;
        if (bio_rw_meta(bio))
                req->cmd_flags |= REQ_RW_META;
        if (bio_noidle(bio))
@@ -1675,9 +1673,7 @@ EXPORT_SYMBOL(blkdev_dequeue_request);
 
 static void blk_account_io_completion(struct request *req, unsigned int bytes)
 {
-       struct gendisk *disk = req->rq_disk;
-
-       if (!disk || !blk_do_io_stat(disk->queue))
+       if (!blk_do_io_stat(req))
                return;
 
        if (blk_fs_request(req)) {
@@ -1694,9 +1690,7 @@ static void blk_account_io_completion(struct request *req, unsigned int bytes)
 
 static void blk_account_io_done(struct request *req)
 {
-       struct gendisk *disk = req->rq_disk;
-
-       if (!disk || !blk_do_io_stat(disk->queue))
+       if (!blk_do_io_stat(req))
                return;
 
        /*
@@ -1711,7 +1705,7 @@ static void blk_account_io_done(struct request *req)
                int cpu;
 
                cpu = part_stat_lock();
-               part = disk_map_sector_rcu(disk, req->sector);
+               part = disk_map_sector_rcu(req->rq_disk, req->sector);
 
                part_stat_inc(cpu, part, ios[rw]);
                part_stat_add(cpu, part, ticks[rw], duration);
index e39cb24..63760ca 100644 (file)
@@ -338,6 +338,22 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
        return 1;
 }
 
+static void blk_account_io_merge(struct request *req)
+{
+       if (blk_do_io_stat(req)) {
+               struct hd_struct *part;
+               int cpu;
+
+               cpu = part_stat_lock();
+               part = disk_map_sector_rcu(req->rq_disk, req->sector);
+
+               part_round_stats(cpu, part);
+               part_dec_in_flight(part);
+
+               part_stat_unlock();
+       }
+}
+
 /*
  * Has to be called with the request spinlock acquired
  */
@@ -386,18 +402,7 @@ static int attempt_merge(struct request_queue *q, struct request *req,
 
        elv_merge_requests(q, req, next);
 
-       if (req->rq_disk) {
-               struct hd_struct *part;
-               int cpu;
-
-               cpu = part_stat_lock();
-               part = disk_map_sector_rcu(req->rq_disk, req->sector);
-
-               part_round_stats(cpu, part);
-               part_dec_in_flight(part);
-
-               part_stat_unlock();
-       }
+       blk_account_io_merge(req);
 
        req->ioprio = ioprio_best(req->ioprio, next->ioprio);
        if (blk_rq_cpu_valid(next))
index 59fd05d..69c42ad 100644 (file)
@@ -431,7 +431,7 @@ EXPORT_SYMBOL(blk_queue_segment_boundary);
  *
  * description:
  *    set required memory and length alignment for direct dma transactions.
- *    this is used when buiding direct io requests for the queue.
+ *    this is used when building direct io requests for the queue.
  *
  **/
 void blk_queue_dma_alignment(struct request_queue *q, int mask)
index 3ff9bba..73f36be 100644 (file)
@@ -209,10 +209,14 @@ static ssize_t queue_iostats_store(struct request_queue *q, const char *page,
        ssize_t ret = queue_var_store(&stats, page, count);
 
        spin_lock_irq(q->queue_lock);
+       elv_quisce_start(q);
+
        if (stats)
                queue_flag_set(QUEUE_FLAG_IO_STAT, q);
        else
                queue_flag_clear(QUEUE_FLAG_IO_STAT, q);
+
+       elv_quisce_end(q);
        spin_unlock_irq(q->queue_lock);
 
        return ret;
index 3ee9435..24fcaee 100644 (file)
@@ -70,6 +70,10 @@ void blk_queue_congestion_threshold(struct request_queue *q);
 
 int blk_dev_init(void);
 
+void elv_quisce_start(struct request_queue *q);
+void elv_quisce_end(struct request_queue *q);
+
+
 /*
  * Return the threshold (number of used requests) at which the queue is
  * considered to be congested.  It include a little hysteresis to keep the
@@ -108,12 +112,14 @@ static inline int blk_cpu_to_group(int cpu)
 #endif
 }
 
-static inline int blk_do_io_stat(struct request_queue *q)
+static inline int blk_do_io_stat(struct request *rq)
 {
-       if (q)
-               return blk_queue_io_stat(q);
+       struct gendisk *disk = rq->rq_disk;
 
-       return 0;
+       if (!disk || !disk->queue)
+               return 0;
+
+       return blk_queue_io_stat(disk->queue) && (rq->cmd_flags & REQ_ELVPRIV);
 }
 
 #endif
index 9e80934..a4809de 100644 (file)
@@ -160,6 +160,7 @@ struct cfq_queue {
 
        unsigned long slice_end;
        long slice_resid;
+       unsigned int slice_dispatch;
 
        /* pending metadata requests */
        int meta_pending;
@@ -176,13 +177,12 @@ struct cfq_queue {
 enum cfqq_state_flags {
        CFQ_CFQQ_FLAG_on_rr = 0,        /* on round-robin busy list */
        CFQ_CFQQ_FLAG_wait_request,     /* waiting for a request */
+       CFQ_CFQQ_FLAG_must_dispatch,    /* must be allowed a dispatch */
        CFQ_CFQQ_FLAG_must_alloc,       /* must be allowed rq alloc */
        CFQ_CFQQ_FLAG_must_alloc_slice, /* per-slice must_alloc flag */
-       CFQ_CFQQ_FLAG_must_dispatch,    /* must dispatch, even if expired */
        CFQ_CFQQ_FLAG_fifo_expire,      /* FIFO checked in this slice */
        CFQ_CFQQ_FLAG_idle_window,      /* slice idling enabled */
        CFQ_CFQQ_FLAG_prio_changed,     /* task priority has changed */
-       CFQ_CFQQ_FLAG_queue_new,        /* queue never been serviced */
        CFQ_CFQQ_FLAG_slice_new,        /* no requests dispatched in slice */
        CFQ_CFQQ_FLAG_sync,             /* synchronous queue */
 };
@@ -203,13 +203,12 @@ static inline int cfq_cfqq_##name(const struct cfq_queue *cfqq)           \
 
 CFQ_CFQQ_FNS(on_rr);
 CFQ_CFQQ_FNS(wait_request);
+CFQ_CFQQ_FNS(must_dispatch);
 CFQ_CFQQ_FNS(must_alloc);
 CFQ_CFQQ_FNS(must_alloc_slice);
-CFQ_CFQQ_FNS(must_dispatch);
 CFQ_CFQQ_FNS(fifo_expire);
 CFQ_CFQQ_FNS(idle_window);
 CFQ_CFQQ_FNS(prio_changed);
-CFQ_CFQQ_FNS(queue_new);
 CFQ_CFQQ_FNS(slice_new);
 CFQ_CFQQ_FNS(sync);
 #undef CFQ_CFQQ_FNS
@@ -774,10 +773,15 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd,
        if (cfqq) {
                cfq_log_cfqq(cfqd, cfqq, "set_active");
                cfqq->slice_end = 0;
+               cfqq->slice_dispatch = 0;
+
+               cfq_clear_cfqq_wait_request(cfqq);
+               cfq_clear_cfqq_must_dispatch(cfqq);
                cfq_clear_cfqq_must_alloc_slice(cfqq);
                cfq_clear_cfqq_fifo_expire(cfqq);
                cfq_mark_cfqq_slice_new(cfqq);
-               cfq_clear_cfqq_queue_new(cfqq);
+
+               del_timer(&cfqd->idle_slice_timer);
        }
 
        cfqd->active_queue = cfqq;
@@ -795,7 +799,6 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
        if (cfq_cfqq_wait_request(cfqq))
                del_timer(&cfqd->idle_slice_timer);
 
-       cfq_clear_cfqq_must_dispatch(cfqq);
        cfq_clear_cfqq_wait_request(cfqq);
 
        /*
@@ -924,7 +927,6 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
            (sample_valid(cic->ttime_samples) && cic->ttime_mean > 2))
                return;
 
-       cfq_mark_cfqq_must_dispatch(cfqq);
        cfq_mark_cfqq_wait_request(cfqq);
 
        /*
@@ -1010,7 +1012,7 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd)
        /*
         * The active queue has run out of time, expire it and select new.
         */
-       if (cfq_slice_used(cfqq))
+       if (cfq_slice_used(cfqq) && !cfq_cfqq_must_dispatch(cfqq))
                goto expire;
 
        /*
@@ -1053,66 +1055,6 @@ keep_queue:
        return cfqq;
 }
 
-/*
- * Dispatch some requests from cfqq, moving them to the request queue
- * dispatch list.
- */
-static int
-__cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq,
-                       int max_dispatch)
-{
-       int dispatched = 0;
-
-       BUG_ON(RB_EMPTY_ROOT(&cfqq->sort_list));
-
-       do {
-               struct request *rq;
-
-               /*
-                * follow expired path, else get first next available
-                */
-               rq = cfq_check_fifo(cfqq);
-               if (rq == NULL)
-                       rq = cfqq->next_rq;
-
-               /*
-                * finally, insert request into driver dispatch list
-                */
-               cfq_dispatch_insert(cfqd->queue, rq);
-
-               dispatched++;
-
-               if (!cfqd->active_cic) {
-                       atomic_inc(&RQ_CIC(rq)->ioc->refcount);
-                       cfqd->active_cic = RQ_CIC(rq);
-               }
-
-               if (RB_EMPTY_ROOT(&cfqq->sort_list))
-                       break;
-
-               /*
-                * If there is a non-empty RT cfqq waiting for current
-                * cfqq's timeslice to complete, pre-empt this cfqq
-                */
-               if (!cfq_class_rt(cfqq) && cfqd->busy_rt_queues)
-                       break;
-
-       } while (dispatched < max_dispatch);
-
-       /*
-        * expire an async queue immediately if it has used up its slice. idle
-        * queue always expire after 1 dispatch round.
-        */
-       if (cfqd->busy_queues > 1 && ((!cfq_cfqq_sync(cfqq) &&
-           dispatched >= cfq_prio_to_maxrq(cfqd, cfqq)) ||
-           cfq_class_idle(cfqq))) {
-               cfqq->slice_end = jiffies + 1;
-               cfq_slice_expired(cfqd, 0);
-       }
-
-       return dispatched;
-}
-
 static int __cfq_forced_dispatch_cfqq(struct cfq_queue *cfqq)
 {
        int dispatched = 0;
@@ -1146,11 +1088,45 @@ static int cfq_forced_dispatch(struct cfq_data *cfqd)
        return dispatched;
 }
 
+/*
+ * Dispatch a request from cfqq, moving them to the request queue
+ * dispatch list.
+ */
+static void cfq_dispatch_request(struct cfq_data *cfqd, struct cfq_queue *cfqq)
+{
+       struct request *rq;
+
+       BUG_ON(RB_EMPTY_ROOT(&cfqq->sort_list));
+
+       /*
+        * follow expired path, else get first next available
+        */
+       rq = cfq_check_fifo(cfqq);
+       if (!rq)
+               rq = cfqq->next_rq;
+
+       /*
+        * insert request into driver dispatch list
+        */
+       cfq_dispatch_insert(cfqd->queue, rq);
+
+       if (!cfqd->active_cic) {
+               struct cfq_io_context *cic = RQ_CIC(rq);
+
+               atomic_inc(&cic->ioc->refcount);
+               cfqd->active_cic = cic;
+       }
+}
+
+/*
+ * Find the cfqq that we need to service and move a request from that to the
+ * dispatch list
+ */
 static int cfq_dispatch_requests(struct request_queue *q, int force)
 {
        struct cfq_data *cfqd = q->elevator->elevator_data;
        struct cfq_queue *cfqq;
-       int dispatched;
+       unsigned int max_dispatch;
 
        if (!cfqd->busy_queues)
                return 0;
@@ -1158,29 +1134,63 @@ static int cfq_dispatch_requests(struct request_queue *q, int force)
        if (unlikely(force))
                return cfq_forced_dispatch(cfqd);
 
-       dispatched = 0;
-       while ((cfqq = cfq_select_queue(cfqd)) != NULL) {
-               int max_dispatch;
+       cfqq = cfq_select_queue(cfqd);
+       if (!cfqq)
+               return 0;
+
+       /*
+        * If this is an async queue and we have sync IO in flight, let it wait
+        */
+       if (cfqd->sync_flight && !cfq_cfqq_sync(cfqq))
+               return 0;
+
+       max_dispatch = cfqd->cfq_quantum;
+       if (cfq_class_idle(cfqq))
+               max_dispatch = 1;
 
-               max_dispatch = cfqd->cfq_quantum;
+       /*
+        * Does this cfqq already have too much IO in flight?
+        */
+       if (cfqq->dispatched >= max_dispatch) {
+               /*
+                * idle queue must always only have a single IO in flight
+                */
                if (cfq_class_idle(cfqq))
-                       max_dispatch = 1;
+                       return 0;
 
-               if (cfqq->dispatched >= max_dispatch && cfqd->busy_queues > 1)
-                       break;
+               /*
+                * We have other queues, don't allow more IO from this one
+                */
+               if (cfqd->busy_queues > 1)
+                       return 0;
 
-               if (cfqd->sync_flight && !cfq_cfqq_sync(cfqq))
-                       break;
+               /*
+                * we are the only queue, allow up to 4 times of 'quantum'
+                */
+               if (cfqq->dispatched >= 4 * max_dispatch)
+                       return 0;
+       }
 
-               cfq_clear_cfqq_must_dispatch(cfqq);
-               cfq_clear_cfqq_wait_request(cfqq);
-               del_timer(&cfqd->idle_slice_timer);
+       /*
+        * Dispatch a request from this cfqq
+        */
+       cfq_dispatch_request(cfqd, cfqq);
+       cfqq->slice_dispatch++;
+       cfq_clear_cfqq_must_dispatch(cfqq);
 
-               dispatched += __cfq_dispatch_requests(cfqd, cfqq, max_dispatch);
+       /*
+        * expire an async queue immediately if it has used up its slice. idle
+        * queue always expire after 1 dispatch round.
+        */
+       if (cfqd->busy_queues > 1 && ((!cfq_cfqq_sync(cfqq) &&
+           cfqq->slice_dispatch >= cfq_prio_to_maxrq(cfqd, cfqq)) ||
+           cfq_class_idle(cfqq))) {
+               cfqq->slice_end = jiffies + 1;
+               cfq_slice_expired(cfqd, 0);
        }
 
-       cfq_log(cfqd, "dispatched=%d", dispatched);
-       return dispatched;
+       cfq_log(cfqd, "dispatched a request");
+       return 1;
 }
 
 /*
@@ -1506,7 +1516,6 @@ retry:
                cfqq->cfqd = cfqd;
 
                cfq_mark_cfqq_prio_changed(cfqq);
-               cfq_mark_cfqq_queue_new(cfqq);
 
                cfq_init_prio_data(cfqq, ioc);
 
@@ -1893,15 +1902,13 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
 
        if (cfqq == cfqd->active_queue) {
                /*
-                * if we are waiting for a request for this queue, let it rip
-                * immediately and flag that we must not expire this queue
-                * just now
+                * Remember that we saw a request from this process, but
+                * don't start queuing just yet. Otherwise we risk seeing lots
+                * of tiny requests, because we disrupt the normal plugging
+                * and merging.
                 */
-               if (cfq_cfqq_wait_request(cfqq)) {
+               if (cfq_cfqq_wait_request(cfqq))
                        cfq_mark_cfqq_must_dispatch(cfqq);
-                       del_timer(&cfqd->idle_slice_timer);
-                       blk_start_queueing(cfqd->queue);
-               }
        } else if (cfq_should_preempt(cfqd, cfqq, rq)) {
                /*
                 * not the active queue - expire current slice if it is
@@ -1910,7 +1917,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
                 * this new queue is RT and the current one is BE
                 */
                cfq_preempt_queue(cfqd, cfqq);
-               cfq_mark_cfqq_must_dispatch(cfqq);
                blk_start_queueing(cfqd->queue);
        }
 }
@@ -2172,6 +2178,12 @@ static void cfq_idle_slice_timer(unsigned long data)
                timed_out = 0;
 
                /*
+                * We saw a request before the queue expired, let it through
+                */
+               if (cfq_cfqq_must_dispatch(cfqq))
+                       goto out_kick;
+
+               /*
                 * expired
                 */
                if (cfq_slice_used(cfqq))
@@ -2187,10 +2199,8 @@ static void cfq_idle_slice_timer(unsigned long data)
                /*
                 * not expired and it has a request pending, let it dispatch
                 */
-               if (!RB_EMPTY_ROOT(&cfqq->sort_list)) {
-                       cfq_mark_cfqq_must_dispatch(cfqq);
+               if (!RB_EMPTY_ROOT(&cfqq->sort_list))
                        goto out_kick;
-               }
        }
 expire:
        cfq_slice_expired(cfqd, timed_out);
index ca6788a..fb81bcc 100644 (file)
@@ -573,7 +573,7 @@ void elv_requeue_request(struct request_queue *q, struct request *rq)
        elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE);
 }
 
-static void elv_drain_elevator(struct request_queue *q)
+void elv_drain_elevator(struct request_queue *q)
 {
        static int printed;
        while (q->elevator->ops->elevator_dispatch_fn(q, 1))
@@ -587,6 +587,31 @@ static void elv_drain_elevator(struct request_queue *q)
        }
 }
 
+/*
+ * Call with queue lock held, interrupts disabled
+ */
+void elv_quisce_start(struct request_queue *q)
+{
+       queue_flag_set(QUEUE_FLAG_ELVSWITCH, q);
+
+       /*
+        * make sure we don't have any requests in flight
+        */
+       elv_drain_elevator(q);
+       while (q->rq.elvpriv) {
+               blk_start_queueing(q);
+               spin_unlock_irq(q->queue_lock);
+               msleep(10);
+               spin_lock_irq(q->queue_lock);
+               elv_drain_elevator(q);
+       }
+}
+
+void elv_quisce_end(struct request_queue *q)
+{
+       queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q);
+}
+
 void elv_insert(struct request_queue *q, struct request *rq, int where)
 {
        struct list_head *pos;
@@ -1101,18 +1126,7 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
         * Turn on BYPASS and drain all requests w/ elevator private data
         */
        spin_lock_irq(q->queue_lock);
-
-       queue_flag_set(QUEUE_FLAG_ELVSWITCH, q);
-
-       elv_drain_elevator(q);
-
-       while (q->rq.elvpriv) {
-               blk_start_queueing(q);
-               spin_unlock_irq(q->queue_lock);
-               msleep(10);
-               spin_lock_irq(q->queue_lock);
-               elv_drain_elevator(q);
-       }
+       elv_quisce_start(q);
 
        /*
         * Remember old elevator.
@@ -1136,7 +1150,7 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
         */
        elevator_exit(old_elevator);
        spin_lock_irq(q->queue_lock);
-       queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q);
+       elv_quisce_end(q);
        spin_unlock_irq(q->queue_lock);
 
        blk_add_trace_msg(q, "elv switch: %s", e->elevator_type->elevator_name);
index bd3c937..7737afb 100644 (file)
@@ -90,7 +90,6 @@ static const struct acpi_port_info acpi_protected_ports[] = {
        {"PIT2", 0x0048, 0x004B, ACPI_OSI_WIN_XP},
        {"RTC", 0x0070, 0x0071, ACPI_OSI_WIN_XP},
        {"CMOS", 0x0074, 0x0076, ACPI_OSI_WIN_XP},
-       {"DMA1", 0x0081, 0x0083, ACPI_OSI_WIN_XP},
        {"DMA1L", 0x0087, 0x0087, ACPI_OSI_WIN_XP},
        {"DMA2", 0x0089, 0x008B, ACPI_OSI_WIN_XP},
        {"DMA2L", 0x008F, 0x008F, ACPI_OSI_WIN_XP},
index 0450540..daf4ad3 100644 (file)
@@ -53,7 +53,6 @@ ACPI_MODULE_NAME("nsxfeval")
 /* Local prototypes */
 static void acpi_ns_resolve_references(struct acpi_evaluate_info *info);
 
-#ifdef ACPI_FUTURE_USAGE
 /*******************************************************************************
  *
  * FUNCTION:    acpi_evaluate_object_typed
@@ -147,7 +146,7 @@ acpi_evaluate_object_typed(acpi_handle handle,
 }
 
 ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed)
-#endif                         /*  ACPI_FUTURE_USAGE  */
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_evaluate_object
index b0de631..3c7d894 100644 (file)
@@ -903,7 +903,7 @@ static struct acpi_driver acpi_battery_driver = {
                },
 };
 
-static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie)
+static void acpi_battery_init_async(void *unused, async_cookie_t cookie)
 {
        if (acpi_disabled)
                return;
index cd1f446..12158e0 100644 (file)
@@ -164,6 +164,8 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
        list_add(&slot->list, &slot_list);
        mutex_unlock(&slot_list_lock);
 
+       get_device(&pci_bus->dev);
+
        dbg("pci_slot: %p, pci_bus: %x, device: %d, name: %s\n",
                pci_slot, pci_bus->number, device, name);
 
@@ -310,12 +312,15 @@ static void
 acpi_pci_slot_remove(acpi_handle handle)
 {
        struct acpi_pci_slot *slot, *tmp;
+       struct pci_bus *pbus;
 
        mutex_lock(&slot_list_lock);
        list_for_each_entry_safe(slot, tmp, &slot_list, list) {
                if (slot->root_handle == handle) {
                        list_del(&slot->list);
+                       pbus = slot->pci_slot->bus;
                        pci_destroy_slot(slot->pci_slot);
+                       put_device(&pbus->dev);
                        kfree(slot);
                }
        }
index 05dfdc9..d0d550d 100644 (file)
@@ -343,9 +343,6 @@ acpi_system_write_alarm(struct file *file,
 }
 #endif                         /* HAVE_ACPI_LEGACY_ALARM */
 
-extern struct list_head acpi_wakeup_device_list;
-extern spinlock_t acpi_device_lock;
-
 static int
 acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
 {
@@ -353,7 +350,7 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
 
        seq_printf(seq, "Device\tS-state\t  Status   Sysfs node\n");
 
-       spin_lock(&acpi_device_lock);
+       mutex_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev =
                    container_of(node, struct acpi_device, wakeup_list);
@@ -361,7 +358,6 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
 
                if (!dev->wakeup.flags.valid)
                        continue;
-               spin_unlock(&acpi_device_lock);
 
                ldev = acpi_get_physical_device(dev->handle);
                seq_printf(seq, "%s\t  S%d\t%c%-8s  ",
@@ -376,9 +372,8 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
                seq_printf(seq, "\n");
                put_device(ldev);
 
-               spin_lock(&acpi_device_lock);
        }
-       spin_unlock(&acpi_device_lock);
+       mutex_unlock(&acpi_device_lock);
        return 0;
 }
 
@@ -409,7 +404,7 @@ acpi_system_write_wakeup_device(struct file *file,
        strbuf[len] = '\0';
        sscanf(strbuf, "%s", str);
 
-       spin_lock(&acpi_device_lock);
+       mutex_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev =
                    container_of(node, struct acpi_device, wakeup_list);
@@ -446,7 +441,7 @@ acpi_system_write_wakeup_device(struct file *file,
                        }
                }
        }
-       spin_unlock(&acpi_device_lock);
+       mutex_unlock(&acpi_device_lock);
        return count;
 }
 
index 4e6e758..6fe1214 100644 (file)
@@ -145,6 +145,9 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
        struct acpi_processor_power *pwr = &pr->power;
        u8 type = local_apic_timer_c2_ok ? ACPI_STATE_C3 : ACPI_STATE_C2;
 
+       if (cpu_has(&cpu_data(pr->id), X86_FEATURE_ARAT))
+               return;
+
        /*
         * Check, if one of the previous states already marked the lapic
         * unstable
index 20c23c0..8ff510b 100644 (file)
@@ -24,7 +24,7 @@ extern struct acpi_device *acpi_root;
 
 static LIST_HEAD(acpi_device_list);
 static LIST_HEAD(acpi_bus_id_list);
-DEFINE_SPINLOCK(acpi_device_lock);
+DEFINE_MUTEX(acpi_device_lock);
 LIST_HEAD(acpi_wakeup_device_list);
 
 struct acpi_device_bus_id{
@@ -491,7 +491,6 @@ static int acpi_device_register(struct acpi_device *device,
         */
        INIT_LIST_HEAD(&device->children);
        INIT_LIST_HEAD(&device->node);
-       INIT_LIST_HEAD(&device->g_list);
        INIT_LIST_HEAD(&device->wakeup_list);
 
        new_bus_id = kzalloc(sizeof(struct acpi_device_bus_id), GFP_KERNEL);
@@ -500,7 +499,7 @@ static int acpi_device_register(struct acpi_device *device,
                return -ENOMEM;
        }
 
-       spin_lock(&acpi_device_lock);
+       mutex_lock(&acpi_device_lock);
        /*
         * Find suitable bus_id and instance number in acpi_bus_id_list
         * If failed, create one and link it into acpi_bus_id_list
@@ -521,14 +520,12 @@ static int acpi_device_register(struct acpi_device *device,
        }
        dev_set_name(&device->dev, "%s:%02x", acpi_device_bus_id->bus_id, acpi_device_bus_id->instance_no);
 
-       if (device->parent) {
+       if (device->parent)
                list_add_tail(&device->node, &device->parent->children);
-               list_add_tail(&device->g_list, &device->parent->g_list);
-       } else
-               list_add_tail(&device->g_list, &acpi_device_list);
+
        if (device->wakeup.flags.valid)
                list_add_tail(&device->wakeup_list, &acpi_wakeup_device_list);
-       spin_unlock(&acpi_device_lock);
+       mutex_unlock(&acpi_device_lock);
 
        if (device->parent)
                device->dev.parent = &parent->dev;
@@ -549,28 +546,22 @@ static int acpi_device_register(struct acpi_device *device,
        device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
        return 0;
   end:
-       spin_lock(&acpi_device_lock);
-       if (device->parent) {
+       mutex_lock(&acpi_device_lock);
+       if (device->parent)
                list_del(&device->node);
-               list_del(&device->g_list);
-       } else
-               list_del(&device->g_list);
        list_del(&device->wakeup_list);
-       spin_unlock(&acpi_device_lock);
+       mutex_unlock(&acpi_device_lock);
        return result;
 }
 
 static void acpi_device_unregister(struct acpi_device *device, int type)
 {
-       spin_lock(&acpi_device_lock);
-       if (device->parent) {
+       mutex_lock(&acpi_device_lock);
+       if (device->parent)
                list_del(&device->node);
-               list_del(&device->g_list);
-       } else
-               list_del(&device->g_list);
 
        list_del(&device->wakeup_list);
-       spin_unlock(&acpi_device_lock);
+       mutex_unlock(&acpi_device_lock);
 
        acpi_detach_data(device->handle, acpi_bus_data_handler);
 
index cfaf8f5..8a8f3b3 100644 (file)
@@ -5,3 +5,6 @@ extern int acpi_suspend (u32 state);
 extern void acpi_enable_wakeup_device_prep(u8 sleep_state);
 extern void acpi_enable_wakeup_device(u8 sleep_state);
 extern void acpi_disable_wakeup_device(u8 sleep_state);
+
+extern struct list_head acpi_wakeup_device_list;
+extern struct mutex acpi_device_lock;
index e8c143c..9cd15e8 100644 (file)
@@ -98,6 +98,7 @@ MODULE_PARM_DESC(psv, "Disable or override all passive trip points.");
 static int acpi_thermal_add(struct acpi_device *device);
 static int acpi_thermal_remove(struct acpi_device *device, int type);
 static int acpi_thermal_resume(struct acpi_device *device);
+static void acpi_thermal_notify(struct acpi_device *device, u32 event);
 static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file);
 static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file);
 static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file);
@@ -123,6 +124,7 @@ static struct acpi_driver acpi_thermal_driver = {
                .add = acpi_thermal_add,
                .remove = acpi_thermal_remove,
                .resume = acpi_thermal_resume,
+               .notify = acpi_thermal_notify,
                },
 };
 
@@ -192,6 +194,7 @@ struct acpi_thermal {
        struct acpi_handle_list devices;
        struct thermal_zone_device *thermal_zone;
        int tz_enabled;
+       int kelvin_offset;
        struct mutex lock;
 };
 
@@ -581,7 +584,7 @@ static void acpi_thermal_check(void *data)
 }
 
 /* sys I/F for generic thermal sysfs support */
-#define KELVIN_TO_MILLICELSIUS(t) (t * 100 - 273200)
+#define KELVIN_TO_MILLICELSIUS(t, off) (((t) - (off)) * 100)
 
 static int thermal_get_temp(struct thermal_zone_device *thermal,
                            unsigned long *temp)
@@ -596,7 +599,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal,
        if (result)
                return result;
 
-       *temp = KELVIN_TO_MILLICELSIUS(tz->temperature);
+       *temp = KELVIN_TO_MILLICELSIUS(tz->temperature, tz->kelvin_offset);
        return 0;
 }
 
@@ -702,7 +705,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
        if (tz->trips.critical.flags.valid) {
                if (!trip) {
                        *temp = KELVIN_TO_MILLICELSIUS(
-                               tz->trips.critical.temperature);
+                               tz->trips.critical.temperature,
+                               tz->kelvin_offset);
                        return 0;
                }
                trip--;
@@ -711,7 +715,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
        if (tz->trips.hot.flags.valid) {
                if (!trip) {
                        *temp = KELVIN_TO_MILLICELSIUS(
-                               tz->trips.hot.temperature);
+                               tz->trips.hot.temperature,
+                               tz->kelvin_offset);
                        return 0;
                }
                trip--;
@@ -720,7 +725,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
        if (tz->trips.passive.flags.valid) {
                if (!trip) {
                        *temp = KELVIN_TO_MILLICELSIUS(
-                               tz->trips.passive.temperature);
+                               tz->trips.passive.temperature,
+                               tz->kelvin_offset);
                        return 0;
                }
                trip--;
@@ -730,7 +736,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
                tz->trips.active[i].flags.valid; i++) {
                if (!trip) {
                        *temp = KELVIN_TO_MILLICELSIUS(
-                               tz->trips.active[i].temperature);
+                               tz->trips.active[i].temperature,
+                               tz->kelvin_offset);
                        return 0;
                }
                trip--;
@@ -745,7 +752,8 @@ static int thermal_get_crit_temp(struct thermal_zone_device *thermal,
 
        if (tz->trips.critical.flags.valid) {
                *temperature = KELVIN_TO_MILLICELSIUS(
-                               tz->trips.critical.temperature);
+                               tz->trips.critical.temperature,
+                               tz->kelvin_offset);
                return 0;
        } else
                return -EINVAL;
@@ -1264,17 +1272,14 @@ static int acpi_thermal_remove_fs(struct acpi_device *device)
                                  Driver Interface
    -------------------------------------------------------------------------- */
 
-static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
+static void acpi_thermal_notify(struct acpi_device *device, u32 event)
 {
-       struct acpi_thermal *tz = data;
-       struct acpi_device *device = NULL;
+       struct acpi_thermal *tz = acpi_driver_data(device);
 
 
        if (!tz)
                return;
 
-       device = tz->device;
-
        switch (event) {
        case ACPI_THERMAL_NOTIFY_TEMPERATURE:
                acpi_thermal_check(tz);
@@ -1298,8 +1303,6 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
                                  "Unsupported event [0x%x]\n", event));
                break;
        }
-
-       return;
 }
 
 static int acpi_thermal_get_info(struct acpi_thermal *tz)
@@ -1334,10 +1337,28 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz)
        return 0;
 }
 
+/*
+ * The exact offset between Kelvin and degree Celsius is 273.15. However ACPI
+ * handles temperature values with a single decimal place. As a consequence,
+ * some implementations use an offset of 273.1 and others use an offset of
+ * 273.2. Try to find out which one is being used, to present the most
+ * accurate and visually appealing number.
+ *
+ * The heuristic below should work for all ACPI thermal zones which have a
+ * critical trip point with a value being a multiple of 0.5 degree Celsius.
+ */
+static void acpi_thermal_guess_offset(struct acpi_thermal *tz)
+{
+       if (tz->trips.critical.flags.valid &&
+           (tz->trips.critical.temperature % 5) == 1)
+               tz->kelvin_offset = 2731;
+       else
+               tz->kelvin_offset = 2732;
+}
+
 static int acpi_thermal_add(struct acpi_device *device)
 {
        int result = 0;
-       acpi_status status = AE_OK;
        struct acpi_thermal *tz = NULL;
 
 
@@ -1360,6 +1381,8 @@ static int acpi_thermal_add(struct acpi_device *device)
        if (result)
                goto free_memory;
 
+       acpi_thermal_guess_offset(tz);
+
        result = acpi_thermal_register_thermal_zone(tz);
        if (result)
                goto free_memory;
@@ -1368,21 +1391,11 @@ static int acpi_thermal_add(struct acpi_device *device)
        if (result)
                goto unregister_thermal_zone;
 
-       status = acpi_install_notify_handler(device->handle,
-                                            ACPI_DEVICE_NOTIFY,
-                                            acpi_thermal_notify, tz);
-       if (ACPI_FAILURE(status)) {
-               result = -ENODEV;
-               goto remove_fs;
-       }
-
        printk(KERN_INFO PREFIX "%s [%s] (%ld C)\n",
               acpi_device_name(device), acpi_device_bid(device),
               KELVIN_TO_CELSIUS(tz->temperature));
        goto end;
 
-remove_fs:
-       acpi_thermal_remove_fs(device);
 unregister_thermal_zone:
        thermal_zone_device_unregister(tz->thermal_zone);
 free_memory:
@@ -1393,7 +1406,6 @@ end:
 
 static int acpi_thermal_remove(struct acpi_device *device, int type)
 {
-       acpi_status status = AE_OK;
        struct acpi_thermal *tz = NULL;
 
        if (!device || !acpi_driver_data(device))
@@ -1401,10 +1413,6 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
 
        tz = acpi_driver_data(device);
 
-       status = acpi_remove_notify_handler(device->handle,
-                                           ACPI_DEVICE_NOTIFY,
-                                           acpi_thermal_notify);
-
        acpi_thermal_remove_fs(device);
        acpi_thermal_unregister_thermal_zone(tz);
        mutex_destroy(&tz->lock);
index ab06143..cd4fb75 100644 (file)
@@ -79,6 +79,7 @@ module_param(brightness_switch_enabled, bool, 0644);
 static int acpi_video_bus_add(struct acpi_device *device);
 static int acpi_video_bus_remove(struct acpi_device *device, int type);
 static int acpi_video_resume(struct acpi_device *device);
+static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
 
 static const struct acpi_device_id video_device_ids[] = {
        {ACPI_VIDEO_HID, 0},
@@ -94,6 +95,7 @@ static struct acpi_driver acpi_video_bus = {
                .add = acpi_video_bus_add,
                .remove = acpi_video_bus_remove,
                .resume = acpi_video_resume,
+               .notify = acpi_video_bus_notify,
                },
 };
 
@@ -1986,17 +1988,15 @@ static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)
        return acpi_video_bus_DOS(video, 0, 1);
 }
 
-static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
+static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
 {
-       struct acpi_video_bus *video = data;
-       struct acpi_device *device = NULL;
+       struct acpi_video_bus *video = acpi_driver_data(device);
        struct input_dev *input;
        int keycode;
 
        if (!video)
                return;
 
-       device = video->device;
        input = video->input;
 
        switch (event) {
@@ -2127,7 +2127,6 @@ static int acpi_video_resume(struct acpi_device *device)
 
 static int acpi_video_bus_add(struct acpi_device *device)
 {
-       acpi_status status;
        struct acpi_video_bus *video;
        struct input_dev *input;
        int error;
@@ -2169,20 +2168,10 @@ static int acpi_video_bus_add(struct acpi_device *device)
        acpi_video_bus_get_devices(video, device);
        acpi_video_bus_start_devices(video);
 
-       status = acpi_install_notify_handler(device->handle,
-                                            ACPI_DEVICE_NOTIFY,
-                                            acpi_video_bus_notify, video);
-       if (ACPI_FAILURE(status)) {
-               printk(KERN_ERR PREFIX
-                                 "Error installing notify handler\n");
-               error = -ENODEV;
-               goto err_stop_video;
-       }
-
        video->input = input = input_allocate_device();
        if (!input) {
                error = -ENOMEM;
-               goto err_uninstall_notify;
+               goto err_stop_video;
        }
 
        snprintf(video->phys, sizeof(video->phys),
@@ -2218,9 +2207,6 @@ static int acpi_video_bus_add(struct acpi_device *device)
 
  err_free_input_dev:
        input_free_device(input);
- err_uninstall_notify:
-       acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
-                                  acpi_video_bus_notify);
  err_stop_video:
        acpi_video_bus_stop_devices(video);
        acpi_video_bus_put_devices(video);
@@ -2235,7 +2221,6 @@ static int acpi_video_bus_add(struct acpi_device *device)
 
 static int acpi_video_bus_remove(struct acpi_device *device, int type)
 {
-       acpi_status status = 0;
        struct acpi_video_bus *video = NULL;
 
 
@@ -2245,11 +2230,6 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
        video = acpi_driver_data(device);
 
        acpi_video_bus_stop_devices(video);
-
-       status = acpi_remove_notify_handler(video->device->handle,
-                                           ACPI_DEVICE_NOTIFY,
-                                           acpi_video_bus_notify);
-
        acpi_video_bus_put_devices(video);
        acpi_video_bus_remove_fs(device);
 
index 5aee8c2..88725dc 100644 (file)
 #include "internal.h"
 #include "sleep.h"
 
+/*
+ * We didn't lock acpi_device_lock in the file, because it invokes oops in
+ * suspend/resume and isn't really required as this is called in S-state. At
+ * that time, there is no device hotplug
+ **/
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
 ACPI_MODULE_NAME("wakeup_devices")
 
-extern struct list_head acpi_wakeup_device_list;
-extern spinlock_t acpi_device_lock;
-
 /**
  * acpi_enable_wakeup_device_prep - prepare wakeup devices
  *     @sleep_state:   ACPI state
@@ -29,7 +31,6 @@ void acpi_enable_wakeup_device_prep(u8 sleep_state)
 {
        struct list_head *node, *next;
 
-       spin_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev = container_of(node,
                                                       struct acpi_device,
@@ -40,11 +41,8 @@ void acpi_enable_wakeup_device_prep(u8 sleep_state)
                    (sleep_state > (u32) dev->wakeup.sleep_state))
                        continue;
 
-               spin_unlock(&acpi_device_lock);
                acpi_enable_wakeup_device_power(dev, sleep_state);
-               spin_lock(&acpi_device_lock);
        }
-       spin_unlock(&acpi_device_lock);
 }
 
 /**
@@ -60,7 +58,6 @@ void acpi_enable_wakeup_device(u8 sleep_state)
         * Caution: this routine must be invoked when interrupt is disabled 
         * Refer ACPI2.0: P212
         */
-       spin_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev =
                        container_of(node, struct acpi_device, wakeup_list);
@@ -74,22 +71,17 @@ void acpi_enable_wakeup_device(u8 sleep_state)
                if ((!dev->wakeup.state.enabled && !dev->wakeup.flags.prepared)
                    || sleep_state > (u32) dev->wakeup.sleep_state) {
                        if (dev->wakeup.flags.run_wake) {
-                               spin_unlock(&acpi_device_lock);
                                /* set_gpe_type will disable GPE, leave it like that */
                                acpi_set_gpe_type(dev->wakeup.gpe_device,
                                                  dev->wakeup.gpe_number,
                                                  ACPI_GPE_TYPE_RUNTIME);
-                               spin_lock(&acpi_device_lock);
                        }
                        continue;
                }
-               spin_unlock(&acpi_device_lock);
                if (!dev->wakeup.flags.run_wake)
                        acpi_enable_gpe(dev->wakeup.gpe_device,
                                        dev->wakeup.gpe_number);
-               spin_lock(&acpi_device_lock);
        }
-       spin_unlock(&acpi_device_lock);
 }
 
 /**
@@ -101,7 +93,6 @@ void acpi_disable_wakeup_device(u8 sleep_state)
 {
        struct list_head *node, *next;
 
-       spin_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev =
                        container_of(node, struct acpi_device, wakeup_list);
@@ -112,19 +103,16 @@ void acpi_disable_wakeup_device(u8 sleep_state)
                if ((!dev->wakeup.state.enabled && !dev->wakeup.flags.prepared)
                    || sleep_state > (u32) dev->wakeup.sleep_state) {
                        if (dev->wakeup.flags.run_wake) {
-                               spin_unlock(&acpi_device_lock);
                                acpi_set_gpe_type(dev->wakeup.gpe_device,
                                                  dev->wakeup.gpe_number,
                                                  ACPI_GPE_TYPE_WAKE_RUN);
                                /* Re-enable it, since set_gpe_type will disable it */
                                acpi_enable_gpe(dev->wakeup.gpe_device,
                                                dev->wakeup.gpe_number);
-                               spin_lock(&acpi_device_lock);
                        }
                        continue;
                }
 
-               spin_unlock(&acpi_device_lock);
                acpi_disable_wakeup_device_power(dev);
                /* Never disable run-wake GPE */
                if (!dev->wakeup.flags.run_wake) {
@@ -133,16 +121,14 @@ void acpi_disable_wakeup_device(u8 sleep_state)
                        acpi_clear_gpe(dev->wakeup.gpe_device,
                                       dev->wakeup.gpe_number, ACPI_NOT_ISR);
                }
-               spin_lock(&acpi_device_lock);
        }
-       spin_unlock(&acpi_device_lock);
 }
 
 int __init acpi_wakeup_device_init(void)
 {
        struct list_head *node, *next;
 
-       spin_lock(&acpi_device_lock);
+       mutex_lock(&acpi_device_lock);
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev = container_of(node,
                                                       struct acpi_device,
@@ -150,15 +136,13 @@ int __init acpi_wakeup_device_init(void)
                /* In case user doesn't load button driver */
                if (!dev->wakeup.flags.run_wake || dev->wakeup.state.enabled)
                        continue;
-               spin_unlock(&acpi_device_lock);
                acpi_set_gpe_type(dev->wakeup.gpe_device,
                                  dev->wakeup.gpe_number,
                                  ACPI_GPE_TYPE_WAKE_RUN);
                acpi_enable_gpe(dev->wakeup.gpe_device,
                                dev->wakeup.gpe_number);
                dev->wakeup.state.enabled = 1;
-               spin_lock(&acpi_device_lock);
        }
-       spin_unlock(&acpi_device_lock);
+       mutex_unlock(&acpi_device_lock);
        return 0;
 }
index 788bba2..57be6be 100644 (file)
@@ -78,6 +78,7 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
 static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
                                        ssize_t size);
 #define MAX_SLOTS 8
+#define MAX_RETRY 15
 
 enum {
        AHCI_PCI_BAR            = 5,
@@ -1115,6 +1116,8 @@ static void ahci_start_port(struct ata_port *ap)
        struct ahci_port_priv *pp = ap->private_data;
        struct ata_link *link;
        struct ahci_em_priv *emp;
+       ssize_t rc;
+       int i;
 
        /* enable FIS reception */
        ahci_start_fis_rx(ap);
@@ -1126,7 +1129,17 @@ static void ahci_start_port(struct ata_port *ap)
        if (ap->flags & ATA_FLAG_EM) {
                ata_for_each_link(link, ap, EDGE) {
                        emp = &pp->em_priv[link->pmp];
-                       ahci_transmit_led_message(ap, emp->led_state, 4);
+
+                       /* EM Transmit bit maybe busy during init */
+                       for (i = 0; i < MAX_RETRY; i++) {
+                               rc = ahci_transmit_led_message(ap,
+                                                              emp->led_state,
+                                                              4);
+                               if (rc == -EBUSY)
+                                       udelay(100);
+                               else
+                                       break;
+                       }
                }
        }
 
@@ -1331,7 +1344,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
        em_ctl = readl(mmio + HOST_EM_CTL);
        if (em_ctl & EM_CTL_TM) {
                spin_unlock_irqrestore(ap->lock, flags);
-               return -EINVAL;
+               return -EBUSY;
        }
 
        /*
@@ -2405,10 +2418,10 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
        int rc;
 
        if (using_dac &&
-           !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
-               rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+           !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (rc) {
-                       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (rc) {
                                dev_printk(KERN_ERR, &pdev->dev,
                                           "64-bit DMA enable failed\n");
@@ -2416,13 +2429,13 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
                        }
                }
        } else {
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit DMA enable failed\n");
                        return rc;
                }
-               rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit consistent DMA enable failed\n");
index e5cbe80..942d14a 100644 (file)
@@ -1053,6 +1053,13 @@ static int piix_broken_suspend(void)
                                DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
                        },
                },
+               {
+                       .ident = "VGN-BX297XP",
+                       .matches = {
+                               DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+                               DMI_MATCH(DMI_PRODUCT_NAME, "VGN-BX297XP"),
+                       },
+               },
 
                { }     /* terminate list */
        };
index db6a969..0df83cf 100644 (file)
@@ -203,11 +203,11 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
                return -ENODEV;
        }
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR DRV_NAME ": unable to configure DMA mask.\n");
                return -ENODEV;
        }
-       if (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR DRV_NAME ": unable to configure consistent DMA mask.\n");
                return -ENODEV;
        }
index 19fdecf..ba54b08 100644 (file)
@@ -157,7 +157,7 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        /* acquire resources and fill host */
-       pdev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+       pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
        data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000);
        data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000);
index efe2c19..8d9343a 100644 (file)
@@ -503,7 +503,7 @@ static void octeon_cf_dma_setup(struct ata_queued_cmd *qc)
        struct ata_port *ap = qc->ap;
        struct octeon_cf_port *cf_port;
 
-       cf_port = (struct octeon_cf_port *)ap->private_data;
+       cf_port = ap->private_data;
        DPRINTK("ENTER\n");
        /* issue r/w command */
        qc->cursg = qc->sg;
@@ -596,7 +596,7 @@ static unsigned int octeon_cf_dma_finished(struct ata_port *ap,
        if (ap->hsm_task_state != HSM_ST_LAST)
                return 0;
 
-       cf_port = (struct octeon_cf_port *)ap->private_data;
+       cf_port = ap->private_data;
 
        dma_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_DMA_CFGX(ocd->dma_engine));
        if (dma_cfg.s.size != 0xfffff) {
@@ -657,7 +657,7 @@ static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
                        continue;
 
                ocd = ap->dev->platform_data;
-               cf_port = (struct octeon_cf_port *)ap->private_data;
+               cf_port = ap->private_data;
                dma_int.u64 =
                        cvmx_read_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine));
                dma_cfg.u64 =
index 3958817..6c65b07 100644 (file)
@@ -607,13 +607,13 @@ static int adma_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
 {
        int rc;
 
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                dev_printk(KERN_ERR, &pdev->dev,
                        "32-bit DMA enable failed\n");
                return rc;
        }
-       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                dev_printk(KERN_ERR, &pdev->dev,
                        "32-bit consistent DMA enable failed\n");
index 305a4f8..8d890cc 100644 (file)
@@ -861,14 +861,14 @@ static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* Set dma_mask.  This devices doesn't support 64bit addressing. */
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                dev_printk(KERN_ERR, &pdev->dev,
                           "32-bit DMA enable failed\n");
                return rc;
        }
 
-       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                dev_printk(KERN_ERR, &pdev->dev,
                           "32-bit consistent DMA enable failed\n");
index a377226..37ae5dc 100644 (file)
 /*
  * sata_mv TODO list:
  *
- * --> More errata workarounds for PCI-X.
- *
- * --> Complete a full errata audit for all chipsets to identify others.
- *
  * --> Develop a low-power-consumption strategy, and implement it.
  *
  * --> Add sysfs attributes for per-chip / per-HC IRQ coalescing thresholds.
  *       connect two SATA ports.
  */
 
+/*
+ * 80x1-B2 errata PCI#11:
+ *
+ * Users of the 6041/6081 Rev.B2 chips (current is C0)
+ * should be careful to insert those cards only onto PCI-X bus #0,
+ * and only in device slots 0..7, not higher.  The chips may not
+ * work correctly otherwise  (note: this is a pretty rare condition).
+ */
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -64,7 +69,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "sata_mv"
-#define DRV_VERSION    "1.27"
+#define DRV_VERSION    "1.28"
 
 /*
  * module options
@@ -109,23 +114,23 @@ enum {
         * Coalescing defers the interrupt until either the IO_THRESHOLD
         * (count of completed I/Os) is met, or the TIME_THRESHOLD is met.
         */
-       MV_COAL_REG_BASE        = 0x18000,
-       MV_IRQ_COAL_CAUSE       = (MV_COAL_REG_BASE + 0x08),
+       COAL_REG_BASE           = 0x18000,
+       IRQ_COAL_CAUSE          = (COAL_REG_BASE + 0x08),
        ALL_PORTS_COAL_IRQ      = (1 << 4),     /* all ports irq event */
 
-       MV_IRQ_COAL_IO_THRESHOLD   = (MV_COAL_REG_BASE + 0xcc),
-       MV_IRQ_COAL_TIME_THRESHOLD = (MV_COAL_REG_BASE + 0xd0),
+       IRQ_COAL_IO_THRESHOLD   = (COAL_REG_BASE + 0xcc),
+       IRQ_COAL_TIME_THRESHOLD = (COAL_REG_BASE + 0xd0),
 
        /*
         * Registers for the (unused here) transaction coalescing feature:
         */
-       MV_TRAN_COAL_CAUSE_LO   = (MV_COAL_REG_BASE + 0x88),
-       MV_TRAN_COAL_CAUSE_HI   = (MV_COAL_REG_BASE + 0x8c),
+       TRAN_COAL_CAUSE_LO      = (COAL_REG_BASE + 0x88),
+       TRAN_COAL_CAUSE_HI      = (COAL_REG_BASE + 0x8c),
 
-       MV_SATAHC0_REG_BASE     = 0x20000,
-       MV_FLASH_CTL_OFS        = 0x1046c,
-       MV_GPIO_PORT_CTL_OFS    = 0x104f0,
-       MV_RESET_CFG_OFS        = 0x180d8,
+       SATAHC0_REG_BASE        = 0x20000,
+       FLASH_CTL               = 0x1046c,
+       GPIO_PORT_CTL           = 0x104f0,
+       RESET_CFG               = 0x180d8,
 
        MV_PCI_REG_SZ           = MV_MAJOR_REG_AREA_SZ,
        MV_SATAHC_REG_SZ        = MV_MAJOR_REG_AREA_SZ,
@@ -180,40 +185,41 @@ enum {
 
        /* PCI interface registers */
 
-       PCI_COMMAND_OFS         = 0xc00,
-       PCI_COMMAND_MRDTRIG     = (1 << 7),     /* PCI Master Read Trigger */
+       MV_PCI_COMMAND          = 0xc00,
+       MV_PCI_COMMAND_MWRCOM   = (1 << 4),     /* PCI Master Write Combining */
+       MV_PCI_COMMAND_MRDTRIG  = (1 << 7),     /* PCI Master Read Trigger */
 
-       PCI_MAIN_CMD_STS_OFS    = 0xd30,
+       PCI_MAIN_CMD_STS        = 0xd30,
        STOP_PCI_MASTER         = (1 << 2),
        PCI_MASTER_EMPTY        = (1 << 3),
        GLOB_SFT_RST            = (1 << 4),
 
-       MV_PCI_MODE_OFS         = 0xd00,
+       MV_PCI_MODE             = 0xd00,
        MV_PCI_MODE_MASK        = 0x30,
 
        MV_PCI_EXP_ROM_BAR_CTL  = 0xd2c,
        MV_PCI_DISC_TIMER       = 0xd04,
        MV_PCI_MSI_TRIGGER      = 0xc38,
        MV_PCI_SERR_MASK        = 0xc28,
-       MV_PCI_XBAR_TMOUT_OFS   = 0x1d04,
+       MV_PCI_XBAR_TMOUT       = 0x1d04,
        MV_PCI_ERR_LOW_ADDRESS  = 0x1d40,
        MV_PCI_ERR_HIGH_ADDRESS = 0x1d44,
        MV_PCI_ERR_ATTRIBUTE    = 0x1d48,
        MV_PCI_ERR_COMMAND      = 0x1d50,
 
-       PCI_IRQ_CAUSE_OFS       = 0x1d58,
-       PCI_IRQ_MASK_OFS        = 0x1d5c,
+       PCI_IRQ_CAUSE           = 0x1d58,
+       PCI_IRQ_MASK            = 0x1d5c,
        PCI_UNMASK_ALL_IRQS     = 0x7fffff,     /* bits 22-0 */
 
-       PCIE_IRQ_CAUSE_OFS      = 0x1900,
-       PCIE_IRQ_MASK_OFS       = 0x1910,
+       PCIE_IRQ_CAUSE          = 0x1900,
+       PCIE_IRQ_MASK           = 0x1910,
        PCIE_UNMASK_ALL_IRQS    = 0x40a,        /* assorted bits */
 
        /* Host Controller Main Interrupt Cause/Mask registers (1 per-chip) */
-       PCI_HC_MAIN_IRQ_CAUSE_OFS = 0x1d60,
-       PCI_HC_MAIN_IRQ_MASK_OFS  = 0x1d64,
-       SOC_HC_MAIN_IRQ_CAUSE_OFS = 0x20020,
-       SOC_HC_MAIN_IRQ_MASK_OFS  = 0x20024,
+       PCI_HC_MAIN_IRQ_CAUSE   = 0x1d60,
+       PCI_HC_MAIN_IRQ_MASK    = 0x1d64,
+       SOC_HC_MAIN_IRQ_CAUSE   = 0x20020,
+       SOC_HC_MAIN_IRQ_MASK    = 0x20024,
        ERR_IRQ                 = (1 << 0),     /* shift by (2 * port #) */
        DONE_IRQ                = (1 << 1),     /* shift by (2 * port #) */
        HC0_IRQ_PEND            = 0x1ff,        /* bits 0-8 = HC0's ports */
@@ -234,9 +240,9 @@ enum {
        HC_MAIN_RSVD_SOC        = (0x3fffffb << 6),     /* bits 31-9, 7-6 */
 
        /* SATAHC registers */
-       HC_CFG_OFS              = 0,
+       HC_CFG                  = 0x00,
 
-       HC_IRQ_CAUSE_OFS        = 0x14,
+       HC_IRQ_CAUSE            = 0x14,
        DMA_IRQ                 = (1 << 0),     /* shift by port # */
        HC_COAL_IRQ             = (1 << 4),     /* IRQ coalescing */
        DEV_IRQ                 = (1 << 8),     /* shift by port # */
@@ -248,53 +254,54 @@ enum {
         * Coalescing defers the interrupt until either the IO_THRESHOLD
         * (count of completed I/Os) is met, or the TIME_THRESHOLD is met.
         */
-       HC_IRQ_COAL_IO_THRESHOLD_OFS    = 0x000c,
-       HC_IRQ_COAL_TIME_THRESHOLD_OFS  = 0x0010,
+       HC_IRQ_COAL_IO_THRESHOLD        = 0x000c,
+       HC_IRQ_COAL_TIME_THRESHOLD      = 0x0010,
 
-       SOC_LED_CTRL_OFS        = 0x2c,
+       SOC_LED_CTRL            = 0x2c,
        SOC_LED_CTRL_BLINK      = (1 << 0),     /* Active LED blink */
        SOC_LED_CTRL_ACT_PRESENCE = (1 << 2),   /* Multiplex dev presence */
                                                /*  with dev activity LED */
 
        /* Shadow block registers */
-       SHD_BLK_OFS             = 0x100,
-       SHD_CTL_AST_OFS         = 0x20,         /* ofs from SHD_BLK_OFS */
+       SHD_BLK                 = 0x100,
+       SHD_CTL_AST             = 0x20,         /* ofs from SHD_BLK */
 
        /* SATA registers */
-       SATA_STATUS_OFS         = 0x300,  /* ctrl, err regs follow status */
-       SATA_ACTIVE_OFS         = 0x350,
-       SATA_FIS_IRQ_CAUSE_OFS  = 0x364,
-       SATA_FIS_IRQ_AN         = (1 << 9),     /* async notification */
+       SATA_STATUS             = 0x300,  /* ctrl, err regs follow status */
+       SATA_ACTIVE             = 0x350,
+       FIS_IRQ_CAUSE           = 0x364,
+       FIS_IRQ_CAUSE_AN        = (1 << 9),     /* async notification */
 
-       LTMODE_OFS              = 0x30c,
+       LTMODE                  = 0x30c,        /* requires read-after-write */
        LTMODE_BIT8             = (1 << 8),     /* unknown, but necessary */
 
+       PHY_MODE2               = 0x330,
        PHY_MODE3               = 0x310,
-       PHY_MODE4               = 0x314,
+
+       PHY_MODE4               = 0x314,        /* requires read-after-write */
        PHY_MODE4_CFG_MASK      = 0x00000003,   /* phy internal config field */
        PHY_MODE4_CFG_VALUE     = 0x00000001,   /* phy internal config field */
        PHY_MODE4_RSVD_ZEROS    = 0x5de3fffa,   /* Gen2e always write zeros */
        PHY_MODE4_RSVD_ONES     = 0x00000005,   /* Gen2e always write ones */
 
-       PHY_MODE2               = 0x330,
-       SATA_IFCTL_OFS          = 0x344,
-       SATA_TESTCTL_OFS        = 0x348,
-       SATA_IFSTAT_OFS         = 0x34c,
-       VENDOR_UNIQUE_FIS_OFS   = 0x35c,
+       SATA_IFCTL              = 0x344,
+       SATA_TESTCTL            = 0x348,
+       SATA_IFSTAT             = 0x34c,
+       VENDOR_UNIQUE_FIS       = 0x35c,
 
-       FISCFG_OFS              = 0x360,
+       FISCFG                  = 0x360,
        FISCFG_WAIT_DEV_ERR     = (1 << 8),     /* wait for host on DevErr */
        FISCFG_SINGLE_SYNC      = (1 << 16),    /* SYNC on DMA activation */
 
        MV5_PHY_MODE            = 0x74,
-       MV5_LTMODE_OFS          = 0x30,
-       MV5_PHY_CTL_OFS         = 0x0C,
-       SATA_INTERFACE_CFG_OFS  = 0x050,
+       MV5_LTMODE              = 0x30,
+       MV5_PHY_CTL             = 0x0C,
+       SATA_IFCFG              = 0x050,
 
        MV_M2_PREAMP_MASK       = 0x7e0,
 
        /* Port registers */
-       EDMA_CFG_OFS            = 0,
+       EDMA_CFG                = 0,
        EDMA_CFG_Q_DEPTH        = 0x1f,         /* max device queue depth */
        EDMA_CFG_NCQ            = (1 << 5),     /* for R/W FPDMA queued */
        EDMA_CFG_NCQ_GO_ON_ERR  = (1 << 14),    /* continue on error */
@@ -303,8 +310,8 @@ enum {
        EDMA_CFG_EDMA_FBS       = (1 << 16),    /* EDMA FIS-Based Switching */
        EDMA_CFG_FBS            = (1 << 26),    /* FIS-Based Switching */
 
-       EDMA_ERR_IRQ_CAUSE_OFS  = 0x8,
-       EDMA_ERR_IRQ_MASK_OFS   = 0xc,
+       EDMA_ERR_IRQ_CAUSE      = 0x8,
+       EDMA_ERR_IRQ_MASK       = 0xc,
        EDMA_ERR_D_PAR          = (1 << 0),     /* UDMA data parity err */
        EDMA_ERR_PRD_PAR        = (1 << 1),     /* UDMA PRD parity err */
        EDMA_ERR_DEV            = (1 << 2),     /* device error */
@@ -373,36 +380,36 @@ enum {
                                  EDMA_ERR_INTRL_PAR |
                                  EDMA_ERR_IORDY,
 
-       EDMA_REQ_Q_BASE_HI_OFS  = 0x10,
-       EDMA_REQ_Q_IN_PTR_OFS   = 0x14,         /* also contains BASE_LO */
+       EDMA_REQ_Q_BASE_HI      = 0x10,
+       EDMA_REQ_Q_IN_PTR       = 0x14,         /* also contains BASE_LO */
 
-       EDMA_REQ_Q_OUT_PTR_OFS  = 0x18,
+       EDMA_REQ_Q_OUT_PTR      = 0x18,
        EDMA_REQ_Q_PTR_SHIFT    = 5,
 
-       EDMA_RSP_Q_BASE_HI_OFS  = 0x1c,
-       EDMA_RSP_Q_IN_PTR_OFS   = 0x20,
-       EDMA_RSP_Q_OUT_PTR_OFS  = 0x24,         /* also contains BASE_LO */
+       EDMA_RSP_Q_BASE_HI      = 0x1c,
+       EDMA_RSP_Q_IN_PTR       = 0x20,
+       EDMA_RSP_Q_OUT_PTR      = 0x24,         /* also contains BASE_LO */
        EDMA_RSP_Q_PTR_SHIFT    = 3,
 
-       EDMA_CMD_OFS            = 0x28,         /* EDMA command register */
+       EDMA_CMD                = 0x28,         /* EDMA command register */
        EDMA_EN                 = (1 << 0),     /* enable EDMA */
        EDMA_DS                 = (1 << 1),     /* disable EDMA; self-negated */
        EDMA_RESET              = (1 << 2),     /* reset eng/trans/link/phy */
 
-       EDMA_STATUS_OFS         = 0x30,         /* EDMA engine status */
+       EDMA_STATUS             = 0x30,         /* EDMA engine status */
        EDMA_STATUS_CACHE_EMPTY = (1 << 6),     /* GenIIe command cache empty */
        EDMA_STATUS_IDLE        = (1 << 7),     /* GenIIe EDMA enabled/idle */
 
-       EDMA_IORDY_TMOUT_OFS    = 0x34,
-       EDMA_ARB_CFG_OFS        = 0x38,
+       EDMA_IORDY_TMOUT        = 0x34,
+       EDMA_ARB_CFG            = 0x38,
 
-       EDMA_HALTCOND_OFS       = 0x60,         /* GenIIe halt conditions */
-       EDMA_UNKNOWN_RSVD_OFS   = 0x6C,         /* GenIIe unknown/reserved */
+       EDMA_HALTCOND           = 0x60,         /* GenIIe halt conditions */
+       EDMA_UNKNOWN_RSVD       = 0x6C,         /* GenIIe unknown/reserved */
 
-       BMDMA_CMD_OFS           = 0x224,        /* bmdma command register */
-       BMDMA_STATUS_OFS        = 0x228,        /* bmdma status register */
-       BMDMA_PRD_LOW_OFS       = 0x22c,        /* bmdma PRD addr 31:0 */
-       BMDMA_PRD_HIGH_OFS      = 0x230,        /* bmdma PRD addr 63:32 */
+       BMDMA_CMD               = 0x224,        /* bmdma command register */
+       BMDMA_STATUS            = 0x228,        /* bmdma status register */
+       BMDMA_PRD_LOW           = 0x22c,        /* bmdma PRD addr 31:0 */
+       BMDMA_PRD_HIGH          = 0x230,        /* bmdma PRD addr 63:32 */
 
        /* Host private flags (hp_flags) */
        MV_HP_FLAG_MSI          = (1 << 0),
@@ -534,8 +541,8 @@ struct mv_host_priv {
        void __iomem            *base;
        void __iomem            *main_irq_cause_addr;
        void __iomem            *main_irq_mask_addr;
-       u32                     irq_cause_ofs;
-       u32                     irq_mask_ofs;
+       u32                     irq_cause_offset;
+       u32                     irq_mask_offset;
        u32                     unmask_all_irqs;
        /*
         * These consistent DMA memory pools give us guaranteed
@@ -694,49 +701,49 @@ static struct ata_port_operations mv_iie_ops = {
 static const struct ata_port_info mv_port_info[] = {
        {  /* chip_504x */
                .flags          = MV_GEN_I_FLAGS,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv5_ops,
        },
        {  /* chip_508x */
                .flags          = MV_GEN_I_FLAGS | MV_FLAG_DUAL_HC,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv5_ops,
        },
        {  /* chip_5080 */
                .flags          = MV_GEN_I_FLAGS | MV_FLAG_DUAL_HC,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv5_ops,
        },
        {  /* chip_604x */
                .flags          = MV_GEN_II_FLAGS,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv6_ops,
        },
        {  /* chip_608x */
                .flags          = MV_GEN_II_FLAGS | MV_FLAG_DUAL_HC,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv6_ops,
        },
        {  /* chip_6042 */
                .flags          = MV_GEN_IIE_FLAGS,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv_iie_ops,
        },
        {  /* chip_7042 */
                .flags          = MV_GEN_IIE_FLAGS,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv_iie_ops,
        },
        {  /* chip_soc */
                .flags          = MV_GEN_IIE_FLAGS,
-               .pio_mask       = 0x1f, /* pio0-4 */
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = ATA_UDMA6,
                .port_ops       = &mv_iie_ops,
        },
@@ -840,7 +847,7 @@ static inline unsigned int mv_hardport_from_port(unsigned int port)
 
 static inline void __iomem *mv_hc_base(void __iomem *base, unsigned int hc)
 {
-       return (base + MV_SATAHC0_REG_BASE + (hc * MV_SATAHC_REG_SZ));
+       return (base + SATAHC0_REG_BASE + (hc * MV_SATAHC_REG_SZ));
 }
 
 static inline void __iomem *mv_hc_base_from_port(void __iomem *base,
@@ -895,10 +902,10 @@ static void mv_save_cached_regs(struct ata_port *ap)
        void __iomem *port_mmio = mv_ap_base(ap);
        struct mv_port_priv *pp = ap->private_data;
 
-       pp->cached.fiscfg = readl(port_mmio + FISCFG_OFS);
-       pp->cached.ltmode = readl(port_mmio + LTMODE_OFS);
-       pp->cached.haltcond = readl(port_mmio + EDMA_HALTCOND_OFS);
-       pp->cached.unknown_rsvd = readl(port_mmio + EDMA_UNKNOWN_RSVD_OFS);
+       pp->cached.fiscfg = readl(port_mmio + FISCFG);
+       pp->cached.ltmode = readl(port_mmio + LTMODE);
+       pp->cached.haltcond = readl(port_mmio + EDMA_HALTCOND);
+       pp->cached.unknown_rsvd = readl(port_mmio + EDMA_UNKNOWN_RSVD);
 }
 
 /**
@@ -913,8 +920,26 @@ static void mv_save_cached_regs(struct ata_port *ap)
 static inline void mv_write_cached_reg(void __iomem *addr, u32 *old, u32 new)
 {
        if (new != *old) {
+               unsigned long laddr;
                *old = new;
-               writel(new, addr);
+               /*
+                * Workaround for 88SX60x1-B2 FEr SATA#13:
+                * Read-after-write is needed to prevent generating 64-bit
+                * write cycles on the PCI bus for SATA interface registers
+                * at offsets ending in 0x4 or 0xc.
+                *
+                * Looks like a lot of fuss, but it avoids an unnecessary
+                * +1 usec read-after-write delay for unaffected registers.
+                */
+               laddr = (long)addr & 0xffff;
+               if (laddr >= 0x300 && laddr <= 0x33c) {
+                       laddr &= 0x000f;
+                       if (laddr == 0x4 || laddr == 0xc) {
+                               writelfl(new, addr); /* read after write */
+                               return;
+                       }
+               }
+               writel(new, addr); /* unaffected by the errata */
        }
 }
 
@@ -931,10 +956,10 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio,
        index = pp->req_idx << EDMA_REQ_Q_PTR_SHIFT;
 
        WARN_ON(pp->crqb_dma & 0x3ff);
-       writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS);
+       writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI);
        writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index,
-                port_mmio + EDMA_REQ_Q_IN_PTR_OFS);
-       writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS);
+                port_mmio + EDMA_REQ_Q_IN_PTR);
+       writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR);
 
        /*
         * initialize response queue
@@ -943,10 +968,10 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio,
        index = pp->resp_idx << EDMA_RSP_Q_PTR_SHIFT;
 
        WARN_ON(pp->crpb_dma & 0xff);
-       writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS);
-       writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS);
+       writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI);
+       writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR);
        writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index,
-                port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
+                port_mmio + EDMA_RSP_Q_OUT_PTR);
 }
 
 static void mv_write_main_irq_mask(u32 mask, struct mv_host_priv *hpriv)
@@ -1004,15 +1029,15 @@ static void mv_clear_and_enable_port_irqs(struct ata_port *ap,
        u32 hc_irq_cause;
 
        /* clear EDMA event indicators, if any */
-       writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
+       writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE);
 
        /* clear pending irq events */
        hc_irq_cause = ~((DEV_IRQ | DMA_IRQ) << hardport);
-       writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
+       writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE);
 
        /* clear FIS IRQ Cause */
        if (IS_GEN_IIE(hpriv))
-               writelfl(0, port_mmio + SATA_FIS_IRQ_CAUSE_OFS);
+               writelfl(0, port_mmio + FIS_IRQ_CAUSE);
 
        mv_enable_port_irqs(ap, port_irqs);
 }
@@ -1048,10 +1073,10 @@ static void mv_set_irq_coalescing(struct ata_host *host,
                 * GEN_II/GEN_IIE with dual host controllers:
                 * one set of global thresholds for the entire chip.
                 */
-               writel(clks,  mmio + MV_IRQ_COAL_TIME_THRESHOLD);
-               writel(count, mmio + MV_IRQ_COAL_IO_THRESHOLD);
+               writel(clks,  mmio + IRQ_COAL_TIME_THRESHOLD);
+               writel(count, mmio + IRQ_COAL_IO_THRESHOLD);
                /* clear leftover coal IRQ bit */
-               writel(~ALL_PORTS_COAL_IRQ, mmio + MV_IRQ_COAL_CAUSE);
+               writel(~ALL_PORTS_COAL_IRQ, mmio + IRQ_COAL_CAUSE);
                if (count)
                        coal_enable = ALL_PORTS_COAL_DONE;
                clks = count = 0; /* force clearing of regular regs below */
@@ -1061,16 +1086,16 @@ static void mv_set_irq_coalescing(struct ata_host *host,
         * All chips: independent thresholds for each HC on the chip.
         */
        hc_mmio = mv_hc_base_from_port(mmio, 0);
-       writel(clks,  hc_mmio + HC_IRQ_COAL_TIME_THRESHOLD_OFS);
-       writel(count, hc_mmio + HC_IRQ_COAL_IO_THRESHOLD_OFS);
-       writel(~HC_COAL_IRQ, hc_mmio + HC_IRQ_CAUSE_OFS);
+       writel(clks,  hc_mmio + HC_IRQ_COAL_TIME_THRESHOLD);
+       writel(count, hc_mmio + HC_IRQ_COAL_IO_THRESHOLD);
+       writel(~HC_COAL_IRQ, hc_mmio + HC_IRQ_CAUSE);
        if (count)
                coal_enable |= PORTS_0_3_COAL_DONE;
        if (is_dual_hc) {
                hc_mmio = mv_hc_base_from_port(mmio, MV_PORTS_PER_HC);
-               writel(clks,  hc_mmio + HC_IRQ_COAL_TIME_THRESHOLD_OFS);
-               writel(count, hc_mmio + HC_IRQ_COAL_IO_THRESHOLD_OFS);
-               writel(~HC_COAL_IRQ, hc_mmio + HC_IRQ_CAUSE_OFS);
+               writel(clks,  hc_mmio + HC_IRQ_COAL_TIME_THRESHOLD);
+               writel(count, hc_mmio + HC_IRQ_COAL_IO_THRESHOLD);
+               writel(~HC_COAL_IRQ, hc_mmio + HC_IRQ_CAUSE);
                if (count)
                        coal_enable |= PORTS_4_7_COAL_DONE;
        }
@@ -1108,7 +1133,7 @@ static void mv_start_edma(struct ata_port *ap, void __iomem *port_mmio,
                mv_set_edma_ptrs(port_mmio, hpriv, pp);
                mv_clear_and_enable_port_irqs(ap, port_mmio, DONE_IRQ|ERR_IRQ);
 
-               writelfl(EDMA_EN, port_mmio + EDMA_CMD_OFS);
+               writelfl(EDMA_EN, port_mmio + EDMA_CMD);
                pp->pp_flags |= MV_PP_FLAG_EDMA_EN;
        }
 }
@@ -1128,7 +1153,7 @@ static void mv_wait_for_edma_empty_idle(struct ata_port *ap)
         * as a rough guess at what even more drives might require.
         */
        for (i = 0; i < timeout; ++i) {
-               u32 edma_stat = readl(port_mmio + EDMA_STATUS_OFS);
+               u32 edma_stat = readl(port_mmio + EDMA_STATUS);
                if ((edma_stat & empty_idle) == empty_idle)
                        break;
                udelay(per_loop);
@@ -1148,11 +1173,11 @@ static int mv_stop_edma_engine(void __iomem *port_mmio)
        int i;
 
        /* Disable eDMA.  The disable bit auto clears. */
-       writelfl(EDMA_DS, port_mmio + EDMA_CMD_OFS);
+       writelfl(EDMA_DS, port_mmio + EDMA_CMD);
 
        /* Wait for the chip to confirm eDMA is off. */
        for (i = 10000; i > 0; i--) {
-               u32 reg = readl(port_mmio + EDMA_CMD_OFS);
+               u32 reg = readl(port_mmio + EDMA_CMD);
                if (!(reg & EDMA_EN))
                        return 0;
                udelay(10);
@@ -1262,10 +1287,10 @@ static unsigned int mv_scr_offset(unsigned int sc_reg_in)
        case SCR_STATUS:
        case SCR_CONTROL:
        case SCR_ERROR:
-               ofs = SATA_STATUS_OFS + (sc_reg_in * sizeof(u32));
+               ofs = SATA_STATUS + (sc_reg_in * sizeof(u32));
                break;
        case SCR_ACTIVE:
-               ofs = SATA_ACTIVE_OFS;   /* active is not with the others */
+               ofs = SATA_ACTIVE;   /* active is not with the others */
                break;
        default:
                ofs = 0xffffffffU;
@@ -1290,7 +1315,25 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val)
        unsigned int ofs = mv_scr_offset(sc_reg_in);
 
        if (ofs != 0xffffffffU) {
-               writelfl(val, mv_ap_base(link->ap) + ofs);
+               void __iomem *addr = mv_ap_base(link->ap) + ofs;
+               if (sc_reg_in == SCR_CONTROL) {
+                       /*
+                        * Workaround for 88SX60x1 FEr SATA#26:
+                        *
+                        * COMRESETs have to take care not to accidently
+                        * put the drive to sleep when writing SCR_CONTROL.
+                        * Setting bits 12..15 prevents this problem.
+                        *
+                        * So if we see an outbound COMMRESET, set those bits.
+                        * Ditto for the followup write that clears the reset.
+                        *
+                        * The proprietary driver does this for
+                        * all chip versions, and so do we.
+                        */
+                       if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1)
+                               val |= 0xf000;
+               }
+               writelfl(val, addr);
                return 0;
        } else
                return -EINVAL;
@@ -1368,9 +1411,9 @@ static void mv_config_fbs(struct ata_port *ap, int want_ncq, int want_fbs)
        }
 
        port_mmio = mv_ap_base(ap);
-       mv_write_cached_reg(port_mmio + FISCFG_OFS, old_fiscfg, fiscfg);
-       mv_write_cached_reg(port_mmio + LTMODE_OFS, old_ltmode, ltmode);
-       mv_write_cached_reg(port_mmio + EDMA_HALTCOND_OFS, old_haltcond, haltcond);
+       mv_write_cached_reg(port_mmio + FISCFG, old_fiscfg, fiscfg);
+       mv_write_cached_reg(port_mmio + LTMODE, old_ltmode, ltmode);
+       mv_write_cached_reg(port_mmio + EDMA_HALTCOND, old_haltcond, haltcond);
 }
 
 static void mv_60x1_errata_sata25(struct ata_port *ap, int want_ncq)
@@ -1379,13 +1422,13 @@ static void mv_60x1_errata_sata25(struct ata_port *ap, int want_ncq)
        u32 old, new;
 
        /* workaround for 88SX60x1 FEr SATA#25 (part 1) */
-       old = readl(hpriv->base + MV_GPIO_PORT_CTL_OFS);
+       old = readl(hpriv->base + GPIO_PORT_CTL);
        if (want_ncq)
                new = old | (1 << 22);
        else
                new = old & ~(1 << 22);
        if (new != old)
-               writel(new, hpriv->base + MV_GPIO_PORT_CTL_OFS);
+               writel(new, hpriv->base + GPIO_PORT_CTL);
 }
 
 /**
@@ -1409,7 +1452,7 @@ static void mv_bmdma_enable_iie(struct ata_port *ap, int enable_bmdma)
                new = *old | 1;
        else
                new = *old & ~1;
-       mv_write_cached_reg(mv_ap_base(ap) + EDMA_UNKNOWN_RSVD_OFS, old, new);
+       mv_write_cached_reg(mv_ap_base(ap) + EDMA_UNKNOWN_RSVD, old, new);
 }
 
 /*
@@ -1437,8 +1480,8 @@ static void mv_soc_led_blink_enable(struct ata_port *ap)
                return;
        hpriv->hp_flags |= MV_HP_QUIRK_LED_BLINK_EN;
        hc_mmio = mv_hc_base_from_port(mv_host_base(host), ap->port_no);
-       led_ctrl = readl(hc_mmio + SOC_LED_CTRL_OFS);
-       writel(led_ctrl | SOC_LED_CTRL_BLINK, hc_mmio + SOC_LED_CTRL_OFS);
+       led_ctrl = readl(hc_mmio + SOC_LED_CTRL);
+       writel(led_ctrl | SOC_LED_CTRL_BLINK, hc_mmio + SOC_LED_CTRL);
 }
 
 static void mv_soc_led_blink_disable(struct ata_port *ap)
@@ -1463,8 +1506,8 @@ static void mv_soc_led_blink_disable(struct ata_port *ap)
 
        hpriv->hp_flags &= ~MV_HP_QUIRK_LED_BLINK_EN;
        hc_mmio = mv_hc_base_from_port(mv_host_base(host), ap->port_no);
-       led_ctrl = readl(hc_mmio + SOC_LED_CTRL_OFS);
-       writel(led_ctrl & ~SOC_LED_CTRL_BLINK, hc_mmio + SOC_LED_CTRL_OFS);
+       led_ctrl = readl(hc_mmio + SOC_LED_CTRL);
+       writel(led_ctrl & ~SOC_LED_CTRL_BLINK, hc_mmio + SOC_LED_CTRL);
 }
 
 static void mv_edma_cfg(struct ata_port *ap, int want_ncq, int want_edma)
@@ -1528,7 +1571,7 @@ static void mv_edma_cfg(struct ata_port *ap, int want_ncq, int want_edma)
                pp->pp_flags |=  MV_PP_FLAG_NCQ_EN;
        }
 
-       writelfl(cfg, port_mmio + EDMA_CFG_OFS);
+       writelfl(cfg, port_mmio + EDMA_CFG);
 }
 
 static void mv_port_free_dma_mem(struct ata_port *ap)
@@ -1575,6 +1618,7 @@ static int mv_port_start(struct ata_port *ap)
        struct device *dev = ap->host->dev;
        struct mv_host_priv *hpriv = ap->host->private_data;
        struct mv_port_priv *pp;
+       unsigned long flags;
        int tag;
 
        pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL);
@@ -1610,8 +1654,12 @@ static int mv_port_start(struct ata_port *ap)
                        pp->sg_tbl_dma[tag] = pp->sg_tbl_dma[0];
                }
        }
+
+       spin_lock_irqsave(ap->lock, flags);
        mv_save_cached_regs(ap);
        mv_edma_cfg(ap, 0, 0);
+       spin_unlock_irqrestore(ap->lock, flags);
+
        return 0;
 
 out_port_free_dma_mem:
@@ -1630,8 +1678,12 @@ out_port_free_dma_mem:
  */
 static void mv_port_stop(struct ata_port *ap)
 {
+       unsigned long flags;
+
+       spin_lock_irqsave(ap->lock, flags);
        mv_stop_edma(ap);
        mv_enable_port_irqs(ap, 0);
+       spin_unlock_irqrestore(ap->lock, flags);
        mv_port_free_dma_mem(ap);
 }
 
@@ -1749,13 +1801,13 @@ static void mv_bmdma_setup(struct ata_queued_cmd *qc)
        mv_fill_sg(qc);
 
        /* clear all DMA cmd bits */
-       writel(0, port_mmio + BMDMA_CMD_OFS);
+       writel(0, port_mmio + BMDMA_CMD);
 
        /* load PRD table addr. */
        writel((pp->sg_tbl_dma[qc->tag] >> 16) >> 16,
-               port_mmio + BMDMA_PRD_HIGH_OFS);
+               port_mmio + BMDMA_PRD_HIGH);
        writelfl(pp->sg_tbl_dma[qc->tag],
-               port_mmio + BMDMA_PRD_LOW_OFS);
+               port_mmio + BMDMA_PRD_LOW);
 
        /* issue r/w command */
        ap->ops->sff_exec_command(ap, &qc->tf);
@@ -1776,7 +1828,7 @@ static void mv_bmdma_start(struct ata_queued_cmd *qc)
        u32 cmd = (rw ? 0 : ATA_DMA_WR) | ATA_DMA_START;
 
        /* start host DMA transaction */
-       writelfl(cmd, port_mmio + BMDMA_CMD_OFS);
+       writelfl(cmd, port_mmio + BMDMA_CMD);
 }
 
 /**
@@ -1795,9 +1847,9 @@ static void mv_bmdma_stop(struct ata_queued_cmd *qc)
        u32 cmd;
 
        /* clear start/stop bit */
-       cmd = readl(port_mmio + BMDMA_CMD_OFS);
+       cmd = readl(port_mmio + BMDMA_CMD);
        cmd &= ~ATA_DMA_START;
-       writelfl(cmd, port_mmio + BMDMA_CMD_OFS);
+       writelfl(cmd, port_mmio + BMDMA_CMD);
 
        /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
        ata_sff_dma_pause(ap);
@@ -1821,7 +1873,7 @@ static u8 mv_bmdma_status(struct ata_port *ap)
         * Other bits are valid only if ATA_DMA_ACTIVE==0,
         * and the ATA_DMA_INTR bit doesn't exist.
         */
-       reg = readl(port_mmio + BMDMA_STATUS_OFS);
+       reg = readl(port_mmio + BMDMA_STATUS);
        if (reg & ATA_DMA_ACTIVE)
                status = ATA_DMA_ACTIVE;
        else
@@ -2029,28 +2081,28 @@ static unsigned int mv_send_fis(struct ata_port *ap, u32 *fis, int nwords)
        int i, timeout = 200, final_word = nwords - 1;
 
        /* Initiate FIS transmission mode */
-       old_ifctl = readl(port_mmio + SATA_IFCTL_OFS);
+       old_ifctl = readl(port_mmio + SATA_IFCTL);
        ifctl = 0x100 | (old_ifctl & 0xf);
-       writelfl(ifctl, port_mmio + SATA_IFCTL_OFS);
+       writelfl(ifctl, port_mmio + SATA_IFCTL);
 
        /* Send all words of the FIS except for the final word */
        for (i = 0; i < final_word; ++i)
-               writel(fis[i], port_mmio + VENDOR_UNIQUE_FIS_OFS);
+               writel(fis[i], port_mmio + VENDOR_UNIQUE_FIS);
 
        /* Flag end-of-transmission, and then send the final word */
-       writelfl(ifctl | 0x200, port_mmio + SATA_IFCTL_OFS);
-       writelfl(fis[final_word], port_mmio + VENDOR_UNIQUE_FIS_OFS);
+       writelfl(ifctl | 0x200, port_mmio + SATA_IFCTL);
+       writelfl(fis[final_word], port_mmio + VENDOR_UNIQUE_FIS);
 
        /*
         * Wait for FIS transmission to complete.
         * This typically takes just a single iteration.
         */
        do {
-               ifstat = readl(port_mmio + SATA_IFSTAT_OFS);
+               ifstat = readl(port_mmio + SATA_IFSTAT);
        } while (!(ifstat & 0x1000) && --timeout);
 
        /* Restore original port configuration */
-       writelfl(old_ifctl, port_mmio + SATA_IFCTL_OFS);
+       writelfl(old_ifctl, port_mmio + SATA_IFCTL);
 
        /* See if it worked */
        if ((ifstat & 0x3000) != 0x1000) {
@@ -2148,7 +2200,7 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc)
 
                /* Write the request in pointer to kick the EDMA to life */
                writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | in_index,
-                                       port_mmio + EDMA_REQ_Q_IN_PTR_OFS);
+                                       port_mmio + EDMA_REQ_Q_IN_PTR);
                return 0;
 
        case ATA_PROT_PIO:
@@ -2259,7 +2311,7 @@ static unsigned int mv_get_err_pmp_map(struct ata_port *ap)
 {
        void __iomem *port_mmio = mv_ap_base(ap);
 
-       return readl(port_mmio + SATA_TESTCTL_OFS) >> 16;
+       return readl(port_mmio + SATA_TESTCTL) >> 16;
 }
 
 static void mv_pmp_eh_prep(struct ata_port *ap, unsigned int pmp_map)
@@ -2292,9 +2344,9 @@ static int mv_req_q_empty(struct ata_port *ap)
        void __iomem *port_mmio = mv_ap_base(ap);
        u32 in_ptr, out_ptr;
 
-       in_ptr  = (readl(port_mmio + EDMA_REQ_Q_IN_PTR_OFS)
+       in_ptr  = (readl(port_mmio + EDMA_REQ_Q_IN_PTR)
                        >> EDMA_REQ_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK;
-       out_ptr = (readl(port_mmio + EDMA_REQ_Q_OUT_PTR_OFS)
+       out_ptr = (readl(port_mmio + EDMA_REQ_Q_OUT_PTR)
                        >> EDMA_REQ_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK;
        return (in_ptr == out_ptr);     /* 1 == queue_is_empty */
 }
@@ -2456,12 +2508,12 @@ static void mv_err_intr(struct ata_port *ap)
        sata_scr_read(&ap->link, SCR_ERROR, &serr);
        sata_scr_write_flush(&ap->link, SCR_ERROR, serr);
 
-       edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
+       edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE);
        if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7)) {
-               fis_cause = readl(port_mmio + SATA_FIS_IRQ_CAUSE_OFS);
-               writelfl(~fis_cause, port_mmio + SATA_FIS_IRQ_CAUSE_OFS);
+               fis_cause = readl(port_mmio + FIS_IRQ_CAUSE);
+               writelfl(~fis_cause, port_mmio + FIS_IRQ_CAUSE);
        }
-       writelfl(~edma_err_cause, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
+       writelfl(~edma_err_cause, port_mmio + EDMA_ERR_IRQ_CAUSE);
 
        if (edma_err_cause & EDMA_ERR_DEV) {
                /*
@@ -2479,7 +2531,7 @@ static void mv_err_intr(struct ata_port *ap)
 
        if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7)) {
                ata_ehi_push_desc(ehi, "fis_cause=%08x", fis_cause);
-               if (fis_cause & SATA_FIS_IRQ_AN) {
+               if (fis_cause & FIS_IRQ_CAUSE_AN) {
                        u32 ec = edma_err_cause &
                               ~(EDMA_ERR_TRANS_IRQ_7 | EDMA_ERR_IRQ_TRANSIENT);
                        sata_async_notification(ap);
@@ -2581,7 +2633,7 @@ static void mv_process_crpb_response(struct ata_port *ap,
                u16 edma_status = le16_to_cpu(response->flags);
                /*
                 * edma_status from a response queue entry:
-                *   LSB is from EDMA_ERR_IRQ_CAUSE_OFS (non-NCQ only).
+                *   LSB is from EDMA_ERR_IRQ_CAUSE (non-NCQ only).
                 *   MSB is saved ATA status from command completion.
                 */
                if (!ncq_enabled) {
@@ -2613,7 +2665,7 @@ static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp
        int ncq_enabled = (pp->pp_flags & MV_PP_FLAG_NCQ_EN);
 
        /* Get the hardware queue position index */
-       in_index = (readl(port_mmio + EDMA_RSP_Q_IN_PTR_OFS)
+       in_index = (readl(port_mmio + EDMA_RSP_Q_IN_PTR)
                        >> EDMA_RSP_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK;
 
        /* Process new responses from since the last time we looked */
@@ -2638,7 +2690,7 @@ static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp
        if (work_done)
                writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) |
                         (pp->resp_idx << EDMA_RSP_Q_PTR_SHIFT),
-                        port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
+                        port_mmio + EDMA_RSP_Q_OUT_PTR);
 }
 
 static void mv_port_intr(struct ata_port *ap, u32 port_cause)
@@ -2695,7 +2747,7 @@ static int mv_host_intr(struct ata_host *host, u32 main_irq_cause)
 
        /* If asserted, clear the "all ports" IRQ coalescing bit */
        if (main_irq_cause & ALL_PORTS_COAL_DONE)
-               writel(~ALL_PORTS_COAL_IRQ, mmio + MV_IRQ_COAL_CAUSE);
+               writel(~ALL_PORTS_COAL_IRQ, mmio + IRQ_COAL_CAUSE);
 
        for (port = 0; port < hpriv->n_ports; port++) {
                struct ata_port *ap = host->ports[port];
@@ -2739,7 +2791,7 @@ static int mv_host_intr(struct ata_host *host, u32 main_irq_cause)
                                        ack_irqs |= (DMA_IRQ | DEV_IRQ) << p;
                        }
                        hc_mmio = mv_hc_base_from_port(mmio, port);
-                       writelfl(~ack_irqs, hc_mmio + HC_IRQ_CAUSE_OFS);
+                       writelfl(~ack_irqs, hc_mmio + HC_IRQ_CAUSE);
                        handled = 1;
                }
                /*
@@ -2761,7 +2813,7 @@ static int mv_pci_error(struct ata_host *host, void __iomem *mmio)
        unsigned int i, err_mask, printed = 0;
        u32 err_cause;
 
-       err_cause = readl(mmio + hpriv->irq_cause_ofs);
+       err_cause = readl(mmio + hpriv->irq_cause_offset);
 
        dev_printk(KERN_ERR, host->dev, "PCI ERROR; PCI IRQ cause=0x%08x\n",
                   err_cause);
@@ -2769,7 +2821,7 @@ static int mv_pci_error(struct ata_host *host, void __iomem *mmio)
        DPRINTK("All regs @ PCI error\n");
        mv_dump_all_regs(mmio, -1, to_pci_dev(host->dev));
 
-       writelfl(0, mmio + hpriv->irq_cause_ofs);
+       writelfl(0, mmio + hpriv->irq_cause_offset);
 
        for (i = 0; i < host->n_ports; i++) {
                ap = host->ports[i];
@@ -2906,7 +2958,7 @@ static void mv5_reset_bus(struct ata_host *host, void __iomem *mmio)
 
 static void mv5_reset_flash(struct mv_host_priv *hpriv, void __iomem *mmio)
 {
-       writel(0x0fcfffff, mmio + MV_FLASH_CTL_OFS);
+       writel(0x0fcfffff, mmio + FLASH_CTL);
 }
 
 static void mv5_read_preamp(struct mv_host_priv *hpriv, int idx,
@@ -2925,7 +2977,7 @@ static void mv5_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio)
 {
        u32 tmp;
 
-       writel(0, mmio + MV_GPIO_PORT_CTL_OFS);
+       writel(0, mmio + GPIO_PORT_CTL);
 
        /* FIXME: handle MV_HP_ERRATA_50XXB2 errata */
 
@@ -2943,14 +2995,14 @@ static void mv5_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
        int fix_apm_sq = (hpriv->hp_flags & MV_HP_ERRATA_50XXB0);
 
        if (fix_apm_sq) {
-               tmp = readl(phy_mmio + MV5_LTMODE_OFS);
+               tmp = readl(phy_mmio + MV5_LTMODE);
                tmp |= (1 << 19);
-               writel(tmp, phy_mmio + MV5_LTMODE_OFS);
+               writel(tmp, phy_mmio + MV5_LTMODE);
 
-               tmp = readl(phy_mmio + MV5_PHY_CTL_OFS);
+               tmp = readl(phy_mmio + MV5_PHY_CTL);
                tmp &= ~0x3;
                tmp |= 0x1;
-               writel(tmp, phy_mmio + MV5_PHY_CTL_OFS);
+               writel(tmp, phy_mmio + MV5_PHY_CTL);
        }
 
        tmp = readl(phy_mmio + MV5_PHY_MODE);
@@ -2971,7 +3023,7 @@ static void mv5_reset_hc_port(struct mv_host_priv *hpriv, void __iomem *mmio,
        mv_reset_channel(hpriv, mmio, port);
 
        ZERO(0x028);    /* command */
-       writel(0x11f, port_mmio + EDMA_CFG_OFS);
+       writel(0x11f, port_mmio + EDMA_CFG);
        ZERO(0x004);    /* timer */
        ZERO(0x008);    /* irq err cause */
        ZERO(0x00c);    /* irq err mask */
@@ -2982,7 +3034,7 @@ static void mv5_reset_hc_port(struct mv_host_priv *hpriv, void __iomem *mmio,
        ZERO(0x024);    /* respq outp */
        ZERO(0x020);    /* respq inp */
        ZERO(0x02c);    /* test control */
-       writel(0xbc, port_mmio + EDMA_IORDY_TMOUT_OFS);
+       writel(0xbc, port_mmio + EDMA_IORDY_TMOUT);
 }
 #undef ZERO
 
@@ -3028,16 +3080,16 @@ static void mv_reset_pci_bus(struct ata_host *host, void __iomem *mmio)
        struct mv_host_priv *hpriv = host->private_data;
        u32 tmp;
 
-       tmp = readl(mmio + MV_PCI_MODE_OFS);
+       tmp = readl(mmio + MV_PCI_MODE);
        tmp &= 0xff00ffff;
-       writel(tmp, mmio + MV_PCI_MODE_OFS);
+       writel(tmp, mmio + MV_PCI_MODE);
 
        ZERO(MV_PCI_DISC_TIMER);
        ZERO(MV_PCI_MSI_TRIGGER);
-       writel(0x000100ff, mmio + MV_PCI_XBAR_TMOUT_OFS);
+       writel(0x000100ff, mmio + MV_PCI_XBAR_TMOUT);
        ZERO(MV_PCI_SERR_MASK);
-       ZERO(hpriv->irq_cause_ofs);
-       ZERO(hpriv->irq_mask_ofs);
+       ZERO(hpriv->irq_cause_offset);
+       ZERO(hpriv->irq_mask_offset);
        ZERO(MV_PCI_ERR_LOW_ADDRESS);
        ZERO(MV_PCI_ERR_HIGH_ADDRESS);
        ZERO(MV_PCI_ERR_ATTRIBUTE);
@@ -3051,10 +3103,10 @@ static void mv6_reset_flash(struct mv_host_priv *hpriv, void __iomem *mmio)
 
        mv5_reset_flash(hpriv, mmio);
 
-       tmp = readl(mmio + MV_GPIO_PORT_CTL_OFS);
+       tmp = readl(mmio + GPIO_PORT_CTL);
        tmp &= 0x3;
        tmp |= (1 << 5) | (1 << 6);
-       writel(tmp, mmio + MV_GPIO_PORT_CTL_OFS);
+       writel(tmp, mmio + GPIO_PORT_CTL);
 }
 
 /**
@@ -3069,7 +3121,7 @@ static void mv6_reset_flash(struct mv_host_priv *hpriv, void __iomem *mmio)
 static int mv6_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio,
                        unsigned int n_hc)
 {
-       void __iomem *reg = mmio + PCI_MAIN_CMD_STS_OFS;
+       void __iomem *reg = mmio + PCI_MAIN_CMD_STS;
        int i, rc = 0;
        u32 t;
 
@@ -3127,7 +3179,7 @@ static void mv6_read_preamp(struct mv_host_priv *hpriv, int idx,
        void __iomem *port_mmio;
        u32 tmp;
 
-       tmp = readl(mmio + MV_RESET_CFG_OFS);
+       tmp = readl(mmio + RESET_CFG);
        if ((tmp & (1 << 0)) == 0) {
                hpriv->signal[idx].amps = 0x7 << 8;
                hpriv->signal[idx].pre = 0x1 << 5;
@@ -3143,7 +3195,7 @@ static void mv6_read_preamp(struct mv_host_priv *hpriv, int idx,
 
 static void mv6_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio)
 {
-       writel(0x00000060, mmio + MV_GPIO_PORT_CTL_OFS);
+       writel(0x00000060, mmio + GPIO_PORT_CTL);
 }
 
 static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
@@ -3201,6 +3253,7 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
         * Workaround for 60x1-B2 errata SATA#13:
         * Any write to PHY_MODE4 (above) may corrupt PHY_MODE3,
         * so we must always rewrite PHY_MODE3 after PHY_MODE4.
+        * Or ensure we use writelfl() when writing PHY_MODE4.
         */
        writel(m3, port_mmio + PHY_MODE3);
 
@@ -3252,7 +3305,7 @@ static void mv_soc_reset_hc_port(struct mv_host_priv *hpriv,
        mv_reset_channel(hpriv, mmio, port);
 
        ZERO(0x028);            /* command */
-       writel(0x101f, port_mmio + EDMA_CFG_OFS);
+       writel(0x101f, port_mmio + EDMA_CFG);
        ZERO(0x004);            /* timer */
        ZERO(0x008);            /* irq err cause */
        ZERO(0x00c);            /* irq err mask */
@@ -3263,7 +3316,7 @@ static void mv_soc_reset_hc_port(struct mv_host_priv *hpriv,
        ZERO(0x024);            /* respq outp */
        ZERO(0x020);            /* respq inp */
        ZERO(0x02c);            /* test control */
-       writel(0xbc, port_mmio + EDMA_IORDY_TMOUT_OFS);
+       writel(0xbc, port_mmio + EDMA_IORDY_TMOUT);
 }
 
 #undef ZERO
@@ -3308,12 +3361,12 @@ static void mv_soc_reset_bus(struct ata_host *host, void __iomem *mmio)
 
 static void mv_setup_ifcfg(void __iomem *port_mmio, int want_gen2i)
 {
-       u32 ifcfg = readl(port_mmio + SATA_INTERFACE_CFG_OFS);
+       u32 ifcfg = readl(port_mmio + SATA_IFCFG);
 
        ifcfg = (ifcfg & 0xf7f) | 0x9b1000;     /* from chip spec */
        if (want_gen2i)
                ifcfg |= (1 << 7);              /* enable gen2i speed */
-       writelfl(ifcfg, port_mmio + SATA_INTERFACE_CFG_OFS);
+       writelfl(ifcfg, port_mmio + SATA_IFCFG);
 }
 
 static void mv_reset_channel(struct mv_host_priv *hpriv, void __iomem *mmio,
@@ -3327,7 +3380,7 @@ static void mv_reset_channel(struct mv_host_priv *hpriv, void __iomem *mmio,
         * to disable the EDMA engine before doing the EDMA_RESET operation.
         */
        mv_stop_edma_engine(port_mmio);
-       writelfl(EDMA_RESET, port_mmio + EDMA_CMD_OFS);
+       writelfl(EDMA_RESET, port_mmio + EDMA_CMD);
 
        if (!IS_GEN_I(hpriv)) {
                /* Enable 3.0gb/s link speed: this survives EDMA_RESET */
@@ -3336,11 +3389,11 @@ static void mv_reset_channel(struct mv_host_priv *hpriv, void __iomem *mmio,
        /*
         * Strobing EDMA_RESET here causes a hard reset of the SATA transport,
         * link, and physical layers.  It resets all SATA interface registers
-        * (except for SATA_INTERFACE_CFG), and issues a COMRESET to the dev.
+        * (except for SATA_IFCFG), and issues a COMRESET to the dev.
         */
-       writelfl(EDMA_RESET, port_mmio + EDMA_CMD_OFS);
+       writelfl(EDMA_RESET, port_mmio + EDMA_CMD);
        udelay(25);     /* allow reset propagation */
-       writelfl(0, port_mmio + EDMA_CMD_OFS);
+       writelfl(0, port_mmio + EDMA_CMD);
 
        hpriv->ops->phy_errata(hpriv, mmio, port_no);
 
@@ -3352,12 +3405,12 @@ static void mv_pmp_select(struct ata_port *ap, int pmp)
 {
        if (sata_pmp_supported(ap)) {
                void __iomem *port_mmio = mv_ap_base(ap);
-               u32 reg = readl(port_mmio + SATA_IFCTL_OFS);
+               u32 reg = readl(port_mmio + SATA_IFCTL);
                int old = reg & 0xf;
 
                if (old != pmp) {
                        reg = (reg & ~0xf) | pmp;
-                       writelfl(reg, port_mmio + SATA_IFCTL_OFS);
+                       writelfl(reg, port_mmio + SATA_IFCTL);
                }
        }
 }
@@ -3432,11 +3485,11 @@ static void mv_eh_thaw(struct ata_port *ap)
        u32 hc_irq_cause;
 
        /* clear EDMA errors on this port */
-       writel(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
+       writel(0, port_mmio + EDMA_ERR_IRQ_CAUSE);
 
        /* clear pending irq events */
        hc_irq_cause = ~((DEV_IRQ | DMA_IRQ) << hardport);
-       writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
+       writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE);
 
        mv_enable_port_irqs(ap, ERR_IRQ);
 }
@@ -3455,8 +3508,7 @@ static void mv_eh_thaw(struct ata_port *ap)
  */
 static void mv_port_init(struct ata_ioports *port,  void __iomem *port_mmio)
 {
-       void __iomem *shd_base = port_mmio + SHD_BLK_OFS;
-       unsigned serr_ofs;
+       void __iomem *serr, *shd_base = port_mmio + SHD_BLK;
 
        /* PIO related setup
         */
@@ -3471,23 +3523,23 @@ static void mv_port_init(struct ata_ioports *port,  void __iomem *port_mmio)
        port->status_addr =
                port->command_addr = shd_base + (sizeof(u32) * ATA_REG_STATUS);
        /* special case: control/altstatus doesn't have ATA_REG_ address */
-       port->altstatus_addr = port->ctl_addr = shd_base + SHD_CTL_AST_OFS;
+       port->altstatus_addr = port->ctl_addr = shd_base + SHD_CTL_AST;
 
        /* unused: */
        port->cmd_addr = port->bmdma_addr = port->scr_addr = NULL;
 
        /* Clear any currently outstanding port interrupt conditions */
-       serr_ofs = mv_scr_offset(SCR_ERROR);
-       writelfl(readl(port_mmio + serr_ofs), port_mmio + serr_ofs);
-       writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
+       serr = port_mmio + mv_scr_offset(SCR_ERROR);
+       writelfl(readl(serr), serr);
+       writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE);
 
        /* unmask all non-transient EDMA error interrupts */
-       writelfl(~EDMA_ERR_IRQ_TRANSIENT, port_mmio + EDMA_ERR_IRQ_MASK_OFS);
+       writelfl(~EDMA_ERR_IRQ_TRANSIENT, port_mmio + EDMA_ERR_IRQ_MASK);
 
        VPRINTK("EDMA cfg=0x%08x EDMA IRQ err cause/mask=0x%08x/0x%08x\n",
-               readl(port_mmio + EDMA_CFG_OFS),
-               readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS),
-               readl(port_mmio + EDMA_ERR_IRQ_MASK_OFS));
+               readl(port_mmio + EDMA_CFG),
+               readl(port_mmio + EDMA_ERR_IRQ_CAUSE),
+               readl(port_mmio + EDMA_ERR_IRQ_MASK));
 }
 
 static unsigned int mv_in_pcix_mode(struct ata_host *host)
@@ -3498,7 +3550,7 @@ static unsigned int mv_in_pcix_mode(struct ata_host *host)
 
        if (IS_SOC(hpriv) || !IS_PCIE(hpriv))
                return 0;       /* not PCI-X capable */
-       reg = readl(mmio + MV_PCI_MODE_OFS);
+       reg = readl(mmio + MV_PCI_MODE);
        if ((reg & MV_PCI_MODE_MASK) == 0)
                return 0;       /* conventional PCI mode */
        return 1;       /* chip is in PCI-X mode */
@@ -3511,13 +3563,25 @@ static int mv_pci_cut_through_okay(struct ata_host *host)
        u32 reg;
 
        if (!mv_in_pcix_mode(host)) {
-               reg = readl(mmio + PCI_COMMAND_OFS);
-               if (reg & PCI_COMMAND_MRDTRIG)
+               reg = readl(mmio + MV_PCI_COMMAND);
+               if (reg & MV_PCI_COMMAND_MRDTRIG)
                        return 0; /* not okay */
        }
        return 1; /* okay */
 }
 
+static void mv_60x1b2_errata_pci7(struct ata_host *host)
+{
+       struct mv_host_priv *hpriv = host->private_data;
+       void __iomem *mmio = hpriv->base;
+
+       /* workaround for 60x1-B2 errata PCI#7 */
+       if (mv_in_pcix_mode(host)) {
+               u32 reg = readl(mmio + MV_PCI_COMMAND);
+               writelfl(reg & ~MV_PCI_COMMAND_MWRCOM, mmio + MV_PCI_COMMAND);
+       }
+}
+
 static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
 {
        struct pci_dev *pdev = to_pci_dev(host->dev);
@@ -3571,6 +3635,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
 
                switch (pdev->revision) {
                case 0x7:
+                       mv_60x1b2_errata_pci7(host);
                        hp_flags |= MV_HP_ERRATA_60X1B2;
                        break;
                case 0x9:
@@ -3647,12 +3712,12 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
 
        hpriv->hp_flags = hp_flags;
        if (hp_flags & MV_HP_PCIE) {
-               hpriv->irq_cause_ofs    = PCIE_IRQ_CAUSE_OFS;
-               hpriv->irq_mask_ofs     = PCIE_IRQ_MASK_OFS;
+               hpriv->irq_cause_offset = PCIE_IRQ_CAUSE;
+               hpriv->irq_mask_offset  = PCIE_IRQ_MASK;
                hpriv->unmask_all_irqs  = PCIE_UNMASK_ALL_IRQS;
        } else {
-               hpriv->irq_cause_ofs    = PCI_IRQ_CAUSE_OFS;
-               hpriv->irq_mask_ofs     = PCI_IRQ_MASK_OFS;
+               hpriv->irq_cause_offset = PCI_IRQ_CAUSE;
+               hpriv->irq_mask_offset  = PCI_IRQ_MASK;
                hpriv->unmask_all_irqs  = PCI_UNMASK_ALL_IRQS;
        }
 
@@ -3681,11 +3746,11 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
                goto done;
 
        if (IS_SOC(hpriv)) {
-               hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS;
-               hpriv->main_irq_mask_addr  = mmio + SOC_HC_MAIN_IRQ_MASK_OFS;
+               hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE;
+               hpriv->main_irq_mask_addr  = mmio + SOC_HC_MAIN_IRQ_MASK;
        } else {
-               hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS;
-               hpriv->main_irq_mask_addr  = mmio + PCI_HC_MAIN_IRQ_MASK_OFS;
+               hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE;
+               hpriv->main_irq_mask_addr  = mmio + PCI_HC_MAIN_IRQ_MASK;
        }
 
        /* initialize shadow irq mask with register's value */
@@ -3727,18 +3792,20 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
 
                VPRINTK("HC%i: HC config=0x%08x HC IRQ cause "
                        "(before clear)=0x%08x\n", hc,
-                       readl(hc_mmio + HC_CFG_OFS),
-                       readl(hc_mmio + HC_IRQ_CAUSE_OFS));
+                       readl(hc_mmio + HC_CFG),
+                       readl(hc_mmio + HC_IRQ_CAUSE));
 
                /* Clear any currently outstanding hc interrupt conditions */
-               writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS);
+               writelfl(0, hc_mmio + HC_IRQ_CAUSE);
        }
 
-       /* Clear any currently outstanding host interrupt conditions */
-       writelfl(0, mmio + hpriv->irq_cause_ofs);
+       if (!IS_SOC(hpriv)) {
+               /* Clear any currently outstanding host interrupt conditions */
+               writelfl(0, mmio + hpriv->irq_cause_offset);
 
-       /* and unmask interrupt generation for host regs */
-       writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_ofs);
+               /* and unmask interrupt generation for host regs */
+               writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_offset);
+       }
 
        /*
         * enable only global host interrupts for now.
@@ -3844,7 +3911,7 @@ static int mv_platform_probe(struct platform_device *pdev)
        host->iomap = NULL;
        hpriv->base = devm_ioremap(&pdev->dev, res->start,
                                   res->end - res->start + 1);
-       hpriv->base -= MV_SATAHC0_REG_BASE;
+       hpriv->base -= SATAHC0_REG_BASE;
 
        /*
         * (Re-)program MBUS remapping windows if we are asked to.
@@ -3913,10 +3980,10 @@ static int pci_go_64(struct pci_dev *pdev)
 {
        int rc;
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
-               rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (rc) {
-                       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (rc) {
                                dev_printk(KERN_ERR, &pdev->dev,
                                           "64-bit DMA enable failed\n");
@@ -3924,13 +3991,13 @@ static int pci_go_64(struct pci_dev *pdev)
                        }
                }
        } else {
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit DMA enable failed\n");
                        return rc;
                }
-               rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit consistent DMA enable failed\n");
index c3936d3..326c0cf 100644 (file)
@@ -584,10 +584,10 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
        int rc, have_64bit_bus = (bus_info & QS_HPHY_64BIT);
 
        if (have_64bit_bus &&
-           !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
-               rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+           !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (rc) {
-                       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (rc) {
                                dev_printk(KERN_ERR, &pdev->dev,
                                           "64-bit DMA enable failed\n");
@@ -595,13 +595,13 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
                        }
                }
        } else {
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                "32-bit DMA enable failed\n");
                        return rc;
                }
-               rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                "32-bit consistent DMA enable failed\n");
index 0d8990d..77aa8d7 100644 (file)
@@ -1297,10 +1297,10 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        host->iomap = iomap;
 
        /* configure and activate the device */
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
-               rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (rc) {
-                       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (rc) {
                                dev_printk(KERN_ERR, &pdev->dev,
                                           "64-bit DMA enable failed\n");
@@ -1308,13 +1308,13 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                        }
                }
        } else {
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit DMA enable failed\n");
                        return rc;
                }
-               rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit consistent DMA enable failed\n");
index ed70bd2..8b2a278 100644 (file)
@@ -399,10 +399,10 @@ static int __devinit vsc_sata_init_one(struct pci_dev *pdev,
        /*
         * Use 32 bit DMA mask, because 64 bit address support is poor.
         */
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc)
                return rc;
-       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc)
                return rc;
 
index bdbad7e..2de6406 100644 (file)
@@ -358,7 +358,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
 
        if (pci_enable_device(pci_dev))
                return -EIO;
-       if (pci_set_dma_mask(pci_dev, DMA_32BIT_MASK) != 0) {
+       if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)) != 0) {
                printk(KERN_WARNING "he: no suitable dma available\n");
                err = -EIO;
                goto init_one_failure;
index 8733a2e..cf97c34 100644 (file)
@@ -1957,12 +1957,12 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai)
                return -ENXIO;
        }
        pci_set_master(pci);
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) != 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) != 0) {
                printk(KERN_WARNING DEV_LABEL
                    "(itf %d): No suitable DMA available.\n", lanai->number);
                return -EBUSY;
        }
-       if (pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) != 0) {
+       if (pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) != 0) {
                printk(KERN_WARNING DEV_LABEL
                    "(itf %d): No suitable DMA available.\n", lanai->number);
                return -EBUSY;
index 479694b..91dba65 100644 (file)
@@ -141,7 +141,7 @@ int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev)
                isa_dev->dev.release            = isa_dev_release;
                isa_dev->id                     = id;
 
-               isa_dev->dev.coherent_dma_mask = DMA_24BIT_MASK;
+               isa_dev->dev.coherent_dma_mask = DMA_BIT_MASK(24);
                isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask;
 
                error = device_register(&isa_dev->dev);
index f6a337c..f22ed6c 100644 (file)
@@ -1169,9 +1169,9 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
   int i;
 
   
-  if (pci_set_dma_mask(Controller->PCIDevice, DMA_32BIT_MASK))
+  if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
        return DAC960_Failure(Controller, "DMA mask out of range");
-  Controller->BounceBufferLimit = DMA_32BIT_MASK;
+  Controller->BounceBufferLimit = DMA_BIT_MASK(32);
 
   if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) {
     CommandMailboxesSize =  0;
@@ -1372,10 +1372,10 @@ static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
   dma_addr_t   CommandMailboxDMA;
   DAC960_V2_CommandStatus_T CommandStatus;
 
-       if (!pci_set_dma_mask(Controller->PCIDevice, DMA_64BIT_MASK))
-               Controller->BounceBufferLimit = DMA_64BIT_MASK;
-       else if (!pci_set_dma_mask(Controller->PCIDevice, DMA_32BIT_MASK))
-               Controller->BounceBufferLimit = DMA_32BIT_MASK;
+       if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(64)))
+               Controller->BounceBufferLimit = DMA_BIT_MASK(64);
+       else if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
+               Controller->BounceBufferLimit = DMA_BIT_MASK(32);
        else
                return DAC960_Failure(Controller, "DMA mask out of range");
 
index e7b8aa0..ddea8e4 100644 (file)
@@ -410,6 +410,23 @@ config ATA_OVER_ETH
        This driver provides Support for ATA over Ethernet block
        devices like the Coraid EtherDrive (R) Storage Blade.
 
+config MG_DISK
+       tristate "mGine mflash, gflash support"
+       depends on ARM && ATA && GPIOLIB
+       help
+         mGine mFlash(gFlash) block device driver
+
+config MG_DISK_RES
+       int "Size of reserved area before MBR"
+       depends on MG_DISK
+       default 0
+       help
+         Define size of reserved area that usually used for boot. Unit is KB.
+         All of the block device operation will be taken this value as start
+         offset
+         Examples:
+                       1024 => 1 MB
+
 config SUNVDC
        tristate "Sun Virtual Disk Client support"
        depends on SUN_LDOMS
index 3145141..7755a5e 100644 (file)
@@ -21,6 +21,7 @@ obj-$(CONFIG_BLK_CPQ_CISS_DA)  += cciss.o
 obj-$(CONFIG_BLK_DEV_DAC960)   += DAC960.o
 obj-$(CONFIG_XILINX_SYSACE)    += xsysace.o
 obj-$(CONFIG_CDROM_PKTCDVD)    += pktcdvd.o
+obj-$(CONFIG_MG_DISK)          += mg_disk.o
 obj-$(CONFIG_SUNVDC)           += sunvdc.o
 
 obj-$(CONFIG_BLK_DEV_UMEM)     += umem.o
index 5d0e135..0ef6f08 100644 (file)
@@ -51,6 +51,7 @@
 #include <scsi/scsi_ioctl.h>
 #include <linux/cdrom.h>
 #include <linux/scatterlist.h>
+#include <linux/kthread.h>
 
 #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
 #define DRIVER_NAME "HP CISS Driver (v 3.6.20)"
@@ -186,6 +187,8 @@ static int sendcmd_withirq(__u8 cmd, int ctlr, void *buff, size_t size,
                           __u8 page_code, int cmd_type);
 
 static void fail_all_cmds(unsigned long ctlr);
+static int scan_thread(void *data);
+static int check_for_unit_attention(ctlr_info_t *h, CommandList_struct *c);
 
 #ifdef CONFIG_PROC_FS
 static void cciss_procinit(int i);
@@ -735,6 +738,12 @@ static int cciss_getgeo(struct block_device *bdev, struct hd_geometry *geo)
        return 0;
 }
 
+static void check_ioctl_unit_attention(ctlr_info_t *host, CommandList_struct *c)
+{
+       if (c->err_info->CommandStatus == CMD_TARGET_STATUS &&
+                       c->err_info->ScsiStatus != SAM_STAT_CHECK_CONDITION)
+               (void)check_for_unit_attention(host, c);
+}
 /*
  * ioctl
  */
@@ -1029,6 +1038,8 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
                                         iocommand.buf_size,
                                         PCI_DMA_BIDIRECTIONAL);
 
+                       check_ioctl_unit_attention(host, c);
+
                        /* Copy the error information out */
                        iocommand.error_info = *(c->err_info);
                        if (copy_to_user
@@ -1180,6 +1191,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
                                        (dma_addr_t) temp64.val, buff_size[i],
                                        PCI_DMA_BIDIRECTIONAL);
                        }
+                       check_ioctl_unit_attention(host, c);
                        /* Copy the error information out */
                        ioc->error_info = *(c->err_info);
                        if (copy_to_user(argp, ioc, sizeof(*ioc))) {
@@ -1287,6 +1299,7 @@ static void cciss_softirq_done(struct request *rq)
 {
        CommandList_struct *cmd = rq->completion_data;
        ctlr_info_t *h = hba[cmd->ctlr];
+       unsigned int nr_bytes;
        unsigned long flags;
        u64bit temp64;
        int i, ddir;
@@ -1308,7 +1321,14 @@ static void cciss_softirq_done(struct request *rq)
        printk("Done with %p\n", rq);
 #endif                         /* CCISS_DEBUG */
 
-       if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, blk_rq_bytes(rq)))
+       /*
+        * Store the full size and set the residual count for pc requests
+        */
+       nr_bytes = blk_rq_bytes(rq);
+       if (blk_pc_request(rq))
+               rq->data_len = cmd->err_info->ResidualCnt;
+
+       if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, nr_bytes))
                BUG();
 
        spin_lock_irqsave(&h->lock, flags);
@@ -2585,12 +2605,14 @@ static inline unsigned int make_status_bytes(unsigned int scsi_status_byte,
                ((driver_byte & 0xff) << 24);
 }
 
-static inline int evaluate_target_status(CommandList_struct *cmd)
+static inline int evaluate_target_status(ctlr_info_t *h,
+                       CommandList_struct *cmd, int *retry_cmd)
 {
        unsigned char sense_key;
        unsigned char status_byte, msg_byte, host_byte, driver_byte;
        int error_value;
 
+       *retry_cmd = 0;
        /* If we get in here, it means we got "target status", that is, scsi status */
        status_byte = cmd->err_info->ScsiStatus;
        driver_byte = DRIVER_OK;
@@ -2618,6 +2640,11 @@ static inline int evaluate_target_status(CommandList_struct *cmd)
        if (((sense_key == 0x0) || (sense_key == 0x1)) && !blk_pc_request(cmd->rq))
                error_value = 0;
 
+       if (check_for_unit_attention(h, cmd)) {
+               *retry_cmd = !blk_pc_request(cmd->rq);
+               return 0;
+       }
+
        if (!blk_pc_request(cmd->rq)) { /* Not SG_IO or similar? */
                if (error_value != 0)
                        printk(KERN_WARNING "cciss: cmd %p has CHECK CONDITION"
@@ -2657,7 +2684,7 @@ static inline void complete_command(ctlr_info_t *h, CommandList_struct *cmd,
 
        switch (cmd->err_info->CommandStatus) {
        case CMD_TARGET_STATUS:
-               rq->errors = evaluate_target_status(cmd);
+               rq->errors = evaluate_target_status(h, cmd, &retry_cmd);
                break;
        case CMD_DATA_UNDERRUN:
                if (blk_fs_request(cmd->rq)) {
@@ -3008,6 +3035,63 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
+static int scan_thread(void *data)
+{
+       ctlr_info_t *h = data;
+       int rc;
+       DECLARE_COMPLETION_ONSTACK(wait);
+       h->rescan_wait = &wait;
+
+       for (;;) {
+               rc = wait_for_completion_interruptible(&wait);
+               if (kthread_should_stop())
+                       break;
+               if (!rc)
+                       rebuild_lun_table(h, 0);
+       }
+       return 0;
+}
+
+static int check_for_unit_attention(ctlr_info_t *h, CommandList_struct *c)
+{
+       if (c->err_info->SenseInfo[2] != UNIT_ATTENTION)
+               return 0;
+
+       switch (c->err_info->SenseInfo[12]) {
+       case STATE_CHANGED:
+               printk(KERN_WARNING "cciss%d: a state change "
+                       "detected, command retried\n", h->ctlr);
+               return 1;
+       break;
+       case LUN_FAILED:
+               printk(KERN_WARNING "cciss%d: LUN failure "
+                       "detected, action required\n", h->ctlr);
+               return 1;
+       break;
+       case REPORT_LUNS_CHANGED:
+               printk(KERN_WARNING "cciss%d: report LUN data "
+                       "changed\n", h->ctlr);
+               if (h->rescan_wait)
+                       complete(h->rescan_wait);
+               return 1;
+       break;
+       case POWER_OR_RESET:
+               printk(KERN_WARNING "cciss%d: a power on "
+                       "or device reset detected\n", h->ctlr);
+               return 1;
+       break;
+       case UNIT_ATTENTION_CLEARED:
+               printk(KERN_WARNING "cciss%d: unit attention "
+                   "cleared by another initiator\n", h->ctlr);
+               return 1;
+       break;
+       default:
+               printk(KERN_WARNING "cciss%d: unknown "
+                       "unit attention detected\n", h->ctlr);
+                               return 1;
+       }
+}
+
 /*
  *  We cannot read the structure directly, for portability we must use
  *   the io functions.
@@ -3181,12 +3265,21 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
  */
        cciss_interrupt_mode(c, pdev, board_id);
 
-       /*
-        * Memory base addr is first addr , the second points to the config
-        *   table
-        */
+       /* find the memory BAR */
+       for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+               if (pci_resource_flags(pdev, i) & IORESOURCE_MEM)
+                       break;
+       }
+       if (i == DEVICE_COUNT_RESOURCE) {
+               printk(KERN_WARNING "cciss: No memory BAR found\n");
+               err = -ENODEV;
+               goto err_out_free_res;
+       }
+
+       c->paddr = pci_resource_start(pdev, i); /* addressing mode bits
+                                                * already removed
+                                                */
 
-       c->paddr = pci_resource_start(pdev, 0); /* addressing mode bits already removed */
 #ifdef CCISS_DEBUG
        printk("address 0 = %lx\n", c->paddr);
 #endif                         /* CCISS_DEBUG */
@@ -3637,9 +3730,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
        hba[i]->pdev = pdev;
 
        /* configure PCI DMA stuff */
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK))
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
                dac = 1;
-       else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK))
+       else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
                dac = 0;
        else {
                printk(KERN_ERR "cciss: no suitable DMA available\n");
@@ -3753,6 +3846,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
        hba[i]->busy_initializing = 0;
 
        rebuild_lun_table(hba[i], 1);
+       hba[i]->cciss_scan_thread = kthread_run(scan_thread, hba[i],
+                               "cciss_scan%02d", i);
+       if (IS_ERR(hba[i]->cciss_scan_thread))
+               return PTR_ERR(hba[i]->cciss_scan_thread);
+
        return 1;
 
 clean4:
@@ -3828,6 +3926,7 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
                printk(KERN_ERR "cciss: Unable to remove device \n");
                return;
        }
+
        tmp_ptr = pci_get_drvdata(pdev);
        i = tmp_ptr->ctlr;
        if (hba[i] == NULL) {
@@ -3836,6 +3935,8 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
                return;
        }
 
+       kthread_stop(hba[i]->cciss_scan_thread);
+
        remove_proc_entry(hba[i]->devname, proc_cciss);
        unregister_blkdev(hba[i]->major, hba[i]->devname);
 
index 15e2b84..703e080 100644 (file)
@@ -121,6 +121,8 @@ struct ctlr_info
        struct sendcmd_reject_list scsi_rejects;
 #endif
        unsigned char alive;
+       struct completion *rescan_wait;
+       struct task_struct *cciss_scan_thread;
 };
 
 /*  Defining the diffent access_menthods */
index 24e22de..40b1b92 100644 (file)
 #define CMD_TIMEOUT             0x000B
 #define CMD_UNABORTABLE                0x000C
 
+/* Unit Attentions ASC's as defined for the MSA2012sa */
+#define POWER_OR_RESET                 0x29
+#define STATE_CHANGED                  0x2a
+#define UNIT_ATTENTION_CLEARED         0x2f
+#define LUN_FAILED                     0x3e
+#define REPORT_LUNS_CHANGED            0x3f
+
+/* Unit Attentions ASCQ's as defined for the MSA2012sa */
+
+       /* These ASCQ's defined for ASC = POWER_OR_RESET */
+#define POWER_ON_RESET                 0x00
+#define POWER_ON_REBOOT                        0x01
+#define SCSI_BUS_RESET                 0x02
+#define MSA_TARGET_RESET               0x03
+#define CONTROLLER_FAILOVER            0x04
+#define TRANSCEIVER_SE                 0x05
+#define TRANSCEIVER_LVD                        0x06
+
+       /* These ASCQ's defined for ASC = STATE_CHANGED */
+#define RESERVATION_PREEMPTED          0x03
+#define ASYM_ACCESS_CHANGED            0x06
+#define LUN_CAPACITY_CHANGED           0x09
+
 //transfer direction
 #define XFER_NONE               0x00
 #define XFER_WRITE              0x01
index 40b17d3..ddae808 100644 (file)
@@ -1431,6 +1431,7 @@ static int lo_open(struct block_device *bdev, fmode_t mode)
 static int lo_release(struct gendisk *disk, fmode_t mode)
 {
        struct loop_device *lo = disk->private_data;
+       int err;
 
        mutex_lock(&lo->lo_ctl_mutex);
 
@@ -1442,7 +1443,9 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
                 * In autoclear mode, stop the loop thread
                 * and remove configuration after last close.
                 */
-               loop_clr_fd(lo, NULL);
+               err = loop_clr_fd(lo, NULL);
+               if (!err)
+                       goto out_unlocked;
        } else {
                /*
                 * Otherwise keep thread (if running) and config,
@@ -1453,7 +1456,7 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
 
 out:
        mutex_unlock(&lo->lo_ctl_mutex);
-
+out_unlocked:
        return 0;
 }
 
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
new file mode 100644 (file)
index 0000000..fb39d9a
--- /dev/null
@@ -0,0 +1,1005 @@
+/*
+ *  drivers/block/mg_disk.c
+ *
+ *  Support for the mGine m[g]flash IO mode.
+ *  Based on legacy hd.c
+ *
+ * (c) 2008 mGine Co.,LTD
+ * (c) 2008 unsik Kim <donari75@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/blkdev.h>
+#include <linux/hdreg.h>
+#include <linux/libata.h>
+#include <linux/interrupt.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/mg_disk.h>
+
+#define MG_RES_SEC (CONFIG_MG_DISK_RES << 1)
+
+static void mg_request(struct request_queue *);
+
+static void mg_dump_status(const char *msg, unsigned int stat,
+               struct mg_host *host)
+{
+       char *name = MG_DISK_NAME;
+       struct request *req;
+
+       if (host->breq) {
+               req = elv_next_request(host->breq);
+               if (req)
+                       name = req->rq_disk->disk_name;
+       }
+
+       printk(KERN_ERR "%s: %s: status=0x%02x { ", name, msg, stat & 0xff);
+       if (stat & MG_REG_STATUS_BIT_BUSY)
+               printk("Busy ");
+       if (stat & MG_REG_STATUS_BIT_READY)
+               printk("DriveReady ");
+       if (stat & MG_REG_STATUS_BIT_WRITE_FAULT)
+               printk("WriteFault ");
+       if (stat & MG_REG_STATUS_BIT_SEEK_DONE)
+               printk("SeekComplete ");
+       if (stat & MG_REG_STATUS_BIT_DATA_REQ)
+               printk("DataRequest ");
+       if (stat & MG_REG_STATUS_BIT_CORRECTED_ERROR)
+               printk("CorrectedError ");
+       if (stat & MG_REG_STATUS_BIT_ERROR)
+               printk("Error ");
+       printk("}\n");
+       if ((stat & MG_REG_STATUS_BIT_ERROR) == 0) {
+               host->error = 0;
+       } else {
+               host->error = inb((unsigned long)host->dev_base + MG_REG_ERROR);
+               printk(KERN_ERR "%s: %s: error=0x%02x { ", name, msg,
+                               host->error & 0xff);
+               if (host->error & MG_REG_ERR_BBK)
+                       printk("BadSector ");
+               if (host->error & MG_REG_ERR_UNC)
+                       printk("UncorrectableError ");
+               if (host->error & MG_REG_ERR_IDNF)
+                       printk("SectorIdNotFound ");
+               if (host->error & MG_REG_ERR_ABRT)
+                       printk("DriveStatusError ");
+               if (host->error & MG_REG_ERR_AMNF)
+                       printk("AddrMarkNotFound ");
+               printk("}");
+               if (host->error &
+                               (MG_REG_ERR_BBK | MG_REG_ERR_UNC |
+                                MG_REG_ERR_IDNF | MG_REG_ERR_AMNF)) {
+                       if (host->breq) {
+                               req = elv_next_request(host->breq);
+                               if (req)
+                                       printk(", sector=%ld", req->sector);
+                       }
+
+               }
+               printk("\n");
+       }
+}
+
+static unsigned int mg_wait(struct mg_host *host, u32 expect, u32 msec)
+{
+       u8 status;
+       unsigned long expire, cur_jiffies;
+       struct mg_drv_data *prv_data = host->dev->platform_data;
+
+       host->error = MG_ERR_NONE;
+       expire = jiffies + msecs_to_jiffies(msec);
+
+       status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
+
+       do {
+               cur_jiffies = jiffies;
+               if (status & MG_REG_STATUS_BIT_BUSY) {
+                       if (expect == MG_REG_STATUS_BIT_BUSY)
+                               break;
+               } else {
+                       /* Check the error condition! */
+                       if (status & MG_REG_STATUS_BIT_ERROR) {
+                               mg_dump_status("mg_wait", status, host);
+                               break;
+                       }
+
+                       if (expect == MG_STAT_READY)
+                               if (MG_READY_OK(status))
+                                       break;
+
+                       if (expect == MG_REG_STATUS_BIT_DATA_REQ)
+                               if (status & MG_REG_STATUS_BIT_DATA_REQ)
+                                       break;
+               }
+               if (!msec) {
+                       mg_dump_status("not ready", status, host);
+                       return MG_ERR_INV_STAT;
+               }
+               if (prv_data->use_polling)
+                       msleep(1);
+
+               status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
+       } while (time_before(cur_jiffies, expire));
+
+       if (time_after_eq(cur_jiffies, expire) && msec)
+               host->error = MG_ERR_TIMEOUT;
+
+       return host->error;
+}
+
+static unsigned int mg_wait_rstout(u32 rstout, u32 msec)
+{
+       unsigned long expire;
+
+       expire = jiffies + msecs_to_jiffies(msec);
+       while (time_before(jiffies, expire)) {
+               if (gpio_get_value(rstout) == 1)
+                       return MG_ERR_NONE;
+               msleep(10);
+       }
+
+       return MG_ERR_RSTOUT;
+}
+
+static void mg_unexpected_intr(struct mg_host *host)
+{
+       u32 status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
+
+       mg_dump_status("mg_unexpected_intr", status, host);
+}
+
+static irqreturn_t mg_irq(int irq, void *dev_id)
+{
+       struct mg_host *host = dev_id;
+       void (*handler)(struct mg_host *) = host->mg_do_intr;
+
+       host->mg_do_intr = 0;
+       del_timer(&host->timer);
+       if (!handler)
+               handler = mg_unexpected_intr;
+       handler(host);
+       return IRQ_HANDLED;
+}
+
+static int mg_get_disk_id(struct mg_host *host)
+{
+       u32 i;
+       s32 err;
+       const u16 *id = host->id;
+       struct mg_drv_data *prv_data = host->dev->platform_data;
+       char fwrev[ATA_ID_FW_REV_LEN + 1];
+       char model[ATA_ID_PROD_LEN + 1];
+       char serial[ATA_ID_SERNO_LEN + 1];
+
+       if (!prv_data->use_polling)
+               outb(MG_REG_CTRL_INTR_DISABLE,
+                               (unsigned long)host->dev_base +
+                               MG_REG_DRV_CTRL);
+
+       outb(MG_CMD_ID, (unsigned long)host->dev_base + MG_REG_COMMAND);
+       err = mg_wait(host, MG_REG_STATUS_BIT_DATA_REQ, MG_TMAX_WAIT_RD_DRQ);
+       if (err)
+               return err;
+
+       for (i = 0; i < (MG_SECTOR_SIZE >> 1); i++)
+               host->id[i] = le16_to_cpu(inw((unsigned long)host->dev_base +
+                                       MG_BUFF_OFFSET + i * 2));
+
+       outb(MG_CMD_RD_CONF, (unsigned long)host->dev_base + MG_REG_COMMAND);
+       err = mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD);
+       if (err)
+               return err;
+
+       if ((id[ATA_ID_FIELD_VALID] & 1) == 0)
+               return MG_ERR_TRANSLATION;
+
+       host->n_sectors = ata_id_u32(id, ATA_ID_LBA_CAPACITY);
+       host->cyls = id[ATA_ID_CYLS];
+       host->heads = id[ATA_ID_HEADS];
+       host->sectors = id[ATA_ID_SECTORS];
+
+       if (MG_RES_SEC && host->heads && host->sectors) {
+               /* modify cyls, n_sectors */
+               host->cyls = (host->n_sectors - MG_RES_SEC) /
+                       host->heads / host->sectors;
+               host->nres_sectors = host->n_sectors - host->cyls *
+                       host->heads * host->sectors;
+               host->n_sectors -= host->nres_sectors;
+       }
+
+       ata_id_c_string(id, fwrev, ATA_ID_FW_REV, sizeof(fwrev));
+       ata_id_c_string(id, model, ATA_ID_PROD, sizeof(model));
+       ata_id_c_string(id, serial, ATA_ID_SERNO, sizeof(serial));
+       printk(KERN_INFO "mg_disk: model: %s\n", model);
+       printk(KERN_INFO "mg_disk: firm: %.8s\n", fwrev);
+       printk(KERN_INFO "mg_disk: serial: %s\n", serial);
+       printk(KERN_INFO "mg_disk: %d + reserved %d sectors\n",
+                       host->n_sectors, host->nres_sectors);
+
+       if (!prv_data->use_polling)
+               outb(MG_REG_CTRL_INTR_ENABLE, (unsigned long)host->dev_base +
+                               MG_REG_DRV_CTRL);
+
+       return err;
+}
+
+
+static int mg_disk_init(struct mg_host *host)
+{
+       struct mg_drv_data *prv_data = host->dev->platform_data;
+       s32 err;
+       u8 init_status;
+
+       /* hdd rst low */
+       gpio_set_value(host->rst, 0);
+       err = mg_wait(host, MG_REG_STATUS_BIT_BUSY, MG_TMAX_RST_TO_BUSY);
+       if (err)
+               return err;
+
+       /* hdd rst high */
+       gpio_set_value(host->rst, 1);
+       err = mg_wait(host, MG_STAT_READY, MG_TMAX_HDRST_TO_RDY);
+       if (err)
+               return err;
+
+       /* soft reset on */
+       outb(MG_REG_CTRL_RESET |
+                       (prv_data->use_polling ? MG_REG_CTRL_INTR_DISABLE :
+                        MG_REG_CTRL_INTR_ENABLE),
+                       (unsigned long)host->dev_base + MG_REG_DRV_CTRL);
+       err = mg_wait(host, MG_REG_STATUS_BIT_BUSY, MG_TMAX_RST_TO_BUSY);
+       if (err)
+               return err;
+
+       /* soft reset off */
+       outb(prv_data->use_polling ? MG_REG_CTRL_INTR_DISABLE :
+                       MG_REG_CTRL_INTR_ENABLE,
+                       (unsigned long)host->dev_base + MG_REG_DRV_CTRL);
+       err = mg_wait(host, MG_STAT_READY, MG_TMAX_SWRST_TO_RDY);
+       if (err)
+               return err;
+
+       init_status = inb((unsigned long)host->dev_base + MG_REG_STATUS) & 0xf;
+
+       if (init_status == 0xf)
+               return MG_ERR_INIT_STAT;
+
+       return err;
+}
+
+static void mg_bad_rw_intr(struct mg_host *host)
+{
+       struct request *req = elv_next_request(host->breq);
+       if (req != NULL)
+               if (++req->errors >= MG_MAX_ERRORS ||
+                               host->error == MG_ERR_TIMEOUT)
+                       end_request(req, 0);
+}
+
+static unsigned int mg_out(struct mg_host *host,
+               unsigned int sect_num,
+               unsigned int sect_cnt,
+               unsigned int cmd,
+               void (*intr_addr)(struct mg_host *))
+{
+       struct mg_drv_data *prv_data = host->dev->platform_data;
+
+       if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
+               return host->error;
+
+       if (!prv_data->use_polling) {
+               host->mg_do_intr = intr_addr;
+               mod_timer(&host->timer, jiffies + 3 * HZ);
+       }
+       if (MG_RES_SEC)
+               sect_num += MG_RES_SEC;
+       outb((u8)sect_cnt, (unsigned long)host->dev_base + MG_REG_SECT_CNT);
+       outb((u8)sect_num, (unsigned long)host->dev_base + MG_REG_SECT_NUM);
+       outb((u8)(sect_num >> 8), (unsigned long)host->dev_base +
+                       MG_REG_CYL_LOW);
+       outb((u8)(sect_num >> 16), (unsigned long)host->dev_base +
+                       MG_REG_CYL_HIGH);
+       outb((u8)((sect_num >> 24) | MG_REG_HEAD_LBA_MODE),
+                       (unsigned long)host->dev_base + MG_REG_DRV_HEAD);
+       outb(cmd, (unsigned long)host->dev_base + MG_REG_COMMAND);
+       return MG_ERR_NONE;
+}
+
+static void mg_read(struct request *req)
+{
+       u32 remains, j;
+       struct mg_host *host = req->rq_disk->private_data;
+
+       remains = req->nr_sectors;
+
+       if (mg_out(host, req->sector, req->nr_sectors, MG_CMD_RD, 0) !=
+                       MG_ERR_NONE)
+               mg_bad_rw_intr(host);
+
+       MG_DBG("requested %d sects (from %ld), buffer=0x%p\n",
+                       remains, req->sector, req->buffer);
+
+       while (remains) {
+               if (mg_wait(host, MG_REG_STATUS_BIT_DATA_REQ,
+                                       MG_TMAX_WAIT_RD_DRQ) != MG_ERR_NONE) {
+                       mg_bad_rw_intr(host);
+                       return;
+               }
+               for (j = 0; j < MG_SECTOR_SIZE >> 1; j++) {
+                       *(u16 *)req->buffer =
+                               inw((unsigned long)host->dev_base +
+                                               MG_BUFF_OFFSET + (j << 1));
+                       req->buffer += 2;
+               }
+
+               req->sector++;
+               req->errors = 0;
+               remains = --req->nr_sectors;
+               --req->current_nr_sectors;
+
+               if (req->current_nr_sectors <= 0) {
+                       MG_DBG("remain : %d sects\n", remains);
+                       end_request(req, 1);
+                       if (remains > 0)
+                               req = elv_next_request(host->breq);
+               }
+
+               outb(MG_CMD_RD_CONF, (unsigned long)host->dev_base +
+                               MG_REG_COMMAND);
+       }
+}
+
+static void mg_write(struct request *req)
+{
+       u32 remains, j;
+       struct mg_host *host = req->rq_disk->private_data;
+
+       remains = req->nr_sectors;
+
+       if (mg_out(host, req->sector, req->nr_sectors, MG_CMD_WR, 0) !=
+                       MG_ERR_NONE) {
+               mg_bad_rw_intr(host);
+               return;
+       }
+
+
+       MG_DBG("requested %d sects (from %ld), buffer=0x%p\n",
+                       remains, req->sector, req->buffer);
+       while (remains) {
+               if (mg_wait(host, MG_REG_STATUS_BIT_DATA_REQ,
+                                       MG_TMAX_WAIT_WR_DRQ) != MG_ERR_NONE) {
+                       mg_bad_rw_intr(host);
+                       return;
+               }
+               for (j = 0; j < MG_SECTOR_SIZE >> 1; j++) {
+                       outw(*(u16 *)req->buffer,
+                                       (unsigned long)host->dev_base +
+                                       MG_BUFF_OFFSET + (j << 1));
+                       req->buffer += 2;
+               }
+               req->sector++;
+               remains = --req->nr_sectors;
+               --req->current_nr_sectors;
+
+               if (req->current_nr_sectors <= 0) {
+                       MG_DBG("remain : %d sects\n", remains);
+                       end_request(req, 1);
+                       if (remains > 0)
+                               req = elv_next_request(host->breq);
+               }
+
+               outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base +
+                               MG_REG_COMMAND);
+       }
+}
+
+static void mg_read_intr(struct mg_host *host)
+{
+       u32 i;
+       struct request *req;
+
+       /* check status */
+       do {
+               i = inb((unsigned long)host->dev_base + MG_REG_STATUS);
+               if (i & MG_REG_STATUS_BIT_BUSY)
+                       break;
+               if (!MG_READY_OK(i))
+                       break;
+               if (i & MG_REG_STATUS_BIT_DATA_REQ)
+                       goto ok_to_read;
+       } while (0);
+       mg_dump_status("mg_read_intr", i, host);
+       mg_bad_rw_intr(host);
+       mg_request(host->breq);
+       return;
+
+ok_to_read:
+       /* get current segment of request */
+       req = elv_next_request(host->breq);
+
+       /* read 1 sector */
+       for (i = 0; i < MG_SECTOR_SIZE >> 1; i++) {
+               *(u16 *)req->buffer =
+                       inw((unsigned long)host->dev_base + MG_BUFF_OFFSET +
+                                       (i << 1));
+               req->buffer += 2;
+       }
+
+       /* manipulate request */
+       MG_DBG("sector %ld, remaining=%ld, buffer=0x%p\n",
+                       req->sector, req->nr_sectors - 1, req->buffer);
+
+       req->sector++;
+       req->errors = 0;
+       i = --req->nr_sectors;
+       --req->current_nr_sectors;
+
+       /* let know if current segment done */
+       if (req->current_nr_sectors <= 0)
+               end_request(req, 1);
+
+       /* set handler if read remains */
+       if (i > 0) {
+               host->mg_do_intr = mg_read_intr;
+               mod_timer(&host->timer, jiffies + 3 * HZ);
+       }
+
+       /* send read confirm */
+       outb(MG_CMD_RD_CONF, (unsigned long)host->dev_base + MG_REG_COMMAND);
+
+       /* goto next request */
+       if (!i)
+               mg_request(host->breq);
+}
+
+static void mg_write_intr(struct mg_host *host)
+{
+       u32 i, j;
+       u16 *buff;
+       struct request *req;
+
+       /* get current segment of request */
+       req = elv_next_request(host->breq);
+
+       /* check status */
+       do {
+               i = inb((unsigned long)host->dev_base + MG_REG_STATUS);
+               if (i & MG_REG_STATUS_BIT_BUSY)
+                       break;
+               if (!MG_READY_OK(i))
+                       break;
+               if ((req->nr_sectors <= 1) || (i & MG_REG_STATUS_BIT_DATA_REQ))
+                       goto ok_to_write;
+       } while (0);
+       mg_dump_status("mg_write_intr", i, host);
+       mg_bad_rw_intr(host);
+       mg_request(host->breq);
+       return;
+
+ok_to_write:
+       /* manipulate request */
+       req->sector++;
+       i = --req->nr_sectors;
+       --req->current_nr_sectors;
+       req->buffer += MG_SECTOR_SIZE;
+
+       /* let know if current segment or all done */
+       if (!i || (req->bio && req->current_nr_sectors <= 0))
+               end_request(req, 1);
+
+       /* write 1 sector and set handler if remains */
+       if (i > 0) {
+               buff = (u16 *)req->buffer;
+               for (j = 0; j < MG_STORAGE_BUFFER_SIZE >> 1; j++) {
+                       outw(*buff, (unsigned long)host->dev_base +
+                                       MG_BUFF_OFFSET + (j << 1));
+                       buff++;
+               }
+               MG_DBG("sector %ld, remaining=%ld, buffer=0x%p\n",
+                               req->sector, req->nr_sectors, req->buffer);
+               host->mg_do_intr = mg_write_intr;
+               mod_timer(&host->timer, jiffies + 3 * HZ);
+       }
+
+       /* send write confirm */
+       outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base + MG_REG_COMMAND);
+
+       if (!i)
+               mg_request(host->breq);
+}
+
+void mg_times_out(unsigned long data)
+{
+       struct mg_host *host = (struct mg_host *)data;
+       char *name;
+       struct request *req;
+
+       req = elv_next_request(host->breq);
+       if (!req)
+               return;
+
+       host->mg_do_intr = NULL;
+
+       name = req->rq_disk->disk_name;
+       printk(KERN_DEBUG "%s: timeout\n", name);
+
+       host->error = MG_ERR_TIMEOUT;
+       mg_bad_rw_intr(host);
+
+       mg_request(host->breq);
+}
+
+static void mg_request_poll(struct request_queue *q)
+{
+       struct request *req;
+       struct mg_host *host;
+
+       while ((req = elv_next_request(q)) != NULL) {
+               host = req->rq_disk->private_data;
+               if (blk_fs_request(req)) {
+                       switch (rq_data_dir(req)) {
+                       case READ:
+                               mg_read(req);
+                               break;
+                       case WRITE:
+                               mg_write(req);
+                               break;
+                       default:
+                               printk(KERN_WARNING "%s:%d unknown command\n",
+                                               __func__, __LINE__);
+                               end_request(req, 0);
+                               break;
+                       }
+               }
+       }
+}
+
+static unsigned int mg_issue_req(struct request *req,
+               struct mg_host *host,
+               unsigned int sect_num,
+               unsigned int sect_cnt)
+{
+       u16 *buff;
+       u32 i;
+
+       switch (rq_data_dir(req)) {
+       case READ:
+               if (mg_out(host, sect_num, sect_cnt, MG_CMD_RD, &mg_read_intr)
+                               != MG_ERR_NONE) {
+                       mg_bad_rw_intr(host);
+                       return host->error;
+               }
+               break;
+       case WRITE:
+               /* TODO : handler */
+               outb(MG_REG_CTRL_INTR_DISABLE,
+                               (unsigned long)host->dev_base +
+                               MG_REG_DRV_CTRL);
+               if (mg_out(host, sect_num, sect_cnt, MG_CMD_WR, &mg_write_intr)
+                               != MG_ERR_NONE) {
+                       mg_bad_rw_intr(host);
+                       return host->error;
+               }
+               del_timer(&host->timer);
+               mg_wait(host, MG_REG_STATUS_BIT_DATA_REQ, MG_TMAX_WAIT_WR_DRQ);
+               outb(MG_REG_CTRL_INTR_ENABLE, (unsigned long)host->dev_base +
+                               MG_REG_DRV_CTRL);
+               if (host->error) {
+                       mg_bad_rw_intr(host);
+                       return host->error;
+               }
+               buff = (u16 *)req->buffer;
+               for (i = 0; i < MG_SECTOR_SIZE >> 1; i++) {
+                       outw(*buff, (unsigned long)host->dev_base +
+                                       MG_BUFF_OFFSET + (i << 1));
+                       buff++;
+               }
+               mod_timer(&host->timer, jiffies + 3 * HZ);
+               outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base +
+                               MG_REG_COMMAND);
+               break;
+       default:
+               printk(KERN_WARNING "%s:%d unknown command\n",
+                               __func__, __LINE__);
+               end_request(req, 0);
+               break;
+       }
+       return MG_ERR_NONE;
+}
+
+/* This function also called from IRQ context */
+static void mg_request(struct request_queue *q)
+{
+       struct request *req;
+       struct mg_host *host;
+       u32 sect_num, sect_cnt;
+
+       while (1) {
+               req = elv_next_request(q);
+               if (!req)
+                       return;
+
+               host = req->rq_disk->private_data;
+
+               /* check unwanted request call */
+               if (host->mg_do_intr)
+                       return;
+
+               del_timer(&host->timer);
+
+               sect_num = req->sector;
+               /* deal whole segments */
+               sect_cnt = req->nr_sectors;
+
+               /* sanity check */
+               if (sect_num >= get_capacity(req->rq_disk) ||
+                               ((sect_num + sect_cnt) >
+                                get_capacity(req->rq_disk))) {
+                       printk(KERN_WARNING
+                                       "%s: bad access: sector=%d, count=%d\n",
+                                       req->rq_disk->disk_name,
+                                       sect_num, sect_cnt);
+                       end_request(req, 0);
+                       continue;
+               }
+
+               if (!blk_fs_request(req))
+                       return;
+
+               if (!mg_issue_req(req, host, sect_num, sect_cnt))
+                       return;
+       }
+}
+
+static int mg_getgeo(struct block_device *bdev, struct hd_geometry *geo)
+{
+       struct mg_host *host = bdev->bd_disk->private_data;
+
+       geo->cylinders = (unsigned short)host->cyls;
+       geo->heads = (unsigned char)host->heads;
+       geo->sectors = (unsigned char)host->sectors;
+       return 0;
+}
+
+static struct block_device_operations mg_disk_ops = {
+       .getgeo = mg_getgeo
+};
+
+static int mg_suspend(struct platform_device *plat_dev, pm_message_t state)
+{
+       struct mg_drv_data *prv_data = plat_dev->dev.platform_data;
+       struct mg_host *host = prv_data->host;
+
+       if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
+               return -EIO;
+
+       if (!prv_data->use_polling)
+               outb(MG_REG_CTRL_INTR_DISABLE,
+                               (unsigned long)host->dev_base +
+                               MG_REG_DRV_CTRL);
+
+       outb(MG_CMD_SLEEP, (unsigned long)host->dev_base + MG_REG_COMMAND);
+       /* wait until mflash deep sleep */
+       msleep(1);
+
+       if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD)) {
+               if (!prv_data->use_polling)
+                       outb(MG_REG_CTRL_INTR_ENABLE,
+                                       (unsigned long)host->dev_base +
+                                       MG_REG_DRV_CTRL);
+               return -EIO;
+       }
+
+       return 0;
+}
+
+static int mg_resume(struct platform_device *plat_dev)
+{
+       struct mg_drv_data *prv_data = plat_dev->dev.platform_data;
+       struct mg_host *host = prv_data->host;
+
+       if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
+               return -EIO;
+
+       outb(MG_CMD_WAKEUP, (unsigned long)host->dev_base + MG_REG_COMMAND);
+       /* wait until mflash wakeup */
+       msleep(1);
+
+       if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
+               return -EIO;
+
+       if (!prv_data->use_polling)
+               outb(MG_REG_CTRL_INTR_ENABLE, (unsigned long)host->dev_base +
+                               MG_REG_DRV_CTRL);
+
+       return 0;
+}
+
+static int mg_probe(struct platform_device *plat_dev)
+{
+       struct mg_host *host;
+       struct resource *rsc;
+       struct mg_drv_data *prv_data = plat_dev->dev.platform_data;
+       int err = 0;
+
+       if (!prv_data) {
+               printk(KERN_ERR "%s:%d fail (no driver_data)\n",
+                               __func__, __LINE__);
+               err = -EINVAL;
+               goto probe_err;
+       }
+
+       /* alloc mg_host */
+       host = kzalloc(sizeof(struct mg_host), GFP_KERNEL);
+       if (!host) {
+               printk(KERN_ERR "%s:%d fail (no memory for mg_host)\n",
+                               __func__, __LINE__);
+               err = -ENOMEM;
+               goto probe_err;
+       }
+       host->major = MG_DISK_MAJ;
+
+       /* link each other */
+       prv_data->host = host;
+       host->dev = &plat_dev->dev;
+
+       /* io remap */
+       rsc = platform_get_resource(plat_dev, IORESOURCE_MEM, 0);
+       if (!rsc) {
+               printk(KERN_ERR "%s:%d platform_get_resource fail\n",
+                               __func__, __LINE__);
+               err = -EINVAL;
+               goto probe_err_2;
+       }
+       host->dev_base = ioremap(rsc->start , rsc->end + 1);
+       if (!host->dev_base) {
+               printk(KERN_ERR "%s:%d ioremap fail\n",
+                               __func__, __LINE__);
+               err = -EIO;
+               goto probe_err_2;
+       }
+       MG_DBG("dev_base = 0x%x\n", (u32)host->dev_base);
+
+       /* get reset pin */
+       rsc = platform_get_resource_byname(plat_dev, IORESOURCE_IO,
+                       MG_RST_PIN);
+       if (!rsc) {
+               printk(KERN_ERR "%s:%d get reset pin fail\n",
+                               __func__, __LINE__);
+               err = -EIO;
+               goto probe_err_3;
+       }
+       host->rst = rsc->start;
+
+       /* init rst pin */
+       err = gpio_request(host->rst, MG_RST_PIN);
+       if (err)
+               goto probe_err_3;
+       gpio_direction_output(host->rst, 1);
+
+       /* reset out pin */
+       if (!(prv_data->dev_attr & MG_DEV_MASK))
+               goto probe_err_3a;
+
+       if (prv_data->dev_attr != MG_BOOT_DEV) {
+               rsc = platform_get_resource_byname(plat_dev, IORESOURCE_IO,
+                               MG_RSTOUT_PIN);
+               if (!rsc) {
+                       printk(KERN_ERR "%s:%d get reset-out pin fail\n",
+                                       __func__, __LINE__);
+                       err = -EIO;
+                       goto probe_err_3a;
+               }
+               host->rstout = rsc->start;
+               err = gpio_request(host->rstout, MG_RSTOUT_PIN);
+               if (err)
+                       goto probe_err_3a;
+               gpio_direction_input(host->rstout);
+       }
+
+       /* disk reset */
+       if (prv_data->dev_attr == MG_STORAGE_DEV) {
+               /* If POR seq. not yet finised, wait */
+               err = mg_wait_rstout(host->rstout, MG_TMAX_RSTOUT);
+               if (err)
+                       goto probe_err_3b;
+               err = mg_disk_init(host);
+               if (err) {
+                       printk(KERN_ERR "%s:%d fail (err code : %d)\n",
+                                       __func__, __LINE__, err);
+                       err = -EIO;
+                       goto probe_err_3b;
+               }
+       }
+
+       /* get irq resource */
+       if (!prv_data->use_polling) {
+               host->irq = platform_get_irq(plat_dev, 0);
+               if (host->irq == -ENXIO) {
+                       err = host->irq;
+                       goto probe_err_3b;
+               }
+               err = request_irq(host->irq, mg_irq,
+                               IRQF_DISABLED | IRQF_TRIGGER_RISING,
+                               MG_DEV_NAME, host);
+               if (err) {
+                       printk(KERN_ERR "%s:%d fail (request_irq err=%d)\n",
+                                       __func__, __LINE__, err);
+                       goto probe_err_3b;
+               }
+
+       }
+
+       /* get disk id */
+       err = mg_get_disk_id(host);
+       if (err) {
+               printk(KERN_ERR "%s:%d fail (err code : %d)\n",
+                               __func__, __LINE__, err);
+               err = -EIO;
+               goto probe_err_4;
+       }
+
+       err = register_blkdev(host->major, MG_DISK_NAME);
+       if (err < 0) {
+               printk(KERN_ERR "%s:%d register_blkdev fail (err code : %d)\n",
+                               __func__, __LINE__, err);
+               goto probe_err_4;
+       }
+       if (!host->major)
+               host->major = err;
+
+       spin_lock_init(&host->lock);
+
+       if (prv_data->use_polling)
+               host->breq = blk_init_queue(mg_request_poll, &host->lock);
+       else
+               host->breq = blk_init_queue(mg_request, &host->lock);
+
+       if (!host->breq) {
+               err = -ENOMEM;
+               printk(KERN_ERR "%s:%d (blk_init_queue) fail\n",
+                               __func__, __LINE__);
+               goto probe_err_5;
+       }
+
+       /* mflash is random device, thanx for the noop */
+       elevator_exit(host->breq->elevator);
+       err = elevator_init(host->breq, "noop");
+       if (err) {
+               printk(KERN_ERR "%s:%d (elevator_init) fail\n",
+                               __func__, __LINE__);
+               goto probe_err_6;
+       }
+       blk_queue_max_sectors(host->breq, MG_MAX_SECTS);
+       blk_queue_hardsect_size(host->breq, MG_SECTOR_SIZE);
+
+       init_timer(&host->timer);
+       host->timer.function = mg_times_out;
+       host->timer.data = (unsigned long)host;
+
+       host->gd = alloc_disk(MG_DISK_MAX_PART);
+       if (!host->gd) {
+               printk(KERN_ERR "%s:%d (alloc_disk) fail\n",
+                               __func__, __LINE__);
+               err = -ENOMEM;
+               goto probe_err_7;
+       }
+       host->gd->major = host->major;
+       host->gd->first_minor = 0;
+       host->gd->fops = &mg_disk_ops;
+       host->gd->queue = host->breq;
+       host->gd->private_data = host;
+       sprintf(host->gd->disk_name, MG_DISK_NAME"a");
+
+       set_capacity(host->gd, host->n_sectors);
+
+       add_disk(host->gd);
+
+       return err;
+
+probe_err_7:
+       del_timer_sync(&host->timer);
+probe_err_6:
+       blk_cleanup_queue(host->breq);
+probe_err_5:
+       unregister_blkdev(MG_DISK_MAJ, MG_DISK_NAME);
+probe_err_4:
+       if (!prv_data->use_polling)
+               free_irq(host->irq, host);
+probe_err_3b:
+       gpio_free(host->rstout);
+probe_err_3a:
+       gpio_free(host->rst);
+probe_err_3:
+       iounmap(host->dev_base);
+probe_err_2:
+       kfree(host);
+probe_err:
+       return err;
+}
+
+static int mg_remove(struct platform_device *plat_dev)
+{
+       struct mg_drv_data *prv_data = plat_dev->dev.platform_data;
+       struct mg_host *host = prv_data->host;
+       int err = 0;
+
+       /* delete timer */
+       del_timer_sync(&host->timer);
+
+       /* remove disk */
+       if (host->gd) {
+               del_gendisk(host->gd);
+               put_disk(host->gd);
+       }
+       /* remove queue */
+       if (host->breq)
+               blk_cleanup_queue(host->breq);
+
+       /* unregister blk device */
+       unregister_blkdev(host->major, MG_DISK_NAME);
+
+       /* free irq */
+       if (!prv_data->use_polling)
+               free_irq(host->irq, host);
+
+       /* free reset-out pin */
+       if (prv_data->dev_attr != MG_BOOT_DEV)
+               gpio_free(host->rstout);
+
+       /* free rst pin */
+       if (host->rst)
+               gpio_free(host->rst);
+
+       /* unmap io */
+       if (host->dev_base)
+               iounmap(host->dev_base);
+
+       /* free mg_host */
+       kfree(host);
+
+       return err;
+}
+
+static struct platform_driver mg_disk_driver = {
+       .probe = mg_probe,
+       .remove = mg_remove,
+       .suspend = mg_suspend,
+       .resume = mg_resume,
+       .driver = {
+               .name = MG_DEV_NAME,
+               .owner = THIS_MODULE,
+       }
+};
+
+/****************************************************************************
+ *
+ * Module stuff
+ *
+ ****************************************************************************/
+
+static int __init mg_init(void)
+{
+       printk(KERN_INFO "mGine mflash driver, (c) 2008 mGine Co.\n");
+       return platform_driver_register(&mg_disk_driver);
+}
+
+static void __exit mg_exit(void)
+{
+       printk(KERN_INFO "mflash driver : bye bye\n");
+       platform_driver_unregister(&mg_disk_driver);
+}
+
+module_init(mg_init);
+module_exit(mg_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("unsik Kim <donari75@gmail.com>");
+MODULE_DESCRIPTION("mGine m[g]flash device driver");
index a18e1ca..ff0448e 100644 (file)
@@ -1586,9 +1586,9 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
                goto err_out;
 
 #ifdef IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
-       rc = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (!rc) {
-               rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (rc) {
                        printk(KERN_ERR DRV_NAME "(%s): consistent DMA mask failure\n",
                                pci_name(pdev));
@@ -1597,7 +1597,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
                pci_dac = 1;
        } else {
 #endif
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
                                pci_name(pdev));
index c24e1bd..9744d59 100644 (file)
@@ -829,8 +829,8 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
        dev_printk(KERN_INFO, &dev->dev,
          "Micro Memory(tm) controller found (PCI Mem Module (Battery Backup))\n");
 
-       if (pci_set_dma_mask(dev, DMA_64BIT_MASK) &&
-           pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(dev, DMA_BIT_MASK(64)) &&
+           pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
                dev_printk(KERN_WARNING, &dev->dev, "NO suitable DMA found\n");
                return  -ENOMEM;
        }
index 6cccdc3..4aecf5d 100644 (file)
@@ -563,7 +563,7 @@ static void ace_fsm_dostate(struct ace_device *ace)
        case ACE_FSM_STATE_IDENTIFY_PREPARE:
                /* Send identify command */
                ace->fsm_task = ACE_TASK_IDENTIFY;
-               ace->data_ptr = &ace->cf_id;
+               ace->data_ptr = ace->cf_id;
                ace->data_count = ACE_BUF_PER_SECTOR;
                ace_out(ace, ACE_SECCNTCMD, ACE_SECCNTCMD_IDENTIFY);
 
@@ -608,8 +608,8 @@ static void ace_fsm_dostate(struct ace_device *ace)
                break;
 
        case ACE_FSM_STATE_IDENTIFY_COMPLETE:
-               ace_fix_driveid(&ace->cf_id[0]);
-               ace_dump_mem(&ace->cf_id, 512); /* Debug: Dump out disk ID */
+               ace_fix_driveid(ace->cf_id);
+               ace_dump_mem(ace->cf_id, 512);  /* Debug: Dump out disk ID */
 
                if (ace->data_result) {
                        /* Error occured, disable the disk */
@@ -622,9 +622,9 @@ static void ace_fsm_dostate(struct ace_device *ace)
 
                        /* Record disk parameters */
                        set_capacity(ace->gd,
-                               ata_id_u32(&ace->cf_id, ATA_ID_LBA_CAPACITY));
+                               ata_id_u32(ace->cf_id, ATA_ID_LBA_CAPACITY));
                        dev_info(ace->dev, "capacity: %i sectors\n",
-                               ata_id_u32(&ace->cf_id, ATA_ID_LBA_CAPACITY));
+                               ata_id_u32(ace->cf_id, ATA_ID_LBA_CAPACITY));
                }
 
                /* We're done, drop to IDLE state and notify waiters */
@@ -923,7 +923,7 @@ static int ace_release(struct gendisk *disk, fmode_t mode)
 static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)
 {
        struct ace_device *ace = bdev->bd_disk->private_data;
-       u16 *cf_id = &ace->cf_id[0];
+       u16 *cf_id = ace->cf_id;
 
        dev_dbg(ace->dev, "ace_getgeo()\n");
 
index 05674fe..73a0765 100644 (file)
@@ -75,6 +75,7 @@ MODULE_DEVICE_TABLE(pci, applicom_pci_tbl);
 MODULE_AUTHOR("David Woodhouse & Applicom International");
 MODULE_DESCRIPTION("Driver for Applicom Profibus card");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_MISCDEV(AC_MINOR);
 
 MODULE_SUPPORTED_DEVICE("ac");
 
index 272db0e..1fdb9f6 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
 #include <linux/firmware.h>
+#include <linux/device.h>
 
 #include <asm/system.h>
 #include <linux/io.h>
@@ -5408,3 +5409,4 @@ module_exit(cy_cleanup_module);
 
 MODULE_LICENSE("GPL");
 MODULE_VERSION(CY_VERSION);
+MODULE_ALIAS_CHARDEV_MAJOR(CYCLADES_MAJOR);
index 45ec263..a5c59fc 100644 (file)
@@ -2258,7 +2258,7 @@ static int esp_open(struct tty_struct *tty, struct file *filp)
  * driver.
  */
 
-static void show_serial_version(void)
+static void __init show_serial_version(void)
 {
        printk(KERN_INFO "%s version %s (DMA %u)\n",
                serial_name, serial_version, dma);
index 24aa6e8..a59eac5 100644 (file)
@@ -925,6 +925,7 @@ static void isicom_shutdown_port(struct isi_port *port)
                if (!card->count)
                        isicom_shutdown_board(card);
        }
+       tty_kref_put(tty);
 }
 
 static void isicom_flush_buffer(struct tty_struct *tty)
index 8b0da97..4a4cab7 100644 (file)
@@ -1486,11 +1486,11 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle,
        }
 
        if (!handle) /* nothing else to do */
-               return 0;
+               goto put;
 
        intr = readw(ip); /* port irq status */
        if (intr == 0)
-               return 0;
+               goto put;
 
        writew(0, ip); /* ACK port */
        ofsAddr = p->tableAddr;
@@ -1499,16 +1499,17 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle,
                                ofsAddr + HostStat);
 
        if (!inited)
-               return 0;
+               goto put;
 
        if (tty && (intr & IntrBreak) && !I_IGNBRK(tty)) { /* BREAK */
                tty_insert_flip_char(tty, 0, TTY_BREAK);
                tty_schedule_flip(tty);
        }
-       tty_kref_put(tty);
 
        if (intr & IntrLine)
                moxa_new_dcdstate(p, readb(ofsAddr + FlagStat) & DCD_state);
+put:
+       tty_kref_put(tty);
 
        return 0;
 }
index 402c9f2..a420e8d 100644 (file)
@@ -820,7 +820,6 @@ static void mxser_check_modem_status(struct tty_struct *tty,
                        wake_up_interruptible(&port->port.open_wait);
        }
 
-       tty = tty_port_tty_get(&port->port);
        if (port->port.flags & ASYNC_CTS_FLOW) {
                if (tty->hw_stopped) {
                        if (status & UART_MSR_CTS) {
index 2e8a6ee..ce81da5 100644 (file)
@@ -333,7 +333,7 @@ void rio_copy_to_card(void *from, void __iomem *to, int len)
 
 int rio_minor(struct tty_struct *tty)
 {
-       return tty->index + (tty->driver == rio_driver) ? 0 : 256;
+       return tty->index + ((tty->driver == rio_driver) ? 0 : 256);
 }
 
 static int rio_set_real_termios(void *ptr)
index 9af8d74..2176604 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/delay.h>
 #include <linux/tty_flip.h>
 #include <linux/spinlock.h>
+#include <linux/device.h>
 
 #include <linux/uaccess.h>
 
@@ -1524,6 +1525,7 @@ module_param(iobase2, int, 0);
 module_param(iobase3, int, 0);
 
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_CHARDEV_MAJOR(RISCOM8_NORMAL_MAJOR);
 #endif /* MODULE */
 
 /*
index 3c67c3d..e72be41 100644 (file)
@@ -2365,3 +2365,4 @@ module_init(specialix_init_module);
 module_exit(specialix_exit_module);
 
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_CHARDEV_MAJOR(SPECIALIX_NORMAL_MAJOR);
index 4d85402..2bef086 100644 (file)
@@ -2575,7 +2575,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                return err;
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err)
                goto err_out_disable_pci_device;
 
index af9761c..f9f05d7 100644 (file)
@@ -209,7 +209,7 @@ static struct platform_device pseudo_dev = {
        .id   = 0,
        .num_resources = 0,
        .dev  = {
-               .coherent_dma_mask = DMA_32BIT_MASK,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
                .release = dev_release,
        }
 };
index ed83dd9..2225bb6 100644 (file)
@@ -98,15 +98,15 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
        if (err)
                goto err_request_regions;
 
-       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err)
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err)
                goto err_set_dma_mask;
 
-       err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err)
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err)
                goto err_set_dma_mask;
 
index 3009e01..18d65fb 100644 (file)
@@ -545,7 +545,7 @@ static int __devinit dcdbas_probe(struct platform_device *dev)
         * BIOS SMI calls require buffer addresses be in 32-bit address space.
         * This is done by setting the DMA mask below.
         */
-       dcdbas_pdev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+       dcdbas_pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
        dcdbas_pdev->dev.dma_mask = &dcdbas_pdev->dev.coherent_dma_mask;
 
        error = sysfs_create_group(&dev->dev.kobj, &dcdbas_attr_group);
index ce52bf2..0e8a918 100644 (file)
@@ -248,6 +248,18 @@ config SENSORS_ASB100
          This driver can also be built as a module.  If so, the module
          will be called asb100.
 
+config SENSORS_ATK0110
+       tristate "ASUS ATK0110 ACPI hwmon"
+       depends on X86 && ACPI && EXPERIMENTAL
+       help
+         If you say yes here you get support for the ACPI hardware
+         monitoring interface found in many ASUS motherboards. This
+         driver will provide readings of fans, voltages and temperatures
+         through the system firmware.
+
+         This driver can also be built as a module. If so, the module
+         will be called asus_atk0110.
+
 config SENSORS_ATXP1
        tristate "Attansic ATXP1 VID controller"
        depends on I2C && EXPERIMENTAL
@@ -358,6 +370,16 @@ config SENSORS_FSCHMD
          This driver can also be built as a module.  If so, the module
          will be called fschmd.
 
+config SENSORS_G760A
+       tristate "GMT G760A"
+       depends on I2C
+       help
+         If you say yes here you get support for Global Mixed-mode
+         Technology Inc G760A fan speed PWM controller chips.
+
+         This driver can also be built as a module.  If so, the module
+         will be called g760a.
+
 config SENSORS_GL518SM
        tristate "Genesys Logic GL518SM"
        depends on I2C
index 3a6b1f0..1d37578 100644 (file)
@@ -32,6 +32,7 @@ obj-$(CONFIG_SENSORS_ADT7475) += adt7475.o
 
 obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o
 obj-$(CONFIG_SENSORS_AMS)      += ams/
+obj-$(CONFIG_SENSORS_ATK0110)  += asus_atk0110.o
 obj-$(CONFIG_SENSORS_ATXP1)    += atxp1.o
 obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
 obj-$(CONFIG_SENSORS_DME1737)  += dme1737.o
@@ -42,6 +43,7 @@ obj-$(CONFIG_SENSORS_F75375S) += f75375s.o
 obj-$(CONFIG_SENSORS_FSCHER)   += fscher.o
 obj-$(CONFIG_SENSORS_FSCHMD)   += fschmd.o
 obj-$(CONFIG_SENSORS_FSCPOS)   += fscpos.o
+obj-$(CONFIG_SENSORS_G760A)    += g760a.o
 obj-$(CONFIG_SENSORS_GL518SM)  += gl518sm.o
 obj-$(CONFIG_SENSORS_GL520SM)  += gl520sm.o
 obj-$(CONFIG_SENSORS_ULTRA45)  += ultra45_env.o
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
new file mode 100644 (file)
index 0000000..0897ede
--- /dev/null
@@ -0,0 +1,1009 @@
+/*
+ * Copyright (C) 2007-2009 Luca Tettamanti <kronos.it@gmail.com>
+ *
+ * This file is released under the GPLv2
+ * See COPYING in the top level directory of the kernel tree.
+ */
+
+#include <linux/kernel.h>
+#include <linux/hwmon.h>
+#include <linux/list.h>
+#include <linux/module.h>
+
+#include <acpi/acpi.h>
+#include <acpi/acpixf.h>
+#include <acpi/acpi_drivers.h>
+#include <acpi/acpi_bus.h>
+
+
+#define ATK_HID "ATK0110"
+
+/* Minimum time between readings, enforced in order to avoid
+ * hogging the CPU.
+ */
+#define CACHE_TIME             HZ
+
+#define BOARD_ID               "MBIF"
+#define METHOD_ENUMERATE       "GGRP"
+#define METHOD_READ            "GITM"
+#define METHOD_WRITE           "SITM"
+#define METHOD_OLD_READ_TMP    "RTMP"
+#define METHOD_OLD_READ_VLT    "RVLT"
+#define METHOD_OLD_READ_FAN    "RFAN"
+#define METHOD_OLD_ENUM_TMP    "TSIF"
+#define METHOD_OLD_ENUM_VLT    "VSIF"
+#define METHOD_OLD_ENUM_FAN    "FSIF"
+
+#define ATK_MUX_HWMON          0x00000006ULL
+
+#define ATK_CLASS_MASK         0xff000000ULL
+#define ATK_CLASS_FREQ_CTL     0x03000000ULL
+#define ATK_CLASS_FAN_CTL      0x04000000ULL
+#define ATK_CLASS_HWMON                0x06000000ULL
+
+#define ATK_TYPE_MASK          0x00ff0000ULL
+#define HWMON_TYPE_VOLT                0x00020000ULL
+#define HWMON_TYPE_TEMP                0x00030000ULL
+#define HWMON_TYPE_FAN         0x00040000ULL
+
+#define HWMON_SENSOR_ID_MASK   0x0000ffffULL
+
+enum atk_pack_member {
+       HWMON_PACK_FLAGS,
+       HWMON_PACK_NAME,
+       HWMON_PACK_LIMIT1,
+       HWMON_PACK_LIMIT2,
+       HWMON_PACK_ENABLE
+};
+
+/* New package format */
+#define _HWMON_NEW_PACK_SIZE   7
+#define _HWMON_NEW_PACK_FLAGS  0
+#define _HWMON_NEW_PACK_NAME   1
+#define _HWMON_NEW_PACK_UNK1   2
+#define _HWMON_NEW_PACK_UNK2   3
+#define _HWMON_NEW_PACK_LIMIT1 4
+#define _HWMON_NEW_PACK_LIMIT2 5
+#define _HWMON_NEW_PACK_ENABLE 6
+
+/* Old package format */
+#define _HWMON_OLD_PACK_SIZE   5
+#define _HWMON_OLD_PACK_FLAGS  0
+#define _HWMON_OLD_PACK_NAME   1
+#define _HWMON_OLD_PACK_LIMIT1 2
+#define _HWMON_OLD_PACK_LIMIT2 3
+#define _HWMON_OLD_PACK_ENABLE 4
+
+
+struct atk_data {
+       struct device *hwmon_dev;
+       acpi_handle atk_handle;
+       struct acpi_device *acpi_dev;
+
+       bool old_interface;
+
+       /* old interface */
+       acpi_handle rtmp_handle;
+       acpi_handle rvlt_handle;
+       acpi_handle rfan_handle;
+       /* new inteface */
+       acpi_handle enumerate_handle;
+       acpi_handle read_handle;
+
+       int voltage_count;
+       int temperature_count;
+       int fan_count;
+       struct list_head sensor_list;
+};
+
+
+typedef ssize_t (*sysfs_show_func)(struct device *dev,
+                       struct device_attribute *attr, char *buf);
+
+static const struct acpi_device_id atk_ids[] = {
+       {ATK_HID, 0},
+       {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, atk_ids);
+
+#define ATTR_NAME_SIZE 16 /* Worst case is "tempN_input" */
+
+struct atk_sensor_data {
+       struct list_head list;
+       struct atk_data *data;
+       struct device_attribute label_attr;
+       struct device_attribute input_attr;
+       struct device_attribute limit1_attr;
+       struct device_attribute limit2_attr;
+       char label_attr_name[ATTR_NAME_SIZE];
+       char input_attr_name[ATTR_NAME_SIZE];
+       char limit1_attr_name[ATTR_NAME_SIZE];
+       char limit2_attr_name[ATTR_NAME_SIZE];
+       u64 id;
+       u64 type;
+       u64 limit1;
+       u64 limit2;
+       u64 cached_value;
+       unsigned long last_updated; /* in jiffies */
+       bool is_valid;
+       char const *acpi_name;
+};
+
+struct atk_acpi_buffer_u64 {
+       union acpi_object buf;
+       u64 value;
+};
+
+static int atk_add(struct acpi_device *device);
+static int atk_remove(struct acpi_device *device, int type);
+static void atk_print_sensor(struct atk_data *data, union acpi_object *obj);
+static int atk_read_value(struct atk_sensor_data *sensor, u64 *value);
+static void atk_free_sensors(struct atk_data *data);
+
+static struct acpi_driver atk_driver = {
+       .name   = ATK_HID,
+       .class  = "hwmon",
+       .ids    = atk_ids,
+       .ops    = {
+               .add    = atk_add,
+               .remove = atk_remove,
+       },
+};
+
+#define input_to_atk_sensor(attr) \
+       container_of(attr, struct atk_sensor_data, input_attr)
+
+#define label_to_atk_sensor(attr) \
+       container_of(attr, struct atk_sensor_data, label_attr)
+
+#define limit1_to_atk_sensor(attr) \
+       container_of(attr, struct atk_sensor_data, limit1_attr)
+
+#define limit2_to_atk_sensor(attr) \
+       container_of(attr, struct atk_sensor_data, limit2_attr)
+
+static ssize_t atk_input_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct atk_sensor_data *s = input_to_atk_sensor(attr);
+       u64 value;
+       int err;
+
+       err = atk_read_value(s, &value);
+       if (err)
+               return err;
+
+       if (s->type == HWMON_TYPE_TEMP)
+               /* ACPI returns decidegree */
+               value *= 100;
+
+       return sprintf(buf, "%llu\n", value);
+}
+
+static ssize_t atk_label_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct atk_sensor_data *s = label_to_atk_sensor(attr);
+
+       return sprintf(buf, "%s\n", s->acpi_name);
+}
+
+static ssize_t atk_limit1_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct atk_sensor_data *s = limit1_to_atk_sensor(attr);
+       u64 value = s->limit1;
+
+       if (s->type == HWMON_TYPE_TEMP)
+               value *= 100;
+
+       return sprintf(buf, "%lld\n", value);
+}
+
+static ssize_t atk_limit2_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct atk_sensor_data *s = limit2_to_atk_sensor(attr);
+       u64 value = s->limit2;
+
+       if (s->type == HWMON_TYPE_TEMP)
+               value *= 100;
+
+       return sprintf(buf, "%lld\n", value);
+}
+
+static ssize_t atk_name_show(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       return sprintf(buf, "atk0110\n");
+}
+static struct device_attribute atk_name_attr =
+               __ATTR(name, 0444, atk_name_show, NULL);
+
+static void atk_init_attribute(struct device_attribute *attr, char *name,
+               sysfs_show_func show)
+{
+       attr->attr.name = name;
+       attr->attr.mode = 0444;
+       attr->show = show;
+       attr->store = NULL;
+}
+
+
+static union acpi_object *atk_get_pack_member(struct atk_data *data,
+                                               union acpi_object *pack,
+                                               enum atk_pack_member m)
+{
+       bool old_if = data->old_interface;
+       int offset;
+
+       switch (m) {
+       case HWMON_PACK_FLAGS:
+               offset = old_if ? _HWMON_OLD_PACK_FLAGS : _HWMON_NEW_PACK_FLAGS;
+               break;
+       case HWMON_PACK_NAME:
+               offset = old_if ? _HWMON_OLD_PACK_NAME : _HWMON_NEW_PACK_NAME;
+               break;
+       case HWMON_PACK_LIMIT1:
+               offset = old_if ? _HWMON_OLD_PACK_LIMIT1 :
+                                 _HWMON_NEW_PACK_LIMIT1;
+               break;
+       case HWMON_PACK_LIMIT2:
+               offset = old_if ? _HWMON_OLD_PACK_LIMIT2 :
+                                 _HWMON_NEW_PACK_LIMIT2;
+               break;
+       case HWMON_PACK_ENABLE:
+               offset = old_if ? _HWMON_OLD_PACK_ENABLE :
+                                 _HWMON_NEW_PACK_ENABLE;
+               break;
+       default:
+               return NULL;
+       }
+
+       return &pack->package.elements[offset];
+}
+
+
+/* New package format is:
+ * - flag (int)
+ *     class - used for de-muxing the request to the correct GITn
+ *     type (volt, temp, fan)
+ *     sensor id |
+ *     sensor id - used for de-muxing the request _inside_ the GITn
+ * - name (str)
+ * - unknown (int)
+ * - unknown (int)
+ * - limit1 (int)
+ * - limit2 (int)
+ * - enable (int)
+ *
+ * The old package has the same format but it's missing the two unknown fields.
+ */
+static int validate_hwmon_pack(struct atk_data *data, union acpi_object *obj)
+{
+       struct device *dev = &data->acpi_dev->dev;
+       union acpi_object *tmp;
+       bool old_if = data->old_interface;
+       int const expected_size = old_if ? _HWMON_OLD_PACK_SIZE :
+                                          _HWMON_NEW_PACK_SIZE;
+
+       if (obj->type != ACPI_TYPE_PACKAGE) {
+               dev_warn(dev, "Invalid type: %d\n", obj->type);
+               return -EINVAL;
+       }
+
+       if (obj->package.count != expected_size) {
+               dev_warn(dev, "Invalid package size: %d, expected: %d\n",
+                               obj->package.count, expected_size);
+               return -EINVAL;
+       }
+
+       tmp = atk_get_pack_member(data, obj, HWMON_PACK_FLAGS);
+       if (tmp->type != ACPI_TYPE_INTEGER) {
+               dev_warn(dev, "Invalid type (flag): %d\n", tmp->type);
+               return -EINVAL;
+       }
+
+       tmp = atk_get_pack_member(data, obj, HWMON_PACK_NAME);
+       if (tmp->type != ACPI_TYPE_STRING) {
+               dev_warn(dev, "Invalid type (name): %d\n", tmp->type);
+               return -EINVAL;
+       }
+
+       /* Don't check... we don't know what they're useful for anyway */
+#if 0
+       tmp = &obj->package.elements[HWMON_PACK_UNK1];
+       if (tmp->type != ACPI_TYPE_INTEGER) {
+               dev_warn(dev, "Invalid type (unk1): %d\n", tmp->type);
+               return -EINVAL;
+       }
+
+       tmp = &obj->package.elements[HWMON_PACK_UNK2];
+       if (tmp->type != ACPI_TYPE_INTEGER) {
+               dev_warn(dev, "Invalid type (unk2): %d\n", tmp->type);
+               return -EINVAL;
+       }
+#endif
+
+       tmp = atk_get_pack_member(data, obj, HWMON_PACK_LIMIT1);
+       if (tmp->type != ACPI_TYPE_INTEGER) {
+               dev_warn(dev, "Invalid type (limit1): %d\n", tmp->type);
+               return -EINVAL;
+       }
+
+       tmp = atk_get_pack_member(data, obj, HWMON_PACK_LIMIT2);
+       if (tmp->type != ACPI_TYPE_INTEGER) {
+               dev_warn(dev, "Invalid type (limit2): %d\n", tmp->type);
+               return -EINVAL;
+       }
+
+       tmp = atk_get_pack_member(data, obj, HWMON_PACK_ENABLE);
+       if (tmp->type != ACPI_TYPE_INTEGER) {
+               dev_warn(dev, "Invalid type (enable): %d\n", tmp->type);
+               return -EINVAL;
+       }
+
+       atk_print_sensor(data, obj);
+
+       return 0;
+}
+
+static char const *atk_sensor_type(union acpi_object *flags)
+{
+       u64 type = flags->integer.value & ATK_TYPE_MASK;
+       char const *what;
+
+       switch (type) {
+       case HWMON_TYPE_VOLT:
+               what = "voltage";
+               break;
+       case HWMON_TYPE_TEMP:
+               what = "temperature";
+               break;
+       case HWMON_TYPE_FAN:
+               what = "fan";
+               break;
+       default:
+               what = "unknown";
+               break;
+       }
+
+       return what;
+}
+
+static void atk_print_sensor(struct atk_data *data, union acpi_object *obj)
+{
+#ifdef DEBUG
+       struct device *dev = &data->acpi_dev->dev;
+       union acpi_object *flags;
+       union acpi_object *name;
+       union acpi_object *limit1;
+       union acpi_object *limit2;
+       union acpi_object *enable;
+       char const *what;
+
+       flags = atk_get_pack_member(data, obj, HWMON_PACK_FLAGS);
+       name = atk_get_pack_member(data, obj, HWMON_PACK_NAME);
+       limit1 = atk_get_pack_member(data, obj, HWMON_PACK_LIMIT1);
+       limit2 = atk_get_pack_member(data, obj, HWMON_PACK_LIMIT2);
+       enable = atk_get_pack_member(data, obj, HWMON_PACK_ENABLE);
+
+       what = atk_sensor_type(flags);
+
+       dev_dbg(dev, "%s: %#llx %s [%llu-%llu] %s\n", what,
+                       flags->integer.value,
+                       name->string.pointer,
+                       limit1->integer.value, limit2->integer.value,
+                       enable->integer.value ? "enabled" : "disabled");
+#endif
+}
+
+static int atk_read_value_old(struct atk_sensor_data *sensor, u64 *value)
+{
+       struct atk_data *data = sensor->data;
+       struct device *dev = &data->acpi_dev->dev;
+       struct acpi_object_list params;
+       union acpi_object id;
+       acpi_status status;
+       acpi_handle method;
+
+       switch (sensor->type) {
+       case HWMON_TYPE_VOLT:
+               method = data->rvlt_handle;
+               break;
+       case HWMON_TYPE_TEMP:
+               method = data->rtmp_handle;
+               break;
+       case HWMON_TYPE_FAN:
+               method = data->rfan_handle;
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       id.type = ACPI_TYPE_INTEGER;
+       id.integer.value = sensor->id;
+
+       params.count = 1;
+       params.pointer = &id;
+
+       status = acpi_evaluate_integer(method, NULL, &params, value);
+       if (status != AE_OK) {
+               dev_warn(dev, "%s: ACPI exception: %s\n", __func__,
+                               acpi_format_exception(status));
+               return -EIO;
+       }
+
+       return 0;
+}
+
+static int atk_read_value_new(struct atk_sensor_data *sensor, u64 *value)
+{
+       struct atk_data *data = sensor->data;
+       struct device *dev = &data->acpi_dev->dev;
+       struct acpi_object_list params;
+       struct acpi_buffer ret;
+       union acpi_object id;
+       struct atk_acpi_buffer_u64 tmp;
+       acpi_status status;
+
+       id.type = ACPI_TYPE_INTEGER;
+       id.integer.value = sensor->id;
+
+       params.count = 1;
+       params.pointer = &id;
+
+       tmp.buf.type = ACPI_TYPE_BUFFER;
+       tmp.buf.buffer.pointer = (u8 *)&tmp.value;
+       tmp.buf.buffer.length = sizeof(u64);
+       ret.length = sizeof(tmp);
+       ret.pointer = &tmp;
+
+       status = acpi_evaluate_object_typed(data->read_handle, NULL, &params,
+                       &ret, ACPI_TYPE_BUFFER);
+       if (status != AE_OK) {
+               dev_warn(dev, "%s: ACPI exception: %s\n", __func__,
+                               acpi_format_exception(status));
+               return -EIO;
+       }
+
+       /* Return buffer format:
+        * [0-3] "value" is valid flag
+        * [4-7] value
+        */
+       if (!(tmp.value & 0xffffffff)) {
+               /* The reading is not valid, possible causes:
+                * - sensor failure
+                * - enumeration was FUBAR (and we didn't notice)
+                */
+               dev_info(dev, "Failure: %#llx\n", tmp.value);
+               return -EIO;
+       }
+
+       *value = (tmp.value & 0xffffffff00000000ULL) >> 32;
+
+       return 0;
+}
+
+static int atk_read_value(struct atk_sensor_data *sensor, u64 *value)
+{
+       int err;
+
+       if (!sensor->is_valid ||
+           time_after(jiffies, sensor->last_updated + CACHE_TIME)) {
+               if (sensor->data->old_interface)
+                       err = atk_read_value_old(sensor, value);
+               else
+                       err = atk_read_value_new(sensor, value);
+
+               sensor->is_valid = true;
+               sensor->last_updated = jiffies;
+               sensor->cached_value = *value;
+       } else {
+               *value = sensor->cached_value;
+               err = 0;
+       }
+
+       return err;
+}
+
+static int atk_add_sensor(struct atk_data *data, union acpi_object *obj)
+{
+       struct device *dev = &data->acpi_dev->dev;
+       union acpi_object *flags;
+       union acpi_object *name;
+       union acpi_object *limit1;
+       union acpi_object *limit2;
+       union acpi_object *enable;
+       struct atk_sensor_data *sensor;
+       char const *base_name;
+       char const *limit1_name;
+       char const *limit2_name;
+       u64 type;
+       int err;
+       int *num;
+       int start;
+
+       if (obj->type != ACPI_TYPE_PACKAGE) {
+               /* wft is this? */
+               dev_warn(dev, "Unknown type for ACPI object: (%d)\n",
+                               obj->type);
+               return -EINVAL;
+       }
+
+       err = validate_hwmon_pack(data, obj);
+       if (err)
+               return err;
+
+       /* Ok, we have a valid hwmon package */
+       type = atk_get_pack_member(data, obj, HWMON_PACK_FLAGS)->integer.value
+              & ATK_TYPE_MASK;
+
+       switch (type) {
+       case HWMON_TYPE_VOLT:
+               base_name = "in";
+               limit1_name = "min";
+               limit2_name = "max";
+               num = &data->voltage_count;
+               start = 0;
+               break;
+       case HWMON_TYPE_TEMP:
+               base_name = "temp";
+               limit1_name = "max";
+               limit2_name = "crit";
+               num = &data->temperature_count;
+               start = 1;
+               break;
+       case HWMON_TYPE_FAN:
+               base_name = "fan";
+               limit1_name = "min";
+               limit2_name = "max";
+               num = &data->fan_count;
+               start = 1;
+               break;
+       default:
+               dev_warn(dev, "Unknown sensor type: %#llx\n", type);
+               return -EINVAL;
+       }
+
+       enable = atk_get_pack_member(data, obj, HWMON_PACK_ENABLE);
+       if (!enable->integer.value)
+               /* sensor is disabled */
+               return 0;
+
+       flags = atk_get_pack_member(data, obj, HWMON_PACK_FLAGS);
+       name = atk_get_pack_member(data, obj, HWMON_PACK_NAME);
+       limit1 = atk_get_pack_member(data, obj, HWMON_PACK_LIMIT1);
+       limit2 = atk_get_pack_member(data, obj, HWMON_PACK_LIMIT2);
+
+       sensor = kzalloc(sizeof(*sensor), GFP_KERNEL);
+       if (!sensor)
+               return -ENOMEM;
+
+       sensor->acpi_name = kstrdup(name->string.pointer, GFP_KERNEL);
+       if (!sensor->acpi_name) {
+               err = -ENOMEM;
+               goto out;
+       }
+
+       INIT_LIST_HEAD(&sensor->list);
+       sensor->type = type;
+       sensor->data = data;
+       sensor->id = flags->integer.value;
+       sensor->limit1 = limit1->integer.value;
+       sensor->limit2 = limit2->integer.value;
+
+       snprintf(sensor->input_attr_name, ATTR_NAME_SIZE,
+                       "%s%d_input", base_name, start + *num);
+       atk_init_attribute(&sensor->input_attr,
+                       sensor->input_attr_name,
+                       atk_input_show);
+
+       snprintf(sensor->label_attr_name, ATTR_NAME_SIZE,
+                       "%s%d_label", base_name, start + *num);
+       atk_init_attribute(&sensor->label_attr,
+                       sensor->label_attr_name,
+                       atk_label_show);
+
+       snprintf(sensor->limit1_attr_name, ATTR_NAME_SIZE,
+                       "%s%d_%s", base_name, start + *num, limit1_name);
+       atk_init_attribute(&sensor->limit1_attr,
+                       sensor->limit1_attr_name,
+                       atk_limit1_show);
+
+       snprintf(sensor->limit2_attr_name, ATTR_NAME_SIZE,
+                       "%s%d_%s", base_name, start + *num, limit2_name);
+       atk_init_attribute(&sensor->limit2_attr,
+                       sensor->limit2_attr_name,
+                       atk_limit2_show);
+
+       list_add(&sensor->list, &data->sensor_list);
+       (*num)++;
+
+       return 1;
+out:
+       kfree(sensor->acpi_name);
+       kfree(sensor);
+       return err;
+}
+
+static int atk_enumerate_old_hwmon(struct atk_data *data)
+{
+       struct device *dev = &data->acpi_dev->dev;
+       struct acpi_buffer buf;
+       union acpi_object *pack;
+       acpi_status status;
+       int i, ret;
+       int count = 0;
+
+       /* Voltages */
+       buf.length = ACPI_ALLOCATE_BUFFER;
+       status = acpi_evaluate_object_typed(data->atk_handle,
+                       METHOD_OLD_ENUM_VLT, NULL, &buf, ACPI_TYPE_PACKAGE);
+       if (status != AE_OK) {
+               dev_warn(dev, METHOD_OLD_ENUM_VLT ": ACPI exception: %s\n",
+                               acpi_format_exception(status));
+
+               return -ENODEV;
+       }
+
+       pack = buf.pointer;
+       for (i = 1; i < pack->package.count; i++) {
+               union acpi_object *obj = &pack->package.elements[i];
+
+               ret = atk_add_sensor(data, obj);
+               if (ret > 0)
+                       count++;
+       }
+       ACPI_FREE(buf.pointer);
+
+       /* Temperatures */
+       buf.length = ACPI_ALLOCATE_BUFFER;
+       status = acpi_evaluate_object_typed(data->atk_handle,
+                       METHOD_OLD_ENUM_TMP, NULL, &buf, ACPI_TYPE_PACKAGE);
+       if (status != AE_OK) {
+               dev_warn(dev, METHOD_OLD_ENUM_TMP ": ACPI exception: %s\n",
+                               acpi_format_exception(status));
+
+               ret = -ENODEV;
+               goto cleanup;
+       }
+
+       pack = buf.pointer;
+       for (i = 1; i < pack->package.count; i++) {
+               union acpi_object *obj = &pack->package.elements[i];
+
+               ret = atk_add_sensor(data, obj);
+               if (ret > 0)
+                       count++;
+       }
+       ACPI_FREE(buf.pointer);
+
+       /* Fans */
+       buf.length = ACPI_ALLOCATE_BUFFER;
+       status = acpi_evaluate_object_typed(data->atk_handle,
+                       METHOD_OLD_ENUM_FAN, NULL, &buf, ACPI_TYPE_PACKAGE);
+       if (status != AE_OK) {
+               dev_warn(dev, METHOD_OLD_ENUM_FAN ": ACPI exception: %s\n",
+                               acpi_format_exception(status));
+
+               ret = -ENODEV;
+               goto cleanup;
+       }
+
+       pack = buf.pointer;
+       for (i = 1; i < pack->package.count; i++) {
+               union acpi_object *obj = &pack->package.elements[i];
+
+               ret = atk_add_sensor(data, obj);
+               if (ret > 0)
+                       count++;
+       }
+       ACPI_FREE(buf.pointer);
+
+       return count;
+cleanup:
+       atk_free_sensors(data);
+       return ret;
+}
+
+static int atk_enumerate_new_hwmon(struct atk_data *data)
+{
+       struct device *dev = &data->acpi_dev->dev;
+       struct acpi_buffer buf;
+       acpi_status ret;
+       struct acpi_object_list params;
+       union acpi_object id;
+       union acpi_object *pack;
+       int err;
+       int i;
+
+       dev_dbg(dev, "Enumerating hwmon sensors\n");
+
+       id.type = ACPI_TYPE_INTEGER;
+       id.integer.value = ATK_MUX_HWMON;
+       params.count = 1;
+       params.pointer = &id;
+
+       buf.length = ACPI_ALLOCATE_BUFFER;
+       ret = acpi_evaluate_object_typed(data->enumerate_handle, NULL, &params,
+                       &buf, ACPI_TYPE_PACKAGE);
+       if (ret != AE_OK) {
+               dev_warn(dev, METHOD_ENUMERATE ": ACPI exception: %s\n",
+                               acpi_format_exception(ret));
+               return -ENODEV;
+       }
+
+       /* Result must be a package */
+       pack = buf.pointer;
+
+       if (pack->package.count < 1) {
+               dev_dbg(dev, "%s: hwmon package is too small: %d\n", __func__,
+                               pack->package.count);
+               err = -EINVAL;
+               goto out;
+       }
+
+       for (i = 0; i < pack->package.count; i++) {
+               union acpi_object *obj = &pack->package.elements[i];
+
+               atk_add_sensor(data, obj);
+       }
+
+       err = data->voltage_count + data->temperature_count + data->fan_count;
+
+out:
+       ACPI_FREE(buf.pointer);
+       return err;
+}
+
+static int atk_create_files(struct atk_data *data)
+{
+       struct atk_sensor_data *s;
+       int err;
+
+       list_for_each_entry(s, &data->sensor_list, list) {
+               err = device_create_file(data->hwmon_dev, &s->input_attr);
+               if (err)
+                       return err;
+               err = device_create_file(data->hwmon_dev, &s->label_attr);
+               if (err)
+                       return err;
+               err = device_create_file(data->hwmon_dev, &s->limit1_attr);
+               if (err)
+                       return err;
+               err = device_create_file(data->hwmon_dev, &s->limit2_attr);
+               if (err)
+                       return err;
+       }
+
+       err = device_create_file(data->hwmon_dev, &atk_name_attr);
+
+       return err;
+}
+
+static void atk_remove_files(struct atk_data *data)
+{
+       struct atk_sensor_data *s;
+
+       list_for_each_entry(s, &data->sensor_list, list) {
+               device_remove_file(data->hwmon_dev, &s->input_attr);
+               device_remove_file(data->hwmon_dev, &s->label_attr);
+               device_remove_file(data->hwmon_dev, &s->limit1_attr);
+               device_remove_file(data->hwmon_dev, &s->limit2_attr);
+       }
+       device_remove_file(data->hwmon_dev, &atk_name_attr);
+}
+
+static void atk_free_sensors(struct atk_data *data)
+{
+       struct list_head *head = &data->sensor_list;
+       struct atk_sensor_data *s, *tmp;
+
+       list_for_each_entry_safe(s, tmp, head, list) {
+               kfree(s->acpi_name);
+               kfree(s);
+       }
+}
+
+static int atk_register_hwmon(struct atk_data *data)
+{
+       struct device *dev = &data->acpi_dev->dev;
+       int err;
+
+       dev_dbg(dev, "registering hwmon device\n");
+       data->hwmon_dev = hwmon_device_register(dev);
+       if (IS_ERR(data->hwmon_dev))
+               return PTR_ERR(data->hwmon_dev);
+
+       dev_dbg(dev, "populating sysfs directory\n");
+       err = atk_create_files(data);
+       if (err)
+               goto remove;
+
+       return 0;
+remove:
+       /* Cleanup the registered files */
+       atk_remove_files(data);
+       hwmon_device_unregister(data->hwmon_dev);
+       return err;
+}
+
+static int atk_check_old_if(struct atk_data *data)
+{
+       struct device *dev = &data->acpi_dev->dev;
+       acpi_handle ret;
+       acpi_status status;
+
+       /* RTMP: read temperature */
+       status = acpi_get_handle(data->atk_handle, METHOD_OLD_READ_TMP, &ret);
+       if (status != AE_OK) {
+               dev_dbg(dev, "method " METHOD_OLD_READ_TMP " not found: %s\n",
+                               acpi_format_exception(status));
+               return -ENODEV;
+       }
+       data->rtmp_handle = ret;
+
+       /* RVLT: read voltage */
+       status = acpi_get_handle(data->atk_handle, METHOD_OLD_READ_VLT, &ret);
+       if (status != AE_OK) {
+               dev_dbg(dev, "method " METHOD_OLD_READ_VLT " not found: %s\n",
+                               acpi_format_exception(status));
+               return -ENODEV;
+       }
+       data->rvlt_handle = ret;
+
+       /* RFAN: read fan status */
+       status = acpi_get_handle(data->atk_handle, METHOD_OLD_READ_FAN, &ret);
+       if (status != AE_OK) {
+               dev_dbg(dev, "method " METHOD_OLD_READ_FAN " not found: %s\n",
+                               acpi_format_exception(status));
+               return -ENODEV;
+       }
+       data->rfan_handle = ret;
+
+       return 0;
+}
+
+static int atk_check_new_if(struct atk_data *data)
+{
+       struct device *dev = &data->acpi_dev->dev;
+       acpi_handle ret;
+       acpi_status status;
+
+       /* Enumeration */
+       status = acpi_get_handle(data->atk_handle, METHOD_ENUMERATE, &ret);
+       if (status != AE_OK) {
+               dev_dbg(dev, "method " METHOD_ENUMERATE " not found: %s\n",
+                               acpi_format_exception(status));
+               return -ENODEV;
+       }
+       data->enumerate_handle = ret;
+
+       /* De-multiplexer (read) */
+       status = acpi_get_handle(data->atk_handle, METHOD_READ, &ret);
+       if (status != AE_OK) {
+               dev_dbg(dev, "method " METHOD_READ " not found: %s\n",
+                               acpi_format_exception(status));
+               return -ENODEV;
+       }
+       data->read_handle = ret;
+
+       return 0;
+}
+
+static int atk_add(struct acpi_device *device)
+{
+       acpi_status ret;
+       int err;
+       struct acpi_buffer buf;
+       union acpi_object *obj;
+       struct atk_data *data;
+
+       dev_dbg(&device->dev, "adding...\n");
+
+       data = kzalloc(sizeof(*data), GFP_KERNEL);
+       if (!data)
+               return -ENOMEM;
+
+       data->acpi_dev = device;
+       data->atk_handle = device->handle;
+       INIT_LIST_HEAD(&data->sensor_list);
+
+       buf.length = ACPI_ALLOCATE_BUFFER;
+       ret = acpi_evaluate_object_typed(data->atk_handle, BOARD_ID, NULL,
+                       &buf, ACPI_TYPE_PACKAGE);
+       if (ret != AE_OK) {
+               dev_dbg(&device->dev, "atk: method MBIF not found\n");
+               err = -ENODEV;
+               goto out;
+       }
+
+       obj = buf.pointer;
+       if (obj->package.count >= 2 &&
+                       obj->package.elements[1].type == ACPI_TYPE_STRING) {
+               dev_dbg(&device->dev, "board ID = %s\n",
+                               obj->package.elements[1].string.pointer);
+       }
+       ACPI_FREE(buf.pointer);
+
+       /* Check for hwmon methods: first check "old" style methods; note that
+        * both may be present: in this case we stick to the old interface;
+        * analysis of multiple DSDTs indicates that when both interfaces
+        * are present the new one (GGRP/GITM) is not functional.
+        */
+       err = atk_check_old_if(data);
+       if (!err) {
+               dev_dbg(&device->dev, "Using old hwmon interface\n");
+               data->old_interface = true;
+       } else {
+               err = atk_check_new_if(data);
+               if (err)
+                       goto out;
+
+               dev_dbg(&device->dev, "Using new hwmon interface\n");
+               data->old_interface = false;
+       }
+
+       if (data->old_interface)
+               err = atk_enumerate_old_hwmon(data);
+       else
+               err = atk_enumerate_new_hwmon(data);
+       if (err < 0)
+               goto out;
+       if (err == 0) {
+               dev_info(&device->dev,
+                        "No usable sensor detected, bailing out\n");
+               err = -ENODEV;
+               goto out;
+       }
+
+       err = atk_register_hwmon(data);
+       if (err)
+               goto cleanup;
+
+       device->driver_data = data;
+       return 0;
+cleanup:
+       atk_free_sensors(data);
+out:
+       kfree(data);
+       return err;
+}
+
+static int atk_remove(struct acpi_device *device, int type)
+{
+       struct atk_data *data = device->driver_data;
+       dev_dbg(&device->dev, "removing...\n");
+
+       device->driver_data = NULL;
+
+       atk_remove_files(data);
+       atk_free_sensors(data);
+       hwmon_device_unregister(data->hwmon_dev);
+
+       kfree(data);
+
+       return 0;
+}
+
+static int __init atk0110_init(void)
+{
+       int ret;
+
+       ret = acpi_bus_register_driver(&atk_driver);
+       if (ret)
+               pr_info("atk: acpi_bus_register_driver failed: %d\n", ret);
+
+       return ret;
+}
+
+static void __exit atk0110_exit(void)
+{
+       acpi_bus_unregister_driver(&atk_driver);
+}
+
+module_init(atk0110_init);
+module_exit(atk0110_exit);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/hwmon/g760a.c b/drivers/hwmon/g760a.c
new file mode 100644 (file)
index 0000000..19c01a4
--- /dev/null
@@ -0,0 +1,272 @@
+/*
+    g760a - Driver for the Global Mixed-mode Technology Inc. G760A
+            fan speed PWM controller chip
+
+    Copyright (C) 2007  Herbert Valerio Riedel <hvr@gnu.org>
+
+    Complete datasheet is available at GMT's website:
+      http://www.gmt.com.tw/datasheet/g760a.pdf
+
+    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 <linux/module.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/jiffies.h>
+#include <linux/i2c.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
+#include <linux/err.h>
+#include <linux/mutex.h>
+#include <linux/sysfs.h>
+
+static const struct i2c_device_id g760a_id[] = {
+       { "g760a", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, g760a_id);
+
+enum g760a_regs {
+       G760A_REG_SET_CNT = 0x00,
+       G760A_REG_ACT_CNT = 0x01,
+       G760A_REG_FAN_STA = 0x02
+};
+
+#define G760A_REG_FAN_STA_RPM_OFF 0x1 /* +/-20% off */
+#define G760A_REG_FAN_STA_RPM_LOW 0x2 /* below 1920rpm */
+
+/* register data is read (and cached) at most once per second */
+#define G760A_UPDATE_INTERVAL (HZ)
+
+struct g760a_data {
+       struct i2c_client *client;
+       struct device *hwmon_dev;
+       struct mutex update_lock;
+
+       /* board specific parameters */
+       u32 clk; /* default 32kHz */
+       u16 fan_div; /* default P=2 */
+
+       /* g760a register cache */
+       unsigned int valid:1;
+       unsigned long last_updated; /* In jiffies */
+
+       u8 set_cnt; /* PWM (period) count number; 0xff stops fan */
+       u8 act_cnt; /*   formula: cnt = (CLK * 30)/(rpm * P) */
+       u8 fan_sta; /* bit 0: set when actual fan speed more than 20%
+                    *   outside requested fan speed
+                    * bit 1: set when fan speed below 1920 rpm */
+};
+
+#define G760A_DEFAULT_CLK 32768
+#define G760A_DEFAULT_FAN_DIV 2
+
+#define PWM_FROM_CNT(cnt)      (0xff-(cnt))
+#define PWM_TO_CNT(pwm)                (0xff-(pwm))
+
+unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div)
+{
+       return ((val == 0x00) ? 0 : ((clk*30)/(val*div)));
+}
+
+/* new-style driver model */
+static int g760a_probe(struct i2c_client *client,
+                       const struct i2c_device_id *id);
+static int g760a_remove(struct i2c_client *client);
+
+static struct i2c_driver g760a_driver = {
+       .driver = {
+               .name   = "g760a",
+       },
+       .probe    = g760a_probe,
+       .remove   = g760a_remove,
+       .id_table = g760a_id,
+};
+
+/* read/write wrappers */
+static int g760a_read_value(struct i2c_client *client, enum g760a_regs reg)
+{
+       return i2c_smbus_read_byte_data(client, reg);
+}
+
+static int g760a_write_value(struct i2c_client *client, enum g760a_regs reg,
+                            u16 value)
+{
+       return i2c_smbus_write_byte_data(client, reg, value);
+}
+
+/****************************************************************************
+ * sysfs attributes
+ */
+
+static struct g760a_data *g760a_update_client(struct device *dev)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct g760a_data *data = i2c_get_clientdata(client);
+
+       mutex_lock(&data->update_lock);
+
+       if (time_after(jiffies, data->last_updated + G760A_UPDATE_INTERVAL)
+           || !data->valid) {
+               dev_dbg(&client->dev, "Starting g760a update\n");
+
+               data->set_cnt = g760a_read_value(client, G760A_REG_SET_CNT);
+               data->act_cnt = g760a_read_value(client, G760A_REG_ACT_CNT);
+               data->fan_sta = g760a_read_value(client, G760A_REG_FAN_STA);
+
+               data->last_updated = jiffies;
+               data->valid = 1;
+       }
+
+       mutex_unlock(&data->update_lock);
+
+       return data;
+}
+
+static ssize_t show_fan(struct device *dev, struct device_attribute *da,
+                       char *buf)
+{
+       struct g760a_data *data = g760a_update_client(dev);
+       unsigned int rpm = 0;
+
+       mutex_lock(&data->update_lock);
+       if (!(data->fan_sta & G760A_REG_FAN_STA_RPM_LOW))
+               rpm = rpm_from_cnt(data->act_cnt, data->clk, data->fan_div);
+       mutex_unlock(&data->update_lock);
+
+       return sprintf(buf, "%d\n", rpm);
+}
+
+static ssize_t show_fan_alarm(struct device *dev, struct device_attribute *da,
+                             char *buf)
+{
+       struct g760a_data *data = g760a_update_client(dev);
+
+       int fan_alarm = (data->fan_sta & G760A_REG_FAN_STA_RPM_OFF) ? 1 : 0;
+
+       return sprintf(buf, "%d\n", fan_alarm);
+}
+
+static ssize_t get_pwm(struct device *dev, struct device_attribute *da,
+                      char *buf)
+{
+       struct g760a_data *data = g760a_update_client(dev);
+
+       return sprintf(buf, "%d\n", PWM_FROM_CNT(data->set_cnt));
+}
+
+static ssize_t set_pwm(struct device *dev, struct device_attribute *da,
+                      const char *buf, size_t count)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct g760a_data *data = g760a_update_client(dev);
+       unsigned long val;
+
+       if (strict_strtoul(buf, 10, &val))
+               return -EINVAL;
+
+       mutex_lock(&data->update_lock);
+       data->set_cnt = PWM_TO_CNT(SENSORS_LIMIT(val, 0, 255));
+       g760a_write_value(client, G760A_REG_SET_CNT, data->set_cnt);
+       mutex_unlock(&data->update_lock);
+
+       return count;
+}
+
+static DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, get_pwm, set_pwm);
+static DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL);
+static DEVICE_ATTR(fan1_alarm, S_IRUGO, show_fan_alarm, NULL);
+
+static struct attribute *g760a_attributes[] = {
+       &dev_attr_pwm1.attr,
+       &dev_attr_fan1_input.attr,
+       &dev_attr_fan1_alarm.attr,
+       NULL
+};
+
+static const struct attribute_group g760a_group = {
+       .attrs = g760a_attributes,
+};
+
+/****************************************************************************
+ * new-style driver model code
+ */
+
+static int g760a_probe(struct i2c_client *client,
+                       const struct i2c_device_id *id)
+{
+       struct g760a_data *data;
+       int err;
+
+       if (!i2c_check_functionality(client->adapter,
+                                    I2C_FUNC_SMBUS_BYTE_DATA))
+               return -EIO;
+
+       data = kzalloc(sizeof(struct g760a_data), GFP_KERNEL);
+       if (!data)
+               return -ENOMEM;
+
+       i2c_set_clientdata(client, data);
+
+       data->client = client;
+       mutex_init(&data->update_lock);
+
+       /* setup default configuration for now */
+       data->fan_div = G760A_DEFAULT_FAN_DIV;
+       data->clk = G760A_DEFAULT_CLK;
+
+       /* Register sysfs hooks */
+       err = sysfs_create_group(&client->dev.kobj, &g760a_group);
+       if (err)
+               goto error_sysfs_create_group;
+
+       data->hwmon_dev = hwmon_device_register(&client->dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               err = PTR_ERR(data->hwmon_dev);
+               goto error_hwmon_device_register;
+       }
+
+       return 0;
+
+error_hwmon_device_register:
+       sysfs_remove_group(&client->dev.kobj, &g760a_group);
+error_sysfs_create_group:
+       kfree(data);
+       i2c_set_clientdata(client, NULL);
+
+       return err;
+}
+
+static int g760a_remove(struct i2c_client *client)
+{
+       struct g760a_data *data = i2c_get_clientdata(client);
+       hwmon_device_unregister(data->hwmon_dev);
+       sysfs_remove_group(&client->dev.kobj, &g760a_group);
+       kfree(data);
+       i2c_set_clientdata(client, NULL);
+
+       return 0;
+}
+
+/* module management */
+
+static int __init g760a_init(void)
+{
+       return i2c_add_driver(&g760a_driver);
+}
+
+static void __exit g760a_exit(void)
+{
+       i2c_del_driver(&g760a_driver);
+}
+
+MODULE_AUTHOR("Herbert Valerio Riedel <hvr@gnu.org>");
+MODULE_DESCRIPTION("GMT G760A driver");
+MODULE_LICENSE("GPL");
+
+module_init(g760a_init);
+module_exit(g760a_exit);
index 091d95f..e34f9e4 100644 (file)
@@ -87,25 +87,11 @@ I2C_CLIENT_INSMOD_1(lm95241);
     (val_h)) * 1000 + (val_l) * 1000 / 256)
 
 /* Functions declaration */
-static int lm95241_attach_adapter(struct i2c_adapter *adapter);
-static int lm95241_detect(struct i2c_adapter *adapter, int address,
-                         int kind);
 static void lm95241_init_client(struct i2c_client *client);
-static int lm95241_detach_client(struct i2c_client *client);
 static struct lm95241_data *lm95241_update_device(struct device *dev);
 
-/* Driver data (common to all clients) */
-static struct i2c_driver lm95241_driver = {
-       .driver = {
-               .name   = "lm95241",
-       },
-       .attach_adapter = lm95241_attach_adapter,
-       .detach_client  = lm95241_detach_client,
-};
-
 /* Client data (each client gets its own) */
 struct lm95241_data {
-       struct i2c_client client;
        struct device *hwmon_dev;
        struct mutex update_lock;
        unsigned long last_updated, rate; /* in jiffies */
@@ -323,42 +309,16 @@ static const struct attribute_group lm95241_group = {
        .attrs = lm95241_attributes,
 };
 
-/* Init/exit code */
-static int lm95241_attach_adapter(struct i2c_adapter *adapter)
+/* Return 0 if detection is successful, -ENODEV otherwise */
+static int lm95241_detect(struct i2c_client *new_client, int kind,
+                         struct i2c_board_info *info)
 {
-       if (!(adapter->class & I2C_CLASS_HWMON))
-               return 0;
-       return i2c_probe(adapter, &addr_data, lm95241_detect);
-}
-
-/*
- * The following function does more than just detection. If detection
- * succeeds, it also registers the new chip.
- */
-static int lm95241_detect(struct i2c_adapter *adapter, int address, int kind)
-{
-       struct i2c_client *new_client;
-       struct lm95241_data *data;
-       int err = 0;
+       struct i2c_adapter *adapter = new_client->adapter;
+       int address = new_client->addr;
        const char *name = "";
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-               goto exit;
-
-       data = kzalloc(sizeof(struct lm95241_data), GFP_KERNEL);
-       if (!data) {
-               err = -ENOMEM;
-               goto exit;
-       }
-
-       /* The common I2C client data is placed right before the
-          LM95241-specific data. */
-       new_client = &data->client;
-       i2c_set_clientdata(new_client, data);
-       new_client->addr = address;
-       new_client->adapter = adapter;
-       new_client->driver = &lm95241_driver;
-       new_client->flags = 0;
+               return -ENODEV;
 
        /*
         * Now we do the remaining detection. A negative kind means that
@@ -378,7 +338,7 @@ static int lm95241_detect(struct i2c_adapter *adapter, int address, int kind)
                        dev_dbg(&adapter->dev,
                                "LM95241 detection failed at 0x%02x.\n",
                                address);
-                       goto exit_free;
+                       return -ENODEV;
                }
        }
 
@@ -392,23 +352,32 @@ static int lm95241_detect(struct i2c_adapter *adapter, int address, int kind)
 
                        if (kind <= 0) { /* identification failed */
                                dev_info(&adapter->dev, "Unsupported chip\n");
-                               goto exit_free;
+                               return -ENODEV;
                        }
                }
        }
 
+       /* Fill the i2c board info */
        if (kind == lm95241)
                name = "lm95241";
+       strlcpy(info->type, name, I2C_NAME_SIZE);
+       return 0;
+}
 
-       /* We can fill in the remaining client fields */
-       strlcpy(new_client->name, name, I2C_NAME_SIZE);
-       data->valid = 0;
-       mutex_init(&data->update_lock);
+static int lm95241_probe(struct i2c_client *new_client,
+                        const struct i2c_device_id *id)
+{
+       struct lm95241_data *data;
+       int err;
 
-       /* Tell the I2C layer a new client has arrived */
-       err = i2c_attach_client(new_client);
-       if (err)
-               goto exit_free;
+       data = kzalloc(sizeof(struct lm95241_data), GFP_KERNEL);
+       if (!data) {
+               err = -ENOMEM;
+               goto exit;
+       }
+
+       i2c_set_clientdata(new_client, data);
+       mutex_init(&data->update_lock);
 
        /* Initialize the LM95241 chip */
        lm95241_init_client(new_client);
@@ -416,7 +385,7 @@ static int lm95241_detect(struct i2c_adapter *adapter, int address, int kind)
        /* Register sysfs hooks */
        err = sysfs_create_group(&new_client->dev.kobj, &lm95241_group);
        if (err)
-               goto exit_detach;
+               goto exit_free;
 
        data->hwmon_dev = hwmon_device_register(&new_client->dev);
        if (IS_ERR(data->hwmon_dev)) {
@@ -428,8 +397,6 @@ static int lm95241_detect(struct i2c_adapter *adapter, int address, int kind)
 
 exit_remove_files:
        sysfs_remove_group(&new_client->dev.kobj, &lm95241_group);
-exit_detach:
-       i2c_detach_client(new_client);
 exit_free:
        kfree(data);
 exit:
@@ -456,18 +423,14 @@ static void lm95241_init_client(struct i2c_client *client)
                                  data->model);
 }
 
-static int lm95241_detach_client(struct i2c_client *client)
+static int lm95241_remove(struct i2c_client *client)
 {
        struct lm95241_data *data = i2c_get_clientdata(client);
-       int err;
 
        hwmon_device_unregister(data->hwmon_dev);
        sysfs_remove_group(&client->dev.kobj, &lm95241_group);
 
-       err = i2c_detach_client(client);
-       if (err)
-               return err;
-
+       i2c_set_clientdata(client, NULL);
        kfree(data);
        return 0;
 }
@@ -509,6 +472,25 @@ static struct lm95241_data *lm95241_update_device(struct device *dev)
        return data;
 }
 
+/* Driver data (common to all clients) */
+static const struct i2c_device_id lm95241_id[] = {
+       { "lm95241", lm95241 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, lm95241_id);
+
+static struct i2c_driver lm95241_driver = {
+       .class          = I2C_CLASS_HWMON,
+       .driver = {
+               .name   = "lm95241",
+       },
+       .probe          = lm95241_probe,
+       .remove         = lm95241_remove,
+       .id_table       = lm95241_id,
+       .detect         = lm95241_detect,
+       .address_data   = &addr_data,
+};
+
 static int __init sensors_lm95241_init(void)
 {
        return i2c_add_driver(&lm95241_driver);
index da809ad..94eae5c 100644 (file)
@@ -356,6 +356,16 @@ config I2C_IBM_IIC
          This driver can also be built as a module.  If so, the module
          will be called i2c-ibm_iic.
 
+config I2C_IMX
+       tristate "IMX I2C interface"
+       depends on ARCH_MXC
+       help
+         Say Y here if you want to use the IIC bus controller on
+         the Freescale i.MX/MXC processors.
+
+         This driver can also be built as a module.  If so, the module
+         will be called i2c-imx.
+
 config I2C_IOP3XX
        tristate "Intel IOPx3xx and IXP4xx on-chip I2C interface"
        depends on ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || ARCH_IOP13XX
@@ -462,6 +472,16 @@ config I2C_S3C2410
          Say Y here to include support for I2C controller in the
          Samsung S3C2410 based System-on-Chip devices.
 
+config I2C_S6000
+       tristate "S6000 I2C support"
+       depends on XTENSA_VARIANT_S6000
+       help
+         This driver supports the on chip I2C device on the
+         S6000 xtensa processor family.
+
+         To compile this driver as a module, choose M here. The module
+         will be called i2c-s6000.
+
 config I2C_SH7760
        tristate "Renesas SH7760 I2C Controller"
        depends on CPU_SUBTYPE_SH7760
index 0c2c4b2..776acb6 100644 (file)
@@ -33,6 +33,7 @@ obj-$(CONFIG_I2C_DAVINCI)     += i2c-davinci.o
 obj-$(CONFIG_I2C_GPIO)         += i2c-gpio.o
 obj-$(CONFIG_I2C_HIGHLANDER)   += i2c-highlander.o
 obj-$(CONFIG_I2C_IBM_IIC)      += i2c-ibm_iic.o
+obj-$(CONFIG_I2C_IMX)          += i2c-imx.o
 obj-$(CONFIG_I2C_IOP3XX)       += i2c-iop3xx.o
 obj-$(CONFIG_I2C_IXP2000)      += i2c-ixp2000.o
 obj-$(CONFIG_I2C_MPC)          += i2c-mpc.o
@@ -43,6 +44,7 @@ obj-$(CONFIG_I2C_PASEMI)      += i2c-pasemi.o
 obj-$(CONFIG_I2C_PNX)          += i2c-pnx.o
 obj-$(CONFIG_I2C_PXA)          += i2c-pxa.o
 obj-$(CONFIG_I2C_S3C2410)      += i2c-s3c2410.o
+obj-$(CONFIG_I2C_S6000)                += i2c-s6000.o
 obj-$(CONFIG_I2C_SH7760)       += i2c-sh7760.o
 obj-$(CONFIG_I2C_SH_MOBILE)    += i2c-sh_mobile.o
 obj-$(CONFIG_I2C_SIMTEC)       += i2c-simtec.o
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
new file mode 100644 (file)
index 0000000..0b486a6
--- /dev/null
@@ -0,0 +1,624 @@
+/*
+ *     Copyright (C) 2002 Motorola GSG-China
+ *
+ *     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.
+ *
+ *     This program is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with this program; if not, write to the Free Software
+ *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+ *     USA.
+ *
+ * Author:
+ *     Darius Augulis, Teltonika Inc.
+ *
+ * Desc.:
+ *     Implementation of I2C Adapter/Algorithm Driver
+ *     for I2C Bus integrated in Freescale i.MX/MXC processors
+ *
+ *     Derived from Motorola GSG China I2C example driver
+ *
+ *     Copyright (C) 2005 Torsten Koschorrek <koschorrek at synertronixx.de
+ *     Copyright (C) 2005 Matthias Blaschke <blaschke at synertronixx.de
+ *     Copyright (C) 2007 RightHand Technologies, Inc.
+ *     Copyright (C) 2008 Darius Augulis <darius.augulis at teltonika.lt>
+ *
+ */
+
+/** Includes *******************************************************************
+*******************************************************************************/
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/err.h>
+#include <linux/interrupt.h>
+#include <linux/delay.h>
+#include <linux/i2c.h>
+#include <linux/io.h>
+#include <linux/sched.h>
+#include <linux/platform_device.h>
+#include <linux/clk.h>
+
+#include <mach/irqs.h>
+#include <mach/hardware.h>
+#include <mach/i2c.h>
+
+/** Defines ********************************************************************
+*******************************************************************************/
+
+/* This will be the driver name the kernel reports */
+#define DRIVER_NAME "imx-i2c"
+
+/* Default value */
+#define IMX_I2C_BIT_RATE       100000  /* 100kHz */
+
+/* IMX I2C registers */
+#define IMX_I2C_IADR   0x00    /* i2c slave address */
+#define IMX_I2C_IFDR   0x04    /* i2c frequency divider */
+#define IMX_I2C_I2CR   0x08    /* i2c control */
+#define IMX_I2C_I2SR   0x0C    /* i2c status */
+#define IMX_I2C_I2DR   0x10    /* i2c transfer data */
+
+/* Bits of IMX I2C registers */
+#define I2SR_RXAK      0x01
+#define I2SR_IIF       0x02
+#define I2SR_SRW       0x04
+#define I2SR_IAL       0x10
+#define I2SR_IBB       0x20
+#define I2SR_IAAS      0x40
+#define I2SR_ICF       0x80
+#define I2CR_RSTA      0x04
+#define I2CR_TXAK      0x08
+#define I2CR_MTX       0x10
+#define I2CR_MSTA      0x20
+#define I2CR_IIEN      0x40
+#define I2CR_IEN       0x80
+
+/** Variables ******************************************************************
+*******************************************************************************/
+
+/*
+ * sorted list of clock divider, register value pairs
+ * taken from table 26-5, p.26-9, Freescale i.MX
+ * Integrated Portable System Processor Reference Manual
+ * Document Number: MC9328MXLRM, Rev. 5.1, 06/2007
+ *
+ * Duplicated divider values removed from list
+ */
+
+static u16 __initdata i2c_clk_div[50][2] = {
+       { 22,   0x20 }, { 24,   0x21 }, { 26,   0x22 }, { 28,   0x23 },
+       { 30,   0x00 }, { 32,   0x24 }, { 36,   0x25 }, { 40,   0x26 },
+       { 42,   0x03 }, { 44,   0x27 }, { 48,   0x28 }, { 52,   0x05 },
+       { 56,   0x29 }, { 60,   0x06 }, { 64,   0x2A }, { 72,   0x2B },
+       { 80,   0x2C }, { 88,   0x09 }, { 96,   0x2D }, { 104,  0x0A },
+       { 112,  0x2E }, { 128,  0x2F }, { 144,  0x0C }, { 160,  0x30 },
+       { 192,  0x31 }, { 224,  0x32 }, { 240,  0x0F }, { 256,  0x33 },
+       { 288,  0x10 }, { 320,  0x34 }, { 384,  0x35 }, { 448,  0x36 },
+       { 480,  0x13 }, { 512,  0x37 }, { 576,  0x14 }, { 640,  0x38 },
+       { 768,  0x39 }, { 896,  0x3A }, { 960,  0x17 }, { 1024, 0x3B },
+       { 1152, 0x18 }, { 1280, 0x3C }, { 1536, 0x3D }, { 1792, 0x3E },
+       { 1920, 0x1B }, { 2048, 0x3F }, { 2304, 0x1C }, { 2560, 0x1D },
+       { 3072, 0x1E }, { 3840, 0x1F }
+};
+
+struct imx_i2c_struct {
+       struct i2c_adapter      adapter;
+       struct resource         *res;
+       struct clk              *clk;
+       void __iomem            *base;
+       int                     irq;
+       wait_queue_head_t       queue;
+       unsigned long           i2csr;
+       unsigned int            disable_delay;
+};
+
+/** Functions for IMX I2C adapter driver ***************************************
+*******************************************************************************/
+
+static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx)
+{
+       unsigned long orig_jiffies = jiffies;
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
+
+       /* wait for bus not busy */
+       while (readb(i2c_imx->base + IMX_I2C_I2SR) & I2SR_IBB) {
+               if (signal_pending(current)) {
+                       dev_dbg(&i2c_imx->adapter.dev,
+                               "<%s> I2C Interrupted\n", __func__);
+                       return -EINTR;
+               }
+               if (time_after(jiffies, orig_jiffies + HZ / 1000)) {
+                       dev_dbg(&i2c_imx->adapter.dev,
+                               "<%s> I2C bus is busy\n", __func__);
+                       return -EIO;
+               }
+               schedule();
+       }
+
+       return 0;
+}
+
+static int i2c_imx_trx_complete(struct imx_i2c_struct *i2c_imx)
+{
+       int result;
+
+       result = wait_event_interruptible_timeout(i2c_imx->queue,
+               i2c_imx->i2csr & I2SR_IIF, HZ / 10);
+
+       if (unlikely(result < 0)) {
+               dev_dbg(&i2c_imx->adapter.dev, "<%s> result < 0\n", __func__);
+               return result;
+       } else if (unlikely(!(i2c_imx->i2csr & I2SR_IIF))) {
+               dev_dbg(&i2c_imx->adapter.dev, "<%s> Timeout\n", __func__);
+               return -ETIMEDOUT;
+       }
+       dev_dbg(&i2c_imx->adapter.dev, "<%s> TRX complete\n", __func__);
+       i2c_imx->i2csr = 0;
+       return 0;
+}
+
+static int i2c_imx_acked(struct imx_i2c_struct *i2c_imx)
+{
+       if (readb(i2c_imx->base + IMX_I2C_I2SR) & I2SR_RXAK) {
+               dev_dbg(&i2c_imx->adapter.dev, "<%s> No ACK\n", __func__);
+               return -EIO;  /* No ACK */
+       }
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s> ACK received\n", __func__);
+       return 0;
+}
+
+static void i2c_imx_start(struct imx_i2c_struct *i2c_imx)
+{
+       unsigned int temp = 0;
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
+
+       /* Enable I2C controller */
+       writeb(I2CR_IEN, i2c_imx->base + IMX_I2C_I2CR);
+       /* Start I2C transaction */
+       temp = readb(i2c_imx->base + IMX_I2C_I2CR);
+       temp |= I2CR_MSTA;
+       writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
+       temp |= I2CR_IIEN | I2CR_MTX | I2CR_TXAK;
+       writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
+}
+
+static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
+{
+       unsigned int temp = 0;
+
+       /* Stop I2C transaction */
+       dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
+       temp = readb(i2c_imx->base + IMX_I2C_I2CR);
+       temp &= ~I2CR_MSTA;
+       writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
+       /* setup chip registers to defaults */
+       writeb(I2CR_IEN, i2c_imx->base + IMX_I2C_I2CR);
+       writeb(0, i2c_imx->base + IMX_I2C_I2SR);
+       /*
+        * This delay caused by an i.MXL hardware bug.
+        * If no (or too short) delay, no "STOP" bit will be generated.
+        */
+       udelay(i2c_imx->disable_delay);
+       /* Disable I2C controller */
+       writeb(0, i2c_imx->base + IMX_I2C_I2CR);
+}
+
+static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
+                                                       unsigned int rate)
+{
+       unsigned int i2c_clk_rate;
+       unsigned int div;
+       int i;
+
+       /* Divider value calculation */
+       i2c_clk_rate = clk_get_rate(i2c_imx->clk);
+       div = (i2c_clk_rate + rate - 1) / rate;
+       if (div < i2c_clk_div[0][0])
+               i = 0;
+       else if (div > i2c_clk_div[ARRAY_SIZE(i2c_clk_div) - 1][0])
+               i = ARRAY_SIZE(i2c_clk_div) - 1;
+       else
+               for (i = 0; i2c_clk_div[i][0] < div; i++);
+
+       /* Write divider value to register */
+       writeb(i2c_clk_div[i][1], i2c_imx->base + IMX_I2C_IFDR);
+
+       /*
+        * There dummy delay is calculated.
+        * It should be about one I2C clock period long.
+        * This delay is used in I2C bus disable function
+        * to fix chip hardware bug.
+        */
+       i2c_imx->disable_delay = (500000U * i2c_clk_div[i][0]
+               + (i2c_clk_rate / 2) - 1) / (i2c_clk_rate / 2);
+
+       /* dev_dbg() can't be used, because adapter is not yet registered */
+#ifdef CONFIG_I2C_DEBUG_BUS
+       printk(KERN_DEBUG "I2C: <%s> I2C_CLK=%d, REQ DIV=%d\n",
+               __func__, i2c_clk_rate, div);
+       printk(KERN_DEBUG "I2C: <%s> IFDR[IC]=0x%x, REAL DIV=%d\n",
+               __func__, i2c_clk_div[i][1], i2c_clk_div[i][0]);
+#endif
+}
+
+static irqreturn_t i2c_imx_isr(int irq, void *dev_id)
+{
+       struct imx_i2c_struct *i2c_imx = dev_id;
+       unsigned int temp;
+
+       temp = readb(i2c_imx->base + IMX_I2C_I2SR);
+       if (temp & I2SR_IIF) {
+               /* save status register */
+               i2c_imx->i2csr = temp;
+               temp &= ~I2SR_IIF;
+               writeb(temp, i2c_imx->base + IMX_I2C_I2SR);
+               wake_up_interruptible(&i2c_imx->queue);
+               return IRQ_HANDLED;
+       }
+
+       return IRQ_NONE;
+}
+
+static int i2c_imx_write(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs)
+{
+       int i, result;
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s> write slave address: addr=0x%x\n",
+               __func__, msgs->addr << 1);
+
+       /* write slave address */
+       writeb(msgs->addr << 1, i2c_imx->base + IMX_I2C_I2DR);
+       result = i2c_imx_trx_complete(i2c_imx);
+       if (result)
+               return result;
+       result = i2c_imx_acked(i2c_imx);
+       if (result)
+               return result;
+       dev_dbg(&i2c_imx->adapter.dev, "<%s> write data\n", __func__);
+
+       /* write data */
+       for (i = 0; i < msgs->len; i++) {
+               dev_dbg(&i2c_imx->adapter.dev,
+                       "<%s> write byte: B%d=0x%X\n",
+                       __func__, i, msgs->buf[i]);
+               writeb(msgs->buf[i], i2c_imx->base + IMX_I2C_I2DR);
+               result = i2c_imx_trx_complete(i2c_imx);
+               if (result)
+                       return result;
+               result = i2c_imx_acked(i2c_imx);
+               if (result)
+                       return result;
+       }
+       return 0;
+}
+
+static int i2c_imx_read(struct imx_i2c_struct *i2c_imx, struct i2c_msg *msgs)
+{
+       int i, result;
+       unsigned int temp;
+
+       dev_dbg(&i2c_imx->adapter.dev,
+               "<%s> write slave address: addr=0x%x\n",
+               __func__, (msgs->addr << 1) | 0x01);
+
+       /* write slave address */
+       writeb((msgs->addr << 1) | 0x01, i2c_imx->base + IMX_I2C_I2DR);
+       result = i2c_imx_trx_complete(i2c_imx);
+       if (result)
+               return result;
+       result = i2c_imx_acked(i2c_imx);
+       if (result)
+               return result;
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s> setup bus\n", __func__);
+
+       /* setup bus to read data */
+       temp = readb(i2c_imx->base + IMX_I2C_I2CR);
+       temp &= ~I2CR_MTX;
+       if (msgs->len - 1)
+               temp &= ~I2CR_TXAK;
+       writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
+       readb(i2c_imx->base + IMX_I2C_I2DR); /* dummy read */
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s> read data\n", __func__);
+
+       /* read data */
+       for (i = 0; i < msgs->len; i++) {
+               result = i2c_imx_trx_complete(i2c_imx);
+               if (result)
+                       return result;
+               if (i == (msgs->len - 1)) {
+                       dev_dbg(&i2c_imx->adapter.dev,
+                               "<%s> clear MSTA\n", __func__);
+                       temp = readb(i2c_imx->base + IMX_I2C_I2CR);
+                       temp &= ~I2CR_MSTA;
+                       writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
+               } else if (i == (msgs->len - 2)) {
+                       dev_dbg(&i2c_imx->adapter.dev,
+                               "<%s> set TXAK\n", __func__);
+                       temp = readb(i2c_imx->base + IMX_I2C_I2CR);
+                       temp |= I2CR_TXAK;
+                       writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
+               }
+               msgs->buf[i] = readb(i2c_imx->base + IMX_I2C_I2DR);
+               dev_dbg(&i2c_imx->adapter.dev,
+                       "<%s> read byte: B%d=0x%X\n",
+                       __func__, i, msgs->buf[i]);
+       }
+       return 0;
+}
+
+static int i2c_imx_xfer(struct i2c_adapter *adapter,
+                                               struct i2c_msg *msgs, int num)
+{
+       unsigned int i, temp;
+       int result;
+       struct imx_i2c_struct *i2c_imx = i2c_get_adapdata(adapter);
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
+
+       /* Check if i2c bus is not busy */
+       result = i2c_imx_bus_busy(i2c_imx);
+       if (result)
+               goto fail0;
+
+       /* Start I2C transfer */
+       i2c_imx_start(i2c_imx);
+
+       /* read/write data */
+       for (i = 0; i < num; i++) {
+               if (i) {
+                       dev_dbg(&i2c_imx->adapter.dev,
+                               "<%s> repeated start\n", __func__);
+                       temp = readb(i2c_imx->base + IMX_I2C_I2CR);
+                       temp |= I2CR_RSTA;
+                       writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
+               }
+               dev_dbg(&i2c_imx->adapter.dev,
+                       "<%s> transfer message: %d\n", __func__, i);
+               /* write/read data */
+#ifdef CONFIG_I2C_DEBUG_BUS
+               temp = readb(i2c_imx->base + IMX_I2C_I2CR);
+               dev_dbg(&i2c_imx->adapter.dev, "<%s> CONTROL: IEN=%d, IIEN=%d, "
+                       "MSTA=%d, MTX=%d, TXAK=%d, RSTA=%d\n", __func__,
+                       (temp & I2CR_IEN ? 1 : 0), (temp & I2CR_IIEN ? 1 : 0),
+                       (temp & I2CR_MSTA ? 1 : 0), (temp & I2CR_MTX ? 1 : 0),
+                       (temp & I2CR_TXAK ? 1 : 0), (temp & I2CR_RSTA ? 1 : 0));
+               temp = readb(i2c_imx->base + IMX_I2C_I2SR);
+               dev_dbg(&i2c_imx->adapter.dev,
+                       "<%s> STATUS: ICF=%d, IAAS=%d, IBB=%d, "
+                       "IAL=%d, SRW=%d, IIF=%d, RXAK=%d\n", __func__,
+                       (temp & I2SR_ICF ? 1 : 0), (temp & I2SR_IAAS ? 1 : 0),
+                       (temp & I2SR_IBB ? 1 : 0), (temp & I2SR_IAL ? 1 : 0),
+                       (temp & I2SR_SRW ? 1 : 0), (temp & I2SR_IIF ? 1 : 0),
+                       (temp & I2SR_RXAK ? 1 : 0));
+#endif
+               if (msgs[i].flags & I2C_M_RD)
+                       result = i2c_imx_read(i2c_imx, &msgs[i]);
+               else
+                       result = i2c_imx_write(i2c_imx, &msgs[i]);
+       }
+
+fail0:
+       /* Stop I2C transfer */
+       i2c_imx_stop(i2c_imx);
+
+       dev_dbg(&i2c_imx->adapter.dev, "<%s> exit with: %s: %d\n", __func__,
+               (result < 0) ? "error" : "success msg",
+                       (result < 0) ? result : num);
+       return (result < 0) ? result : num;
+}
+
+static u32 i2c_imx_func(struct i2c_adapter *adapter)
+{
+       return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
+}
+
+static struct i2c_algorithm i2c_imx_algo = {
+       .master_xfer    = i2c_imx_xfer,
+       .functionality  = i2c_imx_func,
+};
+
+static int __init i2c_imx_probe(struct platform_device *pdev)
+{
+       struct imx_i2c_struct *i2c_imx;
+       struct resource *res;
+       struct imxi2c_platform_data *pdata;
+       void __iomem *base;
+       resource_size_t res_size;
+       int irq;
+       int ret;
+
+       dev_dbg(&pdev->dev, "<%s>\n", __func__);
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               dev_err(&pdev->dev, "can't get device resources\n");
+               return -ENOENT;
+       }
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0) {
+               dev_err(&pdev->dev, "can't get irq number\n");
+               return -ENOENT;
+       }
+
+       pdata = pdev->dev.platform_data;
+
+       if (pdata && pdata->init) {
+               ret = pdata->init(&pdev->dev);
+               if (ret)
+                       return ret;
+       }
+
+       res_size = resource_size(res);
+       base = ioremap(res->start, res_size);
+       if (!base) {
+               dev_err(&pdev->dev, "ioremap failed\n");
+               ret = -EIO;
+               goto fail0;
+       }
+
+       i2c_imx = kzalloc(sizeof(struct imx_i2c_struct), GFP_KERNEL);
+       if (!i2c_imx) {
+               dev_err(&pdev->dev, "can't allocate interface\n");
+               ret = -ENOMEM;
+               goto fail1;
+       }
+
+       if (!request_mem_region(res->start, res_size, DRIVER_NAME)) {
+               ret = -EBUSY;
+               goto fail2;
+       }
+
+       /* Setup i2c_imx driver structure */
+       strcpy(i2c_imx->adapter.name, pdev->name);
+       i2c_imx->adapter.owner          = THIS_MODULE;
+       i2c_imx->adapter.algo           = &i2c_imx_algo;
+       i2c_imx->adapter.dev.parent     = &pdev->dev;
+       i2c_imx->adapter.nr             = pdev->id;
+       i2c_imx->irq                    = irq;
+       i2c_imx->base                   = base;
+       i2c_imx->res                    = res;
+
+       /* Get I2C clock */
+       i2c_imx->clk = clk_get(&pdev->dev, "i2c_clk");
+       if (IS_ERR(i2c_imx->clk)) {
+               ret = PTR_ERR(i2c_imx->clk);
+               dev_err(&pdev->dev, "can't get I2C clock\n");
+               goto fail3;
+       }
+       clk_enable(i2c_imx->clk);
+
+       /* Request IRQ */
+       ret = request_irq(i2c_imx->irq, i2c_imx_isr, 0, pdev->name, i2c_imx);
+       if (ret) {
+               dev_err(&pdev->dev, "can't claim irq %d\n", i2c_imx->irq);
+               goto fail4;
+       }
+
+       /* Init queue */
+       init_waitqueue_head(&i2c_imx->queue);
+
+       /* Set up adapter data */
+       i2c_set_adapdata(&i2c_imx->adapter, i2c_imx);
+
+       /* Set up clock divider */
+       if (pdata && pdata->bitrate)
+               i2c_imx_set_clk(i2c_imx, pdata->bitrate);
+       else
+               i2c_imx_set_clk(i2c_imx, IMX_I2C_BIT_RATE);
+
+       /* Set up chip registers to defaults */
+       writeb(0, i2c_imx->base + IMX_I2C_I2CR);
+       writeb(0, i2c_imx->base + IMX_I2C_I2SR);
+
+       /* Add I2C adapter */
+       ret = i2c_add_numbered_adapter(&i2c_imx->adapter);
+       if (ret < 0) {
+               dev_err(&pdev->dev, "registration failed\n");
+               goto fail5;
+       }
+
+       /* Set up platform driver data */
+       platform_set_drvdata(pdev, i2c_imx);
+
+       dev_dbg(&i2c_imx->adapter.dev, "claimed irq %d\n", i2c_imx->irq);
+       dev_dbg(&i2c_imx->adapter.dev, "device resources from 0x%x to 0x%x\n",
+               i2c_imx->res->start, i2c_imx->res->end);
+       dev_dbg(&i2c_imx->adapter.dev, "allocated %d bytes at 0x%x \n",
+               res_size, i2c_imx->res->start);
+       dev_dbg(&i2c_imx->adapter.dev, "adapter name: \"%s\"\n",
+               i2c_imx->adapter.name);
+       dev_dbg(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n");
+
+       return 0;   /* Return OK */
+
+fail5:
+       free_irq(i2c_imx->irq, i2c_imx);
+fail4:
+       clk_disable(i2c_imx->clk);
+       clk_put(i2c_imx->clk);
+fail3:
+       release_mem_region(i2c_imx->res->start, resource_size(res));
+fail2:
+       kfree(i2c_imx);
+fail1:
+       iounmap(base);
+fail0:
+       if (pdata && pdata->exit)
+               pdata->exit(&pdev->dev);
+       return ret; /* Return error number */
+}
+
+static int __exit i2c_imx_remove(struct platform_device *pdev)
+{
+       struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev);
+       struct imxi2c_platform_data *pdata = pdev->dev.platform_data;
+
+       /* remove adapter */
+       dev_dbg(&i2c_imx->adapter.dev, "adapter removed\n");
+       i2c_del_adapter(&i2c_imx->adapter);
+       platform_set_drvdata(pdev, NULL);
+
+       /* free interrupt */
+       free_irq(i2c_imx->irq, i2c_imx);
+
+       /* setup chip registers to defaults */
+       writeb(0, i2c_imx->base + IMX_I2C_IADR);
+       writeb(0, i2c_imx->base + IMX_I2C_IFDR);
+       writeb(0, i2c_imx->base + IMX_I2C_I2CR);
+       writeb(0, i2c_imx->base + IMX_I2C_I2SR);
+
+       /* Shut down hardware */
+       if (pdata && pdata->exit)
+               pdata->exit(&pdev->dev);
+
+       /* Disable I2C clock */
+       clk_disable(i2c_imx->clk);
+       clk_put(i2c_imx->clk);
+
+       release_mem_region(i2c_imx->res->start, resource_size(i2c_imx->res));
+       iounmap(i2c_imx->base);
+       kfree(i2c_imx);
+       return 0;
+}
+
+static struct platform_driver i2c_imx_driver = {
+       .probe          = i2c_imx_probe,
+       .remove         = __exit_p(i2c_imx_remove),
+       .driver = {
+               .name   = DRIVER_NAME,
+               .owner  = THIS_MODULE,
+       }
+};
+
+static int __init i2c_adap_imx_init(void)
+{
+       return platform_driver_probe(&i2c_imx_driver, i2c_imx_probe);
+}
+
+static void __exit i2c_adap_imx_exit(void)
+{
+       platform_driver_unregister(&i2c_imx_driver);
+}
+
+module_init(i2c_adap_imx_init);
+module_exit(i2c_adap_imx_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Darius Augulis");
+MODULE_DESCRIPTION("I2C adapter driver for IMX I2C bus");
+MODULE_ALIAS("platform:" DRIVER_NAME);
index 26bf370..4af5c09 100644 (file)
 #include <linux/of_platform.h>
 #include <linux/of_i2c.h>
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/fsl_devices.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 
+#include <asm/mpc52xx.h>
+#include <sysdev/fsl_soc.h>
+
 #define DRV_NAME "mpc-i2c"
 
-#define MPC_I2C_FDR    0x04
-#define MPC_I2C_CR     0x08
-#define MPC_I2C_SR     0x0c
-#define MPC_I2C_DR     0x10
+#define MPC_I2C_FDR   0x04
+#define MPC_I2C_CR    0x08
+#define MPC_I2C_SR    0x0c
+#define MPC_I2C_DR    0x10
 #define MPC_I2C_DFSRR 0x14
 
 #define CCR_MEN  0x80
 #define CSR_RXAK 0x01
 
 struct mpc_i2c {
+       struct device *dev;
        void __iomem *base;
        u32 interrupt;
        wait_queue_head_t queue;
        struct i2c_adapter adap;
        int irq;
-       u32 flags;
 };
 
-static __inline__ void writeccr(struct mpc_i2c *i2c, u32 x)
+struct mpc_i2c_divider {
+       u16 divider;
+       u16 fdr;        /* including dfsrr */
+};
+
+struct mpc_i2c_match_data {
+       void (*setclock)(struct device_node *node,
+                        struct mpc_i2c *i2c,
+                        u32 clock, u32 prescaler);
+       u32 prescaler;
+};
+
+static inline void writeccr(struct mpc_i2c *i2c, u32 x)
 {
        writeb(x, i2c->base + MPC_I2C_CR);
 }
@@ -100,12 +115,11 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
        u32 x;
        int result = 0;
 
-       if (i2c->irq == NO_IRQ)
-       {
+       if (i2c->irq == NO_IRQ) {
                while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) {
                        schedule();
                        if (time_after(jiffies, orig_jiffies + timeout)) {
-                               pr_debug("I2C: timeout\n");
+                               dev_dbg(i2c->dev, "timeout\n");
                                writeccr(i2c, 0);
                                result = -EIO;
                                break;
@@ -119,7 +133,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
                        (i2c->interrupt & CSR_MIF), timeout);
 
                if (unlikely(!(i2c->interrupt & CSR_MIF))) {
-                       pr_debug("I2C: wait timeout\n");
+                       dev_dbg(i2c->dev, "wait timeout\n");
                        writeccr(i2c, 0);
                        result = -ETIMEDOUT;
                }
@@ -132,17 +146,17 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
                return result;
 
        if (!(x & CSR_MCF)) {
-               pr_debug("I2C: unfinished\n");
+               dev_dbg(i2c->dev, "unfinished\n");
                return -EIO;
        }
 
        if (x & CSR_MAL) {
-               pr_debug("I2C: MAL\n");
+               dev_dbg(i2c->dev, "MAL\n");
                return -EIO;
        }
 
        if (writing && (x & CSR_RXAK)) {
-               pr_debug("I2C: No RXAK\n");
+               dev_dbg(i2c->dev, "No RXAK\n");
                /* generate stop */
                writeccr(i2c, CCR_MEN);
                return -EIO;
@@ -150,18 +164,181 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
        return 0;
 }
 
-static void mpc_i2c_setclock(struct mpc_i2c *i2c)
+#ifdef CONFIG_PPC_52xx
+static const struct mpc_i2c_divider mpc_i2c_dividers_52xx[] = {
+       {20, 0x20}, {22, 0x21}, {24, 0x22}, {26, 0x23},
+       {28, 0x24}, {30, 0x01}, {32, 0x25}, {34, 0x02},
+       {36, 0x26}, {40, 0x27}, {44, 0x04}, {48, 0x28},
+       {52, 0x63}, {56, 0x29}, {60, 0x41}, {64, 0x2a},
+       {68, 0x07}, {72, 0x2b}, {80, 0x2c}, {88, 0x09},
+       {96, 0x2d}, {104, 0x0a}, {112, 0x2e}, {120, 0x81},
+       {128, 0x2f}, {136, 0x47}, {144, 0x0c}, {160, 0x30},
+       {176, 0x49}, {192, 0x31}, {208, 0x4a}, {224, 0x32},
+       {240, 0x0f}, {256, 0x33}, {272, 0x87}, {288, 0x10},
+       {320, 0x34}, {352, 0x89}, {384, 0x35}, {416, 0x8a},
+       {448, 0x36}, {480, 0x13}, {512, 0x37}, {576, 0x14},
+       {640, 0x38}, {768, 0x39}, {896, 0x3a}, {960, 0x17},
+       {1024, 0x3b}, {1152, 0x18}, {1280, 0x3c}, {1536, 0x3d},
+       {1792, 0x3e}, {1920, 0x1b}, {2048, 0x3f}, {2304, 0x1c},
+       {2560, 0x1d}, {3072, 0x1e}, {3584, 0x7e}, {3840, 0x1f},
+       {4096, 0x7f}, {4608, 0x5c}, {5120, 0x5d}, {6144, 0x5e},
+       {7168, 0xbe}, {7680, 0x5f}, {8192, 0xbf}, {9216, 0x9c},
+       {10240, 0x9d}, {12288, 0x9e}, {15360, 0x9f}
+};
+
+int mpc_i2c_get_fdr_52xx(struct device_node *node, u32 clock, int prescaler)
+{
+       const struct mpc52xx_i2c_divider *div = NULL;
+       unsigned int pvr = mfspr(SPRN_PVR);
+       u32 divider;
+       int i;
+
+       if (!clock)
+               return -EINVAL;
+
+       /* Determine divider value */
+       divider = mpc52xx_find_ipb_freq(node) / clock;
+
+       /*
+        * We want to choose an FDR/DFSR that generates an I2C bus speed that
+        * is equal to or lower than the requested speed.
+        */
+       for (i = 0; i < ARRAY_SIZE(mpc52xx_i2c_dividers); i++) {
+               div = &mpc_i2c_dividers_52xx[i];
+               /* Old MPC5200 rev A CPUs do not support the high bits */
+               if (div->fdr & 0xc0 && pvr == 0x80822011)
+                       continue;
+               if (div->divider >= divider)
+                       break;
+       }
+
+       return div ? (int)div->fdr : -EINVAL;
+}
+
+static void mpc_i2c_setclock_52xx(struct device_node *node,
+                                 struct mpc_i2c *i2c,
+                                 u32 clock, u32 prescaler)
 {
-       /* Set clock and filters */
-       if (i2c->flags & FSL_I2C_DEV_SEPARATE_DFSRR) {
-               writeb(0x31, i2c->base + MPC_I2C_FDR);
-               writeb(0x10, i2c->base + MPC_I2C_DFSRR);
-       } else if (i2c->flags & FSL_I2C_DEV_CLOCK_5200)
-               writeb(0x3f, i2c->base + MPC_I2C_FDR);
-       else
-               writel(0x1031, i2c->base + MPC_I2C_FDR);
+       int fdr = mpc52xx_i2c_get_fdr(node, clock, prescaler);
+
+       if (fdr < 0)
+               fdr = 0x3f; /* backward compatibility */
+       writeb(fdr & 0xff, i2c->base + MPC_I2C_FDR);
+       dev_info(i2c->dev, "clock %d Hz (fdr=%d)\n", clock, fdr);
+}
+#else /* !CONFIG_PPC_52xx */
+static void mpc_i2c_setclock_52xx(struct device_node *node,
+                                 struct mpc_i2c *i2c,
+                                 u32 clock, u32 prescaler)
+{
+}
+#endif /* CONFIG_PPC_52xx*/
+
+#ifdef CONFIG_FSL_SOC
+static const struct mpc_i2c_divider mpc_i2c_dividers_8xxx[] = {
+       {160, 0x0120}, {192, 0x0121}, {224, 0x0122}, {256, 0x0123},
+       {288, 0x0100}, {320, 0x0101}, {352, 0x0601}, {384, 0x0102},
+       {416, 0x0602}, {448, 0x0126}, {480, 0x0103}, {512, 0x0127},
+       {544, 0x0b03}, {576, 0x0104}, {608, 0x1603}, {640, 0x0105},
+       {672, 0x2003}, {704, 0x0b05}, {736, 0x2b03}, {768, 0x0106},
+       {800, 0x3603}, {832, 0x0b06}, {896, 0x012a}, {960, 0x0107},
+       {1024, 0x012b}, {1088, 0x1607}, {1152, 0x0108}, {1216, 0x2b07},
+       {1280, 0x0109}, {1408, 0x1609}, {1536, 0x010a}, {1664, 0x160a},
+       {1792, 0x012e}, {1920, 0x010b}, {2048, 0x012f}, {2176, 0x2b0b},
+       {2304, 0x010c}, {2560, 0x010d}, {2816, 0x2b0d}, {3072, 0x010e},
+       {3328, 0x2b0e}, {3584, 0x0132}, {3840, 0x010f}, {4096, 0x0133},
+       {4608, 0x0110}, {5120, 0x0111}, {6144, 0x0112}, {7168, 0x0136},
+       {7680, 0x0113}, {8192, 0x0137}, {9216, 0x0114}, {10240, 0x0115},
+       {12288, 0x0116}, {14336, 0x013a}, {15360, 0x0117}, {16384, 0x013b},
+       {18432, 0x0118}, {20480, 0x0119}, {24576, 0x011a}, {28672, 0x013e},
+       {30720, 0x011b}, {32768, 0x013f}, {36864, 0x011c}, {40960, 0x011d},
+       {49152, 0x011e}, {61440, 0x011f}
+};
+
+u32 mpc_i2c_get_sec_cfg_8xxx(void)
+{
+       struct device_node *node = NULL;
+       u32 __iomem *reg;
+       u32 val = 0;
+
+       node = of_find_node_by_name(NULL, "global-utilities");
+       if (node) {
+               const u32 *prop = of_get_property(node, "reg", NULL);
+               if (prop) {
+                       /*
+                        * Map and check POR Device Status Register 2
+                        * (PORDEVSR2) at 0xE0014
+                        */
+                       reg = ioremap(get_immrbase() + *prop + 0x14, 0x4);
+                       if (!reg)
+                               printk(KERN_ERR
+                                      "Error: couldn't map PORDEVSR2\n");
+                       else
+                               val = in_be32(reg) & 0x00000080; /* sec-cfg */
+                       iounmap(reg);
+               }
+       }
+       if (node)
+               of_node_put(node);
+
+       return val;
 }
 
+int mpc_i2c_get_fdr_8xxx(struct device_node *node, u32 clock, u32 prescaler)
+{
+       const struct mpc_i2c_divider *div = NULL;
+       u32 divider;
+       int i;
+
+       if (!clock)
+               return -EINVAL;
+
+       /* Determine proper divider value */
+       if (of_device_is_compatible(node, "fsl,mpc8544-i2c"))
+               prescaler = mpc_i2c_get_sec_cfg_8xxx() ? 3 : 2;
+       if (!prescaler)
+               prescaler = 1;
+
+       divider = fsl_get_sys_freq() / clock / prescaler;
+
+       pr_debug("I2C: src_clock=%d clock=%d divider=%d\n",
+                fsl_get_sys_freq(), clock, divider);
+
+       /*
+        * We want to choose an FDR/DFSR that generates an I2C bus speed that
+        * is equal to or lower than the requested speed.
+        */
+       for (i = 0; i < ARRAY_SIZE(mpc_i2c_dividers_8xxx); i++) {
+               div = &mpc_i2c_dividers_8xxx[i];
+               if (div->divider >= divider)
+                       break;
+       }
+
+       return div ? (int)div->fdr : -EINVAL;
+}
+
+static void mpc_i2c_setclock_8xxx(struct device_node *node,
+                                 struct mpc_i2c *i2c,
+                                 u32 clock, u32 prescaler)
+{
+       int fdr = mpc_i2c_get_fdr_8xxx(node, clock, prescaler);
+
+       if (fdr < 0)
+               fdr = 0x1031; /* backward compatibility */
+       writeb(fdr & 0xff, i2c->base + MPC_I2C_FDR);
+       writeb((fdr >> 8) & 0xff, i2c->base + MPC_I2C_DFSRR);
+       dev_info(i2c->dev, "clock %d Hz (dfsrr=%d fdr=%d)\n",
+                clock, fdr >> 8, fdr & 0xff);
+}
+
+#else /* !CONFIG_FSL_SOC */
+static void mpc_i2c_setclock_8xxx(struct device_node *node,
+                                 struct mpc_i2c *i2c,
+                                 u32 clock, u32 prescaler)
+{
+}
+#endif /* CONFIG_FSL_SOC */
+
 static void mpc_i2c_start(struct mpc_i2c *i2c)
 {
        /* Clear arbitration */
@@ -176,7 +353,7 @@ static void mpc_i2c_stop(struct mpc_i2c *i2c)
 }
 
 static int mpc_write(struct mpc_i2c *i2c, int target,
-                    const u8 * data, int length, int restart)
+                    const u8 *data, int length, int restart)
 {
        int i, result;
        unsigned timeout = i2c->adap.timeout;
@@ -207,7 +384,7 @@ static int mpc_write(struct mpc_i2c *i2c, int target,
 }
 
 static int mpc_read(struct mpc_i2c *i2c, int target,
-                   u8 * data, int length, int restart)
+                   u8 *data, int length, int restart)
 {
        unsigned timeout = i2c->adap.timeout;
        int i, result;
@@ -264,12 +441,12 @@ static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
        /* Allow bus up to 1s to become not busy */
        while (readb(i2c->base + MPC_I2C_SR) & CSR_MBB) {
                if (signal_pending(current)) {
-                       pr_debug("I2C: Interrupted\n");
+                       dev_dbg(i2c->dev, "Interrupted\n");
                        writeccr(i2c, 0);
                        return -EINTR;
                }
                if (time_after(jiffies, orig_jiffies + HZ)) {
-                       pr_debug("I2C: timeout\n");
+                       dev_dbg(i2c->dev, "timeout\n");
                        if (readb(i2c->base + MPC_I2C_SR) ==
                            (CSR_MCF | CSR_MBB | CSR_RXAK))
                                mpc_i2c_fixup(i2c);
@@ -280,9 +457,10 @@ static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 
        for (i = 0; ret >= 0 && i < num; i++) {
                pmsg = &msgs[i];
-               pr_debug("Doing %s %d bytes to 0x%02x - %d of %d messages\n",
-                        pmsg->flags & I2C_M_RD ? "read" : "write",
-                        pmsg->len, pmsg->addr, i + 1, num);
+               dev_dbg(i2c->dev,
+                       "Doing %s %d bytes to 0x%02x - %d of %d messages\n",
+                       pmsg->flags & I2C_M_RD ? "read" : "write",
+                       pmsg->len, pmsg->addr, i + 1, num);
                if (pmsg->flags & I2C_M_RD)
                        ret =
                            mpc_read(i2c, pmsg->addr, pmsg->buf, pmsg->len, i);
@@ -311,27 +489,26 @@ static struct i2c_adapter mpc_ops = {
        .timeout = HZ,
 };
 
-static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit fsl_i2c_probe(struct of_device *op,
+                                  const struct of_device_id *match)
 {
-       int result = 0;
        struct mpc_i2c *i2c;
+       const u32 *prop;
+       u32 clock = 0;
+       int result = 0;
+       int plen;
 
        i2c = kzalloc(sizeof(*i2c), GFP_KERNEL);
        if (!i2c)
                return -ENOMEM;
 
-       if (of_get_property(op->node, "dfsrr", NULL))
-               i2c->flags |= FSL_I2C_DEV_SEPARATE_DFSRR;
-
-       if (of_device_is_compatible(op->node, "fsl,mpc5200-i2c") ||
-                       of_device_is_compatible(op->node, "mpc5200-i2c"))
-               i2c->flags |= FSL_I2C_DEV_CLOCK_5200;
+       i2c->dev = &op->dev; /* for debug and error output */
 
        init_waitqueue_head(&i2c->queue);
 
        i2c->base = of_iomap(op->node, 0);
        if (!i2c->base) {
-               printk(KERN_ERR "i2c-mpc - failed to map controller\n");
+               dev_err(i2c->dev, "failed to map controller\n");
                result = -ENOMEM;
                goto fail_map;
        }
@@ -341,12 +518,27 @@ static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_
                result = request_irq(i2c->irq, mpc_i2c_isr,
                                     IRQF_SHARED, "i2c-mpc", i2c);
                if (result < 0) {
-                       printk(KERN_ERR "i2c-mpc - failed to attach interrupt\n");
+                       dev_err(i2c->dev, "failed to attach interrupt\n");
                        goto fail_request;
                }
        }
-       
-       mpc_i2c_setclock(i2c);
+
+       if (!of_get_property(op->node, "fsl,preserve-clocking", NULL)) {
+               prop = of_get_property(op->node, "clock-frequency", &plen);
+               if (prop && plen == sizeof(u32))
+                       clock = *prop;
+
+               if (match->data) {
+                       struct mpc_i2c_match_data *data =
+                               (struct mpc_i2c_match_data *)match->data;
+                       data->setclock(op->node, i2c, clock, data->prescaler);
+               } else {
+                       /* Backwards compatibility */
+                       if (of_get_property(op->node, "dfsrr", NULL))
+                               mpc_i2c_setclock_8xxx(op->node, i2c,
+                                                     clock, 0);
+               }
+       }
 
        dev_set_drvdata(&op->dev, i2c);
 
@@ -356,7 +548,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_
 
        result = i2c_add_adapter(&i2c->adap);
        if (result < 0) {
-               printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
+               dev_err(i2c->dev, "failed to add adapter\n");
                goto fail_add;
        }
        of_register_i2c_devices(&i2c->adap, op->node);
@@ -368,7 +560,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_
        free_irq(i2c->irq, i2c);
  fail_request:
        irq_dispose_mapping(i2c->irq);
-       iounmap(i2c->base);
+       iounmap(i2c->base);
  fail_map:
        kfree(i2c);
        return result;
@@ -391,9 +583,43 @@ static int __devexit fsl_i2c_remove(struct of_device *op)
 };
 
 static const struct of_device_id mpc_i2c_of_match[] = {
-       {.compatible = "fsl-i2c",},
+       {.compatible = "mpc5200-i2c",
+        .data = &(struct mpc_i2c_match_data) {
+                       .setclock = mpc_i2c_setclock_52xx,
+               },
+       },
+       {.compatible = "fsl,mpc5200b-i2c",
+        .data = &(struct mpc_i2c_match_data) {
+                       .setclock = mpc_i2c_setclock_52xx,
+               },
+       },
+       {.compatible = "fsl,mpc5200-i2c",
+        .data = &(struct mpc_i2c_match_data) {
+                       .setclock = mpc_i2c_setclock_52xx,
+               },
+       },
+       {.compatible = "fsl,mpc8313-i2c",
+        .data = &(struct mpc_i2c_match_data) {
+                       .setclock = mpc_i2c_setclock_8xxx,
+               },
+       },
+       {.compatible = "fsl,mpc8543-i2c",
+        .data = &(struct mpc_i2c_match_data) {
+                       .setclock = mpc_i2c_setclock_8xxx,
+                       .prescaler = 2,
+               },
+       },
+       {.compatible = "fsl,mpc8544-i2c",
+        .data = &(struct mpc_i2c_match_data) {
+                       .setclock = mpc_i2c_setclock_8xxx,
+                       .prescaler = 3,
+               },
+       /* Backward compatibility */
+       },
+       {.compatible = "fsl-i2c", },
        {},
 };
+
 MODULE_DEVICE_TABLE(of, mpc_i2c_of_match);
 
 
@@ -414,7 +640,7 @@ static int __init fsl_i2c_init(void)
 
        rv = of_register_platform_driver(&mpc_i2c_driver);
        if (rv)
-               printk(KERN_ERR DRV_NAME 
+               printk(KERN_ERR DRV_NAME
                       " of_register_platform_driver failed (%i)\n", rv);
        return rv;
 }
@@ -428,6 +654,6 @@ module_init(fsl_i2c_init);
 module_exit(fsl_i2c_exit);
 
 MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>");
-MODULE_DESCRIPTION
-    ("I2C-Bus adapter for MPC107 bridge and MPC824x/85xx/52xx processors");
+MODULE_DESCRIPTION("I2C-Bus adapter for MPC107 bridge and "
+                  "MPC824x/85xx/52xx processors");
 MODULE_LICENSE("GPL");
index 5b7f956..1691ef0 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/drivers/i2c/busses/i2c-s3c2410.c
  *
- * Copyright (C) 2004,2005 Simtec Electronics
+ * Copyright (C) 2004,2005,2009 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 I2C Controller
@@ -590,18 +590,6 @@ static int s3c24xx_i2c_calcdivisor(unsigned long clkin, unsigned int wanted,
        return clkin / (calc_divs * calc_div1);
 }
 
-/* freq_acceptable
- *
- * test wether a frequency is within the acceptable range of error
-*/
-
-static inline int freq_acceptable(unsigned int freq, unsigned int wanted)
-{
-       int diff = freq - wanted;
-
-       return diff >= -2 && diff <= 2;
-}
-
 /* s3c24xx_i2c_clockrate
  *
  * work out a divisor for the user requested frequency setting,
@@ -614,44 +602,28 @@ static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)
        struct s3c2410_platform_i2c *pdata = i2c->dev->platform_data;
        unsigned long clkin = clk_get_rate(i2c->clk);
        unsigned int divs, div1;
+       unsigned long target_frequency;
        u32 iiccon;
        int freq;
-       int start, end;
 
        i2c->clkrate = clkin;
        clkin /= 1000;          /* clkin now in KHz */
 
-       dev_dbg(i2c->dev, "pdata %p, freq %lu %lu..%lu\n",
-                pdata, pdata->bus_freq, pdata->min_freq, pdata->max_freq);
-
-       if (pdata->bus_freq != 0) {
-               freq = s3c24xx_i2c_calcdivisor(clkin, pdata->bus_freq/1000,
-                                              &div1, &divs);
-               if (freq_acceptable(freq, pdata->bus_freq/1000))
-                       goto found;
-       }
-
-       /* ok, we may have to search for something suitable... */
+       dev_dbg(i2c->dev, "pdata desired frequency %lu\n", pdata->frequency);
 
-       start = (pdata->max_freq == 0) ? pdata->bus_freq : pdata->max_freq;
-       end = pdata->min_freq;
+       target_frequency = pdata->frequency ? pdata->frequency : 100000;
 
-       start /= 1000;
-       end /= 1000;
+       target_frequency /= 1000; /* Target frequency now in KHz */
 
-       /* search loop... */
+       freq = s3c24xx_i2c_calcdivisor(clkin, target_frequency, &div1, &divs);
 
-       for (; start > end; start--) {
-               freq = s3c24xx_i2c_calcdivisor(clkin, start, &div1, &divs);
-               if (freq_acceptable(freq, start))
-                       goto found;
+       if (freq > target_frequency) {
+               dev_err(i2c->dev,
+                       "Unable to achieve desired frequency %luKHz."   \
+                       " Lowest achievable %dKHz\n", target_frequency, freq);
+               return -EINVAL;
        }
 
-       /* cannot find frequency spec */
-
-       return -EINVAL;
-
- found:
        *got = freq;
 
        iiccon = readl(i2c->regs + S3C2410_IICCON);
@@ -663,6 +635,23 @@ static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)
 
        writel(iiccon, i2c->regs + S3C2410_IICCON);
 
+       if (s3c24xx_i2c_is2440(i2c)) {
+               unsigned long sda_delay;
+
+               if (pdata->sda_delay) {
+                       sda_delay = (freq / 1000) * pdata->sda_delay;
+                       sda_delay /= 1000000;
+                       sda_delay = DIV_ROUND_UP(sda_delay, 5);
+                       if (sda_delay > 3)
+                               sda_delay = 3;
+                       sda_delay |= S3C2410_IICLC_FILTER_ON;
+               } else
+                       sda_delay = 0;
+
+               dev_dbg(i2c->dev, "IICLC=%08lx\n", sda_delay);
+               writel(sda_delay, i2c->regs + S3C2440_IICLC);
+       }
+
        return 0;
 }
 
@@ -769,11 +758,8 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)
 
        /* check for s3c2440 i2c controller  */
 
-       if (s3c24xx_i2c_is2440(i2c)) {
-               dev_dbg(i2c->dev, "S3C2440_IICLC=%08x\n", pdata->sda_delay);
-
-               writel(pdata->sda_delay, i2c->regs + S3C2440_IICLC);
-       }
+       if (s3c24xx_i2c_is2440(i2c))
+               writel(0x0, i2c->regs + S3C2440_IICLC);
 
        return 0;
 }
@@ -1018,14 +1004,13 @@ static int __init i2c_adap_s3c_init(void)
 
        return ret;
 }
+subsys_initcall(i2c_adap_s3c_init);
 
 static void __exit i2c_adap_s3c_exit(void)
 {
        platform_driver_unregister(&s3c2410_i2c_driver);
        platform_driver_unregister(&s3c2440_i2c_driver);
 }
-
-module_init(i2c_adap_s3c_init);
 module_exit(i2c_adap_s3c_exit);
 
 MODULE_DESCRIPTION("S3C24XX I2C Bus driver");
diff --git a/drivers/i2c/busses/i2c-s6000.c b/drivers/i2c/busses/i2c-s6000.c
new file mode 100644 (file)
index 0000000..c91359f
--- /dev/null
@@ -0,0 +1,407 @@
+/*
+ * drivers/i2c/busses/i2c-s6000.c
+ *
+ * Description: Driver for S6000 Family I2C Interface
+ * Copyright (c) 2008 emlix GmbH
+ * Author:     Oskar Schirmer <os@emlix.com>
+ *
+ * Partially based on i2c-bfin-twi.c driver by <sonic.zhang@analog.com>
+ * Copyright (c) 2005-2007 Analog Devices, Inc.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/i2c.h>
+#include <linux/i2c/s6000.h>
+#include <linux/timer.h>
+#include <linux/spinlock.h>
+#include <linux/completion.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+
+#include <asm/io.h>
+#include "i2c-s6000.h"
+
+#define DRV_NAME "i2c-s6000"
+
+#define POLL_TIMEOUT   (2 * HZ)
+
+struct s6i2c_if {
+       u8 __iomem              *reg; /* memory mapped registers */
+       int                     irq;
+       spinlock_t              lock;
+       struct i2c_msg          *msgs; /* messages currently handled */
+       int                     msgs_num; /* nb of msgs to do */
+       int                     msgs_push; /* nb of msgs read/written */
+       int                     msgs_done; /* nb of msgs finally handled */
+       unsigned                push; /* nb of bytes read/written in msg */
+       unsigned                done; /* nb of bytes finally handled */
+       int                     timeout_count; /* timeout retries left */
+       struct timer_list       timeout_timer;
+       struct i2c_adapter      adap;
+       struct completion       complete;
+       struct clk              *clk;
+       struct resource         *res;
+};
+
+static inline u16 i2c_rd16(struct s6i2c_if *iface, unsigned n)
+{
+       return readw(iface->reg + (n));
+}
+
+static inline void i2c_wr16(struct s6i2c_if *iface, unsigned n, u16 v)
+{
+       writew(v, iface->reg + (n));
+}
+
+static inline u32 i2c_rd32(struct s6i2c_if *iface, unsigned n)
+{
+       return readl(iface->reg + (n));
+}
+
+static inline void i2c_wr32(struct s6i2c_if *iface, unsigned n, u32 v)
+{
+       writel(v, iface->reg + (n));
+}
+
+static struct s6i2c_if s6i2c_if;
+
+static void s6i2c_handle_interrupt(struct s6i2c_if *iface)
+{
+       if (i2c_rd16(iface, S6_I2C_INTRSTAT) & (1 << S6_I2C_INTR_TXABRT)) {
+               i2c_rd16(iface, S6_I2C_CLRTXABRT);
+               i2c_wr16(iface, S6_I2C_INTRMASK, 0);
+               complete(&iface->complete);
+               return;
+       }
+       if (iface->msgs_done >= iface->msgs_num) {
+               dev_err(&iface->adap.dev, "s6i2c: spurious I2C irq: %04x\n",
+                       i2c_rd16(iface, S6_I2C_INTRSTAT));
+               i2c_wr16(iface, S6_I2C_INTRMASK, 0);
+               return;
+       }
+       while ((iface->msgs_push < iface->msgs_num)
+           && (i2c_rd16(iface, S6_I2C_STATUS) & (1 << S6_I2C_STATUS_TFNF))) {
+               struct i2c_msg *m = &iface->msgs[iface->msgs_push];
+               if (!(m->flags & I2C_M_RD))
+                       i2c_wr16(iface, S6_I2C_DATACMD, m->buf[iface->push]);
+               else
+                       i2c_wr16(iface, S6_I2C_DATACMD,
+                                1 << S6_I2C_DATACMD_READ);
+               if (++iface->push >= m->len) {
+                       iface->push = 0;
+                       iface->msgs_push += 1;
+               }
+       }
+       do {
+               struct i2c_msg *m = &iface->msgs[iface->msgs_done];
+               if (!(m->flags & I2C_M_RD)) {
+                       if (iface->msgs_done < iface->msgs_push)
+                               iface->msgs_done += 1;
+                       else
+                               break;
+               } else if (i2c_rd16(iface, S6_I2C_STATUS)
+                               & (1 << S6_I2C_STATUS_RFNE)) {
+                       m->buf[iface->done] = i2c_rd16(iface, S6_I2C_DATACMD);
+                       if (++iface->done >= m->len) {
+                               iface->done = 0;
+                               iface->msgs_done += 1;
+                       }
+               } else{
+                       break;
+               }
+       } while (iface->msgs_done < iface->msgs_num);
+       if (iface->msgs_done >= iface->msgs_num) {
+               i2c_wr16(iface, S6_I2C_INTRMASK, 1 << S6_I2C_INTR_TXABRT);
+               complete(&iface->complete);
+       } else if (iface->msgs_push >= iface->msgs_num) {
+               i2c_wr16(iface, S6_I2C_INTRMASK, (1 << S6_I2C_INTR_TXABRT) |
+                                                (1 << S6_I2C_INTR_RXFULL));
+       } else {
+               i2c_wr16(iface, S6_I2C_INTRMASK, (1 << S6_I2C_INTR_TXABRT) |
+                                                (1 << S6_I2C_INTR_TXEMPTY) |
+                                                (1 << S6_I2C_INTR_RXFULL));
+       }
+}
+
+static irqreturn_t s6i2c_interrupt_entry(int irq, void *dev_id)
+{
+       struct s6i2c_if *iface = dev_id;
+       if (!(i2c_rd16(iface, S6_I2C_STATUS) & ((1 << S6_I2C_INTR_RXUNDER)
+                                             | (1 << S6_I2C_INTR_RXOVER)
+                                             | (1 << S6_I2C_INTR_RXFULL)
+                                             | (1 << S6_I2C_INTR_TXOVER)
+                                             | (1 << S6_I2C_INTR_TXEMPTY)
+                                             | (1 << S6_I2C_INTR_RDREQ)
+                                             | (1 << S6_I2C_INTR_TXABRT)
+                                             | (1 << S6_I2C_INTR_RXDONE)
+                                             | (1 << S6_I2C_INTR_ACTIVITY)
+                                             | (1 << S6_I2C_INTR_STOPDET)
+                                             | (1 << S6_I2C_INTR_STARTDET)
+                                             | (1 << S6_I2C_INTR_GENCALL))))
+               return IRQ_NONE;
+
+       spin_lock(&iface->lock);
+       del_timer(&iface->timeout_timer);
+       s6i2c_handle_interrupt(iface);
+       spin_unlock(&iface->lock);
+       return IRQ_HANDLED;
+}
+
+static void s6i2c_timeout(unsigned long data)
+{
+       struct s6i2c_if *iface = (struct s6i2c_if *)data;
+       unsigned long flags;
+
+       spin_lock_irqsave(&iface->lock, flags);
+       s6i2c_handle_interrupt(iface);
+       if (--iface->timeout_count > 0) {
+               iface->timeout_timer.expires = jiffies + POLL_TIMEOUT;
+               add_timer(&iface->timeout_timer);
+       } else {
+               complete(&iface->complete);
+               i2c_wr16(iface, S6_I2C_INTRMASK, 0);
+       }
+       spin_unlock_irqrestore(&iface->lock, flags);
+}
+
+static int s6i2c_master_xfer(struct i2c_adapter *adap,
+                               struct i2c_msg *msgs, int num)
+{
+       struct s6i2c_if *iface = adap->algo_data;
+       int i;
+       if (num == 0)
+               return 0;
+       if (i2c_rd16(iface, S6_I2C_STATUS) & (1 << S6_I2C_STATUS_ACTIVITY))
+               yield();
+       i2c_wr16(iface, S6_I2C_INTRMASK, 0);
+       i2c_rd16(iface, S6_I2C_CLRINTR);
+       for (i = 0; i < num; i++) {
+               if (msgs[i].flags & I2C_M_TEN) {
+                       dev_err(&adap->dev,
+                               "s6i2c: 10 bits addr not supported\n");
+                       return -EINVAL;
+               }
+               if (msgs[i].len == 0) {
+                       dev_err(&adap->dev,
+                               "s6i2c: zero length message not supported\n");
+                       return -EINVAL;
+               }
+               if (msgs[i].addr != msgs[0].addr) {
+                       dev_err(&adap->dev,
+                               "s6i2c: multiple xfer cannot change target\n");
+                       return -EINVAL;
+               }
+       }
+
+       iface->msgs = msgs;
+       iface->msgs_num = num;
+       iface->msgs_push = 0;
+       iface->msgs_done = 0;
+       iface->push = 0;
+       iface->done = 0;
+       iface->timeout_count = 10;
+       i2c_wr16(iface, S6_I2C_TAR, msgs[0].addr);
+       i2c_wr16(iface, S6_I2C_ENABLE, 1);
+       i2c_wr16(iface, S6_I2C_INTRMASK, (1 << S6_I2C_INTR_TXEMPTY) |
+                                        (1 << S6_I2C_INTR_TXABRT));
+
+       iface->timeout_timer.expires = jiffies + POLL_TIMEOUT;
+       add_timer(&iface->timeout_timer);
+       wait_for_completion(&iface->complete);
+       del_timer_sync(&iface->timeout_timer);
+       while (i2c_rd32(iface, S6_I2C_TXFLR) > 0)
+               schedule();
+       while (i2c_rd16(iface, S6_I2C_STATUS) & (1 << S6_I2C_STATUS_ACTIVITY))
+               schedule();
+
+       i2c_wr16(iface, S6_I2C_INTRMASK, 0);
+       i2c_wr16(iface, S6_I2C_ENABLE, 0);
+       return iface->msgs_done;
+}
+
+static u32 s6i2c_functionality(struct i2c_adapter *adap)
+{
+       return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
+}
+
+static struct i2c_algorithm s6i2c_algorithm = {
+       .master_xfer   = s6i2c_master_xfer,
+       .functionality = s6i2c_functionality,
+};
+
+static u16 __devinit nanoseconds_on_clk(struct s6i2c_if *iface, u32 ns)
+{
+       u32 dividend = ((clk_get_rate(iface->clk) / 1000) * ns) / 1000000;
+       if (dividend > 0xffff)
+               return 0xffff;
+       return dividend;
+}
+
+static int __devinit s6i2c_probe(struct platform_device *dev)
+{
+       struct s6i2c_if *iface = &s6i2c_if;
+       struct i2c_adapter *p_adap;
+       const char *clock;
+       int bus_num, rc;
+       spin_lock_init(&iface->lock);
+       init_completion(&iface->complete);
+       iface->irq = platform_get_irq(dev, 0);
+       if (iface->irq < 0) {
+               rc = iface->irq;
+               goto err_out;
+       }
+       iface->res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+       if (!iface->res) {
+               rc = -ENXIO;
+               goto err_out;
+       }
+       iface->res = request_mem_region(iface->res->start,
+                                       resource_size(iface->res),
+                                       dev->dev.bus_id);
+       if (!iface->res) {
+               rc = -EBUSY;
+               goto err_out;
+       }
+       iface->reg = ioremap_nocache(iface->res->start,
+                                    resource_size(iface->res));
+       if (!iface->reg) {
+               rc = -ENOMEM;
+               goto err_reg;
+       }
+
+       clock = 0;
+       bus_num = -1;
+       if (dev->dev.platform_data) {
+               struct s6_i2c_platform_data *pdata = dev->dev.platform_data;
+               bus_num = pdata->bus_num;
+               clock = pdata->clock;
+       }
+       iface->clk = clk_get(&dev->dev, clock);
+       if (IS_ERR(iface->clk)) {
+               rc = PTR_ERR(iface->clk);
+               goto err_map;
+       }
+       rc = clk_enable(iface->clk);
+       if (rc < 0)
+               goto err_clk_put;
+       init_timer(&iface->timeout_timer);
+       iface->timeout_timer.function = s6i2c_timeout;
+       iface->timeout_timer.data = (unsigned long)iface;
+
+       p_adap = &iface->adap;
+       strlcpy(p_adap->name, dev->name, sizeof(p_adap->name));
+       p_adap->algo = &s6i2c_algorithm;
+       p_adap->algo_data = iface;
+       p_adap->nr = bus_num;
+       p_adap->class = 0;
+       p_adap->dev.parent = &dev->dev;
+       i2c_wr16(iface, S6_I2C_INTRMASK, 0);
+       rc = request_irq(iface->irq, s6i2c_interrupt_entry,
+                        IRQF_SHARED, dev->name, iface);
+       if (rc) {
+               dev_err(&p_adap->dev, "s6i2c: cant get IRQ %d\n", iface->irq);
+               goto err_clk_dis;
+       }
+
+       i2c_wr16(iface, S6_I2C_ENABLE, 0);
+       udelay(1);
+       i2c_wr32(iface, S6_I2C_SRESET, 1 << S6_I2C_SRESET_IC_SRST);
+       i2c_wr16(iface, S6_I2C_CLRTXABRT, 1);
+       i2c_wr16(iface, S6_I2C_CON,
+                       (1 << S6_I2C_CON_MASTER) |
+                       (S6_I2C_CON_SPEED_NORMAL << S6_I2C_CON_SPEED) |
+                       (0 << S6_I2C_CON_10BITSLAVE) |
+                       (0 << S6_I2C_CON_10BITMASTER) |
+                       (1 << S6_I2C_CON_RESTARTENA) |
+                       (1 << S6_I2C_CON_SLAVEDISABLE));
+       i2c_wr16(iface, S6_I2C_SSHCNT, nanoseconds_on_clk(iface, 4000));
+       i2c_wr16(iface, S6_I2C_SSLCNT, nanoseconds_on_clk(iface, 4700));
+       i2c_wr16(iface, S6_I2C_FSHCNT, nanoseconds_on_clk(iface, 600));
+       i2c_wr16(iface, S6_I2C_FSLCNT, nanoseconds_on_clk(iface, 1300));
+       i2c_wr16(iface, S6_I2C_RXTL, 0);
+       i2c_wr16(iface, S6_I2C_TXTL, 0);
+
+       platform_set_drvdata(dev, iface);
+       if (bus_num < 0)
+               rc = i2c_add_adapter(p_adap);
+       else
+               rc = i2c_add_numbered_adapter(p_adap);
+       if (rc)
+               goto err_irq_free;
+       return 0;
+
+err_irq_free:
+       free_irq(iface->irq, iface);
+err_clk_dis:
+       clk_disable(iface->clk);
+err_clk_put:
+       clk_put(iface->clk);
+err_map:
+       iounmap(iface->reg);
+err_reg:
+       release_mem_region(iface->res->start,
+                          resource_size(iface->res));
+err_out:
+       return rc;
+}
+
+static int __devexit s6i2c_remove(struct platform_device *pdev)
+{
+       struct s6i2c_if *iface = platform_get_drvdata(pdev);
+       i2c_wr16(iface, S6_I2C_ENABLE, 0);
+       platform_set_drvdata(pdev, NULL);
+       i2c_del_adapter(&iface->adap);
+       free_irq(iface->irq, iface);
+       clk_disable(iface->clk);
+       clk_put(iface->clk);
+       iounmap(iface->reg);
+       release_mem_region(iface->res->start,
+                          resource_size(iface->res));
+       return 0;
+}
+
+static struct platform_driver s6i2c_driver = {
+       .probe          = s6i2c_probe,
+       .remove         = __devexit_p(s6i2c_remove),
+       .driver         = {
+               .name   = DRV_NAME,
+               .owner  = THIS_MODULE,
+       },
+};
+
+static int __init s6i2c_init(void)
+{
+       pr_info("I2C: S6000 I2C driver\n");
+       return platform_driver_register(&s6i2c_driver);
+}
+
+static void __exit s6i2c_exit(void)
+{
+       platform_driver_unregister(&s6i2c_driver);
+}
+
+MODULE_DESCRIPTION("I2C-Bus adapter routines for S6000 I2C");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRV_NAME);
+
+subsys_initcall(s6i2c_init);
+module_exit(s6i2c_exit);
diff --git a/drivers/i2c/busses/i2c-s6000.h b/drivers/i2c/busses/i2c-s6000.h
new file mode 100644 (file)
index 0000000..ff23b81
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * drivers/i2c/busses/i2c-s6000.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2008 Emlix GmbH <info@emlix.com>
+ * Author:     Oskar Schirmer <os@emlix.com>
+ */
+
+#ifndef __DRIVERS_I2C_BUSSES_I2C_S6000_H
+#define __DRIVERS_I2C_BUSSES_I2C_S6000_H
+
+#define S6_I2C_CON             0x000
+#define S6_I2C_CON_MASTER              0
+#define S6_I2C_CON_SPEED               1
+#define S6_I2C_CON_SPEED_NORMAL                        1
+#define S6_I2C_CON_SPEED_FAST                  2
+#define S6_I2C_CON_SPEED_MASK                  3
+#define S6_I2C_CON_10BITSLAVE          3
+#define S6_I2C_CON_10BITMASTER         4
+#define S6_I2C_CON_RESTARTENA          5
+#define S6_I2C_CON_SLAVEDISABLE                6
+#define S6_I2C_TAR             0x004
+#define S6_I2C_TAR_GCORSTART           10
+#define S6_I2C_TAR_SPECIAL             11
+#define S6_I2C_SAR             0x008
+#define S6_I2C_HSMADDR         0x00C
+#define S6_I2C_DATACMD         0x010
+#define S6_I2C_DATACMD_READ            8
+#define S6_I2C_SSHCNT          0x014
+#define S6_I2C_SSLCNT          0x018
+#define S6_I2C_FSHCNT          0x01C
+#define S6_I2C_FSLCNT          0x020
+#define S6_I2C_INTRSTAT                0x02C
+#define S6_I2C_INTRMASK                0x030
+#define S6_I2C_RAWINTR         0x034
+#define S6_I2C_INTR_RXUNDER            0
+#define S6_I2C_INTR_RXOVER             1
+#define S6_I2C_INTR_RXFULL             2
+#define S6_I2C_INTR_TXOVER             3
+#define S6_I2C_INTR_TXEMPTY            4
+#define S6_I2C_INTR_RDREQ              5
+#define S6_I2C_INTR_TXABRT             6
+#define S6_I2C_INTR_RXDONE             7
+#define S6_I2C_INTR_ACTIVITY           8
+#define S6_I2C_INTR_STOPDET            9
+#define S6_I2C_INTR_STARTDET           10
+#define S6_I2C_INTR_GENCALL            11
+#define S6_I2C_RXTL            0x038
+#define S6_I2C_TXTL            0x03C
+#define S6_I2C_CLRINTR         0x040
+#define S6_I2C_CLRRXUNDER      0x044
+#define S6_I2C_CLRRXOVER       0x048
+#define S6_I2C_CLRTXOVER       0x04C
+#define S6_I2C_CLRRDREQ                0x050
+#define S6_I2C_CLRTXABRT       0x054
+#define S6_I2C_CLRRXDONE       0x058
+#define S6_I2C_CLRACTIVITY     0x05C
+#define S6_I2C_CLRSTOPDET      0x060
+#define S6_I2C_CLRSTARTDET     0x064
+#define S6_I2C_CLRGENCALL      0x068
+#define S6_I2C_ENABLE          0x06C
+#define S6_I2C_STATUS          0x070
+#define S6_I2C_STATUS_ACTIVITY         0
+#define S6_I2C_STATUS_TFNF             1
+#define S6_I2C_STATUS_TFE              2
+#define S6_I2C_STATUS_RFNE             3
+#define S6_I2C_STATUS_RFF              4
+#define S6_I2C_TXFLR           0x074
+#define S6_I2C_RXFLR           0x078
+#define S6_I2C_SRESET          0x07C
+#define S6_I2C_SRESET_IC_SRST          0
+#define S6_I2C_SRESET_IC_MASTER_SRST   1
+#define S6_I2C_SRESET_IC_SLAVE_SRST    2
+#define S6_I2C_TXABRTSOURCE    0x080
+
+#endif
index 8eda552..403d0e4 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/clk.h>
@@ -175,90 +174,6 @@ static void at91_ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd,
        leave_16bit(chipselect, mode);
 }
 
-static u8 ide_mm_inb(unsigned long port)
-{
-       return readb((void __iomem *) port);
-}
-
-static void ide_mm_outb(u8 value, unsigned long port)
-{
-       writeb(value, (void __iomem *) port);
-}
-
-static void at91_ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-       u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
-
-       if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
-               HIHI = 0xFF;
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
-               ide_mm_outb(tf->hob_feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
-               ide_mm_outb(tf->hob_nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
-               ide_mm_outb(tf->hob_lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
-               ide_mm_outb(tf->hob_lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
-               ide_mm_outb(tf->hob_lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
-               ide_mm_outb(tf->feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
-               ide_mm_outb(tf->nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
-               ide_mm_outb(tf->lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
-               ide_mm_outb(tf->lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
-               ide_mm_outb(tf->lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
-               ide_mm_outb((tf->device & HIHI) | drive->select, io_ports->device_addr);
-}
-
-static void at91_ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-
-       /* be sure we're looking at the low order bits */
-       ide_mm_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
-               tf->error  = ide_mm_inb(io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
-               tf->nsect  = ide_mm_inb(io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
-               tf->lbal   = ide_mm_inb(io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
-               tf->lbam   = ide_mm_inb(io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
-               tf->lbah   = ide_mm_inb(io_ports->lbah_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
-               tf->device = ide_mm_inb(io_ports->device_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
-               ide_mm_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
-                       tf->hob_error = ide_mm_inb(io_ports->feature_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-                       tf->hob_nsect = ide_mm_inb(io_ports->nsect_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-                       tf->hob_lbal  = ide_mm_inb(io_ports->lbal_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-                       tf->hob_lbam  = ide_mm_inb(io_ports->lbam_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-                       tf->hob_lbah  = ide_mm_inb(io_ports->lbah_addr);
-       }
-}
-
 static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
 {
        struct ide_timing *timing;
@@ -284,8 +199,8 @@ static const struct ide_tp_ops at91_ide_tp_ops = {
        .write_devctl   = ide_write_devctl,
 
        .dev_select     = ide_dev_select,
-       .tf_load        = at91_ide_tf_load,
-       .tf_read        = at91_ide_tf_read,
+       .tf_load        = ide_tf_load,
+       .tf_read        = ide_tf_read,
 
        .input_data     = at91_ide_input_data,
        .output_data    = at91_ide_output_data,
@@ -300,7 +215,7 @@ static const struct ide_port_info at91_ide_port_info __initdata = {
        .tp_ops         = &at91_ide_tp_ops,
        .host_flags     = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA | IDE_HFLAG_SINGLE |
                          IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_UNMASK_IRQS,
-       .pio_mask       = ATA_PIO5,
+       .pio_mask       = ATA_PIO6,
 };
 
 /*
index 58fb90e..87987a7 100644 (file)
@@ -122,7 +122,7 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
                return -ENODEV;
        }
        pci_set_master(dev);
-       if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING "%s: No suitable DMA available.\n",
                        d->name);
                return -ENODEV;
index afa2af9..0e2df67 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/atarihw.h>
 #include <asm/atariints.h>
 #include <asm/atari_stdma.h>
+#include <asm/ide.h>
 
 #define DRV_NAME "falconide"
 
@@ -67,8 +68,10 @@ static void falconide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
 {
        unsigned long data_addr = drive->hwif->io_ports.data_addr;
 
-       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
-               return insw(data_addr, buf, (len + 1) / 2);
+       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) {
+               __ide_mm_insw(data_addr, buf, (len + 1) / 2);
+               return;
+       }
 
        raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
@@ -78,8 +81,10 @@ static void falconide_output_data(ide_drive_t *drive, struct ide_cmd *cmd,
 {
        unsigned long data_addr = drive->hwif->io_ports.data_addr;
 
-       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
-               return outsw(data_addr, buf, (len + 1) / 2);
+       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) {
+               __ide_mm_outsw(data_addr, buf, (len + 1) / 2);
+               return;
+       }
 
        raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
index 12f4369..77f79d2 100644 (file)
@@ -318,8 +318,9 @@ static int do_drive_set_taskfiles(ide_drive_t *drive,
 
                /* convert GTF to taskfile */
                memset(&cmd, 0, sizeof(cmd));
-               memcpy(&cmd.tf_array[7], gtf, REGS_PER_GTF);
-               cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+               memcpy(&cmd.tf.feature, gtf, REGS_PER_GTF);
+               cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+               cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
 
                err = ide_no_data_taskfile(drive, &cmd);
                if (err) {
index 3e43b88..7201b17 100644 (file)
@@ -254,16 +254,13 @@ EXPORT_SYMBOL_GPL(ide_cd_get_xferlen);
 
 void ide_read_bcount_and_ireason(ide_drive_t *drive, u16 *bcount, u8 *ireason)
 {
-       struct ide_cmd cmd;
+       struct ide_taskfile tf;
 
-       memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_IN_LBAH | IDE_TFLAG_IN_LBAM |
-                      IDE_TFLAG_IN_NSECT;
+       drive->hwif->tp_ops->tf_read(drive, &tf, IDE_VALID_NSECT |
+                                    IDE_VALID_LBAM | IDE_VALID_LBAH);
 
-       drive->hwif->tp_ops->tf_read(drive, &cmd);
-
-       *bcount = (cmd.tf.lbah << 8) | cmd.tf.lbam;
-       *ireason = cmd.tf.nsect & 3;
+       *bcount = (tf.lbah << 8) | tf.lbam;
+       *ireason = tf.nsect & 3;
 }
 EXPORT_SYMBOL_GPL(ide_read_bcount_and_ireason);
 
@@ -439,12 +436,12 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
        return ide_started;
 }
 
-static void ide_init_packet_cmd(struct ide_cmd *cmd, u32 tf_flags,
+static void ide_init_packet_cmd(struct ide_cmd *cmd, u8 valid_tf,
                                u16 bcount, u8 dma)
 {
-       cmd->protocol  = dma ? ATAPI_PROT_DMA : ATAPI_PROT_PIO;
-       cmd->tf_flags |= IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM |
-                        IDE_TFLAG_OUT_FEATURE | tf_flags;
+       cmd->protocol = dma ? ATAPI_PROT_DMA : ATAPI_PROT_PIO;
+       cmd->valid.out.tf = IDE_VALID_LBAH | IDE_VALID_LBAM |
+                           IDE_VALID_FEATURE | valid_tf;
        cmd->tf.command = ATA_CMD_PACKET;
        cmd->tf.feature = dma;          /* Use PIO/DMA */
        cmd->tf.lbam    = bcount & 0xff;
@@ -453,14 +450,11 @@ static void ide_init_packet_cmd(struct ide_cmd *cmd, u32 tf_flags,
 
 static u8 ide_read_ireason(ide_drive_t *drive)
 {
-       struct ide_cmd cmd;
-
-       memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_IN_NSECT;
+       struct ide_taskfile tf;
 
-       drive->hwif->tp_ops->tf_read(drive, &cmd);
+       drive->hwif->tp_ops->tf_read(drive, &tf, IDE_VALID_NSECT);
 
-       return cmd.tf.nsect & 3;
+       return tf.nsect & 3;
 }
 
 static u8 ide_wait_ireason(ide_drive_t *drive, u8 ireason)
@@ -588,12 +582,12 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
        ide_expiry_t *expiry = NULL;
        struct request *rq = hwif->rq;
        unsigned int timeout;
-       u32 tf_flags;
        u16 bcount;
+       u8 valid_tf;
        u8 drq_int = !!(drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT);
 
        if (dev_is_idecd(drive)) {
-               tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
+               valid_tf = IDE_VALID_NSECT | IDE_VALID_LBAL;
                bcount = ide_cd_get_xferlen(rq);
                expiry = ide_cd_expiry;
                timeout = ATAPI_WAIT_PC;
@@ -607,7 +601,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
                pc->xferred = 0;
                pc->cur_pos = pc->buf;
 
-               tf_flags = IDE_TFLAG_OUT_DEVICE;
+               valid_tf = IDE_VALID_DEVICE;
                bcount = ((drive->media == ide_tape) ?
                                pc->req_xfer :
                                min(pc->req_xfer, 63 * 1024));
@@ -627,7 +621,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
                                                       : WAIT_TAPE_CMD;
        }
 
-       ide_init_packet_cmd(cmd, tf_flags, bcount, drive->dma);
+       ide_init_packet_cmd(cmd, valid_tf, bcount, drive->dma);
 
        (void)do_rw_taskfile(drive, cmd);
 
index 35729a4..3aec19d 100644 (file)
@@ -265,35 +265,62 @@ static void ide_cd_complete_failed_rq(ide_drive_t *drive, struct request *rq)
                cdrom_analyze_sense_data(drive, NULL, sense);
 }
 
+
 /*
+ * Allow the drive 5 seconds to recover; some devices will return NOT_READY
+ * while flushing data from cache.
+ *
+ * returns: 0 failed (write timeout expired)
+ *         1 success
+ */
+static int ide_cd_breathe(ide_drive_t *drive, struct request *rq)
+{
+
+       struct cdrom_info *info = drive->driver_data;
+
+       if (!rq->errors)
+               info->write_timeout = jiffies + ATAPI_WAIT_WRITE_BUSY;
+
+       rq->errors = 1;
+
+       if (time_after(jiffies, info->write_timeout))
+               return 0;
+       else {
+               struct request_queue *q = drive->queue;
+               unsigned long flags;
+
+               /*
+                * take a breather relying on the unplug timer to kick us again
+                */
+
+               spin_lock_irqsave(q->queue_lock, flags);
+               blk_plug_device(q);
+               spin_unlock_irqrestore(q->queue_lock, flags);
+
+               return 1;
+       }
+}
+
+/**
  * Returns:
  * 0: if the request should be continued.
  * 1: if the request will be going through error recovery.
  * 2: if the request should be ended.
  */
-static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
+static int cdrom_decode_status(ide_drive_t *drive, u8 stat)
 {
        ide_hwif_t *hwif = drive->hwif;
        struct request *rq = hwif->rq;
-       int stat, err, sense_key;
-
-       /* check for errors */
-       stat = hwif->tp_ops->read_status(hwif);
-
-       if (stat_ret)
-               *stat_ret = stat;
-
-       if (OK_STAT(stat, good_stat, BAD_R_STAT))
-               return 0;
+       int err, sense_key, do_end_request = 0;
+       u8 quiet = rq->cmd_flags & REQ_QUIET;
 
        /* get the IDE error register */
        err = ide_read_error(drive);
        sense_key = err >> 4;
 
-       ide_debug_log(IDE_DBG_RQ, "stat: 0x%x, good_stat: 0x%x, cmd[0]: 0x%x, "
-                                 "rq->cmd_type: 0x%x, err: 0x%x",
-                                 stat, good_stat, rq->cmd[0], rq->cmd_type,
-                                 err);
+       ide_debug_log(IDE_DBG_RQ, "cmd: 0x%x, rq->cmd_type: 0x%x, err: 0x%x, "
+                                 "stat 0x%x",
+                                 rq->cmd[0], rq->cmd_type, err, stat);
 
        if (blk_sense_request(rq)) {
                /*
@@ -303,151 +330,108 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
                 */
                rq->cmd_flags |= REQ_FAILED;
                return 2;
-       } else if (blk_pc_request(rq) || rq->cmd_type == REQ_TYPE_ATA_PC) {
-               /* All other functions, except for READ. */
+       }
 
-               /*
-                * if we have an error, pass back CHECK_CONDITION as the
-                * scsi status byte
-                */
-               if (blk_pc_request(rq) && !rq->errors)
-                       rq->errors = SAM_STAT_CHECK_CONDITION;
+       /* if we have an error, pass CHECK_CONDITION as the SCSI status byte */
+       if (blk_pc_request(rq) && !rq->errors)
+               rq->errors = SAM_STAT_CHECK_CONDITION;
 
-               /* check for tray open */
-               if (sense_key == NOT_READY) {
-                       cdrom_saw_media_change(drive);
-               } else if (sense_key == UNIT_ATTENTION) {
-                       /* check for media change */
+       if (blk_noretry_request(rq))
+               do_end_request = 1;
+
+       switch (sense_key) {
+       case NOT_READY:
+               if (blk_fs_request(rq) && rq_data_dir(rq) == WRITE) {
+                       if (ide_cd_breathe(drive, rq))
+                               return 1;
+               } else {
                        cdrom_saw_media_change(drive);
-                       return 0;
-               } else if (sense_key == ILLEGAL_REQUEST &&
-                          rq->cmd[0] == GPCMD_START_STOP_UNIT) {
-                       /*
-                        * Don't print error message for this condition--
-                        * SFF8090i indicates that 5/24/00 is the correct
-                        * response to a request to close the tray if the
-                        * drive doesn't have that capability.
-                        * cdrom_log_sense() knows this!
-                        */
-               } else if (!(rq->cmd_flags & REQ_QUIET)) {
-                       /* otherwise, print an error */
-                       ide_dump_status(drive, "packet command error", stat);
+
+                       if (blk_fs_request(rq) && !quiet)
+                               printk(KERN_ERR PFX "%s: tray open\n",
+                                       drive->name);
                }
+               do_end_request = 1;
+               break;
+       case UNIT_ATTENTION:
+               cdrom_saw_media_change(drive);
 
-               rq->cmd_flags |= REQ_FAILED;
+               if (blk_fs_request(rq) == 0)
+                       return 0;
 
                /*
-                * instead of playing games with moving completions around,
-                * remove failed request completely and end it when the
-                * request sense has completed
+                * Arrange to retry the request but be sure to give up if we've
+                * retried too many times.
                 */
-               goto end_request;
-
-       } else if (blk_fs_request(rq)) {
-               int do_end_request = 0;
-
-               /* handle errors from READ and WRITE requests */
-
-               if (blk_noretry_request(rq))
+               if (++rq->errors > ERROR_MAX)
                        do_end_request = 1;
-
-               if (sense_key == NOT_READY) {
-                       /* tray open */
-                       if (rq_data_dir(rq) == READ) {
-                               cdrom_saw_media_change(drive);
-
-                               /* fail the request */
-                               printk(KERN_ERR PFX "%s: tray open\n",
-                                               drive->name);
-                               do_end_request = 1;
-                       } else {
-                               struct cdrom_info *info = drive->driver_data;
-
-                               /*
-                                * Allow the drive 5 seconds to recover, some
-                                * devices will return this error while flushing
-                                * data from cache.
-                                */
-                               if (!rq->errors)
-                                       info->write_timeout = jiffies +
-                                                       ATAPI_WAIT_WRITE_BUSY;
-                               rq->errors = 1;
-                               if (time_after(jiffies, info->write_timeout))
-                                       do_end_request = 1;
-                               else {
-                                       struct request_queue *q = drive->queue;
-                                       unsigned long flags;
-
-                                       /*
-                                        * take a breather relying on the unplug
-                                        * timer to kick us again
-                                        */
-                                       spin_lock_irqsave(q->queue_lock, flags);
-                                       blk_plug_device(q);
-                                       spin_unlock_irqrestore(q->queue_lock, flags);
-
-                                       return 1;
-                               }
-                       }
-               } else if (sense_key == UNIT_ATTENTION) {
-                       /* media change */
-                       cdrom_saw_media_change(drive);
-
-                       /*
-                        * Arrange to retry the request but be sure to give up
-                        * if we've retried too many times.
-                        */
-                       if (++rq->errors > ERROR_MAX)
-                               do_end_request = 1;
-               } else if (sense_key == ILLEGAL_REQUEST ||
-                          sense_key == DATA_PROTECT) {
-                       /*
-                        * No point in retrying after an illegal request or data
-                        * protect error.
-                        */
+               break;
+       case ILLEGAL_REQUEST:
+               /*
+                * Don't print error message for this condition -- SFF8090i
+                * indicates that 5/24/00 is the correct response to a request
+                * to close the tray if the drive doesn't have that capability.
+                *
+                * cdrom_log_sense() knows this!
+                */
+               if (rq->cmd[0] == GPCMD_START_STOP_UNIT)
+                       break;
+               /* fall-through */
+       case DATA_PROTECT:
+               /*
+                * No point in retrying after an illegal request or data
+                * protect error.
+                */
+               if (!quiet)
                        ide_dump_status(drive, "command error", stat);
-                       do_end_request = 1;
-               } else if (sense_key == MEDIUM_ERROR) {
-                       /*
-                        * No point in re-trying a zillion times on a bad
-                        * sector. If we got here the error is not correctable.
-                        */
-                       ide_dump_status(drive, "media error (bad sector)",
+               do_end_request = 1;
+               break;
+       case MEDIUM_ERROR:
+               /*
+                * No point in re-trying a zillion times on a bad sector.
+                * If we got here the error is not correctable.
+                */
+               if (!quiet)
+                       ide_dump_status(drive, "media error "
+                                       "(bad sector)", stat);
+               do_end_request = 1;
+               break;
+       case BLANK_CHECK:
+               /* disk appears blank? */
+               if (!quiet)
+                       ide_dump_status(drive, "media error (blank)",
                                        stat);
-                       do_end_request = 1;
-               } else if (sense_key == BLANK_CHECK) {
-                       /* disk appears blank ?? */
-                       ide_dump_status(drive, "media error (blank)", stat);
-                       do_end_request = 1;
-               } else if ((err & ~ATA_ABORTED) != 0) {
+               do_end_request = 1;
+               break;
+       default:
+               if (blk_fs_request(rq) == 0)
+                       break;
+               if (err & ~ATA_ABORTED) {
                        /* go to the default handler for other errors */
                        ide_error(drive, "cdrom_decode_status", stat);
                        return 1;
-               } else if ((++rq->errors > ERROR_MAX)) {
+               } else if (++rq->errors > ERROR_MAX)
                        /* we've racked up too many retries, abort */
                        do_end_request = 1;
-               }
-
-               /*
-                * End a request through request sense analysis when we have
-                * sense data. We need this in order to perform end of media
-                * processing.
-                */
-               if (do_end_request)
-                       goto end_request;
+       }
 
-               /*
-                * If we got a CHECK_CONDITION status, queue
-                * a request sense command.
-                */
-               if (stat & ATA_ERR)
-                       cdrom_queue_request_sense(drive, NULL, NULL);
-               return 1;
-       } else {
-               blk_dump_rq_flags(rq, PFX "bad rq");
-               return 2;
+       if (blk_fs_request(rq) == 0) {
+               rq->cmd_flags |= REQ_FAILED;
+               do_end_request = 1;
        }
 
+       /*
+        * End a request through request sense analysis when we have sense data.
+        * We need this in order to perform end of media processing.
+        */
+       if (do_end_request)
+               goto end_request;
+
+       /* if we got a CHECK_CONDITION status, queue a request sense command */
+       if (stat & ATA_ERR)
+               cdrom_queue_request_sense(drive, NULL, NULL);
+       return 1;
+
 end_request:
        if (stat & ATA_ERR) {
                struct request_queue *q = drive->queue;
@@ -624,15 +608,14 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
        struct ide_cmd *cmd = &hwif->cmd;
        struct request *rq = hwif->rq;
        ide_expiry_t *expiry = NULL;
-       int dma_error = 0, dma, stat, thislen, uptodate = 0;
+       int dma_error = 0, dma, thislen, uptodate = 0;
        int write = (rq_data_dir(rq) == WRITE) ? 1 : 0, rc, nsectors;
        int sense = blk_sense_request(rq);
        unsigned int timeout;
        u16 len;
-       u8 ireason;
+       u8 ireason, stat;
 
-       ide_debug_log(IDE_DBG_PC, "cmd[0]: 0x%x, write: 0x%x",
-                                 rq->cmd[0], write);
+       ide_debug_log(IDE_DBG_PC, "cmd: 0x%x, write: 0x%x", rq->cmd[0], write);
 
        /* check for errors */
        dma = drive->dma;
@@ -648,11 +631,16 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
                }
        }
 
-       rc = cdrom_decode_status(drive, 0, &stat);
-       if (rc) {
-               if (rc == 2)
-                       goto out_end;
-               return ide_stopped;
+       /* check status */
+       stat = hwif->tp_ops->read_status(hwif);
+
+       if (!OK_STAT(stat, 0, BAD_R_STAT)) {
+               rc = cdrom_decode_status(drive, stat);
+               if (rc) {
+                       if (rc == 2)
+                               goto out_end;
+                       return ide_stopped;
+               }
        }
 
        /* using dma, transfer is complete now */
index c998cf8..a9fbe2c 100644 (file)
@@ -97,35 +97,38 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
        }
 
        memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
 
        if (drive->dev_flags & IDE_DFLAG_LBA) {
                if (lba48) {
                        pr_debug("%s: LBA=0x%012llx\n", drive->name,
                                        (unsigned long long)block);
 
-                       tf->hob_nsect = (nsectors >> 8) & 0xff;
-                       tf->hob_lbal  = (u8)(block >> 24);
-                       if (sizeof(block) != 4) {
-                               tf->hob_lbam = (u8)((u64)block >> 32);
-                               tf->hob_lbah = (u8)((u64)block >> 40);
-                       }
-
                        tf->nsect  = nsectors & 0xff;
                        tf->lbal   = (u8) block;
                        tf->lbam   = (u8)(block >>  8);
                        tf->lbah   = (u8)(block >> 16);
+                       tf->device = ATA_LBA;
 
-                       cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
+                       tf = &cmd.hob;
+                       tf->nsect = (nsectors >> 8) & 0xff;
+                       tf->lbal  = (u8)(block >> 24);
+                       if (sizeof(block) != 4) {
+                               tf->lbam = (u8)((u64)block >> 32);
+                               tf->lbah = (u8)((u64)block >> 40);
+                       }
+
+                       cmd.valid.out.hob = IDE_VALID_OUT_HOB;
+                       cmd.valid.in.hob  = IDE_VALID_IN_HOB;
+                       cmd.tf_flags |= IDE_TFLAG_LBA48;
                } else {
                        tf->nsect  = nsectors & 0xff;
                        tf->lbal   = block;
                        tf->lbam   = block >>= 8;
                        tf->lbah   = block >>= 8;
-                       tf->device = (block >> 8) & 0xf;
+                       tf->device = ((block >> 8) & 0xf) | ATA_LBA;
                }
-
-               tf->device |= ATA_LBA;
        } else {
                unsigned int sect, head, cyl, track;
 
@@ -220,15 +223,19 @@ static u64 idedisk_read_native_max_address(ide_drive_t *drive, int lba48)
                tf->command = ATA_CMD_READ_NATIVE_MAX;
        tf->device  = ATA_LBA;
 
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
-       if (lba48)
-               cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
+       if (lba48) {
+               cmd.valid.out.hob = IDE_VALID_OUT_HOB;
+               cmd.valid.in.hob  = IDE_VALID_IN_HOB;
+               cmd.tf_flags = IDE_TFLAG_LBA48;
+       }
 
        ide_no_data_taskfile(drive, &cmd);
 
        /* if OK, compute maximum address value */
        if (!(tf->status & ATA_ERR))
-               addr = ide_get_lba_addr(tf, lba48) + 1;
+               addr = ide_get_lba_addr(&cmd, lba48) + 1;
 
        return addr;
 }
@@ -250,9 +257,9 @@ static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48)
        tf->lbam     = (addr_req >>= 8) & 0xff;
        tf->lbah     = (addr_req >>= 8) & 0xff;
        if (lba48) {
-               tf->hob_lbal = (addr_req >>= 8) & 0xff;
-               tf->hob_lbam = (addr_req >>= 8) & 0xff;
-               tf->hob_lbah = (addr_req >>= 8) & 0xff;
+               cmd.hob.lbal = (addr_req >>= 8) & 0xff;
+               cmd.hob.lbam = (addr_req >>= 8) & 0xff;
+               cmd.hob.lbah = (addr_req >>= 8) & 0xff;
                tf->command  = ATA_CMD_SET_MAX_EXT;
        } else {
                tf->device   = (addr_req >>= 8) & 0x0f;
@@ -260,15 +267,19 @@ static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48)
        }
        tf->device |= ATA_LBA;
 
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
-       if (lba48)
-               cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
+       if (lba48) {
+               cmd.valid.out.hob = IDE_VALID_OUT_HOB;
+               cmd.valid.in.hob  = IDE_VALID_IN_HOB;
+               cmd.tf_flags = IDE_TFLAG_LBA48;
+       }
 
        ide_no_data_taskfile(drive, &cmd);
 
        /* if OK, compute maximum address value */
        if (!(tf->status & ATA_ERR))
-               addr_set = ide_get_lba_addr(tf, lba48) + 1;
+               addr_set = ide_get_lba_addr(&cmd, lba48) + 1;
 
        return addr_set;
 }
@@ -395,8 +406,8 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
                cmd->tf.command = ATA_CMD_FLUSH_EXT;
        else
                cmd->tf.command = ATA_CMD_FLUSH;
-       cmd->tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE |
-                       IDE_TFLAG_DYN;
+       cmd->valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd->tf_flags = IDE_TFLAG_DYN;
        cmd->protocol = ATA_PROT_NODATA;
 
        rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
@@ -457,7 +468,8 @@ static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect)
        cmd.tf.feature = feature;
        cmd.tf.nsect   = nsect;
        cmd.tf.command = ATA_CMD_SET_FEATURES;
-       cmd.tf_flags   = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
 
        return ide_no_data_taskfile(drive, &cmd);
 }
@@ -533,7 +545,8 @@ static int do_idedisk_flushcache(ide_drive_t *drive)
                cmd.tf.command = ATA_CMD_FLUSH_EXT;
        else
                cmd.tf.command = ATA_CMD_FLUSH;
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
 
        return ide_no_data_taskfile(drive, &cmd);
 }
@@ -715,7 +728,8 @@ static int ide_disk_set_doorlock(ide_drive_t *drive, struct gendisk *disk,
 
        memset(&cmd, 0, sizeof(cmd));
        cmd.tf.command = on ? ATA_CMD_MEDIA_LOCK : ATA_CMD_MEDIA_UNLOCK;
-       cmd.tf_flags   = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
 
        ret = ide_no_data_taskfile(drive, &cmd);
 
index eaea3be..19f263b 100644 (file)
@@ -13,7 +13,8 @@ static int smart_enable(ide_drive_t *drive)
        tf->lbam    = ATA_SMART_LBAM_PASS;
        tf->lbah    = ATA_SMART_LBAH_PASS;
        tf->command = ATA_CMD_SMART;
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
 
        return ide_no_data_taskfile(drive, &cmd);
 }
@@ -29,7 +30,8 @@ static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd)
        tf->lbam    = ATA_SMART_LBAM_PASS;
        tf->lbah    = ATA_SMART_LBAH_PASS;
        tf->command = ATA_CMD_SMART;
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
        cmd.protocol = ATA_PROT_PIO;
 
        return ide_raw_taskfile(drive, &cmd, buf, 1);
index 16fc46e..e4cdf78 100644 (file)
@@ -277,8 +277,6 @@ void ide_dma_start(ide_drive_t *drive)
                dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
                outb(dma_cmd | ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD);
        }
-
-       wmb();
 }
 EXPORT_SYMBOL_GPL(ide_dma_start);
 
@@ -286,7 +284,7 @@ EXPORT_SYMBOL_GPL(ide_dma_start);
 int ide_dma_end(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
-       u8 dma_stat = 0, dma_cmd = 0, mask;
+       u8 dma_stat = 0, dma_cmd = 0;
 
        /* stop DMA */
        if (hwif->host_flags & IDE_HFLAG_MMIO) {
@@ -304,11 +302,10 @@ int ide_dma_end(ide_drive_t *drive)
        /* clear INTR & ERROR bits */
        ide_dma_sff_write_status(hwif, dma_stat | ATA_DMA_ERR | ATA_DMA_INTR);
 
-       wmb();
+#define CHECK_DMA_MASK (ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR)
 
        /* verify good DMA status */
-       mask = ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR;
-       if ((dma_stat & mask) != ATA_DMA_INTR)
+       if ((dma_stat & CHECK_DMA_MASK) != ATA_DMA_INTR)
                return 0x10 | dma_stat;
        return 0;
 }
index dac9a6d..c06ebdc 100644 (file)
        (r);                            \
 })
 
-static void mm_outw(u16 d, unsigned long a)
-{
-       __asm__("mov.b %w0,r2h\n\t"
-               "mov.b %x0,r2l\n\t"
-               "mov.w r2,@%1"
-               :
-               :"r"(d),"r"(a)
-               :"er2");
-}
-
-static u16 mm_inw(unsigned long a)
-{
-       register u16 r __asm__("er0");
-       __asm__("mov.w @%1,r2\n\t"
-               "mov.b r2l,%x0\n\t"
-               "mov.b r2h,%w0"
-               :"=r"(r)
-               :"r"(a)
-               :"er2");
-       return r;
-}
-
-static void h8300_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-       u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
-
-       if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
-               HIHI = 0xFF;
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
-               outb(tf->hob_feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
-               outb(tf->hob_nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
-               outb(tf->hob_lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
-               outb(tf->hob_lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
-               outb(tf->hob_lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
-               outb(tf->feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
-               outb(tf->nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
-               outb(tf->lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
-               outb(tf->lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
-               outb(tf->lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
-               outb((tf->device & HIHI) | drive->select,
-                    io_ports->device_addr);
-}
-
-static void h8300_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-
-       /* be sure we're looking at the low order bits */
-       outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
-               tf->error  = inb(io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
-               tf->nsect  = inb(io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
-               tf->lbal   = inb(io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
-               tf->lbam   = inb(io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
-               tf->lbah   = inb(io_ports->lbah_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
-               tf->device = inb(io_ports->device_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
-               outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
-                       tf->hob_error = inb(io_ports->feature_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-                       tf->hob_nsect = inb(io_ports->nsect_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-                       tf->hob_lbal  = inb(io_ports->lbal_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-                       tf->hob_lbam  = inb(io_ports->lbam_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-                       tf->hob_lbah  = inb(io_ports->lbah_addr);
-       }
-}
-
 static void mm_outsw(unsigned long addr, void *buf, u32 len)
 {
        unsigned short *bp = (unsigned short *)buf;
@@ -152,8 +55,8 @@ static const struct ide_tp_ops h8300_tp_ops = {
        .write_devctl           = ide_write_devctl,
 
        .dev_select             = ide_dev_select,
-       .tf_load                = h8300_tf_load,
-       .tf_read                = h8300_tf_read,
+       .tf_load                = ide_tf_load,
+       .tf_read                = ide_tf_read,
 
        .input_data             = h8300_input_data,
        .output_data            = h8300_output_data,
index 9cac281..46721c4 100644 (file)
@@ -85,98 +85,57 @@ void ide_dev_select(ide_drive_t *drive)
 }
 EXPORT_SYMBOL_GPL(ide_dev_select);
 
-void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
+void ide_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid)
 {
        ide_hwif_t *hwif = drive->hwif;
        struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
        void (*tf_outb)(u8 addr, unsigned long port);
        u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
-       u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
 
        if (mmio)
                tf_outb = ide_mm_outb;
        else
                tf_outb = ide_outb;
 
-       if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
-               HIHI = 0xFF;
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
-               tf_outb(tf->hob_feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
-               tf_outb(tf->hob_nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
-               tf_outb(tf->hob_lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
-               tf_outb(tf->hob_lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
-               tf_outb(tf->hob_lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
+       if (valid & IDE_VALID_FEATURE)
                tf_outb(tf->feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
+       if (valid & IDE_VALID_NSECT)
                tf_outb(tf->nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
+       if (valid & IDE_VALID_LBAL)
                tf_outb(tf->lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
+       if (valid & IDE_VALID_LBAM)
                tf_outb(tf->lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
+       if (valid & IDE_VALID_LBAH)
                tf_outb(tf->lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
-               tf_outb((tf->device & HIHI) | drive->select,
-                        io_ports->device_addr);
+       if (valid & IDE_VALID_DEVICE)
+               tf_outb(tf->device, io_ports->device_addr);
 }
 EXPORT_SYMBOL_GPL(ide_tf_load);
 
-void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
+void ide_tf_read(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid)
 {
        ide_hwif_t *hwif = drive->hwif;
        struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-       void (*tf_outb)(u8 addr, unsigned long port);
        u8 (*tf_inb)(unsigned long port);
        u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
 
-       if (mmio) {
-               tf_outb = ide_mm_outb;
+       if (mmio)
                tf_inb  = ide_mm_inb;
-       } else {
-               tf_outb = ide_outb;
+       else
                tf_inb  = ide_inb;
-       }
-
-       /* be sure we're looking at the low order bits */
-       tf_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
 
-       if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
+       if (valid & IDE_VALID_ERROR)
                tf->error  = tf_inb(io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
+       if (valid & IDE_VALID_NSECT)
                tf->nsect  = tf_inb(io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
+       if (valid & IDE_VALID_LBAL)
                tf->lbal   = tf_inb(io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
+       if (valid & IDE_VALID_LBAM)
                tf->lbam   = tf_inb(io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
+       if (valid & IDE_VALID_LBAH)
                tf->lbah   = tf_inb(io_ports->lbah_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
+       if (valid & IDE_VALID_DEVICE)
                tf->device = tf_inb(io_ports->device_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
-               tf_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
-                       tf->hob_error = tf_inb(io_ports->feature_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-                       tf->hob_nsect = tf_inb(io_ports->nsect_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-                       tf->hob_lbal  = tf_inb(io_ports->lbal_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-                       tf->hob_lbam  = tf_inb(io_ports->lbam_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-                       tf->hob_lbah  = tf_inb(io_ports->lbah_addr);
-       }
 }
 EXPORT_SYMBOL_GPL(ide_tf_read);
 
index 1deb6d2..2ae02b8 100644 (file)
@@ -86,18 +86,18 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
 
                tp_ops->input_data(drive, cmd, data, 2);
 
-               tf->data = data[0];
-               tf->hob_data = data[1];
+               cmd->tf.data  = data[0];
+               cmd->hob.data = data[1];
        }
 
-       tp_ops->tf_read(drive, cmd);
+       ide_tf_readback(drive, cmd);
 
        if ((cmd->tf_flags & IDE_TFLAG_CUSTOM_HANDLER) &&
            tf_cmd == ATA_CMD_IDLEIMMEDIATE) {
                if (tf->lbal != 0xc4) {
                        printk(KERN_ERR "%s: head unload failed!\n",
                               drive->name);
-                       ide_tf_dump(drive->name, tf);
+                       ide_tf_dump(drive->name, cmd);
                } else
                        drive->dev_flags |= IDE_DFLAG_PARKED;
        }
@@ -205,8 +205,9 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive)
                return ide_stopped;
        }
 
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE |
-                      IDE_TFLAG_CUSTOM_HANDLER;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
+       cmd.tf_flags = IDE_TFLAG_CUSTOM_HANDLER;
 
        do_rw_taskfile(drive, &cmd);
 
index 7701427..c1c25eb 100644 (file)
@@ -141,11 +141,12 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg)
                tf->lbal  = args[1];
                tf->lbam  = 0x4f;
                tf->lbah  = 0xc2;
-               cmd.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_IN_NSECT;
+               cmd.valid.out.tf = IDE_VALID_OUT_TF;
+               cmd.valid.in.tf  = IDE_VALID_NSECT;
        } else {
                tf->nsect = args[1];
-               cmd.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT |
-                              IDE_TFLAG_IN_NSECT;
+               cmd.valid.out.tf = IDE_VALID_FEATURE | IDE_VALID_NSECT;
+               cmd.valid.in.tf  = IDE_VALID_NSECT;
        }
        tf->command = args[0];
        cmd.protocol = args[3] ? ATA_PROT_PIO : ATA_PROT_NODATA;
@@ -205,14 +206,15 @@ static int ide_task_ioctl(ide_drive_t *drive, unsigned long arg)
                return -EFAULT;
 
        memset(&cmd, 0, sizeof(cmd));
-       memcpy(&cmd.tf_array[7], &args[1], 6);
+       memcpy(&cmd.tf.feature, &args[1], 6);
        cmd.tf.command = args[0];
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
 
        err = ide_no_data_taskfile(drive, &cmd);
 
        args[0] = cmd.tf.command;
-       memcpy(&args[1], &cmd.tf_array[7], 6);
+       memcpy(&args[1], &cmd.tf.feature, 6);
 
        if (copy_to_user(p, args, 7))
                err = -EFAULT;
index 27bb70d..c19a221 100644 (file)
@@ -37,14 +37,11 @@ void SELECT_MASK(ide_drive_t *drive, int mask)
 
 u8 ide_read_error(ide_drive_t *drive)
 {
-       struct ide_cmd cmd;
+       struct ide_taskfile tf;
 
-       memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_IN_ERROR;
+       drive->hwif->tp_ops->tf_read(drive, &tf, IDE_VALID_ERROR);
 
-       drive->hwif->tp_ops->tf_read(drive, &cmd);
-
-       return cmd.tf.error;
+       return tf.error;
 }
 EXPORT_SYMBOL_GPL(ide_read_error);
 
@@ -312,10 +309,10 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
 {
        ide_hwif_t *hwif = drive->hwif;
        const struct ide_tp_ops *tp_ops = hwif->tp_ops;
+       struct ide_taskfile tf;
        u16 *id = drive->id, i;
        int error = 0;
        u8 stat;
-       struct ide_cmd cmd;
 
 #ifdef CONFIG_BLK_DEV_IDEDMA
        if (hwif->dma_ops)      /* check if host supports DMA */
@@ -347,12 +344,11 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
        udelay(1);
        tp_ops->write_devctl(hwif, ATA_NIEN | ATA_DEVCTL_OBS);
 
-       memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT;
-       cmd.tf.feature = SETFEATURES_XFER;
-       cmd.tf.nsect   = speed;
+       memset(&tf, 0, sizeof(tf));
+       tf.feature = SETFEATURES_XFER;
+       tf.nsect   = speed;
 
-       tp_ops->tf_load(drive, &cmd);
+       tp_ops->tf_load(drive, &tf, IDE_VALID_FEATURE | IDE_VALID_NSECT);
 
        tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES);
 
index 217b7fd..56ff8c4 100644 (file)
@@ -49,16 +49,17 @@ static void ide_dump_opcode(ide_drive_t *drive)
                printk(KERN_CONT "0x%02x\n", cmd->tf.command);
 }
 
-u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48)
+u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48)
 {
+       struct ide_taskfile *tf = &cmd->tf;
        u32 high, low;
 
-       if (lba48)
-               high = (tf->hob_lbah << 16) | (tf->hob_lbam << 8) |
-                       tf->hob_lbal;
-       else
-               high = tf->device & 0xf;
        low  = (tf->lbah << 16) | (tf->lbam << 8) | tf->lbal;
+       if (lba48) {
+               tf = &cmd->hob;
+               high = (tf->lbah << 16) | (tf->lbam << 8) | tf->lbal;
+       } else
+               high = tf->device & 0xf;
 
        return ((u64)high << 24) | low;
 }
@@ -71,17 +72,18 @@ static void ide_dump_sector(ide_drive_t *drive)
        u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48);
 
        memset(&cmd, 0, sizeof(cmd));
-       if (lba48)
-               cmd.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_HOB_LBA |
-                               IDE_TFLAG_LBA48;
-       else
-               cmd.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE;
+       if (lba48) {
+               cmd.valid.in.tf  = IDE_VALID_LBA;
+               cmd.valid.in.hob = IDE_VALID_LBA;
+               cmd.tf_flags = IDE_TFLAG_LBA48;
+       } else
+               cmd.valid.in.tf  = IDE_VALID_LBA | IDE_VALID_DEVICE;
 
-       drive->hwif->tp_ops->tf_read(drive, &cmd);
+       ide_tf_readback(drive, &cmd);
 
        if (lba48 || (tf->device & ATA_LBA))
                printk(KERN_CONT ", LBAsect=%llu",
-                       (unsigned long long)ide_get_lba_addr(tf, lba48));
+                       (unsigned long long)ide_get_lba_addr(&cmd, lba48));
        else
                printk(KERN_CONT ", CHS=%d/%d/%d", (tf->lbah << 8) + tf->lbam,
                        tf->device & 0xf, tf->lbal);
index 9490b44..310d03f 100644 (file)
@@ -74,7 +74,8 @@ ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq)
                tf->lbal = 0x4c;
                tf->lbam = 0x4e;
                tf->lbah = 0x55;
-               cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+               cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+               cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
        } else          /* cmd == REQ_UNPARK_HEADS */
                tf->command = ATA_CMD_CHK_POWER;
 
index bb7858e..0d8a151 100644 (file)
@@ -163,7 +163,8 @@ ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq)
        return ide_stopped;
 
 out_do_tf:
-       cmd->tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd->valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd->valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
        cmd->protocol = ATA_PROT_NODATA;
 
        return do_rw_taskfile(drive, cmd);
index d8c1c3e..7f264ed 100644 (file)
@@ -283,13 +283,11 @@ int ide_dev_read_id(ide_drive_t *drive, u8 cmd, u16 *id)
         * identify command to be sure of reply
         */
        if (cmd == ATA_CMD_ID_ATAPI) {
-               struct ide_cmd cmd;
+               struct ide_taskfile tf;
 
-               memset(&cmd, 0, sizeof(cmd));
+               memset(&tf, 0, sizeof(tf));
                /* disable DMA & overlap */
-               cmd.tf_flags = IDE_TFLAG_OUT_FEATURE;
-
-               tp_ops->tf_load(drive, &cmd);
+               tp_ops->tf_load(drive, &tf, IDE_VALID_FEATURE);
        }
 
        /* ask drive for ID */
@@ -337,14 +335,11 @@ int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus)
 
 static u8 ide_read_device(ide_drive_t *drive)
 {
-       struct ide_cmd cmd;
-
-       memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_IN_DEVICE;
+       struct ide_taskfile tf;
 
-       drive->hwif->tp_ops->tf_read(drive, &cmd);
+       drive->hwif->tp_ops->tf_read(drive, &tf, IDE_VALID_DEVICE);
 
-       return cmd.tf.device;
+       return tf.device;
 }
 
 /**
@@ -1314,6 +1309,7 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws)
                host->get_lock     = d->get_lock;
                host->release_lock = d->release_lock;
                host->host_flags = d->host_flags;
+               host->irq_flags = d->irq_flags;
        }
 
        return host;
index 10a88bf..3242698 100644 (file)
@@ -204,8 +204,8 @@ static int set_xfer_rate (ide_drive_t *drive, int arg)
        cmd.tf.command = ATA_CMD_SET_FEATURES;
        cmd.tf.feature = SETFEATURES_XFER;
        cmd.tf.nsect   = (u8)arg;
-       cmd.tf_flags   = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT |
-                        IDE_TFLAG_IN_NSECT;
+       cmd.valid.out.tf = IDE_VALID_FEATURE | IDE_VALID_NSECT;
+       cmd.valid.in.tf  = IDE_VALID_NSECT;
 
        err = ide_no_data_taskfile(drive, &cmd);
 
index 243421c..4aa6223 100644 (file)
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
-void ide_tf_dump(const char *s, struct ide_taskfile *tf)
+void ide_tf_readback(ide_drive_t *drive, struct ide_cmd *cmd)
+{
+       ide_hwif_t *hwif = drive->hwif;
+       const struct ide_tp_ops *tp_ops = hwif->tp_ops;
+
+       /* Be sure we're looking at the low order bytes */
+       tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS);
+
+       tp_ops->tf_read(drive, &cmd->tf, cmd->valid.in.tf);
+
+       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
+               tp_ops->write_devctl(hwif, ATA_HOB | ATA_DEVCTL_OBS);
+
+               tp_ops->tf_read(drive, &cmd->hob, cmd->valid.in.hob);
+       }
+}
+
+void ide_tf_dump(const char *s, struct ide_cmd *cmd)
 {
 #ifdef DEBUG
        printk("%s: tf: feat 0x%02x nsect 0x%02x lbal 0x%02x "
                "lbam 0x%02x lbah 0x%02x dev 0x%02x cmd 0x%02x\n",
-               s, tf->feature, tf->nsect, tf->lbal,
-               tf->lbam, tf->lbah, tf->device, tf->command);
-       printk("%s: hob: nsect 0x%02x lbal 0x%02x "
-               "lbam 0x%02x lbah 0x%02x\n",
-               s, tf->hob_nsect, tf->hob_lbal,
-               tf->hob_lbam, tf->hob_lbah);
+              s, cmd->tf.feature, cmd->tf.nsect,
+              cmd->tf.lbal, cmd->tf.lbam, cmd->tf.lbah,
+              cmd->tf.device, cmd->tf.command);
+       printk("%s: hob: nsect 0x%02x lbal 0x%02x lbam 0x%02x lbah 0x%02x\n",
+              s, cmd->hob.nsect, cmd->hob.lbal, cmd->hob.lbam, cmd->hob.lbah);
 #endif
 }
 
@@ -47,7 +63,8 @@ int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf)
                cmd.tf.command = ATA_CMD_ID_ATA;
        else
                cmd.tf.command = ATA_CMD_ID_ATAPI;
-       cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+       cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_IN_TF  | IDE_VALID_DEVICE;
        cmd.protocol = ATA_PROT_PIO;
 
        return ide_raw_taskfile(drive, &cmd, buf, 1);
@@ -79,16 +96,27 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)
        memcpy(cmd, orig_cmd, sizeof(*cmd));
 
        if ((cmd->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) {
-               ide_tf_dump(drive->name, tf);
+               ide_tf_dump(drive->name, cmd);
                tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS);
                SELECT_MASK(drive, 0);
 
                if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
-                       u8 data[2] = { tf->data, tf->hob_data };
+                       u8 data[2] = { cmd->tf.data, cmd->hob.data };
 
                        tp_ops->output_data(drive, cmd, data, 2);
                }
-               tp_ops->tf_load(drive, cmd);
+
+               if (cmd->valid.out.tf & IDE_VALID_DEVICE) {
+                       u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ?
+                                 0xE0 : 0xEF;
+
+                       if (!(cmd->ftf_flags & IDE_FTFLAG_FLAGGED))
+                               cmd->tf.device &= HIHI;
+                       cmd->tf.device |= drive->select;
+               }
+
+               tp_ops->tf_load(drive, &cmd->hob, cmd->valid.out.hob);
+               tp_ops->tf_load(drive, &cmd->tf,  cmd->valid.out.tf);
        }
 
        switch (cmd->protocol) {
@@ -489,16 +517,17 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)
 
        memset(&cmd, 0, sizeof(cmd));
 
-       memcpy(&cmd.tf_array[0], req_task->hob_ports,
-              HDIO_DRIVE_HOB_HDR_SIZE - 2);
-       memcpy(&cmd.tf_array[6], req_task->io_ports,
-              HDIO_DRIVE_TASK_HDR_SIZE);
+       memcpy(&cmd.hob, req_task->hob_ports, HDIO_DRIVE_HOB_HDR_SIZE - 2);
+       memcpy(&cmd.tf,  req_task->io_ports,  HDIO_DRIVE_TASK_HDR_SIZE);
 
-       cmd.tf_flags   = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE |
-                        IDE_TFLAG_IN_TF;
+       cmd.valid.out.tf = IDE_VALID_DEVICE;
+       cmd.valid.in.tf  = IDE_VALID_DEVICE | IDE_VALID_IN_TF;
+       cmd.tf_flags = IDE_TFLAG_IO_16BIT;
 
-       if (drive->dev_flags & IDE_DFLAG_LBA48)
-               cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB);
+       if (drive->dev_flags & IDE_DFLAG_LBA48) {
+               cmd.tf_flags |= IDE_TFLAG_LBA48;
+               cmd.valid.in.hob = IDE_VALID_IN_HOB;
+       }
 
        if (req_task->out_flags.all) {
                cmd.ftf_flags |= IDE_FTFLAG_FLAGGED;
@@ -507,28 +536,28 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)
                        cmd.ftf_flags |= IDE_FTFLAG_OUT_DATA;
 
                if (req_task->out_flags.b.nsector_hob)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_HOB_NSECT;
+                       cmd.valid.out.hob |= IDE_VALID_NSECT;
                if (req_task->out_flags.b.sector_hob)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAL;
+                       cmd.valid.out.hob |= IDE_VALID_LBAL;
                if (req_task->out_flags.b.lcyl_hob)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAM;
+                       cmd.valid.out.hob |= IDE_VALID_LBAM;
                if (req_task->out_flags.b.hcyl_hob)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAH;
+                       cmd.valid.out.hob |= IDE_VALID_LBAH;
 
                if (req_task->out_flags.b.error_feature)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_FEATURE;
+                       cmd.valid.out.tf  |= IDE_VALID_FEATURE;
                if (req_task->out_flags.b.nsector)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_NSECT;
+                       cmd.valid.out.tf  |= IDE_VALID_NSECT;
                if (req_task->out_flags.b.sector)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_LBAL;
+                       cmd.valid.out.tf  |= IDE_VALID_LBAL;
                if (req_task->out_flags.b.lcyl)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_LBAM;
+                       cmd.valid.out.tf  |= IDE_VALID_LBAM;
                if (req_task->out_flags.b.hcyl)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_LBAH;
+                       cmd.valid.out.tf  |= IDE_VALID_LBAH;
        } else {
-               cmd.tf_flags |= IDE_TFLAG_OUT_TF;
+               cmd.valid.out.tf |= IDE_VALID_OUT_TF;
                if (cmd.tf_flags & IDE_TFLAG_LBA48)
-                       cmd.tf_flags |= IDE_TFLAG_OUT_HOB;
+                       cmd.valid.out.hob |= IDE_VALID_OUT_HOB;
        }
 
        if (req_task->in_flags.b.data)
@@ -594,7 +623,7 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)
        if (req_task->req_cmd == IDE_DRIVE_TASK_NO_DATA)
                nsect = 0;
        else if (!nsect) {
-               nsect = (cmd.tf.hob_nsect << 8) | cmd.tf.nsect;
+               nsect = (cmd.hob.nsect << 8) | cmd.tf.nsect;
 
                if (!nsect) {
                        printk(KERN_ERR "%s: in/out command without data\n",
@@ -606,10 +635,8 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg)
 
        err = ide_raw_taskfile(drive, &cmd, data_buf, nsect);
 
-       memcpy(req_task->hob_ports, &cmd.tf_array[0],
-              HDIO_DRIVE_HOB_HDR_SIZE - 2);
-       memcpy(req_task->io_ports, &cmd.tf_array[6],
-              HDIO_DRIVE_TASK_HDR_SIZE);
+       memcpy(req_task->hob_ports, &cmd.hob, HDIO_DRIVE_HOB_HDR_SIZE - 2);
+       memcpy(req_task->io_ports,  &cmd.tf,  HDIO_DRIVE_TASK_HDR_SIZE);
 
        if ((cmd.ftf_flags & IDE_FTFLAG_SET_IN_FLAGS) &&
            req_task->in_flags.all == 0) {
index 71a39fb..95327a2 100644 (file)
@@ -61,41 +61,23 @@ static u8 superio_dma_sff_read_status(ide_hwif_t *hwif)
        return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS);
 }
 
-static void superio_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
+static void superio_tf_read(ide_drive_t *drive, struct ide_taskfile *tf,
+                           u8 valid)
 {
        struct ide_io_ports *io_ports = &drive->hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
 
-       /* be sure we're looking at the low order bits */
-       outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
+       if (valid & IDE_VALID_ERROR)
                tf->error  = inb(io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
+       if (valid & IDE_VALID_NSECT)
                tf->nsect  = inb(io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
+       if (valid & IDE_VALID_LBAL)
                tf->lbal   = inb(io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
+       if (valid & IDE_VALID_LBAM)
                tf->lbam   = inb(io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
+       if (valid & IDE_VALID_LBAH)
                tf->lbah   = inb(io_ports->lbah_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
+       if (valid & IDE_VALID_DEVICE)
                tf->device = superio_ide_inb(io_ports->device_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
-               outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
-                       tf->hob_error = inb(io_ports->feature_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-                       tf->hob_nsect = inb(io_ports->nsect_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-                       tf->hob_lbal  = inb(io_ports->lbal_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-                       tf->hob_lbam  = inb(io_ports->lbam_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-                       tf->hob_lbah  = inb(io_ports->lbah_addr);
-       }
 }
 
 static void ns87415_dev_select(ide_drive_t *drive);
index d007e7f..c793466 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/blkdev.h>
 #include <linux/ide.h>
 
+#include <asm/ide.h>
+
     /*
      *  Bases of the IDE interfaces
      */
@@ -77,8 +79,10 @@ static void q40ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
 {
        unsigned long data_addr = drive->hwif->io_ports.data_addr;
 
-       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
-               return insw(data_addr, buf, (len + 1) / 2);
+       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) {
+               __ide_mm_insw(data_addr, buf, (len + 1) / 2);
+               return;
+       }
 
        raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
@@ -88,8 +92,10 @@ static void q40ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd,
 {
        unsigned long data_addr = drive->hwif->io_ports.data_addr;
 
-       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
-               return outsw(data_addr, buf, (len + 1) / 2);
+       if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) {
+               __ide_mm_outsw(data_addr, buf, (len + 1) / 2);
+               return;
+       }
 
        raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
 }
index 6d8dbd9..5be41f2 100644 (file)
@@ -337,7 +337,6 @@ static void scc_dma_start(ide_drive_t *drive)
 
        /* start DMA */
        scc_ide_outb(dma_cmd | 1, hwif->dma_base);
-       wmb();
 }
 
 static int __scc_dma_end(ide_drive_t *drive)
@@ -354,7 +353,6 @@ static int __scc_dma_end(ide_drive_t *drive)
        /* clear the INTR & ERROR bits */
        scc_ide_outb(dma_stat | 6, hwif->dma_base + 4);
        /* verify good DMA status */
-       wmb();
        return (dma_stat & 7) != 4 ? (0x10 | dma_stat) : 0;
 }
 
@@ -647,77 +645,40 @@ static int __devinit init_setup_scc(struct pci_dev *dev,
        return rc;
 }
 
-static void scc_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
+static void scc_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid)
 {
        struct ide_io_ports *io_ports = &drive->hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-       u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
-
-       if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
-               HIHI = 0xFF;
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
-               scc_ide_outb(tf->hob_feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
-               scc_ide_outb(tf->hob_nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
-               scc_ide_outb(tf->hob_lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
-               scc_ide_outb(tf->hob_lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
-               scc_ide_outb(tf->hob_lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
+
+       if (valid & IDE_VALID_FEATURE)
                scc_ide_outb(tf->feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
+       if (valid & IDE_VALID_NSECT)
                scc_ide_outb(tf->nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
+       if (valid & IDE_VALID_LBAL)
                scc_ide_outb(tf->lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
+       if (valid & IDE_VALID_LBAM)
                scc_ide_outb(tf->lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
+       if (valid & IDE_VALID_LBAH)
                scc_ide_outb(tf->lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
-               scc_ide_outb((tf->device & HIHI) | drive->select,
-                            io_ports->device_addr);
+       if (valid & IDE_VALID_DEVICE)
+               scc_ide_outb(tf->device, io_ports->device_addr);
 }
 
-static void scc_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
+static void scc_tf_read(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid)
 {
        struct ide_io_ports *io_ports = &drive->hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-
-       /* be sure we're looking at the low order bits */
-       scc_ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
 
-       if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
+       if (valid & IDE_VALID_ERROR)
                tf->error  = scc_ide_inb(io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
+       if (valid & IDE_VALID_NSECT)
                tf->nsect  = scc_ide_inb(io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
+       if (valid & IDE_VALID_LBAL)
                tf->lbal   = scc_ide_inb(io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
+       if (valid & IDE_VALID_LBAM)
                tf->lbam   = scc_ide_inb(io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
+       if (valid & IDE_VALID_LBAH)
                tf->lbah   = scc_ide_inb(io_ports->lbah_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
+       if (valid & IDE_VALID_DEVICE)
                tf->device = scc_ide_inb(io_ports->device_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
-               scc_ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
-                       tf->hob_error = scc_ide_inb(io_ports->feature_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-                       tf->hob_nsect = scc_ide_inb(io_ports->nsect_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-                       tf->hob_lbal  = scc_ide_inb(io_ports->lbal_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-                       tf->hob_lbam  = scc_ide_inb(io_ports->lbam_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-                       tf->hob_lbah  = scc_ide_inb(io_ports->lbah_addr);
-       }
 }
 
 static void scc_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
index a19dbcc..7a3a12d 100644 (file)
@@ -208,7 +208,7 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
         * a DMA mask field to the struct ide_port_info if we need it
         * (or let lower level driver set the DMA mask)
         */
-       ret = pci_set_dma_mask(dev, DMA_32BIT_MASK);
+       ret = pci_set_dma_mask(dev, DMA_BIT_MASK(32));
        if (ret < 0) {
                printk(KERN_ERR "%s %s: can't set DMA mask\n",
                        d->name, pci_name(dev));
index 4cb79c4..e33d764 100644 (file)
@@ -72,91 +72,6 @@ static void tx4938ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
 #ifdef __BIG_ENDIAN
 
 /* custom iops (independent from SWAP_IO_SPACE) */
-static u8 tx4938ide_inb(unsigned long port)
-{
-       return __raw_readb((void __iomem *)port);
-}
-
-static void tx4938ide_outb(u8 value, unsigned long port)
-{
-       __raw_writeb(value, (void __iomem *)port);
-}
-
-static void tx4938ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-       u8 HIHI = cmd->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF;
-
-       if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
-               HIHI = 0xFF;
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
-               tx4938ide_outb(tf->hob_feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
-               tx4938ide_outb(tf->hob_nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
-               tx4938ide_outb(tf->hob_lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
-               tx4938ide_outb(tf->hob_lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
-               tx4938ide_outb(tf->hob_lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
-               tx4938ide_outb(tf->feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
-               tx4938ide_outb(tf->nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
-               tx4938ide_outb(tf->lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
-               tx4938ide_outb(tf->lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
-               tx4938ide_outb(tf->lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
-               tx4938ide_outb((tf->device & HIHI) | drive->select,
-                              io_ports->device_addr);
-}
-
-static void tx4938ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-
-       /* be sure we're looking at the low order bits */
-       tx4938ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
-               tf->error  = tx4938ide_inb(io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
-               tf->nsect  = tx4938ide_inb(io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
-               tf->lbal   = tx4938ide_inb(io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
-               tf->lbam   = tx4938ide_inb(io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
-               tf->lbah   = tx4938ide_inb(io_ports->lbah_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
-               tf->device = tx4938ide_inb(io_ports->device_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
-               tx4938ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
-                       tf->hob_error = tx4938ide_inb(io_ports->feature_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-                       tf->hob_nsect = tx4938ide_inb(io_ports->nsect_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-                       tf->hob_lbal  = tx4938ide_inb(io_ports->lbal_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-                       tf->hob_lbam  = tx4938ide_inb(io_ports->lbam_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-                       tf->hob_lbah  = tx4938ide_inb(io_ports->lbah_addr);
-       }
-}
-
 static void tx4938ide_input_data_swap(ide_drive_t *drive, struct ide_cmd *cmd,
                                void *buf, unsigned int len)
 {
@@ -190,8 +105,8 @@ static const struct ide_tp_ops tx4938ide_tp_ops = {
        .write_devctl           = ide_write_devctl,
 
        .dev_select             = ide_dev_select,
-       .tf_load                = tx4938ide_tf_load,
-       .tf_read                = tx4938ide_tf_read,
+       .tf_load                = ide_tf_load,
+       .tf_read                = ide_tf_read,
 
        .input_data             = tx4938ide_input_data_swap,
        .output_data            = tx4938ide_output_data_swap,
index 0040a9a..564422d 100644 (file)
@@ -327,15 +327,15 @@ static int tx4939ide_dma_end(ide_drive_t *drive)
        /* read and clear the INTR & ERROR bits */
        dma_stat = tx4939ide_clear_dma_status(base);
 
-       wmb();
+#define CHECK_DMA_MASK (ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR)
 
        /* verify good DMA status */
-       if ((dma_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) == 0 &&
+       if ((dma_stat & CHECK_DMA_MASK) == 0 &&
            (ctl & (TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST)) ==
            (TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST))
                /* INT_IDE lost... bug? */
                return 0;
-       return ((dma_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) !=
+       return ((dma_stat & CHECK_DMA_MASK) !=
                ATA_DMA_INTR) ? 0x10 | dma_stat : 0;
 }
 
@@ -434,97 +434,19 @@ static void tx4939ide_tf_load_fixup(ide_drive_t *drive)
        tx4939ide_writew(sysctl, base, TX4939IDE_Sys_Ctl);
 }
 
-#ifdef __BIG_ENDIAN
-
-/* custom iops (independent from SWAP_IO_SPACE) */
-static u8 tx4939ide_inb(unsigned long port)
+static void tx4939ide_tf_load(ide_drive_t *drive, struct ide_taskfile *tf,
+                             u8 valid)
 {
-       return __raw_readb((void __iomem *)port);
-}
+       ide_tf_load(drive, tf, valid);
 
-static void tx4939ide_outb(u8 value, unsigned long port)
-{
-       __raw_writeb(value, (void __iomem *)port);
-}
-
-static void tx4939ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-       u8 HIHI = cmd->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF;
-
-       if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
-               HIHI = 0xFF;
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
-               tx4939ide_outb(tf->hob_feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
-               tx4939ide_outb(tf->hob_nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
-               tx4939ide_outb(tf->hob_lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
-               tx4939ide_outb(tf->hob_lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
-               tx4939ide_outb(tf->hob_lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
-               tx4939ide_outb(tf->feature, io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
-               tx4939ide_outb(tf->nsect, io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
-               tx4939ide_outb(tf->lbal, io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
-               tx4939ide_outb(tf->lbam, io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
-               tx4939ide_outb(tf->lbah, io_ports->lbah_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) {
-               tx4939ide_outb((tf->device & HIHI) | drive->select,
-                              io_ports->device_addr);
+       if (valid & IDE_VALID_DEVICE)
                tx4939ide_tf_load_fixup(drive);
-       }
 }
 
-static void tx4939ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       struct ide_io_ports *io_ports = &hwif->io_ports;
-       struct ide_taskfile *tf = &cmd->tf;
-
-       /* be sure we're looking at the low order bits */
-       tx4939ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
-               tf->error  = tx4939ide_inb(io_ports->feature_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
-               tf->nsect  = tx4939ide_inb(io_ports->nsect_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
-               tf->lbal   = tx4939ide_inb(io_ports->lbal_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
-               tf->lbam   = tx4939ide_inb(io_ports->lbam_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
-               tf->lbah   = tx4939ide_inb(io_ports->lbah_addr);
-       if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
-               tf->device = tx4939ide_inb(io_ports->device_addr);
-
-       if (cmd->tf_flags & IDE_TFLAG_LBA48) {
-               tx4939ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
-
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
-                       tf->hob_error = tx4939ide_inb(io_ports->feature_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
-                       tf->hob_nsect = tx4939ide_inb(io_ports->nsect_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
-                       tf->hob_lbal  = tx4939ide_inb(io_ports->lbal_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
-                       tf->hob_lbam  = tx4939ide_inb(io_ports->lbam_addr);
-               if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
-                       tf->hob_lbah  = tx4939ide_inb(io_ports->lbah_addr);
-       }
-}
+#ifdef __BIG_ENDIAN
 
-static void tx4939ide_input_data_swap(ide_drive_t *drive, struct request *rq,
+/* custom iops (independent from SWAP_IO_SPACE) */
+static void tx4939ide_input_data_swap(ide_drive_t *drive, struct ide_cmd *cmd,
                                void *buf, unsigned int len)
 {
        unsigned long port = drive->hwif->io_ports.data_addr;
@@ -536,7 +458,7 @@ static void tx4939ide_input_data_swap(ide_drive_t *drive, struct request *rq,
        __ide_flush_dcache_range((unsigned long)buf, roundup(len, 2));
 }
 
-static void tx4939ide_output_data_swap(ide_drive_t *drive, struct request *rq,
+static void tx4939ide_output_data_swap(ide_drive_t *drive, struct ide_cmd *cmd,
                                void *buf, unsigned int len)
 {
        unsigned long port = drive->hwif->io_ports.data_addr;
@@ -558,7 +480,7 @@ static const struct ide_tp_ops tx4939ide_tp_ops = {
 
        .dev_select             = ide_dev_select,
        .tf_load                = tx4939ide_tf_load,
-       .tf_read                = tx4939ide_tf_read,
+       .tf_read                = ide_tf_read,
 
        .input_data             = tx4939ide_input_data_swap,
        .output_data            = tx4939ide_output_data_swap,
@@ -566,14 +488,6 @@ static const struct ide_tp_ops tx4939ide_tp_ops = {
 
 #else  /* __LITTLE_ENDIAN */
 
-static void tx4939ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
-{
-       ide_tf_load(drive, cmd);
-
-       if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
-               tx4939ide_tf_load_fixup(drive);
-}
-
 static const struct ide_tp_ops tx4939ide_tp_ops = {
        .exec_command           = ide_exec_command,
        .read_status            = ide_read_status,
index 17e8ddd..bf74039 100644 (file)
@@ -178,7 +178,7 @@ static int __init i7300_idle_ioat_selftest(u8 *ctl,
 
 static struct device dummy_dma_dev = {
        .init_name = "fallback device",
-       .coherent_dma_mask = DMA_64BIT_MASK,
+       .coherent_dma_mask = DMA_BIT_MASK(64),
        .dma_mask = &dummy_dma_dev.coherent_dma_mask,
 };
 
index 38f7120..9555fd2 100644 (file)
@@ -1171,7 +1171,7 @@ static int __devinit add_card(struct pci_dev *dev,
 
         error = -ENXIO;
 
-        if (pci_set_dma_mask(dev, DMA_32BIT_MASK))
+        if (pci_set_dma_mask(dev, DMA_BIT_MASK(32)))
                 FAIL("DMA address limits not supported for PCILynx hardware");
         if (pci_enable_device(dev))
                 FAIL("failed to enable PCILynx hardware");
index 2a2e508..851de83 100644 (file)
@@ -297,21 +297,25 @@ static void cma_detach_from_dev(struct rdma_id_private *id_priv)
        id_priv->cma_dev = NULL;
 }
 
-static int cma_set_qkey(struct ib_device *device, u8 port_num,
-                       enum rdma_port_space ps,
-                       struct rdma_dev_addr *dev_addr, u32 *qkey)
+static int cma_set_qkey(struct rdma_id_private *id_priv)
 {
        struct ib_sa_mcmember_rec rec;
        int ret = 0;
 
-       switch (ps) {
+       if (id_priv->qkey)
+               return 0;
+
+       switch (id_priv->id.ps) {
        case RDMA_PS_UDP:
-               *qkey = RDMA_UDP_QKEY;
+               id_priv->qkey = RDMA_UDP_QKEY;
                break;
        case RDMA_PS_IPOIB:
-               ib_addr_get_mgid(dev_addr, &rec.mgid);
-               ret = ib_sa_get_mcmember_rec(device, port_num, &rec.mgid, &rec);
-               *qkey = be32_to_cpu(rec.qkey);
+               ib_addr_get_mgid(&id_priv->id.route.addr.dev_addr, &rec.mgid);
+               ret = ib_sa_get_mcmember_rec(id_priv->id.device,
+                                            id_priv->id.port_num, &rec.mgid,
+                                            &rec);
+               if (!ret)
+                       id_priv->qkey = be32_to_cpu(rec.qkey);
                break;
        default:
                break;
@@ -341,12 +345,7 @@ static int cma_acquire_dev(struct rdma_id_private *id_priv)
                ret = ib_find_cached_gid(cma_dev->device, &gid,
                                         &id_priv->id.port_num, NULL);
                if (!ret) {
-                       ret = cma_set_qkey(cma_dev->device,
-                                          id_priv->id.port_num,
-                                          id_priv->id.ps, dev_addr,
-                                          &id_priv->qkey);
-                       if (!ret)
-                               cma_attach_to_dev(id_priv, cma_dev);
+                       cma_attach_to_dev(id_priv, cma_dev);
                        break;
                }
        }
@@ -578,6 +577,10 @@ static int cma_ib_init_qp_attr(struct rdma_id_private *id_priv,
        *qp_attr_mask = IB_QP_STATE | IB_QP_PKEY_INDEX | IB_QP_PORT;
 
        if (cma_is_ud_ps(id_priv->id.ps)) {
+               ret = cma_set_qkey(id_priv);
+               if (ret)
+                       return ret;
+
                qp_attr->qkey = id_priv->qkey;
                *qp_attr_mask |= IB_QP_QKEY;
        } else {
@@ -2201,6 +2204,12 @@ static int cma_sidr_rep_handler(struct ib_cm_id *cm_id,
                        event.status = ib_event->param.sidr_rep_rcvd.status;
                        break;
                }
+               ret = cma_set_qkey(id_priv);
+               if (ret) {
+                       event.event = RDMA_CM_EVENT_ADDR_ERROR;
+                       event.status = -EINVAL;
+                       break;
+               }
                if (id_priv->qkey != rep->qkey) {
                        event.event = RDMA_CM_EVENT_UNREACHABLE;
                        event.status = -EINVAL;
@@ -2480,10 +2489,14 @@ static int cma_send_sidr_rep(struct rdma_id_private *id_priv,
                             const void *private_data, int private_data_len)
 {
        struct ib_cm_sidr_rep_param rep;
+       int ret;
 
        memset(&rep, 0, sizeof rep);
        rep.status = status;
        if (status == IB_SIDR_SUCCESS) {
+               ret = cma_set_qkey(id_priv);
+               if (ret)
+                       return ret;
                rep.qp_num = id_priv->qp_num;
                rep.qkey = id_priv->qkey;
        }
@@ -2713,6 +2726,10 @@ static int cma_join_ib_multicast(struct rdma_id_private *id_priv,
                    IB_SA_MCMEMBER_REC_FLOW_LABEL |
                    IB_SA_MCMEMBER_REC_TRAFFIC_CLASS;
 
+       if (id_priv->id.ps == RDMA_PS_IPOIB)
+               comp_mask |= IB_SA_MCMEMBER_REC_RATE |
+                            IB_SA_MCMEMBER_REC_RATE_SELECTOR;
+
        mc->multicast.ib = ib_sa_join_multicast(&sa_client, id_priv->id.device,
                                                id_priv->id.port_num, &rec,
                                                comp_mask, GFP_KERNEL,
index 7d79aa3..0cfbb6d 100644 (file)
@@ -989,13 +989,13 @@ static int __devinit c2_probe(struct pci_dev *pcidev,
        }
 
        if ((sizeof(dma_addr_t) > 4)) {
-               ret = pci_set_dma_mask(pcidev, DMA_64BIT_MASK);
+               ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
                if (ret < 0) {
                        printk(KERN_ERR PFX "64b DMA configuration failed\n");
                        goto bail2;
                }
        } else {
-               ret = pci_set_dma_mask(pcidev, DMA_32BIT_MASK);
+               ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
                if (ret < 0) {
                        printk(KERN_ERR PFX "32b DMA configuration failed\n");
                        goto bail2;
index a4a82bf..8d71086 100644 (file)
@@ -152,7 +152,7 @@ static int cxio_hal_clear_qp_ctx(struct cxio_rdev *rdev_p, u32 qpid)
        sge_cmd = qpid << 8 | 3;
        wqe->sge_cmd = cpu_to_be64(sge_cmd);
        skb->priority = CPL_PRIORITY_CONTROL;
-       return (cxgb3_ofld_send(rdev_p->t3cdev_p, skb));
+       return iwch_cxgb3_ofld_send(rdev_p->t3cdev_p, skb);
 }
 
 int cxio_create_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq)
@@ -571,7 +571,7 @@ static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p)
             (unsigned long long) rdev_p->ctrl_qp.dma_addr,
             rdev_p->ctrl_qp.workq, 1 << T3_CTRL_QP_SIZE_LOG2);
        skb->priority = CPL_PRIORITY_CONTROL;
-       return (cxgb3_ofld_send(rdev_p->t3cdev_p, skb));
+       return iwch_cxgb3_ofld_send(rdev_p->t3cdev_p, skb);
 err:
        kfree_skb(skb);
        return err;
@@ -701,7 +701,7 @@ static int __cxio_tpt_op(struct cxio_rdev *rdev_p, u32 reset_tpt_entry,
        u32 stag_idx;
        u32 wptr;
 
-       if (rdev_p->flags)
+       if (cxio_fatal_error(rdev_p))
                return -EIO;
 
        stag_state = stag_state > 0;
@@ -858,7 +858,7 @@ int cxio_rdma_init(struct cxio_rdev *rdev_p, struct t3_rdma_init_attr *attr)
        wqe->qp_dma_size = cpu_to_be32(attr->qp_dma_size);
        wqe->irs = cpu_to_be32(attr->irs);
        skb->priority = 0;      /* 0=>ToeQ; 1=>CtrlQ */
-       return (cxgb3_ofld_send(rdev_p->t3cdev_p, skb));
+       return iwch_cxgb3_ofld_send(rdev_p->t3cdev_p, skb);
 }
 
 void cxio_register_ev_cb(cxio_hal_ev_callback_func_t ev_cb)
@@ -1041,9 +1041,9 @@ void cxio_rdev_close(struct cxio_rdev *rdev_p)
                cxio_hal_pblpool_destroy(rdev_p);
                cxio_hal_rqtpool_destroy(rdev_p);
                list_del(&rdev_p->entry);
-               rdev_p->t3cdev_p->ulp = NULL;
                cxio_hal_destroy_ctrl_qp(rdev_p);
                cxio_hal_destroy_resource(rdev_p->rscp);
+               rdev_p->t3cdev_p->ulp = NULL;
        }
 }
 
index 094a66d..bfd03bf 100644 (file)
@@ -115,6 +115,11 @@ struct cxio_rdev {
 #define        CXIO_ERROR_FATAL        1
 };
 
+static inline int cxio_fatal_error(struct cxio_rdev *rdev_p)
+{
+       return rdev_p->flags & CXIO_ERROR_FATAL;
+}
+
 static inline int cxio_num_stags(struct cxio_rdev *rdev_p)
 {
        return min((int)T3_MAX_NUM_STAG, (int)((rdev_p->rnic_info.tpt_top - rdev_p->rnic_info.tpt_base) >> 5));
@@ -188,6 +193,7 @@ void cxio_count_scqes(struct t3_cq *cq, struct t3_wq *wq, int *count);
 void cxio_flush_hw_cq(struct t3_cq *cq);
 int cxio_poll_cq(struct t3_wq *wq, struct t3_cq *cq, struct t3_cqe *cqe,
                     u8 *cqe_flushed, u64 *cookie, u32 *credit);
+int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb);
 
 #define MOD "iw_cxgb3: "
 #define PDBG(fmt, args...) pr_debug(MOD fmt, ## args)
index 37a4fc2..26fc0a4 100644 (file)
@@ -165,12 +165,19 @@ static void close_rnic_dev(struct t3cdev *tdev)
 static void iwch_err_handler(struct t3cdev *tdev, u32 status, u32 error)
 {
        struct cxio_rdev *rdev = tdev->ulp;
+       struct iwch_dev *rnicp = rdev_to_iwch_dev(rdev);
+       struct ib_event event;
 
-       if (status == OFFLOAD_STATUS_DOWN)
+       if (status == OFFLOAD_STATUS_DOWN) {
                rdev->flags = CXIO_ERROR_FATAL;
 
-       return;
+               event.device = &rnicp->ibdev;
+               event.event  = IB_EVENT_DEVICE_FATAL;
+               event.element.port_num = 0;
+               ib_dispatch_event(&event);
+       }
 
+       return;
 }
 
 static int __init iwch_init_module(void)
index 3773453..8473550 100644 (file)
@@ -117,6 +117,11 @@ static inline struct iwch_dev *to_iwch_dev(struct ib_device *ibdev)
        return container_of(ibdev, struct iwch_dev, ibdev);
 }
 
+static inline struct iwch_dev *rdev_to_iwch_dev(struct cxio_rdev *rdev)
+{
+       return container_of(rdev, struct iwch_dev, rdev);
+}
+
 static inline int t3b_device(const struct iwch_dev *rhp)
 {
        return rhp->rdev.t3cdev_p->type == T3B;
index 8699947..fef3f1a 100644 (file)
@@ -139,6 +139,38 @@ static void stop_ep_timer(struct iwch_ep *ep)
        put_ep(&ep->com);
 }
 
+int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_entry *l2e)
+{
+       int     error = 0;
+       struct cxio_rdev *rdev;
+
+       rdev = (struct cxio_rdev *)tdev->ulp;
+       if (cxio_fatal_error(rdev)) {
+               kfree_skb(skb);
+               return -EIO;
+       }
+       error = l2t_send(tdev, skb, l2e);
+       if (error)
+               kfree_skb(skb);
+       return error;
+}
+
+int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb)
+{
+       int     error = 0;
+       struct cxio_rdev *rdev;
+
+       rdev = (struct cxio_rdev *)tdev->ulp;
+       if (cxio_fatal_error(rdev)) {
+               kfree_skb(skb);
+               return -EIO;
+       }
+       error = cxgb3_ofld_send(tdev, skb);
+       if (error)
+               kfree_skb(skb);
+       return error;
+}
+
 static void release_tid(struct t3cdev *tdev, u32 hwtid, struct sk_buff *skb)
 {
        struct cpl_tid_release *req;
@@ -150,7 +182,7 @@ static void release_tid(struct t3cdev *tdev, u32 hwtid, struct sk_buff *skb)
        req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_TID_RELEASE, hwtid));
        skb->priority = CPL_PRIORITY_SETUP;
-       cxgb3_ofld_send(tdev, skb);
+       iwch_cxgb3_ofld_send(tdev, skb);
        return;
 }
 
@@ -172,8 +204,7 @@ int iwch_quiesce_tid(struct iwch_ep *ep)
        req->val = cpu_to_be64(1 << S_TCB_RX_QUIESCE);
 
        skb->priority = CPL_PRIORITY_DATA;
-       cxgb3_ofld_send(ep->com.tdev, skb);
-       return 0;
+       return iwch_cxgb3_ofld_send(ep->com.tdev, skb);
 }
 
 int iwch_resume_tid(struct iwch_ep *ep)
@@ -194,8 +225,7 @@ int iwch_resume_tid(struct iwch_ep *ep)
        req->val = 0;
 
        skb->priority = CPL_PRIORITY_DATA;
-       cxgb3_ofld_send(ep->com.tdev, skb);
-       return 0;
+       return iwch_cxgb3_ofld_send(ep->com.tdev, skb);
 }
 
 static void set_emss(struct iwch_ep *ep, u16 opt)
@@ -252,18 +282,22 @@ static void *alloc_ep(int size, gfp_t gfp)
 
 void __free_ep(struct kref *kref)
 {
-       struct iwch_ep_common *epc;
-       epc = container_of(kref, struct iwch_ep_common, kref);
-       PDBG("%s ep %p state %s\n", __func__, epc, states[state_read(epc)]);
-       kfree(epc);
+       struct iwch_ep *ep;
+       ep = container_of(container_of(kref, struct iwch_ep_common, kref),
+                         struct iwch_ep, com);
+       PDBG("%s ep %p state %s\n", __func__, ep, states[state_read(&ep->com)]);
+       if (ep->com.flags & RELEASE_RESOURCES) {
+               cxgb3_remove_tid(ep->com.tdev, (void *)ep, ep->hwtid);
+               dst_release(ep->dst);
+               l2t_release(L2DATA(ep->com.tdev), ep->l2t);
+       }
+       kfree(ep);
 }
 
 static void release_ep_resources(struct iwch_ep *ep)
 {
        PDBG("%s ep %p tid %d\n", __func__, ep, ep->hwtid);
-       cxgb3_remove_tid(ep->com.tdev, (void *)ep, ep->hwtid);
-       dst_release(ep->dst);
-       l2t_release(L2DATA(ep->com.tdev), ep->l2t);
+       ep->com.flags |= RELEASE_RESOURCES;
        put_ep(&ep->com);
 }
 
@@ -382,7 +416,7 @@ static void abort_arp_failure(struct t3cdev *dev, struct sk_buff *skb)
 
        PDBG("%s t3cdev %p\n", __func__, dev);
        req->cmd = CPL_ABORT_NO_RST;
-       cxgb3_ofld_send(dev, skb);
+       iwch_cxgb3_ofld_send(dev, skb);
 }
 
 static int send_halfclose(struct iwch_ep *ep, gfp_t gfp)
@@ -402,8 +436,7 @@ static int send_halfclose(struct iwch_ep *ep, gfp_t gfp)
        req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_CLOSE_CON));
        req->wr.wr_lo = htonl(V_WR_TID(ep->hwtid));
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_CON_REQ, ep->hwtid));
-       l2t_send(ep->com.tdev, skb, ep->l2t);
-       return 0;
+       return iwch_l2t_send(ep->com.tdev, skb, ep->l2t);
 }
 
 static int send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp)
@@ -424,8 +457,7 @@ static int send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp)
        req->wr.wr_lo = htonl(V_WR_TID(ep->hwtid));
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ABORT_REQ, ep->hwtid));
        req->cmd = CPL_ABORT_SEND_RST;
-       l2t_send(ep->com.tdev, skb, ep->l2t);
-       return 0;
+       return iwch_l2t_send(ep->com.tdev, skb, ep->l2t);
 }
 
 static int send_connect(struct iwch_ep *ep)
@@ -469,8 +501,7 @@ static int send_connect(struct iwch_ep *ep)
        req->opt0l = htonl(opt0l);
        req->params = 0;
        req->opt2 = htonl(opt2);
-       l2t_send(ep->com.tdev, skb, ep->l2t);
-       return 0;
+       return iwch_l2t_send(ep->com.tdev, skb, ep->l2t);
 }
 
 static void send_mpa_req(struct iwch_ep *ep, struct sk_buff *skb)
@@ -527,7 +558,7 @@ static void send_mpa_req(struct iwch_ep *ep, struct sk_buff *skb)
        req->sndseq = htonl(ep->snd_seq);
        BUG_ON(ep->mpa_skb);
        ep->mpa_skb = skb;
-       l2t_send(ep->com.tdev, skb, ep->l2t);
+       iwch_l2t_send(ep->com.tdev, skb, ep->l2t);
        start_ep_timer(ep);
        state_set(&ep->com, MPA_REQ_SENT);
        return;
@@ -578,8 +609,7 @@ static int send_mpa_reject(struct iwch_ep *ep, const void *pdata, u8 plen)
        req->sndseq = htonl(ep->snd_seq);
        BUG_ON(ep->mpa_skb);
        ep->mpa_skb = skb;
-       l2t_send(ep->com.tdev, skb, ep->l2t);
-       return 0;
+       return iwch_l2t_send(ep->com.tdev, skb, ep->l2t);
 }
 
 static int send_mpa_reply(struct iwch_ep *ep, const void *pdata, u8 plen)
@@ -630,8 +660,7 @@ static int send_mpa_reply(struct iwch_ep *ep, const void *pdata, u8 plen)
        req->sndseq = htonl(ep->snd_seq);
        ep->mpa_skb = skb;
        state_set(&ep->com, MPA_REP_SENT);
-       l2t_send(ep->com.tdev, skb, ep->l2t);
-       return 0;
+       return iwch_l2t_send(ep->com.tdev, skb, ep->l2t);
 }
 
 static int act_establish(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
@@ -795,7 +824,7 @@ static int update_rx_credits(struct iwch_ep *ep, u32 credits)
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_RX_DATA_ACK, ep->hwtid));
        req->credit_dack = htonl(V_RX_CREDITS(credits) | V_RX_FORCE_ACK(1));
        skb->priority = CPL_PRIORITY_ACK;
-       cxgb3_ofld_send(ep->com.tdev, skb);
+       iwch_cxgb3_ofld_send(ep->com.tdev, skb);
        return credits;
 }
 
@@ -1127,8 +1156,8 @@ static int abort_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
         * We get 2 abort replies from the HW.  The first one must
         * be ignored except for scribbling that we need one more.
         */
-       if (!(ep->flags & ABORT_REQ_IN_PROGRESS)) {
-               ep->flags |= ABORT_REQ_IN_PROGRESS;
+       if (!(ep->com.flags & ABORT_REQ_IN_PROGRESS)) {
+               ep->com.flags |= ABORT_REQ_IN_PROGRESS;
                return CPL_RET_BUF_DONE;
        }
 
@@ -1203,8 +1232,7 @@ static int listen_start(struct iwch_listen_ep *ep)
        req->opt1 = htonl(V_CONN_POLICY(CPL_CONN_POLICY_ASK));
 
        skb->priority = 1;
-       cxgb3_ofld_send(ep->com.tdev, skb);
-       return 0;
+       return iwch_cxgb3_ofld_send(ep->com.tdev, skb);
 }
 
 static int pass_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
@@ -1237,8 +1265,7 @@ static int listen_stop(struct iwch_listen_ep *ep)
        req->cpu_idx = 0;
        OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_LISTSRV_REQ, ep->stid));
        skb->priority = 1;
-       cxgb3_ofld_send(ep->com.tdev, skb);
-       return 0;
+       return iwch_cxgb3_ofld_send(ep->com.tdev, skb);
 }
 
 static int close_listsrv_rpl(struct t3cdev *tdev, struct sk_buff *skb,
@@ -1286,7 +1313,7 @@ static void accept_cr(struct iwch_ep *ep, __be32 peer_ip, struct sk_buff *skb)
        rpl->opt2 = htonl(opt2);
        rpl->rsvd = rpl->opt2;  /* workaround for HW bug */
        skb->priority = CPL_PRIORITY_SETUP;
-       l2t_send(ep->com.tdev, skb, ep->l2t);
+       iwch_l2t_send(ep->com.tdev, skb, ep->l2t);
 
        return;
 }
@@ -1315,7 +1342,7 @@ static void reject_cr(struct t3cdev *tdev, u32 hwtid, __be32 peer_ip,
                rpl->opt0l_status = htonl(CPL_PASS_OPEN_REJECT);
                rpl->opt2 = 0;
                rpl->rsvd = rpl->opt2;
-               cxgb3_ofld_send(tdev, skb);
+               iwch_cxgb3_ofld_send(tdev, skb);
        }
 }
 
@@ -1534,8 +1561,8 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
         * We get 2 peer aborts from the HW.  The first one must
         * be ignored except for scribbling that we need one more.
         */
-       if (!(ep->flags & PEER_ABORT_IN_PROGRESS)) {
-               ep->flags |= PEER_ABORT_IN_PROGRESS;
+       if (!(ep->com.flags & PEER_ABORT_IN_PROGRESS)) {
+               ep->com.flags |= PEER_ABORT_IN_PROGRESS;
                return CPL_RET_BUF_DONE;
        }
 
@@ -1613,7 +1640,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
        rpl->wr.wr_lo = htonl(V_WR_TID(ep->hwtid));
        OPCODE_TID(rpl) = htonl(MK_OPCODE_TID(CPL_ABORT_RPL, ep->hwtid));
        rpl->cmd = CPL_ABORT_NO_RST;
-       cxgb3_ofld_send(ep->com.tdev, rpl_skb);
+       iwch_cxgb3_ofld_send(ep->com.tdev, rpl_skb);
 out:
        if (release)
                release_ep_resources(ep);
@@ -2017,8 +2044,11 @@ int iwch_destroy_listen(struct iw_cm_id *cm_id)
        ep->com.rpl_done = 0;
        ep->com.rpl_err = 0;
        err = listen_stop(ep);
+       if (err)
+               goto done;
        wait_event(ep->com.waitq, ep->com.rpl_done);
        cxgb3_free_stid(ep->com.tdev, ep->stid);
+done:
        err = ep->com.rpl_err;
        cm_id->rem_ref(cm_id);
        put_ep(&ep->com);
@@ -2030,12 +2060,22 @@ int iwch_ep_disconnect(struct iwch_ep *ep, int abrupt, gfp_t gfp)
        int ret=0;
        unsigned long flags;
        int close = 0;
+       int fatal = 0;
+       struct t3cdev *tdev;
+       struct cxio_rdev *rdev;
 
        spin_lock_irqsave(&ep->com.lock, flags);
 
        PDBG("%s ep %p state %s, abrupt %d\n", __func__, ep,
             states[ep->com.state], abrupt);
 
+       tdev = (struct t3cdev *)ep->com.tdev;
+       rdev = (struct cxio_rdev *)tdev->ulp;
+       if (cxio_fatal_error(rdev)) {
+               fatal = 1;
+               close_complete_upcall(ep);
+               ep->com.state = DEAD;
+       }
        switch (ep->com.state) {
        case MPA_REQ_WAIT:
        case MPA_REQ_SENT:
@@ -2075,7 +2115,11 @@ int iwch_ep_disconnect(struct iwch_ep *ep, int abrupt, gfp_t gfp)
                        ret = send_abort(ep, NULL, gfp);
                else
                        ret = send_halfclose(ep, gfp);
+               if (ret)
+                       fatal = 1;
        }
+       if (fatal)
+               release_ep_resources(ep);
        return ret;
 }
 
index d7c7e09..43c0aea 100644 (file)
@@ -147,6 +147,7 @@ enum iwch_ep_state {
 enum iwch_ep_flags {
        PEER_ABORT_IN_PROGRESS  = (1 << 0),
        ABORT_REQ_IN_PROGRESS   = (1 << 1),
+       RELEASE_RESOURCES       = (1 << 2),
 };
 
 struct iwch_ep_common {
@@ -161,6 +162,7 @@ struct iwch_ep_common {
        wait_queue_head_t waitq;
        int rpl_done;
        int rpl_err;
+       u32 flags;
 };
 
 struct iwch_listen_ep {
@@ -188,7 +190,6 @@ struct iwch_ep {
        u16 plen;
        u32 ird;
        u32 ord;
-       u32 flags;
 };
 
 static inline struct iwch_ep *to_ep(struct iw_cm_id *cm_id)
index c758fbd..2f546a6 100644 (file)
@@ -751,7 +751,7 @@ int iwch_post_zb_read(struct iwch_qp *qhp)
        wqe->send.wrh.gen_tid_len = cpu_to_be32(V_FW_RIWR_TID(qhp->ep->hwtid)|
                                                V_FW_RIWR_LEN(flit_cnt));
        skb->priority = CPL_PRIORITY_DATA;
-       return cxgb3_ofld_send(qhp->rhp->rdev.t3cdev_p, skb);
+       return iwch_cxgb3_ofld_send(qhp->rhp->rdev.t3cdev_p, skb);
 }
 
 /*
@@ -783,7 +783,7 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg)
                         V_FW_RIWR_FLAGS(T3_COMPLETION_FLAG | T3_NOTIFY_FLAG));
        wqe->send.wrh.gen_tid_len = cpu_to_be32(V_FW_RIWR_TID(qhp->ep->hwtid));
        skb->priority = CPL_PRIORITY_DATA;
-       return cxgb3_ofld_send(qhp->rhp->rdev.t3cdev_p, skb);
+       return iwch_cxgb3_ofld_send(qhp->rhp->rdev.t3cdev_p, skb);
 }
 
 /*
index cb9daa6..04e88b6 100644 (file)
@@ -470,14 +470,14 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
                goto bail_disable;
        }
 
-       ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (ret) {
                /*
                 * if the 64 bit setup fails, try 32 bit.  Some systems
                 * do not setup 64 bit maps on systems with 2GB or less
                 * memory installed.
                 */
-               ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (ret) {
                        dev_info(&pdev->dev,
                                "Unable to set DMA mask for unit %u: %d\n",
@@ -486,7 +486,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
                }
                else {
                        ipath_dbg("No 64bit DMA mask, used 32 bit mask\n");
-                       ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (ret)
                                dev_info(&pdev->dev,
                                        "Unable to set DMA consistent mask "
@@ -496,7 +496,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
                }
        }
        else {
-               ret = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (ret)
                        dev_info(&pdev->dev,
                                "Unable to set DMA consistent mask "
index 2ccb9d3..ae3d759 100644 (file)
@@ -394,8 +394,7 @@ static int mlx4_ib_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
                                       PAGE_SIZE, vma->vm_page_prot))
                        return -EAGAIN;
        } else if (vma->vm_pgoff == 1 && dev->dev->caps.bf_reg_size != 0) {
-               /* FIXME want pgprot_writecombine() for BlueFlame pages */
-               vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+               vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
 
                if (io_remap_pfn_range(vma, vma->vm_start,
                                       to_mucontext(context)->uar.pfn +
index 52f60f4..1d83cf7 100644 (file)
@@ -1016,20 +1016,20 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err) {
                dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n");
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting.\n");
                        goto err_free_res;
                }
        }
-       err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err) {
                dev_warn(&pdev->dev, "Warning: couldn't set 64-bit "
                         "consistent PCI DMA mask.\n");
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, "
                                "aborting.\n");
index ca59976..cbde0cf 100644 (file)
@@ -478,23 +478,23 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
        }
 
        if ((sizeof(dma_addr_t) > 4)) {
-               ret = pci_set_dma_mask(pcidev, DMA_64BIT_MASK);
+               ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
                if (ret < 0) {
                        printk(KERN_ERR PFX "64b DMA mask configuration failed\n");
                        goto bail2;
                }
-               ret = pci_set_consistent_dma_mask(pcidev, DMA_64BIT_MASK);
+               ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
                if (ret) {
                        printk(KERN_ERR PFX "64b DMA consistent mask configuration failed\n");
                        goto bail2;
                }
        } else {
-               ret = pci_set_dma_mask(pcidev, DMA_32BIT_MASK);
+               ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
                if (ret < 0) {
                        printk(KERN_ERR PFX "32b DMA mask configuration failed\n");
                        goto bail2;
                }
-               ret = pci_set_consistent_dma_mask(pcidev, DMA_32BIT_MASK);
+               ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32));
                if (ret) {
                        printk(KERN_ERR PFX "32b DMA consistent mask configuration failed\n");
                        goto bail2;
index 04b12ad..17621de 100644 (file)
@@ -289,8 +289,8 @@ static inline __le32 get_crc_value(struct nes_v4_quad *nes_quad)
 static inline void
 set_wqe_64bit_value(__le32 *wqe_words, u32 index, u64 value)
 {
-       wqe_words[index]     = cpu_to_le32((u32) ((unsigned long)value));
-       wqe_words[index + 1] = cpu_to_le32((u32)(upper_32_bits((unsigned long)value)));
+       wqe_words[index]     = cpu_to_le32((u32) value);
+       wqe_words[index + 1] = cpu_to_le32(upper_32_bits(value));
 }
 
 static inline void
index 5242515..dbd9a75 100644 (file)
@@ -426,6 +426,7 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
        if (type == NES_TIMER_TYPE_CLOSE) {
                new_send->timetosend += (HZ/10);
                if (cm_node->recv_entry) {
+                       kfree(new_send);
                        WARN_ON(1);
                        return -EINVAL;
                }
@@ -445,8 +446,8 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
                if (ret != NETDEV_TX_OK) {
                        nes_debug(NES_DBG_CM, "Error sending packet %p "
                                "(jiffies = %lu)\n", new_send, jiffies);
-                       atomic_dec(&new_send->skb->users);
                        new_send->timetosend = jiffies;
+                       ret = NETDEV_TX_OK;
                } else {
                        cm_packets_sent++;
                        if (!send_retrans) {
@@ -630,7 +631,6 @@ static void nes_cm_timer_tick(unsigned long pass)
                                nes_debug(NES_DBG_CM, "rexmit failed for "
                                        "node=%p\n", cm_node);
                                cm_packets_bounced++;
-                               atomic_dec(&send_entry->skb->users);
                                send_entry->retrycount--;
                                nexttimeout = jiffies + NES_SHORT_TIME;
                                settimer = 1;
@@ -666,11 +666,6 @@ static void nes_cm_timer_tick(unsigned long pass)
 
                spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags);
                rem_ref_cm_node(cm_node->cm_core, cm_node);
-               if (ret != NETDEV_TX_OK) {
-                       nes_debug(NES_DBG_CM, "rexmit failed for cm_node=%p\n",
-                               cm_node);
-                       break;
-               }
        }
 
        if (settimer) {
@@ -1262,7 +1257,6 @@ static int rem_ref_cm_node(struct nes_cm_core *cm_core,
                cm_node->nesqp = NULL;
        }
 
-       cm_node->freed = 1;
        kfree(cm_node);
        return 0;
 }
@@ -1999,13 +1993,17 @@ static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
                if (loopbackremotelistener == NULL) {
                        create_event(cm_node, NES_CM_EVENT_ABORTED);
                } else {
-                       atomic_inc(&cm_loopbacks);
                        loopback_cm_info = *cm_info;
                        loopback_cm_info.loc_port = cm_info->rem_port;
                        loopback_cm_info.rem_port = cm_info->loc_port;
                        loopback_cm_info.cm_id = loopbackremotelistener->cm_id;
                        loopbackremotenode = make_cm_node(cm_core, nesvnic,
                                &loopback_cm_info, loopbackremotelistener);
+                       if (!loopbackremotenode) {
+                               rem_ref_cm_node(cm_node->cm_core, cm_node);
+                               return NULL;
+                       }
+                       atomic_inc(&cm_loopbacks);
                        loopbackremotenode->loopbackpartner = cm_node;
                        loopbackremotenode->tcp_cntxt.rcv_wscale =
                                NES_CM_DEFAULT_RCV_WND_SCALE;
@@ -2690,6 +2688,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
        struct ib_mr *ibmr = NULL;
        struct ib_phys_buf ibphysbuf;
        struct nes_pd *nespd;
+       u64 tagged_offset;
 
 
 
@@ -2755,10 +2754,11 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
                ibphysbuf.addr = nesqp->ietf_frame_pbase;
                ibphysbuf.size = conn_param->private_data_len +
                                        sizeof(struct ietf_mpa_frame);
+               tagged_offset = (u64)(unsigned long)nesqp->ietf_frame;
                ibmr = nesibdev->ibdev.reg_phys_mr((struct ib_pd *)nespd,
                                                &ibphysbuf, 1,
                                                IB_ACCESS_LOCAL_WRITE,
-                                               (u64 *)&nesqp->ietf_frame);
+                                               &tagged_offset);
                if (!ibmr) {
                        nes_debug(NES_DBG_CM, "Unable to register memory region"
                                        "for lSMM for cm_node = %p \n",
@@ -2782,7 +2782,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
                        sizeof(struct ietf_mpa_frame));
                set_wqe_64bit_value(wqe->wqe_words,
                                        NES_IWARP_SQ_WQE_FRAG0_LOW_IDX,
-                                       (u64)nesqp->ietf_frame);
+                                       (u64)(unsigned long)nesqp->ietf_frame);
                wqe->wqe_words[NES_IWARP_SQ_WQE_LENGTH0_IDX] =
                        cpu_to_le32(conn_param->private_data_len +
                        sizeof(struct ietf_mpa_frame));
index d5f7782..80bba18 100644 (file)
@@ -298,7 +298,6 @@ struct nes_cm_node {
        struct nes_vnic           *nesvnic;
        int                       apbvt_set;
        int                       accept_pend;
-       int                     freed;
        struct list_head        timer_entry;
        struct list_head        reset_entry;
        struct nes_qp           *nesqp;
index 52e7340..d6fc9ae 100644 (file)
@@ -46,6 +46,10 @@ static unsigned int nes_lro_max_aggr = NES_LRO_MAX_AGGR;
 module_param(nes_lro_max_aggr, uint, 0444);
 MODULE_PARM_DESC(nes_lro_max_aggr, "NIC LRO max packet aggregation");
 
+static int wide_ppm_offset;
+module_param(wide_ppm_offset, int, 0644);
+MODULE_PARM_DESC(wide_ppm_offset, "Increase CX4 interface clock ppm offset, 0=100ppm (default), 1=300ppm");
+
 static u32 crit_err_count;
 u32 int_mod_timer_init;
 u32 int_mod_cq_depth_256;
@@ -546,8 +550,11 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
                        msleep(1);
                }
                if (int_cnt > 1) {
+                       u32 sds;
                        spin_lock_irqsave(&nesadapter->phy_lock, flags);
-                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, 0x0000F088);
+                       sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1);
+                       sds |= 0x00000040;
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds);
                        mh_detected++;
                        reset_value = nes_read32(nesdev->regs+NES_SOFTWARE_RESET);
                        reset_value |= 0x0000003d;
@@ -736,39 +743,49 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
 {
        int i;
        u32 u32temp;
-       u32 serdes_common_control;
+       u32 sds;
 
        if (hw_rev != NE020_REV) {
                /* init serdes 0 */
+               if (wide_ppm_offset && (nesadapter->phy_type[0] == NES_PHY_TYPE_CX4))
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000FFFAA);
+               else
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000000FF);
 
-               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000000FF);
                if (nesadapter->phy_type[0] == NES_PHY_TYPE_PUMA_1G) {
-                       serdes_common_control = nes_read_indexed(nesdev,
-                                       NES_IDX_ETH_SERDES_COMMON_CONTROL0);
-                       serdes_common_control |= 0x000000100;
-                       nes_write_indexed(nesdev,
-                                       NES_IDX_ETH_SERDES_COMMON_CONTROL0,
-                                       serdes_common_control);
-               } else if (!OneG_Mode) {
-                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE0, 0x11110000);
+                       sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0);
+                       sds |= 0x00000100;
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, sds);
                }
-               if (((port_count > 1) &&
-                       (nesadapter->phy_type[0] != NES_PHY_TYPE_PUMA_1G)) ||
-                       ((port_count > 2) &&
-                       (nesadapter->phy_type[0] == NES_PHY_TYPE_PUMA_1G))) {
-                       /* init serdes 1 */
-                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000000FF);
-                       if (nesadapter->phy_type[0] == NES_PHY_TYPE_PUMA_1G) {
-                               serdes_common_control = nes_read_indexed(nesdev,
-                                       NES_IDX_ETH_SERDES_COMMON_CONTROL1);
-                               serdes_common_control |= 0x000000100;
-                               nes_write_indexed(nesdev,
-                                       NES_IDX_ETH_SERDES_COMMON_CONTROL1,
-                                       serdes_common_control);
-                       } else if (!OneG_Mode) {
-                               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE1, 0x11110000);
-                       }
+               if (!OneG_Mode)
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE0, 0x11110000);
+
+               if (port_count < 2)
+                       return 0;
+
+               /* init serdes 1 */
+               switch (nesadapter->phy_type[1]) {
+               case NES_PHY_TYPE_ARGUS:
+               case NES_PHY_TYPE_SFP_D:
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP0, 0x00000000);
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP1, 0x00000000);
+                       break;
+               case NES_PHY_TYPE_CX4:
+                       sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1);
+                       sds &= 0xFFFFFFBF;
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds);
+                       if (wide_ppm_offset)
+                               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000FFFAA);
+                       else
+                               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000000FF);
+                       break;
+               case NES_PHY_TYPE_PUMA_1G:
+                       sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1);
+                       sds |= 0x000000100;
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds);
                }
+               if (!OneG_Mode)
+                       nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE1, 0x11110000);
        } else {
                /* init serdes 0 */
                nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008);
@@ -1259,203 +1276,162 @@ int nes_init_phy(struct nes_device *nesdev)
 {
        struct nes_adapter *nesadapter = nesdev->nesadapter;
        u32 counter = 0;
-       u32 sds_common_control0;
+       u32 sds;
        u32 mac_index = nesdev->mac_index;
        u32 tx_config = 0;
        u16 phy_data;
        u32 temp_phy_data = 0;
        u32 temp_phy_data2 = 0;
-       u32 i = 0;
+       u8  phy_type = nesadapter->phy_type[mac_index];
+       u8  phy_index = nesadapter->phy_index[mac_index];
 
        if ((nesadapter->OneG_Mode) &&
-           (nesadapter->phy_type[mac_index] != NES_PHY_TYPE_PUMA_1G)) {
+           (phy_type != NES_PHY_TYPE_PUMA_1G)) {
                nes_debug(NES_DBG_PHY, "1G PHY, mac_index = %d.\n", mac_index);
-               if (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_1G) {
-                       printk(PFX "%s: Programming mdc config for 1G\n", __func__);
+               if (phy_type == NES_PHY_TYPE_1G) {
                        tx_config = nes_read_indexed(nesdev, NES_IDX_MAC_TX_CONFIG);
                        tx_config &= 0xFFFFFFE3;
                        tx_config |= 0x04;
                        nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONFIG, tx_config);
                }
 
-               nes_read_1G_phy_reg(nesdev, 1, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 1 phy address %u = 0x%X.\n",
-                               nesadapter->phy_index[mac_index], phy_data);
-               nes_write_1G_phy_reg(nesdev, 23, nesadapter->phy_index[mac_index], 0xb000);
+               nes_read_1G_phy_reg(nesdev, 1, phy_index, &phy_data);
+               nes_write_1G_phy_reg(nesdev, 23, phy_index, 0xb000);
 
                /* Reset the PHY */
-               nes_write_1G_phy_reg(nesdev, 0, nesadapter->phy_index[mac_index], 0x8000);
+               nes_write_1G_phy_reg(nesdev, 0, phy_index, 0x8000);
                udelay(100);
                counter = 0;
                do {
-                       nes_read_1G_phy_reg(nesdev, 0, nesadapter->phy_index[mac_index], &phy_data);
-                       nes_debug(NES_DBG_PHY, "Phy data from register 0 = 0x%X.\n", phy_data);
-                       if (counter++ > 100) break;
+                       nes_read_1G_phy_reg(nesdev, 0, phy_index, &phy_data);
+                       if (counter++ > 100)
+                               break;
                } while (phy_data & 0x8000);
 
                /* Setting no phy loopback */
                phy_data &= 0xbfff;
                phy_data |= 0x1140;
-               nes_write_1G_phy_reg(nesdev, 0, nesadapter->phy_index[mac_index],  phy_data);
-               nes_read_1G_phy_reg(nesdev, 0, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0 = 0x%X.\n", phy_data);
-
-               nes_read_1G_phy_reg(nesdev, 0x17, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x17 = 0x%X.\n", phy_data);
-
-               nes_read_1G_phy_reg(nesdev, 0x1e, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x1e = 0x%X.\n", phy_data);
+               nes_write_1G_phy_reg(nesdev, 0, phy_index,  phy_data);
+               nes_read_1G_phy_reg(nesdev, 0, phy_index, &phy_data);
+               nes_read_1G_phy_reg(nesdev, 0x17, phy_index, &phy_data);
+               nes_read_1G_phy_reg(nesdev, 0x1e, phy_index, &phy_data);
 
                /* Setting the interrupt mask */
-               nes_read_1G_phy_reg(nesdev, 0x19, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x19 = 0x%X.\n", phy_data);
-               nes_write_1G_phy_reg(nesdev, 0x19, nesadapter->phy_index[mac_index], 0xffee);
-
-               nes_read_1G_phy_reg(nesdev, 0x19, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x19 = 0x%X.\n", phy_data);
+               nes_read_1G_phy_reg(nesdev, 0x19, phy_index, &phy_data);
+               nes_write_1G_phy_reg(nesdev, 0x19, phy_index, 0xffee);
+               nes_read_1G_phy_reg(nesdev, 0x19, phy_index, &phy_data);
 
                /* turning on flow control */
-               nes_read_1G_phy_reg(nesdev, 4, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x4 = 0x%X.\n", phy_data);
-               nes_write_1G_phy_reg(nesdev, 4, nesadapter->phy_index[mac_index],
-                               (phy_data & ~(0x03E0)) | 0xc00);
-               /* nes_write_1G_phy_reg(nesdev, 4, nesadapter->phy_index[mac_index],
-                               phy_data | 0xc00); */
-               nes_read_1G_phy_reg(nesdev, 4, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x4 = 0x%X.\n", phy_data);
-
-               nes_read_1G_phy_reg(nesdev, 9, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x9 = 0x%X.\n", phy_data);
-               /* Clear Half duplex */
-               nes_write_1G_phy_reg(nesdev, 9, nesadapter->phy_index[mac_index],
-                               phy_data & ~(0x0100));
-               nes_read_1G_phy_reg(nesdev, 9, nesadapter->phy_index[mac_index], &phy_data);
-               nes_debug(NES_DBG_PHY, "Phy data from register 0x9 = 0x%X.\n", phy_data);
-
-               nes_read_1G_phy_reg(nesdev, 0, nesadapter->phy_index[mac_index], &phy_data);
-               nes_write_1G_phy_reg(nesdev, 0, nesadapter->phy_index[mac_index], phy_data | 0x0300);
-       } else {
-               if ((nesadapter->phy_type[mac_index] == NES_PHY_TYPE_IRIS) ||
-                   (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_ARGUS)) {
-                       /* setup 10G MDIO operation */
-                       tx_config = nes_read_indexed(nesdev, NES_IDX_MAC_TX_CONFIG);
-                       tx_config &= 0xFFFFFFE3;
-                       tx_config |= 0x15;
-                       nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONFIG, tx_config);
-               }
-               if ((nesadapter->phy_type[mac_index] == NES_PHY_TYPE_ARGUS)) {
-                       nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0xd7ee);
+               nes_read_1G_phy_reg(nesdev, 4, phy_index, &phy_data);
+               nes_write_1G_phy_reg(nesdev, 4, phy_index, (phy_data & ~(0x03E0)) | 0xc00);
+               nes_read_1G_phy_reg(nesdev, 4, phy_index, &phy_data);
 
-                       temp_phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
-                       mdelay(10);
-                       nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0xd7ee);
-                       temp_phy_data2 = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+               /* Clear Half duplex */
+               nes_read_1G_phy_reg(nesdev, 9, phy_index, &phy_data);
+               nes_write_1G_phy_reg(nesdev, 9, phy_index, phy_data & ~(0x0100));
+               nes_read_1G_phy_reg(nesdev, 9, phy_index, &phy_data);
 
-                       /*
-                        * if firmware is already running (like from a
-                        * driver un-load/load, don't do anything.
-                        */
-                       if (temp_phy_data == temp_phy_data2) {
-                               /* configure QT2505 AMCC PHY */
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0x0000, 0x8000);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xc300, 0x0000);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xc302, 0x0044);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xc318, 0x0052);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xc319, 0x0008);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xc31a, 0x0098);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0x0026, 0x0E00);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0x0027, 0x0001);
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0x0028, 0xA528);
+               nes_read_1G_phy_reg(nesdev, 0, phy_index, &phy_data);
+               nes_write_1G_phy_reg(nesdev, 0, phy_index, phy_data | 0x0300);
 
-                               /*
-                                * remove micro from reset; chip boots from ROM,
-                                * uploads EEPROM f/w image, uC executes f/w
-                                */
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xc300, 0x0002);
+               return 0;
+       }
 
-                               /*
-                                * wait for heart beat to start to
-                                * know loading is done
-                                */
-                               counter = 0;
-                               do {
-                                       nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0xd7ee);
-                                       temp_phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
-                                       if (counter++ > 1000) {
-                                               nes_debug(NES_DBG_PHY, "AMCC PHY- breaking from heartbeat check <this is bad!!!> \n");
-                                               break;
-                                       }
-                                       mdelay(100);
-                                       nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0xd7ee);
-                                       temp_phy_data2 = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
-                               } while ((temp_phy_data2 == temp_phy_data));
+       if ((phy_type == NES_PHY_TYPE_IRIS) ||
+           (phy_type == NES_PHY_TYPE_ARGUS) ||
+           (phy_type == NES_PHY_TYPE_SFP_D)) {
+               /* setup 10G MDIO operation */
+               tx_config = nes_read_indexed(nesdev, NES_IDX_MAC_TX_CONFIG);
+               tx_config &= 0xFFFFFFE3;
+               tx_config |= 0x15;
+               nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONFIG, tx_config);
+       }
+       if ((phy_type == NES_PHY_TYPE_ARGUS) ||
+           (phy_type == NES_PHY_TYPE_SFP_D)) {
+               /* Check firmware heartbeat */
+               nes_read_10G_phy_reg(nesdev, phy_index, 0x3, 0xd7ee);
+               temp_phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+               udelay(1500);
+               nes_read_10G_phy_reg(nesdev, phy_index, 0x3, 0xd7ee);
+               temp_phy_data2 = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+
+               if (temp_phy_data != temp_phy_data2)
+                       return 0;
 
-                               /*
-                                * wait for tracking to start to know
-                                * f/w is good to go
-                                */
-                               counter = 0;
-                               do {
-                                       nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x3, 0xd7fd);
-                                       temp_phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
-                                       if (counter++ > 1000) {
-                                               nes_debug(NES_DBG_PHY, "AMCC PHY- breaking from status check <this is bad!!!> \n");
-                                               break;
-                                       }
-                                       mdelay(1000);
-                                       /*
-                                        * nes_debug(NES_DBG_PHY, "AMCC PHY- phy_status not ready yet = 0x%02X\n",
-                                        *                      temp_phy_data);
-                                        */
-                               } while (((temp_phy_data & 0xff) != 0x50) && ((temp_phy_data & 0xff) != 0x70));
-
-                               /* set LOS Control invert RXLOSB_I_PADINV */
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xd003, 0x0000);
-                               /* set LOS Control to mask of RXLOSB_I */
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xc314, 0x0042);
-                               /* set LED1 to input mode (LED1 and LED2 share same LED) */
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xd006, 0x0007);
-                               /* set LED2 to RX link_status and activity */
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xd007, 0x000A);
-                               /* set LED3 to RX link_status */
-                               nes_write_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 0x1, 0xd008, 0x0009);
+               /* no heartbeat, configure the PHY */
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0x0000, 0x8000);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc300, 0x0000);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc316, 0x000A);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc318, 0x0052);
+               if (phy_type == NES_PHY_TYPE_ARGUS) {
+                       nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc302, 0x000C);
+                       nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc319, 0x0008);
+               } else {
+                       nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc302, 0x0004);
+                       nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc319, 0x0038);
+               }
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc31a, 0x0098);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x3, 0x0026, 0x0E00);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x3, 0x0027, 0x0001);
 
-                               /*
-                                * reset the res-calibration on t2
-                                * serdes; ensures it is stable after
-                                * the amcc phy is stable
-                                */
+               /* setup LEDs */
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xd006, 0x0007);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xd007, 0x000A);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xd008, 0x0009);
 
-                               sds_common_control0  = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0);
-                               sds_common_control0 |= 0x1;
-                               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, sds_common_control0);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x3, 0x0028, 0xA528);
 
-                               /* release the res-calibration reset */
-                               sds_common_control0 &= 0xfffffffe;
-                               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, sds_common_control0);
+               /* Bring PHY out of reset */
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc300, 0x0002);
 
-                               i = 0;
-                               while (((nes_read32(nesdev->regs + NES_SOFTWARE_RESET) & 0x00000040) != 0x00000040)
-                                               && (i++ < 5000)) {
-                                       /* mdelay(1); */
-                               }
+               /* Check for heartbeat */
+               counter = 0;
+               mdelay(690);
+               nes_read_10G_phy_reg(nesdev, phy_index, 0x3, 0xd7ee);
+               temp_phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+               do {
+                       if (counter++ > 150) {
+                               nes_debug(NES_DBG_PHY, "No PHY heartbeat\n");
+                               break;
+                       }
+                       mdelay(1);
+                       nes_read_10G_phy_reg(nesdev, phy_index, 0x3, 0xd7ee);
+                       temp_phy_data2 = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+               } while ((temp_phy_data2 == temp_phy_data));
 
-                               /*
-                                * wait for link train done before moving on,
-                                * or will get an interupt storm
-                                */
-                               counter = 0;
-                               do {
-                                       temp_phy_data = nes_read_indexed(nesdev, NES_IDX_PHY_PCS_CONTROL_STATUS0 +
-                                                               (0x200 * (nesdev->mac_index & 1)));
-                                       if (counter++ > 1000) {
-                                               nes_debug(NES_DBG_PHY, "AMCC PHY- breaking from link train wait <this is bad, link didnt train!!!>\n");
-                                               break;
-                                       }
-                                       mdelay(1);
-                               } while (((temp_phy_data & 0x0f1f0000) != 0x0f0f0000));
+               /* wait for tracking */
+               counter = 0;
+               do {
+                       nes_read_10G_phy_reg(nesdev, phy_index, 0x3, 0xd7fd);
+                       temp_phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+                       if (counter++ > 300) {
+                               nes_debug(NES_DBG_PHY, "PHY did not track\n");
+                               break;
                        }
-               }
+                       mdelay(10);
+               } while (((temp_phy_data & 0xff) != 0x50) && ((temp_phy_data & 0xff) != 0x70));
+
+               /* setup signal integrity */
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xd003, 0x0000);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xF00D, 0x00FE);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xF00E, 0x0032);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xF00F, 0x0002);
+               nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc314, 0x0063);
+
+               /* reset serdes */
+               sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0 +
+                                      mac_index * 0x200);
+               sds |= 0x1;
+               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0 +
+                                 mac_index * 0x200, sds);
+               sds &= 0xfffffffe;
+               nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0 +
+                                 mac_index * 0x200, sds);
+
+               counter = 0;
+               while (((nes_read32(nesdev->regs + NES_SOFTWARE_RESET) & 0x00000040) != 0x00000040)
+                               && (counter++ < 5000))
+                       ;
        }
        return 0;
 }
@@ -2359,6 +2335,7 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
        u16 temp_phy_data;
        u32 pcs_val  = 0x0f0f0000;
        u32 pcs_mask = 0x0f1f0000;
+       u32 cdr_ctrl;
 
        spin_lock_irqsave(&nesadapter->phy_lock, flags);
        if (nesadapter->mac_sw_state[mac_number] != NES_MAC_SW_IDLE) {
@@ -2473,6 +2450,7 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
                                break;
 
                        case NES_PHY_TYPE_ARGUS:
+                       case NES_PHY_TYPE_SFP_D:
                                /* clear the alarms */
                                nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 4, 0x0008);
                                nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 4, 0xc001);
@@ -2483,19 +2461,18 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
                                nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 1, 0x9004);
                                nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 1, 0x9005);
                                /* check link status */
-                               nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 1, 1);
+                               nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 1, 0x9003);
                                temp_phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
-                               u32temp = 100;
-                               do {
-                                       nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 1, 1);
 
-                                       phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
-                                       if ((phy_data == temp_phy_data) || (!(--u32temp)))
-                                               break;
-                                       temp_phy_data = phy_data;
-                               } while (1);
+                               nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 3, 0x0021);
+                               nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+                               nes_read_10G_phy_reg(nesdev, nesadapter->phy_index[mac_index], 3, 0x0021);
+                               phy_data = (u16)nes_read_indexed(nesdev, NES_IDX_MAC_MDIO_CONTROL);
+
+                               phy_data = (!temp_phy_data && (phy_data == 0x8000)) ? 0x4 : 0x0;
+
                                nes_debug(NES_DBG_PHY, "%s: Phy data = 0x%04X, link was %s.\n",
-                                       __func__, phy_data, nesadapter->mac_link_down ? "DOWN" : "UP");
+                                       __func__, phy_data, nesadapter->mac_link_down[mac_index] ? "DOWN" : "UP");
                                break;
 
                        case NES_PHY_TYPE_PUMA_1G:
@@ -2511,6 +2488,17 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
                }
 
                if (phy_data & 0x0004) {
+                       if (wide_ppm_offset &&
+                           (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_CX4) &&
+                           (nesadapter->hw_rev != NE020_REV)) {
+                               cdr_ctrl = nes_read_indexed(nesdev,
+                                                           NES_IDX_ETH_SERDES_CDR_CONTROL0 +
+                                                           mac_index * 0x200);
+                               nes_write_indexed(nesdev,
+                                                 NES_IDX_ETH_SERDES_CDR_CONTROL0 +
+                                                 mac_index * 0x200,
+                                                 cdr_ctrl | 0x000F0000);
+                       }
                        nesadapter->mac_link_down[mac_index] = 0;
                        list_for_each_entry(nesvnic, &nesadapter->nesvnic_list[mac_index], list) {
                                nes_debug(NES_DBG_PHY, "The Link is UP!!.  linkup was %d\n",
@@ -2525,6 +2513,17 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
                                }
                        }
                } else {
+                       if (wide_ppm_offset &&
+                           (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_CX4) &&
+                           (nesadapter->hw_rev != NE020_REV)) {
+                               cdr_ctrl = nes_read_indexed(nesdev,
+                                                           NES_IDX_ETH_SERDES_CDR_CONTROL0 +
+                                                           mac_index * 0x200);
+                               nes_write_indexed(nesdev,
+                                                 NES_IDX_ETH_SERDES_CDR_CONTROL0 +
+                                                 mac_index * 0x200,
+                                                 cdr_ctrl & 0xFFF0FFFF);
+                       }
                        nesadapter->mac_link_down[mac_index] = 1;
                        list_for_each_entry(nesvnic, &nesadapter->nesvnic_list[mac_index], list) {
                                nes_debug(NES_DBG_PHY, "The Link is Down!!. linkup was %d\n",
index f41a871..c3654c6 100644 (file)
 
 #include <linux/inet_lro.h>
 
+#define NES_PHY_TYPE_CX4       1
 #define NES_PHY_TYPE_1G        2
 #define NES_PHY_TYPE_IRIS      3
 #define NES_PHY_TYPE_ARGUS     4
 #define NES_PHY_TYPE_PUMA_1G   5
 #define NES_PHY_TYPE_PUMA_10G  6
 #define NES_PHY_TYPE_GLADIUS   7
+#define NES_PHY_TYPE_SFP_D     8
 
 #define NES_MULTICAST_PF_MAX 8
 
index ecb1f6f..c6e6611 100644 (file)
@@ -1426,49 +1426,55 @@ static int nes_netdev_get_settings(struct net_device *netdev, struct ethtool_cmd
        struct nes_vnic *nesvnic = netdev_priv(netdev);
        struct nes_device *nesdev = nesvnic->nesdev;
        struct nes_adapter *nesadapter = nesdev->nesadapter;
+       u32 mac_index = nesdev->mac_index;
+       u8 phy_type = nesadapter->phy_type[mac_index];
+       u8 phy_index = nesadapter->phy_index[mac_index];
        u16 phy_data;
 
        et_cmd->duplex = DUPLEX_FULL;
        et_cmd->port   = PORT_MII;
+       et_cmd->maxtxpkt = 511;
+       et_cmd->maxrxpkt = 511;
 
        if (nesadapter->OneG_Mode) {
                et_cmd->speed = SPEED_1000;
-               if (nesadapter->phy_type[nesdev->mac_index] == NES_PHY_TYPE_PUMA_1G) {
+               if (phy_type == NES_PHY_TYPE_PUMA_1G) {
                        et_cmd->supported   = SUPPORTED_1000baseT_Full;
                        et_cmd->advertising = ADVERTISED_1000baseT_Full;
                        et_cmd->autoneg     = AUTONEG_DISABLE;
                        et_cmd->transceiver = XCVR_INTERNAL;
-                       et_cmd->phy_address = nesdev->mac_index;
+                       et_cmd->phy_address = mac_index;
                } else {
-                       et_cmd->supported   = SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg;
-                       et_cmd->advertising = ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg;
-                       nes_read_1G_phy_reg(nesdev, 0, nesadapter->phy_index[nesdev->mac_index], &phy_data);
+                       et_cmd->supported   = SUPPORTED_1000baseT_Full
+                                           | SUPPORTED_Autoneg;
+                       et_cmd->advertising = ADVERTISED_1000baseT_Full
+                                           | ADVERTISED_Autoneg;
+                       nes_read_1G_phy_reg(nesdev, 0, phy_index, &phy_data);
                        if (phy_data & 0x1000)
                                et_cmd->autoneg = AUTONEG_ENABLE;
                        else
                                et_cmd->autoneg = AUTONEG_DISABLE;
                        et_cmd->transceiver = XCVR_EXTERNAL;
-                       et_cmd->phy_address = nesadapter->phy_index[nesdev->mac_index];
+                       et_cmd->phy_address = phy_index;
                }
+               return 0;
+       }
+       if ((phy_type == NES_PHY_TYPE_IRIS) ||
+           (phy_type == NES_PHY_TYPE_ARGUS) ||
+           (phy_type == NES_PHY_TYPE_SFP_D)) {
+               et_cmd->transceiver = XCVR_EXTERNAL;
+               et_cmd->port        = PORT_FIBRE;
+               et_cmd->supported   = SUPPORTED_FIBRE;
+               et_cmd->advertising = ADVERTISED_FIBRE;
+               et_cmd->phy_address = phy_index;
        } else {
-               if ((nesadapter->phy_type[nesdev->mac_index] == NES_PHY_TYPE_IRIS) ||
-                   (nesadapter->phy_type[nesdev->mac_index] == NES_PHY_TYPE_ARGUS)) {
-                       et_cmd->transceiver = XCVR_EXTERNAL;
-                       et_cmd->port        = PORT_FIBRE;
-                       et_cmd->supported   = SUPPORTED_FIBRE;
-                       et_cmd->advertising = ADVERTISED_FIBRE;
-                       et_cmd->phy_address = nesadapter->phy_index[nesdev->mac_index];
-               } else {
-                       et_cmd->transceiver = XCVR_INTERNAL;
-                       et_cmd->supported   = SUPPORTED_10000baseT_Full;
-                       et_cmd->advertising = ADVERTISED_10000baseT_Full;
-                       et_cmd->phy_address = nesdev->mac_index;
-               }
-               et_cmd->speed = SPEED_10000;
-               et_cmd->autoneg = AUTONEG_DISABLE;
+               et_cmd->transceiver = XCVR_INTERNAL;
+               et_cmd->supported   = SUPPORTED_10000baseT_Full;
+               et_cmd->advertising = ADVERTISED_10000baseT_Full;
+               et_cmd->phy_address = mac_index;
        }
-       et_cmd->maxtxpkt = 511;
-       et_cmd->maxrxpkt = 511;
+       et_cmd->speed = SPEED_10000;
+       et_cmd->autoneg = AUTONEG_DISABLE;
        return 0;
 }
 
index 5a76a55..4c57f32 100644 (file)
@@ -70,12 +70,14 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
         */
        if (ppriv->pkey == pkey) {
                result = -ENOTUNIQ;
+               priv = NULL;
                goto err;
        }
 
        list_for_each_entry(priv, &ppriv->child_intfs, list) {
                if (priv->pkey == pkey) {
                        result = -ENOTUNIQ;
+                       priv = NULL;
                        goto err;
                }
        }
@@ -96,7 +98,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
 
        result = ipoib_set_dev_features(priv, ppriv->ca);
        if (result)
-               goto device_init_failed;
+               goto err;
 
        priv->pkey = pkey;
 
@@ -109,7 +111,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
                ipoib_warn(ppriv, "failed to initialize subinterface: "
                           "device %s, port %d",
                           ppriv->ca->name, ppriv->port);
-               goto device_init_failed;
+               goto err;
        }
 
        result = register_netdevice(priv->dev);
@@ -146,19 +148,19 @@ sysfs_failed:
 register_failed:
        ipoib_dev_cleanup(priv->dev);
 
-device_init_failed:
-       free_netdev(priv->dev);
-
 err:
        mutex_unlock(&ppriv->vlan_mutex);
        rtnl_unlock();
+       if (priv)
+               free_netdev(priv->dev);
+
        return result;
 }
 
 int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
 {
        struct ipoib_dev_priv *ppriv, *priv, *tpriv;
-       int ret = -ENOENT;
+       struct net_device *dev = NULL;
 
        if (!capable(CAP_NET_ADMIN))
                return -EPERM;
@@ -172,14 +174,17 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
                        unregister_netdevice(priv->dev);
                        ipoib_dev_cleanup(priv->dev);
                        list_del(&priv->list);
-                       free_netdev(priv->dev);
-
-                       ret = 0;
+                       dev = priv->dev;
                        break;
                }
        }
        mutex_unlock(&ppriv->vlan_mutex);
        rtnl_unlock();
 
-       return ret;
+       if (dev) {
+               free_netdev(dev);
+               return 0;
+       }
+
+       return -ENODEV;
 }
index 831ddce..781c404 100644 (file)
@@ -821,7 +821,7 @@ static void read_iso_callback(struct urb *urb)
                /* pass URB to tasklet */
                ubc->isoindone = urb;
                ubc->isoinstatus = status;
-               tasklet_schedule(&ubc->rcvd_tasklet);
+               tasklet_hi_schedule(&ubc->rcvd_tasklet);
        } else {
                /* tasklet still busy, drop data and resubmit URB */
                ubc->loststatus = status;
@@ -888,7 +888,7 @@ static void write_iso_callback(struct urb *urb)
        ubc->isooutovfl = ubc->isooutdone;
        ubc->isooutdone = ucx;
        spin_unlock_irqrestore(&ubc->isooutlock, flags);
-       tasklet_schedule(&ubc->sent_tasklet);
+       tasklet_hi_schedule(&ubc->sent_tasklet);
 }
 
 /* starturbs
index 311e7ca..820a309 100644 (file)
@@ -193,7 +193,9 @@ static void if_close(struct tty_struct *tty, struct file *filp)
 
        mutex_lock(&cs->mutex);
 
-       if (!cs->open_count)
+       if (!cs->connected)
+               gig_dbg(DEBUG_IF, "not connected");     /* nothing to do */
+       else if (!cs->open_count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else {
                if (!--cs->open_count) {
@@ -228,7 +230,10 @@ static int if_ioctl(struct tty_struct *tty, struct file *file,
        if (mutex_lock_interruptible(&cs->mutex))
                return -ERESTARTSYS; // FIXME -EINTR?
 
-       if (!cs->open_count)
+       if (!cs->connected) {
+               gig_dbg(DEBUG_IF, "not connected");
+               retval = -ENODEV;
+       } else if (!cs->open_count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else {
                retval = 0;
@@ -248,13 +253,6 @@ static int if_ioctl(struct tty_struct *tty, struct file *file,
                                retval = put_user(int_arg, (int __user *) arg);
                        break;
                case GIGASET_BRKCHARS:
-                       //FIXME test if MS_LOCKED
-                       if (!cs->connected) {
-                               gig_dbg(DEBUG_ANY,
-                                   "can't communicate with unplugged device");
-                               retval = -ENODEV;
-                               break;
-                       }
                        retval = copy_from_user(&buf,
                                        (const unsigned char __user *) arg, 6)
                                ? -EFAULT : 0;
@@ -331,7 +329,7 @@ static int if_tiocmset(struct tty_struct *tty, struct file *file,
                return -ERESTARTSYS; // FIXME -EINTR?
 
        if (!cs->connected) {
-               gig_dbg(DEBUG_ANY, "can't communicate with unplugged device");
+               gig_dbg(DEBUG_IF, "not connected");
                retval = -ENODEV;
        } else {
                mc = (cs->control_state | set) & ~clear & (TIOCM_RTS|TIOCM_DTR);
@@ -360,14 +358,14 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count)
        if (mutex_lock_interruptible(&cs->mutex))
                return -ERESTARTSYS; // FIXME -EINTR?
 
-       if (!cs->open_count)
+       if (!cs->connected) {
+               gig_dbg(DEBUG_IF, "not connected");
+               retval = -ENODEV;
+       } else if (!cs->open_count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else if (cs->mstate != MS_LOCKED) {
                dev_warn(cs->dev, "can't write to unlocked device\n");
                retval = -EBUSY;
-       } else if (!cs->connected) {
-               gig_dbg(DEBUG_ANY, "can't write to unplugged device");
-               retval = -EBUSY; //FIXME
        } else {
                retval = cs->ops->write_cmd(cs, buf, count,
                                            &cs->if_wake_tasklet);
@@ -394,14 +392,14 @@ static int if_write_room(struct tty_struct *tty)
        if (mutex_lock_interruptible(&cs->mutex))
                return -ERESTARTSYS; // FIXME -EINTR?
 
-       if (!cs->open_count)
+       if (!cs->connected) {
+               gig_dbg(DEBUG_IF, "not connected");
+               retval = -ENODEV;
+       } else if (!cs->open_count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else if (cs->mstate != MS_LOCKED) {
                dev_warn(cs->dev, "can't write to unlocked device\n");
                retval = -EBUSY;
-       } else if (!cs->connected) {
-               gig_dbg(DEBUG_ANY, "can't write to unplugged device");
-               retval = -EBUSY; //FIXME
        } else
                retval = cs->ops->write_room(cs);
 
@@ -426,14 +424,14 @@ static int if_chars_in_buffer(struct tty_struct *tty)
        if (mutex_lock_interruptible(&cs->mutex))
                return -ERESTARTSYS; // FIXME -EINTR?
 
-       if (!cs->open_count)
+       if (!cs->connected) {
+               gig_dbg(DEBUG_IF, "not connected");
+               retval = -ENODEV;
+       } else if (!cs->open_count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else if (cs->mstate != MS_LOCKED) {
                dev_warn(cs->dev, "can't write to unlocked device\n");
                retval = -EBUSY;
-       } else if (!cs->connected) {
-               gig_dbg(DEBUG_ANY, "can't write to unplugged device");
-               retval = -EBUSY; //FIXME
        } else
                retval = cs->ops->chars_in_buffer(cs);
 
@@ -456,7 +454,9 @@ static void if_throttle(struct tty_struct *tty)
 
        mutex_lock(&cs->mutex);
 
-       if (!cs->open_count)
+       if (!cs->connected)
+               gig_dbg(DEBUG_IF, "not connected");     /* nothing to do */
+       else if (!cs->open_count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else {
                //FIXME
@@ -479,7 +479,9 @@ static void if_unthrottle(struct tty_struct *tty)
 
        mutex_lock(&cs->mutex);
 
-       if (!cs->open_count)
+       if (!cs->connected)
+               gig_dbg(DEBUG_IF, "not connected");     /* nothing to do */
+       else if (!cs->open_count)
                dev_warn(cs->dev, "%s: device not opened\n", __func__);
        else {
                //FIXME
@@ -506,13 +508,13 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old)
 
        mutex_lock(&cs->mutex);
 
-       if (!cs->open_count) {
-               dev_warn(cs->dev, "%s: device not opened\n", __func__);
+       if (!cs->connected) {
+               gig_dbg(DEBUG_IF, "not connected");
                goto out;
        }
 
-       if (!cs->connected) {
-               gig_dbg(DEBUG_ANY, "can't communicate with unplugged device");
+       if (!cs->open_count) {
+               dev_warn(cs->dev, "%s: device not opened\n", __func__);
                goto out;
        }
 
index f010965..823ceba 100644 (file)
@@ -1047,6 +1047,19 @@ static int populate_table(struct dm_table *table,
        return dm_table_complete(table);
 }
 
+static int table_prealloc_integrity(struct dm_table *t,
+                                   struct mapped_device *md)
+{
+       struct list_head *devices = dm_table_get_devices(t);
+       struct dm_dev_internal *dd;
+
+       list_for_each_entry(dd, devices, list)
+               if (bdev_get_integrity(dd->dm_dev.bdev))
+                       return blk_integrity_register(dm_disk(md), NULL);
+
+       return 0;
+}
+
 static int table_load(struct dm_ioctl *param, size_t param_size)
 {
        int r;
@@ -1068,6 +1081,14 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
                goto out;
        }
 
+       r = table_prealloc_integrity(t, md);
+       if (r) {
+               DMERR("%s: could not register integrity profile.",
+                     dm_device_name(md));
+               dm_table_destroy(t);
+               goto out;
+       }
+
        down_write(&_hash_lock);
        hc = dm_get_mdptr(md);
        if (!hc || hc->md != md) {
index 0a225da..3e3fc06 100644 (file)
@@ -297,7 +297,8 @@ static int run_complete_job(struct kcopyd_job *job)
        dm_kcopyd_notify_fn fn = job->fn;
        struct dm_kcopyd_client *kc = job->kc;
 
-       kcopyd_put_pages(kc, job->pages);
+       if (job->pages)
+               kcopyd_put_pages(kc, job->pages);
        mempool_free(job, kc->job_pool);
        fn(read_err, write_err, context);
 
@@ -461,6 +462,7 @@ static void segment_complete(int read_err, unsigned long write_err,
        sector_t progress = 0;
        sector_t count = 0;
        struct kcopyd_job *job = (struct kcopyd_job *) context;
+       struct dm_kcopyd_client *kc = job->kc;
 
        mutex_lock(&job->lock);
 
@@ -490,7 +492,7 @@ static void segment_complete(int read_err, unsigned long write_err,
 
        if (count) {
                int i;
-               struct kcopyd_job *sub_job = mempool_alloc(job->kc->job_pool,
+               struct kcopyd_job *sub_job = mempool_alloc(kc->job_pool,
                                                           GFP_NOIO);
 
                *sub_job = *job;
@@ -509,13 +511,16 @@ static void segment_complete(int read_err, unsigned long write_err,
        } else if (atomic_dec_and_test(&job->sub_jobs)) {
 
                /*
-                * To avoid a race we must keep the job around
-                * until after the notify function has completed.
-                * Otherwise the client may try and stop the job
-                * after we've completed.
+                * Queue the completion callback to the kcopyd thread.
+                *
+                * Some callers assume that all the completions are called
+                * from a single thread and don't race with each other.
+                *
+                * We must not call the callback directly here because this
+                * code may not be executing in the thread.
                 */
-               job->fn(read_err, write_err, job->context);
-               mempool_free(job, job->kc->job_pool);
+               push(&kc->complete_jobs, job);
+               wake(kc);
        }
 }
 
@@ -528,6 +533,8 @@ static void split_job(struct kcopyd_job *job)
 {
        int i;
 
+       atomic_inc(&job->kc->nr_jobs);
+
        atomic_set(&job->sub_jobs, SPLIT_COUNT);
        for (i = 0; i < SPLIT_COUNT; i++)
                segment_complete(0, 0u, job);
index bfa107f..79fb53e 100644 (file)
@@ -142,7 +142,6 @@ static struct target_type linear_target = {
        .status = linear_status,
        .ioctl  = linear_ioctl,
        .merge  = linear_merge,
-       .features = DM_TARGET_SUPPORTS_BARRIERS,
 };
 
 int __init dm_linear_init(void)
index e8361b1..429b50b 100644 (file)
@@ -52,8 +52,6 @@ struct dm_table {
        sector_t *highs;
        struct dm_target *targets;
 
-       unsigned barriers_supported:1;
-
        /*
         * Indicates the rw permissions for the new logical
         * device.  This should be a combination of FMODE_READ
@@ -243,7 +241,6 @@ int dm_table_create(struct dm_table **result, fmode_t mode,
 
        INIT_LIST_HEAD(&t->devices);
        atomic_set(&t->holders, 0);
-       t->barriers_supported = 1;
 
        if (!num_targets)
                num_targets = KEYS_PER_NODE;
@@ -751,10 +748,6 @@ int dm_table_add_target(struct dm_table *t, const char *type,
        /* FIXME: the plan is to combine high here and then have
         * the merge fn apply the target level restrictions. */
        combine_restrictions_low(&t->limits, &tgt->limits);
-
-       if (!(tgt->type->features & DM_TARGET_SUPPORTS_BARRIERS))
-               t->barriers_supported = 0;
-
        return 0;
 
  bad:
@@ -799,12 +792,6 @@ int dm_table_complete(struct dm_table *t)
 
        check_for_valid_limits(&t->limits);
 
-       /*
-        * We only support barriers if there is exactly one underlying device.
-        */
-       if (!list_is_singular(&t->devices))
-               t->barriers_supported = 0;
-
        /* how many indexes will the btree have ? */
        leaf_nodes = dm_div_up(t->num_targets, KEYS_PER_NODE);
        t->depth = 1 + int_log(leaf_nodes, CHILDREN_PER_NODE);
@@ -879,6 +866,45 @@ struct dm_target *dm_table_find_target(struct dm_table *t, sector_t sector)
        return &t->targets[(KEYS_PER_NODE * n) + k];
 }
 
+/*
+ * Set the integrity profile for this device if all devices used have
+ * matching profiles.
+ */
+static void dm_table_set_integrity(struct dm_table *t)
+{
+       struct list_head *devices = dm_table_get_devices(t);
+       struct dm_dev_internal *prev = NULL, *dd = NULL;
+
+       if (!blk_get_integrity(dm_disk(t->md)))
+               return;
+
+       list_for_each_entry(dd, devices, list) {
+               if (prev &&
+                   blk_integrity_compare(prev->dm_dev.bdev->bd_disk,
+                                         dd->dm_dev.bdev->bd_disk) < 0) {
+                       DMWARN("%s: integrity not set: %s and %s mismatch",
+                              dm_device_name(t->md),
+                              prev->dm_dev.bdev->bd_disk->disk_name,
+                              dd->dm_dev.bdev->bd_disk->disk_name);
+                       goto no_integrity;
+               }
+               prev = dd;
+       }
+
+       if (!prev || !bdev_get_integrity(prev->dm_dev.bdev))
+               goto no_integrity;
+
+       blk_integrity_register(dm_disk(t->md),
+                              bdev_get_integrity(prev->dm_dev.bdev));
+
+       return;
+
+no_integrity:
+       blk_integrity_register(dm_disk(t->md), NULL);
+
+       return;
+}
+
 void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q)
 {
        /*
@@ -899,6 +925,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q)
        else
                queue_flag_set_unlocked(QUEUE_FLAG_CLUSTER, q);
 
+       dm_table_set_integrity(t);
 }
 
 unsigned int dm_table_get_num_targets(struct dm_table *t)
@@ -1019,12 +1046,6 @@ struct mapped_device *dm_table_get_md(struct dm_table *t)
        return t->md;
 }
 
-int dm_table_barrier_ok(struct dm_table *t)
-{
-       return t->barriers_supported;
-}
-EXPORT_SYMBOL(dm_table_barrier_ok);
-
 EXPORT_SYMBOL(dm_vcalloc);
 EXPORT_SYMBOL(dm_get_device);
 EXPORT_SYMBOL(dm_put_device);
index 788ba96..8a994be 100644 (file)
@@ -89,12 +89,13 @@ union map_info *dm_get_mapinfo(struct bio *bio)
 /*
  * Bits for the md->flags field.
  */
-#define DMF_BLOCK_IO 0
+#define DMF_BLOCK_IO_FOR_SUSPEND 0
 #define DMF_SUSPENDED 1
 #define DMF_FROZEN 2
 #define DMF_FREEING 3
 #define DMF_DELETING 4
 #define DMF_NOFLUSH_SUSPENDING 5
+#define DMF_QUEUE_IO_TO_THREAD 6
 
 /*
  * Work processed by per-device workqueue.
@@ -124,6 +125,11 @@ struct mapped_device {
        spinlock_t deferred_lock;
 
        /*
+        * An error from the barrier request currently being processed.
+        */
+       int barrier_error;
+
+       /*
         * Processing queue (flush/barriers)
         */
        struct workqueue_struct *wq;
@@ -424,6 +430,10 @@ static void end_io_acct(struct dm_io *io)
        part_stat_add(cpu, &dm_disk(md)->part0, ticks[rw], duration);
        part_stat_unlock();
 
+       /*
+        * After this is decremented the bio must not be touched if it is
+        * a barrier.
+        */
        dm_disk(md)->part0.in_flight = pending =
                atomic_dec_return(&md->pending);
 
@@ -435,21 +445,18 @@ static void end_io_acct(struct dm_io *io)
 /*
  * Add the bio to the list of deferred io.
  */
-static int queue_io(struct mapped_device *md, struct bio *bio)
+static void queue_io(struct mapped_device *md, struct bio *bio)
 {
        down_write(&md->io_lock);
 
-       if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
-               up_write(&md->io_lock);
-               return 1;
-       }
-
        spin_lock_irq(&md->deferred_lock);
        bio_list_add(&md->deferred, bio);
        spin_unlock_irq(&md->deferred_lock);
 
+       if (!test_and_set_bit(DMF_QUEUE_IO_TO_THREAD, &md->flags))
+               queue_work(md->wq, &md->work);
+
        up_write(&md->io_lock);
-       return 0;               /* deferred successfully */
 }
 
 /*
@@ -533,25 +540,35 @@ static void dec_pending(struct dm_io *io, int error)
                         */
                        spin_lock_irqsave(&md->deferred_lock, flags);
                        if (__noflush_suspending(md))
-                               bio_list_add(&md->deferred, io->bio);
+                               bio_list_add_head(&md->deferred, io->bio);
                        else
                                /* noflush suspend was interrupted. */
                                io->error = -EIO;
                        spin_unlock_irqrestore(&md->deferred_lock, flags);
                }
 
-               end_io_acct(io);
-
                io_error = io->error;
                bio = io->bio;
 
-               free_io(md, io);
+               if (bio_barrier(bio)) {
+                       /*
+                        * There can be just one barrier request so we use
+                        * a per-device variable for error reporting.
+                        * Note that you can't touch the bio after end_io_acct
+                        */
+                       md->barrier_error = io_error;
+                       end_io_acct(io);
+               } else {
+                       end_io_acct(io);
 
-               if (io_error != DM_ENDIO_REQUEUE) {
-                       trace_block_bio_complete(md->queue, bio);
+                       if (io_error != DM_ENDIO_REQUEUE) {
+                               trace_block_bio_complete(md->queue, bio);
 
-                       bio_endio(bio, io_error);
+                               bio_endio(bio, io_error);
+                       }
                }
+
+               free_io(md, io);
        }
 }
 
@@ -693,13 +710,19 @@ static struct bio *split_bvec(struct bio *bio, sector_t sector,
 
        clone->bi_sector = sector;
        clone->bi_bdev = bio->bi_bdev;
-       clone->bi_rw = bio->bi_rw;
+       clone->bi_rw = bio->bi_rw & ~(1 << BIO_RW_BARRIER);
        clone->bi_vcnt = 1;
        clone->bi_size = to_bytes(len);
        clone->bi_io_vec->bv_offset = offset;
        clone->bi_io_vec->bv_len = clone->bi_size;
        clone->bi_flags |= 1 << BIO_CLONED;
 
+       if (bio_integrity(bio)) {
+               bio_integrity_clone(clone, bio, GFP_NOIO);
+               bio_integrity_trim(clone,
+                                  bio_sector_offset(bio, idx, offset), len);
+       }
+
        return clone;
 }
 
@@ -714,6 +737,7 @@ static struct bio *clone_bio(struct bio *bio, sector_t sector,
 
        clone = bio_alloc_bioset(GFP_NOIO, bio->bi_max_vecs, bs);
        __bio_clone(clone, bio);
+       clone->bi_rw &= ~(1 << BIO_RW_BARRIER);
        clone->bi_destructor = dm_bio_destructor;
        clone->bi_sector = sector;
        clone->bi_idx = idx;
@@ -721,6 +745,14 @@ static struct bio *clone_bio(struct bio *bio, sector_t sector,
        clone->bi_size = to_bytes(len);
        clone->bi_flags &= ~(1 << BIO_SEG_VALID);
 
+       if (bio_integrity(bio)) {
+               bio_integrity_clone(clone, bio, GFP_NOIO);
+
+               if (idx != bio->bi_idx || clone->bi_size < bio->bi_size)
+                       bio_integrity_trim(clone,
+                                          bio_sector_offset(bio, idx, 0), len);
+       }
+
        return clone;
 }
 
@@ -834,14 +866,13 @@ static void __split_and_process_bio(struct mapped_device *md, struct bio *bio)
 
        ci.map = dm_get_table(md);
        if (unlikely(!ci.map)) {
-               bio_io_error(bio);
-               return;
-       }
-       if (unlikely(bio_barrier(bio) && !dm_table_barrier_ok(ci.map))) {
-               dm_table_put(ci.map);
-               bio_endio(bio, -EOPNOTSUPP);
+               if (!bio_barrier(bio))
+                       bio_io_error(bio);
+               else
+                       md->barrier_error = -EIO;
                return;
        }
+
        ci.md = md;
        ci.bio = bio;
        ci.io = alloc_io(md);
@@ -918,7 +949,6 @@ out:
  */
 static int dm_request(struct request_queue *q, struct bio *bio)
 {
-       int r = -EIO;
        int rw = bio_data_dir(bio);
        struct mapped_device *md = q->queuedata;
        int cpu;
@@ -931,34 +961,27 @@ static int dm_request(struct request_queue *q, struct bio *bio)
        part_stat_unlock();
 
        /*
-        * If we're suspended we have to queue
-        * this io for later.
+        * If we're suspended or the thread is processing barriers
+        * we have to queue this io for later.
         */
-       while (test_bit(DMF_BLOCK_IO, &md->flags)) {
+       if (unlikely(test_bit(DMF_QUEUE_IO_TO_THREAD, &md->flags)) ||
+           unlikely(bio_barrier(bio))) {
                up_read(&md->io_lock);
 
-               if (bio_rw(bio) != READA)
-                       r = queue_io(md, bio);
+               if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) &&
+                   bio_rw(bio) == READA) {
+                       bio_io_error(bio);
+                       return 0;
+               }
 
-               if (r <= 0)
-                       goto out_req;
+               queue_io(md, bio);
 
-               /*
-                * We're in a while loop, because someone could suspend
-                * before we get to the following read lock.
-                */
-               down_read(&md->io_lock);
+               return 0;
        }
 
        __split_and_process_bio(md, bio);
        up_read(&md->io_lock);
        return 0;
-
-out_req:
-       if (r < 0)
-               bio_io_error(bio);
-
-       return 0;
 }
 
 static void dm_unplug_all(struct request_queue *q)
@@ -978,7 +1001,7 @@ static int dm_any_congested(void *congested_data, int bdi_bits)
        struct mapped_device *md = congested_data;
        struct dm_table *map;
 
-       if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
+       if (!test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) {
                map = dm_get_table(md);
                if (map) {
                        r = dm_table_any_congested(map, bdi_bits);
@@ -1193,6 +1216,7 @@ static void free_dev(struct mapped_device *md)
        mempool_destroy(md->tio_pool);
        mempool_destroy(md->io_pool);
        bioset_free(md->bs);
+       blk_integrity_unregister(md->disk);
        del_gendisk(md->disk);
        free_minor(minor);
 
@@ -1406,6 +1430,36 @@ static int dm_wait_for_completion(struct mapped_device *md, int interruptible)
        return r;
 }
 
+static int dm_flush(struct mapped_device *md)
+{
+       dm_wait_for_completion(md, TASK_UNINTERRUPTIBLE);
+       return 0;
+}
+
+static void process_barrier(struct mapped_device *md, struct bio *bio)
+{
+       int error = dm_flush(md);
+
+       if (unlikely(error)) {
+               bio_endio(bio, error);
+               return;
+       }
+       if (bio_empty_barrier(bio)) {
+               bio_endio(bio, 0);
+               return;
+       }
+
+       __split_and_process_bio(md, bio);
+
+       error = dm_flush(md);
+
+       if (!error && md->barrier_error)
+               error = md->barrier_error;
+
+       if (md->barrier_error != DM_ENDIO_REQUEUE)
+               bio_endio(bio, error);
+}
+
 /*
  * Process the deferred bios
  */
@@ -1417,25 +1471,34 @@ static void dm_wq_work(struct work_struct *work)
 
        down_write(&md->io_lock);
 
-next_bio:
-       spin_lock_irq(&md->deferred_lock);
-       c = bio_list_pop(&md->deferred);
-       spin_unlock_irq(&md->deferred_lock);
+       while (!test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) {
+               spin_lock_irq(&md->deferred_lock);
+               c = bio_list_pop(&md->deferred);
+               spin_unlock_irq(&md->deferred_lock);
 
-       if (c) {
-               __split_and_process_bio(md, c);
-               goto next_bio;
-       }
+               if (!c) {
+                       clear_bit(DMF_QUEUE_IO_TO_THREAD, &md->flags);
+                       break;
+               }
 
-       clear_bit(DMF_BLOCK_IO, &md->flags);
+               up_write(&md->io_lock);
+
+               if (bio_barrier(c))
+                       process_barrier(md, c);
+               else
+                       __split_and_process_bio(md, c);
+
+               down_write(&md->io_lock);
+       }
 
        up_write(&md->io_lock);
 }
 
 static void dm_queue_flush(struct mapped_device *md)
 {
+       clear_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags);
+       smp_mb__after_clear_bit();
        queue_work(md->wq, &md->work);
-       flush_workqueue(md->wq);
 }
 
 /*
@@ -1553,20 +1616,36 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
        }
 
        /*
-        * First we set the BLOCK_IO flag so no more ios will be mapped.
+        * Here we must make sure that no processes are submitting requests
+        * to target drivers i.e. no one may be executing
+        * __split_and_process_bio. This is called from dm_request and
+        * dm_wq_work.
+        *
+        * To get all processes out of __split_and_process_bio in dm_request,
+        * we take the write lock. To prevent any process from reentering
+        * __split_and_process_bio from dm_request, we set
+        * DMF_QUEUE_IO_TO_THREAD.
+        *
+        * To quiesce the thread (dm_wq_work), we set DMF_BLOCK_IO_FOR_SUSPEND
+        * and call flush_workqueue(md->wq). flush_workqueue will wait until
+        * dm_wq_work exits and DMF_BLOCK_IO_FOR_SUSPEND will prevent any
+        * further calls to __split_and_process_bio from dm_wq_work.
         */
        down_write(&md->io_lock);
-       set_bit(DMF_BLOCK_IO, &md->flags);
-
+       set_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags);
+       set_bit(DMF_QUEUE_IO_TO_THREAD, &md->flags);
        up_write(&md->io_lock);
 
+       flush_workqueue(md->wq);
+
        /*
-        * Wait for the already-mapped ios to complete.
+        * At this point no more requests are entering target request routines.
+        * We call dm_wait_for_completion to wait for all existing requests
+        * to finish.
         */
        r = dm_wait_for_completion(md, TASK_INTERRUPTIBLE);
 
        down_write(&md->io_lock);
-
        if (noflush)
                clear_bit(DMF_NOFLUSH_SUSPENDING, &md->flags);
        up_write(&md->io_lock);
@@ -1579,6 +1658,12 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
                goto out; /* pushback list is already flushed, so skip flush */
        }
 
+       /*
+        * If dm_wait_for_completion returned 0, the device is completely
+        * quiescent now. There is no request-processing activity. All new
+        * requests are being added to md->deferred list.
+        */
+
        dm_table_postsuspend_targets(map);
 
        set_bit(DMF_SUSPENDED, &md->flags);
index b48397c..a31506d 100644 (file)
@@ -52,7 +52,6 @@ int dm_table_any_congested(struct dm_table *t, int bdi_bits);
  * To check the return value from dm_table_find_target().
  */
 #define dm_target_is_valid(t) ((t)->table)
-int dm_table_barrier_ok(struct dm_table *t);
 
 /*-----------------------------------------------------------------
  * A registry of target types.
index f2247b0..274b491 100644 (file)
@@ -586,7 +586,7 @@ static int raid1_congested(void *data, int bits)
                        /* Note the '|| 1' - when read_balance prefers
                         * non-congested targets, it can be removed
                         */
-                       if ((bits & (1<<BDI_write_congested)) || 1)
+                       if ((bits & (1<<BDI_async_congested)) || 1)
                                ret |= bdi_congested(&q->backing_dev_info, bits);
                        else
                                ret &= bdi_congested(&q->backing_dev_info, bits);
index 5b20cf5..971a8b1 100644 (file)
@@ -662,7 +662,7 @@ static int __devinit dm1105_probe(struct pci_dev *pdev,
        if (ret < 0)
                goto err_kfree;
 
-       ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (ret < 0)
                goto err_pci_disable_device;
 
index 6103caa..60955a7 100644 (file)
@@ -294,7 +294,7 @@ config DVB_USB_DTV5100
 
 config DVB_USB_AF9015
        tristate "Afatech AF9015 DVB-T USB2.0 support"
-       depends on DVB_USB && EXPERIMENTAL
+       depends on DVB_USB
        select DVB_AF9013
        select DVB_PLL              if !DVB_FE_CUSTOMISE
        select MEDIA_TUNER_MT2060   if !MEDIA_TUNER_CUSTOMISE
@@ -309,6 +309,6 @@ config DVB_USB_CE6230
        tristate "Intel CE6230 DVB-T USB2.0 support"
        depends on DVB_USB && EXPERIMENTAL
        select DVB_ZL10353
-       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE
        help
          Say Y here to support the Intel CE6230 DVB-T USB2.0 receiver
index f0ba8b0..53bfc8e 100644 (file)
@@ -782,17 +782,14 @@ static int af9015_read_config(struct usb_device *udev)
                                  ARRAY_SIZE(af9015_ir_table_leadtek);
                                break;
                        case USB_VID_VISIONPLUS:
-                               if (udev->descriptor.idProduct ==
-                               cpu_to_le16(USB_PID_AZUREWAVE_AD_TU700)) {
-                                       af9015_properties[i].rc_key_map =
-                                         af9015_rc_keys_twinhan;
-                                       af9015_properties[i].rc_key_map_size =
-                                         ARRAY_SIZE(af9015_rc_keys_twinhan);
-                                       af9015_config.ir_table =
-                                         af9015_ir_table_twinhan;
-                                       af9015_config.ir_table_size =
-                                         ARRAY_SIZE(af9015_ir_table_twinhan);
-                               }
+                               af9015_properties[i].rc_key_map =
+                                 af9015_rc_keys_twinhan;
+                               af9015_properties[i].rc_key_map_size =
+                                 ARRAY_SIZE(af9015_rc_keys_twinhan);
+                               af9015_config.ir_table =
+                                 af9015_ir_table_twinhan;
+                               af9015_config.ir_table_size =
+                                 ARRAY_SIZE(af9015_ir_table_twinhan);
                                break;
                        case USB_VID_KWORLD_2:
                                /* TODO: use correct rc keys */
@@ -833,6 +830,16 @@ static int af9015_read_config(struct usb_device *udev)
                                          af9015_ir_table_msi;
                                        af9015_config.ir_table_size =
                                          ARRAY_SIZE(af9015_ir_table_msi);
+                               } else if (udev->descriptor.idProduct ==
+                                       cpu_to_le16(USB_PID_TREKSTOR_DVBT)) {
+                                       af9015_properties[i].rc_key_map =
+                                         af9015_rc_keys_trekstor;
+                                       af9015_properties[i].rc_key_map_size =
+                                         ARRAY_SIZE(af9015_rc_keys_trekstor);
+                                       af9015_config.ir_table =
+                                         af9015_ir_table_trekstor;
+                                       af9015_config.ir_table_size =
+                                         ARRAY_SIZE(af9015_ir_table_trekstor);
                                }
                                break;
                        case USB_VID_AVERMEDIA:
@@ -981,6 +988,21 @@ error:
        if (ret)
                err("eeprom read failed:%d", ret);
 
+       /* AverMedia AVerTV Volar Black HD (A850) device have bad EEPROM
+          content :-( Override some wrong values here. */
+       if (le16_to_cpu(udev->descriptor.idVendor) == USB_VID_AVERMEDIA &&
+           le16_to_cpu(udev->descriptor.idProduct) == USB_PID_AVERMEDIA_A850) {
+               deb_info("%s: AverMedia A850: overriding config\n", __func__);
+               /* disable dual mode */
+               af9015_config.dual_mode = 0;
+                /* disable 2nd adapter */
+               for (i = 0; i < af9015_properties_count; i++)
+                       af9015_properties[i].num_adapters = 1;
+
+               /* set correct IF */
+               af9015_af9013_config[0].tuner_if = 4570;
+       }
+
        return ret;
 }
 
@@ -1237,6 +1259,9 @@ static struct usb_device_id af9015_usb_table[] = {
 /* 15 */{USB_DEVICE(USB_VID_MSI_2,     USB_PID_MSI_DIGI_VOX_MINI_III)},
        {USB_DEVICE(USB_VID_KWORLD_2,  USB_PID_KWORLD_395U)},
        {USB_DEVICE(USB_VID_KWORLD_2,  USB_PID_KWORLD_395U_2)},
+       {USB_DEVICE(USB_VID_KWORLD_2,  USB_PID_KWORLD_395U_3)},
+       {USB_DEVICE(USB_VID_AFATECH,   USB_PID_TREKSTOR_DVBT)},
+       {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850)},
        {0},
 };
 MODULE_DEVICE_TABLE(usb, af9015_usb_table);
@@ -1401,7 +1426,7 @@ static struct dvb_usb_device_properties af9015_properties[] = {
 
                .i2c_algo = &af9015_i2c_algo,
 
-               .num_device_descs = 7,
+               .num_device_descs = 9,
                .devices = {
                        {
                                .name = "Xtensions XD-380",
@@ -1437,7 +1462,19 @@ static struct dvb_usb_device_properties af9015_properties[] = {
                                .name = "KWorld USB DVB-T TV Stick II " \
                                        "(VS-DVB-T 395U)",
                                .cold_ids = {&af9015_usb_table[16],
-                                            &af9015_usb_table[17], NULL},
+                                            &af9015_usb_table[17],
+                                            &af9015_usb_table[18], NULL},
+                               .warm_ids = {NULL},
+                       },
+                       {
+                               .name = "TrekStor DVB-T USB Stick",
+                               .cold_ids = {&af9015_usb_table[19], NULL},
+                               .warm_ids = {NULL},
+                       },
+                       {
+                               .name = "AverMedia AVerTV Volar Black HD " \
+                                       "(A850)",
+                               .cold_ids = {&af9015_usb_table[20], NULL},
                                .warm_ids = {NULL},
                        },
                }
index 00e2571..8d81a17 100644 (file)
 
 #define AF9015_EEPROM_OFFSET (AF9015_EEPROM_SAW_BW2 - AF9015_EEPROM_SAW_BW1)
 
-#define AF9015_GPIO_ON (1 << 0)
-#define AF9015_GPIO_EN (1 << 1)
-#define AF9015_GPIO_O  (1 << 2)
-#define AF9015_GPIO_I  (1 << 3)
-
-#define AF9015_GPIO_TUNER_ON  (AF9015_GPIO_ON|AF9015_GPIO_EN)
-#define AF9015_GPIO_TUNER_OFF (AF9015_GPIO_ON|AF9015_GPIO_EN|AF9015_GPIO_O)
-
 struct req_t {
        u8  cmd;       /* [0] */
        /*  seq */     /* [1] */
@@ -120,11 +112,11 @@ struct af9015_config {
 
 enum af9015_remote {
        AF9015_REMOTE_NONE                    = 0,
-       AF9015_REMOTE_A_LINK_DTU_M,
+/* 1 */        AF9015_REMOTE_A_LINK_DTU_M,
        AF9015_REMOTE_MSI_DIGIVOX_MINI_II_V3,
        AF9015_REMOTE_MYGICTV_U718,
        AF9015_REMOTE_DIGITTRADE_DVB_T,
-       AF9015_REMOTE_AVERMEDIA_KS,
+/* 5 */        AF9015_REMOTE_AVERMEDIA_KS,
 };
 
 /* Leadtek WinFast DTV Dongle Gold */
@@ -691,4 +683,67 @@ static u8 af9015_ir_table_digittrade[] = {
        0x00, 0xff, 0x1d, 0xe2, 0x40, 0x00, 0x00,
 };
 
+/* TREKSTOR DVB-T USB Stick */
+static struct dvb_usb_rc_key af9015_rc_keys_trekstor[] = {
+       { 0x07, 0x04, KEY_AGAIN },              /* Home */
+       { 0x07, 0x05, KEY_MUTE },               /* Mute */
+       { 0x07, 0x06, KEY_UP },                 /* Up */
+       { 0x07, 0x07, KEY_DOWN },               /* Down */
+       { 0x07, 0x09, KEY_RIGHT },              /* Right */
+       { 0x07, 0x0a, KEY_ENTER },              /* OK */
+       { 0x07, 0x0b, KEY_FASTFORWARD },        /* Fast forward */
+       { 0x07, 0x0c, KEY_REWIND },             /* Rewind */
+       { 0x07, 0x0d, KEY_PLAY },               /* Play/Pause */
+       { 0x07, 0x0e, KEY_VOLUMEUP },           /* Volume + */
+       { 0x07, 0x0f, KEY_VOLUMEDOWN },         /* Volume - */
+       { 0x07, 0x10, KEY_RECORD },             /* Record */
+       { 0x07, 0x11, KEY_STOP },               /* Stop */
+       { 0x07, 0x12, KEY_ZOOM },               /* TV */
+       { 0x07, 0x13, KEY_EPG },                /* Info/EPG */
+       { 0x07, 0x14, KEY_CHANNELDOWN },        /* Channel - */
+       { 0x07, 0x15, KEY_CHANNELUP },          /* Channel + */
+       { 0x07, 0x1e, KEY_1 },
+       { 0x07, 0x1f, KEY_2 },
+       { 0x07, 0x20, KEY_3 },
+       { 0x07, 0x21, KEY_4 },
+       { 0x07, 0x22, KEY_5 },
+       { 0x07, 0x23, KEY_6 },
+       { 0x07, 0x24, KEY_7 },
+       { 0x07, 0x25, KEY_8 },
+       { 0x07, 0x26, KEY_9 },
+       { 0x07, 0x08, KEY_LEFT },               /* LEFT */
+       { 0x07, 0x27, KEY_0 },
+};
+
+static u8 af9015_ir_table_trekstor[] = {
+       0x00, 0xff, 0x86, 0x79, 0x04, 0x07, 0x00,
+       0x00, 0xff, 0x85, 0x7a, 0x05, 0x07, 0x00,
+       0x00, 0xff, 0x87, 0x78, 0x06, 0x07, 0x00,
+       0x00, 0xff, 0x8c, 0x73, 0x07, 0x07, 0x00,
+       0x00, 0xff, 0x89, 0x76, 0x09, 0x07, 0x00,
+       0x00, 0xff, 0x88, 0x77, 0x0a, 0x07, 0x00,
+       0x00, 0xff, 0x8a, 0x75, 0x0b, 0x07, 0x00,
+       0x00, 0xff, 0x9e, 0x61, 0x0c, 0x07, 0x00,
+       0x00, 0xff, 0x8d, 0x72, 0x0d, 0x07, 0x00,
+       0x00, 0xff, 0x8b, 0x74, 0x0e, 0x07, 0x00,
+       0x00, 0xff, 0x9b, 0x64, 0x0f, 0x07, 0x00,
+       0x00, 0xff, 0x9d, 0x62, 0x10, 0x07, 0x00,
+       0x00, 0xff, 0x8e, 0x71, 0x11, 0x07, 0x00,
+       0x00, 0xff, 0x9c, 0x63, 0x12, 0x07, 0x00,
+       0x00, 0xff, 0x8f, 0x70, 0x13, 0x07, 0x00,
+       0x00, 0xff, 0x93, 0x6c, 0x14, 0x07, 0x00,
+       0x00, 0xff, 0x97, 0x68, 0x15, 0x07, 0x00,
+       0x00, 0xff, 0x92, 0x6d, 0x1e, 0x07, 0x00,
+       0x00, 0xff, 0x96, 0x69, 0x1f, 0x07, 0x00,
+       0x00, 0xff, 0x9a, 0x65, 0x20, 0x07, 0x00,
+       0x00, 0xff, 0x91, 0x6e, 0x21, 0x07, 0x00,
+       0x00, 0xff, 0x95, 0x6a, 0x22, 0x07, 0x00,
+       0x00, 0xff, 0x99, 0x66, 0x23, 0x07, 0x00,
+       0x00, 0xff, 0x90, 0x6f, 0x24, 0x07, 0x00,
+       0x00, 0xff, 0x94, 0x6b, 0x25, 0x07, 0x00,
+       0x00, 0xff, 0x98, 0x67, 0x26, 0x07, 0x00,
+       0x00, 0xff, 0x9f, 0x60, 0x08, 0x07, 0x00,
+       0x00, 0xff, 0x84, 0x7b, 0x27, 0x07, 0x00,
+};
+
 #endif
index 5862820..52badc0 100644 (file)
@@ -250,6 +250,7 @@ static int ce6230_probe(struct usb_interface *intf,
 
 static struct usb_device_id ce6230_table[] = {
        { USB_DEVICE(USB_VID_INTEL, USB_PID_INTEL_CE9500) },
+       { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A310) },
        { } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, ce6230_table);
@@ -284,13 +285,18 @@ static struct dvb_usb_device_properties ce6230_properties = {
 
        .i2c_algo = &ce6230_i2c_algo,
 
-       .num_device_descs = 1,
+       .num_device_descs = 2,
        .devices = {
                {
                        .name = "Intel CE9500 reference design",
                        .cold_ids = {NULL},
                        .warm_ids = {&ce6230_table[0], NULL},
                },
+               {
+                       .name = "AVerMedia A310 USB 2.0 DVB-T tuner",
+                       .cold_ids = {NULL},
+                       .warm_ids = {&ce6230_table[1], NULL},
+               },
        }
 };
 
index dc7ea21..f506c74 100644 (file)
@@ -65,6 +65,7 @@
 #define USB_PID_AFATECH_AF9005                         0x9020
 #define USB_PID_AFATECH_AF9015_9015                    0x9015
 #define USB_PID_AFATECH_AF9015_9016                    0x9016
+#define USB_PID_TREKSTOR_DVBT                          0x901b
 #define USB_VID_ALINK_DTU                              0xf170
 #define USB_PID_ANSONIC_DVBT_USB                       0x6000
 #define USB_PID_ANYSEE                                 0x861f
 #define USB_PID_KWORLD_399U                            0xe399
 #define USB_PID_KWORLD_395U                            0xe396
 #define USB_PID_KWORLD_395U_2                          0xe39b
+#define USB_PID_KWORLD_395U_3                          0xe395
 #define USB_PID_KWORLD_PC160_2T                                0xc160
 #define USB_PID_KWORLD_VSTREAM_COLD                    0x17de
 #define USB_PID_KWORLD_VSTREAM_WARM                    0x17df
 #define USB_PID_AVERMEDIA_VOLAR_X                      0xa815
 #define USB_PID_AVERMEDIA_VOLAR_X_2                    0x8150
 #define USB_PID_AVERMEDIA_A309                         0xa309
+#define USB_PID_AVERMEDIA_A310                         0xa310
+#define USB_PID_AVERMEDIA_A850                         0x850a
 #define USB_PID_TECHNOTREND_CONNECT_S2400               0x3006
 #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY       0x005a
 #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2     0x0081
index 12f7730..32526f1 100644 (file)
@@ -151,7 +151,7 @@ static void debug_fcp(const u8 *data, int length)
                subunit_type = data[1] >> 3;
                subunit_id = data[1] & 7;
                op = subunit_type == 0x1e || subunit_id == 5 ? ~0 : data[2];
-               printk(KERN_INFO "%ssu=%x.%x l=%zu: %-8s - %s\n",
+               printk(KERN_INFO "%ssu=%x.%x l=%d: %-8s - %s\n",
                       prefix, subunit_type, subunit_id, length,
                       debug_fcp_ctype(data[0]),
                       debug_fcp_opcode(op, data, length));
index a486a7f..23e4cff 100644 (file)
@@ -513,6 +513,13 @@ config DVB_LGS8GL5
        help
          A DMB-TH tuner module. Say Y when you want to support this frontend.
 
+config DVB_LGS8GXX
+       tristate "Legend Silicon LGS8913/LGS8GL5/LGS8GXX DMB-TH demodulator"
+       depends on DVB_CORE && I2C
+       default m if DVB_FE_CUSTOMISE
+       help
+         A DMB-TH tuner module. Say Y when you want to support this frontend.
+
 comment "Tools to develop new frontends"
 
 config DVB_DUMMY_FE
index 65a336a..bc2b00a 100644 (file)
@@ -61,6 +61,7 @@ obj-$(CONFIG_DVB_TDA10048) += tda10048.o
 obj-$(CONFIG_DVB_TUNER_CX24113) += cx24113.o
 obj-$(CONFIG_DVB_S5H1411) += s5h1411.o
 obj-$(CONFIG_DVB_LGS8GL5) += lgs8gl5.o
+obj-$(CONFIG_DVB_LGS8GXX) += lgs8gxx.o
 obj-$(CONFIG_DVB_DUMMY_FE) += dvb_dummy_fe.o
 obj-$(CONFIG_DVB_AF9013) += af9013.o
 obj-$(CONFIG_DVB_CX24116) += cx24116.o
index d63e152..9e9a755 100644 (file)
@@ -652,7 +652,7 @@ static int au8522_reset(struct v4l2_subdev *sd, u32 val)
 }
 
 static int au8522_s_video_routing(struct v4l2_subdev *sd,
-                                 const struct v4l2_routing *route)
+                                       u32 input, u32 output, u32 config)
 {
        struct au8522_state *state = to_state(sd);
 
@@ -663,11 +663,11 @@ static int au8522_s_video_routing(struct v4l2_subdev *sd,
           closed), and then came back to analog mode */
        au8522_writereg(state, 0x106, 1);
 
-       if (route->input == AU8522_COMPOSITE_CH1) {
+       if (input == AU8522_COMPOSITE_CH1) {
                au8522_setup_cvbs_mode(state);
-       } else if (route->input == AU8522_SVIDEO_CH13) {
+       } else if (input == AU8522_SVIDEO_CH13) {
                au8522_setup_svideo_mode(state);
-       } else if (route->input == AU8522_COMPOSITE_CH4_SIF) {
+       } else if (input == AU8522_COMPOSITE_CH4_SIF) {
                au8522_setup_cvbs_tuner_mode(state);
        } else {
                printk(KERN_ERR "au8522 mode not currently supported\n");
@@ -677,10 +677,10 @@ static int au8522_s_video_routing(struct v4l2_subdev *sd,
 }
 
 static int au8522_s_audio_routing(struct v4l2_subdev *sd,
-                                 const struct v4l2_routing *route)
+                                       u32 input, u32 output, u32 config)
 {
        struct au8522_state *state = to_state(sd);
-       set_audio_input(state, route->input);
+       set_audio_input(state, input);
        return 0;
 }
 
diff --git a/drivers/media/dvb/frontends/lgs8gxx.c b/drivers/media/dvb/frontends/lgs8gxx.c
new file mode 100644 (file)
index 0000000..f9785df
--- /dev/null
@@ -0,0 +1,816 @@
+/*
+ *    Support for Legend Silicon DMB-TH demodulator
+ *    LGS8913, LGS8GL5
+ *    experimental support LGS8G42, LGS8G52
+ *
+ *    Copyright (C) 2007,2008 David T.L. Wong <davidtlwong@gmail.com>
+ *    Copyright (C) 2008 Sirius International (Hong Kong) Limited
+ *    Timothy Lee <timothy.lee@siriushk.com> (for initial work on LGS8GL5)
+ *
+ *    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.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <asm/div64.h>
+
+#include "dvb_frontend.h"
+
+#include "lgs8gxx.h"
+#include "lgs8gxx_priv.h"
+
+#define dprintk(args...) \
+       do { \
+               if (debug) \
+                       printk(KERN_DEBUG "lgs8gxx: " args); \
+       } while (0)
+
+static int debug;
+static int fake_signal_str;
+
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
+
+module_param(fake_signal_str, int, 0644);
+MODULE_PARM_DESC(fake_signal_str, "fake signal strength for LGS8913."
+"Signal strength calculation is slow.(default:off).");
+
+/* LGS8GXX internal helper functions */
+
+static int lgs8gxx_write_reg(struct lgs8gxx_state *priv, u8 reg, u8 data)
+{
+       int ret;
+       u8 buf[] = { reg, data };
+       struct i2c_msg msg = { .flags = 0, .buf = buf, .len = 2 };
+
+       msg.addr = priv->config->demod_address;
+       if (reg >= 0xC0)
+               msg.addr += 0x02;
+
+       if (debug >= 2)
+               printk(KERN_DEBUG "%s: reg=0x%02X, data=0x%02X\n",
+                       __func__, reg, data);
+
+       ret = i2c_transfer(priv->i2c, &msg, 1);
+
+       if (ret != 1)
+               dprintk(KERN_DEBUG "%s: error reg=0x%x, data=0x%x, ret=%i\n",
+                       __func__, reg, data, ret);
+
+       return (ret != 1) ? -1 : 0;
+}
+
+static int lgs8gxx_read_reg(struct lgs8gxx_state *priv, u8 reg, u8 *p_data)
+{
+       int ret;
+       u8 dev_addr;
+
+       u8 b0[] = { reg };
+       u8 b1[] = { 0 };
+       struct i2c_msg msg[] = {
+               { .flags = 0, .buf = b0, .len = 1 },
+               { .flags = I2C_M_RD, .buf = b1, .len = 1 },
+       };
+
+       dev_addr = priv->config->demod_address;
+       if (reg >= 0xC0)
+               dev_addr += 0x02;
+       msg[1].addr =  msg[0].addr = dev_addr;
+
+       ret = i2c_transfer(priv->i2c, msg, 2);
+       if (ret != 2) {
+               dprintk(KERN_DEBUG "%s: error reg=0x%x, ret=%i\n",
+                       __func__, reg, ret);
+               return -1;
+       }
+
+       *p_data = b1[0];
+       if (debug >= 2)
+               printk(KERN_DEBUG "%s: reg=0x%02X, data=0x%02X\n",
+                       __func__, reg, b1[0]);
+       return 0;
+}
+
+static int lgs8gxx_soft_reset(struct lgs8gxx_state *priv)
+{
+       lgs8gxx_write_reg(priv, 0x02, 0x00);
+       msleep(1);
+       lgs8gxx_write_reg(priv, 0x02, 0x01);
+       msleep(100);
+
+       return 0;
+}
+
+static int lgs8gxx_set_ad_mode(struct lgs8gxx_state *priv)
+{
+       const struct lgs8gxx_config *config = priv->config;
+       u8 if_conf;
+
+       if_conf = 0x10; /* AGC output on; */
+
+       if_conf |=
+               ((config->ext_adc) ? 0x80 : 0x00) |
+               ((config->if_neg_center) ? 0x04 : 0x00) |
+               ((config->if_freq == 0) ? 0x08 : 0x00) | /* Baseband */
+               ((config->ext_adc && config->adc_signed) ? 0x02 : 0x00) |
+               ((config->ext_adc && config->if_neg_edge) ? 0x01 : 0x00);
+
+       if (config->ext_adc &&
+               (config->prod == LGS8GXX_PROD_LGS8G52)) {
+               lgs8gxx_write_reg(priv, 0xBA, 0x40);
+       }
+
+       lgs8gxx_write_reg(priv, 0x07, if_conf);
+
+       return 0;
+}
+
+static int lgs8gxx_set_if_freq(struct lgs8gxx_state *priv, u32 freq /*in kHz*/)
+{
+       u64 val;
+       u32 v32;
+       u32 if_clk;
+
+       if_clk = priv->config->if_clk_freq;
+
+       val = freq;
+       if (freq != 0) {
+               val *= (u64)1 << 32;
+               if (if_clk != 0)
+                       do_div(val, if_clk);
+               v32 = val & 0xFFFFFFFF;
+               dprintk("Set IF Freq to %dkHz\n", freq);
+       } else {
+               v32 = 0;
+               dprintk("Set IF Freq to baseband\n");
+       }
+       dprintk("AFC_INIT_FREQ = 0x%08X\n", v32);
+
+       lgs8gxx_write_reg(priv, 0x09, 0xFF & (v32));
+       lgs8gxx_write_reg(priv, 0x0A, 0xFF & (v32 >> 8));
+       lgs8gxx_write_reg(priv, 0x0B, 0xFF & (v32 >> 16));
+       lgs8gxx_write_reg(priv, 0x0C, 0xFF & (v32 >> 24));
+
+       return 0;
+}
+
+static int lgs8gxx_set_mode_auto(struct lgs8gxx_state *priv)
+{
+       u8 t;
+
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913)
+               lgs8gxx_write_reg(priv, 0xC6, 0x01);
+
+       lgs8gxx_read_reg(priv, 0x7E, &t);
+       lgs8gxx_write_reg(priv, 0x7E, t | 0x01);
+
+       /* clear FEC self reset */
+       lgs8gxx_read_reg(priv, 0xC5, &t);
+       lgs8gxx_write_reg(priv, 0xC5, t & 0xE0);
+
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913) {
+               /* FEC auto detect */
+               lgs8gxx_write_reg(priv, 0xC1, 0x03);
+
+               lgs8gxx_read_reg(priv, 0x7C, &t);
+               t = (t & 0x8C) | 0x03;
+               lgs8gxx_write_reg(priv, 0x7C, t);
+       }
+
+
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913) {
+               /* BER test mode */
+               lgs8gxx_read_reg(priv, 0xC3, &t);
+               t = (t & 0xEF) |  0x10;
+               lgs8gxx_write_reg(priv, 0xC3, t);
+       }
+
+       if (priv->config->prod == LGS8GXX_PROD_LGS8G52)
+               lgs8gxx_write_reg(priv, 0xD9, 0x40);
+
+       return 0;
+}
+
+static int lgs8gxx_set_mode_manual(struct lgs8gxx_state *priv)
+{
+       int ret = 0;
+       u8 t;
+
+       /* turn off auto-detect; manual settings */
+       lgs8gxx_write_reg(priv, 0x7E, 0);
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913)
+               lgs8gxx_write_reg(priv, 0xC1, 0);
+
+       ret = lgs8gxx_read_reg(priv, 0xC5, &t);
+       t = (t & 0xE0) | 0x06;
+       lgs8gxx_write_reg(priv, 0xC5, t);
+
+       lgs8gxx_soft_reset(priv);
+
+       return 0;
+}
+
+static int lgs8gxx_is_locked(struct lgs8gxx_state *priv, u8 *locked)
+{
+       int ret = 0;
+       u8 t;
+
+       ret = lgs8gxx_read_reg(priv, 0x4B, &t);
+       if (ret != 0)
+               return ret;
+
+       *locked = ((t & 0xC0) == 0xC0) ? 1 : 0;
+       return 0;
+}
+
+static int lgs8gxx_is_autodetect_finished(struct lgs8gxx_state *priv,
+                                         u8 *finished)
+{
+       int ret = 0;
+       u8 t;
+
+       ret = lgs8gxx_read_reg(priv, 0xA4, &t);
+       if (ret != 0)
+               return ret;
+
+       *finished = ((t & 0x3) == 0x1) ? 1 : 0;
+
+       return 0;
+}
+
+static int lgs8gxx_autolock_gi(struct lgs8gxx_state *priv, u8 gi, u8 *locked)
+{
+       int err;
+       u8 ad_fini = 0;
+
+       if (gi == GI_945)
+               dprintk("try GI 945\n");
+       else if (gi == GI_595)
+               dprintk("try GI 595\n");
+       else if (gi == GI_420)
+               dprintk("try GI 420\n");
+       lgs8gxx_write_reg(priv, 0x04, gi);
+       lgs8gxx_soft_reset(priv);
+       msleep(50);
+       err = lgs8gxx_is_autodetect_finished(priv, &ad_fini);
+       if (err != 0)
+               return err;
+       if (ad_fini) {
+               err = lgs8gxx_is_locked(priv, locked);
+               if (err != 0)
+                       return err;
+       }
+
+       return 0;
+}
+
+static int lgs8gxx_auto_detect(struct lgs8gxx_state *priv,
+                              u8 *detected_param, u8 *gi)
+{
+       int i, j;
+       int err = 0;
+       u8 locked = 0, tmp_gi;
+
+       dprintk("%s\n", __func__);
+
+       lgs8gxx_set_mode_auto(priv);
+       /* Guard Interval */
+       lgs8gxx_write_reg(priv, 0x03, 00);
+
+       for (i = 0; i < 2; i++) {
+               for (j = 0; j < 2; j++) {
+                       tmp_gi = GI_945;
+                       err = lgs8gxx_autolock_gi(priv, GI_945, &locked);
+                       if (err)
+                               goto out;
+                       if (locked)
+                               goto locked;
+               }
+               for (j = 0; j < 2; j++) {
+                       tmp_gi = GI_420;
+                       err = lgs8gxx_autolock_gi(priv, GI_420, &locked);
+                       if (err)
+                               goto out;
+                       if (locked)
+                               goto locked;
+               }
+               tmp_gi = GI_595;
+               err = lgs8gxx_autolock_gi(priv, GI_595, &locked);
+               if (err)
+                       goto out;
+               if (locked)
+                       goto locked;
+       }
+
+locked:
+       if ((err == 0) && (locked == 1)) {
+               u8 t;
+
+               lgs8gxx_read_reg(priv, 0xA2, &t);
+               *detected_param = t;
+
+               if (tmp_gi == GI_945)
+                       dprintk("GI 945 locked\n");
+               else if (tmp_gi == GI_595)
+                       dprintk("GI 595 locked\n");
+               else if (tmp_gi == GI_420)
+                       dprintk("GI 420 locked\n");
+               *gi = tmp_gi;
+       }
+       if (!locked)
+               err = -1;
+
+out:
+       return err;
+}
+
+static void lgs8gxx_auto_lock(struct lgs8gxx_state *priv)
+{
+       s8 err;
+       u8 gi = 0x2;
+       u8 detected_param = 0;
+
+       err = lgs8gxx_auto_detect(priv, &detected_param, &gi);
+
+       if (err != 0) {
+               dprintk("lgs8gxx_auto_detect failed\n");
+       }
+
+       /* Apply detected parameters */
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913) {
+               u8 inter_leave_len = detected_param & TIM_MASK ;
+               inter_leave_len = (inter_leave_len == TIM_LONG) ? 0x60 : 0x40;
+               detected_param &= CF_MASK | SC_MASK  | LGS_FEC_MASK;
+               detected_param |= inter_leave_len;
+       }
+       lgs8gxx_write_reg(priv, 0x7D, detected_param);
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913)
+               lgs8gxx_write_reg(priv, 0xC0, detected_param);
+       /* lgs8gxx_soft_reset(priv); */
+
+       /* Enter manual mode */
+       lgs8gxx_set_mode_manual(priv);
+
+       switch (gi) {
+       case GI_945:
+               priv->curr_gi = 945; break;
+       case GI_595:
+               priv->curr_gi = 595; break;
+       case GI_420:
+               priv->curr_gi = 420; break;
+       default:
+               priv->curr_gi = 945; break;
+       }
+}
+
+static int lgs8gxx_set_mpeg_mode(struct lgs8gxx_state *priv,
+       u8 serial, u8 clk_pol, u8 clk_gated)
+{
+       int ret = 0;
+       u8 t;
+
+       ret = lgs8gxx_read_reg(priv, 0xC2, &t);
+       if (ret != 0)
+               return ret;
+
+       t &= 0xF8;
+       t |= serial ? TS_SERIAL : TS_PARALLEL;
+       t |= clk_pol ? TS_CLK_INVERTED : TS_CLK_NORMAL;
+       t |= clk_gated ? TS_CLK_GATED : TS_CLK_FREERUN;
+
+       ret = lgs8gxx_write_reg(priv, 0xC2, t);
+       if (ret != 0)
+               return ret;
+
+       return 0;
+}
+
+
+/* LGS8913 demod frontend functions */
+
+static int lgs8913_init(struct lgs8gxx_state *priv)
+{
+       u8 t;
+
+       /* LGS8913 specific */
+       lgs8gxx_write_reg(priv, 0xc1, 0x3);
+
+       lgs8gxx_read_reg(priv, 0x7c, &t);
+       lgs8gxx_write_reg(priv, 0x7c, (t&0x8c) | 0x3);
+
+       /* LGS8913 specific */
+       lgs8gxx_read_reg(priv, 0xc3, &t);
+       lgs8gxx_write_reg(priv, 0xc3, t&0x10);
+
+
+       return 0;
+}
+
+static int lgs8gxx_init(struct dvb_frontend *fe)
+{
+       struct lgs8gxx_state *priv =
+               (struct lgs8gxx_state *)fe->demodulator_priv;
+       const struct lgs8gxx_config *config = priv->config;
+       u8 data = 0;
+       s8 err;
+       dprintk("%s\n", __func__);
+
+       lgs8gxx_read_reg(priv, 0, &data);
+       dprintk("reg 0 = 0x%02X\n", data);
+
+       /* Setup MPEG output format */
+       err = lgs8gxx_set_mpeg_mode(priv, config->serial_ts,
+                                   config->ts_clk_pol,
+                                   config->ts_clk_gated);
+       if (err != 0)
+               return -EIO;
+
+       if (config->prod == LGS8GXX_PROD_LGS8913)
+               lgs8913_init(priv);
+       lgs8gxx_set_if_freq(priv, priv->config->if_freq);
+       if (config->prod != LGS8GXX_PROD_LGS8913)
+               lgs8gxx_set_ad_mode(priv);
+
+       return 0;
+}
+
+static void lgs8gxx_release(struct dvb_frontend *fe)
+{
+       struct lgs8gxx_state *state = fe->demodulator_priv;
+       dprintk("%s\n", __func__);
+
+       kfree(state);
+}
+
+
+static int lgs8gxx_write(struct dvb_frontend *fe, u8 *buf, int len)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+
+       if (len != 2)
+               return -EINVAL;
+
+       return lgs8gxx_write_reg(priv, buf[0], buf[1]);
+}
+
+static int lgs8gxx_set_fe(struct dvb_frontend *fe,
+                         struct dvb_frontend_parameters *fe_params)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+
+       dprintk("%s\n", __func__);
+
+       /* set frequency */
+       if (fe->ops.tuner_ops.set_params) {
+               fe->ops.tuner_ops.set_params(fe, fe_params);
+               if (fe->ops.i2c_gate_ctrl)
+                       fe->ops.i2c_gate_ctrl(fe, 0);
+       }
+
+       /* start auto lock */
+       lgs8gxx_auto_lock(priv);
+
+       msleep(10);
+
+       return 0;
+}
+
+static int lgs8gxx_get_fe(struct dvb_frontend *fe,
+                         struct dvb_frontend_parameters *fe_params)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+       u8 t;
+
+       dprintk("%s\n", __func__);
+
+       /* TODO: get real readings from device */
+       /* inversion status */
+       fe_params->inversion = INVERSION_OFF;
+
+       /* bandwidth */
+       fe_params->u.ofdm.bandwidth = BANDWIDTH_8_MHZ;
+
+
+       lgs8gxx_read_reg(priv, 0x7D, &t);
+       fe_params->u.ofdm.code_rate_HP = FEC_AUTO;
+       fe_params->u.ofdm.code_rate_LP = FEC_AUTO;
+
+       /* constellation */
+       switch (t & SC_MASK) {
+       case SC_QAM64:
+               fe_params->u.ofdm.constellation = QAM_64;
+               break;
+       case SC_QAM32:
+               fe_params->u.ofdm.constellation = QAM_32;
+               break;
+       case SC_QAM16:
+               fe_params->u.ofdm.constellation = QAM_16;
+               break;
+       case SC_QAM4:
+       case SC_QAM4NR:
+               fe_params->u.ofdm.constellation = QPSK;
+               break;
+       default:
+               fe_params->u.ofdm.constellation = QAM_64;
+       }
+
+       /* transmission mode */
+       fe_params->u.ofdm.transmission_mode = TRANSMISSION_MODE_AUTO;
+
+       /* guard interval */
+       fe_params->u.ofdm.guard_interval = GUARD_INTERVAL_AUTO;
+
+       /* hierarchy */
+       fe_params->u.ofdm.hierarchy_information = HIERARCHY_NONE;
+
+       return 0;
+}
+
+static
+int lgs8gxx_get_tune_settings(struct dvb_frontend *fe,
+                             struct dvb_frontend_tune_settings *fesettings)
+{
+       /* FIXME: copy from tda1004x.c */
+       fesettings->min_delay_ms = 800;
+       fesettings->step_size = 0;
+       fesettings->max_drift = 0;
+       return 0;
+}
+
+static int lgs8gxx_read_status(struct dvb_frontend *fe, fe_status_t *fe_status)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+       s8 ret;
+       u8 t;
+
+       dprintk("%s\n", __func__);
+
+       ret = lgs8gxx_read_reg(priv, 0x4B, &t);
+       if (ret != 0)
+               return -EIO;
+
+       dprintk("Reg 0x4B: 0x%02X\n", t);
+
+       *fe_status = 0;
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913) {
+               if ((t & 0x40) == 0x40)
+                       *fe_status |= FE_HAS_SIGNAL | FE_HAS_CARRIER;
+               if ((t & 0x80) == 0x80)
+                       *fe_status |= FE_HAS_VITERBI | FE_HAS_SYNC |
+                               FE_HAS_LOCK;
+       } else {
+               if ((t & 0x80) == 0x80)
+                       *fe_status |= FE_HAS_SIGNAL | FE_HAS_CARRIER |
+                               FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK;
+       }
+
+       /* success */
+       dprintk("%s: fe_status=0x%x\n", __func__, *fe_status);
+       return 0;
+}
+
+static int lgs8gxx_read_signal_agc(struct lgs8gxx_state *priv, u16 *signal)
+{
+       u16 v;
+       u8 agc_lvl[2], cat;
+
+       dprintk("%s()\n", __func__);
+       lgs8gxx_read_reg(priv, 0x3F, &agc_lvl[0]);
+       lgs8gxx_read_reg(priv, 0x3E, &agc_lvl[1]);
+
+       v = agc_lvl[0];
+       v <<= 8;
+       v |= agc_lvl[1];
+
+       dprintk("agc_lvl: 0x%04X\n", v);
+
+       if (v < 0x100)
+               cat = 0;
+       else if (v < 0x190)
+               cat = 5;
+       else if (v < 0x2A8)
+               cat = 4;
+       else if (v < 0x381)
+               cat = 3;
+       else if (v < 0x400)
+               cat = 2;
+       else if (v == 0x400)
+               cat = 1;
+       else
+               cat = 0;
+
+       *signal = cat;
+
+       return 0;
+}
+
+static int lgs8913_read_signal_strength(struct lgs8gxx_state *priv, u16 *signal)
+{
+       u8 t; s8 ret;
+       s16 max_strength = 0;
+       u8 str;
+       u16 i, gi = priv->curr_gi;
+
+       dprintk("%s\n", __func__);
+
+       ret = lgs8gxx_read_reg(priv, 0x4B, &t);
+       if (ret != 0)
+               return -EIO;
+
+       if (fake_signal_str) {
+               if ((t & 0xC0) == 0xC0) {
+                       dprintk("Fake signal strength as 50\n");
+                       *signal = 0x32;
+               } else
+                       *signal = 0;
+               return 0;
+       }
+
+       dprintk("gi = %d\n", gi);
+       for (i = 0; i < gi; i++) {
+
+               if ((i & 0xFF) == 0)
+                       lgs8gxx_write_reg(priv, 0x84, 0x03 & (i >> 8));
+               lgs8gxx_write_reg(priv, 0x83, i & 0xFF);
+
+               lgs8gxx_read_reg(priv, 0x94, &str);
+               if (max_strength < str)
+                       max_strength = str;
+       }
+
+       *signal = max_strength;
+       dprintk("%s: signal=0x%02X\n", __func__, *signal);
+
+       lgs8gxx_read_reg(priv, 0x95, &t);
+       dprintk("%s: AVG Noise=0x%02X\n", __func__, t);
+
+       return 0;
+}
+
+static int lgs8gxx_read_signal_strength(struct dvb_frontend *fe, u16 *signal)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+
+       if (priv->config->prod == LGS8GXX_PROD_LGS8913)
+               return lgs8913_read_signal_strength(priv, signal);
+       else
+               return lgs8gxx_read_signal_agc(priv, signal);
+}
+
+static int lgs8gxx_read_snr(struct dvb_frontend *fe, u16 *snr)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+       u8 t;
+       *snr = 0;
+
+       lgs8gxx_read_reg(priv, 0x95, &t);
+       dprintk("AVG Noise=0x%02X\n", t);
+       *snr = 256 - t;
+       *snr <<= 8;
+       dprintk("snr=0x%x\n", *snr);
+
+       return 0;
+}
+
+static int lgs8gxx_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
+{
+       *ucblocks = 0;
+       dprintk("%s: ucblocks=0x%x\n", __func__, *ucblocks);
+       return 0;
+}
+
+static int lgs8gxx_read_ber(struct dvb_frontend *fe, u32 *ber)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+       u8 r0, r1, r2, r3;
+       u32 total_cnt, err_cnt;
+
+       dprintk("%s\n", __func__);
+
+       lgs8gxx_write_reg(priv, 0xc6, 0x01);
+       lgs8gxx_write_reg(priv, 0xc6, 0x41);
+       lgs8gxx_write_reg(priv, 0xc6, 0x01);
+
+       msleep(200);
+
+       lgs8gxx_write_reg(priv, 0xc6, 0x81);
+       lgs8gxx_read_reg(priv, 0xd0, &r0);
+       lgs8gxx_read_reg(priv, 0xd1, &r1);
+       lgs8gxx_read_reg(priv, 0xd2, &r2);
+       lgs8gxx_read_reg(priv, 0xd3, &r3);
+       total_cnt = (r3 << 24) | (r2 << 16) | (r1 << 8) | (r0);
+       lgs8gxx_read_reg(priv, 0xd4, &r0);
+       lgs8gxx_read_reg(priv, 0xd5, &r1);
+       lgs8gxx_read_reg(priv, 0xd6, &r2);
+       lgs8gxx_read_reg(priv, 0xd7, &r3);
+       err_cnt = (r3 << 24) | (r2 << 16) | (r1 << 8) | (r0);
+       dprintk("error=%d total=%d\n", err_cnt, total_cnt);
+
+       if (total_cnt == 0)
+               *ber = 0;
+       else
+               *ber = err_cnt * 100 / total_cnt;
+
+       dprintk("%s: ber=0x%x\n", __func__, *ber);
+       return 0;
+}
+
+static int lgs8gxx_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
+{
+       struct lgs8gxx_state *priv = fe->demodulator_priv;
+
+       if (priv->config->tuner_address == 0)
+               return 0;
+       if (enable) {
+               u8 v = 0x80 | priv->config->tuner_address;
+               return lgs8gxx_write_reg(priv, 0x01, v);
+       }
+       return lgs8gxx_write_reg(priv, 0x01, 0);
+}
+
+static struct dvb_frontend_ops lgs8gxx_ops = {
+       .info = {
+               .name = "Legend Silicon LGS8913/LGS8GXX DMB-TH",
+               .type = FE_OFDM,
+               .frequency_min = 474000000,
+               .frequency_max = 858000000,
+               .frequency_stepsize = 10000,
+               .caps =
+                       FE_CAN_FEC_AUTO |
+                       FE_CAN_QAM_AUTO |
+                       FE_CAN_TRANSMISSION_MODE_AUTO |
+                       FE_CAN_GUARD_INTERVAL_AUTO
+       },
+
+       .release = lgs8gxx_release,
+
+       .init = lgs8gxx_init,
+       .write = lgs8gxx_write,
+       .i2c_gate_ctrl = lgs8gxx_i2c_gate_ctrl,
+
+       .set_frontend = lgs8gxx_set_fe,
+       .get_frontend = lgs8gxx_get_fe,
+       .get_tune_settings = lgs8gxx_get_tune_settings,
+
+       .read_status = lgs8gxx_read_status,
+       .read_ber = lgs8gxx_read_ber,
+       .read_signal_strength = lgs8gxx_read_signal_strength,
+       .read_snr = lgs8gxx_read_snr,
+       .read_ucblocks = lgs8gxx_read_ucblocks,
+};
+
+struct dvb_frontend *lgs8gxx_attach(const struct lgs8gxx_config *config,
+       struct i2c_adapter *i2c)
+{
+       struct lgs8gxx_state *priv = NULL;
+       u8 data = 0;
+
+       dprintk("%s()\n", __func__);
+
+       if (config == NULL || i2c == NULL)
+               return NULL;
+
+       priv = kzalloc(sizeof(struct lgs8gxx_state), GFP_KERNEL);
+       if (priv == NULL)
+               goto error_out;
+
+       priv->config = config;
+       priv->i2c = i2c;
+
+       /* check if the demod is there */
+       if (lgs8gxx_read_reg(priv, 0, &data) != 0) {
+               dprintk("%s lgs8gxx not found at i2c addr 0x%02X\n",
+                       __func__, priv->config->demod_address);
+               goto error_out;
+       }
+
+       lgs8gxx_read_reg(priv, 1, &data);
+
+       memcpy(&priv->frontend.ops, &lgs8gxx_ops,
+              sizeof(struct dvb_frontend_ops));
+       priv->frontend.demodulator_priv = priv;
+
+       return &priv->frontend;
+
+error_out:
+       dprintk("%s() error_out\n", __func__);
+       kfree(priv);
+       return NULL;
+
+}
+EXPORT_SYMBOL(lgs8gxx_attach);
+
+MODULE_DESCRIPTION("Legend Silicon LGS8913/LGS8GXX DMB-TH demodulator driver");
+MODULE_AUTHOR("David T. L. Wong <davidtlwong@gmail.com>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/media/dvb/frontends/lgs8gxx.h b/drivers/media/dvb/frontends/lgs8gxx.h
new file mode 100644 (file)
index 0000000..321d366
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ *    Support for Legend Silicon DMB-TH demodulator
+ *    LGS8913, LGS8GL5
+ *    experimental support LGS8G42, LGS8G52
+ *
+ *    Copyright (C) 2007,2008 David T.L. Wong <davidtlwong@gmail.com>
+ *    Copyright (C) 2008 Sirius International (Hong Kong) Limited
+ *    Timothy Lee <timothy.lee@siriushk.com> (for initial work on LGS8GL5)
+ *
+ *    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.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifndef __LGS8GXX_H__
+#define __LGS8GXX_H__
+
+#include <linux/dvb/frontend.h>
+#include <linux/i2c.h>
+
+#define LGS8GXX_PROD_LGS8913 0
+#define LGS8GXX_PROD_LGS8GL5 1
+#define LGS8GXX_PROD_LGS8G42 3
+#define LGS8GXX_PROD_LGS8G52 4
+#define LGS8GXX_PROD_LGS8G54 5
+
+struct lgs8gxx_config {
+
+       /* product type */
+       u8 prod;
+
+       /* the demodulator's i2c address */
+       u8 demod_address;
+
+       /* parallel or serial transport stream */
+       u8 serial_ts;
+
+       /* transport stream polarity*/
+       u8 ts_clk_pol;
+
+       /* transport stream clock gated by ts_valid */
+       u8 ts_clk_gated;
+
+       /* A/D Clock frequency */
+       u32 if_clk_freq; /* in kHz */
+
+       /* IF frequency */
+       u32 if_freq; /* in kHz */
+
+       /*Use External ADC*/
+       u8 ext_adc;
+
+       /*External ADC output two's complement*/
+       u8 adc_signed;
+
+       /*Sample IF data at falling edge of IF_CLK*/
+       u8 if_neg_edge;
+
+       /*IF use Negative center frequency*/
+       u8 if_neg_center;
+
+       /* slave address and configuration of the tuner */
+       u8 tuner_address;
+};
+
+#if defined(CONFIG_DVB_LGS8GXX) || \
+       (defined(CONFIG_DVB_LGS8GXX_MODULE) && defined(MODULE))
+extern struct dvb_frontend *lgs8gxx_attach(const struct lgs8gxx_config *config,
+                                          struct i2c_adapter *i2c);
+#else
+static inline
+struct dvb_frontend *lgs8gxx_attach(const struct lgs8gxx_config *config,
+                                   struct i2c_adapter *i2c) {
+       printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+       return NULL;
+}
+#endif /* CONFIG_DVB_LGS8GXX */
+
+#endif /* __LGS8GXX_H__ */
diff --git a/drivers/media/dvb/frontends/lgs8gxx_priv.h b/drivers/media/dvb/frontends/lgs8gxx_priv.h
new file mode 100644 (file)
index 0000000..9776d30
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ *    Support for Legend Silicon DMB-TH demodulator
+ *    LGS8913, LGS8GL5
+ *    experimental support LGS8G42, LGS8G52
+ *
+ *    Copyright (C) 2007,2008 David T.L. Wong <davidtlwong@gmail.com>
+ *    Copyright (C) 2008 Sirius International (Hong Kong) Limited
+ *    Timothy Lee <timothy.lee@siriushk.com> (for initial work on LGS8GL5)
+ *
+ *    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.
+ *
+ *    This program is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with this program; if not, write to the Free Software
+ *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifndef LGS8913_PRIV_H
+#define LGS8913_PRIV_H
+
+struct lgs8gxx_state {
+       struct i2c_adapter *i2c;
+       /* configuration settings */
+       const struct lgs8gxx_config *config;
+       struct dvb_frontend frontend;
+       u16 curr_gi; /* current guard interval */
+};
+
+#define SC_MASK                0x1C    /* Sub-Carrier Modulation Mask */
+#define SC_QAM64       0x10    /* 64QAM modulation */
+#define SC_QAM32       0x0C    /* 32QAM modulation */
+#define SC_QAM16       0x08    /* 16QAM modulation */
+#define SC_QAM4NR      0x04    /* 4QAM modulation */
+#define SC_QAM4                0x00    /* 4QAM modulation */
+
+#define LGS_FEC_MASK   0x03    /* FEC Rate Mask */
+#define LGS_FEC_0_4    0x00    /* FEC Rate 0.4 */
+#define LGS_FEC_0_6    0x01    /* FEC Rate 0.6 */
+#define LGS_FEC_0_8    0x02    /* FEC Rate 0.8 */
+
+#define TIM_MASK         0x20  /* Time Interleave Length Mask */
+#define TIM_LONG         0x00  /* Time Interleave Length = 720 */
+#define TIM_MIDDLE     0x20   /* Time Interleave Length = 240 */
+
+#define CF_MASK        0x80    /* Control Frame Mask */
+#define CF_EN  0x80    /* Control Frame On */
+
+#define GI_MASK        0x03    /* Guard Interval Mask */
+#define GI_420 0x00    /* 1/9 Guard Interval */
+#define GI_595 0x01    /* */
+#define GI_945 0x02    /* 1/4 Guard Interval */
+
+
+#define TS_PARALLEL    0x00    /* Parallel TS Output a.k.a. SPI */
+#define TS_SERIAL      0x01    /* Serial TS Output a.k.a. SSI */
+#define TS_CLK_NORMAL          0x00    /* MPEG Clock Normal */
+#define TS_CLK_INVERTED                0x02    /* MPEG Clock Inverted */
+#define TS_CLK_GATED           0x00    /* MPEG clock gated */
+#define TS_CLK_FREERUN         0x04    /* MPEG clock free running*/
+
+
+#endif
index ee89623..598eaf8 100644 (file)
@@ -616,7 +616,7 @@ static int __devinit pluto2_probe(struct pci_dev *pdev,
        /* enable interrupts */
        pci_write_config_dword(pdev, 0x6c, 0x8000);
 
-       ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (ret < 0)
                goto err_pci_disable_device;
 
index cc54ed4..6135762 100644 (file)
@@ -33,6 +33,9 @@
 
  History:
 
+ Version 0.45:
+       Converted to v4l2_device.
+
  Version 0.44:
        Add suspend/resume functions, fix unplug of device,
        a lot of cleanups and fixes by Alexey Klimov <klimov.linux@gmail.com>
@@ -88,7 +91,7 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/videodev2.h>
-#include <media/v4l2-common.h>
+#include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
 #include <linux/usb.h>
 
  */
 #include <linux/version.h>     /* for KERNEL_VERSION MACRO     */
 
-#define DRIVER_VERSION "v0.44"
-#define RADIO_VERSION KERNEL_VERSION(0, 4, 4)
-
-static struct v4l2_queryctrl radio_qctrl[] = {
-       {
-               .id            = V4L2_CID_AUDIO_MUTE,
-               .name          = "Mute",
-               .minimum       = 0,
-               .maximum       = 1,
-               .default_value = 1,
-               .type          = V4L2_CTRL_TYPE_BOOLEAN,
-       },
-/* HINT: the disabled controls are only here to satify kradio and such apps */
-       {       .id             = V4L2_CID_AUDIO_VOLUME,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_BALANCE,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_BASS,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_TREBLE,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_LOUDNESS,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-};
+#define DRIVER_VERSION "v0.45"
+#define RADIO_VERSION KERNEL_VERSION(0, 4, 5)
 
 #define DRIVER_AUTHOR "Markus Demleitner <msdemlei@tucana.harvard.edu>"
 #define DRIVER_DESC "D-Link DSB-R100 USB FM radio driver"
@@ -167,6 +139,8 @@ module_param(radio_nr, int, 0);
 struct dsbr100_device {
        struct usb_device *usbdev;
        struct video_device videodev;
+       struct v4l2_device v4l2_dev;
+
        u8 *transfer_buffer;
        struct mutex lock;      /* buffer locking */
        int curfreq;
@@ -384,6 +358,7 @@ static void usb_dsbr100_disconnect(struct usb_interface *intf)
        mutex_unlock(&radio->lock);
 
        video_unregister_device(&radio->videodev);
+       v4l2_device_disconnect(&radio->v4l2_dev);
 }
 
 
@@ -479,14 +454,11 @@ static int vidioc_g_frequency(struct file *file, void *priv,
 static int vidioc_queryctrl(struct file *file, void *priv,
                                struct v4l2_queryctrl *qc)
 {
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(radio_qctrl); i++) {
-               if (qc->id && qc->id == radio_qctrl[i].id) {
-                       memcpy(qc, &(radio_qctrl[i]), sizeof(*qc));
-                       return 0;
-               }
+       switch (qc->id) {
+       case V4L2_CID_AUDIO_MUTE:
+               return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1);
        }
+
        return -EINVAL;
 }
 
@@ -656,6 +628,7 @@ static void usb_dsbr100_video_device_release(struct video_device *videodev)
 {
        struct dsbr100_device *radio = videodev_to_radio(videodev);
 
+       v4l2_device_unregister(&radio->v4l2_dev);
        kfree(radio->transfer_buffer);
        kfree(radio);
 }
@@ -683,22 +656,15 @@ static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {
        .vidioc_s_input     = vidioc_s_input,
 };
 
-/* V4L2 interface */
-static struct video_device dsbr100_videodev_data = {
-       .name           = "D-Link DSB-R 100",
-       .fops           = &usb_dsbr100_fops,
-       .ioctl_ops      = &usb_dsbr100_ioctl_ops,
-       .release        = usb_dsbr100_video_device_release,
-};
-
 /* check if the device is present and register with v4l and usb if it is */
 static int usb_dsbr100_probe(struct usb_interface *intf,
                                const struct usb_device_id *id)
 {
        struct dsbr100_device *radio;
+       struct v4l2_device *v4l2_dev;
        int retval;
 
-       radio = kmalloc(sizeof(struct dsbr100_device), GFP_KERNEL);
+       radio = kzalloc(sizeof(struct dsbr100_device), GFP_KERNEL);
 
        if (!radio)
                return -ENOMEM;
@@ -710,17 +676,35 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
                return -ENOMEM;
        }
 
+       v4l2_dev = &radio->v4l2_dev;
+
+       retval = v4l2_device_register(&intf->dev, v4l2_dev);
+       if (retval < 0) {
+               v4l2_err(v4l2_dev, "couldn't register v4l2_device\n");
+               kfree(radio->transfer_buffer);
+               kfree(radio);
+               return retval;
+       }
+
+       strlcpy(radio->videodev.name, v4l2_dev->name, sizeof(radio->videodev.name));
+       radio->videodev.v4l2_dev = v4l2_dev;
+       radio->videodev.fops = &usb_dsbr100_fops;
+       radio->videodev.ioctl_ops = &usb_dsbr100_ioctl_ops;
+       radio->videodev.release = usb_dsbr100_video_device_release;
+
        mutex_init(&radio->lock);
-       radio->videodev = dsbr100_videodev_data;
 
        radio->removed = 0;
        radio->users = 0;
        radio->usbdev = interface_to_usbdev(intf);
        radio->curfreq = FREQ_MIN * FREQ_MUL;
+
        video_set_drvdata(&radio->videodev, radio);
+
        retval = video_register_device(&radio->videodev, VFL_TYPE_RADIO, radio_nr);
        if (retval < 0) {
-               dev_err(&intf->dev, "couldn't register video device\n");
+               v4l2_err(v4l2_dev, "couldn't register video device\n");
+               v4l2_device_unregister(v4l2_dev);
                kfree(radio->transfer_buffer);
                kfree(radio);
                return -EIO;
index ac82e33..35edee0 100644 (file)
@@ -355,20 +355,8 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int rtrack_open(struct file *file)
-{
-       return 0;
-}
-
-static int rtrack_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations rtrack_fops = {
        .owner          = THIS_MODULE,
-       .open           = rtrack_open,
-       .release        = rtrack_release,
        .ioctl          = video_ioctl2,
 };
 
index 49299f7..8daf809 100644 (file)
@@ -318,20 +318,8 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
        return -EINVAL;
 }
 
-static int aztech_open(struct file *file)
-{
-       return 0;
-}
-
-static int aztech_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations aztech_fops = {
        .owner          = THIS_MODULE,
-       .open           = aztech_open,
-       .release        = aztech_release,
        .ioctl          = video_ioctl2,
 };
 
index 09265d2..c3f579d 100644 (file)
@@ -356,20 +356,8 @@ static struct pci_device_id gemtek_pci_id[] =
 
 MODULE_DEVICE_TABLE(pci, gemtek_pci_id);
 
-static int gemtek_pci_open(struct file *file)
-{
-       return 0;
-}
-
-static int gemtek_pci_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations gemtek_pci_fops = {
        .owner          = THIS_MODULE,
-       .open           = gemtek_pci_open,
-       .release        = gemtek_pci_release,
        .ioctl          = video_ioctl2,
 };
 
index 1504644..73985f6 100644 (file)
@@ -375,20 +375,9 @@ static int gemtek_probe(struct gemtek *gt)
 /*
  * Video 4 Linux stuff.
  */
-static int gemtek_open(struct file *file)
-{
-       return 0;
-}
-
-static int gemtek_release(struct file *file)
-{
-       return 0;
-}
 
 static const struct v4l2_file_operations gemtek_fops = {
        .owner          = THIS_MODULE,
-       .open           = gemtek_open,
-       .release        = gemtek_release,
        .ioctl          = video_ioctl2,
 };
 
index 01a6d22..64d737c 100644 (file)
@@ -292,20 +292,8 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int maestro_open(struct file *file)
-{
-       return 0;
-}
-
-static int maestro_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations maestro_fops = {
        .owner          = THIS_MODULE,
-       .open           = maestro_open,
-       .release        = maestro_release,
        .ioctl          = video_ioctl2,
 };
 
index 2606f0b..3da51fe 100644 (file)
@@ -339,20 +339,8 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
        return -EINVAL;
 }
 
-static int maxiradio_open(struct file *file)
-{
-       return 0;
-}
-
-static int maxiradio_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations maxiradio_fops = {
        .owner          = THIS_MODULE,
-       .open           = maxiradio_open,
-       .release        = maxiradio_release,
        .ioctl          = video_ioctl2,
 };
 
index ded25bf..cab19d0 100644 (file)
@@ -43,6 +43,7 @@
  *                     Douglas Schilling Landgraf <dougsland@gmail.com> and
  *                     David Ellingsworth <david@identd.dyndns.org>
  *                     for discussion, help and support.
+ * Version 0.11:       Converted to v4l2_device.
  *
  * Many things to do:
  *     - Correct power managment of device (suspend & resume)
@@ -59,7 +60,7 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/videodev2.h>
-#include <media/v4l2-common.h>
+#include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
 #include <linux/usb.h>
 #include <linux/version.h>     /* for KERNEL_VERSION MACRO */
@@ -67,8 +68,8 @@
 /* driver and module definitions */
 #define DRIVER_AUTHOR "Alexey Klimov <klimov.linux@gmail.com>"
 #define DRIVER_DESC "AverMedia MR 800 USB FM radio driver"
-#define DRIVER_VERSION "0.10"
-#define RADIO_VERSION KERNEL_VERSION(0, 1, 0)
+#define DRIVER_VERSION "0.11"
+#define RADIO_VERSION KERNEL_VERSION(0, 1, 1)
 
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
@@ -113,38 +114,6 @@ static int radio_nr = -1;
 module_param(radio_nr, int, 0);
 MODULE_PARM_DESC(radio_nr, "Radio Nr");
 
-static struct v4l2_queryctrl radio_qctrl[] = {
-       {
-               .id            = V4L2_CID_AUDIO_MUTE,
-               .name          = "Mute",
-               .minimum       = 0,
-               .maximum       = 1,
-               .step          = 1,
-               .default_value = 1,
-               .type          = V4L2_CTRL_TYPE_BOOLEAN,
-       },
-/* HINT: the disabled controls are only here to satify kradio and such apps */
-       {       .id             = V4L2_CID_AUDIO_VOLUME,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_BALANCE,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_BASS,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_TREBLE,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-       {
-               .id             = V4L2_CID_AUDIO_LOUDNESS,
-               .flags          = V4L2_CTRL_FLAG_DISABLED,
-       },
-};
-
 static int usb_amradio_probe(struct usb_interface *intf,
                             const struct usb_device_id *id);
 static void usb_amradio_disconnect(struct usb_interface *intf);
@@ -159,6 +128,7 @@ struct amradio_device {
        /* reference to USB and video device */
        struct usb_device *usbdev;
        struct video_device *videodev;
+       struct v4l2_device v4l2_dev;
 
        unsigned char *buffer;
        struct mutex lock;      /* buffer locking */
@@ -329,6 +299,7 @@ static void usb_amradio_disconnect(struct usb_interface *intf)
 
        usb_set_intfdata(intf, NULL);
        video_unregister_device(radio->videodev);
+       v4l2_device_disconnect(&radio->v4l2_dev);
 }
 
 /* vidioc_querycap - query device capabilities */
@@ -463,14 +434,11 @@ static int vidioc_g_frequency(struct file *file, void *priv,
 static int vidioc_queryctrl(struct file *file, void *priv,
                                struct v4l2_queryctrl *qc)
 {
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(radio_qctrl); i++) {
-               if (qc->id && qc->id == radio_qctrl[i].id) {
-                       memcpy(qc, &(radio_qctrl[i]), sizeof(*qc));
-                       return 0;
-               }
+       switch (qc->id) {
+       case V4L2_CID_AUDIO_MUTE:
+               return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1);
        }
+
        return -EINVAL;
 }
 
@@ -671,34 +639,29 @@ static const struct v4l2_ioctl_ops usb_amradio_ioctl_ops = {
        .vidioc_s_input     = vidioc_s_input,
 };
 
-static void usb_amradio_device_release(struct video_device *videodev)
+static void usb_amradio_video_device_release(struct video_device *videodev)
 {
        struct amradio_device *radio = video_get_drvdata(videodev);
 
        /* we call v4l to free radio->videodev */
        video_device_release(videodev);
 
+       v4l2_device_unregister(&radio->v4l2_dev);
+
        /* free rest memory */
        kfree(radio->buffer);
        kfree(radio);
 }
 
-/* V4L2 interface */
-static struct video_device amradio_videodev_template = {
-       .name           = "AverMedia MR 800 USB FM Radio",
-       .fops           = &usb_amradio_fops,
-       .ioctl_ops      = &usb_amradio_ioctl_ops,
-       .release        = usb_amradio_device_release,
-};
-
 /* check if the device is present and register with v4l and usb if it is */
 static int usb_amradio_probe(struct usb_interface *intf,
                                const struct usb_device_id *id)
 {
        struct amradio_device *radio;
+       struct v4l2_device *v4l2_dev;
        int retval;
 
-       radio = kmalloc(sizeof(struct amradio_device), GFP_KERNEL);
+       radio = kzalloc(sizeof(struct amradio_device), GFP_KERNEL);
 
        if (!radio) {
                dev_err(&intf->dev, "kmalloc for amradio_device failed\n");
@@ -713,6 +676,15 @@ static int usb_amradio_probe(struct usb_interface *intf,
                return -ENOMEM;
        }
 
+       v4l2_dev = &radio->v4l2_dev;
+       retval = v4l2_device_register(&intf->dev, v4l2_dev);
+       if (retval < 0) {
+               dev_err(&intf->dev, "couldn't register v4l2_device\n");
+               kfree(radio->buffer);
+               kfree(radio);
+               return retval;
+       }
+
        radio->videodev = video_device_alloc();
 
        if (!radio->videodev) {
@@ -722,8 +694,11 @@ static int usb_amradio_probe(struct usb_interface *intf,
                return -ENOMEM;
        }
 
-       memcpy(radio->videodev, &amradio_videodev_template,
-               sizeof(amradio_videodev_template));
+       strlcpy(radio->videodev->name, v4l2_dev->name, sizeof(radio->videodev->name));
+       radio->videodev->v4l2_dev = v4l2_dev;
+       radio->videodev->fops = &usb_amradio_fops;
+       radio->videodev->ioctl_ops = &usb_amradio_ioctl_ops;
+       radio->videodev->release = usb_amradio_video_device_release;
 
        radio->removed = 0;
        radio->users = 0;
@@ -734,10 +709,12 @@ static int usb_amradio_probe(struct usb_interface *intf,
        mutex_init(&radio->lock);
 
        video_set_drvdata(radio->videodev, radio);
+
        retval = video_register_device(radio->videodev, VFL_TYPE_RADIO, radio_nr);
        if (retval < 0) {
                dev_err(&intf->dev, "could not register video device\n");
                video_device_release(radio->videodev);
+               v4l2_device_unregister(v4l2_dev);
                kfree(radio->buffer);
                kfree(radio);
                return -EIO;
index d1e6b01..9cb193f 100644 (file)
@@ -260,20 +260,8 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int rtrack2_open(struct file *file)
-{
-       return 0;
-}
-
-static int rtrack2_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations rtrack2_fops = {
        .owner          = THIS_MODULE,
-       .open           = rtrack2_open,
-       .release        = rtrack2_release,
        .ioctl          = video_ioctl2,
 };
 
index f4784f0..1dba8f0 100644 (file)
@@ -260,20 +260,8 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int fmi_open(struct file *file)
-{
-       return 0;
-}
-
-static int fmi_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations fmi_fops = {
        .owner          = THIS_MODULE,
-       .open           = fmi_open,
-       .release        = fmi_release,
        .ioctl          = video_ioctl2,
 };
 
index 0ba9d88..c09ca86 100644 (file)
@@ -377,20 +377,8 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int fmr2_open(struct file *file)
-{
-       return 0;
-}
-
-static int fmr2_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations fmr2_fops = {
        .owner          = THIS_MODULE,
-       .open           = fmr2_open,
-       .release        = fmr2_release,
        .ioctl          = video_ioctl2,
 };
 
index 713e242..92c2977 100644 (file)
@@ -1686,7 +1686,7 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
        /* show some infos about the specific si470x device */
        if (si470x_get_all_registers(radio) < 0) {
                retval = -EIO;
-               goto err_all;
+               goto err_video;
        }
        printk(KERN_INFO DRIVER_NAME ": DeviceID=0x%4.4hx ChipID=0x%4.4hx\n",
                        radio->registers[DEVICEID], radio->registers[CHIPID]);
@@ -1694,7 +1694,7 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
        /* get software and hardware versions */
        if (si470x_get_scratch_page_versions(radio) < 0) {
                retval = -EIO;
-               goto err_all;
+               goto err_video;
        }
        printk(KERN_INFO DRIVER_NAME
                        ": software version %d, hardware version %d\n",
@@ -1727,7 +1727,7 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
        radio->buffer = kmalloc(radio->buf_size, GFP_KERNEL);
        if (!radio->buffer) {
                retval = -EIO;
-               goto err_all;
+               goto err_video;
        }
 
        /* rds buffer configuration */
@@ -1749,8 +1749,9 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
 
        return 0;
 err_all:
-       video_device_release(radio->videodev);
        kfree(radio->buffer);
+err_video:
+       video_device_release(radio->videodev);
 err_radio:
        kfree(radio);
 err_initial:
index 5b007f5..699db9a 100644 (file)
@@ -332,20 +332,8 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int terratec_open(struct file *file)
-{
-       return 0;
-}
-
-static int terratec_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations terratec_fops = {
        .owner          = THIS_MODULE,
-       .open           = terratec_open,
-       .release        = terratec_release,
        .ioctl          = video_ioctl2,
 };
 
index d1be649..6f9ecc3 100644 (file)
@@ -338,20 +338,8 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int trust_open(struct file *file)
-{
-       return 0;
-}
-
-static int trust_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations trust_fops = {
        .owner          = THIS_MODULE,
-       .open           = trust_open,
-       .release        = trust_release,
        .ioctl          = video_ioctl2,
 };
 
index 92d923c..3a98f13 100644 (file)
@@ -314,20 +314,8 @@ static int vidioc_log_status(struct file *file, void *priv)
        return 0;
 }
 
-static int typhoon_open(struct file *file)
-{
-       return 0;
-}
-
-static int typhoon_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations typhoon_fops = {
        .owner          = THIS_MODULE,
-       .open           = typhoon_open,
-       .release        = typhoon_release,
        .ioctl          = video_ioctl2,
 };
 
index 1f85f20..80e98b6 100644 (file)
@@ -370,21 +370,9 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return a->index ? -EINVAL : 0;
 }
 
-static int zoltrix_open(struct file *file)
-{
-       return 0;
-}
-
-static int zoltrix_release(struct file *file)
-{
-       return 0;
-}
-
 static const struct v4l2_file_operations zoltrix_fops =
 {
        .owner          = THIS_MODULE,
-       .open           = zoltrix_open,
-       .release        = zoltrix_release,
        .ioctl          = video_ioctl2,
 };
 
index 76bad58..9d48da2 100644 (file)
@@ -746,6 +746,18 @@ config SOC_CAMERA_OV772X
        help
          This is a ov772x camera driver
 
+config MX1_VIDEO
+       bool
+
+config VIDEO_MX1
+       tristate "i.MX1/i.MXL CMOS Sensor Interface driver"
+       depends on VIDEO_DEV && ARCH_MX1 && SOC_CAMERA
+       select FIQ
+       select VIDEOBUF_DMA_CONTIG
+       select MX1_VIDEO
+       ---help---
+         This is a v4l2 driver for the i.MX1/i.MXL CMOS Sensor Interface
+
 config VIDEO_MX3
        tristate "i.MX3x Camera Sensor Interface driver"
        depends on VIDEO_DEV && MX3_IPU && SOC_CAMERA
@@ -795,6 +807,8 @@ source "drivers/media/video/hdpvr/Kconfig"
 
 source "drivers/media/video/em28xx/Kconfig"
 
+source "drivers/media/video/cx231xx/Kconfig"
+
 source "drivers/media/video/usbvision/Kconfig"
 
 source "drivers/media/video/usbvideo/Kconfig"
@@ -904,5 +918,4 @@ config USB_S2255
          This driver can be compiled as a module, called s2255drv.
 
 endif # V4L_USB_DRIVERS
-
 endif # VIDEO_CAPTURE_DRIVERS
index b904674..3f1a035 100644 (file)
@@ -10,7 +10,7 @@ stkwebcam-objs        :=      stk-webcam.o stk-sensor.o
 
 omap2cam-objs  :=      omap24xxcam.o omap24xxcam-dma.o
 
-videodev-objs  :=      v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-subdev.o
+videodev-objs  :=      v4l2-dev.o v4l2-ioctl.o v4l2-device.o
 
 obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
 ifeq ($(CONFIG_COMPAT),y)
@@ -67,6 +67,7 @@ obj-$(CONFIG_VIDEO_MEYE) += meye.o
 obj-$(CONFIG_VIDEO_SAA7134) += saa7134/
 obj-$(CONFIG_VIDEO_CX88) += cx88/
 obj-$(CONFIG_VIDEO_EM28XX) += em28xx/
+obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/
 obj-$(CONFIG_VIDEO_USBVISION) += usbvision/
 obj-$(CONFIG_VIDEO_TVP5150) += tvp5150.o
 obj-$(CONFIG_VIDEO_TVP514X) += tvp514x.o
@@ -133,6 +134,7 @@ obj-$(CONFIG_VIDEO_CX18) += cx18/
 obj-$(CONFIG_VIDEO_VIVI) += vivi.o
 obj-$(CONFIG_VIDEO_CX23885) += cx23885/
 
+obj-$(CONFIG_VIDEO_MX1)                        += mx1_camera.o
 obj-$(CONFIG_VIDEO_MX3)                        += mx3_camera.o
 obj-$(CONFIG_VIDEO_PXA27x)             += pxa_camera.o
 obj-$(CONFIG_VIDEO_SH_MOBILE_CEU)      += sh_mobile_ceu_camera.o
index 873c30a..97b0034 100644 (file)
@@ -219,18 +219,19 @@ static int adv7170_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int adv7170_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int adv7170_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct adv7170 *encoder = to_adv7170(sd);
 
-       /* RJ: route->input = 0: input is from decoder
-          route->input = 1: input is from ZR36060
-          route->input = 2: color bar */
+       /* RJ: input = 0: input is from decoder
+          input = 1: input is from ZR36060
+          input = 2: color bar */
 
        v4l2_dbg(1, debug, sd, "set input from %s\n",
-                       route->input == 0 ? "decoder" : "ZR36060");
+                       input == 0 ? "decoder" : "ZR36060");
 
-       switch (route->input) {
+       switch (input) {
        case 0:
                adv7170_write(sd, 0x01, 0x20);
                adv7170_write(sd, 0x08, TR1CAPT);       /* TR1 */
@@ -250,11 +251,11 @@ static int adv7170_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *
                break;
 
        default:
-               v4l2_dbg(1, debug, sd, "illegal input: %d\n", route->input);
+               v4l2_dbg(1, debug, sd, "illegal input: %d\n", input);
                return -EINVAL;
        }
-       v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[route->input]);
-       encoder->input = route->input;
+       v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[input]);
+       encoder->input = input;
        return 0;
 }
 
index ff12103..cf8c06c 100644 (file)
@@ -237,15 +237,16 @@ static int adv7175_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int adv7175_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int adv7175_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct adv7175 *encoder = to_adv7175(sd);
 
-       /* RJ: route->input = 0: input is from decoder
-          route->input = 1: input is from ZR36060
-          route->input = 2: color bar */
+       /* RJ: input = 0: input is from decoder
+          input = 1: input is from ZR36060
+          input = 2: color bar */
 
-       switch (route->input) {
+       switch (input) {
        case 0:
                adv7175_write(sd, 0x01, 0x00);
 
@@ -288,11 +289,11 @@ static int adv7175_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *
                break;
 
        default:
-               v4l2_dbg(1, debug, sd, "illegal input: %d\n", route->input);
+               v4l2_dbg(1, debug, sd, "illegal input: %d\n", input);
                return -EINVAL;
        }
-       v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[route->input]);
-       encoder->input = route->input;
+       v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[input]);
+       encoder->input = input;
        return 0;
 }
 
index 05cdf49..0c3a5ba 100644 (file)
@@ -4,6 +4,7 @@ config VIDEO_AU0828
        depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2
        select I2C_ALGOBIT
        select VIDEO_TVEEPROM
+       select VIDEOBUF_VMALLOC
        select DVB_AU8522 if !DVB_FE_CUSTOMISE
        select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMISE
        select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMISE
index 1aabaa7..053bbe8 100644 (file)
@@ -46,6 +46,7 @@ struct au0828_board au0828_boards[] = {
                .name   = "Hauppauge HVR850",
                .tuner_type = TUNER_XC5000,
                .tuner_addr = 0x61,
+               .i2c_clk_divider = AU0828_I2C_CLK_30KHZ,
                .input = {
                        {
                                .type = AU0828_VMUX_TELEVISION,
@@ -70,6 +71,13 @@ struct au0828_board au0828_boards[] = {
                .name   = "Hauppauge HVR950Q",
                .tuner_type = TUNER_XC5000,
                .tuner_addr = 0x61,
+               /* The au0828 hardware i2c implementation does not properly
+                  support the xc5000's i2c clock stretching.  So we need to
+                  lower the clock frequency enough where the 15us clock
+                  stretch fits inside of a normal clock cycle, or else the
+                  au0828 fails to set the STOP bit.  A 30 KHz clock puts the
+                  clock pulse width at 18us */
+               .i2c_clk_divider = AU0828_I2C_CLK_30KHZ,
                .input = {
                        {
                                .type = AU0828_VMUX_TELEVISION,
@@ -94,16 +102,19 @@ struct au0828_board au0828_boards[] = {
                .name   = "Hauppauge HVR950Q rev xxF8",
                .tuner_type = UNSET,
                .tuner_addr = ADDR_UNSET,
+               .i2c_clk_divider = AU0828_I2C_CLK_250KHZ,
        },
        [AU0828_BOARD_DVICO_FUSIONHDTV7] = {
                .name   = "DViCO FusionHDTV USB",
                .tuner_type = UNSET,
                .tuner_addr = ADDR_UNSET,
+               .i2c_clk_divider = AU0828_I2C_CLK_250KHZ,
        },
        [AU0828_BOARD_HAUPPAUGE_WOODBURY] = {
                .name = "Hauppauge Woodbury",
                .tuner_type = UNSET,
                .tuner_addr = ADDR_UNSET,
+               .i2c_clk_divider = AU0828_I2C_CLK_250KHZ,
        },
 };
 
@@ -200,8 +211,8 @@ void au0828_card_setup(struct au0828_dev *dev)
                /* Load the analog demodulator driver (note this would need to
                   be abstracted out if we ever need to support a different
                   demod) */
-               sd = v4l2_i2c_new_subdev(&dev->i2c_adap, "au8522", "au8522",
-                                        0x8e >> 1);
+               sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                               "au8522", "au8522", 0x8e >> 1);
                if (sd == NULL)
                        printk(KERN_ERR "analog subdev registration failed\n");
        }
@@ -209,8 +220,8 @@ void au0828_card_setup(struct au0828_dev *dev)
        /* Setup tuners */
        if (dev->board.tuner_type != TUNER_ABSENT) {
                /* Load the tuner module, which does the attach */
-               sd = v4l2_i2c_new_subdev(&dev->i2c_adap, "tuner", "tuner",
-                                        dev->board.tuner_addr);
+               sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                               "tuner", "tuner", dev->board.tuner_addr);
                if (sd == NULL)
                        printk(KERN_ERR "tuner subdev registration fail\n");
 
index 8c761d1..4cee0b9 100644 (file)
@@ -36,8 +36,6 @@ int au0828_debug;
 module_param_named(debug, au0828_debug, int, 0644);
 MODULE_PARM_DESC(debug, "enable debug messages");
 
-static atomic_t au0828_instance = ATOMIC_INIT(0);
-
 #define _AU0828_BULKPIPE 0x03
 #define _BULKPIPESIZE 0xffff
 
@@ -169,7 +167,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
 static int au0828_usb_probe(struct usb_interface *interface,
        const struct usb_device_id *id)
 {
-       int ifnum, retval, i;
+       int ifnum, retval;
        struct au0828_dev *dev;
        struct usb_device *usbdev = interface_to_usbdev(interface);
 
@@ -197,10 +195,7 @@ static int au0828_usb_probe(struct usb_interface *interface,
        usb_set_intfdata(interface, dev);
 
        /* Create the v4l2_device */
-       i = atomic_inc_return(&au0828_instance) - 1;
-       snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s-%03d",
-                "au0828", i);
-       retval = v4l2_device_register(&dev->usbdev->dev, &dev->v4l2_dev);
+       retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
        if (retval) {
                printk(KERN_ERR "%s() v4l2_device_register failed\n",
                       __func__);
index f9a958d..13e4943 100644 (file)
@@ -39,13 +39,15 @@ MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
 static inline int i2c_slave_did_write_ack(struct i2c_adapter *i2c_adap)
 {
        struct au0828_dev *dev = i2c_adap->algo_data;
-       return au0828_read(dev, REG_201) & 0x08 ? 0 : 1;
+       return au0828_read(dev, AU0828_I2C_STATUS_201) &
+               AU0828_I2C_STATUS_NO_WRITE_ACK ? 0 : 1;
 }
 
 static inline int i2c_slave_did_read_ack(struct i2c_adapter *i2c_adap)
 {
        struct au0828_dev *dev = i2c_adap->algo_data;
-       return au0828_read(dev, REG_201) & 0x02 ? 0 : 1;
+       return au0828_read(dev, AU0828_I2C_STATUS_201) &
+               AU0828_I2C_STATUS_NO_READ_ACK ? 0 : 1;
 }
 
 static int i2c_wait_read_ack(struct i2c_adapter *i2c_adap)
@@ -67,7 +69,8 @@ static int i2c_wait_read_ack(struct i2c_adapter *i2c_adap)
 static inline int i2c_is_read_busy(struct i2c_adapter *i2c_adap)
 {
        struct au0828_dev *dev = i2c_adap->algo_data;
-       return au0828_read(dev, REG_201) & 0x01 ? 0 : 1;
+       return au0828_read(dev, AU0828_I2C_STATUS_201) &
+               AU0828_I2C_STATUS_READ_DONE ? 0 : 1;
 }
 
 static int i2c_wait_read_done(struct i2c_adapter *i2c_adap)
@@ -89,7 +92,8 @@ static int i2c_wait_read_done(struct i2c_adapter *i2c_adap)
 static inline int i2c_is_write_done(struct i2c_adapter *i2c_adap)
 {
        struct au0828_dev *dev = i2c_adap->algo_data;
-       return au0828_read(dev, REG_201) & 0x04 ? 1 : 0;
+       return au0828_read(dev, AU0828_I2C_STATUS_201) &
+               AU0828_I2C_STATUS_WRITE_DONE ? 1 : 0;
 }
 
 static int i2c_wait_write_done(struct i2c_adapter *i2c_adap)
@@ -111,7 +115,8 @@ static int i2c_wait_write_done(struct i2c_adapter *i2c_adap)
 static inline int i2c_is_busy(struct i2c_adapter *i2c_adap)
 {
        struct au0828_dev *dev = i2c_adap->algo_data;
-       return au0828_read(dev, REG_201) & 0x10 ? 1 : 0;
+       return au0828_read(dev, AU0828_I2C_STATUS_201) &
+               AU0828_I2C_STATUS_BUSY ? 1 : 0;
 }
 
 static int i2c_wait_done(struct i2c_adapter *i2c_adap)
@@ -139,19 +144,14 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
 
        dprintk(4, "%s()\n", __func__);
 
-       au0828_write(dev, REG_2FF, 0x01);
+       au0828_write(dev, AU0828_I2C_MULTIBYTE_MODE_2FF, 0x01);
 
-       /* FIXME: There is a problem with i2c communications with xc5000 that
-          requires us to slow down the i2c clock until we have a better
-          strategy (such as using the secondary i2c bus to do firmware
-          loading */
-       if ((msg->addr << 1) == 0xc2)
-               au0828_write(dev, REG_202, 0x40);
-       else
-               au0828_write(dev, REG_202, 0x07);
+       /* Set the I2C clock */
+       au0828_write(dev, AU0828_I2C_CLK_DIVIDER_202,
+                    dev->board.i2c_clk_divider);
 
        /* Hardware needs 8 bit addresses */
-       au0828_write(dev, REG_203, msg->addr << 1);
+       au0828_write(dev, AU0828_I2C_DEST_ADDR_203, msg->addr << 1);
 
        dprintk(4, "SEND: %02x\n", msg->addr);
 
@@ -163,7 +163,9 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
                   actual bytes to the bus, just do a read check.  This is
                   consistent with how I saw i2c device checking done in the
                   USB trace of the Windows driver */
-               au0828_write(dev, REG_200, 0x20);
+               au0828_write(dev, AU0828_I2C_TRIGGER_200,
+                            AU0828_I2C_TRIGGER_READ);
+
                if (!i2c_wait_done(i2c_adap))
                        return -EIO;
 
@@ -177,7 +179,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
 
                dprintk(4, " %02x\n", msg->buf[i]);
 
-               au0828_write(dev, REG_205, msg->buf[i]);
+               au0828_write(dev, AU0828_I2C_WRITE_FIFO_205, msg->buf[i]);
 
                strobe++;
                i++;
@@ -186,9 +188,12 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
 
                        /* Strobe the byte into the bus */
                        if (i < msg->len)
-                               au0828_write(dev, REG_200, 0x41);
+                               au0828_write(dev, AU0828_I2C_TRIGGER_200,
+                                            AU0828_I2C_TRIGGER_WRITE |
+                                            AU0828_I2C_TRIGGER_HOLD);
                        else
-                               au0828_write(dev, REG_200, 0x01);
+                               au0828_write(dev, AU0828_I2C_TRIGGER_200,
+                                            AU0828_I2C_TRIGGER_WRITE);
 
                        /* Reset strobe trigger */
                        strobe = 0;
@@ -216,25 +221,22 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
 
        dprintk(4, "%s()\n", __func__);
 
-       au0828_write(dev, REG_2FF, 0x01);
+       au0828_write(dev, AU0828_I2C_MULTIBYTE_MODE_2FF, 0x01);
 
-       /* FIXME: There is a problem with i2c communications with xc5000 that
-          requires us to slow down the i2c clock until we have a better
-          strategy (such as using the secondary i2c bus to do firmware
-          loading */
-       if ((msg->addr << 1) == 0xc2)
-               au0828_write(dev, REG_202, 0x40);
-       else
-               au0828_write(dev, REG_202, 0x07);
+       /* Set the I2C clock */
+       au0828_write(dev, AU0828_I2C_CLK_DIVIDER_202,
+                    dev->board.i2c_clk_divider);
 
        /* Hardware needs 8 bit addresses */
-       au0828_write(dev, REG_203, msg->addr << 1);
+       au0828_write(dev, AU0828_I2C_DEST_ADDR_203, msg->addr << 1);
 
        dprintk(4, " RECV:\n");
 
        /* Deal with i2c_scan */
        if (msg->len == 0) {
-               au0828_write(dev, REG_200, 0x20);
+               au0828_write(dev, AU0828_I2C_TRIGGER_200,
+                            AU0828_I2C_TRIGGER_READ);
+
                if (i2c_wait_read_ack(i2c_adap))
                        return -EIO;
                return 0;
@@ -245,14 +247,18 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
                i++;
 
                if (i < msg->len)
-                       au0828_write(dev, REG_200, 0x60);
+                       au0828_write(dev, AU0828_I2C_TRIGGER_200,
+                                    AU0828_I2C_TRIGGER_READ |
+                                    AU0828_I2C_TRIGGER_HOLD);
                else
-                       au0828_write(dev, REG_200, 0x20);
+                       au0828_write(dev, AU0828_I2C_TRIGGER_200,
+                                    AU0828_I2C_TRIGGER_READ);
 
                if (!i2c_wait_read_done(i2c_adap))
                        return -EIO;
 
-               msg->buf[i-1] = au0828_read(dev, REG_209) & 0xff;
+               msg->buf[i-1] = au0828_read(dev, AU0828_I2C_READ_FIFO_209) &
+                       0xff;
 
                dprintk(4, " %02x\n", msg->buf[i-1]);
        }
index b15e4a3..c39f3d2 100644 (file)
 #define AU0828_SENSORCTRL_100 0x100
 #define AU0828_SENSORCTRL_VBI_103 0x103
 
-#define REG_200 0x200
-#define REG_201 0x201
-#define REG_202 0x202
-#define REG_203 0x203
-#define REG_205 0x205
-#define REG_209 0x209
-#define REG_2FF 0x2ff
+/* I2C registers */
+#define AU0828_I2C_TRIGGER_200         0x200
+#define AU0828_I2C_STATUS_201          0x201
+#define AU0828_I2C_CLK_DIVIDER_202     0x202
+#define AU0828_I2C_DEST_ADDR_203       0x203
+#define AU0828_I2C_WRITE_FIFO_205      0x205
+#define AU0828_I2C_READ_FIFO_209       0x209
+#define AU0828_I2C_MULTIBYTE_MODE_2FF  0x2ff
 
 /* Audio registers */
 #define AU0828_AUDIOCTRL_50C 0x50C
 
 #define REG_600 0x600
+
+/*********************************************************************/
+/* Here are constants for values associated with the above registers */
+
+/* I2C Trigger (Reg 0x200) */
+#define AU0828_I2C_TRIGGER_WRITE       0x01
+#define AU0828_I2C_TRIGGER_READ                0x20
+#define AU0828_I2C_TRIGGER_HOLD                0x40
+
+/* I2C Status (Reg 0x201) */
+#define AU0828_I2C_STATUS_READ_DONE    0x01
+#define AU0828_I2C_STATUS_NO_READ_ACK  0x02
+#define AU0828_I2C_STATUS_WRITE_DONE   0x04
+#define AU0828_I2C_STATUS_NO_WRITE_ACK 0x08
+#define AU0828_I2C_STATUS_BUSY         0x10
+
+/* I2C Clock Divider (Reg 0x202) */
+#define AU0828_I2C_CLK_250KHZ 0x07
+#define AU0828_I2C_CLK_100KHZ 0x14
+#define AU0828_I2C_CLK_30KHZ  0x40
index f7ad495..27bedc6 100644 (file)
@@ -1100,7 +1100,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id * norm)
           have to make the au0828 bridge adjust the size of its capture
           buffer, which is currently hardcoded at 720x480 */
 
-       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_std, *norm);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, *norm);
        return 0;
 }
 
@@ -1154,7 +1154,6 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index)
        struct au0828_fh *fh = priv;
        struct au0828_dev *dev = fh->dev;
        int i;
-       struct v4l2_routing route;
 
        dprintk(1, "VIDIOC_S_INPUT in function %s, input=%d\n", __func__,
                index);
@@ -1180,9 +1179,8 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index)
                break;
        }
 
-       route.input = AUVI_INPUT(index).vmux;
-       route.output = 0;
-       v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_routing, &route);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_routing,
+                       AUVI_INPUT(index).vmux, 0, 0);
 
        for (i = 0; i < AU0828_MAX_INPUT; i++) {
                int enable = 0;
@@ -1205,8 +1203,8 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index)
                }
        }
 
-       route.input = AUVI_INPUT(index).amux;
-       v4l2_device_call_all(&dev->v4l2_dev, 0, audio, s_routing, &route);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, audio, s_routing,
+                       AUVI_INPUT(index).amux, 0, 0);
        return 0;
 }
 
index 6ed1a61..b977915 100644 (file)
@@ -81,6 +81,7 @@ struct au0828_board {
        char *name;
        unsigned int tuner_type;
        unsigned char tuner_addr;
+       unsigned char i2c_clk_divider;
        struct au0828_input input[AU0828_MAX_INPUT];
 
 };
index df4516d..f9330e3 100644 (file)
@@ -292,21 +292,22 @@ static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int bt819_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int bt819_s_routing(struct v4l2_subdev *sd,
+                          u32 input, u32 output, u32 config)
 {
        struct bt819 *decoder = to_bt819(sd);
 
-       v4l2_dbg(1, debug, sd, "set input %x\n", route->input);
+       v4l2_dbg(1, debug, sd, "set input %x\n", input);
 
-       if (route->input < 0 || route->input > 7)
+       if (input < 0 || input > 7)
                return -EINVAL;
 
        if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
                v4l2_err(sd, "no notify found!\n");
 
-       if (decoder->input != route->input) {
+       if (decoder->input != input) {
                v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, 0);
-               decoder->input = route->input;
+               decoder->input = input;
                /* select mode */
                if (decoder->input == 0) {
                        bt819_setbit(decoder, 0x0b, 6, 0);
@@ -444,9 +445,6 @@ static const struct v4l2_subdev_core_ops bt819_core_ops = {
        .g_ctrl = bt819_g_ctrl,
        .s_ctrl = bt819_s_ctrl,
        .queryctrl = bt819_queryctrl,
-};
-
-static const struct v4l2_subdev_tuner_ops bt819_tuner_ops = {
        .s_std = bt819_s_std,
 };
 
@@ -459,7 +457,6 @@ static const struct v4l2_subdev_video_ops bt819_video_ops = {
 
 static const struct v4l2_subdev_ops bt819_ops = {
        .core = &bt819_core_ops,
-       .tuner = &bt819_tuner_ops,
        .video = &bt819_video_ops,
 };
 
index 78db395..d0b4d49 100644 (file)
@@ -142,16 +142,17 @@ static int bt856_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int bt856_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int bt856_s_routing(struct v4l2_subdev *sd,
+                          u32 input, u32 output, u32 config)
 {
        struct bt856 *encoder = to_bt856(sd);
 
-       v4l2_dbg(1, debug, sd, "set input %d\n", route->input);
+       v4l2_dbg(1, debug, sd, "set input %d\n", input);
 
        /* We only have video bus.
-        * route->input= 0: input is from bt819
-        * route->input= 1: input is from ZR36060 */
-       switch (route->input) {
+        * input= 0: input is from bt819
+        * input= 1: input is from ZR36060 */
+       switch (input) {
        case 0:
                bt856_setbit(encoder, 0xde, 4, 0);
                bt856_setbit(encoder, 0xde, 3, 1);
index 350cae4..af7e3a5 100644 (file)
@@ -99,7 +99,8 @@ static int bt866_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int bt866_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int bt866_s_routing(struct v4l2_subdev *sd,
+                          u32 input, u32 output, u32 config)
 {
        static const __u8 init[] = {
                0xc8, 0xcc, /* CRSCALE */
@@ -137,7 +138,7 @@ static int bt866_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *ro
 
        val = encoder->reg[0xdc];
 
-       if (route->input == 0)
+       if (input == 0)
                val |= 0x40; /* CBSWAP */
        else
                val &= ~0x40; /* !CBSWAP */
@@ -145,15 +146,15 @@ static int bt866_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *ro
        bt866_write(encoder, 0xdc, val);
 
        val = encoder->reg[0xcc];
-       if (route->input == 2)
+       if (input == 2)
                val |= 0x01; /* OSDBAR */
        else
                val &= ~0x01; /* !OSDBAR */
        bt866_write(encoder, 0xcc, val);
 
-       v4l2_dbg(1, debug, sd, "set input %d\n", route->input);
+       v4l2_dbg(1, debug, sd, "set input %d\n", input);
 
-       switch (route->input) {
+       switch (input) {
        case 0:
        case 1:
        case 2:
index b9c3ba5..fdb4adf 100644 (file)
@@ -3324,17 +3324,6 @@ void __devinit bttv_init_card1(struct bttv *btv)
 /* initialization part two -- after registering i2c bus */
 void __devinit bttv_init_card2(struct bttv *btv)
 {
-       static const unsigned short tvaudio_addrs[] = {
-               I2C_ADDR_TDA8425   >> 1,
-               I2C_ADDR_TEA6300   >> 1,
-               I2C_ADDR_TEA6420   >> 1,
-               I2C_ADDR_TDA9840   >> 1,
-               I2C_ADDR_TDA985x_L >> 1,
-               I2C_ADDR_TDA985x_H >> 1,
-               I2C_ADDR_TDA9874   >> 1,
-               I2C_ADDR_PIC16C54  >> 1,
-               I2C_CLIENT_END
-       };
        int addr=ADDR_UNSET;
 
        btv->tuner_type = UNSET;
@@ -3512,12 +3501,15 @@ void __devinit bttv_init_card2(struct bttv *btv)
 
                /* Load tuner module before issuing tuner config call! */
                if (bttv_tvcards[btv->c.type].has_radio)
-                       v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "tuner", "tuner", v4l2_i2c_tuner_addrs(ADDRS_RADIO));
-               v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap, "tuner",
-                               "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
-               v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap, "tuner",
-                               "tuner", v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
+                       v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_RADIO));
+               v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
+               v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
 
                tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
                tun_setup.type = btv->tuner_type;
@@ -3570,8 +3562,8 @@ void __devinit bttv_init_card2(struct bttv *btv)
                };
                struct v4l2_subdev *sd;
 
-               sd = v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "saa6588", "saa6588", addrs);
+               sd = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "saa6588", "saa6588", addrs);
                btv->has_saa6588 = (sd != NULL);
        }
 
@@ -3595,8 +3587,8 @@ void __devinit bttv_init_card2(struct bttv *btv)
                        I2C_CLIENT_END
                };
 
-               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "msp3400", "msp3400", addrs);
+               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "msp3400", "msp3400", addrs);
                if (btv->sd_msp34xx)
                        return;
                goto no_audio;
@@ -3609,16 +3601,16 @@ void __devinit bttv_init_card2(struct bttv *btv)
                        I2C_CLIENT_END
                };
 
-               if (v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "tda7432", "tda7432", addrs))
+               if (v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tda7432", "tda7432", addrs))
                        return;
                goto no_audio;
        }
 
        case 3: {
                /* The user specified that we should probe for tvaudio */
-               btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "tvaudio", "tvaudio", tvaudio_addrs);
+               btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs());
                if (btv->sd_tvaudio)
                        return;
                goto no_audio;
@@ -3637,21 +3629,13 @@ void __devinit bttv_init_card2(struct bttv *btv)
           it really is a msp3400, so it will return NULL when the device
           found is really something else (e.g. a tea6300). */
        if (!bttv_tvcards[btv->c.type].no_msp34xx) {
-               static const unsigned short addrs[] = {
-                       I2C_ADDR_MSP3400 >> 1,
-                       I2C_CLIENT_END
-               };
-
-               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "msp3400", "msp3400", addrs);
+               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "msp3400", "msp3400",
+                       I2C_ADDR_MSP3400 >> 1);
        } else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
-               static const unsigned short addrs[] = {
-                       I2C_ADDR_MSP3400_ALT >> 1,
-                       I2C_CLIENT_END
-               };
-
-               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "msp3400", "msp3400", addrs);
+               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "msp3400", "msp3400",
+                       I2C_ADDR_MSP3400_ALT >> 1);
        }
 
        /* If we found a msp34xx, then we're done. */
@@ -3665,14 +3649,14 @@ void __devinit bttv_init_card2(struct bttv *btv)
                        I2C_CLIENT_END
                };
 
-               if (v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                               "tda7432", "tda7432", addrs))
+               if (v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tda7432", "tda7432", addrs))
                        return;
        }
 
        /* Now see if we can find one of the tvaudio devices. */
-       btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.i2c_adap,
-                       "tvaudio", "tvaudio", tvaudio_addrs);
+       btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+               &btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs());
        if (btv->sd_tvaudio)
                return;
 
index 7a8ca0d..23b7499 100644 (file)
@@ -1198,7 +1198,7 @@ audio_mux(struct bttv *btv, int input, int mute)
        ctrl.value = btv->mute;
        bttv_call_all(btv, core, s_ctrl, &ctrl);
        if (btv->sd_msp34xx) {
-               struct v4l2_routing route;
+               u32 in;
 
                /* Note: the inputs tuner/radio/extern/intern are translated
                   to msp routings. This assumes common behavior for all msp3400
@@ -1207,11 +1207,11 @@ audio_mux(struct bttv *btv, int input, int mute)
                   For now this is sufficient. */
                switch (input) {
                case TVAUDIO_INPUT_RADIO:
-                       route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1,
+                       in = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1,
                                    MSP_DSP_IN_SCART, MSP_DSP_IN_SCART);
                        break;
                case TVAUDIO_INPUT_EXTERN:
-                       route.input = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
+                       in = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
                                    MSP_DSP_IN_SCART, MSP_DSP_IN_SCART);
                        break;
                case TVAUDIO_INPUT_INTERN:
@@ -1220,7 +1220,7 @@ audio_mux(struct bttv *btv, int input, int mute)
                           input is the BTTV_BOARD_AVERMEDIA98. I wonder how
                           that was tested. My guess is that the whole INTERN
                           input does not work. */
-                       route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1,
+                       in = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1,
                                    MSP_DSP_IN_SCART, MSP_DSP_IN_SCART);
                        break;
                case TVAUDIO_INPUT_TUNER:
@@ -1229,21 +1229,18 @@ audio_mux(struct bttv *btv, int input, int mute)
                           is the only difference between the VOODOOTV_FM
                           and VOODOOTV_200 */
                        if (btv->c.type == BTTV_BOARD_VOODOOTV_200)
-                               route.input = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER2, \
+                               in = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER2, \
                                        MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER);
                        else
-                               route.input = MSP_INPUT_DEFAULT;
+                               in = MSP_INPUT_DEFAULT;
                        break;
                }
-               route.output = MSP_OUTPUT_DEFAULT;
-               v4l2_subdev_call(btv->sd_msp34xx, audio, s_routing, &route);
+               v4l2_subdev_call(btv->sd_msp34xx, audio, s_routing,
+                              in, MSP_OUTPUT_DEFAULT, 0);
        }
        if (btv->sd_tvaudio) {
-               struct v4l2_routing route;
-
-               route.input = input;
-               route.output = 0;
-               v4l2_subdev_call(btv->sd_tvaudio, audio, s_routing, &route);
+               v4l2_subdev_call(btv->sd_tvaudio, audio, s_routing,
+                               input, 0, 0);
        }
        return 0;
 }
@@ -1329,7 +1326,7 @@ set_tvnorm(struct bttv *btv, unsigned int norm)
                break;
        }
        id = tvnorm->v4l2_id;
-       bttv_call_all(btv, tuner, s_std, id);
+       bttv_call_all(btv, core, s_std, id);
 
        return 0;
 }
@@ -4320,7 +4317,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
                       btv->c.nr);
                return -EIO;
        }
-       if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING "bttv%d: No suitable DMA available.\n",
                       btv->c.nr);
                return -EIO;
index 9649848..a1d0e9c 100644 (file)
@@ -26,7 +26,7 @@
 #define _BTTVP_H_
 
 #include <linux/version.h>
-#define BTTV_VERSION_CODE KERNEL_VERSION(0,9,17)
+#define BTTV_VERSION_CODE KERNEL_VERSION(0,9,18)
 
 #include <linux/types.h>
 #include <linux/wait.h>
index 7abe94d..5f58272 100644 (file)
@@ -1954,7 +1954,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,
                goto out_freeirq;
 
        cam->sensor_addr = 0x42;
-       cam->sensor = v4l2_i2c_new_subdev(&cam->i2c_adapter,
+       cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, &cam->i2c_adapter,
                        "ov7670", "ov7670", cam->sensor_addr);
        if (cam->sensor == NULL) {
                ret = -ENODEV;
index 9714059..57dc170 100644 (file)
@@ -53,14 +53,15 @@ static inline int cs5345_read(struct v4l2_subdev *sd, u8 reg)
        return i2c_smbus_read_byte_data(client, reg);
 }
 
-static int cs5345_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int cs5345_s_routing(struct v4l2_subdev *sd,
+                           u32 input, u32 output, u32 config)
 {
-       if ((route->input & 0xf) > 6) {
-               v4l2_err(sd, "Invalid input %d.\n", route->input);
+       if ((input & 0xf) > 6) {
+               v4l2_err(sd, "Invalid input %d.\n", input);
                return -EINVAL;
        }
-       cs5345_write(sd, 0x09, route->input & 0xf);
-       cs5345_write(sd, 0x05, route->input & 0xf0);
+       cs5345_write(sd, 0x09, input & 0xf);
+       cs5345_write(sd, 0x05, input & 0xf0);
        return 0;
 }
 
index 5aeb066..80bca8d 100644 (file)
@@ -58,17 +58,18 @@ static int cs53l32a_read(struct v4l2_subdev *sd, u8 reg)
        return i2c_smbus_read_byte_data(client, reg);
 }
 
-static int cs53l32a_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int cs53l32a_s_routing(struct v4l2_subdev *sd,
+                             u32 input, u32 output, u32 config)
 {
        /* There are 2 physical inputs, but the second input can be
           placed in two modes, the first mode bypasses the PGA (gain),
           the second goes through the PGA. Hence there are three
           possible inputs to choose from. */
-       if (route->input > 2) {
-               v4l2_err(sd, "Invalid input %d.\n", route->input);
+       if (input > 2) {
+               v4l2_err(sd, "Invalid input %d.\n", input);
                return -EINVAL;
        }
-       cs53l32a_write(sd, 0x01, 0x01 + (route->input << 4));
+       cs53l32a_write(sd, 0x01, 0x01 + (input << 4));
        return 0;
 }
 
index bb5c516..1519e91 100644 (file)
@@ -33,7 +33,6 @@
 int cx18_audio_set_io(struct cx18 *cx)
 {
        const struct cx18_card_audio_input *in;
-       struct v4l2_routing route;
        u32 val;
        int err;
 
@@ -44,13 +43,11 @@ int cx18_audio_set_io(struct cx18 *cx)
                in = &cx->card->audio_inputs[cx->audio_input];
 
        /* handle muxer chips */
-       route.input = in->muxer_input;
-       route.output = 0;
-       v4l2_subdev_call(cx->sd_extmux, audio, s_routing, &route);
+       v4l2_subdev_call(cx->sd_extmux, audio, s_routing,
+                       in->audio_input, 0, 0);
 
-       route.input = in->audio_input;
        err = cx18_call_hw_err(cx, cx->card->hw_audio_ctrl,
-                              audio, s_routing, &route);
+                              audio, s_routing, in->audio_input, 0, 0);
        if (err)
                return err;
 
index f4dd9d7..cf2bd88 100644 (file)
@@ -203,43 +203,42 @@ static int cx18_av_reset(struct v4l2_subdev *sd, u32 val)
 
 static int cx18_av_init(struct v4l2_subdev *sd, u32 val)
 {
-       struct cx18_av_state *state = to_cx18_av_state(sd);
        struct cx18 *cx = v4l2_get_subdevdata(sd);
 
-       switch (val) {
-       case CX18_AV_INIT_PLLS:
-               /*
-                * The crystal freq used in calculations in this driver will be
-                * 28.636360 MHz.
-                * Aim to run the PLLs' VCOs near 400 MHz to minimze errors.
-                */
+       /*
+        * The crystal freq used in calculations in this driver will be
+        * 28.636360 MHz.
+        * Aim to run the PLLs' VCOs near 400 MHz to minimze errors.
+        */
 
-               /*
-                * VDCLK  Integer = 0x0f, Post Divider = 0x04
-                * AIMCLK Integer = 0x0e, Post Divider = 0x16
-                */
-               cx18_av_write4(cx, CXADEC_PLL_CTRL1, 0x160e040f);
+       /*
+        * VDCLK  Integer = 0x0f, Post Divider = 0x04
+        * AIMCLK Integer = 0x0e, Post Divider = 0x16
+        */
+       cx18_av_write4(cx, CXADEC_PLL_CTRL1, 0x160e040f);
 
-               /* VDCLK Fraction = 0x2be2fe */
-               /* xtal * 0xf.15f17f0/4 = 108 MHz: 432 MHz before post divide */
-               cx18_av_write4(cx, CXADEC_VID_PLL_FRAC, 0x002be2fe);
+       /* VDCLK Fraction = 0x2be2fe */
+       /* xtal * 0xf.15f17f0/4 = 108 MHz: 432 MHz before post divide */
+       cx18_av_write4(cx, CXADEC_VID_PLL_FRAC, 0x002be2fe);
 
-               /* AIMCLK Fraction = 0x05227ad */
-               /* xtal * 0xe.2913d68/0x16 = 48000 * 384: 406 MHz pre post-div*/
-               cx18_av_write4(cx, CXADEC_AUX_PLL_FRAC, 0x005227ad);
+       /* AIMCLK Fraction = 0x05227ad */
+       /* xtal * 0xe.2913d68/0x16 = 48000 * 384: 406 MHz pre post-div*/
+       cx18_av_write4(cx, CXADEC_AUX_PLL_FRAC, 0x005227ad);
 
-               /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x16 */
-               cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56);
-               break;
+       /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x16 */
+       cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56);
+       return 0;
+}
 
-       case CX18_AV_INIT_NORMAL:
-       default:
-               if (!state->is_initialized) {
-                       /* initialize on first use */
-                       state->is_initialized = 1;
-                       cx18_av_initialize(cx);
-               }
-               break;
+static int cx18_av_load_fw(struct v4l2_subdev *sd)
+{
+       struct cx18_av_state *state = to_cx18_av_state(sd);
+       struct cx18 *cx = v4l2_get_subdevdata(sd);
+
+       if (!state->is_initialized) {
+               /* initialize on first use */
+               state->is_initialized = 1;
+               cx18_av_initialize(cx);
        }
        return 0;
 }
@@ -548,19 +547,19 @@ static int set_input(struct cx18 *cx, enum cx18_av_video_input vid_input,
 }
 
 static int cx18_av_s_video_routing(struct v4l2_subdev *sd,
-                                  const struct v4l2_routing *route)
+                                  u32 input, u32 output, u32 config)
 {
        struct cx18_av_state *state = to_cx18_av_state(sd);
        struct cx18 *cx = v4l2_get_subdevdata(sd);
-       return set_input(cx, route->input, state->aud_input);
+       return set_input(cx, input, state->aud_input);
 }
 
 static int cx18_av_s_audio_routing(struct v4l2_subdev *sd,
-                                  const struct v4l2_routing *route)
+                                  u32 input, u32 output, u32 config)
 {
        struct cx18_av_state *state = to_cx18_av_state(sd);
        struct cx18 *cx = v4l2_get_subdevdata(sd);
-       return set_input(cx, state->vid_input, route->input);
+       return set_input(cx, state->vid_input, input);
 }
 
 static int cx18_av_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
@@ -1185,10 +1184,12 @@ static const struct v4l2_subdev_core_ops cx18_av_general_ops = {
        .g_chip_ident = cx18_av_g_chip_ident,
        .log_status = cx18_av_log_status,
        .init = cx18_av_init,
+       .load_fw = cx18_av_load_fw,
        .reset = cx18_av_reset,
        .queryctrl = cx18_av_queryctrl,
        .g_ctrl = cx18_av_g_ctrl,
        .s_ctrl = cx18_av_s_ctrl,
+       .s_std = cx18_av_s_std,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = cx18_av_g_register,
        .s_register = cx18_av_s_register,
@@ -1200,7 +1201,6 @@ static const struct v4l2_subdev_tuner_ops cx18_av_tuner_ops = {
        .s_frequency = cx18_av_s_frequency,
        .g_tuner = cx18_av_g_tuner,
        .s_tuner = cx18_av_s_tuner,
-       .s_std = cx18_av_s_std,
 };
 
 static const struct v4l2_subdev_audio_ops cx18_av_audio_ops = {
index c458120..9b84a0c 100644 (file)
@@ -328,11 +328,6 @@ static inline struct cx18_av_state *to_cx18_av_state(struct v4l2_subdev *sd)
        return container_of(sd, struct cx18_av_state, sd);
 }
 
-enum cx18_av_subdev_init_arg {
-       CX18_AV_INIT_NORMAL = 0,
-       CX18_AV_INIT_PLLS = 1,
-};
-
 /* ----------------------------------------------------------------------- */
 /* cx18_av-core.c                                                         */
 int cx18_av_write(struct cx18 *cx, u16 addr, u8 value);
index 210c68a..49b1c3d 100644 (file)
@@ -810,7 +810,7 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev,
                CX18_ERR("Could not register A/V decoder subdevice\n");
                goto free_map;
        }
-       cx18_call_hw(cx, CX18_HW_418_AV, core, init, (u32) CX18_AV_INIT_PLLS);
+       cx18_call_hw(cx, CX18_HW_418_AV, core, init, 0);
 
        /* Initialize GPIO Reset Controller to do chip resets during i2c init */
        if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) {
@@ -1028,7 +1028,7 @@ int cx18_init_on_first_open(struct cx18 *cx)
        cx18_vapi(cx, CX18_APU_STOP, 1, CX18_APU_ENCODING_METHOD_MPEG);
 
        /* Init the A/V decoder, if it hasn't been already */
-       v4l2_subdev_call(cx->sd_av, core, init, (u32) CX18_AV_INIT_NORMAL);
+       v4l2_subdev_call(cx->sd_av, core, load_fw);
 
        vf.tuner = 0;
        vf.type = V4L2_TUNER_ANALOG_TV;
index 4d7d6d5..b3889c0 100644 (file)
@@ -608,7 +608,7 @@ int cx18_v4l2_close(struct file *filp)
                /* Mark that the radio is no longer in use */
                clear_bit(CX18_F_I_RADIO_USER, &cx->i_flags);
                /* Switch tuner to TV */
-               cx18_call_all(cx, tuner, s_std, cx->std);
+               cx18_call_all(cx, core, s_std, cx->std);
                /* Select correct audio input (i.e. TV tuner or Line in) */
                cx18_audio_set_io(cx);
                if (atomic_read(&cx->ana_capturing) > 0) {
index 5518d14..86a204b 100644 (file)
@@ -156,12 +156,12 @@ static int gpiomux_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
 }
 
 static int gpiomux_s_audio_routing(struct v4l2_subdev *sd,
-                                  const struct v4l2_routing *route)
+                                  u32 input, u32 output, u32 config)
 {
        struct cx18 *cx = v4l2_get_subdevdata(sd);
        u32 data;
 
-       switch (route->input) {
+       switch (input) {
        case 0:
                data = cx->card->gpio_audio_input.tuner;
                break;
@@ -180,10 +180,10 @@ static int gpiomux_s_audio_routing(struct v4l2_subdev *sd,
 
 static const struct v4l2_subdev_core_ops gpiomux_core_ops = {
        .log_status = gpiomux_log_status,
+       .s_std = gpiomux_s_std,
 };
 
 static const struct v4l2_subdev_tuner_ops gpiomux_tuner_ops = {
-       .s_std = gpiomux_s_std,
        .s_radio = gpiomux_s_radio,
 };
 
index d092643..b9b7064 100644 (file)
@@ -100,16 +100,16 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx)
 
        if (hw == CX18_HW_TUNER) {
                /* special tuner group handling */
-               sd = v4l2_i2c_new_probed_subdev(adap, mod, type,
-                                               cx->card_i2c->radio);
+               sd = v4l2_i2c_new_probed_subdev(&cx->v4l2_dev,
+                               adap, mod, type, cx->card_i2c->radio);
                if (sd != NULL)
                        sd->grp_id = hw;
-               sd = v4l2_i2c_new_probed_subdev(adap, mod, type,
-                                               cx->card_i2c->demod);
+               sd = v4l2_i2c_new_probed_subdev(&cx->v4l2_dev,
+                               adap, mod, type, cx->card_i2c->demod);
                if (sd != NULL)
                        sd->grp_id = hw;
-               sd = v4l2_i2c_new_probed_subdev(adap, mod, type,
-                                               cx->card_i2c->tv);
+               sd = v4l2_i2c_new_probed_subdev(&cx->v4l2_dev,
+                               adap, mod, type, cx->card_i2c->tv);
                if (sd != NULL)
                        sd->grp_id = hw;
                return sd != NULL ? 0 : -1;
@@ -120,7 +120,7 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx)
                return -1;
 
        /* It's an I2C device other than an analog tuner */
-       sd = v4l2_i2c_new_subdev(adap, mod, type, hw_addrs[idx]);
+       sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, mod, type, hw_addrs[idx]);
        if (sd != NULL)
                sd->grp_id = hw;
        return sd != NULL ? 0 : -1;
index e4c9e3d..d7b1921 100644 (file)
@@ -705,7 +705,7 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std)
                        (unsigned long long) cx->std);
 
        /* Tuner */
-       cx18_call_all(cx, tuner, s_std, cx->std);
+       cx18_call_all(cx, core, s_std, cx->std);
        return 0;
 }
 
@@ -926,16 +926,6 @@ static long cx18_default(struct file *file, void *fh, int cmd, void *arg)
        struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
 
        switch (cmd) {
-       case VIDIOC_INT_S_AUDIO_ROUTING: {
-               struct v4l2_routing *route = arg;
-
-               CX18_DEBUG_IOCTL("VIDIOC_INT_S_AUDIO_ROUTING(%d, %d)\n",
-                       route->input, route->output);
-               cx18_call_hw(cx, cx->card->hw_audio_ctrl, audio, s_routing,
-                            route);
-               break;
-       }
-
        case VIDIOC_INT_RESET: {
                u32 val = *(u32 *)arg;
 
index 6fdaded..6dc84aa 100644 (file)
 
 void cx18_video_set_io(struct cx18 *cx)
 {
-       struct v4l2_routing route;
        int inp = cx->active_input;
-       u32 type;
 
-       route.input = cx->card->video_inputs[inp].video_input;
-       route.output = 0;
-       v4l2_subdev_call(cx->sd_av, video, s_routing, &route);
-
-       type = cx->card->video_inputs[inp].video_type;
-
-       if (type == CX18_CARD_INPUT_VID_TUNER)
-               route.input = 0;  /* Tuner */
-       else if (type < CX18_CARD_INPUT_COMPOSITE1)
-               route.input = 2;  /* S-Video */
-       else
-               route.input = 1;  /* Composite */
+       v4l2_subdev_call(cx->sd_av, video, s_routing,
+                       cx->card->video_inputs[inp].video_input, 0, 0);
 }
diff --git a/drivers/media/video/cx231xx/Kconfig b/drivers/media/video/cx231xx/Kconfig
new file mode 100644 (file)
index 0000000..9115654
--- /dev/null
@@ -0,0 +1,35 @@
+config VIDEO_CX231XX
+       tristate "Conexant cx231xx USB video capture support"
+       depends on VIDEO_DEV && I2C && INPUT
+       select VIDEO_TUNER
+       select VIDEO_TVEEPROM
+       select VIDEO_IR
+       select VIDEOBUF_VMALLOC
+       select VIDEO_CX25840
+       select VIDEO_CX231XX_ALSA
+
+       ---help---
+         This is a video4linux driver for Conexant 231xx USB based TV cards.
+
+         To compile this driver as a module, choose M here: the
+         module will be called cx231xx
+
+config VIDEO_CX231XX_ALSA
+    tristate "Conexant Cx231xx ALSA audio module"
+       depends on VIDEO_CX231XX && SND
+       select SND_PCM
+
+       ---help---
+        This is an ALSA driver for Cx231xx USB based TV cards.
+
+        To compile this driver as a module, choose M here: the
+        module will be called cx231xx-alsa
+
+config VIDEO_CX231XX_DVB
+       tristate "DVB/ATSC Support for Cx231xx based TV cards"
+       depends on VIDEO_CX231XX && DVB_CORE
+       select VIDEOBUF_DVB
+       select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE
+       ---help---
+        This adds support for DVB cards based on the
+        Conexant cx231xx chips.
diff --git a/drivers/media/video/cx231xx/Makefile b/drivers/media/video/cx231xx/Makefile
new file mode 100644 (file)
index 0000000..755dd0c
--- /dev/null
@@ -0,0 +1,14 @@
+cx231xx-objs     := cx231xx-video.o cx231xx-i2c.o cx231xx-cards.o cx231xx-core.o \
+                   cx231xx-avcore.o cx231xx-pcb-cfg.o cx231xx-vbi.o
+
+cx231xx-alsa-objs := cx231xx-audio.o
+
+obj-$(CONFIG_VIDEO_CX231XX) += cx231xx.o
+obj-$(CONFIG_VIDEO_CX231XX_ALSA) += cx231xx-alsa.o
+obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o
+
+EXTRA_CFLAGS += -Idrivers/media/video
+EXTRA_CFLAGS += -Idrivers/media/common/tuners
+EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
+EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
+
diff --git a/drivers/media/video/cx231xx/cx231xx-audio.c b/drivers/media/video/cx231xx/cx231xx-audio.c
new file mode 100644 (file)
index 0000000..7793d60
--- /dev/null
@@ -0,0 +1,586 @@
+/*
+ *  Conexant Cx231xx audio extension
+ *
+ *  Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+ *       Based on em28xx driver
+ *
+ *
+ *  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.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/usb.h>
+#include <linux/init.h>
+#include <linux/sound.h>
+#include <linux/spinlock.h>
+#include <linux/soundcard.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/proc_fs.h>
+#include <linux/module.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/info.h>
+#include <sound/initval.h>
+#include <sound/control.h>
+#include <media/v4l2-common.h>
+#include "cx231xx.h"
+
+static int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "activates debug info");
+
+#define dprintk(fmt, arg...) do {                                      \
+               if (debug)                                              \
+                       printk(KERN_INFO "cx231xx-audio %s: " fmt,      \
+                               __func__, ##arg);                       \
+       } while (0)
+
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+
+static int cx231xx_isoc_audio_deinit(struct cx231xx *dev)
+{
+       int i;
+
+       dprintk("Stopping isoc\n");
+
+       for (i = 0; i < CX231XX_AUDIO_BUFS; i++) {
+               if (dev->adev.urb[i]) {
+                       if (!irqs_disabled())
+                               usb_kill_urb(dev->adev.urb[i]);
+                       else
+                               usb_unlink_urb(dev->adev.urb[i]);
+
+                       usb_free_urb(dev->adev.urb[i]);
+                       dev->adev.urb[i] = NULL;
+
+                       kfree(dev->adev.transfer_buffer[i]);
+                       dev->adev.transfer_buffer[i] = NULL;
+               }
+       }
+
+       return 0;
+}
+
+static void cx231xx_audio_isocirq(struct urb *urb)
+{
+       struct cx231xx *dev = urb->context;
+       int i;
+       unsigned int oldptr;
+       int period_elapsed = 0;
+       int status;
+       unsigned char *cp;
+       unsigned int stride;
+       struct snd_pcm_substream *substream;
+       struct snd_pcm_runtime *runtime;
+
+       switch (urb->status) {
+       case 0:         /* success */
+       case -ETIMEDOUT:        /* NAK */
+               break;
+       case -ECONNRESET:       /* kill */
+       case -ENOENT:
+       case -ESHUTDOWN:
+               return;
+       default:                /* error */
+               dprintk("urb completition error %d.\n", urb->status);
+               break;
+       }
+
+       if (dev->adev.capture_pcm_substream) {
+               substream = dev->adev.capture_pcm_substream;
+               runtime = substream->runtime;
+               stride = runtime->frame_bits >> 3;
+
+               for (i = 0; i < urb->number_of_packets; i++) {
+                       int length = urb->iso_frame_desc[i].actual_length /
+                                    stride;
+                       cp = (unsigned char *)urb->transfer_buffer +
+                                             urb->iso_frame_desc[i].offset;
+
+                       if (!length)
+                               continue;
+
+                       oldptr = dev->adev.hwptr_done_capture;
+                       if (oldptr + length >= runtime->buffer_size) {
+                               unsigned int cnt;
+
+                               cnt = runtime->buffer_size - oldptr;
+                               memcpy(runtime->dma_area + oldptr * stride, cp,
+                                      cnt * stride);
+                               memcpy(runtime->dma_area, cp + cnt * stride,
+                                      length * stride - cnt * stride);
+                       } else {
+                               memcpy(runtime->dma_area + oldptr * stride, cp,
+                                      length * stride);
+                       }
+
+                       snd_pcm_stream_lock(substream);
+
+                       dev->adev.hwptr_done_capture += length;
+                       if (dev->adev.hwptr_done_capture >=
+                                               runtime->buffer_size)
+                               dev->adev.hwptr_done_capture -=
+                                               runtime->buffer_size;
+
+                       dev->adev.capture_transfer_done += length;
+                       if (dev->adev.capture_transfer_done >=
+                               runtime->period_size) {
+                               dev->adev.capture_transfer_done -=
+                                               runtime->period_size;
+                               period_elapsed = 1;
+                       }
+                       snd_pcm_stream_unlock(substream);
+               }
+               if (period_elapsed)
+                       snd_pcm_period_elapsed(substream);
+       }
+       urb->status = 0;
+
+       status = usb_submit_urb(urb, GFP_ATOMIC);
+       if (status < 0) {
+               cx231xx_errdev("resubmit of audio urb failed (error=%i)\n",
+                              status);
+       }
+       return;
+}
+
+static int cx231xx_init_audio_isoc(struct cx231xx *dev)
+{
+       int i, errCode;
+       int sb_size;
+
+       cx231xx_info("%s: Starting AUDIO transfers\n", __func__);
+
+       sb_size = CX231XX_NUM_AUDIO_PACKETS * dev->adev.max_pkt_size;
+
+       for (i = 0; i < CX231XX_AUDIO_BUFS; i++) {
+               struct urb *urb;
+               int j, k;
+
+               dev->adev.transfer_buffer[i] = kmalloc(sb_size, GFP_ATOMIC);
+               if (!dev->adev.transfer_buffer[i])
+                       return -ENOMEM;
+
+               memset(dev->adev.transfer_buffer[i], 0x80, sb_size);
+               urb = usb_alloc_urb(CX231XX_NUM_AUDIO_PACKETS, GFP_ATOMIC);
+               if (!urb) {
+                       cx231xx_errdev("usb_alloc_urb failed!\n");
+                       for (j = 0; j < i; j++) {
+                               usb_free_urb(dev->adev.urb[j]);
+                               kfree(dev->adev.transfer_buffer[j]);
+                       }
+                       return -ENOMEM;
+               }
+
+               urb->dev = dev->udev;
+               urb->context = dev;
+               urb->pipe = usb_rcvisocpipe(dev->udev,
+                                               dev->adev.end_point_addr);
+               urb->transfer_flags = URB_ISO_ASAP;
+               urb->transfer_buffer = dev->adev.transfer_buffer[i];
+               urb->interval = 1;
+               urb->complete = cx231xx_audio_isocirq;
+               urb->number_of_packets = CX231XX_NUM_AUDIO_PACKETS;
+               urb->transfer_buffer_length = sb_size;
+
+               for (j = k = 0; j < CX231XX_NUM_AUDIO_PACKETS;
+                       j++, k += dev->adev.max_pkt_size) {
+                       urb->iso_frame_desc[j].offset = k;
+                       urb->iso_frame_desc[j].length = dev->adev.max_pkt_size;
+               }
+               dev->adev.urb[i] = urb;
+       }
+
+       for (i = 0; i < CX231XX_AUDIO_BUFS; i++) {
+               errCode = usb_submit_urb(dev->adev.urb[i], GFP_ATOMIC);
+               if (errCode < 0) {
+                       cx231xx_isoc_audio_deinit(dev);
+                       return errCode;
+               }
+       }
+
+       return errCode;
+}
+
+static int cx231xx_cmd(struct cx231xx *dev, int cmd, int arg)
+{
+       dprintk("%s transfer\n", (dev->adev.capture_stream == STREAM_ON) ?
+               "stop" : "start");
+
+       switch (cmd) {
+       case CX231XX_CAPTURE_STREAM_EN:
+               if (dev->adev.capture_stream == STREAM_OFF && arg == 1) {
+                       dev->adev.capture_stream = STREAM_ON;
+                       cx231xx_init_audio_isoc(dev);
+               } else if (dev->adev.capture_stream == STREAM_ON && arg == 0) {
+                       dev->adev.capture_stream = STREAM_OFF;
+                       cx231xx_isoc_audio_deinit(dev);
+               } else {
+                       cx231xx_errdev("An underrun very likely occurred. "
+                                      "Ignoring it.\n");
+               }
+               return 0;
+       default:
+               return -EINVAL;
+       }
+}
+
+static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
+                                       size_t size)
+{
+       struct snd_pcm_runtime *runtime = subs->runtime;
+
+       dprintk("Allocating vbuffer\n");
+       if (runtime->dma_area) {
+               if (runtime->dma_bytes > size)
+                       return 0;
+
+               vfree(runtime->dma_area);
+       }
+       runtime->dma_area = vmalloc(size);
+       if (!runtime->dma_area)
+               return -ENOMEM;
+
+       runtime->dma_bytes = size;
+
+       return 0;
+}
+
+static struct snd_pcm_hardware snd_cx231xx_hw_capture = {
+       .info = SNDRV_PCM_INFO_BLOCK_TRANSFER   |
+           SNDRV_PCM_INFO_MMAP                 |
+           SNDRV_PCM_INFO_INTERLEAVED          |
+           SNDRV_PCM_INFO_MMAP_VALID,
+
+       .formats = SNDRV_PCM_FMTBIT_S16_LE,
+
+       .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_KNOT,
+
+       .rate_min = 48000,
+       .rate_max = 48000,
+       .channels_min = 2,
+       .channels_max = 2,
+       .buffer_bytes_max = 62720 * 8,  /* just about the value in usbaudio.c */
+       .period_bytes_min = 64,         /* 12544/2, */
+       .period_bytes_max = 12544,
+       .periods_min = 2,
+       .periods_max = 98,              /* 12544, */
+};
+
+static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream)
+{
+       struct cx231xx *dev = snd_pcm_substream_chip(substream);
+       struct snd_pcm_runtime *runtime = substream->runtime;
+       int ret = 0;
+
+       dprintk("opening device and trying to acquire exclusive lock\n");
+
+       if (!dev) {
+               cx231xx_errdev("BUG: cx231xx can't find device struct."
+                              " Can't proceed with open\n");
+               return -ENODEV;
+       }
+
+       /* Sets volume, mute, etc */
+       dev->mute = 0;
+
+       /* set alternate setting for audio interface */
+       /* 1 - 48000 samples per sec */
+       ret = cx231xx_set_alt_setting(dev, INDEX_AUDIO, 1);
+       if (ret < 0) {
+               cx231xx_errdev("failed to set alternate setting !\n");
+
+               return ret;
+       }
+
+       /* inform hardware to start streaming */
+       ret = cx231xx_capture_start(dev, 1, Audio);
+
+       runtime->hw = snd_cx231xx_hw_capture;
+
+       mutex_lock(&dev->lock);
+       dev->adev.users++;
+       mutex_unlock(&dev->lock);
+
+       snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
+       dev->adev.capture_pcm_substream = substream;
+       runtime->private_data = dev;
+
+       return 0;
+}
+
+static int snd_cx231xx_pcm_close(struct snd_pcm_substream *substream)
+{
+       int ret;
+       struct cx231xx *dev = snd_pcm_substream_chip(substream);
+
+       dprintk("closing device\n");
+
+       /* set alternate setting for audio interface */
+       /* 1 - 48000 samples per sec */
+       ret = cx231xx_set_alt_setting(dev, INDEX_AUDIO, 0);
+       if (ret < 0) {
+               cx231xx_errdev("failed to set alternate setting !\n");
+
+               return ret;
+       }
+
+       /* inform hardware to start streaming */
+       ret = cx231xx_capture_start(dev, 0, Audio);
+
+       dev->mute = 1;
+       mutex_lock(&dev->lock);
+       dev->adev.users--;
+       mutex_unlock(&dev->lock);
+
+       if (dev->adev.users == 0 && dev->adev.shutdown == 1) {
+               dprintk("audio users: %d\n", dev->adev.users);
+               dprintk("disabling audio stream!\n");
+               dev->adev.shutdown = 0;
+               dprintk("released lock\n");
+               cx231xx_cmd(dev, CX231XX_CAPTURE_STREAM_EN, 0);
+       }
+       return 0;
+}
+
+static int snd_cx231xx_hw_capture_params(struct snd_pcm_substream *substream,
+                                        struct snd_pcm_hw_params *hw_params)
+{
+       unsigned int channels, rate, format;
+       int ret;
+
+       dprintk("Setting capture parameters\n");
+
+       ret = snd_pcm_alloc_vmalloc_buffer(substream,
+                                          params_buffer_bytes(hw_params));
+       format = params_format(hw_params);
+       rate = params_rate(hw_params);
+       channels = params_channels(hw_params);
+
+       /* TODO: set up cx231xx audio chip to deliver the correct audio format,
+          current default is 48000hz multiplexed => 96000hz mono
+          which shouldn't matter since analogue TV only supports mono */
+       return 0;
+}
+
+static int snd_cx231xx_hw_capture_free(struct snd_pcm_substream *substream)
+{
+       struct cx231xx *dev = snd_pcm_substream_chip(substream);
+
+       dprintk("Stop capture, if needed\n");
+
+       if (dev->adev.capture_stream == STREAM_ON)
+               cx231xx_cmd(dev, CX231XX_CAPTURE_STREAM_EN, CX231XX_STOP_AUDIO);
+
+       return 0;
+}
+
+static int snd_cx231xx_prepare(struct snd_pcm_substream *substream)
+{
+       return 0;
+}
+
+static int snd_cx231xx_capture_trigger(struct snd_pcm_substream *substream,
+                                      int cmd)
+{
+       struct cx231xx *dev = snd_pcm_substream_chip(substream);
+       int retval;
+
+       dprintk("Should %s capture\n", (cmd == SNDRV_PCM_TRIGGER_START) ?
+               "start" : "stop");
+
+       spin_lock(&dev->adev.slock);
+       switch (cmd) {
+       case SNDRV_PCM_TRIGGER_START:
+               cx231xx_cmd(dev, CX231XX_CAPTURE_STREAM_EN,
+                           CX231XX_START_AUDIO);
+               retval = 0;
+               break;
+       case SNDRV_PCM_TRIGGER_STOP:
+               cx231xx_cmd(dev, CX231XX_CAPTURE_STREAM_EN, CX231XX_STOP_AUDIO);
+               retval = 0;
+               break;
+       default:
+               retval = -EINVAL;
+       }
+
+       spin_unlock(&dev->adev.slock);
+       return retval;
+}
+
+static snd_pcm_uframes_t snd_cx231xx_capture_pointer(struct snd_pcm_substream
+                                                    *substream)
+{
+       struct cx231xx *dev;
+       unsigned long flags;
+       snd_pcm_uframes_t hwptr_done;
+
+       dev = snd_pcm_substream_chip(substream);
+
+       spin_lock_irqsave(&dev->adev.slock, flags);
+       hwptr_done = dev->adev.hwptr_done_capture;
+       spin_unlock_irqrestore(&dev->adev.slock, flags);
+
+       return hwptr_done;
+}
+
+static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
+                                            unsigned long offset)
+{
+       void *pageptr = subs->runtime->dma_area + offset;
+
+       return vmalloc_to_page(pageptr);
+}
+
+static struct snd_pcm_ops snd_cx231xx_pcm_capture = {
+       .open = snd_cx231xx_capture_open,
+       .close = snd_cx231xx_pcm_close,
+       .ioctl = snd_pcm_lib_ioctl,
+       .hw_params = snd_cx231xx_hw_capture_params,
+       .hw_free = snd_cx231xx_hw_capture_free,
+       .prepare = snd_cx231xx_prepare,
+       .trigger = snd_cx231xx_capture_trigger,
+       .pointer = snd_cx231xx_capture_pointer,
+       .page = snd_pcm_get_vmalloc_page,
+};
+
+static int cx231xx_audio_init(struct cx231xx *dev)
+{
+       struct cx231xx_audio *adev = &dev->adev;
+       struct snd_pcm *pcm;
+       struct snd_card *card;
+       static int devnr;
+       int err;
+       struct usb_interface *uif;
+       int i, isoc_pipe = 0;
+
+       if (dev->has_alsa_audio != 1) {
+               /* This device does not support the extension (in this case
+                  the device is expecting the snd-usb-audio module or
+                  doesn't have analog audio support at all) */
+               return 0;
+       }
+
+       cx231xx_info("cx231xx-audio.c: probing for cx231xx "
+                    "non standard usbaudio\n");
+
+       err = snd_card_create(index[devnr], "Cx231xx Audio", THIS_MODULE,
+                             0, &card);
+       if (err < 0)
+               return err;
+
+       spin_lock_init(&adev->slock);
+       err = snd_pcm_new(card, "Cx231xx Audio", 0, 0, 1, &pcm);
+       if (err < 0) {
+               snd_card_free(card);
+               return err;
+       }
+
+       snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
+                       &snd_cx231xx_pcm_capture);
+       pcm->info_flags = 0;
+       pcm->private_data = dev;
+       strcpy(pcm->name, "Conexant cx231xx Capture");
+       strcpy(card->driver, "Conexant cx231xx Audio");
+       strcpy(card->shortname, "Cx231xx Audio");
+       strcpy(card->longname, "Conexant cx231xx Audio");
+
+       err = snd_card_register(card);
+       if (err < 0) {
+               snd_card_free(card);
+               return err;
+       }
+       adev->sndcard = card;
+       adev->udev = dev->udev;
+
+       /* compute alternate max packet sizes for Audio */
+       uif =
+           dev->udev->actconfig->interface[dev->current_pcb_config.
+                                           hs_config_info[0].interface_info.
+                                           audio_index + 1];
+
+       adev->end_point_addr =
+           le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
+                       bEndpointAddress);
+
+       adev->num_alt = uif->num_altsetting;
+       cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+                    adev->end_point_addr, adev->num_alt);
+       adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL);
+
+       if (adev->alt_max_pkt_size == NULL) {
+               cx231xx_errdev("out of memory!\n");
+               return -ENOMEM;
+       }
+
+       for (i = 0; i < adev->num_alt; i++) {
+               u16 tmp =
+                   le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.
+                               wMaxPacketSize);
+               adev->alt_max_pkt_size[i] =
+                   (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+               cx231xx_info("Alternate setting %i, max size= %i\n", i,
+                            adev->alt_max_pkt_size[i]);
+       }
+
+       return 0;
+}
+
+static int cx231xx_audio_fini(struct cx231xx *dev)
+{
+       if (dev == NULL)
+               return 0;
+
+       if (dev->has_alsa_audio != 1) {
+               /* This device does not support the extension (in this case
+                  the device is expecting the snd-usb-audio module or
+                  doesn't have analog audio support at all) */
+               return 0;
+       }
+
+       if (dev->adev.sndcard) {
+               snd_card_free(dev->adev.sndcard);
+               kfree(dev->adev.alt_max_pkt_size);
+               dev->adev.sndcard = NULL;
+       }
+
+       return 0;
+}
+
+static struct cx231xx_ops audio_ops = {
+       .id = CX231XX_AUDIO,
+       .name = "Cx231xx Audio Extension",
+       .init = cx231xx_audio_init,
+       .fini = cx231xx_audio_fini,
+};
+
+static int __init cx231xx_alsa_register(void)
+{
+       return cx231xx_register_extension(&audio_ops);
+}
+
+static void __exit cx231xx_alsa_unregister(void)
+{
+       cx231xx_unregister_extension(&audio_ops);
+}
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>");
+MODULE_DESCRIPTION("Cx231xx Audio driver");
+
+module_init(cx231xx_alsa_register);
+module_exit(cx231xx_alsa_unregister);
diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c
new file mode 100644 (file)
index 0000000..1be3881
--- /dev/null
@@ -0,0 +1,2581 @@
+/*
+   cx231xx_avcore.c - driver for Conexant Cx23100/101/102
+                     USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+
+   This program contains the specific code to control the avdecoder chip and
+   other related usb control functions for cx231xx based chipset.
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/bitmap.h>
+#include <linux/usb.h>
+#include <linux/i2c.h>
+#include <linux/version.h>
+#include <linux/mm.h>
+#include <linux/mutex.h>
+
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
+#include <media/v4l2-chip-ident.h>
+
+#include "cx231xx.h"
+
+/******************************************************************************
+                       -: BLOCK ARRANGEMENT :-
+       I2S block ----------------------|
+       [I2S audio]                     |
+                                       |
+       Analog Front End --> Direct IF -|-> Cx25840 --> Audio
+       [video & audio]                 |   [Audio]
+                                       |
+                                       |-> Cx25840 --> Video
+                                           [Video]
+
+*******************************************************************************/
+
+/******************************************************************************
+ *                    A F E - B L O C K    C O N T R O L   functions          *
+ *                             [ANALOG FRONT END]                            *
+ ******************************************************************************/
+static int afe_write_byte(struct cx231xx *dev, u16 saddr, u8 data)
+{
+       return cx231xx_write_i2c_data(dev, AFE_DEVICE_ADDRESS,
+                                       saddr, 2, data, 1);
+}
+
+static int afe_read_byte(struct cx231xx *dev, u16 saddr, u8 *data)
+{
+       int status;
+       u32 temp = 0;
+
+       status = cx231xx_read_i2c_data(dev, AFE_DEVICE_ADDRESS,
+                                       saddr, 2, &temp, 1);
+       *data = (u8) temp;
+       return status;
+}
+
+int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count)
+{
+       int status = 0;
+       u8 temp = 0;
+       u8 afe_power_status = 0;
+       int i = 0;
+
+       /* super block initialize */
+       temp = (u8) (ref_count & 0xff);
+       status = afe_write_byte(dev, SUP_BLK_TUNE2, temp);
+       if (status < 0)
+               return status;
+
+       status = afe_read_byte(dev, SUP_BLK_TUNE2, &afe_power_status);
+       if (status < 0)
+               return status;
+
+       temp = (u8) ((ref_count & 0x300) >> 8);
+       temp |= 0x40;
+       status = afe_write_byte(dev, SUP_BLK_TUNE1, temp);
+       if (status < 0)
+               return status;
+
+       status = afe_write_byte(dev, SUP_BLK_PLL2, 0x0f);
+       if (status < 0)
+               return status;
+
+       /* enable pll     */
+       while (afe_power_status != 0x18) {
+               status = afe_write_byte(dev, SUP_BLK_PWRDN, 0x18);
+               if (status < 0) {
+                       cx231xx_info(
+                       ": Init Super Block failed in send cmd\n");
+                       break;
+               }
+
+               status = afe_read_byte(dev, SUP_BLK_PWRDN, &afe_power_status);
+               afe_power_status &= 0xff;
+               if (status < 0) {
+                       cx231xx_info(
+                       ": Init Super Block failed in receive cmd\n");
+                       break;
+               }
+               i++;
+               if (i == 10) {
+                       cx231xx_info(
+                       ": Init Super Block force break in loop !!!!\n");
+                       status = -1;
+                       break;
+               }
+       }
+
+       if (status < 0)
+               return status;
+
+       /* start tuning filter */
+       status = afe_write_byte(dev, SUP_BLK_TUNE3, 0x40);
+       if (status < 0)
+               return status;
+
+       msleep(5);
+
+       /* exit tuning */
+       status = afe_write_byte(dev, SUP_BLK_TUNE3, 0x00);
+
+       return status;
+}
+
+int cx231xx_afe_init_channels(struct cx231xx *dev)
+{
+       int status = 0;
+
+       /* power up all 3 channels, clear pd_buffer */
+       status = afe_write_byte(dev, ADC_PWRDN_CLAMP_CH1, 0x00);
+       status = afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2, 0x00);
+       status = afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, 0x00);
+
+       /* Enable quantizer calibration */
+       status = afe_write_byte(dev, ADC_COM_QUANT, 0x02);
+
+       /* channel initialize, force modulator (fb) reset */
+       status = afe_write_byte(dev, ADC_FB_FRCRST_CH1, 0x17);
+       status = afe_write_byte(dev, ADC_FB_FRCRST_CH2, 0x17);
+       status = afe_write_byte(dev, ADC_FB_FRCRST_CH3, 0x17);
+
+       /* start quantilizer calibration  */
+       status = afe_write_byte(dev, ADC_CAL_ATEST_CH1, 0x10);
+       status = afe_write_byte(dev, ADC_CAL_ATEST_CH2, 0x10);
+       status = afe_write_byte(dev, ADC_CAL_ATEST_CH3, 0x10);
+       msleep(5);
+
+       /* exit modulator (fb) reset */
+       status = afe_write_byte(dev, ADC_FB_FRCRST_CH1, 0x07);
+       status = afe_write_byte(dev, ADC_FB_FRCRST_CH2, 0x07);
+       status = afe_write_byte(dev, ADC_FB_FRCRST_CH3, 0x07);
+
+       /* enable the pre_clamp in each channel for single-ended input */
+       status = afe_write_byte(dev, ADC_NTF_PRECLMP_EN_CH1, 0xf0);
+       status = afe_write_byte(dev, ADC_NTF_PRECLMP_EN_CH2, 0xf0);
+       status = afe_write_byte(dev, ADC_NTF_PRECLMP_EN_CH3, 0xf0);
+
+       /* use diode instead of resistor, so set term_en to 0, res_en to 0  */
+       status = cx231xx_reg_mask_write(dev, AFE_DEVICE_ADDRESS, 8,
+                                  ADC_QGAIN_RES_TRM_CH1, 3, 7, 0x00);
+       status = cx231xx_reg_mask_write(dev, AFE_DEVICE_ADDRESS, 8,
+                                  ADC_QGAIN_RES_TRM_CH2, 3, 7, 0x00);
+       status = cx231xx_reg_mask_write(dev, AFE_DEVICE_ADDRESS, 8,
+                                  ADC_QGAIN_RES_TRM_CH3, 3, 7, 0x00);
+
+       /* dynamic element matching off */
+       status = afe_write_byte(dev, ADC_DCSERVO_DEM_CH1, 0x03);
+       status = afe_write_byte(dev, ADC_DCSERVO_DEM_CH2, 0x03);
+       status = afe_write_byte(dev, ADC_DCSERVO_DEM_CH3, 0x03);
+
+       return status;
+}
+
+int cx231xx_afe_setup_AFE_for_baseband(struct cx231xx *dev)
+{
+       u8 c_value = 0;
+       int status = 0;
+
+       status = afe_read_byte(dev, ADC_PWRDN_CLAMP_CH2, &c_value);
+       c_value &= (~(0x50));
+       status = afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2, c_value);
+
+       return status;
+}
+
+/*
+       The Analog Front End in Cx231xx has 3 channels. These
+       channels are used to share between different inputs
+       like tuner, s-video and composite inputs.
+
+       channel 1 ----- pin 1  to pin4(in reg is 1-4)
+       channel 2 ----- pin 5  to pin8(in reg is 5-8)
+       channel 3 ----- pin 9 to pin 12(in reg is 9-11)
+*/
+int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux)
+{
+       u8 ch1_setting = (u8) input_mux;
+       u8 ch2_setting = (u8) (input_mux >> 8);
+       u8 ch3_setting = (u8) (input_mux >> 16);
+       int status = 0;
+       u8 value = 0;
+
+       if (ch1_setting != 0) {
+               status = afe_read_byte(dev, ADC_INPUT_CH1, &value);
+               value &= (!INPUT_SEL_MASK);
+               value |= (ch1_setting - 1) << 4;
+               value &= 0xff;
+               status = afe_write_byte(dev, ADC_INPUT_CH1, value);
+       }
+
+       if (ch2_setting != 0) {
+               status = afe_read_byte(dev, ADC_INPUT_CH2, &value);
+               value &= (!INPUT_SEL_MASK);
+               value |= (ch2_setting - 1) << 4;
+               value &= 0xff;
+               status = afe_write_byte(dev, ADC_INPUT_CH2, value);
+       }
+
+       /* For ch3_setting, the value to put in the register is
+          7 less than the input number */
+       if (ch3_setting != 0) {
+               status = afe_read_byte(dev, ADC_INPUT_CH3, &value);
+               value &= (!INPUT_SEL_MASK);
+               value |= (ch3_setting - 1) << 4;
+               value &= 0xff;
+               status = afe_write_byte(dev, ADC_INPUT_CH3, value);
+       }
+
+       return status;
+}
+
+int cx231xx_afe_set_mode(struct cx231xx *dev, enum AFE_MODE mode)
+{
+       int status = 0;
+
+       /*
+       * FIXME: We need to implement the AFE code for LOW IF and for HI IF.
+       * Currently, only baseband works.
+       */
+
+       switch (mode) {
+       case AFE_MODE_LOW_IF:
+               /* SetupAFEforLowIF();  */
+               break;
+       case AFE_MODE_BASEBAND:
+               status = cx231xx_afe_setup_AFE_for_baseband(dev);
+               break;
+       case AFE_MODE_EU_HI_IF:
+               /* SetupAFEforEuHiIF(); */
+               break;
+       case AFE_MODE_US_HI_IF:
+               /* SetupAFEforUsHiIF(); */
+               break;
+       case AFE_MODE_JAPAN_HI_IF:
+               /* SetupAFEforJapanHiIF(); */
+               break;
+       }
+
+       if ((mode != dev->afe_mode) &&
+               (dev->video_input == CX231XX_VMUX_TELEVISION))
+               status = cx231xx_afe_adjust_ref_count(dev,
+                                                    CX231XX_VMUX_TELEVISION);
+
+       dev->afe_mode = mode;
+
+       return status;
+}
+
+int cx231xx_afe_update_power_control(struct cx231xx *dev,
+                                       enum AV_MODE avmode)
+{
+       u8 afe_power_status = 0;
+       int status = 0;
+
+       switch (dev->model) {
+       case CX231XX_BOARD_CNXT_RDE_250:
+       case CX231XX_BOARD_CNXT_RDU_250:
+               if (avmode == POLARIS_AVMODE_ANALOGT_TV) {
+                       while (afe_power_status != (FLD_PWRDN_TUNING_BIAS |
+                                               FLD_PWRDN_ENABLE_PLL)) {
+                               status = afe_write_byte(dev, SUP_BLK_PWRDN,
+                                                       FLD_PWRDN_TUNING_BIAS |
+                                                       FLD_PWRDN_ENABLE_PLL);
+                               status |= afe_read_byte(dev, SUP_BLK_PWRDN,
+                                                       &afe_power_status);
+                               if (status < 0)
+                                       break;
+                       }
+
+                       status = afe_write_byte(dev, ADC_PWRDN_CLAMP_CH1,
+                                                       0x00);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2,
+                                                       0x00);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3,
+                                                       0x00);
+               } else if (avmode == POLARIS_AVMODE_DIGITAL) {
+                       status = afe_write_byte(dev, ADC_PWRDN_CLAMP_CH1,
+                                                       0x70);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2,
+                                                       0x70);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3,
+                                                       0x70);
+
+                       status |= afe_read_byte(dev, SUP_BLK_PWRDN,
+                                                 &afe_power_status);
+                       afe_power_status |= FLD_PWRDN_PD_BANDGAP |
+                                               FLD_PWRDN_PD_BIAS |
+                                               FLD_PWRDN_PD_TUNECK;
+                       status |= afe_write_byte(dev, SUP_BLK_PWRDN,
+                                                  afe_power_status);
+               } else if (avmode == POLARIS_AVMODE_ENXTERNAL_AV) {
+                       while (afe_power_status != (FLD_PWRDN_TUNING_BIAS |
+                                               FLD_PWRDN_ENABLE_PLL)) {
+                               status = afe_write_byte(dev, SUP_BLK_PWRDN,
+                                                       FLD_PWRDN_TUNING_BIAS |
+                                                       FLD_PWRDN_ENABLE_PLL);
+                               status |= afe_read_byte(dev, SUP_BLK_PWRDN,
+                                                       &afe_power_status);
+                               if (status < 0)
+                                       break;
+                       }
+
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH1,
+                                               0x00);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2,
+                                               0x00);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3,
+                                               0x00);
+               } else {
+                       cx231xx_info("Invalid AV mode input\n");
+                       status = -1;
+               }
+               break;
+       default:
+               if (avmode == POLARIS_AVMODE_ANALOGT_TV) {
+                       while (afe_power_status != (FLD_PWRDN_TUNING_BIAS |
+                                               FLD_PWRDN_ENABLE_PLL)) {
+                               status = afe_write_byte(dev, SUP_BLK_PWRDN,
+                                                       FLD_PWRDN_TUNING_BIAS |
+                                                       FLD_PWRDN_ENABLE_PLL);
+                               status |= afe_read_byte(dev, SUP_BLK_PWRDN,
+                                                       &afe_power_status);
+                               if (status < 0)
+                                       break;
+                       }
+
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH1,
+                                                       0x40);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2,
+                                                       0x40);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3,
+                                                       0x00);
+               } else if (avmode == POLARIS_AVMODE_DIGITAL) {
+                       status = afe_write_byte(dev, ADC_PWRDN_CLAMP_CH1,
+                                                       0x70);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2,
+                                                       0x70);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3,
+                                                       0x70);
+
+                       status |= afe_read_byte(dev, SUP_BLK_PWRDN,
+                                                      &afe_power_status);
+                       afe_power_status |= FLD_PWRDN_PD_BANDGAP |
+                                               FLD_PWRDN_PD_BIAS |
+                                               FLD_PWRDN_PD_TUNECK;
+                       status |= afe_write_byte(dev, SUP_BLK_PWRDN,
+                                                       afe_power_status);
+               } else if (avmode == POLARIS_AVMODE_ENXTERNAL_AV) {
+                       while (afe_power_status != (FLD_PWRDN_TUNING_BIAS |
+                                               FLD_PWRDN_ENABLE_PLL)) {
+                               status = afe_write_byte(dev, SUP_BLK_PWRDN,
+                                                       FLD_PWRDN_TUNING_BIAS |
+                                                       FLD_PWRDN_ENABLE_PLL);
+                               status |= afe_read_byte(dev, SUP_BLK_PWRDN,
+                                                       &afe_power_status);
+                               if (status < 0)
+                                       break;
+                       }
+
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH1,
+                                                       0x00);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH2,
+                                                       0x00);
+                       status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3,
+                                                       0x40);
+               } else {
+                       cx231xx_info("Invalid AV mode input\n");
+                       status = -1;
+               }
+       }                       /* switch  */
+
+       return status;
+}
+
+int cx231xx_afe_adjust_ref_count(struct cx231xx *dev, u32 video_input)
+{
+       u8 input_mode = 0;
+       u8 ntf_mode = 0;
+       int status = 0;
+
+       dev->video_input = video_input;
+
+       if (video_input == CX231XX_VMUX_TELEVISION) {
+               status = afe_read_byte(dev, ADC_INPUT_CH3, &input_mode);
+               status = afe_read_byte(dev, ADC_NTF_PRECLMP_EN_CH3,
+                                       &ntf_mode);
+       } else {
+               status = afe_read_byte(dev, ADC_INPUT_CH1, &input_mode);
+               status = afe_read_byte(dev, ADC_NTF_PRECLMP_EN_CH1,
+                                       &ntf_mode);
+       }
+
+       input_mode = (ntf_mode & 0x3) | ((input_mode & 0x6) << 1);
+
+       switch (input_mode) {
+       case SINGLE_ENDED:
+               dev->afe_ref_count = 0x23C;
+               break;
+       case LOW_IF:
+               dev->afe_ref_count = 0x24C;
+               break;
+       case EU_IF:
+               dev->afe_ref_count = 0x258;
+               break;
+       case US_IF:
+               dev->afe_ref_count = 0x260;
+               break;
+       default:
+               break;
+       }
+
+       status = cx231xx_afe_init_super_block(dev, dev->afe_ref_count);
+
+       return status;
+}
+
+/******************************************************************************
+ *     V I D E O / A U D I O    D E C O D E R    C O N T R O L   functions    *
+ ******************************************************************************/
+static int vid_blk_write_byte(struct cx231xx *dev, u16 saddr, u8 data)
+{
+       return cx231xx_write_i2c_data(dev, VID_BLK_I2C_ADDRESS,
+                                       saddr, 2, data, 1);
+}
+
+static int vid_blk_read_byte(struct cx231xx *dev, u16 saddr, u8 *data)
+{
+       int status;
+       u32 temp = 0;
+
+       status = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
+                                       saddr, 2, &temp, 1);
+       *data = (u8) temp;
+       return status;
+}
+
+static int vid_blk_write_word(struct cx231xx *dev, u16 saddr, u32 data)
+{
+       return cx231xx_write_i2c_data(dev, VID_BLK_I2C_ADDRESS,
+                                       saddr, 2, data, 4);
+}
+
+static int vid_blk_read_word(struct cx231xx *dev, u16 saddr, u32 *data)
+{
+       return cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
+                                       saddr, 2, data, 4);
+}
+
+int cx231xx_set_video_input_mux(struct cx231xx *dev, u8 input)
+{
+       int status = 0;
+
+       switch (INPUT(input)->type) {
+       case CX231XX_VMUX_COMPOSITE1:
+       case CX231XX_VMUX_SVIDEO:
+               if ((dev->current_pcb_config.type == USB_BUS_POWER) &&
+                   (dev->power_mode != POLARIS_AVMODE_ENXTERNAL_AV)) {
+                       /* External AV */
+                       status = cx231xx_set_power_mode(dev,
+                                       POLARIS_AVMODE_ENXTERNAL_AV);
+                       if (status < 0) {
+                               cx231xx_errdev("%s: set_power_mode : Failed to"
+                                               " set Power - errCode [%d]!\n",
+                                               __func__, status);
+                               return status;
+                       }
+               }
+               status = cx231xx_set_decoder_video_input(dev,
+                                                        INPUT(input)->type,
+                                                        INPUT(input)->vmux);
+               break;
+       case CX231XX_VMUX_TELEVISION:
+       case CX231XX_VMUX_CABLE:
+               if ((dev->current_pcb_config.type == USB_BUS_POWER) &&
+                   (dev->power_mode != POLARIS_AVMODE_ANALOGT_TV)) {
+                       /* Tuner */
+                       status = cx231xx_set_power_mode(dev,
+                                               POLARIS_AVMODE_ANALOGT_TV);
+                       if (status < 0) {
+                               cx231xx_errdev("%s: set_power_mode:Failed"
+                                       " to set Power - errCode [%d]!\n",
+                                       __func__, status);
+                               return status;
+                       }
+               }
+               status = cx231xx_set_decoder_video_input(dev,
+                                                       CX231XX_VMUX_COMPOSITE1,
+                                                       INPUT(input)->vmux);
+               break;
+       default:
+               cx231xx_errdev("%s: set_power_mode : Unknown Input %d !\n",
+                    __func__, INPUT(input)->type);
+               break;
+       }
+
+       /* save the selection */
+       dev->video_input = input;
+
+       return status;
+}
+
+int cx231xx_set_decoder_video_input(struct cx231xx *dev,
+                               u8 pin_type, u8 input)
+{
+       int status = 0;
+       u32 value = 0;
+
+       if (pin_type != dev->video_input) {
+               status = cx231xx_afe_adjust_ref_count(dev, pin_type);
+               if (status < 0) {
+                       cx231xx_errdev("%s: adjust_ref_count :Failed to set"
+                               "AFE input mux - errCode [%d]!\n",
+                               __func__, status);
+                       return status;
+               }
+       }
+
+       /* call afe block to set video inputs */
+       status = cx231xx_afe_set_input_mux(dev, input);
+       if (status < 0) {
+               cx231xx_errdev("%s: set_input_mux :Failed to set"
+                               " AFE input mux - errCode [%d]!\n",
+                               __func__, status);
+               return status;
+       }
+
+       switch (pin_type) {
+       case CX231XX_VMUX_COMPOSITE1:
+               status = vid_blk_read_word(dev, AFE_CTRL, &value);
+               value |= (0 << 13) | (1 << 4);
+               value &= ~(1 << 5);
+
+               /* set [24:23] [22:15] to 0  */
+               value &= (~(0x1ff8000));
+               /* set FUNC_MODE[24:23] = 2 IF_MOD[22:15] = 0  */
+               value |= 0x1000000;
+               status = vid_blk_write_word(dev, AFE_CTRL, value);
+
+               status = vid_blk_read_word(dev, OUT_CTRL1, &value);
+               value |= (1 << 7);
+               status = vid_blk_write_word(dev, OUT_CTRL1, value);
+
+               /* Set vip 1.1 output mode */
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       OUT_CTRL1,
+                                                       FLD_OUT_MODE,
+                                                       OUT_MODE_VIP11);
+
+               /* Tell DIF object to go to baseband mode  */
+               status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND);
+               if (status < 0) {
+                       cx231xx_errdev("%s: cx231xx_dif set to By pass"
+                                                  " mode- errCode [%d]!\n",
+                               __func__, status);
+                       return status;
+               }
+
+               /* Read the DFE_CTRL1 register */
+               status = vid_blk_read_word(dev, DFE_CTRL1, &value);
+
+               /* enable the VBI_GATE_EN */
+               value |= FLD_VBI_GATE_EN;
+
+               /* Enable the auto-VGA enable */
+               value |= FLD_VGA_AUTO_EN;
+
+               /* Write it back */
+               status = vid_blk_write_word(dev, DFE_CTRL1, value);
+
+               /* Disable auto config of registers */
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                       VID_BLK_I2C_ADDRESS,
+                                       MODE_CTRL, FLD_ACFG_DIS,
+                                       cx231xx_set_field(FLD_ACFG_DIS, 1));
+
+               /* Set CVBS input mode */
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                       VID_BLK_I2C_ADDRESS,
+                       MODE_CTRL, FLD_INPUT_MODE,
+                       cx231xx_set_field(FLD_INPUT_MODE, INPUT_MODE_CVBS_0));
+               break;
+       case CX231XX_VMUX_SVIDEO:
+               /* Disable the use of  DIF */
+
+               status = vid_blk_read_word(dev, AFE_CTRL, &value);
+
+               /* set [24:23] [22:15] to 0 */
+               value &= (~(0x1ff8000));
+               /* set FUNC_MODE[24:23] = 2
+               IF_MOD[22:15] = 0 DCR_BYP_CH2[4:4] = 1; */
+               value |= 0x1000010;
+               status = vid_blk_write_word(dev, AFE_CTRL, value);
+
+               /* Tell DIF object to go to baseband mode */
+               status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND);
+               if (status < 0) {
+                       cx231xx_errdev("%s: cx231xx_dif set to By pass"
+                                                  " mode- errCode [%d]!\n",
+                               __func__, status);
+                       return status;
+               }
+
+               /* Read the DFE_CTRL1 register */
+               status = vid_blk_read_word(dev, DFE_CTRL1, &value);
+
+               /* enable the VBI_GATE_EN */
+               value |= FLD_VBI_GATE_EN;
+
+               /* Enable the auto-VGA enable */
+               value |= FLD_VGA_AUTO_EN;
+
+               /* Write it back */
+               status = vid_blk_write_word(dev, DFE_CTRL1, value);
+
+               /* Disable auto config of registers  */
+               status =  cx231xx_read_modify_write_i2c_dword(dev,
+                                       VID_BLK_I2C_ADDRESS,
+                                       MODE_CTRL, FLD_ACFG_DIS,
+                                       cx231xx_set_field(FLD_ACFG_DIS, 1));
+
+               /* Set YC input mode */
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                       VID_BLK_I2C_ADDRESS,
+                       MODE_CTRL,
+                       FLD_INPUT_MODE,
+                       cx231xx_set_field(FLD_INPUT_MODE, INPUT_MODE_YC_1));
+
+               /* Chroma to ADC2 */
+               status = vid_blk_read_word(dev, AFE_CTRL, &value);
+               value |= FLD_CHROMA_IN_SEL;     /* set the chroma in select */
+
+               /* Clear VGA_SEL_CH2 and VGA_SEL_CH3 (bits 7 and 8)
+                  This sets them to use video
+                  rather than audio.  Only one of the two will be in use. */
+               value &= ~(FLD_VGA_SEL_CH2 | FLD_VGA_SEL_CH3);
+
+               status = vid_blk_write_word(dev, AFE_CTRL, value);
+
+               status = cx231xx_afe_set_mode(dev, AFE_MODE_BASEBAND);
+               break;
+       case CX231XX_VMUX_TELEVISION:
+       case CX231XX_VMUX_CABLE:
+       default:
+               switch (dev->model) {
+               case CX231XX_BOARD_CNXT_RDE_250:
+               case CX231XX_BOARD_CNXT_RDU_250:
+                       /* Disable the use of  DIF   */
+
+                       status = vid_blk_read_word(dev, AFE_CTRL, &value);
+                       value |= (0 << 13) | (1 << 4);
+                       value &= ~(1 << 5);
+
+                       /* set [24:23] [22:15] to 0 */
+                       value &= (~(0x1FF8000));
+                       /* set FUNC_MODE[24:23] = 2 IF_MOD[22:15] = 0 */
+                       value |= 0x1000000;
+                       status = vid_blk_write_word(dev, AFE_CTRL, value);
+
+                       status = vid_blk_read_word(dev, OUT_CTRL1, &value);
+                       value |= (1 << 7);
+                       status = vid_blk_write_word(dev, OUT_CTRL1, value);
+
+                       /* Set vip 1.1 output mode */
+                       status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       OUT_CTRL1, FLD_OUT_MODE,
+                                                       OUT_MODE_VIP11);
+
+                       /* Tell DIF object to go to baseband mode */
+                       status = cx231xx_dif_set_standard(dev,
+                                                         DIF_USE_BASEBAND);
+                       if (status < 0) {
+                               cx231xx_errdev("%s: cx231xx_dif set to By pass"
+                                               " mode- errCode [%d]!\n",
+                                               __func__, status);
+                               return status;
+                       }
+
+                       /* Read the DFE_CTRL1 register */
+                       status = vid_blk_read_word(dev, DFE_CTRL1, &value);
+
+                       /* enable the VBI_GATE_EN */
+                       value |= FLD_VBI_GATE_EN;
+
+                       /* Enable the auto-VGA enable */
+                       value |= FLD_VGA_AUTO_EN;
+
+                       /* Write it back */
+                       status = vid_blk_write_word(dev, DFE_CTRL1, value);
+
+                       /* Disable auto config of registers */
+                       status = cx231xx_read_modify_write_i2c_dword(dev,
+                                       VID_BLK_I2C_ADDRESS,
+                                       MODE_CTRL, FLD_ACFG_DIS,
+                                       cx231xx_set_field(FLD_ACFG_DIS, 1));
+
+                       /* Set CVBS input mode */
+                       status = cx231xx_read_modify_write_i2c_dword(dev,
+                               VID_BLK_I2C_ADDRESS,
+                               MODE_CTRL, FLD_INPUT_MODE,
+                               cx231xx_set_field(FLD_INPUT_MODE,
+                                               INPUT_MODE_CVBS_0));
+                       break;
+               default:
+                       /* Enable the DIF for the tuner */
+
+                       /* Reinitialize the DIF */
+                       status = cx231xx_dif_set_standard(dev, dev->norm);
+                       if (status < 0) {
+                               cx231xx_errdev("%s: cx231xx_dif set to By pass"
+                                               " mode- errCode [%d]!\n",
+                                               __func__, status);
+                               return status;
+                       }
+
+                       /* Make sure bypass is cleared */
+                       status = vid_blk_read_word(dev, DIF_MISC_CTRL, &value);
+
+                       /* Clear the bypass bit */
+                       value &= ~FLD_DIF_DIF_BYPASS;
+
+                       /* Enable the use of the DIF block */
+                       status = vid_blk_write_word(dev, DIF_MISC_CTRL, value);
+
+                       /* Read the DFE_CTRL1 register */
+                       status = vid_blk_read_word(dev, DFE_CTRL1, &value);
+
+                       /* Disable the VBI_GATE_EN */
+                       value &= ~FLD_VBI_GATE_EN;
+
+                       /* Enable the auto-VGA enable, AGC, and
+                          set the skip count to 2 */
+                       value |= FLD_VGA_AUTO_EN | FLD_AGC_AUTO_EN | 0x00200000;
+
+                       /* Write it back */
+                       status = vid_blk_write_word(dev, DFE_CTRL1, value);
+
+                       /* Wait until AGC locks up */
+                       msleep(1);
+
+                       /* Disable the auto-VGA enable AGC */
+                       value &= ~(FLD_VGA_AUTO_EN);
+
+                       /* Write it back */
+                       status = vid_blk_write_word(dev, DFE_CTRL1, value);
+
+                       /* Enable Polaris B0 AGC output */
+                       status = vid_blk_read_word(dev, PIN_CTRL, &value);
+                       value |= (FLD_OEF_AGC_RF) |
+                                (FLD_OEF_AGC_IFVGA) |
+                                (FLD_OEF_AGC_IF);
+                       status = vid_blk_write_word(dev, PIN_CTRL, value);
+
+                       /* Set vip 1.1 output mode */
+                       status = cx231xx_read_modify_write_i2c_dword(dev,
+                                               VID_BLK_I2C_ADDRESS,
+                                               OUT_CTRL1, FLD_OUT_MODE,
+                                               OUT_MODE_VIP11);
+
+                       /* Disable auto config of registers */
+                       status = cx231xx_read_modify_write_i2c_dword(dev,
+                                       VID_BLK_I2C_ADDRESS,
+                                       MODE_CTRL, FLD_ACFG_DIS,
+                                       cx231xx_set_field(FLD_ACFG_DIS, 1));
+
+                       /* Set CVBS input mode */
+                       status = cx231xx_read_modify_write_i2c_dword(dev,
+                               VID_BLK_I2C_ADDRESS,
+                               MODE_CTRL, FLD_INPUT_MODE,
+                               cx231xx_set_field(FLD_INPUT_MODE,
+                                               INPUT_MODE_CVBS_0));
+
+                       /* Set some bits in AFE_CTRL so that channel 2 or 3
+                        * is ready to receive audio */
+                       /* Clear clamp for channels 2 and 3      (bit 16-17) */
+                       /* Clear droop comp                      (bit 19-20) */
+                       /* Set VGA_SEL (for audio control)       (bit 7-8) */
+                       status = vid_blk_read_word(dev, AFE_CTRL, &value);
+
+                       value |= FLD_VGA_SEL_CH3 | FLD_VGA_SEL_CH2;
+
+                       status = vid_blk_write_word(dev, AFE_CTRL, value);
+                       break;
+
+               }
+               break;
+       }
+
+       /* Set raw VBI mode */
+       status = cx231xx_read_modify_write_i2c_dword(dev,
+                               VID_BLK_I2C_ADDRESS,
+                               OUT_CTRL1, FLD_VBIHACTRAW_EN,
+                               cx231xx_set_field(FLD_VBIHACTRAW_EN, 1));
+
+       status = vid_blk_read_word(dev, OUT_CTRL1, &value);
+       if (value & 0x02) {
+               value |= (1 << 19);
+               status = vid_blk_write_word(dev, OUT_CTRL1, value);
+       }
+
+       return status;
+}
+
+/*
+ * Handle any video-mode specific overrides that are different
+ * on a per video standards basis after touching the MODE_CTRL
+ * register which resets many values for autodetect
+ */
+int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev)
+{
+       int status = 0;
+
+       cx231xx_info("do_mode_ctrl_overrides : 0x%x\n",
+                    (unsigned int)dev->norm);
+
+       /* Change the DFE_CTRL3 bp_percent to fix flagging */
+       status = vid_blk_write_word(dev, DFE_CTRL3, 0xCD3F0280);
+
+       if (dev->norm & (V4L2_STD_NTSC | V4L2_STD_PAL_M)) {
+               cx231xx_info("do_mode_ctrl_overrides NTSC\n");
+
+               /* Move the close caption lines out of active video,
+                  adjust the active video start point */
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       VERT_TIM_CTRL,
+                                                       FLD_VBLANK_CNT, 0x18);
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       VERT_TIM_CTRL,
+                                                       FLD_VACTIVE_CNT,
+                                                       0x1E6000);
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       VERT_TIM_CTRL,
+                                                       FLD_V656BLANK_CNT,
+                                                       0x1E000000);
+
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       HORIZ_TIM_CTRL,
+                                                       FLD_HBLANK_CNT,
+                                                       cx231xx_set_field
+                                                       (FLD_HBLANK_CNT, 0x79));
+       } else if (dev->norm & V4L2_STD_SECAM) {
+               cx231xx_info("do_mode_ctrl_overrides SECAM\n");
+               status =  cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       VERT_TIM_CTRL,
+                                                       FLD_VBLANK_CNT, 0x24);
+               /* Adjust the active video horizontal start point */
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       HORIZ_TIM_CTRL,
+                                                       FLD_HBLANK_CNT,
+                                                       cx231xx_set_field
+                                                       (FLD_HBLANK_CNT, 0x85));
+       } else {
+               cx231xx_info("do_mode_ctrl_overrides PAL\n");
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       VERT_TIM_CTRL,
+                                                       FLD_VBLANK_CNT, 0x24);
+               /* Adjust the active video horizontal start point */
+               status = cx231xx_read_modify_write_i2c_dword(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       HORIZ_TIM_CTRL,
+                                                       FLD_HBLANK_CNT,
+                                                       cx231xx_set_field
+                                                       (FLD_HBLANK_CNT, 0x85));
+       }
+
+       return status;
+}
+
+int cx231xx_set_audio_input(struct cx231xx *dev, u8 input)
+{
+       int status = 0;
+       enum AUDIO_INPUT ainput = AUDIO_INPUT_LINE;
+
+       switch (INPUT(input)->amux) {
+       case CX231XX_AMUX_VIDEO:
+               ainput = AUDIO_INPUT_TUNER_TV;
+               break;
+       case CX231XX_AMUX_LINE_IN:
+               status = cx231xx_i2s_blk_set_audio_input(dev, input);
+               ainput = AUDIO_INPUT_LINE;
+               break;
+       default:
+               break;
+       }
+
+       status = cx231xx_set_audio_decoder_input(dev, ainput);
+
+       return status;
+}
+
+int cx231xx_set_audio_decoder_input(struct cx231xx *dev,
+                                   enum AUDIO_INPUT audio_input)
+{
+       u32 dwval;
+       int status;
+       u8 gen_ctrl;
+       u32 value = 0;
+
+       /* Put it in soft reset   */
+       status = vid_blk_read_byte(dev, GENERAL_CTL, &gen_ctrl);
+       gen_ctrl |= 1;
+       status = vid_blk_write_byte(dev, GENERAL_CTL, gen_ctrl);
+
+       switch (audio_input) {
+       case AUDIO_INPUT_LINE:
+               /* setup AUD_IO control from Merlin paralle output */
+               value = cx231xx_set_field(FLD_AUD_CHAN1_SRC,
+                                         AUD_CHAN_SRC_PARALLEL);
+               status = vid_blk_write_word(dev, AUD_IO_CTRL, value);
+
+               /* setup input to Merlin, SRC2 connect to AC97
+                  bypass upsample-by-2, slave mode, sony mode, left justify
+                  adr 091c, dat 01000000 */
+               status = vid_blk_read_word(dev, AC97_CTL, &dwval);
+
+               status = vid_blk_write_word(dev, AC97_CTL,
+                                          (dwval | FLD_AC97_UP2X_BYPASS));
+
+               /* select the parallel1 and SRC3 */
+               status = vid_blk_write_word(dev, BAND_OUT_SEL,
+                               cx231xx_set_field(FLD_SRC3_IN_SEL, 0x0) |
+                               cx231xx_set_field(FLD_SRC3_CLK_SEL, 0x0) |
+                               cx231xx_set_field(FLD_PARALLEL1_SRC_SEL, 0x0));
+
+               /* unmute all, AC97 in, independence mode
+                  adr 08d0, data 0x00063073 */
+               status = vid_blk_write_word(dev, PATH1_CTL1, 0x00063073);
+
+               /* set AVC maximum threshold, adr 08d4, dat ffff0024 */
+               status = vid_blk_read_word(dev, PATH1_VOL_CTL, &dwval);
+               status = vid_blk_write_word(dev, PATH1_VOL_CTL,
+                                          (dwval | FLD_PATH1_AVC_THRESHOLD));
+
+               /* set SC maximum threshold, adr 08ec, dat ffffb3a3 */
+               status = vid_blk_read_word(dev, PATH1_SC_CTL, &dwval);
+               status = vid_blk_write_word(dev, PATH1_SC_CTL,
+                                          (dwval | FLD_PATH1_SC_THRESHOLD));
+               break;
+
+       case AUDIO_INPUT_TUNER_TV:
+       default:
+
+               /* Setup SRC sources and clocks */
+               status = vid_blk_write_word(dev, BAND_OUT_SEL,
+                       cx231xx_set_field(FLD_SRC6_IN_SEL, 0x00)         |
+                       cx231xx_set_field(FLD_SRC6_CLK_SEL, 0x01)        |
+                       cx231xx_set_field(FLD_SRC5_IN_SEL, 0x00)         |
+                       cx231xx_set_field(FLD_SRC5_CLK_SEL, 0x02)        |
+                       cx231xx_set_field(FLD_SRC4_IN_SEL, 0x02)         |
+                       cx231xx_set_field(FLD_SRC4_CLK_SEL, 0x03)        |
+                       cx231xx_set_field(FLD_SRC3_IN_SEL, 0x00)         |
+                       cx231xx_set_field(FLD_SRC3_CLK_SEL, 0x00)        |
+                       cx231xx_set_field(FLD_BASEBAND_BYPASS_CTL, 0x00) |
+                       cx231xx_set_field(FLD_AC97_SRC_SEL, 0x03)        |
+                       cx231xx_set_field(FLD_I2S_SRC_SEL, 0x00)         |
+                       cx231xx_set_field(FLD_PARALLEL2_SRC_SEL, 0x02)   |
+                       cx231xx_set_field(FLD_PARALLEL1_SRC_SEL, 0x01));
+
+               /* Setup the AUD_IO control */
+               status = vid_blk_write_word(dev, AUD_IO_CTRL,
+                       cx231xx_set_field(FLD_I2S_PORT_DIR, 0x00)  |
+                       cx231xx_set_field(FLD_I2S_OUT_SRC, 0x00)   |
+                       cx231xx_set_field(FLD_AUD_CHAN3_SRC, 0x00) |
+                       cx231xx_set_field(FLD_AUD_CHAN2_SRC, 0x00) |
+                       cx231xx_set_field(FLD_AUD_CHAN1_SRC, 0x03));
+
+               status = vid_blk_write_word(dev, PATH1_CTL1, 0x1F063870);
+
+               /* setAudioStandard(_audio_standard); */
+
+               status = vid_blk_write_word(dev, PATH1_CTL1, 0x00063870);
+               switch (dev->model) {
+               case CX231XX_BOARD_CNXT_RDE_250:
+               case CX231XX_BOARD_CNXT_RDU_250:
+                       status = cx231xx_read_modify_write_i2c_dword(dev,
+                                       VID_BLK_I2C_ADDRESS,
+                                       CHIP_CTRL,
+                                       FLD_SIF_EN,
+                                       cx231xx_set_field(FLD_SIF_EN, 1));
+                       break;
+               default:
+                       break;
+               }
+               break;
+
+       case AUDIO_INPUT_TUNER_FM:
+               /*  use SIF for FM radio
+                  setupFM();
+                  setAudioStandard(_audio_standard);
+                */
+               break;
+
+       case AUDIO_INPUT_MUTE:
+               status = vid_blk_write_word(dev, PATH1_CTL1, 0x1F011012);
+               break;
+       }
+
+       /* Take it out of soft reset */
+       status = vid_blk_read_byte(dev, GENERAL_CTL, &gen_ctrl);
+       gen_ctrl &= ~1;
+       status = vid_blk_write_byte(dev, GENERAL_CTL, gen_ctrl);
+
+       return status;
+}
+
+/* Set resolution of the video */
+int cx231xx_resolution_set(struct cx231xx *dev)
+{
+       int width, height;
+       u32 hscale, vscale;
+       int status = 0;
+
+       width = dev->width;
+       height = dev->height;
+
+       get_scale(dev, width, height, &hscale, &vscale);
+
+       /* set horzontal scale */
+       status = vid_blk_write_word(dev, HSCALE_CTRL, hscale);
+
+       /* set vertical scale */
+       status = vid_blk_write_word(dev, VSCALE_CTRL, vscale);
+
+       return status;
+}
+
+/******************************************************************************
+ *                    C H I P Specific  C O N T R O L   functions             *
+ ******************************************************************************/
+int cx231xx_init_ctrl_pin_status(struct cx231xx *dev)
+{
+       u32 value;
+       int status = 0;
+
+       status = vid_blk_read_word(dev, PIN_CTRL, &value);
+       value |= (~dev->board.ctl_pin_status_mask);
+       status = vid_blk_write_word(dev, PIN_CTRL, value);
+
+       return status;
+}
+
+int cx231xx_set_agc_analog_digital_mux_select(struct cx231xx *dev,
+                                             u8 analog_or_digital)
+{
+       int status = 0;
+
+       /* first set the direction to output */
+       status = cx231xx_set_gpio_direction(dev,
+                                           dev->board.
+                                           agc_analog_digital_select_gpio, 1);
+
+       /* 0 - demod ; 1 - Analog mode */
+       status = cx231xx_set_gpio_value(dev,
+                                  dev->board.agc_analog_digital_select_gpio,
+                                  analog_or_digital);
+
+       return status;
+}
+
+int cx231xx_enable_i2c_for_tuner(struct cx231xx *dev, u8 I2CIndex)
+{
+       u8 value[4] = { 0, 0, 0, 0 };
+       int status = 0;
+
+       cx231xx_info("Changing the i2c port for tuner to %d\n", I2CIndex);
+
+       status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER,
+                                      PWR_CTL_EN, value, 4);
+       if (status < 0)
+               return status;
+
+       if (I2CIndex == I2C_1) {
+               if (value[0] & I2C_DEMOD_EN) {
+                       value[0] &= ~I2C_DEMOD_EN;
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                  PWR_CTL_EN, value, 4);
+               }
+       } else {
+               if (!(value[0] & I2C_DEMOD_EN)) {
+                       value[0] |= I2C_DEMOD_EN;
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                  PWR_CTL_EN, value, 4);
+               }
+       }
+
+       return status;
+
+}
+
+/******************************************************************************
+ *                 D I F - B L O C K    C O N T R O L   functions             *
+ ******************************************************************************/
+int cx231xx_dif_configure_C2HH_for_low_IF(struct cx231xx *dev, u32 mode,
+                                         u32 function_mode, u32 standard)
+{
+       int status = 0;
+
+       if (mode == V4L2_TUNER_RADIO) {
+               /* C2HH */
+               /* lo if big signal */
+               status = cx231xx_reg_mask_write(dev,
+                               VID_BLK_I2C_ADDRESS, 32,
+                               AFE_CTRL_C2HH_SRC_CTRL, 30, 31, 0x1);
+               /* FUNC_MODE = DIF */
+               status = cx231xx_reg_mask_write(dev,
+                               VID_BLK_I2C_ADDRESS, 32,
+                               AFE_CTRL_C2HH_SRC_CTRL, 23, 24, function_mode);
+               /* IF_MODE */
+               status = cx231xx_reg_mask_write(dev,
+                               VID_BLK_I2C_ADDRESS, 32,
+                               AFE_CTRL_C2HH_SRC_CTRL, 15, 22, 0xFF);
+               /* no inv */
+               status = cx231xx_reg_mask_write(dev,
+                               VID_BLK_I2C_ADDRESS, 32,
+                               AFE_CTRL_C2HH_SRC_CTRL, 9, 9, 0x1);
+       } else if (standard != DIF_USE_BASEBAND) {
+               if (standard & V4L2_STD_MN) {
+                       /* lo if big signal */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 30, 31, 0x1);
+                       /* FUNC_MODE = DIF */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 23, 24,
+                                       function_mode);
+                       /* IF_MODE */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 15, 22, 0xb);
+                       /* no inv */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 9, 9, 0x1);
+                       /* 0x124, AUD_CHAN1_SRC = 0x3 */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AUD_IO_CTRL, 0, 31, 0x00000003);
+               } else if ((standard == V4L2_STD_PAL_I) |
+                       (standard & V4L2_STD_SECAM)) {
+                       /* C2HH setup */
+                       /* lo if big signal */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 30, 31, 0x1);
+                       /* FUNC_MODE = DIF */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 23, 24,
+                                       function_mode);
+                       /* IF_MODE */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 15, 22, 0xF);
+                       /* no inv */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 9, 9, 0x1);
+               } else {
+                       /* default PAL BG */
+                       /* C2HH setup */
+                       /* lo if big signal */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 30, 31, 0x1);
+                       /* FUNC_MODE = DIF */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 23, 24,
+                                       function_mode);
+                       /* IF_MODE */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 15, 22, 0xE);
+                       /* no inv */
+                       status = cx231xx_reg_mask_write(dev,
+                                       VID_BLK_I2C_ADDRESS, 32,
+                                       AFE_CTRL_C2HH_SRC_CTRL, 9, 9, 0x1);
+               }
+       }
+
+       return status;
+}
+
+int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard)
+{
+       int status = 0;
+       u32 dif_misc_ctrl_value = 0;
+       u32 func_mode = 0;
+
+       cx231xx_info("%s: setStandard to %x\n", __func__, standard);
+
+       status = vid_blk_read_word(dev, DIF_MISC_CTRL, &dif_misc_ctrl_value);
+       if (standard != DIF_USE_BASEBAND)
+               dev->norm = standard;
+
+       switch (dev->model) {
+       case CX231XX_BOARD_CNXT_RDE_250:
+       case CX231XX_BOARD_CNXT_RDU_250:
+               func_mode = 0x03;
+               break;
+       default:
+               func_mode = 0x01;
+       }
+
+       status = cx231xx_dif_configure_C2HH_for_low_IF(dev, dev->active_mode,
+                                                 func_mode, standard);
+
+       if (standard == DIF_USE_BASEBAND) {     /* base band */
+               /* There is a different SRC_PHASE_INC value
+                  for baseband vs. DIF */
+               status = vid_blk_write_word(dev, DIF_SRC_PHASE_INC, 0xDF7DF83);
+               status = vid_blk_read_word(dev, DIF_MISC_CTRL,
+                                               &dif_misc_ctrl_value);
+               dif_misc_ctrl_value |= FLD_DIF_DIF_BYPASS;
+               status = vid_blk_write_word(dev, DIF_MISC_CTRL,
+                                               dif_misc_ctrl_value);
+       } else if (standard & V4L2_STD_PAL_D) {
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL, 0, 31, 0x6503bc0c);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL1, 0, 31, 0xbd038c85);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL2, 0, 31, 0x1db4640a);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL3, 0, 31, 0x00008800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_REF, 0, 31, 0x444C1380);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_IF, 0, 31, 0xDA302600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_INT, 0, 31, 0xDA261700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_RF, 0, 31, 0xDA262600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_INT_CURRENT, 0, 31,
+                                          0x26001700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_RF_CURRENT, 0, 31,
+                                          0x00002660);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VIDEO_AGC_CTRL, 0, 31,
+                                          0x72500800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VID_AUD_OVERRIDE, 0, 31,
+                                          0x27000100);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AV_SEP_CTRL, 0, 31, 0x3F3934EA);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_COMP_FLT_CTRL, 0, 31,
+                                          0x00000000);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_PHASE_INC, 0, 31,
+                                          0x1befbf06);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_GAIN_CONTROL, 0, 31,
+                                          0x000035e8);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_RPT_VARIANCE, 0, 31, 0x00000000);
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value |= 0x3a023F11;
+       } else if (standard & V4L2_STD_PAL_I) {
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL, 0, 31, 0x6503bc0c);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL1, 0, 31, 0xbd038c85);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL2, 0, 31, 0x1db4640a);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL3, 0, 31, 0x00008800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_REF, 0, 31, 0x444C1380);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_IF, 0, 31, 0xDA302600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_INT, 0, 31, 0xDA261700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_RF, 0, 31, 0xDA262600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_INT_CURRENT, 0, 31,
+                                          0x26001700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_RF_CURRENT, 0, 31,
+                                          0x00002660);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VIDEO_AGC_CTRL, 0, 31,
+                                          0x72500800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VID_AUD_OVERRIDE, 0, 31,
+                                          0x27000100);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AV_SEP_CTRL, 0, 31, 0x5F39A934);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_COMP_FLT_CTRL, 0, 31,
+                                          0x00000000);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_PHASE_INC, 0, 31,
+                                          0x1befbf06);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_GAIN_CONTROL, 0, 31,
+                                          0x000035e8);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_RPT_VARIANCE, 0, 31, 0x00000000);
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value |= 0x3a033F11;
+       } else if (standard & V4L2_STD_PAL_M) {
+               /* improved Low Frequency Phase Noise */
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL, 0xFF01FF0C);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL1, 0xbd038c85);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL2, 0x1db4640a);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL3, 0x00008800);
+               status = vid_blk_write_word(dev, DIF_AGC_IF_REF, 0x444C1380);
+               status = vid_blk_write_word(dev, DIF_AGC_IF_INT_CURRENT,
+                                               0x26001700);
+               status = vid_blk_write_word(dev, DIF_AGC_RF_CURRENT,
+                                               0x00002660);
+               status = vid_blk_write_word(dev, DIF_VIDEO_AGC_CTRL,
+                                               0x72500800);
+               status = vid_blk_write_word(dev, DIF_VID_AUD_OVERRIDE,
+                                               0x27000100);
+               status = vid_blk_write_word(dev, DIF_AV_SEP_CTRL, 0x012c405d);
+               status = vid_blk_write_word(dev, DIF_COMP_FLT_CTRL,
+                                               0x009f50c1);
+               status = vid_blk_write_word(dev, DIF_SRC_PHASE_INC,
+                                               0x1befbf06);
+               status = vid_blk_write_word(dev, DIF_SRC_GAIN_CONTROL,
+                                               0x000035e8);
+               status = vid_blk_write_word(dev, DIF_SOFT_RST_CTRL_REVB,
+                                               0x00000000);
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value |= 0x3A0A3F10;
+       } else if (standard & (V4L2_STD_PAL_N | V4L2_STD_PAL_Nc)) {
+               /* improved Low Frequency Phase Noise */
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL, 0xFF01FF0C);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL1, 0xbd038c85);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL2, 0x1db4640a);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL3, 0x00008800);
+               status = vid_blk_write_word(dev, DIF_AGC_IF_REF, 0x444C1380);
+               status = vid_blk_write_word(dev, DIF_AGC_IF_INT_CURRENT,
+                                               0x26001700);
+               status = vid_blk_write_word(dev, DIF_AGC_RF_CURRENT,
+                                               0x00002660);
+               status = vid_blk_write_word(dev, DIF_VIDEO_AGC_CTRL,
+                                               0x72500800);
+               status = vid_blk_write_word(dev, DIF_VID_AUD_OVERRIDE,
+                                               0x27000100);
+               status = vid_blk_write_word(dev, DIF_AV_SEP_CTRL,
+                                               0x012c405d);
+               status = vid_blk_write_word(dev, DIF_COMP_FLT_CTRL,
+                                               0x009f50c1);
+               status = vid_blk_write_word(dev, DIF_SRC_PHASE_INC,
+                                               0x1befbf06);
+               status = vid_blk_write_word(dev, DIF_SRC_GAIN_CONTROL,
+                                               0x000035e8);
+               status = vid_blk_write_word(dev, DIF_SOFT_RST_CTRL_REVB,
+                                               0x00000000);
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value = 0x3A093F10;
+       } else if (standard &
+                 (V4L2_STD_SECAM_B | V4L2_STD_SECAM_D | V4L2_STD_SECAM_G |
+                  V4L2_STD_SECAM_K | V4L2_STD_SECAM_K1)) {
+
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL, 0, 31, 0x6503bc0c);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL1, 0, 31, 0xbd038c85);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL2, 0, 31, 0x1db4640a);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL3, 0, 31, 0x00008800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_REF, 0, 31, 0x888C0380);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_IF, 0, 31, 0xe0262600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_INT, 0, 31, 0xc2171700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_RF, 0, 31, 0xc2262600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_INT_CURRENT, 0, 31,
+                                          0x26001700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_RF_CURRENT, 0, 31,
+                                          0x00002660);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VID_AUD_OVERRIDE, 0, 31,
+                                          0x27000100);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AV_SEP_CTRL, 0, 31, 0x3F3530ec);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_COMP_FLT_CTRL, 0, 31,
+                                          0x00000000);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_PHASE_INC, 0, 31,
+                                          0x1befbf06);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_GAIN_CONTROL, 0, 31,
+                                          0x000035e8);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_RPT_VARIANCE, 0, 31, 0x00000000);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VIDEO_AGC_CTRL, 0, 31,
+                                          0xf4000000);
+
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value |= 0x3a023F11;
+       } else if (standard & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)) {
+               /* Is it SECAM_L1? */
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL, 0, 31, 0x6503bc0c);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL1, 0, 31, 0xbd038c85);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL2, 0, 31, 0x1db4640a);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL3, 0, 31, 0x00008800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_REF, 0, 31, 0x888C0380);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_IF, 0, 31, 0xe0262600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_INT, 0, 31, 0xc2171700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_RF, 0, 31, 0xc2262600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_INT_CURRENT, 0, 31,
+                                          0x26001700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_RF_CURRENT, 0, 31,
+                                          0x00002660);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VID_AUD_OVERRIDE, 0, 31,
+                                          0x27000100);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AV_SEP_CTRL, 0, 31, 0x3F3530ec);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_COMP_FLT_CTRL, 0, 31,
+                                          0x00000000);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_PHASE_INC, 0, 31,
+                                          0x1befbf06);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_GAIN_CONTROL, 0, 31,
+                                          0x000035e8);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_RPT_VARIANCE, 0, 31, 0x00000000);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VIDEO_AGC_CTRL, 0, 31,
+                                          0xf2560000);
+
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value |= 0x3a023F11;
+
+       } else if (standard & V4L2_STD_NTSC_M) {
+               /* V4L2_STD_NTSC_M (75 IRE Setup) Or
+                  V4L2_STD_NTSC_M_JP (Japan,  0 IRE Setup) */
+
+               /* For NTSC the centre frequency of video coming out of
+                  sidewinder is around 7.1MHz or 3.6MHz depending on the
+                  spectral inversion. so for a non spectrally inverted channel
+                  the pll freq word is 0x03420c49
+                */
+
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL, 0x6503BC0C);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL1, 0xBD038C85);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL2, 0x1DB4640A);
+               status = vid_blk_write_word(dev, DIF_PLL_CTRL3, 0x00008800);
+               status = vid_blk_write_word(dev, DIF_AGC_IF_REF, 0x444C0380);
+               status = vid_blk_write_word(dev, DIF_AGC_IF_INT_CURRENT,
+                                               0x26001700);
+               status = vid_blk_write_word(dev, DIF_AGC_RF_CURRENT,
+                                               0x00002660);
+               status = vid_blk_write_word(dev, DIF_VIDEO_AGC_CTRL,
+                                               0x04000800);
+               status = vid_blk_write_word(dev, DIF_VID_AUD_OVERRIDE,
+                                               0x27000100);
+               status = vid_blk_write_word(dev, DIF_AV_SEP_CTRL, 0x01296e1f);
+
+               status = vid_blk_write_word(dev, DIF_COMP_FLT_CTRL,
+                                               0x009f50c1);
+               status = vid_blk_write_word(dev, DIF_SRC_PHASE_INC,
+                                               0x1befbf06);
+               status = vid_blk_write_word(dev, DIF_SRC_GAIN_CONTROL,
+                                               0x000035e8);
+
+               status = vid_blk_write_word(dev, DIF_AGC_CTRL_IF, 0xC2262600);
+               status = vid_blk_write_word(dev, DIF_AGC_CTRL_INT,
+                                               0xC2262600);
+               status = vid_blk_write_word(dev, DIF_AGC_CTRL_RF, 0xC2262600);
+
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value |= 0x3a003F10;
+       } else {
+               /* default PAL BG */
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL, 0, 31, 0x6503bc0c);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL1, 0, 31, 0xbd038c85);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL2, 0, 31, 0x1db4640a);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_PLL_CTRL3, 0, 31, 0x00008800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_REF, 0, 31, 0x444C1380);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_IF, 0, 31, 0xDA302600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_INT, 0, 31, 0xDA261700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_CTRL_RF, 0, 31, 0xDA262600);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_IF_INT_CURRENT, 0, 31,
+                                          0x26001700);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AGC_RF_CURRENT, 0, 31,
+                                          0x00002660);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VIDEO_AGC_CTRL, 0, 31,
+                                          0x72500800);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_VID_AUD_OVERRIDE, 0, 31,
+                                          0x27000100);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_AV_SEP_CTRL, 0, 31, 0x3F3530EC);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_COMP_FLT_CTRL, 0, 31,
+                                          0x00A653A8);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_PHASE_INC, 0, 31,
+                                          0x1befbf06);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_SRC_GAIN_CONTROL, 0, 31,
+                                          0x000035e8);
+               status = cx231xx_reg_mask_write(dev, VID_BLK_I2C_ADDRESS, 32,
+                                          DIF_RPT_VARIANCE, 0, 31, 0x00000000);
+               /* Save the Spec Inversion value */
+               dif_misc_ctrl_value &= FLD_DIF_SPEC_INV;
+               dif_misc_ctrl_value |= 0x3a013F11;
+       }
+
+       /* The AGC values should be the same for all standards,
+          AUD_SRC_SEL[19] should always be disabled    */
+       dif_misc_ctrl_value &= ~FLD_DIF_AUD_SRC_SEL;
+
+       /* It is still possible to get Set Standard calls even when we
+          are in FM mode.
+          This is done to override the value for FM. */
+       if (dev->active_mode == V4L2_TUNER_RADIO)
+               dif_misc_ctrl_value = 0x7a080000;
+
+       /* Write the calculated value for misc ontrol register      */
+       status = vid_blk_write_word(dev, DIF_MISC_CTRL, dif_misc_ctrl_value);
+
+       return status;
+}
+
+int cx231xx_tuner_pre_channel_change(struct cx231xx *dev)
+{
+       int status = 0;
+       u32 dwval;
+
+       /* Set the RF and IF k_agc values to 3 */
+       status = vid_blk_read_word(dev, DIF_AGC_IF_REF, &dwval);
+       dwval &= ~(FLD_DIF_K_AGC_RF | FLD_DIF_K_AGC_IF);
+       dwval |= 0x33000000;
+
+       status = vid_blk_write_word(dev, DIF_AGC_IF_REF, dwval);
+
+       return status;
+}
+
+int cx231xx_tuner_post_channel_change(struct cx231xx *dev)
+{
+       int status = 0;
+       u32 dwval;
+
+       /* Set the RF and IF k_agc values to 4 for PAL/NTSC and 8 for
+        * SECAM L/B/D standards */
+       status = vid_blk_read_word(dev, DIF_AGC_IF_REF, &dwval);
+       dwval &= ~(FLD_DIF_K_AGC_RF | FLD_DIF_K_AGC_IF);
+
+       if (dev->norm & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_B |
+                        V4L2_STD_SECAM_D))
+               dwval |= 0x88000000;
+       else
+               dwval |= 0x44000000;
+
+       status = vid_blk_write_word(dev, DIF_AGC_IF_REF, dwval);
+
+       return status;
+}
+
+/******************************************************************************
+ *                 I 2 S - B L O C K    C O N T R O L   functions            *
+ ******************************************************************************/
+int cx231xx_i2s_blk_initialize(struct cx231xx *dev)
+{
+       int status = 0;
+       u32 value;
+
+       status = cx231xx_read_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                      CH_PWR_CTRL1, 1, &value, 1);
+       /* enables clock to delta-sigma and decimation filter */
+       value |= 0x80;
+       status = cx231xx_write_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                       CH_PWR_CTRL1, 1, value, 1);
+       /* power up all channel */
+       status = cx231xx_write_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                       CH_PWR_CTRL2, 1, 0x00, 1);
+
+       return status;
+}
+
+int cx231xx_i2s_blk_update_power_control(struct cx231xx *dev,
+                                       enum AV_MODE avmode)
+{
+       int status = 0;
+       u32 value = 0;
+
+       if (avmode != POLARIS_AVMODE_ENXTERNAL_AV) {
+               status = cx231xx_read_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                         CH_PWR_CTRL2, 1, &value, 1);
+               value |= 0xfe;
+               status = cx231xx_write_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                               CH_PWR_CTRL2, 1, value, 1);
+       } else {
+               status = cx231xx_write_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                               CH_PWR_CTRL2, 1, 0x00, 1);
+       }
+
+       return status;
+}
+
+/* set i2s_blk for audio input types */
+int cx231xx_i2s_blk_set_audio_input(struct cx231xx *dev, u8 audio_input)
+{
+       int status = 0;
+
+       switch (audio_input) {
+       case CX231XX_AMUX_LINE_IN:
+               status = cx231xx_write_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                               CH_PWR_CTRL2, 1, 0x00, 1);
+               status = cx231xx_write_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                               CH_PWR_CTRL1, 1, 0x80, 1);
+               break;
+       case CX231XX_AMUX_VIDEO:
+       default:
+               break;
+       }
+
+       dev->ctl_ainput = audio_input;
+
+       return status;
+}
+
+/******************************************************************************
+ *                  P O W E R      C O N T R O L   functions                  *
+ ******************************************************************************/
+int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode)
+{
+       u8 value[4] = { 0, 0, 0, 0 };
+       u32 tmp = 0;
+       int status = 0;
+
+       if (dev->power_mode != mode)
+               dev->power_mode = mode;
+       else {
+               cx231xx_info(" setPowerMode::mode = %d, No Change req.\n",
+                            mode);
+               return 0;
+       }
+
+       cx231xx_info(" setPowerMode::mode = %d\n", mode);
+
+       status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, value,
+                                      4);
+       if (status < 0)
+               return status;
+
+       tmp = *((u32 *) value);
+
+       switch (mode) {
+       case POLARIS_AVMODE_ENXTERNAL_AV:
+
+               tmp &= (~PWR_MODE_MASK);
+
+               tmp |= PWR_AV_EN;
+               value[0] = (u8) tmp;
+               value[1] = (u8) (tmp >> 8);
+               value[2] = (u8) (tmp >> 16);
+               value[3] = (u8) (tmp >> 24);
+               status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                               PWR_CTL_EN, value, 4);
+               msleep(PWR_SLEEP_INTERVAL);
+
+               tmp |= PWR_ISO_EN;
+               value[0] = (u8) tmp;
+               value[1] = (u8) (tmp >> 8);
+               value[2] = (u8) (tmp >> 16);
+               value[3] = (u8) (tmp >> 24);
+               status =
+                   cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, PWR_CTL_EN,
+                                          value, 4);
+               msleep(PWR_SLEEP_INTERVAL);
+
+               tmp |= POLARIS_AVMODE_ENXTERNAL_AV;
+               value[0] = (u8) tmp;
+               value[1] = (u8) (tmp >> 8);
+               value[2] = (u8) (tmp >> 16);
+               value[3] = (u8) (tmp >> 24);
+               status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                               PWR_CTL_EN, value, 4);
+
+               /* reset state of xceive tuner */
+               dev->xc_fw_load_done = 0;
+               break;
+
+       case POLARIS_AVMODE_ANALOGT_TV:
+
+               tmp &= (~PWR_DEMOD_EN);
+               tmp |= (I2C_DEMOD_EN);
+               value[0] = (u8) tmp;
+               value[1] = (u8) (tmp >> 8);
+               value[2] = (u8) (tmp >> 16);
+               value[3] = (u8) (tmp >> 24);
+               status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                               PWR_CTL_EN, value, 4);
+               msleep(PWR_SLEEP_INTERVAL);
+
+               if (!(tmp & PWR_TUNER_EN)) {
+                       tmp |= (PWR_TUNER_EN);
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+
+               if (!(tmp & PWR_AV_EN)) {
+                       tmp |= PWR_AV_EN;
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+               if (!(tmp & PWR_ISO_EN)) {
+                       tmp |= PWR_ISO_EN;
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+
+               if (!(tmp & POLARIS_AVMODE_ANALOGT_TV)) {
+                       tmp |= POLARIS_AVMODE_ANALOGT_TV;
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+
+               if ((dev->model == CX231XX_BOARD_CNXT_RDE_250) ||
+                   (dev->model == CX231XX_BOARD_CNXT_RDU_250)) {
+                       /* tuner path to channel 1 from port 3 */
+                       cx231xx_enable_i2c_for_tuner(dev, I2C_3);
+
+                       if (dev->cx231xx_reset_analog_tuner)
+                               dev->cx231xx_reset_analog_tuner(dev);
+               }
+               break;
+
+       case POLARIS_AVMODE_DIGITAL:
+               if (!(tmp & PWR_TUNER_EN)) {
+                       tmp |= (PWR_TUNER_EN);
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+               if (!(tmp & PWR_AV_EN)) {
+                       tmp |= PWR_AV_EN;
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+               if (!(tmp & PWR_ISO_EN)) {
+                       tmp |= PWR_ISO_EN;
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+
+               tmp |= POLARIS_AVMODE_DIGITAL | I2C_DEMOD_EN;
+               value[0] = (u8) tmp;
+               value[1] = (u8) (tmp >> 8);
+               value[2] = (u8) (tmp >> 16);
+               value[3] = (u8) (tmp >> 24);
+               status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                               PWR_CTL_EN, value, 4);
+               msleep(PWR_SLEEP_INTERVAL);
+
+               if (!(tmp & PWR_DEMOD_EN)) {
+                       tmp |= PWR_DEMOD_EN;
+                       value[0] = (u8) tmp;
+                       value[1] = (u8) (tmp >> 8);
+                       value[2] = (u8) (tmp >> 16);
+                       value[3] = (u8) (tmp >> 24);
+                       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                                       PWR_CTL_EN, value, 4);
+                       msleep(PWR_SLEEP_INTERVAL);
+               }
+
+               if ((dev->model == CX231XX_BOARD_CNXT_RDE_250) ||
+                   (dev->model == CX231XX_BOARD_CNXT_RDU_250)) {
+                       /* tuner path to channel 1 from port 3 */
+                       cx231xx_enable_i2c_for_tuner(dev, I2C_3);
+
+                       if (dev->cx231xx_reset_analog_tuner)
+                               dev->cx231xx_reset_analog_tuner(dev);
+               }
+               break;
+
+       default:
+               break;
+       }
+
+       msleep(PWR_SLEEP_INTERVAL);
+
+       /* For power saving, only enable Pwr_resetout_n
+          when digital TV is selected. */
+       if (mode == POLARIS_AVMODE_DIGITAL) {
+               tmp |= PWR_RESETOUT_EN;
+               value[0] = (u8) tmp;
+               value[1] = (u8) (tmp >> 8);
+               value[2] = (u8) (tmp >> 16);
+               value[3] = (u8) (tmp >> 24);
+               status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER,
+                                               PWR_CTL_EN, value, 4);
+               msleep(PWR_SLEEP_INTERVAL);
+       }
+
+       /* update power control for afe */
+       status = cx231xx_afe_update_power_control(dev, mode);
+
+       /* update power control for i2s_blk */
+       status = cx231xx_i2s_blk_update_power_control(dev, mode);
+
+       status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, value,
+                                      4);
+       cx231xx_info(" The data of PWR_CTL_EN register 0x74"
+                                "=0x%0x,0x%0x,0x%0x,0x%0x\n",
+                    value[0], value[1], value[2], value[3]);
+
+       return status;
+}
+
+int cx231xx_power_suspend(struct cx231xx *dev)
+{
+       u8 value[4] = { 0, 0, 0, 0 };
+       u32 tmp = 0;
+       int status = 0;
+
+       status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN,
+                                      value, 4);
+       if (status > 0)
+               return status;
+
+       tmp = *((u32 *) value);
+       tmp &= (~PWR_MODE_MASK);
+
+       value[0] = (u8) tmp;
+       value[1] = (u8) (tmp >> 8);
+       value[2] = (u8) (tmp >> 16);
+       value[3] = (u8) (tmp >> 24);
+       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, PWR_CTL_EN,
+                                       value, 4);
+
+       return status;
+}
+
+/******************************************************************************
+ *                  S T R E A M    C O N T R O L   functions                  *
+ ******************************************************************************/
+int cx231xx_start_stream(struct cx231xx *dev, u32 ep_mask)
+{
+       u8 value[4] = { 0x0, 0x0, 0x0, 0x0 };
+       u32 tmp = 0;
+       int status = 0;
+
+       cx231xx_info("cx231xx_start_stream():: ep_mask = %x\n", ep_mask);
+       status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET,
+                                      value, 4);
+       if (status < 0)
+               return status;
+
+       tmp = *((u32 *) value);
+       tmp |= ep_mask;
+       value[0] = (u8) tmp;
+       value[1] = (u8) (tmp >> 8);
+       value[2] = (u8) (tmp >> 16);
+       value[3] = (u8) (tmp >> 24);
+
+       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, EP_MODE_SET,
+                                       value, 4);
+
+       return status;
+}
+
+int cx231xx_stop_stream(struct cx231xx *dev, u32 ep_mask)
+{
+       u8 value[4] = { 0x0, 0x0, 0x0, 0x0 };
+       u32 tmp = 0;
+       int status = 0;
+
+       cx231xx_info("cx231xx_stop_stream():: ep_mask = %x\n", ep_mask);
+       status =
+           cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, value, 4);
+       if (status < 0)
+               return status;
+
+       tmp = *((u32 *) value);
+       tmp &= (~ep_mask);
+       value[0] = (u8) tmp;
+       value[1] = (u8) (tmp >> 8);
+       value[2] = (u8) (tmp >> 16);
+       value[3] = (u8) (tmp >> 24);
+
+       status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, EP_MODE_SET,
+                                       value, 4);
+
+       return status;
+}
+
+int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type)
+{
+       int status = 0;
+
+       if (dev->udev->speed == USB_SPEED_HIGH) {
+               switch (media_type) {
+               case 81: /* audio */
+                       cx231xx_info("%s: Audio enter HANC\n", __func__);
+                       status =
+                           cx231xx_mode_register(dev, TS_MODE_REG, 0x9300);
+                       break;
+
+               case 2: /* vbi */
+                       cx231xx_info("%s: set vanc registers\n", __func__);
+                       status = cx231xx_mode_register(dev, TS_MODE_REG, 0x300);
+                       break;
+
+               case 3: /* sliced cc */
+                       cx231xx_info("%s: set hanc registers\n", __func__);
+                       status =
+                           cx231xx_mode_register(dev, TS_MODE_REG, 0x1300);
+                       break;
+
+               case 0: /* video */
+                       cx231xx_info("%s: set video registers\n", __func__);
+                       status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100);
+                       break;
+
+               case 4: /* ts1 */
+                       cx231xx_info("%s: set ts1 registers\n", __func__);
+                       status = cx231xx_mode_register(dev, TS_MODE_REG, 0x101);
+                       status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400);
+                       break;
+               case 6: /* ts1 parallel mode */
+                       cx231xx_info("%s: set ts1 parrallel mode registers\n",
+                                    __func__);
+                       status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100);
+                       status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400);
+                       break;
+               }
+       } else {
+               status = cx231xx_mode_register(dev, TS_MODE_REG, 0x101);
+       }
+
+       return status;
+}
+
+int cx231xx_capture_start(struct cx231xx *dev, int start, u8 media_type)
+{
+       int rc;
+       u32 ep_mask = -1;
+       struct pcb_config *pcb_config;
+
+       /* get EP for media type */
+       pcb_config = (struct pcb_config *)&dev->current_pcb_config;
+
+       if (pcb_config->config_num == 1) {
+               switch (media_type) {
+               case 0: /* Video */
+                       ep_mask = ENABLE_EP4;   /* ep4  [00:1000] */
+                       break;
+               case 1: /* Audio */
+                       ep_mask = ENABLE_EP3;   /* ep3  [00:0100] */
+                       break;
+               case 2: /* Vbi */
+                       ep_mask = ENABLE_EP5;   /* ep5 [01:0000] */
+                       break;
+               case 3: /* Sliced_cc */
+                       ep_mask = ENABLE_EP6;   /* ep6 [10:0000] */
+                       break;
+               case 4: /* ts1 */
+               case 6: /* ts1 parallel mode */
+                       ep_mask = ENABLE_EP1;   /* ep1 [00:0001] */
+                       break;
+               case 5: /* ts2 */
+                       ep_mask = ENABLE_EP2;   /* ep2 [00:0010] */
+                       break;
+               }
+
+       } else if (pcb_config->config_num > 1) {
+               switch (media_type) {
+               case 0: /* Video */
+                       ep_mask = ENABLE_EP4;   /* ep4  [00:1000] */
+                       break;
+               case 1: /* Audio */
+                       ep_mask = ENABLE_EP3;   /* ep3  [00:0100] */
+                       break;
+               case 2: /* Vbi */
+                       ep_mask = ENABLE_EP5;   /* ep5 [01:0000] */
+                       break;
+               case 3: /* Sliced_cc */
+                       ep_mask = ENABLE_EP6;   /* ep6 [10:0000] */
+                       break;
+               case 4: /* ts1 */
+               case 6: /* ts1 parallel mode */
+                       ep_mask = ENABLE_EP1;   /* ep1 [00:0001] */
+                       break;
+               case 5: /* ts2 */
+                       ep_mask = ENABLE_EP2;   /* ep2 [00:0010] */
+                       break;
+               }
+
+       }
+
+       if (start) {
+               rc = cx231xx_initialize_stream_xfer(dev, media_type);
+
+               if (rc < 0)
+                       return rc;
+
+               /* enable video capture */
+               if (ep_mask > 0)
+                       rc = cx231xx_start_stream(dev, ep_mask);
+       } else {
+               /* disable video capture */
+               if (ep_mask > 0)
+                       rc = cx231xx_stop_stream(dev, ep_mask);
+       }
+
+       if (dev->mode == CX231XX_ANALOG_MODE)
+               ;/* do any in Analog mode */
+       else
+               ;/* do any in digital mode */
+
+       return rc;
+}
+EXPORT_SYMBOL_GPL(cx231xx_capture_start);
+
+/*****************************************************************************
+*                   G P I O   B I T control functions                        *
+******************************************************************************/
+int cx231xx_set_gpio_bit(struct cx231xx *dev, u32 gpio_bit, u8 * gpio_val)
+{
+       int status = 0;
+
+       status = cx231xx_send_gpio_cmd(dev, gpio_bit, gpio_val, 4, 0, 0);
+
+       return status;
+}
+
+int cx231xx_get_gpio_bit(struct cx231xx *dev, u32 gpio_bit, u8 * gpio_val)
+{
+       int status = 0;
+
+       status = cx231xx_send_gpio_cmd(dev, gpio_bit, gpio_val, 4, 0, 1);
+
+       return status;
+}
+
+/*
+* cx231xx_set_gpio_direction
+*      Sets the direction of the GPIO pin to input or output
+*
+* Parameters :
+*      pin_number : The GPIO Pin number to program the direction for
+*                   from 0 to 31
+*      pin_value : The Direction of the GPIO Pin under reference.
+*                      0 = Input direction
+*                      1 = Output direction
+*/
+int cx231xx_set_gpio_direction(struct cx231xx *dev,
+                              int pin_number, int pin_value)
+{
+       int status = 0;
+       u32 value = 0;
+
+       /* Check for valid pin_number - if 32 , bail out */
+       if (pin_number >= 32)
+               return -EINVAL;
+
+       /* input */
+       if (pin_value == 0)
+               value = dev->gpio_dir & (~(1 << pin_number));   /* clear */
+       else
+               value = dev->gpio_dir | (1 << pin_number);
+
+       status = cx231xx_set_gpio_bit(dev, value, (u8 *) &dev->gpio_val);
+
+       /* cache the value for future */
+       dev->gpio_dir = value;
+
+       return status;
+}
+
+/*
+* cx231xx_set_gpio_value
+*      Sets the value of the GPIO pin to Logic high or low. The Pin under
+*      reference should ALREADY BE SET IN OUTPUT MODE !!!!!!!!!
+*
+* Parameters :
+*      pin_number : The GPIO Pin number to program the direction for
+*      pin_value : The value of the GPIO Pin under reference.
+*                      0 = set it to 0
+*                      1 = set it to 1
+*/
+int cx231xx_set_gpio_value(struct cx231xx *dev, int pin_number, int pin_value)
+{
+       int status = 0;
+       u32 value = 0;
+
+       /* Check for valid pin_number - if 0xFF , bail out */
+       if (pin_number >= 32)
+               return -EINVAL;
+
+       /* first do a sanity check - if the Pin is not output, make it output */
+       if ((dev->gpio_dir & (1 << pin_number)) == 0x00) {
+               /* It was in input mode */
+               value = dev->gpio_dir | (1 << pin_number);
+               dev->gpio_dir = value;
+               status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                             (u8 *) &dev->gpio_val);
+               value = 0;
+       }
+
+       if (pin_value == 0)
+               value = dev->gpio_val & (~(1 << pin_number));
+       else
+               value = dev->gpio_val | (1 << pin_number);
+
+       /* store the value */
+       dev->gpio_val = value;
+
+       /* toggle bit0 of GP_IO */
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       return status;
+}
+
+/*****************************************************************************
+*                      G P I O I2C related functions                         *
+******************************************************************************/
+int cx231xx_gpio_i2c_start(struct cx231xx *dev)
+{
+       int status = 0;
+
+       /* set SCL to output 1 ; set SDA to output 1 */
+       dev->gpio_dir |= 1 << dev->board.tuner_scl_gpio;
+       dev->gpio_dir |= 1 << dev->board.tuner_sda_gpio;
+       dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+       dev->gpio_val |= 1 << dev->board.tuner_sda_gpio;
+
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+       if (status < 0)
+               return -EINVAL;
+
+       /* set SCL to output 1; set SDA to output 0 */
+       dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+       dev->gpio_val &= ~(1 << dev->board.tuner_sda_gpio);
+
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+       if (status < 0)
+               return -EINVAL;
+
+       /* set SCL to output 0; set SDA to output 0      */
+       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+       dev->gpio_val &= ~(1 << dev->board.tuner_sda_gpio);
+
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+       if (status < 0)
+               return -EINVAL;
+
+       return status;
+}
+
+int cx231xx_gpio_i2c_end(struct cx231xx *dev)
+{
+       int status = 0;
+
+       /* set SCL to output 0; set SDA to output 0      */
+       dev->gpio_dir |= 1 << dev->board.tuner_scl_gpio;
+       dev->gpio_dir |= 1 << dev->board.tuner_sda_gpio;
+
+       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+       dev->gpio_val &= ~(1 << dev->board.tuner_sda_gpio);
+
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+       if (status < 0)
+               return -EINVAL;
+
+       /* set SCL to output 1; set SDA to output 0      */
+       dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+       dev->gpio_val &= ~(1 << dev->board.tuner_sda_gpio);
+
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+       if (status < 0)
+               return -EINVAL;
+
+       /* set SCL to input ,release SCL cable control
+          set SDA to input ,release SDA cable control */
+       dev->gpio_dir &= ~(1 << dev->board.tuner_scl_gpio);
+       dev->gpio_dir &= ~(1 << dev->board.tuner_sda_gpio);
+
+       status =
+           cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+       if (status < 0)
+               return -EINVAL;
+
+       return status;
+}
+
+int cx231xx_gpio_i2c_write_byte(struct cx231xx *dev, u8 data)
+{
+       int status = 0;
+       u8 i;
+
+       /* set SCL to output ; set SDA to output */
+       dev->gpio_dir |= 1 << dev->board.tuner_scl_gpio;
+       dev->gpio_dir |= 1 << dev->board.tuner_sda_gpio;
+
+       for (i = 0; i < 8; i++) {
+               if (((data << i) & 0x80) == 0) {
+                       /* set SCL to output 0; set SDA to output 0     */
+                       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+                       dev->gpio_val &= ~(1 << dev->board.tuner_sda_gpio);
+                       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                                     (u8 *)&dev->gpio_val);
+
+                       /* set SCL to output 1; set SDA to output 0     */
+                       dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+                       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                                     (u8 *)&dev->gpio_val);
+
+                       /* set SCL to output 0; set SDA to output 0     */
+                       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+                       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                                     (u8 *)&dev->gpio_val);
+               } else {
+                       /* set SCL to output 0; set SDA to output 1     */
+                       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+                       dev->gpio_val |= 1 << dev->board.tuner_sda_gpio;
+                       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                                     (u8 *)&dev->gpio_val);
+
+                       /* set SCL to output 1; set SDA to output 1     */
+                       dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+                       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                                     (u8 *)&dev->gpio_val);
+
+                       /* set SCL to output 0; set SDA to output 1     */
+                       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+                       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                                     (u8 *)&dev->gpio_val);
+               }
+       }
+       return status;
+}
+
+int cx231xx_gpio_i2c_read_byte(struct cx231xx *dev, u8 * buf)
+{
+       u8 value = 0;
+       int status = 0;
+       u32 gpio_logic_value = 0;
+       u8 i;
+
+       /* read byte */
+       for (i = 0; i < 8; i++) {       /* send write I2c addr */
+
+               /* set SCL to output 0; set SDA to input */
+               dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+               status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                             (u8 *)&dev->gpio_val);
+
+               /* set SCL to output 1; set SDA to input */
+               dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+               status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
+                                             (u8 *)&dev->gpio_val);
+
+               /* get SDA data bit */
+               gpio_logic_value = dev->gpio_val;
+               status = cx231xx_get_gpio_bit(dev, dev->gpio_dir,
+                                             (u8 *)&dev->gpio_val);
+               if ((dev->gpio_val & (1 << dev->board.tuner_sda_gpio)) != 0)
+                       value |= (1 << (8 - i - 1));
+
+               dev->gpio_val = gpio_logic_value;
+       }
+
+       /* set SCL to output 0,finish the read latest SCL signal.
+          !!!set SDA to input, never to modify SDA direction at
+          the same times */
+       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       /* store the value */
+       *buf = value & 0xff;
+
+       return status;
+}
+
+int cx231xx_gpio_i2c_read_ack(struct cx231xx *dev)
+{
+       int status = 0;
+       u32 gpio_logic_value = 0;
+       int nCnt = 10;
+       int nInit = nCnt;
+
+       /* clock stretch; set SCL to input; set SDA to input;
+          get SCL value till SCL = 1 */
+       dev->gpio_dir &= ~(1 << dev->board.tuner_sda_gpio);
+       dev->gpio_dir &= ~(1 << dev->board.tuner_scl_gpio);
+
+       gpio_logic_value = dev->gpio_val;
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       do {
+               msleep(2);
+               status = cx231xx_get_gpio_bit(dev, dev->gpio_dir,
+                                             (u8 *)&dev->gpio_val);
+               nCnt--;
+       } while (((dev->gpio_val &
+                         (1 << dev->board.tuner_scl_gpio)) == 0) &&
+                        (nCnt > 0));
+
+       if (nCnt == 0)
+               cx231xx_info("No ACK after %d msec -GPIO I2C failed!",
+                            nInit * 10);
+
+       /* readAck
+          throuth clock stretch ,slave has given a SCL signal,
+          so the SDA data can be directly read.  */
+       status = cx231xx_get_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       if ((dev->gpio_val & 1 << dev->board.tuner_sda_gpio) == 0) {
+               dev->gpio_val = gpio_logic_value;
+               dev->gpio_val &= ~(1 << dev->board.tuner_sda_gpio);
+               status = 0;
+       } else {
+               dev->gpio_val = gpio_logic_value;
+               dev->gpio_val |= (1 << dev->board.tuner_sda_gpio);
+       }
+
+       /* read SDA end, set the SCL to output 0, after this operation,
+          SDA direction can be changed. */
+       dev->gpio_val = gpio_logic_value;
+       dev->gpio_dir |= (1 << dev->board.tuner_scl_gpio);
+       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       return status;
+}
+
+int cx231xx_gpio_i2c_write_ack(struct cx231xx *dev)
+{
+       int status = 0;
+
+       /* set SDA to ouput */
+       dev->gpio_dir |= 1 << dev->board.tuner_sda_gpio;
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       /* set SCL = 0 (output); set SDA = 0 (output) */
+       dev->gpio_val &= ~(1 << dev->board.tuner_sda_gpio);
+       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       /* set SCL = 1 (output); set SDA = 0 (output) */
+       dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       /* set SCL = 0 (output); set SDA = 0 (output) */
+       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       /* set SDA to input,and then the slave will read data from SDA. */
+       dev->gpio_dir &= ~(1 << dev->board.tuner_sda_gpio);
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       return status;
+}
+
+int cx231xx_gpio_i2c_write_nak(struct cx231xx *dev)
+{
+       int status = 0;
+
+       /* set scl to output ; set sda to input */
+       dev->gpio_dir |= 1 << dev->board.tuner_scl_gpio;
+       dev->gpio_dir &= ~(1 << dev->board.tuner_sda_gpio);
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       /* set scl to output 0; set sda to input */
+       dev->gpio_val &= ~(1 << dev->board.tuner_scl_gpio);
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       /* set scl to output 1; set sda to input */
+       dev->gpio_val |= 1 << dev->board.tuner_scl_gpio;
+       status = cx231xx_set_gpio_bit(dev, dev->gpio_dir, (u8 *)&dev->gpio_val);
+
+       return status;
+}
+
+/*****************************************************************************
+*                      G P I O I2C related functions                         *
+******************************************************************************/
+/* cx231xx_gpio_i2c_read
+ * Function to read data from gpio based I2C interface
+ */
+int cx231xx_gpio_i2c_read(struct cx231xx *dev, u8 dev_addr, u8 * buf, u8 len)
+{
+       int status = 0;
+       int i = 0;
+
+       /* get the lock */
+       mutex_lock(&dev->gpio_i2c_lock);
+
+       /* start */
+       status = cx231xx_gpio_i2c_start(dev);
+
+       /* write dev_addr */
+       status = cx231xx_gpio_i2c_write_byte(dev, (dev_addr << 1) + 1);
+
+       /* readAck */
+       status = cx231xx_gpio_i2c_read_ack(dev);
+
+       /* read data */
+       for (i = 0; i < len; i++) {
+               /* read data */
+               buf[i] = 0;
+               status = cx231xx_gpio_i2c_read_byte(dev, &buf[i]);
+
+               if ((i + 1) != len) {
+                       /* only do write ack if we more length */
+                       status = cx231xx_gpio_i2c_write_ack(dev);
+               }
+       }
+
+       /* write NAK - inform reads are complete */
+       status = cx231xx_gpio_i2c_write_nak(dev);
+
+       /* write end */
+       status = cx231xx_gpio_i2c_end(dev);
+
+       /* release the lock */
+       mutex_unlock(&dev->gpio_i2c_lock);
+
+       return status;
+}
+
+/* cx231xx_gpio_i2c_write
+ * Function to write data to gpio based I2C interface
+ */
+int cx231xx_gpio_i2c_write(struct cx231xx *dev, u8 dev_addr, u8 * buf, u8 len)
+{
+       int status = 0;
+       int i = 0;
+
+       /* get the lock */
+       mutex_lock(&dev->gpio_i2c_lock);
+
+       /* start */
+       status = cx231xx_gpio_i2c_start(dev);
+
+       /* write dev_addr */
+       status = cx231xx_gpio_i2c_write_byte(dev, dev_addr << 1);
+
+       /* read Ack */
+       status = cx231xx_gpio_i2c_read_ack(dev);
+
+       for (i = 0; i < len; i++) {
+               /* Write data */
+               status = cx231xx_gpio_i2c_write_byte(dev, buf[i]);
+
+               /* read Ack */
+               status = cx231xx_gpio_i2c_read_ack(dev);
+       }
+
+       /* write End */
+       status = cx231xx_gpio_i2c_end(dev);
+
+       /* release the lock */
+       mutex_unlock(&dev->gpio_i2c_lock);
+
+       return 0;
+}
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
new file mode 100644 (file)
index 0000000..c8a32b1
--- /dev/null
@@ -0,0 +1,914 @@
+/*
+   cx231xx-cards.c - driver for Conexant Cx23100/101/102
+                               USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+                               Based on em28xx driver
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/i2c.h>
+#include <linux/usb.h>
+#include <media/tuner.h>
+#include <media/tveeprom.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
+
+#include <media/cx25840.h>
+#include "xc5000.h"
+
+#include "cx231xx.h"
+
+static int tuner = -1;
+module_param(tuner, int, 0444);
+MODULE_PARM_DESC(tuner, "tuner type");
+
+static unsigned int disable_ir;
+module_param(disable_ir, int, 0444);
+MODULE_PARM_DESC(disable_ir, "disable infrared remote support");
+
+/* Bitmask marking allocated devices from 0 to CX231XX_MAXBOARDS */
+static unsigned long cx231xx_devused;
+
+/*
+ *  Reset sequences for analog/digital modes
+ */
+
+static struct cx231xx_reg_seq RDE250_XCV_TUNER[] = {
+       {0x03, 0x01, 10},
+       {0x03, 0x00, 30},
+       {0x03, 0x01, 10},
+       {-1, -1, -1},
+};
+
+/*
+ *  Board definitions
+ */
+struct cx231xx_board cx231xx_boards[] = {
+       [CX231XX_BOARD_UNKNOWN] = {
+               .name = "Unknown CX231xx video grabber",
+               .tuner_type = TUNER_ABSENT,
+               .input = {{
+                               .type = CX231XX_VMUX_TELEVISION,
+                               .vmux = CX231XX_VIN_3_1,
+                               .amux = CX231XX_AMUX_VIDEO,
+                               .gpio = 0,
+                       }, {
+                               .type = CX231XX_VMUX_COMPOSITE1,
+                               .vmux = CX231XX_VIN_2_1,
+                               .amux = CX231XX_AMUX_LINE_IN,
+                               .gpio = 0,
+                       }, {
+                               .type = CX231XX_VMUX_SVIDEO,
+                               .vmux = CX231XX_VIN_1_1 |
+                                       (CX231XX_VIN_1_2 << 8) |
+                                       CX25840_SVIDEO_ON,
+                               .amux = CX231XX_AMUX_LINE_IN,
+                               .gpio = 0,
+                       }
+               },
+       },
+       [CX231XX_BOARD_CNXT_RDE_250] = {
+               .name = "Conexant Hybrid TV - RDE250",
+               .tuner_type = TUNER_XC5000,
+               .tuner_addr = 0x61,
+               .tuner_gpio = RDE250_XCV_TUNER,
+               .tuner_sif_gpio = 0x05,
+               .tuner_scl_gpio = 0x1a,
+               .tuner_sda_gpio = 0x1b,
+               .decoder = CX231XX_AVDECODER,
+               .demod_xfer_mode = 0,
+               .ctl_pin_status_mask = 0xFFFFFFC4,
+               .agc_analog_digital_select_gpio = 0x0c,
+               .gpio_pin_status_mask = 0x4001000,
+               .tuner_i2c_master = 1,
+               .demod_i2c_master = 2,
+               .has_dvb = 1,
+               .demod_addr = 0x02,
+               .norm = V4L2_STD_PAL,
+
+               .input = {{
+                               .type = CX231XX_VMUX_TELEVISION,
+                               .vmux = CX231XX_VIN_3_1,
+                               .amux = CX231XX_AMUX_VIDEO,
+                               .gpio = 0,
+                       }, {
+                               .type = CX231XX_VMUX_COMPOSITE1,
+                               .vmux = CX231XX_VIN_2_1,
+                               .amux = CX231XX_AMUX_LINE_IN,
+                               .gpio = 0,
+                       }, {
+                               .type = CX231XX_VMUX_SVIDEO,
+                               .vmux = CX231XX_VIN_1_1 |
+                                       (CX231XX_VIN_1_2 << 8) |
+                                       CX25840_SVIDEO_ON,
+                               .amux = CX231XX_AMUX_LINE_IN,
+                               .gpio = 0,
+                       }
+               },
+       },
+
+       [CX231XX_BOARD_CNXT_RDU_250] = {
+               .name = "Conexant Hybrid TV - RDU250",
+               .tuner_type = TUNER_XC5000,
+               .tuner_addr = 0x61,
+               .tuner_gpio = RDE250_XCV_TUNER,
+               .tuner_sif_gpio = 0x05,
+               .tuner_scl_gpio = 0x1a,
+               .tuner_sda_gpio = 0x1b,
+               .decoder = CX231XX_AVDECODER,
+               .demod_xfer_mode = 0,
+               .ctl_pin_status_mask = 0xFFFFFFC4,
+               .agc_analog_digital_select_gpio = 0x0c,
+               .gpio_pin_status_mask = 0x4001000,
+               .tuner_i2c_master = 1,
+               .demod_i2c_master = 2,
+               .has_dvb = 1,
+               .demod_addr = 0x32,
+               .norm = V4L2_STD_NTSC,
+
+               .input = {{
+                               .type = CX231XX_VMUX_TELEVISION,
+                               .vmux = CX231XX_VIN_3_1,
+                               .amux = CX231XX_AMUX_VIDEO,
+                               .gpio = 0,
+                       }, {
+                               .type = CX231XX_VMUX_COMPOSITE1,
+                               .vmux = CX231XX_VIN_2_1,
+                               .amux = CX231XX_AMUX_LINE_IN,
+                               .gpio = 0,
+                       }, {
+                               .type = CX231XX_VMUX_SVIDEO,
+                               .vmux = CX231XX_VIN_1_1 |
+                                       (CX231XX_VIN_1_2 << 8) |
+                                       CX25840_SVIDEO_ON,
+                               .amux = CX231XX_AMUX_LINE_IN,
+                               .gpio = 0,
+                       }
+               },
+       },
+};
+const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards);
+
+/* table of devices that work with this driver */
+struct usb_device_id cx231xx_id_table[] = {
+       {USB_DEVICE(0x0572, 0x5A3C),
+        .driver_info = CX231XX_BOARD_UNKNOWN},
+       {USB_DEVICE(0x0572, 0x58A2),
+        .driver_info = CX231XX_BOARD_CNXT_RDE_250},
+       {USB_DEVICE(0x0572, 0x58A1),
+        .driver_info = CX231XX_BOARD_CNXT_RDU_250},
+       {},
+};
+
+MODULE_DEVICE_TABLE(usb, cx231xx_id_table);
+
+/* cx231xx_tuner_callback
+ * will be used to reset XC5000 tuner using GPIO pin
+ */
+
+int cx231xx_tuner_callback(void *ptr, int component, int command, int arg)
+{
+       int rc = 0;
+       struct cx231xx *dev = ptr;
+
+       if (dev->tuner_type == TUNER_XC5000) {
+               if (command == XC5000_TUNER_RESET) {
+                       cx231xx_info
+                               ("Tuner CB: RESET: cmd %d : tuner type %d \n",
+                                command, dev->tuner_type);
+                       cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit,
+                                              1);
+                       msleep(10);
+                       cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit,
+                                              0);
+                       msleep(330);
+                       cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit,
+                                              1);
+                       msleep(10);
+               }
+       }
+       return rc;
+}
+EXPORT_SYMBOL_GPL(cx231xx_tuner_callback);
+
+static inline void cx231xx_set_model(struct cx231xx *dev)
+{
+       memcpy(&dev->board, &cx231xx_boards[dev->model], sizeof(dev->board));
+}
+
+/* Since cx231xx_pre_card_setup() requires a proper dev->model,
+ * this won't work for boards with generic PCI IDs
+ */
+void cx231xx_pre_card_setup(struct cx231xx *dev)
+{
+
+       cx231xx_set_model(dev);
+
+       cx231xx_info("Identified as %s (card=%d)\n",
+                    dev->board.name, dev->model);
+
+       /* set the direction for GPIO pins */
+       cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1);
+       cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1);
+       cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1);
+
+       /* request some modules if any required */
+
+       /* reset the Tuner */
+       cx231xx_gpio_set(dev, dev->board.tuner_gpio);
+
+       /* set the mode to Analog mode initially */
+       cx231xx_set_mode(dev, CX231XX_ANALOG_MODE);
+
+       /* Unlock device */
+       /* cx231xx_set_mode(dev, CX231XX_SUSPEND); */
+
+}
+
+static void cx231xx_config_tuner(struct cx231xx *dev)
+{
+       struct tuner_setup tun_setup;
+       struct v4l2_frequency f;
+
+       if (dev->tuner_type == TUNER_ABSENT)
+               return;
+
+       tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
+       tun_setup.type = dev->tuner_type;
+       tun_setup.addr = dev->tuner_addr;
+       tun_setup.tuner_callback = cx231xx_tuner_callback;
+
+       tuner_call(dev, tuner, s_type_addr, &tun_setup);
+
+#if 0
+       if (tun_setup.type == TUNER_XC5000) {
+               static struct xc2028_ctrl ctrl = {
+                       .fname = XC5000_DEFAULT_FIRMWARE,
+                       .max_len = 64,
+                       .demod = 0;
+               };
+               struct v4l2_priv_tun_config cfg = {
+                       .tuner = dev->tuner_type,
+                       .priv = &ctrl,
+               };
+               tuner_call(dev, tuner, s_config, &cfg);
+       }
+#endif
+       /* configure tuner */
+       f.tuner = 0;
+       f.type = V4L2_TUNER_ANALOG_TV;
+       f.frequency = 9076;     /* just a magic number */
+       dev->ctl_freq = f.frequency;
+       call_all(dev, tuner, s_frequency, &f);
+
+}
+
+/* ----------------------------------------------------------------------- */
+void cx231xx_set_ir(struct cx231xx *dev, struct IR_i2c *ir)
+{
+       if (disable_ir) {
+               ir->get_key = NULL;
+               return;
+       }
+
+       /* detect & configure */
+       switch (dev->model) {
+
+       case CX231XX_BOARD_CNXT_RDE_250:
+               break;
+       case CX231XX_BOARD_CNXT_RDU_250:
+               break;
+       default:
+               break;
+       }
+}
+
+void cx231xx_card_setup(struct cx231xx *dev)
+{
+
+       cx231xx_set_model(dev);
+
+       dev->tuner_type = cx231xx_boards[dev->model].tuner_type;
+       if (cx231xx_boards[dev->model].tuner_addr)
+               dev->tuner_addr = cx231xx_boards[dev->model].tuner_addr;
+
+       /* request some modules */
+       if (dev->board.decoder == CX231XX_AVDECODER) {
+               dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
+                                       &dev->i2c_bus[0].i2c_adap,
+                                       "cx25840", "cx25840", 0x88 >> 1);
+               if (dev->sd_cx25840 == NULL)
+                       cx231xx_info("cx25840 subdev registration failure\n");
+               cx25840_call(dev, core, load_fw);
+
+       }
+
+       if (dev->board.tuner_type != TUNER_ABSENT) {
+               dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
+                               &dev->i2c_bus[1].i2c_adap,
+                               "tuner", "tuner", 0xc2 >> 1);
+               if (dev->sd_tuner == NULL)
+                       cx231xx_info("tuner subdev registration failure\n");
+
+               cx231xx_config_tuner(dev);
+       }
+
+       cx231xx_config_tuner(dev);
+
+#if 0
+       /* TBD  IR will be added later */
+       cx231xx_ir_init(dev);
+#endif
+}
+
+/*
+ * cx231xx_config()
+ * inits registers with sane defaults
+ */
+int cx231xx_config(struct cx231xx *dev)
+{
+       /* TBD need to add cx231xx specific code */
+       dev->mute = 1;          /* maybe not the right place... */
+       dev->volume = 0x1f;
+
+       return 0;
+}
+
+/*
+ * cx231xx_config_i2c()
+ * configure i2c attached devices
+ */
+void cx231xx_config_i2c(struct cx231xx *dev)
+{
+       /* u32 input = INPUT(dev->video_input)->vmux; */
+
+       call_all(dev, video, s_stream, 1);
+}
+
+/*
+ * cx231xx_realease_resources()
+ * unregisters the v4l2,i2c and usb devices
+ * called when the device gets disconected or at module unload
+*/
+void cx231xx_release_resources(struct cx231xx *dev)
+{
+
+#if 0          /* TBD IR related  */
+       if (dev->ir)
+               cx231xx_ir_fini(dev);
+#endif
+
+       cx231xx_release_analog_resources(dev);
+
+       cx231xx_remove_from_devlist(dev);
+
+       cx231xx_dev_uninit(dev);
+
+       usb_put_dev(dev->udev);
+
+       /* Mark device as unused */
+       cx231xx_devused &= ~(1 << dev->devno);
+}
+
+/*
+ * cx231xx_init_dev()
+ * allocates and inits the device structs, registers i2c bus and v4l device
+ */
+static int cx231xx_init_dev(struct cx231xx **devhandle, struct usb_device *udev,
+                           int minor)
+{
+       struct cx231xx *dev = *devhandle;
+       int retval = -ENOMEM;
+       int errCode;
+       unsigned int maxh, maxw;
+
+       dev->udev = udev;
+       mutex_init(&dev->lock);
+       mutex_init(&dev->ctrl_urb_lock);
+       mutex_init(&dev->gpio_i2c_lock);
+
+       spin_lock_init(&dev->video_mode.slock);
+       spin_lock_init(&dev->vbi_mode.slock);
+       spin_lock_init(&dev->sliced_cc_mode.slock);
+
+       init_waitqueue_head(&dev->open);
+       init_waitqueue_head(&dev->wait_frame);
+       init_waitqueue_head(&dev->wait_stream);
+
+       dev->cx231xx_read_ctrl_reg = cx231xx_read_ctrl_reg;
+       dev->cx231xx_write_ctrl_reg = cx231xx_write_ctrl_reg;
+       dev->cx231xx_send_usb_command = cx231xx_send_usb_command;
+       dev->cx231xx_gpio_i2c_read = cx231xx_gpio_i2c_read;
+       dev->cx231xx_gpio_i2c_write = cx231xx_gpio_i2c_write;
+
+       /* Query cx231xx to find what pcb config it is related to */
+       initialize_cx231xx(dev);
+
+       /* Cx231xx pre card setup */
+       cx231xx_pre_card_setup(dev);
+
+       errCode = cx231xx_config(dev);
+       if (errCode) {
+               cx231xx_errdev("error configuring device\n");
+               return -ENOMEM;
+       }
+
+       /* set default norm */
+       dev->norm = dev->board.norm;
+
+       /* register i2c bus */
+       errCode = cx231xx_dev_init(dev);
+       if (errCode < 0) {
+               cx231xx_errdev("%s: cx231xx_i2c_register - errCode [%d]!\n",
+                              __func__, errCode);
+               return errCode;
+       }
+
+       /* Do board specific init */
+       cx231xx_card_setup(dev);
+
+       /* configure the device */
+       cx231xx_config_i2c(dev);
+
+       maxw = norm_maxw(dev);
+       maxh = norm_maxh(dev);
+
+       /* set default image size */
+       dev->width = maxw;
+       dev->height = maxh;
+       dev->interlaced = 0;
+       dev->hscale = 0;
+       dev->vscale = 0;
+       dev->video_input = 0;
+
+       errCode = cx231xx_config(dev);
+       if (errCode < 0) {
+               cx231xx_errdev("%s: cx231xx_config - errCode [%d]!\n",
+                              __func__, errCode);
+               return errCode;
+       }
+
+       /* init video dma queues */
+       INIT_LIST_HEAD(&dev->video_mode.vidq.active);
+       INIT_LIST_HEAD(&dev->video_mode.vidq.queued);
+
+       /* init vbi dma queues */
+       INIT_LIST_HEAD(&dev->vbi_mode.vidq.active);
+       INIT_LIST_HEAD(&dev->vbi_mode.vidq.queued);
+
+       /* Reset other chips required if they are tied up with GPIO pins */
+
+       cx231xx_add_into_devlist(dev);
+
+       retval = cx231xx_register_analog_devices(dev);
+       if (retval < 0) {
+               cx231xx_release_resources(dev);
+               goto fail_reg_devices;
+       }
+
+       cx231xx_init_extension(dev);
+
+       return 0;
+
+fail_reg_devices:
+       mutex_unlock(&dev->lock);
+       return retval;
+}
+
+#if defined(CONFIG_MODULES) && defined(MODULE)
+static void request_module_async(struct work_struct *work)
+{
+       struct cx231xx *dev = container_of(work,
+                                          struct cx231xx, request_module_wk);
+
+       if (dev->has_alsa_audio)
+               request_module("cx231xx-alsa");
+
+       if (dev->board.has_dvb)
+               request_module("cx231xx-dvb");
+
+}
+
+static void request_modules(struct cx231xx *dev)
+{
+       INIT_WORK(&dev->request_module_wk, request_module_async);
+       schedule_work(&dev->request_module_wk);
+}
+#else
+#define request_modules(dev)
+#endif /* CONFIG_MODULES */
+
+/*
+ * cx231xx_usb_probe()
+ * checks for supported devices
+ */
+static int cx231xx_usb_probe(struct usb_interface *interface,
+                            const struct usb_device_id *id)
+{
+       struct usb_device *udev;
+       struct usb_interface *uif;
+       struct cx231xx *dev = NULL;
+       int retval = -ENODEV;
+       int nr = 0, ifnum;
+       int i, isoc_pipe = 0;
+       char *speed;
+       char descr[255] = "";
+       struct usb_interface *lif = NULL;
+       int skip_interface = 0;
+       struct usb_interface_assoc_descriptor *assoc_desc;
+
+       udev = usb_get_dev(interface_to_usbdev(interface));
+       ifnum = interface->altsetting[0].desc.bInterfaceNumber;
+
+       if (!ifnum) {
+               /*
+                * Interface number 0 - IR interface
+                */
+               /* Check to see next free device and mark as used */
+               nr = find_first_zero_bit(&cx231xx_devused, CX231XX_MAXBOARDS);
+               cx231xx_devused |= 1 << nr;
+
+               if (nr >= CX231XX_MAXBOARDS) {
+                       cx231xx_err(DRIVER_NAME ": Supports only %i cx231xx boards.\n",
+                                    CX231XX_MAXBOARDS);
+                       cx231xx_devused &= ~(1 << nr);
+                       return -ENOMEM;
+               }
+
+               /* allocate memory for our device state and initialize it */
+               dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+               if (dev == NULL) {
+                       cx231xx_err(DRIVER_NAME ": out of memory!\n");
+                       cx231xx_devused &= ~(1 << nr);
+                       return -ENOMEM;
+               }
+
+               snprintf(dev->name, 29, "cx231xx #%d", nr);
+               dev->devno = nr;
+               dev->model = id->driver_info;
+               dev->video_mode.alt = -1;
+               dev->interface_count++;
+
+               /* reset gpio dir and value */
+               dev->gpio_dir = 0;
+               dev->gpio_val = 0;
+               dev->xc_fw_load_done = 0;
+               dev->has_alsa_audio = 1;
+               dev->power_mode = -1;
+
+               /* 0 - vbi ; 1 -sliced cc mode */
+               dev->vbi_or_sliced_cc_mode = 0;
+
+               /* get maximum no.of IAD interfaces */
+               assoc_desc = udev->actconfig->intf_assoc[0];
+               dev->max_iad_interface_count = assoc_desc->bInterfaceCount;
+
+               /* init CIR module TBD */
+
+               /* store the current interface */
+               lif = interface;
+
+               switch (udev->speed) {
+               case USB_SPEED_LOW:
+                       speed = "1.5";
+                       break;
+               case USB_SPEED_UNKNOWN:
+               case USB_SPEED_FULL:
+                       speed = "12";
+                       break;
+               case USB_SPEED_HIGH:
+                       speed = "480";
+                       break;
+               default:
+                       speed = "unknown";
+               }
+
+               if (udev->manufacturer)
+                       strlcpy(descr, udev->manufacturer, sizeof(descr));
+
+               if (udev->product) {
+                       if (*descr)
+                               strlcat(descr, " ", sizeof(descr));
+                       strlcat(descr, udev->product, sizeof(descr));
+               }
+               if (*descr)
+                       strlcat(descr, " ", sizeof(descr));
+
+               cx231xx_info("New device %s@ %s Mbps "
+                    "(%04x:%04x) with %d interfaces\n",
+                    descr,
+                    speed,
+                    le16_to_cpu(udev->descriptor.idVendor),
+                    le16_to_cpu(udev->descriptor.idProduct),
+                    dev->max_iad_interface_count);
+       } else {
+               /* Get dev structure first */
+               dev = usb_get_intfdata(udev->actconfig->interface[0]);
+               if (dev == NULL) {
+                       cx231xx_err(DRIVER_NAME ": out of first interface!\n");
+                       return -ENODEV;
+               }
+
+               /* store the interface 0 back */
+               lif = udev->actconfig->interface[0];
+
+               /* increment interface count */
+               dev->interface_count++;
+
+               /* get device number */
+               nr = dev->devno;
+
+               /*
+                * set skip interface, for all interfaces but
+                * interface 1 and the last one
+                */
+               if ((ifnum != 1) && ((dev->interface_count - 1)
+                                    != dev->max_iad_interface_count))
+                       skip_interface = 1;
+
+               if (ifnum == 1) {
+                       assoc_desc = udev->actconfig->intf_assoc[0];
+                       if (assoc_desc->bFirstInterface != ifnum) {
+                               cx231xx_err(DRIVER_NAME ": Not found "
+                                           "matching IAD interface\n");
+                               return -ENODEV;
+                       }
+               }
+       }
+
+       if (skip_interface)
+               return -ENODEV;
+
+       cx231xx_info("registering interface %d\n", ifnum);
+
+       /* save our data pointer in this interface device */
+       usb_set_intfdata(lif, dev);
+
+       if ((dev->interface_count - 1) != dev->max_iad_interface_count)
+               return 0;
+
+       /*
+        * AV device initialization - only done at the last interface
+        */
+
+       /* Create v4l2 device */
+       retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
+       if (retval) {
+               cx231xx_errdev("v4l2_device_register failed\n");
+               cx231xx_devused &= ~(1 << nr);
+               kfree(dev);
+               return -EIO;
+       }
+
+       /* allocate device struct */
+       retval = cx231xx_init_dev(&dev, udev, nr);
+       if (retval) {
+               cx231xx_devused &= ~(1 << dev->devno);
+               v4l2_device_unregister(&dev->v4l2_dev);
+               kfree(dev);
+               return retval;
+       }
+
+       /* compute alternate max packet sizes for video */
+       uif = udev->actconfig->interface[dev->current_pcb_config.
+                      hs_config_info[0].interface_info.video_index + 1];
+
+       dev->video_mode.end_point_addr = le16_to_cpu(uif->altsetting[0].
+                       endpoint[isoc_pipe].desc.bEndpointAddress);
+
+       dev->video_mode.num_alt = uif->num_altsetting;
+       cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+                    dev->video_mode.end_point_addr,
+                    dev->video_mode.num_alt);
+       dev->video_mode.alt_max_pkt_size =
+               kmalloc(32 * dev->video_mode.num_alt, GFP_KERNEL);
+
+       if (dev->video_mode.alt_max_pkt_size == NULL) {
+               cx231xx_errdev("out of memory!\n");
+               cx231xx_devused &= ~(1 << nr);
+               v4l2_device_unregister(&dev->v4l2_dev);
+               kfree(dev);
+               return -ENOMEM;
+       }
+
+       for (i = 0; i < dev->video_mode.num_alt; i++) {
+               u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
+                               desc.wMaxPacketSize);
+               dev->video_mode.alt_max_pkt_size[i] =
+                   (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+               cx231xx_info("Alternate setting %i, max size= %i\n", i,
+                            dev->video_mode.alt_max_pkt_size[i]);
+       }
+
+       /* compute alternate max packet sizes for vbi */
+       uif = udev->actconfig->interface[dev->current_pcb_config.
+                                      hs_config_info[0].interface_info.
+                                      vanc_index + 1];
+
+       dev->vbi_mode.end_point_addr =
+           le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
+                       bEndpointAddress);
+
+       dev->vbi_mode.num_alt = uif->num_altsetting;
+       cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+                    dev->vbi_mode.end_point_addr,
+                    dev->vbi_mode.num_alt);
+       dev->vbi_mode.alt_max_pkt_size =
+           kmalloc(32 * dev->vbi_mode.num_alt, GFP_KERNEL);
+
+       if (dev->vbi_mode.alt_max_pkt_size == NULL) {
+               cx231xx_errdev("out of memory!\n");
+               cx231xx_devused &= ~(1 << nr);
+               v4l2_device_unregister(&dev->v4l2_dev);
+               kfree(dev);
+               return -ENOMEM;
+       }
+
+       for (i = 0; i < dev->vbi_mode.num_alt; i++) {
+               u16 tmp =
+                   le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
+                               desc.wMaxPacketSize);
+               dev->vbi_mode.alt_max_pkt_size[i] =
+                   (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+               cx231xx_info("Alternate setting %i, max size= %i\n", i,
+                            dev->vbi_mode.alt_max_pkt_size[i]);
+       }
+
+       /* compute alternate max packet sizes for sliced CC */
+       uif = udev->actconfig->interface[dev->current_pcb_config.
+                                      hs_config_info[0].interface_info.
+                                      hanc_index + 1];
+
+       dev->sliced_cc_mode.end_point_addr =
+           le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
+                       bEndpointAddress);
+
+       dev->sliced_cc_mode.num_alt = uif->num_altsetting;
+       cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+                    dev->sliced_cc_mode.end_point_addr,
+                    dev->sliced_cc_mode.num_alt);
+       dev->sliced_cc_mode.alt_max_pkt_size =
+               kmalloc(32 * dev->sliced_cc_mode.num_alt, GFP_KERNEL);
+
+       if (dev->sliced_cc_mode.alt_max_pkt_size == NULL) {
+               cx231xx_errdev("out of memory!\n");
+               cx231xx_devused &= ~(1 << nr);
+               v4l2_device_unregister(&dev->v4l2_dev);
+               kfree(dev);
+               return -ENOMEM;
+       }
+
+       for (i = 0; i < dev->sliced_cc_mode.num_alt; i++) {
+               u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
+                               desc.wMaxPacketSize);
+               dev->sliced_cc_mode.alt_max_pkt_size[i] =
+                   (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+               cx231xx_info("Alternate setting %i, max size= %i\n", i,
+                            dev->sliced_cc_mode.alt_max_pkt_size[i]);
+       }
+
+       if (dev->current_pcb_config.ts1_source != 0xff) {
+               /* compute alternate max packet sizes for TS1 */
+               uif = udev->actconfig->interface[dev->current_pcb_config.
+                                              hs_config_info[0].
+                                              interface_info.
+                                              ts1_index + 1];
+
+               dev->ts1_mode.end_point_addr =
+                   le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].
+                               desc.bEndpointAddress);
+
+               dev->ts1_mode.num_alt = uif->num_altsetting;
+               cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+                            dev->ts1_mode.end_point_addr,
+                            dev->ts1_mode.num_alt);
+               dev->ts1_mode.alt_max_pkt_size =
+                       kmalloc(32 * dev->ts1_mode.num_alt, GFP_KERNEL);
+
+               if (dev->ts1_mode.alt_max_pkt_size == NULL) {
+                       cx231xx_errdev("out of memory!\n");
+                       cx231xx_devused &= ~(1 << nr);
+                       v4l2_device_unregister(&dev->v4l2_dev);
+                       kfree(dev);
+                       return -ENOMEM;
+               }
+
+               for (i = 0; i < dev->ts1_mode.num_alt; i++) {
+                       u16 tmp = le16_to_cpu(uif->altsetting[i].
+                                               endpoint[isoc_pipe].desc.
+                                               wMaxPacketSize);
+                       dev->ts1_mode.alt_max_pkt_size[i] =
+                           (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+                       cx231xx_info("Alternate setting %i, max size= %i\n", i,
+                                    dev->ts1_mode.alt_max_pkt_size[i]);
+               }
+       }
+
+       /* load other modules required */
+       request_modules(dev);
+
+       return 0;
+}
+
+/*
+ * cx231xx_usb_disconnect()
+ * called when the device gets diconencted
+ * video device will be unregistered on v4l2_close in case it is still open
+ */
+static void cx231xx_usb_disconnect(struct usb_interface *interface)
+{
+       struct cx231xx *dev;
+
+       dev = usb_get_intfdata(interface);
+       usb_set_intfdata(interface, NULL);
+
+       if (!dev)
+               return;
+
+       if (!dev->udev)
+               return;
+
+       /* delete v4l2 device */
+       v4l2_device_unregister(&dev->v4l2_dev);
+
+       /* wait until all current v4l2 io is finished then deallocate
+          resources */
+       mutex_lock(&dev->lock);
+
+       wake_up_interruptible_all(&dev->open);
+
+       if (dev->users) {
+               cx231xx_warn
+                   ("device /dev/video%d is open! Deregistration and memory "
+                    "deallocation are deferred on close.\n", dev->vdev->num);
+
+               dev->state |= DEV_MISCONFIGURED;
+               cx231xx_uninit_isoc(dev);
+               dev->state |= DEV_DISCONNECTED;
+               wake_up_interruptible(&dev->wait_frame);
+               wake_up_interruptible(&dev->wait_stream);
+       } else {
+               dev->state |= DEV_DISCONNECTED;
+               cx231xx_release_resources(dev);
+       }
+
+       cx231xx_close_extension(dev);
+
+       mutex_unlock(&dev->lock);
+
+       if (!dev->users) {
+               kfree(dev->video_mode.alt_max_pkt_size);
+               kfree(dev->vbi_mode.alt_max_pkt_size);
+               kfree(dev->sliced_cc_mode.alt_max_pkt_size);
+               kfree(dev->ts1_mode.alt_max_pkt_size);
+               kfree(dev);
+       }
+}
+
+static struct usb_driver cx231xx_usb_driver = {
+       .name = "cx231xx",
+       .probe = cx231xx_usb_probe,
+       .disconnect = cx231xx_usb_disconnect,
+       .id_table = cx231xx_id_table,
+};
+
+static int __init cx231xx_module_init(void)
+{
+       int result;
+
+       printk(KERN_INFO DRIVER_NAME " v4l2 driver loaded.\n");
+
+       /* register this driver with the USB subsystem */
+       result = usb_register(&cx231xx_usb_driver);
+       if (result)
+               cx231xx_err(DRIVER_NAME
+                           " usb_register failed. Error number %d.\n", result);
+
+       return result;
+}
+
+static void __exit cx231xx_module_exit(void)
+{
+       /* deregister this driver with the USB subsystem */
+       usb_deregister(&cx231xx_usb_driver);
+}
+
+module_init(cx231xx_module_init);
+module_exit(cx231xx_module_exit);
diff --git a/drivers/media/video/cx231xx/cx231xx-conf-reg.h b/drivers/media/video/cx231xx/cx231xx-conf-reg.h
new file mode 100644 (file)
index 0000000..a6f398a
--- /dev/null
@@ -0,0 +1,494 @@
+/*
+   cx231xx_conf-reg.h - driver for Conexant Cx23100/101/102 USB
+                       video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _POLARIS_REG_H_
+#define _POLARIS_REG_H_
+
+#define BOARD_CFG_STAT          0x0
+#define TS_MODE_REG             0x4
+#define TS1_CFG_REG             0x8
+#define TS1_LENGTH_REG          0xc
+#define TS2_CFG_REG             0x10
+#define TS2_LENGTH_REG          0x14
+#define EP_MODE_SET             0x18
+#define CIR_PWR_PTN1            0x1c
+#define CIR_PWR_PTN2            0x20
+#define CIR_PWR_PTN3            0x24
+#define CIR_PWR_MASK0           0x28
+#define CIR_PWR_MASK1           0x2c
+#define CIR_PWR_MASK2           0x30
+#define CIR_GAIN                0x34
+#define CIR_CAR_REG             0x38
+#define CIR_OT_CFG1             0x40
+#define CIR_OT_CFG2             0x44
+#define PWR_CTL_EN              0x74
+
+/* Polaris Endpoints capture mask for register EP_MODE_SET */
+#define ENABLE_EP1              0x01   /* Bit[0]=1 */
+#define ENABLE_EP2              0x02   /* Bit[1]=1 */
+#define ENABLE_EP3              0x04   /* Bit[2]=1 */
+#define ENABLE_EP4              0x08   /* Bit[3]=1 */
+#define ENABLE_EP5              0x10   /* Bit[4]=1 */
+#define ENABLE_EP6              0x20   /* Bit[5]=1 */
+
+/* Bit definition for register PWR_CTL_EN */
+#define PWR_MODE_MASK           0x17f
+#define PWR_AV_EN               0x08   /* bit3 */
+#define PWR_ISO_EN              0x40   /* bit6 */
+#define PWR_AV_MODE             0x30   /* bit4,5  */
+#define PWR_TUNER_EN            0x04   /* bit2 */
+#define PWR_DEMOD_EN            0x02   /* bit1 */
+#define I2C_DEMOD_EN            0x01   /* bit0 */
+#define PWR_RESETOUT_EN         0x100  /* bit8 */
+
+enum AV_MODE{
+       POLARIS_AVMODE_DEFAULT = 0,
+       POLARIS_AVMODE_DIGITAL = 0x10,
+       POLARIS_AVMODE_ANALOGT_TV = 0x20,
+       POLARIS_AVMODE_ENXTERNAL_AV = 0x30,
+
+};
+
+/* Colibri Registers */
+
+#define SINGLE_ENDED            0x0
+#define LOW_IF                  0x4
+#define EU_IF                   0x9
+#define US_IF                   0xa
+
+#define SUP_BLK_TUNE1           0x00
+#define SUP_BLK_TUNE2           0x01
+#define SUP_BLK_TUNE3           0x02
+#define SUP_BLK_XTAL            0x03
+#define SUP_BLK_PLL1            0x04
+#define SUP_BLK_PLL2            0x05
+#define SUP_BLK_PLL3            0x06
+#define SUP_BLK_REF             0x07
+#define SUP_BLK_PWRDN           0x08
+#define SUP_BLK_TESTPAD         0x09
+#define ADC_COM_INT5_STAB_REF   0x0a
+#define ADC_COM_QUANT           0x0b
+#define ADC_COM_BIAS1           0x0c
+#define ADC_COM_BIAS2           0x0d
+#define ADC_COM_BIAS3           0x0e
+#define TESTBUS_CTRL            0x12
+
+#define FLD_PWRDN_TUNING_BIAS  0x10
+#define FLD_PWRDN_ENABLE_PLL   0x08
+#define FLD_PWRDN_PD_BANDGAP   0x04
+#define FLD_PWRDN_PD_BIAS      0x02
+#define FLD_PWRDN_PD_TUNECK    0x01
+
+
+#define ADC_STATUS_CH1          0x20
+#define ADC_STATUS_CH2          0x40
+#define ADC_STATUS_CH3          0x60
+
+#define ADC_STATUS2_CH1         0x21
+#define ADC_STATUS2_CH2         0x41
+#define ADC_STATUS2_CH3         0x61
+
+#define ADC_CAL_ATEST_CH1       0x22
+#define ADC_CAL_ATEST_CH2       0x42
+#define ADC_CAL_ATEST_CH3       0x62
+
+#define ADC_PWRDN_CLAMP_CH1     0x23
+#define ADC_PWRDN_CLAMP_CH2     0x43
+#define ADC_PWRDN_CLAMP_CH3     0x63
+
+#define ADC_CTRL_DAC23_CH1      0x24
+#define ADC_CTRL_DAC23_CH2      0x44
+#define ADC_CTRL_DAC23_CH3      0x64
+
+#define ADC_CTRL_DAC1_CH1       0x25
+#define ADC_CTRL_DAC1_CH2       0x45
+#define ADC_CTRL_DAC1_CH3       0x65
+
+#define ADC_DCSERVO_DEM_CH1     0x26
+#define ADC_DCSERVO_DEM_CH2     0x46
+#define ADC_DCSERVO_DEM_CH3     0x66
+
+#define ADC_FB_FRCRST_CH1       0x27
+#define ADC_FB_FRCRST_CH2       0x47
+#define ADC_FB_FRCRST_CH3       0x67
+
+#define ADC_INPUT_CH1           0x28
+#define ADC_INPUT_CH2           0x48
+#define ADC_INPUT_CH3           0x68
+#define INPUT_SEL_MASK          0x30   /* [5:4] in_sel */
+
+#define ADC_NTF_PRECLMP_EN_CH1  0x29
+#define ADC_NTF_PRECLMP_EN_CH2  0x49
+#define ADC_NTF_PRECLMP_EN_CH3  0x69
+
+#define ADC_QGAIN_RES_TRM_CH1   0x2a
+#define ADC_QGAIN_RES_TRM_CH2   0x4a
+#define ADC_QGAIN_RES_TRM_CH3   0x6a
+
+#define ADC_SOC_PRECLMP_TERM_CH1    0x2b
+#define ADC_SOC_PRECLMP_TERM_CH2    0x4b
+#define ADC_SOC_PRECLMP_TERM_CH3    0x6b
+
+#define TESTBUS_CTRL_CH1        0x32
+#define TESTBUS_CTRL_CH2        0x52
+#define TESTBUS_CTRL_CH3        0x72
+
+/******************************************************************************
+                           * DIF registers *
+ ******************************************************************************/
+#define      DIRECT_IF_REVB_BASE  0x00300
+
+/*****************************************************************************/
+#define      DIF_PLL_FREQ_WORD        (DIRECT_IF_REVB_BASE + 0x00000000)
+/*****************************************************************************/
+#define      FLD_DIF_PLL_LOCK                           0x80000000
+/*  Reserved                                [30:29] */
+#define      FLD_DIF_PLL_FREE_RUN                       0x10000000
+#define      FLD_DIF_PLL_FREQ                           0x0fffffff
+
+/*****************************************************************************/
+#define      DIF_PLL_CTRL             (DIRECT_IF_REVB_BASE + 0x00000004)
+/*****************************************************************************/
+#define      FLD_DIF_KD_PD                              0xff000000
+/*  Reserved                             [23:20] */
+#define      FLD_DIF_KDS_PD                             0x000f0000
+#define      FLD_DIF_KI_PD                              0x0000ff00
+/*  Reserved                             [7:4] */
+#define      FLD_DIF_KIS_PD                             0x0000000f
+
+/*****************************************************************************/
+#define      DIF_PLL_CTRL1            (DIRECT_IF_REVB_BASE + 0x00000008)
+/*****************************************************************************/
+#define      FLD_DIF_KD_FD                              0xff000000
+/*  Reserved                             [23:20] */
+#define      FLD_DIF_KDS_FD                             0x000f0000
+#define      FLD_DIF_KI_FD                              0x0000ff00
+#define      FLD_DIF_SIG_PROP_SZ                        0x000000f0
+#define      FLD_DIF_KIS_FD                             0x0000000f
+
+/*****************************************************************************/
+#define      DIF_PLL_CTRL2            (DIRECT_IF_REVB_BASE + 0x0000000c)
+/*****************************************************************************/
+#define      FLD_DIF_PLL_AGC_REF                        0xfff00000
+#define      FLD_DIF_PLL_AGC_KI                         0x000f0000
+/*  Reserved                             [15] */
+#define      FLD_DIF_FREQ_LIMIT                         0x00007000
+#define      FLD_DIF_K_FD                               0x00000f00
+#define      FLD_DIF_DOWNSMPL_FD                        0x000000ff
+
+/*****************************************************************************/
+#define      DIF_PLL_CTRL3            (DIRECT_IF_REVB_BASE + 0x00000010)
+/*****************************************************************************/
+/*  Reserved                             [31:16] */
+#define      FLD_DIF_PLL_AGC_EN                         0x00008000
+/*  Reserved                             [14:12] */
+#define      FLD_DIF_PLL_MAN_GAIN                       0x00000fff
+
+/*****************************************************************************/
+#define      DIF_AGC_IF_REF           (DIRECT_IF_REVB_BASE + 0x00000014)
+/*****************************************************************************/
+#define      FLD_DIF_K_AGC_RF                           0xf0000000
+#define      FLD_DIF_K_AGC_IF                           0x0f000000
+#define      FLD_DIF_K_AGC_INT                          0x00f00000
+/*  Reserved                             [19:12] */
+#define      FLD_DIF_IF_REF                             0x00000fff
+
+/*****************************************************************************/
+#define      DIF_AGC_CTRL_IF          (DIRECT_IF_REVB_BASE + 0x00000018)
+/*****************************************************************************/
+#define      FLD_DIF_IF_MAX                             0xff000000
+#define      FLD_DIF_IF_MIN                             0x00ff0000
+#define      FLD_DIF_IF_AGC                             0x0000ffff
+
+/*****************************************************************************/
+#define      DIF_AGC_CTRL_INT         (DIRECT_IF_REVB_BASE + 0x0000001c)
+/*****************************************************************************/
+#define      FLD_DIF_INT_MAX                            0xff000000
+#define      FLD_DIF_INT_MIN                            0x00ff0000
+#define      FLD_DIF_INT_AGC                            0x0000ffff
+
+/*****************************************************************************/
+#define      DIF_AGC_CTRL_RF          (DIRECT_IF_REVB_BASE + 0x00000020)
+/*****************************************************************************/
+#define      FLD_DIF_RF_MAX                             0xff000000
+#define      FLD_DIF_RF_MIN                             0x00ff0000
+#define      FLD_DIF_RF_AGC                             0x0000ffff
+
+/*****************************************************************************/
+#define      DIF_AGC_IF_INT_CURRENT   (DIRECT_IF_REVB_BASE + 0x00000024)
+/*****************************************************************************/
+#define      FLD_DIF_IF_AGC_IN                          0xffff0000
+#define      FLD_DIF_INT_AGC_IN                         0x0000ffff
+
+/*****************************************************************************/
+#define      DIF_AGC_RF_CURRENT       (DIRECT_IF_REVB_BASE + 0x00000028)
+/*****************************************************************************/
+/*  Reserved                            [31:16] */
+#define      FLD_DIF_RF_AGC_IN                          0x0000ffff
+
+/*****************************************************************************/
+#define      DIF_VIDEO_AGC_CTRL       (DIRECT_IF_REVB_BASE + 0x0000002c)
+/*****************************************************************************/
+#define      FLD_DIF_AFD                                0xc0000000
+#define      FLD_DIF_K_VID_AGC                          0x30000000
+#define      FLD_DIF_LINE_LENGTH                        0x0fff0000
+#define      FLD_DIF_AGC_GAIN                           0x0000ffff
+
+/*****************************************************************************/
+#define      DIF_VID_AUD_OVERRIDE     (DIRECT_IF_REVB_BASE + 0x00000030)
+/*****************************************************************************/
+#define      FLD_DIF_AUDIO_AGC_OVERRIDE                 0x80000000
+/*  Reserved                             [30:30] */
+#define      FLD_DIF_AUDIO_MAN_GAIN                     0x3f000000
+/*  Reserved                             [23:17] */
+#define      FLD_DIF_VID_AGC_OVERRIDE                   0x00010000
+#define      FLD_DIF_VID_MAN_GAIN                       0x0000ffff
+
+/*****************************************************************************/
+#define      DIF_AV_SEP_CTRL          (DIRECT_IF_REVB_BASE + 0x00000034)
+/*****************************************************************************/
+#define      FLD_DIF_LPF_FREQ                           0xc0000000
+#define      FLD_DIF_AV_PHASE_INC                       0x3f000000
+#define      FLD_DIF_AUDIO_FREQ                         0x00ffffff
+
+/*****************************************************************************/
+#define      DIF_COMP_FLT_CTRL        (DIRECT_IF_REVB_BASE + 0x00000038)
+/*****************************************************************************/
+/*  Reserved                            [31:24] */
+#define      FLD_DIF_IIR23_R2                           0x00ff0000
+#define      FLD_DIF_IIR23_R1                           0x0000ff00
+#define      FLD_DIF_IIR1_R1                            0x000000ff
+
+/*****************************************************************************/
+#define      DIF_MISC_CTRL            (DIRECT_IF_REVB_BASE + 0x0000003c)
+/*****************************************************************************/
+#define      FLD_DIF_DIF_BYPASS                         0x80000000
+#define      FLD_DIF_FM_NYQ_GAIN                        0x40000000
+#define      FLD_DIF_RF_AGC_ENA                         0x20000000
+#define      FLD_DIF_INT_AGC_ENA                        0x10000000
+#define      FLD_DIF_IF_AGC_ENA                         0x08000000
+#define      FLD_DIF_FORCE_RF_IF_LOCK                   0x04000000
+#define      FLD_DIF_VIDEO_AGC_ENA                      0x02000000
+#define      FLD_DIF_RF_AGC_INV                         0x01000000
+#define      FLD_DIF_INT_AGC_INV                        0x00800000
+#define      FLD_DIF_IF_AGC_INV                         0x00400000
+#define      FLD_DIF_SPEC_INV                           0x00200000
+#define      FLD_DIF_AUD_FULL_BW                        0x00100000
+#define      FLD_DIF_AUD_SRC_SEL                        0x00080000
+/*  Reserved                             [18] */
+#define      FLD_DIF_IF_FREQ                            0x00030000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_TIP_OFFSET                         0x00003f00
+/*  Reserved                             [7:5] */
+#define      FLD_DIF_DITHER_ENA                         0x00000010
+/*  Reserved                             [3:1] */
+#define      FLD_DIF_RF_IF_LOCK                         0x00000001
+
+/*****************************************************************************/
+#define      DIF_SRC_PHASE_INC        (DIRECT_IF_REVB_BASE + 0x00000040)
+/*****************************************************************************/
+/*  Reserved                             [31:29] */
+#define      FLD_DIF_PHASE_INC                          0x1fffffff
+
+/*****************************************************************************/
+#define      DIF_SRC_GAIN_CONTROL     (DIRECT_IF_REVB_BASE + 0x00000044)
+/*****************************************************************************/
+/*  Reserved                             [31:16] */
+#define      FLD_DIF_SRC_KI                             0x0000ff00
+#define      FLD_DIF_SRC_KD                             0x000000ff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF01          (DIRECT_IF_REVB_BASE + 0x00000048)
+/*****************************************************************************/
+/*  Reserved                             [31:19] */
+#define      FLD_DIF_BPF_COEFF_0                        0x00070000
+/*  Reserved                             [15:4] */
+#define      FLD_DIF_BPF_COEFF_1                        0x0000000f
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF23          (DIRECT_IF_REVB_BASE + 0x0000004c)
+/*****************************************************************************/
+/*  Reserved                             [31:22] */
+#define      FLD_DIF_BPF_COEFF_2                        0x003f0000
+/*  Reserved                             [15:7] */
+#define      FLD_DIF_BPF_COEFF_3                        0x0000007f
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF45          (DIRECT_IF_REVB_BASE + 0x00000050)
+/*****************************************************************************/
+/*  Reserved                             [31:24] */
+#define      FLD_DIF_BPF_COEFF_4                        0x00ff0000
+/*  Reserved                             [15:8] */
+#define      FLD_DIF_BPF_COEFF_5                        0x000000ff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF67          (DIRECT_IF_REVB_BASE + 0x00000054)
+/*****************************************************************************/
+/*  Reserved                             [31:25] */
+#define      FLD_DIF_BPF_COEFF_6                        0x01ff0000
+/*  Reserved                             [15:9] */
+#define      FLD_DIF_BPF_COEFF_7                        0x000001ff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF89          (DIRECT_IF_REVB_BASE + 0x00000058)
+/*****************************************************************************/
+/*  Reserved                             [31:26] */
+#define      FLD_DIF_BPF_COEFF_8                        0x03ff0000
+/*  Reserved                             [15:10] */
+#define      FLD_DIF_BPF_COEFF_9                        0x000003ff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF1011        (DIRECT_IF_REVB_BASE + 0x0000005c)
+/*****************************************************************************/
+/*  Reserved                             [31:27] */
+#define      FLD_DIF_BPF_COEFF_10                       0x07ff0000
+/*  Reserved                             [15:11] */
+#define      FLD_DIF_BPF_COEFF_11                       0x000007ff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF1213        (DIRECT_IF_REVB_BASE + 0x00000060)
+/*****************************************************************************/
+/*  Reserved                             [31:27] */
+#define      FLD_DIF_BPF_COEFF_12                       0x07ff0000
+/*  Reserved                             [15:12] */
+#define      FLD_DIF_BPF_COEFF_13                       0x00000fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF1415        (DIRECT_IF_REVB_BASE + 0x00000064)
+/*****************************************************************************/
+/*  Reserved                             [31:28] */
+#define      FLD_DIF_BPF_COEFF_14                       0x0fff0000
+/*  Reserved                             [15:12] */
+#define      FLD_DIF_BPF_COEFF_15                       0x00000fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF1617        (DIRECT_IF_REVB_BASE + 0x00000068)
+/*****************************************************************************/
+/*  Reserved                             [31:29] */
+#define      FLD_DIF_BPF_COEFF_16                       0x1fff0000
+/*  Reserved                             [15:13] */
+#define      FLD_DIF_BPF_COEFF_17                       0x00001fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF1819        (DIRECT_IF_REVB_BASE + 0x0000006c)
+/*****************************************************************************/
+/*  Reserved                             [31:29] */
+#define      FLD_DIF_BPF_COEFF_18                       0x1fff0000
+/*  Reserved                             [15:13] */
+#define      FLD_DIF_BPF_COEFF_19                       0x00001fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF2021        (DIRECT_IF_REVB_BASE + 0x00000070)
+/*****************************************************************************/
+/*  Reserved                             [31:29] */
+#define      FLD_DIF_BPF_COEFF_20                       0x1fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_21                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF2223        (DIRECT_IF_REVB_BASE + 0x00000074)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_22                       0x3fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_23                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF2425        (DIRECT_IF_REVB_BASE + 0x00000078)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_24                       0x3fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_25                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF2627        (DIRECT_IF_REVB_BASE + 0x0000007c)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_26                       0x3fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_27                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF2829        (DIRECT_IF_REVB_BASE + 0x00000080)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_28                       0x3fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_29                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF3031        (DIRECT_IF_REVB_BASE + 0x00000084)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_30                       0x3fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_31                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF3233        (DIRECT_IF_REVB_BASE + 0x00000088)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_32                       0x3fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_33                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF3435        (DIRECT_IF_REVB_BASE + 0x0000008c)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_34                       0x3fff0000
+/*  Reserved                             [15:14] */
+#define      FLD_DIF_BPF_COEFF_35                       0x00003fff
+
+/*****************************************************************************/
+#define      DIF_BPF_COEFF36          (DIRECT_IF_REVB_BASE + 0x00000090)
+/*****************************************************************************/
+/*  Reserved                             [31:30] */
+#define      FLD_DIF_BPF_COEFF_36                       0x3fff0000
+/*  Reserved                             [15:0] */
+
+/*****************************************************************************/
+#define      DIF_RPT_VARIANCE         (DIRECT_IF_REVB_BASE + 0x00000094)
+/*****************************************************************************/
+/*  Reserved                             [31:20] */
+#define      FLD_DIF_RPT_VARIANCE                       0x000fffff
+
+/*****************************************************************************/
+#define      DIF_SOFT_RST_CTRL_REVB       (DIRECT_IF_REVB_BASE + 0x00000098)
+/*****************************************************************************/
+/*  Reserved                             [31:8] */
+#define      FLD_DIF_DIF_SOFT_RST                       0x00000080
+#define      FLD_DIF_DIF_REG_RST_MSK                    0x00000040
+#define      FLD_DIF_AGC_RST_MSK                        0x00000020
+#define      FLD_DIF_CMP_RST_MSK                        0x00000010
+#define      FLD_DIF_AVS_RST_MSK                        0x00000008
+#define      FLD_DIF_NYQ_RST_MSK                        0x00000004
+#define      FLD_DIF_DIF_SRC_RST_MSK                    0x00000002
+#define      FLD_DIF_PLL_RST_MSK                        0x00000001
+
+/*****************************************************************************/
+#define      DIF_PLL_FREQ_ERR         (DIRECT_IF_REVB_BASE + 0x0000009c)
+/*****************************************************************************/
+/*  Reserved                             [31:25] */
+#define      FLD_DIF_CTL_IP                             0x01ffffff
+
+#endif
diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/video/cx231xx/cx231xx-core.c
new file mode 100644 (file)
index 0000000..0d333e6
--- /dev/null
@@ -0,0 +1,1200 @@
+/*
+   cx231xx-core.c - driver for Conexant Cx23100/101/102
+                               USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+                               Based on em28xx driver
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/vmalloc.h>
+#include <media/v4l2-common.h>
+
+#include "cx231xx.h"
+#include "cx231xx-reg.h"
+
+/* #define ENABLE_DEBUG_ISOC_FRAMES */
+
+static unsigned int core_debug;
+module_param(core_debug, int, 0644);
+MODULE_PARM_DESC(core_debug, "enable debug messages [core]");
+
+#define cx231xx_coredbg(fmt, arg...) do {\
+       if (core_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __func__ , ##arg); } while (0)
+
+static unsigned int reg_debug;
+module_param(reg_debug, int, 0644);
+MODULE_PARM_DESC(reg_debug, "enable debug messages [URB reg]");
+
+#define cx231xx_regdbg(fmt, arg...) do {\
+       if (reg_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __func__ , ##arg); } while (0)
+
+static int alt = CX231XX_PINOUT;
+module_param(alt, int, 0644);
+MODULE_PARM_DESC(alt, "alternate setting to use for video endpoint");
+
+#define cx231xx_isocdbg(fmt, arg...) do {\
+       if (core_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __func__ , ##arg); } while (0)
+
+/*****************************************************************
+*             Device control list functions                                     *
+******************************************************************/
+
+static LIST_HEAD(cx231xx_devlist);
+static DEFINE_MUTEX(cx231xx_devlist_mutex);
+
+struct cx231xx *cx231xx_get_device(int minor,
+                                  enum v4l2_buf_type *fh_type, int *has_radio)
+{
+       struct cx231xx *h, *dev = NULL;
+
+       *fh_type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+       *has_radio = 0;
+
+       mutex_lock(&cx231xx_devlist_mutex);
+       list_for_each_entry(h, &cx231xx_devlist, devlist) {
+               if (h->vdev->minor == minor)
+                       dev = h;
+               if (h->vbi_dev->minor == minor) {
+                       dev = h;
+                       *fh_type = V4L2_BUF_TYPE_VBI_CAPTURE;
+               }
+               if (h->radio_dev && h->radio_dev->minor == minor) {
+                       dev = h;
+                       *has_radio = 1;
+               }
+       }
+       mutex_unlock(&cx231xx_devlist_mutex);
+
+       return dev;
+}
+
+/*
+ * cx231xx_realease_resources()
+ * unregisters the v4l2,i2c and usb devices
+ * called when the device gets disconected or at module unload
+*/
+void cx231xx_remove_from_devlist(struct cx231xx *dev)
+{
+       mutex_lock(&cx231xx_devlist_mutex);
+       list_del(&dev->devlist);
+       mutex_unlock(&cx231xx_devlist_mutex);
+};
+
+void cx231xx_add_into_devlist(struct cx231xx *dev)
+{
+       mutex_lock(&cx231xx_devlist_mutex);
+       list_add_tail(&dev->devlist, &cx231xx_devlist);
+       mutex_unlock(&cx231xx_devlist_mutex);
+};
+
+static LIST_HEAD(cx231xx_extension_devlist);
+static DEFINE_MUTEX(cx231xx_extension_devlist_lock);
+
+int cx231xx_register_extension(struct cx231xx_ops *ops)
+{
+       struct cx231xx *dev = NULL;
+
+       mutex_lock(&cx231xx_devlist_mutex);
+       mutex_lock(&cx231xx_extension_devlist_lock);
+       list_add_tail(&ops->next, &cx231xx_extension_devlist);
+       list_for_each_entry(dev, &cx231xx_devlist, devlist) {
+               if (dev)
+                       ops->init(dev);
+       }
+       printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name);
+       mutex_unlock(&cx231xx_extension_devlist_lock);
+       mutex_unlock(&cx231xx_devlist_mutex);
+       return 0;
+}
+EXPORT_SYMBOL(cx231xx_register_extension);
+
+void cx231xx_unregister_extension(struct cx231xx_ops *ops)
+{
+       struct cx231xx *dev = NULL;
+
+       mutex_lock(&cx231xx_devlist_mutex);
+       list_for_each_entry(dev, &cx231xx_devlist, devlist) {
+               if (dev)
+                       ops->fini(dev);
+       }
+
+       mutex_lock(&cx231xx_extension_devlist_lock);
+       printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name);
+       list_del(&ops->next);
+       mutex_unlock(&cx231xx_extension_devlist_lock);
+       mutex_unlock(&cx231xx_devlist_mutex);
+}
+EXPORT_SYMBOL(cx231xx_unregister_extension);
+
+void cx231xx_init_extension(struct cx231xx *dev)
+{
+       struct cx231xx_ops *ops = NULL;
+
+       mutex_lock(&cx231xx_extension_devlist_lock);
+       if (!list_empty(&cx231xx_extension_devlist)) {
+               list_for_each_entry(ops, &cx231xx_extension_devlist, next) {
+                       if (ops->init)
+                               ops->init(dev);
+               }
+       }
+       mutex_unlock(&cx231xx_extension_devlist_lock);
+}
+
+void cx231xx_close_extension(struct cx231xx *dev)
+{
+       struct cx231xx_ops *ops = NULL;
+
+       mutex_lock(&cx231xx_extension_devlist_lock);
+       if (!list_empty(&cx231xx_extension_devlist)) {
+               list_for_each_entry(ops, &cx231xx_extension_devlist, next) {
+                       if (ops->fini)
+                               ops->fini(dev);
+               }
+       }
+       mutex_unlock(&cx231xx_extension_devlist_lock);
+}
+
+/****************************************************************
+*               U S B related functions                         *
+*****************************************************************/
+int cx231xx_send_usb_command(struct cx231xx_i2c *i2c_bus,
+                            struct cx231xx_i2c_xfer_data *req_data)
+{
+       int status = 0;
+       struct cx231xx *dev = i2c_bus->dev;
+       struct VENDOR_REQUEST_IN ven_req;
+
+       u8 saddr_len = 0;
+       u8 _i2c_period = 0;
+       u8 _i2c_nostop = 0;
+       u8 _i2c_reserve = 0;
+
+       /* Get the I2C period, nostop and reserve parameters */
+       _i2c_period = i2c_bus->i2c_period;
+       _i2c_nostop = i2c_bus->i2c_nostop;
+       _i2c_reserve = i2c_bus->i2c_reserve;
+
+       saddr_len = req_data->saddr_len;
+
+       /* Set wValue */
+       if (saddr_len == 1)     /* need check saddr_len == 0  */
+               ven_req.wValue =
+                   req_data->
+                   dev_addr << 9 | _i2c_period << 4 | saddr_len << 2 |
+                   _i2c_nostop << 1 | I2C_SYNC | _i2c_reserve << 6;
+       else
+               ven_req.wValue =
+                   req_data->
+                   dev_addr << 9 | _i2c_period << 4 | saddr_len << 2 |
+                   _i2c_nostop << 1 | I2C_SYNC | _i2c_reserve << 6;
+
+       /* set channel number */
+       if (req_data->direction & I2C_M_RD) {
+               /* channel number, for read,spec required channel_num +4 */
+               ven_req.bRequest = i2c_bus->nr + 4;
+       } else
+               ven_req.bRequest = i2c_bus->nr; /* channel number,  */
+
+       /* set index value */
+       switch (saddr_len) {
+       case 0:
+               ven_req.wIndex = 0;     /* need check */
+               break;
+       case 1:
+               ven_req.wIndex = (req_data->saddr_dat & 0xff);
+               break;
+       case 2:
+               ven_req.wIndex = req_data->saddr_dat;
+               break;
+       }
+
+       /* set wLength value */
+       ven_req.wLength = req_data->buf_size;
+
+       /* set bData value */
+       ven_req.bData = 0;
+
+       /* set the direction */
+       if (req_data->direction) {
+               ven_req.direction = USB_DIR_IN;
+               memset(req_data->p_buffer, 0x00, ven_req.wLength);
+       } else
+               ven_req.direction = USB_DIR_OUT;
+
+       /* set the buffer for read / write */
+       ven_req.pBuff = req_data->p_buffer;
+
+
+       /* call common vendor command request */
+       status = cx231xx_send_vendor_cmd(dev, &ven_req);
+       if (status < 0) {
+               cx231xx_info
+                   ("UsbInterface::sendCommand, failed with status -%d\n",
+                    status);
+       }
+
+       return status;
+}
+EXPORT_SYMBOL_GPL(cx231xx_send_usb_command);
+
+/*
+ * cx231xx_read_ctrl_reg()
+ * reads data from the usb device specifying bRequest and wValue
+ */
+int cx231xx_read_ctrl_reg(struct cx231xx *dev, u8 req, u16 reg,
+                         char *buf, int len)
+{
+       u8 val = 0;
+       int ret;
+       int pipe = usb_rcvctrlpipe(dev->udev, 0);
+
+       if (dev->state & DEV_DISCONNECTED)
+               return -ENODEV;
+
+       if (len > URB_MAX_CTRL_SIZE)
+               return -EINVAL;
+
+       switch (len) {
+       case 1:
+               val = ENABLE_ONE_BYTE;
+               break;
+       case 2:
+               val = ENABLE_TWE_BYTE;
+               break;
+       case 3:
+               val = ENABLE_THREE_BYTE;
+               break;
+       case 4:
+               val = ENABLE_FOUR_BYTE;
+               break;
+       default:
+               val = 0xFF;     /* invalid option */
+       }
+
+       if (val == 0xFF)
+               return -EINVAL;
+
+       if (reg_debug) {
+               cx231xx_isocdbg("(pipe 0x%08x): "
+                               "IN:  %02x %02x %02x %02x %02x %02x %02x %02x ",
+                               pipe,
+                               USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+                               req, 0, val,
+                               reg & 0xff, reg >> 8, len & 0xff, len >> 8);
+       }
+
+       mutex_lock(&dev->ctrl_urb_lock);
+       ret = usb_control_msg(dev->udev, pipe, req,
+                             USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+                             val, reg, dev->urb_buf, len, HZ);
+       if (ret < 0) {
+               cx231xx_isocdbg(" failed!\n");
+               /* mutex_unlock(&dev->ctrl_urb_lock); */
+               return ret;
+       }
+
+       if (len)
+               memcpy(buf, dev->urb_buf, len);
+
+       mutex_unlock(&dev->ctrl_urb_lock);
+
+       if (reg_debug) {
+               int byte;
+
+               cx231xx_isocdbg("<<<");
+               for (byte = 0; byte < len; byte++)
+                       cx231xx_isocdbg(" %02x", (unsigned char)buf[byte]);
+               cx231xx_isocdbg("\n");
+       }
+
+       return ret;
+}
+
+int cx231xx_send_vendor_cmd(struct cx231xx *dev,
+                               struct VENDOR_REQUEST_IN *ven_req)
+{
+       int ret;
+       int pipe = 0;
+
+       if (dev->state & DEV_DISCONNECTED)
+               return -ENODEV;
+
+       if ((ven_req->wLength > URB_MAX_CTRL_SIZE))
+               return -EINVAL;
+
+       if (ven_req->direction)
+               pipe = usb_rcvctrlpipe(dev->udev, 0);
+       else
+               pipe = usb_sndctrlpipe(dev->udev, 0);
+
+       if (reg_debug) {
+               int byte;
+
+               cx231xx_isocdbg("(pipe 0x%08x): "
+                               "OUT: %02x %02x %02x %04x %04x %04x >>>",
+                               pipe,
+                               ven_req->
+                               direction | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+                               ven_req->bRequest, 0, ven_req->wValue,
+                               ven_req->wIndex, ven_req->wLength);
+
+               for (byte = 0; byte < ven_req->wLength; byte++)
+                       cx231xx_isocdbg(" %02x",
+                                       (unsigned char)ven_req->pBuff[byte]);
+               cx231xx_isocdbg("\n");
+       }
+
+       mutex_lock(&dev->ctrl_urb_lock);
+       ret = usb_control_msg(dev->udev, pipe, ven_req->bRequest,
+                             ven_req->
+                             direction | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+                             ven_req->wValue, ven_req->wIndex, ven_req->pBuff,
+                             ven_req->wLength, HZ);
+       mutex_unlock(&dev->ctrl_urb_lock);
+
+       return ret;
+}
+
+/*
+ * cx231xx_write_ctrl_reg()
+ * sends data to the usb device, specifying bRequest
+ */
+int cx231xx_write_ctrl_reg(struct cx231xx *dev, u8 req, u16 reg, char *buf,
+                          int len)
+{
+       u8 val = 0;
+       int ret;
+       int pipe = usb_sndctrlpipe(dev->udev, 0);
+
+       if (dev->state & DEV_DISCONNECTED)
+               return -ENODEV;
+
+       if ((len < 1) || (len > URB_MAX_CTRL_SIZE))
+               return -EINVAL;
+
+       switch (len) {
+       case 1:
+               val = ENABLE_ONE_BYTE;
+               break;
+       case 2:
+               val = ENABLE_TWE_BYTE;
+               break;
+       case 3:
+               val = ENABLE_THREE_BYTE;
+               break;
+       case 4:
+               val = ENABLE_FOUR_BYTE;
+               break;
+       default:
+               val = 0xFF;     /* invalid option */
+       }
+
+       if (val == 0xFF)
+               return -EINVAL;
+
+       if (reg_debug) {
+               int byte;
+
+               cx231xx_isocdbg("(pipe 0x%08x): "
+                       "OUT: %02x %02x %02x %02x %02x %02x %02x %02x >>>",
+                       pipe,
+                       USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+                       req, 0, val, reg & 0xff,
+                       reg >> 8, len & 0xff, len >> 8);
+
+               for (byte = 0; byte < len; byte++)
+                       cx231xx_isocdbg(" %02x", (unsigned char)buf[byte]);
+               cx231xx_isocdbg("\n");
+       }
+
+       mutex_lock(&dev->ctrl_urb_lock);
+       memcpy(dev->urb_buf, buf, len);
+       ret = usb_control_msg(dev->udev, pipe, req,
+                             USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+                             val, reg, dev->urb_buf, len, HZ);
+       mutex_unlock(&dev->ctrl_urb_lock);
+
+       return ret;
+}
+
+/****************************************************************
+*           USB Alternate Setting functions                     *
+*****************************************************************/
+
+int cx231xx_set_video_alternate(struct cx231xx *dev)
+{
+       int errCode, prev_alt = dev->video_mode.alt;
+       unsigned int min_pkt_size = dev->width * 2 + 4;
+       u32 usb_interface_index = 0;
+
+       /* When image size is bigger than a certain value,
+          the frame size should be increased, otherwise, only
+          green screen will be received.
+        */
+       if (dev->width * 2 * dev->height > 720 * 240 * 2)
+               min_pkt_size *= 2;
+
+       if (dev->width > 360) {
+               /* resolutions: 720,704,640 */
+               dev->video_mode.alt = 3;
+       } else if (dev->width > 180) {
+               /* resolutions: 360,352,320,240 */
+               dev->video_mode.alt = 2;
+       } else if (dev->width > 0) {
+               /* resolutions: 180,176,160,128,88 */
+               dev->video_mode.alt = 1;
+       } else {
+               /* Change to alt0 BULK to release USB bandwidth */
+               dev->video_mode.alt = 0;
+       }
+
+       /* Get the correct video interface Index */
+       usb_interface_index =
+           dev->current_pcb_config.hs_config_info[0].interface_info.
+           video_index + 1;
+
+       if (dev->video_mode.alt != prev_alt) {
+               cx231xx_coredbg("minimum isoc packet size: %u (alt=%d)\n",
+                               min_pkt_size, dev->video_mode.alt);
+               dev->video_mode.max_pkt_size =
+                   dev->video_mode.alt_max_pkt_size[dev->video_mode.alt];
+               cx231xx_coredbg("setting alternate %d with wMaxPacketSize=%u\n",
+                               dev->video_mode.alt,
+                               dev->video_mode.max_pkt_size);
+               cx231xx_info
+                   (" setting alt %d with wMaxPktSize=%u , Interface = %d\n",
+                    dev->video_mode.alt, dev->video_mode.max_pkt_size,
+                    usb_interface_index);
+               errCode =
+                   usb_set_interface(dev->udev, usb_interface_index,
+                                     dev->video_mode.alt);
+               if (errCode < 0) {
+                       cx231xx_errdev
+                           ("cannot change alt number to %d (error=%i)\n",
+                            dev->video_mode.alt, errCode);
+                       return errCode;
+               }
+       }
+       return 0;
+}
+
+int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt)
+{
+       int status = 0;
+       u32 usb_interface_index = 0;
+       u32 max_pkt_size = 0;
+
+       switch (index) {
+       case INDEX_TS1:
+               usb_interface_index =
+                   dev->current_pcb_config.hs_config_info[0].interface_info.
+                   ts1_index + 1;
+               dev->video_mode.alt = alt;
+               if (dev->ts1_mode.alt_max_pkt_size != NULL)
+                       max_pkt_size = dev->ts1_mode.max_pkt_size =
+                           dev->ts1_mode.alt_max_pkt_size[dev->ts1_mode.alt];
+               break;
+       case INDEX_TS2:
+               usb_interface_index =
+                   dev->current_pcb_config.hs_config_info[0].interface_info.
+                   ts2_index + 1;
+               break;
+       case INDEX_AUDIO:
+               usb_interface_index =
+                   dev->current_pcb_config.hs_config_info[0].interface_info.
+                   audio_index + 1;
+               dev->adev.alt = alt;
+               if (dev->adev.alt_max_pkt_size != NULL)
+                       max_pkt_size = dev->adev.max_pkt_size =
+                           dev->adev.alt_max_pkt_size[dev->adev.alt];
+               break;
+       case INDEX_VIDEO:
+               usb_interface_index =
+                   dev->current_pcb_config.hs_config_info[0].interface_info.
+                   video_index + 1;
+               dev->video_mode.alt = alt;
+               if (dev->video_mode.alt_max_pkt_size != NULL)
+                       max_pkt_size = dev->video_mode.max_pkt_size =
+                           dev->video_mode.alt_max_pkt_size[dev->video_mode.
+                                                            alt];
+               break;
+       case INDEX_VANC:
+               usb_interface_index =
+                   dev->current_pcb_config.hs_config_info[0].interface_info.
+                   vanc_index + 1;
+               dev->vbi_mode.alt = alt;
+               if (dev->vbi_mode.alt_max_pkt_size != NULL)
+                       max_pkt_size = dev->vbi_mode.max_pkt_size =
+                           dev->vbi_mode.alt_max_pkt_size[dev->vbi_mode.alt];
+               break;
+       case INDEX_HANC:
+               usb_interface_index =
+                   dev->current_pcb_config.hs_config_info[0].interface_info.
+                   hanc_index + 1;
+               dev->sliced_cc_mode.alt = alt;
+               if (dev->sliced_cc_mode.alt_max_pkt_size != NULL)
+                       max_pkt_size = dev->sliced_cc_mode.max_pkt_size =
+                           dev->sliced_cc_mode.alt_max_pkt_size[dev->
+                                                                sliced_cc_mode.
+                                                                alt];
+               break;
+       default:
+               break;
+       }
+
+       if (alt > 0 && max_pkt_size == 0) {
+               cx231xx_errdev
+               ("can't change interface %d alt no. to %d: Max. Pkt size = 0\n",
+               usb_interface_index, alt);
+               return -1;
+       }
+
+       cx231xx_info
+           (" setting alternate %d with wMaxPacketSize=%u , Interface = %d\n",
+            alt, max_pkt_size, usb_interface_index);
+
+       if (usb_interface_index > 0) {
+               status = usb_set_interface(dev->udev, usb_interface_index, alt);
+               if (status < 0) {
+                       cx231xx_errdev
+                       ("can't change interface %d alt no. to %d (err=%i)\n",
+                       usb_interface_index, alt, status);
+                       return status;
+               }
+       }
+
+       return status;
+}
+EXPORT_SYMBOL_GPL(cx231xx_set_alt_setting);
+
+int cx231xx_gpio_set(struct cx231xx *dev, struct cx231xx_reg_seq *gpio)
+{
+       int rc = 0;
+
+       if (!gpio)
+               return rc;
+
+       /* Send GPIO reset sequences specified at board entry */
+       while (gpio->sleep >= 0) {
+               rc = cx231xx_set_gpio_value(dev, gpio->bit, gpio->val);
+               if (rc < 0)
+                       return rc;
+
+               if (gpio->sleep > 0)
+                       msleep(gpio->sleep);
+
+               gpio++;
+       }
+       return rc;
+}
+
+int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode)
+{
+       if (dev->mode == set_mode)
+               return 0;
+
+       if (set_mode == CX231XX_SUSPEND) {
+               /* Set the chip in power saving mode */
+               dev->mode = set_mode;
+       }
+
+       /* Resource is locked */
+       if (dev->mode != CX231XX_SUSPEND)
+               return -EINVAL;
+
+       dev->mode = set_mode;
+
+       if (dev->mode == CX231XX_DIGITAL_MODE)
+               ;/* Set Digital power mode */
+       else
+               ;/* Set Analog Power mode */
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(cx231xx_set_mode);
+
+/*****************************************************************
+*                URB Streaming functions                         *
+******************************************************************/
+
+/*
+ * IRQ callback, called by URB callback
+ */
+static void cx231xx_irq_callback(struct urb *urb)
+{
+       struct cx231xx_dmaqueue *dma_q = urb->context;
+       struct cx231xx_video_mode *vmode =
+           container_of(dma_q, struct cx231xx_video_mode, vidq);
+       struct cx231xx *dev = container_of(vmode, struct cx231xx, video_mode);
+       int rc, i;
+
+       switch (urb->status) {
+       case 0:         /* success */
+       case -ETIMEDOUT:        /* NAK */
+               break;
+       case -ECONNRESET:       /* kill */
+       case -ENOENT:
+       case -ESHUTDOWN:
+               return;
+       default:                /* error */
+               cx231xx_isocdbg("urb completition error %d.\n", urb->status);
+               break;
+       }
+
+       /* Copy data from URB */
+       spin_lock(&dev->video_mode.slock);
+       rc = dev->video_mode.isoc_ctl.isoc_copy(dev, urb);
+       spin_unlock(&dev->video_mode.slock);
+
+       /* Reset urb buffers */
+       for (i = 0; i < urb->number_of_packets; i++) {
+               urb->iso_frame_desc[i].status = 0;
+               urb->iso_frame_desc[i].actual_length = 0;
+       }
+       urb->status = 0;
+
+       urb->status = usb_submit_urb(urb, GFP_ATOMIC);
+       if (urb->status) {
+               cx231xx_isocdbg("urb resubmit failed (error=%i)\n",
+                               urb->status);
+       }
+}
+
+/*
+ * Stop and Deallocate URBs
+ */
+void cx231xx_uninit_isoc(struct cx231xx *dev)
+{
+       struct urb *urb;
+       int i;
+
+       cx231xx_isocdbg("cx231xx: called cx231xx_uninit_isoc\n");
+
+       dev->video_mode.isoc_ctl.nfields = -1;
+       for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) {
+               urb = dev->video_mode.isoc_ctl.urb[i];
+               if (urb) {
+                       if (!irqs_disabled())
+                               usb_kill_urb(urb);
+                       else
+                               usb_unlink_urb(urb);
+
+                       if (dev->video_mode.isoc_ctl.transfer_buffer[i]) {
+                               usb_buffer_free(dev->udev,
+                                               urb->transfer_buffer_length,
+                                               dev->video_mode.isoc_ctl.
+                                               transfer_buffer[i],
+                                               urb->transfer_dma);
+                       }
+                       usb_free_urb(urb);
+                       dev->video_mode.isoc_ctl.urb[i] = NULL;
+               }
+               dev->video_mode.isoc_ctl.transfer_buffer[i] = NULL;
+       }
+
+       kfree(dev->video_mode.isoc_ctl.urb);
+       kfree(dev->video_mode.isoc_ctl.transfer_buffer);
+
+       dev->video_mode.isoc_ctl.urb = NULL;
+       dev->video_mode.isoc_ctl.transfer_buffer = NULL;
+       dev->video_mode.isoc_ctl.num_bufs = 0;
+
+       cx231xx_capture_start(dev, 0, Raw_Video);
+}
+EXPORT_SYMBOL_GPL(cx231xx_uninit_isoc);
+
+/*
+ * Allocate URBs and start IRQ
+ */
+int cx231xx_init_isoc(struct cx231xx *dev, int max_packets,
+                     int num_bufs, int max_pkt_size,
+                     int (*isoc_copy) (struct cx231xx *dev, struct urb *urb))
+{
+       struct cx231xx_dmaqueue *dma_q = &dev->video_mode.vidq;
+       int i;
+       int sb_size, pipe;
+       struct urb *urb;
+       int j, k;
+       int rc;
+
+       cx231xx_isocdbg("cx231xx: called cx231xx_prepare_isoc\n");
+
+       dev->video_input = dev->video_input > 2 ? 2 : dev->video_input;
+
+       cx231xx_info("Setting Video mux to %d\n", dev->video_input);
+       video_mux(dev, dev->video_input);
+
+       /* De-allocates all pending stuff */
+       cx231xx_uninit_isoc(dev);
+
+       dev->video_mode.isoc_ctl.isoc_copy = isoc_copy;
+       dev->video_mode.isoc_ctl.num_bufs = num_bufs;
+       dma_q->pos = 0;
+       dma_q->is_partial_line = 0;
+       dma_q->last_sav = 0;
+       dma_q->current_field = -1;
+       dma_q->field1_done = 0;
+       dma_q->lines_per_field = dev->height / 2;
+       dma_q->bytes_left_in_line = dev->width << 1;
+       dma_q->lines_completed = 0;
+       for (i = 0; i < 8; i++)
+               dma_q->partial_buf[i] = 0;
+
+       dev->video_mode.isoc_ctl.urb =
+           kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL);
+       if (!dev->video_mode.isoc_ctl.urb) {
+               cx231xx_errdev("cannot alloc memory for usb buffers\n");
+               return -ENOMEM;
+       }
+
+       dev->video_mode.isoc_ctl.transfer_buffer =
+           kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL);
+       if (!dev->video_mode.isoc_ctl.transfer_buffer) {
+               cx231xx_errdev("cannot allocate memory for usbtransfer\n");
+               kfree(dev->video_mode.isoc_ctl.urb);
+               return -ENOMEM;
+       }
+
+       dev->video_mode.isoc_ctl.max_pkt_size = max_pkt_size;
+       dev->video_mode.isoc_ctl.buf = NULL;
+
+       sb_size = max_packets * dev->video_mode.isoc_ctl.max_pkt_size;
+
+       /* allocate urbs and transfer buffers */
+       for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) {
+               urb = usb_alloc_urb(max_packets, GFP_KERNEL);
+               if (!urb) {
+                       cx231xx_err("cannot alloc isoc_ctl.urb %i\n", i);
+                       cx231xx_uninit_isoc(dev);
+                       return -ENOMEM;
+               }
+               dev->video_mode.isoc_ctl.urb[i] = urb;
+
+               dev->video_mode.isoc_ctl.transfer_buffer[i] =
+                   usb_buffer_alloc(dev->udev, sb_size, GFP_KERNEL,
+                                    &urb->transfer_dma);
+               if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) {
+                       cx231xx_err("unable to allocate %i bytes for transfer"
+                                   " buffer %i%s\n",
+                                   sb_size, i,
+                                   in_interrupt() ? " while in int" : "");
+                       cx231xx_uninit_isoc(dev);
+                       return -ENOMEM;
+               }
+               memset(dev->video_mode.isoc_ctl.transfer_buffer[i], 0, sb_size);
+
+               pipe =
+                   usb_rcvisocpipe(dev->udev, dev->video_mode.end_point_addr);
+
+               usb_fill_int_urb(urb, dev->udev, pipe,
+                                dev->video_mode.isoc_ctl.transfer_buffer[i],
+                                sb_size, cx231xx_irq_callback, dma_q, 1);
+
+               urb->number_of_packets = max_packets;
+               urb->transfer_flags = URB_ISO_ASAP;
+
+               k = 0;
+               for (j = 0; j < max_packets; j++) {
+                       urb->iso_frame_desc[j].offset = k;
+                       urb->iso_frame_desc[j].length =
+                           dev->video_mode.isoc_ctl.max_pkt_size;
+                       k += dev->video_mode.isoc_ctl.max_pkt_size;
+               }
+       }
+
+       init_waitqueue_head(&dma_q->wq);
+
+       /* submit urbs and enables IRQ */
+       for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) {
+               rc = usb_submit_urb(dev->video_mode.isoc_ctl.urb[i],
+                                   GFP_ATOMIC);
+               if (rc) {
+                       cx231xx_err("submit of urb %i failed (error=%i)\n", i,
+                                   rc);
+                       cx231xx_uninit_isoc(dev);
+                       return rc;
+               }
+       }
+
+       cx231xx_capture_start(dev, 1, Raw_Video);
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(cx231xx_init_isoc);
+
+/*****************************************************************
+*             Device Init/UnInit functions                       *
+******************************************************************/
+int cx231xx_dev_init(struct cx231xx *dev)
+{
+       int errCode = 0;
+
+       /* Initialize I2C bus */
+
+       /* External Master 1 Bus */
+       dev->i2c_bus[0].nr = 0;
+       dev->i2c_bus[0].dev = dev;
+       dev->i2c_bus[0].i2c_period = I2C_SPEED_1M;      /* 1MHz */
+       dev->i2c_bus[0].i2c_nostop = 0;
+       dev->i2c_bus[0].i2c_reserve = 0;
+
+       /* External Master 2 Bus */
+       dev->i2c_bus[1].nr = 1;
+       dev->i2c_bus[1].dev = dev;
+       dev->i2c_bus[1].i2c_period = I2C_SPEED_1M;      /* 1MHz */
+       dev->i2c_bus[1].i2c_nostop = 0;
+       dev->i2c_bus[1].i2c_reserve = 0;
+
+       /* Internal Master 3 Bus */
+       dev->i2c_bus[2].nr = 2;
+       dev->i2c_bus[2].dev = dev;
+       dev->i2c_bus[2].i2c_period = I2C_SPEED_400K;    /* 400kHz */
+       dev->i2c_bus[2].i2c_nostop = 0;
+       dev->i2c_bus[2].i2c_reserve = 0;
+
+       /* register I2C buses */
+       cx231xx_i2c_register(&dev->i2c_bus[0]);
+       cx231xx_i2c_register(&dev->i2c_bus[1]);
+       cx231xx_i2c_register(&dev->i2c_bus[2]);
+
+       /* init hardware */
+       /* Note : with out calling set power mode function,
+       afe can not be set up correctly */
+       errCode = cx231xx_set_power_mode(dev, POLARIS_AVMODE_ANALOGT_TV);
+       if (errCode < 0) {
+               cx231xx_errdev
+                   ("%s: Failed to set Power - errCode [%d]!\n",
+                    __func__, errCode);
+               return errCode;
+       }
+
+       /* initialize Colibri block */
+       errCode = cx231xx_afe_init_super_block(dev, 0x23c);
+       if (errCode < 0) {
+               cx231xx_errdev
+                   ("%s: cx231xx_afe init super block - errCode [%d]!\n",
+                    __func__, errCode);
+               return errCode;
+       }
+       errCode = cx231xx_afe_init_channels(dev);
+       if (errCode < 0) {
+               cx231xx_errdev
+                   ("%s: cx231xx_afe init channels - errCode [%d]!\n",
+                    __func__, errCode);
+               return errCode;
+       }
+
+       /* Set DIF in By pass mode */
+       errCode = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND);
+       if (errCode < 0) {
+               cx231xx_errdev
+                   ("%s: cx231xx_dif set to By pass mode - errCode [%d]!\n",
+                    __func__, errCode);
+               return errCode;
+       }
+
+       /* I2S block related functions */
+       errCode = cx231xx_i2s_blk_initialize(dev);
+       if (errCode < 0) {
+               cx231xx_errdev
+                   ("%s: cx231xx_i2s block initialize - errCode [%d]!\n",
+                    __func__, errCode);
+               return errCode;
+       }
+
+       /* init control pins */
+       errCode = cx231xx_init_ctrl_pin_status(dev);
+       if (errCode < 0) {
+               cx231xx_errdev("%s: cx231xx_init ctrl pins - errCode [%d]!\n",
+                              __func__, errCode);
+               return errCode;
+       }
+
+       /* set AGC mode to Analog */
+       errCode = cx231xx_set_agc_analog_digital_mux_select(dev, 1);
+       if (errCode < 0) {
+               cx231xx_errdev
+                   ("%s: cx231xx_AGC mode to Analog - errCode [%d]!\n",
+                    __func__, errCode);
+               return errCode;
+       }
+
+       /* set all alternate settings to zero initially */
+       cx231xx_set_alt_setting(dev, INDEX_VIDEO, 0);
+       cx231xx_set_alt_setting(dev, INDEX_VANC, 0);
+       cx231xx_set_alt_setting(dev, INDEX_HANC, 0);
+       if (dev->board.has_dvb)
+               cx231xx_set_alt_setting(dev, INDEX_TS1, 0);
+
+       /* set the I2C master port to 3 on channel 1 */
+       errCode = cx231xx_enable_i2c_for_tuner(dev, I2C_3);
+
+       return errCode;
+}
+EXPORT_SYMBOL_GPL(cx231xx_dev_init);
+
+void cx231xx_dev_uninit(struct cx231xx *dev)
+{
+       /* Un Initialize I2C bus */
+       cx231xx_i2c_unregister(&dev->i2c_bus[2]);
+       cx231xx_i2c_unregister(&dev->i2c_bus[1]);
+       cx231xx_i2c_unregister(&dev->i2c_bus[0]);
+}
+EXPORT_SYMBOL_GPL(cx231xx_dev_uninit);
+
+/*****************************************************************
+*              G P I O related functions                         *
+******************************************************************/
+int cx231xx_send_gpio_cmd(struct cx231xx *dev, u32 gpio_bit, u8 * gpio_val,
+                         u8 len, u8 request, u8 direction)
+{
+       int status = 0;
+       struct VENDOR_REQUEST_IN ven_req;
+
+       /* Set wValue */
+       ven_req.wValue = (u16) (gpio_bit >> 16 & 0xffff);
+
+       /* set request */
+       if (!request) {
+               if (direction)
+                       ven_req.bRequest = VRT_GET_GPIO;        /* 0x8 gpio */
+               else
+                       ven_req.bRequest = VRT_SET_GPIO;        /* 0x9 gpio */
+       } else {
+               if (direction)
+                       ven_req.bRequest = VRT_GET_GPIE;        /* 0xa gpie */
+               else
+                       ven_req.bRequest = VRT_SET_GPIE;        /* 0xb gpie */
+       }
+
+       /* set index value */
+       ven_req.wIndex = (u16) (gpio_bit & 0xffff);
+
+       /* set wLength value */
+       ven_req.wLength = len;
+
+       /* set bData value */
+       ven_req.bData = 0;
+
+       /* set the buffer for read / write */
+       ven_req.pBuff = gpio_val;
+
+       /* set the direction */
+       if (direction) {
+               ven_req.direction = USB_DIR_IN;
+               memset(ven_req.pBuff, 0x00, ven_req.wLength);
+       } else
+               ven_req.direction = USB_DIR_OUT;
+
+
+       /* call common vendor command request */
+       status = cx231xx_send_vendor_cmd(dev, &ven_req);
+       if (status < 0) {
+               cx231xx_info
+                   ("UsbInterface::sendCommand, failed with status -%d\n",
+                    status);
+       }
+
+       return status;
+}
+EXPORT_SYMBOL_GPL(cx231xx_send_gpio_cmd);
+
+/*****************************************************************
+ *    C O N T R O L - Register R E A D / W R I T E functions     *
+ *****************************************************************/
+int cx231xx_mode_register(struct cx231xx *dev, u16 address, u32 mode)
+{
+       u8 value[4] = { 0x0, 0x0, 0x0, 0x0 };
+       u32 tmp = 0;
+       int status = 0;
+
+       status =
+           cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, address, value, 4);
+       if (status < 0)
+               return status;
+
+       tmp = *((u32 *) value);
+       tmp |= mode;
+
+       value[0] = (u8) tmp;
+       value[1] = (u8) (tmp >> 8);
+       value[2] = (u8) (tmp >> 16);
+       value[3] = (u8) (tmp >> 24);
+
+       status =
+           cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, address, value, 4);
+
+       return status;
+}
+
+/*****************************************************************
+ *            I 2 C Internal C O N T R O L   functions           *
+ *****************************************************************/
+int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr,
+                         u8 saddr_len, u32 *data, u8 data_len)
+{
+       int status = 0;
+       struct cx231xx_i2c_xfer_data req_data;
+       u8 value[4] = { 0, 0, 0, 0 };
+
+       if (saddr_len == 0)
+               saddr = 0;
+       else if (saddr_len == 0)
+               saddr &= 0xff;
+
+       /* prepare xfer_data struct */
+       req_data.dev_addr = dev_addr >> 1;
+       req_data.direction = I2C_M_RD;
+       req_data.saddr_len = saddr_len;
+       req_data.saddr_dat = saddr;
+       req_data.buf_size = data_len;
+       req_data.p_buffer = (u8 *) value;
+
+       /* usb send command */
+       status = dev->cx231xx_send_usb_command(&dev->i2c_bus[0], &req_data);
+
+       if (status >= 0) {
+               /* Copy the data read back to main buffer */
+               if (data_len == 1)
+                       *data = value[0];
+               else
+                       *data =
+                           value[0] | value[1] << 8 | value[2] << 16 | value[3]
+                           << 24;
+       }
+
+       return status;
+}
+
+int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr,
+                          u8 saddr_len, u32 data, u8 data_len)
+{
+       int status = 0;
+       u8 value[4] = { 0, 0, 0, 0 };
+       struct cx231xx_i2c_xfer_data req_data;
+
+       value[0] = (u8) data;
+       value[1] = (u8) (data >> 8);
+       value[2] = (u8) (data >> 16);
+       value[3] = (u8) (data >> 24);
+
+       if (saddr_len == 0)
+               saddr = 0;
+       else if (saddr_len == 0)
+               saddr &= 0xff;
+
+       /* prepare xfer_data struct */
+       req_data.dev_addr = dev_addr >> 1;
+       req_data.direction = 0;
+       req_data.saddr_len = saddr_len;
+       req_data.saddr_dat = saddr;
+       req_data.buf_size = data_len;
+       req_data.p_buffer = value;
+
+       /* usb send command */
+       status = dev->cx231xx_send_usb_command(&dev->i2c_bus[0], &req_data);
+
+       return status;
+}
+
+int cx231xx_reg_mask_write(struct cx231xx *dev, u8 dev_addr, u8 size,
+                          u16 register_address, u8 bit_start, u8 bit_end,
+                          u32 value)
+{
+       int status = 0;
+       u32 tmp;
+       u32 mask = 0;
+       int i;
+
+       if (bit_start > (size - 1) || bit_end > (size - 1))
+               return -1;
+
+       if (size == 8) {
+               status =
+                   cx231xx_read_i2c_data(dev, dev_addr, register_address, 2,
+                                         &tmp, 1);
+       } else {
+               status =
+                   cx231xx_read_i2c_data(dev, dev_addr, register_address, 2,
+                                         &tmp, 4);
+       }
+
+       if (status < 0)
+               return status;
+
+       mask = 1 << bit_end;
+       for (i = bit_end; i > bit_start && i > 0; i--)
+               mask = mask + (1 << (i - 1));
+
+       value <<= bit_start;
+
+       if (size == 8) {
+               tmp &= ~mask;
+               tmp |= value;
+               tmp &= 0xff;
+               status =
+                   cx231xx_write_i2c_data(dev, dev_addr, register_address, 2,
+                                          tmp, 1);
+       } else {
+               tmp &= ~mask;
+               tmp |= value;
+               status =
+                   cx231xx_write_i2c_data(dev, dev_addr, register_address, 2,
+                                          tmp, 4);
+       }
+
+       return status;
+}
+
+int cx231xx_read_modify_write_i2c_dword(struct cx231xx *dev, u8 dev_addr,
+                                       u16 saddr, u32 mask, u32 value)
+{
+       u32 temp;
+       int status = 0;
+
+       status = cx231xx_read_i2c_data(dev, dev_addr, saddr, 2, &temp, 4);
+
+       if (status < 0)
+               return status;
+
+       temp &= ~mask;
+       temp |= value;
+
+       status = cx231xx_write_i2c_data(dev, dev_addr, saddr, 2, temp, 4);
+
+       return status;
+}
+
+u32 cx231xx_set_field(u32 field_mask, u32 data)
+{
+       u32 temp;
+
+       for (temp = field_mask; (temp & 1) == 0; temp >>= 1)
+               data <<= 1;
+
+       return data;
+}
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c
new file mode 100644 (file)
index 0000000..c5082a4
--- /dev/null
@@ -0,0 +1,559 @@
+/*
+ DVB device driver for cx231xx
+
+ Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+               Based on em28xx driver
+
+ 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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/usb.h>
+
+#include "cx231xx.h"
+#include <media/v4l2-common.h>
+#include <media/videobuf-vmalloc.h>
+
+#include "xc5000.h"
+#include "dvb_dummy_fe.h"
+
+MODULE_DESCRIPTION("driver for cx231xx based DVB cards");
+MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>");
+MODULE_LICENSE("GPL");
+
+static unsigned int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "enable debug messages [dvb]");
+
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
+#define dprintk(level, fmt, arg...) do {                       \
+if (debug >= level)                                            \
+       printk(KERN_DEBUG "%s/2-dvb: " fmt, dev->name, ## arg); \
+} while (0)
+
+#define CX231XX_DVB_NUM_BUFS 5
+#define CX231XX_DVB_MAX_PACKETSIZE 564
+#define CX231XX_DVB_MAX_PACKETS 64
+
+struct cx231xx_dvb {
+       struct dvb_frontend *frontend;
+
+       /* feed count management */
+       struct mutex lock;
+       int nfeeds;
+
+       /* general boilerplate stuff */
+       struct dvb_adapter adapter;
+       struct dvb_demux demux;
+       struct dmxdev dmxdev;
+       struct dmx_frontend fe_hw;
+       struct dmx_frontend fe_mem;
+       struct dvb_net net;
+};
+
+static inline void print_err_status(struct cx231xx *dev, int packet, int status)
+{
+       char *errmsg = "Unknown";
+
+       switch (status) {
+       case -ENOENT:
+               errmsg = "unlinked synchronuously";
+               break;
+       case -ECONNRESET:
+               errmsg = "unlinked asynchronuously";
+               break;
+       case -ENOSR:
+               errmsg = "Buffer error (overrun)";
+               break;
+       case -EPIPE:
+               errmsg = "Stalled (device not responding)";
+               break;
+       case -EOVERFLOW:
+               errmsg = "Babble (bad cable?)";
+               break;
+       case -EPROTO:
+               errmsg = "Bit-stuff error (bad cable?)";
+               break;
+       case -EILSEQ:
+               errmsg = "CRC/Timeout (could be anything)";
+               break;
+       case -ETIME:
+               errmsg = "Device does not respond";
+               break;
+       }
+       if (packet < 0) {
+               dprintk(1, "URB status %d [%s].\n", status, errmsg);
+       } else {
+               dprintk(1, "URB packet %d, status %d [%s].\n",
+                       packet, status, errmsg);
+       }
+}
+
+static inline int dvb_isoc_copy(struct cx231xx *dev, struct urb *urb)
+{
+       int i;
+
+       if (!dev)
+               return 0;
+
+       if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED))
+               return 0;
+
+       if (urb->status < 0) {
+               print_err_status(dev, -1, urb->status);
+               if (urb->status == -ENOENT)
+                       return 0;
+       }
+
+       for (i = 0; i < urb->number_of_packets; i++) {
+               int status = urb->iso_frame_desc[i].status;
+
+               if (status < 0) {
+                       print_err_status(dev, i, status);
+                       if (urb->iso_frame_desc[i].status != -EPROTO)
+                               continue;
+               }
+
+               dvb_dmx_swfilter(&dev->dvb->demux, urb->transfer_buffer +
+                                urb->iso_frame_desc[i].offset,
+                                urb->iso_frame_desc[i].actual_length);
+       }
+
+       return 0;
+}
+
+static int start_streaming(struct cx231xx_dvb *dvb)
+{
+       int rc;
+       struct cx231xx *dev = dvb->adapter.priv;
+
+       usb_set_interface(dev->udev, 0, 1);
+       rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE);
+       if (rc < 0)
+               return rc;
+
+       return cx231xx_init_isoc(dev, CX231XX_DVB_MAX_PACKETS,
+                                CX231XX_DVB_NUM_BUFS,
+                                CX231XX_DVB_MAX_PACKETSIZE, dvb_isoc_copy);
+}
+
+static int stop_streaming(struct cx231xx_dvb *dvb)
+{
+       struct cx231xx *dev = dvb->adapter.priv;
+
+       cx231xx_uninit_isoc(dev);
+
+       cx231xx_set_mode(dev, CX231XX_SUSPEND);
+
+       return 0;
+}
+
+static int start_feed(struct dvb_demux_feed *feed)
+{
+       struct dvb_demux *demux = feed->demux;
+       struct cx231xx_dvb *dvb = demux->priv;
+       int rc, ret;
+
+       if (!demux->dmx.frontend)
+               return -EINVAL;
+
+       mutex_lock(&dvb->lock);
+       dvb->nfeeds++;
+       rc = dvb->nfeeds;
+
+       if (dvb->nfeeds == 1) {
+               ret = start_streaming(dvb);
+               if (ret < 0)
+                       rc = ret;
+       }
+
+       mutex_unlock(&dvb->lock);
+       return rc;
+}
+
+static int stop_feed(struct dvb_demux_feed *feed)
+{
+       struct dvb_demux *demux = feed->demux;
+       struct cx231xx_dvb *dvb = demux->priv;
+       int err = 0;
+
+       mutex_lock(&dvb->lock);
+       dvb->nfeeds--;
+
+       if (0 == dvb->nfeeds)
+               err = stop_streaming(dvb);
+
+       mutex_unlock(&dvb->lock);
+       return err;
+}
+
+/* ------------------------------------------------------------------ */
+static int cx231xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
+{
+       struct cx231xx *dev = fe->dvb->priv;
+
+       if (acquire)
+               return cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE);
+       else
+               return cx231xx_set_mode(dev, CX231XX_SUSPEND);
+}
+
+/* ------------------------------------------------------------------ */
+
+static struct xc5000_config cnxt_rde250_tunerconfig = {
+       .i2c_address = 0x61,
+       .if_khz = 5380,
+};
+
+/* ------------------------------------------------------------------ */
+#if 0
+static int attach_xc5000(u8 addr, struct cx231xx *dev)
+{
+
+       struct dvb_frontend *fe;
+       struct xc5000_config cfg;
+
+       memset(&cfg, 0, sizeof(cfg));
+       cfg.i2c_adap = &dev->i2c_bus[1].i2c_adap;
+       cfg.i2c_addr = addr;
+
+       if (!dev->dvb->frontend) {
+               printk(KERN_ERR "%s/2: dvb frontend not attached. "
+                      "Can't attach xc5000\n", dev->name);
+               return -EINVAL;
+       }
+
+       fe = dvb_attach(xc5000_attach, dev->dvb->frontend, &cfg);
+       if (!fe) {
+               printk(KERN_ERR "%s/2: xc5000 attach failed\n", dev->name);
+               dvb_frontend_detach(dev->dvb->frontend);
+               dev->dvb->frontend = NULL;
+               return -EINVAL;
+       }
+
+       printk(KERN_INFO "%s/2: xc5000 attached\n", dev->name);
+
+       return 0;
+}
+#endif
+
+int cx231xx_set_analog_freq(struct cx231xx *dev, u32 freq)
+{
+       int status = 0;
+
+       if ((dev->dvb != NULL) && (dev->dvb->frontend != NULL)) {
+
+               struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops;
+
+               if (dops->set_analog_params != NULL) {
+                       struct analog_parameters params;
+
+                       params.frequency = freq;
+                       params.std = dev->norm;
+                       params.mode = 0;        /* 0- Air; 1 - cable */
+                       /*params.audmode = ;       */
+
+                       /* Set the analog parameters to set the frequency */
+                       cx231xx_info("Setting Frequency for XC5000\n");
+                       dops->set_analog_params(dev->dvb->frontend, &params);
+               }
+
+       }
+
+       return status;
+}
+
+int cx231xx_reset_analog_tuner(struct cx231xx *dev)
+{
+       int status = 0;
+
+       if ((dev->dvb != NULL) && (dev->dvb->frontend != NULL)) {
+
+               struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops;
+
+               if (dops->init != NULL && !dev->xc_fw_load_done) {
+
+                       cx231xx_info("Reloading firmware for XC5000\n");
+                       status = dops->init(dev->dvb->frontend);
+                       if (status == 0) {
+                               dev->xc_fw_load_done = 1;
+                               cx231xx_info
+                                   ("XC5000 firmware download completed\n");
+                       } else {
+                               dev->xc_fw_load_done = 0;
+                               cx231xx_info
+                                   ("XC5000 firmware download failed !!!\n");
+                       }
+               }
+
+       }
+
+       return status;
+}
+
+/* ------------------------------------------------------------------ */
+
+static int register_dvb(struct cx231xx_dvb *dvb,
+                       struct module *module,
+                       struct cx231xx *dev, struct device *device)
+{
+       int result;
+
+       mutex_init(&dvb->lock);
+
+       /* register adapter */
+       result = dvb_register_adapter(&dvb->adapter, dev->name, module, device,
+                                     adapter_nr);
+       if (result < 0) {
+               printk(KERN_WARNING
+                      "%s: dvb_register_adapter failed (errno = %d)\n",
+                      dev->name, result);
+               goto fail_adapter;
+       }
+
+       /* Ensure all frontends negotiate bus access */
+       dvb->frontend->ops.ts_bus_ctrl = cx231xx_dvb_bus_ctrl;
+
+       dvb->adapter.priv = dev;
+
+       /* register frontend */
+       result = dvb_register_frontend(&dvb->adapter, dvb->frontend);
+       if (result < 0) {
+               printk(KERN_WARNING
+                      "%s: dvb_register_frontend failed (errno = %d)\n",
+                      dev->name, result);
+               goto fail_frontend;
+       }
+
+       /* register demux stuff */
+       dvb->demux.dmx.capabilities =
+           DMX_TS_FILTERING | DMX_SECTION_FILTERING |
+           DMX_MEMORY_BASED_FILTERING;
+       dvb->demux.priv = dvb;
+       dvb->demux.filternum = 256;
+       dvb->demux.feednum = 256;
+       dvb->demux.start_feed = start_feed;
+       dvb->demux.stop_feed = stop_feed;
+
+       result = dvb_dmx_init(&dvb->demux);
+       if (result < 0) {
+               printk(KERN_WARNING "%s: dvb_dmx_init failed (errno = %d)\n",
+                      dev->name, result);
+               goto fail_dmx;
+       }
+
+       dvb->dmxdev.filternum = 256;
+       dvb->dmxdev.demux = &dvb->demux.dmx;
+       dvb->dmxdev.capabilities = 0;
+       result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter);
+       if (result < 0) {
+               printk(KERN_WARNING "%s: dvb_dmxdev_init failed (errno = %d)\n",
+                      dev->name, result);
+               goto fail_dmxdev;
+       }
+
+       dvb->fe_hw.source = DMX_FRONTEND_0;
+       result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw);
+       if (result < 0) {
+               printk(KERN_WARNING
+                      "%s: add_frontend failed (DMX_FRONTEND_0, errno = %d)\n",
+                      dev->name, result);
+               goto fail_fe_hw;
+       }
+
+       dvb->fe_mem.source = DMX_MEMORY_FE;
+       result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem);
+       if (result < 0) {
+               printk(KERN_WARNING
+                      "%s: add_frontend failed (DMX_MEMORY_FE, errno = %d)\n",
+                      dev->name, result);
+               goto fail_fe_mem;
+       }
+
+       result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw);
+       if (result < 0) {
+               printk(KERN_WARNING
+                      "%s: connect_frontend failed (errno = %d)\n", dev->name,
+                      result);
+               goto fail_fe_conn;
+       }
+
+       /* register network adapter */
+       dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
+       return 0;
+
+fail_fe_conn:
+       dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
+fail_fe_mem:
+       dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);
+fail_fe_hw:
+       dvb_dmxdev_release(&dvb->dmxdev);
+fail_dmxdev:
+       dvb_dmx_release(&dvb->demux);
+fail_dmx:
+       dvb_unregister_frontend(dvb->frontend);
+fail_frontend:
+       dvb_frontend_detach(dvb->frontend);
+       dvb_unregister_adapter(&dvb->adapter);
+fail_adapter:
+       return result;
+}
+
+static void unregister_dvb(struct cx231xx_dvb *dvb)
+{
+       dvb_net_release(&dvb->net);
+       dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
+       dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);
+       dvb_dmxdev_release(&dvb->dmxdev);
+       dvb_dmx_release(&dvb->demux);
+       dvb_unregister_frontend(dvb->frontend);
+       dvb_frontend_detach(dvb->frontend);
+       dvb_unregister_adapter(&dvb->adapter);
+}
+
+static int dvb_init(struct cx231xx *dev)
+{
+       int result = 0;
+       struct cx231xx_dvb *dvb;
+
+       if (!dev->board.has_dvb) {
+               /* This device does not support the extension */
+               return 0;
+       }
+
+       dvb = kzalloc(sizeof(struct cx231xx_dvb), GFP_KERNEL);
+
+       if (dvb == NULL) {
+               printk(KERN_INFO "cx231xx_dvb: memory allocation failed\n");
+               return -ENOMEM;
+       }
+       dev->dvb = dvb;
+       dev->cx231xx_set_analog_freq = cx231xx_set_analog_freq;
+       dev->cx231xx_reset_analog_tuner = cx231xx_reset_analog_tuner;
+
+       cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE);
+       /* init frontend */
+       switch (dev->model) {
+       case CX231XX_BOARD_CNXT_RDE_250:
+
+               /* dev->dvb->frontend = dvb_attach(s5h1411_attach,
+                  &dvico_s5h1411_config,
+                  &dev->i2c_bus[1].i2c_adap); */
+               dev->dvb->frontend = dvb_attach(dvb_dummy_fe_ofdm_attach);
+
+               if (dev->dvb->frontend == NULL) {
+                       printk(DRIVER_NAME
+                              ": Failed to attach dummy front end\n");
+                       result = -EINVAL;
+                       goto out_free;
+               }
+
+               /* define general-purpose callback pointer */
+               dvb->frontend->callback = cx231xx_tuner_callback;
+
+               if (dvb_attach(xc5000_attach, dev->dvb->frontend,
+                              &dev->i2c_bus[1].i2c_adap,
+                              &cnxt_rde250_tunerconfig) < 0) {
+                       result = -EINVAL;
+                       goto out_free;
+               }
+
+               break;
+       case CX231XX_BOARD_CNXT_RDU_250:
+
+               dev->dvb->frontend = dvb_attach(dvb_dummy_fe_ofdm_attach);
+
+               if (dev->dvb->frontend == NULL) {
+                       printk(DRIVER_NAME
+                              ": Failed to attach dummy front end\n");
+                       result = -EINVAL;
+                       goto out_free;
+               }
+
+               /* define general-purpose callback pointer */
+               dvb->frontend->callback = cx231xx_tuner_callback;
+
+               if (dvb_attach(xc5000_attach, dev->dvb->frontend,
+                              &dev->i2c_bus[1].i2c_adap,
+                              &cnxt_rde250_tunerconfig) < 0) {
+                       result = -EINVAL;
+                       goto out_free;
+               }
+               break;
+
+       default:
+               printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
+                      " isn't supported yet\n", dev->name);
+               break;
+       }
+       if (NULL == dvb->frontend) {
+               printk(KERN_ERR
+                      "%s/2: frontend initialization failed\n", dev->name);
+               result = -EINVAL;
+               goto out_free;
+       }
+
+       /* register everything */
+       result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev);
+
+       if (result < 0)
+               goto out_free;
+
+       cx231xx_set_mode(dev, CX231XX_SUSPEND);
+       printk(KERN_INFO "Successfully loaded cx231xx-dvb\n");
+       return 0;
+
+out_free:
+       cx231xx_set_mode(dev, CX231XX_SUSPEND);
+       kfree(dvb);
+       dev->dvb = NULL;
+       return result;
+}
+
+static int dvb_fini(struct cx231xx *dev)
+{
+       if (!dev->board.has_dvb) {
+               /* This device does not support the extension */
+               return 0;
+       }
+
+       if (dev->dvb) {
+               unregister_dvb(dev->dvb);
+               dev->dvb = NULL;
+       }
+
+       return 0;
+}
+
+static struct cx231xx_ops dvb_ops = {
+       .id = CX231XX_DVB,
+       .name = "Cx231xx dvb Extension",
+       .init = dvb_init,
+       .fini = dvb_fini,
+};
+
+static int __init cx231xx_dvb_register(void)
+{
+       return cx231xx_register_extension(&dvb_ops);
+}
+
+static void __exit cx231xx_dvb_unregister(void)
+{
+       cx231xx_unregister_extension(&dvb_ops);
+}
+
+module_init(cx231xx_dvb_register);
+module_exit(cx231xx_dvb_unregister);
diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/video/cx231xx/cx231xx-i2c.c
new file mode 100644 (file)
index 0000000..b4a03d8
--- /dev/null
@@ -0,0 +1,555 @@
+/*
+   cx231xx-i2c.c - driver for Conexant Cx23100/101/102 USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+               Based on em28xx driver
+               Based on Cx23885 driver
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/usb.h>
+#include <linux/i2c.h>
+#include <media/v4l2-common.h>
+#include <media/tuner.h>
+
+#include "cx231xx.h"
+
+/* ----------------------------------------------------------- */
+
+static unsigned int i2c_scan;
+module_param(i2c_scan, int, 0444);
+MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
+
+static unsigned int i2c_debug;
+module_param(i2c_debug, int, 0644);
+MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]");
+
+#define dprintk1(lvl, fmt, args...)                    \
+do {                                                   \
+       if (i2c_debug >= lvl) {                         \
+               printk(fmt, ##args);                    \
+               }                                       \
+} while (0)
+
+#define dprintk2(lvl, fmt, args...)                    \
+do {                                                   \
+       if (i2c_debug >= lvl) {                         \
+               printk(KERN_DEBUG "%s at %s: " fmt,     \
+                      dev->name, __func__ , ##args);   \
+      }                                                \
+} while (0)
+
+/*
+ * cx231xx_i2c_send_bytes()
+ */
+int cx231xx_i2c_send_bytes(struct i2c_adapter *i2c_adap,
+                          const struct i2c_msg *msg)
+{
+       struct cx231xx_i2c *bus = i2c_adap->algo_data;
+       struct cx231xx *dev = bus->dev;
+       struct cx231xx_i2c_xfer_data req_data;
+       int status = 0;
+       u16 size = 0;
+       u8 loop = 0;
+       u8 saddr_len = 1;
+       u8 *buf_ptr = NULL;
+       u16 saddr = 0;
+       u8 need_gpio = 0;
+
+       if ((bus->nr == 1) && (msg->addr == 0x61)
+           && (dev->tuner_type == TUNER_XC5000)) {
+
+               size = msg->len;
+
+               if (size == 2) {        /* register write sub addr */
+                       /* Just writing sub address will cause problem
+                       * to XC5000. So ignore the request */
+                       return 0;
+               } else if (size == 4) { /* register write with sub addr */
+                       if (msg->len >= 2)
+                               saddr = msg->buf[0] << 8 | msg->buf[1];
+                       else if (msg->len == 1)
+                               saddr = msg->buf[0];
+
+                       switch (saddr) {
+                       case 0x0000:    /* start tuner calibration mode */
+                               need_gpio = 1;
+                               /* FW Loading is done */
+                               dev->xc_fw_load_done = 1;
+                               break;
+                       case 0x000D:    /* Set signal source */
+                       case 0x0001:    /* Set TV standard - Video */
+                       case 0x0002:    /* Set TV standard - Audio */
+                       case 0x0003:    /* Set RF Frequency */
+                               need_gpio = 1;
+                               break;
+                       default:
+                               if (dev->xc_fw_load_done)
+                                       need_gpio = 1;
+                               break;
+                       }
+
+                       if (need_gpio) {
+                               dprintk1(1,
+                               "GPIO WRITE: addr 0x%x, len %d, saddr 0x%x\n",
+                               msg->addr, msg->len, saddr);
+
+                               return dev->cx231xx_gpio_i2c_write(dev,
+                                                                  msg->addr,
+                                                                  msg->buf,
+                                                                  msg->len);
+                       }
+               }
+
+               /* special case for Xc5000 tuner case */
+               saddr_len = 1;
+
+               /* adjust the length to correct length */
+               size -= saddr_len;
+               buf_ptr = (u8 *) (msg->buf + 1);
+
+               do {
+                       /* prepare xfer_data struct */
+                       req_data.dev_addr = msg->addr;
+                       req_data.direction = msg->flags;
+                       req_data.saddr_len = saddr_len;
+                       req_data.saddr_dat = msg->buf[0];
+                       req_data.buf_size = size > 16 ? 16 : size;
+                       req_data.p_buffer = (u8 *) (buf_ptr + loop * 16);
+
+                       bus->i2c_nostop = (size > 16) ? 1 : 0;
+                       bus->i2c_reserve = (loop == 0) ? 0 : 1;
+
+                       /* usb send command */
+                       status = dev->cx231xx_send_usb_command(bus, &req_data);
+                       loop++;
+
+                       if (size >= 16)
+                               size -= 16;
+                       else
+                               size = 0;
+
+               } while (size > 0);
+
+               bus->i2c_nostop = 0;
+               bus->i2c_reserve = 0;
+
+       } else {                /* regular case */
+
+               /* prepare xfer_data struct */
+               req_data.dev_addr = msg->addr;
+               req_data.direction = msg->flags;
+               req_data.saddr_len = 0;
+               req_data.saddr_dat = 0;
+               req_data.buf_size = msg->len;
+               req_data.p_buffer = msg->buf;
+
+               /* usb send command */
+               status = dev->cx231xx_send_usb_command(bus, &req_data);
+       }
+
+       return status < 0 ? status : 0;
+}
+
+/*
+ * cx231xx_i2c_recv_bytes()
+ * read a byte from the i2c device
+ */
+static int cx231xx_i2c_recv_bytes(struct i2c_adapter *i2c_adap,
+                                 const struct i2c_msg *msg)
+{
+       struct cx231xx_i2c *bus = i2c_adap->algo_data;
+       struct cx231xx *dev = bus->dev;
+       struct cx231xx_i2c_xfer_data req_data;
+       int status = 0;
+       u16 saddr = 0;
+       u8 need_gpio = 0;
+
+       if ((bus->nr == 1) && (msg->addr == 0x61)
+           && dev->tuner_type == TUNER_XC5000) {
+
+               if (msg->len == 2)
+                       saddr = msg->buf[0] << 8 | msg->buf[1];
+               else if (msg->len == 1)
+                       saddr = msg->buf[0];
+
+               if (dev->xc_fw_load_done) {
+
+                       switch (saddr) {
+                       case 0x0009:    /* BUSY check */
+                               dprintk1(1,
+                               "GPIO R E A D: Special case BUSY check \n");
+                               /*Try read BUSY register, just set it to zero*/
+                               msg->buf[0] = 0;
+                               if (msg->len == 2)
+                                       msg->buf[1] = 0;
+                               return 0;
+                       case 0x0004:    /* read Lock status */
+                               need_gpio = 1;
+                               break;
+
+                       }
+
+                       if (need_gpio) {
+                               /* this is a special case to handle Xceive tuner
+                               clock stretch issue with gpio based I2C */
+
+                               dprintk1(1,
+                               "GPIO R E A D: addr 0x%x, len %d, saddr 0x%x\n",
+                               msg->addr, msg->len,
+                               msg->buf[0] << 8 | msg->buf[1]);
+
+                               status =
+                                   dev->cx231xx_gpio_i2c_write(dev, msg->addr,
+                                                               msg->buf,
+                                                               msg->len);
+                               status =
+                                   dev->cx231xx_gpio_i2c_read(dev, msg->addr,
+                                                              msg->buf,
+                                                              msg->len);
+                               return status;
+                       }
+               }
+
+               /* prepare xfer_data struct */
+               req_data.dev_addr = msg->addr;
+               req_data.direction = msg->flags;
+               req_data.saddr_len = msg->len;
+               req_data.saddr_dat = msg->buf[0] << 8 | msg->buf[1];
+               req_data.buf_size = msg->len;
+               req_data.p_buffer = msg->buf;
+
+               /* usb send command */
+               status = dev->cx231xx_send_usb_command(bus, &req_data);
+
+       } else {
+
+               /* prepare xfer_data struct */
+               req_data.dev_addr = msg->addr;
+               req_data.direction = msg->flags;
+               req_data.saddr_len = 0;
+               req_data.saddr_dat = 0;
+               req_data.buf_size = msg->len;
+               req_data.p_buffer = msg->buf;
+
+               /* usb send command */
+               status = dev->cx231xx_send_usb_command(bus, &req_data);
+       }
+
+       return status < 0 ? status : 0;
+}
+
+/*
+ * cx231xx_i2c_recv_bytes_with_saddr()
+ * read a byte from the i2c device
+ */
+static int cx231xx_i2c_recv_bytes_with_saddr(struct i2c_adapter *i2c_adap,
+                                            const struct i2c_msg *msg1,
+                                            const struct i2c_msg *msg2)
+{
+       struct cx231xx_i2c *bus = i2c_adap->algo_data;
+       struct cx231xx *dev = bus->dev;
+       struct cx231xx_i2c_xfer_data req_data;
+       int status = 0;
+       u16 saddr = 0;
+       u8 need_gpio = 0;
+
+       if (msg1->len == 2)
+               saddr = msg1->buf[0] << 8 | msg1->buf[1];
+       else if (msg1->len == 1)
+               saddr = msg1->buf[0];
+
+       if ((bus->nr == 1) && (msg2->addr == 0x61)
+           && dev->tuner_type == TUNER_XC5000) {
+
+               if ((msg2->len < 16)) {
+
+                       dprintk1(1,
+                       "i2c_read: addr 0x%x, len %d, saddr 0x%x, len %d\n",
+                       msg2->addr, msg2->len, saddr, msg1->len);
+
+                       switch (saddr) {
+                       case 0x0008:    /* read FW load status */
+                               need_gpio = 1;
+                               break;
+                       case 0x0004:    /* read Lock status */
+                               need_gpio = 1;
+                               break;
+                       }
+
+                       if (need_gpio) {
+                               status =
+                                   dev->cx231xx_gpio_i2c_write(dev, msg1->addr,
+                                                               msg1->buf,
+                                                               msg1->len);
+                               status =
+                                   dev->cx231xx_gpio_i2c_read(dev, msg2->addr,
+                                                              msg2->buf,
+                                                              msg2->len);
+                               return status;
+                       }
+               }
+       }
+
+       /* prepare xfer_data struct */
+       req_data.dev_addr = msg2->addr;
+       req_data.direction = msg2->flags;
+       req_data.saddr_len = msg1->len;
+       req_data.saddr_dat = saddr;
+       req_data.buf_size = msg2->len;
+       req_data.p_buffer = msg2->buf;
+
+       /* usb send command */
+       status = dev->cx231xx_send_usb_command(bus, &req_data);
+
+       return status < 0 ? status : 0;
+}
+
+/*
+ * cx231xx_i2c_check_for_device()
+ * check if there is a i2c_device at the supplied address
+ */
+static int cx231xx_i2c_check_for_device(struct i2c_adapter *i2c_adap,
+                                       const struct i2c_msg *msg)
+{
+       struct cx231xx_i2c *bus = i2c_adap->algo_data;
+       struct cx231xx *dev = bus->dev;
+       struct cx231xx_i2c_xfer_data req_data;
+       int status = 0;
+
+       /* prepare xfer_data struct */
+       req_data.dev_addr = msg->addr;
+       req_data.direction = msg->flags;
+       req_data.saddr_len = 0;
+       req_data.saddr_dat = 0;
+       req_data.buf_size = 0;
+       req_data.p_buffer = NULL;
+
+       /* usb send command */
+       status = dev->cx231xx_send_usb_command(bus, &req_data);
+
+       return status < 0 ? status : 0;
+}
+
+/*
+ * cx231xx_i2c_xfer()
+ * the main i2c transfer function
+ */
+static int cx231xx_i2c_xfer(struct i2c_adapter *i2c_adap,
+                           struct i2c_msg msgs[], int num)
+{
+       struct cx231xx_i2c *bus = i2c_adap->algo_data;
+       struct cx231xx *dev = bus->dev;
+       int addr, rc, i, byte;
+
+       if (num <= 0)
+               return 0;
+
+       for (i = 0; i < num; i++) {
+
+               addr = msgs[i].addr >> 1;
+
+               dprintk2(2, "%s %s addr=%x len=%d:",
+                        (msgs[i].flags & I2C_M_RD) ? "read" : "write",
+                        i == num - 1 ? "stop" : "nonstop", addr, msgs[i].len);
+               if (!msgs[i].len) {
+                       /* no len: check only for device presence */
+                       rc = cx231xx_i2c_check_for_device(i2c_adap, &msgs[i]);
+                       if (rc < 0) {
+                               dprintk2(2, " no device\n");
+                               return rc;
+                       }
+
+               } else if (msgs[i].flags & I2C_M_RD) {
+                       /* read bytes */
+                       rc = cx231xx_i2c_recv_bytes(i2c_adap, &msgs[i]);
+                       if (i2c_debug >= 2) {
+                               for (byte = 0; byte < msgs[i].len; byte++)
+                                       printk(" %02x", msgs[i].buf[byte]);
+                       }
+               } else if (i + 1 < num && (msgs[i + 1].flags & I2C_M_RD) &&
+                          msgs[i].addr == msgs[i + 1].addr
+                          && (msgs[i].len <= 2) && (bus->nr < 2)) {
+                       /* read bytes */
+                       rc = cx231xx_i2c_recv_bytes_with_saddr(i2c_adap,
+                                                              &msgs[i],
+                                                              &msgs[i + 1]);
+                       if (i2c_debug >= 2) {
+                               for (byte = 0; byte < msgs[i].len; byte++)
+                                       printk(" %02x", msgs[i].buf[byte]);
+                       }
+                       i++;
+               } else {
+                       /* write bytes */
+                       if (i2c_debug >= 2) {
+                               for (byte = 0; byte < msgs[i].len; byte++)
+                                       printk(" %02x", msgs[i].buf[byte]);
+                       }
+                       rc = cx231xx_i2c_send_bytes(i2c_adap, &msgs[i]);
+               }
+               if (rc < 0)
+                       goto err;
+               if (i2c_debug >= 2)
+                       printk("\n");
+       }
+
+       return num;
+err:
+       dprintk2(2, " ERROR: %i\n", rc);
+       return rc;
+}
+
+/* ----------------------------------------------------------- */
+
+/*
+ * functionality()
+ */
+static u32 functionality(struct i2c_adapter *adap)
+{
+       return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
+}
+
+/*
+ * attach_inform()
+ * gets called when a device attaches to the i2c bus
+ * does some basic configuration
+ */
+static int attach_inform(struct i2c_client *client)
+{
+       struct cx231xx_i2c *bus = i2c_get_adapdata(client->adapter);
+       struct cx231xx *dev = bus->dev;
+
+       switch (client->addr << 1) {
+       case 0x8e:
+               {
+                       struct IR_i2c *ir = i2c_get_clientdata(client);
+                       dprintk1(1, "attach_inform: IR detected (%s).\n",
+                                ir->phys);
+                       cx231xx_set_ir(dev, ir);
+                       break;
+               }
+               break;
+
+       default:
+               break;
+       }
+
+       return 0;
+}
+
+static struct i2c_algorithm cx231xx_algo = {
+       .master_xfer = cx231xx_i2c_xfer,
+       .functionality = functionality,
+};
+
+static struct i2c_adapter cx231xx_adap_template = {
+       .owner = THIS_MODULE,
+       .name = "cx231xx",
+       .id = I2C_HW_B_CX231XX,
+       .algo = &cx231xx_algo,
+       .client_register = attach_inform,
+};
+
+static struct i2c_client cx231xx_client_template = {
+       .name = "cx231xx internal",
+};
+
+/* ----------------------------------------------------------- */
+
+/*
+ * i2c_devs
+ * incomplete list of known devices
+ */
+static char *i2c_devs[128] = {
+       [0x60 >> 1] = "colibri",
+       [0x88 >> 1] = "hammerhead",
+       [0x8e >> 1] = "CIR",
+       [0x32 >> 1] = "GeminiIII",
+       [0x02 >> 1] = "Aquarius",
+       [0xa0 >> 1] = "eeprom",
+       [0xc0 >> 1] = "tuner/XC3028",
+       [0xc2 >> 1] = "tuner/XC5000",
+};
+
+/*
+ * cx231xx_do_i2c_scan()
+ * check i2c address range for devices
+ */
+void cx231xx_do_i2c_scan(struct cx231xx *dev, struct i2c_client *c)
+{
+       unsigned char buf;
+       int i, rc;
+
+       cx231xx_info(": Checking for I2C devices ..\n");
+       for (i = 0; i < 128; i++) {
+               c->addr = i;
+               rc = i2c_master_recv(c, &buf, 0);
+               if (rc < 0)
+                       continue;
+               cx231xx_info("%s: i2c scan: found device @ 0x%x  [%s]\n",
+                            dev->name, i << 1,
+                            i2c_devs[i] ? i2c_devs[i] : "???");
+       }
+       cx231xx_info(": Completed Checking for I2C devices.\n");
+}
+
+/*
+ * cx231xx_i2c_register()
+ * register i2c bus
+ */
+int cx231xx_i2c_register(struct cx231xx_i2c *bus)
+{
+       struct cx231xx *dev = bus->dev;
+
+       BUG_ON(!dev->cx231xx_send_usb_command);
+
+       memcpy(&bus->i2c_adap, &cx231xx_adap_template, sizeof(bus->i2c_adap));
+       memcpy(&bus->i2c_algo, &cx231xx_algo, sizeof(bus->i2c_algo));
+       memcpy(&bus->i2c_client, &cx231xx_client_template,
+              sizeof(bus->i2c_client));
+
+       bus->i2c_adap.dev.parent = &dev->udev->dev;
+
+       strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
+
+       bus->i2c_algo.data = bus;
+       bus->i2c_adap.algo_data = bus;
+       i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
+       i2c_add_adapter(&bus->i2c_adap);
+
+       bus->i2c_client.adapter = &bus->i2c_adap;
+
+       if (0 == bus->i2c_rc) {
+               if (i2c_scan)
+                       cx231xx_do_i2c_scan(dev, &bus->i2c_client);
+       } else
+               cx231xx_warn("%s: i2c bus %d register FAILED\n",
+                            dev->name, bus->nr);
+
+       return bus->i2c_rc;
+}
+
+/*
+ * cx231xx_i2c_unregister()
+ * unregister i2c_bus
+ */
+int cx231xx_i2c_unregister(struct cx231xx_i2c *bus)
+{
+       i2c_del_adapter(&bus->i2c_adap);
+       return 0;
+}
diff --git a/drivers/media/video/cx231xx/cx231xx-input.c b/drivers/media/video/cx231xx/cx231xx-input.c
new file mode 100644 (file)
index 0000000..97e304c
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+  handle cx231xx IR remotes via linux kernel input layer.
+
+  Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+               Based on em28xx driver
+
+               < This is a place holder for IR now.>
+
+  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.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/input.h>
+#include <linux/usb.h>
+
+#include "cx231xx.h"
+
+static unsigned int ir_debug;
+module_param(ir_debug, int, 0644);
+MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
+
+#define i2cdprintk(fmt, arg...) \
+       if (ir_debug) { \
+               printk(KERN_DEBUG "%s/ir: " fmt, ir->c.name , ## arg); \
+       }
+
+#define dprintk(fmt, arg...) \
+       if (ir_debug) { \
+               printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
+       }
+
+/**********************************************************
+ Polling structure used by cx231xx IR's
+ **********************************************************/
+
+struct cx231xx_ir_poll_result {
+       unsigned int toggle_bit:1;
+       unsigned int read_count:7;
+       u8 rc_address;
+       u8 rc_data[4];
+};
+
+struct cx231xx_IR {
+       struct cx231xx *dev;
+       struct input_dev *input;
+       struct ir_input_state ir;
+       char name[32];
+       char phys[32];
+
+       /* poll external decoder */
+       int polling;
+       struct work_struct work;
+       struct timer_list timer;
+       unsigned int last_toggle:1;
+       unsigned int last_readcount;
+       unsigned int repeat_interval;
+
+       int (*get_key) (struct cx231xx_IR *, struct cx231xx_ir_poll_result *);
+};
+
+/**********************************************************
+ Polling code for cx231xx
+ **********************************************************/
+
+static void cx231xx_ir_handle_key(struct cx231xx_IR *ir)
+{
+       int result;
+       int do_sendkey = 0;
+       struct cx231xx_ir_poll_result poll_result;
+
+       /* read the registers containing the IR status */
+       result = ir->get_key(ir, &poll_result);
+       if (result < 0) {
+               dprintk("ir->get_key() failed %d\n", result);
+               return;
+       }
+
+       dprintk("ir->get_key result tb=%02x rc=%02x lr=%02x data=%02x\n",
+               poll_result.toggle_bit, poll_result.read_count,
+               ir->last_readcount, poll_result.rc_data[0]);
+
+       if (ir->dev->chip_id == CHIP_ID_EM2874) {
+               /* The em2874 clears the readcount field every time the
+                  register is read.  The em2860/2880 datasheet says that it
+                  is supposed to clear the readcount, but it doesn't.  So with
+                  the em2874, we are looking for a non-zero read count as
+                  opposed to a readcount that is incrementing */
+               ir->last_readcount = 0;
+       }
+
+       if (poll_result.read_count == 0) {
+               /* The button has not been pressed since the last read */
+       } else if (ir->last_toggle != poll_result.toggle_bit) {
+               /* A button has been pressed */
+               dprintk("button has been pressed\n");
+               ir->last_toggle = poll_result.toggle_bit;
+               ir->repeat_interval = 0;
+               do_sendkey = 1;
+       } else if (poll_result.toggle_bit == ir->last_toggle &&
+                  poll_result.read_count > 0 &&
+                  poll_result.read_count != ir->last_readcount) {
+               /* The button is still being held down */
+               dprintk("button being held down\n");
+
+               /* Debouncer for first keypress */
+               if (ir->repeat_interval++ > 9) {
+                       /* Start repeating after 1 second */
+                       do_sendkey = 1;
+               }
+       }
+
+       if (do_sendkey) {
+               dprintk("sending keypress\n");
+               ir_input_keydown(ir->input, &ir->ir, poll_result.rc_data[0],
+                                poll_result.rc_data[0]);
+               ir_input_nokey(ir->input, &ir->ir);
+       }
+
+       ir->last_readcount = poll_result.read_count;
+       return;
+}
+
+static void ir_timer(unsigned long data)
+{
+       struct cx231xx_IR *ir = (struct cx231xx_IR *)data;
+
+       schedule_work(&ir->work);
+}
+
+static void cx231xx_ir_work(struct work_struct *work)
+{
+       struct cx231xx_IR *ir = container_of(work, struct cx231xx_IR, work);
+
+       cx231xx_ir_handle_key(ir);
+       mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
+}
+
+void cx231xx_ir_start(struct cx231xx_IR *ir)
+{
+       setup_timer(&ir->timer, ir_timer, (unsigned long)ir);
+       INIT_WORK(&ir->work, cx231xx_ir_work);
+       schedule_work(&ir->work);
+}
+
+static void cx231xx_ir_stop(struct cx231xx_IR *ir)
+{
+       del_timer_sync(&ir->timer);
+       flush_scheduled_work();
+}
+
+int cx231xx_ir_init(struct cx231xx *dev)
+{
+       struct cx231xx_IR *ir;
+       struct input_dev *input_dev;
+       u8 ir_config;
+       int err = -ENOMEM;
+
+       if (dev->board.ir_codes == NULL) {
+               /* No remote control support */
+               return 0;
+       }
+
+       ir = kzalloc(sizeof(*ir), GFP_KERNEL);
+       input_dev = input_allocate_device();
+       if (!ir || !input_dev)
+               goto err_out_free;
+
+       ir->input = input_dev;
+
+       /* Setup the proper handler based on the chip */
+       switch (dev->chip_id) {
+       default:
+               printk("Unrecognized cx231xx chip id: IR not supported\n");
+               goto err_out_free;
+       }
+
+       /* This is how often we ask the chip for IR information */
+       ir->polling = 100;      /* ms */
+
+       /* init input device */
+       snprintf(ir->name, sizeof(ir->name), "cx231xx IR (%s)", dev->name);
+
+       usb_make_path(dev->udev, ir->phys, sizeof(ir->phys));
+       strlcat(ir->phys, "/input0", sizeof(ir->phys));
+
+       ir_input_init(input_dev, &ir->ir, IR_TYPE_OTHER, dev->board.ir_codes);
+       input_dev->name = ir->name;
+       input_dev->phys = ir->phys;
+       input_dev->id.bustype = BUS_USB;
+       input_dev->id.version = 1;
+       input_dev->id.vendor = le16_to_cpu(dev->udev->descriptor.idVendor);
+       input_dev->id.product = le16_to_cpu(dev->udev->descriptor.idProduct);
+
+       input_dev->dev.parent = &dev->udev->dev;
+       /* record handles to ourself */
+       ir->dev = dev;
+       dev->ir = ir;
+
+       cx231xx_ir_start(ir);
+
+       /* all done */
+       err = input_register_device(ir->input);
+       if (err)
+               goto err_out_stop;
+
+       return 0;
+err_out_stop:
+       cx231xx_ir_stop(ir);
+       dev->ir = NULL;
+err_out_free:
+       input_free_device(input_dev);
+       kfree(ir);
+       return err;
+}
+
+int cx231xx_ir_fini(struct cx231xx *dev)
+{
+       struct cx231xx_IR *ir = dev->ir;
+
+       /* skip detach on non attached boards */
+       if (!ir)
+               return 0;
+
+       cx231xx_ir_stop(ir);
+       input_unregister_device(ir->input);
+       kfree(ir);
+
+       /* done */
+       dev->ir = NULL;
+       return 0;
+}
diff --git a/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c b/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c
new file mode 100644 (file)
index 0000000..7473c33
--- /dev/null
@@ -0,0 +1,795 @@
+/*
+   cx231xx-pcb-config.c - driver for Conexant
+               Cx23100/101/102 USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "cx231xx.h"
+#include "cx231xx-conf-reg.h"
+
+static unsigned int pcb_debug;
+module_param(pcb_debug, int, 0644);
+MODULE_PARM_DESC(pcb_debug, "enable pcb config debug messages [video]");
+
+/******************************************************************************/
+
+struct pcb_config cx231xx_Scenario[] = {
+       {
+        INDEX_SELFPOWER_DIGITAL_ONLY,  /* index */
+        USB_SELF_POWER,        /* power_type */
+        0,                     /* speed , not decide yet */
+        MOD_DIGITAL,           /* mode */
+        SOURCE_TS_BDA,         /* ts1_source, digital tv only */
+        NOT_SUPPORTED,         /* ts2_source  */
+        NOT_SUPPORTED,         /* analog source */
+
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index   */
+        0,                     /* external_index */
+
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           NOT_SUPPORTED,      /* AUDIO */
+           NOT_SUPPORTED,      /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          ,
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        /* full-speed config */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           NOT_SUPPORTED,      /* AUDIO */
+           NOT_SUPPORTED,      /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+
+       {
+        INDEX_SELFPOWER_DUAL_DIGITAL,  /* index */
+        USB_SELF_POWER,        /* power_type */
+        0,                     /* speed , not decide yet */
+        MOD_DIGITAL,           /* mode */
+        SOURCE_TS_BDA,         /* ts1_source, digital tv only */
+        0,                     /* ts2_source,need update from register */
+        NOT_SUPPORTED,         /* analog source */
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           2,                  /* TS2 index */
+           NOT_SUPPORTED,      /* AUDIO */
+           NOT_SUPPORTED,      /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        /* full-speed */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           2,                  /* TS2 index */
+           NOT_SUPPORTED,      /* AUDIO */
+           NOT_SUPPORTED,      /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+
+       {
+        INDEX_SELFPOWER_ANALOG_ONLY,   /* index */
+        USB_SELF_POWER,        /* power_type */
+        0,                     /* speed , not decide yet */
+        MOD_ANALOG | MOD_DIF | MOD_EXTERNAL,   /* mode ,analog tv only */
+        NOT_SUPPORTED,         /* ts1_source, NOT SUPPORT */
+        NOT_SUPPORTED,         /* ts2_source,NOT SUPPORT */
+        0,                     /* analog source, need update */
+
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           NOT_SUPPORTED,      /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           1,                  /* AUDIO */
+           2,                  /* VIDEO */
+           3,                  /* VANC */
+           4,                  /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        /* full-speed */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           NOT_SUPPORTED,      /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           1,                  /* AUDIO */
+           2,                  /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+
+       {
+        INDEX_SELFPOWER_DUAL,  /* index */
+        USB_SELF_POWER,        /* power_type */
+        0,                     /* speed , not decide yet */
+        /* mode ,analog tv and digital path */
+        MOD_ANALOG | MOD_DIF | MOD_DIGITAL | MOD_EXTERNAL,
+        0,                     /* ts1_source,will update in register */
+        NOT_SUPPORTED,         /* ts2_source,NOT SUPPORT */
+        0,                     /* analog source need update */
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           2,                  /* AUDIO */
+           3,                  /* VIDEO */
+           4,                  /* VANC */
+           5,                  /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        /* full-speed */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           2,                  /* AUDIO */
+           3,                  /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+
+       {
+        INDEX_SELFPOWER_TRIPLE,        /* index */
+        USB_SELF_POWER,        /* power_type */
+        0,                     /* speed , not decide yet */
+        /* mode ,analog tv and digital path */
+        MOD_ANALOG | MOD_DIF | MOD_DIGITAL | MOD_EXTERNAL,
+        0,                     /* ts1_source, update in register */
+        0,                     /* ts2_source,update in register */
+        0,                     /* analog source, need update */
+
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           2,                  /* TS2 index */
+           3,                  /* AUDIO */
+           4,                  /* VIDEO */
+           5,                  /* VANC */
+           6,                  /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        /* full-speed */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           2,                  /* TS2 index */
+           3,                  /* AUDIO */
+           4,                  /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+
+       {
+        INDEX_SELFPOWER_COMPRESSOR,    /* index */
+        USB_SELF_POWER,        /* power_type */
+        0,                     /* speed , not decide yet */
+        /* mode ,analog tv AND DIGITAL path */
+        MOD_ANALOG | MOD_DIF | MOD_DIGITAL | MOD_EXTERNAL,
+        NOT_SUPPORTED,         /* ts1_source, disable */
+        SOURCE_TS_BDA,         /* ts2_source */
+        0,                     /* analog source,need update */
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           NOT_SUPPORTED,      /* ts1 index */
+           1,                  /* TS2 index */
+           2,                  /* AUDIO */
+           3,                  /* VIDEO */
+           4,                  /* VANC */
+           5,                  /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        /* full-speed  */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           NOT_SUPPORTED,      /* ts1 index */
+           1,                  /* TS2 index */
+           2,                  /* AUDIO */
+           3,                  /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+
+       {
+        INDEX_BUSPOWER_DIGITAL_ONLY,   /* index */
+        USB_BUS_POWER,         /* power_type */
+        0,                     /* speed , not decide yet */
+        MOD_DIGITAL,           /* mode ,analog tv AND DIGITAL path */
+        SOURCE_TS_BDA,         /* ts1_source, disable */
+        NOT_SUPPORTED,         /* ts2_source */
+        NOT_SUPPORTED,         /* analog source */
+
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index  = 2 */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           NOT_SUPPORTED,      /* AUDIO */
+           NOT_SUPPORTED,      /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        /* full-speed */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index  = 2 */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           NOT_SUPPORTED,      /* AUDIO */
+           NOT_SUPPORTED,      /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+       {
+        INDEX_BUSPOWER_ANALOG_ONLY,    /* index */
+        USB_BUS_POWER,         /* power_type */
+        0,                     /* speed , not decide yet */
+        MOD_ANALOG,            /* mode ,analog tv AND DIGITAL path */
+        NOT_SUPPORTED,         /* ts1_source, disable */
+        NOT_SUPPORTED,         /* ts2_source */
+        SOURCE_ANALOG,         /* analog source--analog */
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           NOT_SUPPORTED,      /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           1,                  /* AUDIO */
+           2,                  /* VIDEO */
+           3,                  /* VANC */
+           4,                  /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        {                      /* full-speed */
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           NOT_SUPPORTED,      /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           1,                  /* AUDIO */
+           2,                  /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+       {
+        INDEX_BUSPOWER_DIF_ONLY,       /* index */
+        USB_BUS_POWER,         /* power_type */
+        0,                     /* speed , not decide yet */
+        /* mode ,analog tv AND DIGITAL path */
+        MOD_DIF | MOD_ANALOG | MOD_DIGITAL | MOD_EXTERNAL,
+        SOURCE_TS_BDA,         /* ts1_source, disable */
+        NOT_SUPPORTED,         /* ts2_source */
+        SOURCE_DIF | SOURCE_ANALOG | SOURCE_EXTERNAL,  /* analog source, dif */
+        0,                     /* digital_index  */
+        0,                     /* analog index */
+        0,                     /* dif_index */
+        0,                     /* external_index */
+        1,                     /* only one configuration */
+        {
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           2,                  /* AUDIO */
+           3,                  /* VIDEO */
+           4,                  /* VANC */
+           5,                  /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        ,
+        {                      /* full speed */
+         {
+          0,                   /* config index */
+          {
+           0,                  /* interrupt ep index */
+           1,                  /* ts1 index */
+           NOT_SUPPORTED,      /* TS2 index */
+           2,                  /* AUDIO */
+           3,                  /* VIDEO */
+           NOT_SUPPORTED,      /* VANC */
+           NOT_SUPPORTED,      /* HANC */
+           NOT_SUPPORTED       /* ir_index */
+           }
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         ,
+         {NOT_SUPPORTED, {NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED, NOT_SUPPORTED, NOT_SUPPORTED,
+                          NOT_SUPPORTED}
+          }
+         }
+        }
+       ,
+
+};
+
+/*****************************************************************/
+
+u32 initialize_cx231xx(struct cx231xx *dev)
+{
+       u32 config_info = 0;
+       struct pcb_config *p_pcb_info;
+       u8 usb_speed = 1;       /* from register,1--HS, 0--FS  */
+       u8 data[4] = { 0, 0, 0, 0 };
+       u32 ts1_source = 0;
+       u32 ts2_source = 0;
+       u32 analog_source = 0;
+       u8 _current_scenario_idx = 0xff;
+
+       ts1_source = SOURCE_TS_BDA;
+       ts2_source = SOURCE_TS_BDA;
+
+       /* read board config register to find out which
+       pcb config it is related to */
+       cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, data, 4);
+
+       config_info = *((u32 *) data);
+       usb_speed = (u8) (config_info & 0x1);
+
+       /* Verify this device belongs to Bus power or Self power device */
+       if (config_info & BUS_POWER) {  /* bus-power */
+               switch (config_info & BUSPOWER_MASK) {
+               case TS1_PORT | BUS_POWER:
+                       cx231xx_Scenario[INDEX_BUSPOWER_DIGITAL_ONLY].speed =
+                           usb_speed;
+                       p_pcb_info =
+                           &cx231xx_Scenario[INDEX_BUSPOWER_DIGITAL_ONLY];
+                       _current_scenario_idx = INDEX_BUSPOWER_DIGITAL_ONLY;
+                       break;
+               case AVDEC_ENABLE | BUS_POWER:
+                       cx231xx_Scenario[INDEX_BUSPOWER_ANALOG_ONLY].speed =
+                           usb_speed;
+                       p_pcb_info =
+                           &cx231xx_Scenario[INDEX_BUSPOWER_ANALOG_ONLY];
+                       _current_scenario_idx = INDEX_BUSPOWER_ANALOG_ONLY;
+                       break;
+               case AVDEC_ENABLE | BUS_POWER | TS1_PORT:
+                       cx231xx_Scenario[INDEX_BUSPOWER_DIF_ONLY].speed =
+                           usb_speed;
+                       p_pcb_info = &cx231xx_Scenario[INDEX_BUSPOWER_DIF_ONLY];
+                       _current_scenario_idx = INDEX_BUSPOWER_DIF_ONLY;
+                       break;
+               default:
+                       cx231xx_info("bad config in buspower!!!!\n");
+                       cx231xx_info("config_info=%x\n",
+                                    (config_info & BUSPOWER_MASK));
+                       return 1;
+               }
+       } else {                /* self-power */
+
+               switch (config_info & SELFPOWER_MASK) {
+               case TS1_PORT | SELF_POWER:
+                       cx231xx_Scenario[INDEX_SELFPOWER_DIGITAL_ONLY].speed =
+                           usb_speed;
+                       p_pcb_info =
+                           &cx231xx_Scenario[INDEX_SELFPOWER_DIGITAL_ONLY];
+                       _current_scenario_idx = INDEX_SELFPOWER_DIGITAL_ONLY;
+                       break;
+               case TS1_TS2_PORT | SELF_POWER:
+                       cx231xx_Scenario[INDEX_SELFPOWER_DUAL_DIGITAL].speed =
+                           usb_speed;
+                       cx231xx_Scenario[INDEX_SELFPOWER_DUAL_DIGITAL].
+                           ts2_source = ts2_source;
+                       p_pcb_info =
+                           &cx231xx_Scenario[INDEX_SELFPOWER_DUAL_DIGITAL];
+                       _current_scenario_idx = INDEX_SELFPOWER_DUAL_DIGITAL;
+                       break;
+               case AVDEC_ENABLE | SELF_POWER:
+                       cx231xx_Scenario[INDEX_SELFPOWER_ANALOG_ONLY].speed =
+                           usb_speed;
+                       cx231xx_Scenario[INDEX_SELFPOWER_ANALOG_ONLY].
+                           analog_source = analog_source;
+                       p_pcb_info =
+                           &cx231xx_Scenario[INDEX_SELFPOWER_ANALOG_ONLY];
+                       _current_scenario_idx = INDEX_SELFPOWER_ANALOG_ONLY;
+                       break;
+               case AVDEC_ENABLE | TS1_PORT | SELF_POWER:
+                       cx231xx_Scenario[INDEX_SELFPOWER_DUAL].speed =
+                           usb_speed;
+                       cx231xx_Scenario[INDEX_SELFPOWER_DUAL].ts1_source =
+                           ts1_source;
+                       cx231xx_Scenario[INDEX_SELFPOWER_DUAL].analog_source =
+                           analog_source;
+                       p_pcb_info = &cx231xx_Scenario[INDEX_SELFPOWER_DUAL];
+                       _current_scenario_idx = INDEX_SELFPOWER_DUAL;
+                       break;
+               case AVDEC_ENABLE | TS1_TS2_PORT | SELF_POWER:
+                       cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].speed =
+                           usb_speed;
+                       cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].ts1_source =
+                           ts1_source;
+                       cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].ts2_source =
+                           ts2_source;
+                       cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE].analog_source =
+                           analog_source;
+                       p_pcb_info = &cx231xx_Scenario[INDEX_SELFPOWER_TRIPLE];
+                       _current_scenario_idx = INDEX_SELFPOWER_TRIPLE;
+                       break;
+               case AVDEC_ENABLE | TS1VIP_TS2_PORT | SELF_POWER:
+                       cx231xx_Scenario[INDEX_SELFPOWER_COMPRESSOR].speed =
+                           usb_speed;
+                       cx231xx_Scenario[INDEX_SELFPOWER_COMPRESSOR].
+                           analog_source = analog_source;
+                       p_pcb_info =
+                           &cx231xx_Scenario[INDEX_SELFPOWER_COMPRESSOR];
+                       _current_scenario_idx = INDEX_SELFPOWER_COMPRESSOR;
+                       break;
+               default:
+                       cx231xx_info("bad senario!!!!!\n");
+                       cx231xx_info("config_info=%x\n",
+                                    (config_info & SELFPOWER_MASK));
+                       return 1;
+               }
+       }
+
+       dev->current_scenario_idx = _current_scenario_idx;
+
+       memcpy(&dev->current_pcb_config, p_pcb_info,
+                  sizeof(struct pcb_config));
+
+       if (pcb_debug) {
+               cx231xx_info("SC(0x00) register = 0x%x\n", config_info);
+               cx231xx_info("scenario %d\n",
+                           (dev->current_pcb_config.index) + 1);
+               cx231xx_info("type=%x\n", dev->current_pcb_config.type);
+               cx231xx_info("mode=%x\n", dev->current_pcb_config.mode);
+               cx231xx_info("speed=%x\n", dev->current_pcb_config.speed);
+               cx231xx_info("ts1_source=%x\n",
+                            dev->current_pcb_config.ts1_source);
+               cx231xx_info("ts2_source=%x\n",
+                            dev->current_pcb_config.ts2_source);
+               cx231xx_info("analog_source=%x\n",
+                            dev->current_pcb_config.analog_source);
+       }
+
+       return 0;
+}
diff --git a/drivers/media/video/cx231xx/cx231xx-pcb-cfg.h b/drivers/media/video/cx231xx/cx231xx-pcb-cfg.h
new file mode 100644 (file)
index 0000000..f5e46e8
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+   cx231xx-pcb-cfg.h - driver for Conexant
+               Cx23100/101/102 USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _PCB_CONFIG_H_
+#define _PCB_CONFIG_H_
+
+#include <linux/init.h>
+#include <linux/module.h>
+
+/***************************************************************************
+                               * Class Information *
+***************************************************************************/
+#define CLASS_DEFAULT       0xFF
+
+enum VENDOR_REQUEST_TYPE {
+       /* Set/Get I2C */
+       VRT_SET_I2C0 = 0x0,
+       VRT_SET_I2C1 = 0x1,
+       VRT_SET_I2C2 = 0x2,
+       VRT_GET_I2C0 = 0x4,
+       VRT_GET_I2C1 = 0x5,
+       VRT_GET_I2C2 = 0x6,
+
+       /* Set/Get GPIO */
+       VRT_SET_GPIO = 0x8,
+       VRT_GET_GPIO = 0x9,
+
+       /* Set/Get GPIE */
+       VRT_SET_GPIE = 0xA,
+       VRT_GET_GPIE = 0xB,
+
+       /* Set/Get Register Control/Status */
+       VRT_SET_REGISTER = 0xC,
+       VRT_GET_REGISTER = 0xD,
+
+       /* Get Extended Compat ID Descriptor */
+       VRT_GET_EXTCID_DESC = 0xFF,
+};
+
+enum BYTE_ENABLE_MASK {
+       ENABLE_ONE_BYTE = 0x1,
+       ENABLE_TWE_BYTE = 0x3,
+       ENABLE_THREE_BYTE = 0x7,
+       ENABLE_FOUR_BYTE = 0xF,
+};
+
+#define SPEED_MASK      0x1
+enum USB_SPEED{
+       FULL_SPEED = 0x0,       /* 0: full speed */
+       HIGH_SPEED = 0x1        /* 1: high speed */
+};
+
+enum _true_false{
+       FALSE = 0,
+       TRUE = 1
+};
+
+#define TS_MASK         0x6
+enum TS_PORT{
+       NO_TS_PORT = 0x0,       /* 2'b00: Neither port used. PCB not a Hybrid,
+                                  only offers Analog TV or Video */
+       TS1_PORT = 0x4,         /* 2'b10: TS1 Input (Hybrid mode :
+                               Digital or External Analog/Compressed source) */
+       TS1_TS2_PORT = 0x6,     /* 2'b11: TS1 & TS2 Inputs
+                               (Dual inputs from Digital and/or
+                               External Analog/Compressed sources) */
+       TS1_EXT_CLOCK = 0x6,    /* 2'b11: TS1 & TS2 as selector
+                                               to external clock */
+       TS1VIP_TS2_PORT = 0x2   /* 2'b01: TS1 used as 656/VIP Output,
+                                  TS2 Input (from Compressor) */
+};
+
+#define EAVP_MASK       0x8
+enum EAV_PRESENT{
+       NO_EXTERNAL_AV = 0x0,   /* 0: No External A/V inputs
+                                               (no need for i2s blcok),
+                                               Analog Tuner must be present */
+       EXTERNAL_AV = 0x8       /* 1: External A/V inputs
+                                               present (requires i2s blk) */
+};
+
+#define ATM_MASK        0x30
+enum AT_MODE{
+       DIF_TUNER = 0x30,       /* 2'b11: IF Tuner (requires use of DIF) */
+       BASEBAND_SOUND = 0x20,  /* 2'b10: Baseband Composite &
+                                               Sound-IF Signals present */
+       NO_TUNER = 0x10         /* 2'b0x: No Analog Tuner present */
+};
+
+#define PWR_SEL_MASK    0x40
+enum POWE_TYPE{
+       SELF_POWER = 0x0,       /* 0: self power */
+       BUS_POWER = 0x40        /* 1: bus power */
+};
+
+enum USB_POWE_TYPE{
+       USB_SELF_POWER = 0,
+       USB_BUS_POWER
+};
+
+#define BO_0_MASK       0x80
+enum AVDEC_STATUS{
+       AVDEC_DISABLE = 0x0,    /* 0: A/V Decoder Disabled */
+       AVDEC_ENABLE = 0x80     /* 1: A/V Decoder Enabled */
+};
+
+#define BO_1_MASK       0x100
+
+#define BUSPOWER_MASK   0xC4   /* for Polaris spec 0.8 */
+#define SELFPOWER_MASK  0x86
+
+/***************************************************************************/
+#define NOT_DECIDE_YET  0xFE
+#define NOT_SUPPORTED   0xFF
+
+/***************************************************************************
+                               * for mod field use *
+***************************************************************************/
+#define MOD_DIGITAL     0x1
+#define MOD_ANALOG      0x2
+#define MOD_DIF         0x4
+#define MOD_EXTERNAL    0x8
+#define CAP_ALL_MOD     0x0f
+
+/***************************************************************************
+                               * source define *
+***************************************************************************/
+#define SOURCE_DIGITAL          0x1
+#define SOURCE_ANALOG           0x2
+#define SOURCE_DIF              0x4
+#define SOURCE_EXTERNAL         0x8
+#define SOURCE_TS_BDA                  0x10
+#define SOURCE_TS_ENCODE               0x20
+#define SOURCE_TS_EXTERNAL     0x40
+
+/***************************************************************************
+                               * interface information define *
+***************************************************************************/
+struct INTERFACE_INFO {
+       u8 interrupt_index;
+       u8 ts1_index;
+       u8 ts2_index;
+       u8 audio_index;
+       u8 video_index;
+       u8 vanc_index;          /* VBI */
+       u8 hanc_index;          /* Sliced CC */
+       u8 ir_index;
+};
+
+enum INDEX_INTERFACE_INFO{
+       INDEX_INTERRUPT = 0x0,
+       INDEX_TS1,
+       INDEX_TS2,
+       INDEX_AUDIO,
+       INDEX_VIDEO,
+       INDEX_VANC,
+       INDEX_HANC,
+       INDEX_IR,
+};
+
+/***************************************************************************
+                               * configuration information define *
+***************************************************************************/
+struct CONFIG_INFO {
+       u8 config_index;
+       struct INTERFACE_INFO interface_info;
+};
+
+struct pcb_config {
+       u8 index;
+       u8 type;                /* bus power or self power,
+                                          self power--0, bus_power--1 */
+       u8 speed;               /* usb speed, 2.0--1, 1.1--0 */
+       u8 mode;                /* digital , anlog, dif or external A/V */
+       u32 ts1_source;         /* three source -- BDA,External,encode */
+       u32 ts2_source;
+       u32 analog_source;
+       u8 digital_index;       /* bus-power used */
+       u8 analog_index;        /* bus-power used */
+       u8 dif_index;           /* bus-power used */
+       u8 external_index;      /* bus-power used */
+       u8 config_num;          /* current config num, 0,1,2,
+                                                  for self-power, always 0 */
+       struct CONFIG_INFO hs_config_info[3];
+       struct CONFIG_INFO fs_config_info[3];
+};
+
+enum INDEX_PCB_CONFIG{
+       INDEX_SELFPOWER_DIGITAL_ONLY = 0x0,
+       INDEX_SELFPOWER_DUAL_DIGITAL,
+       INDEX_SELFPOWER_ANALOG_ONLY,
+       INDEX_SELFPOWER_DUAL,
+       INDEX_SELFPOWER_TRIPLE,
+       INDEX_SELFPOWER_COMPRESSOR,
+       INDEX_BUSPOWER_DIGITAL_ONLY,
+       INDEX_BUSPOWER_ANALOG_ONLY,
+       INDEX_BUSPOWER_DIF_ONLY,
+       INDEX_BUSPOWER_EXTERNAL_ONLY,
+       INDEX_BUSPOWER_EXTERNAL_ANALOG,
+       INDEX_BUSPOWER_EXTERNAL_DIF,
+       INDEX_BUSPOWER_EXTERNAL_DIGITAL,
+       INDEX_BUSPOWER_DIGITAL_ANALOG,
+       INDEX_BUSPOWER_DIGITAL_DIF,
+       INDEX_BUSPOWER_DIGITAL_ANALOG_EXTERNAL,
+       INDEX_BUSPOWER_DIGITAL_DIF_EXTERNAL,
+};
+
+/***************************************************************************/
+struct cx231xx;
+
+u32 initialize_cx231xx(struct cx231xx *p_dev);
+
+#endif
diff --git a/drivers/media/video/cx231xx/cx231xx-reg.h b/drivers/media/video/cx231xx/cx231xx-reg.h
new file mode 100644 (file)
index 0000000..750c5d3
--- /dev/null
@@ -0,0 +1,1564 @@
+/*
+   cx231xx-reg.h - driver for Conexant Cx23100/101/102
+              USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _CX231XX_REG_H
+#define _CX231XX_REG_H
+
+/*****************************************************************************
+                               * VBI codes *
+*****************************************************************************/
+
+#define SAV_ACTIVE_VIDEO_FIELD1                0x80
+#define EAV_ACTIVE_VIDEO_FIELD1                0x90
+
+#define SAV_ACTIVE_VIDEO_FIELD2                0xc0
+#define EAV_ACTIVE_VIDEO_FIELD2                0xd0
+
+#define SAV_VBLANK_FIELD1              0xa0
+#define EAV_VBLANK_FIELD1              0xb0
+
+#define SAV_VBLANK_FIELD2              0xe0
+#define EAV_VBLANK_FIELD2              0xf0
+
+#define SAV_VBI_FIELD1                 0x20
+#define EAV_VBI_FIELD1                 0x30
+
+#define SAV_VBI_FIELD2                 0x60
+#define EAV_VBI_FIELD2                 0x70
+
+/*****************************************************************************/
+/* Audio ADC Registers */
+#define CH_PWR_CTRL1                   0x0000000e
+#define CH_PWR_CTRL2                   0x0000000f
+/*****************************************************************************/
+
+#define      HOST_REG1                0x000
+#define      FLD_FORCE_CHIP_SEL       0x80
+#define      FLD_AUTO_INC_DIS         0x20
+#define      FLD_PREFETCH_EN          0x10
+/* Reserved [2:3] */
+#define      FLD_DIGITAL_PWR_DN       0x02
+#define      FLD_SLEEP                0x01
+
+/*****************************************************************************/
+#define      HOST_REG2                0x001
+
+/*****************************************************************************/
+#define      HOST_REG3                0x002
+
+/*****************************************************************************/
+/* added for polaris */
+#define      GPIO_PIN_CTL0            0x3
+#define      GPIO_PIN_CTL1            0x4
+#define      GPIO_PIN_CTL2            0x5
+#define      GPIO_PIN_CTL3            0x6
+#define      TS1_PIN_CTL0             0x7
+#define      TS1_PIN_CTL1             0x8
+/*****************************************************************************/
+
+#define      FLD_CLK_IN_EN            0x80
+#define      FLD_XTAL_CTRL            0x70
+#define      FLD_BB_CLK_MODE          0x0C
+#define      FLD_REF_DIV_PLL          0x02
+#define      FLD_REF_SEL_PLL1         0x01
+
+/*****************************************************************************/
+#define      CHIP_CTRL                0x100
+/* Reserved [27] */
+/* Reserved [31:21] */
+#define      FLD_CHIP_ACFG_DIS        0x00100000
+/* Reserved [19] */
+#define      FLD_DUAL_MODE_ADC2       0x00040000
+#define      FLD_SIF_EN               0x00020000
+#define      FLD_SOFT_RST             0x00010000
+#define      FLD_DEVICE_ID            0x0000ffff
+
+/*****************************************************************************/
+#define      AFE_CTRL                 0x104
+#define      AFE_CTRL_C2HH_SRC_CTRL   0x104
+#define      FLD_DIF_OUT_SEL          0xc0000000
+#define      FLD_AUX_PLL_CLK_ALT_SEL  0x3c000000
+#define      FLD_UV_ORDER_MODE        0x02000000
+#define      FLD_FUNC_MODE            0x01800000
+#define      FLD_ROT1_PHASE_CTL       0x007f8000
+#define      FLD_AUD_IN_SEL           0x00004000
+#define      FLD_LUMA_IN_SEL          0x00002000
+#define      FLD_CHROMA_IN_SEL        0x00001000
+/* reserve [11:10] */
+#define      FLD_INV_SPEC_DIS         0x00000200
+#define      FLD_VGA_SEL_CH3          0x00000100
+#define      FLD_VGA_SEL_CH2          0x00000080
+#define      FLD_VGA_SEL_CH1          0x00000040
+#define      FLD_DCR_BYP_CH1          0x00000020
+#define      FLD_DCR_BYP_CH2          0x00000010
+#define      FLD_DCR_BYP_CH3          0x00000008
+#define      FLD_EN_12DB_CH3          0x00000004
+#define      FLD_EN_12DB_CH2          0x00000002
+#define      FLD_EN_12DB_CH1          0x00000001
+
+/* redefine in Cx231xx */
+/*****************************************************************************/
+#define      DC_CTRL1                 0x108
+/* reserve [31:30] */
+#define      FLD_CLAMP_LVL_CH1        0x3fff8000
+#define      FLD_CLAMP_LVL_CH2        0x00007fff
+/*****************************************************************************/
+
+/*****************************************************************************/
+#define      DC_CTRL2                 0x10c
+/* reserve [31:28] */
+#define      FLD_CLAMP_LVL_CH3        0x00fffe00
+#define      FLD_CLAMP_WIND_LENTH     0x000001e0
+#define      FLD_C2HH_SAT_MIN         0x0000001e
+#define      FLD_FLT_BYP_SEL          0x00000001
+/*****************************************************************************/
+
+/*****************************************************************************/
+#define      DC_CTRL3                 0x110
+/* reserve [31:16] */
+#define      FLD_ERR_GAIN_CTL         0x00070000
+#define      FLD_LPF_MIN              0x0000ffff
+/*****************************************************************************/
+
+/*****************************************************************************/
+#define      DC_CTRL4                 0x114
+/* reserve [31:31] */
+#define      FLD_INTG_CH1             0x7fffffff
+/*****************************************************************************/
+
+/*****************************************************************************/
+#define      DC_CTRL5                 0x118
+/* reserve [31:31] */
+#define      FLD_INTG_CH2             0x7fffffff
+/*****************************************************************************/
+
+/*****************************************************************************/
+#define      DC_CTRL6                 0x11c
+/* reserve [31:31] */
+#define      FLD_INTG_CH3             0x7fffffff
+/*****************************************************************************/
+
+/*****************************************************************************/
+#define      PIN_CTRL                 0x120
+#define      FLD_OEF_AGC_RF           0x00000001
+#define      FLD_OEF_AGC_IFVGA        0x00000002
+#define      FLD_OEF_AGC_IF           0x00000004
+#define      FLD_REG_BO_PUD           0x80000000
+#define      FLD_IR_IRQ_STAT          0x40000000
+#define      FLD_AUD_IRQ_STAT         0x20000000
+#define      FLD_VID_IRQ_STAT         0x10000000
+/* Reserved [27:26] */
+#define      FLD_IRQ_N_OUT_EN         0x02000000
+#define      FLD_IRQ_N_POLAR          0x01000000
+/* Reserved [23:6] */
+#define      FLD_OE_AUX_PLL_CLK       0x00000020
+#define      FLD_OE_I2S_BCLK          0x00000010
+#define      FLD_OE_I2S_WCLK          0x00000008
+#define      FLD_OE_AGC_IF            0x00000004
+#define      FLD_OE_AGC_IFVGA         0x00000002
+#define      FLD_OE_AGC_RF            0x00000001
+
+/*****************************************************************************/
+#define      AUD_IO_CTRL              0x124
+/* Reserved [31:8] */
+#define      FLD_I2S_PORT_DIR         0x00000080
+#define      FLD_I2S_OUT_SRC          0x00000040
+#define      FLD_AUD_CHAN3_SRC        0x00000030
+#define      FLD_AUD_CHAN2_SRC        0x0000000c
+#define      FLD_AUD_CHAN1_SRC        0x00000003
+
+/*****************************************************************************/
+#define      AUD_LOCK1                0x128
+#define      FLD_AUD_LOCK_KI_SHIFT    0xc0000000
+#define      FLD_AUD_LOCK_KD_SHIFT    0x30000000
+/* Reserved [27:25] */
+#define      FLD_EN_AV_LOCK           0x01000000
+#define      FLD_VID_COUNT            0x00ffffff
+
+/*****************************************************************************/
+#define      AUD_LOCK2                0x12c
+#define      FLD_AUD_LOCK_KI_MULT     0xf0000000
+#define      FLD_AUD_LOCK_KD_MULT     0x0F000000
+/* Reserved [23:22] */
+#define      FLD_AUD_LOCK_FREQ_SHIFT  0x00300000
+#define      FLD_AUD_COUNT            0x000fffff
+
+/*****************************************************************************/
+#define      AFE_DIAG_CTRL1           0x134
+/* Reserved [31:16] */
+#define      FLD_CUV_DLY_LENGTH       0x0000ff00
+#define      FLD_YC_DLY_LENGTH        0x000000ff
+
+/*****************************************************************************/
+/* Poalris redefine */
+#define      AFE_DIAG_CTRL3           0x138
+/* Reserved [31:26] */
+#define      FLD_AUD_DUAL_FLAG_POL    0x02000000
+#define      FLD_VID_DUAL_FLAG_POL    0x01000000
+/* Reserved [23:23] */
+#define      FLD_COL_CLAMP_DIS_CH1    0x00400000
+#define      FLD_COL_CLAMP_DIS_CH2    0x00200000
+#define      FLD_COL_CLAMP_DIS_CH3    0x00100000
+
+#define      TEST_CTRL1               0x144
+/* Reserved [31:29] */
+#define      FLD_LBIST_EN             0x10000000
+/* Reserved [27:10] */
+#define      FLD_FI_BIST_INTR_R       0x0000200
+#define      FLD_FI_BIST_INTR_L       0x0000100
+#define      FLD_BIST_FAIL_AUD_PLL    0x0000080
+#define      FLD_BIST_INTR_AUD_PLL    0x0000040
+#define      FLD_BIST_FAIL_VID_PLL    0x0000020
+#define      FLD_BIST_INTR_VID_PLL    0x0000010
+/* Reserved [3:1] */
+#define      FLD_CIR_TEST_DIS         0x00000001
+
+/*****************************************************************************/
+#define      TEST_CTRL2               0x148
+#define      FLD_TSXCLK_POL_CTL       0x80000000
+#define      FLD_ISO_CTL_SEL          0x40000000
+#define      FLD_ISO_CTL_EN           0x20000000
+#define      FLD_BIST_DEBUGZ          0x10000000
+#define      FLD_AUD_BIST_TEST_H      0x0f000000
+/* Reserved [23:22] */
+#define      FLD_FLTRN_BIST_TEST_H    0x00020000
+#define      FLD_VID_BIST_TEST_H      0x00010000
+/* Reserved [19:17] */
+#define      FLD_BIST_TEST_H          0x00010000
+/* Reserved [15:13] */
+#define      FLD_TAB_EN               0x00001000
+/* Reserved [11:0] */
+
+/*****************************************************************************/
+#define      BIST_STAT                0x14c
+#define      FLD_AUD_BIST_FAIL_H      0xfff00000
+#define      FLD_FLTRN_BIST_FAIL_H    0x00180000
+#define      FLD_VID_BIST_FAIL_H      0x00070000
+#define      FLD_AUD_BIST_TST_DONE    0x0000fff0
+#define      FLD_FLTRN_BIST_TST_DONE  0x00000008
+#define      FLD_VID_BIST_TST_DONE    0x00000007
+
+/*****************************************************************************/
+/* DirectIF registers definition have been moved to DIF_reg.h                */
+/*****************************************************************************/
+#define      MODE_CTRL                0x400
+#define      FLD_AFD_PAL60_DIS        0x20000000
+#define      FLD_AFD_FORCE_SECAM      0x10000000
+#define      FLD_AFD_FORCE_PALNC      0x08000000
+#define      FLD_AFD_FORCE_PAL        0x04000000
+#define      FLD_AFD_PALM_SEL         0x03000000
+#define      FLD_CKILL_MODE           0x00300000
+#define      FLD_COMB_NOTCH_MODE      0x00c00000       /* bit[19:18] */
+#define      FLD_CLR_LOCK_STAT        0x00020000
+#define      FLD_FAST_LOCK_MD         0x00010000
+#define      FLD_WCEN                 0x00008000
+#define      FLD_CAGCEN               0x00004000
+#define      FLD_CKILLEN              0x00002000
+#define      FLD_AUTO_SC_LOCK         0x00001000
+#define      FLD_MAN_SC_FAST_LOCK     0x00000800
+#define      FLD_INPUT_MODE           0x00000600
+#define      FLD_AFD_ACQUIRE          0x00000100
+#define      FLD_AFD_NTSC_SEL         0x00000080
+#define      FLD_AFD_PAL_SEL          0x00000040
+#define      FLD_ACFG_DIS             0x00000020
+#define      FLD_SQ_PIXEL             0x00000010
+#define      FLD_VID_FMT_SEL          0x0000000f
+
+/*****************************************************************************/
+#define      OUT_CTRL1                0x404
+#define      FLD_POLAR                0x7f000000
+/* Reserved [23] */
+#define      FLD_RND_MODE             0x00600000
+#define      FLD_VIPCLAMP_EN          0x00100000
+#define      FLD_VIPBLANK_EN          0x00080000
+#define      FLD_VIP_OPT_AL           0x00040000
+#define      FLD_IDID0_SOURCE         0x00020000
+#define      FLD_DCMODE               0x00010000
+#define      FLD_CLK_GATING           0x0000c000
+#define      FLD_CLK_INVERT           0x00002000
+#define      FLD_HSFMT                0x00001000
+#define      FLD_VALIDFMT             0x00000800
+#define      FLD_ACTFMT               0x00000400
+#define      FLD_SWAPRAW              0x00000200
+#define      FLD_CLAMPRAW_EN          0x00000100
+#define      FLD_BLUE_FIELD_EN        0x00000080
+#define      FLD_BLUE_FIELD_ACT       0x00000040
+#define      FLD_TASKBIT_VAL          0x00000020
+#define      FLD_ANC_DATA_EN          0x00000010
+#define      FLD_VBIHACTRAW_EN        0x00000008
+#define      FLD_MODE10B              0x00000004
+#define      FLD_OUT_MODE             0x00000003
+
+/*****************************************************************************/
+#define      OUT_CTRL2                0x408
+#define      FLD_AUD_GRP              0xc0000000
+#define      FLD_SAMPLE_RATE          0x30000000
+#define      FLD_AUD_ANC_EN           0x08000000
+#define      FLD_EN_C                 0x04000000
+#define      FLD_EN_B                 0x02000000
+#define      FLD_EN_A                 0x01000000
+/* Reserved [23:20] */
+#define      FLD_IDID1_LSB            0x000c0000
+#define      FLD_IDID0_LSB            0x00030000
+#define      FLD_IDID1_MSB            0x0000ff00
+#define      FLD_IDID0_MSB            0x000000ff
+
+/*****************************************************************************/
+#define      GEN_STAT                 0x40c
+#define      FLD_VCR_DETECT           0x00800000
+#define      FLD_SPECIAL_PLAY_N       0x00400000
+#define      FLD_VPRES                0x00200000
+#define      FLD_AGC_LOCK             0x00100000
+#define      FLD_CSC_LOCK             0x00080000
+#define      FLD_VLOCK                0x00040000
+#define      FLD_SRC_LOCK             0x00020000
+#define      FLD_HLOCK                0x00010000
+#define      FLD_VSYNC_N              0x00008000
+#define      FLD_SRC_FIFO_UFLOW       0x00004000
+#define      FLD_SRC_FIFO_OFLOW       0x00002000
+#define      FLD_FIELD                0x00001000
+#define      FLD_AFD_FMT_STAT         0x00000f00
+#define      FLD_MV_TYPE2_PAIR        0x00000080
+#define      FLD_MV_T3CS              0x00000040
+#define      FLD_MV_CS                0x00000020
+#define      FLD_MV_PSP               0x00000010
+/* Reserved [3] */
+#define      FLD_MV_CDAT              0x00000003
+
+/*****************************************************************************/
+#define      INT_STAT_MASK            0x410
+#define      FLD_COMB_3D_FIFO_MSK     0x80000000
+#define      FLD_WSS_DAT_AVAIL_MSK    0x40000000
+#define      FLD_GS2_DAT_AVAIL_MSK    0x20000000
+#define      FLD_GS1_DAT_AVAIL_MSK    0x10000000
+#define      FLD_CC_DAT_AVAIL_MSK     0x08000000
+#define      FLD_VPRES_CHANGE_MSK     0x04000000
+#define      FLD_MV_CHANGE_MSK        0x02000000
+#define      FLD_END_VBI_EVEN_MSK     0x01000000
+#define      FLD_END_VBI_ODD_MSK      0x00800000
+#define      FLD_FMT_CHANGE_MSK       0x00400000
+#define      FLD_VSYNC_TRAIL_MSK      0x00200000
+#define      FLD_HLOCK_CHANGE_MSK     0x00100000
+#define      FLD_VLOCK_CHANGE_MSK     0x00080000
+#define      FLD_CSC_LOCK_CHANGE_MSK  0x00040000
+#define      FLD_SRC_FIFO_UFLOW_MSK   0x00020000
+#define      FLD_SRC_FIFO_OFLOW_MSK   0x00010000
+#define      FLD_COMB_3D_FIFO_STAT    0x00008000
+#define      FLD_WSS_DAT_AVAIL_STAT   0x00004000
+#define      FLD_GS2_DAT_AVAIL_STAT   0x00002000
+#define      FLD_GS1_DAT_AVAIL_STAT   0x00001000
+#define      FLD_CC_DAT_AVAIL_STAT    0x00000800
+#define      FLD_VPRES_CHANGE_STAT    0x00000400
+#define      FLD_MV_CHANGE_STAT       0x00000200
+#define      FLD_END_VBI_EVEN_STAT    0x00000100
+#define      FLD_END_VBI_ODD_STAT     0x00000080
+#define      FLD_FMT_CHANGE_STAT      0x00000040
+#define      FLD_VSYNC_TRAIL_STAT     0x00000020
+#define      FLD_HLOCK_CHANGE_STAT    0x00000010
+#define      FLD_VLOCK_CHANGE_STAT    0x00000008
+#define      FLD_CSC_LOCK_CHANGE_STAT 0x00000004
+#define      FLD_SRC_FIFO_UFLOW_STAT  0x00000002
+#define      FLD_SRC_FIFO_OFLOW_STAT  0x00000001
+
+/*****************************************************************************/
+#define      LUMA_CTRL                0x414
+#define      BRIGHTNESS_CTRL_BYTE     0x414
+#define      CONTRAST_CTRL_BYTE       0x415
+#define      LUMA_CTRL_BYTE_3         0x416
+#define      FLD_LUMA_CORE_SEL        0x00c00000
+#define      FLD_RANGE                0x00300000
+/* Reserved [19] */
+#define      FLD_PEAK_EN              0x00040000
+#define      FLD_PEAK_SEL             0x00030000
+#define      FLD_CNTRST               0x0000ff00
+#define      FLD_BRITE                0x000000ff
+
+/*****************************************************************************/
+#define      HSCALE_CTRL              0x418
+#define      FLD_HFILT                0x03000000
+#define      FLD_HSCALE               0x00ffffff
+
+/*****************************************************************************/
+#define      VSCALE_CTRL              0x41c
+#define      FLD_LINE_AVG_DIS         0x01000000
+/* Reserved [23:20] */
+#define      FLD_VS_INTRLACE          0x00080000
+#define      FLD_VFILT                0x00070000
+/* Reserved [15:13] */
+#define      FLD_VSCALE               0x00001fff
+
+/*****************************************************************************/
+#define      CHROMA_CTRL              0x420
+#define      USAT_CTRL_BYTE           0x420
+#define      VSAT_CTRL_BYTE           0x421
+#define      HUE_CTRL_BYTE            0x422
+#define      FLD_C_LPF_EN             0x20000000
+#define      FLD_CHR_DELAY            0x1c000000
+#define      FLD_C_CORE_SEL           0x03000000
+#define      FLD_HUE                  0x00ff0000
+#define      FLD_VSAT                 0x0000ff00
+#define      FLD_USAT                 0x000000ff
+
+/*****************************************************************************/
+#define      VBI_LINE_CTRL1           0x424
+#define      FLD_VBI_MD_LINE4         0xff000000
+#define      FLD_VBI_MD_LINE3         0x00ff0000
+#define      FLD_VBI_MD_LINE2         0x0000ff00
+#define      FLD_VBI_MD_LINE1         0x000000ff
+
+/*****************************************************************************/
+#define      VBI_LINE_CTRL2           0x428
+#define      FLD_VBI_MD_LINE8         0xff000000
+#define      FLD_VBI_MD_LINE7         0x00ff0000
+#define      FLD_VBI_MD_LINE6         0x0000ff00
+#define      FLD_VBI_MD_LINE5         0x000000ff
+
+/*****************************************************************************/
+#define      VBI_LINE_CTRL3           0x42c
+#define      FLD_VBI_MD_LINE12        0xff000000
+#define      FLD_VBI_MD_LINE11        0x00ff0000
+#define      FLD_VBI_MD_LINE10        0x0000ff00
+#define      FLD_VBI_MD_LINE9         0x000000ff
+
+/*****************************************************************************/
+#define      VBI_LINE_CTRL4           0x430
+#define      FLD_VBI_MD_LINE16        0xff000000
+#define      FLD_VBI_MD_LINE15        0x00ff0000
+#define      FLD_VBI_MD_LINE14        0x0000ff00
+#define      FLD_VBI_MD_LINE13        0x000000ff
+
+/*****************************************************************************/
+#define      VBI_LINE_CTRL5           0x434
+#define      FLD_VBI_MD_LINE17        0x000000ff
+
+/*****************************************************************************/
+#define      VBI_FC_CFG               0x438
+#define      FLD_FC_ALT2              0xff000000
+#define      FLD_FC_ALT1              0x00ff0000
+#define      FLD_FC_ALT2_TYPE         0x0000f000
+#define      FLD_FC_ALT1_TYPE         0x00000f00
+/* Reserved [7:1] */
+#define      FLD_FC_SEARCH_MODE       0x00000001
+
+/*****************************************************************************/
+#define      VBI_MISC_CFG1            0x43c
+#define      FLD_TTX_PKTADRU          0xfff00000
+#define      FLD_TTX_PKTADRL          0x000fff00
+/* Reserved [7:6] */
+#define      FLD_MOJI_PACK_DIS        0x00000020
+#define      FLD_VPS_DEC_DIS          0x00000010
+#define      FLD_CRI_MARG_SCALE       0x0000000c
+#define      FLD_EDGE_RESYNC_EN       0x00000002
+#define      FLD_ADAPT_SLICE_DIS      0x00000001
+
+/*****************************************************************************/
+#define      VBI_MISC_CFG2            0x440
+#define      FLD_HAMMING_TYPE         0x0f000000
+/* Reserved [23:20] */
+#define      FLD_WSS_FIFO_RST         0x00080000
+#define      FLD_GS2_FIFO_RST         0x00040000
+#define      FLD_GS1_FIFO_RST         0x00020000
+#define      FLD_CC_FIFO_RST          0x00010000
+/* Reserved [15:12] */
+#define      FLD_VBI3_SDID            0x00000f00
+#define      FLD_VBI2_SDID            0x000000f0
+#define      FLD_VBI1_SDID            0x0000000f
+
+/*****************************************************************************/
+#define      VBI_PAY1                 0x444
+#define      FLD_GS1_FIFO_DAT         0xFF000000
+#define      FLD_GS1_STAT             0x00FF0000
+#define      FLD_CC_FIFO_DAT          0x0000FF00
+#define      FLD_CC_STAT              0x000000FF
+
+/*****************************************************************************/
+#define      VBI_PAY2                 0x448
+#define      FLD_WSS_FIFO_DAT         0xff000000
+#define      FLD_WSS_STAT             0x00ff0000
+#define      FLD_GS2_FIFO_DAT         0x0000ff00
+#define      FLD_GS2_STAT             0x000000ff
+
+/*****************************************************************************/
+#define      VBI_CUST1_CFG1           0x44c
+/* Reserved [31] */
+#define      FLD_VBI1_CRIWIN          0x7f000000
+#define      FLD_VBI1_SLICE_DIST      0x00f00000
+#define      FLD_VBI1_BITINC          0x000fff00
+#define      FLD_VBI1_HDELAY          0x000000ff
+
+/*****************************************************************************/
+#define      VBI_CUST1_CFG2           0x450
+#define      FLD_VBI1_FC_LENGTH       0x1f000000
+#define      FLD_VBI1_FRAME_CODE      0x00ffffff
+
+/*****************************************************************************/
+#define      VBI_CUST1_CFG3           0x454
+#define      FLD_VBI1_HAM_EN          0x80000000
+#define      FLD_VBI1_FIFO_MODE       0x70000000
+#define      FLD_VBI1_FORMAT_TYPE     0x0f000000
+#define      FLD_VBI1_PAYLD_LENGTH    0x00ff0000
+#define      FLD_VBI1_CRI_LENGTH      0x0000f000
+#define      FLD_VBI1_CRI_MARGIN      0x00000f00
+#define      FLD_VBI1_CRI_TIME        0x000000ff
+
+/*****************************************************************************/
+#define      VBI_CUST2_CFG1           0x458
+/* Reserved [31] */
+#define      FLD_VBI2_CRIWIN          0x7f000000
+#define      FLD_VBI2_SLICE_DIST      0x00f00000
+#define      FLD_VBI2_BITINC          0x000fff00
+#define      FLD_VBI2_HDELAY          0x000000ff
+
+/*****************************************************************************/
+#define      VBI_CUST2_CFG2           0x45c
+#define      FLD_VBI2_FC_LENGTH       0x1f000000
+#define      FLD_VBI2_FRAME_CODE      0x00ffffff
+
+/*****************************************************************************/
+#define      VBI_CUST2_CFG3           0x460
+#define      FLD_VBI2_HAM_EN          0x80000000
+#define      FLD_VBI2_FIFO_MODE       0x70000000
+#define      FLD_VBI2_FORMAT_TYPE     0x0f000000
+#define      FLD_VBI2_PAYLD_LENGTH    0x00ff0000
+#define      FLD_VBI2_CRI_LENGTH      0x0000f000
+#define      FLD_VBI2_CRI_MARGIN      0x00000f00
+#define      FLD_VBI2_CRI_TIME        0x000000ff
+
+/*****************************************************************************/
+#define      VBI_CUST3_CFG1           0x464
+/* Reserved [31] */
+#define      FLD_VBI3_CRIWIN          0x7f000000
+#define      FLD_VBI3_SLICE_DIST      0x00f00000
+#define      FLD_VBI3_BITINC          0x000fff00
+#define      FLD_VBI3_HDELAY          0x000000ff
+
+/*****************************************************************************/
+#define      VBI_CUST3_CFG2           0x468
+#define      FLD_VBI3_FC_LENGTH       0x1f000000
+#define      FLD_VBI3_FRAME_CODE      0x00ffffff
+
+/*****************************************************************************/
+#define      VBI_CUST3_CFG3           0x46c
+#define      FLD_VBI3_HAM_EN          0x80000000
+#define      FLD_VBI3_FIFO_MODE       0x70000000
+#define      FLD_VBI3_FORMAT_TYPE     0x0f000000
+#define      FLD_VBI3_PAYLD_LENGTH    0x00ff0000
+#define      FLD_VBI3_CRI_LENGTH      0x0000f000
+#define      FLD_VBI3_CRI_MARGIN      0x00000f00
+#define      FLD_VBI3_CRI_TIME        0x000000ff
+
+/*****************************************************************************/
+#define      HORIZ_TIM_CTRL           0x470
+#define      FLD_BGDEL_CNT            0xff000000
+/* Reserved [23:22] */
+#define      FLD_HACTIVE_CNT          0x003ff000
+/* Reserved [11:10] */
+#define      FLD_HBLANK_CNT           0x000003ff
+
+/*****************************************************************************/
+#define      VERT_TIM_CTRL            0x474
+#define      FLD_V656BLANK_CNT        0xff000000
+/* Reserved [23:22] */
+#define      FLD_VACTIVE_CNT          0x003ff000
+/* Reserved [11:10] */
+#define      FLD_VBLANK_CNT           0x000003ff
+
+/*****************************************************************************/
+#define      SRC_COMB_CFG             0x478
+#define      FLD_CCOMB_2LN_CHECK      0x80000000
+#define      FLD_CCOMB_3LN_EN         0x40000000
+#define      FLD_CCOMB_2LN_EN         0x20000000
+#define      FLD_CCOMB_3D_EN          0x10000000
+/* Reserved [27] */
+#define      FLD_LCOMB_3LN_EN         0x04000000
+#define      FLD_LCOMB_2LN_EN         0x02000000
+#define      FLD_LCOMB_3D_EN          0x01000000
+#define      FLD_LUMA_LPF_SEL         0x00c00000
+#define      FLD_UV_LPF_SEL           0x00300000
+#define      FLD_BLEND_SLOPE          0x000f0000
+#define      FLD_CCOMB_REDUCE_EN      0x00008000
+/* Reserved [14:10] */
+#define      FLD_SRC_DECIM_RATIO      0x000003ff
+
+/*****************************************************************************/
+#define      CHROMA_VBIOFF_CFG        0x47c
+#define      FLD_VBI_VOFFSET          0x1f000000
+/* Reserved [23:20] */
+#define      FLD_SC_STEP              0x000fffff
+
+/*****************************************************************************/
+#define      FIELD_COUNT              0x480
+#define      FLD_FIELD_COUNT_FLD      0x000003ff
+
+/*****************************************************************************/
+#define      MISC_TIM_CTRL            0x484
+#define      FLD_DEBOUNCE_COUNT       0xc0000000
+#define      FLD_VT_LINE_CNT_HYST     0x30000000
+/* Reserved [27] */
+#define      FLD_AFD_STAT             0x07ff0000
+#define      FLD_VPRES_VERT_EN        0x00008000
+/* Reserved [14:12] */
+#define      FLD_HR32                 0x00000800
+#define      FLD_TDALGN               0x00000400
+#define      FLD_TDFIELD              0x00000200
+/* Reserved [8:6] */
+#define      FLD_TEMPDEC              0x0000003f
+
+/*****************************************************************************/
+#define      DFE_CTRL1                0x488
+#define      FLD_CLAMP_AUTO_EN        0x80000000
+#define      FLD_AGC_AUTO_EN          0x40000000
+#define      FLD_VGA_CRUSH_EN         0x20000000
+#define      FLD_VGA_AUTO_EN          0x10000000
+#define      FLD_VBI_GATE_EN          0x08000000
+#define      FLD_CLAMP_LEVEL          0x07000000
+/* Reserved [23:22] */
+#define      FLD_CLAMP_SKIP_CNT       0x00300000
+#define      FLD_AGC_GAIN             0x000fff00
+/* Reserved [7:6] */
+#define      FLD_VGA_GAIN             0x0000003f
+
+/*****************************************************************************/
+#define      DFE_CTRL2                0x48c
+#define      FLD_VGA_ACQUIRE_RANGE    0x00ff0000
+#define      FLD_VGA_TRACK_RANGE      0x0000ff00
+#define      FLD_VGA_SYNC             0x000000ff
+
+/*****************************************************************************/
+#define      DFE_CTRL3                0x490
+#define      FLD_BP_PERCENT           0xff000000
+#define      FLD_DFT_THRESHOLD        0x00ff0000
+/* Reserved [15:12] */
+#define      FLD_SYNC_WIDTH_SEL       0x00000600
+#define      FLD_BP_LOOP_GAIN         0x00000300
+#define      FLD_SYNC_LOOP_GAIN       0x000000c0
+/* Reserved [5:4] */
+#define      FLD_AGC_LOOP_GAIN        0x0000000c
+#define      FLD_DCC_LOOP_GAIN        0x00000003
+
+/*****************************************************************************/
+#define      PLL_CTRL                 0x494
+#define      FLD_PLL_KD               0xff000000
+#define      FLD_PLL_KI               0x00ff0000
+#define      FLD_PLL_MAX_OFFSET       0x0000ffff
+
+/*****************************************************************************/
+#define      HTL_CTRL                 0x498
+/* Reserved [31:24] */
+#define      FLD_AUTO_LOCK_SPD        0x00080000
+#define      FLD_MAN_FAST_LOCK        0x00040000
+#define      FLD_HTL_15K_EN           0x00020000
+#define      FLD_HTL_500K_EN          0x00010000
+#define      FLD_HTL_KD               0x0000ff00
+#define      FLD_HTL_KI               0x000000ff
+
+/*****************************************************************************/
+#define      COMB_CTRL                0x49c
+#define      FLD_COMB_PHASE_LIMIT     0xff000000
+#define      FLD_CCOMB_ERR_LIMIT      0x00ff0000
+#define      FLD_LUMA_THRESHOLD       0x0000ff00
+#define      FLD_LCOMB_ERR_LIMIT      0x000000ff
+
+/*****************************************************************************/
+#define      CRUSH_CTRL               0x4a0
+#define      FLD_WTW_EN               0x00400000
+#define      FLD_CRUSH_FREQ           0x00200000
+#define      FLD_MAJ_SEL_EN           0x00100000
+#define      FLD_MAJ_SEL              0x000c0000
+/* Reserved [17:15] */
+#define      FLD_SYNC_TIP_REDUCE      0x00007e00
+/* Reserved [8:6] */
+#define      FLD_SYNC_TIP_INC         0x0000003f
+
+/*****************************************************************************/
+#define      SOFT_RST_CTRL            0x4a4
+#define      FLD_VD_SOFT_RST          0x00008000
+/* Reserved [14:12] */
+#define      FLD_REG_RST_MSK          0x00000800
+#define      FLD_VOF_RST_MSK          0x00000400
+#define      FLD_MVDET_RST_MSK        0x00000200
+#define      FLD_VBI_RST_MSK          0x00000100
+#define      FLD_SCALE_RST_MSK        0x00000080
+#define      FLD_CHROMA_RST_MSK       0x00000040
+#define      FLD_LUMA_RST_MSK         0x00000020
+#define      FLD_VTG_RST_MSK          0x00000010
+#define      FLD_YCSEP_RST_MSK        0x00000008
+#define      FLD_SRC_RST_MSK          0x00000004
+#define      FLD_DFE_RST_MSK          0x00000002
+/* Reserved [0] */
+
+/*****************************************************************************/
+#define      MV_DT_CTRL1              0x4a8
+/* Reserved [31:29] */
+#define      FLD_PSP_STOP_LINE        0x1f000000
+/* Reserved [23:21] */
+#define      FLD_PSP_STRT_LINE        0x001f0000
+/* Reserved [15] */
+#define      FLD_PSP_LLIMW            0x00007f00
+/* Reserved [7] */
+#define      FLD_PSP_ULIMW            0x0000007f
+
+/*****************************************************************************/
+#define      MV_DT_CTRL2              0x4aC
+#define      FLD_CS_STOPWIN           0xff000000
+#define      FLD_CS_STRTWIN           0x00ff0000
+#define      FLD_CS_WIDTH             0x0000ff00
+#define      FLD_PSP_SPEC_VAL         0x000000ff
+
+/*****************************************************************************/
+#define      MV_DT_CTRL3              0x4B0
+#define      FLD_AUTO_RATE_DIS        0x80000000
+#define      FLD_HLOCK_DIS            0x40000000
+#define      FLD_SEL_FIELD_CNT        0x20000000
+#define      FLD_CS_TYPE2_SEL         0x10000000
+#define      FLD_CS_LINE_THRSH_SEL    0x08000000
+#define      FLD_CS_ATHRESH_SEL       0x04000000
+#define      FLD_PSP_SPEC_SEL         0x02000000
+#define      FLD_PSP_LINES_SEL        0x01000000
+#define      FLD_FIELD_CNT            0x00f00000
+#define      FLD_CS_TYPE2_CNT         0x000fc000
+#define      FLD_CS_LINE_CNT          0x00003f00
+#define      FLD_CS_ATHRESH_LEV       0x000000ff
+
+/*****************************************************************************/
+#define      CHIP_VERSION             0x4b4
+/* Cx231xx redefine  */
+#define      VERSION                  0x4b4
+#define      FLD_REV_ID               0x000000ff
+
+/*****************************************************************************/
+#define      MISC_DIAG_CTRL           0x4b8
+/* Reserved [31:24] */
+#define      FLD_SC_CONVERGE_THRESH   0x00ff0000
+#define      FLD_CCOMB_ERR_LIMIT_3D   0x0000ff00
+#define      FLD_LCOMB_ERR_LIMIT_3D   0x000000ff
+
+/*****************************************************************************/
+#define      VBI_PASS_CTRL            0x4bc
+#define      FLD_VBI_PASS_MD          0x00200000
+#define      FLD_VBI_SETUP_DIS        0x00100000
+#define      FLD_PASS_LINE_CTRL       0x000fffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      VCR_DET_CTRL             0x4c0
+#define      FLD_EN_FIELD_PHASE_DET   0x80000000
+#define      FLD_EN_HEAD_SW_DET       0x40000000
+#define      FLD_FIELD_PHASE_LENGTH   0x01ff0000
+/* Reserved [29:25] */
+#define      FLD_FIELD_PHASE_DELAY    0x0000ff00
+#define      FLD_FIELD_PHASE_LIMIT    0x000000f0
+#define      FLD_HEAD_SW_DET_LIMIT    0x0000000f
+
+/*****************************************************************************/
+#define      DL_CTL                   0x800
+#define      DL_CTL_ADDRESS_LOW       0x800    /* Byte 1 in DL_CTL */
+#define      DL_CTL_ADDRESS_HIGH      0x801    /* Byte 2 in DL_CTL */
+#define      DL_CTL_DATA              0x802    /* Byte 3 in DL_CTL */
+#define      DL_CTL_CONTROL           0x803    /* Byte 4 in DL_CTL */
+/* Reserved [31:5] */
+#define      FLD_START_8051           0x10000000
+#define      FLD_DL_ENABLE            0x08000000
+#define      FLD_DL_AUTO_INC          0x04000000
+#define      FLD_DL_MAP               0x03000000
+
+/*****************************************************************************/
+#define      STD_DET_STATUS           0x804
+#define      FLD_SPARE_STATUS1        0xff000000
+#define      FLD_SPARE_STATUS0        0x00ff0000
+#define      FLD_MOD_DET_STATUS1      0x0000ff00
+#define      FLD_MOD_DET_STATUS0      0x000000ff
+
+/*****************************************************************************/
+#define      AUD_BUILD_NUM            0x806
+#define      AUD_VER_NUM              0x807
+#define      STD_DET_CTL              0x808
+#define      STD_DET_CTL_AUD_CTL      0x808    /* Byte 1 in STD_DET_CTL */
+#define      STD_DET_CTL_PREF_MODE    0x809    /* Byte 2 in STD_DET_CTL */
+#define      FLD_SPARE_CTL0           0xff000000
+#define      FLD_DIS_DBX              0x00800000
+#define      FLD_DIS_BTSC             0x00400000
+#define      FLD_DIS_NICAM_A2         0x00200000
+#define      FLD_VIDEO_PRESENT        0x00100000
+#define      FLD_DW8051_VIDEO_FORMAT  0x000f0000
+#define      FLD_PREF_DEC_MODE        0x0000ff00
+#define      FLD_AUD_CONFIG           0x000000ff
+
+/*****************************************************************************/
+#define      DW8051_INT               0x80c
+#define      FLD_VIDEO_PRESENT_CHANGE 0x80000000
+#define      FLD_VIDEO_CHANGE         0x40000000
+#define      FLD_RDS_READY            0x20000000
+#define      FLD_AC97_INT             0x10000000
+#define      FLD_NICAM_BIT_ERROR_TOO_HIGH         0x08000000
+#define      FLD_NICAM_LOCK           0x04000000
+#define      FLD_NICAM_UNLOCK         0x02000000
+#define      FLD_DFT4_TH_CMP          0x01000000
+/* Reserved [23:22] */
+#define      FLD_LOCK_IND_INT         0x00200000
+#define      FLD_DFT3_TH_CMP          0x00100000
+#define      FLD_DFT2_TH_CMP          0x00080000
+#define      FLD_DFT1_TH_CMP          0x00040000
+#define      FLD_FM2_DFT_TH_CMP       0x00020000
+#define      FLD_FM1_DFT_TH_CMP       0x00010000
+#define      FLD_VIDEO_PRESENT_EN     0x00008000
+#define      FLD_VIDEO_CHANGE_EN      0x00004000
+#define      FLD_RDS_READY_EN         0x00002000
+#define      FLD_AC97_INT_EN          0x00001000
+#define      FLD_NICAM_BIT_ERROR_TOO_HIGH_EN      0x00000800
+#define      FLD_NICAM_LOCK_EN        0x00000400
+#define      FLD_NICAM_UNLOCK_EN      0x00000200
+#define      FLD_DFT4_TH_CMP_EN       0x00000100
+/* Reserved [7] */
+#define      FLD_DW8051_INT6_CTL1     0x00000040
+#define      FLD_DW8051_INT5_CTL1     0x00000020
+#define      FLD_DW8051_INT4_CTL1     0x00000010
+#define      FLD_DW8051_INT3_CTL1     0x00000008
+#define      FLD_DW8051_INT2_CTL1     0x00000004
+#define      FLD_DW8051_INT1_CTL1     0x00000002
+#define      FLD_DW8051_INT0_CTL1     0x00000001
+
+/*****************************************************************************/
+#define      GENERAL_CTL              0x810
+#define      FLD_RDS_INT              0x80000000
+#define      FLD_NBER_INT             0x40000000
+#define      FLD_NLL_INT              0x20000000
+#define      FLD_IFL_INT              0x10000000
+#define      FLD_FDL_INT              0x08000000
+#define      FLD_AFC_INT              0x04000000
+#define      FLD_AMC_INT              0x02000000
+#define      FLD_AC97_INT_CTL         0x01000000
+#define      FLD_RDS_INT_DIS          0x00800000
+#define      FLD_NBER_INT_DIS         0x00400000
+#define      FLD_NLL_INT_DIS          0x00200000
+#define      FLD_IFL_INT_DIS          0x00100000
+#define      FLD_FDL_INT_DIS          0x00080000
+#define      FLD_FC_INT_DIS           0x00040000
+#define      FLD_AMC_INT_DIS          0x00020000
+#define      FLD_AC97_INT_DIS         0x00010000
+#define      FLD_REV_NUM              0x0000ff00
+/* Reserved [7:5] */
+#define      FLD_DBX_SOFT_RESET_REG   0x00000010
+#define      FLD_AD_SOFT_RESET_REG    0x00000008
+#define      FLD_SRC_SOFT_RESET_REG   0x00000004
+#define      FLD_CDMOD_SOFT_RESET     0x00000002
+#define      FLD_8051_SOFT_RESET      0x00000001
+
+/*****************************************************************************/
+#define      AAGC_CTL                 0x814
+#define      FLD_AFE_12DB_EN          0x80000000
+#define      FLD_AAGC_DEFAULT_EN      0x40000000
+#define      FLD_AAGC_DEFAULT         0x3f000000
+/* Reserved [23] */
+#define      FLD_AAGC_GAIN            0x00600000
+#define      FLD_AAGC_TH              0x001f0000
+/* Reserved [15:14] */
+#define      FLD_AAGC_HYST2           0x00003f00
+/* Reserved [7:6] */
+#define      FLD_AAGC_HYST1           0x0000003f
+
+/*****************************************************************************/
+#define      IF_SRC_CTL               0x818
+#define      FLD_DBX_BYPASS           0x80000000
+/* Reserved [30:25] */
+#define      FLD_IF_SRC_MODE          0x01000000
+/* Reserved [23:18] */
+#define      FLD_IF_SRC_PHASE_INC     0x0001ffff
+
+/*****************************************************************************/
+#define      ANALOG_DEMOD_CTL         0x81c
+#define      FLD_ROT1_PHACC_PROG      0xffff0000
+/* Reserved [15] */
+#define      FLD_FM1_DELAY_FIX        0x00007000
+#define      FLD_PDF4_SHIFT           0x00000c00
+#define      FLD_PDF3_SHIFT           0x00000300
+#define      FLD_PDF2_SHIFT           0x000000c0
+#define      FLD_PDF1_SHIFT           0x00000030
+#define      FLD_FMBYPASS_MODE2       0x00000008
+#define      FLD_FMBYPASS_MODE1       0x00000004
+#define      FLD_NICAM_MODE           0x00000002
+#define      FLD_BTSC_FMRADIO_MODE    0x00000001
+
+/*****************************************************************************/
+#define      ROT_FREQ_CTL             0x820
+#define      FLD_ROT3_PHACC_PROG      0xffff0000
+#define      FLD_ROT2_PHACC_PROG      0x0000ffff
+
+/*****************************************************************************/
+#define      FM_CTL                   0x824
+#define      FLD_FM2_DC_FB_SHIFT      0xf0000000
+#define      FLD_FM2_DC_INT_SHIFT     0x0f000000
+#define      FLD_FM2_AFC_RESET        0x00800000
+#define      FLD_FM2_DC_PASS_IN       0x00400000
+#define      FLD_FM2_DAGC_SHIFT       0x00380000
+#define      FLD_FM2_CORDIC_SHIFT     0x00070000
+#define      FLD_FM1_DC_FB_SHIFT      0x0000f000
+#define      FLD_FM1_DC_INT_SHIFT     0x00000f00
+#define      FLD_FM1_AFC_RESET        0x00000080
+#define      FLD_FM1_DC_PASS_IN       0x00000040
+#define      FLD_FM1_DAGC_SHIFT       0x00000038
+#define      FLD_FM1_CORDIC_SHIFT     0x00000007
+
+/*****************************************************************************/
+#define      LPF_PDF_CTL              0x828
+/* Reserved [31:30] */
+#define      FLD_LPF32_SHIFT1         0x30000000
+#define      FLD_LPF32_SHIFT2         0x0c000000
+#define      FLD_LPF160_SHIFTA        0x03000000
+#define      FLD_LPF160_SHIFTB        0x00c00000
+#define      FLD_LPF160_SHIFTC        0x00300000
+#define      FLD_LPF32_COEF_SEL2      0x000c0000
+#define      FLD_LPF32_COEF_SEL1      0x00030000
+#define      FLD_LPF160_COEF_SELC     0x0000c000
+#define      FLD_LPF160_COEF_SELB     0x00003000
+#define      FLD_LPF160_COEF_SELA     0x00000c00
+#define      FLD_LPF160_IN_EN_REG     0x00000300
+#define      FLD_PDF4_PDF_SEL         0x000000c0
+#define      FLD_PDF3_PDF_SEL         0x00000030
+#define      FLD_PDF2_PDF_SEL         0x0000000c
+#define      FLD_PDF1_PDF_SEL         0x00000003
+
+/*****************************************************************************/
+#define      DFT1_CTL1                0x82c
+#define      FLD_DFT1_DWELL           0xffff0000
+#define      FLD_DFT1_FREQ            0x0000ffff
+
+/*****************************************************************************/
+#define      DFT1_CTL2                0x830
+#define      FLD_DFT1_THRESHOLD       0xffffff00
+#define      FLD_DFT1_CMP_CTL         0x00000080
+#define      FLD_DFT1_AVG             0x00000070
+/* Reserved [3:1] */
+#define      FLD_DFT1_START           0x00000001
+
+/*****************************************************************************/
+#define      DFT1_STATUS              0x834
+#define      FLD_DFT1_DONE            0x80000000
+#define      FLD_DFT1_TH_CMP_STAT     0x40000000
+#define      FLD_DFT1_RESULT          0x3fffffff
+
+/*****************************************************************************/
+#define      DFT2_CTL1                0x838
+#define      FLD_DFT2_DWELL           0xffff0000
+#define      FLD_DFT2_FREQ            0x0000ffff
+
+/*****************************************************************************/
+#define      DFT2_CTL2                0x83C
+#define      FLD_DFT2_THRESHOLD       0xffffff00
+#define      FLD_DFT2_CMP_CTL         0x00000080
+#define      FLD_DFT2_AVG             0x00000070
+/* Reserved [3:1] */
+#define      FLD_DFT2_START           0x00000001
+
+/*****************************************************************************/
+#define      DFT2_STATUS              0x840
+#define      FLD_DFT2_DONE            0x80000000
+#define      FLD_DFT2_TH_CMP_STAT     0x40000000
+#define      FLD_DFT2_RESULT          0x3fffffff
+
+/*****************************************************************************/
+#define      DFT3_CTL1                0x844
+#define      FLD_DFT3_DWELL           0xffff0000
+#define      FLD_DFT3_FREQ            0x0000ffff
+
+/*****************************************************************************/
+#define      DFT3_CTL2                0x848
+#define      FLD_DFT3_THRESHOLD       0xffffff00
+#define      FLD_DFT3_CMP_CTL         0x00000080
+#define      FLD_DFT3_AVG             0x00000070
+/* Reserved [3:1] */
+#define      FLD_DFT3_START           0x00000001
+
+/*****************************************************************************/
+#define      DFT3_STATUS              0x84c
+#define      FLD_DFT3_DONE            0x80000000
+#define      FLD_DFT3_TH_CMP_STAT     0x40000000
+#define      FLD_DFT3_RESULT          0x3fffffff
+
+/*****************************************************************************/
+#define      DFT4_CTL1                0x850
+#define      FLD_DFT4_DWELL           0xffff0000
+#define      FLD_DFT4_FREQ            0x0000ffff
+
+/*****************************************************************************/
+#define      DFT4_CTL2                0x854
+#define      FLD_DFT4_THRESHOLD       0xffffff00
+#define      FLD_DFT4_CMP_CTL         0x00000080
+#define      FLD_DFT4_AVG             0x00000070
+/* Reserved [3:1] */
+#define      FLD_DFT4_START           0x00000001
+
+/*****************************************************************************/
+#define      DFT4_STATUS              0x858
+#define      FLD_DFT4_DONE            0x80000000
+#define      FLD_DFT4_TH_CMP_STAT     0x40000000
+#define      FLD_DFT4_RESULT          0x3fffffff
+
+/*****************************************************************************/
+#define      AM_MTS_DET               0x85c
+#define      FLD_AM_MTS_MODE          0x80000000
+/* Reserved [30:26] */
+#define      FLD_AM_SUB               0x02000000
+#define      FLD_AM_GAIN_EN           0x01000000
+/* Reserved [23:16] */
+#define      FLD_AMMTS_GAIN_SCALE     0x0000e000
+#define      FLD_MTS_PDF_SHIFT        0x00001800
+#define      FLD_AM_REG_GAIN          0x00000700
+#define      FLD_AGC_REF              0x000000ff
+
+/*****************************************************************************/
+#define      ANALOG_MUX_CTL           0x860
+/* Reserved [31:29] */
+#define      FLD_MUX21_SEL            0x10000000
+#define      FLD_MUX20_SEL            0x08000000
+#define      FLD_MUX19_SEL            0x04000000
+#define      FLD_MUX18_SEL            0x02000000
+#define      FLD_MUX17_SEL            0x01000000
+#define      FLD_MUX16_SEL            0x00800000
+#define      FLD_MUX15_SEL            0x00400000
+#define      FLD_MUX14_SEL            0x00300000
+#define      FLD_MUX13_SEL            0x000C0000
+#define      FLD_MUX12_SEL            0x00020000
+#define      FLD_MUX11_SEL            0x00018000
+#define      FLD_MUX10_SEL            0x00004000
+#define      FLD_MUX9_SEL             0x00002000
+#define      FLD_MUX8_SEL             0x00001000
+#define      FLD_MUX7_SEL             0x00000800
+#define      FLD_MUX6_SEL             0x00000600
+#define      FLD_MUX5_SEL             0x00000100
+#define      FLD_MUX4_SEL             0x000000c0
+#define      FLD_MUX3_SEL             0x00000030
+#define      FLD_MUX2_SEL             0x0000000c
+#define      FLD_MUX1_SEL             0x00000003
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DPLL_CTRL1               0x864
+#define      DIG_PLL_CTL1             0x864
+
+#define      FLD_PLL_STATUS           0x07000000
+#define      FLD_BANDWIDTH_SELECT     0x00030000
+#define      FLD_PLL_SHIFT_REG        0x00007000
+#define      FLD_PHASE_SHIFT          0x000007ff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DPLL_CTRL2               0x868
+#define      DIG_PLL_CTL2             0x868
+#define      FLD_PLL_UNLOCK_THR       0xff000000
+#define      FLD_PLL_LOCK_THR         0x00ff0000
+/* Reserved [15:8] */
+#define      FLD_AM_PDF_SEL2          0x000000c0
+#define      FLD_AM_PDF_SEL1          0x00000030
+#define      FLD_DPLL_FSM_CTRL        0x0000000c
+/* Reserved [1] */
+#define      FLD_PLL_PILOT_DET        0x00000001
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DPLL_CTRL3               0x86c
+#define      DIG_PLL_CTL3             0x86c
+#define      FLD_DISABLE_LOOP         0x01000000
+#define      FLD_A1_DS1_SEL           0x000c0000
+#define      FLD_A1_DS2_SEL           0x00030000
+#define      FLD_A1_KI                0x0000ff00
+#define      FLD_A1_KD                0x000000ff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DPLL_CTRL4               0x870
+#define      DIG_PLL_CTL4             0x870
+#define      FLD_A2_DS1_SEL           0x000c0000
+#define      FLD_A2_DS2_SEL           0x00030000
+#define      FLD_A2_KI                0x0000ff00
+#define      FLD_A2_KD                0x000000ff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DPLL_CTRL5               0x874
+#define      DIG_PLL_CTL5             0x874
+#define      FLD_TRK_DS1_SEL          0x000c0000
+#define      FLD_TRK_DS2_SEL          0x00030000
+#define      FLD_TRK_KI               0x0000ff00
+#define      FLD_TRK_KD               0x000000ff
+
+/*****************************************************************************/
+#define      DEEMPH_GAIN_CTL          0x878
+#define      FLD_DEEMPH2_GAIN         0xFFFF0000
+#define      FLD_DEEMPH1_GAIN         0x0000FFFF
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DEEMPH_COEFF1            0x87c
+#define      DEEMPH_COEF1             0x87c
+#define      FLD_DEEMPH_B0            0xffff0000
+#define      FLD_DEEMPH_A0            0x0000ffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DEEMPH_COEFF2            0x880
+#define      DEEMPH_COEF2             0x880
+#define      FLD_DEEMPH_B1            0xFFFF0000
+#define      FLD_DEEMPH_A1            0x0000FFFF
+
+/*****************************************************************************/
+#define      DBX1_CTL1                0x884
+#define      FLD_DBX1_WBE_GAIN        0xffff0000
+#define      FLD_DBX1_IN_GAIN         0x0000ffff
+
+/*****************************************************************************/
+#define      DBX1_CTL2                0x888
+#define      FLD_DBX1_SE_BYPASS       0xffff0000
+#define      FLD_DBX1_SE_GAIN         0x0000ffff
+
+/*****************************************************************************/
+#define      DBX1_RMS_SE              0x88C
+#define      FLD_DBX1_RMS_WBE         0xffff0000
+#define      FLD_DBX1_RMS_SE_FLD      0x0000ffff
+
+/*****************************************************************************/
+#define      DBX2_CTL1                0x890
+#define      FLD_DBX2_WBE_GAIN        0xffff0000
+#define      FLD_DBX2_IN_GAIN         0x0000ffff
+
+/*****************************************************************************/
+#define      DBX2_CTL2                0x894
+#define      FLD_DBX2_SE_BYPASS       0xffff0000
+#define      FLD_DBX2_SE_GAIN         0x0000ffff
+
+/*****************************************************************************/
+#define      DBX2_RMS_SE              0x898
+#define      FLD_DBX2_RMS_WBE         0xffff0000
+#define      FLD_DBX2_RMS_SE_FLD      0x0000ffff
+
+/*****************************************************************************/
+#define      AM_FM_DIFF               0x89c
+/* Reserved [31] */
+#define      FLD_FM_DIFF_OUT          0x7fff0000
+/* Reserved [15] */
+#define      FLD_AM_DIFF_OUT          0x00007fff
+
+/*****************************************************************************/
+#define      NICAM_FAW                0x8a0
+#define      FLD_FAWDETWINEND         0xFc000000
+#define      FLD_FAWDETWINSTR         0x03ff0000
+/* Reserved [15:12] */
+#define      FLD_FAWDETTHRSHLD3       0x00000f00
+#define      FLD_FAWDETTHRSHLD2       0x000000f0
+#define      FLD_FAWDETTHRSHLD1       0x0000000f
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DEEMPH_GAIN              0x8a4
+#define      NICAM_DEEMPHGAIN         0x8a4
+/* Reserved [31:18] */
+#define      FLD_DEEMPHGAIN           0x0003ffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DEEMPH_NUMER1            0x8a8
+#define      NICAM_DEEMPHNUMER1       0x8a8
+/* Reserved [31:18] */
+#define      FLD_DEEMPHNUMER1         0x0003ffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DEEMPH_NUMER2            0x8ac
+#define      NICAM_DEEMPHNUMER2       0x8ac
+/* Reserved [31:18] */
+#define      FLD_DEEMPHNUMER2         0x0003ffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DEEMPH_DENOM1            0x8b0
+#define      NICAM_DEEMPHDENOM1       0x8b0
+/* Reserved [31:18] */
+#define      FLD_DEEMPHDENOM1         0x0003ffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      DEEMPH_DENOM2            0x8b4
+#define      NICAM_DEEMPHDENOM2       0x8b4
+/* Reserved [31:18] */
+#define      FLD_DEEMPHDENOM2         0x0003ffff
+
+/*****************************************************************************/
+#define      NICAM_ERRLOG_CTL1        0x8B8
+/* Reserved [31:28] */
+#define      FLD_ERRINTRPTTHSHLD1     0x0fff0000
+/* Reserved [15:12] */
+#define      FLD_ERRLOGPERIOD         0x00000fff
+
+/*****************************************************************************/
+#define      NICAM_ERRLOG_CTL2        0x8bc
+/* Reserved [31:28] */
+#define      FLD_ERRINTRPTTHSHLD3     0x0fff0000
+/* Reserved [15:12] */
+#define      FLD_ERRINTRPTTHSHLD2     0x00000fff
+
+/*****************************************************************************/
+#define      NICAM_ERRLOG_STS1        0x8c0
+/* Reserved [31:28] */
+#define      FLD_ERRLOG2              0x0fff0000
+/* Reserved [15:12] */
+#define      FLD_ERRLOG1              0x00000fff
+
+/*****************************************************************************/
+#define      NICAM_ERRLOG_STS2        0x8c4
+/* Reserved [31:12] */
+#define      FLD_ERRLOG3              0x00000fff
+
+/*****************************************************************************/
+#define      NICAM_STATUS             0x8c8
+/* Reserved [31:20] */
+#define      FLD_NICAM_CIB            0x000c0000
+#define      FLD_NICAM_LOCK_STAT      0x00020000
+#define      FLD_NICAM_MUTE           0x00010000
+#define      FLD_NICAMADDIT_DATA      0x0000ffe0
+#define      FLD_NICAMCNTRL           0x0000001f
+
+/*****************************************************************************/
+#define      DEMATRIX_CTL             0x8cc
+#define      FLD_AC97_IN_SHIFT        0xf0000000
+#define      FLD_I2S_IN_SHIFT         0x0f000000
+#define      FLD_DEMATRIX_SEL_CTL     0x00ff0000
+/* Reserved [15:11] */
+#define      FLD_DMTRX_BYPASS         0x00000400
+#define      FLD_DEMATRIX_MODE        0x00000300
+/* Reserved [7:6] */
+#define      FLD_PH_DBX_SEL           0x00000020
+#define      FLD_PH_CH_SEL            0x00000010
+#define      FLD_PHASE_FIX            0x0000000f
+
+/*****************************************************************************/
+#define      PATH1_CTL1               0x8d0
+/* Reserved [31:29] */
+#define      FLD_PATH1_MUTE_CTL       0x1f000000
+/* Reserved [23:22] */
+#define      FLD_PATH1_AVC_CG         0x00300000
+#define      FLD_PATH1_AVC_RT         0x000f0000
+#define      FLD_PATH1_AVC_AT         0x0000f000
+#define      FLD_PATH1_AVC_STEREO     0x00000800
+#define      FLD_PATH1_AVC_CR         0x00000700
+#define      FLD_PATH1_AVC_RMS_CON    0x000000f0
+#define      FLD_PATH1_SEL_CTL        0x0000000f
+
+/*****************************************************************************/
+#define      PATH1_VOL_CTL            0x8d4
+#define      FLD_PATH1_AVC_THRESHOLD  0x7fff0000
+#define      FLD_PATH1_BAL_LEFT       0x00008000
+#define      FLD_PATH1_BAL_LEVEL      0x00007f00
+#define      FLD_PATH1_VOLUME         0x000000ff
+
+/*****************************************************************************/
+#define      PATH1_EQ_CTL             0x8d8
+/* Reserved [31:30] */
+#define      FLD_PATH1_EQ_TREBLE_VOL  0x3f000000
+/* Reserved [23:22] */
+#define      FLD_PATH1_EQ_MID_VOL     0x003f0000
+/* Reserved [15:14] */
+#define      FLD_PATH1_EQ_BASS_VOL    0x00003f00
+/* Reserved [7:1] */
+#define      FLD_PATH1_EQ_BAND_SEL    0x00000001
+
+/*****************************************************************************/
+#define      PATH1_SC_CTL             0x8dc
+#define      FLD_PATH1_SC_THRESHOLD   0x7fff0000
+#define      FLD_PATH1_SC_RT          0x0000f000
+#define      FLD_PATH1_SC_AT          0x00000f00
+#define      FLD_PATH1_SC_STEREO      0x00000080
+#define      FLD_PATH1_SC_CR          0x00000070
+#define      FLD_PATH1_SC_RMS_CON     0x0000000f
+
+/*****************************************************************************/
+#define      PATH2_CTL1               0x8e0
+/* Reserved [31:26] */
+#define      FLD_PATH2_MUTE_CTL       0x03000000
+/* Reserved [23:22] */
+#define      FLD_PATH2_AVC_CG         0x00300000
+#define      FLD_PATH2_AVC_RT         0x000f0000
+#define      FLD_PATH2_AVC_AT         0x0000f000
+#define      FLD_PATH2_AVC_STEREO     0x00000800
+#define      FLD_PATH2_AVC_CR         0x00000700
+#define      FLD_PATH2_AVC_RMS_CON    0x000000f0
+#define      FLD_PATH2_SEL_CTL        0x0000000f
+
+/*****************************************************************************/
+#define      PATH2_VOL_CTL            0x8e4
+#define      FLD_PATH2_AVC_THRESHOLD  0xffff0000
+#define      FLD_PATH2_BAL_LEFT       0x00008000
+#define      FLD_PATH2_BAL_LEVEL      0x00007f00
+#define      FLD_PATH2_VOLUME         0x000000ff
+
+/*****************************************************************************/
+#define      PATH2_EQ_CTL             0x8e8
+/* Reserved [31:30] */
+#define      FLD_PATH2_EQ_TREBLE_VOL  0x3f000000
+/* Reserved [23:22] */
+#define      FLD_PATH2_EQ_MID_VOL     0x003f0000
+/* Reserved [15:14] */
+#define      FLD_PATH2_EQ_BASS_VOL    0x00003f00
+/* Reserved [7:1] */
+#define      FLD_PATH2_EQ_BAND_SEL    0x00000001
+
+/*****************************************************************************/
+#define      PATH2_SC_CTL             0x8eC
+#define      FLD_PATH2_SC_THRESHOLD   0xffff0000
+#define      FLD_PATH2_SC_RT          0x0000f000
+#define      FLD_PATH2_SC_AT          0x00000f00
+#define      FLD_PATH2_SC_STEREO      0x00000080
+#define      FLD_PATH2_SC_CR          0x00000070
+#define      FLD_PATH2_SC_RMS_CON     0x0000000f
+
+/*****************************************************************************/
+#define      SRC_CTL                  0x8f0
+#define      FLD_SRC_STATUS           0xffffff00
+#define      FLD_FIFO_LF_EN           0x000000fc
+#define      FLD_BYPASS_LI            0x00000002
+#define      FLD_BYPASS_PF            0x00000001
+
+/*****************************************************************************/
+#define      SRC_LF_COEF              0x8f4
+#define      FLD_LOOP_FILTER_COEF2    0xffff0000
+#define      FLD_LOOP_FILTER_COEF1    0x0000ffff
+
+/*****************************************************************************/
+#define      SRC1_CTL                 0x8f8
+/* Reserved [31:28] */
+#define      FLD_SRC1_FIFO_RD_TH      0x0f000000
+/* Reserved [23:18] */
+#define      FLD_SRC1_PHASE_INC       0x0003ffff
+
+/*****************************************************************************/
+#define      SRC2_CTL                 0x8fc
+/* Reserved [31:28] */
+#define      FLD_SRC2_FIFO_RD_TH      0x0f000000
+/* Reserved [23:18] */
+#define      FLD_SRC2_PHASE_INC       0x0003ffff
+
+/*****************************************************************************/
+#define      SRC3_CTL                 0x900
+/* Reserved [31:28] */
+#define      FLD_SRC3_FIFO_RD_TH      0x0f000000
+/* Reserved [23:18] */
+#define      FLD_SRC3_PHASE_INC       0x0003ffff
+
+/*****************************************************************************/
+#define      SRC4_CTL                 0x904
+/* Reserved [31:28] */
+#define      FLD_SRC4_FIFO_RD_TH      0x0f000000
+/* Reserved [23:18] */
+#define      FLD_SRC4_PHASE_INC       0x0003ffff
+
+/*****************************************************************************/
+#define      SRC5_CTL                 0x908
+/* Reserved [31:28] */
+#define      FLD_SRC5_FIFO_RD_TH      0x0f000000
+/* Reserved [23:18] */
+#define      FLD_SRC5_PHASE_INC       0x0003ffff
+
+/*****************************************************************************/
+#define      SRC6_CTL                 0x90c
+/* Reserved [31:28] */
+#define      FLD_SRC6_FIFO_RD_TH      0x0f000000
+/* Reserved [23:18] */
+#define      FLD_SRC6_PHASE_INC       0x0003ffff
+
+/*****************************************************************************/
+#define      BAND_OUT_SEL             0x910
+#define      FLD_SRC6_IN_SEL          0xc0000000
+#define      FLD_SRC6_CLK_SEL         0x30000000
+#define      FLD_SRC5_IN_SEL          0x0c000000
+#define      FLD_SRC5_CLK_SEL         0x03000000
+#define      FLD_SRC4_IN_SEL          0x00c00000
+#define      FLD_SRC4_CLK_SEL         0x00300000
+#define      FLD_SRC3_IN_SEL          0x000c0000
+#define      FLD_SRC3_CLK_SEL         0x00030000
+#define      FLD_BASEBAND_BYPASS_CTL  0x0000ff00
+#define      FLD_AC97_SRC_SEL         0x000000c0
+#define      FLD_I2S_SRC_SEL          0x00000030
+#define      FLD_PARALLEL2_SRC_SEL    0x0000000c
+#define      FLD_PARALLEL1_SRC_SEL    0x00000003
+
+/*****************************************************************************/
+#define      I2S_IN_CTL               0x914
+/* Reserved [31:11] */
+#define      FLD_I2S_UP2X_BW20K       0x00000400
+#define      FLD_I2S_UP2X_BYPASS      0x00000200
+#define      FLD_I2S_IN_MASTER_MODE   0x00000100
+#define      FLD_I2S_IN_SONY_MODE     0x00000080
+#define      FLD_I2S_IN_RIGHT_JUST    0x00000040
+#define      FLD_I2S_IN_WS_SEL        0x00000020
+#define      FLD_I2S_IN_BCN_DEL       0x0000001f
+
+/*****************************************************************************/
+#define      I2S_OUT_CTL              0x918
+/* Reserved [31:17] */
+#define      FLD_I2S_OUT_SOFT_RESET_EN  0x00010000
+/* Reserved [15:9] */
+#define      FLD_I2S_OUT_MASTER_MODE  0x00000100
+#define      FLD_I2S_OUT_SONY_MODE    0x00000080
+#define      FLD_I2S_OUT_RIGHT_JUST   0x00000040
+#define      FLD_I2S_OUT_WS_SEL       0x00000020
+#define      FLD_I2S_OUT_BCN_DEL      0x0000001f
+
+/*****************************************************************************/
+#define      AC97_CTL                 0x91c
+/* Reserved [31:26] */
+#define      FLD_AC97_UP2X_BW20K      0x02000000
+#define      FLD_AC97_UP2X_BYPASS     0x01000000
+/* Reserved [23:17] */
+#define      FLD_AC97_RST_ACL         0x00010000
+/* Reserved [15:9] */
+#define      FLD_AC97_WAKE_UP_SYNC    0x00000100
+/* Reserved [7:1] */
+#define      FLD_AC97_SHUTDOWN        0x00000001
+
+/* Cx231xx redefine */
+#define      QPSK_IAGC_CTL1            0x94c
+#define      QPSK_IAGC_CTL2            0x950
+#define      QPSK_FEPR_FREQ            0x954
+#define      QPSK_BTL_CTL1             0x958
+#define      QPSK_BTL_CTL2             0x95c
+#define      QPSK_CTL_CTL1             0x960
+#define      QPSK_CTL_CTL2             0x964
+#define      QPSK_MF_FAGC_CTL          0x968
+#define      QPSK_EQ_CTL               0x96c
+#define      QPSK_LOCK_CTL             0x970
+
+/*****************************************************************************/
+#define      FM1_DFT_CTL              0x9a8
+#define      FLD_FM1_DFT_THRESHOLD    0xffff0000
+/* Reserved [15:8] */
+#define      FLD_FM1_DFT_CMP_CTL      0x00000080
+#define      FLD_FM1_DFT_AVG          0x00000070
+/* Reserved [3:1] */
+#define      FLD_FM1_DFT_START        0x00000001
+
+/*****************************************************************************/
+#define      FM1_DFT_STATUS           0x9ac
+#define      FLD_FM1_DFT_DONE         0x80000000
+/* Reserved [30:19] */
+#define      FLD_FM_DFT_TH_CMP        0x00040000
+#define      FLD_FM1_DFT              0x0003ffff
+
+/*****************************************************************************/
+#define      FM2_DFT_CTL              0x9b0
+#define      FLD_FM2_DFT_THRESHOLD    0xffff0000
+/* Reserved [15:8] */
+#define      FLD_FM2_DFT_CMP_CTL      0x00000080
+#define      FLD_FM2_DFT_AVG          0x00000070
+/* Reserved [3:1] */
+#define      FLD_FM2_DFT_START        0x00000001
+
+/*****************************************************************************/
+#define      FM2_DFT_STATUS           0x9b4
+#define      FLD_FM2_DFT_DONE         0x80000000
+/* Reserved [30:19] */
+#define      FLD_FM2_DFT_TH_CMP_STAT  0x00040000
+#define      FLD_FM2_DFT              0x0003ffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      AAGC_STATUS_REG          0x9b8
+#define      AAGC_STATUS              0x9b8
+/* Reserved [31:27] */
+#define      FLD_FM2_DAGC_OUT         0x07000000
+/* Reserved [23:19] */
+#define      FLD_FM1_DAGC_OUT         0x00070000
+/* Reserved [15:6] */
+#define      FLD_AFE_VGA_OUT          0x0000003f
+
+/*****************************************************************************/
+#define      MTS_GAIN_STATUS          0x9bc
+/* Reserved [31:14] */
+#define      FLD_MTS_GAIN             0x00003fff
+
+#define      RDS_OUT                  0x9c0
+#define      FLD_RDS_Q                0xffff0000
+#define      FLD_RDS_I                0x0000ffff
+
+/*****************************************************************************/
+#define      AUTOCONFIG_REG           0x9c4
+/* Reserved [31:4] */
+#define      FLD_AUTOCONFIG_MODE      0x0000000f
+
+#define      FM_AFC                   0x9c8
+#define      FLD_FM2_AFC              0xffff0000
+#define      FLD_FM1_AFC              0x0000ffff
+
+/*****************************************************************************/
+/* Cx231xx redefine */
+#define      NEW_SPARE                0x9cc
+#define      NEW_SPARE_REG            0x9cc
+
+/*****************************************************************************/
+#define      DBX_ADJ                  0x9d0
+/* Reserved [31:28] */
+#define      FLD_DBX2_ADJ             0x0fff0000
+/* Reserved [15:12] */
+#define      FLD_DBX1_ADJ             0x00000fff
+
+#define      VID_FMT_AUTO              0
+#define      VID_FMT_NTSC_M            1
+#define      VID_FMT_NTSC_J            2
+#define      VID_FMT_NTSC_443          3
+#define      VID_FMT_PAL_BDGHI         4
+#define      VID_FMT_PAL_M             5
+#define      VID_FMT_PAL_N             6
+#define      VID_FMT_PAL_NC            7
+#define      VID_FMT_PAL_60            8
+#define      VID_FMT_SECAM             12
+#define      VID_FMT_SECAM_60          13
+
+#define      INPUT_MODE_CVBS_0         0       /* INPUT_MODE_VALUE(0) */
+#define      INPUT_MODE_YC_1           1       /* INPUT_MODE_VALUE(1) */
+#define      INPUT_MODE_YC2_2          2       /* INPUT_MODE_VALUE(2) */
+#define      INPUT_MODE_YUV_3          3       /* INPUT_MODE_VALUE(3) */
+
+#define      LUMA_LPF_LOW_BANDPASS     0       /* 0.6Mhz LPF BW */
+#define      LUMA_LPF_MEDIUM_BANDPASS  1       /* 1.0Mhz LPF BW */
+#define      LUMA_LPF_HIGH_BANDPASS    2       /* 1.5Mhz LPF BW */
+
+#define      UV_LPF_LOW_BANDPASS       0       /* 0.6Mhz LPF BW */
+#define      UV_LPF_MEDIUM_BANDPASS    1       /* 1.0Mhz LPF BW */
+#define      UV_LPF_HIGH_BANDPASS      2       /* 1.5Mhz LPF BW */
+
+#define      TWO_TAP_FILT              0
+#define      THREE_TAP_FILT            1
+#define      FOUR_TAP_FILT             2
+#define      FIVE_TAP_FILT             3
+
+#define      AUD_CHAN_SRC_PARALLEL     0
+#define      AUD_CHAN_SRC_I2S_INPUT    1
+#define      AUD_CHAN_SRC_FLATIRON     2
+#define      AUD_CHAN_SRC_PARALLEL3    3
+
+#define      OUT_MODE_601              0
+#define      OUT_MODE_656              1
+#define      OUT_MODE_VIP11            2
+#define      OUT_MODE_VIP20            3
+
+#define      PHASE_INC_49MHZ          0x0df22
+#define      PHASE_INC_56MHZ          0x0fa5b
+#define      PHASE_INC_28MHZ          0x010000
+
+#endif
diff --git a/drivers/media/video/cx231xx/cx231xx-vbi.c b/drivers/media/video/cx231xx/cx231xx-vbi.c
new file mode 100644 (file)
index 0000000..9418052
--- /dev/null
@@ -0,0 +1,701 @@
+/*
+   cx231xx_vbi.c - driver for Conexant Cx23100/101/102 USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+       Based on cx88 driver
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/bitmap.h>
+#include <linux/usb.h>
+#include <linux/i2c.h>
+#include <linux/version.h>
+#include <linux/mm.h>
+#include <linux/mutex.h>
+
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
+#include <media/v4l2-chip-ident.h>
+#include <media/msp3400.h>
+#include <media/tuner.h>
+
+#include "cx231xx.h"
+#include "cx231xx-vbi.h"
+
+static inline void print_err_status(struct cx231xx *dev, int packet, int status)
+{
+       char *errmsg = "Unknown";
+
+       switch (status) {
+       case -ENOENT:
+               errmsg = "unlinked synchronuously";
+               break;
+       case -ECONNRESET:
+               errmsg = "unlinked asynchronuously";
+               break;
+       case -ENOSR:
+               errmsg = "Buffer error (overrun)";
+               break;
+       case -EPIPE:
+               errmsg = "Stalled (device not responding)";
+               break;
+       case -EOVERFLOW:
+               errmsg = "Babble (bad cable?)";
+               break;
+       case -EPROTO:
+               errmsg = "Bit-stuff error (bad cable?)";
+               break;
+       case -EILSEQ:
+               errmsg = "CRC/Timeout (could be anything)";
+               break;
+       case -ETIME:
+               errmsg = "Device does not respond";
+               break;
+       }
+       if (packet < 0) {
+               cx231xx_err(DRIVER_NAME "URB status %d [%s].\n", status,
+                           errmsg);
+       } else {
+               cx231xx_err(DRIVER_NAME "URB packet %d, status %d [%s].\n",
+                           packet, status, errmsg);
+       }
+}
+
+/*
+ * Controls the isoc copy of each urb packet
+ */
+static inline int cx231xx_isoc_vbi_copy(struct cx231xx *dev, struct urb *urb)
+{
+       struct cx231xx_buffer *buf;
+       struct cx231xx_dmaqueue *dma_q = urb->context;
+       int rc = 1;
+       unsigned char *p_buffer;
+       u32 bytes_parsed = 0, buffer_size = 0;
+       u8 sav_eav = 0;
+
+       if (!dev)
+               return 0;
+
+       if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED))
+               return 0;
+
+       if (urb->status < 0) {
+               print_err_status(dev, -1, urb->status);
+               if (urb->status == -ENOENT)
+                       return 0;
+       }
+
+       buf = dev->vbi_mode.isoc_ctl.buf;
+
+       /* get buffer pointer and length */
+       p_buffer = urb->transfer_buffer;
+       buffer_size = urb->actual_length;
+
+       if (buffer_size > 0) {
+               bytes_parsed = 0;
+
+               if (dma_q->is_partial_line) {
+                       /* Handle the case where we were working on a partial
+                          line */
+                       sav_eav = dma_q->last_sav;
+               } else {
+                       /* Check for a SAV/EAV overlapping the
+                          buffer boundary */
+
+                       sav_eav = cx231xx_find_boundary_SAV_EAV(p_buffer,
+                                                         dma_q->partial_buf,
+                                                         &bytes_parsed);
+               }
+
+               sav_eav &= 0xF0;
+               /* Get the first line if we have some portion of an SAV/EAV from
+                  the last buffer or a partial line */
+               if (sav_eav) {
+                       bytes_parsed += cx231xx_get_vbi_line(dev, dma_q,
+                               sav_eav,                       /* SAV/EAV */
+                               p_buffer + bytes_parsed,       /* p_buffer */
+                               buffer_size - bytes_parsed);   /* buffer size */
+               }
+
+               /* Now parse data that is completely in this buffer */
+               dma_q->is_partial_line = 0;
+
+               while (bytes_parsed < buffer_size) {
+                       u32 bytes_used = 0;
+
+                       sav_eav = cx231xx_find_next_SAV_EAV(
+                               p_buffer + bytes_parsed,        /* p_buffer */
+                               buffer_size - bytes_parsed, /* buffer size */
+                               &bytes_used);   /* bytes used to get SAV/EAV */
+
+                       bytes_parsed += bytes_used;
+
+                       sav_eav &= 0xF0;
+                       if (sav_eav && (bytes_parsed < buffer_size)) {
+                               bytes_parsed += cx231xx_get_vbi_line(dev,
+                                       dma_q, sav_eav, /* SAV/EAV */
+                                       p_buffer+bytes_parsed, /* p_buffer */
+                                       buffer_size-bytes_parsed);/*buf size*/
+                       }
+               }
+
+               /* Save the last four bytes of the buffer so we can
+               check the buffer boundary condition next time */
+               memcpy(dma_q->partial_buf, p_buffer + buffer_size - 4, 4);
+               bytes_parsed = 0;
+       }
+
+       return rc;
+}
+
+/* ------------------------------------------------------------------
+       Vbi buf operations
+   ------------------------------------------------------------------*/
+
+static int
+vbi_buffer_setup(struct videobuf_queue *vq, unsigned int *count,
+                unsigned int *size)
+{
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx *dev = fh->dev;
+       u32 height = 0;
+
+       height = ((dev->norm & V4L2_STD_625_50) ?
+                 PAL_VBI_LINES : NTSC_VBI_LINES);
+
+       *size = (dev->width * height * 2);
+       if (0 == *count)
+               *count = CX231XX_DEF_VBI_BUF;
+
+       if (*count < CX231XX_MIN_BUF)
+               *count = CX231XX_MIN_BUF;
+
+       return 0;
+}
+
+/* This is called *without* dev->slock held; please keep it that way */
+static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf)
+{
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx *dev = fh->dev;
+       unsigned long flags = 0;
+       if (in_interrupt())
+               BUG();
+
+       /* We used to wait for the buffer to finish here, but this didn't work
+          because, as we were keeping the state as VIDEOBUF_QUEUED,
+          videobuf_queue_cancel marked it as finished for us.
+          (Also, it could wedge forever if the hardware was misconfigured.)
+
+          This should be safe; by the time we get here, the buffer isn't
+          queued anymore. If we ever start marking the buffers as
+          VIDEOBUF_ACTIVE, it won't be, though.
+        */
+       spin_lock_irqsave(&dev->vbi_mode.slock, flags);
+       if (dev->vbi_mode.isoc_ctl.buf == buf)
+               dev->vbi_mode.isoc_ctl.buf = NULL;
+       spin_unlock_irqrestore(&dev->vbi_mode.slock, flags);
+
+       videobuf_vmalloc_free(&buf->vb);
+       buf->vb.state = VIDEOBUF_NEEDS_INIT;
+}
+
+static int
+vbi_buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
+                  enum v4l2_field field)
+{
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx_buffer *buf =
+           container_of(vb, struct cx231xx_buffer, vb);
+       struct cx231xx *dev = fh->dev;
+       int rc = 0, urb_init = 0;
+       u32 height = 0;
+
+       height = ((dev->norm & V4L2_STD_625_50) ?
+                 PAL_VBI_LINES : NTSC_VBI_LINES);
+       buf->vb.size = ((dev->width << 1) * height);
+
+       if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size)
+               return -EINVAL;
+
+       buf->vb.width = dev->width;
+       buf->vb.height = height;
+       buf->vb.field = field;
+       buf->vb.field = V4L2_FIELD_SEQ_TB;
+
+       if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
+               rc = videobuf_iolock(vq, &buf->vb, NULL);
+               if (rc < 0)
+                       goto fail;
+       }
+
+       if (!dev->vbi_mode.isoc_ctl.num_bufs)
+               urb_init = 1;
+
+       if (urb_init) {
+               rc = cx231xx_init_vbi_isoc(dev, CX231XX_NUM_VBI_PACKETS,
+                                          CX231XX_NUM_VBI_BUFS,
+                                          dev->vbi_mode.alt_max_pkt_size[0],
+                                          cx231xx_isoc_vbi_copy);
+               if (rc < 0)
+                       goto fail;
+       }
+
+       buf->vb.state = VIDEOBUF_PREPARED;
+       return 0;
+
+fail:
+       free_buffer(vq, buf);
+       return rc;
+}
+
+static void
+vbi_buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
+{
+       struct cx231xx_buffer *buf =
+           container_of(vb, struct cx231xx_buffer, vb);
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx *dev = fh->dev;
+       struct cx231xx_dmaqueue *vidq = &dev->vbi_mode.vidq;
+
+       buf->vb.state = VIDEOBUF_QUEUED;
+       list_add_tail(&buf->vb.queue, &vidq->active);
+
+}
+
+static void vbi_buffer_release(struct videobuf_queue *vq,
+                              struct videobuf_buffer *vb)
+{
+       struct cx231xx_buffer *buf =
+           container_of(vb, struct cx231xx_buffer, vb);
+
+
+       free_buffer(vq, buf);
+}
+
+struct videobuf_queue_ops cx231xx_vbi_qops = {
+       .buf_setup   = vbi_buffer_setup,
+       .buf_prepare = vbi_buffer_prepare,
+       .buf_queue   = vbi_buffer_queue,
+       .buf_release = vbi_buffer_release,
+};
+
+/* ------------------------------------------------------------------
+       URB control
+   ------------------------------------------------------------------*/
+
+/*
+ * IRQ callback, called by URB callback
+ */
+static void cx231xx_irq_vbi_callback(struct urb *urb)
+{
+       struct cx231xx_dmaqueue *dma_q = urb->context;
+       struct cx231xx_video_mode *vmode =
+           container_of(dma_q, struct cx231xx_video_mode, vidq);
+       struct cx231xx *dev = container_of(vmode, struct cx231xx, vbi_mode);
+       int rc;
+
+       switch (urb->status) {
+       case 0:         /* success */
+       case -ETIMEDOUT:        /* NAK */
+               break;
+       case -ECONNRESET:       /* kill */
+       case -ENOENT:
+       case -ESHUTDOWN:
+               return;
+       default:                /* error */
+               cx231xx_err(DRIVER_NAME "urb completition error %d.\n",
+                           urb->status);
+               break;
+       }
+
+       /* Copy data from URB */
+       spin_lock(&dev->vbi_mode.slock);
+       rc = dev->vbi_mode.isoc_ctl.isoc_copy(dev, urb);
+       spin_unlock(&dev->vbi_mode.slock);
+
+       /* Reset status */
+       urb->status = 0;
+
+       urb->status = usb_submit_urb(urb, GFP_ATOMIC);
+       if (urb->status) {
+               cx231xx_err(DRIVER_NAME "urb resubmit failed (error=%i)\n",
+                           urb->status);
+       }
+}
+
+/*
+ * Stop and Deallocate URBs
+ */
+void cx231xx_uninit_vbi_isoc(struct cx231xx *dev)
+{
+       struct urb *urb;
+       int i;
+
+       cx231xx_info(DRIVER_NAME "cx231xx: called cx231xx_uninit_vbi_isoc\n");
+
+       dev->vbi_mode.isoc_ctl.nfields = -1;
+       for (i = 0; i < dev->vbi_mode.isoc_ctl.num_bufs; i++) {
+               urb = dev->vbi_mode.isoc_ctl.urb[i];
+               if (urb) {
+                       if (!irqs_disabled())
+                               usb_kill_urb(urb);
+                       else
+                               usb_unlink_urb(urb);
+
+                       if (dev->vbi_mode.isoc_ctl.transfer_buffer[i]) {
+
+                               kfree(dev->vbi_mode.isoc_ctl.
+                                     transfer_buffer[i]);
+                               dev->vbi_mode.isoc_ctl.transfer_buffer[i] =
+                                   NULL;
+                       }
+                       usb_free_urb(urb);
+                       dev->vbi_mode.isoc_ctl.urb[i] = NULL;
+               }
+               dev->vbi_mode.isoc_ctl.transfer_buffer[i] = NULL;
+       }
+
+       kfree(dev->vbi_mode.isoc_ctl.urb);
+       kfree(dev->vbi_mode.isoc_ctl.transfer_buffer);
+
+       dev->vbi_mode.isoc_ctl.urb = NULL;
+       dev->vbi_mode.isoc_ctl.transfer_buffer = NULL;
+       dev->vbi_mode.isoc_ctl.num_bufs = 0;
+
+       cx231xx_capture_start(dev, 0, Vbi);
+}
+EXPORT_SYMBOL_GPL(cx231xx_uninit_vbi_isoc);
+
+/*
+ * Allocate URBs and start IRQ
+ */
+int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
+                         int num_bufs, int max_pkt_size,
+                         int (*isoc_copy) (struct cx231xx *dev,
+                                           struct urb *urb))
+{
+       struct cx231xx_dmaqueue *dma_q = &dev->vbi_mode.vidq;
+       int i;
+       int sb_size, pipe;
+       struct urb *urb;
+       int rc;
+
+       cx231xx_info(DRIVER_NAME "cx231xx: called cx231xx_prepare_isoc\n");
+
+       /* De-allocates all pending stuff */
+       cx231xx_uninit_vbi_isoc(dev);
+
+       /* clear if any halt */
+       usb_clear_halt(dev->udev,
+                      usb_rcvbulkpipe(dev->udev,
+                                      dev->vbi_mode.end_point_addr));
+
+       dev->vbi_mode.isoc_ctl.isoc_copy = isoc_copy;
+       dev->vbi_mode.isoc_ctl.num_bufs = num_bufs;
+       dma_q->pos = 0;
+       dma_q->is_partial_line = 0;
+       dma_q->last_sav = 0;
+       dma_q->current_field = -1;
+       dma_q->bytes_left_in_line = dev->width << 1;
+       dma_q->lines_per_field = ((dev->norm & V4L2_STD_625_50) ?
+                                 PAL_VBI_LINES : NTSC_VBI_LINES);
+       dma_q->lines_completed = 0;
+       for (i = 0; i < 8; i++)
+               dma_q->partial_buf[i] = 0;
+
+       dev->vbi_mode.isoc_ctl.urb = kzalloc(sizeof(void *) * num_bufs,
+                                            GFP_KERNEL);
+       if (!dev->vbi_mode.isoc_ctl.urb) {
+               cx231xx_errdev("cannot alloc memory for usb buffers\n");
+               return -ENOMEM;
+       }
+
+       dev->vbi_mode.isoc_ctl.transfer_buffer =
+           kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL);
+       if (!dev->vbi_mode.isoc_ctl.transfer_buffer) {
+               cx231xx_errdev("cannot allocate memory for usbtransfer\n");
+               kfree(dev->vbi_mode.isoc_ctl.urb);
+               return -ENOMEM;
+       }
+
+       dev->vbi_mode.isoc_ctl.max_pkt_size = max_pkt_size;
+       dev->vbi_mode.isoc_ctl.buf = NULL;
+
+       sb_size = max_packets * dev->vbi_mode.isoc_ctl.max_pkt_size;
+
+       /* allocate urbs and transfer buffers */
+       for (i = 0; i < dev->vbi_mode.isoc_ctl.num_bufs; i++) {
+
+               urb = usb_alloc_urb(0, GFP_KERNEL);
+               if (!urb) {
+                       cx231xx_err(DRIVER_NAME
+                                   ": cannot alloc isoc_ctl.urb %i\n", i);
+                       cx231xx_uninit_vbi_isoc(dev);
+                       return -ENOMEM;
+               }
+               dev->vbi_mode.isoc_ctl.urb[i] = urb;
+               urb->transfer_flags = 0;
+
+               dev->vbi_mode.isoc_ctl.transfer_buffer[i] =
+                   kzalloc(sb_size, GFP_KERNEL);
+               if (!dev->vbi_mode.isoc_ctl.transfer_buffer[i]) {
+                       cx231xx_err(DRIVER_NAME
+                                   ": unable to allocate %i bytes for transfer"
+                                   " buffer %i%s\n", sb_size, i,
+                                   in_interrupt() ? " while in int" : "");
+                       cx231xx_uninit_vbi_isoc(dev);
+                       return -ENOMEM;
+               }
+
+               pipe = usb_rcvbulkpipe(dev->udev, dev->vbi_mode.end_point_addr);
+               usb_fill_bulk_urb(urb, dev->udev, pipe,
+                                 dev->vbi_mode.isoc_ctl.transfer_buffer[i],
+                                 sb_size, cx231xx_irq_vbi_callback, dma_q);
+       }
+
+       init_waitqueue_head(&dma_q->wq);
+
+       /* submit urbs and enables IRQ */
+       for (i = 0; i < dev->vbi_mode.isoc_ctl.num_bufs; i++) {
+               rc = usb_submit_urb(dev->vbi_mode.isoc_ctl.urb[i], GFP_ATOMIC);
+               if (rc) {
+                       cx231xx_err(DRIVER_NAME
+                                   ": submit of urb %i failed (error=%i)\n", i,
+                                   rc);
+                       cx231xx_uninit_vbi_isoc(dev);
+                       return rc;
+               }
+       }
+
+       cx231xx_capture_start(dev, 1, Vbi);
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(cx231xx_init_vbi_isoc);
+
+u32 cx231xx_get_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                        u8 sav_eav, u8 *p_buffer, u32 buffer_size)
+{
+       u32 bytes_copied = 0;
+       int current_field = -1;
+
+       switch (sav_eav) {
+
+       case SAV_VBI_FIELD1:
+               current_field = 1;
+               break;
+
+       case SAV_VBI_FIELD2:
+               current_field = 2;
+               break;
+       default:
+               break;
+       }
+
+       if (current_field < 0)
+               return bytes_copied;
+
+       dma_q->last_sav = sav_eav;
+
+       bytes_copied =
+           cx231xx_copy_vbi_line(dev, dma_q, p_buffer, buffer_size,
+                                 current_field);
+
+       return bytes_copied;
+}
+
+/*
+ * Announces that a buffer were filled and request the next
+ */
+static inline void vbi_buffer_filled(struct cx231xx *dev,
+                                    struct cx231xx_dmaqueue *dma_q,
+                                    struct cx231xx_buffer *buf)
+{
+       /* Advice that buffer was filled */
+       /* cx231xx_info(DRIVER_NAME "[%p/%d] wakeup\n", buf, buf->vb.i); */
+
+       buf->vb.state = VIDEOBUF_DONE;
+       buf->vb.field_count++;
+       do_gettimeofday(&buf->vb.ts);
+
+       dev->vbi_mode.isoc_ctl.buf = NULL;
+
+       list_del(&buf->vb.queue);
+       wake_up(&buf->vb.done);
+}
+
+u32 cx231xx_copy_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                         u8 *p_line, u32 length, int field_number)
+{
+       u32 bytes_to_copy;
+       struct cx231xx_buffer *buf;
+       u32 _line_size = dev->width * 2;
+
+       if (dma_q->current_field != field_number)
+               cx231xx_reset_vbi_buffer(dev, dma_q);
+
+       /* get the buffer pointer */
+       buf = dev->vbi_mode.isoc_ctl.buf;
+
+       /* Remember the field number for next time */
+       dma_q->current_field = field_number;
+
+       bytes_to_copy = dma_q->bytes_left_in_line;
+       if (bytes_to_copy > length)
+               bytes_to_copy = length;
+
+       if (dma_q->lines_completed >= dma_q->lines_per_field) {
+               dma_q->bytes_left_in_line -= bytes_to_copy;
+               dma_q->is_partial_line =
+                   (dma_q->bytes_left_in_line == 0) ? 0 : 1;
+               return 0;
+       }
+
+       dma_q->is_partial_line = 1;
+
+       /* If we don't have a buffer, just return the number of bytes we would
+          have copied if we had a buffer. */
+       if (!buf) {
+               dma_q->bytes_left_in_line -= bytes_to_copy;
+               dma_q->is_partial_line =
+                   (dma_q->bytes_left_in_line == 0) ? 0 : 1;
+               return bytes_to_copy;
+       }
+
+       /* copy the data to video buffer */
+       cx231xx_do_vbi_copy(dev, dma_q, p_line, bytes_to_copy);
+
+       dma_q->pos += bytes_to_copy;
+       dma_q->bytes_left_in_line -= bytes_to_copy;
+
+       if (dma_q->bytes_left_in_line == 0) {
+
+               dma_q->bytes_left_in_line = _line_size;
+               dma_q->lines_completed++;
+               dma_q->is_partial_line = 0;
+
+               if (cx231xx_is_vbi_buffer_done(dev, dma_q) && buf) {
+
+                       vbi_buffer_filled(dev, dma_q, buf);
+
+                       dma_q->pos = 0;
+                       buf = NULL;
+                       dma_q->lines_completed = 0;
+               }
+       }
+
+       return bytes_to_copy;
+}
+
+/*
+ * video-buf generic routine to get the next available buffer
+ */
+static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q,
+                                   struct cx231xx_buffer **buf)
+{
+       struct cx231xx_video_mode *vmode =
+           container_of(dma_q, struct cx231xx_video_mode, vidq);
+       struct cx231xx *dev = container_of(vmode, struct cx231xx, vbi_mode);
+       char *outp;
+
+       if (list_empty(&dma_q->active)) {
+               cx231xx_err(DRIVER_NAME ": No active queue to serve\n");
+               dev->vbi_mode.isoc_ctl.buf = NULL;
+               *buf = NULL;
+               return;
+       }
+
+       /* Get the next buffer */
+       *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue);
+
+       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       outp = videobuf_to_vmalloc(&(*buf)->vb);
+       memset(outp, 0, (*buf)->vb.size);
+
+       dev->vbi_mode.isoc_ctl.buf = *buf;
+
+       return;
+}
+
+void cx231xx_reset_vbi_buffer(struct cx231xx *dev,
+                             struct cx231xx_dmaqueue *dma_q)
+{
+       struct cx231xx_buffer *buf;
+
+       buf = dev->vbi_mode.isoc_ctl.buf;
+
+       if (buf == NULL) {
+               /* first try to get the buffer */
+               get_next_vbi_buf(dma_q, &buf);
+
+               dma_q->pos = 0;
+               dma_q->current_field = -1;
+       }
+
+       dma_q->bytes_left_in_line = dev->width << 1;
+       dma_q->lines_completed = 0;
+}
+
+int cx231xx_do_vbi_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                       u8 *p_buffer, u32 bytes_to_copy)
+{
+       u8 *p_out_buffer = NULL;
+       u32 current_line_bytes_copied = 0;
+       struct cx231xx_buffer *buf;
+       u32 _line_size = dev->width << 1;
+       void *startwrite;
+       int offset, lencopy;
+
+       buf = dev->vbi_mode.isoc_ctl.buf;
+
+       if (buf == NULL)
+               return -EINVAL;
+
+       p_out_buffer = videobuf_to_vmalloc(&buf->vb);
+
+       if (dma_q->bytes_left_in_line != _line_size) {
+               current_line_bytes_copied =
+                   _line_size - dma_q->bytes_left_in_line;
+       }
+
+       offset = (dma_q->lines_completed * _line_size) +
+                current_line_bytes_copied;
+
+       /* prepare destination address */
+       startwrite = p_out_buffer + offset;
+
+       lencopy = dma_q->bytes_left_in_line > bytes_to_copy ?
+                 bytes_to_copy : dma_q->bytes_left_in_line;
+
+       memcpy(startwrite, p_buffer, lencopy);
+
+       return 0;
+}
+
+u8 cx231xx_is_vbi_buffer_done(struct cx231xx *dev,
+                             struct cx231xx_dmaqueue *dma_q)
+{
+       u32 height = 0;
+
+       height = ((dev->norm & V4L2_STD_625_50) ?
+                 PAL_VBI_LINES : NTSC_VBI_LINES);
+       return (dma_q->lines_completed == height) ? 1 : 0;
+}
diff --git a/drivers/media/video/cx231xx/cx231xx-vbi.h b/drivers/media/video/cx231xx/cx231xx-vbi.h
new file mode 100644 (file)
index 0000000..89c7fe8
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+   cx231xx_vbi.h - driver for Conexant Cx23100/101/102 USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+               Based on cx88 driver
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _CX231XX_VBI_H
+#define _CX231XX_VBI_H
+
+extern struct videobuf_queue_ops cx231xx_vbi_qops;
+
+#define   NTSC_VBI_START_LINE 10       /* line 10 - 21 */
+#define   NTSC_VBI_END_LINE   21
+#define   NTSC_VBI_LINES         (NTSC_VBI_END_LINE-NTSC_VBI_START_LINE+1)
+
+#define   PAL_VBI_START_LINE  6
+#define   PAL_VBI_END_LINE    23
+#define   PAL_VBI_LINES       (PAL_VBI_END_LINE-PAL_VBI_START_LINE+1)
+
+#define   VBI_STRIDE            1440
+#define   VBI_SAMPLES_PER_LINE  1440
+
+#define   CX231XX_NUM_VBI_PACKETS       4
+#define   CX231XX_NUM_VBI_BUFS          5
+
+/* stream functions */
+int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
+                         int num_bufs, int max_pkt_size,
+                         int (*isoc_copy) (struct cx231xx *dev,
+                                           struct urb *urb));
+
+void cx231xx_uninit_vbi_isoc(struct cx231xx *dev);
+
+/* vbi data copy functions */
+u32 cx231xx_get_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                        u8 sav_eav, u8 *p_buffer, u32 buffer_size);
+
+u32 cx231xx_copy_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                         u8 *p_line, u32 length, int field_number);
+
+void cx231xx_reset_vbi_buffer(struct cx231xx *dev,
+                             struct cx231xx_dmaqueue *dma_q);
+
+int cx231xx_do_vbi_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                       u8 *p_buffer, u32 bytes_to_copy);
+
+u8 cx231xx_is_vbi_buffer_done(struct cx231xx *dev,
+                             struct cx231xx_dmaqueue *dma_q);
+
+#endif
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c
new file mode 100644 (file)
index 0000000..a23ae73
--- /dev/null
@@ -0,0 +1,2434 @@
+/*
+   cx231xx-video.c - driver for Conexant Cx23100/101/102
+                    USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+       Based on em28xx driver
+       Based on cx23885 driver
+       Based on cx88 driver
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/bitmap.h>
+#include <linux/usb.h>
+#include <linux/i2c.h>
+#include <linux/version.h>
+#include <linux/mm.h>
+#include <linux/mutex.h>
+
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
+#include <media/v4l2-chip-ident.h>
+#include <media/msp3400.h>
+#include <media/tuner.h>
+
+#include "dvb_frontend.h"
+
+#include "cx231xx.h"
+#include "cx231xx-vbi.h"
+
+#define CX231XX_VERSION_CODE            KERNEL_VERSION(0, 0, 1)
+
+#define DRIVER_AUTHOR   "Srinivasa Deevi <srinivasa.deevi@conexant.com>"
+#define DRIVER_DESC     "Conexant cx231xx based USB video device driver"
+
+#define cx231xx_videodbg(fmt, arg...) do {\
+       if (video_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __func__ , ##arg); } while (0)
+
+static unsigned int isoc_debug;
+module_param(isoc_debug, int, 0644);
+MODULE_PARM_DESC(isoc_debug, "enable debug messages [isoc transfers]");
+
+#define cx231xx_isocdbg(fmt, arg...) \
+do {\
+       if (isoc_debug) { \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __func__ , ##arg); \
+       } \
+  } while (0)
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+
+static unsigned int card[]     = {[0 ... (CX231XX_MAXBOARDS - 1)] = UNSET };
+static unsigned int video_nr[] = {[0 ... (CX231XX_MAXBOARDS - 1)] = UNSET };
+static unsigned int vbi_nr[]   = {[0 ... (CX231XX_MAXBOARDS - 1)] = UNSET };
+static unsigned int radio_nr[] = {[0 ... (CX231XX_MAXBOARDS - 1)] = UNSET };
+
+module_param_array(card, int, NULL, 0444);
+module_param_array(video_nr, int, NULL, 0444);
+module_param_array(vbi_nr, int, NULL, 0444);
+module_param_array(radio_nr, int, NULL, 0444);
+
+MODULE_PARM_DESC(card, "card type");
+MODULE_PARM_DESC(video_nr, "video device numbers");
+MODULE_PARM_DESC(vbi_nr, "vbi device numbers");
+MODULE_PARM_DESC(radio_nr, "radio device numbers");
+
+static unsigned int video_debug;
+module_param(video_debug, int, 0644);
+MODULE_PARM_DESC(video_debug, "enable debug messages [video]");
+
+/* supported video standards */
+static struct cx231xx_fmt format[] = {
+       {
+        .name = "16bpp YUY2, 4:2:2, packed",
+        .fourcc = V4L2_PIX_FMT_YUYV,
+        .depth = 16,
+        .reg = 0,
+        },
+};
+
+/* supported controls */
+/* Common to all boards */
+
+/* ------------------------------------------------------------------- */
+
+static const struct v4l2_queryctrl no_ctl = {
+       .name = "42",
+       .flags = V4L2_CTRL_FLAG_DISABLED,
+};
+
+static struct cx231xx_ctrl cx231xx_ctls[] = {
+       /* --- video --- */
+       {
+               .v = {
+                       .id = V4L2_CID_BRIGHTNESS,
+                       .name = "Brightness",
+                       .minimum = 0x00,
+                       .maximum = 0xff,
+                       .step = 1,
+                       .default_value = 0x7f,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+               },
+               .off = 128,
+               .reg = LUMA_CTRL,
+               .mask = 0x00ff,
+               .shift = 0,
+       }, {
+               .v = {
+                       .id = V4L2_CID_CONTRAST,
+                       .name = "Contrast",
+                       .minimum = 0,
+                       .maximum = 0xff,
+                       .step = 1,
+                       .default_value = 0x3f,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+               },
+               .off = 0,
+               .reg = LUMA_CTRL,
+               .mask = 0xff00,
+               .shift = 8,
+       }, {
+               .v = {
+                       .id = V4L2_CID_HUE,
+                       .name = "Hue",
+                       .minimum = 0,
+                       .maximum = 0xff,
+                       .step = 1,
+                       .default_value = 0x7f,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+               },
+               .off = 128,
+               .reg = CHROMA_CTRL,
+               .mask = 0xff0000,
+               .shift = 16,
+       }, {
+       /* strictly, this only describes only U saturation.
+       * V saturation is handled specially through code.
+       */
+               .v = {
+                       .id = V4L2_CID_SATURATION,
+                       .name = "Saturation",
+                       .minimum = 0,
+                       .maximum = 0xff,
+                       .step = 1,
+                       .default_value = 0x7f,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+               },
+               .off = 0,
+               .reg = CHROMA_CTRL,
+               .mask = 0x00ff,
+               .shift = 0,
+       }, {
+               /* --- audio --- */
+               .v = {
+                       .id = V4L2_CID_AUDIO_MUTE,
+                       .name = "Mute",
+                       .minimum = 0,
+                       .maximum = 1,
+                       .default_value = 1,
+                       .type = V4L2_CTRL_TYPE_BOOLEAN,
+               },
+               .reg = PATH1_CTL1,
+               .mask = (0x1f << 24),
+               .shift = 24,
+       }, {
+               .v = {
+                       .id = V4L2_CID_AUDIO_VOLUME,
+                       .name = "Volume",
+                       .minimum = 0,
+                       .maximum = 0x3f,
+                       .step = 1,
+                       .default_value = 0x3f,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+               },
+               .reg = PATH1_VOL_CTL,
+               .mask = 0xff,
+               .shift = 0,
+       }
+};
+static const int CX231XX_CTLS = ARRAY_SIZE(cx231xx_ctls);
+
+static const u32 cx231xx_user_ctrls[] = {
+       V4L2_CID_USER_CLASS,
+       V4L2_CID_BRIGHTNESS,
+       V4L2_CID_CONTRAST,
+       V4L2_CID_SATURATION,
+       V4L2_CID_HUE,
+       V4L2_CID_AUDIO_VOLUME,
+#if 0
+       V4L2_CID_AUDIO_BALANCE,
+#endif
+       V4L2_CID_AUDIO_MUTE,
+       0
+};
+
+static const u32 *ctrl_classes[] = {
+       cx231xx_user_ctrls,
+       NULL
+};
+
+/* ------------------------------------------------------------------
+       Video buffer and parser functions
+   ------------------------------------------------------------------*/
+
+/*
+ * Announces that a buffer were filled and request the next
+ */
+static inline void buffer_filled(struct cx231xx *dev,
+                                struct cx231xx_dmaqueue *dma_q,
+                                struct cx231xx_buffer *buf)
+{
+       /* Advice that buffer was filled */
+       cx231xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i);
+       buf->vb.state = VIDEOBUF_DONE;
+       buf->vb.field_count++;
+       do_gettimeofday(&buf->vb.ts);
+
+       dev->video_mode.isoc_ctl.buf = NULL;
+
+       list_del(&buf->vb.queue);
+       wake_up(&buf->vb.done);
+}
+
+static inline void print_err_status(struct cx231xx *dev, int packet, int status)
+{
+       char *errmsg = "Unknown";
+
+       switch (status) {
+       case -ENOENT:
+               errmsg = "unlinked synchronuously";
+               break;
+       case -ECONNRESET:
+               errmsg = "unlinked asynchronuously";
+               break;
+       case -ENOSR:
+               errmsg = "Buffer error (overrun)";
+               break;
+       case -EPIPE:
+               errmsg = "Stalled (device not responding)";
+               break;
+       case -EOVERFLOW:
+               errmsg = "Babble (bad cable?)";
+               break;
+       case -EPROTO:
+               errmsg = "Bit-stuff error (bad cable?)";
+               break;
+       case -EILSEQ:
+               errmsg = "CRC/Timeout (could be anything)";
+               break;
+       case -ETIME:
+               errmsg = "Device does not respond";
+               break;
+       }
+       if (packet < 0) {
+               cx231xx_isocdbg("URB status %d [%s].\n", status, errmsg);
+       } else {
+               cx231xx_isocdbg("URB packet %d, status %d [%s].\n",
+                               packet, status, errmsg);
+       }
+}
+
+/*
+ * video-buf generic routine to get the next available buffer
+ */
+static inline void get_next_buf(struct cx231xx_dmaqueue *dma_q,
+                               struct cx231xx_buffer **buf)
+{
+       struct cx231xx_video_mode *vmode =
+           container_of(dma_q, struct cx231xx_video_mode, vidq);
+       struct cx231xx *dev = container_of(vmode, struct cx231xx, video_mode);
+
+       char *outp;
+
+       if (list_empty(&dma_q->active)) {
+               cx231xx_isocdbg("No active queue to serve\n");
+               dev->video_mode.isoc_ctl.buf = NULL;
+               *buf = NULL;
+               return;
+       }
+
+       /* Get the next buffer */
+       *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue);
+
+       /* Cleans up buffer - Usefull for testing for frame/URB loss */
+       outp = videobuf_to_vmalloc(&(*buf)->vb);
+       memset(outp, 0, (*buf)->vb.size);
+
+       dev->video_mode.isoc_ctl.buf = *buf;
+
+       return;
+}
+
+/*
+ * Controls the isoc copy of each urb packet
+ */
+static inline int cx231xx_isoc_copy(struct cx231xx *dev, struct urb *urb)
+{
+       struct cx231xx_buffer *buf;
+       struct cx231xx_dmaqueue *dma_q = urb->context;
+       unsigned char *outp = NULL;
+       int i, rc = 1;
+       unsigned char *p_buffer;
+       u32 bytes_parsed = 0, buffer_size = 0;
+       u8 sav_eav = 0;
+
+       if (!dev)
+               return 0;
+
+       if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED))
+               return 0;
+
+       if (urb->status < 0) {
+               print_err_status(dev, -1, urb->status);
+               if (urb->status == -ENOENT)
+                       return 0;
+       }
+
+       buf = dev->video_mode.isoc_ctl.buf;
+       if (buf != NULL)
+               outp = videobuf_to_vmalloc(&buf->vb);
+
+       for (i = 0; i < urb->number_of_packets; i++) {
+               int status = urb->iso_frame_desc[i].status;
+
+               if (status < 0) {
+                       print_err_status(dev, i, status);
+                       if (urb->iso_frame_desc[i].status != -EPROTO)
+                               continue;
+               }
+
+               if (urb->iso_frame_desc[i].actual_length <= 0) {
+                       /* cx231xx_isocdbg("packet %d is empty",i); - spammy */
+                       continue;
+               }
+               if (urb->iso_frame_desc[i].actual_length >
+                   dev->video_mode.max_pkt_size) {
+                       cx231xx_isocdbg("packet bigger than packet size");
+                       continue;
+               }
+
+               /*  get buffer pointer and length */
+               p_buffer = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
+               buffer_size = urb->iso_frame_desc[i].actual_length;
+               bytes_parsed = 0;
+
+               if (dma_q->is_partial_line) {
+                       /* Handle the case of a partial line */
+                       sav_eav = dma_q->last_sav;
+               } else {
+                       /* Check for a SAV/EAV overlapping
+                               the buffer boundary */
+                       sav_eav =
+                           cx231xx_find_boundary_SAV_EAV(p_buffer,
+                                                         dma_q->partial_buf,
+                                                         &bytes_parsed);
+               }
+
+               sav_eav &= 0xF0;
+               /* Get the first line if we have some portion of an SAV/EAV from
+                  the last buffer or a partial line  */
+               if (sav_eav) {
+                       bytes_parsed += cx231xx_get_video_line(dev, dma_q,
+                               sav_eav,        /* SAV/EAV */
+                               p_buffer + bytes_parsed,        /* p_buffer */
+                               buffer_size - bytes_parsed);/* buf size */
+               }
+
+               /* Now parse data that is completely in this buffer */
+               /* dma_q->is_partial_line = 0;  */
+
+               while (bytes_parsed < buffer_size) {
+                       u32 bytes_used = 0;
+
+                       sav_eav = cx231xx_find_next_SAV_EAV(
+                               p_buffer + bytes_parsed,        /* p_buffer */
+                               buffer_size - bytes_parsed,     /* buf size */
+                               &bytes_used);/* bytes used to get SAV/EAV */
+
+                       bytes_parsed += bytes_used;
+
+                       sav_eav &= 0xF0;
+                       if (sav_eav && (bytes_parsed < buffer_size)) {
+                               bytes_parsed += cx231xx_get_video_line(dev,
+                                       dma_q, sav_eav, /* SAV/EAV */
+                                       p_buffer + bytes_parsed,/* p_buffer */
+                                       buffer_size - bytes_parsed);/*buf size*/
+                       }
+               }
+
+               /* Save the last four bytes of the buffer so we can check the
+                  buffer boundary condition next time */
+               memcpy(dma_q->partial_buf, p_buffer + buffer_size - 4, 4);
+               bytes_parsed = 0;
+
+       }
+       return rc;
+}
+
+u8 cx231xx_find_boundary_SAV_EAV(u8 *p_buffer, u8 *partial_buf,
+                                u32 *p_bytes_used)
+{
+       u32 bytes_used;
+       u8 boundary_bytes[8];
+       u8 sav_eav = 0;
+
+       *p_bytes_used = 0;
+
+       /* Create an array of the last 4 bytes of the last buffer and the first
+          4 bytes of the current buffer. */
+
+       memcpy(boundary_bytes, partial_buf, 4);
+       memcpy(boundary_bytes + 4, p_buffer, 4);
+
+       /* Check for the SAV/EAV in the boundary buffer */
+       sav_eav = cx231xx_find_next_SAV_EAV((u8 *)&boundary_bytes, 8,
+                                           &bytes_used);
+
+       if (sav_eav) {
+               /* found a boundary SAV/EAV.  Updates the bytes used to reflect
+                  only those used in the new buffer */
+               *p_bytes_used = bytes_used - 4;
+       }
+
+       return sav_eav;
+}
+
+u8 cx231xx_find_next_SAV_EAV(u8 *p_buffer, u32 buffer_size, u32 *p_bytes_used)
+{
+       u32 i;
+       u8 sav_eav = 0;
+
+       /*
+        * Don't search if the buffer size is less than 4.  It causes a page
+        * fault since buffer_size - 4 evaluates to a large number in that
+        * case.
+        */
+       if (buffer_size < 4) {
+               *p_bytes_used = buffer_size;
+               return 0;
+       }
+
+       for (i = 0; i < (buffer_size - 3); i++) {
+
+               if ((p_buffer[i] == 0xFF) &&
+                   (p_buffer[i + 1] == 0x00) && (p_buffer[i + 2] == 0x00)) {
+
+                       *p_bytes_used = i + 4;
+                       sav_eav = p_buffer[i + 3];
+                       return sav_eav;
+               }
+       }
+
+       *p_bytes_used = buffer_size;
+       return 0;
+}
+
+u32 cx231xx_get_video_line(struct cx231xx *dev,
+                          struct cx231xx_dmaqueue *dma_q, u8 sav_eav,
+                          u8 *p_buffer, u32 buffer_size)
+{
+       u32 bytes_copied = 0;
+       int current_field = -1;
+
+       switch (sav_eav) {
+       case SAV_ACTIVE_VIDEO_FIELD1:
+               /* looking for skipped line which occurred in PAL 720x480 mode.
+                  In this case, there will be no active data contained
+                  between the SAV and EAV */
+               if ((buffer_size > 3) && (p_buffer[0] == 0xFF) &&
+                   (p_buffer[1] == 0x00) && (p_buffer[2] == 0x00) &&
+                   ((p_buffer[3] == EAV_ACTIVE_VIDEO_FIELD1) ||
+                    (p_buffer[3] == EAV_ACTIVE_VIDEO_FIELD2) ||
+                    (p_buffer[3] == EAV_VBLANK_FIELD1) ||
+                    (p_buffer[3] == EAV_VBLANK_FIELD2)))
+                       return bytes_copied;
+               current_field = 1;
+               break;
+
+       case SAV_ACTIVE_VIDEO_FIELD2:
+               /* looking for skipped line which occurred in PAL 720x480 mode.
+                  In this case, there will be no active data contained between
+                  the SAV and EAV */
+               if ((buffer_size > 3) && (p_buffer[0] == 0xFF) &&
+                   (p_buffer[1] == 0x00) && (p_buffer[2] == 0x00) &&
+                   ((p_buffer[3] == EAV_ACTIVE_VIDEO_FIELD1) ||
+                    (p_buffer[3] == EAV_ACTIVE_VIDEO_FIELD2) ||
+                    (p_buffer[3] == EAV_VBLANK_FIELD1)       ||
+                    (p_buffer[3] == EAV_VBLANK_FIELD2)))
+                       return bytes_copied;
+               current_field = 2;
+               break;
+       }
+
+       dma_q->last_sav = sav_eav;
+
+       bytes_copied = cx231xx_copy_video_line(dev, dma_q, p_buffer,
+                                              buffer_size, current_field);
+
+       return bytes_copied;
+}
+
+u32 cx231xx_copy_video_line(struct cx231xx *dev,
+                           struct cx231xx_dmaqueue *dma_q, u8 *p_line,
+                           u32 length, int field_number)
+{
+       u32 bytes_to_copy;
+       struct cx231xx_buffer *buf;
+       u32 _line_size = dev->width * 2;
+
+       if (dma_q->current_field != field_number)
+               cx231xx_reset_video_buffer(dev, dma_q);
+
+       /* get the buffer pointer */
+       buf = dev->video_mode.isoc_ctl.buf;
+
+       /* Remember the field number for next time */
+       dma_q->current_field = field_number;
+
+       bytes_to_copy = dma_q->bytes_left_in_line;
+       if (bytes_to_copy > length)
+               bytes_to_copy = length;
+
+       if (dma_q->lines_completed >= dma_q->lines_per_field) {
+               dma_q->bytes_left_in_line -= bytes_to_copy;
+               dma_q->is_partial_line = (dma_q->bytes_left_in_line == 0) ?
+                                         0 : 1;
+               return 0;
+       }
+
+       dma_q->is_partial_line = 1;
+
+       /* If we don't have a buffer, just return the number of bytes we would
+          have copied if we had a buffer. */
+       if (!buf) {
+               dma_q->bytes_left_in_line -= bytes_to_copy;
+               dma_q->is_partial_line = (dma_q->bytes_left_in_line == 0)
+                                        ? 0 : 1;
+               return bytes_to_copy;
+       }
+
+       /* copy the data to video buffer */
+       cx231xx_do_copy(dev, dma_q, p_line, bytes_to_copy);
+
+       dma_q->pos += bytes_to_copy;
+       dma_q->bytes_left_in_line -= bytes_to_copy;
+
+       if (dma_q->bytes_left_in_line == 0) {
+               dma_q->bytes_left_in_line = _line_size;
+               dma_q->lines_completed++;
+               dma_q->is_partial_line = 0;
+
+               if (cx231xx_is_buffer_done(dev, dma_q) && buf) {
+                       buffer_filled(dev, dma_q, buf);
+
+                       dma_q->pos = 0;
+                       buf = NULL;
+                       dma_q->lines_completed = 0;
+               }
+       }
+
+       return bytes_to_copy;
+}
+
+void cx231xx_reset_video_buffer(struct cx231xx *dev,
+                               struct cx231xx_dmaqueue *dma_q)
+{
+       struct cx231xx_buffer *buf;
+
+       /* handle the switch from field 1 to field 2 */
+       if (dma_q->current_field == 1) {
+               if (dma_q->lines_completed >= dma_q->lines_per_field)
+                       dma_q->field1_done = 1;
+               else
+                       dma_q->field1_done = 0;
+       }
+
+       buf = dev->video_mode.isoc_ctl.buf;
+
+       if (buf == NULL) {
+               u8 *outp = NULL;
+               /* first try to get the buffer */
+               get_next_buf(dma_q, &buf);
+
+               if (buf)
+                       outp = videobuf_to_vmalloc(&buf->vb);
+
+               dma_q->pos = 0;
+               dma_q->field1_done = 0;
+               dma_q->current_field = -1;
+       }
+
+       /* reset the counters */
+       dma_q->bytes_left_in_line = dev->width << 1;
+       dma_q->lines_completed = 0;
+}
+
+int cx231xx_do_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                   u8 *p_buffer, u32 bytes_to_copy)
+{
+       u8 *p_out_buffer = NULL;
+       u32 current_line_bytes_copied = 0;
+       struct cx231xx_buffer *buf;
+       u32 _line_size = dev->width << 1;
+       void *startwrite;
+       int offset, lencopy;
+
+       buf = dev->video_mode.isoc_ctl.buf;
+
+       if (buf == NULL)
+               return -1;
+
+       p_out_buffer = videobuf_to_vmalloc(&buf->vb);
+
+       current_line_bytes_copied = _line_size - dma_q->bytes_left_in_line;
+
+       /* Offset field 2 one line from the top of the buffer */
+       offset = (dma_q->current_field == 1) ? 0 : _line_size;
+
+       /* Offset for field 2 */
+       startwrite = p_out_buffer + offset;
+
+       /* lines already completed in the current field */
+       startwrite += (dma_q->lines_completed * _line_size * 2);
+
+       /* bytes already completed in the current line */
+       startwrite += current_line_bytes_copied;
+
+       lencopy = dma_q->bytes_left_in_line > bytes_to_copy ?
+                 bytes_to_copy : dma_q->bytes_left_in_line;
+
+       if ((u8 *)(startwrite + lencopy) > (u8 *)(p_out_buffer + buf->vb.size))
+               return 0;
+
+       /* The below copies the UYVY data straight into video buffer */
+       cx231xx_swab((u16 *) p_buffer, (u16 *) startwrite, (u16) lencopy);
+
+       return 0;
+}
+
+void cx231xx_swab(u16 *from, u16 *to, u16 len)
+{
+       u16 i;
+
+       if (len <= 0)
+               return;
+
+       for (i = 0; i < len / 2; i++)
+               to[i] = (from[i] << 8) | (from[i] >> 8);
+}
+
+u8 cx231xx_is_buffer_done(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q)
+{
+       u8 buffer_complete = 0;
+
+       /* Dual field stream */
+       buffer_complete = ((dma_q->current_field == 2) &&
+                          (dma_q->lines_completed >= dma_q->lines_per_field) &&
+                           dma_q->field1_done);
+
+       return buffer_complete;
+}
+
+/* ------------------------------------------------------------------
+       Videobuf operations
+   ------------------------------------------------------------------*/
+
+static int
+buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
+{
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx *dev = fh->dev;
+       struct v4l2_frequency f;
+
+       *size = (fh->dev->width * fh->dev->height * dev->format->depth + 7)>>3;
+       if (0 == *count)
+               *count = CX231XX_DEF_BUF;
+
+       if (*count < CX231XX_MIN_BUF)
+               *count = CX231XX_MIN_BUF;
+
+       /* Ask tuner to go to analog mode */
+       memset(&f, 0, sizeof(f));
+       f.frequency = dev->ctl_freq;
+       f.type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
+
+       call_all(dev, tuner, s_frequency, &f);
+
+       return 0;
+}
+
+/* This is called *without* dev->slock held; please keep it that way */
+static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf)
+{
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx *dev = fh->dev;
+       unsigned long flags = 0;
+
+       if (in_interrupt())
+               BUG();
+
+       /* We used to wait for the buffer to finish here, but this didn't work
+          because, as we were keeping the state as VIDEOBUF_QUEUED,
+          videobuf_queue_cancel marked it as finished for us.
+          (Also, it could wedge forever if the hardware was misconfigured.)
+
+          This should be safe; by the time we get here, the buffer isn't
+          queued anymore. If we ever start marking the buffers as
+          VIDEOBUF_ACTIVE, it won't be, though.
+        */
+       spin_lock_irqsave(&dev->video_mode.slock, flags);
+       if (dev->video_mode.isoc_ctl.buf == buf)
+               dev->video_mode.isoc_ctl.buf = NULL;
+       spin_unlock_irqrestore(&dev->video_mode.slock, flags);
+
+       videobuf_vmalloc_free(&buf->vb);
+       buf->vb.state = VIDEOBUF_NEEDS_INIT;
+}
+
+static int
+buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
+              enum v4l2_field field)
+{
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx_buffer *buf =
+           container_of(vb, struct cx231xx_buffer, vb);
+       struct cx231xx *dev = fh->dev;
+       int rc = 0, urb_init = 0;
+
+       /* The only currently supported format is 16 bits/pixel */
+       buf->vb.size = (fh->dev->width * fh->dev->height * dev->format->depth
+                       + 7) >> 3;
+       if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size)
+               return -EINVAL;
+
+       buf->vb.width = dev->width;
+       buf->vb.height = dev->height;
+       buf->vb.field = field;
+
+       if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
+               rc = videobuf_iolock(vq, &buf->vb, NULL);
+               if (rc < 0)
+                       goto fail;
+       }
+
+       if (!dev->video_mode.isoc_ctl.num_bufs)
+               urb_init = 1;
+
+       if (urb_init) {
+               rc = cx231xx_init_isoc(dev, CX231XX_NUM_PACKETS,
+                                      CX231XX_NUM_BUFS,
+                                      dev->video_mode.max_pkt_size,
+                                      cx231xx_isoc_copy);
+               if (rc < 0)
+                       goto fail;
+       }
+
+       buf->vb.state = VIDEOBUF_PREPARED;
+       return 0;
+
+fail:
+       free_buffer(vq, buf);
+       return rc;
+}
+
+static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
+{
+       struct cx231xx_buffer *buf =
+           container_of(vb, struct cx231xx_buffer, vb);
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx *dev = fh->dev;
+       struct cx231xx_dmaqueue *vidq = &dev->video_mode.vidq;
+
+       buf->vb.state = VIDEOBUF_QUEUED;
+       list_add_tail(&buf->vb.queue, &vidq->active);
+
+}
+
+static void buffer_release(struct videobuf_queue *vq,
+                          struct videobuf_buffer *vb)
+{
+       struct cx231xx_buffer *buf =
+           container_of(vb, struct cx231xx_buffer, vb);
+       struct cx231xx_fh *fh = vq->priv_data;
+       struct cx231xx *dev = (struct cx231xx *)fh->dev;
+
+       cx231xx_isocdbg("cx231xx: called buffer_release\n");
+
+       free_buffer(vq, buf);
+}
+
+static struct videobuf_queue_ops cx231xx_video_qops = {
+       .buf_setup = buffer_setup,
+       .buf_prepare = buffer_prepare,
+       .buf_queue = buffer_queue,
+       .buf_release = buffer_release,
+};
+
+/*********************  v4l2 interface  **************************************/
+
+void video_mux(struct cx231xx *dev, int index)
+{
+       dev->video_input = index;
+       dev->ctl_ainput = INPUT(index)->amux;
+
+       cx231xx_set_video_input_mux(dev, index);
+
+       cx25840_call(dev, video, s_routing, INPUT(index)->vmux, 0, 0);
+
+       cx231xx_set_audio_input(dev, dev->ctl_ainput);
+
+       cx231xx_info("video_mux : %d\n", index);
+
+       /* do mode control overrides if required */
+       cx231xx_do_mode_ctrl_overrides(dev);
+}
+
+/* Usage lock check functions */
+static int res_get(struct cx231xx_fh *fh)
+{
+       struct cx231xx *dev = fh->dev;
+       int rc = 0;
+
+       /* This instance already has stream_on */
+       if (fh->stream_on)
+               return rc;
+
+       if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
+               if (dev->stream_on)
+                       return -EBUSY;
+               dev->stream_on = 1;
+       } else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
+               if (dev->vbi_stream_on)
+                       return -EBUSY;
+               dev->vbi_stream_on = 1;
+       } else
+               return -EINVAL;
+
+       fh->stream_on = 1;
+
+       return rc;
+}
+
+static int res_check(struct cx231xx_fh *fh)
+{
+       return fh->stream_on;
+}
+
+static void res_free(struct cx231xx_fh *fh)
+{
+       struct cx231xx *dev = fh->dev;
+
+       fh->stream_on = 0;
+
+       if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
+               dev->stream_on = 0;
+       if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE)
+               dev->vbi_stream_on = 0;
+}
+
+static int check_dev(struct cx231xx *dev)
+{
+       if (dev->state & DEV_DISCONNECTED) {
+               cx231xx_errdev("v4l2 ioctl: device not present\n");
+               return -ENODEV;
+       }
+
+       if (dev->state & DEV_MISCONFIGURED) {
+               cx231xx_errdev("v4l2 ioctl: device is misconfigured; "
+                              "close and open it again\n");
+               return -EIO;
+       }
+       return 0;
+}
+
+void get_scale(struct cx231xx *dev,
+              unsigned int width, unsigned int height,
+              unsigned int *hscale, unsigned int *vscale)
+{
+       unsigned int maxw = norm_maxw(dev);
+       unsigned int maxh = norm_maxh(dev);
+
+       *hscale = (((unsigned long)maxw) << 12) / width - 4096L;
+       if (*hscale >= 0x4000)
+               *hscale = 0x3fff;
+
+       *vscale = (((unsigned long)maxh) << 12) / height - 4096L;
+       if (*vscale >= 0x4000)
+               *vscale = 0x3fff;
+
+       dev->hscale = *hscale;
+       dev->vscale = *vscale;
+
+}
+
+/* ------------------------------------------------------------------
+       IOCTL vidioc handling
+   ------------------------------------------------------------------*/
+
+static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
+                               struct v4l2_format *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       mutex_lock(&dev->lock);
+
+       f->fmt.pix.width = dev->width;
+       f->fmt.pix.height = dev->height;
+       f->fmt.pix.pixelformat = dev->format->fourcc;;
+       f->fmt.pix.bytesperline = (dev->width * dev->format->depth + 7) >> 3;;
+       f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * dev->height;
+       f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+
+       f->fmt.pix.field = V4L2_FIELD_INTERLACED;
+
+       mutex_unlock(&dev->lock);
+
+       return 0;
+}
+
+static struct cx231xx_fmt *format_by_fourcc(unsigned int fourcc)
+{
+       unsigned int i;
+
+       for (i = 0; i < ARRAY_SIZE(format); i++)
+               if (format[i].fourcc == fourcc)
+                       return &format[i];
+
+       return NULL;
+}
+
+static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
+                                 struct v4l2_format *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int width = f->fmt.pix.width;
+       int height = f->fmt.pix.height;
+       unsigned int maxw = norm_maxw(dev);
+       unsigned int maxh = norm_maxh(dev);
+       unsigned int hscale, vscale;
+       struct cx231xx_fmt *fmt;
+
+       fmt = format_by_fourcc(f->fmt.pix.pixelformat);
+       if (!fmt) {
+               cx231xx_videodbg("Fourcc format (%08x) invalid.\n",
+                                f->fmt.pix.pixelformat);
+               return -EINVAL;
+       }
+
+       /* width must even because of the YUYV format
+          height must be even because of interlacing */
+       height &= 0xfffe;
+       width &= 0xfffe;
+
+       if (unlikely(height < 32))
+               height = 32;
+       if (unlikely(height > maxh))
+               height = maxh;
+       if (unlikely(width < 48))
+               width = 48;
+       if (unlikely(width > maxw))
+               width = maxw;
+
+       get_scale(dev, width, height, &hscale, &vscale);
+
+       width = (((unsigned long)maxw) << 12) / (hscale + 4096L);
+       height = (((unsigned long)maxh) << 12) / (vscale + 4096L);
+
+       f->fmt.pix.width = width;
+       f->fmt.pix.height = height;
+       f->fmt.pix.pixelformat = fmt->fourcc;
+       f->fmt.pix.bytesperline = (dev->width * fmt->depth + 7) >> 3;
+       f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * height;
+       f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+       f->fmt.pix.field = V4L2_FIELD_INTERLACED;
+
+       return 0;
+}
+
+static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
+                               struct v4l2_format *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+       struct cx231xx_fmt *fmt;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+
+       vidioc_try_fmt_vid_cap(file, priv, f);
+
+       fmt = format_by_fourcc(f->fmt.pix.pixelformat);
+       if (!fmt) {
+               rc = -EINVAL;
+               goto out;
+       }
+
+       if (videobuf_queue_is_busy(&fh->vb_vidq)) {
+               cx231xx_errdev("%s queue busy\n", __func__);
+               rc = -EBUSY;
+               goto out;
+       }
+
+       if (dev->stream_on && !fh->stream_on) {
+               cx231xx_errdev("%s device in use by another fh\n", __func__);
+               rc = -EBUSY;
+               goto out;
+       }
+
+       /* set new image size */
+       dev->width = f->fmt.pix.width;
+       dev->height = f->fmt.pix.height;
+       dev->format = fmt;
+       get_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale);
+
+       call_all(dev, video, s_fmt, f);
+
+       /* Set the correct alternate setting for this resolution */
+       cx231xx_resolution_set(dev);
+
+out:
+       mutex_unlock(&dev->lock);
+       return rc;
+}
+
+static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id * id)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       *id = dev->norm;
+       return 0;
+}
+
+static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       struct v4l2_format f;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       cx231xx_info("vidioc_s_std : 0x%x\n", (unsigned int)*norm);
+
+       mutex_lock(&dev->lock);
+       dev->norm = *norm;
+
+       /* Adjusts width/height, if needed */
+       f.fmt.pix.width = dev->width;
+       f.fmt.pix.height = dev->height;
+       vidioc_try_fmt_vid_cap(file, priv, &f);
+
+       /* set new image size */
+       dev->width = f.fmt.pix.width;
+       dev->height = f.fmt.pix.height;
+       get_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale);
+
+       call_all(dev, core, s_std, dev->norm);
+
+       mutex_unlock(&dev->lock);
+
+       cx231xx_resolution_set(dev);
+
+       /* do mode control overrides */
+       cx231xx_do_mode_ctrl_overrides(dev);
+
+       return 0;
+}
+
+static const char *iname[] = {
+       [CX231XX_VMUX_COMPOSITE1] = "Composite1",
+       [CX231XX_VMUX_SVIDEO]     = "S-Video",
+       [CX231XX_VMUX_TELEVISION] = "Television",
+       [CX231XX_VMUX_CABLE]      = "Cable TV",
+       [CX231XX_VMUX_DVB]        = "DVB",
+       [CX231XX_VMUX_DEBUG]      = "for debug only",
+};
+
+static int vidioc_enum_input(struct file *file, void *priv,
+                            struct v4l2_input *i)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       unsigned int n;
+
+       n = i->index;
+       if (n >= MAX_CX231XX_INPUT)
+               return -EINVAL;
+       if (0 == INPUT(n)->type)
+               return -EINVAL;
+
+       i->index = n;
+       i->type = V4L2_INPUT_TYPE_CAMERA;
+
+       strcpy(i->name, iname[INPUT(n)->type]);
+
+       if ((CX231XX_VMUX_TELEVISION == INPUT(n)->type) ||
+           (CX231XX_VMUX_CABLE == INPUT(n)->type))
+               i->type = V4L2_INPUT_TYPE_TUNER;
+
+       i->std = dev->vdev->tvnorms;
+
+       return 0;
+}
+
+static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       *i = dev->video_input;
+
+       return 0;
+}
+
+static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       if (i >= MAX_CX231XX_INPUT)
+               return -EINVAL;
+       if (0 == INPUT(i)->type)
+               return -EINVAL;
+
+       mutex_lock(&dev->lock);
+
+       video_mux(dev, i);
+
+       mutex_unlock(&dev->lock);
+       return 0;
+}
+
+static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       switch (a->index) {
+       case CX231XX_AMUX_VIDEO:
+               strcpy(a->name, "Television");
+               break;
+       case CX231XX_AMUX_LINE_IN:
+               strcpy(a->name, "Line In");
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       a->index = dev->ctl_ainput;
+       a->capability = V4L2_AUDCAP_STEREO;
+
+       return 0;
+}
+
+static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int status = 0;
+
+       /* Doesn't allow manual routing */
+       if (a->index != dev->ctl_ainput)
+               return -EINVAL;
+
+       dev->ctl_ainput = INPUT(a->index)->amux;
+       status = cx231xx_set_audio_input(dev, dev->ctl_ainput);
+
+       return status;
+}
+
+static int vidioc_queryctrl(struct file *file, void *priv,
+                           struct v4l2_queryctrl *qc)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int id = qc->id;
+       int i;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       qc->id = v4l2_ctrl_next(ctrl_classes, qc->id);
+       if (unlikely(qc->id == 0))
+               return -EINVAL;
+
+       memset(qc, 0, sizeof(*qc));
+
+       qc->id = id;
+
+       if (qc->id < V4L2_CID_BASE || qc->id >= V4L2_CID_LASTP1)
+               return -EINVAL;
+
+       for (i = 0; i < CX231XX_CTLS; i++)
+               if (cx231xx_ctls[i].v.id == qc->id)
+                       break;
+
+       if (i == CX231XX_CTLS) {
+               *qc = no_ctl;
+               return 0;
+       }
+       *qc = cx231xx_ctls[i].v;
+
+       mutex_lock(&dev->lock);
+       call_all(dev, core, queryctrl, qc);
+       mutex_unlock(&dev->lock);
+
+       if (qc->type)
+               return 0;
+       else
+               return -EINVAL;
+}
+
+static int vidioc_g_ctrl(struct file *file, void *priv,
+                        struct v4l2_control *ctrl)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+       call_all(dev, core, g_ctrl, ctrl);
+       mutex_unlock(&dev->lock);
+       return rc;
+}
+
+static int vidioc_s_ctrl(struct file *file, void *priv,
+                        struct v4l2_control *ctrl)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+       call_all(dev, core, s_ctrl, ctrl);
+       mutex_unlock(&dev->lock);
+       return rc;
+}
+
+static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       if (0 != t->index)
+               return -EINVAL;
+
+       strcpy(t->name, "Tuner");
+
+       t->type = V4L2_TUNER_ANALOG_TV;
+       t->capability = V4L2_TUNER_CAP_NORM;
+       t->rangehigh = 0xffffffffUL;
+       t->signal = 0xffff;     /* LOCKED */
+
+       return 0;
+}
+
+static int vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       if (0 != t->index)
+               return -EINVAL;
+#if 0
+       mutex_lock(&dev->lock);
+       call_all(dev, tuner, s_tuner, t);
+       mutex_unlock(&dev->lock);
+#endif
+       return 0;
+}
+
+static int vidioc_g_frequency(struct file *file, void *priv,
+                             struct v4l2_frequency *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       mutex_lock(&dev->lock);
+       f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
+       f->frequency = dev->ctl_freq;
+
+       call_all(dev, tuner, g_frequency, f);
+
+       mutex_unlock(&dev->lock);
+
+       return 0;
+}
+
+static int vidioc_s_frequency(struct file *file, void *priv,
+                             struct v4l2_frequency *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       if (0 != f->tuner)
+               return -EINVAL;
+
+       if (unlikely(0 == fh->radio && f->type != V4L2_TUNER_ANALOG_TV))
+               return -EINVAL;
+       if (unlikely(1 == fh->radio && f->type != V4L2_TUNER_RADIO))
+               return -EINVAL;
+
+       /* set pre channel change settings in DIF first */
+       rc = cx231xx_tuner_pre_channel_change(dev);
+
+       mutex_lock(&dev->lock);
+
+       dev->ctl_freq = f->frequency;
+
+       if (dev->tuner_type == TUNER_XC5000) {
+               if (dev->cx231xx_set_analog_freq != NULL)
+                       dev->cx231xx_set_analog_freq(dev, f->frequency);
+       } else
+               call_all(dev, tuner, s_frequency, f);
+
+       mutex_unlock(&dev->lock);
+
+       /* set post channel change settings in DIF first */
+       rc = cx231xx_tuner_post_channel_change(dev);
+
+       cx231xx_info("Set New FREQUENCY to %d\n", f->frequency);
+
+       return rc;
+}
+
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+
+/*
+  -R, --list-registers=type=<host/i2cdrv/i2caddr>,
+                               chip=<chip>[,min=<addr>,max=<addr>]
+                    dump registers from <min> to <max> [VIDIOC_DBG_G_REGISTER]
+  -r, --set-register=type=<host/i2cdrv/i2caddr>,
+                               chip=<chip>,reg=<addr>,val=<val>
+                    set the register [VIDIOC_DBG_S_REGISTER]
+
+  if type == host, then <chip> is the hosts chip ID (default 0)
+  if type == i2cdrv (default), then <chip> is the I2C driver name or ID
+  if type == i2caddr, then <chip> is the 7-bit I2C address
+*/
+
+static int vidioc_g_register(struct file *file, void *priv,
+                            struct v4l2_dbg_register *reg)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int ret = 0;
+       u8 value[4] = { 0, 0, 0, 0 };
+       u32 data = 0;
+
+       switch (reg->match.type) {
+       case V4L2_CHIP_MATCH_HOST:
+               switch (reg->match.addr) {
+               case 0: /* Cx231xx - internal registers */
+                       ret = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER,
+                                                 (u16)reg->reg, value, 4);
+                       reg->val = value[0] | value[1] << 8 |
+                                  value[2] << 16 | value[3] << 24;
+                       break;
+               case 1: /* AFE - read byte */
+                       ret = cx231xx_read_i2c_data(dev, AFE_DEVICE_ADDRESS,
+                                                 (u16)reg->reg, 2, &data, 1);
+                       reg->val = le32_to_cpu(data & 0xff);
+                       break;
+               case 14: /* AFE - read dword */
+                       ret = cx231xx_read_i2c_data(dev, AFE_DEVICE_ADDRESS,
+                                                 (u16)reg->reg, 2, &data, 4);
+                       reg->val = le32_to_cpu(data);
+                       break;
+               case 2: /* Video Block - read byte */
+                       ret = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
+                                                 (u16)reg->reg, 2, &data, 1);
+                       reg->val = le32_to_cpu(data & 0xff);
+                       break;
+               case 24: /* Video Block - read dword */
+                       ret = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
+                                                 (u16)reg->reg, 2, &data, 4);
+                       reg->val = le32_to_cpu(data);
+                       break;
+               case 3: /* I2S block - read byte */
+                       ret = cx231xx_read_i2c_data(dev,
+                                                   I2S_BLK_DEVICE_ADDRESS,
+                                                   (u16)reg->reg, 1,
+                                                   &data, 1);
+                       reg->val = le32_to_cpu(data & 0xff);
+                       break;
+               case 34: /* I2S Block - read dword */
+                       ret =
+                           cx231xx_read_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
+                                                 (u16)reg->reg, 1, &data, 4);
+                       reg->val = le32_to_cpu(data);
+                       break;
+               }
+               return ret < 0 ? ret : 0;
+
+       case V4L2_CHIP_MATCH_I2C_DRIVER:
+               call_all(dev, core, g_register, reg);
+               return 0;
+       case V4L2_CHIP_MATCH_I2C_ADDR:
+               /* Not supported yet */
+               return -EINVAL;
+       default:
+               if (!v4l2_chip_match_host(&reg->match))
+                       return -EINVAL;
+       }
+
+       mutex_lock(&dev->lock);
+       call_all(dev, core, g_register, reg);
+       mutex_unlock(&dev->lock);
+
+       return ret;
+}
+
+static int vidioc_s_register(struct file *file, void *priv,
+                            struct v4l2_dbg_register *reg)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int ret = 0;
+       __le64 buf;
+       u32 value;
+       u8 data[4] = { 0, 0, 0, 0 };
+
+       buf = cpu_to_le64(reg->val);
+
+       switch (reg->match.type) {
+       case V4L2_CHIP_MATCH_HOST:
+               {
+                       value = (u32) buf & 0xffffffff;
+
+                       switch (reg->match.addr) {
+                       case 0: /* cx231xx internal registers */
+                               data[0] = (u8) value;
+                               data[1] = (u8) (value >> 8);
+                               data[2] = (u8) (value >> 16);
+                               data[3] = (u8) (value >> 24);
+                               ret = cx231xx_write_ctrl_reg(dev,
+                                                          VRT_SET_REGISTER,
+                                                          (u16)reg->reg, data,
+                                                          4);
+                               break;
+                       case 1: /* AFE - read byte */
+                               ret = cx231xx_write_i2c_data(dev,
+                                                       AFE_DEVICE_ADDRESS,
+                                                       (u16)reg->reg, 2,
+                                                       value, 1);
+                               break;
+                       case 14: /* AFE - read dword */
+                               ret = cx231xx_write_i2c_data(dev,
+                                                       AFE_DEVICE_ADDRESS,
+                                                       (u16)reg->reg, 2,
+                                                       value, 4);
+                               break;
+                       case 2: /* Video Block - read byte */
+                               ret =
+                                   cx231xx_write_i2c_data(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       (u16)reg->reg, 2,
+                                                       value, 1);
+                               break;
+                       case 24: /* Video Block - read dword */
+                               ret =
+                                   cx231xx_write_i2c_data(dev,
+                                                       VID_BLK_I2C_ADDRESS,
+                                                       (u16)reg->reg, 2,
+                                                       value, 4);
+                               break;
+                       case 3: /* I2S block - read byte */
+                               ret =
+                                   cx231xx_write_i2c_data(dev,
+                                                       I2S_BLK_DEVICE_ADDRESS,
+                                                       (u16)reg->reg, 1,
+                                                       value, 1);
+                               break;
+                       case 34: /* I2S block - read dword */
+                               ret =
+                                   cx231xx_write_i2c_data(dev,
+                                                       I2S_BLK_DEVICE_ADDRESS,
+                                                       (u16)reg->reg, 1,
+                                                       value, 4);
+                               break;
+                       }
+               }
+               return ret < 0 ? ret : 0;
+
+       default:
+               break;
+       }
+
+       mutex_lock(&dev->lock);
+       call_all(dev, core, s_register, reg);
+       mutex_unlock(&dev->lock);
+
+       return ret;
+}
+#endif
+
+static int vidioc_cropcap(struct file *file, void *priv,
+                         struct v4l2_cropcap *cc)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+               return -EINVAL;
+
+       cc->bounds.left = 0;
+       cc->bounds.top = 0;
+       cc->bounds.width = dev->width;
+       cc->bounds.height = dev->height;
+       cc->defrect = cc->bounds;
+       cc->pixelaspect.numerator = 54; /* 4:3 FIXME: remove magic numbers */
+       cc->pixelaspect.denominator = 59;
+
+       return 0;
+}
+
+static int vidioc_streamon(struct file *file, void *priv,
+                          enum v4l2_buf_type type)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+       rc = res_get(fh);
+
+       if (likely(rc >= 0))
+               rc = videobuf_streamon(&fh->vb_vidq);
+
+       call_all(dev, video, s_stream, 1);
+
+       mutex_unlock(&dev->lock);
+
+       return rc;
+}
+
+static int vidioc_streamoff(struct file *file, void *priv,
+                           enum v4l2_buf_type type)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       if ((fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) &&
+           (fh->type != V4L2_BUF_TYPE_VBI_CAPTURE))
+               return -EINVAL;
+       if (type != fh->type)
+               return -EINVAL;
+
+       mutex_lock(&dev->lock);
+
+       cx25840_call(dev, video, s_stream, 0);
+
+       videobuf_streamoff(&fh->vb_vidq);
+       res_free(fh);
+
+       mutex_unlock(&dev->lock);
+
+       return 0;
+}
+
+static int vidioc_querycap(struct file *file, void *priv,
+                          struct v4l2_capability *cap)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       strlcpy(cap->driver, "cx231xx", sizeof(cap->driver));
+       strlcpy(cap->card, cx231xx_boards[dev->model].name, sizeof(cap->card));
+       usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
+
+       cap->version = CX231XX_VERSION_CODE;
+
+       cap->capabilities = V4L2_CAP_VBI_CAPTURE |
+#if 0
+               V4L2_CAP_SLICED_VBI_CAPTURE |
+#endif
+               V4L2_CAP_VIDEO_CAPTURE  |
+               V4L2_CAP_AUDIO          |
+               V4L2_CAP_READWRITE      |
+               V4L2_CAP_STREAMING;
+
+       if (dev->tuner_type != TUNER_ABSENT)
+               cap->capabilities |= V4L2_CAP_TUNER;
+
+       return 0;
+}
+
+static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
+                                  struct v4l2_fmtdesc *f)
+{
+       if (unlikely(f->index >= ARRAY_SIZE(format)))
+               return -EINVAL;
+
+       strlcpy(f->description, format[f->index].name, sizeof(f->description));
+       f->pixelformat = format[f->index].fourcc;
+
+       return 0;
+}
+
+/* Sliced VBI ioctls */
+static int vidioc_g_fmt_sliced_vbi_cap(struct file *file, void *priv,
+                                      struct v4l2_format *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+
+       f->fmt.sliced.service_set = 0;
+
+       call_all(dev, video, g_fmt, f);
+
+       if (f->fmt.sliced.service_set == 0)
+               rc = -EINVAL;
+
+       mutex_unlock(&dev->lock);
+       return rc;
+}
+
+static int vidioc_try_set_sliced_vbi_cap(struct file *file, void *priv,
+                                        struct v4l2_format *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+       call_all(dev, video, g_fmt, f);
+       mutex_unlock(&dev->lock);
+
+       if (f->fmt.sliced.service_set == 0)
+               return -EINVAL;
+
+       return 0;
+}
+
+/* RAW VBI ioctls */
+
+static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
+                               struct v4l2_format *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       f->fmt.vbi.sampling_rate = (dev->norm & V4L2_STD_625_50) ?
+           35468950 : 28636363;
+       f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH;
+       f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
+       f->fmt.vbi.offset = 64 * 4;
+       f->fmt.vbi.start[0] = (dev->norm & V4L2_STD_625_50) ?
+           PAL_VBI_START_LINE : NTSC_VBI_START_LINE;
+       f->fmt.vbi.count[0] = (dev->norm & V4L2_STD_625_50) ?
+           PAL_VBI_LINES : NTSC_VBI_LINES;
+       f->fmt.vbi.start[1] = (dev->norm & V4L2_STD_625_50) ?
+           PAL_VBI_START_LINE + 312 : NTSC_VBI_START_LINE + 263;
+       f->fmt.vbi.count[1] = f->fmt.vbi.count[0];
+
+       return 0;
+
+}
+
+static int vidioc_try_fmt_vbi_cap(struct file *file, void *priv,
+                                 struct v4l2_format *f)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+
+       if (dev->vbi_stream_on && !fh->stream_on) {
+               cx231xx_errdev("%s device in use by another fh\n", __func__);
+               return -EBUSY;
+       }
+
+       f->type = V4L2_BUF_TYPE_VBI_CAPTURE;
+       f->fmt.vbi.sampling_rate = (dev->norm & V4L2_STD_625_50) ?
+           35468950 : 28636363;
+       f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH;
+       f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
+       f->fmt.vbi.offset = 244;
+       f->fmt.vbi.flags = 0;
+       f->fmt.vbi.start[0] = (dev->norm & V4L2_STD_625_50) ?
+           PAL_VBI_START_LINE : NTSC_VBI_START_LINE;
+       f->fmt.vbi.count[0] = (dev->norm & V4L2_STD_625_50) ?
+           PAL_VBI_LINES : NTSC_VBI_LINES;
+       f->fmt.vbi.start[1] = (dev->norm & V4L2_STD_625_50) ?
+           PAL_VBI_START_LINE + 312 : NTSC_VBI_START_LINE + 263;
+       f->fmt.vbi.count[1] = f->fmt.vbi.count[0];
+
+       return 0;
+
+}
+
+static int vidioc_reqbufs(struct file *file, void *priv,
+                         struct v4l2_requestbuffers *rb)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       return videobuf_reqbufs(&fh->vb_vidq, rb);
+}
+
+static int vidioc_querybuf(struct file *file, void *priv, struct v4l2_buffer *b)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       return videobuf_querybuf(&fh->vb_vidq, b);
+}
+
+static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *b)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       return videobuf_qbuf(&fh->vb_vidq, b);
+}
+
+static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
+{
+       struct cx231xx_fh *fh = priv;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       return videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags & O_NONBLOCK);
+}
+
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
+static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
+{
+       struct cx231xx_fh *fh = priv;
+
+       return videobuf_cgmbuf(&fh->vb_vidq, mbuf, 8);
+}
+#endif
+
+/* ----------------------------------------------------------- */
+/* RADIO ESPECIFIC IOCTLS                                      */
+/* ----------------------------------------------------------- */
+
+static int radio_querycap(struct file *file, void *priv,
+                         struct v4l2_capability *cap)
+{
+       struct cx231xx *dev = ((struct cx231xx_fh *)priv)->dev;
+
+       strlcpy(cap->driver, "cx231xx", sizeof(cap->driver));
+       strlcpy(cap->card, cx231xx_boards[dev->model].name, sizeof(cap->card));
+       usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
+
+       cap->version = CX231XX_VERSION_CODE;
+       cap->capabilities = V4L2_CAP_TUNER;
+       return 0;
+}
+
+static int radio_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
+{
+       struct cx231xx *dev = ((struct cx231xx_fh *)priv)->dev;
+
+       if (unlikely(t->index > 0))
+               return -EINVAL;
+
+       strcpy(t->name, "Radio");
+       t->type = V4L2_TUNER_RADIO;
+
+       mutex_lock(&dev->lock);
+       call_all(dev, tuner, s_tuner, t);
+       mutex_unlock(&dev->lock);
+
+       return 0;
+}
+
+static int radio_enum_input(struct file *file, void *priv, struct v4l2_input *i)
+{
+       if (i->index != 0)
+               return -EINVAL;
+       strcpy(i->name, "Radio");
+       i->type = V4L2_INPUT_TYPE_TUNER;
+
+       return 0;
+}
+
+static int radio_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
+{
+       if (unlikely(a->index))
+               return -EINVAL;
+
+       strcpy(a->name, "Radio");
+       return 0;
+}
+
+static int radio_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
+{
+       struct cx231xx *dev = ((struct cx231xx_fh *)priv)->dev;
+
+       if (0 != t->index)
+               return -EINVAL;
+
+       mutex_lock(&dev->lock);
+       call_all(dev, tuner, s_tuner, t);
+       mutex_unlock(&dev->lock);
+
+       return 0;
+}
+
+static int radio_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
+{
+       return 0;
+}
+
+static int radio_s_input(struct file *file, void *fh, unsigned int i)
+{
+       return 0;
+}
+
+static int radio_queryctrl(struct file *file, void *priv,
+                          struct v4l2_queryctrl *c)
+{
+       int i;
+
+       if (c->id < V4L2_CID_BASE || c->id >= V4L2_CID_LASTP1)
+               return -EINVAL;
+       if (c->id == V4L2_CID_AUDIO_MUTE) {
+               for (i = 0; i < CX231XX_CTLS; i++)
+                       if (cx231xx_ctls[i].v.id == c->id)
+                               break;
+               *c = cx231xx_ctls[i].v;
+       } else
+               *c = no_ctl;
+       return 0;
+}
+
+/*
+ * cx231xx_v4l2_open()
+ * inits the device and starts isoc transfer
+ */
+static int cx231xx_v4l2_open(struct file *filp)
+{
+       int minor = video_devdata(filp)->minor;
+       int errCode = 0, radio = 0;
+       struct cx231xx *dev = NULL;
+       struct cx231xx_fh *fh;
+       enum v4l2_buf_type fh_type = 0;
+
+       dev = cx231xx_get_device(minor, &fh_type, &radio);
+       if (NULL == dev)
+               return -ENODEV;
+
+       mutex_lock(&dev->lock);
+
+       cx231xx_videodbg("open minor=%d type=%s users=%d\n",
+                        minor, v4l2_type_names[fh_type], dev->users);
+
+#if 0
+       errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE);
+       if (errCode < 0) {
+               cx231xx_errdev
+                   ("Device locked on digital mode. Can't open analog\n");
+               mutex_unlock(&dev->lock);
+               return -EBUSY;
+       }
+#endif
+
+       fh = kzalloc(sizeof(struct cx231xx_fh), GFP_KERNEL);
+       if (!fh) {
+               cx231xx_errdev("cx231xx-video.c: Out of memory?!\n");
+               mutex_unlock(&dev->lock);
+               return -ENOMEM;
+       }
+       fh->dev = dev;
+       fh->radio = radio;
+       fh->type = fh_type;
+       filp->private_data = fh;
+
+       if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && dev->users == 0) {
+               dev->width = norm_maxw(dev);
+               dev->height = norm_maxh(dev);
+               dev->hscale = 0;
+               dev->vscale = 0;
+
+               /* Power up in Analog TV mode */
+               cx231xx_set_power_mode(dev, POLARIS_AVMODE_ANALOGT_TV);
+
+#if 0
+               cx231xx_set_mode(dev, CX231XX_ANALOG_MODE);
+#endif
+               cx231xx_resolution_set(dev);
+
+               /* set video alternate setting */
+               cx231xx_set_video_alternate(dev);
+
+               /* Needed, since GPIO might have disabled power of
+                  some i2c device */
+               cx231xx_config_i2c(dev);
+
+               /* device needs to be initialized before isoc transfer */
+               dev->video_input = dev->video_input > 2 ? 2 : dev->video_input;
+               video_mux(dev, dev->video_input);
+
+       }
+       if (fh->radio) {
+               cx231xx_videodbg("video_open: setting radio device\n");
+
+               /* cx231xx_start_radio(dev); */
+
+               call_all(dev, tuner, s_radio);
+       }
+
+       dev->users++;
+
+       if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
+               videobuf_queue_vmalloc_init(&fh->vb_vidq, &cx231xx_video_qops,
+                                           NULL, &dev->video_mode.slock,
+                                           fh->type, V4L2_FIELD_INTERLACED,
+                                           sizeof(struct cx231xx_buffer), fh);
+       if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
+               /* Set the required alternate setting  VBI interface works in
+                  Bulk mode only */
+               cx231xx_set_alt_setting(dev, INDEX_VANC, 0);
+
+               videobuf_queue_vmalloc_init(&fh->vb_vidq, &cx231xx_vbi_qops,
+                                           NULL, &dev->vbi_mode.slock,
+                                           fh->type, V4L2_FIELD_SEQ_TB,
+                                           sizeof(struct cx231xx_buffer), fh);
+       }
+
+       mutex_unlock(&dev->lock);
+
+       return errCode;
+}
+
+/*
+ * cx231xx_realease_resources()
+ * unregisters the v4l2,i2c and usb devices
+ * called when the device gets disconected or at module unload
+*/
+void cx231xx_release_analog_resources(struct cx231xx *dev)
+{
+
+       /*FIXME: I2C IR should be disconnected */
+
+       if (dev->radio_dev) {
+               if (-1 != dev->radio_dev->minor)
+                       video_unregister_device(dev->radio_dev);
+               else
+                       video_device_release(dev->radio_dev);
+               dev->radio_dev = NULL;
+       }
+       if (dev->vbi_dev) {
+               cx231xx_info("V4L2 device /dev/vbi%d deregistered\n",
+                            dev->vbi_dev->num);
+               if (-1 != dev->vbi_dev->minor)
+                       video_unregister_device(dev->vbi_dev);
+               else
+                       video_device_release(dev->vbi_dev);
+               dev->vbi_dev = NULL;
+       }
+       if (dev->vdev) {
+               cx231xx_info("V4L2 device /dev/video%d deregistered\n",
+                            dev->vdev->num);
+               if (-1 != dev->vdev->minor)
+                       video_unregister_device(dev->vdev);
+               else
+                       video_device_release(dev->vdev);
+               dev->vdev = NULL;
+       }
+}
+
+/*
+ * cx231xx_v4l2_close()
+ * stops streaming and deallocates all resources allocated by the v4l2
+ * calls and ioctls
+ */
+static int cx231xx_v4l2_close(struct file *filp)
+{
+       struct cx231xx_fh *fh = filp->private_data;
+       struct cx231xx *dev = fh->dev;
+
+       cx231xx_videodbg("users=%d\n", dev->users);
+
+       mutex_lock(&dev->lock);
+
+       if (res_check(fh))
+               res_free(fh);
+
+       if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
+               videobuf_stop(&fh->vb_vidq);
+               videobuf_mmap_free(&fh->vb_vidq);
+
+               /* the device is already disconnect,
+                  free the remaining resources */
+               if (dev->state & DEV_DISCONNECTED) {
+                       cx231xx_release_resources(dev);
+                       mutex_unlock(&dev->lock);
+                       kfree(dev);
+                       return 0;
+               }
+
+               /* do this before setting alternate! */
+               cx231xx_uninit_vbi_isoc(dev);
+
+               /* set alternate 0 */
+               if (!dev->vbi_or_sliced_cc_mode)
+                       cx231xx_set_alt_setting(dev, INDEX_VANC, 0);
+               else
+                       cx231xx_set_alt_setting(dev, INDEX_HANC, 0);
+
+               kfree(fh);
+               dev->users--;
+               wake_up_interruptible_nr(&dev->open, 1);
+               mutex_unlock(&dev->lock);
+               return 0;
+       }
+
+       if (dev->users == 1) {
+               videobuf_stop(&fh->vb_vidq);
+               videobuf_mmap_free(&fh->vb_vidq);
+
+               /* the device is already disconnect,
+                  free the remaining resources */
+               if (dev->state & DEV_DISCONNECTED) {
+                       cx231xx_release_resources(dev);
+                       mutex_unlock(&dev->lock);
+                       kfree(dev);
+                       return 0;
+               }
+
+               /* Save some power by putting tuner to sleep */
+               call_all(dev, tuner, s_standby);
+
+               /* do this before setting alternate! */
+               cx231xx_uninit_isoc(dev);
+               cx231xx_set_mode(dev, CX231XX_SUSPEND);
+
+               /* set alternate 0 */
+               cx231xx_set_alt_setting(dev, INDEX_VIDEO, 0);
+       }
+       kfree(fh);
+       dev->users--;
+       wake_up_interruptible_nr(&dev->open, 1);
+       mutex_unlock(&dev->lock);
+       return 0;
+}
+
+/*
+ * cx231xx_v4l2_read()
+ * will allocate buffers when called for the first time
+ */
+static ssize_t
+cx231xx_v4l2_read(struct file *filp, char __user *buf, size_t count,
+                 loff_t *pos)
+{
+       struct cx231xx_fh *fh = filp->private_data;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       if ((fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) ||
+           (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE)) {
+               mutex_lock(&dev->lock);
+               rc = res_get(fh);
+               mutex_unlock(&dev->lock);
+
+               if (unlikely(rc < 0))
+                       return rc;
+
+               return videobuf_read_stream(&fh->vb_vidq, buf, count, pos, 0,
+                                           filp->f_flags & O_NONBLOCK);
+       }
+       return 0;
+}
+
+/*
+ * cx231xx_v4l2_poll()
+ * will allocate buffers when called for the first time
+ */
+static unsigned int cx231xx_v4l2_poll(struct file *filp, poll_table * wait)
+{
+       struct cx231xx_fh *fh = filp->private_data;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+       rc = res_get(fh);
+       mutex_unlock(&dev->lock);
+
+       if (unlikely(rc < 0))
+               return POLLERR;
+
+       if ((V4L2_BUF_TYPE_VIDEO_CAPTURE == fh->type) ||
+           (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type))
+               return videobuf_poll_stream(filp, &fh->vb_vidq, wait);
+       else
+               return POLLERR;
+}
+
+/*
+ * cx231xx_v4l2_mmap()
+ */
+static int cx231xx_v4l2_mmap(struct file *filp, struct vm_area_struct *vma)
+{
+       struct cx231xx_fh *fh = filp->private_data;
+       struct cx231xx *dev = fh->dev;
+       int rc;
+
+       rc = check_dev(dev);
+       if (rc < 0)
+               return rc;
+
+       mutex_lock(&dev->lock);
+       rc = res_get(fh);
+       mutex_unlock(&dev->lock);
+
+       if (unlikely(rc < 0))
+               return rc;
+
+       rc = videobuf_mmap_mapper(&fh->vb_vidq, vma);
+
+       cx231xx_videodbg("vma start=0x%08lx, size=%ld, ret=%d\n",
+                        (unsigned long)vma->vm_start,
+                        (unsigned long)vma->vm_end -
+                        (unsigned long)vma->vm_start, rc);
+
+       return rc;
+}
+
+static const struct v4l2_file_operations cx231xx_v4l_fops = {
+       .owner   = THIS_MODULE,
+       .open    = cx231xx_v4l2_open,
+       .release = cx231xx_v4l2_close,
+       .read    = cx231xx_v4l2_read,
+       .poll    = cx231xx_v4l2_poll,
+       .mmap    = cx231xx_v4l2_mmap,
+       .ioctl   = video_ioctl2,
+};
+
+static const struct v4l2_ioctl_ops video_ioctl_ops = {
+       .vidioc_querycap               = vidioc_querycap,
+       .vidioc_enum_fmt_vid_cap       = vidioc_enum_fmt_vid_cap,
+       .vidioc_g_fmt_vid_cap          = vidioc_g_fmt_vid_cap,
+       .vidioc_try_fmt_vid_cap        = vidioc_try_fmt_vid_cap,
+       .vidioc_s_fmt_vid_cap          = vidioc_s_fmt_vid_cap,
+       .vidioc_g_fmt_vbi_cap          = vidioc_g_fmt_vbi_cap,
+       .vidioc_try_fmt_vbi_cap        = vidioc_try_fmt_vbi_cap,
+       .vidioc_s_fmt_vbi_cap          = vidioc_try_fmt_vbi_cap,
+       .vidioc_g_audio                =  vidioc_g_audio,
+       .vidioc_s_audio                = vidioc_s_audio,
+       .vidioc_cropcap                = vidioc_cropcap,
+       .vidioc_g_fmt_sliced_vbi_cap   = vidioc_g_fmt_sliced_vbi_cap,
+       .vidioc_try_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap,
+       .vidioc_reqbufs                = vidioc_reqbufs,
+       .vidioc_querybuf               = vidioc_querybuf,
+       .vidioc_qbuf                   = vidioc_qbuf,
+       .vidioc_dqbuf                  = vidioc_dqbuf,
+       .vidioc_s_std                  = vidioc_s_std,
+       .vidioc_g_std                  = vidioc_g_std,
+       .vidioc_enum_input             = vidioc_enum_input,
+       .vidioc_g_input                = vidioc_g_input,
+       .vidioc_s_input                = vidioc_s_input,
+       .vidioc_queryctrl              = vidioc_queryctrl,
+       .vidioc_g_ctrl                 = vidioc_g_ctrl,
+       .vidioc_s_ctrl                 = vidioc_s_ctrl,
+       .vidioc_streamon               = vidioc_streamon,
+       .vidioc_streamoff              = vidioc_streamoff,
+       .vidioc_g_tuner                = vidioc_g_tuner,
+       .vidioc_s_tuner                = vidioc_s_tuner,
+       .vidioc_g_frequency            = vidioc_g_frequency,
+       .vidioc_s_frequency            = vidioc_s_frequency,
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+       .vidioc_g_register             = vidioc_g_register,
+       .vidioc_s_register             = vidioc_s_register,
+#endif
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
+       .vidiocgmbuf                   = vidiocgmbuf,
+#endif
+};
+
+static struct video_device cx231xx_vbi_template;
+
+static const struct video_device cx231xx_video_template = {
+       .fops         = &cx231xx_v4l_fops,
+       .release      = video_device_release,
+       .ioctl_ops    = &video_ioctl_ops,
+       .minor        = -1,
+       .tvnorms      = V4L2_STD_ALL,
+       .current_norm = V4L2_STD_PAL,
+};
+
+static const struct v4l2_file_operations radio_fops = {
+       .owner   = THIS_MODULE,
+       .open   = cx231xx_v4l2_open,
+       .release = cx231xx_v4l2_close,
+       .ioctl   = video_ioctl2,
+};
+
+static const struct v4l2_ioctl_ops radio_ioctl_ops = {
+       .vidioc_querycap    = radio_querycap,
+       .vidioc_g_tuner     = radio_g_tuner,
+       .vidioc_enum_input  = radio_enum_input,
+       .vidioc_g_audio     = radio_g_audio,
+       .vidioc_s_tuner     = radio_s_tuner,
+       .vidioc_s_audio     = radio_s_audio,
+       .vidioc_s_input     = radio_s_input,
+       .vidioc_queryctrl   = radio_queryctrl,
+       .vidioc_g_ctrl      = vidioc_g_ctrl,
+       .vidioc_s_ctrl      = vidioc_s_ctrl,
+       .vidioc_g_frequency = vidioc_g_frequency,
+       .vidioc_s_frequency = vidioc_s_frequency,
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+       .vidioc_g_register  = vidioc_g_register,
+       .vidioc_s_register  = vidioc_s_register,
+#endif
+};
+
+static struct video_device cx231xx_radio_template = {
+       .name      = "cx231xx-radio",
+       .fops      = &radio_fops,
+       .ioctl_ops = &radio_ioctl_ops,
+       .minor     = -1,
+};
+
+/******************************** usb interface ******************************/
+
+static struct video_device *cx231xx_vdev_init(struct cx231xx *dev,
+               const struct video_device
+               *template, const char *type_name)
+{
+       struct video_device *vfd;
+
+       vfd = video_device_alloc();
+       if (NULL == vfd)
+               return NULL;
+
+       *vfd = *template;
+       vfd->minor = -1;
+       vfd->v4l2_dev = &dev->v4l2_dev;
+       vfd->release = video_device_release;
+       vfd->debug = video_debug;
+
+       snprintf(vfd->name, sizeof(vfd->name), "%s %s", dev->name, type_name);
+
+       return vfd;
+}
+
+int cx231xx_register_analog_devices(struct cx231xx *dev)
+{
+       int ret;
+
+       cx231xx_info("%s: v4l2 driver version %d.%d.%d\n",
+                    dev->name,
+                    (CX231XX_VERSION_CODE >> 16) & 0xff,
+                    (CX231XX_VERSION_CODE >> 8) & 0xff,
+                    CX231XX_VERSION_CODE & 0xff);
+
+       /* set default norm */
+       /*dev->norm = cx231xx_video_template.current_norm; */
+       dev->width = norm_maxw(dev);
+       dev->height = norm_maxh(dev);
+       dev->interlaced = 0;
+       dev->hscale = 0;
+       dev->vscale = 0;
+
+       /* Analog specific initialization */
+       dev->format = &format[0];
+       /* video_mux(dev, dev->video_input); */
+
+       /* Audio defaults */
+       dev->mute = 1;
+       dev->volume = 0x1f;
+
+       /* enable vbi capturing */
+       /* write code here...  */
+
+       /* allocate and fill video video_device struct */
+       dev->vdev = cx231xx_vdev_init(dev, &cx231xx_video_template, "video");
+       if (!dev->vdev) {
+               cx231xx_errdev("cannot allocate video_device.\n");
+               return -ENODEV;
+       }
+
+       /* register v4l2 video video_device */
+       ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER,
+                                   video_nr[dev->devno]);
+       if (ret) {
+               cx231xx_errdev("unable to register video device (error=%i).\n",
+                              ret);
+               return ret;
+       }
+
+       cx231xx_info("%s/0: registered device video%d [v4l2]\n",
+                    dev->name, dev->vdev->num);
+
+       /* Initialize VBI template */
+       memcpy(&cx231xx_vbi_template, &cx231xx_video_template,
+              sizeof(cx231xx_vbi_template));
+       strcpy(cx231xx_vbi_template.name, "cx231xx-vbi");
+
+       /* Allocate and fill vbi video_device struct */
+       dev->vbi_dev = cx231xx_vdev_init(dev, &cx231xx_vbi_template, "vbi");
+
+       /* register v4l2 vbi video_device */
+       ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI,
+                                   vbi_nr[dev->devno]);
+       if (ret < 0) {
+               cx231xx_errdev("unable to register vbi device\n");
+               return ret;
+       }
+
+       cx231xx_info("%s/0: registered device vbi%d\n",
+                    dev->name, dev->vbi_dev->num);
+
+       if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) {
+               dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template,
+                                                  "radio");
+               if (!dev->radio_dev) {
+                       cx231xx_errdev("cannot allocate video_device.\n");
+                       return -ENODEV;
+               }
+               ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO,
+                                           radio_nr[dev->devno]);
+               if (ret < 0) {
+                       cx231xx_errdev("can't register radio device\n");
+                       return ret;
+               }
+               cx231xx_info("Registered radio device as /dev/radio%d\n",
+                            dev->radio_dev->num);
+       }
+
+       cx231xx_info("V4L2 device registered as /dev/video%d and /dev/vbi%d\n",
+                    dev->vdev->num, dev->vbi_dev->num);
+
+       return 0;
+}
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h
new file mode 100644 (file)
index 0000000..aa4a23e
--- /dev/null
@@ -0,0 +1,779 @@
+/*
+   cx231xx.h - driver for Conexant Cx23100/101/102 USB video capture devices
+
+   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
+       Based on em28xx driver
+
+   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.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _CX231XX_H
+#define _CX231XX_H
+
+#include <linux/videodev2.h>
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+#include <linux/mutex.h>
+
+
+#include <media/videobuf-vmalloc.h>
+#include <media/v4l2-device.h>
+#include <media/ir-kbd-i2c.h>
+#if defined(CONFIG_VIDEO_CX231XX_DVB) || \
+       defined(CONFIG_VIDEO_CX231XX_DVB_MODULE)
+#include <media/videobuf-dvb.h>
+#endif
+
+#include "cx231xx-reg.h"
+#include "cx231xx-pcb-cfg.h"
+#include "cx231xx-conf-reg.h"
+
+#define DRIVER_NAME                     "cx231xx"
+#define PWR_SLEEP_INTERVAL              5
+
+/* I2C addresses for control block in Cx231xx */
+#define     AFE_DEVICE_ADDRESS         0x60
+#define     I2S_BLK_DEVICE_ADDRESS     0x98
+#define     VID_BLK_I2C_ADDRESS                0x88
+#define     DIF_USE_BASEBAND            0xFFFFFFFF
+
+/* Boards supported by driver */
+#define CX231XX_BOARD_UNKNOWN              0
+#define CX231XX_BOARD_CNXT_RDE_250             1
+#define CX231XX_BOARD_CNXT_RDU_250             2
+
+/* Limits minimum and default number of buffers */
+#define CX231XX_MIN_BUF                 4
+#define CX231XX_DEF_BUF                 12
+#define CX231XX_DEF_VBI_BUF             6
+
+#define VBI_LINE_COUNT                  17
+#define VBI_LINE_LENGTH                 1440
+
+/*Limits the max URB message size */
+#define URB_MAX_CTRL_SIZE               80
+
+/* Params for validated field */
+#define CX231XX_BOARD_NOT_VALIDATED     1
+#define CX231XX_BOARD_VALIDATED                0
+
+/* maximum number of cx231xx boards */
+#define CX231XX_MAXBOARDS               8
+
+/* maximum number of frames that can be queued */
+#define CX231XX_NUM_FRAMES              5
+
+/* number of buffers for isoc transfers */
+#define CX231XX_NUM_BUFS                8
+
+/* number of packets for each buffer
+   windows requests only 40 packets .. so we better do the same
+   this is what I found out for all alternate numbers there!
+ */
+#define CX231XX_NUM_PACKETS             40
+
+/* default alternate; 0 means choose the best */
+#define CX231XX_PINOUT                  0
+
+#define CX231XX_INTERLACED_DEFAULT      1
+
+/* time to wait when stopping the isoc transfer */
+#define CX231XX_URB_TIMEOUT            \
+               msecs_to_jiffies(CX231XX_NUM_BUFS * CX231XX_NUM_PACKETS)
+
+enum cx231xx_mode {
+       CX231XX_SUSPEND,
+       CX231XX_ANALOG_MODE,
+       CX231XX_DIGITAL_MODE,
+};
+
+enum cx231xx_std_mode {
+       CX231XX_TV_AIR = 0,
+       CX231XX_TV_CABLE
+};
+
+enum cx231xx_stream_state {
+       STREAM_OFF,
+       STREAM_INTERRUPT,
+       STREAM_ON,
+};
+
+struct cx231xx;
+
+struct cx231xx_usb_isoc_ctl {
+       /* max packet size of isoc transaction */
+       int max_pkt_size;
+
+       /* number of allocated urbs */
+       int num_bufs;
+
+       /* urb for isoc transfers */
+       struct urb **urb;
+
+       /* transfer buffers for isoc transfer */
+       char **transfer_buffer;
+
+       /* Last buffer command and region */
+       u8 cmd;
+       int pos, size, pktsize;
+
+       /* Last field: ODD or EVEN? */
+       int field;
+
+       /* Stores incomplete commands */
+       u32 tmp_buf;
+       int tmp_buf_len;
+
+       /* Stores already requested buffers */
+       struct cx231xx_buffer *buf;
+
+       /* Stores the number of received fields */
+       int nfields;
+
+       /* isoc urb callback */
+       int (*isoc_copy) (struct cx231xx *dev, struct urb *urb);
+};
+
+struct cx231xx_fmt {
+       char *name;
+       u32 fourcc;             /* v4l2 format id */
+       int depth;
+       int reg;
+};
+
+/* buffer for one video frame */
+struct cx231xx_buffer {
+       /* common v4l buffer stuff -- must be first */
+       struct videobuf_buffer vb;
+
+       struct list_head frame;
+       int top_field;
+       int receiving;
+};
+
+struct cx231xx_dmaqueue {
+       struct list_head active;
+       struct list_head queued;
+
+       wait_queue_head_t wq;
+
+       /* Counters to control buffer fill */
+       int pos;
+       u8 is_partial_line;
+       u8 partial_buf[8];
+       u8 last_sav;
+       int current_field;
+       u32 bytes_left_in_line;
+       u32 lines_completed;
+       u8 field1_done;
+       u32 lines_per_field;
+};
+
+/* inputs */
+
+#define MAX_CX231XX_INPUT               4
+
+enum cx231xx_itype {
+       CX231XX_VMUX_COMPOSITE1 = 1,
+       CX231XX_VMUX_SVIDEO,
+       CX231XX_VMUX_TELEVISION,
+       CX231XX_VMUX_CABLE,
+       CX231XX_RADIO,
+       CX231XX_VMUX_DVB,
+       CX231XX_VMUX_DEBUG
+};
+
+enum cx231xx_v_input {
+       CX231XX_VIN_1_1 = 0x1,
+       CX231XX_VIN_2_1,
+       CX231XX_VIN_3_1,
+       CX231XX_VIN_4_1,
+       CX231XX_VIN_1_2 = 0x01,
+       CX231XX_VIN_2_2,
+       CX231XX_VIN_3_2,
+       CX231XX_VIN_1_3 = 0x1,
+       CX231XX_VIN_2_3,
+       CX231XX_VIN_3_3,
+};
+
+/* cx231xx has two audio inputs: tuner and line in */
+enum cx231xx_amux {
+       /* This is the only entry for cx231xx tuner input */
+       CX231XX_AMUX_VIDEO,     /* cx231xx tuner */
+       CX231XX_AMUX_LINE_IN,   /* Line In */
+};
+
+struct cx231xx_reg_seq {
+       unsigned char bit;
+       unsigned char val;
+       int sleep;
+};
+
+struct cx231xx_input {
+       enum cx231xx_itype type;
+       unsigned int vmux;
+       enum cx231xx_amux amux;
+       struct cx231xx_reg_seq *gpio;
+};
+
+#define INPUT(nr) (&cx231xx_boards[dev->model].input[nr])
+
+enum cx231xx_decoder {
+       CX231XX_NODECODER,
+       CX231XX_AVDECODER
+};
+
+enum CX231XX_I2C_MASTER_PORT {
+       I2C_0 = 0,
+       I2C_1 = 1,
+       I2C_2 = 2,
+       I2C_3 = 3
+};
+
+struct cx231xx_board {
+       char *name;
+       int vchannels;
+       int tuner_type;
+       int tuner_addr;
+       v4l2_std_id norm;       /* tv norm */
+
+       /* demod related */
+       int demod_addr;
+       u8 demod_xfer_mode;     /* 0 - Serial; 1 - parallel */
+
+       /* GPIO Pins */
+       struct cx231xx_reg_seq *dvb_gpio;
+       struct cx231xx_reg_seq *suspend_gpio;
+       struct cx231xx_reg_seq *tuner_gpio;
+       u8 tuner_sif_gpio;
+       u8 tuner_scl_gpio;
+       u8 tuner_sda_gpio;
+
+       /* PIN ctrl */
+       u32 ctl_pin_status_mask;
+       u8 agc_analog_digital_select_gpio;
+       u32 gpio_pin_status_mask;
+
+       /* i2c masters */
+       u8 tuner_i2c_master;
+       u8 demod_i2c_master;
+
+       unsigned int max_range_640_480:1;
+       unsigned int has_dvb:1;
+       unsigned int valid:1;
+
+       unsigned char xclk, i2c_speed;
+
+       enum cx231xx_decoder decoder;
+
+       struct cx231xx_input input[MAX_CX231XX_INPUT];
+       struct cx231xx_input radio;
+       IR_KEYTAB_TYPE *ir_codes;
+};
+
+/* device states */
+enum cx231xx_dev_state {
+       DEV_INITIALIZED = 0x01,
+       DEV_DISCONNECTED = 0x02,
+       DEV_MISCONFIGURED = 0x04,
+};
+
+enum AFE_MODE {
+       AFE_MODE_LOW_IF,
+       AFE_MODE_BASEBAND,
+       AFE_MODE_EU_HI_IF,
+       AFE_MODE_US_HI_IF,
+       AFE_MODE_JAPAN_HI_IF
+};
+
+enum AUDIO_INPUT {
+       AUDIO_INPUT_MUTE,
+       AUDIO_INPUT_LINE,
+       AUDIO_INPUT_TUNER_TV,
+       AUDIO_INPUT_SPDIF,
+       AUDIO_INPUT_TUNER_FM
+};
+
+#define CX231XX_AUDIO_BUFS              5
+#define CX231XX_NUM_AUDIO_PACKETS       64
+#define CX231XX_CAPTURE_STREAM_EN       1
+#define CX231XX_STOP_AUDIO              0
+#define CX231XX_START_AUDIO             1
+
+/* cx231xx extensions */
+#define CX231XX_AUDIO                   0x10
+#define CX231XX_DVB                     0x20
+
+struct cx231xx_audio {
+       char name[50];
+       char *transfer_buffer[CX231XX_AUDIO_BUFS];
+       struct urb *urb[CX231XX_AUDIO_BUFS];
+       struct usb_device *udev;
+       unsigned int capture_transfer_done;
+       struct snd_pcm_substream *capture_pcm_substream;
+
+       unsigned int hwptr_done_capture;
+       struct snd_card *sndcard;
+
+       int users, shutdown;
+       enum cx231xx_stream_state capture_stream;
+       spinlock_t slock;
+
+       int alt;                /* alternate */
+       int max_pkt_size;       /* max packet size of isoc transaction */
+       int num_alt;            /* Number of alternative settings */
+       unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */
+       u16 end_point_addr;
+};
+
+struct cx231xx;
+
+struct cx231xx_fh {
+       struct cx231xx *dev;
+       unsigned int stream_on:1;       /* Locks streams */
+       int radio;
+
+       struct videobuf_queue vb_vidq;
+
+       enum v4l2_buf_type type;
+};
+
+/*****************************************************************/
+/* set/get i2c */
+/* 00--1Mb/s, 01-400kb/s, 10--100kb/s, 11--5Mb/s */
+#define I2C_SPEED_1M            0x0
+#define I2C_SPEED_400K          0x1
+#define I2C_SPEED_100K          0x2
+#define I2C_SPEED_5M            0x3
+
+/* 0-- STOP transaction */
+#define I2C_STOP                0x0
+/* 1-- do not transmit STOP at end of transaction */
+#define I2C_NOSTOP              0x1
+/* 1--alllow slave to insert clock wait states */
+#define I2C_SYNC                0x1
+
+struct cx231xx_i2c {
+       struct cx231xx *dev;
+
+       int nr;
+
+       /* i2c i/o */
+       struct i2c_adapter i2c_adap;
+       struct i2c_algo_bit_data i2c_algo;
+       struct i2c_client i2c_client;
+       u32 i2c_rc;
+
+       /* different settings for each bus */
+       u8 i2c_period;
+       u8 i2c_nostop;
+       u8 i2c_reserve;
+};
+
+struct cx231xx_i2c_xfer_data {
+       u8 dev_addr;
+       u8 direction;           /* 1 - IN, 0 - OUT */
+       u8 saddr_len;           /* sub address len */
+       u16 saddr_dat;          /* sub addr data */
+       u8 buf_size;            /* buffer size */
+       u8 *p_buffer;           /* pointer to the buffer */
+};
+
+struct VENDOR_REQUEST_IN {
+       u8 bRequest;
+       u16 wValue;
+       u16 wIndex;
+       u16 wLength;
+       u8 direction;
+       u8 bData;
+       u8 *pBuff;
+};
+
+struct cx231xx_ctrl {
+       struct v4l2_queryctrl v;
+       u32 off;
+       u32 reg;
+       u32 mask;
+       u32 shift;
+};
+
+enum TRANSFER_TYPE {
+       Raw_Video = 0,
+       Audio,
+       Vbi,                    /* VANC */
+       Sliced_cc,              /* HANC */
+       TS1_serial_mode,
+       TS2,
+       TS1_parallel_mode
+} ;
+
+struct cx231xx_video_mode {
+       /* Isoc control struct */
+       struct cx231xx_dmaqueue vidq;
+       struct cx231xx_usb_isoc_ctl isoc_ctl;
+       spinlock_t slock;
+
+       /* usb transfer */
+       int alt;                /* alternate */
+       int max_pkt_size;       /* max packet size of isoc transaction */
+       int num_alt;            /* Number of alternative settings */
+       unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */
+       u16 end_point_addr;
+};
+
+/* main device struct */
+struct cx231xx {
+       /* generic device properties */
+       char name[30];          /* name (including minor) of the device */
+       int model;              /* index in the device_data struct */
+       int devno;              /* marks the number of this device */
+
+       struct cx231xx_board board;
+
+       unsigned int stream_on:1;       /* Locks streams */
+       unsigned int vbi_stream_on:1;   /* Locks streams for VBI */
+       unsigned int has_audio_class:1;
+       unsigned int has_alsa_audio:1;
+
+       struct cx231xx_fmt *format;
+
+       struct v4l2_device v4l2_dev;
+       struct v4l2_subdev *sd_cx25840;
+       struct v4l2_subdev *sd_tuner;
+
+       struct cx231xx_IR *ir;
+
+       struct list_head devlist;
+
+       int tuner_type;         /* type of the tuner */
+       int tuner_addr;         /* tuner address */
+
+       /* I2C adapters: Master 1 & 2 (External) & Master 3 (Internal only) */
+       struct cx231xx_i2c i2c_bus[3];
+       unsigned int xc_fw_load_done:1;
+       struct mutex gpio_i2c_lock;
+
+       /* video for linux */
+       int users;              /* user count for exclusive use */
+       struct video_device *vdev;      /* video for linux device struct */
+       v4l2_std_id norm;       /* selected tv norm */
+       int ctl_freq;           /* selected frequency */
+       unsigned int ctl_ainput;        /* selected audio input */
+       int mute;
+       int volume;
+
+       /* frame properties */
+       int width;              /* current frame width */
+       int height;             /* current frame height */
+       unsigned hscale;        /* horizontal scale factor (see datasheet) */
+       unsigned vscale;        /* vertical scale factor (see datasheet) */
+       int interlaced;         /* 1=interlace fileds, 0=just top fileds */
+
+       struct cx231xx_audio adev;
+
+       /* states */
+       enum cx231xx_dev_state state;
+
+       struct work_struct request_module_wk;
+
+       /* locks */
+       struct mutex lock;
+       struct mutex ctrl_urb_lock;     /* protects urb_buf */
+       struct list_head inqueue, outqueue;
+       wait_queue_head_t open, wait_frame, wait_stream;
+       struct video_device *vbi_dev;
+       struct video_device *radio_dev;
+
+       unsigned char eedata[256];
+
+       struct cx231xx_video_mode video_mode;
+       struct cx231xx_video_mode vbi_mode;
+       struct cx231xx_video_mode sliced_cc_mode;
+       struct cx231xx_video_mode ts1_mode;
+
+       struct usb_device *udev;        /* the usb device */
+       char urb_buf[URB_MAX_CTRL_SIZE];        /* urb control msg buffer */
+
+       /* helper funcs that call usb_control_msg */
+       int (*cx231xx_read_ctrl_reg) (struct cx231xx *dev, u8 req, u16 reg,
+                                     char *buf, int len);
+       int (*cx231xx_write_ctrl_reg) (struct cx231xx *dev, u8 req, u16 reg,
+                                      char *buf, int len);
+       int (*cx231xx_send_usb_command) (struct cx231xx_i2c *i2c_bus,
+                               struct cx231xx_i2c_xfer_data *req_data);
+       int (*cx231xx_gpio_i2c_read) (struct cx231xx *dev, u8 dev_addr,
+                                     u8 *buf, u8 len);
+       int (*cx231xx_gpio_i2c_write) (struct cx231xx *dev, u8 dev_addr,
+                                      u8 *buf, u8 len);
+
+       int (*cx231xx_set_analog_freq) (struct cx231xx *dev, u32 freq);
+       int (*cx231xx_reset_analog_tuner) (struct cx231xx *dev);
+
+       enum cx231xx_mode mode;
+
+       struct cx231xx_dvb *dvb;
+
+       /* Cx231xx supported PCB config's */
+       struct pcb_config current_pcb_config;
+       u8 current_scenario_idx;
+       u8 interface_count;
+       u8 max_iad_interface_count;
+
+       /* GPIO related register direction and values */
+       u32 gpio_dir;
+       u32 gpio_val;
+
+       /* Power Modes */
+       int power_mode;
+
+       /* afe parameters */
+       enum AFE_MODE afe_mode;
+       u32 afe_ref_count;
+
+       /* video related parameters */
+       u32 video_input;
+       u32 active_mode;
+       u8 vbi_or_sliced_cc_mode;       /* 0 - vbi ; 1 - sliced cc mode */
+       enum cx231xx_std_mode std_mode; /* 0 - Air; 1 - cable */
+
+};
+
+#define cx25840_call(cx231xx, o, f, args...) \
+       v4l2_subdev_call(cx231xx->sd_cx25840, o, f, ##args)
+#define tuner_call(cx231xx, o, f, args...) \
+       v4l2_subdev_call(cx231xx->sd_tuner, o, f, ##args)
+#define call_all(dev, o, f, args...) \
+       v4l2_device_call_until_err(&dev->v4l2_dev, 0, o, f, ##args)
+
+struct cx231xx_ops {
+       struct list_head next;
+       char *name;
+       int id;
+       int (*init) (struct cx231xx *);
+       int (*fini) (struct cx231xx *);
+};
+
+/* call back functions in dvb module */
+int cx231xx_set_analog_freq(struct cx231xx *dev, u32 freq);
+int cx231xx_reset_analog_tuner(struct cx231xx *dev);
+
+/* Provided by cx231xx-i2c.c */
+void cx231xx_do_i2c_scan(struct cx231xx *dev, struct i2c_client *c);
+int cx231xx_i2c_register(struct cx231xx_i2c *bus);
+int cx231xx_i2c_unregister(struct cx231xx_i2c *bus);
+
+/* Internal block control functions */
+int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr,
+                         u16 saddr, u8 saddr_len, u32 *data, u8 data_len);
+int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr,
+                          u16 saddr, u8 saddr_len, u32 data, u8 data_len);
+int cx231xx_reg_mask_write(struct cx231xx *dev, u8 dev_addr, u8 size,
+                          u16 register_address, u8 bit_start, u8 bit_end,
+                          u32 value);
+int cx231xx_read_modify_write_i2c_dword(struct cx231xx *dev, u8 dev_addr,
+                                       u16 saddr, u32 mask, u32 value);
+u32 cx231xx_set_field(u32 field_mask, u32 data);
+
+/* afe related functions */
+int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count);
+int cx231xx_afe_init_channels(struct cx231xx *dev);
+int cx231xx_afe_setup_AFE_for_baseband(struct cx231xx *dev);
+int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux);
+int cx231xx_afe_set_mode(struct cx231xx *dev, enum AFE_MODE mode);
+int cx231xx_afe_update_power_control(struct cx231xx *dev,
+                                       enum AV_MODE avmode);
+int cx231xx_afe_adjust_ref_count(struct cx231xx *dev, u32 video_input);
+
+/* i2s block related functions */
+int cx231xx_i2s_blk_initialize(struct cx231xx *dev);
+int cx231xx_i2s_blk_update_power_control(struct cx231xx *dev,
+                                       enum AV_MODE avmode);
+int cx231xx_i2s_blk_set_audio_input(struct cx231xx *dev, u8 audio_input);
+
+/* DIF related functions */
+int cx231xx_dif_configure_C2HH_for_low_IF(struct cx231xx *dev, u32 mode,
+                                         u32 function_mode, u32 standard);
+int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard);
+int cx231xx_tuner_pre_channel_change(struct cx231xx *dev);
+int cx231xx_tuner_post_channel_change(struct cx231xx *dev);
+
+/* video parser functions */
+u8 cx231xx_find_next_SAV_EAV(u8 *p_buffer, u32 buffer_size,
+                            u32 *p_bytes_used);
+u8 cx231xx_find_boundary_SAV_EAV(u8 *p_buffer, u8 *partial_buf,
+                                u32 *p_bytes_used);
+int cx231xx_do_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                   u8 *p_buffer, u32 bytes_to_copy);
+void cx231xx_reset_video_buffer(struct cx231xx *dev,
+                               struct cx231xx_dmaqueue *dma_q);
+u8 cx231xx_is_buffer_done(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q);
+u32 cx231xx_copy_video_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                           u8 *p_line, u32 length, int field_number);
+u32 cx231xx_get_video_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
+                          u8 sav_eav, u8 *p_buffer, u32 buffer_size);
+void cx231xx_swab(u16 *from, u16 *to, u16 len);
+
+/* Provided by cx231xx-core.c */
+
+u32 cx231xx_request_buffers(struct cx231xx *dev, u32 count);
+void cx231xx_queue_unusedframes(struct cx231xx *dev);
+void cx231xx_release_buffers(struct cx231xx *dev);
+
+/* read from control pipe */
+int cx231xx_read_ctrl_reg(struct cx231xx *dev, u8 req, u16 reg,
+                         char *buf, int len);
+
+/* write to control pipe */
+int cx231xx_write_ctrl_reg(struct cx231xx *dev, u8 req, u16 reg,
+                          char *buf, int len);
+int cx231xx_mode_register(struct cx231xx *dev, u16 address, u32 mode);
+
+int cx231xx_send_vendor_cmd(struct cx231xx *dev,
+                               struct VENDOR_REQUEST_IN *ven_req);
+int cx231xx_send_usb_command(struct cx231xx_i2c *i2c_bus,
+                               struct cx231xx_i2c_xfer_data *req_data);
+
+/* Gpio related functions */
+int cx231xx_send_gpio_cmd(struct cx231xx *dev, u32 gpio_bit, u8 *gpio_val,
+                         u8 len, u8 request, u8 direction);
+int cx231xx_set_gpio_bit(struct cx231xx *dev, u32 gpio_bit, u8 *gpio_val);
+int cx231xx_get_gpio_bit(struct cx231xx *dev, u32 gpio_bit, u8 *gpio_val);
+int cx231xx_set_gpio_value(struct cx231xx *dev, int pin_number, int pin_value);
+int cx231xx_set_gpio_direction(struct cx231xx *dev, int pin_number,
+                              int pin_value);
+
+int cx231xx_gpio_i2c_start(struct cx231xx *dev);
+int cx231xx_gpio_i2c_end(struct cx231xx *dev);
+int cx231xx_gpio_i2c_write_byte(struct cx231xx *dev, u8 data);
+int cx231xx_gpio_i2c_read_byte(struct cx231xx *dev, u8 *buf);
+int cx231xx_gpio_i2c_read_ack(struct cx231xx *dev);
+int cx231xx_gpio_i2c_write_ack(struct cx231xx *dev);
+int cx231xx_gpio_i2c_write_nak(struct cx231xx *dev);
+
+int cx231xx_gpio_i2c_read(struct cx231xx *dev, u8 dev_addr, u8 *buf, u8 len);
+int cx231xx_gpio_i2c_write(struct cx231xx *dev, u8 dev_addr, u8 *buf, u8 len);
+
+/* audio related functions */
+int cx231xx_set_audio_decoder_input(struct cx231xx *dev,
+                                   enum AUDIO_INPUT audio_input);
+
+int cx231xx_capture_start(struct cx231xx *dev, int start, u8 media_type);
+int cx231xx_resolution_set(struct cx231xx *dev);
+int cx231xx_set_video_alternate(struct cx231xx *dev);
+int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt);
+int cx231xx_init_isoc(struct cx231xx *dev, int max_packets,
+                     int num_bufs, int max_pkt_size,
+                     int (*isoc_copy) (struct cx231xx *dev,
+                                       struct urb *urb));
+void cx231xx_uninit_isoc(struct cx231xx *dev);
+int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode);
+int cx231xx_gpio_set(struct cx231xx *dev, struct cx231xx_reg_seq *gpio);
+
+/* Device list functions */
+void cx231xx_release_resources(struct cx231xx *dev);
+void cx231xx_release_analog_resources(struct cx231xx *dev);
+int cx231xx_register_analog_devices(struct cx231xx *dev);
+void cx231xx_remove_from_devlist(struct cx231xx *dev);
+void cx231xx_add_into_devlist(struct cx231xx *dev);
+struct cx231xx *cx231xx_get_device(int minor,
+                                  enum v4l2_buf_type *fh_type, int *has_radio);
+void cx231xx_init_extension(struct cx231xx *dev);
+void cx231xx_close_extension(struct cx231xx *dev);
+
+/* hardware init functions */
+int cx231xx_dev_init(struct cx231xx *dev);
+void cx231xx_dev_uninit(struct cx231xx *dev);
+void cx231xx_config_i2c(struct cx231xx *dev);
+int cx231xx_config(struct cx231xx *dev);
+
+/* Stream control functions */
+int cx231xx_start_stream(struct cx231xx *dev, u32 ep_mask);
+int cx231xx_stop_stream(struct cx231xx *dev, u32 ep_mask);
+
+int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type);
+
+/* Power control functions */
+int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode);
+int cx231xx_power_suspend(struct cx231xx *dev);
+
+/* chip specific control functions */
+int cx231xx_init_ctrl_pin_status(struct cx231xx *dev);
+int cx231xx_set_agc_analog_digital_mux_select(struct cx231xx *dev,
+                                             u8 analog_or_digital);
+int cx231xx_enable_i2c_for_tuner(struct cx231xx *dev, u8 I2CIndex);
+
+/* video audio decoder related functions */
+void video_mux(struct cx231xx *dev, int index);
+int cx231xx_set_video_input_mux(struct cx231xx *dev, u8 input);
+int cx231xx_set_decoder_video_input(struct cx231xx *dev, u8 pin_type, u8 input);
+int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev);
+int cx231xx_set_audio_input(struct cx231xx *dev, u8 input);
+void get_scale(struct cx231xx *dev,
+              unsigned int width, unsigned int height,
+              unsigned int *hscale, unsigned int *vscale);
+
+/* Provided by cx231xx-video.c */
+int cx231xx_register_extension(struct cx231xx_ops *dev);
+void cx231xx_unregister_extension(struct cx231xx_ops *dev);
+void cx231xx_init_extension(struct cx231xx *dev);
+void cx231xx_close_extension(struct cx231xx *dev);
+
+/* Provided by cx231xx-cards.c */
+extern void cx231xx_pre_card_setup(struct cx231xx *dev);
+extern void cx231xx_card_setup(struct cx231xx *dev);
+extern struct cx231xx_board cx231xx_boards[];
+extern struct usb_device_id cx231xx_id_table[];
+extern const unsigned int cx231xx_bcount;
+void cx231xx_set_ir(struct cx231xx *dev, struct IR_i2c *ir);
+int cx231xx_tuner_callback(void *ptr, int component, int command, int arg);
+
+/* Provided by cx231xx-input.c */
+int cx231xx_ir_init(struct cx231xx *dev);
+int cx231xx_ir_fini(struct cx231xx *dev);
+
+/* printk macros */
+
+#define cx231xx_err(fmt, arg...) do {\
+       printk(KERN_ERR fmt , ##arg); } while (0)
+
+#define cx231xx_errdev(fmt, arg...) do {\
+       printk(KERN_ERR "%s: "fmt,\
+                       dev->name , ##arg); } while (0)
+
+#define cx231xx_info(fmt, arg...) do {\
+       printk(KERN_INFO "%s: "fmt,\
+                       dev->name , ##arg); } while (0)
+#define cx231xx_warn(fmt, arg...) do {\
+       printk(KERN_WARNING "%s: "fmt,\
+                       dev->name , ##arg); } while (0)
+
+static inline unsigned int norm_maxw(struct cx231xx *dev)
+{
+       if (dev->board.max_range_640_480)
+               return 640;
+       else
+               return 720;
+}
+
+static inline unsigned int norm_maxh(struct cx231xx *dev)
+{
+       if (dev->board.max_range_640_480)
+               return 480;
+       else
+               return (dev->norm & V4L2_STD_625_50) ? 576 : 480;
+}
+#endif
index 5e4b7e7..a3c0565 100644 (file)
@@ -739,9 +739,10 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
        case CX23885_BOARD_COMPRO_VIDEOMATE_E650F:
        case CX23885_BOARD_NETUP_DUAL_DVBS2_CI:
-               dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->i2c_bus[2].i2c_adap,
+               dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
+                               &dev->i2c_bus[2].i2c_adap,
                                "cx25840", "cx25840", 0x88 >> 1);
-               v4l2_subdev_call(dev->sd_cx25840, core, init, 0);
+               v4l2_subdev_call(dev->sd_cx25840, core, load_fw);
                break;
        }
 
index dc7fff2..beda429 100644 (file)
@@ -875,7 +875,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
        cx23885_i2c_register(&dev->i2c_bus[1]);
        cx23885_i2c_register(&dev->i2c_bus[2]);
        cx23885_card_setup(dev);
-       call_all(dev, core, s_standby, 0);
+       call_all(dev, tuner, s_standby);
        cx23885_ir_init(dev);
 
        if (cx23885_boards[dev->board].porta == CX23885_ANALOG_VIDEO) {
index d43c743..f48454a 100644 (file)
@@ -673,7 +673,7 @@ static int dvb_register(struct cx23885_tsport *port)
        fe0->dvb.frontend->callback = cx23885_tuner_callback;
 
        /* Put the analog decoder in standby to keep it quiet */
-       call_all(dev, core, s_standby, 0);
+       call_all(dev, tuner, s_standby);
 
        if (fe0->dvb.frontend->ops.analog_ops.standby)
                fe0->dvb.frontend->ops.analog_ops.standby(fe0->dvb.frontend);
index f0ac62c..68068c6 100644 (file)
@@ -299,7 +299,7 @@ static int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm)
 
        dev->tvnorm = norm;
 
-       call_all(dev, tuner, s_std, norm);
+       call_all(dev, core, s_std, norm);
 
        return 0;
 }
@@ -393,9 +393,6 @@ static void res_free(struct cx23885_dev *dev, struct cx23885_fh *fh,
 
 static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
 {
-       struct v4l2_routing route;
-       memset(&route, 0, sizeof(route));
-
        dprintk(1, "%s() video_mux: %d [vmux=%d, gpio=0x%x,0x%x,0x%x,0x%x]\n",
                __func__,
                input, INPUT(input)->vmux,
@@ -403,10 +400,9 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
                INPUT(input)->gpio2, INPUT(input)->gpio3);
        dev->input = input;
 
-       route.input = INPUT(input)->vmux;
-
        /* Tell the internal A/V decoder */
-       v4l2_subdev_call(dev->sd_cx25840, video, s_routing, &route);
+       v4l2_subdev_call(dev->sd_cx25840, video, s_routing,
+                       INPUT(input)->vmux, 0, 0);
 
        return 0;
 }
@@ -1523,10 +1519,12 @@ int cx23885_video_register(struct cx23885_dev *dev)
                struct v4l2_subdev *sd = NULL;
 
                if (dev->tuner_addr)
-                       sd = v4l2_i2c_new_subdev(&dev->i2c_bus[1].i2c_adap,
+                       sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
+                               &dev->i2c_bus[1].i2c_adap,
                                "tuner", "tuner", dev->tuner_addr);
                else
-                       sd = v4l2_i2c_new_probed_subdev(&dev->i2c_bus[1].i2c_adap,
+                       sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
+                               &dev->i2c_bus[1].i2c_adap,
                                "tuner", "tuner", v4l2_i2c_tuner_addrs(ADDRS_TV));
                if (sd) {
                        struct tuner_setup tun_setup;
index 02d980a..8564283 100644 (file)
@@ -37,7 +37,7 @@
 #include <linux/version.h>
 #include <linux/mutex.h>
 
-#define CX23885_VERSION_CODE KERNEL_VERSION(0, 0, 1)
+#define CX23885_VERSION_CODE KERNEL_VERSION(0, 0, 2)
 
 #define UNSET (-1U)
 
index 93d74be..2f846f5 100644 (file)
@@ -32,7 +32,7 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
 
        /* common for all inputs and rates */
        /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x10 */
-       if (!state->is_cx23885)
+       if (!state->is_cx23885 && !state->is_cx231xx)
                cx25840_write(client, 0x127, 0x50);
 
        if (state->aud_input != CX25840_AUDIO_SERIAL) {
@@ -43,11 +43,14 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
                                 * so avoid destroying registers. */
                                break;
                        }
-                       /* VID_PLL and AUX_PLL */
-                       cx25840_write4(client, 0x108, 0x1006040f);
 
-                       /* AUX_PLL_FRAC */
-                       cx25840_write4(client, 0x110, 0x01bb39ee);
+                       if (!state->is_cx231xx) {
+                               /* VID_PLL and AUX_PLL */
+                               cx25840_write4(client, 0x108, 0x1006040f);
+
+                               /* AUX_PLL_FRAC */
+                               cx25840_write4(client, 0x110, 0x01bb39ee);
+                       }
 
                        if (state->is_cx25836)
                                break;
@@ -64,11 +67,14 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
                                 * so avoid destroying registers. */
                                break;
                        }
-                       /* VID_PLL and AUX_PLL */
-                       cx25840_write4(client, 0x108, 0x1009040f);
 
-                       /* AUX_PLL_FRAC */
-                       cx25840_write4(client, 0x110, 0x00ec6bd6);
+                       if (!state->is_cx231xx) {
+                               /* VID_PLL and AUX_PLL */
+                               cx25840_write4(client, 0x108, 0x1009040f);
+
+                               /* AUX_PLL_FRAC */
+                               cx25840_write4(client, 0x110, 0x00ec6bd6);
+                       }
 
                        if (state->is_cx25836)
                                break;
@@ -85,11 +91,14 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
                                 * so avoid destroying registers. */
                                break;
                        }
-                       /* VID_PLL and AUX_PLL */
-                       cx25840_write4(client, 0x108, 0x100a040f);
 
-                       /* AUX_PLL_FRAC */
-                       cx25840_write4(client, 0x110, 0x0098d6e5);
+                       if (!state->is_cx231xx) {
+                               /* VID_PLL and AUX_PLL */
+                               cx25840_write4(client, 0x108, 0x100a040f);
+
+                               /* AUX_PLL_FRAC */
+                               cx25840_write4(client, 0x110, 0x0098d6e5);
+                       }
 
                        if (state->is_cx25836)
                                break;
@@ -108,11 +117,14 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
                                 * so avoid destroying registers. */
                                break;
                        }
-                       /* VID_PLL and AUX_PLL */
-                       cx25840_write4(client, 0x108, 0x1e08040f);
 
-                       /* AUX_PLL_FRAC */
-                       cx25840_write4(client, 0x110, 0x012a0869);
+                       if (!state->is_cx231xx) {
+                               /* VID_PLL and AUX_PLL */
+                               cx25840_write4(client, 0x108, 0x1e08040f);
+
+                               /* AUX_PLL_FRAC */
+                               cx25840_write4(client, 0x110, 0x012a0869);
+                       }
 
                        if (state->is_cx25836)
                                break;
@@ -136,11 +148,14 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
                                break;
                        }
 
-                       /* VID_PLL and AUX_PLL */
-                       cx25840_write4(client, 0x108, 0x1809040f);
 
-                       /* AUX_PLL_FRAC */
-                       cx25840_write4(client, 0x110, 0x00ec6bd6);
+                       if (!state->is_cx231xx) {
+                               /* VID_PLL and AUX_PLL */
+                               cx25840_write4(client, 0x108, 0x1809040f);
+
+                               /* AUX_PLL_FRAC */
+                               cx25840_write4(client, 0x110, 0x00ec6bd6);
+                       }
 
                        if (state->is_cx25836)
                                break;
@@ -155,7 +170,7 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
                        break;
 
                case 48000:
-                       if (!state->is_cx23885) {
+                       if (!state->is_cx23885 && !state->is_cx231xx) {
                                /* VID_PLL and AUX_PLL */
                                cx25840_write4(client, 0x108, 0x180a040f);
 
@@ -166,7 +181,7 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
                        if (state->is_cx25836)
                                break;
 
-                       if (!state->is_cx23885) {
+                       if (!state->is_cx23885 && !state->is_cx231xx) {
                                /* src1_ctl */
                                cx25840_write4(client, 0x8f8, 0x08018000);
 
@@ -227,10 +242,9 @@ void cx25840_audio_set_path(struct i2c_client *client)
        /* deassert soft reset */
        cx25840_and_or(client, 0x810, ~0x1, 0x00);
 
-       if (state->is_cx23885) {
-               /* Ensure the controller is running when we exit */
+       /* Ensure the controller is running when we exit */
+       if (state->is_cx23885 || state->is_cx231xx)
                cx25840_and_or(client, 0x803, ~0x10, 0x10);
-       }
 }
 
 static int get_volume(struct i2c_client *client)
index 737ee4e..0be51b6 100644 (file)
@@ -345,6 +345,77 @@ static void cx23885_initialize(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
+static void cx231xx_initialize(struct i2c_client *client)
+{
+       DEFINE_WAIT(wait);
+       struct cx25840_state *state = to_state(i2c_get_clientdata(client));
+       struct workqueue_struct *q;
+
+       /* Internal Reset */
+       cx25840_and_or(client, 0x102, ~0x01, 0x01);
+       cx25840_and_or(client, 0x102, ~0x01, 0x00);
+
+       /* Stop microcontroller */
+       cx25840_and_or(client, 0x803, ~0x10, 0x00);
+
+       /* DIF in reset? */
+       cx25840_write(client, 0x398, 0);
+
+       /* Trust the default xtal, no division */
+       /* This changes for the cx23888 products */
+       cx25840_write(client, 0x2, 0x76);
+
+       /* Bring down the regulator for AUX clk */
+       cx25840_write(client, 0x1, 0x40);
+
+       /* Disable DIF bypass */
+       cx25840_write4(client, 0x33c, 0x00000001);
+
+       /* DIF Src phase inc */
+       cx25840_write4(client, 0x340, 0x0df7df83);
+
+       /* Luma */
+       cx25840_write4(client, 0x414, 0x00107d12);
+
+       /* Chroma */
+       cx25840_write4(client, 0x420, 0x3d008282);
+
+       /* ADC2 input select */
+       cx25840_write(client, 0x102, 0x10);
+
+       /* VIN1 & VIN5 */
+       cx25840_write(client, 0x103, 0x11);
+
+       /* Enable format auto detect */
+       cx25840_write(client, 0x400, 0);
+       /* Fast subchroma lock */
+       /* White crush, Chroma AGC & Chroma Killer enabled */
+       cx25840_write(client, 0x401, 0xe8);
+
+       /* Do the firmware load in a work handler to prevent.
+          Otherwise the kernel is blocked waiting for the
+          bit-banging i2c interface to finish uploading the
+          firmware. */
+       INIT_WORK(&state->fw_work, cx25840_work_handler);
+       init_waitqueue_head(&state->fw_wait);
+       q = create_singlethread_workqueue("cx25840_fw");
+       prepare_to_wait(&state->fw_wait, &wait, TASK_UNINTERRUPTIBLE);
+       queue_work(q, &state->fw_work);
+       schedule();
+       finish_wait(&state->fw_wait, &wait);
+       destroy_workqueue(q);
+
+       cx25840_std_setup(client);
+
+       /* (re)set input */
+       set_input(client, state->vid_input, state->aud_input);
+
+       /* start microcontroller */
+       cx25840_and_or(client, 0x803, ~0x10, 0x10);
+}
+
+/* ----------------------------------------------------------------------- */
+
 void cx25840_std_setup(struct i2c_client *client)
 {
        struct cx25840_state *state = to_state(i2c_get_clientdata(client));
@@ -414,39 +485,41 @@ void cx25840_std_setup(struct i2c_client *client)
        }
 
        /* DEBUG: Displays configured PLL frequency */
-       pll_int = cx25840_read(client, 0x108);
-       pll_frac = cx25840_read4(client, 0x10c) & 0x1ffffff;
-       pll_post = cx25840_read(client, 0x109);
-       v4l_dbg(1, cx25840_debug, client,
-                               "PLL regs = int: %u, frac: %u, post: %u\n",
-                               pll_int, pll_frac, pll_post);
-
-       if (pll_post) {
-               int fin, fsc;
-               int pll = (28636363L * ((((u64)pll_int) << 25L) + pll_frac)) >> 25L;
-
-               pll /= pll_post;
-               v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n",
-                               pll / 1000000, pll % 1000000);
-               v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n",
-                               pll / 8000000, (pll / 8) % 1000000);
-
-               fin = ((u64)src_decimation * pll) >> 12;
-               v4l_dbg(1, cx25840_debug, client,
-                               "ADC Sampling freq = %d.%06d MHz\n",
-                               fin / 1000000, fin % 1000000);
-
-               fsc = (((u64)sc) * pll) >> 24L;
+       if (!state->is_cx231xx) {
+               pll_int = cx25840_read(client, 0x108);
+               pll_frac = cx25840_read4(client, 0x10c) & 0x1ffffff;
+               pll_post = cx25840_read(client, 0x109);
                v4l_dbg(1, cx25840_debug, client,
-                               "Chroma sub-carrier freq = %d.%06d MHz\n",
-                               fsc / 1000000, fsc % 1000000);
-
-               v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, "
-                       "vblank %i, vactive %i, vblank656 %i, src_dec %i, "
-                       "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, "
-                       "sc 0x%06x\n",
-                       hblank, hactive, vblank, vactive, vblank656,
-                       src_decimation, burst, luma_lpf, uv_lpf, comb, sc);
+                       "PLL regs = int: %u, frac: %u, post: %u\n",
+                       pll_int, pll_frac, pll_post);
+
+               if (pll_post) {
+                       int fin, fsc;
+                       int pll = (28636363L * ((((u64)pll_int) << 25L) + pll_frac)) >> 25L;
+
+                       pll /= pll_post;
+                       v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n",
+                                       pll / 1000000, pll % 1000000);
+                       v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n",
+                                       pll / 8000000, (pll / 8) % 1000000);
+
+                       fin = ((u64)src_decimation * pll) >> 12;
+                       v4l_dbg(1, cx25840_debug, client,
+                                       "ADC Sampling freq = %d.%06d MHz\n",
+                                       fin / 1000000, fin % 1000000);
+
+                       fsc = (((u64)sc) * pll) >> 24L;
+                       v4l_dbg(1, cx25840_debug, client,
+                                       "Chroma sub-carrier freq = %d.%06d MHz\n",
+                                       fsc / 1000000, fsc % 1000000);
+
+                       v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, "
+                               "vblank %i, vactive %i, vblank656 %i, src_dec %i, "
+                               "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, "
+                               "sc 0x%06x\n",
+                               hblank, hactive, vblank, vactive, vblank656,
+                               src_decimation, burst, luma_lpf, uv_lpf, comb, sc);
+               }
        }
 
        /* Sets horizontal blanking delay and active lines */
@@ -596,7 +669,7 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp
         * configuration in reg (for the cx23885) so we have no
         * need to attempt to flip bits for earlier av decoders.
         */
-       if (!state->is_cx23885) {
+       if (!state->is_cx23885 && !state->is_cx231xx) {
                switch (aud_input) {
                case CX25840_AUDIO_SERIAL:
                        /* do nothing, use serial audio input */
@@ -619,7 +692,7 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp
        /* Set INPUT_MODE to Composite (0) or S-Video (1) */
        cx25840_and_or(client, 0x401, ~0x6, is_composite ? 0 : 0x02);
 
-       if (!state->is_cx23885) {
+       if (!state->is_cx23885 && !state->is_cx231xx) {
                /* Set CH_SEL_ADC2 to 1 if input comes from CH3 */
                cx25840_and_or(client, 0x102, ~0x2, (reg & 0x80) == 0 ? 2 : 0);
                /* Set DUAL_MODE_ADC2 to 1 if input comes from both CH2&CH3 */
@@ -659,6 +732,19 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp
                 */
                cx25840_write(client, 0x918, 0xa0);
                cx25840_write(client, 0x919, 0x01);
+       } else if (state->is_cx231xx) {
+               /* Audio channel 1 src : Parallel 1 */
+               cx25840_write(client, 0x124, 0x03);
+
+               /* I2S_IN_CTL: I2S_IN_SONY_MODE, LEFT SAMPLE on WS=1 */
+               cx25840_write(client, 0x914, 0xa0);
+
+               /* I2S_OUT_CTL:
+                * I2S_IN_SONY_MODE, LEFT SAMPLE on WS=1
+                * I2S_OUT_MASTER_MODE = Master
+                */
+               cx25840_write(client, 0x918, 0xa0);
+               cx25840_write(client, 0x919, 0x01);
        }
 
        return 0;
@@ -1096,7 +1182,7 @@ static void log_audio_status(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
-/* This init operation must be called to load the driver's firmware.
+/* This load_fw operation must be called to load the driver's firmware.
    Without this the audio standard detection will fail and you will
    only get mono.
 
@@ -1106,18 +1192,20 @@ static void log_audio_status(struct i2c_client *client)
    postponing it is that loading this firmware takes a long time (seconds)
    due to the slow i2c bus speed. So it will speed up the boot process if
    you can avoid loading the fw as long as the video device isn't used.  */
-static int cx25840_init(struct v4l2_subdev *sd, u32 val)
+static int cx25840_load_fw(struct v4l2_subdev *sd)
 {
        struct cx25840_state *state = to_state(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
        if (!state->is_initialized) {
-               /* initialize on first use */
+               /* initialize and load firmware */
                state->is_initialized = 1;
                if (state->is_cx25836)
                        cx25836_initialize(client);
                else if (state->is_cx23885)
                        cx23885_initialize(client);
+               else if (state->is_cx231xx)
+                       cx231xx_initialize(client);
                else
                        cx25840_initialize(client);
        }
@@ -1159,7 +1247,7 @@ static int cx25840_s_stream(struct v4l2_subdev *sd, int enable)
        v4l_dbg(1, cx25840_debug, client, "%s output\n",
                        enable ? "enable" : "disable");
        if (enable) {
-               if (state->is_cx23885) {
+               if (state->is_cx23885 || state->is_cx231xx) {
                        u8 v = (cx25840_read(client, 0x421) | 0x0b);
                        cx25840_write(client, 0x421, v);
                } else {
@@ -1169,7 +1257,7 @@ static int cx25840_s_stream(struct v4l2_subdev *sd, int enable)
                                        state->is_cx25836 ? 0x04 : 0x07);
                }
        } else {
-               if (state->is_cx23885) {
+               if (state->is_cx23885 || state->is_cx231xx) {
                        u8 v = cx25840_read(client, 0x421) & ~(0x0b);
                        cx25840_write(client, 0x421, v);
                } else {
@@ -1234,22 +1322,24 @@ static int cx25840_s_radio(struct v4l2_subdev *sd)
        return 0;
 }
 
-static int cx25840_s_video_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int cx25840_s_video_routing(struct v4l2_subdev *sd,
+                                  u32 input, u32 output, u32 config)
 {
        struct cx25840_state *state = to_state(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-       return set_input(client, route->input, state->aud_input);
+       return set_input(client, input, state->aud_input);
 }
 
-static int cx25840_s_audio_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int cx25840_s_audio_routing(struct v4l2_subdev *sd,
+                                  u32 input, u32 output, u32 config)
 {
        struct cx25840_state *state = to_state(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
        if (state->is_cx25836)
                return -EINVAL;
-       return set_input(client, state->vid_input, route->input);
+       return set_input(client, state->vid_input, input);
 }
 
 static int cx25840_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *freq)
@@ -1350,6 +1440,8 @@ static int cx25840_reset(struct v4l2_subdev *sd, u32 val)
                cx25836_initialize(client);
        else if (state->is_cx23885)
                cx23885_initialize(client);
+       else if (state->is_cx231xx)
+               cx231xx_initialize(client);
        else
                cx25840_initialize(client);
        return 0;
@@ -1382,8 +1474,9 @@ static const struct v4l2_subdev_core_ops cx25840_core_ops = {
        .g_ctrl = cx25840_g_ctrl,
        .s_ctrl = cx25840_s_ctrl,
        .queryctrl = cx25840_queryctrl,
+       .s_std = cx25840_s_std,
        .reset = cx25840_reset,
-       .init = cx25840_init,
+       .load_fw = cx25840_load_fw,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = cx25840_g_register,
        .s_register = cx25840_s_register,
@@ -1392,7 +1485,6 @@ static const struct v4l2_subdev_core_ops cx25840_core_ops = {
 
 static const struct v4l2_subdev_tuner_ops cx25840_tuner_ops = {
        .s_frequency = cx25840_s_frequency,
-       .s_std = cx25840_s_std,
        .s_radio = cx25840_s_radio,
        .g_tuner = cx25840_g_tuner,
        .s_tuner = cx25840_s_tuner,
@@ -1449,6 +1541,8 @@ static int cx25840_probe(struct i2c_client *client,
                id = V4L2_IDENT_CX25836 + ((device_id >> 4) & 0xf) - 6;
        } else if (device_id == 0x1313) {
                id = V4L2_IDENT_CX25836 + ((device_id >> 4) & 0xf) - 6;
+       } else if ((device_id & 0xfff0) == 0x5A30) {
+               id = V4L2_IDENT_CX25840 + ((device_id >> 4) & 0xf);
        }
        else {
                v4l_dbg(1, cx25840_debug, client, "cx25840 not found\n");
@@ -1471,6 +1565,7 @@ static int cx25840_probe(struct i2c_client *client,
        state->c = client;
        state->is_cx25836 = ((device_id & 0xff00) == 0x8300);
        state->is_cx23885 = (device_id == 0x0000) || (device_id == 0x1313);
+       state->is_cx231xx = (device_id == 0x5a3e);
        state->vid_input = CX25840_COMPOSITE7;
        state->aud_input = CX25840_AUDIO8;
        state->audclk_freq = 48000;
index 9ad0eb8..814b565 100644 (file)
@@ -50,6 +50,7 @@ struct cx25840_state {
        u32 rev;
        int is_cx25836;
        int is_cx23885;
+       int is_cx231xx;
        int is_initialized;
        wait_queue_head_t fw_wait;    /* wake up when the fw load is finished */
        struct work_struct fw_work;   /* work entry for fw load */
index 0b2dceb..0df53b0 100644 (file)
@@ -25,6 +25,7 @@
 
 #define FWFILE "v4l-cx25840.fw"
 #define FWFILE_CX23885 "v4l-cx23885-avcore-01.fw"
+#define FWFILE_CX231XX "v4l-cx231xx-avcore-01.fw"
 
 /*
  * Mike Isely <isely@pobox.com> - The FWSEND parameter controls the
@@ -96,9 +97,17 @@ int cx25840_loadfw(struct i2c_client *client)
        u8 buffer[FWSEND];
        const u8 *ptr;
        int size, retval;
+       int MAX_BUF_SIZE = FWSEND;
 
        if (state->is_cx23885)
                firmware = FWFILE_CX23885;
+       else if (state->is_cx231xx)
+               firmware = FWFILE_CX231XX;
+
+       if ((state->is_cx231xx) && MAX_BUF_SIZE > 16) {
+               v4l_err(client, " Firmware download size changed to 16 bytes max length\n");
+               MAX_BUF_SIZE = 16;  /* cx231xx cannot accept more than 16 bytes at a time */
+       }
 
        if (request_firmware(&fw, firmware, FWDEV(client)) != 0) {
                v4l_err(client, "unable to open firmware %s\n", firmware);
@@ -113,7 +122,7 @@ int cx25840_loadfw(struct i2c_client *client)
        size = fw->size;
        ptr = fw->data;
        while (size > 0) {
-               int len = min(FWSEND - 2, size);
+               int len = min(MAX_BUF_SIZE - 2, size);
 
                memcpy(buffer + 2, ptr, len);
 
index ce98d95..0ccdf36 100644 (file)
@@ -745,7 +745,7 @@ static int __devinit snd_cx88_create(struct snd_card *card,
                return err;
        }
 
-       if (!pci_dma_supported(pci,DMA_32BIT_MASK)) {
+       if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) {
                dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
                err = -EIO;
                cx88_core_put(core,pci);
index 0363971..6bbbfc6 100644 (file)
@@ -3049,7 +3049,7 @@ static void cx88_card_setup(struct cx88_core *core)
                            ctl.fname);
                call_all(core, tuner, s_config, &xc2028_cfg);
        }
-       call_all(core, core, s_standby, 0);
+       call_all(core, tuner, s_standby);
 }
 
 /* ------------------------------------------------------------------ */
@@ -3221,16 +3221,19 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
                   The radio_type is sometimes missing, or set to UNSET but
                   later code configures a tea5767.
                 */
-               v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner", "tuner",
+               v4l2_i2c_new_probed_subdev(&core->v4l2_dev, &core->i2c_adap,
+                               "tuner", "tuner",
                                v4l2_i2c_tuner_addrs(ADDRS_RADIO));
                if (has_demod)
-                       v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner",
-                               "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
+                       v4l2_i2c_new_probed_subdev(&core->v4l2_dev,
+                               &core->i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
                if (core->board.tuner_addr == ADDR_UNSET) {
-                       v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner",
-                               "tuner", has_demod ? tv_addrs + 4 : tv_addrs);
+                       v4l2_i2c_new_probed_subdev(&core->v4l2_dev,
+                               &core->i2c_adap, "tuner", "tuner",
+                               has_demod ? tv_addrs + 4 : tv_addrs);
                } else {
-                       v4l2_i2c_new_subdev(&core->i2c_adap,
+                       v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
                                "tuner", "tuner", core->board.tuner_addr);
                }
        }
index f2fb9f3..0e149b2 100644 (file)
@@ -991,7 +991,7 @@ int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm)
        set_tvaudio(core);
 
        // tell i2c chips
-       call_all(core, tuner, s_std, norm);
+       call_all(core, core, s_std, norm);
 
        // done
        return 0;
index 4ff4d9f..9389cf2 100644 (file)
@@ -1168,7 +1168,7 @@ static int dvb_register(struct cx8802_dev *dev)
                fe1->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl;
 
        /* Put the analog decoder in standby to keep it quiet */
-       call_all(core, core, s_standby, 0);
+       call_all(core, tuner, s_standby);
 
        /* register everything */
        return videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev,
index b295b76..da4e391 100644 (file)
@@ -455,7 +455,7 @@ static int cx8802_init_common(struct cx8802_dev *dev)
        if (pci_enable_device(dev->pci))
                return -EIO;
        pci_set_master(dev->pci);
-       if (!pci_dma_supported(dev->pci,DMA_32BIT_MASK)) {
+       if (!pci_dma_supported(dev->pci,DMA_BIT_MASK(32))) {
                printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name);
                return -EIO;
        }
index 434237a..b993d42 100644 (file)
@@ -428,10 +428,8 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input)
                   routes for different inputs. HVR-1300 surely does */
                if (core->board.audio_chip &&
                    core->board.audio_chip == V4L2_IDENT_WM8775) {
-                       struct v4l2_routing route;
-
-                       route.input = INPUT(input).audioroute;
-                       call_all(core, audio, s_routing, &route);
+                       call_all(core, audio, s_routing,
+                                       INPUT(input).audioroute, 0, 0);
                }
                /* cx2388's C-ADC is connected to the tuner only.
                   When used with S-Video, that ADC is busy dealing with
@@ -823,10 +821,8 @@ static int video_open(struct file *file)
                if (core->board.radio.audioroute) {
                        if(core->board.audio_chip &&
                                core->board.audio_chip == V4L2_IDENT_WM8775) {
-                               struct v4l2_routing route;
-
-                               route.input = core->board.radio.audioroute;
-                               call_all(core, audio, s_routing, &route);
+                               call_all(core, audio, s_routing,
+                                       core->board.radio.audioroute, 0, 0);
                        }
                        /* "I2S ADC mode" */
                        core->tvaudio = WW_I2SADC;
@@ -931,7 +927,7 @@ static int video_release(struct file *file)
        kfree(fh);
 
        if(atomic_dec_and_test(&dev->core->users))
-               call_all(dev->core, core, s_standby, 0);
+               call_all(dev->core, tuner, s_standby);
 
        return 0;
 }
@@ -1836,7 +1832,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
               dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
 
        pci_set_master(pci_dev);
-       if (!pci_dma_supported(pci_dev,DMA_32BIT_MASK)) {
+       if (!pci_dma_supported(pci_dev,DMA_BIT_MASK(32))) {
                printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name);
                err = -EIO;
                goto fail_core;
@@ -1882,18 +1878,15 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
        /* load and configure helper modules */
 
        if (core->board.audio_chip == V4L2_IDENT_WM8775)
-               v4l2_i2c_new_subdev(&core->i2c_adap,
+               v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
                                "wm8775", "wm8775", 0x36 >> 1);
 
        if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) {
                /* This probes for a tda9874 as is used on some
                   Pixelview Ultra boards. */
-               static const unsigned short i2c_addr[] = {
-                       0xb0 >> 1, I2C_CLIENT_END
-               };
-
-               v4l2_i2c_new_probed_subdev(&core->i2c_adap,
-                               "tvaudio", "tvaudio", i2c_addr);
+               v4l2_i2c_new_probed_subdev_addr(&core->v4l2_dev,
+                               &core->i2c_adap,
+                               "tvaudio", "tvaudio", 0xb0 >> 1);
        }
 
        switch (core->boardnr) {
index 9a43fdf..7724d16 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <linux/version.h>
 #include <linux/mutex.h>
-#define CX88_VERSION_CODE KERNEL_VERSION(0,0,6)
+#define CX88_VERSION_CODE KERNEL_VERSION(0,0,7)
 
 #define UNSET (-1U)
 
index 0f48c0f..7c70738 100644 (file)
@@ -31,6 +31,8 @@
 #include <media/msp3400.h>
 #include <media/saa7115.h>
 #include <media/tvp5150.h>
+#include <media/tvaudio.h>
+#include <media/i2c-addr.h>
 #include <media/tveeprom.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-chip-ident.h>
@@ -1240,6 +1242,7 @@ struct em28xx_board em28xx_boards[] = {
        [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = {
                .name         = "Compro VideoMate ForYou/Stereo",
                .tuner_type   = TUNER_LG_PAL_NEW_TAPC,
+               .tvaudio_addr = 0xb0,
                .tda9887_conf = TDA9887_PRESENT,
                .decoder      = EM28XX_TVP5150,
                .adecoder     = EM28XX_TVAUDIO,
@@ -1444,6 +1447,24 @@ static struct em28xx_hash_table em28xx_i2c_hash[] = {
        {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC},
 };
 
+/* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */
+static unsigned short saa711x_addrs[] = {
+       0x4a >> 1, 0x48 >> 1,   /* SAA7111, SAA7111A and SAA7113 */
+       0x42 >> 1, 0x40 >> 1,   /* SAA7114, SAA7115 and SAA7118 */
+       I2C_CLIENT_END };
+
+static unsigned short tvp5150_addrs[] = {
+       0xb8 >> 1,
+       0xba >> 1,
+       I2C_CLIENT_END
+};
+
+static unsigned short msp3400_addrs[] = {
+       0x80 >> 1,
+       0x88 >> 1,
+       I2C_CLIENT_END
+};
+
 int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
 {
        int rc = 0;
@@ -1672,31 +1693,55 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
        }
 }
 
-static void em28xx_config_tuner(struct em28xx *dev)
+static void em28xx_tuner_setup(struct em28xx *dev)
 {
-       struct v4l2_priv_tun_config  xc2028_cfg;
        struct tuner_setup           tun_setup;
        struct v4l2_frequency        f;
 
        if (dev->tuner_type == TUNER_ABSENT)
                return;
 
+       memset(&tun_setup, 0, sizeof(tun_setup));
+
        tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
-       tun_setup.type = dev->tuner_type;
-       tun_setup.addr = dev->tuner_addr;
        tun_setup.tuner_callback = em28xx_tuner_callback;
 
-       em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);
+       if (dev->board.radio.type) {
+               tun_setup.type = dev->board.radio.type;
+               tun_setup.addr = dev->board.radio_addr;
+
+               v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr, &tun_setup);
+       }
+
+       if ((dev->tuner_type != TUNER_ABSENT) && (dev->tuner_type)) {
+               tun_setup.type   = dev->tuner_type;
+               tun_setup.addr   = dev->tuner_addr;
+
+               v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr, &tun_setup);
+       }
+
+       if (dev->tda9887_conf) {
+               struct v4l2_priv_tun_config tda9887_cfg;
+
+               tda9887_cfg.tuner = TUNER_TDA9887;
+               tda9887_cfg.priv = &dev->tda9887_conf;
+
+               v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_config, &tda9887_cfg);
+       }
 
        if (dev->tuner_type == TUNER_XC2028) {
+               struct v4l2_priv_tun_config  xc2028_cfg;
                struct xc2028_ctrl           ctl;
 
+               memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
+               memset(&ctl, 0, sizeof(ctl));
+
                em28xx_setup_xc3028(dev, &ctl);
 
                xc2028_cfg.tuner = TUNER_XC2028;
                xc2028_cfg.priv  = &ctl;
 
-               em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_config, &xc2028_cfg);
        }
 
        /* configure tuner */
@@ -1704,7 +1749,7 @@ static void em28xx_config_tuner(struct em28xx *dev)
        f.type = V4L2_TUNER_ANALOG_TV;
        f.frequency = 9076;     /* just a magic number */
        dev->ctl_freq = f.frequency;
-       em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f);
 }
 
 static int em28xx_hint_board(struct em28xx *dev)
@@ -1911,22 +1956,52 @@ void em28xx_card_setup(struct em28xx *dev)
        if (tuner >= 0)
                dev->tuner_type = tuner;
 
-#ifdef CONFIG_MODULES
        /* request some modules */
        if (dev->board.has_msp34xx)
-               request_module("msp3400");
+               v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                       "msp3400", "msp3400", msp3400_addrs);
+
        if (dev->board.decoder == EM28XX_SAA711X)
-               request_module("saa7115");
+               v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                       "saa7115", "saa7115_auto", saa711x_addrs);
+
        if (dev->board.decoder == EM28XX_TVP5150)
-               request_module("tvp5150");
-       if (dev->board.tuner_type != TUNER_ABSENT)
-               request_module("tuner");
-       if (dev->board.adecoder == EM28XX_TVAUDIO)
-               request_module("tvaudio");
-#endif
+               v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                       "tvp5150", "tvp5150", tvp5150_addrs);
 
-       em28xx_config_tuner(dev);
+       if (dev->board.adecoder == EM28XX_TVAUDIO)
+               v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                       "tvaudio", "tvaudio", dev->board.tvaudio_addr);
+
+       if (dev->board.tuner_type != TUNER_ABSENT) {
+               int has_demod = (dev->tda9887_conf & TDA9887_PRESENT);
+
+               if (dev->board.radio.type)
+                       v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                               "tuner", "tuner", dev->board.radio_addr);
+
+               if (has_demod)
+                       v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
+                               &dev->i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
+               if (dev->tuner_addr == 0) {
+                       enum v4l2_i2c_tuner_type type =
+                               has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
+                       struct v4l2_subdev *sd;
+
+                       sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
+                               &dev->i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(type));
+
+                       if (sd)
+                               dev->tuner_addr = v4l2_i2c_subdev_addr(sd);
+               } else {
+                       v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
+                               "tuner", "tuner", dev->tuner_addr);
+               }
+       }
 
+       em28xx_tuner_setup(dev);
        em28xx_ir_init(dev);
 }
 
@@ -1975,6 +2050,9 @@ void em28xx_release_resources(struct em28xx *dev)
        em28xx_remove_from_devlist(dev);
 
        em28xx_i2c_unregister(dev);
+
+       v4l2_device_unregister(&dev->v4l2_dev);
+
        usb_put_dev(dev->udev);
 
        /* Mark device as unused */
@@ -1986,6 +2064,7 @@ void em28xx_release_resources(struct em28xx *dev)
  * allocates and inits the device structs, registers i2c bus and v4l device
  */
 static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
+                          struct usb_interface *interface,
                           int minor)
 {
        struct em28xx *dev = *devhandle;
@@ -2019,9 +2098,16 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
                }
        }
 
+       retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
+       if (retval < 0) {
+               em28xx_errdev("Call to v4l2_device_register() failed!\n");
+               return retval;
+       }
+
        /* register i2c bus */
        errCode = em28xx_i2c_register(dev);
        if (errCode < 0) {
+               v4l2_device_unregister(&dev->v4l2_dev);
                em28xx_errdev("%s: em28xx_i2c_register - errCode [%d]!\n",
                        __func__, errCode);
                return errCode;
@@ -2033,6 +2119,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
        /* Configure audio */
        errCode = em28xx_audio_setup(dev);
        if (errCode < 0) {
+               v4l2_device_unregister(&dev->v4l2_dev);
                em28xx_errdev("%s: Error while setting audio - errCode [%d]!\n",
                        __func__, errCode);
        }
@@ -2077,7 +2164,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
        em28xx_init_extension(dev);
 
        /* Save some power by putting tuner to sleep */
-       em28xx_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_standby);
 
        return 0;
 
@@ -2096,7 +2183,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
        struct usb_device *udev;
        struct usb_interface *uif;
        struct em28xx *dev = NULL;
-       int retval = -ENODEV;
+       int retval;
        int i, nr, ifnum, isoc_pipe;
        char *speed;
        char descr[255] = "";
@@ -2118,7 +2205,8 @@ static int em28xx_usb_probe(struct usb_interface *interface,
                        interface->altsetting[0].desc.bInterfaceClass);
 
                em28xx_devused &= ~(1<<nr);
-               return -ENODEV;
+               retval = -ENODEV;
+               goto err;
        }
 
        endpoint = &interface->cur_altsetting->endpoint[0].desc;
@@ -2151,7 +2239,8 @@ static int em28xx_usb_probe(struct usb_interface *interface,
                                "interface not used by the driver\n");
 
                        em28xx_devused &= ~(1<<nr);
-                       return -ENODEV;
+                       retval = -ENODEV;
+                       goto err;
                }
        }
 
@@ -2194,7 +2283,8 @@ static int em28xx_usb_probe(struct usb_interface *interface,
                printk(DRIVER_NAME ": Supports only %i em28xx boards.\n",
                                EM28XX_MAXBOARDS);
                em28xx_devused &= ~(1<<nr);
-               return -ENOMEM;
+               retval = -ENOMEM;
+               goto err;
        }
 
        /* allocate memory for our device state and initialize it */
@@ -2202,7 +2292,8 @@ static int em28xx_usb_probe(struct usb_interface *interface,
        if (dev == NULL) {
                em28xx_err(DRIVER_NAME ": out of memory!\n");
                em28xx_devused &= ~(1<<nr);
-               return -ENOMEM;
+               retval = -ENOMEM;
+               goto err;
        }
 
        snprintf(dev->name, 29, "em28xx #%d", nr);
@@ -2229,7 +2320,8 @@ static int em28xx_usb_probe(struct usb_interface *interface,
                em28xx_errdev("out of memory!\n");
                em28xx_devused &= ~(1<<nr);
                kfree(dev);
-               return -ENOMEM;
+               retval = -ENOMEM;
+               goto err;
        }
 
        for (i = 0; i < dev->num_alt ; i++) {
@@ -2244,12 +2336,11 @@ static int em28xx_usb_probe(struct usb_interface *interface,
        /* allocate device struct */
        mutex_init(&dev->lock);
        mutex_lock(&dev->lock);
-       retval = em28xx_init_dev(&dev, udev, nr);
+       retval = em28xx_init_dev(&dev, udev, interface, nr);
        if (retval) {
                em28xx_devused &= ~(1<<dev->devno);
                kfree(dev);
-
-               return retval;
+               goto err;
        }
 
        /* save our data pointer in this interface device */
@@ -2263,6 +2354,9 @@ static int em28xx_usb_probe(struct usb_interface *interface,
        mutex_unlock(&dev->lock);
 
        return 0;
+
+err:
+       return retval;
 }
 
 /*
@@ -2288,6 +2382,8 @@ static void em28xx_usb_disconnect(struct usb_interface *interface)
 
        wake_up_interruptible_all(&dev->open);
 
+       v4l2_device_disconnect(&dev->v4l2_dev);
+
        if (dev->users) {
                em28xx_warn
                    ("device /dev/video%d is open! Deregistration and memory "
index 8f1999c..192b76c 100644 (file)
@@ -1018,14 +1018,10 @@ EXPORT_SYMBOL_GPL(em28xx_init_isoc);
  */
 void em28xx_wake_i2c(struct em28xx *dev)
 {
-       struct v4l2_routing route;
-       int zero = 0;
-
-       route.input = INPUT(dev->ctl_input)->vmux;
-       route.output = 0;
-       em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, &zero);
-       em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
-       em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, core,  reset, 0);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_routing,
+                       INPUT(dev->ctl_input)->vmux, 0, 0);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_stream, 0);
 }
 
 /*
index 02c12fe..f0bf1d9 100644 (file)
@@ -459,70 +459,15 @@ static u32 functionality(struct i2c_adapter *adap)
 static int attach_inform(struct i2c_client *client)
 {
        struct em28xx *dev = client->adapter->algo_data;
+       struct IR_i2c *ir = i2c_get_clientdata(client);
 
        switch (client->addr << 1) {
-       case 0x86:
-       case 0x84:
-       case 0x96:
-       case 0x94:
-       {
-               struct v4l2_priv_tun_config tda9887_cfg;
-
-               struct tuner_setup tun_setup;
-
-               tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
-               tun_setup.type = TUNER_TDA9887;
-               tun_setup.addr = client->addr;
-
-               em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR,
-                       &tun_setup);
-
-               tda9887_cfg.tuner = TUNER_TDA9887;
-               tda9887_cfg.priv = &dev->tda9887_conf;
-               em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG,
-                                       &tda9887_cfg);
-               break;
-       }
-       case 0x42:
-               dprintk1(1, "attach_inform: saa7114 detected.\n");
-               break;
-       case 0x4a:
-               dprintk1(1, "attach_inform: saa7113 detected.\n");
-               break;
-       case 0xa0:
-               dprintk1(1, "attach_inform: eeprom detected.\n");
-               break;
        case 0x60:
        case 0x8e:
-       {
-               struct IR_i2c *ir = i2c_get_clientdata(client);
-               dprintk1(1, "attach_inform: IR detected (%s).\n",
-                       ir->phys);
+               dprintk1(1, "attach_inform: IR detected (%s).\n", ir->phys);
                em28xx_set_ir(dev, ir);
                break;
        }
-       case 0x80:
-       case 0x88:
-               dprintk1(1, "attach_inform: msp34xx detected.\n");
-               break;
-       case 0xb8:
-       case 0xba:
-               dprintk1(1, "attach_inform: tvp5150 detected.\n");
-               break;
-
-       case 0xb0:
-               dprintk1(1, "attach_inform: tda9874 detected\n");
-               break;
-
-       default:
-               if (!dev->tuner_addr)
-                       dev->tuner_addr = client->addr;
-
-               dprintk1(1, "attach inform: detected I2C address %x\n",
-                               client->addr << 1);
-               dprintk1(1, "driver id %d\n", client->driver->id);
-
-       }
 
        return 0;
 }
@@ -534,7 +479,6 @@ static struct i2c_algorithm em28xx_algo = {
 
 static struct i2c_adapter em28xx_adap_template = {
        .owner = THIS_MODULE,
-       .class = I2C_CLASS_TV_ANALOG,
        .name = "em28xx",
        .id = I2C_HW_B_EM28XX,
        .algo = &em28xx_algo,
@@ -595,16 +539,6 @@ void em28xx_do_i2c_scan(struct em28xx *dev)
 }
 
 /*
- * em28xx_i2c_call_clients()
- * send commands to all attached i2c devices
- */
-void em28xx_i2c_call_clients(struct em28xx *dev, unsigned int cmd, void *arg)
-{
-       BUG_ON(NULL == dev->i2c_adap.algo_data);
-       i2c_clients_command(&dev->i2c_adap, cmd, arg);
-}
-
-/*
  * em28xx_i2c_register()
  * register i2c bus
  */
@@ -618,6 +552,7 @@ int em28xx_i2c_register(struct em28xx *dev)
        dev->i2c_adap.dev.parent = &dev->udev->dev;
        strcpy(dev->i2c_adap.name, dev->name);
        dev->i2c_adap.algo_data = dev;
+       i2c_set_adapdata(&dev->i2c_adap, &dev->v4l2_dev);
 
        retval = i2c_add_adapter(&dev->i2c_adap);
        if (retval < 0) {
index 575472f..882796e 100644 (file)
@@ -49,7 +49,7 @@
                      "Sascha Sommer <saschasommer@freenet.de>"
 
 #define DRIVER_DESC         "Empia em28xx based USB video device driver"
-#define EM28XX_VERSION_CODE  KERNEL_VERSION(0, 1, 1)
+#define EM28XX_VERSION_CODE  KERNEL_VERSION(0, 1, 2)
 
 #define em28xx_videodbg(fmt, arg...) do {\
        if (video_debug) \
@@ -400,7 +400,7 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
        f.frequency = dev->ctl_freq;
        f.type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
 
-       em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f);
 
        return 0;
 }
@@ -515,10 +515,6 @@ static struct videobuf_queue_ops em28xx_video_qops = {
 
 static void video_mux(struct em28xx *dev, int index)
 {
-       struct v4l2_routing route;
-
-       route.input = INPUT(index)->vmux;
-       route.output = 0;
        dev->ctl_input = index;
        dev->ctl_ainput = INPUT(index)->amux;
        dev->ctl_aoutput = INPUT(index)->aout;
@@ -526,25 +522,22 @@ static void video_mux(struct em28xx *dev, int index)
        if (!dev->ctl_aoutput)
                dev->ctl_aoutput = EM28XX_AOUT_MASTER;
 
-       em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_routing,
+                       INPUT(index)->vmux, 0, 0);
 
        if (dev->board.has_msp34xx) {
                if (dev->i2s_speed) {
-                       em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ,
-                               &dev->i2s_speed);
+                       v4l2_device_call_all(&dev->v4l2_dev, 0, audio,
+                               s_i2s_clock_freq, dev->i2s_speed);
                }
-               route.input = dev->ctl_ainput;
-               route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1);
                /* Note: this is msp3400 specific */
-               em28xx_i2c_call_clients(dev, VIDIOC_INT_S_AUDIO_ROUTING,
-                       &route);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, audio, s_routing,
+                        dev->ctl_ainput, MSP_OUTPUT(MSP_SC_IN_DSP_SCART1), 0);
        }
 
        if (dev->board.adecoder != EM28XX_NOADECODER) {
-               route.input = dev->ctl_ainput;
-               route.output = dev->ctl_aoutput;
-               em28xx_i2c_call_clients(dev, VIDIOC_INT_S_AUDIO_ROUTING,
-                       &route);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, audio, s_routing,
+                       dev->ctl_ainput, dev->ctl_aoutput, 0);
        }
 
        em28xx_audio_analog_set(dev);
@@ -829,7 +822,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
        get_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale);
 
        em28xx_resolution_set(dev);
-       em28xx_i2c_call_clients(dev, VIDIOC_S_STD, &dev->norm);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, dev->norm);
 
        mutex_unlock(&dev->lock);
        return 0;
@@ -995,8 +988,9 @@ static int vidioc_queryctrl(struct file *file, void *priv,
                        }
                }
        }
+
        mutex_lock(&dev->lock);
-       em28xx_i2c_call_clients(dev, VIDIOC_QUERYCTRL, qc);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, core, queryctrl, qc);
        mutex_unlock(&dev->lock);
 
        if (qc->type)
@@ -1020,11 +1014,11 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
        mutex_lock(&dev->lock);
 
        if (dev->board.has_msp34xx)
-               em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_ctrl, ctrl);
        else {
                rc = em28xx_get_ctrl(dev, ctrl);
                if (rc < 0) {
-                       em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl);
+                       v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_ctrl, ctrl);
                        rc = 0;
                }
        }
@@ -1048,7 +1042,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
        mutex_lock(&dev->lock);
 
        if (dev->board.has_msp34xx)
-               em28xx_i2c_call_clients(dev, VIDIOC_S_CTRL, ctrl);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_ctrl, ctrl);
        else {
                rc = 1;
                for (i = 0; i < ARRAY_SIZE(em28xx_qctrl); i++) {
@@ -1067,7 +1061,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
 
        /* Control not found - try to send it to the attached devices */
        if (rc == 1) {
-               em28xx_i2c_call_clients(dev, VIDIOC_S_CTRL, ctrl);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_ctrl, ctrl);
                rc = 0;
        }
 
@@ -1092,10 +1086,9 @@ static int vidioc_g_tuner(struct file *file, void *priv,
        strcpy(t->name, "Tuner");
 
        mutex_lock(&dev->lock);
-
-       em28xx_i2c_call_clients(dev, VIDIOC_G_TUNER, t);
-
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, g_tuner, t);
        mutex_unlock(&dev->lock);
+
        return 0;
 }
 
@@ -1114,10 +1107,9 @@ static int vidioc_s_tuner(struct file *file, void *priv,
                return -EINVAL;
 
        mutex_lock(&dev->lock);
-
-       em28xx_i2c_call_clients(dev, VIDIOC_S_TUNER, t);
-
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t);
        mutex_unlock(&dev->lock);
+
        return 0;
 }
 
@@ -1157,7 +1149,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
        mutex_lock(&dev->lock);
 
        dev->ctl_freq = f->frequency;
-       em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, f);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, f);
 
        mutex_unlock(&dev->lock);
 
@@ -1186,7 +1178,7 @@ static int vidioc_g_chip_ident(struct file *file, void *priv,
        chip->ident = V4L2_IDENT_NONE;
        chip->revision = 0;
 
-       em28xx_i2c_call_clients(dev, VIDIOC_DBG_G_CHIP_IDENT, chip);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_chip_ident, chip);
 
        return 0;
 }
@@ -1211,7 +1203,7 @@ static int vidioc_g_register(struct file *file, void *priv,
                reg->size = 1;
                return 0;
        case V4L2_CHIP_MATCH_I2C_DRIVER:
-               em28xx_i2c_call_clients(dev, VIDIOC_DBG_G_REGISTER, reg);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_register, reg);
                return 0;
        case V4L2_CHIP_MATCH_I2C_ADDR:
                /* Not supported yet */
@@ -1263,7 +1255,7 @@ static int vidioc_s_register(struct file *file, void *priv,
 
                return rc;
        case V4L2_CHIP_MATCH_I2C_DRIVER:
-               em28xx_i2c_call_clients(dev, VIDIOC_DBG_S_REGISTER, reg);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_register, reg);
                return 0;
        case V4L2_CHIP_MATCH_I2C_ADDR:
                /* Not supported yet */
@@ -1406,13 +1398,13 @@ static int vidioc_g_fmt_sliced_vbi_cap(struct file *file, void *priv,
        mutex_lock(&dev->lock);
 
        f->fmt.sliced.service_set = 0;
-
-       em28xx_i2c_call_clients(dev, VIDIOC_G_FMT, f);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, video, g_fmt, f);
 
        if (f->fmt.sliced.service_set == 0)
                rc = -EINVAL;
 
        mutex_unlock(&dev->lock);
+
        return rc;
 }
 
@@ -1428,7 +1420,7 @@ static int vidioc_try_set_sliced_vbi_cap(struct file *file, void *priv,
                return rc;
 
        mutex_lock(&dev->lock);
-       em28xx_i2c_call_clients(dev, VIDIOC_G_FMT, f);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, video, g_fmt, f);
        mutex_unlock(&dev->lock);
 
        if (f->fmt.sliced.service_set == 0)
@@ -1532,7 +1524,7 @@ static int radio_g_tuner(struct file *file, void *priv,
        t->type = V4L2_TUNER_RADIO;
 
        mutex_lock(&dev->lock);
-       em28xx_i2c_call_clients(dev, VIDIOC_G_TUNER, t);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, g_tuner, t);
        mutex_unlock(&dev->lock);
 
        return 0;
@@ -1567,7 +1559,7 @@ static int radio_s_tuner(struct file *file, void *priv,
                return -EINVAL;
 
        mutex_lock(&dev->lock);
-       em28xx_i2c_call_clients(dev, VIDIOC_S_TUNER, t);
+       v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t);
        mutex_unlock(&dev->lock);
 
        return 0;
@@ -1655,7 +1647,7 @@ static int em28xx_v4l2_open(struct file *filp)
        }
        if (fh->radio) {
                em28xx_videodbg("video_open: setting radio device\n");
-               em28xx_i2c_call_clients(dev, AUDC_SET_RADIO, NULL);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_radio);
        }
 
        dev->users++;
@@ -1738,7 +1730,7 @@ static int em28xx_v4l2_close(struct file *filp)
                }
 
                /* Save some power by putting tuner to sleep */
-               em28xx_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
+               v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_standby);
 
                /* do this before setting alternate! */
                em28xx_uninit_isoc(dev);
@@ -1959,11 +1951,12 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev,
        vfd = video_device_alloc();
        if (NULL == vfd)
                return NULL;
-       *vfd = *template;
-       vfd->minor   = -1;
-       vfd->parent = &dev->udev->dev;
-       vfd->release = video_device_release;
-       vfd->debug = video_debug;
+
+       *vfd            = *template;
+       vfd->minor      = -1;
+       vfd->v4l2_dev   = &dev->v4l2_dev;
+       vfd->release    = video_device_release;
+       vfd->debug      = video_debug;
 
        snprintf(vfd->name, sizeof(vfd->name), "%s %s",
                 dev->name, type_name);
index a33a58d..4c4e580 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <linux/videodev2.h>
 #include <media/videobuf-vmalloc.h>
+#include <media/v4l2-device.h>
 
 #include <linux/i2c.h>
 #include <linux/mutex.h>
@@ -385,6 +386,8 @@ struct em28xx_board {
        unsigned int valid:1;
 
        unsigned char xclk, i2c_speed;
+       unsigned char radio_addr;
+       unsigned short tvaudio_addr;
 
        enum em28xx_decoder decoder;
        enum em28xx_adecoder adecoder;
@@ -460,6 +463,7 @@ struct em28xx {
        int devno;              /* marks the number of this device */
        enum em28xx_chip_id chip_id;
 
+       struct v4l2_device v4l2_dev;
        struct em28xx_board board;
 
        unsigned int stream_on:1;       /* Locks streams */
@@ -577,11 +581,9 @@ struct em28xx_ops {
 };
 
 /* Provided by em28xx-i2c.c */
-
-void em28xx_i2c_call_clients(struct em28xx *dev, unsigned int cmd, void *arg);
 void em28xx_do_i2c_scan(struct em28xx *dev);
-int em28xx_i2c_register(struct em28xx *dev);
-int em28xx_i2c_unregister(struct em28xx *dev);
+int  em28xx_i2c_register(struct em28xx *dev);
+int  em28xx_i2c_unregister(struct em28xx *dev);
 
 /* Provided by em28xx-core.c */
 
index a75c1ca..a2741d7 100644 (file)
@@ -1132,6 +1132,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
        if (input->index != 0)
                return -EINVAL;
        input->type = V4L2_INPUT_TYPE_CAMERA;
+       input->status = gspca_dev->cam.input_flags;
        strncpy(input->name, gspca_dev->sd_desc->name,
                sizeof input->name);
        return 0;
index e4d4cf6..58e8ff0 100644 (file)
@@ -56,6 +56,7 @@ struct cam {
                                 * - cannot be > MAX_NURBS
                                 * - when 0 and bulk_size != 0 means
                                 *   1 URB and submit done by subdriver */
+       u32 input_flags;        /* value for ENUM_INPUT status flags */
 };
 
 struct gspca_dev;
index 226ab4f..9fa3644 100644 (file)
@@ -7,5 +7,4 @@ gspca_m5602-objs := m5602_core.o \
                    m5602_s5k83a.o \
                    m5602_s5k4aa.o
 
-EXTRA_CFLAGS += -Idrivers/media/video/gspca
-
+EXTRA_CFLAGS += -Idrivers/media/video/gspca
\ No newline at end of file
index a3f3b7a..8f1cea6 100644 (file)
@@ -112,14 +112,14 @@ static const unsigned char sensor_urb_skeleton[] = {
 struct sd {
        struct gspca_dev gspca_dev;
 
-       /* The name of the m5602 camera */
-       char *name;
-
        /* A pointer to the currently connected sensor */
-       struct m5602_sensor *sensor;
+       const struct m5602_sensor *sensor;
 
        struct sd_desc *desc;
 
+       /* Sensor private data */
+       void *sensor_priv;
+
        /* The current frame's id, used to detect frame boundaries */
        u8 frame_id;
 
index b35e483..1aac298 100644 (file)
@@ -51,7 +51,7 @@ int m5602_read_bridge(struct sd *sd, u8 address, u8 *i2c_data)
               address, *i2c_data);
 
        /* usb_control_msg(...) returns the number of bytes sent upon success,
-       mask that and return zero upon success instead*/
+       mask that and return zero instead*/
        return (err < 0) ? err : 0;
 }
 
@@ -76,7 +76,7 @@ int m5602_write_bridge(struct sd *sd, u8 address, u8 i2c_data)
                                4, M5602_URB_MSG_TIMEOUT);
 
        /* usb_control_msg(...) returns the number of bytes sent upon success,
-          mask that and return zero upon success instead */
+          mask that and return zero instead */
        return (err < 0) ? err : 0;
 }
 
@@ -92,29 +92,29 @@ int m5602_read_sensor(struct sd *sd, const u8 address,
                err = m5602_read_bridge(sd, M5602_XB_I2C_STATUS, i2c_data);
        } while ((*i2c_data & I2C_BUSY) && !err);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_write_bridge(sd, M5602_XB_I2C_DEV_ADDR,
                                 sd->sensor->i2c_slave_id);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_write_bridge(sd, M5602_XB_I2C_REG_ADDR, address);
        if (err < 0)
-               goto out;
+               return err;
 
        if (sd->sensor->i2c_regW == 1) {
                err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, len);
                if (err < 0)
-                       goto out;
+                       return err;
 
                err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x08);
                if (err < 0)
-                       goto out;
+                       return err;
        } else {
                err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x18 + len);
                if (err < 0)
-                       goto out;
+                       return err;
        }
 
        for (i = 0; (i < len) && !err; i++) {
@@ -123,7 +123,6 @@ int m5602_read_sensor(struct sd *sd, const u8 address,
                PDEBUG(D_CONF, "Reading sensor register "
                               "0x%x containing 0x%x ", address, *i2c_data);
        }
-out:
        return err;
 }
 
@@ -310,7 +309,11 @@ static void m5602_urb_complete(struct gspca_dev *gspca_dev,
 
 static void m5602_stop_transfer(struct gspca_dev *gspca_dev)
 {
-       /* Is there are a command to stop a data transfer? */
+       struct sd *sd = (struct sd *) gspca_dev;
+
+       /* Run the sensor specific end transfer sequence */
+       if (sd->sensor->stop)
+               sd->sensor->stop(sd);
 }
 
 /* sub-driver description, the ctrl and nctrl is filled at probe time */
@@ -359,6 +362,17 @@ static int m5602_probe(struct usb_interface *intf,
                               THIS_MODULE);
 }
 
+void m5602_disconnect(struct usb_interface *intf)
+{
+       struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
+       struct sd *sd = (struct sd *) gspca_dev;
+
+       if (sd->sensor->disconnect)
+               sd->sensor->disconnect(sd);
+
+       gspca_disconnect(intf);
+}
+
 static struct usb_driver sd_driver = {
        .name = MODULE_NAME,
        .id_table = m5602_table,
@@ -367,7 +381,7 @@ static struct usb_driver sd_driver = {
        .suspend = gspca_suspend,
        .resume = gspca_resume,
 #endif
-       .disconnect = gspca_disconnect
+       .disconnect = m5602_disconnect
 };
 
 /* -- module insert / remove -- */
index c0e71c3..7d3f9e3 100644 (file)
 
 #include "m5602_mt9m111.h"
 
+static struct v4l2_pix_format mt9m111_modes[] = {
+       {
+               640,
+               480,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage = 640 * 480,
+               .bytesperline = 640,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 0
+       }
+};
+
+const static struct ctrl mt9m111_ctrls[] = {
+       {
+               {
+                       .id             = V4L2_CID_VFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "vertical flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0
+               },
+               .set = mt9m111_set_vflip,
+               .get = mt9m111_get_vflip
+       }, {
+               {
+                       .id             = V4L2_CID_HFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "horizontal flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0
+               },
+               .set = mt9m111_set_hflip,
+               .get = mt9m111_get_hflip
+       }, {
+               {
+                       .id             = V4L2_CID_GAIN,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "gain",
+                       .minimum        = 0,
+                       .maximum        = (INITIAL_MAX_GAIN - 1) * 2 * 2 * 2,
+                       .step           = 1,
+                       .default_value  = DEFAULT_GAIN,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = mt9m111_set_gain,
+               .get = mt9m111_get_gain
+       }
+};
+
+
 static void mt9m111_dump_registers(struct sd *sd);
 
 int mt9m111_probe(struct sd *sd)
@@ -62,10 +117,10 @@ int mt9m111_probe(struct sd *sd)
        return -ENODEV;
 
 sensor_found:
-       sd->gspca_dev.cam.cam_mode = mt9m111.modes;
-       sd->gspca_dev.cam.nmodes = mt9m111.nmodes;
-       sd->desc->ctrls = mt9m111.ctrls;
-       sd->desc->nctrls = mt9m111.nctrls;
+       sd->gspca_dev.cam.cam_mode = mt9m111_modes;
+       sd->gspca_dev.cam.nmodes = ARRAY_SIZE(mt9m111_modes);
+       sd->desc->ctrls = mt9m111_ctrls;
+       sd->desc->nctrls = ARRAY_SIZE(mt9m111_ctrls);
        return 0;
 }
 
@@ -125,16 +180,15 @@ int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
        /* Set the correct page map */
        err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        data[0] = (data[0] & 0xfe) | val;
        err = m5602_write_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B,
                                   data, 2);
-out:
        return err;
 }
 
@@ -163,16 +217,15 @@ int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
        /* Set the correct page map */
        err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        data[0] = (data[0] & 0xfd) | ((val << 1) & 0x02);
        err = m5602_write_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B,
                                        data, 2);
-out:
        return err;
 }
 
@@ -204,7 +257,7 @@ int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val)
        /* Set the correct page map */
        err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        if (val >= INITIAL_MAX_GAIN * 2 * 2 * 2)
                return -EINVAL;
@@ -229,7 +282,7 @@ int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val)
 
        err = m5602_write_sensor(sd, MT9M111_SC_GLOBAL_GAIN,
                                   data, 2);
-out:
+
        return err;
 }
 
index e795ab7..00c6db0 100644 (file)
@@ -94,7 +94,7 @@ int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
 int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
 int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val);
 
-static struct m5602_sensor mt9m111 = {
+const static struct m5602_sensor mt9m111 = {
        .name = "MT9M111",
 
        .i2c_slave_id = 0xba,
@@ -102,64 +102,7 @@ static struct m5602_sensor mt9m111 = {
 
        .probe = mt9m111_probe,
        .init = mt9m111_init,
-       .power_down = mt9m111_power_down,
-
-       .nctrls = 3,
-       .ctrls = {
-       {
-               {
-                       .id             = V4L2_CID_VFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "vertical flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = mt9m111_set_vflip,
-               .get = mt9m111_get_vflip
-       }, {
-               {
-                       .id             = V4L2_CID_HFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "horizontal flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = mt9m111_set_hflip,
-               .get = mt9m111_get_hflip
-       }, {
-               {
-                       .id             = V4L2_CID_GAIN,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "gain",
-                       .minimum        = 0,
-                       .maximum        = (INITIAL_MAX_GAIN - 1) * 2 * 2 * 2,
-                       .step           = 1,
-                       .default_value  = DEFAULT_GAIN,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = mt9m111_set_gain,
-               .get = mt9m111_get_gain
-       }
-       },
-
-       .nmodes = 1,
-       .modes = {
-       {
-               M5602_DEFAULT_FRAME_WIDTH,
-               M5602_DEFAULT_FRAME_HEIGHT,
-               V4L2_PIX_FMT_SBGGR8,
-               V4L2_FIELD_NONE,
-               .sizeimage =
-                       M5602_DEFAULT_FRAME_WIDTH * M5602_DEFAULT_FRAME_HEIGHT,
-               .bytesperline = M5602_DEFAULT_FRAME_WIDTH,
-               .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 1
-       }
-       }
+       .power_down = mt9m111_power_down
 };
 
 static const unsigned char preinit_mt9m111[][4] =
index c908a8d..fc4548f 100644 (file)
@@ -65,14 +65,177 @@ static
                        DMI_MATCH(DMI_PRODUCT_NAME, "Aurora m9700")
                }
        },
-       { }
+       {}
+};
+
+const static struct ctrl ov9650_ctrls[] = {
+#define EXPOSURE_IDX 0
+       {
+               {
+                       .id             = V4L2_CID_EXPOSURE,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "exposure",
+                       .minimum        = 0x00,
+                       .maximum        = 0x1ff,
+                       .step           = 0x4,
+                       .default_value  = EXPOSURE_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = ov9650_set_exposure,
+               .get = ov9650_get_exposure
+       },
+#define GAIN_IDX 1
+       {
+               {
+                       .id             = V4L2_CID_GAIN,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "gain",
+                       .minimum        = 0x00,
+                       .maximum        = 0x3ff,
+                       .step           = 0x1,
+                       .default_value  = GAIN_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = ov9650_set_gain,
+               .get = ov9650_get_gain
+       },
+#define RED_BALANCE_IDX 2
+       {
+               {
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "red balance",
+                       .minimum        = 0x00,
+                       .maximum        = 0xff,
+                       .step           = 0x1,
+                       .default_value  = RED_GAIN_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = ov9650_set_red_balance,
+               .get = ov9650_get_red_balance
+       },
+#define BLUE_BALANCE_IDX 3
+       {
+               {
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "blue balance",
+                       .minimum        = 0x00,
+                       .maximum        = 0xff,
+                       .step           = 0x1,
+                       .default_value  = BLUE_GAIN_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = ov9650_set_blue_balance,
+               .get = ov9650_get_blue_balance
+       },
+#define HFLIP_IDX 4
+       {
+               {
+                       .id             = V4L2_CID_HFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "horizontal flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0
+               },
+               .set = ov9650_set_hflip,
+               .get = ov9650_get_hflip
+       },
+#define VFLIP_IDX 5
+       {
+               {
+                       .id             = V4L2_CID_VFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "vertical flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0
+               },
+               .set = ov9650_set_vflip,
+               .get = ov9650_get_vflip
+       },
+#define AUTO_WHITE_BALANCE_IDX 6
+       {
+               {
+                       .id             = V4L2_CID_AUTO_WHITE_BALANCE,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "auto white balance",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 1
+               },
+               .set = ov9650_set_auto_white_balance,
+               .get = ov9650_get_auto_white_balance
+       },
+#define AUTO_GAIN_CTRL_IDX 7
+       {
+               {
+                       .id             = V4L2_CID_AUTOGAIN,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "auto gain control",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 1
+               },
+               .set = ov9650_set_auto_gain,
+               .get = ov9650_get_auto_gain
+       }
+};
+
+static struct v4l2_pix_format ov9650_modes[] = {
+       {
+               176,
+               144,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage =
+                       176 * 144,
+               .bytesperline = 176,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 9
+       }, {
+               320,
+               240,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage =
+                       320 * 240,
+               .bytesperline = 320,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 8
+       }, {
+               352,
+               288,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage =
+                       352 * 288,
+               .bytesperline = 352,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 9
+       }, {
+               640,
+               480,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage =
+                       640 * 480,
+               .bytesperline = 640,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 9
+       }
 };
 
 static void ov9650_dump_registers(struct sd *sd);
 
 int ov9650_probe(struct sd *sd)
 {
+       int err = 0;
        u8 prod_id = 0, ver_id = 0, i;
+       s32 *sensor_settings;
 
        if (force_sensor) {
                if (force_sensor == OV9650_SENSOR) {
@@ -86,16 +249,20 @@ int ov9650_probe(struct sd *sd)
 
        info("Probing for an ov9650 sensor");
 
-       /* Run the pre-init to actually probe the unit */
-       for (i = 0; i < ARRAY_SIZE(preinit_ov9650); i++) {
+       /* Run the pre-init before probing the sensor */
+       for (i = 0; i < ARRAY_SIZE(preinit_ov9650) && !err; i++) {
                u8 data = preinit_ov9650[i][2];
                if (preinit_ov9650[i][0] == SENSOR)
-                       m5602_write_sensor(sd,
-                                           preinit_ov9650[i][1], &data, 1);
+                       err = m5602_write_sensor(sd,
+                               preinit_ov9650[i][1], &data, 1);
                else
-                       m5602_write_bridge(sd, preinit_ov9650[i][1], data);
+                       err = m5602_write_bridge(sd,
+                               preinit_ov9650[i][1], data);
        }
 
+       if (err < 0)
+               return err;
+
        if (m5602_read_sensor(sd, OV9650_PID, &prod_id, 1))
                return -ENODEV;
 
@@ -106,14 +273,28 @@ int ov9650_probe(struct sd *sd)
                info("Detected an ov9650 sensor");
                goto sensor_found;
        }
-
        return -ENODEV;
 
 sensor_found:
-       sd->gspca_dev.cam.cam_mode = ov9650.modes;
-       sd->gspca_dev.cam.nmodes = ov9650.nmodes;
-       sd->desc->ctrls = ov9650.ctrls;
-       sd->desc->nctrls = ov9650.nctrls;
+       sensor_settings = kmalloc(
+               ARRAY_SIZE(ov9650_ctrls) * sizeof(s32), GFP_KERNEL);
+       if (!sensor_settings)
+               return -ENOMEM;
+
+       sd->gspca_dev.cam.cam_mode = ov9650_modes;
+       sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov9650_modes);
+       sd->desc->ctrls = ov9650_ctrls;
+       sd->desc->nctrls = ARRAY_SIZE(ov9650_ctrls);
+
+       for (i = 0; i < ARRAY_SIZE(ov9650_ctrls); i++)
+               sensor_settings[i] = ov9650_ctrls[i].qctrl.default_value;
+       sd->sensor_priv = sensor_settings;
+
+       if (dmi_check_system(ov9650_flip_dmi_table) && !err) {
+               info("vflip quirk active");
+               sensor_settings[VFLIP_IDX] = 1;
+       }
+
        return 0;
 }
 
@@ -121,6 +302,7 @@ int ov9650_init(struct sd *sd)
 {
        int i, err = 0;
        u8 data;
+       s32 *sensor_settings = sd->sensor_priv;
 
        if (dump_sensor)
                ov9650_dump_registers(sd);
@@ -134,70 +316,157 @@ int ov9650_init(struct sd *sd)
                        err = m5602_write_bridge(sd, init_ov9650[i][1], data);
        }
 
-       if (dmi_check_system(ov9650_flip_dmi_table) && !err) {
-               info("vflip quirk active");
-               data = 0x30;
-               err = m5602_write_sensor(sd, OV9650_MVFP, &data, 1);
-       }
+       err = ov9650_set_exposure(&sd->gspca_dev, sensor_settings[EXPOSURE_IDX]);
+       if (err < 0)
+               return err;
+
+       err = ov9650_set_gain(&sd->gspca_dev, sensor_settings[GAIN_IDX]);
+       if (err < 0)
+               return err;
+
+       err = ov9650_set_red_balance(&sd->gspca_dev, sensor_settings[RED_BALANCE_IDX]);
+       if (err < 0)
+               return err;
+
+       err = ov9650_set_blue_balance(&sd->gspca_dev, sensor_settings[BLUE_BALANCE_IDX]);
+       if (err < 0)
+               return err;
+
+       err = ov9650_set_hflip(&sd->gspca_dev, sensor_settings[HFLIP_IDX]);
+       if (err < 0)
+               return err;
+
+       err = ov9650_set_vflip(&sd->gspca_dev, sensor_settings[VFLIP_IDX]);
+       if (err < 0)
+               return err;
+
+       err = ov9650_set_auto_white_balance(&sd->gspca_dev, sensor_settings[AUTO_WHITE_BALANCE_IDX]);
+       if (err < 0)
+               return err;
+
+       err = ov9650_set_auto_gain(&sd->gspca_dev, sensor_settings[AUTO_GAIN_CTRL_IDX]);
        return err;
 }
 
 int ov9650_start(struct sd *sd)
 {
+       u8 data;
        int i, err = 0;
        struct cam *cam = &sd->gspca_dev.cam;
+       s32 *sensor_settings = sd->sensor_priv;
+
+       int width = cam->cam_mode[sd->gspca_dev.curr_mode].width;
+       int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
+       int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
+       int hor_offs = OV9650_LEFT_OFFSET;
+
+       if (sensor_settings[VFLIP_IDX])
+               ver_offs--;
 
+       if (width <= 320)
+               hor_offs /= 2;
+
+       /* Synthesize the vsync/hsync setup */
        for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) {
-               u8 data = res_init_ov9650[i][1];
-               err = m5602_write_bridge(sd, res_init_ov9650[i][0], data);
+               if (res_init_ov9650[i][0] == BRIDGE)
+                       err = m5602_write_bridge(sd, res_init_ov9650[i][1],
+                               res_init_ov9650[i][2]);
+               else if (res_init_ov9650[i][0] == SENSOR) {
+                       u8 data = res_init_ov9650[i][2];
+                       err = m5602_write_sensor(sd,
+                               res_init_ov9650[i][1], &data, 1);
+               }
        }
        if (err < 0)
                return err;
 
-       switch (cam->cam_mode[sd->gspca_dev.curr_mode].width)
-       {
+       err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA,
+                                ((ver_offs >> 8) & 0xff));
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (ver_offs & 0xff));
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff);
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff));
+       if (err < 0)
+               return err;
+
+       for (i = 0; i < 2 && !err; i++)
+               err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
+                                (hor_offs >> 8) & 0xff);
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, hor_offs & 0xff);
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
+                                ((width + hor_offs) >> 8) & 0xff);
+       if (err < 0)
+               return err;
+
+       err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
+                                ((width + hor_offs) & 0xff));
+       if (err < 0)
+               return err;
+
+       switch (width) {
        case 640:
                PDEBUG(D_V4L2, "Configuring camera for VGA mode");
 
-               for (i = 0; i < ARRAY_SIZE(VGA_ov9650) && !err; i++) {
-                       u8 data = VGA_ov9650[i][2];
-                       if (VGA_ov9650[i][0] == SENSOR)
-                               err = m5602_write_sensor(sd,
-                                       VGA_ov9650[i][1], &data, 1);
-                       else
-                               err = m5602_write_bridge(sd, VGA_ov9650[i][1], data);
-               }
+               data = OV9650_VGA_SELECT | OV9650_RGB_SELECT |
+                      OV9650_RAW_RGB_SELECT;
+               err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
                break;
 
        case 352:
                PDEBUG(D_V4L2, "Configuring camera for CIF mode");
 
-               for (i = 0; i < ARRAY_SIZE(CIF_ov9650) && !err; i++) {
-                       u8 data = CIF_ov9650[i][2];
-                       if (CIF_ov9650[i][0] == SENSOR)
-                               err = m5602_write_sensor(sd,
-                                       CIF_ov9650[i][1], &data, 1);
-                       else
-                               err = m5602_write_bridge(sd, CIF_ov9650[i][1], data);
-               }
+               data = OV9650_CIF_SELECT | OV9650_RGB_SELECT |
+                               OV9650_RAW_RGB_SELECT;
+               err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
                break;
 
        case 320:
                PDEBUG(D_V4L2, "Configuring camera for QVGA mode");
 
-               for (i = 0; i < ARRAY_SIZE(QVGA_ov9650) && !err; i++) {
-                       u8 data = QVGA_ov9650[i][2];
-                       if (QVGA_ov9650[i][0] == SENSOR)
-                               err = m5602_write_sensor(sd,
-                                       QVGA_ov9650[i][1], &data, 1);
-                       else
-                               err = m5602_write_bridge(sd, QVGA_ov9650[i][1], data);
-               }
+               data = OV9650_QVGA_SELECT | OV9650_RGB_SELECT |
+                               OV9650_RAW_RGB_SELECT;
+               err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
+               break;
+
+       case 176:
+               PDEBUG(D_V4L2, "Configuring camera for QCIF mode");
+
+               data = OV9650_QCIF_SELECT | OV9650_RGB_SELECT |
+                       OV9650_RAW_RGB_SELECT;
+               err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
                break;
        }
        return err;
 }
 
+int ov9650_stop(struct sd *sd)
+{
+       u8 data = OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X;
+       return m5602_write_sensor(sd, OV9650_COM2, &data, 1);
+}
+
 int ov9650_power_down(struct sd *sd)
 {
        int i, err = 0;
@@ -214,76 +483,63 @@ int ov9650_power_down(struct sd *sd)
        return err;
 }
 
-int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
+void ov9650_disconnect(struct sd *sd)
 {
-       struct sd *sd = (struct sd *) gspca_dev;
-       u8 i2c_data;
-       int err;
-
-       err = m5602_read_sensor(sd, OV9650_COM1, &i2c_data, 1);
-       if (err < 0)
-               goto out;
-       *val = i2c_data & 0x03;
+       ov9650_stop(sd);
+       ov9650_power_down(sd);
 
-       err = m5602_read_sensor(sd, OV9650_AECH, &i2c_data, 1);
-       if (err < 0)
-               goto out;
-       *val |= (i2c_data << 2);
+       sd->sensor = NULL;
+       kfree(sd->sensor_priv);
+}
 
-       err = m5602_read_sensor(sd, OV9650_AECHM, &i2c_data, 1);
-       if (err < 0)
-               goto out;
-       *val |= (i2c_data & 0x3f) << 10;
+int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
+{
+       struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
+       *val = sensor_settings[EXPOSURE_IDX];
        PDEBUG(D_V4L2, "Read exposure %d", *val);
-out:
-       return err;
+       return 0;
 }
 
 int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
 {
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
        u8 i2c_data;
        int err;
 
-       PDEBUG(D_V4L2, "Set exposure to %d",
-              val & 0xffff);
+       PDEBUG(D_V4L2, "Set exposure to %d", val);
 
+       sensor_settings[EXPOSURE_IDX] = val;
        /* The 6 MSBs */
        i2c_data = (val >> 10) & 0x3f;
        err = m5602_write_sensor(sd, OV9650_AECHM,
                                  &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        /* The 8 middle bits */
        i2c_data = (val >> 2) & 0xff;
        err = m5602_write_sensor(sd, OV9650_AECH,
                                  &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        /* The 2 LSBs */
        i2c_data = val & 0x03;
        err = m5602_write_sensor(sd, OV9650_COM1, &i2c_data, 1);
-
-out:
        return err;
 }
 
 int ov9650_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
-       *val = (i2c_data & 0x03) << 8;
-
-       err = m5602_read_sensor(sd, OV9650_GAIN, &i2c_data, 1);
-       *val |= i2c_data;
+       *val = sensor_settings[GAIN_IDX];
        PDEBUG(D_V4L2, "Read gain %d", *val);
-       return err;
+       return 0;
 }
 
 int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val)
@@ -291,15 +547,25 @@ int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
+
+       PDEBUG(D_V4L2, "Setting gain to %d", val);
+
+       sensor_settings[GAIN_IDX] = val;
 
        /* The 2 MSB */
        /* Read the OV9650_VREF register first to avoid
           corrupting the VREF high and low bits */
-       m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
+       err = m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
+       if (err < 0)
+               return err;
+
        /* Mask away all uninteresting bits */
        i2c_data = ((val & 0x0300) >> 2) |
                        (i2c_data & 0x3F);
        err = m5602_write_sensor(sd, OV9650_VREF, &i2c_data, 1);
+       if (err < 0)
+               return err;
 
        /* The 8 LSBs */
        i2c_data = val & 0xff;
@@ -309,16 +575,12 @@ int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val)
 
 int ov9650_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       err = m5602_read_sensor(sd, OV9650_RED, &i2c_data, 1);
-       *val = i2c_data;
-
+       *val = sensor_settings[RED_BALANCE_IDX];
        PDEBUG(D_V4L2, "Read red gain %d", *val);
-
-       return err;
+       return 0;
 }
 
 int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val)
@@ -326,28 +588,26 @@ int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       PDEBUG(D_V4L2, "Set red gain to %d",
-                            val & 0xff);
+       PDEBUG(D_V4L2, "Set red gain to %d", val);
+
+       sensor_settings[RED_BALANCE_IDX] = val;
 
        i2c_data = val & 0xff;
        err = m5602_write_sensor(sd, OV9650_RED, &i2c_data, 1);
-
        return err;
 }
 
 int ov9650_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       err = m5602_read_sensor(sd, OV9650_BLUE, &i2c_data, 1);
-       *val = i2c_data;
-
+       *val = sensor_settings[BLUE_BALANCE_IDX];
        PDEBUG(D_V4L2, "Read blue gain %d", *val);
 
-       return err;
+       return 0;
 }
 
 int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val)
@@ -355,30 +615,25 @@ int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
+
+       PDEBUG(D_V4L2, "Set blue gain to %d", val);
 
-       PDEBUG(D_V4L2, "Set blue gain to %d",
-              val & 0xff);
+       sensor_settings[BLUE_BALANCE_IDX] = val;
 
        i2c_data = val & 0xff;
        err = m5602_write_sensor(sd, OV9650_BLUE, &i2c_data, 1);
-
        return err;
 }
 
 int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       err = m5602_read_sensor(sd, OV9650_MVFP, &i2c_data, 1);
-       if (dmi_check_system(ov9650_flip_dmi_table))
-               *val = ((i2c_data & OV9650_HFLIP) >> 5) ? 0 : 1;
-       else
-               *val = (i2c_data & OV9650_HFLIP) >> 5;
+       *val = sensor_settings[HFLIP_IDX];
        PDEBUG(D_V4L2, "Read horizontal flip %d", *val);
-
-       return err;
+       return 0;
 }
 
 int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
@@ -386,38 +641,26 @@ int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
        PDEBUG(D_V4L2, "Set horizontal flip to %d", val);
-       err = m5602_read_sensor(sd, OV9650_MVFP, &i2c_data, 1);
-       if (err < 0)
-               goto out;
-
-       if (dmi_check_system(ov9650_flip_dmi_table))
-               i2c_data = ((i2c_data & 0xdf) |
-                          (((val ? 0 : 1) & 0x01) << 5));
-       else
-               i2c_data = ((i2c_data & 0xdf) |
-                          ((val & 0x01) << 5));
 
+       sensor_settings[HFLIP_IDX] = val;
+       i2c_data = ((val & 0x01) << 5) | (sensor_settings[VFLIP_IDX] << 4);
        err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);
-out:
+
        return err;
 }
 
 int ov9650_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       err = m5602_read_sensor(sd, OV9650_MVFP, &i2c_data, 1);
-       if (dmi_check_system(ov9650_flip_dmi_table))
-               *val = ((i2c_data & 0x10) >> 4) ? 0 : 1;
-       else
-               *val = (i2c_data & 0x10) >> 4;
+       *val = sensor_settings[VFLIP_IDX];
        PDEBUG(D_V4L2, "Read vertical flip %d", *val);
 
-       return err;
+       return 0;
 }
 
 int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
@@ -425,40 +668,32 @@ int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
        PDEBUG(D_V4L2, "Set vertical flip to %d", val);
-       err = m5602_read_sensor(sd, OV9650_MVFP, &i2c_data, 1);
+       sensor_settings[VFLIP_IDX] = val;
+
+       i2c_data = ((val & 0x01) << 4) | (sensor_settings[VFLIP_IDX] << 5);
+       err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
-       if (dmi_check_system(ov9650_flip_dmi_table))
-               i2c_data = ((i2c_data & 0xef) |
-                               (((val ? 0 : 1) & 0x01) << 4));
-       else
-               i2c_data = ((i2c_data & 0xef) |
-                               ((val & 0x01) << 4));
+       /* When vflip is toggled we need to readjust the bridge hsync/vsync */
+       if (gspca_dev->streaming)
+               err = ov9650_start(sd);
 
-       err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);
-out:
        return err;
 }
 
 int ov9650_get_brightness(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       err = m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
-       if (err < 0)
-               goto out;
-       *val = (i2c_data & 0x03) << 8;
-
-       err = m5602_read_sensor(sd, OV9650_GAIN, &i2c_data, 1);
-       *val |= i2c_data;
+       *val = sensor_settings[GAIN_IDX];
        PDEBUG(D_V4L2, "Read gain %d", *val);
-out:
-       return err;
+
+       return 0;
 }
 
 int ov9650_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
@@ -466,40 +701,38 @@ int ov9650_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       PDEBUG(D_V4L2, "Set gain to %d", val & 0x3ff);
+       PDEBUG(D_V4L2, "Set gain to %d", val);
+
+       sensor_settings[GAIN_IDX] = val;
 
        /* Read the OV9650_VREF register first to avoid
                corrupting the VREF high and low bits */
        err = m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        /* Mask away all uninteresting bits */
        i2c_data = ((val & 0x0300) >> 2) | (i2c_data & 0x3F);
        err = m5602_write_sensor(sd, OV9650_VREF, &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        /* The 8 LSBs */
        i2c_data = val & 0xff;
        err = m5602_write_sensor(sd, OV9650_GAIN, &i2c_data, 1);
 
-out:
        return err;
 }
 
 int ov9650_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
-       *val = (i2c_data & OV9650_AWB_EN) >> 1;
-       PDEBUG(D_V4L2, "Read auto white balance %d", *val);
-
-       return err;
+       *val = sensor_settings[AUTO_WHITE_BALANCE_IDX];
+       return 0;
 }
 
 int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val)
@@ -507,29 +740,29 @@ int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
        PDEBUG(D_V4L2, "Set auto white balance to %d", val);
+
+       sensor_settings[AUTO_WHITE_BALANCE_IDX] = val;
        err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        i2c_data = ((i2c_data & 0xfd) | ((val & 0x01) << 1));
        err = m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
-out:
+
        return err;
 }
 
 int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val)
 {
-       int err;
-       u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
-       err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
-       *val = (i2c_data & OV9650_AGC_EN) >> 2;
+       *val = sensor_settings[AUTO_GAIN_CTRL_IDX];
        PDEBUG(D_V4L2, "Read auto gain control %d", *val);
-
-       return err;
+       return 0;
 }
 
 int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val)
@@ -537,15 +770,18 @@ int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val)
        int err;
        u8 i2c_data;
        struct sd *sd = (struct sd *) gspca_dev;
+       s32 *sensor_settings = sd->sensor_priv;
 
        PDEBUG(D_V4L2, "Set auto gain control to %d", val);
+
+       sensor_settings[AUTO_GAIN_CTRL_IDX] = val;
        err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        i2c_data = ((i2c_data & 0xfb) | ((val & 0x01) << 2));
        err = m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
-out:
+
        return err;
 }
 
index f4b33b8..fcc54e4 100644 (file)
@@ -32,6 +32,7 @@
 #define OV9650_BAVE                    0x05
 #define OV9650_GEAVE                   0x06
 #define OV9650_RSVD7                   0x07
+#define OV9650_COM2                    0x09
 #define OV9650_PID                     0x0a
 #define OV9650_VER                     0x0b
 #define OV9650_COM3                    0x0c
@@ -96,6 +97,7 @@
 #define OV9650_VGA_SELECT              (1 << 6)
 #define OV9650_CIF_SELECT              (1 << 5)
 #define OV9650_QVGA_SELECT             (1 << 4)
+#define OV9650_QCIF_SELECT             (1 << 3)
 #define OV9650_RGB_SELECT              (1 << 2)
 #define OV9650_RAW_RGB_SELECT          (1 << 0)
 
 #define OV9650_VFLIP                   (1 << 4)
 #define OV9650_HFLIP                   (1 << 5)
 
+#define OV9650_SOFT_SLEEP              (1 << 4)
+#define OV9650_OUTPUT_DRIVE_2X         (1 << 0)
+
+#define OV9650_LEFT_OFFSET             0x62
+
 #define GAIN_DEFAULT                   0x14
 #define RED_GAIN_DEFAULT               0x70
 #define BLUE_GAIN_DEFAULT              0x20
-#define EXPOSURE_DEFAULT               0x5003
+#define EXPOSURE_DEFAULT               0x1ff
 
 /*****************************************************************************/
 
@@ -129,7 +136,9 @@ extern int dump_sensor;
 int ov9650_probe(struct sd *sd);
 int ov9650_init(struct sd *sd);
 int ov9650_start(struct sd *sd);
+int ov9650_stop(struct sd *sd);
 int ov9650_power_down(struct sd *sd);
+void ov9650_disconnect(struct sd *sd);
 
 int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
 int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
@@ -150,152 +159,16 @@ int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val);
 int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val);
 int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val);
 
-static struct m5602_sensor ov9650 = {
+const static struct m5602_sensor ov9650 = {
        .name = "OV9650",
        .i2c_slave_id = 0x60,
        .i2c_regW = 1,
        .probe = ov9650_probe,
        .init = ov9650_init,
        .start = ov9650_start,
+       .stop = ov9650_stop,
        .power_down = ov9650_power_down,
-
-       .nctrls = 8,
-       .ctrls = {
-       {
-               {
-                       .id             = V4L2_CID_EXPOSURE,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "exposure",
-                       .minimum        = 0x00,
-                       .maximum        = 0xffff,
-                       .step           = 0x1,
-                       .default_value  = EXPOSURE_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = ov9650_set_exposure,
-               .get = ov9650_get_exposure
-       }, {
-               {
-                       .id             = V4L2_CID_GAIN,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "gain",
-                       .minimum        = 0x00,
-                       .maximum        = 0x3ff,
-                       .step           = 0x1,
-                       .default_value  = GAIN_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = ov9650_set_gain,
-               .get = ov9650_get_gain
-       }, {
-               {
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "red balance",
-                       .minimum        = 0x00,
-                       .maximum        = 0xff,
-                       .step           = 0x1,
-                       .default_value  = RED_GAIN_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = ov9650_set_red_balance,
-               .get = ov9650_get_red_balance
-       }, {
-               {
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "blue balance",
-                       .minimum        = 0x00,
-                       .maximum        = 0xff,
-                       .step           = 0x1,
-                       .default_value  = BLUE_GAIN_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = ov9650_set_blue_balance,
-               .get = ov9650_get_blue_balance
-       }, {
-               {
-                       .id             = V4L2_CID_HFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "horizontal flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = ov9650_set_hflip,
-               .get = ov9650_get_hflip
-       }, {
-               {
-                       .id             = V4L2_CID_VFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "vertical flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = ov9650_set_vflip,
-               .get = ov9650_get_vflip
-       }, {
-               {
-                       .id             = V4L2_CID_AUTO_WHITE_BALANCE,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "auto white balance",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = ov9650_set_auto_white_balance,
-               .get = ov9650_get_auto_white_balance
-       }, {
-               {
-                       .id             = V4L2_CID_AUTOGAIN,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "auto gain control",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = ov9650_set_auto_gain,
-               .get = ov9650_get_auto_gain
-       }
-       },
-
-       .nmodes = 3,
-       .modes = {
-       {
-               320,
-               240,
-               V4L2_PIX_FMT_SBGGR8,
-               V4L2_FIELD_NONE,
-               .sizeimage =
-                       320 * 240,
-               .bytesperline = 320,
-               .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 0
-       }, {
-               352,
-               288,
-               V4L2_PIX_FMT_SBGGR8,
-               V4L2_FIELD_NONE,
-               .sizeimage =
-                       352 * 288,
-               .bytesperline = 352,
-               .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 0
-       }, {
-               640,
-               480,
-               V4L2_PIX_FMT_SBGGR8,
-               V4L2_FIELD_NONE,
-               .sizeimage =
-                       640 * 480,
-               .bytesperline = 640,
-               .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 0
-       }
-       }
+       .disconnect = ov9650_disconnect,
 };
 
 static const unsigned char preinit_ov9650[][3] =
@@ -345,6 +218,10 @@ static const unsigned char init_ov9650[][3] =
 
        /* Reset chip */
        {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET},
+       /* One extra reset is needed in order to make the sensor behave
+          properly when resuming from ram */
+       {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET},
+
        /* Enable double clock */
        {SENSOR, OV9650_CLKRC, 0x80},
        /* Do something out of spec with the power */
@@ -427,18 +304,12 @@ static const unsigned char init_ov9650[][3] =
        /* Enable denoise, and white-pixel erase */
        {SENSOR, OV9650_COM22, 0x23},
 
-       /* Set the high bits of the exposure value */
-       {SENSOR, OV9650_AECH, ((EXPOSURE_DEFAULT & 0xff00) >> 8)},
-
        /* Enable VARIOPIXEL */
        {SENSOR, OV9650_COM3, OV9650_VARIOPIXEL},
        {SENSOR, OV9650_COM4, OV9650_QVGA_VARIOPIXEL},
 
-       /* Set the low bits of the exposure value */
-       {SENSOR, OV9650_COM1, (EXPOSURE_DEFAULT & 0xff)},
-       {SENSOR, OV9650_GAIN, GAIN_DEFAULT},
-       {SENSOR, OV9650_BLUE, BLUE_GAIN_DEFAULT},
-       {SENSOR, OV9650_RED, RED_GAIN_DEFAULT},
+       /* Put the sensor in soft sleep mode */
+       {SENSOR, OV9650_COM2, OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X},
 };
 
 static const unsigned char power_down_ov9650[][3] =
@@ -461,73 +332,15 @@ static const unsigned char power_down_ov9650[][3] =
        {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
 };
 
-static const unsigned char res_init_ov9650[][2] =
-{
-       {M5602_XB_LINE_OF_FRAME_H, 0x82},
-       {M5602_XB_LINE_OF_FRAME_L, 0x00},
-       {M5602_XB_PIX_OF_LINE_H, 0x82},
-       {M5602_XB_PIX_OF_LINE_L, 0x00},
-       {M5602_XB_SIG_INI, 0x01}
-};
-
-static const unsigned char VGA_ov9650[][3] =
+static const unsigned char res_init_ov9650[][3] =
 {
-       /* Moves the view window in a vertical orientation */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x09},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x01},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0xe0}, /* 480 */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x62}, /* 98 */
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x02}, /* 640 + 98 */
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0xe2},
-
-       {SENSOR, OV9650_COM7, OV9650_VGA_SELECT |
-                             OV9650_RGB_SELECT |
-                             OV9650_RAW_RGB_SELECT},
-};
+       {SENSOR, OV9650_COM2, OV9650_OUTPUT_DRIVE_2X},
 
-static const unsigned char CIF_ov9650[][3] =
-{
-       /* Moves the view window in a vertical orientation */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x09},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x01},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x20}, /* 288 */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x62}, /* 98 */
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x01}, /* 352 + 98 */
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0xc2},
-
-       {SENSOR, OV9650_COM7, OV9650_CIF_SELECT |
-                             OV9650_RGB_SELECT |
-                             OV9650_RAW_RGB_SELECT},
-};
-
-static const unsigned char QVGA_ov9650[][3] =
-{
-       /* Moves the view window in a vertical orientation */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x08},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0xf0}, /* 240 */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x31}, /* 50 */
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x01}, /* 320 + 50 */
-       {BRIDGE, M5602_XB_HSYNC_PARA, 0x71},
-
-       {SENSOR, OV9650_COM7, OV9650_QVGA_SELECT |
-                             OV9650_RGB_SELECT |
-                             OV9650_RAW_RGB_SELECT},
+       {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82},
+       {BRIDGE, M5602_XB_LINE_OF_FRAME_L, 0x00},
+       {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82},
+       {BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00},
+       {BRIDGE, M5602_XB_SIG_INI, 0x01}
 };
 
 #endif
index 2e7fb91..eaddf48 100644 (file)
 
 #include "m5602_po1030.h"
 
+static struct v4l2_pix_format po1030_modes[] = {
+       {
+               640,
+               480,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage = 640 * 480,
+               .bytesperline = 640,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 0
+       }
+};
+
+const static struct ctrl po1030_ctrls[] = {
+       {
+               {
+                       .id             = V4L2_CID_GAIN,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "gain",
+                       .minimum        = 0x00,
+                       .maximum        = 0x4f,
+                       .step           = 0x1,
+                       .default_value  = PO1030_GLOBAL_GAIN_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = po1030_set_gain,
+               .get = po1030_get_gain
+       }, {
+               {
+                       .id             = V4L2_CID_EXPOSURE,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "exposure",
+                       .minimum        = 0x00,
+                       .maximum        = 0x02ff,
+                       .step           = 0x1,
+                       .default_value  = PO1030_EXPOSURE_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = po1030_set_exposure,
+               .get = po1030_get_exposure
+       }, {
+               {
+                       .id             = V4L2_CID_RED_BALANCE,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "red balance",
+                       .minimum        = 0x00,
+                       .maximum        = 0xff,
+                       .step           = 0x1,
+                       .default_value  = PO1030_RED_GAIN_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = po1030_set_red_balance,
+               .get = po1030_get_red_balance
+       }, {
+               {
+                       .id             = V4L2_CID_BLUE_BALANCE,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "blue balance",
+                       .minimum        = 0x00,
+                       .maximum        = 0xff,
+                       .step           = 0x1,
+                       .default_value  = PO1030_BLUE_GAIN_DEFAULT,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = po1030_set_blue_balance,
+               .get = po1030_get_blue_balance
+       }, {
+               {
+                       .id             = V4L2_CID_HFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "horizontal flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0,
+               },
+               .set = po1030_set_hflip,
+               .get = po1030_get_hflip
+       }, {
+               {
+                       .id             = V4L2_CID_VFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "vertical flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0,
+               },
+               .set = po1030_set_vflip,
+               .get = po1030_get_vflip
+       }
+};
+
 static void po1030_dump_registers(struct sd *sd);
 
 int po1030_probe(struct sd *sd)
@@ -59,10 +152,10 @@ int po1030_probe(struct sd *sd)
        return -ENODEV;
 
 sensor_found:
-       sd->gspca_dev.cam.cam_mode = po1030.modes;
-       sd->gspca_dev.cam.nmodes = po1030.nmodes;
-       sd->desc->ctrls = po1030.ctrls;
-       sd->desc->nctrls = po1030.nctrls;
+       sd->gspca_dev.cam.cam_mode = po1030_modes;
+       sd->gspca_dev.cam.nmodes = ARRAY_SIZE(po1030_modes);
+       sd->desc->ctrls = po1030_ctrls;
+       sd->desc->nctrls = ARRAY_SIZE(po1030_ctrls);
        return 0;
 }
 
@@ -108,7 +201,7 @@ int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
        err = m5602_read_sensor(sd, PO1030_REG_INTEGLINES_H,
                                 &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
        *val = (i2c_data << 8);
 
        err = m5602_read_sensor(sd, PO1030_REG_INTEGLINES_M,
@@ -116,7 +209,7 @@ int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
        *val |= i2c_data;
 
        PDEBUG(D_V4L2, "Exposure read as %d", *val);
-out:
+
        return err;
 }
 
@@ -135,7 +228,7 @@ int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
        err = m5602_write_sensor(sd, PO1030_REG_INTEGLINES_H,
                                  &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        i2c_data = (val & 0xff);
        PDEBUG(D_V4L2, "Set exposure to low byte to 0x%x",
@@ -143,7 +236,6 @@ int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
        err = m5602_write_sensor(sd, PO1030_REG_INTEGLINES_M,
                                  &i2c_data, 1);
 
-out:
        return err;
 }
 
@@ -186,14 +278,13 @@ int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
        PDEBUG(D_V4L2, "Set hflip %d", val);
        err = m5602_read_sensor(sd, PO1030_REG_CONTROL2, &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        i2c_data = (0x7f & i2c_data) | ((val & 0x01) << 7);
 
        err = m5602_write_sensor(sd, PO1030_REG_CONTROL2,
                                 &i2c_data, 1);
 
-out:
        return err;
 }
 
@@ -222,14 +313,13 @@ int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
        PDEBUG(D_V4L2, "Set vflip %d", val);
        err = m5602_read_sensor(sd, PO1030_REG_CONTROL2, &i2c_data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        i2c_data = (i2c_data & 0xbf) | ((val & 0x01) << 6);
 
        err = m5602_write_sensor(sd, PO1030_REG_CONTROL2,
                                 &i2c_data, 1);
 
-out:
        return err;
 }
 
index def39d5..c10b123 100644 (file)
@@ -141,7 +141,7 @@ int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
 int po1030_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
 int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
 
-static struct m5602_sensor po1030 = {
+static const struct m5602_sensor po1030 = {
        .name = "PO1030",
 
        .i2c_slave_id = 0xdc,
@@ -150,102 +150,6 @@ static struct m5602_sensor po1030 = {
        .probe = po1030_probe,
        .init = po1030_init,
        .power_down = po1030_power_down,
-
-       .nctrls = 6,
-       .ctrls = {
-       {
-               {
-                       .id             = V4L2_CID_GAIN,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "gain",
-                       .minimum        = 0x00,
-                       .maximum        = 0x4f,
-                       .step           = 0x1,
-                       .default_value  = PO1030_GLOBAL_GAIN_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = po1030_set_gain,
-               .get = po1030_get_gain
-       }, {
-               {
-                       .id             = V4L2_CID_EXPOSURE,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "exposure",
-                       .minimum        = 0x00,
-                       .maximum        = 0x02ff,
-                       .step           = 0x1,
-                       .default_value  = PO1030_EXPOSURE_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = po1030_set_exposure,
-               .get = po1030_get_exposure
-       }, {
-               {
-                       .id             = V4L2_CID_RED_BALANCE,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "red balance",
-                       .minimum        = 0x00,
-                       .maximum        = 0xff,
-                       .step           = 0x1,
-                       .default_value  = PO1030_RED_GAIN_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = po1030_set_red_balance,
-               .get = po1030_get_red_balance
-       }, {
-               {
-                       .id             = V4L2_CID_BLUE_BALANCE,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "blue balance",
-                       .minimum        = 0x00,
-                       .maximum        = 0xff,
-                       .step           = 0x1,
-                       .default_value  = PO1030_BLUE_GAIN_DEFAULT,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = po1030_set_blue_balance,
-               .get = po1030_get_blue_balance
-       }, {
-               {
-                       .id             = V4L2_CID_HFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "horizontal flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0,
-               },
-               .set = po1030_set_hflip,
-               .get = po1030_get_hflip
-       }, {
-               {
-                       .id             = V4L2_CID_VFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "vertical flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0,
-               },
-               .set = po1030_set_vflip,
-               .get = po1030_get_vflip
-       }
-       },
-
-       .nmodes = 1,
-       .modes = {
-       {
-               M5602_DEFAULT_FRAME_WIDTH,
-               M5602_DEFAULT_FRAME_HEIGHT,
-               V4L2_PIX_FMT_SBGGR8,
-               V4L2_FIELD_NONE,
-               .sizeimage =
-                       M5602_DEFAULT_FRAME_WIDTH * M5602_DEFAULT_FRAME_HEIGHT,
-               .bytesperline = M5602_DEFAULT_FRAME_WIDTH,
-               .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 1
-       }
-       }
 };
 
 static const unsigned char preinit_po1030[][3] =
index 48892b5..4306d59 100644 (file)
@@ -50,6 +50,76 @@ static
        { }
 };
 
+static struct v4l2_pix_format s5k4aa_modes[] = {
+       {
+               640,
+               480,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage =
+                       640 * 480,
+               .bytesperline = 640,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 0
+       }
+};
+
+const static struct ctrl s5k4aa_ctrls[] = {
+       {
+               {
+                       .id             = V4L2_CID_VFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "vertical flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0
+               },
+               .set = s5k4aa_set_vflip,
+               .get = s5k4aa_get_vflip
+
+       }, {
+               {
+                       .id             = V4L2_CID_HFLIP,
+                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name           = "horizontal flip",
+                       .minimum        = 0,
+                       .maximum        = 1,
+                       .step           = 1,
+                       .default_value  = 0
+               },
+               .set = s5k4aa_set_hflip,
+               .get = s5k4aa_get_hflip
+
+       }, {
+               {
+                       .id             = V4L2_CID_GAIN,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "Gain",
+                       .minimum        = 0,
+                       .maximum        = 127,
+                       .step           = 1,
+                       .default_value  = 0xa0,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = s5k4aa_set_gain,
+               .get = s5k4aa_get_gain
+       }, {
+               {
+                       .id             = V4L2_CID_EXPOSURE,
+                       .type           = V4L2_CTRL_TYPE_INTEGER,
+                       .name           = "Exposure",
+                       .minimum        = 13,
+                       .maximum        = 0xfff,
+                       .step           = 1,
+                       .default_value  = 0x100,
+                       .flags          = V4L2_CTRL_FLAG_SLIDER
+               },
+               .set = s5k4aa_set_exposure,
+               .get = s5k4aa_get_exposure
+       }
+};
+
 static void s5k4aa_dump_registers(struct sd *sd);
 
 int s5k4aa_probe(struct sd *sd)
@@ -115,14 +185,56 @@ int s5k4aa_probe(struct sd *sd)
                info("Detected a s5k4aa sensor");
 
 sensor_found:
-       sd->gspca_dev.cam.cam_mode = s5k4aa.modes;
-       sd->gspca_dev.cam.nmodes = s5k4aa.nmodes;
-       sd->desc->ctrls = s5k4aa.ctrls;
-       sd->desc->nctrls = s5k4aa.nctrls;
-
+       sd->gspca_dev.cam.cam_mode = s5k4aa_modes;
+       sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k4aa_modes);
+       sd->desc->ctrls = s5k4aa_ctrls;
+       sd->desc->nctrls = ARRAY_SIZE(s5k4aa_ctrls);
        return 0;
 }
 
+int s5k4aa_start(struct sd *sd)
+{
+       int i, err = 0;
+       u8 data[2];
+       struct cam *cam = &sd->gspca_dev.cam;
+
+       switch (cam->cam_mode[sd->gspca_dev.curr_mode].width)
+       {
+       case 640:
+               PDEBUG(D_V4L2, "Configuring camera for VGA mode");
+
+               for (i = 0; i < ARRAY_SIZE(VGA_s5k4aa); i++) {
+                       switch (VGA_s5k4aa[i][0]) {
+                       case BRIDGE:
+                               err = m5602_write_bridge(sd,
+                                                VGA_s5k4aa[i][1],
+                                                VGA_s5k4aa[i][2]);
+                       break;
+
+                       case SENSOR:
+                               data[0] = VGA_s5k4aa[i][2];
+                               err = m5602_write_sensor(sd,
+                                                VGA_s5k4aa[i][1],
+                                                data, 1);
+                       break;
+
+                       case SENSOR_LONG:
+                               data[0] = VGA_s5k4aa[i][2];
+                               data[1] = VGA_s5k4aa[i][3];
+                               err = m5602_write_sensor(sd,
+                                                 VGA_s5k4aa[i][1],
+                                                 data, 2);
+                       break;
+
+                       default:
+                               err("Invalid stream command, exiting init");
+                               return -EINVAL;
+                       }
+               }
+       }
+       return err;
+}
+
 int s5k4aa_init(struct sd *sd)
 {
        int i, err = 0;
@@ -194,17 +306,17 @@ int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
 
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K4AA_EXPOSURE_HI, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        *val = data << 8;
        err = m5602_read_sensor(sd, S5K4AA_EXPOSURE_LO, &data, 1);
        *val |= data;
        PDEBUG(D_V4L2, "Read exposure %d", *val);
-out:
+
        return err;
 }
 
@@ -217,14 +329,14 @@ int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
        PDEBUG(D_V4L2, "Set exposure to %d", val);
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
        data = (val >> 8) & 0xff;
        err = m5602_write_sensor(sd, S5K4AA_EXPOSURE_HI, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
        data = val & 0xff;
        err = m5602_write_sensor(sd, S5K4AA_EXPOSURE_LO, &data, 1);
-out:
+
        return err;
 }
 
@@ -236,13 +348,12 @@ int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
 
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        *val = (data & S5K4AA_RM_V_FLIP) >> 7;
        PDEBUG(D_V4L2, "Read vertical flip %d", *val);
 
-out:
        return err;
 }
 
@@ -255,32 +366,32 @@ int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
        PDEBUG(D_V4L2, "Set vertical flip to %d", val);
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
        err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
        data = ((data & ~S5K4AA_RM_V_FLIP)
                        | ((val & 0x01) << 7));
        err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        if (val) {
                err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
                if (err < 0)
-                       goto out;
+                       return err;
 
                data++;
                err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
        } else {
                err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
                if (err < 0)
-                       goto out;
+                       return err;
 
                data--;
                err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
        }
-out:
+
        return err;
 }
 
@@ -292,12 +403,12 @@ int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
 
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        *val = (data & S5K4AA_RM_H_FLIP) >> 6;
        PDEBUG(D_V4L2, "Read horizontal flip %d", *val);
-out:
+
        return err;
 }
 
@@ -311,32 +422,32 @@ int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
               val);
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
        err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        data = ((data & ~S5K4AA_RM_H_FLIP) | ((val & 0x01) << 6));
        err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        if (val) {
                err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
                if (err < 0)
-                       goto out;
+                       return err;
                data++;
                err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
                if (err < 0)
-                       goto out;
+                       return err;
        } else {
                err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
                if (err < 0)
-                       goto out;
+                       return err;
                data--;
                err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
        }
-out:
+
        return err;
 }
 
@@ -348,13 +459,12 @@ int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
 
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K4AA_GAIN_2, &data, 1);
        *val = data;
        PDEBUG(D_V4L2, "Read gain %d", *val);
 
-out:
        return err;
 }
 
@@ -367,12 +477,11 @@ int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val)
        PDEBUG(D_V4L2, "Set gain to %d", val);
        err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        data = val & 0xff;
        err = m5602_write_sensor(sd, S5K4AA_GAIN_2, &data, 1);
 
-out:
        return err;
 }
 
index 1f88b0d..ca854d4 100644 (file)
@@ -65,6 +65,7 @@ extern int dump_sensor;
 
 int s5k4aa_probe(struct sd *sd);
 int s5k4aa_init(struct sd *sd);
+int s5k4aa_start(struct sd *sd);
 int s5k4aa_power_down(struct sd *sd);
 
 int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
@@ -76,84 +77,14 @@ int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
 int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
 int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val);
 
-static struct m5602_sensor s5k4aa = {
+static const struct m5602_sensor s5k4aa = {
        .name = "S5K4AA",
        .probe = s5k4aa_probe,
        .init = s5k4aa_init,
+       .start = s5k4aa_start,
        .power_down = s5k4aa_power_down,
        .i2c_slave_id = 0x5a,
        .i2c_regW = 2,
-       .nctrls = 4,
-       .ctrls = {
-       {
-               {
-                       .id             = V4L2_CID_VFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "vertical flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = s5k4aa_set_vflip,
-               .get = s5k4aa_get_vflip
-
-       }, {
-               {
-                       .id             = V4L2_CID_HFLIP,
-                       .type           = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name           = "horizontal flip",
-                       .minimum        = 0,
-                       .maximum        = 1,
-                       .step           = 1,
-                       .default_value  = 0
-               },
-               .set = s5k4aa_set_hflip,
-               .get = s5k4aa_get_hflip
-
-       }, {
-               {
-                       .id             = V4L2_CID_GAIN,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "Gain",
-                       .minimum        = 0,
-                       .maximum        = 127,
-                       .step           = 1,
-                       .default_value  = 0xa0,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = s5k4aa_set_gain,
-               .get = s5k4aa_get_gain
-       }, {
-               {
-                       .id             = V4L2_CID_EXPOSURE,
-                       .type           = V4L2_CTRL_TYPE_INTEGER,
-                       .name           = "Exposure",
-                       .minimum        = 13,
-                       .maximum        = 0xfff,
-                       .step           = 1,
-                       .default_value  = 0x100,
-                       .flags          = V4L2_CTRL_FLAG_SLIDER
-               },
-               .set = s5k4aa_set_exposure,
-               .get = s5k4aa_get_exposure
-       }
-       },
-
-       .nmodes = 1,
-       .modes = {
-       {
-               M5602_DEFAULT_FRAME_WIDTH,
-               M5602_DEFAULT_FRAME_HEIGHT,
-               V4L2_PIX_FMT_SBGGR8,
-               V4L2_FIELD_NONE,
-               .sizeimage =
-                       M5602_DEFAULT_FRAME_WIDTH * M5602_DEFAULT_FRAME_HEIGHT,
-               .bytesperline = M5602_DEFAULT_FRAME_WIDTH,
-               .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 1
-       }
-       }
 };
 
 static const unsigned char preinit_s5k4aa[][4] =
@@ -329,4 +260,63 @@ static const unsigned char init_s5k4aa[][4] =
        {SENSOR, S5K4AA_GAIN_2, 0xa0, 0x00}
 };
 
+static const unsigned char VGA_s5k4aa[][4] =
+{
+       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
+       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
+       {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
+       {BRIDGE, M5602_XB_SENSOR_TYPE, 0x08, 0x00},
+       {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00},
+       {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00},
+       {BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00},
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
+       /* VSYNC_PARA, VSYNC_PARA : img height 480 = 0x01e0 */
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00},
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0xe0, 0x00},
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
+       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
+       {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
+       {BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00},
+       {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
+       {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
+       /* HSYNC_PARA, HSYNC_PARA : img width 640 = 0x0280 */
+       {BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00},
+       {BRIDGE, M5602_XB_HSYNC_PARA, 0x80, 0x00},
+       {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
+       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
+       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xa0, 0x00}, /* 48 MHz */
+
+       {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
+       {SENSOR, S5K4AA_READ_MODE, S5K4AA_RM_H_FLIP | S5K4AA_RM_ROW_SKIP_2X
+               | S5K4AA_RM_COL_SKIP_2X, 0x00},
+       /* 0x37 : Fix image stability when light is too bright and improves
+        * image quality in 640x480, but worsens it in 1280x1024 */
+       {SENSOR, 0x37, 0x01, 0x00},
+       /* ROWSTART_HI, ROWSTART_LO : 10 + (1024-960)/2 = 42 = 0x002a */
+       {SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00},
+       {SENSOR, S5K4AA_ROWSTART_LO, 0x2a, 0x00},
+       {SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00},
+       {SENSOR, S5K4AA_COLSTART_LO, 0x0c, 0x00},
+       /* window_height_hi, window_height_lo : 960 = 0x03c0 */
+       {SENSOR, S5K4AA_WINDOW_HEIGHT_HI, 0x03, 0x00},
+       {SENSOR, S5K4AA_WINDOW_HEIGHT_LO, 0xc0, 0x00},
+       /* window_width_hi, window_width_lo : 1280 = 0x0500 */
+       {SENSOR, S5K4AA_WINDOW_WIDTH_HI, 0x05, 0x00},
+       {SENSOR, S5K4AA_WINDOW_WIDTH_LO, 0x00, 0x00},
+       {SENSOR, S5K4AA_H_BLANK_HI__, 0x00, 0x00},
+       {SENSOR, S5K4AA_H_BLANK_LO__, 0xa8, 0x00}, /* helps to sync... */
+       {SENSOR, S5K4AA_EXPOSURE_HI, 0x01, 0x00},
+       {SENSOR, S5K4AA_EXPOSURE_LO, 0x00, 0x00},
+       {SENSOR, 0x11, 0x04, 0x00},
+       {SENSOR, 0x12, 0xc3, 0x00},
+       {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
+       {SENSOR, 0x02, 0x0e, 0x00},
+       {SENSOR_LONG, S5K4AA_GLOBAL_GAIN__, 0x0f, 0x00},
+       {SENSOR, S5K4AA_GAIN_1, 0x0b, 0x00},
+       {SENSOR, S5K4AA_GAIN_2, 0xa0, 0x00}
+};
+
 #endif
index ccea4a7..42c86aa 100644 (file)
 
 #include "m5602_s5k83a.h"
 
+static struct v4l2_pix_format s5k83a_modes[] = {
+       {
+               640,
+               480,
+               V4L2_PIX_FMT_SBGGR8,
+               V4L2_FIELD_NONE,
+               .sizeimage =
+                       640 * 480,
+               .bytesperline = 640,
+               .colorspace = V4L2_COLORSPACE_SRGB,
+               .priv = 0
+       }
+};
+
+const static struct ctrl s5k83a_ctrls[] = {
+       {
+               {
+                       .id = V4L2_CID_BRIGHTNESS,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+                       .name = "brightness",
+                       .minimum = 0x00,
+                       .maximum = 0xff,
+                       .step = 0x01,
+                       .default_value = S5K83A_DEFAULT_BRIGHTNESS,
+                       .flags = V4L2_CTRL_FLAG_SLIDER
+               },
+                       .set = s5k83a_set_brightness,
+                       .get = s5k83a_get_brightness
+
+       }, {
+               {
+                       .id = V4L2_CID_WHITENESS,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+                       .name = "whiteness",
+                       .minimum = 0x00,
+                       .maximum = 0xff,
+                       .step = 0x01,
+                       .default_value = S5K83A_DEFAULT_WHITENESS,
+                       .flags = V4L2_CTRL_FLAG_SLIDER
+               },
+                       .set = s5k83a_set_whiteness,
+                       .get = s5k83a_get_whiteness,
+       }, {
+               {
+                       .id = V4L2_CID_GAIN,
+                       .type = V4L2_CTRL_TYPE_INTEGER,
+                       .name = "gain",
+                       .minimum = 0x00,
+                       .maximum = S5K83A_MAXIMUM_GAIN,
+                       .step = 0x01,
+                       .default_value = S5K83A_DEFAULT_GAIN,
+                       .flags = V4L2_CTRL_FLAG_SLIDER
+               },
+                       .set = s5k83a_set_gain,
+                       .get = s5k83a_get_gain
+       }, {
+               {
+                       .id         = V4L2_CID_HFLIP,
+                       .type       = V4L2_CTRL_TYPE_BOOLEAN,
+                       .name       = "horizontal flip",
+                       .minimum    = 0,
+                       .maximum    = 1,
+                       .step       = 1,
+                       .default_value  = 0
+               },
+                       .set = s5k83a_set_hflip,
+                       .get = s5k83a_get_hflip
+       }, {
+               {
+                .id         = V4L2_CID_VFLIP,
+               .type       = V4L2_CTRL_TYPE_BOOLEAN,
+               .name       = "vertical flip",
+               .minimum    = 0,
+               .maximum    = 1,
+               .step       = 1,
+               .default_value  = 0
+               },
+               .set = s5k83a_set_vflip,
+               .get = s5k83a_get_vflip
+       }
+};
+
 static void s5k83a_dump_registers(struct sd *sd);
 
 int s5k83a_probe(struct sd *sd)
@@ -63,10 +145,10 @@ int s5k83a_probe(struct sd *sd)
                info("Detected a s5k83a sensor");
 
 sensor_found:
-       sd->gspca_dev.cam.cam_mode = s5k83a.modes;
-       sd->gspca_dev.cam.nmodes = s5k83a.nmodes;
-       sd->desc->ctrls = s5k83a.ctrls;
-       sd->desc->nctrls = s5k83a.nctrls;
+       sd->gspca_dev.cam.cam_mode = s5k83a_modes;
+       sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k83a_modes);
+       sd->desc->ctrls = s5k83a_ctrls;
+       sd->desc->nctrls = ARRAY_SIZE(s5k83a_ctrls);
        return 0;
 }
 
@@ -108,6 +190,16 @@ int s5k83a_init(struct sd *sd)
        return (err < 0) ? err : 0;
 }
 
+int s5k83a_start(struct sd *sd)
+{
+       return s5k83a_set_led_indication(sd, 1);
+}
+
+int s5k83a_stop(struct sd *sd)
+{
+       return s5k83a_set_led_indication(sd, 0);
+}
+
 int s5k83a_power_down(struct sd *sd)
 {
        return 0;
@@ -163,12 +255,11 @@ int s5k83a_get_brightness(struct gspca_dev *gspca_dev, __s32 *val)
 
        err = m5602_read_sensor(sd, S5K83A_BRIGHTNESS, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        data[1] = data[1] << 1;
        *val = data[1];
 
-out:
        return err;
 }
 
@@ -182,13 +273,13 @@ int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
        data[1] = 0x20;
        err = m5602_write_sensor(sd, 0x14, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        data[0] = 0x01;
        data[1] = 0x00;
        err = m5602_write_sensor(sd, 0x0d, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        /* FIXME: This is not sane, we need to figure out the composition
                  of these registers */
@@ -196,7 +287,6 @@ int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
        data[1] = val >> 1; /* brightness, high 7 bits */
        err = m5602_write_sensor(sd, S5K83A_BRIGHTNESS, data, 2);
 
-out:
        return err;
 }
 
@@ -208,11 +298,10 @@ int s5k83a_get_whiteness(struct gspca_dev *gspca_dev, __s32 *val)
 
        err = m5602_read_sensor(sd, S5K83A_WHITENESS, &data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        *val = data;
 
-out:
        return err;
 }
 
@@ -236,7 +325,7 @@ int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
 
        err = m5602_read_sensor(sd, S5K83A_GAIN, data, 2);
        if (err < 0)
-               goto out;
+               return err;
 
        data[1] = data[1] & 0x3f;
        if (data[1] > S5K83A_MAXIMUM_GAIN)
@@ -244,7 +333,6 @@ int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
 
        *val = data[1];
 
-out:
        return err;
 }
 
@@ -269,12 +357,11 @@ int s5k83a_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
        data[0] = 0x05;
        err = m5602_write_sensor(sd, S5K83A_PAGE_MAP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K83A_FLIP, data, 1);
        *val = (data[0] | 0x40) ? 1 : 0;
 
-out:
        return err;
 }
 
@@ -287,23 +374,22 @@ int s5k83a_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
        data[0] = 0x05;
        err = m5602_write_sensor(sd, S5K83A_PAGE_MAP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K83A_FLIP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        /* set or zero six bit, seven is hflip */
        data[0] = (val) ? (data[0] & 0x80) | 0x40 | S5K83A_FLIP_MASK
                        : (data[0] & 0x80) | S5K83A_FLIP_MASK;
        err = m5602_write_sensor(sd, S5K83A_FLIP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        data[0] = (val) ? 0x0b : 0x0a;
        err = m5602_write_sensor(sd, S5K83A_VFLIP_TUNE, data, 1);
 
-out:
        return err;
 }
 
@@ -316,12 +402,11 @@ int s5k83a_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
        data[0] = 0x05;
        err = m5602_write_sensor(sd, S5K83A_PAGE_MAP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K83A_FLIP, data, 1);
        *val = (data[0] | 0x80) ? 1 : 0;
 
-out:
        return err;
 }
 
@@ -334,21 +419,40 @@ int s5k83a_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
        data[0] = 0x05;
        err = m5602_write_sensor(sd, S5K83A_PAGE_MAP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        err = m5602_read_sensor(sd, S5K83A_FLIP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        /* set or zero seven bit, six is vflip */
        data[0] = (val) ? (data[0] & 0x40) | 0x80 | S5K83A_FLIP_MASK
                        : (data[0] & 0x40) | S5K83A_FLIP_MASK;
        err = m5602_write_sensor(sd, S5K83A_FLIP, data, 1);
        if (err < 0)
-               goto out;
+               return err;
 
        data[0] = (val) ? 0x0a : 0x0b;
        err = m5602_write_sensor(sd, S5K83A_HFLIP_TUNE, data, 1);
-out:
+
        return err;
 }
+
+int s5k83a_set_led_indication(struct sd *sd, u8 val)
+{
+       int err = 0;
+       u8 data[1];
+
+       err = m5602_read_bridge(sd, M5602_XB_GPIO_DAT, data);
+       if (err < 0)
+               return err;
+
+       if (val)
+               data[0] = data[0] | S5K83A_GPIO_LED_MASK;
+       else
+               data[0] = data[0] & ~S5K83A_GPIO_LED_MASK;
+
+       err = m5602_write_bridge(sd, M5602_XB_GPIO_DAT, data[0]);
+
+       return (err < 0) ? err : 0;
+}
index 05ccb5b..819ab25 100644 (file)
@@ -34,7 +34,7 @@
 #define S5K83A_DEFAULT_GAIN                    0x00
 #define S5K83A_MAXIMUM_GAIN                    0x3c
 #define S5K83A_FLIP_MASK                       0x10
-
+#define S5K83A_GPIO_LED_MASK           0x10
 
 /*****************************************************************************/
 
@@ -44,8 +44,12 @@ extern int dump_sensor;
 
 int s5k83a_probe(struct sd *sd);
 int s5k83a_init(struct sd *sd);
+int s5k83a_start(struct sd *sd);
+int s5k83a_stop(struct sd *sd);
 int s5k83a_power_down(struct sd *sd);
 
+int s5k83a_set_led_indication(struct sd *sd, u8 val);
+
 int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val);
 int s5k83a_get_brightness(struct gspca_dev *gspca_dev, __s32 *val);
 int s5k83a_set_whiteness(struct gspca_dev *gspca_dev, __s32 val);
@@ -57,95 +61,15 @@ int s5k83a_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
 int s5k83a_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
 int s5k83a_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
 
-static struct m5602_sensor s5k83a = {
+static const struct m5602_sensor s5k83a = {
        .name = "S5K83A",
        .probe = s5k83a_probe,
        .init = s5k83a_init,
+       .start = s5k83a_start,
+       .stop = s5k83a_stop,
        .power_down = s5k83a_power_down,
        .i2c_slave_id = 0x5a,
        .i2c_regW = 2,
-       .nctrls = 5,
-       .ctrls = {
-       {
-               {
-                       .id = V4L2_CID_BRIGHTNESS,
-                       .type = V4L2_CTRL_TYPE_INTEGER,
-                       .name = "brightness",
-                       .minimum = 0x00,
-                       .maximum = 0xff,
-                       .step = 0x01,
-                       .default_value = S5K83A_DEFAULT_BRIGHTNESS,
-                       .flags = V4L2_CTRL_FLAG_SLIDER
-               },
-                       .set = s5k83a_set_brightness,
-                       .get = s5k83a_get_brightness
-
-       }, {
-               {
-                       .id = V4L2_CID_WHITENESS,
-                       .type = V4L2_CTRL_TYPE_INTEGER,
-                       .name = "whiteness",
-                       .minimum = 0x00,
-                       .maximum = 0xff,
-                       .step = 0x01,
-                       .default_value = S5K83A_DEFAULT_WHITENESS,
-                       .flags = V4L2_CTRL_FLAG_SLIDER
-               },
-                       .set = s5k83a_set_whiteness,
-                       .get = s5k83a_get_whiteness,
-       }, {
-               {
-                       .id = V4L2_CID_GAIN,
-                       .type = V4L2_CTRL_TYPE_INTEGER,
-                       .name = "gain",
-                       .minimum = 0x00,
-                       .maximum = S5K83A_MAXIMUM_GAIN,
-                       .step = 0x01,
-                       .default_value = S5K83A_DEFAULT_GAIN,
-                       .flags = V4L2_CTRL_FLAG_SLIDER
-               },
-                       .set = s5k83a_set_gain,
-                       .get = s5k83a_get_gain
-       }, {
-               {
-                       .id         = V4L2_CID_HFLIP,
-                       .type       = V4L2_CTRL_TYPE_BOOLEAN,
-                       .name       = "horizontal flip",
-                       .minimum    = 0,
-                       .maximum    = 1,
-                       .step       = 1,
-                       .default_value  = 0
-               },
-                       .set = s5k83a_set_hflip,
-                       .get = s5k83a_get_hflip
-       }, {
-               {
-                .id         = V4L2_CID_VFLIP,
-               .type       = V4L2_CTRL_TYPE_BOOLEAN,
-               .name       = "vertical flip",
-               .minimum    = 0,
-               .maximum    = 1,
-               .step       = 1,
-               .default_value  = 0
-               },
-               .set = s5k83a_set_vflip,
-               .get = s5k83a_get_vflip
-               }
-       },
-       .nmodes = 1,
-       .modes = {
-       {
-               M5602_DEFAULT_FRAME_WIDTH,
-               M5602_DEFAULT_FRAME_HEIGHT,
-               V4L2_PIX_FMT_SBGGR8,
-               V4L2_FIELD_NONE,
-               .sizeimage =
-                       M5602_DEFAULT_FRAME_WIDTH * M5602_DEFAULT_FRAME_HEIGHT,
-               .bytesperline = M5602_DEFAULT_FRAME_WIDTH,
-               .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 1
-       }
-       }
 };
 
 static const unsigned char preinit_s5k83a[][4] =
@@ -381,7 +305,7 @@ static const unsigned char init_s5k83a[][4] =
        {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
        {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xf0, 0x00},
        {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
-       {BRIDGE, M5602_XB_GPIO_DAT, 0x1c, 0x00},
+       {BRIDGE, M5602_XB_GPIO_DAT, 0x08, 0x00},
        {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
        {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06, 0x00},
        {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
index 261623f..0d30269 100644 (file)
 
 #include "m5602_bridge.h"
 
-#define M5602_DEFAULT_FRAME_WIDTH  640
-#define M5602_DEFAULT_FRAME_HEIGHT 480
-
-#define M5602_MAX_CTRLS                (V4L2_CID_LASTP1 - V4L2_CID_BASE + 10)
-
 /* Enumerates all supported sensors */
 enum sensors {
        OV9650_SENSOR   = 1,
@@ -61,14 +56,14 @@ struct m5602_sensor {
        /* Executed when the camera starts to send data */
        int (*start)(struct sd *sd);
 
-       /* Performs a power down sequence */
-       int (*power_down)(struct sd *sd);
+       /* Executed when the camera ends to send data */
+       int (*stop)(struct sd *sd);
 
-       int nctrls;
-       struct ctrl ctrls[M5602_MAX_CTRLS];
+       /* Executed when the device is disconnected */
+       void (*disconnect)(struct sd *sd);
 
-       char nmodes;
-       struct v4l2_pix_format modes[];
+       /* Performs a power down sequence */
+       int (*power_down)(struct sd *sd);
 };
 
 #endif
index 04e3ae5..2e1cdf0 100644 (file)
@@ -360,6 +360,12 @@ static int sd_init(struct gspca_dev *gspca_dev)
        gspca_dev->cam.nmodes = ARRAY_SIZE(sq905_mode);
        if (!(ident & SQ905_HIRES_MASK))
                gspca_dev->cam.nmodes--;
+
+       if (ident & SQ905_ORIENTATION_MASK)
+               gspca_dev->cam.input_flags = V4L2_IN_ST_VFLIP;
+       else
+               gspca_dev->cam.input_flags = V4L2_IN_ST_VFLIP |
+                                            V4L2_IN_ST_HFLIP;
        return 0;
 }
 
index 4c802fb..e4e933c 100644 (file)
@@ -159,37 +159,16 @@ static const struct v4l2_pix_format vc0323_mode[] = {
                .priv = 2},
 };
 static const struct v4l2_pix_format bi_mode[] = {
-/*fixme: jeg does not work
-       {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
-               .bytesperline = 320,
-               .sizeimage = 320 * 240 * 3 / 8 + 590,
-               .colorspace = V4L2_COLORSPACE_JPEG,
-               .priv = 5},
-*/
        {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 2,
                .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 4},
-/*
-       {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
-               .bytesperline = 640,
-               .sizeimage = 640 * 480 * 3 / 8 + 590,
-               .colorspace = V4L2_COLORSPACE_JPEG,
-               .priv = 3},
-*/
+               .priv = 2},
        {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
                .bytesperline = 640,
                .sizeimage = 640 * 480 * 2,
                .colorspace = V4L2_COLORSPACE_SRGB,
-               .priv = 2},
-/*
-       {1280, 1024, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
-               .bytesperline = 1280,
-               .sizeimage = 1280 * 1024 * 1 / 4 + 590,
-               .colorspace = V4L2_COLORSPACE_JPEG,
                .priv = 1},
-*/
        {1280, 1024, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
                .bytesperline = 1280,
                .sizeimage = 1280 * 1024 * 2,
@@ -1034,121 +1013,6 @@ static const u8 mi1320_soc_InitVGA[][4] = {
        {0xb3, 0x5c, 0x01, 0xcc},
        {}
 };
-static const u8 mi1320_soc_InitVGA_JPG[][4] = {
-       {0xb3, 0x01, 0x01, 0xcc},
-       {0xb0, 0x03, 0x19, 0xcc},
-       {0xb0, 0x04, 0x02, 0xcc},
-       {0x00, 0x00, 0x30, 0xdd},
-       {0xb3, 0x00, 0x64, 0xcc},
-       {0xb3, 0x00, 0x67, 0xcc},
-       {0xb3, 0x05, 0x01, 0xcc},
-       {0xb3, 0x06, 0x01, 0xcc},
-       {0xb3, 0x08, 0x01, 0xcc},
-       {0xb3, 0x09, 0x0c, 0xcc},
-       {0xb3, 0x34, 0x02, 0xcc},
-       {0xb3, 0x35, 0xc8, 0xcc},
-       {0xb3, 0x02, 0x00, 0xcc},
-       {0xb3, 0x03, 0x0a, 0xcc},
-       {0xb3, 0x04, 0x05, 0xcc},
-       {0xb3, 0x20, 0x00, 0xcc},
-       {0xb3, 0x21, 0x00, 0xcc},
-       {0xb3, 0x22, 0x01, 0xcc},
-       {0xb3, 0x23, 0xe0, 0xcc},
-       {0xb3, 0x14, 0x00, 0xcc},
-       {0xb3, 0x15, 0x00, 0xcc},
-       {0xb3, 0x16, 0x02, 0xcc},
-       {0xb3, 0x17, 0x7f, 0xcc},
-       {0xb3, 0x00, 0x67, 0xcc},
-       {0xb8, 0x00, 0x00, 0xcc},
-       {0xbc, 0x00, 0x71, 0xcc},
-       {0xbc, 0x01, 0x01, 0xcc},
-       {0xb3, 0x5c, 0x01, 0xcc},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x00, 0x00, 0x10, 0xdd},
-       {0xc8, 0x00, 0x00, 0xbb},
-       {0x00, 0x00, 0x30, 0xdd},
-       {0xf0, 0x00, 0x00, 0xbb},
-       {0x00, 0x00, 0x10, 0xdd},
-       {0x07, 0x00, 0xe0, 0xbb},
-       {0x08, 0x00, 0x0b, 0xbb},
-       {0x21, 0x00, 0x0c, 0xbb},
-       {0x20, 0x01, 0x03, 0xbb},
-       {0xb6, 0x00, 0x00, 0xcc},
-       {0xb6, 0x03, 0x02, 0xcc},
-       {0xb6, 0x02, 0x80, 0xcc},
-       {0xb6, 0x05, 0x01, 0xcc},
-       {0xb6, 0x04, 0xe0, 0xcc},
-       {0xb6, 0x12, 0xf8, 0xcc},
-       {0xb6, 0x13, 0x05, 0xcc},
-       {0xb6, 0x18, 0x02, 0xcc},
-       {0xb6, 0x17, 0x58, 0xcc},
-       {0xb6, 0x16, 0x00, 0xcc},
-       {0xb6, 0x22, 0x12, 0xcc},
-       {0xb6, 0x23, 0x0b, 0xcc},
-       {0xbf, 0xc0, 0x39, 0xcc},
-       {0xbf, 0xc1, 0x04, 0xcc},
-       {0xbf, 0xcc, 0x00, 0xcc},
-       {0xb3, 0x01, 0x41, 0xcc},
-       {0xf0, 0x00, 0x00, 0xbb},
-       {0x05, 0x01, 0x78, 0xbb},
-       {0x06, 0x00, 0x11, 0xbb},
-       {0x07, 0x01, 0x42, 0xbb},
-       {0x08, 0x00, 0x11, 0xbb},
-       {0x20, 0x01, 0x03, 0xbb},
-       {0x21, 0x80, 0x00, 0xbb},
-       {0x22, 0x0d, 0x0f, 0xbb},
-       {0x24, 0x80, 0x00, 0xbb},
-       {0x59, 0x00, 0xff, 0xbb},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x39, 0x03, 0xca, 0xbb},
-       {0x3a, 0x06, 0x80, 0xbb},
-       {0x3b, 0x01, 0x52, 0xbb},
-       {0x3c, 0x05, 0x40, 0xbb},
-       {0x57, 0x01, 0x9c, 0xbb},
-       {0x58, 0x01, 0xee, 0xbb},
-       {0x59, 0x00, 0xf0, 0xbb},
-       {0x5a, 0x01, 0x20, 0xbb},
-       {0x5c, 0x1d, 0x17, 0xbb},
-       {0x5d, 0x22, 0x1c, 0xbb},
-       {0x64, 0x1e, 0x1c, 0xbb},
-       {0x5b, 0x00, 0x00, 0xbb},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x22, 0xa0, 0x78, 0xbb},
-       {0x23, 0xa0, 0x78, 0xbb},
-       {0x24, 0x7f, 0x00, 0xbb},
-       {0x28, 0xea, 0x02, 0xbb},
-       {0x29, 0x86, 0x7a, 0xbb},
-       {0x5e, 0x52, 0x4c, 0xbb},
-       {0x5f, 0x20, 0x24, 0xbb},
-       {0x60, 0x00, 0x02, 0xbb},
-       {0x02, 0x00, 0xee, 0xbb},
-       {0x03, 0x39, 0x23, 0xbb},
-       {0x04, 0x07, 0x24, 0xbb},
-       {0x09, 0x00, 0xc0, 0xbb},
-       {0x0a, 0x00, 0x79, 0xbb},
-       {0x0b, 0x00, 0x04, 0xbb},
-       {0x0c, 0x00, 0x5c, 0xbb},
-       {0x0d, 0x00, 0xd9, 0xbb},
-       {0x0e, 0x00, 0x53, 0xbb},
-       {0x0f, 0x00, 0x21, 0xbb},
-       {0x10, 0x00, 0xa4, 0xbb},
-       {0x11, 0x00, 0xe5, 0xbb},
-       {0x15, 0x00, 0x00, 0xbb},
-       {0x16, 0x00, 0x00, 0xbb},
-       {0x17, 0x00, 0x00, 0xbb},
-       {0x18, 0x00, 0x00, 0xbb},
-       {0x19, 0x00, 0x00, 0xbb},
-       {0x1a, 0x00, 0x00, 0xbb},
-       {0x1b, 0x00, 0x00, 0xbb},
-       {0x1c, 0x00, 0x00, 0xbb},
-       {0x1d, 0x00, 0x00, 0xbb},
-       {0x1e, 0x00, 0x00, 0xbb},
-       {0xf0, 0x00, 0x01, 0xbb},
-       {0x06, 0xe0, 0x0e, 0xbb},
-       {0x06, 0x60, 0x0e, 0xbb},
-       {0xb3, 0x5c, 0x01, 0xcc},
-       {}
-};
 static const u8 mi1320_soc_InitQVGA[][4] = {
        {0xb3, 0x01, 0x01, 0xcc},
        {0xb0, 0x03, 0x19, 0xcc},
@@ -1262,268 +1126,6 @@ static const u8 mi1320_soc_InitQVGA[][4] = {
        {0xb3, 0x5c, 0x01, 0xcc},
        {}
 };
-static const u8 mi1320_soc_InitQVGA_JPG[][4] = {
-       {0xb3, 0x01, 0x01, 0xcc},
-       {0xb0, 0x03, 0x19, 0xcc},
-       {0xb0, 0x04, 0x02, 0xcc},
-       {0x00, 0x00, 0x30, 0xdd},
-       {0xb3, 0x00, 0x64, 0xcc},
-       {0xb3, 0x00, 0x67, 0xcc},
-       {0xb3, 0x05, 0x01, 0xcc},
-       {0xb3, 0x06, 0x01, 0xcc},
-       {0xb3, 0x08, 0x01, 0xcc},
-       {0xb3, 0x09, 0x0c, 0xcc},
-       {0xb3, 0x34, 0x02, 0xcc},
-       {0xb3, 0x35, 0xc8, 0xcc},
-       {0xb3, 0x02, 0x00, 0xcc},
-       {0xb3, 0x03, 0x0a, 0xcc},
-       {0xb3, 0x04, 0x05, 0xcc},
-       {0xb3, 0x20, 0x00, 0xcc},
-       {0xb3, 0x21, 0x00, 0xcc},
-       {0xb3, 0x22, 0x01, 0xcc},
-       {0xb3, 0x23, 0xe0, 0xcc},
-       {0xb3, 0x14, 0x00, 0xcc},
-       {0xb3, 0x15, 0x00, 0xcc},
-       {0xb3, 0x16, 0x02, 0xcc},
-       {0xb3, 0x17, 0x7f, 0xcc},
-       {0xb3, 0x00, 0x67, 0xcc},
-       {0xb8, 0x00, 0x00, 0xcc},
-       {0xbc, 0x00, 0xd1, 0xcc},
-       {0xbc, 0x01, 0x01, 0xcc},
-       {0xb3, 0x5c, 0x01, 0xcc},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x00, 0x00, 0x10, 0xdd},
-       {0xc8, 0x00, 0x00, 0xbb},
-       {0x00, 0x00, 0x30, 0xdd},
-       {0xf0, 0x00, 0x00, 0xbb},
-       {0x00, 0x00, 0x10, 0xdd},
-       {0x07, 0x00, 0xe0, 0xbb},
-       {0x08, 0x00, 0x0b, 0xbb},
-       {0x21, 0x00, 0x0c, 0xbb},
-       {0x20, 0x01, 0x03, 0xbb},
-       {0xb6, 0x00, 0x00, 0xcc},
-       {0xb6, 0x03, 0x01, 0xcc},
-       {0xb6, 0x02, 0x40, 0xcc},
-       {0xb6, 0x05, 0x00, 0xcc},
-       {0xb6, 0x04, 0xf0, 0xcc},
-       {0xb6, 0x12, 0xf8, 0xcc},
-       {0xb6, 0x13, 0x05, 0xcc},
-       {0xb6, 0x18, 0x00, 0xcc},
-       {0xb6, 0x17, 0x96, 0xcc},
-       {0xb6, 0x16, 0x00, 0xcc},
-       {0xb6, 0x22, 0x12, 0xcc},
-       {0xb6, 0x23, 0x0b, 0xcc},
-       {0xbf, 0xc0, 0x39, 0xcc},
-       {0xbf, 0xc1, 0x04, 0xcc},
-       {0xbf, 0xcc, 0x00, 0xcc},
-       {0xbc, 0x02, 0x18, 0xcc},
-       {0xbc, 0x03, 0x50, 0xcc},
-       {0xbc, 0x04, 0x18, 0xcc},
-       {0xbc, 0x05, 0x00, 0xcc},
-       {0xbc, 0x06, 0x00, 0xcc},
-       {0xbc, 0x08, 0x30, 0xcc},
-       {0xbc, 0x09, 0x40, 0xcc},
-       {0xbc, 0x0a, 0x10, 0xcc},
-       {0xbc, 0x0b, 0x00, 0xcc},
-       {0xbc, 0x0c, 0x00, 0xcc},
-       {0xb3, 0x01, 0x41, 0xcc},
-       {0xf0, 0x00, 0x00, 0xbb},
-       {0x05, 0x01, 0x78, 0xbb},
-       {0x06, 0x00, 0x11, 0xbb},
-       {0x07, 0x01, 0x42, 0xbb},
-       {0x08, 0x00, 0x11, 0xbb},
-       {0x20, 0x01, 0x03, 0xbb},
-       {0x21, 0x80, 0x00, 0xbb},
-       {0x22, 0x0d, 0x0f, 0xbb},
-       {0x24, 0x80, 0x00, 0xbb},
-       {0x59, 0x00, 0xff, 0xbb},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x39, 0x03, 0xca, 0xbb},
-       {0x3a, 0x06, 0x80, 0xbb},
-       {0x3b, 0x01, 0x52, 0xbb},
-       {0x3c, 0x05, 0x40, 0xbb},
-       {0x57, 0x01, 0x9c, 0xbb},
-       {0x58, 0x01, 0xee, 0xbb},
-       {0x59, 0x00, 0xf0, 0xbb},
-       {0x5a, 0x01, 0x20, 0xbb},
-       {0x5c, 0x1d, 0x17, 0xbb},
-       {0x5d, 0x22, 0x1c, 0xbb},
-       {0x64, 0x1e, 0x1c, 0xbb},
-       {0x5b, 0x00, 0x00, 0xbb},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x22, 0xa0, 0x78, 0xbb},
-       {0x23, 0xa0, 0x78, 0xbb},
-       {0x24, 0x7f, 0x00, 0xbb},
-       {0x28, 0xea, 0x02, 0xbb},
-       {0x29, 0x86, 0x7a, 0xbb},
-       {0x5e, 0x52, 0x4c, 0xbb},
-       {0x5f, 0x20, 0x24, 0xbb},
-       {0x60, 0x00, 0x02, 0xbb},
-       {0x02, 0x00, 0xee, 0xbb},
-       {0x03, 0x39, 0x23, 0xbb},
-       {0x04, 0x07, 0x24, 0xbb},
-       {0x09, 0x00, 0xc0, 0xbb},
-       {0x0a, 0x00, 0x79, 0xbb},
-       {0x0b, 0x00, 0x04, 0xbb},
-       {0x0c, 0x00, 0x5c, 0xbb},
-       {0x0d, 0x00, 0xd9, 0xbb},
-       {0x0e, 0x00, 0x53, 0xbb},
-       {0x0f, 0x00, 0x21, 0xbb},
-       {0x10, 0x00, 0xa4, 0xbb},
-       {0x11, 0x00, 0xe5, 0xbb},
-       {0x15, 0x00, 0x00, 0xbb},
-       {0x16, 0x00, 0x00, 0xbb},
-       {0x17, 0x00, 0x00, 0xbb},
-       {0x18, 0x00, 0x00, 0xbb},
-       {0x19, 0x00, 0x00, 0xbb},
-       {0x1a, 0x00, 0x00, 0xbb},
-       {0x1b, 0x00, 0x00, 0xbb},
-       {0x1c, 0x00, 0x00, 0xbb},
-       {0x1d, 0x00, 0x00, 0xbb},
-       {0x1e, 0x00, 0x00, 0xbb},
-       {0xf0, 0x00, 0x01, 0xbb},
-       {0x06, 0xe0, 0x0e, 0xbb},
-       {0x06, 0x60, 0x0e, 0xbb},
-       {0xb3, 0x5c, 0x01, 0xcc},
-       {}
-};
-static const u8 mi1320_soc_InitSXGA_JPG[][4] = {
-       {0xb3, 0x01, 0x01, 0xcc},
-       {0xb0, 0x03, 0x19, 0xcc},
-       {0xb0, 0x04, 0x02, 0xcc},
-       {0x00, 0x00, 0x33, 0xdd},
-       {0xb3, 0x00, 0x64, 0xcc},
-       {0xb3, 0x00, 0x67, 0xcc},
-       {0xb3, 0x05, 0x00, 0xcc},
-       {0xb3, 0x06, 0x00, 0xcc},
-       {0xb3, 0x08, 0x01, 0xcc},
-       {0xb3, 0x09, 0x0c, 0xcc},
-       {0xb3, 0x34, 0x02, 0xcc},
-       {0xb3, 0x35, 0xc8, 0xcc},
-       {0xb3, 0x02, 0x00, 0xcc},
-       {0xb3, 0x03, 0x0a, 0xcc},
-       {0xb3, 0x04, 0x05, 0xcc},
-       {0xb3, 0x20, 0x00, 0xcc},
-       {0xb3, 0x21, 0x00, 0xcc},
-       {0xb3, 0x22, 0x04, 0xcc},
-       {0xb3, 0x23, 0x00, 0xcc},
-       {0xb3, 0x14, 0x00, 0xcc},
-       {0xb3, 0x15, 0x00, 0xcc},
-       {0xb3, 0x16, 0x04, 0xcc},
-       {0xb3, 0x17, 0xff, 0xcc},
-       {0xb3, 0x00, 0x67, 0xcc},
-       {0xbc, 0x00, 0x71, 0xcc},
-       {0xbc, 0x01, 0x01, 0xcc},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x00, 0x00, 0x30, 0xdd},
-       {0xc8, 0x9f, 0x0b, 0xbb},
-       {0x00, 0x00, 0x20, 0xdd},
-       {0x5b, 0x00, 0x01, 0xbb},
-       {0x00, 0x00, 0x20, 0xdd},
-       {0xf0, 0x00, 0x00, 0xbb},
-       {0x00, 0x00, 0x30, 0xdd},
-       {0x20, 0x01, 0x03, 0xbb},
-       {0x00, 0x00, 0x20, 0xdd},
-       {0xb6, 0x00, 0x00, 0xcc},
-       {0xb6, 0x03, 0x05, 0xcc},
-       {0xb6, 0x02, 0x00, 0xcc},
-       {0xb6, 0x05, 0x04, 0xcc},
-       {0xb6, 0x04, 0x00, 0xcc},
-       {0xb6, 0x12, 0xf8, 0xcc},
-       {0xb6, 0x13, 0x29, 0xcc},
-       {0xb6, 0x18, 0x0a, 0xcc},
-       {0xb6, 0x17, 0x00, 0xcc},
-       {0xb6, 0x16, 0x00, 0xcc},
-       {0xb6, 0x22, 0x12, 0xcc},
-       {0xb6, 0x23, 0x0b, 0xcc},
-       {0xbf, 0xc0, 0x39, 0xcc},
-       {0xbf, 0xc1, 0x04, 0xcc},
-       {0xbf, 0xcc, 0x00, 0xcc},
-       {0xb3, 0x5c, 0x01, 0xcc},
-       {0xb3, 0x01, 0x41, 0xcc},
-       {0xf0, 0x00, 0x00, 0xbb},
-       {0x05, 0x01, 0x78, 0xbb},
-       {0x06, 0x00, 0x11, 0xbb},
-       {0x07, 0x01, 0x42, 0xbb},
-       {0x08, 0x00, 0x11, 0xbb},
-       {0x20, 0x01, 0x03, 0xbb},
-       {0x21, 0x80, 0x00, 0xbb},
-       {0x22, 0x0d, 0x0f, 0xbb},
-       {0x24, 0x80, 0x00, 0xbb},
-       {0x59, 0x00, 0xff, 0xbb},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x39, 0x03, 0xca, 0xbb},
-       {0x3a, 0x06, 0x80, 0xbb},
-       {0x3b, 0x01, 0x52, 0xbb},
-       {0x3c, 0x05, 0x40, 0xbb},
-       {0x57, 0x01, 0x9c, 0xbb},
-       {0x58, 0x01, 0xee, 0xbb},
-       {0x59, 0x00, 0xf0, 0xbb},
-       {0x5a, 0x01, 0x20, 0xbb},
-       {0x5c, 0x1d, 0x17, 0xbb},
-       {0x5d, 0x22, 0x1c, 0xbb},
-       {0x64, 0x1e, 0x1c, 0xbb},
-       {0x5b, 0x00, 0x00, 0xbb},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x22, 0xa0, 0x78, 0xbb},
-       {0x23, 0xa0, 0x78, 0xbb},
-       {0x24, 0x7f, 0x00, 0xbb},
-       {0x28, 0xea, 0x02, 0xbb},
-       {0x29, 0x86, 0x7a, 0xbb},
-       {0x5e, 0x52, 0x4c, 0xbb},
-       {0x5f, 0x20, 0x24, 0xbb},
-       {0x60, 0x00, 0x02, 0xbb},
-       {0x02, 0x00, 0xee, 0xbb},
-       {0x03, 0x39, 0x23, 0xbb},
-       {0x04, 0x07, 0x24, 0xbb},
-       {0x09, 0x00, 0xc0, 0xbb},
-       {0x0a, 0x00, 0x79, 0xbb},
-       {0x0b, 0x00, 0x04, 0xbb},
-       {0x0c, 0x00, 0x5c, 0xbb},
-       {0x0d, 0x00, 0xd9, 0xbb},
-       {0x0e, 0x00, 0x53, 0xbb},
-       {0x0f, 0x00, 0x21, 0xbb},
-       {0x10, 0x00, 0xa4, 0xbb},
-       {0x11, 0x00, 0xe5, 0xbb},
-       {0x15, 0x00, 0x00, 0xbb},
-       {0x16, 0x00, 0x00, 0xbb},
-       {0x17, 0x00, 0x00, 0xbb},
-       {0x18, 0x00, 0x00, 0xbb},
-       {0x19, 0x00, 0x00, 0xbb},
-       {0x1a, 0x00, 0x00, 0xbb},
-       {0x1b, 0x00, 0x00, 0xbb},
-       {0x1c, 0x00, 0x00, 0xbb},
-       {0x1d, 0x00, 0x00, 0xbb},
-       {0x1e, 0x00, 0x00, 0xbb},
-       {0xf0, 0x00, 0x01, 0xbb},
-       {0x06, 0xe0, 0x0e, 0xbb},
-       {0x06, 0x60, 0x0e, 0xbb},
-       {0xb3, 0x5c, 0x01, 0xcc},
-       {0xf0, 0x00, 0x00, 0xbb},
-       {0x05, 0x01, 0x13, 0xbb},
-       {0x06, 0x00, 0x11, 0xbb},
-       {0x07, 0x00, 0x85, 0xbb},
-       {0x08, 0x00, 0x27, 0xbb},
-       {0x20, 0x01, 0x03, 0xbb},
-       {0x21, 0x80, 0x00, 0xbb},
-       {0x22, 0x0d, 0x0f, 0xbb},
-       {0x24, 0x80, 0x00, 0xbb},
-       {0x59, 0x00, 0xff, 0xbb},
-       {0xf0, 0x00, 0x02, 0xbb},
-       {0x39, 0x03, 0x0d, 0xbb},
-       {0x3a, 0x06, 0x1b, 0xbb},
-       {0x3b, 0x00, 0x95, 0xbb},
-       {0x3c, 0x04, 0xdb, 0xbb},
-       {0x57, 0x02, 0x00, 0xbb},
-       {0x58, 0x02, 0x66, 0xbb},
-       {0x59, 0x00, 0xff, 0xbb},
-       {0x5a, 0x01, 0x33, 0xbb},
-       {0x5c, 0x12, 0x0d, 0xbb},
-       {0x5d, 0x16, 0x11, 0xbb},
-       {0x64, 0x5e, 0x1c, 0xbb},
-       {0x2f, 0x90, 0x00, 0xbb},
-       {}
-};
 static const u8 mi1320_soc_InitSXGA[][4] = {
        {0xb3, 0x01, 0x01, 0xcc},
        {0xb0, 0x03, 0x19, 0xcc},
@@ -3015,11 +2617,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
        int mode;
        static const u8 (*mi1320_soc_init[])[4] = {
                mi1320_soc_InitSXGA,
-               mi1320_soc_InitSXGA_JPG,
                mi1320_soc_InitVGA,
-               mi1320_soc_InitVGA_JPG,
                mi1320_soc_InitQVGA,
-               mi1320_soc_InitQVGA_JPG
        };
 
        /* Assume start use the good resolution from gspca_dev->mode */
index eca8bf9..b0195e8 100644 (file)
@@ -884,12 +884,9 @@ static void ivtv_load_and_init_modules(struct ivtv *itv)
        }
        else if (itv->card->type == IVTV_CARD_GV_MVPRX ||
                 itv->card->type == IVTV_CARD_GV_MVPRX2E) {
-               struct v4l2_crystal_freq crystal_freq;
-
                /* The crystal frequency of GVMVPRX is 24.576MHz */
-               crystal_freq.freq = SAA7115_FREQ_24_576_MHZ;
-               crystal_freq.flags = SAA7115_FREQ_FL_UCGC;
-               v4l2_subdev_call(itv->sd_video, video, s_crystal_freq, &crystal_freq);
+               v4l2_subdev_call(itv->sd_video, video, s_crystal_freq,
+                       SAA7115_FREQ_24_576_MHZ, SAA7115_FREQ_FL_UCGC);
        }
 
        if (hw & IVTV_HW_CX25840) {
@@ -1234,7 +1231,7 @@ int ivtv_init_on_first_open(struct ivtv *itv)
        if (itv->card->hw_all & IVTV_HW_CX25840) {
                struct v4l2_control ctrl;
 
-               v4l2_subdev_call(itv->sd_video, core, init, 0);
+               v4l2_subdev_call(itv->sd_video, core, load_fw);
                /* CX25840_CID_ENABLE_PVR150_WORKAROUND */
                ctrl.id = V4L2_CID_PRIVATE_BASE;
                ctrl.value = itv->pvr150_workaround;
index cfaacf6..e707ef3 100644 (file)
@@ -857,15 +857,12 @@ int ivtv_v4l2_close(struct file *filp)
                /* Mark that the radio is no longer in use */
                clear_bit(IVTV_F_I_RADIO_USER, &itv->i_flags);
                /* Switch tuner to TV */
-               ivtv_call_all(itv, tuner, s_std, itv->std);
+               ivtv_call_all(itv, core, s_std, itv->std);
                /* Select correct audio input (i.e. TV tuner or Line in) */
                ivtv_audio_set_io(itv);
-               if (itv->hw_flags & IVTV_HW_SAA711X)
-               {
-                       struct v4l2_crystal_freq crystal_freq;
-                       crystal_freq.freq = SAA7115_FREQ_32_11_MHZ;
-                       crystal_freq.flags = 0;
-                       ivtv_call_hw(itv, IVTV_HW_SAA711X, video, s_crystal_freq, &crystal_freq);
+               if (itv->hw_flags & IVTV_HW_SAA711X) {
+                       ivtv_call_hw(itv, IVTV_HW_SAA711X, video, s_crystal_freq,
+                                       SAA7115_FREQ_32_11_MHZ, 0);
                }
                if (atomic_read(&itv->capturing) > 0) {
                        /* Undo video mute */
@@ -956,10 +953,8 @@ static int ivtv_serialized_open(struct ivtv_stream *s, struct file *filp)
                /* Select the correct audio input (i.e. radio tuner) */
                ivtv_audio_set_io(itv);
                if (itv->hw_flags & IVTV_HW_SAA711X) {
-                       struct v4l2_crystal_freq crystal_freq;
-                       crystal_freq.freq = SAA7115_FREQ_32_11_MHZ;
-                       crystal_freq.flags = SAA7115_FREQ_FL_APLL;
-                       ivtv_call_hw(itv, IVTV_HW_SAA711X, video, s_crystal_freq, &crystal_freq);
+                       ivtv_call_hw(itv, IVTV_HW_SAA711X, video, s_crystal_freq,
+                               SAA7115_FREQ_32_11_MHZ, SAA7115_FREQ_FL_APLL);
                }
                /* Done! Unmute and continue. */
                ivtv_unmute(itv);
index 3321983..ceb05bd 100644 (file)
@@ -248,15 +248,16 @@ static int subdev_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int subdev_s_audio_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int subdev_s_audio_routing(struct v4l2_subdev *sd,
+                                 u32 input, u32 output, u32 config)
 {
        struct ivtv *itv = sd_to_ivtv(sd);
        u16 mask, data;
 
-       if (route->input > 2)
+       if (input > 2)
                return -EINVAL;
        mask = itv->card->gpio_audio_input.mask;
-       switch (route->input) {
+       switch (input) {
        case 0:
                data = itv->card->gpio_audio_input.tuner;
                break;
@@ -318,17 +319,18 @@ static int subdev_log_status(struct v4l2_subdev *sd)
        return 0;
 }
 
-static int subdev_s_video_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int subdev_s_video_routing(struct v4l2_subdev *sd,
+                                 u32 input, u32 output, u32 config)
 {
        struct ivtv *itv = sd_to_ivtv(sd);
        u16 mask, data;
 
-       if (route->input > 2) /* 0:Tuner 1:Composite 2:S-Video */
+       if (input > 2) /* 0:Tuner 1:Composite 2:S-Video */
                return -EINVAL;
        mask = itv->card->gpio_video_input.mask;
-       if  (route->input == 0)
+       if (input == 0)
                data = itv->card->gpio_video_input.tuner;
-       else if  (route->input == 1)
+       else if (input == 1)
                data = itv->card->gpio_video_input.composite;
        else
                data = itv->card->gpio_video_input.svideo;
@@ -342,10 +344,10 @@ static const struct v4l2_subdev_core_ops subdev_core_ops = {
        .g_ctrl = subdev_g_ctrl,
        .s_ctrl = subdev_s_ctrl,
        .queryctrl = subdev_queryctrl,
+       .s_std = subdev_s_std,
 };
 
 static const struct v4l2_subdev_tuner_ops subdev_tuner_ops = {
-       .s_std = subdev_s_std,
        .s_radio = subdev_s_radio,
        .g_tuner = subdev_g_tuner,
        .s_tuner = subdev_s_tuner,
index e73a196..9e3d32b 100644 (file)
@@ -161,15 +161,18 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
                return -1;
        if (hw == IVTV_HW_TUNER) {
                /* special tuner handling */
-               sd = v4l2_i2c_new_probed_subdev(adap, mod, type,
+               sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
+                               adap, mod, type,
                                itv->card_i2c->radio);
                if (sd)
                        sd->grp_id = 1 << idx;
-               sd = v4l2_i2c_new_probed_subdev(adap, mod, type,
+               sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
+                               adap, mod, type,
                                itv->card_i2c->demod);
                if (sd)
                        sd->grp_id = 1 << idx;
-               sd = v4l2_i2c_new_probed_subdev(adap, mod, type,
+               sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
+                               adap, mod, type,
                                itv->card_i2c->tv);
                if (sd)
                        sd->grp_id = 1 << idx;
@@ -178,11 +181,11 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
        if (!hw_addrs[idx])
                return -1;
        if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) {
-               unsigned short addrs[2] = { hw_addrs[idx], I2C_CLIENT_END };
-
-               sd = v4l2_i2c_new_probed_subdev(adap, mod, type, addrs);
+               sd = v4l2_i2c_new_probed_subdev_addr(&itv->v4l2_dev,
+                               adap, mod, type, hw_addrs[idx]);
        } else {
-               sd = v4l2_i2c_new_subdev(adap, mod, type, hw_addrs[idx]);
+               sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
+                               adap, mod, type, hw_addrs[idx]);
        }
        if (sd)
                sd->grp_id = 1 << idx;
index 9a04242..4a2d464 100644 (file)
@@ -1033,7 +1033,6 @@ static int ivtv_g_output(struct file *file, void *fh, unsigned int *i)
 static int ivtv_s_output(struct file *file, void *fh, unsigned int outp)
 {
        struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv;
-       struct v4l2_routing route;
 
        if (outp >= itv->card->nof_outputs)
                return -EINVAL;
@@ -1046,9 +1045,9 @@ static int ivtv_s_output(struct file *file, void *fh, unsigned int outp)
                   itv->active_output, outp);
 
        itv->active_output = outp;
-       route.input = SAA7127_INPUT_TYPE_NORMAL;
-       route.output = itv->card->video_outputs[outp].video_output;
-       ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_routing, &route);
+       ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_routing,
+                       SAA7127_INPUT_TYPE_NORMAL,
+                       itv->card->video_outputs[outp].video_output, 0);
 
        return 0;
 }
@@ -1121,7 +1120,7 @@ int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std)
        IVTV_DEBUG_INFO("Switching standard to %llx.\n", (unsigned long long)itv->std);
 
        /* Tuner */
-       ivtv_call_all(itv, tuner, s_std, itv->std);
+       ivtv_call_all(itv, core, s_std, itv->std);
 
        if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) {
                /* set display standard */
@@ -1735,13 +1734,6 @@ static long ivtv_default(struct file *file, void *fh, int cmd, void *arg)
        struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv;
 
        switch (cmd) {
-       case VIDIOC_INT_S_AUDIO_ROUTING: {
-               struct v4l2_routing *route = arg;
-
-               ivtv_call_hw(itv, itv->card->hw_audio, audio, s_routing, route);
-               break;
-       }
-
        case VIDIOC_INT_RESET: {
                u32 val = *(u32 *)arg;
 
index 3fd3022..8898c56 100644 (file)
@@ -34,7 +34,7 @@
 void ivtv_audio_set_io(struct ivtv *itv)
 {
        const struct ivtv_card_audio_input *in;
-       struct v4l2_routing route;
+       u32 input, output = 0;
 
        /* Determine which input to use */
        if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags))
@@ -43,73 +43,77 @@ void ivtv_audio_set_io(struct ivtv *itv)
                in = &itv->card->audio_inputs[itv->audio_input];
 
        /* handle muxer chips */
-       route.input = in->muxer_input;
-       route.output = 0;
+       input = in->muxer_input;
        if (itv->card->hw_muxer & IVTV_HW_M52790)
-               route.output = M52790_OUT_STEREO;
-       v4l2_subdev_call(itv->sd_muxer, audio, s_routing, &route);
+               output = M52790_OUT_STEREO;
+       v4l2_subdev_call(itv->sd_muxer, audio, s_routing,
+                       input, output, 0);
 
-       route.input = in->audio_input;
-       route.output = 0;
+       input = in->audio_input;
+       output = 0;
        if (itv->card->hw_audio & IVTV_HW_MSP34XX)
-               route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1);
-       ivtv_call_hw(itv, itv->card->hw_audio, audio, s_routing, &route);
+               output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1);
+       ivtv_call_hw(itv, itv->card->hw_audio, audio, s_routing,
+                       input, output, 0);
 }
 
 /* Selects the video input and output according to the current
    settings. */
 void ivtv_video_set_io(struct ivtv *itv)
 {
-       struct v4l2_routing route;
        int inp = itv->active_input;
+       u32 input;
        u32 type;
 
-       route.input = itv->card->video_inputs[inp].video_input;
-       route.output = 0;
-       v4l2_subdev_call(itv->sd_video, video, s_routing, &route);
+       v4l2_subdev_call(itv->sd_video, video, s_routing,
+               itv->card->video_inputs[inp].video_input, 0, 0);
 
        type = itv->card->video_inputs[inp].video_type;
 
        if (type == IVTV_CARD_INPUT_VID_TUNER) {
-               route.input = 0;  /* Tuner */
+               input = 0;  /* Tuner */
        } else if (type < IVTV_CARD_INPUT_COMPOSITE1) {
-               route.input = 2;  /* S-Video */
+               input = 2;  /* S-Video */
        } else {
-               route.input = 1;  /* Composite */
+               input = 1;  /* Composite */
        }
 
        if (itv->card->hw_video & IVTV_HW_GPIO)
-               ivtv_call_hw(itv, IVTV_HW_GPIO, video, s_routing, &route);
+               ivtv_call_hw(itv, IVTV_HW_GPIO, video, s_routing,
+                               input, 0, 0);
 
        if (itv->card->hw_video & IVTV_HW_UPD64031A) {
                if (type == IVTV_CARD_INPUT_VID_TUNER ||
                    type >= IVTV_CARD_INPUT_COMPOSITE1) {
                        /* Composite: GR on, connect to 3DYCS */
-                       route.input = UPD64031A_GR_ON | UPD64031A_3DYCS_COMPOSITE;
+                       input = UPD64031A_GR_ON | UPD64031A_3DYCS_COMPOSITE;
                } else {
                        /* S-Video: GR bypassed, turn it off */
-                       route.input = UPD64031A_GR_OFF | UPD64031A_3DYCS_DISABLE;
+                       input = UPD64031A_GR_OFF | UPD64031A_3DYCS_DISABLE;
                }
-               route.input |= itv->card->gr_config;
+               input |= itv->card->gr_config;
 
-               ivtv_call_hw(itv, IVTV_HW_UPD64031A, video, s_routing, &route);
+               ivtv_call_hw(itv, IVTV_HW_UPD64031A, video, s_routing,
+                               input, 0, 0);
        }
 
        if (itv->card->hw_video & IVTV_HW_UPD6408X) {
-               route.input = UPD64083_YCS_MODE;
+               input = UPD64083_YCS_MODE;
                if (type > IVTV_CARD_INPUT_VID_TUNER &&
                    type < IVTV_CARD_INPUT_COMPOSITE1) {
-                       /* S-Video uses YCNR mode and internal Y-ADC, the upd64031a
-                          is not used. */
-                       route.input |= UPD64083_YCNR_MODE;
+                       /* S-Video uses YCNR mode and internal Y-ADC, the
+                          upd64031a is not used. */
+                       input |= UPD64083_YCNR_MODE;
                }
                else if (itv->card->hw_video & IVTV_HW_UPD64031A) {
-                 /* Use upd64031a output for tuner and composite(CX23416GYC only) inputs */
-                 if ((type == IVTV_CARD_INPUT_VID_TUNER)||
-                     (itv->card->type == IVTV_CARD_CX23416GYC)) {
-                   route.input |= UPD64083_EXT_Y_ADC;
-                 }
+                       /* Use upd64031a output for tuner and
+                          composite(CX23416GYC only) inputs */
+                       if (type == IVTV_CARD_INPUT_VID_TUNER ||
+                           itv->card->type == IVTV_CARD_CX23416GYC) {
+                               input |= UPD64083_EXT_Y_ADC;
+                       }
                }
-               ivtv_call_hw(itv, IVTV_HW_UPD6408X, video, s_routing, &route);
+               ivtv_call_hw(itv, IVTV_HW_UPD6408X, video, s_routing,
+                               input, 0, 0);
        }
 }
index 841024b..fab8e02 100644 (file)
@@ -409,11 +409,12 @@ static void ks0127_init(struct v4l2_subdev *sd)
        }
 }
 
-static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int ks0127_s_routing(struct v4l2_subdev *sd,
+                           u32 input, u32 output, u32 config)
 {
        struct ks0127 *ks = to_ks0127(sd);
 
-       switch (route->input) {
+       switch (input) {
        case KS_INPUT_COMPOSITE_1:
        case KS_INPUT_COMPOSITE_2:
        case KS_INPUT_COMPOSITE_3:
@@ -421,13 +422,13 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
        case KS_INPUT_COMPOSITE_5:
        case KS_INPUT_COMPOSITE_6:
                v4l2_dbg(1, debug, sd,
-                       "s_routing %d: Composite\n", route->input);
+                       "s_routing %d: Composite\n", input);
                /* autodetect 50/60 Hz */
                ks0127_and_or(sd, KS_CMDA,   0xfc, 0x00);
                /* VSE=0 */
                ks0127_and_or(sd, KS_CMDA,   ~0x40, 0x00);
                /* set input line */
-               ks0127_and_or(sd, KS_CMDB,   0xb0, route->input);
+               ks0127_and_or(sd, KS_CMDB,   0xb0, input);
                /* non-freerunning mode */
                ks0127_and_or(sd, KS_CMDC,   0x70, 0x0a);
                /* analog input */
@@ -455,13 +456,13 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
        case KS_INPUT_SVIDEO_2:
        case KS_INPUT_SVIDEO_3:
                v4l2_dbg(1, debug, sd,
-                       "s_routing %d: S-Video\n", route->input);
+                       "s_routing %d: S-Video\n", input);
                /* autodetect 50/60 Hz */
                ks0127_and_or(sd, KS_CMDA,   0xfc, 0x00);
                /* VSE=0 */
                ks0127_and_or(sd, KS_CMDA,   ~0x40, 0x00);
                /* set input line */
-               ks0127_and_or(sd, KS_CMDB,   0xb0, route->input);
+               ks0127_and_or(sd, KS_CMDB,   0xb0, input);
                /* non-freerunning mode */
                ks0127_and_or(sd, KS_CMDC,   0x70, 0x0a);
                /* analog input */
@@ -496,7 +497,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
 
                ks0127_and_or(sd, KS_CMDA,   0xff, 0x40); /* VSE=1 */
                /* set input line and VALIGN */
-               ks0127_and_or(sd, KS_CMDB,   0xb0, (route->input | 0x40));
+               ks0127_and_or(sd, KS_CMDB,   0xb0, (input | 0x40));
                /* freerunning mode, */
                /* TSTGEN = 1 TSTGFR=11 TSTGPH=0 TSTGPK=0  VMEM=1*/
                ks0127_and_or(sd, KS_CMDC,   0x70, 0x87);
@@ -531,7 +532,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
 
        default:
                v4l2_dbg(1, debug, sd,
-                       "s_routing: Unknown input %d\n", route->input);
+                       "s_routing: Unknown input %d\n", input);
                break;
        }
 
@@ -648,9 +649,6 @@ static int ks0127_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_iden
 
 static const struct v4l2_subdev_core_ops ks0127_core_ops = {
        .g_chip_ident = ks0127_g_chip_ident,
-};
-
-static const struct v4l2_subdev_tuner_ops ks0127_tuner_ops = {
        .s_std = ks0127_s_std,
 };
 
@@ -663,7 +661,6 @@ static const struct v4l2_subdev_video_ops ks0127_video_ops = {
 
 static const struct v4l2_subdev_ops ks0127_ops = {
        .core = &ks0127_core_ops,
-       .tuner = &ks0127_tuner_ops,
        .video = &ks0127_video_ops,
 };
 
index 1f340fe..d7317e7 100644 (file)
@@ -69,12 +69,13 @@ static int m52790_write(struct v4l2_subdev *sd)
    part of the audio output routing. The normal case is that another
    chip takes care of the actual muting so making it part of the
    output routing seems to be the right thing to do for now. */
-static int m52790_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int m52790_s_routing(struct v4l2_subdev *sd,
+                           u32 input, u32 output, u32 config)
 {
        struct m52790_state *state = to_state(sd);
 
-       state->input = route->input;
-       state->output = route->output;
+       state->input = input;
+       state->output = output;
        m52790_write(sd);
        return 0;
 }
index 2ad11f0..1d66855 100644 (file)
@@ -117,7 +117,7 @@ static int ptable_alloc(void)
        memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
 
        /* give only 32 bit DMA addresses */
-       if (dma_set_mask(&meye.mchip_dev->dev, DMA_32BIT_MASK))
+       if (dma_set_mask(&meye.mchip_dev->dev, DMA_BIT_MASK(32)))
                return -1;
 
        meye.mchip_ptable_toc = dma_alloc_coherent(&meye.mchip_dev->dev,
index 9e8e06c..e9df3cb 100644 (file)
@@ -56,7 +56,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include <media/msp3400.h>
 #include <media/tvaudio.h>
 #include "msp3400-driver.h"
@@ -108,10 +108,6 @@ MODULE_PARM_DESC(dolby, "Activates Dolby processsing");
 /* DSP unit subaddress */
 #define I2C_MSP_DSP     0x12
 
-/* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END };
-
-I2C_CLIENT_INSMOD;
 
 /* ----------------------------------------------------------------------- */
 /* functions for talking to the MSP3400C Sound processor                   */
@@ -509,25 +505,26 @@ static int msp_s_std(struct v4l2_subdev *sd, v4l2_std_id id)
        return 0;
 }
 
-static int msp_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *rt)
+static int msp_s_routing(struct v4l2_subdev *sd,
+                        u32 input, u32 output, u32 config)
 {
        struct msp_state *state = to_state(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
-       int tuner = (rt->input >> 3) & 1;
-       int sc_in = rt->input & 0x7;
-       int sc1_out = rt->output & 0xf;
-       int sc2_out = (rt->output >> 4) & 0xf;
+       int tuner = (input >> 3) & 1;
+       int sc_in = input & 0x7;
+       int sc1_out = output & 0xf;
+       int sc2_out = (output >> 4) & 0xf;
        u16 val, reg;
        int i;
        int extern_input = 1;
 
-       if (state->routing.input == rt->input &&
-                       state->routing.output == rt->output)
+       if (state->route_in == input && state->route_out == output)
                return 0;
-       state->routing = *rt;
+       state->route_in = input;
+       state->route_out = output;
        /* check if the tuner input is used */
        for (i = 0; i < 5; i++) {
-               if (((rt->input >> (4 + i * 4)) & 0xf) == 0)
+               if (((input >> (4 + i * 4)) & 0xf) == 0)
                        extern_input = 0;
        }
        state->mode = extern_input ? MSP_MODE_EXTERN : MSP_MODE_AM_DETECT;
@@ -677,7 +674,7 @@ static int msp_log_status(struct v4l2_subdev *sd)
        }
        v4l_info(client, "Audmode:  0x%04x\n", state->audmode);
        v4l_info(client, "Routing:  0x%08x (input) 0x%08x (output)\n",
-                       state->routing.input, state->routing.output);
+                       state->route_in, state->route_out);
        v4l_info(client, "ACB:      0x%04x\n", state->acb);
        return 0;
 }
@@ -696,11 +693,6 @@ static int msp_resume(struct i2c_client *client)
        return 0;
 }
 
-static int msp_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops msp_core_ops = {
@@ -709,6 +701,7 @@ static const struct v4l2_subdev_core_ops msp_core_ops = {
        .g_ctrl = msp_g_ctrl,
        .s_ctrl = msp_s_ctrl,
        .queryctrl = msp_queryctrl,
+       .s_std = msp_s_std,
 };
 
 static const struct v4l2_subdev_tuner_ops msp_tuner_ops = {
@@ -716,7 +709,6 @@ static const struct v4l2_subdev_tuner_ops msp_tuner_ops = {
        .g_tuner = msp_g_tuner,
        .s_tuner = msp_s_tuner,
        .s_radio = msp_s_radio,
-       .s_std = msp_s_std,
 };
 
 static const struct v4l2_subdev_audio_ops msp_audio_ops = {
@@ -770,8 +762,8 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id)
        state->i2s_mode = 0;
        init_waitqueue_head(&state->wq);
        /* These are the reset input/output positions */
-       state->routing.input = MSP_INPUT_DEFAULT;
-       state->routing.output = MSP_OUTPUT_DEFAULT;
+       state->route_in = MSP_INPUT_DEFAULT;
+       state->route_out = MSP_OUTPUT_DEFAULT;
 
        state->rev1 = msp_read_dsp(client, 0x1e);
        if (state->rev1 != -1)
@@ -925,8 +917,6 @@ MODULE_DEVICE_TABLE(i2c, msp_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "msp3400",
-       .driverid = I2C_DRIVERID_MSP3400,
-       .command = msp_command,
        .probe = msp_probe,
        .remove = msp_remove,
        .suspend = msp_suspend,
index 3fe1c1b..d6b3e6d 100644 (file)
@@ -80,7 +80,8 @@ struct msp_state {
        int i2s_mode;
        int main, second;       /* sound carrier */
        int input;
-       struct v4l2_routing routing;
+       u32 route_in;
+       u32 route_out;
 
        /* v4l2 */
        int audmode;
index a655e9c..168bca7 100644 (file)
@@ -188,7 +188,7 @@ void msp3400c_set_mode(struct i2c_client *client, int mode)
 {
        struct msp_state *state = to_state(i2c_get_clientdata(client));
        struct msp3400c_init_data_dem *data = &msp3400c_init_data[mode];
-       int tuner = (state->routing.input >> 3) & 1;
+       int tuner = (state->route_in >> 3) & 1;
        int i;
 
        v4l_dbg(1, msp_debug, client, "set_mode: %d\n", mode);
@@ -896,7 +896,7 @@ static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
 static void msp34xxg_set_sources(struct i2c_client *client)
 {
        struct msp_state *state = to_state(i2c_get_clientdata(client));
-       u32 in = state->routing.input;
+       u32 in = state->route_in;
 
        msp34xxg_set_source(client, 0x0008, (in >> 4) & 0xf);
        /* quasi-peak detector is set to same input as the loudspeaker (MAIN) */
@@ -912,7 +912,7 @@ static void msp34xxg_set_sources(struct i2c_client *client)
 static void msp34xxg_reset(struct i2c_client *client)
 {
        struct msp_state *state = to_state(i2c_get_clientdata(client));
-       int tuner = (state->routing.input >> 3) & 1;
+       int tuner = (state->route_in >> 3) & 1;
        int modus;
 
        /* initialize std to 1 (autodetect) to signal that no standard is
index fa7e509..684f62f 100644 (file)
@@ -207,7 +207,7 @@ static unsigned long mt9m001_query_bus_param(struct soc_camera_device *icd)
        struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd);
        struct soc_camera_link *icl = mt9m001->client->dev.platform_data;
        /* MT9M001 has all capture_format parameters fixed */
-       unsigned long flags = SOCAM_PCLK_SAMPLE_RISING |
+       unsigned long flags = SOCAM_PCLK_SAMPLE_FALLING |
                SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH |
                SOCAM_DATA_ACTIVE_HIGH | SOCAM_MASTER;
 
index 23f9ce9..2b0927b 100644 (file)
@@ -141,8 +141,19 @@ static int get_shutter(struct soc_camera_device *icd, u32 *data)
 
 static int mt9t031_init(struct soc_camera_device *icd)
 {
+       struct mt9t031 *mt9t031 = container_of(icd, struct mt9t031, icd);
+       struct soc_camera_link *icl = mt9t031->client->dev.platform_data;
        int ret;
 
+       if (icl->power) {
+               ret = icl->power(&mt9t031->client->dev, 1);
+               if (ret < 0) {
+                       dev_err(icd->vdev->parent,
+                               "Platform failed to power-on the camera.\n");
+                       return ret;
+               }
+       }
+
        /* Disable chip output, synchronous option update */
        ret = reg_write(icd, MT9T031_RESET, 1);
        if (ret >= 0)
@@ -150,13 +161,23 @@ static int mt9t031_init(struct soc_camera_device *icd)
        if (ret >= 0)
                ret = reg_clear(icd, MT9T031_OUTPUT_CONTROL, 2);
 
+       if (ret < 0 && icl->power)
+               icl->power(&mt9t031->client->dev, 0);
+
        return ret >= 0 ? 0 : -EIO;
 }
 
 static int mt9t031_release(struct soc_camera_device *icd)
 {
+       struct mt9t031 *mt9t031 = container_of(icd, struct mt9t031, icd);
+       struct soc_camera_link *icl = mt9t031->client->dev.platform_data;
+
        /* Disable the chip */
        reg_clear(icd, MT9T031_OUTPUT_CONTROL, 2);
+
+       if (icl->power)
+               icl->power(&mt9t031->client->dev, 0);
+
        return 0;
 }
 
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c
new file mode 100644 (file)
index 0000000..86fab56
--- /dev/null
@@ -0,0 +1,827 @@
+/*
+ * V4L2 Driver for i.MXL/i.MXL camera (CSI) host
+ *
+ * Copyright (C) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+ * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
+ *
+ * Based on PXA SoC camera driver
+ * Copyright (C) 2006, Sascha Hauer, Pengutronix
+ * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/dma-mapping.h>
+#include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
+#include <linux/time.h>
+#include <linux/version.h>
+#include <linux/videodev2.h>
+
+#include <media/soc_camera.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-dev.h>
+#include <media/videobuf-dma-contig.h>
+
+#include <asm/dma.h>
+#include <asm/fiq.h>
+#include <mach/dma-mx1-mx2.h>
+#include <mach/hardware.h>
+#include <mach/mx1_camera.h>
+
+/*
+ * CSI registers
+ */
+#define DMA_CCR(x)     (0x8c + ((x) << 6))     /* Control Registers */
+#define DMA_DIMR       0x08                    /* Interrupt mask Register */
+#define CSICR1         0x00                    /* CSI Control Register 1 */
+#define CSISR          0x08                    /* CSI Status Register */
+#define CSIRXR         0x10                    /* CSI RxFIFO Register */
+
+#define CSICR1_RXFF_LEVEL(x)   (((x) & 0x3) << 19)
+#define CSICR1_SOF_POL         (1 << 17)
+#define CSICR1_SOF_INTEN       (1 << 16)
+#define CSICR1_MCLKDIV(x)      (((x) & 0xf) << 12)
+#define CSICR1_MCLKEN          (1 << 9)
+#define CSICR1_FCC             (1 << 8)
+#define CSICR1_BIG_ENDIAN      (1 << 7)
+#define CSICR1_CLR_RXFIFO      (1 << 5)
+#define CSICR1_GCLK_MODE       (1 << 4)
+#define CSICR1_DATA_POL                (1 << 2)
+#define CSICR1_REDGE           (1 << 1)
+#define CSICR1_EN              (1 << 0)
+
+#define CSISR_SFF_OR_INT       (1 << 25)
+#define CSISR_RFF_OR_INT       (1 << 24)
+#define CSISR_STATFF_INT       (1 << 21)
+#define CSISR_RXFF_INT         (1 << 18)
+#define CSISR_SOF_INT          (1 << 16)
+#define CSISR_DRDY             (1 << 0)
+
+#define VERSION_CODE KERNEL_VERSION(0, 0, 1)
+#define DRIVER_NAME "mx1-camera"
+
+#define CSI_IRQ_MASK   (CSISR_SFF_OR_INT | CSISR_RFF_OR_INT | \
+                       CSISR_STATFF_INT | CSISR_RXFF_INT | CSISR_SOF_INT)
+
+#define CSI_BUS_FLAGS  (SOCAM_MASTER | SOCAM_HSYNC_ACTIVE_HIGH | \
+                       SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW | \
+                       SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING | \
+                       SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW | \
+                       SOCAM_DATAWIDTH_8)
+
+#define MAX_VIDEO_MEM 16       /* Video memory limit in megabytes */
+
+/*
+ * Structures
+ */
+
+/* buffer for one video frame */
+struct mx1_buffer {
+       /* common v4l buffer stuff -- must be first */
+       struct videobuf_buffer vb;
+       const struct soc_camera_data_format *fmt;
+       int inwork;
+};
+
+/* i.MX1/i.MXL is only supposed to handle one camera on its Camera Sensor
+ * Interface. If anyone ever builds hardware to enable more than
+ * one camera, they will have to modify this driver too */
+struct mx1_camera_dev {
+       struct soc_camera_device        *icd;
+       struct mx1_camera_pdata         *pdata;
+       struct mx1_buffer               *active;
+       struct device                   *dev;
+       struct resource                 *res;
+       struct clk                      *clk;
+       struct list_head                capture;
+
+       void __iomem                    *base;
+       int                             dma_chan;
+       unsigned int                    irq;
+       unsigned long                   mclk;
+
+       spinlock_t                      lock;
+};
+
+/*
+ *  Videobuf operations
+ */
+static int mx1_videobuf_setup(struct videobuf_queue *vq, unsigned int *count,
+                             unsigned int *size)
+{
+       struct soc_camera_device *icd = vq->priv_data;
+
+       *size = icd->width * icd->height *
+               ((icd->current_fmt->depth + 7) >> 3);
+
+       if (!*count)
+               *count = 32;
+
+       while (*size * *count > MAX_VIDEO_MEM * 1024 * 1024)
+               (*count)--;
+
+       dev_dbg(&icd->dev, "count=%d, size=%d\n", *count, *size);
+
+       return 0;
+}
+
+static void free_buffer(struct videobuf_queue *vq, struct mx1_buffer *buf)
+{
+       struct soc_camera_device *icd = vq->priv_data;
+       struct videobuf_buffer *vb = &buf->vb;
+
+       BUG_ON(in_interrupt());
+
+       dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+               vb, vb->baddr, vb->bsize);
+
+       /* This waits until this buffer is out of danger, i.e., until it is no
+        * longer in STATE_QUEUED or STATE_ACTIVE */
+       videobuf_waiton(vb, 0, 0);
+       videobuf_dma_contig_free(vq, vb);
+
+       vb->state = VIDEOBUF_NEEDS_INIT;
+}
+
+static int mx1_videobuf_prepare(struct videobuf_queue *vq,
+               struct videobuf_buffer *vb, enum v4l2_field field)
+{
+       struct soc_camera_device *icd = vq->priv_data;
+       struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
+       int ret;
+
+       dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+               vb, vb->baddr, vb->bsize);
+
+       /* Added list head initialization on alloc */
+       WARN_ON(!list_empty(&vb->queue));
+
+       BUG_ON(NULL == icd->current_fmt);
+
+       /* I think, in buf_prepare you only have to protect global data,
+        * the actual buffer is yours */
+       buf->inwork = 1;
+
+       if (buf->fmt    != icd->current_fmt ||
+           vb->width   != icd->width ||
+           vb->height  != icd->height ||
+           vb->field   != field) {
+               buf->fmt        = icd->current_fmt;
+               vb->width       = icd->width;
+               vb->height      = icd->height;
+               vb->field       = field;
+               vb->state       = VIDEOBUF_NEEDS_INIT;
+       }
+
+       vb->size = vb->width * vb->height * ((buf->fmt->depth + 7) >> 3);
+       if (0 != vb->baddr && vb->bsize < vb->size) {
+               ret = -EINVAL;
+               goto out;
+       }
+
+       if (vb->state == VIDEOBUF_NEEDS_INIT) {
+               ret = videobuf_iolock(vq, vb, NULL);
+               if (ret)
+                       goto fail;
+
+               vb->state = VIDEOBUF_PREPARED;
+       }
+
+       buf->inwork = 0;
+
+       return 0;
+
+fail:
+       free_buffer(vq, buf);
+out:
+       buf->inwork = 0;
+       return ret;
+}
+
+static int mx1_camera_setup_dma(struct mx1_camera_dev *pcdev)
+{
+       struct videobuf_buffer *vbuf = &pcdev->active->vb;
+       int ret;
+
+       if (unlikely(!pcdev->active)) {
+               dev_err(pcdev->dev, "DMA End IRQ with no active buffer\n");
+               return -EFAULT;
+       }
+
+       /* setup sg list for future DMA */
+       ret = imx_dma_setup_single(pcdev->dma_chan,
+               videobuf_to_dma_contig(vbuf),
+               vbuf->size, pcdev->res->start +
+               CSIRXR, DMA_MODE_READ);
+       if (unlikely(ret))
+               dev_err(pcdev->dev, "Failed to setup DMA sg list\n");
+
+       return ret;
+}
+
+static void mx1_videobuf_queue(struct videobuf_queue *vq,
+                                               struct videobuf_buffer *vb)
+{
+       struct soc_camera_device *icd = vq->priv_data;
+       struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+       struct mx1_camera_dev *pcdev = ici->priv;
+       struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
+       unsigned long flags;
+
+       dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+               vb, vb->baddr, vb->bsize);
+
+       spin_lock_irqsave(&pcdev->lock, flags);
+
+       list_add_tail(&vb->queue, &pcdev->capture);
+
+       vb->state = VIDEOBUF_ACTIVE;
+
+       if (!pcdev->active) {
+               pcdev->active = buf;
+
+               /* setup sg list for future DMA */
+               if (!mx1_camera_setup_dma(pcdev)) {
+                       unsigned int temp;
+                       /* enable SOF irq */
+                       temp = __raw_readl(pcdev->base + CSICR1) |
+                                                       CSICR1_SOF_INTEN;
+                       __raw_writel(temp, pcdev->base + CSICR1);
+               }
+       }
+
+       spin_unlock_irqrestore(&pcdev->lock, flags);
+}
+
+static void mx1_videobuf_release(struct videobuf_queue *vq,
+                                struct videobuf_buffer *vb)
+{
+       struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
+#ifdef DEBUG
+       struct soc_camera_device *icd = vq->priv_data;
+
+       dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+               vb, vb->baddr, vb->bsize);
+
+       switch (vb->state) {
+       case VIDEOBUF_ACTIVE:
+               dev_dbg(&icd->dev, "%s (active)\n", __func__);
+               break;
+       case VIDEOBUF_QUEUED:
+               dev_dbg(&icd->dev, "%s (queued)\n", __func__);
+               break;
+       case VIDEOBUF_PREPARED:
+               dev_dbg(&icd->dev, "%s (prepared)\n", __func__);
+               break;
+       default:
+               dev_dbg(&icd->dev, "%s (unknown)\n", __func__);
+               break;
+       }
+#endif
+
+       free_buffer(vq, buf);
+}
+
+static void mx1_camera_wakeup(struct mx1_camera_dev *pcdev,
+                             struct videobuf_buffer *vb,
+                             struct mx1_buffer *buf)
+{
+       /* _init is used to debug races, see comment in mx1_camera_reqbufs() */
+       list_del_init(&vb->queue);
+       vb->state = VIDEOBUF_DONE;
+       do_gettimeofday(&vb->ts);
+       vb->field_count++;
+       wake_up(&vb->done);
+
+       if (list_empty(&pcdev->capture)) {
+               pcdev->active = NULL;
+               return;
+       }
+
+       pcdev->active = list_entry(pcdev->capture.next,
+                                  struct mx1_buffer, vb.queue);
+
+       /* setup sg list for future DMA */
+       if (likely(!mx1_camera_setup_dma(pcdev))) {
+               unsigned int temp;
+
+               /* enable SOF irq */
+               temp = __raw_readl(pcdev->base + CSICR1) | CSICR1_SOF_INTEN;
+               __raw_writel(temp, pcdev->base + CSICR1);
+       }
+}
+
+static void mx1_camera_dma_irq(int channel, void *data)
+{
+       struct mx1_camera_dev *pcdev = data;
+       struct mx1_buffer *buf;
+       struct videobuf_buffer *vb;
+       unsigned long flags;
+
+       spin_lock_irqsave(&pcdev->lock, flags);
+
+       imx_dma_disable(channel);
+
+       if (unlikely(!pcdev->active)) {
+               dev_err(pcdev->dev, "DMA End IRQ with no active buffer\n");
+               goto out;
+       }
+
+       vb = &pcdev->active->vb;
+       buf = container_of(vb, struct mx1_buffer, vb);
+       WARN_ON(buf->inwork || list_empty(&vb->queue));
+       dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
+               vb, vb->baddr, vb->bsize);
+
+       mx1_camera_wakeup(pcdev, vb, buf);
+out:
+       spin_unlock_irqrestore(&pcdev->lock, flags);
+}
+
+static struct videobuf_queue_ops mx1_videobuf_ops = {
+       .buf_setup      = mx1_videobuf_setup,
+       .buf_prepare    = mx1_videobuf_prepare,
+       .buf_queue      = mx1_videobuf_queue,
+       .buf_release    = mx1_videobuf_release,
+};
+
+static void mx1_camera_init_videobuf(struct videobuf_queue *q,
+                                    struct soc_camera_device *icd)
+{
+       struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+       struct mx1_camera_dev *pcdev = ici->priv;
+
+       videobuf_queue_dma_contig_init(q, &mx1_videobuf_ops, pcdev->dev,
+                                       &pcdev->lock,
+                                       V4L2_BUF_TYPE_VIDEO_CAPTURE,
+                                       V4L2_FIELD_NONE,
+                                       sizeof(struct mx1_buffer), icd);
+}
+
+static int mclk_get_divisor(struct mx1_camera_dev *pcdev)
+{
+       unsigned int mclk = pcdev->mclk;
+       unsigned long div;
+       unsigned long lcdclk;
+
+       lcdclk = clk_get_rate(pcdev->clk);
+
+       /* We verify platform_mclk_10khz != 0, so if anyone breaks it, here
+        * they get a nice Oops */
+       div = (lcdclk + 2 * mclk - 1) / (2 * mclk) - 1;
+
+       dev_dbg(pcdev->dev, "System clock %lukHz, target freq %dkHz, "
+               "divisor %lu\n", lcdclk / 1000, mclk / 1000, div);
+
+       return div;
+}
+
+static void mx1_camera_activate(struct mx1_camera_dev *pcdev)
+{
+       unsigned int csicr1 = CSICR1_EN;
+
+       dev_dbg(pcdev->dev, "Activate device\n");
+
+       clk_enable(pcdev->clk);
+
+       /* enable CSI before doing anything else */
+       __raw_writel(csicr1, pcdev->base + CSICR1);
+
+       csicr1 |= CSICR1_MCLKEN | CSICR1_FCC | CSICR1_GCLK_MODE;
+       csicr1 |= CSICR1_MCLKDIV(mclk_get_divisor(pcdev));
+       csicr1 |= CSICR1_RXFF_LEVEL(2); /* 16 words */
+
+       __raw_writel(csicr1, pcdev->base + CSICR1);
+}
+
+static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev)
+{
+       dev_dbg(pcdev->dev, "Deactivate device\n");
+
+       /* Disable all CSI interface */
+       __raw_writel(0x00, pcdev->base + CSICR1);
+
+       clk_disable(pcdev->clk);
+}
+
+/* The following two functions absolutely depend on the fact, that
+ * there can be only one camera on i.MX1/i.MXL camera sensor interface */
+static int mx1_camera_add_device(struct soc_camera_device *icd)
+{
+       struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+       struct mx1_camera_dev *pcdev = ici->priv;
+       int ret;
+
+       if (pcdev->icd) {
+               ret = -EBUSY;
+               goto ebusy;
+       }
+
+       dev_info(&icd->dev, "MX1 Camera driver attached to camera %d\n",
+                icd->devnum);
+
+       mx1_camera_activate(pcdev);
+       ret = icd->ops->init(icd);
+
+       if (!ret)
+               pcdev->icd = icd;
+
+ebusy:
+       return ret;
+}
+
+static void mx1_camera_remove_device(struct soc_camera_device *icd)
+{
+       struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+       struct mx1_camera_dev *pcdev = ici->priv;
+       unsigned int csicr1;
+
+       BUG_ON(icd != pcdev->icd);
+
+       /* disable interrupts */
+       csicr1 = __raw_readl(pcdev->base + CSICR1) & ~CSI_IRQ_MASK;
+       __raw_writel(csicr1, pcdev->base + CSICR1);
+
+       /* Stop DMA engine */
+       imx_dma_disable(pcdev->dma_chan);
+
+       dev_info(&icd->dev, "MX1 Camera driver detached from camera %d\n",
+                icd->devnum);
+
+       icd->ops->release(icd);
+
+       mx1_camera_deactivate(pcdev);
+
+       pcdev->icd = NULL;
+}
+
+static int mx1_camera_set_crop(struct soc_camera_device *icd,
+                              struct v4l2_rect *rect)
+{
+       return icd->ops->set_crop(icd, rect);
+}
+
+static int mx1_camera_set_bus_param(struct soc_camera_device *icd, __u32 pixfmt)
+{
+       struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+       struct mx1_camera_dev *pcdev = ici->priv;
+       unsigned long camera_flags, common_flags;
+       unsigned int csicr1;
+       int ret;
+
+       camera_flags = icd->ops->query_bus_param(icd);
+
+       /* MX1 supports only 8bit buswidth */
+       common_flags = soc_camera_bus_param_compatible(camera_flags,
+                                                              CSI_BUS_FLAGS);
+       if (!common_flags)
+               return -EINVAL;
+
+       icd->buswidth = 8;
+
+       /* Make choises, based on platform choice */
+       if ((common_flags & SOCAM_VSYNC_ACTIVE_HIGH) &&
+               (common_flags & SOCAM_VSYNC_ACTIVE_LOW)) {
+                       if (!pcdev->pdata ||
+                            pcdev->pdata->flags & MX1_CAMERA_VSYNC_HIGH)
+                               common_flags &= ~SOCAM_VSYNC_ACTIVE_LOW;
+                       else
+                               common_flags &= ~SOCAM_VSYNC_ACTIVE_HIGH;
+       }
+
+       if ((common_flags & SOCAM_PCLK_SAMPLE_RISING) &&
+               (common_flags & SOCAM_PCLK_SAMPLE_FALLING)) {
+                       if (!pcdev->pdata ||
+                            pcdev->pdata->flags & MX1_CAMERA_PCLK_RISING)
+                               common_flags &= ~SOCAM_PCLK_SAMPLE_FALLING;
+                       else
+                               common_flags &= ~SOCAM_PCLK_SAMPLE_RISING;
+       }
+
+       if ((common_flags & SOCAM_DATA_ACTIVE_HIGH) &&
+               (common_flags & SOCAM_DATA_ACTIVE_LOW)) {
+                       if (!pcdev->pdata ||
+                            pcdev->pdata->flags & MX1_CAMERA_DATA_HIGH)
+                               common_flags &= ~SOCAM_DATA_ACTIVE_LOW;
+                       else
+                               common_flags &= ~SOCAM_DATA_ACTIVE_HIGH;
+       }
+
+       ret = icd->ops->set_bus_param(icd, common_flags);
+       if (ret < 0)
+               return ret;
+
+       csicr1 = __raw_readl(pcdev->base + CSICR1);
+
+       if (common_flags & SOCAM_PCLK_SAMPLE_RISING)
+               csicr1 |= CSICR1_REDGE;
+       if (common_flags & SOCAM_VSYNC_ACTIVE_HIGH)
+               csicr1 |= CSICR1_SOF_POL;
+       if (common_flags & SOCAM_DATA_ACTIVE_LOW)
+               csicr1 |= CSICR1_DATA_POL;
+
+       __raw_writel(csicr1, pcdev->base + CSICR1);
+
+       return 0;
+}
+
+static int mx1_camera_set_fmt(struct soc_camera_device *icd,
+                             struct v4l2_format *f)
+{
+       struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
+       const struct soc_camera_format_xlate *xlate;
+       struct v4l2_pix_format *pix = &f->fmt.pix;
+       int ret;
+
+       xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat);
+       if (!xlate) {
+               dev_warn(&ici->dev, "Format %x not found\n", pix->pixelformat);
+               return -EINVAL;
+       }
+
+       ret = icd->ops->set_fmt(icd, f);
+       if (!ret) {
+               icd->buswidth = xlate->buswidth;
+               icd->current_fmt = xlate->host_fmt;
+       }
+
+       return ret;
+}
+
+static int mx1_camera_try_fmt(struct soc_camera_device *icd,
+                             struct v4l2_format *f)
+{
+       /* TODO: limit to mx1 hardware capabilities */
+
+       /* limit to sensor capabilities */
+       return icd->ops->try_fmt(icd, f);
+}
+
+static int mx1_camera_reqbufs(struct soc_camera_file *icf,
+                             struct v4l2_requestbuffers *p)
+{
+       int i;
+
+       /* This is for locking debugging only. I removed spinlocks and now I
+        * check whether .prepare is ever called on a linked buffer, or whether
+        * a dma IRQ can occur for an in-work or unlinked buffer. Until now
+        * it hadn't triggered */
+       for (i = 0; i < p->count; i++) {
+               struct mx1_buffer *buf = container_of(icf->vb_vidq.bufs[i],
+                                                     struct mx1_buffer, vb);
+               buf->inwork = 0;
+               INIT_LIST_HEAD(&buf->vb.queue);
+       }
+
+       return 0;
+}
+
+static unsigned int mx1_camera_poll(struct file *file, poll_table *pt)
+{
+       struct soc_camera_file *icf = file->private_data;
+       struct mx1_buffer *buf;
+
+       buf = list_entry(icf->vb_vidq.stream.next, struct mx1_buffer,
+                        vb.stream);
+
+       poll_wait(file, &buf->vb.done, pt);
+
+       if (buf->vb.state == VIDEOBUF_DONE ||
+           buf->vb.state == VIDEOBUF_ERROR)
+               return POLLIN | POLLRDNORM;
+
+       return 0;
+}
+
+static int mx1_camera_querycap(struct soc_camera_host *ici,
+                              struct v4l2_capability *cap)
+{
+       /* cap->name is set by the friendly caller:-> */
+       strlcpy(cap->card, "i.MX1/i.MXL Camera", sizeof(cap->card));
+       cap->version = VERSION_CODE;
+       cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+
+       return 0;
+}
+
+static struct soc_camera_host_ops mx1_soc_camera_host_ops = {
+       .owner          = THIS_MODULE,
+       .add            = mx1_camera_add_device,
+       .remove         = mx1_camera_remove_device,
+       .set_bus_param  = mx1_camera_set_bus_param,
+       .set_crop       = mx1_camera_set_crop,
+       .set_fmt        = mx1_camera_set_fmt,
+       .try_fmt        = mx1_camera_try_fmt,
+       .init_videobuf  = mx1_camera_init_videobuf,
+       .reqbufs        = mx1_camera_reqbufs,
+       .poll           = mx1_camera_poll,
+       .querycap       = mx1_camera_querycap,
+};
+
+/* Should be allocated dynamically too, but we have only one. */
+static struct soc_camera_host mx1_soc_camera_host = {
+       .drv_name       = DRIVER_NAME,
+       .ops            = &mx1_soc_camera_host_ops,
+};
+
+static struct fiq_handler fh = {
+       .name           = "csi_sof"
+};
+
+static int __init mx1_camera_probe(struct platform_device *pdev)
+{
+       struct mx1_camera_dev *pcdev;
+       struct resource *res;
+       struct pt_regs regs;
+       struct clk *clk;
+       void __iomem *base;
+       unsigned int irq;
+       int err = 0;
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       irq = platform_get_irq(pdev, 0);
+       if (!res || !irq) {
+               err = -ENODEV;
+               goto exit;
+       }
+
+       clk = clk_get(&pdev->dev, "csi_clk");
+       if (IS_ERR(clk)) {
+               err = PTR_ERR(clk);
+               goto exit;
+       }
+
+       pcdev = kzalloc(sizeof(*pcdev), GFP_KERNEL);
+       if (!pcdev) {
+               dev_err(&pdev->dev, "Could not allocate pcdev\n");
+               err = -ENOMEM;
+               goto exit_put_clk;
+       }
+
+       dev_set_drvdata(&pdev->dev, pcdev);
+       pcdev->res = res;
+       pcdev->clk = clk;
+
+       pcdev->pdata = pdev->dev.platform_data;
+
+       if (pcdev->pdata)
+               pcdev->mclk = pcdev->pdata->mclk_10khz * 10000;
+
+       if (!pcdev->mclk) {
+               dev_warn(&pdev->dev,
+                        "mclk_10khz == 0! Please, fix your platform data. "
+                        "Using default 20MHz\n");
+               pcdev->mclk = 20000000;
+       }
+
+       INIT_LIST_HEAD(&pcdev->capture);
+       spin_lock_init(&pcdev->lock);
+
+       /*
+        * Request the regions.
+        */
+       if (!request_mem_region(res->start, resource_size(res), DRIVER_NAME)) {
+               err = -EBUSY;
+               goto exit_kfree;
+       }
+
+       base = ioremap(res->start, resource_size(res));
+       if (!base) {
+               err = -ENOMEM;
+               goto exit_release;
+       }
+       pcdev->irq = irq;
+       pcdev->base = base;
+       pcdev->dev = &pdev->dev;
+
+       /* request dma */
+       pcdev->dma_chan = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_HIGH);
+       if (pcdev->dma_chan < 0) {
+               dev_err(pcdev->dev, "Can't request DMA for MX1 CSI\n");
+               err = -EBUSY;
+               goto exit_iounmap;
+       }
+       dev_dbg(pcdev->dev, "got DMA channel %d\n", pcdev->dma_chan);
+
+       imx_dma_setup_handlers(pcdev->dma_chan, mx1_camera_dma_irq, NULL,
+                              pcdev);
+
+       imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO,
+                              IMX_DMA_MEMSIZE_32, DMA_REQ_CSI_R, 0);
+       /* burst length : 16 words = 64 bytes */
+       imx_dma_config_burstlen(pcdev->dma_chan, 0);
+
+       /* request irq */
+       err = claim_fiq(&fh);
+       if (err) {
+               dev_err(pcdev->dev, "Camera interrupt register failed \n");
+               goto exit_free_dma;
+       }
+
+       set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end -
+                                                  &mx1_camera_sof_fiq_start);
+
+       regs.ARM_r8 = DMA_BASE + DMA_DIMR;
+       regs.ARM_r9 = DMA_BASE + DMA_CCR(pcdev->dma_chan);
+       regs.ARM_r10 = (long)pcdev->base + CSICR1;
+       regs.ARM_fp = (long)pcdev->base + CSISR;
+       regs.ARM_sp = 1 << pcdev->dma_chan;
+       set_fiq_regs(&regs);
+
+       mxc_set_irq_fiq(irq, 1);
+       enable_fiq(irq);
+
+       mx1_soc_camera_host.priv        = pcdev;
+       mx1_soc_camera_host.dev.parent  = &pdev->dev;
+       mx1_soc_camera_host.nr          = pdev->id;
+       err = soc_camera_host_register(&mx1_soc_camera_host);
+       if (err)
+               goto exit_free_irq;
+
+       dev_info(&pdev->dev, "MX1 Camera driver loaded\n");
+
+       return 0;
+
+exit_free_irq:
+       disable_fiq(irq);
+       mxc_set_irq_fiq(irq, 0);
+       release_fiq(&fh);
+exit_free_dma:
+       imx_dma_free(pcdev->dma_chan);
+exit_iounmap:
+       iounmap(base);
+exit_release:
+       release_mem_region(res->start, resource_size(res));
+exit_kfree:
+       kfree(pcdev);
+exit_put_clk:
+       clk_put(clk);
+exit:
+       return err;
+}
+
+static int __exit mx1_camera_remove(struct platform_device *pdev)
+{
+       struct mx1_camera_dev *pcdev = platform_get_drvdata(pdev);
+       struct resource *res;
+
+       imx_dma_free(pcdev->dma_chan);
+       disable_fiq(pcdev->irq);
+       mxc_set_irq_fiq(pcdev->irq, 0);
+       release_fiq(&fh);
+
+       clk_put(pcdev->clk);
+
+       soc_camera_host_unregister(&mx1_soc_camera_host);
+
+       iounmap(pcdev->base);
+
+       res = pcdev->res;
+       release_mem_region(res->start, resource_size(res));
+
+       kfree(pcdev);
+
+       dev_info(&pdev->dev, "MX1 Camera driver unloaded\n");
+
+       return 0;
+}
+
+static struct platform_driver mx1_camera_driver = {
+       .driver         = {
+               .name   = DRIVER_NAME,
+       },
+       .remove         = __exit_p(mx1_camera_remove),
+};
+
+static int __init mx1_camera_init(void)
+{
+       return platform_driver_probe(&mx1_camera_driver, mx1_camera_probe);
+}
+
+static void __exit mx1_camera_exit(void)
+{
+       return platform_driver_unregister(&mx1_camera_driver);
+}
+
+module_init(mx1_camera_init);
+module_exit(mx1_camera_exit);
+
+MODULE_DESCRIPTION("i.MX1/i.MXL SoC Camera Host driver");
+MODULE_AUTHOR("Paulius Zaleckas <paulius.zaleckas@teltonika.lt>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRIVER_NAME);
index 70629e1..c462b81 100644 (file)
@@ -1100,7 +1100,7 @@ static int mx3_camera_probe(struct platform_device *pdev)
        }
        memset(mx3_cam, 0, sizeof(*mx3_cam));
 
-       mx3_cam->clk = clk_get(&pdev->dev, "csi_clk");
+       mx3_cam->clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(mx3_cam->clk)) {
                err = PTR_ERR(mx3_cam->clk);
                goto eclkget;
index 84aec62..3be5a71 100644 (file)
@@ -83,9 +83,14 @@ static struct {
 static int video_audio_connect[MXB_INPUTS] =
        { 0, 1, 3, 3 };
 
+struct mxb_routing {
+       u32 input;
+       u32 output;
+};
+
 /* These are the necessary input-output-pins for bringing one audio source
    (see above) to the CD-output. Note that gain is set to 0 in this table. */
-static struct v4l2_routing TEA6420_cd[MXB_AUDIOS + 1][2] = {
+static struct mxb_routing TEA6420_cd[MXB_AUDIOS + 1][2] = {
        { { 1, 1 }, { 1, 1 } }, /* Tuner */
        { { 5, 1 }, { 6, 1 } }, /* AUX 1 */
        { { 4, 1 }, { 6, 1 } }, /* AUX 2 */
@@ -97,7 +102,7 @@ static struct v4l2_routing TEA6420_cd[MXB_AUDIOS + 1][2] = {
 
 /* These are the necessary input-output-pins for bringing one audio source
    (see above) to the line-output. Note that gain is set to 0 in this table. */
-static struct v4l2_routing TEA6420_line[MXB_AUDIOS + 1][2] = {
+static struct mxb_routing TEA6420_line[MXB_AUDIOS + 1][2] = {
        { { 2, 3 }, { 1, 2 } },
        { { 5, 3 }, { 6, 2 } },
        { { 4, 3 }, { 6, 2 } },
@@ -134,10 +139,6 @@ struct mxb
 
 #define saa7111a_call(mxb, o, f, args...) \
        v4l2_subdev_call(mxb->saa7111a, o, f, ##args)
-#define tea6420_1_call(mxb, o, f, args...) \
-       v4l2_subdev_call(mxb->tea6420_1, o, f, ##args)
-#define tea6420_2_call(mxb, o, f, args...) \
-       v4l2_subdev_call(mxb->tea6420_2, o, f, ##args)
 #define tda9840_call(mxb, o, f, args...) \
        v4l2_subdev_call(mxb->tda9840, o, f, ##args)
 #define tea6415c_call(mxb, o, f, args...) \
@@ -147,6 +148,22 @@ struct mxb
 #define call_all(dev, o, f, args...) \
        v4l2_device_call_until_err(&dev->v4l2_dev, 0, o, f, ##args)
 
+static inline void tea6420_route_cd(struct mxb *mxb, int idx)
+{
+       v4l2_subdev_call(mxb->tea6420_1, audio, s_routing,
+               TEA6420_cd[idx][0].input, TEA6420_cd[idx][0].output, 0);
+       v4l2_subdev_call(mxb->tea6420_2, audio, s_routing,
+               TEA6420_cd[idx][1].input, TEA6420_cd[idx][1].output, 0);
+}
+
+static inline void tea6420_route_line(struct mxb *mxb, int idx)
+{
+       v4l2_subdev_call(mxb->tea6420_1, audio, s_routing,
+               TEA6420_line[idx][0].input, TEA6420_line[idx][0].output, 0);
+       v4l2_subdev_call(mxb->tea6420_2, audio, s_routing,
+               TEA6420_line[idx][1].input, TEA6420_line[idx][1].output, 0);
+}
+
 static struct saa7146_extension extension;
 
 static int mxb_probe(struct saa7146_dev *dev)
@@ -168,13 +185,20 @@ static int mxb_probe(struct saa7146_dev *dev)
                return -EFAULT;
        }
 
-       mxb->saa7111a = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "saa7115", "saa7111", I2C_SAA7111A);
-       mxb->tea6420_1 = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tea6420", "tea6420", I2C_TEA6420_1);
-       mxb->tea6420_2 = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tea6420", "tea6420", I2C_TEA6420_2);
-       mxb->tea6415c = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tea6415c", "tea6415c", I2C_TEA6415C);
-       mxb->tda9840 = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tda9840", "tda9840", I2C_TDA9840);
-       mxb->tuner = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tuner", "tuner", I2C_TUNER);
-       if (v4l2_i2c_new_subdev(&mxb->i2c_adapter, "saa5246a", "saa5246a", I2C_SAA5246A)) {
+       mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+                       "saa7115", "saa7111", I2C_SAA7111A);
+       mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+                       "tea6420", "tea6420", I2C_TEA6420_1);
+       mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+                       "tea6420", "tea6420", I2C_TEA6420_2);
+       mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+                       "tea6415c", "tea6415c", I2C_TEA6415C);
+       mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+                       "tda9840", "tda9840", I2C_TDA9840);
+       mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+                       "tuner", "tuner", I2C_TUNER);
+       if (v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
+                       "saa5246a", "saa5246a", I2C_SAA5246A)) {
                printk(KERN_INFO "mxb: found teletext decoder\n");
        }
 
@@ -261,18 +285,16 @@ static int mxb_init_done(struct saa7146_dev* dev)
        struct i2c_msg msg;
        struct tuner_setup tun_setup;
        v4l2_std_id std = V4L2_STD_PAL_BG;
-       struct v4l2_routing route;
 
        int i = 0, err = 0;
 
        /* select video mode in saa7111a */
-       saa7111a_call(mxb, tuner, s_std, std);
+       saa7111a_call(mxb, core, s_std, std);
 
        /* select tuner-output on saa7111a */
        i = 0;
-       route.input = SAA7115_COMPOSITE0;
-       route.output = SAA7111_FMT_CCIR | SAA7111_VBI_BYPASS;
-       saa7111a_call(mxb, video, s_routing, &route);
+       saa7111a_call(mxb, video, s_routing, SAA7115_COMPOSITE0,
+               SAA7111_FMT_CCIR | SAA7111_VBI_BYPASS, 0);
 
        /* select a tuner type */
        tun_setup.mode_mask = T_ANALOG_TV;
@@ -286,23 +308,17 @@ static int mxb_init_done(struct saa7146_dev* dev)
        tuner_call(mxb, tuner, s_frequency, &mxb->cur_freq);
 
        /* set a default video standard */
-       tuner_call(mxb, tuner, s_std, std);
+       tuner_call(mxb, core, s_std, std);
 
        /* mute audio on tea6420s */
-       tea6420_1_call(mxb, audio, s_routing, &TEA6420_line[6][0]);
-       tea6420_2_call(mxb, audio, s_routing, &TEA6420_line[6][1]);
-       tea6420_1_call(mxb, audio, s_routing, &TEA6420_line[6][0]);
-       tea6420_2_call(mxb, audio, s_routing, &TEA6420_line[6][1]);
+       tea6420_route_line(mxb, 6);
+       tea6420_route_cd(mxb, 6);
 
        /* switch to tuner-channel on tea6415c */
-       route.input = 3;
-       route.output = 17;
-       tea6415c_call(mxb, video, s_routing, &route);
+       tea6415c_call(mxb, video, s_routing, 3, 17, 0);
 
        /* select tuner-output on multicable on tea6415c */
-       route.input = 3;
-       route.output = 13;
-       tea6415c_call(mxb, video, s_routing, &route);
+       tea6415c_call(mxb, video, s_routing, 3, 13, 0);
 
        /* the rest for mxb */
        mxb->cur_input = 0;
@@ -426,18 +442,9 @@ static int vidioc_s_ctrl(struct file *file, void *fh, struct v4l2_control *vc)
 
        if (vc->id == V4L2_CID_AUDIO_MUTE) {
                mxb->cur_mute = vc->value;
-               if (!vc->value) {
-                       /* switch the audio-source */
-                       tea6420_1_call(mxb, audio, s_routing,
-                                       &TEA6420_line[video_audio_connect[mxb->cur_input]][0]);
-                       tea6420_2_call(mxb, audio, s_routing,
-                                       &TEA6420_line[video_audio_connect[mxb->cur_input]][1]);
-               } else {
-                       tea6420_1_call(mxb, audio, s_routing,
-                                       &TEA6420_line[6][0]);
-                       tea6420_2_call(mxb, audio, s_routing,
-                                       &TEA6420_line[6][1]);
-               }
+               /* switch the audio-source */
+               tea6420_route_line(mxb, vc->value ? 6 :
+                               video_audio_connect[mxb->cur_input]);
                DEB_EE(("VIDIOC_S_CTRL, V4L2_CID_AUDIO_MUTE: %d.\n", vc->value));
        }
        return 0;
@@ -466,7 +473,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
 {
        struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
        struct mxb *mxb = (struct mxb *)dev->ext_priv;
-       struct v4l2_routing route;
+       int err = 0;
        int i = 0;
 
        DEB_EE(("VIDIOC_S_INPUT %d.\n", input));
@@ -484,16 +491,12 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
        switch (input) {
        case TUNER:
                i = SAA7115_COMPOSITE0;
-               route.input = 3;
-               route.output = 17;
 
-               if (tea6415c_call(mxb, video, s_routing, &route)) {
-                       printk(KERN_ERR "VIDIOC_S_INPUT: could not address tea6415c #1\n");
-                       return -EFAULT;
-               }
+               err = tea6415c_call(mxb, video, s_routing, 3, 17, 0);
+
                /* connect tuner-output always to multicable */
-               route.input = 3;
-               route.output = 13;
+               if (!err)
+                       err = tea6415c_call(mxb, video, s_routing, 3, 13, 0);
                break;
        case AUX3_YC:
                /* nothing to be done here. aux3_yc is
@@ -507,37 +510,20 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
                break;
        case AUX1:
                i = SAA7115_COMPOSITE0;
-               route.input = 1;
-               route.output = 17;
+               err = tea6415c_call(mxb, video, s_routing, 1, 17, 0);
                break;
        }
 
-       /* switch video in tea6415c only if necessary */
-       switch (input) {
-       case TUNER:
-       case AUX1:
-               if (tea6415c_call(mxb, video, s_routing, &route)) {
-                       printk(KERN_ERR "VIDIOC_S_INPUT: could not address tea6415c #3\n");
-                       return -EFAULT;
-               }
-               break;
-       default:
-               break;
-       }
+       if (err)
+               return err;
 
        /* switch video in saa7111a */
-       route.input = i;
-       route.output = 0;
-       if (saa7111a_call(mxb, video, s_routing, &route))
+       if (saa7111a_call(mxb, video, s_routing, i, 0, 0))
                printk(KERN_ERR "VIDIOC_S_INPUT: could not address saa7111a #1.\n");
 
        /* switch the audio-source only if necessary */
-       if (0 == mxb->cur_mute) {
-               tea6420_1_call(mxb, audio, s_routing,
-                               &TEA6420_line[video_audio_connect[input]][0]);
-               tea6420_2_call(mxb, audio, s_routing,
-                               &TEA6420_line[video_audio_connect[input]][1]);
-       }
+       if (0 == mxb->cur_mute)
+               tea6420_route_line(mxb, video_audio_connect[input]);
 
        return 0;
 }
@@ -679,9 +665,7 @@ static long vidioc_default(struct file *file, void *fh, int cmd, void *arg)
 
                DEB_EE(("MXB_S_AUDIO_CD: i:%d.\n", i));
 
-               tea6420_1_call(mxb, audio, s_routing, &TEA6420_cd[i][0]);
-               tea6420_2_call(mxb, audio, s_routing, &TEA6420_cd[i][1]);
-
+               tea6420_route_cd(mxb, i);
                return 0;
        }
        case MXB_S_AUDIO_LINE:
@@ -694,9 +678,7 @@ static long vidioc_default(struct file *file, void *fh, int cmd, void *arg)
                }
 
                DEB_EE(("MXB_S_AUDIO_LINE: i:%d.\n", i));
-               tea6420_1_call(mxb, audio, s_routing, &TEA6420_line[i][0]);
-               tea6420_2_call(mxb, audio, s_routing, &TEA6420_line[i][1]);
-
+               tea6420_route_line(mxb, i);
                return 0;
        }
        default:
@@ -788,7 +770,7 @@ static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standa
                saa7146_write(dev, GPIO_CTRL, 0x00404050);
                /* unset the 7111 gpio register -- I don't know what this does exactly */
                saa7111a_call(mxb, core, s_gpio, 0);
-               tuner_call(mxb, tuner, s_std, std);
+               tuner_call(mxb, core, s_std, std);
        } else {
                v4l2_std_id std = V4L2_STD_PAL_BG;
 
@@ -797,7 +779,7 @@ static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standa
                saa7146_write(dev, GPIO_CTRL, 0x00404050);
                /* set the 7111 gpio register -- I don't know what this does exactly */
                saa7111a_call(mxb, core, s_gpio, 1);
-               tuner_call(mxb, tuner, s_std, std);
+               tuner_call(mxb, core, s_std, std);
        }
        return 0;
 }
index 84b0fc1..c0d9112 100644 (file)
 #define GAM15       0x8C /* Gamma Curve 15th segment input end point */
 #define SLOP        0x8D /* Gamma curve highest segment slope */
 #define DNSTH       0x8E /* De-noise threshold */
-#define EDGE0       0x8F /* Edge enhancement control 0 */
-#define EDGE1       0x90 /* Edge enhancement control 1 */
+#define EDGE_STRNGT 0x8F /* Edge strength  control when manual mode */
+#define EDGE_TRSHLD 0x90 /* Edge threshold control when manual mode */
 #define DNSOFF      0x91 /* Auto De-noise threshold control */
-#define EDGE2       0x92 /* Edge enhancement strength low  point control */
-#define EDGE3       0x93 /* Edge enhancement strength high point control */
+#define EDGE_UPPER  0x92 /* Edge strength upper limit when Auto mode */
+#define EDGE_LOWER  0x93 /* Edge strength lower limit when Auto mode */
 #define MTX1        0x94 /* Matrix coefficient 1 */
 #define MTX2        0x95 /* Matrix coefficient 2 */
 #define MTX3        0x96 /* Matrix coefficient 3 */
 #define VOSZ_VGA        0xF0
 #define VOSZ_QVGA       0x78
 
+/* DSPAUTO (DSP Auto Function ON/OFF Control) */
+#define AWB_ACTRL       0x80 /* AWB auto threshold control */
+#define DENOISE_ACTRL   0x40 /* De-noise auto threshold control */
+#define EDGE_ACTRL      0x20 /* Edge enhancement auto strength control */
+#define UV_ACTRL        0x10 /* UV adjust auto slope control */
+#define SCAL0_ACTRL     0x08 /* Auto scaling factor control */
+#define SCAL1_2_ACTRL   0x04 /* Auto scaling factor control */
+
 /*
  * ID
  */
@@ -670,7 +678,7 @@ static int ov772x_set_bus_param(struct soc_camera_device *icd,
 static unsigned long ov772x_query_bus_param(struct soc_camera_device *icd)
 {
        struct ov772x_priv *priv = container_of(icd, struct ov772x_priv, icd);
-       struct soc_camera_link *icl = priv->client->dev.platform_data;
+       struct soc_camera_link *icl = &priv->info->link;
        unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER |
                SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH |
                SOCAM_DATA_ACTIVE_HIGH | priv->info->buswidth;
@@ -816,6 +824,53 @@ static int ov772x_set_params(struct ov772x_priv *priv, u32 width, u32 height,
        ov772x_reset(priv->client);
 
        /*
+        * Edge Ctrl
+        */
+       if (priv->info->edgectrl.strength & OV772X_MANUAL_EDGE_CTRL) {
+
+               /*
+                * Manual Edge Control Mode
+                *
+                * Edge auto strength bit is set by default.
+                * Remove it when manual mode.
+                */
+
+               ret = ov772x_mask_set(priv->client, DSPAUTO, EDGE_ACTRL, 0x00);
+               if (ret < 0)
+                       goto ov772x_set_fmt_error;
+
+               ret = ov772x_mask_set(priv->client,
+                                     EDGE_TRSHLD, EDGE_THRESHOLD_MASK,
+                                     priv->info->edgectrl.threshold);
+               if (ret < 0)
+                       goto ov772x_set_fmt_error;
+
+               ret = ov772x_mask_set(priv->client,
+                                     EDGE_STRNGT, EDGE_STRENGTH_MASK,
+                                     priv->info->edgectrl.strength);
+               if (ret < 0)
+                       goto ov772x_set_fmt_error;
+
+       } else if (priv->info->edgectrl.upper > priv->info->edgectrl.lower) {
+               /*
+                * Auto Edge Control Mode
+                *
+                * set upper and lower limit
+                */
+               ret = ov772x_mask_set(priv->client,
+                                     EDGE_UPPER, EDGE_UPPER_MASK,
+                                     priv->info->edgectrl.upper);
+               if (ret < 0)
+                       goto ov772x_set_fmt_error;
+
+               ret = ov772x_mask_set(priv->client,
+                                     EDGE_LOWER, EDGE_LOWER_MASK,
+                                     priv->info->edgectrl.lower);
+               if (ret < 0)
+                       goto ov772x_set_fmt_error;
+       }
+
+       /*
         * set size format
         */
        ret = ov772x_write_array(priv->client, priv->win->regs);
index ccf2a3c..10ef1a2 100644 (file)
@@ -58,9 +58,9 @@ static const struct routing_scheme routing_schemes[] = {
 void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
 {
        if (hdw->input_dirty || hdw->force_dirty) {
-               struct v4l2_routing route;
                const struct routing_scheme *sp;
                unsigned int sid = hdw->hdw_desc->signal_routing_scheme;
+               u32 input;
 
                pvr2_trace(PVR2_TRACE_CHIPS, "subdev msp3400 v4l2 set_stereo");
 
@@ -68,7 +68,7 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
                    ((sp = routing_schemes + sid) != NULL) &&
                    (hdw->input_val >= 0) &&
                    (hdw->input_val < sp->cnt)) {
-                       route.input = sp->def[hdw->input_val];
+                       input = sp->def[hdw->input_val];
                } else {
                        pvr2_trace(PVR2_TRACE_ERROR_LEGS,
                                   "*** WARNING *** subdev msp3400 set_input:"
@@ -77,8 +77,8 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
                                   sid, hdw->input_val);
                        return;
                }
-               route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1);
-               sd->ops->audio->s_routing(sd, &route);
+               sd->ops->audio->s_routing(sd, input,
+                       MSP_OUTPUT(MSP_SC_IN_DSP_SCART1), 0);
        }
 }
 
index b5c3428..9023adf 100644 (file)
@@ -60,16 +60,16 @@ static const struct routing_scheme routing_schemes[] = {
 void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
 {
        if (hdw->input_dirty || hdw->force_dirty) {
-               struct v4l2_routing route;
                const struct routing_scheme *sp;
                unsigned int sid = hdw->hdw_desc->signal_routing_scheme;
+               u32 input;
                pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_input(%d)",
                           hdw->input_val);
                if ((sid < ARRAY_SIZE(routing_schemes)) &&
                    ((sp = routing_schemes + sid) != NULL) &&
                    (hdw->input_val >= 0) &&
                    (hdw->input_val < sp->cnt)) {
-                       route.input = sp->def[hdw->input_val];
+                       input = sp->def[hdw->input_val];
                } else {
                        pvr2_trace(PVR2_TRACE_ERROR_LEGS,
                                   "*** WARNING *** subdev v4l2 set_input:"
@@ -78,8 +78,7 @@ void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
                                   sid, hdw->input_val);
                        return;
                }
-               route.output = 0;
-               sd->ops->audio->s_routing(sd, &route);
+               sd->ops->audio->s_routing(sd, input, 0, 0);
        }
 }
 
index 203f54c..1b992b8 100644 (file)
@@ -137,14 +137,12 @@ int pvr2_ctrl_get_min(struct pvr2_ctrl *cptr)
 int pvr2_ctrl_get_def(struct pvr2_ctrl *cptr, int *valptr)
 {
        int ret = 0;
-       if (!cptr) return 0;
+       if (!cptr) return -EINVAL;
        LOCK_TAKE(cptr->hdw->big_lock); do {
-               if (cptr->info->type == pvr2_ctl_int) {
-                       if (cptr->info->get_def_value) {
-                               ret = cptr->info->get_def_value(cptr, valptr);
-                       } else {
-                               *valptr = cptr->info->default_value;
-                       }
+               if (cptr->info->get_def_value) {
+                       ret = cptr->info->get_def_value(cptr, valptr);
+               } else {
+                       *valptr = cptr->info->default_value;
                }
        } while(0); LOCK_GIVE(cptr->hdw->big_lock);
        return ret;
index 4e017ff..05e5235 100644 (file)
@@ -105,14 +105,11 @@ void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
 {
        pvr2_trace(PVR2_TRACE_CHIPS, "subdev cx2584x update...");
        if (hdw->input_dirty || hdw->force_dirty) {
-               struct v4l2_routing route;
                enum cx25840_video_input vid_input;
                enum cx25840_audio_input aud_input;
                const struct routing_scheme *sp;
                unsigned int sid = hdw->hdw_desc->signal_routing_scheme;
 
-               memset(&route, 0, sizeof(route));
-
                if ((sid < ARRAY_SIZE(routing_schemes)) &&
                    ((sp = routing_schemes + sid) != NULL) &&
                    (hdw->input_val >= 0) &&
@@ -131,10 +128,8 @@ void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
                pvr2_trace(PVR2_TRACE_CHIPS,
                           "subdev cx2584x set_input vid=0x%x aud=0x%x",
                           vid_input, aud_input);
-               route.input = (u32)vid_input;
-               sd->ops->video->s_routing(sd, &route);
-               route.input = (u32)aud_input;
-               sd->ops->audio->s_routing(sd, &route);
+               sd->ops->video->s_routing(sd, (u32)vid_input, 0, 0);
+               sd->ops->audio->s_routing(sd, (u32)aud_input, 0, 0);
        }
 }
 
index 7a65b42..d9d974a 100644 (file)
@@ -2039,7 +2039,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
                           "Module ID %u:"
                           " Setting up with specified i2c address 0x%x",
                           mid, i2caddr[0]);
-               sd = v4l2_i2c_new_subdev(&hdw->i2c_adap,
+               sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
                                         fname, fname,
                                         i2caddr[0]);
        } else {
@@ -2047,7 +2047,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
                           "Module ID %u:"
                           " Setting up with address probe list",
                           mid);
-               sd = v4l2_i2c_new_probed_subdev(&hdw->i2c_adap,
+               sd = v4l2_i2c_new_probed_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
                                                fname, fname,
                                                i2caddr);
        }
@@ -2185,7 +2185,7 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
        pvr2_hdw_load_modules(hdw);
        if (!pvr2_hdw_dev_ok(hdw)) return;
 
-       v4l2_device_call_all(&hdw->v4l2_dev, 0, core, init, 0);
+       v4l2_device_call_all(&hdw->v4l2_dev, 0, core, load_fw);
 
        for (idx = 0; idx < CTRLDEF_COUNT; idx++) {
                cptr = hdw->controls + idx;
@@ -2574,7 +2574,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
        hdw->ctl_read_urb = usb_alloc_urb(0,GFP_KERNEL);
        if (!hdw->ctl_read_urb) goto fail;
 
-       if (v4l2_device_register(&usb_dev->dev, &hdw->v4l2_dev) != 0) {
+       if (v4l2_device_register(&intf->dev, &hdw->v4l2_dev) != 0) {
                pvr2_trace(PVR2_TRACE_ERROR_LEGS,
                           "Error registering with v4l core, giving up");
                goto fail;
@@ -2926,6 +2926,7 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
                pvr2_trace(PVR2_TRACE_CHIPS, "subdev tuner set_type(%d)",
                           hdw->tuner_type);
                if (((int)(hdw->tuner_type)) >= 0) {
+                       memset(&setup, 0, sizeof(setup));
                        setup.addr = ADDR_UNSET;
                        setup.type = hdw->tuner_type;
                        setup.mode_mask = T_RADIO | T_ANALOG_TV;
@@ -2943,7 +2944,7 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
                        v4l2_std_id vs;
                        vs = hdw->std_mask_cur;
                        v4l2_device_call_all(&hdw->v4l2_dev, 0,
-                                            tuner, s_std, vs);
+                                            core, s_std, vs);
                }
                hdw->tuner_signal_stale = !0;
                hdw->cropcap_stale = !0;
index 9464862..9af282f 100644 (file)
@@ -520,16 +520,6 @@ static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
        return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
 }
 
-static int pvr2_i2c_attach_inform(struct i2c_client *client)
-{
-       return 0;
-}
-
-static int pvr2_i2c_detach_inform(struct i2c_client *client)
-{
-       return 0;
-}
-
 static struct i2c_algorithm pvr2_i2c_algo_template = {
        .master_xfer   = pvr2_i2c_xfer,
        .functionality = pvr2_i2c_functionality,
@@ -539,8 +529,6 @@ static struct i2c_adapter pvr2_i2c_adap_template = {
        .owner         = THIS_MODULE,
        .class         = 0,
        .id            = I2C_HW_B_BT848,
-       .client_register = pvr2_i2c_attach_inform,
-       .client_unregister = pvr2_i2c_detach_inform,
 };
 
 
index e20ba1e..299c1cb 100644 (file)
@@ -153,14 +153,16 @@ static ssize_t show_def(struct device *class_dev,
        struct pvr2_sysfs_ctl_item *cip;
        int val;
        int ret;
+       unsigned int cnt = 0;
        cip = container_of(attr, struct pvr2_sysfs_ctl_item, attr_def);
        ret = pvr2_ctrl_get_def(cip->cptr, &val);
-       pvr2_sysfs_trace("pvr2_sysfs(%p) show_def(cid=%d) is %d, stat=%d",
-                        cip->chptr, cip->ctl_id, val, ret);
-       if (ret < 0) {
-               return ret;
-       }
-       return scnprintf(buf, PAGE_SIZE, "%d\n", val);
+       if (ret < 0) return ret;
+       ret = pvr2_ctrl_value_to_sym(cip->cptr, ~0, val,
+                                    buf, PAGE_SIZE - 1, &cnt);
+       pvr2_sysfs_trace("pvr2_sysfs(%p) show_def(cid=%d) is %.*s (%d)",
+                        cip->chptr, cip->ctl_id, cnt, buf, val);
+       buf[cnt] = '\n';
+       return cnt + 1;
 }
 
 static ssize_t show_val_norm(struct device *class_dev,
index b3862f5..d2fe7c8 100644 (file)
@@ -75,16 +75,17 @@ static const struct routing_scheme routing_schemes[] = {
 void pvr2_saa7115_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
 {
        if (hdw->input_dirty || hdw->force_dirty) {
-               struct v4l2_routing route;
                const struct routing_scheme *sp;
                unsigned int sid = hdw->hdw_desc->signal_routing_scheme;
+               u32 input;
+
                pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_input(%d)",
                           hdw->input_val);
                if ((sid < ARRAY_SIZE(routing_schemes)) &&
                    ((sp = routing_schemes + sid) != NULL) &&
                    (hdw->input_val >= 0) &&
                    (hdw->input_val < sp->cnt)) {
-                       route.input = sp->def[hdw->input_val];
+                       input = sp->def[hdw->input_val];
                } else {
                        pvr2_trace(PVR2_TRACE_ERROR_LEGS,
                                   "*** WARNING *** subdev v4l2 set_input:"
@@ -93,8 +94,7 @@ void pvr2_saa7115_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
                                   sid, hdw->input_val);
                        return;
                }
-               route.output = 0;
-               sd->ops->video->s_routing(sd, &route);
+               sd->ops->video->s_routing(sd, input, 0, 0);
        }
 }
 
index 1670aa4..8c1eae0 100644 (file)
 void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
 {
        if (hdw->input_dirty || hdw->force_dirty) {
-               struct v4l2_routing route;
-
-               memset(&route, 0, sizeof(route));
+               u32 input;
 
                switch (hdw->input_val) {
                case PVR2_CVAL_INPUT_RADIO:
-                       route.input = 1;
+                       input = 1;
                        break;
                default:
                        /* All other cases just use the second input */
-                       route.input = 2;
+                       input = 2;
                        break;
                }
                pvr2_trace(PVR2_TRACE_CHIPS, "subdev wm8775"
                           " set_input(val=%d route=0x%x)",
-                          hdw->input_val, route.input);
+                          hdw->input_val, input);
 
-               sd->ops->audio->s_routing(sd, &route);
+               sd->ops->audio->s_routing(sd, input, 0, 0);
        }
 }
 
index 8b9f0aa..340f954 100644 (file)
@@ -39,7 +39,7 @@ config USB_PWC_DEBUG
 config USB_PWC_INPUT_EVDEV
        bool "USB Philips Cameras input events device support"
        default y
-       depends on USB_PWC && INPUT
+       depends on USB_PWC=INPUT || INPUT=y
        ---help---
          This option makes USB Philips cameras register the snapshot button as
          an input device to report button events.
index c522616..c639845 100644 (file)
                        CICR0_EOFM | CICR0_FOM)
 
 /*
+ * YUV422P picture size should be a multiple of 16, so the heuristic aligns
+ * height, width on 4 byte boundaries to reach the 16 multiple for the size.
+ */
+#define YUV422P_X_Y_ALIGN 4
+#define YUV422P_SIZE_ALIGN YUV422P_X_Y_ALIGN * YUV422P_X_Y_ALIGN
+
+/*
  * Structures
  */
 enum pxa_camera_active_dma {
@@ -236,20 +243,11 @@ static int pxa_videobuf_setup(struct videobuf_queue *vq, unsigned int *count,
                              unsigned int *size)
 {
        struct soc_camera_device *icd = vq->priv_data;
-       struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
-       struct pxa_camera_dev *pcdev = ici->priv;
 
        dev_dbg(&icd->dev, "count=%d, size=%d\n", *count, *size);
 
-       /* planar capture requires Y, U and V buffers to be page aligned */
-       if (pcdev->channels == 3) {
-               *size = PAGE_ALIGN(icd->width * icd->height); /* Y pages */
-               *size += PAGE_ALIGN(icd->width * icd->height / 2); /* U pages */
-               *size += PAGE_ALIGN(icd->width * icd->height / 2); /* V pages */
-       } else {
-               *size = icd->width * icd->height *
-                       ((icd->current_fmt->depth + 7) >> 3);
-       }
+       *size = roundup(icd->width * icd->height *
+                       ((icd->current_fmt->depth + 7) >> 3), 8);
 
        if (0 == *count)
                *count = 32;
@@ -289,19 +287,63 @@ static void free_buffer(struct videobuf_queue *vq, struct pxa_buffer *buf)
        buf->vb.state = VIDEOBUF_NEEDS_INIT;
 }
 
+static int calculate_dma_sglen(struct scatterlist *sglist, int sglen,
+                              int sg_first_ofs, int size)
+{
+       int i, offset, dma_len, xfer_len;
+       struct scatterlist *sg;
+
+       offset = sg_first_ofs;
+       for_each_sg(sglist, sg, sglen, i) {
+               dma_len = sg_dma_len(sg);
+
+               /* PXA27x Developer's Manual 27.4.4.1: round up to 8 bytes */
+               xfer_len = roundup(min(dma_len - offset, size), 8);
+
+               size = max(0, size - xfer_len);
+               offset = 0;
+               if (size == 0)
+                       break;
+       }
+
+       BUG_ON(size != 0);
+       return i + 1;
+}
+
+/**
+ * pxa_init_dma_channel - init dma descriptors
+ * @pcdev: pxa camera device
+ * @buf: pxa buffer to find pxa dma channel
+ * @dma: dma video buffer
+ * @channel: dma channel (0 => 'Y', 1 => 'U', 2 => 'V')
+ * @cibr: camera Receive Buffer Register
+ * @size: bytes to transfer
+ * @sg_first: first element of sg_list
+ * @sg_first_ofs: offset in first element of sg_list
+ *
+ * Prepares the pxa dma descriptors to transfer one camera channel.
+ * Beware sg_first and sg_first_ofs are both input and output parameters.
+ *
+ * Returns 0 or -ENOMEM if no coherent memory is available
+ */
 static int pxa_init_dma_channel(struct pxa_camera_dev *pcdev,
                                struct pxa_buffer *buf,
                                struct videobuf_dmabuf *dma, int channel,
-                               int sglen, int sg_start, int cibr,
-                               unsigned int size)
+                               int cibr, int size,
+                               struct scatterlist **sg_first, int *sg_first_ofs)
 {
        struct pxa_cam_dma *pxa_dma = &buf->dmas[channel];
-       int i;
+       struct scatterlist *sg;
+       int i, offset, sglen;
+       int dma_len = 0, xfer_len = 0;
 
        if (pxa_dma->sg_cpu)
                dma_free_coherent(pcdev->dev, pxa_dma->sg_size,
                                  pxa_dma->sg_cpu, pxa_dma->sg_dma);
 
+       sglen = calculate_dma_sglen(*sg_first, dma->sglen,
+                                   *sg_first_ofs, size);
+
        pxa_dma->sg_size = (sglen + 1) * sizeof(struct pxa_dma_desc);
        pxa_dma->sg_cpu = dma_alloc_coherent(pcdev->dev, pxa_dma->sg_size,
                                             &pxa_dma->sg_dma, GFP_KERNEL);
@@ -309,31 +351,75 @@ static int pxa_init_dma_channel(struct pxa_camera_dev *pcdev,
                return -ENOMEM;
 
        pxa_dma->sglen = sglen;
+       offset = *sg_first_ofs;
 
-       for (i = 0; i < sglen; i++) {
-               int sg_i = sg_start + i;
-               struct scatterlist *sg = dma->sglist;
-               unsigned int dma_len = sg_dma_len(&sg[sg_i]), xfer_len;
+       dev_dbg(pcdev->dev, "DMA: sg_first=%p, sglen=%d, ofs=%d, dma.desc=%x\n",
+               *sg_first, sglen, *sg_first_ofs, pxa_dma->sg_dma);
 
-               pxa_dma->sg_cpu[i].dsadr = pcdev->res->start + cibr;
-               pxa_dma->sg_cpu[i].dtadr = sg_dma_address(&sg[sg_i]);
+
+       for_each_sg(*sg_first, sg, sglen, i) {
+               dma_len = sg_dma_len(sg);
 
                /* PXA27x Developer's Manual 27.4.4.1: round up to 8 bytes */
-               xfer_len = (min(dma_len, size) + 7) & ~7;
+               xfer_len = roundup(min(dma_len - offset, size), 8);
 
+               size = max(0, size - xfer_len);
+
+               pxa_dma->sg_cpu[i].dsadr = pcdev->res->start + cibr;
+               pxa_dma->sg_cpu[i].dtadr = sg_dma_address(sg) + offset;
                pxa_dma->sg_cpu[i].dcmd =
                        DCMD_FLOWSRC | DCMD_BURST8 | DCMD_INCTRGADDR | xfer_len;
-               size -= dma_len;
+#ifdef DEBUG
+               if (!i)
+                       pxa_dma->sg_cpu[i].dcmd |= DCMD_STARTIRQEN;
+#endif
                pxa_dma->sg_cpu[i].ddadr =
                        pxa_dma->sg_dma + (i + 1) * sizeof(struct pxa_dma_desc);
+
+               dev_vdbg(pcdev->dev, "DMA: desc.%08x->@phys=0x%08x, len=%d\n",
+                        pxa_dma->sg_dma + i * sizeof(struct pxa_dma_desc),
+                        sg_dma_address(sg) + offset, xfer_len);
+               offset = 0;
+
+               if (size == 0)
+                       break;
        }
 
-       pxa_dma->sg_cpu[sglen - 1].ddadr = DDADR_STOP;
-       pxa_dma->sg_cpu[sglen - 1].dcmd |= DCMD_ENDIRQEN;
+       pxa_dma->sg_cpu[sglen].ddadr = DDADR_STOP;
+       pxa_dma->sg_cpu[sglen].dcmd  = DCMD_FLOWSRC | DCMD_BURST8 | DCMD_ENDIRQEN;
+
+       /*
+        * Handle 1 special case :
+        *  - in 3 planes (YUV422P format), we might finish with xfer_len equal
+        *    to dma_len (end on PAGE boundary). In this case, the sg element
+        *    for next plane should be the next after the last used to store the
+        *    last scatter gather RAM page
+        */
+       if (xfer_len >= dma_len) {
+               *sg_first_ofs = xfer_len - dma_len;
+               *sg_first = sg_next(sg);
+       } else {
+               *sg_first_ofs = xfer_len;
+               *sg_first = sg;
+       }
 
        return 0;
 }
 
+static void pxa_videobuf_set_actdma(struct pxa_camera_dev *pcdev,
+                                   struct pxa_buffer *buf)
+{
+       buf->active_dma = DMA_Y;
+       if (pcdev->channels == 3)
+               buf->active_dma |= DMA_U | DMA_V;
+}
+
+/*
+ * Please check the DMA prepared buffer structure in :
+ *   Documentation/video4linux/pxa_camera.txt
+ * Please check also in pxa_camera_check_link_miss() to understand why DMA chain
+ * modification while DMA chain is running will work anyway.
+ */
 static int pxa_videobuf_prepare(struct videobuf_queue *vq,
                struct videobuf_buffer *vb, enum v4l2_field field)
 {
@@ -342,7 +428,6 @@ static int pxa_videobuf_prepare(struct videobuf_queue *vq,
        struct pxa_camera_dev *pcdev = ici->priv;
        struct pxa_buffer *buf = container_of(vb, struct pxa_buffer, vb);
        int ret;
-       int sglen_y,  sglen_yu = 0, sglen_u = 0, sglen_v = 0;
        int size_y, size_u = 0, size_v = 0;
 
        dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
@@ -381,62 +466,58 @@ static int pxa_videobuf_prepare(struct videobuf_queue *vq,
        }
 
        if (vb->state == VIDEOBUF_NEEDS_INIT) {
-               unsigned int size = vb->size;
+               int size = vb->size;
+               int next_ofs = 0;
                struct videobuf_dmabuf *dma = videobuf_to_dma(vb);
+               struct scatterlist *sg;
 
                ret = videobuf_iolock(vq, vb, NULL);
                if (ret)
                        goto fail;
 
                if (pcdev->channels == 3) {
-                       /* FIXME the calculations should be more precise */
-                       sglen_y = dma->sglen / 2;
-                       sglen_u = sglen_v = dma->sglen / 4 + 1;
-                       sglen_yu = sglen_y + sglen_u;
                        size_y = size / 2;
                        size_u = size_v = size / 4;
                } else {
-                       sglen_y = dma->sglen;
                        size_y = size;
                }
 
-               /* init DMA for Y channel */
-               ret = pxa_init_dma_channel(pcdev, buf, dma, 0, sglen_y,
-                                          0, 0x28, size_y);
+               sg = dma->sglist;
 
+               /* init DMA for Y channel */
+               ret = pxa_init_dma_channel(pcdev, buf, dma, 0, CIBR0, size_y,
+                                          &sg, &next_ofs);
                if (ret) {
                        dev_err(pcdev->dev,
                                "DMA initialization for Y/RGB failed\n");
                        goto fail;
                }
 
-               if (pcdev->channels == 3) {
-                       /* init DMA for U channel */
-                       ret = pxa_init_dma_channel(pcdev, buf, dma, 1, sglen_u,
-                                                  sglen_y, 0x30, size_u);
-                       if (ret) {
-                               dev_err(pcdev->dev,
-                                       "DMA initialization for U failed\n");
-                               goto fail_u;
-                       }
-
-                       /* init DMA for V channel */
-                       ret = pxa_init_dma_channel(pcdev, buf, dma, 2, sglen_v,
-                                                  sglen_yu, 0x38, size_v);
-                       if (ret) {
-                               dev_err(pcdev->dev,
-                                       "DMA initialization for V failed\n");
-                               goto fail_v;
-                       }
+               /* init DMA for U channel */
+               if (size_u)
+                       ret = pxa_init_dma_channel(pcdev, buf, dma, 1, CIBR1,
+                                                  size_u, &sg, &next_ofs);
+               if (ret) {
+                       dev_err(pcdev->dev,
+                               "DMA initialization for U failed\n");
+                       goto fail_u;
+               }
+
+               /* init DMA for V channel */
+               if (size_v)
+                       ret = pxa_init_dma_channel(pcdev, buf, dma, 2, CIBR2,
+                                                  size_v, &sg, &next_ofs);
+               if (ret) {
+                       dev_err(pcdev->dev,
+                               "DMA initialization for V failed\n");
+                       goto fail_v;
                }
 
                vb->state = VIDEOBUF_PREPARED;
        }
 
        buf->inwork = 0;
-       buf->active_dma = DMA_Y;
-       if (pcdev->channels == 3)
-               buf->active_dma |= DMA_U | DMA_V;
+       pxa_videobuf_set_actdma(pcdev, buf);
 
        return 0;
 
@@ -453,6 +534,92 @@ out:
        return ret;
 }
 
+/**
+ * pxa_dma_start_channels - start DMA channel for active buffer
+ * @pcdev: pxa camera device
+ *
+ * Initialize DMA channels to the beginning of the active video buffer, and
+ * start these channels.
+ */
+static void pxa_dma_start_channels(struct pxa_camera_dev *pcdev)
+{
+       int i;
+       struct pxa_buffer *active;
+
+       active = pcdev->active;
+
+       for (i = 0; i < pcdev->channels; i++) {
+               dev_dbg(pcdev->dev, "%s (channel=%d) ddadr=%08x\n", __func__,
+                       i, active->dmas[i].sg_dma);
+               DDADR(pcdev->dma_chans[i]) = active->dmas[i].sg_dma;
+               DCSR(pcdev->dma_chans[i]) = DCSR_RUN;
+       }
+}
+
+static void pxa_dma_stop_channels(struct pxa_camera_dev *pcdev)
+{
+       int i;
+
+       for (i = 0; i < pcdev->channels; i++) {
+               dev_dbg(pcdev->dev, "%s (channel=%d)\n", __func__, i);
+               DCSR(pcdev->dma_chans[i]) = 0;
+       }
+}
+
+static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev,
+                                struct pxa_buffer *buf)
+{
+       int i;
+       struct pxa_dma_desc *buf_last_desc;
+
+       for (i = 0; i < pcdev->channels; i++) {
+               buf_last_desc = buf->dmas[i].sg_cpu + buf->dmas[i].sglen;
+               buf_last_desc->ddadr = DDADR_STOP;
+
+               if (pcdev->sg_tail[i])
+                       /* Link the new buffer to the old tail */
+                       pcdev->sg_tail[i]->ddadr = buf->dmas[i].sg_dma;
+
+               /* Update the channel tail */
+               pcdev->sg_tail[i] = buf_last_desc;
+       }
+}
+
+/**
+ * pxa_camera_start_capture - start video capturing
+ * @pcdev: camera device
+ *
+ * Launch capturing. DMA channels should not be active yet. They should get
+ * activated at the end of frame interrupt, to capture only whole frames, and
+ * never begin the capture of a partial frame.
+ */
+static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev)
+{
+       unsigned long cicr0, cifr;
+
+       dev_dbg(pcdev->dev, "%s\n", __func__);
+       /* Reset the FIFOs */
+       cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
+       __raw_writel(cifr, pcdev->base + CIFR);
+       /* Enable End-Of-Frame Interrupt */
+       cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB;
+       cicr0 &= ~CICR0_EOFM;
+       __raw_writel(cicr0, pcdev->base + CICR0);
+}
+
+static void pxa_camera_stop_capture(struct pxa_camera_dev *pcdev)
+{
+       unsigned long cicr0;
+
+       pxa_dma_stop_channels(pcdev);
+
+       cicr0 = __raw_readl(pcdev->base + CICR0) & ~CICR0_ENB;
+       __raw_writel(cicr0, pcdev->base + CICR0);
+
+       pcdev->active = NULL;
+       dev_dbg(pcdev->dev, "%s\n", __func__);
+}
+
 static void pxa_videobuf_queue(struct videobuf_queue *vq,
                               struct videobuf_buffer *vb)
 {
@@ -460,81 +627,20 @@ static void pxa_videobuf_queue(struct videobuf_queue *vq,
        struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
        struct pxa_camera_dev *pcdev = ici->priv;
        struct pxa_buffer *buf = container_of(vb, struct pxa_buffer, vb);
-       struct pxa_buffer *active;
        unsigned long flags;
-       int i;
 
-       dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
-               vb, vb->baddr, vb->bsize);
+       dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d active=%p\n", __func__,
+               vb, vb->baddr, vb->bsize, pcdev->active);
+
        spin_lock_irqsave(&pcdev->lock, flags);
 
        list_add_tail(&vb->queue, &pcdev->capture);
 
        vb->state = VIDEOBUF_ACTIVE;
-       active = pcdev->active;
+       pxa_dma_add_tail_buf(pcdev, buf);
 
-       if (!active) {
-               unsigned long cifr, cicr0;
-
-               cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
-               __raw_writel(cifr, pcdev->base + CIFR);
-
-               for (i = 0; i < pcdev->channels; i++) {
-                       DDADR(pcdev->dma_chans[i]) = buf->dmas[i].sg_dma;
-                       DCSR(pcdev->dma_chans[i]) = DCSR_RUN;
-                       pcdev->sg_tail[i] = buf->dmas[i].sg_cpu + buf->dmas[i].sglen - 1;
-               }
-
-               pcdev->active = buf;
-
-               cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB;
-               __raw_writel(cicr0, pcdev->base + CICR0);
-       } else {
-               struct pxa_cam_dma *buf_dma;
-               struct pxa_cam_dma *act_dma;
-               int nents;
-
-               for (i = 0; i < pcdev->channels; i++) {
-                       buf_dma = &buf->dmas[i];
-                       act_dma = &active->dmas[i];
-                       nents = buf_dma->sglen;
-
-                       /* Stop DMA engine */
-                       DCSR(pcdev->dma_chans[i]) = 0;
-
-                       /* Add the descriptors we just initialized to
-                          the currently running chain */
-                       pcdev->sg_tail[i]->ddadr = buf_dma->sg_dma;
-                       pcdev->sg_tail[i] = buf_dma->sg_cpu + buf_dma->sglen - 1;
-
-                       /* Setup a dummy descriptor with the DMA engines current
-                        * state
-                        */
-                       buf_dma->sg_cpu[nents].dsadr =
-                               pcdev->res->start + 0x28 + i*8; /* CIBRx */
-                       buf_dma->sg_cpu[nents].dtadr =
-                               DTADR(pcdev->dma_chans[i]);
-                       buf_dma->sg_cpu[nents].dcmd =
-                               DCMD(pcdev->dma_chans[i]);
-
-                       if (DDADR(pcdev->dma_chans[i]) == DDADR_STOP) {
-                               /* The DMA engine is on the last
-                                  descriptor, set the next descriptors
-                                  address to the descriptors we just
-                                  initialized */
-                               buf_dma->sg_cpu[nents].ddadr = buf_dma->sg_dma;
-                       } else {
-                               buf_dma->sg_cpu[nents].ddadr =
-                                       DDADR(pcdev->dma_chans[i]);
-                       }
-
-                       /* The next descriptor is the dummy descriptor */
-                       DDADR(pcdev->dma_chans[i]) = buf_dma->sg_dma + nents *
-                               sizeof(struct pxa_dma_desc);
-
-                       DCSR(pcdev->dma_chans[i]) = DCSR_RUN;
-               }
-       }
+       if (!pcdev->active)
+               pxa_camera_start_capture(pcdev);
 
        spin_unlock_irqrestore(&pcdev->lock, flags);
 }
@@ -572,7 +678,7 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev,
                              struct videobuf_buffer *vb,
                              struct pxa_buffer *buf)
 {
-       unsigned long cicr0;
+       int i;
 
        /* _init is used to debug races, see comment in pxa_camera_reqbufs() */
        list_del_init(&vb->queue);
@@ -580,15 +686,12 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev,
        do_gettimeofday(&vb->ts);
        vb->field_count++;
        wake_up(&vb->done);
+       dev_dbg(pcdev->dev, "%s dequeud buffer (vb=0x%p)\n", __func__, vb);
 
        if (list_empty(&pcdev->capture)) {
-               pcdev->active = NULL;
-               DCSR(pcdev->dma_chans[0]) = 0;
-               DCSR(pcdev->dma_chans[1]) = 0;
-               DCSR(pcdev->dma_chans[2]) = 0;
-
-               cicr0 = __raw_readl(pcdev->base + CICR0) & ~CICR0_ENB;
-               __raw_writel(cicr0, pcdev->base + CICR0);
+               pxa_camera_stop_capture(pcdev);
+               for (i = 0; i < pcdev->channels; i++)
+                       pcdev->sg_tail[i] = NULL;
                return;
        }
 
@@ -596,6 +699,35 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev,
                                   struct pxa_buffer, vb.queue);
 }
 
+/**
+ * pxa_camera_check_link_miss - check missed DMA linking
+ * @pcdev: camera device
+ *
+ * The DMA chaining is done with DMA running. This means a tiny temporal window
+ * remains, where a buffer is queued on the chain, while the chain is already
+ * stopped. This means the tailed buffer would never be transfered by DMA.
+ * This function restarts the capture for this corner case, where :
+ *  - DADR() == DADDR_STOP
+ *  - a videobuffer is queued on the pcdev->capture list
+ *
+ * Please check the "DMA hot chaining timeslice issue" in
+ *   Documentation/video4linux/pxa_camera.txt
+ *
+ * Context: should only be called within the dma irq handler
+ */
+static void pxa_camera_check_link_miss(struct pxa_camera_dev *pcdev)
+{
+       int i, is_dma_stopped = 1;
+
+       for (i = 0; i < pcdev->channels; i++)
+               if (DDADR(pcdev->dma_chans[i]) != DDADR_STOP)
+                       is_dma_stopped = 0;
+       dev_dbg(pcdev->dev, "%s : top queued buffer=%p, dma_stopped=%d\n",
+               __func__, pcdev->active, is_dma_stopped);
+       if (pcdev->active && is_dma_stopped)
+               pxa_camera_start_capture(pcdev);
+}
+
 static void pxa_camera_dma_irq(int channel, struct pxa_camera_dev *pcdev,
                               enum pxa_camera_active_dma act_dma)
 {
@@ -603,61 +735,70 @@ static void pxa_camera_dma_irq(int channel, struct pxa_camera_dev *pcdev,
        unsigned long flags;
        u32 status, camera_status, overrun;
        struct videobuf_buffer *vb;
-       unsigned long cifr, cicr0;
 
        spin_lock_irqsave(&pcdev->lock, flags);
 
        status = DCSR(channel);
-       DCSR(channel) = status | DCSR_ENDINTR;
+       DCSR(channel) = status;
+
+       camera_status = __raw_readl(pcdev->base + CISR);
+       overrun = CISR_IFO_0;
+       if (pcdev->channels == 3)
+               overrun |= CISR_IFO_1 | CISR_IFO_2;
 
        if (status & DCSR_BUSERR) {
                dev_err(pcdev->dev, "DMA Bus Error IRQ!\n");
                goto out;
        }
 
-       if (!(status & DCSR_ENDINTR)) {
+       if (!(status & (DCSR_ENDINTR | DCSR_STARTINTR))) {
                dev_err(pcdev->dev, "Unknown DMA IRQ source, "
                        "status: 0x%08x\n", status);
                goto out;
        }
 
-       if (!pcdev->active) {
-               dev_err(pcdev->dev, "DMA End IRQ with no active buffer!\n");
-               goto out;
-       }
-
-       camera_status = __raw_readl(pcdev->base + CISR);
-       overrun = CISR_IFO_0;
-       if (pcdev->channels == 3)
-               overrun |= CISR_IFO_1 | CISR_IFO_2;
-       if (camera_status & overrun) {
-               dev_dbg(pcdev->dev, "FIFO overrun! CISR: %x\n", camera_status);
-               /* Stop the Capture Interface */
-               cicr0 = __raw_readl(pcdev->base + CICR0) & ~CICR0_ENB;
-               __raw_writel(cicr0, pcdev->base + CICR0);
-
-               /* Stop DMA */
-               DCSR(channel) = 0;
-               /* Reset the FIFOs */
-               cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
-               __raw_writel(cifr, pcdev->base + CIFR);
-               /* Enable End-Of-Frame Interrupt */
-               cicr0 &= ~CICR0_EOFM;
-               __raw_writel(cicr0, pcdev->base + CICR0);
-               /* Restart the Capture Interface */
-               __raw_writel(cicr0 | CICR0_ENB, pcdev->base + CICR0);
+       /*
+        * pcdev->active should not be NULL in DMA irq handler.
+        *
+        * But there is one corner case : if capture was stopped due to an
+        * overrun of channel 1, and at that same channel 2 was completed.
+        *
+        * When handling the overrun in DMA irq for channel 1, we'll stop the
+        * capture and restart it (and thus set pcdev->active to NULL). But the
+        * DMA irq handler will already be pending for channel 2. So on entering
+        * the DMA irq handler for channel 2 there will be no active buffer, yet
+        * that is normal.
+        */
+       if (!pcdev->active)
                goto out;
-       }
 
        vb = &pcdev->active->vb;
        buf = container_of(vb, struct pxa_buffer, vb);
        WARN_ON(buf->inwork || list_empty(&vb->queue));
-       dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
-               vb, vb->baddr, vb->bsize);
 
-       buf->active_dma &= ~act_dma;
-       if (!buf->active_dma)
-               pxa_camera_wakeup(pcdev, vb, buf);
+       dev_dbg(pcdev->dev, "%s channel=%d %s%s(vb=0x%p) dma.desc=%x\n",
+               __func__, channel, status & DCSR_STARTINTR ? "SOF " : "",
+               status & DCSR_ENDINTR ? "EOF " : "", vb, DDADR(channel));
+
+       if (status & DCSR_ENDINTR) {
+               /*
+                * It's normal if the last frame creates an overrun, as there
+                * are no more DMA descriptors to fetch from QCI fifos
+                */
+               if (camera_status & overrun &&
+                   !list_is_last(pcdev->capture.next, &pcdev->capture)) {
+                       dev_dbg(pcdev->dev, "FIFO overrun! CISR: %x\n",
+                               camera_status);
+                       pxa_camera_stop_capture(pcdev);
+                       pxa_camera_start_capture(pcdev);
+                       goto out;
+               }
+               buf->active_dma &= ~act_dma;
+               if (!buf->active_dma) {
+                       pxa_camera_wakeup(pcdev, vb, buf);
+                       pxa_camera_check_link_miss(pcdev);
+               }
+       }
 
 out:
        spin_unlock_irqrestore(&pcdev->lock, flags);
@@ -786,6 +927,8 @@ static irqreturn_t pxa_camera_irq(int irq, void *data)
 {
        struct pxa_camera_dev *pcdev = data;
        unsigned long status, cicr0;
+       struct pxa_buffer *buf;
+       struct videobuf_buffer *vb;
 
        status = __raw_readl(pcdev->base + CISR);
        dev_dbg(pcdev->dev, "Camera interrupt status 0x%lx\n", status);
@@ -796,12 +939,14 @@ static irqreturn_t pxa_camera_irq(int irq, void *data)
        __raw_writel(status, pcdev->base + CISR);
 
        if (status & CISR_EOF) {
-               int i;
-               for (i = 0; i < pcdev->channels; i++) {
-                       DDADR(pcdev->dma_chans[i]) =
-                               pcdev->active->dmas[i].sg_dma;
-                       DCSR(pcdev->dma_chans[i]) = DCSR_RUN;
-               }
+               pcdev->active = list_first_entry(&pcdev->capture,
+                                          struct pxa_buffer, vb.queue);
+               vb = &pcdev->active->vb;
+               buf = container_of(vb, struct pxa_buffer, vb);
+               pxa_videobuf_set_actdma(pcdev, buf);
+
+               pxa_dma_start_channels(pcdev);
+
                cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_EOFM;
                __raw_writel(cicr0, pcdev->base + CICR0);
        }
@@ -1265,6 +1410,18 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd,
                pix->width = 2048;
        pix->width &= ~0x01;
 
+       /*
+        * YUV422P planar format requires images size to be a 16 bytes
+        * multiple. If not, zeros will be inserted between Y and U planes, and
+        * U and V planes, and YUV422P standard would be violated.
+        */
+       if (xlate->host_fmt->fourcc == V4L2_PIX_FMT_YUV422P) {
+               if (!IS_ALIGNED(pix->width * pix->height, YUV422P_SIZE_ALIGN))
+                       pix->height = ALIGN(pix->height, YUV422P_X_Y_ALIGN);
+               if (!IS_ALIGNED(pix->width * pix->height, YUV422P_SIZE_ALIGN))
+                       pix->width = ALIGN(pix->width, YUV422P_X_Y_ALIGN);
+       }
+
        pix->bytesperline = pix->width *
                DIV_ROUND_UP(xlate->host_fmt->depth, 8);
        pix->sizeimage = pix->height * pix->bytesperline;
@@ -1372,18 +1529,8 @@ static int pxa_camera_resume(struct soc_camera_device *icd)
                ret = pcdev->icd->ops->resume(pcdev->icd);
 
        /* Restart frame capture if active buffer exists */
-       if (!ret && pcdev->active) {
-               unsigned long cifr, cicr0;
-
-               /* Reset the FIFOs */
-               cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
-               __raw_writel(cifr, pcdev->base + CIFR);
-
-               cicr0 = __raw_readl(pcdev->base + CICR0);
-               cicr0 &= ~CICR0_EOFM;   /* Enable End-Of-Frame Interrupt */
-               cicr0 |= CICR0_ENB;     /* Restart the Capture Interface */
-               __raw_writel(cicr0, pcdev->base + CICR0);
-       }
+       if (!ret && pcdev->active)
+               pxa_camera_start_capture(pcdev);
 
        return ret;
 }
index b5be633..5202cad 100644 (file)
@@ -722,7 +722,6 @@ static void free_buffer(struct videobuf_queue *vq, struct s2255_buffer *buf)
 {
        dprintk(4, "%s\n", __func__);
 
-       videobuf_waiton(&buf->vb, 0, 0);
        videobuf_vmalloc_free(&buf->vb);
        buf->vb.state = VIDEOBUF_NEEDS_INIT;
 }
@@ -1324,7 +1323,6 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
 
 static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
 {
-       int res;
        struct s2255_fh *fh = priv;
        struct s2255_dev *dev = fh->dev;
 
@@ -1338,9 +1336,7 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
                return -EINVAL;
        }
        s2255_stop_acquire(dev, fh->channel);
-       res = videobuf_streamoff(&fh->vb_vidq);
-       if (res < 0)
-               return res;
+       videobuf_streamoff(&fh->vb_vidq);
        res_free(dev, fh);
        return 0;
 }
@@ -1707,13 +1703,13 @@ static void s2255_destroy(struct kref *kref)
        kfree(dev->fw_data);
        usb_put_dev(dev->udev);
        dprintk(1, "%s", __func__);
-       kfree(dev);
 
        while (!list_empty(&s2255_devlist)) {
                list = s2255_devlist.next;
                list_del(list);
        }
        mutex_unlock(&dev->open_lock);
+       kfree(dev);
 }
 
 static int s2255_close(struct file *file)
index df4e08d..5c24c99 100644 (file)
@@ -299,17 +299,18 @@ static int saa7110_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int saa7110_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int saa7110_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct saa7110 *decoder = to_saa7110(sd);
 
-       if (route->input < 0 || route->input >= SAA7110_MAX_INPUT) {
-               v4l2_dbg(1, debug, sd, "input=%d not available\n", route->input);
+       if (input < 0 || input >= SAA7110_MAX_INPUT) {
+               v4l2_dbg(1, debug, sd, "input=%d not available\n", input);
                return -EINVAL;
        }
-       if (decoder->input != route->input) {
-               saa7110_selmux(sd, route->input);
-               v4l2_dbg(1, debug, sd, "switched to input=%d\n", route->input);
+       if (decoder->input != input) {
+               saa7110_selmux(sd, input);
+               v4l2_dbg(1, debug, sd, "switched to input=%d\n", input);
        }
        return 0;
 }
@@ -414,9 +415,6 @@ static const struct v4l2_subdev_core_ops saa7110_core_ops = {
        .g_ctrl = saa7110_g_ctrl,
        .s_ctrl = saa7110_s_ctrl,
        .queryctrl = saa7110_queryctrl,
-};
-
-static const struct v4l2_subdev_tuner_ops saa7110_tuner_ops = {
        .s_std = saa7110_s_std,
 };
 
@@ -429,7 +427,6 @@ static const struct v4l2_subdev_video_ops saa7110_video_ops = {
 
 static const struct v4l2_subdev_ops saa7110_ops = {
        .core = &saa7110_core_ops,
-       .tuner = &saa7110_tuner_ops,
        .video = &saa7110_video_ops,
 };
 
index cebf159..44873a0 100644 (file)
@@ -46,7 +46,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include <media/saa7115.h>
 #include <asm/div64.h>
 
@@ -62,12 +62,6 @@ module_param(debug, bool, 0644);
 
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
-static unsigned short normal_i2c[] = {
-               0x4a >> 1, 0x48 >> 1,   /* SAA7111, SAA7111A and SAA7113 */
-               0x42 >> 1, 0x40 >> 1,   /* SAA7114, SAA7115 and SAA7118 */
-               I2C_CLIENT_END };
-
-I2C_CLIENT_INSMOD;
 
 struct saa711x_state {
        struct v4l2_subdev sd;
@@ -1234,30 +1228,32 @@ static int saa711x_s_radio(struct v4l2_subdev *sd)
        return 0;
 }
 
-static int saa711x_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int saa711x_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct saa711x_state *state = to_state(sd);
-       u32 input = route->input;
        u8 mask = (state->ident == V4L2_IDENT_SAA7111) ? 0xf8 : 0xf0;
 
-       v4l2_dbg(1, debug, sd, "decoder set input %d output %d\n", route->input, route->output);
+       v4l2_dbg(1, debug, sd, "decoder set input %d output %d\n",
+               input, output);
+
        /* saa7111/3 does not have these inputs */
        if ((state->ident == V4L2_IDENT_SAA7113 ||
             state->ident == V4L2_IDENT_SAA7111) &&
-           (route->input == SAA7115_COMPOSITE4 ||
-            route->input == SAA7115_COMPOSITE5)) {
+           (input == SAA7115_COMPOSITE4 ||
+            input == SAA7115_COMPOSITE5)) {
                return -EINVAL;
        }
-       if (route->input > SAA7115_SVIDEO3)
+       if (input > SAA7115_SVIDEO3)
                return -EINVAL;
-       if (route->output > SAA7115_IPORT_ON)
+       if (output > SAA7115_IPORT_ON)
                return -EINVAL;
-       if (state->input == route->input && state->output == route->output)
+       if (state->input == input && state->output == output)
                return 0;
        v4l2_dbg(1, debug, sd, "now setting %s input %s output\n",
-               (route->input >= SAA7115_SVIDEO0) ? "S-Video" : "Composite",
-               (route->output == SAA7115_IPORT_ON) ? "iport on" : "iport off");
-       state->input = route->input;
+               (input >= SAA7115_SVIDEO0) ? "S-Video" : "Composite",
+               (output == SAA7115_IPORT_ON) ? "iport on" : "iport off");
+       state->input = input;
 
        /* saa7111 has slightly different input numbering */
        if (state->ident == V4L2_IDENT_SAA7111) {
@@ -1266,10 +1262,10 @@ static int saa711x_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *
                /* saa7111 specific */
                saa711x_write(sd, R_10_CHROMA_CNTL_2,
                                (saa711x_read(sd, R_10_CHROMA_CNTL_2) & 0x3f) |
-                               ((route->output & 0xc0) ^ 0x40));
+                               ((output & 0xc0) ^ 0x40));
                saa711x_write(sd, R_13_RT_X_PORT_OUT_CNTL,
                                (saa711x_read(sd, R_13_RT_X_PORT_OUT_CNTL) & 0xf0) |
-                               ((route->output & 2) ? 0x0a : 0));
+                               ((output & 2) ? 0x0a : 0));
        }
 
        /* select mode */
@@ -1282,7 +1278,7 @@ static int saa711x_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *
                        (saa711x_read(sd, R_09_LUMA_CNTL) & 0x7f) |
                        (state->input >= SAA7115_SVIDEO0 ? 0x80 : 0x0));
 
-       state->output = route->output;
+       state->output = output;
        if (state->ident == V4L2_IDENT_SAA7114 ||
                        state->ident == V4L2_IDENT_SAA7115) {
                saa711x_write(sd, R_83_X_PORT_I_O_ENA_AND_OUT_CLK,
@@ -1319,17 +1315,16 @@ static int saa711x_s_stream(struct v4l2_subdev *sd, int enable)
        return 0;
 }
 
-static int saa711x_s_crystal_freq(struct v4l2_subdev *sd, struct v4l2_crystal_freq *freq)
+static int saa711x_s_crystal_freq(struct v4l2_subdev *sd, u32 freq, u32 flags)
 {
        struct saa711x_state *state = to_state(sd);
 
-       if (freq->freq != SAA7115_FREQ_32_11_MHZ &&
-                       freq->freq != SAA7115_FREQ_24_576_MHZ)
+       if (freq != SAA7115_FREQ_32_11_MHZ && freq != SAA7115_FREQ_24_576_MHZ)
                return -EINVAL;
-       state->crystal_freq = freq->freq;
-       state->cgcdiv = (freq->flags & SAA7115_FREQ_FL_CGCDIV) ? 3 : 4;
-       state->ucgc = (freq->flags & SAA7115_FREQ_FL_UCGC) ? 1 : 0;
-       state->apll = (freq->flags & SAA7115_FREQ_FL_APLL) ? 1 : 0;
+       state->crystal_freq = freq;
+       state->cgcdiv = (flags & SAA7115_FREQ_FL_CGCDIV) ? 3 : 4;
+       state->ucgc = (flags & SAA7115_FREQ_FL_UCGC) ? 1 : 0;
+       state->apll = (flags & SAA7115_FREQ_FL_APLL) ? 1 : 0;
        saa711x_s_clock_freq(sd, state->audclk_freq);
        return 0;
 }
@@ -1498,11 +1493,6 @@ static int saa711x_log_status(struct v4l2_subdev *sd)
        return 0;
 }
 
-static int saa711x_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops saa711x_core_ops = {
@@ -1511,6 +1501,7 @@ static const struct v4l2_subdev_core_ops saa711x_core_ops = {
        .g_ctrl = saa711x_g_ctrl,
        .s_ctrl = saa711x_s_ctrl,
        .queryctrl = saa711x_queryctrl,
+       .s_std = saa711x_s_std,
        .reset = saa711x_reset,
        .s_gpio = saa711x_s_gpio,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
@@ -1520,7 +1511,6 @@ static const struct v4l2_subdev_core_ops saa711x_core_ops = {
 };
 
 static const struct v4l2_subdev_tuner_ops saa711x_tuner_ops = {
-       .s_std = saa711x_s_std,
        .s_radio = saa711x_s_radio,
        .g_tuner = saa711x_g_tuner,
 };
@@ -1676,10 +1666,7 @@ MODULE_DEVICE_TABLE(i2c, saa7115_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "saa7115",
-       .driverid = I2C_DRIVERID_SAA711X,
-       .command = saa711x_command,
        .probe = saa711x_probe,
        .remove = saa711x_remove,
-       .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
        .id_table = saa7115_id,
 };
index 128bb8b..2fe7a70 100644 (file)
@@ -570,15 +570,16 @@ static int saa7127_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
        return saa7127_set_std(sd, std);
 }
 
-static int saa7127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int saa7127_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct saa7127_state *state = to_state(sd);
        int rc = 0;
 
-       if (state->input_type != route->input)
-               rc = saa7127_set_input_type(sd, route->input);
-       if (rc == 0 && state->output_type != route->output)
-               rc = saa7127_set_output_type(sd, route->output);
+       if (state->input_type != input)
+               rc = saa7127_set_input_type(sd, input);
+       if (rc == 0 && state->output_type != output)
+               rc = saa7127_set_output_type(sd, output);
        return rc;
 }
 
index dc2213e..63c4b8f 100644 (file)
@@ -928,9 +928,6 @@ static const struct v4l2_subdev_core_ops saa6752hs_core_ops = {
        .g_ext_ctrls = saa6752hs_g_ext_ctrls,
        .s_ext_ctrls = saa6752hs_s_ext_ctrls,
        .try_ext_ctrls = saa6752hs_try_ext_ctrls,
-};
-
-static const struct v4l2_subdev_tuner_ops saa6752hs_tuner_ops = {
        .s_std = saa6752hs_s_std,
 };
 
@@ -941,7 +938,6 @@ static const struct v4l2_subdev_video_ops saa6752hs_video_ops = {
 
 static const struct v4l2_subdev_ops saa6752hs_ops = {
        .core = &saa6752hs_core_ops,
-       .tuner = &saa6752hs_tuner_ops,
        .video = &saa6752hs_video_ops,
 };
 
index a790a72..fdb1944 100644 (file)
@@ -4508,12 +4508,17 @@ struct saa7134_board saa7134_boards[] = {
                /* Matthias Schwarzott <zzam@gentoo.org> */
                .name           = "Avermedia DVB-S Hybrid+FM A700",
                .audio_clock    = 0x00187de7,
-               .tuner_type     = TUNER_ABSENT, /* TUNER_XC2028 */
+               .tuner_type     = TUNER_XC2028,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .mpeg           = SAA7134_MPEG_DVB,
                .inputs         = { {
+                       .name   = name_tv,
+                       .vmux   = 4,
+                       .amux   = TV,
+                       .tv     = 1,
+               }, {
                        .name = name_comp,
                        .vmux = 1,
                        .amux = LINE1,
@@ -4522,6 +4527,10 @@ struct saa7134_board saa7134_boards[] = {
                        .vmux = 6,
                        .amux = LINE1,
                } },
+               .radio = {
+                       .name = name_radio,
+                       .amux = TV,
+               },
        },
        [SAA7134_BOARD_BEHOLD_H6] = {
                /* Igor Kuznetsov <igk@igk.ru> */
@@ -5914,6 +5923,11 @@ static int saa7134_xc2028_callback(struct saa7134_dev *dev,
                        msleep(10);
                        saa7134_set_gpio(dev, 21, 1);
                break;
+               case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
+                       saa7134_set_gpio(dev, 18, 0);
+                       msleep(10);
+                       saa7134_set_gpio(dev, 18, 1);
+               break;
                }
        return 0;
        }
@@ -6259,10 +6273,6 @@ int saa7134_board_init1(struct saa7134_dev *dev)
                saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0c0007cd, 0x0c0007cd);
                break;
        case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
-               printk("%s: %s: hybrid analog/dvb card\n"
-                      "%s: Sorry, of the analog inputs, only analog s-video and composite "
-                      "are supported for now.\n",
-                       dev->name, card(dev).name, dev->name);
        case SAA7134_BOARD_AVERMEDIA_A700_PRO:
                /* write windows gpio values */
                saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x80040100, 0x80040100);
@@ -6326,6 +6336,7 @@ static void saa7134_tuner_setup(struct saa7134_dev *dev)
                case SAA7134_BOARD_AVERMEDIA_A16D:
                case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
                case SAA7134_BOARD_AVERMEDIA_M103:
+               case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
                        ctl.demod = XC3028_FE_ZARLINK456;
                        break;
                default:
@@ -6599,20 +6610,24 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                /* Note: radio tuner address is always filled in,
                   so we do not need to probe for a radio tuner device. */
                if (dev->radio_type != UNSET)
-                       v4l2_i2c_new_subdev(&dev->i2c_adap,
-                               "tuner", "tuner", dev->radio_addr);
+                       v4l2_i2c_new_subdev(&dev->v4l2_dev,
+                               &dev->i2c_adap, "tuner", "tuner",
+                               dev->radio_addr);
                if (has_demod)
-                       v4l2_i2c_new_probed_subdev(&dev->i2c_adap, "tuner",
-                               "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
+                       v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
+                               &dev->i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
                if (dev->tuner_addr == ADDR_UNSET) {
                        enum v4l2_i2c_tuner_type type =
                                has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
 
-                       v4l2_i2c_new_probed_subdev(&dev->i2c_adap, "tuner",
-                               "tuner", v4l2_i2c_tuner_addrs(type));
+                       v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
+                               &dev->i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(type));
                } else {
-                       v4l2_i2c_new_subdev(&dev->i2c_adap,
-                               "tuner", "tuner", dev->tuner_addr);
+                       v4l2_i2c_new_subdev(&dev->v4l2_dev,
+                               &dev->i2c_adap, "tuner", "tuner",
+                               dev->tuner_addr);
                }
        }
 
index dafa0d8..2def6fe 100644 (file)
@@ -911,7 +911,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
               pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
               dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
        pci_set_master(pci_dev);
-       if (!pci_dma_supported(pci_dev, DMA_32BIT_MASK)) {
+       if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) {
                printk("%s: Oops: no 32bit PCI DMA ???\n",dev->name);
                err = -EIO;
                goto fail1;
@@ -982,7 +982,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
        /* load i2c helpers */
        if (card_is_empress(dev)) {
                struct v4l2_subdev *sd =
-                       v4l2_i2c_new_subdev(&dev->i2c_adap,
+                       v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
                                "saa6752hs", "saa6752hs",
                                saa7134_boards[dev->board].empress_addr);
 
@@ -991,12 +991,11 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
        }
 
        if (saa7134_boards[dev->board].rds_addr) {
-               unsigned short addrs[2] = { 0, I2C_CLIENT_END };
                struct v4l2_subdev *sd;
 
-               addrs[0] = saa7134_boards[dev->board].rds_addr;
-               sd = v4l2_i2c_new_probed_subdev(&dev->i2c_adap, "saa6588",
-                           "saa6588", addrs);
+               sd = v4l2_i2c_new_probed_subdev_addr(&dev->v4l2_dev,
+                               &dev->i2c_adap, "saa6588", "saa6588",
+                               saa7134_boards[dev->board].rds_addr);
                if (sd)
                        printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
        }
@@ -1015,7 +1014,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
        saa7134_irq_video_signalchange(dev);
 
        if (TUNER_ABSENT != dev->tuner_type)
-               saa_call_all(dev, core, s_standby, 0);
+               saa_call_all(dev, tuner, s_standby);
 
        /* register v4l devices */
        if (saa7134_no_overlay > 0)
index 404f70e..493cad9 100644 (file)
@@ -625,10 +625,10 @@ void saa7134_set_tvnorm_hw(struct saa7134_dev *dev)
        saa7134_set_decoder(dev);
 
        if (card_in(dev, dev->ctl_input).tv)
-               saa_call_all(dev, tuner, s_std, dev->tvnorm->id);
+               saa_call_all(dev, core, s_std, dev->tvnorm->id);
        /* Set the correct norm for the saa6752hs. This function
           does nothing if there is no saa6752hs. */
-       saa_call_empress(dev, tuner, s_std, dev->tvnorm->id);
+       saa_call_empress(dev, core, s_std, dev->tvnorm->id);
 }
 
 static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale)
@@ -1496,7 +1496,7 @@ static int video_release(struct file *file)
        saa_andorb(SAA7134_OFMT_DATA_A, 0x1f, 0);
        saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0);
 
-       saa_call_all(dev, core, s_standby, 0);
+       saa_call_all(dev, tuner, s_standby);
        if (fh->radio)
                saa_call_all(dev, core, ioctl, RDS_CMD_CLOSE, &cmd);
 
index a2dd326..0cbaf90 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <linux/version.h>
-#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,14)
+#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,15)
 
 #include <linux/pci.h>
 #include <linux/i2c.h>
index 25bf230..b15c409 100644 (file)
@@ -1104,22 +1104,22 @@ static struct v4l2_queryctrl saa717x_qctrl[] = {
        },
 };
 
-static int saa717x_s_video_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int saa717x_s_video_routing(struct v4l2_subdev *sd,
+                                  u32 input, u32 output, u32 config)
 {
        struct saa717x_state *decoder = to_state(sd);
-       int inp = route->input;
-       int is_tuner = inp & 0x80;  /* tuner input flag */
+       int is_tuner = input & 0x80;  /* tuner input flag */
 
-       inp &= 0x7f;
+       input &= 0x7f;
 
-       v4l2_dbg(1, debug, sd, "decoder set input (%d)\n", inp);
+       v4l2_dbg(1, debug, sd, "decoder set input (%d)\n", input);
        /* inputs from 0-9 are available*/
        /* saa717x have mode0-mode9 but mode5 is reserved. */
-       if (inp < 0 || inp > 9 || inp == 5)
+       if (input < 0 || input > 9 || input == 5)
                return -EINVAL;
 
-       if (decoder->input != inp) {
-               int input_line = inp;
+       if (decoder->input != input) {
+               int input_line = input;
 
                decoder->input = input_line;
                v4l2_dbg(1, debug, sd,  "now setting %s input %d\n",
@@ -1276,12 +1276,13 @@ static int saa717x_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int saa717x_s_audio_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int saa717x_s_audio_routing(struct v4l2_subdev *sd,
+                                  u32 input, u32 output, u32 config)
 {
        struct saa717x_state *decoder = to_state(sd);
 
-       if (route->input < 3) { /* FIXME! --tadachi */
-               decoder->audio_input = route->input;
+       if (input < 3) { /* FIXME! --tadachi */
+               decoder->audio_input = input;
                v4l2_dbg(1, debug, sd,
                                "set decoder audio input to %d\n",
                                decoder->audio_input);
@@ -1390,12 +1391,12 @@ static const struct v4l2_subdev_core_ops saa717x_core_ops = {
        .queryctrl = saa717x_queryctrl,
        .g_ctrl = saa717x_g_ctrl,
        .s_ctrl = saa717x_s_ctrl,
+       .s_std = saa717x_s_std,
 };
 
 static const struct v4l2_subdev_tuner_ops saa717x_tuner_ops = {
        .g_tuner = saa717x_g_tuner,
        .s_tuner = saa717x_s_tuner,
-       .s_std = saa717x_s_std,
        .s_radio = saa717x_s_radio,
 };
 
index 75747b1..212baa1 100644 (file)
@@ -245,14 +245,15 @@ static int saa7185_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int saa7185_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int saa7185_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct saa7185 *encoder = to_saa7185(sd);
 
-       /* RJ: route->input = 0: input is from SA7111
-        route->input = 1: input is from ZR36060 */
+       /* RJ: input = 0: input is from SA7111
+        input = 1: input is from ZR36060 */
 
-       switch (route->input) {
+       switch (input) {
        case 0:
                /* turn off colorbar */
                saa7185_write(sd, 0x3a, 0x0f);
index 3f523ae..a251377 100644 (file)
@@ -160,14 +160,14 @@ static int saa7191_write_block(struct v4l2_subdev *sd,
 /* Helper functions */
 
 static int saa7191_s_routing(struct v4l2_subdev *sd,
-                               const struct v4l2_routing *route)
+                            u32 input, u32 output, u32 config)
 {
        struct saa7191 *decoder = to_saa7191(sd);
        u8 luma = saa7191_read_reg(sd, SAA7191_REG_LUMA);
        u8 iock = saa7191_read_reg(sd, SAA7191_REG_IOCK);
        int err;
 
-       switch (route->input) {
+       switch (input) {
        case SAA7191_INPUT_COMPOSITE: /* Set Composite input */
                iock &= ~(SAA7191_IOCK_CHRS | SAA7191_IOCK_GPSW1
                          | SAA7191_IOCK_GPSW2);
@@ -190,7 +190,7 @@ static int saa7191_s_routing(struct v4l2_subdev *sd,
        if (err)
                return -EIO;
 
-       decoder->input = route->input;
+       decoder->input = input;
 
        return 0;
 }
@@ -582,9 +582,6 @@ static const struct v4l2_subdev_core_ops saa7191_core_ops = {
        .g_chip_ident = saa7191_g_chip_ident,
        .g_ctrl = saa7191_g_ctrl,
        .s_ctrl = saa7191_s_ctrl,
-};
-
-static const struct v4l2_subdev_tuner_ops saa7191_tuner_ops = {
        .s_std = saa7191_s_std,
 };
 
@@ -597,7 +594,6 @@ static const struct v4l2_subdev_video_ops saa7191_video_ops = {
 static const struct v4l2_subdev_ops saa7191_ops = {
        .core = &saa7191_core_ops,
        .video = &saa7191_video_ops,
-       .tuner = &saa7191_tuner_ops,
 };
 
 static int saa7191_probe(struct i2c_client *client,
index 6d8bfd4..0e890cc 100644 (file)
@@ -764,7 +764,10 @@ static int soc_camera_s_register(struct file *file, void *fh,
 
 static int device_register_link(struct soc_camera_device *icd)
 {
-       int ret = device_register(&icd->dev);
+       int ret = dev_set_name(&icd->dev, "%u-%u", icd->iface, icd->devnum);
+
+       if (!ret)
+               ret = device_register(&icd->dev);
 
        if (ret < 0) {
                /* Prevent calling device_unregister() */
@@ -1060,7 +1063,6 @@ int soc_camera_device_register(struct soc_camera_device *icd)
 
        icd->devnum = num;
        icd->dev.bus = &soc_camera_bus_type;
-       dev_set_name(&icd->dev, "%u-%u", icd->iface, icd->devnum);
 
        icd->dev.release        = dummy_release;
        icd->use_count          = 0;
index fe11580..d381fce 100644 (file)
@@ -192,7 +192,6 @@ static int tda9840_remove(struct i2c_client *client)
        return 0;
 }
 
-
 static const struct i2c_device_id tda9840_id[] = {
        { "tda9840", 0 },
        { }
index d61c56f..d4a9ed4 100644 (file)
@@ -47,12 +47,11 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 
 /* makes a connection between the input-pin 'i' and the output-pin 'o' */
-static int tea6415c_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int tea6415c_s_routing(struct v4l2_subdev *sd,
+                             u32 i, u32 o, u32 config)
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        u8 byte = 0;
-       u32 i = route->input;
-       u32 o = route->output;
        int ret;
 
        v4l2_dbg(1, debug, sd, "i=%d, o=%d\n", i, o);
@@ -170,7 +169,6 @@ static int tea6415c_remove(struct i2c_client *client)
        return 0;
 }
 
-
 static const struct i2c_device_id tea6415c_id[] = {
        { "tea6415c", 0 },
        { }
index 3492223..ced6ead 100644 (file)
@@ -48,15 +48,15 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 /* make a connection between the input 'i' and the output 'o'
    with gain 'g' (note: i = 6 means 'mute') */
-static int tea6420_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int tea6420_s_routing(struct v4l2_subdev *sd,
+                            u32 i, u32 o, u32 config)
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
-       int i = route->input;
-       int o = route->output & 0xf;
-       int g = (route->output >> 4) & 0xf;
+       int g = (o >> 4) & 0xf;
        u8 byte;
        int ret;
 
+       o &= 0xf;
        v4l2_dbg(1, debug, sd, "i=%d, o=%d, g=%d\n", i, o, g);
 
        /* check if the parameters are valid */
@@ -133,13 +133,8 @@ static int tea6420_probe(struct i2c_client *client,
 
        /* set initial values: set "mute"-input to all outputs at gain 0 */
        err = 0;
-       for (i = 1; i < 5; i++) {
-               struct v4l2_routing route;
-
-               route.input = 6;
-               route.output = i;
-               err += tea6420_s_routing(sd, &route);
-       }
+       for (i = 1; i < 5; i++)
+               err += tea6420_s_routing(sd, 6, i, 0);
        if (err) {
                v4l_dbg(1, debug, client, "could not initialize tea6420\n");
                return -ENODEV;
@@ -156,7 +151,6 @@ static int tea6420_remove(struct i2c_client *client)
        return 0;
 }
 
-
 static const struct i2c_device_id tea6420_id[] = {
        { "tea6420", 0 },
        { }
index 72d4103..78c377a 100644 (file)
 #include <linux/i2c.h>
 #include <linux/types.h>
 #include <linux/init.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <media/tuner.h>
 #include <media/tuner-types.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include "mt20xx.h"
 #include "tda8290.h"
 #include "tea5761.h"
@@ -101,18 +101,6 @@ static inline struct tuner *to_tuner(struct v4l2_subdev *sd)
        return container_of(sd, struct tuner, sd);
 }
 
-/* standard i2c insmod options */
-static unsigned short normal_i2c[] = {
-#if defined(CONFIG_MEDIA_TUNER_TEA5761) || (defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE) && defined(MODULE))
-       0x10,
-#endif
-       0x42, 0x43, 0x4a, 0x4b,                 /* tda8290 */
-       0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
-       0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
-       I2C_CLIENT_END
-};
-
-I2C_CLIENT_INSMOD;
 
 /* insmod options used at init time => read/only */
 static unsigned int addr;
@@ -785,7 +773,7 @@ static int tuner_s_radio(struct v4l2_subdev *sd)
        return 0;
 }
 
-static int tuner_s_standby(struct v4l2_subdev *sd, u32 standby)
+static int tuner_s_standby(struct v4l2_subdev *sd)
 {
        struct tuner *t = to_tuner(sd);
        struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
@@ -951,11 +939,6 @@ static int tuner_log_status(struct v4l2_subdev *sd)
        return 0;
 }
 
-static int tuner_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 static int tuner_suspend(struct i2c_client *c, pm_message_t state)
 {
        struct tuner *t = to_tuner(i2c_get_clientdata(c));
@@ -980,15 +963,28 @@ static int tuner_resume(struct i2c_client *c)
        return 0;
 }
 
+static int tuner_command(struct i2c_client *client, unsigned cmd, void *arg)
+{
+       struct v4l2_subdev *sd = i2c_get_clientdata(client);
+
+       /* TUNER_SET_CONFIG is still called by tuner-simple.c, so we have
+          to handle it here.
+          There must be a better way of doing this... */
+       switch (cmd) {
+       case TUNER_SET_CONFIG:
+               return tuner_s_config(sd, arg);
+       }
+       return -ENOIOCTLCMD;
+}
+
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops tuner_core_ops = {
        .log_status = tuner_log_status,
-       .s_standby = tuner_s_standby,
+       .s_std = tuner_s_std,
 };
 
 static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = {
-       .s_std = tuner_s_std,
        .s_radio = tuner_s_radio,
        .g_tuner = tuner_g_tuner,
        .s_tuner = tuner_s_tuner,
@@ -996,6 +992,7 @@ static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = {
        .g_frequency = tuner_g_frequency,
        .s_type_addr = tuner_s_type_addr,
        .s_config = tuner_s_config,
+       .s_standby = tuner_s_standby,
 };
 
 static const struct v4l2_subdev_ops tuner_ops = {
@@ -1023,7 +1020,7 @@ static void tuner_lookup(struct i2c_adapter *adap,
                int mode_mask;
 
                if (pos->i2c->adapter != adap ||
-                   pos->i2c->driver->id != I2C_DRIVERID_TUNER)
+                   strcmp(pos->i2c->driver->driver.name, "tuner"))
                        continue;
 
                mode_mask = pos->mode_mask & ~T_STANDBY;
@@ -1167,40 +1164,6 @@ register_client:
        return 0;
 }
 
-static int tuner_legacy_probe(struct i2c_adapter *adap)
-{
-       if (0 != addr) {
-               normal_i2c[0] = addr;
-               normal_i2c[1] = I2C_CLIENT_END;
-       }
-
-       if ((adap->class & I2C_CLASS_TV_ANALOG) == 0)
-               return 0;
-
-       /* HACK: Ignore 0x6b and 0x6f on cx88 boards.
-        * FusionHDTV5 RT Gold has an ir receiver at 0x6b
-        * and an RTC at 0x6f which can get corrupted if probed.
-        */
-       if ((adap->id == I2C_HW_B_CX2388x) ||
-           (adap->id == I2C_HW_B_CX23885)) {
-               unsigned int i = 0;
-
-               while (i < I2C_CLIENT_MAX_OPTS && ignore[i] != I2C_CLIENT_END)
-                       i += 2;
-               if (i + 4 < I2C_CLIENT_MAX_OPTS) {
-                       ignore[i+0] = adap->nr;
-                       ignore[i+1] = 0x6b;
-                       ignore[i+2] = adap->nr;
-                       ignore[i+3] = 0x6f;
-                       ignore[i+4] = I2C_CLIENT_END;
-               } else
-                       printk(KERN_WARNING "tuner: "
-                              "too many options specified "
-                              "in i2c probe ignore list!\n");
-       }
-       return 1;
-}
-
 static int tuner_remove(struct i2c_client *client)
 {
        struct tuner *t = to_tuner(i2c_get_clientdata(client));
@@ -1227,13 +1190,11 @@ MODULE_DEVICE_TABLE(i2c, tuner_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "tuner",
-       .driverid = I2C_DRIVERID_TUNER,
-       .command = tuner_command,
        .probe = tuner_probe,
        .remove = tuner_remove,
+       .command = tuner_command,
        .suspend = tuner_suspend,
        .resume = tuner_resume,
-       .legacy_probe = tuner_legacy_probe,
        .id_table = tuner_id,
 };
 
index 226bf35..0869baf 100644 (file)
@@ -35,7 +35,7 @@
 #include <media/tvaudio.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 
 #include <media/i2c-addr.h>
 
@@ -136,20 +136,6 @@ static inline struct CHIPSTATE *to_state(struct v4l2_subdev *sd)
        return container_of(sd, struct CHIPSTATE, sd);
 }
 
-/* ---------------------------------------------------------------------- */
-/* i2c addresses                                                          */
-
-static unsigned short normal_i2c[] = {
-       I2C_ADDR_TDA8425   >> 1,
-       I2C_ADDR_TEA6300   >> 1,
-       I2C_ADDR_TEA6420   >> 1,
-       I2C_ADDR_TDA9840   >> 1,
-       I2C_ADDR_TDA985x_L >> 1,
-       I2C_ADDR_TDA985x_H >> 1,
-       I2C_ADDR_TDA9874   >> 1,
-       I2C_ADDR_PIC16C54  >> 1,
-       I2C_CLIENT_END };
-I2C_CLIENT_INSMOD;
 
 /* ---------------------------------------------------------------------- */
 /* i2c I/O functions                                                      */
@@ -1795,17 +1781,18 @@ static int tvaudio_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
        return -EINVAL;
 }
 
-static int tvaudio_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *rt)
+static int tvaudio_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct CHIPSTATE *chip = to_state(sd);
        struct CHIPDESC *desc = chip->desc;
 
        if (!(desc->flags & CHIP_HAS_INPUTSEL))
                return 0;
-       if (rt->input >= 4)
+       if (input >= 4)
                return -EINVAL;
        /* There are four inputs: tuner, radio, extern and intern. */
-       chip->input = rt->input;
+       chip->input = input;
        if (chip->muted)
                return 0;
        chip_write_masked(chip, desc->inputreg,
@@ -1918,11 +1905,6 @@ static int tvaudio_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ide
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVAUDIO, 0);
 }
 
-static int tvaudio_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops tvaudio_core_ops = {
@@ -1930,12 +1912,12 @@ static const struct v4l2_subdev_core_ops tvaudio_core_ops = {
        .queryctrl = tvaudio_queryctrl,
        .g_ctrl = tvaudio_g_ctrl,
        .s_ctrl = tvaudio_s_ctrl,
+       .s_std = tvaudio_s_std,
 };
 
 static const struct v4l2_subdev_tuner_ops tvaudio_tuner_ops = {
        .s_radio = tvaudio_s_radio,
        .s_frequency = tvaudio_s_frequency,
-       .s_std = tvaudio_s_std,
        .s_tuner = tvaudio_s_tuner,
        .s_tuner = tvaudio_g_tuner,
 };
@@ -2088,17 +2070,6 @@ static int tvaudio_remove(struct i2c_client *client)
        return 0;
 }
 
-static int tvaudio_legacy_probe(struct i2c_adapter *adap)
-{
-       /* don't attach on saa7146 based cards,
-          because dedicated drivers are used */
-       if ((adap->id == I2C_HW_SAA7146))
-               return 0;
-       if (adap->class & I2C_CLASS_TV_ANALOG)
-               return 1;
-       return 0;
-}
-
 /* This driver supports many devices and the idea is to let the driver
    detect which device is present. So rather than listing all supported
    devices here, we pretend to support a single, fake device type. */
@@ -2110,10 +2081,7 @@ MODULE_DEVICE_TABLE(i2c, tvaudio_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "tvaudio",
-       .driverid = I2C_DRIVERID_TVAUDIO,
-       .command = tvaudio_command,
        .probe = tvaudio_probe,
        .remove = tvaudio_remove,
-       .legacy_probe = tvaudio_legacy_probe,
        .id_table = tvaudio_id,
 };
index 3a5a95f..2d38e25 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/delay.h>
 #include <media/v4l2-device.h>
 #include <media/tvp5150.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include <media/v4l2-chip-ident.h>
 
 #include "tvp5150_reg.h"
@@ -19,14 +19,6 @@ MODULE_DESCRIPTION("Texas Instruments TVP5150A video decoder driver");
 MODULE_AUTHOR("Mauro Carvalho Chehab");
 MODULE_LICENSE("GPL");
 
-/* standard i2c insmod options */
-static unsigned short normal_i2c[] = {
-       0xb8 >> 1,
-       0xba >> 1,
-       I2C_CLIENT_END
-};
-
-I2C_CLIENT_INSMOD;
 
 static int debug;
 module_param(debug, int, 0);
@@ -77,7 +69,8 @@ struct tvp5150 {
        struct v4l2_subdev sd;
 
        v4l2_std_id norm;       /* Current set standard */
-       struct v4l2_routing route;
+       u32 input;
+       u32 output;
        int enable;
        int bright;
        int contrast;
@@ -288,10 +281,10 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd)
        int input = 0;
        unsigned char val;
 
-       if ((decoder->route.output & TVP5150_BLACK_SCREEN) || !decoder->enable)
+       if ((decoder->output & TVP5150_BLACK_SCREEN) || !decoder->enable)
                input = 8;
 
-       switch (decoder->route.input) {
+       switch (decoder->input) {
        case TVP5150_COMPOSITE1:
                input |= 2;
                /* fall through */
@@ -307,8 +300,8 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd)
 
        v4l2_dbg(1, debug, sd, "Selecting video route: route input=%i, output=%i "
                        "=> tvp5150 input=%i, opmode=%i\n",
-                       decoder->route.input,decoder->route.output,
-                       input, opmode );
+                       decoder->input, decoder->output,
+                       input, opmode);
 
        tvp5150_write(sd, TVP5150_OP_MODE_CTL, opmode);
        tvp5150_write(sd, TVP5150_VD_IN_SRC_SEL_1, input);
@@ -317,7 +310,7 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd)
         * For Composite and TV, it should be the reverse
         */
        val = tvp5150_read(sd, TVP5150_MISC_CTL);
-       if (decoder->route.input == TVP5150_SVIDEO)
+       if (decoder->input == TVP5150_SVIDEO)
                val = (val & ~0x40) | 0x10;
        else
                val = (val & ~0x10) | 0x40;
@@ -886,11 +879,13 @@ static int tvp5150_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
                        I2C Command
  ****************************************************************************/
 
-static int tvp5150_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int tvp5150_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        struct tvp5150 *decoder = to_tvp5150(sd);
 
-       decoder->route = *route;
+       decoder->input = input;
+       decoder->output = output;
        tvp5150_selmux(sd);
        return 0;
 }
@@ -1026,11 +1021,6 @@ static int tvp5150_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
        return -EINVAL;
 }
 
-static int tvp5150_command(struct i2c_client *client, unsigned cmd, void *arg)
-{
-       return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops tvp5150_core_ops = {
@@ -1038,6 +1028,7 @@ static const struct v4l2_subdev_core_ops tvp5150_core_ops = {
        .g_ctrl = tvp5150_g_ctrl,
        .s_ctrl = tvp5150_s_ctrl,
        .queryctrl = tvp5150_queryctrl,
+       .s_std = tvp5150_s_std,
        .reset = tvp5150_reset,
        .g_chip_ident = tvp5150_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
@@ -1047,7 +1038,6 @@ static const struct v4l2_subdev_core_ops tvp5150_core_ops = {
 };
 
 static const struct v4l2_subdev_tuner_ops tvp5150_tuner_ops = {
-       .s_std = tvp5150_s_std,
        .g_tuner = tvp5150_g_tuner,
 };
 
@@ -1090,7 +1080,7 @@ static int tvp5150_probe(struct i2c_client *c,
                 c->addr << 1, c->adapter->name);
 
        core->norm = V4L2_STD_ALL;      /* Default is autodetect */
-       core->route.input = TVP5150_COMPOSITE1;
+       core->input = TVP5150_COMPOSITE1;
        core->enable = 1;
        core->bright = 128;
        core->contrast = 128;
@@ -1125,9 +1115,7 @@ MODULE_DEVICE_TABLE(i2c, tvp5150_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "tvp5150",
-       .command = tvp5150_command,
        .probe = tvp5150_probe,
        .remove = tvp5150_remove,
-       .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
        .id_table = tvp5150_id,
 };
index c0ac651..a07a3fb 100644 (file)
@@ -124,17 +124,18 @@ static int upd64031a_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *
 
 /* ------------------------------------------------------------------------ */
 
-static int upd64031a_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int upd64031a_s_routing(struct v4l2_subdev *sd,
+                              u32 input, u32 output, u32 config)
 {
        struct upd64031a_state *state = to_state(sd);
        u8 r00, r05, r08;
 
-       state->gr_mode = (route->input & 3) << 6;
-       state->direct_3dycs_connect = (route->input & 0xc) << 4;
+       state->gr_mode = (input & 3) << 6;
+       state->direct_3dycs_connect = (input & 0xc) << 4;
        state->ext_comp_sync =
-               (route->input & UPD64031A_COMPOSITE_EXTERNAL) << 1;
+               (input & UPD64031A_COMPOSITE_EXTERNAL) << 1;
        state->ext_vert_sync =
-               (route->input & UPD64031A_VERTICAL_EXTERNAL) << 2;
+               (input & UPD64031A_VERTICAL_EXTERNAL) << 2;
        r00 = (state->regs[R00] & ~GR_MODE_MASK) | state->gr_mode;
        r05 = (state->regs[R00] & ~SYNC_CIRCUIT_MASK) |
                state->ext_comp_sync | state->ext_vert_sync;
index 410c915..6eb0e5b 100644 (file)
@@ -102,15 +102,16 @@ static u8 upd64083_read(struct v4l2_subdev *sd, u8 reg)
 
 /* ------------------------------------------------------------------------ */
 
-static int upd64083_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int upd64083_s_routing(struct v4l2_subdev *sd,
+                             u32 input, u32 output, u32 config)
 {
        struct upd64083_state *state = to_state(sd);
        u8 r00, r02;
 
-       if (route->input > 7 || (route->input & 6) == 6)
+       if (input > 7 || (input & 6) == 6)
                return -EINVAL;
-       state->mode = (route->input & 3) << 6;
-       state->ext_y_adc = (route->input & UPD64083_EXT_Y_ADC) << 3;
+       state->mode = (input & 3) << 6;
+       state->ext_y_adc = (input & UPD64083_EXT_Y_ADC) << 3;
        r00 = (state->regs[R00] & ~(3 << 6)) | state->mode;
        r02 = (state->regs[R02] & ~(1 << 5)) | state->ext_y_adc;
        upd64083_write(sd, R00, r00);
index a0feb1c..8bc03b9 100644 (file)
@@ -2597,7 +2597,6 @@ int usbvision_muxsel(struct usb_usbvision *usbvision, int channel)
        /* inputs #1 and #2 are variable for SAA7111 and SAA7113 */
        int mode[4]= {SAA7115_COMPOSITE0, 0, 0, SAA7115_COMPOSITE3};
        int audio[]= {1, 0, 0, 0};
-       struct v4l2_routing route;
        //channel 0 is TV with audiochannel 1 (tuner mono)
        //channel 1 is Composite with audio channel 0 (line in)
        //channel 2 is S-Video with audio channel 0 (line in)
@@ -2630,9 +2629,7 @@ int usbvision_muxsel(struct usb_usbvision *usbvision, int channel)
                        mode[2] = SAA7115_SVIDEO1;
                        break;
        }
-       route.input = mode[channel];
-       route.output = 0;
-       call_all(usbvision, video, s_routing, &route);
+       call_all(usbvision, video, s_routing, mode[channel], 0, 0);
        usbvision_set_audio(usbvision, audio[channel]);
        return 0;
 }
index dd2f8f2..1fe5bef 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <linux/version.h>
 #include <linux/utsname.h>
 #include <linux/init.h>
 #include <asm/uaccess.h>
@@ -247,7 +246,8 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
        switch (usbvision_device_data[usbvision->DevModel].Codec) {
        case CODEC_SAA7113:
        case CODEC_SAA7111:
-               v4l2_i2c_new_probed_subdev(&usbvision->i2c_adap, "saa7115",
+               v4l2_i2c_new_probed_subdev(&usbvision->v4l2_dev,
+                               &usbvision->i2c_adap, "saa7115",
                                "saa7115_auto", saa711x_addrs);
                break;
        }
@@ -256,13 +256,15 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
                enum v4l2_i2c_tuner_type type;
                struct tuner_setup tun_setup;
 
-               sd = v4l2_i2c_new_probed_subdev(&usbvision->i2c_adap, "tuner",
+               sd = v4l2_i2c_new_probed_subdev(&usbvision->v4l2_dev,
+                               &usbvision->i2c_adap, "tuner",
                                "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
                /* depending on whether we found a demod or not, select
                   the tuner type. */
                type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
 
-               sd = v4l2_i2c_new_probed_subdev(&usbvision->i2c_adap, "tuner",
+               sd = v4l2_i2c_new_probed_subdev(&usbvision->v4l2_dev,
+                               &usbvision->i2c_adap, "tuner",
                                "tuner", v4l2_i2c_tuner_addrs(type));
 
                if (usbvision->tuner_type != -1) {
index fa62a2f..d7056a5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * USB USBVISION Video device driver 0.9.9
+ * USB USBVISION Video device driver 0.9.10
  *
  *
  *
@@ -79,7 +79,7 @@
 #define DRIVER_LICENSE "GPL"
 #define USBVISION_DRIVER_VERSION_MAJOR 0
 #define USBVISION_DRIVER_VERSION_MINOR 9
-#define USBVISION_DRIVER_VERSION_PATCHLEVEL 9
+#define USBVISION_DRIVER_VERSION_PATCHLEVEL 10
 #define USBVISION_DRIVER_VERSION KERNEL_VERSION(USBVISION_DRIVER_VERSION_MAJOR,\
 USBVISION_DRIVER_VERSION_MINOR,\
 USBVISION_DRIVER_VERSION_PATCHLEVEL)
@@ -621,7 +621,7 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id)
        usbvision->tvnormId=*id;
 
        mutex_lock(&usbvision->lock);
-       call_all(usbvision, tuner, s_std, usbvision->tvnormId);
+       call_all(usbvision, core, s_std, usbvision->tvnormId);
        mutex_unlock(&usbvision->lock);
        /* propagate the change to the decoder */
        usbvision_muxsel(usbvision, usbvision->ctl_input);
@@ -1522,7 +1522,8 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
  * Returns NULL on error, a pointer to usb_usbvision else.
  *
  */
-static struct usb_usbvision *usbvision_alloc(struct usb_device *dev)
+static struct usb_usbvision *usbvision_alloc(struct usb_device *dev,
+                                            struct usb_interface *intf)
 {
        struct usb_usbvision *usbvision;
 
@@ -1531,7 +1532,7 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev)
                return NULL;
 
        usbvision->dev = dev;
-       if (v4l2_device_register(&dev->dev, &usbvision->v4l2_dev))
+       if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev))
                goto err_free;
 
        mutex_init(&usbvision->lock);   /* available */
@@ -1669,7 +1670,8 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
                return -ENODEV;
        }
 
-       if ((usbvision = usbvision_alloc(dev)) == NULL) {
+       usbvision = usbvision_alloc(dev, intf);
+       if (usbvision == NULL) {
                dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__);
                return -ENOMEM;
        }
index c2d9760..2956a76 100644 (file)
@@ -9,7 +9,7 @@ config USB_VIDEO_CLASS
 config USB_VIDEO_CLASS_INPUT_EVDEV
        bool "UVC input events device support"
        default y
-       depends on USB_VIDEO_CLASS && INPUT
+       depends on USB_VIDEO_CLASS=INPUT || INPUT=y
        ---help---
          This option makes USB Video Class devices register an input device
          to report button events.
index b617bf0..02f2a6d 100644 (file)
@@ -575,6 +575,8 @@ static noinline long v4l1_compat_get_input_info(
                        chan->norm = VIDEO_MODE_NTSC;
                if (sid & V4L2_STD_SECAM)
                        chan->norm = VIDEO_MODE_SECAM;
+               if (sid == V4L2_STD_ALL)
+                       chan->norm = VIDEO_MODE_AUTO;
        }
 done:
        return err;
@@ -601,6 +603,9 @@ static noinline long v4l1_compat_set_input(
        case VIDEO_MODE_SECAM:
                sid = V4L2_STD_SECAM;
                break;
+       case VIDEO_MODE_AUTO:
+               sid = V4L2_STD_ALL;
+               break;
        }
        if (0 != sid) {
                err = drv(file, VIDIOC_S_STD, &sid);
@@ -804,9 +809,9 @@ static noinline long v4l1_compat_select_tuner(
 
        t.index = tun->tuner;
 
-       err = drv(file, VIDIOC_S_INPUT, &t);
+       err = drv(file, VIDIOC_S_TUNER, &t);
        if (err < 0)
-               dprintk("VIDIOCSTUNER / VIDIOC_S_INPUT: %ld\n", err);
+               dprintk("VIDIOCSTUNER / VIDIOC_S_TUNER: %ld\n", err);
        return err;
 }
 
index 1da8cb8..f576ef6 100644 (file)
@@ -739,33 +739,8 @@ EXPORT_SYMBOL(v4l2_chip_ident_i2c_client);
 
 /* ----------------------------------------------------------------- */
 
-/* Helper function for I2C legacy drivers */
+/* I2C Helper functions */
 
-int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver *driver,
-               const char *name,
-               int (*probe)(struct i2c_client *, const struct i2c_device_id *))
-{
-       struct i2c_client *client;
-       int err;
-
-       client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (!client)
-               return -ENOMEM;
-
-       client->addr = address;
-       client->adapter = adapter;
-       client->driver = driver;
-       strlcpy(client->name, name, sizeof(client->name));
-
-       err = probe(client, NULL);
-       if (err == 0) {
-               i2c_attach_client(client);
-       } else {
-               kfree(client);
-       }
-       return err != -ENOMEM ? 0 : err;
-}
-EXPORT_SYMBOL(v4l2_i2c_attach);
 
 void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
                const struct v4l2_subdev_ops *ops)
@@ -785,18 +760,16 @@ EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_init);
 
 
 
-/* Load an i2c sub-device. It assumes that i2c_get_adapdata(adapter)
-   returns the v4l2_device and that i2c_get_clientdata(client)
-   returns the v4l2_subdev. */
-struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
+/* Load an i2c sub-device. */
+struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
+               struct i2c_adapter *adapter,
                const char *module_name, const char *client_type, u8 addr)
 {
-       struct v4l2_device *dev = i2c_get_adapdata(adapter);
        struct v4l2_subdev *sd = NULL;
        struct i2c_client *client;
        struct i2c_board_info info;
 
-       BUG_ON(!dev);
+       BUG_ON(!v4l2_dev);
 
        if (module_name)
                request_module(module_name);
@@ -823,7 +796,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
 
        /* Register with the v4l2_device which increases the module's
           use count as well. */
-       if (v4l2_device_register_subdev(dev, sd))
+       if (v4l2_device_register_subdev(v4l2_dev, sd))
                sd = NULL;
        /* Decrease the module use count to match the first try_module_get. */
        module_put(client->driver->driver.owner);
@@ -837,19 +810,17 @@ error:
 }
 EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev);
 
-/* Probe and load an i2c sub-device. It assumes that i2c_get_adapdata(adapter)
-   returns the v4l2_device and that i2c_get_clientdata(client)
-   returns the v4l2_subdev. */
-struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
+/* Probe and load an i2c sub-device. */
+struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev,
+       struct i2c_adapter *adapter,
        const char *module_name, const char *client_type,
        const unsigned short *addrs)
 {
-       struct v4l2_device *dev = i2c_get_adapdata(adapter);
        struct v4l2_subdev *sd = NULL;
        struct i2c_client *client = NULL;
        struct i2c_board_info info;
 
-       BUG_ON(!dev);
+       BUG_ON(!v4l2_dev);
 
        if (module_name)
                request_module(module_name);
@@ -875,7 +846,7 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
 
        /* Register with the v4l2_device which increases the module's
           use count as well. */
-       if (v4l2_device_register_subdev(dev, sd))
+       if (v4l2_device_register_subdev(v4l2_dev, sd))
                sd = NULL;
        /* Decrease the module use count to match the first try_module_get. */
        module_put(client->driver->driver.owner);
@@ -889,6 +860,17 @@ error:
 }
 EXPORT_SYMBOL_GPL(v4l2_i2c_new_probed_subdev);
 
+struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev,
+               struct i2c_adapter *adapter,
+               const char *module_name, const char *client_type, u8 addr)
+{
+       unsigned short addrs[2] = { addr, I2C_CLIENT_END };
+
+       return v4l2_i2c_new_probed_subdev(v4l2_dev, adapter,
+                       module_name, client_type, addrs);
+}
+EXPORT_SYMBOL_GPL(v4l2_i2c_new_probed_subdev_addr);
+
 /* Return i2c client address of v4l2_subdev. */
 unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd)
 {
index 91228b3..31eac66 100644 (file)
@@ -229,7 +229,7 @@ static int v4l2_mmap(struct file *filp, struct vm_area_struct *vm)
 static int v4l2_open(struct inode *inode, struct file *filp)
 {
        struct video_device *vdev;
-       int ret;
+       int ret = 0;
 
        /* Check if the video device is available */
        mutex_lock(&videodev_lock);
@@ -243,7 +243,9 @@ static int v4l2_open(struct inode *inode, struct file *filp)
        /* and increase the device refcount */
        video_get(vdev);
        mutex_unlock(&videodev_lock);
-       ret = vdev->fops->open(filp);
+       if (vdev->fops->open)
+               ret = vdev->fops->open(filp);
+
        /* decrease the refcount in case of an error */
        if (ret)
                video_put(vdev);
@@ -254,7 +256,10 @@ static int v4l2_open(struct inode *inode, struct file *filp)
 static int v4l2_release(struct inode *inode, struct file *filp)
 {
        struct video_device *vdev = video_devdata(filp);
-       int ret = vdev->fops->release(filp);
+       int ret = 0;
+
+       if (vdev->fops->release)
+               vdev->fops->release(filp);
 
        /* decrease the refcount unconditionally since the release()
           return value is ignored. */
index f41c6f5..88f10d6 100644 (file)
@@ -275,32 +275,6 @@ static const char *v4l2_ioctls[] = {
 };
 #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
 
-static const char *v4l2_int_ioctls[] = {
-       [_IOC_NR(AUDC_SET_RADIO)]              = "AUDC_SET_RADIO",
-
-       [_IOC_NR(TUNER_SET_TYPE_ADDR)]         = "TUNER_SET_TYPE_ADDR",
-       [_IOC_NR(TUNER_SET_STANDBY)]           = "TUNER_SET_STANDBY",
-       [_IOC_NR(TUNER_SET_CONFIG)]            = "TUNER_SET_CONFIG",
-
-       [_IOC_NR(VIDIOC_INT_S_TUNER_MODE)]     = "VIDIOC_INT_S_TUNER_MODE",
-       [_IOC_NR(VIDIOC_INT_RESET)]            = "VIDIOC_INT_RESET",
-       [_IOC_NR(VIDIOC_INT_AUDIO_CLOCK_FREQ)] = "VIDIOC_INT_AUDIO_CLOCK_FREQ",
-       [_IOC_NR(VIDIOC_INT_DECODE_VBI_LINE)]  = "VIDIOC_INT_DECODE_VBI_LINE",
-       [_IOC_NR(VIDIOC_INT_S_VBI_DATA)]       = "VIDIOC_INT_S_VBI_DATA",
-       [_IOC_NR(VIDIOC_INT_G_VBI_DATA)]       = "VIDIOC_INT_G_VBI_DATA",
-       [_IOC_NR(VIDIOC_INT_I2S_CLOCK_FREQ)]   = "VIDIOC_INT_I2S_CLOCK_FREQ",
-       [_IOC_NR(VIDIOC_INT_S_STANDBY)]        = "VIDIOC_INT_S_STANDBY",
-       [_IOC_NR(VIDIOC_INT_S_AUDIO_ROUTING)]  = "VIDIOC_INT_S_AUDIO_ROUTING",
-       [_IOC_NR(VIDIOC_INT_G_AUDIO_ROUTING)]  = "VIDIOC_INT_G_AUDIO_ROUTING",
-       [_IOC_NR(VIDIOC_INT_S_VIDEO_ROUTING)]  = "VIDIOC_INT_S_VIDEO_ROUTING",
-       [_IOC_NR(VIDIOC_INT_G_VIDEO_ROUTING)]  = "VIDIOC_INT_G_VIDEO_ROUTING",
-       [_IOC_NR(VIDIOC_INT_S_CRYSTAL_FREQ)]   = "VIDIOC_INT_S_CRYSTAL_FREQ",
-       [_IOC_NR(VIDIOC_INT_INIT)]             = "VIDIOC_INT_INIT",
-       [_IOC_NR(VIDIOC_INT_G_STD_OUTPUT)]     = "VIDIOC_INT_G_STD_OUTPUT",
-       [_IOC_NR(VIDIOC_INT_S_STD_OUTPUT)]     = "VIDIOC_INT_S_STD_OUTPUT",
-};
-#define V4L2_INT_IOCTLS ARRAY_SIZE(v4l2_int_ioctls)
-
 /* Common ioctl debug function. This function can be used by
    external ioctl messages as well as internal V4L ioctl */
 void v4l_printk_ioctl(unsigned int cmd)
@@ -309,12 +283,8 @@ void v4l_printk_ioctl(unsigned int cmd)
 
        switch (_IOC_TYPE(cmd)) {
        case 'd':
-               if (_IOC_NR(cmd) >= V4L2_INT_IOCTLS) {
-                       type = "v4l2_int";
-                       break;
-               }
-               printk("%s", v4l2_int_ioctls[_IOC_NR(cmd)]);
-               return;
+               type = "v4l2_int";
+               break;
 #ifdef CONFIG_VIDEO_V4L1_COMPAT
        case 'v':
                if (_IOC_NR(cmd) >= V4L1_IOCTLS) {
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
deleted file mode 100644 (file)
index dc88167..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-    V4L2 sub-device support.
-
-    Copyright (C) 2008  Hans Verkuil <hverkuil@xs4all.nl>
-
-    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.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#include <linux/i2c.h>
-#include <linux/videodev2.h>
-#include <media/v4l2-subdev.h>
-
-int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
-{
-       switch (cmd) {
-       case VIDIOC_QUERYCTRL:
-               return v4l2_subdev_call(sd, core, queryctrl, arg);
-       case VIDIOC_G_CTRL:
-               return v4l2_subdev_call(sd, core, g_ctrl, arg);
-       case VIDIOC_S_CTRL:
-               return v4l2_subdev_call(sd, core, s_ctrl, arg);
-       case VIDIOC_G_EXT_CTRLS:
-               return v4l2_subdev_call(sd, core, g_ext_ctrls, arg);
-       case VIDIOC_S_EXT_CTRLS:
-               return v4l2_subdev_call(sd, core, s_ext_ctrls, arg);
-       case VIDIOC_TRY_EXT_CTRLS:
-               return v4l2_subdev_call(sd, core, try_ext_ctrls, arg);
-       case VIDIOC_QUERYMENU:
-               return v4l2_subdev_call(sd, core, querymenu, arg);
-       case VIDIOC_LOG_STATUS:
-               return v4l2_subdev_call(sd, core, log_status);
-       case VIDIOC_DBG_G_CHIP_IDENT:
-               return v4l2_subdev_call(sd, core, g_chip_ident, arg);
-       case VIDIOC_INT_S_STANDBY:
-               return v4l2_subdev_call(sd, core, s_standby, arg ? (*(u32 *)arg) : 0);
-       case VIDIOC_INT_RESET:
-               return v4l2_subdev_call(sd, core, reset, arg ? (*(u32 *)arg) : 0);
-       case VIDIOC_INT_S_GPIO:
-               return v4l2_subdev_call(sd, core, s_gpio, arg ? (*(u32 *)arg) : 0);
-       case VIDIOC_INT_INIT:
-               return v4l2_subdev_call(sd, core, init, arg ? (*(u32 *)arg) : 0);
-#ifdef CONFIG_VIDEO_ADV_DEBUG
-       case VIDIOC_DBG_G_REGISTER:
-               return v4l2_subdev_call(sd, core, g_register, arg);
-       case VIDIOC_DBG_S_REGISTER:
-               return v4l2_subdev_call(sd, core, s_register, arg);
-#endif
-
-       case VIDIOC_INT_S_TUNER_MODE:
-               return v4l2_subdev_call(sd, tuner, s_mode, *(enum v4l2_tuner_type *)arg);
-       case AUDC_SET_RADIO:
-               return v4l2_subdev_call(sd, tuner, s_radio);
-       case VIDIOC_S_TUNER:
-               return v4l2_subdev_call(sd, tuner, s_tuner, arg);
-       case VIDIOC_G_TUNER:
-               return v4l2_subdev_call(sd, tuner, g_tuner, arg);
-       case VIDIOC_S_STD:
-               return v4l2_subdev_call(sd, tuner, s_std, *(v4l2_std_id *)arg);
-       case VIDIOC_S_FREQUENCY:
-               return v4l2_subdev_call(sd, tuner, s_frequency, arg);
-       case VIDIOC_G_FREQUENCY:
-               return v4l2_subdev_call(sd, tuner, g_frequency, arg);
-       case TUNER_SET_TYPE_ADDR:
-               return v4l2_subdev_call(sd, tuner, s_type_addr, arg);
-       case TUNER_SET_CONFIG:
-               return v4l2_subdev_call(sd, tuner, s_config, arg);
-
-       case VIDIOC_INT_AUDIO_CLOCK_FREQ:
-               return v4l2_subdev_call(sd, audio, s_clock_freq, *(u32 *)arg);
-       case VIDIOC_INT_S_AUDIO_ROUTING:
-               return v4l2_subdev_call(sd, audio, s_routing, arg);
-       case VIDIOC_INT_I2S_CLOCK_FREQ:
-               return v4l2_subdev_call(sd, audio, s_i2s_clock_freq, *(u32 *)arg);
-
-       case VIDIOC_INT_S_VIDEO_ROUTING:
-               return v4l2_subdev_call(sd, video, s_routing, arg);
-       case VIDIOC_INT_S_CRYSTAL_FREQ:
-               return v4l2_subdev_call(sd, video, s_crystal_freq, arg);
-       case VIDIOC_INT_DECODE_VBI_LINE:
-               return v4l2_subdev_call(sd, video, decode_vbi_line, arg);
-       case VIDIOC_INT_S_VBI_DATA:
-               return v4l2_subdev_call(sd, video, s_vbi_data, arg);
-       case VIDIOC_INT_G_VBI_DATA:
-               return v4l2_subdev_call(sd, video, g_vbi_data, arg);
-       case VIDIOC_G_SLICED_VBI_CAP:
-               return v4l2_subdev_call(sd, video, g_sliced_vbi_cap, arg);
-       case VIDIOC_ENUM_FMT:
-               return v4l2_subdev_call(sd, video, enum_fmt, arg);
-       case VIDIOC_TRY_FMT:
-               return v4l2_subdev_call(sd, video, try_fmt, arg);
-       case VIDIOC_S_FMT:
-               return v4l2_subdev_call(sd, video, s_fmt, arg);
-       case VIDIOC_G_FMT:
-               return v4l2_subdev_call(sd, video, g_fmt, arg);
-       case VIDIOC_INT_S_STD_OUTPUT:
-               return v4l2_subdev_call(sd, video, s_std_output, *(v4l2_std_id *)arg);
-       case VIDIOC_QUERYSTD:
-               return v4l2_subdev_call(sd, video, querystd, arg);
-       case VIDIOC_INT_G_INPUT_STATUS:
-               return v4l2_subdev_call(sd, video, g_input_status, arg);
-       case VIDIOC_STREAMON:
-               return v4l2_subdev_call(sd, video, s_stream, 1);
-       case VIDIOC_STREAMOFF:
-               return v4l2_subdev_call(sd, video, s_stream, 0);
-       case VIDIOC_S_PARM:
-               return v4l2_subdev_call(sd, video, s_parm, arg);
-       case VIDIOC_G_PARM:
-               return v4l2_subdev_call(sd, video, g_parm, arg);
-
-       default:
-               return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
-       }
-}
-EXPORT_SYMBOL_GPL(v4l2_subdev_command);
index 8da4dd1..43e0998 100644 (file)
@@ -60,8 +60,8 @@
 // #define VINO_DEBUG
 // #define VINO_DEBUG_INT
 
-#define VINO_MODULE_VERSION "0.0.5"
-#define VINO_VERSION_CODE KERNEL_VERSION(0, 0, 5)
+#define VINO_MODULE_VERSION "0.0.6"
+#define VINO_VERSION_CODE KERNEL_VERSION(0, 0, 6)
 
 MODULE_DESCRIPTION("SGI VINO Video4Linux2 driver");
 MODULE_VERSION(VINO_MODULE_VERSION);
@@ -2565,12 +2565,11 @@ static int vino_acquire_input(struct vino_channel_settings *vcs)
                int input;
                int data_norm;
                v4l2_std_id norm;
-               struct v4l2_routing route = { 0, 0 };
 
                input = VINO_INPUT_COMPOSITE;
 
-               route.input = vino_get_saa7191_input(input);
-               ret = decoder_call(video, s_routing, &route);
+               ret = decoder_call(video, s_routing,
+                               vino_get_saa7191_input(input), 0, 0);
                if (ret) {
                        ret = -EINVAL;
                        goto out;
@@ -2589,7 +2588,7 @@ static int vino_acquire_input(struct vino_channel_settings *vcs)
                        }
                        if (data_norm == 3)
                                data_norm = VINO_DATA_NORM_PAL;
-                       ret = decoder_call(tuner, s_std, norm);
+                       ret = decoder_call(core, s_std, norm);
                }
 
                spin_lock_irqsave(&vino_drvdata->input_lock, flags);
@@ -2656,10 +2655,9 @@ static int vino_set_input(struct vino_channel_settings *vcs, int input)
                if (vino_drvdata->decoder_owner == vcs->channel) {
                        int data_norm;
                        v4l2_std_id norm;
-                       struct v4l2_routing route = { 0, 0 };
 
-                       route.input = vino_get_saa7191_input(input);
-                       ret = decoder_call(video, s_routing, &route);
+                       ret = decoder_call(video, s_routing,
+                                       vino_get_saa7191_input(input), 0, 0);
                        if (ret) {
                                vino_drvdata->decoder_owner = VINO_NO_CHANNEL;
                                ret = -EINVAL;
@@ -2679,7 +2677,7 @@ static int vino_set_input(struct vino_channel_settings *vcs, int input)
                                }
                                if (data_norm == 3)
                                        data_norm = VINO_DATA_NORM_PAL;
-                               ret = decoder_call(tuner, s_std, norm);
+                               ret = decoder_call(core, s_std, norm);
                        }
 
                        spin_lock_irqsave(&vino_drvdata->input_lock, flags);
@@ -2813,7 +2811,7 @@ static int vino_set_data_norm(struct vino_channel_settings *vcs,
                 * as it may take a while... */
 
                norm = vino_data_norms[data_norm].std;
-               err = decoder_call(tuner, s_std, norm);
+               err = decoder_call(core, s_std, norm);
 
                spin_lock_irqsave(&vino_drvdata->input_lock, *flags);
 
@@ -4266,7 +4264,6 @@ static int vino_init_channel_settings(struct vino_channel_settings *vcs,
 
 static int __init vino_module_init(void)
 {
-       unsigned short addr[] = { 0, I2C_CLIENT_END };
        int ret;
 
        printk(KERN_INFO "SGI VINO driver version %s\n",
@@ -4336,12 +4333,12 @@ static int __init vino_module_init(void)
        }
        vino_init_stage++;
 
-       addr[0] = 0x45;
-       vino_drvdata->decoder = v4l2_i2c_new_probed_subdev(&vino_i2c_adapter,
-                       "saa7191", "saa7191", addr);
-       addr[0] = 0x2b;
-       vino_drvdata->camera = v4l2_i2c_new_probed_subdev(&vino_i2c_adapter,
-                       "indycam", "indycam", addr);
+       vino_drvdata->decoder =
+               v4l2_i2c_new_probed_subdev_addr(&vino_drvdata->v4l2_dev,
+                       &vino_i2c_adapter, "saa7191", "saa7191", 0x45);
+       vino_drvdata->camera =
+               v4l2_i2c_new_probed_subdev_addr(&vino_drvdata->v4l2_dev,
+                       &vino_i2c_adapter, "indycam", "indycam", 0x2b);
 
        dprintk("init complete!\n");
 
index 42e23a4..38e53b3 100644 (file)
@@ -134,11 +134,11 @@ static int vp27smpx_log_status(struct v4l2_subdev *sd)
 static const struct v4l2_subdev_core_ops vp27smpx_core_ops = {
        .log_status = vp27smpx_log_status,
        .g_chip_ident = vp27smpx_g_chip_ident,
+       .s_std = vp27smpx_s_std,
 };
 
 static const struct v4l2_subdev_tuner_ops vp27smpx_tuner_ops = {
        .s_radio = vp27smpx_s_radio,
-       .s_std = vp27smpx_s_std,
        .s_tuner = vp27smpx_s_tuner,
        .g_tuner = vp27smpx_g_tuner,
 };
index 2fa7e8b..97e0ce2 100644 (file)
@@ -376,33 +376,34 @@ static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
        return 0;
 }
 
-static int vpx3220_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int vpx3220_s_routing(struct v4l2_subdev *sd,
+                            u32 input, u32 output, u32 config)
 {
        int data;
 
-       /* RJ:   route->input = 0: ST8 (PCTV) input
-                route->input = 1: COMPOSITE  input
-                route->input = 2: SVHS       input  */
+       /* RJ:   input = 0: ST8 (PCTV) input
+                input = 1: COMPOSITE  input
+                input = 2: SVHS       input  */
 
-       const int input[3][2] = {
+       const int input_vals[3][2] = {
                {0x0c, 0},
                {0x0d, 0},
                {0x0e, 1}
        };
 
-       if (route->input < 0 || route->input > 2)
+       if (input < 0 || input > 2)
                return -EINVAL;
 
-       v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[route->input]);
+       v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[input]);
 
-       vpx3220_write(sd, 0x33, input[route->input][0]);
+       vpx3220_write(sd, 0x33, input_vals[input][0]);
 
        data = vpx3220_fp_read(sd, 0xf2) & ~(0x0020);
        if (data < 0)
                return data;
        /* 0x0010 is required to latch the setting */
        vpx3220_fp_write(sd, 0xf2,
-                       data | (input[route->input][1] << 5) | 0x0010);
+                       data | (input_vals[input][1] << 5) | 0x0010);
 
        udelay(10);
        return 0;
@@ -516,9 +517,6 @@ static const struct v4l2_subdev_core_ops vpx3220_core_ops = {
        .g_ctrl = vpx3220_g_ctrl,
        .s_ctrl = vpx3220_s_ctrl,
        .queryctrl = vpx3220_queryctrl,
-};
-
-static const struct v4l2_subdev_tuner_ops vpx3220_tuner_ops = {
        .s_std = vpx3220_s_std,
 };
 
@@ -531,7 +529,6 @@ static const struct v4l2_subdev_video_ops vpx3220_video_ops = {
 
 static const struct v4l2_subdev_ops vpx3220_ops = {
        .core = &vpx3220_core_ops,
-       .tuner = &vpx3220_tuner_ops,
        .video = &vpx3220_video_ops,
 };
 
index 3b08bc4..f59b2bd 100644 (file)
@@ -3440,7 +3440,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        if (!cam)
                return -ENOMEM;
 
-       err = v4l2_device_register(&udev->dev, &cam->v4l2_dev);
+       err = v4l2_device_register(&intf->dev, &cam->v4l2_dev);
        if (err)
                goto fail0;
 
@@ -3523,7 +3523,8 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        w9968cf_turn_on_led(cam);
 
        w9968cf_i2c_init(cam);
-       cam->sensor_sd = v4l2_i2c_new_probed_subdev(&cam->i2c_adapter,
+       cam->sensor_sd = v4l2_i2c_new_probed_subdev(&cam->v4l2_dev,
+                       &cam->i2c_adapter,
                        "ovcamchip", "ovcamchip", addrs);
 
        usb_set_intfdata(intf, cam);
index fdfc6a4..73ad864 100644 (file)
@@ -134,7 +134,7 @@ static const struct w9968cf_format w9968cf_formatlist[] = {
 
 #define W9968CF_MODULE_NAME     "V4L driver for W996[87]CF JPEG USB " \
                                "Dual Mode Camera Chip"
-#define W9968CF_MODULE_VERSION  "1:1.33-basic"
+#define W9968CF_MODULE_VERSION  "1:1.34-basic"
 #define W9968CF_MODULE_AUTHOR   "(C) 2002-2004 Luca Risolia"
 #define W9968CF_AUTHOR_EMAIL    "<luca.risolia@studio.unibo.it>"
 #define W9968CF_MODULE_LICENSE  "GPL"
index eddf11a..f1f261a 100644 (file)
@@ -79,7 +79,8 @@ static int wm8775_write(struct v4l2_subdev *sd, int reg, u16 val)
        return -1;
 }
 
-static int wm8775_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int wm8775_s_routing(struct v4l2_subdev *sd,
+                           u32 input, u32 output, u32 config)
 {
        struct wm8775_state *state = to_state(sd);
 
@@ -88,11 +89,11 @@ static int wm8775_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
           16 combinations.
           If only one input is active (the normal case) then the
           input values 1, 2, 4 or 8 should be used. */
-       if (route->input > 15) {
-               v4l2_err(sd, "Invalid input %d.\n", route->input);
+       if (input > 15) {
+               v4l2_err(sd, "Invalid input %d.\n", input);
                return -EINVAL;
        }
-       state->input = route->input;
+       state->input = input;
        if (state->muted)
                return 0;
        wm8775_write(sd, R21, 0x0c0);
index afecf32..d439c76 100644 (file)
@@ -143,8 +143,8 @@ Private IOCTL to set up for displaying MJPEG
 #ifdef __KERNEL__
 
 #define MAJOR_VERSION 0                /* driver major version */
-#define MINOR_VERSION 9                /* driver minor version */
-#define RELEASE_VERSION 5      /* release version */
+#define MINOR_VERSION 10       /* driver minor version */
+#define RELEASE_VERSION 0      /* release version */
 
 #define ZORAN_NAME    "ZORAN"  /* name of the device */
 
index f91bba4..ea6c577 100644 (file)
@@ -1087,10 +1087,8 @@ zr36057_init (struct zoran *zr)
                detect_guest_activity(zr);
        test_interrupts(zr);
        if (!pass_through) {
-               struct v4l2_routing route = { 2, 0 };
-
                decoder_call(zr, video, s_stream, 0);
-               encoder_call(zr, video, s_routing, &route);
+               encoder_call(zr, video, s_routing, 2, 0, 0);
        }
 
        zr->zoran_proc = NULL;
@@ -1360,11 +1358,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
                goto zr_free_irq;
        }
 
-       zr->decoder = v4l2_i2c_new_probed_subdev(&zr->i2c_adapter,
-               zr->card.mod_decoder, zr->card.i2c_decoder, zr->card.addrs_decoder);
+       zr->decoder = v4l2_i2c_new_probed_subdev(&zr->v4l2_dev,
+               &zr->i2c_adapter, zr->card.mod_decoder, zr->card.i2c_decoder,
+               zr->card.addrs_decoder);
 
        if (zr->card.mod_encoder)
-               zr->encoder = v4l2_i2c_new_probed_subdev(&zr->i2c_adapter,
+               zr->encoder = v4l2_i2c_new_probed_subdev(&zr->v4l2_dev,
+                       &zr->i2c_adapter,
                        zr->card.mod_encoder, zr->card.i2c_encoder,
                        zr->card.addrs_encoder);
 
index e0223de..f6c2fb4 100644 (file)
@@ -971,7 +971,6 @@ zr36057_enable_jpg (struct zoran          *zr,
        struct vfe_settings cap;
        int field_size =
            zr->jpg_buffers.buffer_size / zr->jpg_settings.field_per_buff;
-       struct v4l2_routing route = { 0, 0 };
 
        zr->codec_mode = mode;
 
@@ -994,8 +993,7 @@ zr36057_enable_jpg (struct zoran          *zr,
                 */
                set_videobus_dir(zr, 0);
                decoder_call(zr, video, s_stream, 1);
-               route.input = 0;
-               encoder_call(zr, video, s_routing, &route);
+               encoder_call(zr, video, s_routing, 0, 0, 0);
 
                /* Take the JPEG codec and the VFE out of sleep */
                jpeg_codec_sleep(zr, 0);
@@ -1043,8 +1041,7 @@ zr36057_enable_jpg (struct zoran          *zr,
                 */
                decoder_call(zr, video, s_stream, 0);
                set_videobus_dir(zr, 1);
-               route.input = 1;
-               encoder_call(zr, video, s_routing, &route);
+               encoder_call(zr, video, s_routing, 1, 0, 0);
 
                /* Take the JPEG codec and the VFE out of sleep */
                jpeg_codec_sleep(zr, 0);
@@ -1089,8 +1086,7 @@ zr36057_enable_jpg (struct zoran          *zr,
                zr36057_adjust_vfe(zr, mode);
 
                decoder_call(zr, video, s_stream, 1);
-               route.input = 0;
-               encoder_call(zr, video, s_routing, &route);
+               encoder_call(zr, video, s_routing, 0, 0, 0);
 
                dprintk(2, KERN_INFO "%s: enable_jpg(IDLE)\n", ZR_DEVNAME(zr));
                break;
@@ -1571,8 +1567,6 @@ zoran_set_pci_master (struct zoran *zr,
 void
 zoran_init_hardware (struct zoran *zr)
 {
-       struct v4l2_routing route = { 0, 0 };
-
        /* Enable bus-mastering */
        zoran_set_pci_master(zr, 1);
 
@@ -1581,16 +1575,14 @@ zoran_init_hardware (struct zoran *zr)
                zr->card.init(zr);
        }
 
-       route.input = zr->card.input[zr->input].muxsel;
-
        decoder_call(zr, core, init, 0);
-       decoder_call(zr, tuner, s_std, zr->norm);
-       decoder_call(zr, video, s_routing, &route);
+       decoder_call(zr, core, s_std, zr->norm);
+       decoder_call(zr, video, s_routing,
+               zr->card.input[zr->input].muxsel, 0, 0);
 
        encoder_call(zr, core, init, 0);
        encoder_call(zr, video, s_std_output, zr->norm);
-       route.input = 0;
-       encoder_call(zr, video, s_routing, &route);
+       encoder_call(zr, video, s_routing, 0, 0, 0);
 
        /* toggle JPEG codec sleep to sync PLL */
        jpeg_codec_sleep(zr, 1);
index f16e57c..092333b 100644 (file)
@@ -1018,10 +1018,8 @@ zoran_close(struct file  *file)
                zoran_set_pci_master(zr, 0);
 
                if (!pass_through) {    /* Switch to color bar */
-                       struct v4l2_routing route = { 2, 0 };
-
                        decoder_call(zr, video, s_stream, 0);
-                       encoder_call(zr, video, s_routing, &route);
+                       encoder_call(zr, video, s_routing, 2, 0, 0);
                }
        }
 
@@ -1449,7 +1447,7 @@ zoran_set_norm (struct zoran *zr,
                v4l2_std_id std = 0;
 
                decoder_call(zr, video, querystd, &std);
-               decoder_call(zr, tuner, s_std, std);
+               decoder_call(zr, core, s_std, std);
 
                /* let changes come into effect */
                ssleep(2);
@@ -1461,7 +1459,7 @@ zoran_set_norm (struct zoran *zr,
                                "%s: %s - no norm detected\n",
                                ZR_DEVNAME(zr), __func__);
                        /* reset norm */
-                       decoder_call(zr, tuner, s_std, zr->norm);
+                       decoder_call(zr, core, s_std, zr->norm);
                        return -EIO;
                }
 
@@ -1480,7 +1478,7 @@ zoran_set_norm (struct zoran *zr,
        if (on)
                zr36057_overlay(zr, 0);
 
-       decoder_call(zr, tuner, s_std, norm);
+       decoder_call(zr, core, s_std, norm);
        encoder_call(zr, video, s_std_output, norm);
 
        if (on)
@@ -1496,8 +1494,6 @@ static int
 zoran_set_input (struct zoran *zr,
                 int           input)
 {
-       struct v4l2_routing route = { 0, 0 };
-
        if (input == zr->input) {
                return 0;
        }
@@ -1519,10 +1515,10 @@ zoran_set_input (struct zoran *zr,
                return -EINVAL;
        }
 
-       route.input = zr->card.input[input].muxsel;
        zr->input = input;
 
-       decoder_call(zr, video, s_routing, &route);
+       decoder_call(zr, video, s_routing,
+                       zr->card.input[input].muxsel, 0, 0);
 
        return 0;
 }
@@ -1748,7 +1744,6 @@ jpgreqbuf_unlock_and_return:
        case BUZIOC_G_STATUS:
        {
                struct zoran_status *bstat = arg;
-               struct v4l2_routing route = { 0, 0 };
                int status = 0, res = 0;
                v4l2_std_id norm;
 
@@ -1762,8 +1757,6 @@ jpgreqbuf_unlock_and_return:
                        return -EINVAL;
                }
 
-               route.input = zr->card.input[bstat->input].muxsel;
-
                mutex_lock(&zr->resource_lock);
 
                if (zr->codec_mode != BUZ_MODE_IDLE) {
@@ -1775,7 +1768,8 @@ jpgreqbuf_unlock_and_return:
                        goto gstat_unlock_and_return;
                }
 
-               decoder_call(zr, video, s_routing, &route);
+               decoder_call(zr, video, s_routing,
+                               zr->card.input[bstat->input].muxsel, 0, 0);
 
                /* sleep 1 second */
                ssleep(1);
@@ -1785,8 +1779,8 @@ jpgreqbuf_unlock_and_return:
                decoder_call(zr, video, g_input_status, &status);
 
                /* restore previous input and norm */
-               route.input = zr->card.input[zr->input].muxsel;
-               decoder_call(zr, video, s_routing, &route);
+               decoder_call(zr, video, s_routing,
+                               zr->card.input[zr->input].muxsel, 0, 0);
 gstat_unlock_and_return:
                mutex_unlock(&zr->resource_lock);
 
index 221409f..ac169c9 100644 (file)
@@ -26,7 +26,6 @@
  */
 
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/usb.h>
index 2fb95a5..f4a162a 100644 (file)
@@ -877,7 +877,7 @@ static int jmb38x_ms_probe(struct pci_dev *pdev,
        int pci_dev_busy = 0;
        int rc, cnt;
 
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc)
                return rc;
 
index ea3aafb..d0d126c 100644 (file)
@@ -1534,13 +1534,13 @@ mpt_mapresources(MPT_ADAPTER *ioc)
 
        pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)
-           && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
+           && !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
                dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
                    ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
                    ioc->name));
-       } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)
-           && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+       } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
+           && !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
                dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
                    ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
                    ioc->name));
index f5cc95c..292b41e 100644 (file)
@@ -185,9 +185,9 @@ int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr, size_t len)
        int dma_64 = 0;
 
        mutex_lock(&mem_lock);
-       if ((sizeof(dma_addr_t) > 4) && (pdev->dma_mask == DMA_64BIT_MASK)) {
+       if ((sizeof(dma_addr_t) > 4) && (pdev->dma_mask == DMA_BIT_MASK(64))) {
                dma_64 = 1;
-               if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                        mutex_unlock(&mem_lock);
                        return -ENOMEM;
                }
@@ -196,7 +196,7 @@ int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr, size_t len)
        addr->virt = dma_alloc_coherent(dev, len, &addr->phys, GFP_KERNEL);
 
        if ((sizeof(dma_addr_t) > 4) && dma_64)
-               if (pci_set_dma_mask(pdev, DMA_64BIT_MASK))
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
                        printk(KERN_WARNING "i2o: unable to set 64-bit DMA");
        mutex_unlock(&mem_lock);
 
index 25d6f23..35ba2ae 100644 (file)
@@ -334,7 +334,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
                return rc;
        }
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING "i2o: no suitable DMA found for %s\n",
                       pci_name(pdev));
                rc = -ENODEV;
@@ -397,7 +397,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
                }
 #ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64
                if (sizeof(dma_addr_t) > 4) {
-                       if (pci_set_dma_mask(pdev, DMA_64BIT_MASK))
+                       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
                                printk(KERN_INFO "%s: 64-bit DMA unavailable\n",
                                       c->name);
                        else {
index be5672a..a6ef182 100644 (file)
@@ -324,7 +324,7 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
        int pci_dev_busy = 0;
        int rc;
 
-       rc = pci_set_dma_mask(dev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(dev, DMA_BIT_MASK(32));
        if (rc)
                return rc;
 
index c232d11..06084db 100644 (file)
@@ -208,7 +208,7 @@ static int mmc_read_ext_csd(struct mmc_card *card)
        }
 
        ext_csd_struct = ext_csd[EXT_CSD_REV];
-       if (ext_csd_struct > 2) {
+       if (ext_csd_struct > 3) {
                printk(KERN_ERR "%s: unrecognised EXT_CSD structure "
                        "version %d\n", mmc_hostname(card->host),
                        ext_csd_struct);
index 26fc098..cd81c39 100644 (file)
@@ -363,15 +363,6 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
                goto err;
 
        /*
-        * For SPI, enable CRC as appropriate.
-        */
-       if (mmc_host_is_spi(host)) {
-               err = mmc_spi_set_crc(host, use_spi_crc);
-               if (err)
-                       goto err;
-       }
-
-       /*
         * Fetch CID from card.
         */
        if (mmc_host_is_spi(host))
@@ -458,6 +449,18 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
        }
 
        /*
+        * For SPI, enable CRC as appropriate.
+        * This CRC enable is located AFTER the reading of the
+        * card registers because some SDHC cards are not able
+        * to provide valid CRCs for non-512-byte blocks.
+        */
+       if (mmc_host_is_spi(host)) {
+               err = mmc_spi_set_crc(host, use_spi_crc);
+               if (err)
+                       goto free_card;
+       }
+
+       /*
         * Attempt to change to high-speed (if supported)
         */
        err = mmc_switch_hs(card);
index eb29b1d..e0be21a 100644 (file)
@@ -307,13 +307,6 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data)
 
        wmb();
 
-       if (host->actual_bus_width == MMC_BUS_WIDTH_4)
-               BLR(host->dma) = 0;     /* burst 64 byte read / 64 bytes write */
-       else
-               BLR(host->dma) = 16;    /* burst 16 byte read / 16 bytes write */
-
-       RSSR(host->dma) = DMA_REQ_SDHC;
-
        set_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events);
        clear_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events);
 
@@ -818,9 +811,11 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
        if (ios->bus_width == MMC_BUS_WIDTH_4) {
                host->actual_bus_width = MMC_BUS_WIDTH_4;
                imx_gpio_mode(PB11_PF_SD_DAT3);
+               BLR(host->dma) = 0;     /* burst 64 byte read/write */
        } else {
                host->actual_bus_width = MMC_BUS_WIDTH_1;
                imx_gpio_mode(GPIO_PORTB | GPIO_IN | GPIO_PUEN | 11);
+               BLR(host->dma) = 16;    /* burst 16 byte read/write */
        }
 
        if (host->power_mode != ios->power_mode) {
@@ -938,7 +933,7 @@ static void imxmci_check_status(unsigned long data)
        mod_timer(&host->timer, jiffies + (HZ>>1));
 }
 
-static int imxmci_probe(struct platform_device *pdev)
+static int __init imxmci_probe(struct platform_device *pdev)
 {
        struct mmc_host *mmc;
        struct imxmci_host *host = NULL;
@@ -1034,6 +1029,7 @@ static int imxmci_probe(struct platform_device *pdev)
        }
        host->dma_allocated = 1;
        imx_dma_setup_handlers(host->dma, imxmci_dma_irq, NULL, host);
+       RSSR(host->dma) = DMA_REQ_SDHC;
 
        tasklet_init(&host->tasklet, imxmci_tasklet_fnc, (unsigned long)host);
        host->status_reg=0;
@@ -1079,7 +1075,7 @@ out:
        return ret;
 }
 
-static int imxmci_remove(struct platform_device *pdev)
+static int __exit imxmci_remove(struct platform_device *pdev)
 {
        struct mmc_host *mmc = platform_get_drvdata(pdev);
 
@@ -1145,8 +1141,7 @@ static int imxmci_resume(struct platform_device *dev)
 #endif /* CONFIG_PM */
 
 static struct platform_driver imxmci_driver = {
-       .probe          = imxmci_probe,
-       .remove         = imxmci_remove,
+       .remove         = __exit_p(imxmci_remove),
        .suspend        = imxmci_suspend,
        .resume         = imxmci_resume,
        .driver         = {
@@ -1157,7 +1152,7 @@ static struct platform_driver imxmci_driver = {
 
 static int __init imxmci_init(void)
 {
-       return platform_driver_register(&imxmci_driver);
+       return platform_driver_probe(&imxmci_driver, imxmci_probe);
 }
 
 static void __exit imxmci_exit(void)
index 72f8bde..f48349d 100644 (file)
@@ -24,7 +24,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#include <linux/hrtimer.h>
+#include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/bio.h>
 #include <linux/dma-mapping.h>
@@ -95,7 +95,7 @@
  * reads which takes nowhere near that long.  Older cards may be able to use
  * shorter timeouts ... but why bother?
  */
-#define r1b_timeout            ktime_set(3, 0)
+#define r1b_timeout            (HZ * 3)
 
 
 /****************************************************************************/
@@ -183,12 +183,11 @@ mmc_spi_readbytes(struct mmc_spi_host *host, unsigned len)
        return status;
 }
 
-static int
-mmc_spi_skip(struct mmc_spi_host *host, ktime_t timeout, unsigned n, u8 byte)
+static int mmc_spi_skip(struct mmc_spi_host *host, unsigned long timeout,
+                       unsigned n, u8 byte)
 {
        u8              *cp = host->data->status;
-
-       timeout = ktime_add(timeout, ktime_get());
+       unsigned long start = jiffies;
 
        while (1) {
                int             status;
@@ -203,22 +202,26 @@ mmc_spi_skip(struct mmc_spi_host *host, ktime_t timeout, unsigned n, u8 byte)
                                return cp[i];
                }
 
-               /* REVISIT investigate msleep() to avoid busy-wait I/O
-                * in at least some cases.
-                */
-               if (ktime_to_ns(ktime_sub(ktime_get(), timeout)) > 0)
+               if (time_is_before_jiffies(start + timeout))
                        break;
+
+               /* If we need long timeouts, we may release the CPU.
+                * We use jiffies here because we want to have a relation
+                * between elapsed time and the blocking of the scheduler.
+                */
+               if (time_is_before_jiffies(start+1))
+                       schedule();
        }
        return -ETIMEDOUT;
 }
 
 static inline int
-mmc_spi_wait_unbusy(struct mmc_spi_host *host, ktime_t timeout)
+mmc_spi_wait_unbusy(struct mmc_spi_host *host, unsigned long timeout)
 {
        return mmc_spi_skip(host, timeout, sizeof(host->data->status), 0);
 }
 
-static int mmc_spi_readtoken(struct mmc_spi_host *host, ktime_t timeout)
+static int mmc_spi_readtoken(struct mmc_spi_host *host, unsigned long timeout)
 {
        return mmc_spi_skip(host, timeout, 1, 0xff);
 }
@@ -251,6 +254,10 @@ static int mmc_spi_response_get(struct mmc_spi_host *host,
        u8      *cp = host->data->status;
        u8      *end = cp + host->t.len;
        int     value = 0;
+       int     bitshift;
+       u8      leftover = 0;
+       unsigned short rotator;
+       int     i;
        char    tag[32];
 
        snprintf(tag, sizeof(tag), "  ... CMD%d response SPI_%s",
@@ -268,9 +275,8 @@ static int mmc_spi_response_get(struct mmc_spi_host *host,
 
        /* Data block reads (R1 response types) may need more data... */
        if (cp == end) {
-               unsigned        i;
-
                cp = host->data->status;
+               end = cp+1;
 
                /* Card sends N(CR) (== 1..8) bytes of all-ones then one
                 * status byte ... and we already scanned 2 bytes.
@@ -295,20 +301,34 @@ static int mmc_spi_response_get(struct mmc_spi_host *host,
        }
 
 checkstatus:
-       if (*cp & 0x80) {
-               dev_dbg(&host->spi->dev, "%s: INVALID RESPONSE, %02x\n",
-                                       tag, *cp);
-               value = -EBADR;
-               goto done;
+       bitshift = 0;
+       if (*cp & 0x80) {
+               /* Houston, we have an ugly card with a bit-shifted response */
+               rotator = *cp++ << 8;
+               /* read the next byte */
+               if (cp == end) {
+                       value = mmc_spi_readbytes(host, 1);
+                       if (value < 0)
+                               goto done;
+                       cp = host->data->status;
+                       end = cp+1;
+               }
+               rotator |= *cp++;
+               while (rotator & 0x8000) {
+                       bitshift++;
+                       rotator <<= 1;
+               }
+               cmd->resp[0] = rotator >> 8;
+               leftover = rotator;
+       } else {
+               cmd->resp[0] = *cp++;
        }
-
-       cmd->resp[0] = *cp++;
        cmd->error = 0;
 
        /* Status byte: the entire seven-bit R1 response.  */
        if (cmd->resp[0] != 0) {
                if ((R1_SPI_PARAMETER | R1_SPI_ADDRESS
-                                       | R1_SPI_ILLEGAL_COMMAND)
+                                     | R1_SPI_ILLEGAL_COMMAND)
                                & cmd->resp[0])
                        value = -EINVAL;
                else if (R1_SPI_COM_CRC & cmd->resp[0])
@@ -336,12 +356,45 @@ checkstatus:
         * SPI R5 == R1 + data byte; IO_RW_DIRECT
         */
        case MMC_RSP_SPI_R2:
-               cmd->resp[0] |= *cp << 8;
+               /* read the next byte */
+               if (cp == end) {
+                       value = mmc_spi_readbytes(host, 1);
+                       if (value < 0)
+                               goto done;
+                       cp = host->data->status;
+                       end = cp+1;
+               }
+               if (bitshift) {
+                       rotator = leftover << 8;
+                       rotator |= *cp << bitshift;
+                       cmd->resp[0] |= (rotator & 0xFF00);
+               } else {
+                       cmd->resp[0] |= *cp << 8;
+               }
                break;
 
        /* SPI R3, R4, or R7 == R1 + 4 bytes */
        case MMC_RSP_SPI_R3:
-               cmd->resp[1] = get_unaligned_be32(cp);
+               rotator = leftover << 8;
+               cmd->resp[1] = 0;
+               for (i = 0; i < 4; i++) {
+                       cmd->resp[1] <<= 8;
+                       /* read the next byte */
+                       if (cp == end) {
+                               value = mmc_spi_readbytes(host, 1);
+                               if (value < 0)
+                                       goto done;
+                               cp = host->data->status;
+                               end = cp+1;
+                       }
+                       if (bitshift) {
+                               rotator |= *cp++ << bitshift;
+                               cmd->resp[1] |= (rotator >> 8);
+                               rotator <<= 8;
+                       } else {
+                               cmd->resp[1] |= *cp++;
+                       }
+               }
                break;
 
        /* SPI R1 == just one status byte */
@@ -607,7 +660,7 @@ mmc_spi_setup_data_message(
  */
 static int
 mmc_spi_writeblock(struct mmc_spi_host *host, struct spi_transfer *t,
-       ktime_t timeout)
+       unsigned long timeout)
 {
        struct spi_device       *spi = host->spi;
        int                     status, i;
@@ -717,11 +770,13 @@ mmc_spi_writeblock(struct mmc_spi_host *host, struct spi_transfer *t,
  */
 static int
 mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t,
-       ktime_t timeout)
+       unsigned long timeout)
 {
        struct spi_device       *spi = host->spi;
        int                     status;
        struct scratch          *scratch = host->data;
+       unsigned int            bitshift;
+       u8                      leftover;
 
        /* At least one SD card sends an all-zeroes byte when N(CX)
         * applies, before the all-ones bytes ... just cope with that.
@@ -733,38 +788,60 @@ mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t,
        if (status == 0xff || status == 0)
                status = mmc_spi_readtoken(host, timeout);
 
-       if (status == SPI_TOKEN_SINGLE) {
-               if (host->dma_dev) {
-                       dma_sync_single_for_device(host->dma_dev,
-                                       host->data_dma, sizeof(*scratch),
-                                       DMA_BIDIRECTIONAL);
-                       dma_sync_single_for_device(host->dma_dev,
-                                       t->rx_dma, t->len,
-                                       DMA_FROM_DEVICE);
-               }
+       if (status < 0) {
+               dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status);
+               return status;
+       }
 
-               status = spi_sync(spi, &host->m);
+       /* The token may be bit-shifted...
+        * the first 0-bit precedes the data stream.
+        */
+       bitshift = 7;
+       while (status & 0x80) {
+               status <<= 1;
+               bitshift--;
+       }
+       leftover = status << 1;
 
-               if (host->dma_dev) {
-                       dma_sync_single_for_cpu(host->dma_dev,
-                                       host->data_dma, sizeof(*scratch),
-                                       DMA_BIDIRECTIONAL);
-                       dma_sync_single_for_cpu(host->dma_dev,
-                                       t->rx_dma, t->len,
-                                       DMA_FROM_DEVICE);
-               }
+       if (host->dma_dev) {
+               dma_sync_single_for_device(host->dma_dev,
+                               host->data_dma, sizeof(*scratch),
+                               DMA_BIDIRECTIONAL);
+               dma_sync_single_for_device(host->dma_dev,
+                               t->rx_dma, t->len,
+                               DMA_FROM_DEVICE);
+       }
 
-       } else {
-               dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status);
+       status = spi_sync(spi, &host->m);
 
-               /* we've read extra garbage, timed out, etc */
-               if (status < 0)
-                       return status;
+       if (host->dma_dev) {
+               dma_sync_single_for_cpu(host->dma_dev,
+                               host->data_dma, sizeof(*scratch),
+                               DMA_BIDIRECTIONAL);
+               dma_sync_single_for_cpu(host->dma_dev,
+                               t->rx_dma, t->len,
+                               DMA_FROM_DEVICE);
+       }
 
-               /* low four bits are an R2 subset, fifth seems to be
-                * vendor specific ... map them all to generic error..
+       if (bitshift) {
+               /* Walk through the data and the crc and do
+                * all the magic to get byte-aligned data.
                 */
-               return -EIO;
+               u8 *cp = t->rx_buf;
+               unsigned int len;
+               unsigned int bitright = 8 - bitshift;
+               u8 temp;
+               for (len = t->len; len; len--) {
+                       temp = *cp;
+                       *cp++ = leftover | (temp >> bitshift);
+                       leftover = temp << bitright;
+               }
+               cp = (u8 *) &scratch->crc_val;
+               temp = *cp;
+               *cp++ = leftover | (temp >> bitshift);
+               leftover = temp << bitright;
+               temp = *cp;
+               *cp = leftover | (temp >> bitshift);
        }
 
        if (host->mmc->use_spi_crc) {
@@ -803,7 +880,7 @@ mmc_spi_data_do(struct mmc_spi_host *host, struct mmc_command *cmd,
        unsigned                n_sg;
        int                     multiple = (data->blocks > 1);
        u32                     clock_rate;
-       ktime_t                 timeout;
+       unsigned long           timeout;
 
        if (data->flags & MMC_DATA_READ)
                direction = DMA_FROM_DEVICE;
@@ -817,8 +894,9 @@ mmc_spi_data_do(struct mmc_spi_host *host, struct mmc_command *cmd,
        else
                clock_rate = spi->max_speed_hz;
 
-       timeout = ktime_add_ns(ktime_set(0, 0), data->timeout_ns +
-                       data->timeout_clks * 1000000 / clock_rate);
+       timeout = data->timeout_ns +
+                 data->timeout_clks * 1000000 / clock_rate;
+       timeout = usecs_to_jiffies((unsigned int)(timeout / 1000)) + 1;
 
        /* Handle scatterlist segments one at a time, with synch for
         * each 512-byte block
index d183be6..e62a22a 100644 (file)
@@ -298,7 +298,6 @@ mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data)
                struct mmc_request *mrq = host->mrq;
 
                host->mrq = NULL;
-               mmc_omap_fclk_lazy_disable(host);
                mmc_request_done(host->mmc, mrq);
                return;
        }
@@ -434,6 +433,8 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
        if (host->mrq == NULL) {
                OMAP_HSMMC_WRITE(host->base, STAT,
                        OMAP_HSMMC_READ(host->base, STAT));
+               /* Flush posted write */
+               OMAP_HSMMC_READ(host->base, STAT);
                return IRQ_HANDLED;
        }
 
@@ -489,8 +490,10 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
        }
 
        OMAP_HSMMC_WRITE(host->base, STAT, status);
+       /* Flush posted write */
+       OMAP_HSMMC_READ(host->base, STAT);
 
-       if (end_cmd || (status & CC))
+       if (end_cmd || ((status & CC) && host->cmd))
                mmc_omap_cmd_done(host, host->cmd);
        if (end_trans || (status & TC))
                mmc_omap_xfer_done(host, data);
index 406da9a..cd37962 100644 (file)
@@ -380,7 +380,7 @@ static int sdhci_pci_enable_dma(struct sdhci_host *host)
                        "doesn't fully claim to support it.\n");
        }
 
-       ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (ret)
                return ret;
 
@@ -729,6 +729,6 @@ static void __exit sdhci_drv_exit(void)
 module_init(sdhci_drv_init);
 module_exit(sdhci_drv_exit);
 
-MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
+MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>");
 MODULE_DESCRIPTION("Secure Digital Host Controller Interface PCI driver");
 MODULE_LICENSE("GPL");
index 30d8e3d..9234be2 100644 (file)
@@ -1935,7 +1935,7 @@ module_exit(sdhci_drv_exit);
 
 module_param(debug_quirks, uint, 0444);
 
-MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
+MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>");
 MODULE_DESCRIPTION("Secure Digital Host Controller Interface core driver");
 MODULE_LICENSE("GPL");
 
index adda379..89bf8cd 100644 (file)
@@ -2036,7 +2036,7 @@ module_param_named(irq, param_irq, uint, 0444);
 module_param_named(dma, param_dma, int, 0444);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
+MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>");
 MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver");
 
 #ifdef CONFIG_PNP
index 4521b1e..82d1e4d 100644 (file)
@@ -4,7 +4,7 @@
 
 # Core functionality.
 obj-$(CONFIG_MTD)              += mtd.o
-mtd-y                          := mtdcore.o mtdsuper.o
+mtd-y                          := mtdcore.o mtdsuper.o mtdbdi.o
 mtd-$(CONFIG_MTD_PARTITIONS)   += mtdpart.o
 
 obj-$(CONFIG_MTD_CONCAT)       += mtdconcat.o
index ecf170b..6697a1e 100644 (file)
@@ -44,8 +44,6 @@ struct ar7_bin_rec {
        unsigned int address;
 };
 
-static struct mtd_partition ar7_parts[AR7_PARTS];
-
 static int create_mtd_partitions(struct mtd_info *master,
                                 struct mtd_partition **pparts,
                                 unsigned long origin)
@@ -57,7 +55,11 @@ static int create_mtd_partitions(struct mtd_info *master,
        unsigned int root_offset = ROOT_OFFSET;
 
        int retries = 10;
+       struct mtd_partition *ar7_parts;
 
+       ar7_parts = kzalloc(sizeof(*ar7_parts) * AR7_PARTS, GFP_KERNEL);
+       if (!ar7_parts)
+               return -ENOMEM;
        ar7_parts[0].name = "loader";
        ar7_parts[0].offset = 0;
        ar7_parts[0].size = master->erasesize;
index f5ab6fa..c240454 100644 (file)
@@ -1236,10 +1236,14 @@ static int inval_cache_and_wait_for_operation(
                        remove_wait_queue(&chip->wq, &wait);
                        spin_lock(chip->mutex);
                }
-               if (chip->erase_suspended || chip->write_suspended)  {
-                       /* Suspend has occured while sleep: reset timeout */
+               if (chip->erase_suspended && chip_state == FL_ERASING)  {
+                       /* Erase suspend occured while sleep: reset timeout */
                        timeo = reset_timeo;
                        chip->erase_suspended = 0;
+               }
+               if (chip->write_suspended && chip_state == FL_WRITING)  {
+                       /* Write suspend occured while sleep: reset timeout */
+                       timeo = reset_timeo;
                        chip->write_suspended = 0;
                }
        }
index 94bb61e..61ea833 100644 (file)
@@ -282,6 +282,16 @@ static void fixup_s29gl032n_sectors(struct mtd_info *mtd, void *param)
        }
 }
 
+static void fixup_M29W128G_write_buffer(struct mtd_info *mtd, void *param)
+{
+       struct map_info *map = mtd->priv;
+       struct cfi_private *cfi = map->fldrv_priv;
+       if (cfi->cfiq->BufWriteTimeoutTyp) {
+               pr_warning("Don't use write buffer on ST flash M29W128G\n");
+               cfi->cfiq->BufWriteTimeoutTyp = 0;
+       }
+}
+
 static struct cfi_fixup cfi_fixup_table[] = {
        { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
 #ifdef AMD_BOOTLOC_BUG
@@ -298,6 +308,7 @@ static struct cfi_fixup cfi_fixup_table[] = {
        { CFI_MFR_AMD, 0x1301, fixup_s29gl064n_sectors, NULL, },
        { CFI_MFR_AMD, 0x1a00, fixup_s29gl032n_sectors, NULL, },
        { CFI_MFR_AMD, 0x1a01, fixup_s29gl032n_sectors, NULL, },
+       { CFI_MFR_ST,  0x227E, fixup_M29W128G_write_buffer, NULL, },
 #if !FORCE_WORD_WRITE
        { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, },
 #endif
index 2f3f2f7..e824b9b 100644 (file)
 #define SST39LF800     0x2781
 #define SST39LF160     0x2782
 #define SST39VF1601    0x234b
+#define SST39VF3201    0x235b
 #define SST39LF512     0x00D4
 #define SST39LF010     0x00D5
 #define SST39LF020     0x00D6
@@ -1490,6 +1491,21 @@ static const struct amd_flash_info jedec_table[] = {
                        ERASEINFO(0x1000,256)
                }
        }, {
+               .mfr_id         = MANUFACTURER_SST,     /* should be CFI */
+               .dev_id         = SST39VF3201,
+               .name           = "SST 39VF3201",
+               .devtypes       = CFI_DEVICETYPE_X16,
+               .uaddr          = MTD_UADDR_0xAAAA_0x5555,
+               .dev_size       = SIZE_4MiB,
+               .cmd_set        = P_ID_AMD_STD,
+               .nr_regions     = 4,
+               .regions        = {
+                       ERASEINFO(0x1000,256),
+                       ERASEINFO(0x1000,256),
+                       ERASEINFO(0x1000,256),
+                       ERASEINFO(0x1000,256)
+               }
+       }, {
                .mfr_id         = MANUFACTURER_SST,
                .dev_id         = SST36VF3203,
                .name           = "SST 36VF3203",
index 072dd8a..6bdc50c 100644 (file)
@@ -21,6 +21,8 @@ static int mapram_write (struct mtd_info *, loff_t, size_t, size_t *, const u_ch
 static int mapram_erase (struct mtd_info *, struct erase_info *);
 static void mapram_nop (struct mtd_info *);
 static struct mtd_info *map_ram_probe(struct map_info *map);
+static unsigned long mapram_unmapped_area(struct mtd_info *, unsigned long,
+                                         unsigned long, unsigned long);
 
 
 static struct mtd_chip_driver mapram_chipdrv = {
@@ -64,6 +66,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
        mtd->type = MTD_RAM;
        mtd->size = map->size;
        mtd->erase = mapram_erase;
+       mtd->get_unmapped_area = mapram_unmapped_area;
        mtd->read = mapram_read;
        mtd->write = mapram_write;
        mtd->sync = mapram_nop;
@@ -79,6 +82,20 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
 }
 
 
+/*
+ * Allow NOMMU mmap() to directly map the device (if not NULL)
+ * - return the address to which the offset maps
+ * - return -ENOSYS to indicate refusal to do the mapping
+ */
+static unsigned long mapram_unmapped_area(struct mtd_info *mtd,
+                                         unsigned long len,
+                                         unsigned long offset,
+                                         unsigned long flags)
+{
+       struct map_info *map = mtd->priv;
+       return (unsigned long) map->virt + offset;
+}
+
 static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
 {
        struct map_info *map = mtd->priv;
index c76d6e5..076090a 100644 (file)
@@ -20,6 +20,8 @@ static int maprom_write (struct mtd_info *, loff_t, size_t, size_t *, const u_ch
 static void maprom_nop (struct mtd_info *);
 static struct mtd_info *map_rom_probe(struct map_info *map);
 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info);
+static unsigned long maprom_unmapped_area(struct mtd_info *, unsigned long,
+                                         unsigned long, unsigned long);
 
 static struct mtd_chip_driver maprom_chipdrv = {
        .probe  = map_rom_probe,
@@ -40,6 +42,7 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
        mtd->name = map->name;
        mtd->type = MTD_ROM;
        mtd->size = map->size;
+       mtd->get_unmapped_area = maprom_unmapped_area;
        mtd->read = maprom_read;
        mtd->write = maprom_write;
        mtd->sync = maprom_nop;
@@ -53,6 +56,20 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
 }
 
 
+/*
+ * Allow NOMMU mmap() to directly map the device (if not NULL)
+ * - return the address to which the offset maps
+ * - return -ENOSYS to indicate refusal to do the mapping
+ */
+static unsigned long maprom_unmapped_area(struct mtd_info *mtd,
+                                         unsigned long len,
+                                         unsigned long offset,
+                                         unsigned long flags)
+{
+       struct map_info *map = mtd->priv;
+       return (unsigned long) map->virt + offset;
+}
+
 static int maprom_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
 {
        struct map_info *map = mtd->priv;
index 50a3403..5011fa7 100644 (file)
@@ -335,7 +335,11 @@ static int parse_cmdline_partitions(struct mtd_info *master,
                                }
                                offset += part->parts[i].size;
                        }
-                       *pparts = part->parts;
+                       *pparts = kmemdup(part->parts,
+                                       sizeof(*part->parts) * part->num_parts,
+                                       GFP_KERNEL);
+                       if (!*pparts)
+                               return -ENOMEM;
                        return part->num_parts;
                }
        }
index 50de839..5bf5f46 100644 (file)
@@ -10,7 +10,6 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <linux/miscdevice.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
index e32c568..0990f78 100644 (file)
@@ -10,7 +10,6 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <linux/miscdevice.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/init.h>
index d853f89..719b291 100644 (file)
@@ -14,7 +14,6 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <linux/miscdevice.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/init.h>
index 874e51b..a19cda5 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <linux/miscdevice.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/init.h>
index 7c3fc76..8185b1f 100644 (file)
 #define FAST_READ_DUMMY_BYTE 0
 #endif
 
-#ifdef CONFIG_MTD_PARTITIONS
-#define        mtd_has_partitions()    (1)
-#else
-#define        mtd_has_partitions()    (0)
-#endif
-
 /****************************************************************************/
 
 struct m25p {
@@ -678,6 +672,8 @@ static int __devinit m25p_probe(struct spi_device *spi)
                flash->mtd.erasesize = info->sector_size;
        }
 
+       flash->mtd.dev.parent = &spi->dev;
+
        dev_info(&spi->dev, "%s (%lld Kbytes)\n", info->name,
                        (long long)flash->mtd.size >> 10);
 
@@ -708,12 +704,13 @@ static int __devinit m25p_probe(struct spi_device *spi)
                struct mtd_partition    *parts = NULL;
                int                     nr_parts = 0;
 
-#ifdef CONFIG_MTD_CMDLINE_PARTS
-               static const char *part_probes[] = { "cmdlinepart", NULL, };
+               if (mtd_has_cmdlinepart()) {
+                       static const char *part_probes[]
+                                       = { "cmdlinepart", NULL, };
 
-               nr_parts = parse_mtd_partitions(&flash->mtd,
-                               part_probes, &parts, 0);
-#endif
+                       nr_parts = parse_mtd_partitions(&flash->mtd,
+                                       part_probes, &parts, 0);
+               }
 
                if (nr_parts <= 0 && data && data->parts) {
                        parts = data->parts;
index 6d9f810..62dee54 100644 (file)
@@ -98,12 +98,6 @@ struct dataflash {
        struct mtd_info         mtd;
 };
 
-#ifdef CONFIG_MTD_PARTITIONS
-#define        mtd_has_partitions()    (1)
-#else
-#define        mtd_has_partitions()    (0)
-#endif
-
 /* ......................................................................... */
 
 /*
@@ -670,6 +664,8 @@ add_dataflash_otp(struct spi_device *spi, char *name,
        device->write = dataflash_write;
        device->priv = priv;
 
+       device->dev.parent = &spi->dev;
+
        if (revision >= 'c')
                otp_tag = otp_setup(device, revision);
 
@@ -682,11 +678,13 @@ add_dataflash_otp(struct spi_device *spi, char *name,
                struct mtd_partition    *parts;
                int                     nr_parts = 0;
 
-#ifdef CONFIG_MTD_CMDLINE_PARTS
-               static const char *part_probes[] = { "cmdlinepart", NULL, };
+               if (mtd_has_cmdlinepart()) {
+                       static const char *part_probes[]
+                                       = { "cmdlinepart", NULL, };
 
-               nr_parts = parse_mtd_partitions(device, part_probes, &parts, 0);
-#endif
+                       nr_parts = parse_mtd_partitions(device,
+                                       part_probes, &parts, 0);
+               }
 
                if (nr_parts <= 0 && pdata && pdata->parts) {
                        parts = pdata->parts;
index 3aaca88..fce5ff7 100644 (file)
@@ -65,6 +65,19 @@ static void ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
 {
 }
 
+/*
+ * Allow NOMMU mmap() to directly map the device (if not NULL)
+ * - return the address to which the offset maps
+ * - return -ENOSYS to indicate refusal to do the mapping
+ */
+static unsigned long ram_get_unmapped_area(struct mtd_info *mtd,
+                                          unsigned long len,
+                                          unsigned long offset,
+                                          unsigned long flags)
+{
+       return (unsigned long) mtd->priv + offset;
+}
+
 static int ram_read(struct mtd_info *mtd, loff_t from, size_t len,
                size_t *retlen, u_char *buf)
 {
@@ -116,6 +129,7 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
        mtd->erase = ram_erase;
        mtd->point = ram_point;
        mtd->unpoint = ram_unpoint;
+       mtd->get_unmapped_area = ram_get_unmapped_area;
        mtd->read = ram_read;
        mtd->write = ram_write;
 
index f751dd9..32e82ae 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <linux/miscdevice.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/init.h>
diff --git a/drivers/mtd/internal.h b/drivers/mtd/internal.h
new file mode 100644 (file)
index 0000000..c658fe7
--- /dev/null
@@ -0,0 +1,17 @@
+/* Internal MTD definitions
+ *
+ * Copyright Â© 2006 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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.
+ */
+
+/*
+ * mtdbdi.c
+ */
+extern struct backing_dev_info mtd_bdi_unmappable;
+extern struct backing_dev_info mtd_bdi_ro_mappable;
+extern struct backing_dev_info mtd_bdi_rw_mappable;
index 729f899..82923bd 100644 (file)
@@ -529,12 +529,6 @@ config MTD_DMV182
         help
           Map driver for Dy-4 SVME/DMV-182 board.
 
-config MTD_SHARP_SL
-       tristate "ROM mapped on Sharp SL Series"
-       depends on ARCH_PXA
-       help
-         This enables access to the flash chip on the Sharp SL Series of PDAs.
-
 config MTD_INTEL_VR_NOR
        tristate "NOR flash on Intel Vermilion Range Expansion Bus CS0"
        depends on PCI
@@ -542,6 +536,12 @@ config MTD_INTEL_VR_NOR
          Map driver for a NOR flash bank located on the Expansion Bus of the
          Intel Vermilion Range chipset.
 
+config MTD_RBTX4939
+       tristate "Map driver for RBTX4939 board"
+       depends on TOSHIBA_RBTX4939 && MTD_CFI && MTD_COMPLEX_MAPPINGS
+       help
+         Map driver for NOR flash chips on RBTX4939 board.
+
 config MTD_PLATRAM
        tristate "Map driver for platform device RAM (mtd-ram)"
        select MTD_RAM
index 26b28a7..2dbc1be 100644 (file)
@@ -56,9 +56,9 @@ obj-$(CONFIG_MTD_IXP4XX)      += ixp4xx.o
 obj-$(CONFIG_MTD_IXP2000)      += ixp2000.o
 obj-$(CONFIG_MTD_WRSBC8260)    += wr_sbc82xx_flash.o
 obj-$(CONFIG_MTD_DMV182)       += dmv182.o
-obj-$(CONFIG_MTD_SHARP_SL)     += sharpsl-flash.o
 obj-$(CONFIG_MTD_PLATRAM)      += plat-ram.o
 obj-$(CONFIG_MTD_OMAP_NOR)     += omap_nor.o
 obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o
 obj-$(CONFIG_MTD_BFIN_ASYNC)   += bfin-async-flash.o
+obj-$(CONFIG_MTD_RBTX4939)     += rbtx4939-flash.o
 obj-$(CONFIG_MTD_VMU)          += vmu-flash.o
index 7e50e9b..a244781 100644 (file)
@@ -115,6 +115,8 @@ static int __init omapflash_probe(struct platform_device *pdev)
        }
        info->mtd->owner = THIS_MODULE;
 
+       info->mtd->dev.parent = &pdev->dev;
+
 #ifdef CONFIG_MTD_PARTITIONS
        err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0);
        if (err > 0)
index 2297182..29a9011 100644 (file)
@@ -147,6 +147,7 @@ static int physmap_flash_probe(struct platform_device *dev)
                        devices_found++;
                }
                info->mtd[i]->owner = THIS_MODULE;
+               info->mtd[i]->dev.parent = &dev->dev;
        }
 
        if (devices_found == 1) {
index fbf0ca9..c83a60f 100644 (file)
@@ -219,6 +219,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
                goto err_out;
        }
        info->mtd->owner = THIS_MODULE;
+       info->mtd->dev.parent = &dev->dev;
 
 #ifdef CONFIG_MTD_PARTITIONS
        /* First look for RedBoot table or partitions on the command
index e7dd9c8..49c9ece 100644 (file)
@@ -224,6 +224,7 @@ static int platram_probe(struct platform_device *pdev)
        }
 
        info->mtd->owner = THIS_MODULE;
+       info->mtd->dev.parent = &pdev->dev;
 
        platram_setrw(info, PLATRAM_RW);
 
diff --git a/drivers/mtd/maps/rbtx4939-flash.c b/drivers/mtd/maps/rbtx4939-flash.c
new file mode 100644 (file)
index 0000000..d39f0ad
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+ * rbtx4939-flash (based on physmap.c)
+ *
+ * This is a simplified physmap driver with map_init callback function.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Copyright (C) 2009 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <asm/txx9/rbtx4939.h>
+
+struct rbtx4939_flash_info {
+       struct mtd_info *mtd;
+       struct map_info map;
+#ifdef CONFIG_MTD_PARTITIONS
+       int nr_parts;
+       struct mtd_partition *parts;
+#endif
+};
+
+static int rbtx4939_flash_remove(struct platform_device *dev)
+{
+       struct rbtx4939_flash_info *info;
+
+       info = platform_get_drvdata(dev);
+       if (!info)
+               return 0;
+       platform_set_drvdata(dev, NULL);
+
+       if (info->mtd) {
+#ifdef CONFIG_MTD_PARTITIONS
+               struct rbtx4939_flash_data *pdata = dev->dev.platform_data;
+
+               if (info->nr_parts) {
+                       del_mtd_partitions(info->mtd);
+                       kfree(info->parts);
+               } else if (pdata->nr_parts)
+                       del_mtd_partitions(info->mtd);
+               else
+                       del_mtd_device(info->mtd);
+#else
+               del_mtd_device(info->mtd);
+#endif
+               map_destroy(info->mtd);
+       }
+       return 0;
+}
+
+static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
+#ifdef CONFIG_MTD_PARTITIONS
+static const char *part_probe_types[] = { "cmdlinepart", NULL };
+#endif
+
+static int rbtx4939_flash_probe(struct platform_device *dev)
+{
+       struct rbtx4939_flash_data *pdata;
+       struct rbtx4939_flash_info *info;
+       struct resource *res;
+       const char **probe_type;
+       int err = 0;
+       unsigned long size;
+
+       pdata = dev->dev.platform_data;
+       if (!pdata)
+               return -ENODEV;
+
+       res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+       if (!res)
+               return -ENODEV;
+       info = devm_kzalloc(&dev->dev, sizeof(struct rbtx4939_flash_info),
+                           GFP_KERNEL);
+       if (!info)
+               return -ENOMEM;
+
+       platform_set_drvdata(dev, info);
+
+       size = resource_size(res);
+       pr_notice("rbtx4939 platform flash device: %pR\n", res);
+
+       if (!devm_request_mem_region(&dev->dev, res->start, size,
+                                    dev_name(&dev->dev)))
+               return -EBUSY;
+
+       info->map.name = dev_name(&dev->dev);
+       info->map.phys = res->start;
+       info->map.size = size;
+       info->map.bankwidth = pdata->width;
+
+       info->map.virt = devm_ioremap(&dev->dev, info->map.phys, size);
+       if (!info->map.virt)
+               return -EBUSY;
+
+       if (pdata->map_init)
+               (*pdata->map_init)(&info->map);
+       else
+               simple_map_init(&info->map);
+
+       probe_type = rom_probe_types;
+       for (; !info->mtd && *probe_type; probe_type++)
+               info->mtd = do_map_probe(*probe_type, &info->map);
+       if (!info->mtd) {
+               dev_err(&dev->dev, "map_probe failed\n");
+               err = -ENXIO;
+               goto err_out;
+       }
+       info->mtd->owner = THIS_MODULE;
+       if (err)
+               goto err_out;
+
+#ifdef CONFIG_MTD_PARTITIONS
+       err = parse_mtd_partitions(info->mtd, part_probe_types,
+                               &info->parts, 0);
+       if (err > 0) {
+               add_mtd_partitions(info->mtd, info->parts, err);
+               info->nr_parts = err;
+               return 0;
+       }
+
+       if (pdata->nr_parts) {
+               pr_notice("Using rbtx4939 partition information\n");
+               add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts);
+               return 0;
+       }
+#endif
+
+       add_mtd_device(info->mtd);
+       return 0;
+
+err_out:
+       rbtx4939_flash_remove(dev);
+       return err;
+}
+
+#ifdef CONFIG_PM
+static int rbtx4939_flash_suspend(struct platform_device *dev,
+                                 pm_message_t state)
+{
+       struct rbtx4939_flash_info *info = platform_get_drvdata(dev);
+
+       if (info->mtd->suspend)
+               return info->mtd->suspend(info->mtd);
+       return 0;
+}
+
+static int rbtx4939_flash_resume(struct platform_device *dev)
+{
+       struct rbtx4939_flash_info *info = platform_get_drvdata(dev);
+
+       if (info->mtd->resume)
+               info->mtd->resume(info->mtd);
+       return 0;
+}
+
+static void rbtx4939_flash_shutdown(struct platform_device *dev)
+{
+       struct rbtx4939_flash_info *info = platform_get_drvdata(dev);
+
+       if (info->mtd->suspend && info->mtd->resume)
+               if (info->mtd->suspend(info->mtd) == 0)
+                       info->mtd->resume(info->mtd);
+}
+#else
+#define rbtx4939_flash_suspend NULL
+#define rbtx4939_flash_resume NULL
+#define rbtx4939_flash_shutdown NULL
+#endif
+
+static struct platform_driver rbtx4939_flash_driver = {
+       .probe          = rbtx4939_flash_probe,
+       .remove         = rbtx4939_flash_remove,
+       .suspend        = rbtx4939_flash_suspend,
+       .resume         = rbtx4939_flash_resume,
+       .shutdown       = rbtx4939_flash_shutdown,
+       .driver         = {
+               .name   = "rbtx4939-flash",
+               .owner  = THIS_MODULE,
+       },
+};
+
+static int __init rbtx4939_flash_init(void)
+{
+       return platform_driver_register(&rbtx4939_flash_driver);
+}
+
+static void __exit rbtx4939_flash_exit(void)
+{
+       platform_driver_unregister(&rbtx4939_flash_driver);
+}
+
+module_init(rbtx4939_flash_init);
+module_exit(rbtx4939_flash_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("RBTX4939 MTD map driver");
+MODULE_ALIAS("platform:rbtx4939-flash");
index 8f57b6f..05e9362 100644 (file)
@@ -351,7 +351,7 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
 
 static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
 
-static int __init sa1100_mtd_probe(struct platform_device *pdev)
+static int __devinit sa1100_mtd_probe(struct platform_device *pdev)
 {
        struct flash_platform_data *plat = pdev->dev.platform_data;
        struct mtd_partition *parts;
diff --git a/drivers/mtd/maps/sharpsl-flash.c b/drivers/mtd/maps/sharpsl-flash.c
deleted file mode 100644 (file)
index b392f09..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * sharpsl-flash.c
- *
- * Copyright (C) 2001 Lineo Japan, Inc.
- * Copyright (C) 2002  SHARP
- *
- * based on rpxlite.c,v 1.15 2001/10/02 15:05:14 dwmw2 Exp
- *          Handle mapping of the flash on the RPX Lite and CLLF boards
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/map.h>
-#include <linux/mtd/partitions.h>
-#include <asm/io.h>
-#include <asm/mach-types.h>
-
-#define WINDOW_ADDR 0x00000000
-#define WINDOW_SIZE 0x00800000
-#define BANK_WIDTH 2
-
-static struct mtd_info *mymtd;
-
-struct map_info sharpsl_map = {
-       .name = "sharpsl-flash",
-       .size = WINDOW_SIZE,
-       .bankwidth = BANK_WIDTH,
-       .phys = WINDOW_ADDR
-};
-
-static struct mtd_partition sharpsl_partitions[1] = {
-       {
-               name:           "Boot PROM Filesystem",
-       }
-};
-
-static int __init init_sharpsl(void)
-{
-       struct mtd_partition *parts;
-       int nb_parts = 0;
-       char *part_type = "static";
-
-       printk(KERN_NOTICE "Sharp SL series flash device: %x at %x\n",
-               WINDOW_SIZE, WINDOW_ADDR);
-       sharpsl_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
-       if (!sharpsl_map.virt) {
-               printk("Failed to ioremap\n");
-               return -EIO;
-       }
-
-       simple_map_init(&sharpsl_map);
-
-       mymtd = do_map_probe("map_rom", &sharpsl_map);
-       if (!mymtd) {
-               iounmap(sharpsl_map.virt);
-               return -ENXIO;
-       }
-
-       mymtd->owner = THIS_MODULE;
-
-       if (machine_is_corgi() || machine_is_shepherd() || machine_is_husky()
-               || machine_is_poodle()) {
-               sharpsl_partitions[0].size=0x006d0000;
-               sharpsl_partitions[0].offset=0x00120000;
-       } else if (machine_is_tosa()) {
-               sharpsl_partitions[0].size=0x006a0000;
-               sharpsl_partitions[0].offset=0x00160000;
-       } else if (machine_is_spitz() || machine_is_akita() || machine_is_borzoi()) {
-               sharpsl_partitions[0].size=0x006b0000;
-               sharpsl_partitions[0].offset=0x00140000;
-       } else {
-               map_destroy(mymtd);
-               iounmap(sharpsl_map.virt);
-               return -ENODEV;
-       }
-
-       parts = sharpsl_partitions;
-       nb_parts = ARRAY_SIZE(sharpsl_partitions);
-
-       printk(KERN_NOTICE "Using %s partition definition\n", part_type);
-       add_mtd_partitions(mymtd, parts, nb_parts);
-
-       return 0;
-}
-
-static void __exit cleanup_sharpsl(void)
-{
-       if (mymtd) {
-               del_mtd_partitions(mymtd);
-               map_destroy(mymtd);
-       }
-       if (sharpsl_map.virt) {
-               iounmap(sharpsl_map.virt);
-               sharpsl_map.virt = 0;
-       }
-}
-
-module_init(init_sharpsl);
-module_exit(cleanup_sharpsl);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("SHARP (Original: Arnold Christensen <AKC@pel.dk>)");
-MODULE_DESCRIPTION("MTD map driver for SHARP SL series");
index 1409f01..a49a9c8 100644 (file)
@@ -286,6 +286,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
        gd->private_data = new;
        new->blkcore_priv = gd;
        gd->queue = tr->blkcore_priv->rq;
+       gd->driverfs_dev = new->mtd->dev.parent;
 
        if (new->readonly)
                set_disk_ro(gd, 1);
@@ -382,11 +383,12 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
        tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr,
                        "%sd", tr->name);
        if (IS_ERR(tr->blkcore_priv->thread)) {
+               int ret = PTR_ERR(tr->blkcore_priv->thread);
                blk_cleanup_queue(tr->blkcore_priv->rq);
                unregister_blkdev(tr->major, tr->name);
                kfree(tr->blkcore_priv);
                mutex_unlock(&mtd_table_mutex);
-               return PTR_ERR(tr->blkcore_priv->thread);
+               return ret;
        }
 
        INIT_LIST_HEAD(&tr->devs);
diff --git a/drivers/mtd/mtdbdi.c b/drivers/mtd/mtdbdi.c
new file mode 100644 (file)
index 0000000..5ca5aed
--- /dev/null
@@ -0,0 +1,43 @@
+/* MTD backing device capabilities
+ *
+ * Copyright Â© 2006 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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 <linux/backing-dev.h>
+#include <linux/mtd/mtd.h>
+#include "internal.h"
+
+/*
+ * backing device capabilities for non-mappable devices (such as NAND flash)
+ * - permits private mappings, copies are taken of the data
+ */
+struct backing_dev_info mtd_bdi_unmappable = {
+       .capabilities   = BDI_CAP_MAP_COPY,
+};
+
+/*
+ * backing device capabilities for R/O mappable devices (such as ROM)
+ * - permits private mappings, copies are taken of the data
+ * - permits non-writable shared mappings
+ */
+struct backing_dev_info mtd_bdi_ro_mappable = {
+       .capabilities   = (BDI_CAP_MAP_COPY | BDI_CAP_MAP_DIRECT |
+                          BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP),
+};
+
+/*
+ * backing device capabilities for writable mappable devices (such as RAM)
+ * - permits private mappings, copies are taken of the data
+ * - permits non-writable shared mappings
+ */
+struct backing_dev_info mtd_bdi_rw_mappable = {
+       .capabilities   = (BDI_CAP_MAP_COPY | BDI_CAP_MAP_DIRECT |
+                          BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP |
+                          BDI_CAP_WRITE_MAP),
+};
index e9ec59e..763d3f0 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/smp_lock.h>
+#include <linux/backing-dev.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/compatmac.h>
 
 #include <asm/uaccess.h>
 
-static struct class *mtd_class;
-
-static void mtd_notify_add(struct mtd_info* mtd)
-{
-       if (!mtd)
-               return;
-
-       device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
-                     NULL, "mtd%d", mtd->index);
-
-       device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
-                     NULL, "mtd%dro", mtd->index);
-}
-
-static void mtd_notify_remove(struct mtd_info* mtd)
-{
-       if (!mtd)
-               return;
-
-       device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2));
-       device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1));
-}
-
-static struct mtd_notifier notifier = {
-       .add    = mtd_notify_add,
-       .remove = mtd_notify_remove,
-};
 
 /*
  * Data structure to hold the pointer to the mtd device as well
@@ -107,12 +81,15 @@ static int mtd_open(struct inode *inode, struct file *file)
                goto out;
        }
 
-       if (MTD_ABSENT == mtd->type) {
+       if (mtd->type == MTD_ABSENT) {
                put_mtd_device(mtd);
                ret = -ENODEV;
                goto out;
        }
 
+       if (mtd->backing_dev_info)
+               file->f_mapping->backing_dev_info = mtd->backing_dev_info;
+
        /* You can't open it RW if it's not a writeable device */
        if ((file->f_mode & FMODE_WRITE) && !(mtd->flags & MTD_WRITEABLE)) {
                put_mtd_device(mtd);
@@ -781,6 +758,59 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
        return ret;
 } /* memory_ioctl */
 
+/*
+ * try to determine where a shared mapping can be made
+ * - only supported for NOMMU at the moment (MMU can't doesn't copy private
+ *   mappings)
+ */
+#ifndef CONFIG_MMU
+static unsigned long mtd_get_unmapped_area(struct file *file,
+                                          unsigned long addr,
+                                          unsigned long len,
+                                          unsigned long pgoff,
+                                          unsigned long flags)
+{
+       struct mtd_file_info *mfi = file->private_data;
+       struct mtd_info *mtd = mfi->mtd;
+
+       if (mtd->get_unmapped_area) {
+               unsigned long offset;
+
+               if (addr != 0)
+                       return (unsigned long) -EINVAL;
+
+               if (len > mtd->size || pgoff >= (mtd->size >> PAGE_SHIFT))
+                       return (unsigned long) -EINVAL;
+
+               offset = pgoff << PAGE_SHIFT;
+               if (offset > mtd->size - len)
+                       return (unsigned long) -EINVAL;
+
+               return mtd->get_unmapped_area(mtd, len, offset, flags);
+       }
+
+       /* can't map directly */
+       return (unsigned long) -ENOSYS;
+}
+#endif
+
+/*
+ * set up a mapping for shared memory segments
+ */
+static int mtd_mmap(struct file *file, struct vm_area_struct *vma)
+{
+#ifdef CONFIG_MMU
+       struct mtd_file_info *mfi = file->private_data;
+       struct mtd_info *mtd = mfi->mtd;
+
+       if (mtd->type == MTD_RAM || mtd->type == MTD_ROM)
+               return 0;
+       return -ENOSYS;
+#else
+       return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS;
+#endif
+}
+
 static const struct file_operations mtd_fops = {
        .owner          = THIS_MODULE,
        .llseek         = mtd_lseek,
@@ -789,39 +819,36 @@ static const struct file_operations mtd_fops = {
        .ioctl          = mtd_ioctl,
        .open           = mtd_open,
        .release        = mtd_close,
+       .mmap           = mtd_mmap,
+#ifndef CONFIG_MMU
+       .get_unmapped_area = mtd_get_unmapped_area,
+#endif
 };
 
 static int __init init_mtdchar(void)
 {
-       if (register_chrdev(MTD_CHAR_MAJOR, "mtd", &mtd_fops)) {
+       int status;
+
+       status = register_chrdev(MTD_CHAR_MAJOR, "mtd", &mtd_fops);
+       if (status < 0) {
                printk(KERN_NOTICE "Can't allocate major number %d for Memory Technology Devices.\n",
                       MTD_CHAR_MAJOR);
-               return -EAGAIN;
        }
 
-       mtd_class = class_create(THIS_MODULE, "mtd");
-
-       if (IS_ERR(mtd_class)) {
-               printk(KERN_ERR "Error creating mtd class.\n");
-               unregister_chrdev(MTD_CHAR_MAJOR, "mtd");
-               return PTR_ERR(mtd_class);
-       }
-
-       register_mtd_user(&notifier);
-       return 0;
+       return status;
 }
 
 static void __exit cleanup_mtdchar(void)
 {
-       unregister_mtd_user(&notifier);
-       class_destroy(mtd_class);
        unregister_chrdev(MTD_CHAR_MAJOR, "mtd");
 }
 
 module_init(init_mtdchar);
 module_exit(cleanup_mtdchar);
 
+MODULE_ALIAS_CHARDEV_MAJOR(MTD_CHAR_MAJOR);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
 MODULE_DESCRIPTION("Direct character-device access to MTD devices");
+MODULE_ALIAS_CHARDEV_MAJOR(MTD_CHAR_MAJOR);
index 3dbb1b3..792b547 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/types.h>
+#include <linux/backing-dev.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/concat.h>
@@ -684,6 +685,40 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs)
 }
 
 /*
+ * try to support NOMMU mmaps on concatenated devices
+ * - we don't support subdev spanning as we can't guarantee it'll work
+ */
+static unsigned long concat_get_unmapped_area(struct mtd_info *mtd,
+                                             unsigned long len,
+                                             unsigned long offset,
+                                             unsigned long flags)
+{
+       struct mtd_concat *concat = CONCAT(mtd);
+       int i;
+
+       for (i = 0; i < concat->num_subdev; i++) {
+               struct mtd_info *subdev = concat->subdev[i];
+
+               if (offset >= subdev->size) {
+                       offset -= subdev->size;
+                       continue;
+               }
+
+               /* we've found the subdev over which the mapping will reside */
+               if (offset + len > subdev->size)
+                       return (unsigned long) -EINVAL;
+
+               if (subdev->get_unmapped_area)
+                       return subdev->get_unmapped_area(subdev, len, offset,
+                                                        flags);
+
+               break;
+       }
+
+       return (unsigned long) -ENOSYS;
+}
+
+/*
  * This function constructs a virtual MTD device by concatenating
  * num_devs MTD devices. A pointer to the new device object is
  * stored to *new_dev upon success. This function does _not_
@@ -740,6 +775,8 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],       /* subdevices to c
 
        concat->mtd.ecc_stats.badblocks = subdev[0]->ecc_stats.badblocks;
 
+       concat->mtd.backing_dev_info = subdev[0]->backing_dev_info;
+
        concat->subdev[0] = subdev[0];
 
        for (i = 1; i < num_devs; i++) {
@@ -766,6 +803,15 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],      /* subdevices to c
                                concat->mtd.flags |=
                                    subdev[i]->flags & MTD_WRITEABLE;
                }
+
+               /* only permit direct mapping if the BDIs are all the same
+                * - copy-mapping is still permitted
+                */
+               if (concat->mtd.backing_dev_info !=
+                   subdev[i]->backing_dev_info)
+                       concat->mtd.backing_dev_info =
+                               &default_backing_dev_info;
+
                concat->mtd.size += subdev[i]->size;
                concat->mtd.ecc_stats.badblocks +=
                        subdev[i]->ecc_stats.badblocks;
@@ -796,6 +842,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],       /* subdevices to c
        concat->mtd.unlock = concat_unlock;
        concat->mtd.suspend = concat_suspend;
        concat->mtd.resume = concat_resume;
+       concat->mtd.get_unmapped_area = concat_get_unmapped_area;
 
        /*
         * Combine the erase block size info of the subdevices:
index 76fe0a1..fdd6ae8 100644 (file)
 #include <linux/proc_fs.h>
 
 #include <linux/mtd/mtd.h>
+#include "internal.h"
 
 #include "mtdcore.h"
 
+
+static struct class *mtd_class;
+
 /* These are exported solely for the purpose of mtd_blkdevs.c. You
    should not use them for _anything_ else */
 DEFINE_MUTEX(mtd_table_mutex);
@@ -32,6 +36,160 @@ EXPORT_SYMBOL_GPL(mtd_table);
 
 static LIST_HEAD(mtd_notifiers);
 
+
+#if defined(CONFIG_MTD_CHAR) || defined(CONFIG_MTD_CHAR_MODULE)
+#define MTD_DEVT(index) MKDEV(MTD_CHAR_MAJOR, (index)*2)
+#else
+#define MTD_DEVT(index) 0
+#endif
+
+/* REVISIT once MTD uses the driver model better, whoever allocates
+ * the mtd_info will probably want to use the release() hook...
+ */
+static void mtd_release(struct device *dev)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       /* remove /dev/mtdXro node if needed */
+       if (MTD_DEVT(mtd->index))
+               device_destroy(mtd_class, MTD_DEVT(mtd->index) + 1);
+}
+
+static ssize_t mtd_type_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+       char *type;
+
+       switch (mtd->type) {
+       case MTD_ABSENT:
+               type = "absent";
+               break;
+       case MTD_RAM:
+               type = "ram";
+               break;
+       case MTD_ROM:
+               type = "rom";
+               break;
+       case MTD_NORFLASH:
+               type = "nor";
+               break;
+       case MTD_NANDFLASH:
+               type = "nand";
+               break;
+       case MTD_DATAFLASH:
+               type = "dataflash";
+               break;
+       case MTD_UBIVOLUME:
+               type = "ubi";
+               break;
+       default:
+               type = "unknown";
+       }
+
+       return snprintf(buf, PAGE_SIZE, "%s\n", type);
+}
+static DEVICE_ATTR(type, S_IRUGO, mtd_type_show, NULL);
+
+static ssize_t mtd_flags_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       return snprintf(buf, PAGE_SIZE, "0x%lx\n", (unsigned long)mtd->flags);
+
+}
+static DEVICE_ATTR(flags, S_IRUGO, mtd_flags_show, NULL);
+
+static ssize_t mtd_size_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       return snprintf(buf, PAGE_SIZE, "%llu\n",
+               (unsigned long long)mtd->size);
+
+}
+static DEVICE_ATTR(size, S_IRUGO, mtd_size_show, NULL);
+
+static ssize_t mtd_erasesize_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       return snprintf(buf, PAGE_SIZE, "%lu\n", (unsigned long)mtd->erasesize);
+
+}
+static DEVICE_ATTR(erasesize, S_IRUGO, mtd_erasesize_show, NULL);
+
+static ssize_t mtd_writesize_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       return snprintf(buf, PAGE_SIZE, "%lu\n", (unsigned long)mtd->writesize);
+
+}
+static DEVICE_ATTR(writesize, S_IRUGO, mtd_writesize_show, NULL);
+
+static ssize_t mtd_oobsize_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       return snprintf(buf, PAGE_SIZE, "%lu\n", (unsigned long)mtd->oobsize);
+
+}
+static DEVICE_ATTR(oobsize, S_IRUGO, mtd_oobsize_show, NULL);
+
+static ssize_t mtd_numeraseregions_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       return snprintf(buf, PAGE_SIZE, "%u\n", mtd->numeraseregions);
+
+}
+static DEVICE_ATTR(numeraseregions, S_IRUGO, mtd_numeraseregions_show,
+       NULL);
+
+static ssize_t mtd_name_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+{
+       struct mtd_info *mtd = dev_to_mtd(dev);
+
+       return snprintf(buf, PAGE_SIZE, "%s\n", mtd->name);
+
+}
+static DEVICE_ATTR(name, S_IRUGO, mtd_name_show, NULL);
+
+static struct attribute *mtd_attrs[] = {
+       &dev_attr_type.attr,
+       &dev_attr_flags.attr,
+       &dev_attr_size.attr,
+       &dev_attr_erasesize.attr,
+       &dev_attr_writesize.attr,
+       &dev_attr_oobsize.attr,
+       &dev_attr_numeraseregions.attr,
+       &dev_attr_name.attr,
+       NULL,
+};
+
+struct attribute_group mtd_group = {
+       .attrs          = mtd_attrs,
+};
+
+struct attribute_group *mtd_groups[] = {
+       &mtd_group,
+       NULL,
+};
+
+static struct device_type mtd_devtype = {
+       .name           = "mtd",
+       .groups         = mtd_groups,
+       .release        = mtd_release,
+};
+
 /**
  *     add_mtd_device - register an MTD device
  *     @mtd: pointer to new MTD device info structure
@@ -40,12 +198,27 @@ static LIST_HEAD(mtd_notifiers);
  *     notify each currently active MTD 'user' of its arrival. Returns
  *     zero on success or 1 on failure, which currently will only happen
  *     if the number of present devices exceeds MAX_MTD_DEVICES (i.e. 16)
+ *     or there's a sysfs error.
  */
 
 int add_mtd_device(struct mtd_info *mtd)
 {
        int i;
 
+       if (!mtd->backing_dev_info) {
+               switch (mtd->type) {
+               case MTD_RAM:
+                       mtd->backing_dev_info = &mtd_bdi_rw_mappable;
+                       break;
+               case MTD_ROM:
+                       mtd->backing_dev_info = &mtd_bdi_ro_mappable;
+                       break;
+               default:
+                       mtd->backing_dev_info = &mtd_bdi_unmappable;
+                       break;
+               }
+       }
+
        BUG_ON(mtd->writesize == 0);
        mutex_lock(&mtd_table_mutex);
 
@@ -80,6 +253,23 @@ int add_mtd_device(struct mtd_info *mtd)
                                               mtd->name);
                        }
 
+                       /* Caller should have set dev.parent to match the
+                        * physical device.
+                        */
+                       mtd->dev.type = &mtd_devtype;
+                       mtd->dev.class = mtd_class;
+                       mtd->dev.devt = MTD_DEVT(i);
+                       dev_set_name(&mtd->dev, "mtd%d", i);
+                       if (device_register(&mtd->dev) != 0) {
+                               mtd_table[i] = NULL;
+                               break;
+                       }
+
+                       if (MTD_DEVT(i))
+                               device_create(mtd_class, mtd->dev.parent,
+                                               MTD_DEVT(i) + 1,
+                                               NULL, "mtd%dro", i);
+
                        DEBUG(0, "mtd: Giving out device %d to %s\n",i, mtd->name);
                        /* No need to get a refcount on the module containing
                           the notifier, since we hold the mtd_table_mutex */
@@ -124,6 +314,8 @@ int del_mtd_device (struct mtd_info *mtd)
        } else {
                struct mtd_notifier *not;
 
+               device_unregister(&mtd->dev);
+
                /* No need to get a refcount on the module containing
                   the notifier, since we hold the mtd_table_mutex */
                list_for_each_entry(not, &mtd_notifiers, list)
@@ -393,28 +585,38 @@ done:
         return ((count < begin+len-off) ? count : begin+len-off);
 }
 
+#endif /* CONFIG_PROC_FS */
+
 /*====================================================================*/
 /* Init code */
 
 static int __init init_mtd(void)
 {
+       mtd_class = class_create(THIS_MODULE, "mtd");
+
+       if (IS_ERR(mtd_class)) {
+               pr_err("Error creating mtd class.\n");
+               return PTR_ERR(mtd_class);
+       }
+#ifdef CONFIG_PROC_FS
        if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
                proc_mtd->read_proc = mtd_read_proc;
+#endif /* CONFIG_PROC_FS */
        return 0;
 }
 
 static void __exit cleanup_mtd(void)
 {
+#ifdef CONFIG_PROC_FS
         if (proc_mtd)
                remove_proc_entry( "mtd", NULL);
+#endif /* CONFIG_PROC_FS */
+       class_destroy(mtd_class);
 }
 
 module_init(init_mtd);
 module_exit(cleanup_mtd);
 
-#endif /* CONFIG_PROC_FS */
-
-
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
 MODULE_DESCRIPTION("Core MTD registration and access routines");
index 1a6b3be..1060337 100644 (file)
@@ -44,6 +44,7 @@ static struct mtdoops_context {
        int oops_pages;
        int nextpage;
        int nextcount;
+       char *name;
 
        void *oops_buf;
 
@@ -273,6 +274,9 @@ static void mtdoops_notify_add(struct mtd_info *mtd)
 {
        struct mtdoops_context *cxt = &oops_cxt;
 
+       if (cxt->name && !strcmp(mtd->name, cxt->name))
+               cxt->mtd_index = mtd->index;
+
        if ((mtd->index != cxt->mtd_index) || cxt->mtd_index < 0)
                return;
 
@@ -357,8 +361,10 @@ mtdoops_console_write(struct console *co, const char *s, unsigned int count)
        spin_lock_irqsave(&cxt->writecount_lock, flags);
 
        /* Check ready status didn't change whilst waiting for the lock */
-       if (!cxt->ready)
+       if (!cxt->ready) {
+               spin_unlock_irqrestore(&cxt->writecount_lock, flags);
                return;
+       }
 
        if (cxt->writecount == 0) {
                u32 *stamp = cxt->oops_buf;
@@ -383,8 +389,12 @@ static int __init mtdoops_console_setup(struct console *co, char *options)
 {
        struct mtdoops_context *cxt = co->data;
 
-       if (cxt->mtd_index != -1)
+       if (cxt->mtd_index != -1 || cxt->name)
                return -EBUSY;
+       if (options) {
+               cxt->name = kstrdup(options, GFP_KERNEL);
+               return 0;
+       }
        if (co->index == -1)
                return -EINVAL;
 
@@ -412,6 +422,7 @@ static int __init mtdoops_console_init(void)
 
        cxt->mtd_index = -1;
        cxt->oops_buf = vmalloc(OOPS_PAGE_SIZE);
+       spin_lock_init(&cxt->writecount_lock);
 
        if (!cxt->oops_buf) {
                printk(KERN_ERR "Failed to allocate mtdoops buffer workspace\n");
@@ -432,6 +443,7 @@ static void __exit mtdoops_console_exit(void)
 
        unregister_mtd_user(&mtdoops_notifier);
        unregister_console(&mtdoops_console);
+       kfree(cxt->name);
        vfree(cxt->oops_buf);
 }
 
index 144e6b6..29675ed 100644 (file)
@@ -48,8 +48,11 @@ static int part_read(struct mtd_info *mtd, loff_t from, size_t len,
                size_t *retlen, u_char *buf)
 {
        struct mtd_part *part = PART(mtd);
+       struct mtd_ecc_stats stats;
        int res;
 
+       stats = part->master->ecc_stats;
+
        if (from >= mtd->size)
                len = 0;
        else if (from + len > mtd->size)
@@ -58,9 +61,9 @@ static int part_read(struct mtd_info *mtd, loff_t from, size_t len,
                                   len, retlen, buf);
        if (unlikely(res)) {
                if (res == -EUCLEAN)
-                       mtd->ecc_stats.corrected++;
+                       mtd->ecc_stats.corrected += part->master->ecc_stats.corrected - stats.corrected;
                if (res == -EBADMSG)
-                       mtd->ecc_stats.failed++;
+                       mtd->ecc_stats.failed += part->master->ecc_stats.failed - stats.failed;
        }
        return res;
 }
@@ -84,6 +87,18 @@ static void part_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
        part->master->unpoint(part->master, from + part->offset, len);
 }
 
+static unsigned long part_get_unmapped_area(struct mtd_info *mtd,
+                                           unsigned long len,
+                                           unsigned long offset,
+                                           unsigned long flags)
+{
+       struct mtd_part *part = PART(mtd);
+
+       offset += part->offset;
+       return part->master->get_unmapped_area(part->master, len, offset,
+                                              flags);
+}
+
 static int part_read_oob(struct mtd_info *mtd, loff_t from,
                struct mtd_oob_ops *ops)
 {
@@ -342,6 +357,12 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
 
        slave->mtd.name = part->name;
        slave->mtd.owner = master->owner;
+       slave->mtd.backing_dev_info = master->backing_dev_info;
+
+       /* NOTE:  we don't arrange MTDs as a tree; it'd be error-prone
+        * to have the same data be in two different partitions.
+        */
+       slave->mtd.dev.parent = master->dev.parent;
 
        slave->mtd.read = part_read;
        slave->mtd.write = part_write;
@@ -354,6 +375,8 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
                slave->mtd.unpoint = part_unpoint;
        }
 
+       if (master->get_unmapped_area)
+               slave->mtd.get_unmapped_area = part_get_unmapped_area;
        if (master->read_oob)
                slave->mtd.read_oob = part_read_oob;
        if (master->write_oob)
@@ -493,7 +516,9 @@ out_register:
  * This function, given a master MTD object and a partition table, creates
  * and registers slave MTD objects which are bound to the master according to
  * the partition definitions.
- * (Q: should we register the master MTD object as well?)
+ *
+ * We don't register the master, or expect the caller to have done so,
+ * for reasons of data integrity.
  */
 
 int add_mtd_partitions(struct mtd_info *master,
index 2ff8879..890936d 100644 (file)
@@ -334,7 +334,7 @@ config MTD_NAND_ATMEL_ECC_NONE
 endchoice
 
 config MTD_NAND_PXA3xx
-       bool "Support for NAND flash devices on PXA3xx"
+       tristate "Support for NAND flash devices on PXA3xx"
        depends on MTD_NAND && PXA3xx
        help
          This enables the driver for the NAND flash device found on
@@ -427,4 +427,23 @@ config MTD_NAND_SH_FLCTL
          Several Renesas SuperH CPU has FLCTL. This option enables support
          for NAND Flash using FLCTL. This driver support SH7723.
 
+config MTD_NAND_DAVINCI
+        tristate "Support NAND on DaVinci SoC"
+        depends on ARCH_DAVINCI
+        help
+         Enable the driver for NAND flash chips on Texas Instruments
+         DaVinci processors.
+
+config MTD_NAND_TXX9NDFMC
+       tristate "NAND Flash support for TXx9 SoC"
+       depends on SOC_TX4938 || SOC_TX4939
+       help
+         This enables the NAND flash controller on the TXx9 SoCs.
+
+config MTD_NAND_SOCRATES
+       tristate "Support for NAND on Socrates board"
+       depends on MTD_NAND && SOCRATES
+       help
+         Enables support for NAND Flash chips wired onto Socrates board.
+
 endif # MTD_NAND
index b661586..d33860a 100644 (file)
@@ -14,6 +14,7 @@ obj-$(CONFIG_MTD_NAND_AU1550)         += au1550nd.o
 obj-$(CONFIG_MTD_NAND_BF5XX)           += bf5xx_nand.o
 obj-$(CONFIG_MTD_NAND_PPCHAMELEONEVB)  += ppchameleonevb.o
 obj-$(CONFIG_MTD_NAND_S3C2410)         += s3c2410.o
+obj-$(CONFIG_MTD_NAND_DAVINCI)         += davinci_nand.o
 obj-$(CONFIG_MTD_NAND_DISKONCHIP)      += diskonchip.o
 obj-$(CONFIG_MTD_NAND_H1900)           += h1910.o
 obj-$(CONFIG_MTD_NAND_RTC_FROM4)       += rtc_from4.o
@@ -36,5 +37,7 @@ obj-$(CONFIG_MTD_NAND_FSL_ELBC)               += fsl_elbc_nand.o
 obj-$(CONFIG_MTD_NAND_FSL_UPM)         += fsl_upm.o
 obj-$(CONFIG_MTD_NAND_SH_FLCTL)                += sh_flctl.o
 obj-$(CONFIG_MTD_NAND_MXC)             += mxc_nand.o
+obj-$(CONFIG_MTD_NAND_SOCRATES)                += socrates_nand.o
+obj-$(CONFIG_MTD_NAND_TXX9NDFMC)       += txx9ndfmc.o
 
 nand-objs := nand_base.o nand_bbt.o
index 9af2a2c..4c2a67c 100644 (file)
@@ -552,7 +552,6 @@ static void bf5xx_nand_dma_write_buf(struct mtd_info *mtd,
 static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
 {
        int ret;
-       unsigned short val;
 
        /* Do not use dma */
        if (!hardware_ecc)
@@ -560,13 +559,6 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
 
        init_completion(&info->dma_completion);
 
-#ifdef CONFIG_BF54x
-       /* Setup DMAC1 channel mux for NFC which shared with SDH */
-       val = bfin_read_DMAC1_PERIMUX();
-       val &= 0xFFFE;
-       bfin_write_DMAC1_PERIMUX(val);
-       SSYNC();
-#endif
        /* Request NFC DMA channel */
        ret = request_dma(CH_NFC, "BF5XX NFC driver");
        if (ret < 0) {
@@ -574,7 +566,13 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
                return ret;
        }
 
-       set_dma_callback(CH_NFC, (void *) bf5xx_nand_dma_irq, (void *) info);
+#ifdef CONFIG_BF54x
+       /* Setup DMAC1 channel mux for NFC which shared with SDH */
+       bfin_write_DMAC1_PERIMUX(bfin_read_DMAC1_PERIMUX() & ~1);
+       SSYNC();
+#endif
+
+       set_dma_callback(CH_NFC, bf5xx_nand_dma_irq, info);
 
        /* Turn off the DMA channel first */
        disable_dma(CH_NFC);
@@ -632,7 +630,7 @@ static int bf5xx_nand_hw_init(struct bf5xx_nand_info *info)
 /*
  * Device management interface
  */
-static int bf5xx_nand_add_partition(struct bf5xx_nand_info *info)
+static int __devinit bf5xx_nand_add_partition(struct bf5xx_nand_info *info)
 {
        struct mtd_info *mtd = &info->mtd;
 
index 22a6b2e..7c5b257 100644 (file)
@@ -654,6 +654,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
        }
        cafe = (void *)(&mtd[1]);
 
+       mtd->dev.parent = &pdev->dev;
        mtd->priv = cafe;
        mtd->owner = THIS_MODULE;
 
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
new file mode 100644 (file)
index 0000000..0119220
--- /dev/null
@@ -0,0 +1,570 @@
+/*
+ * davinci_nand.c - NAND Flash Driver for DaVinci family chips
+ *
+ * Copyright Â© 2006 Texas Instruments.
+ *
+ * Port to 2.6.23 Copyright Â© 2008 by:
+ *   Sander Huijsen <Shuijsen@optelecom-nkf.com>
+ *   Troy Kisky <troy.kisky@boundarydevices.com>
+ *   Dirk Behme <Dirk.Behme@gmail.com>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+
+#include <mach/nand.h>
+
+#include <asm/mach-types.h>
+
+
+/*
+ * This is a device driver for the NAND flash controller found on the
+ * various DaVinci family chips.  It handles up to four SoC chipselects,
+ * and some flavors of secondary chipselect (e.g. based on A12) as used
+ * with multichip packages.
+ *
+ * The 1-bit ECC hardware is supported, but not yet the newer 4-bit ECC
+ * available on chips like the DM355 and OMAP-L137 and needed with the
+ * more error-prone MLC NAND chips.
+ *
+ * This driver assumes EM_WAIT connects all the NAND devices' RDY/nBUSY
+ * outputs in a "wire-AND" configuration, with no per-chip signals.
+ */
+struct davinci_nand_info {
+       struct mtd_info         mtd;
+       struct nand_chip        chip;
+
+       struct device           *dev;
+       struct clk              *clk;
+       bool                    partitioned;
+
+       void __iomem            *base;
+       void __iomem            *vaddr;
+
+       uint32_t                ioaddr;
+       uint32_t                current_cs;
+
+       uint32_t                mask_chipsel;
+       uint32_t                mask_ale;
+       uint32_t                mask_cle;
+
+       uint32_t                core_chipsel;
+};
+
+static DEFINE_SPINLOCK(davinci_nand_lock);
+
+#define to_davinci_nand(m) container_of(m, struct davinci_nand_info, mtd)
+
+
+static inline unsigned int davinci_nand_readl(struct davinci_nand_info *info,
+               int offset)
+{
+       return __raw_readl(info->base + offset);
+}
+
+static inline void davinci_nand_writel(struct davinci_nand_info *info,
+               int offset, unsigned long value)
+{
+       __raw_writel(value, info->base + offset);
+}
+
+/*----------------------------------------------------------------------*/
+
+/*
+ * Access to hardware control lines:  ALE, CLE, secondary chipselect.
+ */
+
+static void nand_davinci_hwcontrol(struct mtd_info *mtd, int cmd,
+                                  unsigned int ctrl)
+{
+       struct davinci_nand_info        *info = to_davinci_nand(mtd);
+       uint32_t                        addr = info->current_cs;
+       struct nand_chip                *nand = mtd->priv;
+
+       /* Did the control lines change? */
+       if (ctrl & NAND_CTRL_CHANGE) {
+               if ((ctrl & NAND_CTRL_CLE) == NAND_CTRL_CLE)
+                       addr |= info->mask_cle;
+               else if ((ctrl & NAND_CTRL_ALE) == NAND_CTRL_ALE)
+                       addr |= info->mask_ale;
+
+               nand->IO_ADDR_W = (void __iomem __force *)addr;
+       }
+
+       if (cmd != NAND_CMD_NONE)
+               iowrite8(cmd, nand->IO_ADDR_W);
+}
+
+static void nand_davinci_select_chip(struct mtd_info *mtd, int chip)
+{
+       struct davinci_nand_info        *info = to_davinci_nand(mtd);
+       uint32_t                        addr = info->ioaddr;
+
+       /* maybe kick in a second chipselect */
+       if (chip > 0)
+               addr |= info->mask_chipsel;
+       info->current_cs = addr;
+
+       info->chip.IO_ADDR_W = (void __iomem __force *)addr;
+       info->chip.IO_ADDR_R = info->chip.IO_ADDR_W;
+}
+
+/*----------------------------------------------------------------------*/
+
+/*
+ * 1-bit hardware ECC ... context maintained for each core chipselect
+ */
+
+static inline uint32_t nand_davinci_readecc_1bit(struct mtd_info *mtd)
+{
+       struct davinci_nand_info *info = to_davinci_nand(mtd);
+
+       return davinci_nand_readl(info, NANDF1ECC_OFFSET
+                       + 4 * info->core_chipsel);
+}
+
+static void nand_davinci_hwctl_1bit(struct mtd_info *mtd, int mode)
+{
+       struct davinci_nand_info *info;
+       uint32_t nandcfr;
+       unsigned long flags;
+
+       info = to_davinci_nand(mtd);
+
+       /* Reset ECC hardware */
+       nand_davinci_readecc_1bit(mtd);
+
+       spin_lock_irqsave(&davinci_nand_lock, flags);
+
+       /* Restart ECC hardware */
+       nandcfr = davinci_nand_readl(info, NANDFCR_OFFSET);
+       nandcfr |= BIT(8 + info->core_chipsel);
+       davinci_nand_writel(info, NANDFCR_OFFSET, nandcfr);
+
+       spin_unlock_irqrestore(&davinci_nand_lock, flags);
+}
+
+/*
+ * Read hardware ECC value and pack into three bytes
+ */
+static int nand_davinci_calculate_1bit(struct mtd_info *mtd,
+                                     const u_char *dat, u_char *ecc_code)
+{
+       unsigned int ecc_val = nand_davinci_readecc_1bit(mtd);
+       unsigned int ecc24 = (ecc_val & 0x0fff) | ((ecc_val & 0x0fff0000) >> 4);
+
+       /* invert so that erased block ecc is correct */
+       ecc24 = ~ecc24;
+       ecc_code[0] = (u_char)(ecc24);
+       ecc_code[1] = (u_char)(ecc24 >> 8);
+       ecc_code[2] = (u_char)(ecc24 >> 16);
+
+       return 0;
+}
+
+static int nand_davinci_correct_1bit(struct mtd_info *mtd, u_char *dat,
+                                    u_char *read_ecc, u_char *calc_ecc)
+{
+       struct nand_chip *chip = mtd->priv;
+       uint32_t eccNand = read_ecc[0] | (read_ecc[1] << 8) |
+                                         (read_ecc[2] << 16);
+       uint32_t eccCalc = calc_ecc[0] | (calc_ecc[1] << 8) |
+                                         (calc_ecc[2] << 16);
+       uint32_t diff = eccCalc ^ eccNand;
+
+       if (diff) {
+               if ((((diff >> 12) ^ diff) & 0xfff) == 0xfff) {
+                       /* Correctable error */
+                       if ((diff >> (12 + 3)) < chip->ecc.size) {
+                               dat[diff >> (12 + 3)] ^= BIT((diff >> 12) & 7);
+                               return 1;
+                       } else {
+                               return -1;
+                       }
+               } else if (!(diff & (diff - 1))) {
+                       /* Single bit ECC error in the ECC itself,
+                        * nothing to fix */
+                       return 1;
+               } else {
+                       /* Uncorrectable error */
+                       return -1;
+               }
+
+       }
+       return 0;
+}
+
+/*----------------------------------------------------------------------*/
+
+/*
+ * NOTE:  NAND boot requires ALE == EM_A[1], CLE == EM_A[2], so that's
+ * how these chips are normally wired.  This translates to both 8 and 16
+ * bit busses using ALE == BIT(3) in byte addresses, and CLE == BIT(4).
+ *
+ * For now we assume that configuration, or any other one which ignores
+ * the two LSBs for NAND access ... so we can issue 32-bit reads/writes
+ * and have that transparently morphed into multiple NAND operations.
+ */
+static void nand_davinci_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
+{
+       struct nand_chip *chip = mtd->priv;
+
+       if ((0x03 & ((unsigned)buf)) == 0 && (0x03 & len) == 0)
+               ioread32_rep(chip->IO_ADDR_R, buf, len >> 2);
+       else if ((0x01 & ((unsigned)buf)) == 0 && (0x01 & len) == 0)
+               ioread16_rep(chip->IO_ADDR_R, buf, len >> 1);
+       else
+               ioread8_rep(chip->IO_ADDR_R, buf, len);
+}
+
+static void nand_davinci_write_buf(struct mtd_info *mtd,
+               const uint8_t *buf, int len)
+{
+       struct nand_chip *chip = mtd->priv;
+
+       if ((0x03 & ((unsigned)buf)) == 0 && (0x03 & len) == 0)
+               iowrite32_rep(chip->IO_ADDR_R, buf, len >> 2);
+       else if ((0x01 & ((unsigned)buf)) == 0 && (0x01 & len) == 0)
+               iowrite16_rep(chip->IO_ADDR_R, buf, len >> 1);
+       else
+               iowrite8_rep(chip->IO_ADDR_R, buf, len);
+}
+
+/*
+ * Check hardware register for wait status. Returns 1 if device is ready,
+ * 0 if it is still busy.
+ */
+static int nand_davinci_dev_ready(struct mtd_info *mtd)
+{
+       struct davinci_nand_info *info = to_davinci_nand(mtd);
+
+       return davinci_nand_readl(info, NANDFSR_OFFSET) & BIT(0);
+}
+
+static void __init nand_dm6446evm_flash_init(struct davinci_nand_info *info)
+{
+       uint32_t regval, a1cr;
+
+       /*
+        * NAND FLASH timings @ PLL1 == 459 MHz
+        *  - AEMIF.CLK freq   = PLL1/6 = 459/6 = 76.5 MHz
+        *  - AEMIF.CLK period = 1/76.5 MHz = 13.1 ns
+        */
+       regval = 0
+               | (0 << 31)           /* selectStrobe */
+               | (0 << 30)           /* extWait (never with NAND) */
+               | (1 << 26)           /* writeSetup      10 ns */
+               | (3 << 20)           /* writeStrobe     40 ns */
+               | (1 << 17)           /* writeHold       10 ns */
+               | (0 << 13)           /* readSetup       10 ns */
+               | (3 << 7)            /* readStrobe      60 ns */
+               | (0 << 4)            /* readHold        10 ns */
+               | (3 << 2)            /* turnAround      ?? ns */
+               | (0 << 0)            /* asyncSize       8-bit bus */
+               ;
+       a1cr = davinci_nand_readl(info, A1CR_OFFSET);
+       if (a1cr != regval) {
+               dev_dbg(info->dev, "Warning: NAND config: Set A1CR " \
+                      "reg to 0x%08x, was 0x%08x, should be done by " \
+                      "bootloader.\n", regval, a1cr);
+               davinci_nand_writel(info, A1CR_OFFSET, regval);
+       }
+}
+
+/*----------------------------------------------------------------------*/
+
+static int __init nand_davinci_probe(struct platform_device *pdev)
+{
+       struct davinci_nand_pdata       *pdata = pdev->dev.platform_data;
+       struct davinci_nand_info        *info;
+       struct resource                 *res1;
+       struct resource                 *res2;
+       void __iomem                    *vaddr;
+       void __iomem                    *base;
+       int                             ret;
+       uint32_t                        val;
+       nand_ecc_modes_t                ecc_mode;
+
+       /* which external chipselect will we be managing? */
+       if (pdev->id < 0 || pdev->id > 3)
+               return -ENODEV;
+
+       info = kzalloc(sizeof(*info), GFP_KERNEL);
+       if (!info) {
+               dev_err(&pdev->dev, "unable to allocate memory\n");
+               ret = -ENOMEM;
+               goto err_nomem;
+       }
+
+       platform_set_drvdata(pdev, info);
+
+       res1 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+       if (!res1 || !res2) {
+               dev_err(&pdev->dev, "resource missing\n");
+               ret = -EINVAL;
+               goto err_nomem;
+       }
+
+       vaddr = ioremap(res1->start, res1->end - res1->start);
+       base = ioremap(res2->start, res2->end - res2->start);
+       if (!vaddr || !base) {
+               dev_err(&pdev->dev, "ioremap failed\n");
+               ret = -EINVAL;
+               goto err_ioremap;
+       }
+
+       info->dev               = &pdev->dev;
+       info->base              = base;
+       info->vaddr             = vaddr;
+
+       info->mtd.priv          = &info->chip;
+       info->mtd.name          = dev_name(&pdev->dev);
+       info->mtd.owner         = THIS_MODULE;
+
+       info->mtd.dev.parent    = &pdev->dev;
+
+       info->chip.IO_ADDR_R    = vaddr;
+       info->chip.IO_ADDR_W    = vaddr;
+       info->chip.chip_delay   = 0;
+       info->chip.select_chip  = nand_davinci_select_chip;
+
+       /* options such as NAND_USE_FLASH_BBT or 16-bit widths */
+       info->chip.options      = pdata ? pdata->options : 0;
+
+       info->ioaddr            = (uint32_t __force) vaddr;
+
+       info->current_cs        = info->ioaddr;
+       info->core_chipsel      = pdev->id;
+       info->mask_chipsel      = pdata->mask_chipsel;
+
+       /* use nandboot-capable ALE/CLE masks by default */
+       if (pdata && pdata->mask_ale)
+               info->mask_ale  = pdata->mask_cle;
+       else
+               info->mask_ale  = MASK_ALE;
+       if (pdata && pdata->mask_cle)
+               info->mask_cle  = pdata->mask_cle;
+       else
+               info->mask_cle  = MASK_CLE;
+
+       /* Set address of hardware control function */
+       info->chip.cmd_ctrl     = nand_davinci_hwcontrol;
+       info->chip.dev_ready    = nand_davinci_dev_ready;
+
+       /* Speed up buffer I/O */
+       info->chip.read_buf     = nand_davinci_read_buf;
+       info->chip.write_buf    = nand_davinci_write_buf;
+
+       /* use board-specific ECC config; else, the best available */
+       if (pdata)
+               ecc_mode = pdata->ecc_mode;
+       else
+               ecc_mode = NAND_ECC_HW;
+
+       switch (ecc_mode) {
+       case NAND_ECC_NONE:
+       case NAND_ECC_SOFT:
+               break;
+       case NAND_ECC_HW:
+               info->chip.ecc.calculate = nand_davinci_calculate_1bit;
+               info->chip.ecc.correct = nand_davinci_correct_1bit;
+               info->chip.ecc.hwctl = nand_davinci_hwctl_1bit;
+               info->chip.ecc.size = 512;
+               info->chip.ecc.bytes = 3;
+               break;
+       case NAND_ECC_HW_SYNDROME:
+               /* FIXME implement */
+               info->chip.ecc.size = 512;
+               info->chip.ecc.bytes = 10;
+
+               dev_warn(&pdev->dev, "4-bit ECC nyet supported\n");
+               /* FALL THROUGH */
+       default:
+               ret = -EINVAL;
+               goto err_ecc;
+       }
+       info->chip.ecc.mode = ecc_mode;
+
+       info->clk = clk_get(&pdev->dev, "AEMIFCLK");
+       if (IS_ERR(info->clk)) {
+               ret = PTR_ERR(info->clk);
+               dev_dbg(&pdev->dev, "unable to get AEMIFCLK, err %d\n", ret);
+               goto err_clk;
+       }
+
+       ret = clk_enable(info->clk);
+       if (ret < 0) {
+               dev_dbg(&pdev->dev, "unable to enable AEMIFCLK, err %d\n", ret);
+               goto err_clk_enable;
+       }
+
+       /* EMIF timings should normally be set by the boot loader,
+        * especially after boot-from-NAND.  The *only* reason to
+        * have this special casing for the DM6446 EVM is to work
+        * with boot-from-NOR ... with CS0 manually re-jumpered
+        * (after startup) so it addresses the NAND flash, not NOR.
+        * Even for dev boards, that's unusually rude...
+        */
+       if (machine_is_davinci_evm())
+               nand_dm6446evm_flash_init(info);
+
+       spin_lock_irq(&davinci_nand_lock);
+
+       /* put CSxNAND into NAND mode */
+       val = davinci_nand_readl(info, NANDFCR_OFFSET);
+       val |= BIT(info->core_chipsel);
+       davinci_nand_writel(info, NANDFCR_OFFSET, val);
+
+       spin_unlock_irq(&davinci_nand_lock);
+
+       /* Scan to find existence of the device(s) */
+       ret = nand_scan(&info->mtd, pdata->mask_chipsel ? 2 : 1);
+       if (ret < 0) {
+               dev_dbg(&pdev->dev, "no NAND chip(s) found\n");
+               goto err_scan;
+       }
+
+       if (mtd_has_partitions()) {
+               struct mtd_partition    *mtd_parts = NULL;
+               int                     mtd_parts_nb = 0;
+
+               if (mtd_has_cmdlinepart()) {
+                       static const char *probes[] __initconst =
+                               { "cmdlinepart", NULL };
+
+                       const char              *master_name;
+
+                       /* Set info->mtd.name = 0 temporarily */
+                       master_name             = info->mtd.name;
+                       info->mtd.name          = (char *)0;
+
+                       /* info->mtd.name == 0, means: don't bother checking
+                          <mtd-id> */
+                       mtd_parts_nb = parse_mtd_partitions(&info->mtd, probes,
+                                                           &mtd_parts, 0);
+
+                       /* Restore info->mtd.name */
+                       info->mtd.name = master_name;
+               }
+
+               if (mtd_parts_nb <= 0 && pdata) {
+                       mtd_parts = pdata->parts;
+                       mtd_parts_nb = pdata->nr_parts;
+               }
+
+               /* Register any partitions */
+               if (mtd_parts_nb > 0) {
+                       ret = add_mtd_partitions(&info->mtd,
+                                       mtd_parts, mtd_parts_nb);
+                       if (ret == 0)
+                               info->partitioned = true;
+               }
+
+       } else if (pdata && pdata->nr_parts) {
+               dev_warn(&pdev->dev, "ignoring %d default partitions on %s\n",
+                               pdata->nr_parts, info->mtd.name);
+       }
+
+       /* If there's no partition info, just package the whole chip
+        * as a single MTD device.
+        */
+       if (!info->partitioned)
+               ret = add_mtd_device(&info->mtd) ? -ENODEV : 0;
+
+       if (ret < 0)
+               goto err_scan;
+
+       val = davinci_nand_readl(info, NRCSR_OFFSET);
+       dev_info(&pdev->dev, "controller rev. %d.%d\n",
+              (val >> 8) & 0xff, val & 0xff);
+
+       return 0;
+
+err_scan:
+       clk_disable(info->clk);
+
+err_clk_enable:
+       clk_put(info->clk);
+
+err_ecc:
+err_clk:
+err_ioremap:
+       if (base)
+               iounmap(base);
+       if (vaddr)
+               iounmap(vaddr);
+
+err_nomem:
+       kfree(info);
+       return ret;
+}
+
+static int __exit nand_davinci_remove(struct platform_device *pdev)
+{
+       struct davinci_nand_info *info = platform_get_drvdata(pdev);
+       int status;
+
+       if (mtd_has_partitions() && info->partitioned)
+               status = del_mtd_partitions(&info->mtd);
+       else
+               status = del_mtd_device(&info->mtd);
+
+       iounmap(info->base);
+       iounmap(info->vaddr);
+
+       nand_release(&info->mtd);
+
+       clk_disable(info->clk);
+       clk_put(info->clk);
+
+       kfree(info);
+
+       return 0;
+}
+
+static struct platform_driver nand_davinci_driver = {
+       .remove         = __exit_p(nand_davinci_remove),
+       .driver         = {
+               .name   = "davinci_nand",
+       },
+};
+MODULE_ALIAS("platform:davinci_nand");
+
+static int __init nand_davinci_init(void)
+{
+       return platform_driver_probe(&nand_davinci_driver, nand_davinci_probe);
+}
+module_init(nand_davinci_init);
+
+static void __exit nand_davinci_exit(void)
+{
+       platform_driver_unregister(&nand_davinci_driver);
+}
+module_exit(nand_davinci_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Texas Instruments");
+MODULE_DESCRIPTION("Davinci NAND flash driver");
+
index 7815a40..d120cd8 100644 (file)
 #include <linux/io.h>
 #include <asm/fsl_lbc.h>
 
+#define FSL_UPM_WAIT_RUN_PATTERN  0x1
+#define FSL_UPM_WAIT_WRITE_BYTE   0x2
+#define FSL_UPM_WAIT_WRITE_BUFFER 0x4
+
 struct fsl_upm_nand {
        struct device *dev;
        struct mtd_info mtd;
@@ -36,8 +40,12 @@ struct fsl_upm_nand {
        uint8_t upm_addr_offset;
        uint8_t upm_cmd_offset;
        void __iomem *io_base;
-       int rnb_gpio;
+       int rnb_gpio[NAND_MAX_CHIPS];
+       uint32_t mchip_offsets[NAND_MAX_CHIPS];
+       uint32_t mchip_count;
+       uint32_t mchip_number;
        int chip_delay;
+       uint32_t wait_flags;
 };
 
 #define to_fsl_upm_nand(mtd) container_of(mtd, struct fsl_upm_nand, mtd)
@@ -46,7 +54,7 @@ static int fun_chip_ready(struct mtd_info *mtd)
 {
        struct fsl_upm_nand *fun = to_fsl_upm_nand(mtd);
 
-       if (gpio_get_value(fun->rnb_gpio))
+       if (gpio_get_value(fun->rnb_gpio[fun->mchip_number]))
                return 1;
 
        dev_vdbg(fun->dev, "busy\n");
@@ -55,9 +63,9 @@ static int fun_chip_ready(struct mtd_info *mtd)
 
 static void fun_wait_rnb(struct fsl_upm_nand *fun)
 {
-       int cnt = 1000000;
+       if (fun->rnb_gpio[fun->mchip_number] >= 0) {
+               int cnt = 1000000;
 
-       if (fun->rnb_gpio >= 0) {
                while (--cnt && !fun_chip_ready(&fun->mtd))
                        cpu_relax();
                if (!cnt)
@@ -69,7 +77,9 @@ static void fun_wait_rnb(struct fsl_upm_nand *fun)
 
 static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
+       struct nand_chip *chip = mtd->priv;
        struct fsl_upm_nand *fun = to_fsl_upm_nand(mtd);
+       u32 mar;
 
        if (!(ctrl & fun->last_ctrl)) {
                fsl_upm_end_pattern(&fun->upm);
@@ -87,9 +97,28 @@ static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
                        fsl_upm_start_pattern(&fun->upm, fun->upm_cmd_offset);
        }
 
-       fsl_upm_run_pattern(&fun->upm, fun->io_base, cmd);
+       mar = (cmd << (32 - fun->upm.width)) |
+               fun->mchip_offsets[fun->mchip_number];
+       fsl_upm_run_pattern(&fun->upm, chip->IO_ADDR_R, mar);
+
+       if (fun->wait_flags & FSL_UPM_WAIT_RUN_PATTERN)
+               fun_wait_rnb(fun);
+}
+
+static void fun_select_chip(struct mtd_info *mtd, int mchip_nr)
+{
+       struct nand_chip *chip = mtd->priv;
+       struct fsl_upm_nand *fun = to_fsl_upm_nand(mtd);
 
-       fun_wait_rnb(fun);
+       if (mchip_nr == -1) {
+               chip->cmd_ctrl(mtd, NAND_CMD_NONE, 0 | NAND_CTRL_CHANGE);
+       } else if (mchip_nr >= 0) {
+               fun->mchip_number = mchip_nr;
+               chip->IO_ADDR_R = fun->io_base + fun->mchip_offsets[mchip_nr];
+               chip->IO_ADDR_W = chip->IO_ADDR_R;
+       } else {
+               BUG();
+       }
 }
 
 static uint8_t fun_read_byte(struct mtd_info *mtd)
@@ -115,8 +144,11 @@ static void fun_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
 
        for (i = 0; i < len; i++) {
                out_8(fun->chip.IO_ADDR_W, buf[i]);
-               fun_wait_rnb(fun);
+               if (fun->wait_flags & FSL_UPM_WAIT_WRITE_BYTE)
+                       fun_wait_rnb(fun);
        }
+       if (fun->wait_flags & FSL_UPM_WAIT_WRITE_BUFFER)
+               fun_wait_rnb(fun);
 }
 
 static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
@@ -137,8 +169,10 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
        fun->chip.read_buf = fun_read_buf;
        fun->chip.write_buf = fun_write_buf;
        fun->chip.ecc.mode = NAND_ECC_SOFT;
+       if (fun->mchip_count > 1)
+               fun->chip.select_chip = fun_select_chip;
 
-       if (fun->rnb_gpio >= 0)
+       if (fun->rnb_gpio[0] >= 0)
                fun->chip.dev_ready = fun_chip_ready;
 
        fun->mtd.priv = &fun->chip;
@@ -155,7 +189,7 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
                goto err;
        }
 
-       ret = nand_scan(&fun->mtd, 1);
+       ret = nand_scan(&fun->mtd, fun->mchip_count);
        if (ret)
                goto err;
 
@@ -185,8 +219,10 @@ static int __devinit fun_probe(struct of_device *ofdev,
        struct fsl_upm_nand *fun;
        struct resource io_res;
        const uint32_t *prop;
+       int rnb_gpio;
        int ret;
        int size;
+       int i;
 
        fun = kzalloc(sizeof(*fun), GFP_KERNEL);
        if (!fun)
@@ -208,7 +244,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
        if (!prop || size != sizeof(uint32_t)) {
                dev_err(&ofdev->dev, "can't get UPM address offset\n");
                ret = -EINVAL;
-               goto err2;
+               goto err1;
        }
        fun->upm_addr_offset = *prop;
 
@@ -216,21 +252,40 @@ static int __devinit fun_probe(struct of_device *ofdev,
        if (!prop || size != sizeof(uint32_t)) {
                dev_err(&ofdev->dev, "can't get UPM command offset\n");
                ret = -EINVAL;
-               goto err2;
+               goto err1;
        }
        fun->upm_cmd_offset = *prop;
 
-       fun->rnb_gpio = of_get_gpio(ofdev->node, 0);
-       if (fun->rnb_gpio >= 0) {
-               ret = gpio_request(fun->rnb_gpio, dev_name(&ofdev->dev));
-               if (ret) {
-                       dev_err(&ofdev->dev, "can't request RNB gpio\n");
+       prop = of_get_property(ofdev->node,
+                              "fsl,upm-addr-line-cs-offsets", &size);
+       if (prop && (size / sizeof(uint32_t)) > 0) {
+               fun->mchip_count = size / sizeof(uint32_t);
+               if (fun->mchip_count >= NAND_MAX_CHIPS) {
+                       dev_err(&ofdev->dev, "too much multiple chips\n");
+                       goto err1;
+               }
+               for (i = 0; i < fun->mchip_count; i++)
+                       fun->mchip_offsets[i] = prop[i];
+       } else {
+               fun->mchip_count = 1;
+       }
+
+       for (i = 0; i < fun->mchip_count; i++) {
+               fun->rnb_gpio[i] = -1;
+               rnb_gpio = of_get_gpio(ofdev->node, i);
+               if (rnb_gpio >= 0) {
+                       ret = gpio_request(rnb_gpio, dev_name(&ofdev->dev));
+                       if (ret) {
+                               dev_err(&ofdev->dev,
+                                       "can't request RNB gpio #%d\n", i);
+                               goto err2;
+                       }
+                       gpio_direction_input(rnb_gpio);
+                       fun->rnb_gpio[i] = rnb_gpio;
+               } else if (rnb_gpio == -EINVAL) {
+                       dev_err(&ofdev->dev, "RNB gpio #%d is invalid\n", i);
                        goto err2;
                }
-               gpio_direction_input(fun->rnb_gpio);
-       } else if (fun->rnb_gpio == -EINVAL) {
-               dev_err(&ofdev->dev, "specified RNB gpio is invalid\n");
-               goto err2;
        }
 
        prop = of_get_property(ofdev->node, "chip-delay", NULL);
@@ -239,8 +294,15 @@ static int __devinit fun_probe(struct of_device *ofdev,
        else
                fun->chip_delay = 50;
 
+       prop = of_get_property(ofdev->node, "fsl,upm-wait-flags", &size);
+       if (prop && size == sizeof(uint32_t))
+               fun->wait_flags = *prop;
+       else
+               fun->wait_flags = FSL_UPM_WAIT_RUN_PATTERN |
+                                 FSL_UPM_WAIT_WRITE_BYTE;
+
        fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start,
-                                         io_res.end - io_res.start + 1);
+                                           io_res.end - io_res.start + 1);
        if (!fun->io_base) {
                ret = -ENOMEM;
                goto err2;
@@ -257,8 +319,11 @@ static int __devinit fun_probe(struct of_device *ofdev,
 
        return 0;
 err2:
-       if (fun->rnb_gpio >= 0)
-               gpio_free(fun->rnb_gpio);
+       for (i = 0; i < fun->mchip_count; i++) {
+               if (fun->rnb_gpio[i] < 0)
+                       break;
+               gpio_free(fun->rnb_gpio[i]);
+       }
 err1:
        kfree(fun);
 
@@ -268,12 +333,16 @@ err1:
 static int __devexit fun_remove(struct of_device *ofdev)
 {
        struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev);
+       int i;
 
        nand_release(&fun->mtd);
        kfree(fun->mtd.name);
 
-       if (fun->rnb_gpio >= 0)
-               gpio_free(fun->rnb_gpio);
+       for (i = 0; i < fun->mchip_count; i++) {
+               if (fun->rnb_gpio[i] < 0)
+                       break;
+               gpio_free(fun->rnb_gpio[i]);
+       }
 
        kfree(fun);
 
index bad048a..f3548d0 100644 (file)
@@ -866,6 +866,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
        mtd = &host->mtd;
        mtd->priv = this;
        mtd->owner = THIS_MODULE;
+       mtd->dev.parent = &pdev->dev;
 
        /* 50 us command delay time */
        this->chip_delay = 5;
index 5f71371..3d7ed43 100644 (file)
@@ -82,6 +82,20 @@ static struct nand_ecclayout nand_oob_64 = {
                 .length = 38}}
 };
 
+static struct nand_ecclayout nand_oob_128 = {
+       .eccbytes = 48,
+       .eccpos = {
+                  80, 81, 82, 83, 84, 85, 86, 87,
+                  88, 89, 90, 91, 92, 93, 94, 95,
+                  96, 97, 98, 99, 100, 101, 102, 103,
+                  104, 105, 106, 107, 108, 109, 110, 111,
+                  112, 113, 114, 115, 116, 117, 118, 119,
+                  120, 121, 122, 123, 124, 125, 126, 127},
+       .oobfree = {
+               {.offset = 2,
+                .length = 78}}
+};
+
 static int nand_get_device(struct nand_chip *chip, struct mtd_info *mtd,
                           int new_state);
 
@@ -748,6 +762,8 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
+ *
+ * Not for syndrome calculating ecc controllers, which use a special oob layout
  */
 static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
                              uint8_t *buf)
@@ -758,6 +774,47 @@ static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
+ * nand_read_page_raw_syndrome - [Intern] read raw page data without ecc
+ * @mtd:       mtd info structure
+ * @chip:      nand chip info structure
+ * @buf:       buffer to store read data
+ *
+ * We need a special oob layout and handling even when OOB isn't used.
+ */
+static int nand_read_page_raw_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
+                             uint8_t *buf)
+{
+       int eccsize = chip->ecc.size;
+       int eccbytes = chip->ecc.bytes;
+       uint8_t *oob = chip->oob_poi;
+       int steps, size;
+
+       for (steps = chip->ecc.steps; steps > 0; steps--) {
+               chip->read_buf(mtd, buf, eccsize);
+               buf += eccsize;
+
+               if (chip->ecc.prepad) {
+                       chip->read_buf(mtd, oob, chip->ecc.prepad);
+                       oob += chip->ecc.prepad;
+               }
+
+               chip->read_buf(mtd, oob, eccbytes);
+               oob += eccbytes;
+
+               if (chip->ecc.postpad) {
+                       chip->read_buf(mtd, oob, chip->ecc.postpad);
+                       oob += chip->ecc.postpad;
+               }
+       }
+
+       size = mtd->oobsize - (oob - chip->oob_poi);
+       if (size)
+               chip->read_buf(mtd, oob, size);
+
+       return 0;
+}
+
+/**
  * nand_read_page_swecc - [REPLACABLE] software ecc based page read function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
@@ -1482,6 +1539,8 @@ static int nand_read_oob(struct mtd_info *mtd, loff_t from,
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       data buffer
+ *
+ * Not for syndrome calculating ecc controllers, which use a special oob layout
  */
 static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
                                const uint8_t *buf)
@@ -1491,6 +1550,44 @@ static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
+ * nand_write_page_raw_syndrome - [Intern] raw page write function
+ * @mtd:       mtd info structure
+ * @chip:      nand chip info structure
+ * @buf:       data buffer
+ *
+ * We need a special oob layout and handling even when ECC isn't checked.
+ */
+static void nand_write_page_raw_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
+                               const uint8_t *buf)
+{
+       int eccsize = chip->ecc.size;
+       int eccbytes = chip->ecc.bytes;
+       uint8_t *oob = chip->oob_poi;
+       int steps, size;
+
+       for (steps = chip->ecc.steps; steps > 0; steps--) {
+               chip->write_buf(mtd, buf, eccsize);
+               buf += eccsize;
+
+               if (chip->ecc.prepad) {
+                       chip->write_buf(mtd, oob, chip->ecc.prepad);
+                       oob += chip->ecc.prepad;
+               }
+
+               chip->read_buf(mtd, oob, eccbytes);
+               oob += eccbytes;
+
+               if (chip->ecc.postpad) {
+                       chip->write_buf(mtd, oob, chip->ecc.postpad);
+                       oob += chip->ecc.postpad;
+               }
+       }
+
+       size = mtd->oobsize - (oob - chip->oob_poi);
+       if (size)
+               chip->write_buf(mtd, oob, size);
+}
+/**
  * nand_write_page_swecc - [REPLACABLE] software ecc based page write function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
@@ -1863,7 +1960,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
        }
 
        if (unlikely(ops->ooboffs >= len)) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
                        "Attempt to start write outside oob\n");
                return -EINVAL;
        }
@@ -1873,7 +1970,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
                     ops->ooboffs + ops->ooblen >
                        ((mtd->size >> chip->page_shift) -
                         (to >> chip->page_shift)) * len)) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
                        "Attempt write beyond end of device\n");
                return -EINVAL;
        }
@@ -1929,8 +2026,8 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to,
 
        /* Do not allow writes past end of device */
        if (ops->datbuf && (to + ops->len) > mtd->size) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
-                     "Attempt read beyond end of device\n");
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
+                     "Attempt write beyond end of device\n");
                return -EINVAL;
        }
 
@@ -2555,6 +2652,9 @@ int nand_scan_tail(struct mtd_info *mtd)
                case 64:
                        chip->ecc.layout = &nand_oob_64;
                        break;
+               case 128:
+                       chip->ecc.layout = &nand_oob_128;
+                       break;
                default:
                        printk(KERN_WARNING "No oob scheme defined for "
                               "oobsize %d\n", mtd->oobsize);
@@ -2569,10 +2669,6 @@ int nand_scan_tail(struct mtd_info *mtd)
         * check ECC mode, default to software if 3byte/512byte hardware ECC is
         * selected and we have 256 byte pagesize fallback to software ECC
         */
-       if (!chip->ecc.read_page_raw)
-               chip->ecc.read_page_raw = nand_read_page_raw;
-       if (!chip->ecc.write_page_raw)
-               chip->ecc.write_page_raw = nand_write_page_raw;
 
        switch (chip->ecc.mode) {
        case NAND_ECC_HW:
@@ -2581,6 +2677,10 @@ int nand_scan_tail(struct mtd_info *mtd)
                        chip->ecc.read_page = nand_read_page_hwecc;
                if (!chip->ecc.write_page)
                        chip->ecc.write_page = nand_write_page_hwecc;
+               if (!chip->ecc.read_page_raw)
+                       chip->ecc.read_page_raw = nand_read_page_raw;
+               if (!chip->ecc.write_page_raw)
+                       chip->ecc.write_page_raw = nand_write_page_raw;
                if (!chip->ecc.read_oob)
                        chip->ecc.read_oob = nand_read_oob_std;
                if (!chip->ecc.write_oob)
@@ -2602,6 +2702,10 @@ int nand_scan_tail(struct mtd_info *mtd)
                        chip->ecc.read_page = nand_read_page_syndrome;
                if (!chip->ecc.write_page)
                        chip->ecc.write_page = nand_write_page_syndrome;
+               if (!chip->ecc.read_page_raw)
+                       chip->ecc.read_page_raw = nand_read_page_raw_syndrome;
+               if (!chip->ecc.write_page_raw)
+                       chip->ecc.write_page_raw = nand_write_page_raw_syndrome;
                if (!chip->ecc.read_oob)
                        chip->ecc.read_oob = nand_read_oob_syndrome;
                if (!chip->ecc.write_oob)
@@ -2620,6 +2724,8 @@ int nand_scan_tail(struct mtd_info *mtd)
                chip->ecc.read_page = nand_read_page_swecc;
                chip->ecc.read_subpage = nand_read_subpage;
                chip->ecc.write_page = nand_write_page_swecc;
+               chip->ecc.read_page_raw = nand_read_page_raw;
+               chip->ecc.write_page_raw = nand_write_page_raw;
                chip->ecc.read_oob = nand_read_oob_std;
                chip->ecc.write_oob = nand_write_oob_std;
                chip->ecc.size = 256;
@@ -2632,6 +2738,8 @@ int nand_scan_tail(struct mtd_info *mtd)
                chip->ecc.read_page = nand_read_page_raw;
                chip->ecc.write_page = nand_write_page_raw;
                chip->ecc.read_oob = nand_read_oob_std;
+               chip->ecc.read_page_raw = nand_read_page_raw;
+               chip->ecc.write_page_raw = nand_write_page_raw;
                chip->ecc.write_oob = nand_write_oob_std;
                chip->ecc.size = mtd->writesize;
                chip->ecc.bytes = 0;
@@ -2676,6 +2784,7 @@ int nand_scan_tail(struct mtd_info *mtd)
                        break;
                case 4:
                case 8:
+               case 16:
                        mtd->subpage_sft = 2;
                        break;
                }
index 75f9f48..86e1d08 100644 (file)
@@ -30,7 +30,7 @@ struct plat_nand_data {
 /*
  * Probe for the NAND device.
  */
-static int __init plat_nand_probe(struct platform_device *pdev)
+static int __devinit plat_nand_probe(struct platform_device *pdev)
 {
        struct platform_nand_data *pdata = pdev->dev.platform_data;
        struct plat_nand_data *data;
index 61b69cc..30a8ce6 100644 (file)
@@ -170,7 +170,13 @@ static int use_dma = 1;
 module_param(use_dma, bool, 0444);
 MODULE_PARM_DESC(use_dma, "enable DMA for data transfering to/from NAND HW");
 
-#ifdef CONFIG_MTD_NAND_PXA3xx_BUILTIN
+/*
+ * Default NAND flash controller configuration setup by the
+ * bootloader. This configuration is used only when pdata->keep_config is set
+ */
+static struct pxa3xx_nand_timing default_timing;
+static struct pxa3xx_nand_flash default_flash;
+
 static struct pxa3xx_nand_cmdset smallpage_cmdset = {
        .read1          = 0x0000,
        .read2          = 0x0050,
@@ -197,6 +203,7 @@ static struct pxa3xx_nand_cmdset largepage_cmdset = {
        .lock_status    = 0x007A,
 };
 
+#ifdef CONFIG_MTD_NAND_PXA3xx_BUILTIN
 static struct pxa3xx_nand_timing samsung512MbX16_timing = {
        .tCH    = 10,
        .tCS    = 0,
@@ -296,9 +303,23 @@ static struct pxa3xx_nand_flash *builtin_flash_types[] = {
 #define NDTR1_tWHR(c)  (min((c), 15) << 4)
 #define NDTR1_tAR(c)   (min((c), 15) << 0)
 
+#define tCH_NDTR0(r)   (((r) >> 19) & 0x7)
+#define tCS_NDTR0(r)   (((r) >> 16) & 0x7)
+#define tWH_NDTR0(r)   (((r) >> 11) & 0x7)
+#define tWP_NDTR0(r)   (((r) >> 8) & 0x7)
+#define tRH_NDTR0(r)   (((r) >> 3) & 0x7)
+#define tRP_NDTR0(r)   (((r) >> 0) & 0x7)
+
+#define tR_NDTR1(r)    (((r) >> 16) & 0xffff)
+#define tWHR_NDTR1(r)  (((r) >> 4) & 0xf)
+#define tAR_NDTR1(r)   (((r) >> 0) & 0xf)
+
 /* convert nano-seconds to nand flash controller clock cycles */
 #define ns2cycle(ns, clk)      (int)(((ns) * (clk / 1000000) / 1000) - 1)
 
+/* convert nand flash controller clock cycles to nano-seconds */
+#define cycle2ns(c, clk)       ((((c) + 1) * 1000000 + clk / 500) / (clk / 1000))
+
 static void pxa3xx_nand_set_timing(struct pxa3xx_nand_info *info,
                                   const struct pxa3xx_nand_timing *t)
 {
@@ -920,6 +941,82 @@ static int pxa3xx_nand_config_flash(struct pxa3xx_nand_info *info,
        return 0;
 }
 
+static void pxa3xx_nand_detect_timing(struct pxa3xx_nand_info *info,
+                                     struct pxa3xx_nand_timing *t)
+{
+       unsigned long nand_clk = clk_get_rate(info->clk);
+       uint32_t ndtr0 = nand_readl(info, NDTR0CS0);
+       uint32_t ndtr1 = nand_readl(info, NDTR1CS0);
+
+       t->tCH = cycle2ns(tCH_NDTR0(ndtr0), nand_clk);
+       t->tCS = cycle2ns(tCS_NDTR0(ndtr0), nand_clk);
+       t->tWH = cycle2ns(tWH_NDTR0(ndtr0), nand_clk);
+       t->tWP = cycle2ns(tWP_NDTR0(ndtr0), nand_clk);
+       t->tRH = cycle2ns(tRH_NDTR0(ndtr0), nand_clk);
+       t->tRP = cycle2ns(tRP_NDTR0(ndtr0), nand_clk);
+
+       t->tR = cycle2ns(tR_NDTR1(ndtr1), nand_clk);
+       t->tWHR = cycle2ns(tWHR_NDTR1(ndtr1), nand_clk);
+       t->tAR = cycle2ns(tAR_NDTR1(ndtr1), nand_clk);
+}
+
+static int pxa3xx_nand_detect_config(struct pxa3xx_nand_info *info)
+{
+       uint32_t ndcr = nand_readl(info, NDCR);
+       struct nand_flash_dev *type = NULL;
+       uint32_t id = -1;
+       int i;
+
+       default_flash.page_per_block = ndcr & NDCR_PG_PER_BLK ? 64 : 32;
+       default_flash.page_size = ndcr & NDCR_PAGE_SZ ? 2048 : 512;
+       default_flash.flash_width = ndcr & NDCR_DWIDTH_M ? 16 : 8;
+       default_flash.dfc_width = ndcr & NDCR_DWIDTH_C ? 16 : 8;
+
+       if (default_flash.page_size == 2048)
+               default_flash.cmdset = &largepage_cmdset;
+       else
+               default_flash.cmdset = &smallpage_cmdset;
+
+       /* set info fields needed to __readid */
+       info->flash_info = &default_flash;
+       info->read_id_bytes = (default_flash.page_size == 2048) ? 4 : 2;
+       info->reg_ndcr = ndcr;
+
+       if (__readid(info, &id))
+               return -ENODEV;
+
+       /* Lookup the flash id */
+       id = (id >> 8) & 0xff;          /* device id is byte 2 */
+       for (i = 0; nand_flash_ids[i].name != NULL; i++) {
+               if (id == nand_flash_ids[i].id) {
+                       type =  &nand_flash_ids[i];
+                       break;
+               }
+       }
+
+       if (!type)
+               return -ENODEV;
+
+       /* fill the missing flash information */
+       i = __ffs(default_flash.page_per_block * default_flash.page_size);
+       default_flash.num_blocks = type->chipsize << (20 - i);
+
+       info->oob_size = (default_flash.page_size == 2048) ? 64 : 16;
+
+       /* calculate addressing information */
+       info->col_addr_cycles = (default_flash.page_size == 2048) ? 2 : 1;
+
+       if (default_flash.num_blocks * default_flash.page_per_block > 65536)
+               info->row_addr_cycles = 3;
+       else
+               info->row_addr_cycles = 2;
+
+       pxa3xx_nand_detect_timing(info, &default_timing);
+       default_flash.timing = &default_timing;
+
+       return 0;
+}
+
 static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
                                    const struct pxa3xx_nand_platform_data *pdata)
 {
@@ -927,6 +1024,10 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
        uint32_t id = -1;
        int i;
 
+       if (pdata->keep_config)
+               if (pxa3xx_nand_detect_config(info) == 0)
+                       return 0;
+
        for (i = 0; i<pdata->num_flash; ++i) {
                f = pdata->flash + i;
 
@@ -1078,6 +1179,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
 
        this = &info->nand_chip;
        mtd->priv = info;
+       mtd->owner = THIS_MODULE;
 
        info->clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(info->clk)) {
@@ -1117,14 +1219,14 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
                goto fail_put_clk;
        }
 
-       r = request_mem_region(r->start, r->end - r->start + 1, pdev->name);
+       r = request_mem_region(r->start, resource_size(r), pdev->name);
        if (r == NULL) {
                dev_err(&pdev->dev, "failed to request memory resource\n");
                ret = -EBUSY;
                goto fail_put_clk;
        }
 
-       info->mmio_base = ioremap(r->start, r->end - r->start + 1);
+       info->mmio_base = ioremap(r->start, resource_size(r));
        if (info->mmio_base == NULL) {
                dev_err(&pdev->dev, "ioremap() failed\n");
                ret = -ENODEV;
@@ -1173,7 +1275,7 @@ fail_free_buf:
 fail_free_io:
        iounmap(info->mmio_base);
 fail_free_res:
-       release_mem_region(r->start, r->end - r->start + 1);
+       release_mem_region(r->start, resource_size(r));
 fail_put_clk:
        clk_disable(info->clk);
        clk_put(info->clk);
@@ -1186,6 +1288,7 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
 {
        struct mtd_info *mtd = platform_get_drvdata(pdev);
        struct pxa3xx_nand_info *info = mtd->priv;
+       struct resource *r;
 
        platform_set_drvdata(pdev, NULL);
 
@@ -1198,6 +1301,14 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
                                info->data_buff, info->data_buff_phys);
        } else
                kfree(info->data_buff);
+
+       iounmap(info->mmio_base);
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       release_mem_region(r->start, resource_size(r));
+
+       clk_disable(info->clk);
+       clk_put(info->clk);
+
        kfree(mtd);
        return 0;
 }
index 821acb0..2bc8966 100644 (file)
@@ -58,7 +58,7 @@ static struct nand_bbt_descr flctl_4secc_smallpage = {
 };
 
 static struct nand_bbt_descr flctl_4secc_largepage = {
-       .options = 0,
+       .options = NAND_BBT_SCAN2NDPAGE,
        .offs = 58,
        .len = 2,
        .pattern = scan_ff_pattern,
@@ -149,7 +149,7 @@ static void wait_wfifo_ready(struct sh_flctl *flctl)
        printk(KERN_ERR "wait_wfifo_ready(): Timeout occured \n");
 }
 
-static int wait_recfifo_ready(struct sh_flctl *flctl)
+static int wait_recfifo_ready(struct sh_flctl *flctl, int sector_number)
 {
        uint32_t timeout = LOOP_TIMEOUT_MAX;
        int checked[4];
@@ -183,7 +183,12 @@ static int wait_recfifo_ready(struct sh_flctl *flctl)
                                uint8_t org;
                                int index;
 
-                               index = data >> 16;
+                               if (flctl->page_size)
+                                       index = (512 * sector_number) +
+                                               (data >> 16);
+                               else
+                                       index = data >> 16;
+
                                org = flctl->done_buff[index];
                                flctl->done_buff[index] = org ^ (data & 0xFF);
                                checked[i] = 1;
@@ -238,14 +243,14 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)
        }
 }
 
-static int read_ecfiforeg(struct sh_flctl *flctl, uint8_t *buff)
+static int read_ecfiforeg(struct sh_flctl *flctl, uint8_t *buff, int sector)
 {
        int i;
        unsigned long *ecc_buf = (unsigned long *)buff;
        void *fifo_addr = (void *)FLECFIFO(flctl);
 
        for (i = 0; i < 4; i++) {
-               if (wait_recfifo_ready(flctl))
+               if (wait_recfifo_ready(flctl , sector))
                        return 1;
                ecc_buf[i] = readl(fifo_addr);
                ecc_buf[i] = be32_to_cpu(ecc_buf[i]);
@@ -384,7 +389,8 @@ static void execmd_read_page_sector(struct mtd_info *mtd, int page_addr)
                read_fiforeg(flctl, 512, 512 * sector);
 
                ret = read_ecfiforeg(flctl,
-                       &flctl->done_buff[mtd->writesize + 16 * sector]);
+                       &flctl->done_buff[mtd->writesize + 16 * sector],
+                       sector);
 
                if (ret)
                        flctl->hwecc_cant_correct[sector] = 1;
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c
new file mode 100644 (file)
index 0000000..a4519a7
--- /dev/null
@@ -0,0 +1,325 @@
+/*
+ * drivers/mtd/nand/socrates_nand.c
+ *
+ *  Copyright Â© 2008 Ilya Yanok, Emcraft Systems
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+#include <linux/of_platform.h>
+#include <linux/io.h>
+
+#define FPGA_NAND_CMD_MASK             (0x7 << 28)
+#define FPGA_NAND_CMD_COMMAND          (0x0 << 28)
+#define FPGA_NAND_CMD_ADDR             (0x1 << 28)
+#define FPGA_NAND_CMD_READ             (0x2 << 28)
+#define FPGA_NAND_CMD_WRITE            (0x3 << 28)
+#define FPGA_NAND_BUSY                 (0x1 << 15)
+#define FPGA_NAND_ENABLE               (0x1 << 31)
+#define FPGA_NAND_DATA_SHIFT           16
+
+struct socrates_nand_host {
+       struct nand_chip        nand_chip;
+       struct mtd_info         mtd;
+       void __iomem            *io_base;
+       struct device           *dev;
+};
+
+/**
+ * socrates_nand_write_buf -  write buffer to chip
+ * @mtd:       MTD device structure
+ * @buf:       data buffer
+ * @len:       number of bytes to write
+ */
+static void socrates_nand_write_buf(struct mtd_info *mtd,
+               const uint8_t *buf, int len)
+{
+       int i;
+       struct nand_chip *this = mtd->priv;
+       struct socrates_nand_host *host = this->priv;
+
+       for (i = 0; i < len; i++) {
+               out_be32(host->io_base, FPGA_NAND_ENABLE |
+                               FPGA_NAND_CMD_WRITE |
+                               (buf[i] << FPGA_NAND_DATA_SHIFT));
+       }
+}
+
+/**
+ * socrates_nand_read_buf -  read chip data into buffer
+ * @mtd:       MTD device structure
+ * @buf:       buffer to store date
+ * @len:       number of bytes to read
+ */
+static void socrates_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
+{
+       int i;
+       struct nand_chip *this = mtd->priv;
+       struct socrates_nand_host *host = this->priv;
+       uint32_t val;
+
+       val = FPGA_NAND_ENABLE | FPGA_NAND_CMD_READ;
+
+       out_be32(host->io_base, val);
+       for (i = 0; i < len; i++) {
+               buf[i] = (in_be32(host->io_base) >>
+                               FPGA_NAND_DATA_SHIFT) & 0xff;
+       }
+}
+
+/**
+ * socrates_nand_read_byte -  read one byte from the chip
+ * @mtd:       MTD device structure
+ */
+static uint8_t socrates_nand_read_byte(struct mtd_info *mtd)
+{
+       uint8_t byte;
+       socrates_nand_read_buf(mtd, &byte, sizeof(byte));
+       return byte;
+}
+
+/**
+ * socrates_nand_read_word -  read one word from the chip
+ * @mtd:       MTD device structure
+ */
+static uint16_t socrates_nand_read_word(struct mtd_info *mtd)
+{
+       uint16_t word;
+       socrates_nand_read_buf(mtd, (uint8_t *)&word, sizeof(word));
+       return word;
+}
+
+/**
+ * socrates_nand_verify_buf -  Verify chip data against buffer
+ * @mtd:       MTD device structure
+ * @buf:       buffer containing the data to compare
+ * @len:       number of bytes to compare
+ */
+static int socrates_nand_verify_buf(struct mtd_info *mtd, const u8 *buf,
+               int len)
+{
+       int i;
+
+       for (i = 0; i < len; i++) {
+               if (buf[i] != socrates_nand_read_byte(mtd))
+                       return -EFAULT;
+       }
+       return 0;
+}
+
+/*
+ * Hardware specific access to control-lines
+ */
+static void socrates_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
+               unsigned int ctrl)
+{
+       struct nand_chip *nand_chip = mtd->priv;
+       struct socrates_nand_host *host = nand_chip->priv;
+       uint32_t val;
+
+       if (cmd == NAND_CMD_NONE)
+               return;
+
+       if (ctrl & NAND_CLE)
+               val = FPGA_NAND_CMD_COMMAND;
+       else
+               val = FPGA_NAND_CMD_ADDR;
+
+       if (ctrl & NAND_NCE)
+               val |= FPGA_NAND_ENABLE;
+
+       val |= (cmd & 0xff) << FPGA_NAND_DATA_SHIFT;
+
+       out_be32(host->io_base, val);
+}
+
+/*
+ * Read the Device Ready pin.
+ */
+static int socrates_nand_device_ready(struct mtd_info *mtd)
+{
+       struct nand_chip *nand_chip = mtd->priv;
+       struct socrates_nand_host *host = nand_chip->priv;
+
+       if (in_be32(host->io_base) & FPGA_NAND_BUSY)
+               return 0; /* busy */
+       return 1;
+}
+
+#ifdef CONFIG_MTD_PARTITIONS
+static const char *part_probes[] = { "cmdlinepart", NULL };
+#endif
+
+/*
+ * Probe for the NAND device.
+ */
+static int __devinit socrates_nand_probe(struct of_device *ofdev,
+                                        const struct of_device_id *ofid)
+{
+       struct socrates_nand_host *host;
+       struct mtd_info *mtd;
+       struct nand_chip *nand_chip;
+       int res;
+
+#ifdef CONFIG_MTD_PARTITIONS
+       struct mtd_partition *partitions = NULL;
+       int num_partitions = 0;
+#endif
+
+       /* Allocate memory for the device structure (and zero it) */
+       host = kzalloc(sizeof(struct socrates_nand_host), GFP_KERNEL);
+       if (!host) {
+               printk(KERN_ERR
+                      "socrates_nand: failed to allocate device structure.\n");
+               return -ENOMEM;
+       }
+
+       host->io_base = of_iomap(ofdev->node, 0);
+       if (host->io_base == NULL) {
+               printk(KERN_ERR "socrates_nand: ioremap failed\n");
+               kfree(host);
+               return -EIO;
+       }
+
+       mtd = &host->mtd;
+       nand_chip = &host->nand_chip;
+       host->dev = &ofdev->dev;
+
+       nand_chip->priv = host;         /* link the private data structures */
+       mtd->priv = nand_chip;
+       mtd->name = "socrates_nand";
+       mtd->owner = THIS_MODULE;
+       mtd->dev.parent = &ofdev->dev;
+
+       /*should never be accessed directly */
+       nand_chip->IO_ADDR_R = (void *)0xdeadbeef;
+       nand_chip->IO_ADDR_W = (void *)0xdeadbeef;
+
+       nand_chip->cmd_ctrl = socrates_nand_cmd_ctrl;
+       nand_chip->read_byte = socrates_nand_read_byte;
+       nand_chip->read_word = socrates_nand_read_word;
+       nand_chip->write_buf = socrates_nand_write_buf;
+       nand_chip->read_buf = socrates_nand_read_buf;
+       nand_chip->verify_buf = socrates_nand_verify_buf;
+       nand_chip->dev_ready = socrates_nand_device_ready;
+
+       nand_chip->ecc.mode = NAND_ECC_SOFT;    /* enable ECC */
+
+       /* TODO: I have no idea what real delay is. */
+       nand_chip->chip_delay = 20;             /* 20us command delay time */
+
+       dev_set_drvdata(&ofdev->dev, host);
+
+       /* first scan to find the device and get the page size */
+       if (nand_scan_ident(mtd, 1)) {
+               res = -ENXIO;
+               goto out;
+       }
+
+       /* second phase scan */
+       if (nand_scan_tail(mtd)) {
+               res = -ENXIO;
+               goto out;
+       }
+
+#ifdef CONFIG_MTD_PARTITIONS
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+       num_partitions = parse_mtd_partitions(mtd, part_probes,
+                                             &partitions, 0);
+       if (num_partitions < 0) {
+               res = num_partitions;
+               goto release;
+       }
+#endif
+
+#ifdef CONFIG_MTD_OF_PARTS
+       if (num_partitions == 0) {
+               num_partitions = of_mtd_parse_partitions(&ofdev->dev,
+                                                        ofdev->node,
+                                                        &partitions);
+               if (num_partitions < 0) {
+                       res = num_partitions;
+                       goto release;
+               }
+       }
+#endif
+       if (partitions && (num_partitions > 0))
+               res = add_mtd_partitions(mtd, partitions, num_partitions);
+       else
+#endif
+               res = add_mtd_device(mtd);
+
+       if (!res)
+               return res;
+
+#ifdef CONFIG_MTD_PARTITIONS
+release:
+#endif
+       nand_release(mtd);
+
+out:
+       dev_set_drvdata(&ofdev->dev, NULL);
+       iounmap(host->io_base);
+       kfree(host);
+       return res;
+}
+
+/*
+ * Remove a NAND device.
+ */
+static int __devexit socrates_nand_remove(struct of_device *ofdev)
+{
+       struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev);
+       struct mtd_info *mtd = &host->mtd;
+
+       nand_release(mtd);
+
+       dev_set_drvdata(&ofdev->dev, NULL);
+       iounmap(host->io_base);
+       kfree(host);
+
+       return 0;
+}
+
+static struct of_device_id socrates_nand_match[] =
+{
+       {
+               .compatible   = "abb,socrates-nand",
+       },
+       {},
+};
+
+MODULE_DEVICE_TABLE(of, socrates_nand_match);
+
+static struct of_platform_driver socrates_nand_driver = {
+       .name           = "socrates_nand",
+       .match_table    = socrates_nand_match,
+       .probe          = socrates_nand_probe,
+       .remove         = __devexit_p(socrates_nand_remove),
+};
+
+static int __init socrates_nand_init(void)
+{
+       return of_register_platform_driver(&socrates_nand_driver);
+}
+
+static void __exit socrates_nand_exit(void)
+{
+       of_unregister_platform_driver(&socrates_nand_driver);
+}
+
+module_init(socrates_nand_init);
+module_exit(socrates_nand_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Ilya Yanok");
+MODULE_DESCRIPTION("NAND driver for Socrates board");
diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c
new file mode 100644 (file)
index 0000000..8124792
--- /dev/null
@@ -0,0 +1,428 @@
+/*
+ * TXx9 NAND flash memory controller driver
+ * Based on RBTX49xx patch from CELF patch archive.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * (C) Copyright TOSHIBA CORPORATION 2004-2007
+ * All Rights Reserved.
+ */
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/partitions.h>
+#include <linux/io.h>
+#include <asm/txx9/ndfmc.h>
+
+/* TXX9 NDFMC Registers */
+#define TXX9_NDFDTR    0x00
+#define TXX9_NDFMCR    0x04
+#define TXX9_NDFSR     0x08
+#define TXX9_NDFISR    0x0c
+#define TXX9_NDFIMR    0x10
+#define TXX9_NDFSPR    0x14
+#define TXX9_NDFRSTR   0x18    /* not TX4939 */
+
+/* NDFMCR : NDFMC Mode Control */
+#define TXX9_NDFMCR_WE 0x80
+#define TXX9_NDFMCR_ECC_ALL    0x60
+#define TXX9_NDFMCR_ECC_RESET  0x60
+#define TXX9_NDFMCR_ECC_READ   0x40
+#define TXX9_NDFMCR_ECC_ON     0x20
+#define TXX9_NDFMCR_ECC_OFF    0x00
+#define TXX9_NDFMCR_CE 0x10
+#define TXX9_NDFMCR_BSPRT      0x04    /* TX4925/TX4926 only */
+#define TXX9_NDFMCR_ALE        0x02
+#define TXX9_NDFMCR_CLE        0x01
+/* TX4939 only */
+#define TXX9_NDFMCR_X16        0x0400
+#define TXX9_NDFMCR_DMAREQ_MASK        0x0300
+#define TXX9_NDFMCR_DMAREQ_NODMA       0x0000
+#define TXX9_NDFMCR_DMAREQ_128 0x0100
+#define TXX9_NDFMCR_DMAREQ_256 0x0200
+#define TXX9_NDFMCR_DMAREQ_512 0x0300
+#define TXX9_NDFMCR_CS_MASK    0x0c
+#define TXX9_NDFMCR_CS(ch)     ((ch) << 2)
+
+/* NDFMCR : NDFMC Status */
+#define TXX9_NDFSR_BUSY        0x80
+/* TX4939 only */
+#define TXX9_NDFSR_DMARUN      0x40
+
+/* NDFMCR : NDFMC Reset */
+#define TXX9_NDFRSTR_RST       0x01
+
+struct txx9ndfmc_priv {
+       struct platform_device *dev;
+       struct nand_chip chip;
+       struct mtd_info mtd;
+       int cs;
+       char mtdname[BUS_ID_SIZE + 2];
+};
+
+#define MAX_TXX9NDFMC_DEV      4
+struct txx9ndfmc_drvdata {
+       struct mtd_info *mtds[MAX_TXX9NDFMC_DEV];
+       void __iomem *base;
+       unsigned char hold;     /* in gbusclock */
+       unsigned char spw;      /* in gbusclock */
+       struct nand_hw_control hw_control;
+#ifdef CONFIG_MTD_PARTITIONS
+       struct mtd_partition *parts[MAX_TXX9NDFMC_DEV];
+#endif
+};
+
+static struct platform_device *mtd_to_platdev(struct mtd_info *mtd)
+{
+       struct nand_chip *chip = mtd->priv;
+       struct txx9ndfmc_priv *txx9_priv = chip->priv;
+       return txx9_priv->dev;
+}
+
+static void __iomem *ndregaddr(struct platform_device *dev, unsigned int reg)
+{
+       struct txx9ndfmc_drvdata *drvdata = platform_get_drvdata(dev);
+       struct txx9ndfmc_platform_data *plat = dev->dev.platform_data;
+
+       return drvdata->base + (reg << plat->shift);
+}
+
+static u32 txx9ndfmc_read(struct platform_device *dev, unsigned int reg)
+{
+       return __raw_readl(ndregaddr(dev, reg));
+}
+
+static void txx9ndfmc_write(struct platform_device *dev,
+                           u32 val, unsigned int reg)
+{
+       __raw_writel(val, ndregaddr(dev, reg));
+}
+
+static uint8_t txx9ndfmc_read_byte(struct mtd_info *mtd)
+{
+       struct platform_device *dev = mtd_to_platdev(mtd);
+
+       return txx9ndfmc_read(dev, TXX9_NDFDTR);
+}
+
+static void txx9ndfmc_write_buf(struct mtd_info *mtd, const uint8_t *buf,
+                               int len)
+{
+       struct platform_device *dev = mtd_to_platdev(mtd);
+       void __iomem *ndfdtr = ndregaddr(dev, TXX9_NDFDTR);
+       u32 mcr = txx9ndfmc_read(dev, TXX9_NDFMCR);
+
+       txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_WE, TXX9_NDFMCR);
+       while (len--)
+               __raw_writel(*buf++, ndfdtr);
+       txx9ndfmc_write(dev, mcr, TXX9_NDFMCR);
+}
+
+static void txx9ndfmc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
+{
+       struct platform_device *dev = mtd_to_platdev(mtd);
+       void __iomem *ndfdtr = ndregaddr(dev, TXX9_NDFDTR);
+
+       while (len--)
+               *buf++ = __raw_readl(ndfdtr);
+}
+
+static int txx9ndfmc_verify_buf(struct mtd_info *mtd, const uint8_t *buf,
+                               int len)
+{
+       struct platform_device *dev = mtd_to_platdev(mtd);
+       void __iomem *ndfdtr = ndregaddr(dev, TXX9_NDFDTR);
+
+       while (len--)
+               if (*buf++ != (uint8_t)__raw_readl(ndfdtr))
+                       return -EFAULT;
+       return 0;
+}
+
+static void txx9ndfmc_cmd_ctrl(struct mtd_info *mtd, int cmd,
+                              unsigned int ctrl)
+{
+       struct nand_chip *chip = mtd->priv;
+       struct txx9ndfmc_priv *txx9_priv = chip->priv;
+       struct platform_device *dev = txx9_priv->dev;
+       struct txx9ndfmc_platform_data *plat = dev->dev.platform_data;
+
+       if (ctrl & NAND_CTRL_CHANGE) {
+               u32 mcr = txx9ndfmc_read(dev, TXX9_NDFMCR);
+
+               mcr &= ~(TXX9_NDFMCR_CLE | TXX9_NDFMCR_ALE | TXX9_NDFMCR_CE);
+               mcr |= ctrl & NAND_CLE ? TXX9_NDFMCR_CLE : 0;
+               mcr |= ctrl & NAND_ALE ? TXX9_NDFMCR_ALE : 0;
+               /* TXX9_NDFMCR_CE bit is 0:high 1:low */
+               mcr |= ctrl & NAND_NCE ? TXX9_NDFMCR_CE : 0;
+               if (txx9_priv->cs >= 0 && (ctrl & NAND_NCE)) {
+                       mcr &= ~TXX9_NDFMCR_CS_MASK;
+                       mcr |= TXX9_NDFMCR_CS(txx9_priv->cs);
+               }
+               txx9ndfmc_write(dev, mcr, TXX9_NDFMCR);
+       }
+       if (cmd != NAND_CMD_NONE)
+               txx9ndfmc_write(dev, cmd & 0xff, TXX9_NDFDTR);
+       if (plat->flags & NDFMC_PLAT_FLAG_DUMMYWRITE) {
+               /* dummy write to update external latch */
+               if ((ctrl & NAND_CTRL_CHANGE) && cmd == NAND_CMD_NONE)
+                       txx9ndfmc_write(dev, 0, TXX9_NDFDTR);
+       }
+       mmiowb();
+}
+
+static int txx9ndfmc_dev_ready(struct mtd_info *mtd)
+{
+       struct platform_device *dev = mtd_to_platdev(mtd);
+
+       return !(txx9ndfmc_read(dev, TXX9_NDFSR) & TXX9_NDFSR_BUSY);
+}
+
+static int txx9ndfmc_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat,
+                                  uint8_t *ecc_code)
+{
+       struct platform_device *dev = mtd_to_platdev(mtd);
+       u32 mcr = txx9ndfmc_read(dev, TXX9_NDFMCR);
+
+       mcr &= ~TXX9_NDFMCR_ECC_ALL;
+       txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_ECC_OFF, TXX9_NDFMCR);
+       txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_ECC_READ, TXX9_NDFMCR);
+       ecc_code[1] = txx9ndfmc_read(dev, TXX9_NDFDTR);
+       ecc_code[0] = txx9ndfmc_read(dev, TXX9_NDFDTR);
+       ecc_code[2] = txx9ndfmc_read(dev, TXX9_NDFDTR);
+       txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_ECC_OFF, TXX9_NDFMCR);
+       return 0;
+}
+
+static void txx9ndfmc_enable_hwecc(struct mtd_info *mtd, int mode)
+{
+       struct platform_device *dev = mtd_to_platdev(mtd);
+       u32 mcr = txx9ndfmc_read(dev, TXX9_NDFMCR);
+
+       mcr &= ~TXX9_NDFMCR_ECC_ALL;
+       txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_ECC_RESET, TXX9_NDFMCR);
+       txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_ECC_OFF, TXX9_NDFMCR);
+       txx9ndfmc_write(dev, mcr | TXX9_NDFMCR_ECC_ON, TXX9_NDFMCR);
+}
+
+static void txx9ndfmc_initialize(struct platform_device *dev)
+{
+       struct txx9ndfmc_platform_data *plat = dev->dev.platform_data;
+       struct txx9ndfmc_drvdata *drvdata = platform_get_drvdata(dev);
+       int tmout = 100;
+
+       if (plat->flags & NDFMC_PLAT_FLAG_NO_RSTR)
+               ; /* no NDFRSTR.  Write to NDFSPR resets the NDFMC. */
+       else {
+               /* reset NDFMC */
+               txx9ndfmc_write(dev,
+                               txx9ndfmc_read(dev, TXX9_NDFRSTR) |
+                               TXX9_NDFRSTR_RST,
+                               TXX9_NDFRSTR);
+               while (txx9ndfmc_read(dev, TXX9_NDFRSTR) & TXX9_NDFRSTR_RST) {
+                       if (--tmout == 0) {
+                               dev_err(&dev->dev, "reset failed.\n");
+                               break;
+                       }
+                       udelay(1);
+               }
+       }
+       /* setup Hold Time, Strobe Pulse Width */
+       txx9ndfmc_write(dev, (drvdata->hold << 4) | drvdata->spw, TXX9_NDFSPR);
+       txx9ndfmc_write(dev,
+                       (plat->flags & NDFMC_PLAT_FLAG_USE_BSPRT) ?
+                       TXX9_NDFMCR_BSPRT : 0, TXX9_NDFMCR);
+}
+
+#define TXX9NDFMC_NS_TO_CYC(gbusclk, ns) \
+       DIV_ROUND_UP((ns) * DIV_ROUND_UP(gbusclk, 1000), 1000000)
+
+static int __init txx9ndfmc_probe(struct platform_device *dev)
+{
+       struct txx9ndfmc_platform_data *plat = dev->dev.platform_data;
+#ifdef CONFIG_MTD_PARTITIONS
+       static const char *probes[] = { "cmdlinepart", NULL };
+#endif
+       int hold, spw;
+       int i;
+       struct txx9ndfmc_drvdata *drvdata;
+       unsigned long gbusclk = plat->gbus_clock;
+       struct resource *res;
+
+       res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+       if (!res)
+               return -ENODEV;
+       drvdata = devm_kzalloc(&dev->dev, sizeof(*drvdata), GFP_KERNEL);
+       if (!drvdata)
+               return -ENOMEM;
+       if (!devm_request_mem_region(&dev->dev, res->start,
+                                    resource_size(res), dev_name(&dev->dev)))
+               return -EBUSY;
+       drvdata->base = devm_ioremap(&dev->dev, res->start,
+                                    resource_size(res));
+       if (!drvdata->base)
+               return -EBUSY;
+
+       hold = plat->hold ?: 20; /* tDH */
+       spw = plat->spw ?: 90; /* max(tREADID, tWP, tRP) */
+
+       hold = TXX9NDFMC_NS_TO_CYC(gbusclk, hold);
+       spw = TXX9NDFMC_NS_TO_CYC(gbusclk, spw);
+       if (plat->flags & NDFMC_PLAT_FLAG_HOLDADD)
+               hold -= 2;      /* actual hold time : (HOLD + 2) BUSCLK */
+       spw -= 1;       /* actual wait time : (SPW + 1) BUSCLK */
+       hold = clamp(hold, 1, 15);
+       drvdata->hold = hold;
+       spw = clamp(spw, 1, 15);
+       drvdata->spw = spw;
+       dev_info(&dev->dev, "CLK:%ldMHz HOLD:%d SPW:%d\n",
+                (gbusclk + 500000) / 1000000, hold, spw);
+
+       spin_lock_init(&drvdata->hw_control.lock);
+       init_waitqueue_head(&drvdata->hw_control.wq);
+
+       platform_set_drvdata(dev, drvdata);
+       txx9ndfmc_initialize(dev);
+
+       for (i = 0; i < MAX_TXX9NDFMC_DEV; i++) {
+               struct txx9ndfmc_priv *txx9_priv;
+               struct nand_chip *chip;
+               struct mtd_info *mtd;
+#ifdef CONFIG_MTD_PARTITIONS
+               int nr_parts;
+#endif
+
+               if (!(plat->ch_mask & (1 << i)))
+                       continue;
+               txx9_priv = kzalloc(sizeof(struct txx9ndfmc_priv),
+                                   GFP_KERNEL);
+               if (!txx9_priv) {
+                       dev_err(&dev->dev, "Unable to allocate "
+                               "TXx9 NDFMC MTD device structure.\n");
+                       continue;
+               }
+               chip = &txx9_priv->chip;
+               mtd = &txx9_priv->mtd;
+               mtd->owner = THIS_MODULE;
+
+               mtd->priv = chip;
+
+               chip->read_byte = txx9ndfmc_read_byte;
+               chip->read_buf = txx9ndfmc_read_buf;
+               chip->write_buf = txx9ndfmc_write_buf;
+               chip->verify_buf = txx9ndfmc_verify_buf;
+               chip->cmd_ctrl = txx9ndfmc_cmd_ctrl;
+               chip->dev_ready = txx9ndfmc_dev_ready;
+               chip->ecc.calculate = txx9ndfmc_calculate_ecc;
+               chip->ecc.correct = nand_correct_data;
+               chip->ecc.hwctl = txx9ndfmc_enable_hwecc;
+               chip->ecc.mode = NAND_ECC_HW;
+               chip->ecc.size = 256;
+               chip->ecc.bytes = 3;
+               chip->chip_delay = 100;
+               chip->controller = &drvdata->hw_control;
+
+               chip->priv = txx9_priv;
+               txx9_priv->dev = dev;
+
+               if (plat->ch_mask != 1) {
+                       txx9_priv->cs = i;
+                       sprintf(txx9_priv->mtdname, "%s.%u",
+                               dev_name(&dev->dev), i);
+               } else {
+                       txx9_priv->cs = -1;
+                       strcpy(txx9_priv->mtdname, dev_name(&dev->dev));
+               }
+               if (plat->wide_mask & (1 << i))
+                       chip->options |= NAND_BUSWIDTH_16;
+
+               if (nand_scan(mtd, 1)) {
+                       kfree(txx9_priv);
+                       continue;
+               }
+               mtd->name = txx9_priv->mtdname;
+
+#ifdef CONFIG_MTD_PARTITIONS
+               nr_parts = parse_mtd_partitions(mtd, probes,
+                                               &drvdata->parts[i], 0);
+               if (nr_parts > 0)
+                       add_mtd_partitions(mtd, drvdata->parts[i], nr_parts);
+#endif
+               add_mtd_device(mtd);
+               drvdata->mtds[i] = mtd;
+       }
+
+       return 0;
+}
+
+static int __exit txx9ndfmc_remove(struct platform_device *dev)
+{
+       struct txx9ndfmc_drvdata *drvdata = platform_get_drvdata(dev);
+       int i;
+
+       platform_set_drvdata(dev, NULL);
+       if (!drvdata)
+               return 0;
+       for (i = 0; i < MAX_TXX9NDFMC_DEV; i++) {
+               struct mtd_info *mtd = drvdata->mtds[i];
+               struct nand_chip *chip;
+               struct txx9ndfmc_priv *txx9_priv;
+
+               if (!mtd)
+                       continue;
+               chip = mtd->priv;
+               txx9_priv = chip->priv;
+
+#ifdef CONFIG_MTD_PARTITIONS
+               del_mtd_partitions(mtd);
+               kfree(drvdata->parts[i]);
+#endif
+               del_mtd_device(mtd);
+               kfree(txx9_priv);
+       }
+       return 0;
+}
+
+#ifdef CONFIG_PM
+static int txx9ndfmc_resume(struct platform_device *dev)
+{
+       if (platform_get_drvdata(dev))
+               txx9ndfmc_initialize(dev);
+       return 0;
+}
+#else
+#define txx9ndfmc_resume NULL
+#endif
+
+static struct platform_driver txx9ndfmc_driver = {
+       .remove         = __exit_p(txx9ndfmc_remove),
+       .resume         = txx9ndfmc_resume,
+       .driver         = {
+               .name   = "txx9ndfmc",
+               .owner  = THIS_MODULE,
+       },
+};
+
+static int __init txx9ndfmc_init(void)
+{
+       return platform_driver_probe(&txx9ndfmc_driver, txx9ndfmc_probe);
+}
+
+static void __exit txx9ndfmc_exit(void)
+{
+       platform_driver_unregister(&txx9ndfmc_driver);
+}
+
+module_init(txx9ndfmc_init);
+module_exit(txx9ndfmc_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("TXx9 SoC NAND flash controller driver");
+MODULE_ALIAS("platform:txx9ndfmc");
index d1c4546..e3f8495 100644 (file)
 #include <asm/errno.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <linux/miscdevice.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/hdreg.h>
+#include <linux/blkdev.h>
 
 #include <linux/kmod.h>
 #include <linux/mtd/mtd.h>
@@ -818,3 +818,4 @@ module_exit(cleanup_nftl);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>, Fabrice Bellard <fabrice.bellard@netgem.com> et al.");
 MODULE_DESCRIPTION("Support code for NAND Flash Translation Layer, used on M-Systems DiskOnChip 2000 and Millennium");
+MODULE_ALIAS_BLOCKDEV_MAJOR(NFTL_MAJOR);
index 9e45b3f..3e164f0 100644 (file)
@@ -46,6 +46,13 @@ int __devinit of_mtd_parse_partitions(struct device *dev,
                const u32 *reg;
                int len;
 
+               /* check if this is a partition node */
+               partname = of_get_property(pp, "name", &len);
+               if (strcmp(partname, "partition") != 0) {
+                       nr_parts--;
+                       continue;
+               }
+
                reg = of_get_property(pp, "reg", &len);
                if (!reg || (len != 2 * sizeof(u32))) {
                        of_node_put(pp);
index 77a4f14..f2e9de1 100644 (file)
@@ -294,6 +294,10 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area,
        if (bram_offset & 3 || (size_t)buf & 3 || count < 384)
                goto out_copy;
 
+       /* panic_write() may be in an interrupt context */
+       if (in_interrupt())
+               goto out_copy;
+
        if (buf >= high_memory) {
                struct page *p1;
 
@@ -672,6 +676,8 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
        c->mtd.priv = &c->onenand;
        c->mtd.owner = THIS_MODULE;
 
+       c->mtd.dev.parent = &pdev->dev;
+
        if (c->dma_channel >= 0) {
                struct onenand_chip *this = &c->onenand;
 
index 529af27..30d6999 100644 (file)
@@ -1455,7 +1455,8 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
                                struct mtd_oob_ops *ops)
 {
        struct onenand_chip *this = mtd->priv;
-       int written = 0, column, thislen, subpage;
+       int written = 0, column, thislen = 0, subpage = 0;
+       int prev = 0, prevlen = 0, prev_subpage = 0, first = 1;
        int oobwritten = 0, oobcolumn, thisooblen, oobsize;
        size_t len = ops->len;
        size_t ooblen = ops->ooblen;
@@ -1482,6 +1483,10 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
                 return -EINVAL;
         }
 
+       /* Check zero length */
+       if (!len)
+               return 0;
+
        if (ops->mode == MTD_OOB_AUTO)
                oobsize = this->ecclayout->oobavail;
        else
@@ -1492,79 +1497,121 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
        column = to & (mtd->writesize - 1);
 
        /* Loop until all data write */
-       while (written < len) {
-               u_char *wbuf = (u_char *) buf;
+       while (1) {
+               if (written < len) {
+                       u_char *wbuf = (u_char *) buf;
 
-               thislen = min_t(int, mtd->writesize - column, len - written);
-               thisooblen = min_t(int, oobsize - oobcolumn, ooblen - oobwritten);
+                       thislen = min_t(int, mtd->writesize - column, len - written);
+                       thisooblen = min_t(int, oobsize - oobcolumn, ooblen - oobwritten);
 
-               cond_resched();
+                       cond_resched();
 
-               this->command(mtd, ONENAND_CMD_BUFFERRAM, to, thislen);
+                       this->command(mtd, ONENAND_CMD_BUFFERRAM, to, thislen);
 
-               /* Partial page write */
-               subpage = thislen < mtd->writesize;
-               if (subpage) {
-                       memset(this->page_buf, 0xff, mtd->writesize);
-                       memcpy(this->page_buf + column, buf, thislen);
-                       wbuf = this->page_buf;
-               }
+                       /* Partial page write */
+                       subpage = thislen < mtd->writesize;
+                       if (subpage) {
+                               memset(this->page_buf, 0xff, mtd->writesize);
+                               memcpy(this->page_buf + column, buf, thislen);
+                               wbuf = this->page_buf;
+                       }
 
-               this->write_bufferram(mtd, ONENAND_DATARAM, wbuf, 0, mtd->writesize);
+                       this->write_bufferram(mtd, ONENAND_DATARAM, wbuf, 0, mtd->writesize);
 
-               if (oob) {
-                       oobbuf = this->oob_buf;
+                       if (oob) {
+                               oobbuf = this->oob_buf;
 
-                       /* We send data to spare ram with oobsize
-                        * to prevent byte access */
-                       memset(oobbuf, 0xff, mtd->oobsize);
-                       if (ops->mode == MTD_OOB_AUTO)
-                               onenand_fill_auto_oob(mtd, oobbuf, oob, oobcolumn, thisooblen);
-                       else
-                               memcpy(oobbuf + oobcolumn, oob, thisooblen);
+                               /* We send data to spare ram with oobsize
+                                * to prevent byte access */
+                               memset(oobbuf, 0xff, mtd->oobsize);
+                               if (ops->mode == MTD_OOB_AUTO)
+                                       onenand_fill_auto_oob(mtd, oobbuf, oob, oobcolumn, thisooblen);
+                               else
+                                       memcpy(oobbuf + oobcolumn, oob, thisooblen);
 
-                       oobwritten += thisooblen;
-                       oob += thisooblen;
-                       oobcolumn = 0;
+                               oobwritten += thisooblen;
+                               oob += thisooblen;
+                               oobcolumn = 0;
+                       } else
+                               oobbuf = (u_char *) ffchars;
+
+                       this->write_bufferram(mtd, ONENAND_SPARERAM, oobbuf, 0, mtd->oobsize);
                } else
-                       oobbuf = (u_char *) ffchars;
+                       ONENAND_SET_NEXT_BUFFERRAM(this);
 
-               this->write_bufferram(mtd, ONENAND_SPARERAM, oobbuf, 0, mtd->oobsize);
+               /*
+                * 2 PLANE, MLC, and Flex-OneNAND doesn't support
+                * write-while-programe feature.
+                */
+               if (!ONENAND_IS_2PLANE(this) && !first) {
+                       ONENAND_SET_PREV_BUFFERRAM(this);
 
-               this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
+                       ret = this->wait(mtd, FL_WRITING);
 
-               ret = this->wait(mtd, FL_WRITING);
+                       /* In partial page write we don't update bufferram */
+                       onenand_update_bufferram(mtd, prev, !ret && !prev_subpage);
+                       if (ret) {
+                               written -= prevlen;
+                               printk(KERN_ERR "onenand_write_ops_nolock: write filaed %d\n", ret);
+                               break;
+                       }
 
-               /* In partial page write we don't update bufferram */
-               onenand_update_bufferram(mtd, to, !ret && !subpage);
-               if (ONENAND_IS_2PLANE(this)) {
-                       ONENAND_SET_BUFFERRAM1(this);
-                       onenand_update_bufferram(mtd, to + this->writesize, !ret && !subpage);
-               }
+                       if (written == len) {
+                               /* Only check verify write turn on */
+                               ret = onenand_verify(mtd, buf - len, to - len, len);
+                               if (ret)
+                                       printk(KERN_ERR "onenand_write_ops_nolock: verify failed %d\n", ret);
+                               break;
+                       }
 
-               if (ret) {
-                       printk(KERN_ERR "onenand_write_ops_nolock: write filaed %d\n", ret);
-                       break;
+                       ONENAND_SET_NEXT_BUFFERRAM(this);
                }
 
-               /* Only check verify write turn on */
-               ret = onenand_verify(mtd, buf, to, thislen);
-               if (ret) {
-                       printk(KERN_ERR "onenand_write_ops_nolock: verify failed %d\n", ret);
-                       break;
-               }
+               this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
 
-               written += thislen;
+               /*
+                * 2 PLANE, MLC, and Flex-OneNAND wait here
+                */
+               if (ONENAND_IS_2PLANE(this)) {
+                       ret = this->wait(mtd, FL_WRITING);
 
-               if (written == len)
-                       break;
+                       /* In partial page write we don't update bufferram */
+                       onenand_update_bufferram(mtd, to, !ret && !subpage);
+                       if (ret) {
+                               printk(KERN_ERR "onenand_write_ops_nolock: write filaed %d\n", ret);
+                               break;
+                       }
+
+                       /* Only check verify write turn on */
+                       ret = onenand_verify(mtd, buf, to, thislen);
+                       if (ret) {
+                               printk(KERN_ERR "onenand_write_ops_nolock: verify failed %d\n", ret);
+                               break;
+                       }
+
+                       written += thislen;
+
+                       if (written == len)
+                               break;
+
+               } else
+                       written += thislen;
 
                column = 0;
+               prev_subpage = subpage;
+               prev = to;
+               prevlen = thislen;
                to += thislen;
                buf += thislen;
+               first = 0;
        }
 
+       /* In error case, clear all bufferrams */
+       if (written != len)
+               onenand_invalidate_bufferram(mtd, 0, -1);
+
        ops->retlen = written;
+       ops->oobretlen = oobwritten;
 
        return ret;
 }
index e63c8fc..f8e0f68 100644 (file)
@@ -186,6 +186,16 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
        return new_offset;
 }
 
+static int vol_cdev_fsync(struct file *file, struct dentry *dentry,
+                         int datasync)
+{
+       struct ubi_volume_desc *desc = file->private_data;
+       struct ubi_device *ubi = desc->vol->ubi;
+
+       return ubi_sync(ubi->ubi_num);
+}
+
+
 static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count,
                             loff_t *offp)
 {
@@ -1073,6 +1083,7 @@ const struct file_operations ubi_vol_cdev_operations = {
        .llseek         = vol_cdev_llseek,
        .read           = vol_cdev_read,
        .write          = vol_cdev_write,
+       .fsync          = vol_cdev_fsync,
        .unlocked_ioctl = vol_cdev_ioctl,
        .compat_ioctl   = vol_cdev_compat_ioctl,
 };
index a09e3a7..02330f3 100644 (file)
@@ -1530,7 +1530,7 @@ static void cp_get_ethtool_stats (struct net_device *dev,
 
        /* begin NIC statistics dump */
        cpw32(StatsAddr + 4, (u64)dma >> 32);
-       cpw32(StatsAddr, ((u64)dma & DMA_32BIT_MASK) | DumpStats);
+       cpw32(StatsAddr, ((u64)dma & DMA_BIT_MASK(32)) | DumpStats);
        cpr32(StatsAddr);
 
        for (i = 0; i < 1000; i++) {
@@ -1929,19 +1929,19 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 
        /* Configure DMA attributes. */
        if ((sizeof(dma_addr_t) > 4) &&
-           !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) &&
-           !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+           !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) &&
+           !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
        } else {
                pci_using_dac = 0;
 
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_err(&pdev->dev,
                                   "No usable DMA configuration, aborting.\n");
                        goto err_out_res;
                }
-               rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_err(&pdev->dev,
                                   "No usable consistent DMA configuration, "
index 16899ee..9e92154 100644 (file)
@@ -977,6 +977,8 @@ config ETHOC
        depends on NET_ETHERNET && HAS_IOMEM
        select MII
        select PHYLIB
+       select CRC32
+       select BITREVERSE
        help
          Say Y here if you want to use the OpenCores 10/100 Mbps Ethernet MAC.
 
@@ -2056,6 +2058,27 @@ config IGB_DCA
          driver.  DCA is a method for warming the CPU cache before data
          is used, with the intent of lessening the impact of cache misses.
 
+config IGBVF
+       tristate "Intel(R) 82576 Virtual Function Ethernet support"
+       depends on PCI
+       ---help---
+         This driver supports Intel(R) 82576 virtual functions.  For more
+         information on how to identify your adapter, go to the Adapter &
+         Driver ID Guide at:
+
+         <http://support.intel.com/support/network/adapter/pro100/21397.htm>
+
+         For general information and support, go to the Intel support
+         website at:
+
+         <http://support.intel.com>
+
+         More specific information on configuring the driver is in
+         <file:Documentation/networking/e1000.txt>.
+
+         To compile this driver as a module, choose M here. The module
+         will be called igbvf.
+
 source "drivers/net/ixp2000/Kconfig"
 
 config MYRI_SBUS
@@ -2234,7 +2257,7 @@ config BNX2
        tristate "Broadcom NetXtremeII support"
        depends on PCI
        select CRC32
-       select ZLIB_INFLATE
+       select FW_LOADER
        help
          This driver supports Broadcom NetXtremeII gigabit Ethernet cards.
 
index edc9a0d..1fc4602 100644 (file)
@@ -6,6 +6,7 @@ obj-$(CONFIG_E1000) += e1000/
 obj-$(CONFIG_E1000E) += e1000e/
 obj-$(CONFIG_IBM_NEW_EMAC) += ibm_newemac/
 obj-$(CONFIG_IGB) += igb/
+obj-$(CONFIG_IGBVF) += igbvf/
 obj-$(CONFIG_IXGBE) += ixgbe/
 obj-$(CONFIG_IXGB) += ixgb/
 obj-$(CONFIG_IP1000) += ipg.o
index 06a9f11..57bc715 100644 (file)
@@ -1161,9 +1161,9 @@ static int __devinit ace_init(struct net_device *dev)
        /*
         * Configure DMA attributes.
         */
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                ap->pci_using_dac = 1;
-       } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                ap->pci_using_dac = 0;
        } else {
                ecode = -ENODEV;
index cb9c95d..19831bd 100644 (file)
@@ -1871,7 +1871,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
        }
 
        /* Initialize DMA */
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) < 0) {
                printk(KERN_ERR "amd8111e: DMA not supported,"
                        "exiting.\n");
                goto err_free_reg;
index c758884..fb57b75 100644 (file)
@@ -2326,8 +2326,8 @@ static int __devinit atl1e_probe(struct pci_dev *pdev,
         * various kernel subsystems to support the mechanics required by a
         * fixed-high-32-bit system.
         */
-       if ((pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) ||
-           (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK) != 0)) {
+       if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) ||
+           (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)) {
                dev_err(&pdev->dev, "No usable DMA configuration,aborting\n");
                goto err_dma;
        }
index 43fc1b2..0ab2254 100644 (file)
@@ -2929,7 +2929,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
         * various kernel subsystems to support the mechanics required by a
         * fixed-high-32-bit system.
         */
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                dev_err(&pdev->dev, "no usable DMA configuration\n");
                goto err_dma;
index 9fe06c3..c734b19 100644 (file)
@@ -1358,8 +1358,8 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
         * until the kernel has the proper infrastructure to support 64-bit DMA
         * on these devices.
         */
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) &&
-               pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) &&
+               pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR "atl2: No usable DMA configuration, aborting\n");
                goto err_dma;
        }
index 5c84541..b70b81e 100644 (file)
@@ -660,7 +660,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
        /* Hardware bug work-around, the chip is unable to do PCI DMA
           to/from anything above 1GB :-( */
        if (ssb_dma_mapping_error(bp->sdev, mapping) ||
-               mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
+               mapping + RX_PKT_BUF_SZ > DMA_BIT_MASK(30)) {
                /* Sigh... */
                if (!ssb_dma_mapping_error(bp->sdev, mapping))
                        ssb_dma_unmap_single(bp->sdev, mapping,
@@ -673,7 +673,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
                                             RX_PKT_BUF_SZ,
                                             DMA_FROM_DEVICE);
                if (ssb_dma_mapping_error(bp->sdev, mapping) ||
-                       mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
+                       mapping + RX_PKT_BUF_SZ > DMA_BIT_MASK(30)) {
                        if (!ssb_dma_mapping_error(bp->sdev, mapping))
                                ssb_dma_unmap_single(bp->sdev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
                        dev_kfree_skb_any(skb);
@@ -703,7 +703,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
 
        if (bp->flags & B44_FLAG_RX_RING_HACK)
                b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
-                                           dest_idx * sizeof(dp),
+                                           dest_idx * sizeof(*dp),
                                            DMA_BIDIRECTIONAL);
 
        return RX_PKT_BUF_SZ;
@@ -731,7 +731,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
 
        if (bp->flags & B44_FLAG_RX_RING_HACK)
                b44_sync_dma_desc_for_cpu(bp->sdev, bp->rx_ring_dma,
-                                        src_idx * sizeof(src_desc),
+                                        src_idx * sizeof(*src_desc),
                                         DMA_BIDIRECTIONAL);
 
        ctrl = src_desc->ctrl;
@@ -747,10 +747,10 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
 
        if (bp->flags & B44_FLAG_RX_RING_HACK)
                b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
-                                            dest_idx * sizeof(dest_desc),
+                                            dest_idx * sizeof(*dest_desc),
                                             DMA_BIDIRECTIONAL);
 
-       ssb_dma_sync_single_for_device(bp->sdev, le32_to_cpu(src_desc->addr),
+       ssb_dma_sync_single_for_device(bp->sdev, dest_map->mapping,
                                       RX_PKT_BUF_SZ,
                                       DMA_FROM_DEVICE);
 }
@@ -965,7 +965,7 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
        mapping = ssb_dma_map_single(bp->sdev, skb->data, len, DMA_TO_DEVICE);
-       if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_30BIT_MASK) {
+       if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
                struct sk_buff *bounce_skb;
 
                /* Chip can't handle DMA to/from >1GB, use bounce buffer */
@@ -979,7 +979,7 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
                mapping = ssb_dma_map_single(bp->sdev, bounce_skb->data,
                                             len, DMA_TO_DEVICE);
-               if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_30BIT_MASK) {
+               if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
                        if (!ssb_dma_mapping_error(bp->sdev, mapping))
                                ssb_dma_unmap_single(bp->sdev, mapping,
                                                     len, DMA_TO_DEVICE);
@@ -1204,7 +1204,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
                                                 DMA_BIDIRECTIONAL);
 
                if (ssb_dma_mapping_error(bp->sdev, rx_ring_dma) ||
-                       rx_ring_dma + size > DMA_30BIT_MASK) {
+                       rx_ring_dma + size > DMA_BIT_MASK(30)) {
                        kfree(rx_ring);
                        goto out_err;
                }
@@ -1231,7 +1231,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
                                            DMA_TO_DEVICE);
 
                if (ssb_dma_mapping_error(bp->sdev, tx_ring_dma) ||
-                       tx_ring_dma + size > DMA_30BIT_MASK) {
+                       tx_ring_dma + size > DMA_BIT_MASK(30)) {
                        kfree(tx_ring);
                        goto out_err;
                }
@@ -2180,7 +2180,7 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
                        "Failed to powerup the bus\n");
                goto err_out_free_dev;
        }
-       err = ssb_dma_set_mask(sdev, DMA_30BIT_MASK);
+       err = ssb_dma_set_mask(sdev, DMA_BIT_MASK(30));
        if (err) {
                dev_err(sdev->dev,
                        "Required 30BIT DMA mask unsupported by the system.\n");
index ad446db..d478391 100644 (file)
 #include <linux/crc32.h>
 #include <linux/prefetch.h>
 #include <linux/cache.h>
-#include <linux/zlib.h>
+#include <linux/firmware.h>
 #include <linux/log2.h>
 
 #include "bnx2.h"
 #include "bnx2_fw.h"
-#include "bnx2_fw2.h"
-
-#define FW_BUF_SIZE            0x10000
 
 #define DRV_MODULE_NAME                "bnx2"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "1.9.3"
-#define DRV_MODULE_RELDATE     "March 17, 2009"
+#define DRV_MODULE_VERSION     "2.0.0"
+#define DRV_MODULE_RELDATE     "April 2, 2009"
+#define FW_MIPS_FILE_06                "bnx2/bnx2-mips-06-4.6.16.fw"
+#define FW_RV2P_FILE_06                "bnx2/bnx2-rv2p-06-4.6.16.fw"
+#define FW_MIPS_FILE_09                "bnx2/bnx2-mips-09-4.6.17.fw"
+#define FW_RV2P_FILE_09                "bnx2/bnx2-rv2p-09-4.6.15.fw"
 
 #define RUN_AT(x) (jiffies + (x))
 
@@ -72,6 +73,10 @@ MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>");
 MODULE_DESCRIPTION("Broadcom NetXtreme II BCM5706/5708/5709/5716 Driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_MODULE_VERSION);
+MODULE_FIRMWARE(FW_MIPS_FILE_06);
+MODULE_FIRMWARE(FW_RV2P_FILE_06);
+MODULE_FIRMWARE(FW_MIPS_FILE_09);
+MODULE_FIRMWARE(FW_RV2P_FILE_09);
 
 static int disable_msi = 0;
 
@@ -3391,33 +3396,143 @@ bnx2_set_rx_mode(struct net_device *dev)
        spin_unlock_bh(&bp->phy_lock);
 }
 
-static void
-load_rv2p_fw(struct bnx2 *bp, __le32 *rv2p_code, u32 rv2p_code_len,
-       u32 rv2p_proc)
+static int __devinit
+check_fw_section(const struct firmware *fw,
+                const struct bnx2_fw_file_section *section,
+                u32 alignment, bool non_empty)
+{
+       u32 offset = be32_to_cpu(section->offset);
+       u32 len = be32_to_cpu(section->len);
+
+       if ((offset == 0 && len != 0) || offset >= fw->size || offset & 3)
+               return -EINVAL;
+       if ((non_empty && len == 0) || len > fw->size - offset ||
+           len & (alignment - 1))
+               return -EINVAL;
+       return 0;
+}
+
+static int __devinit
+check_mips_fw_entry(const struct firmware *fw,
+                   const struct bnx2_mips_fw_file_entry *entry)
+{
+       if (check_fw_section(fw, &entry->text, 4, true) ||
+           check_fw_section(fw, &entry->data, 4, false) ||
+           check_fw_section(fw, &entry->rodata, 4, false))
+               return -EINVAL;
+       return 0;
+}
+
+static int __devinit
+bnx2_request_firmware(struct bnx2 *bp)
 {
+       const char *mips_fw_file, *rv2p_fw_file;
+       const struct bnx2_mips_fw_file *mips_fw;
+       const struct bnx2_rv2p_fw_file *rv2p_fw;
+       int rc;
+
+       if (CHIP_NUM(bp) == CHIP_NUM_5709) {
+               mips_fw_file = FW_MIPS_FILE_09;
+               rv2p_fw_file = FW_RV2P_FILE_09;
+       } else {
+               mips_fw_file = FW_MIPS_FILE_06;
+               rv2p_fw_file = FW_RV2P_FILE_06;
+       }
+
+       rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev);
+       if (rc) {
+               printk(KERN_ERR PFX "Can't load firmware file \"%s\"\n",
+                      mips_fw_file);
+               return rc;
+       }
+
+       rc = request_firmware(&bp->rv2p_firmware, rv2p_fw_file, &bp->pdev->dev);
+       if (rc) {
+               printk(KERN_ERR PFX "Can't load firmware file \"%s\"\n",
+                      rv2p_fw_file);
+               return rc;
+       }
+       mips_fw = (const struct bnx2_mips_fw_file *) bp->mips_firmware->data;
+       rv2p_fw = (const struct bnx2_rv2p_fw_file *) bp->rv2p_firmware->data;
+       if (bp->mips_firmware->size < sizeof(*mips_fw) ||
+           check_mips_fw_entry(bp->mips_firmware, &mips_fw->com) ||
+           check_mips_fw_entry(bp->mips_firmware, &mips_fw->cp) ||
+           check_mips_fw_entry(bp->mips_firmware, &mips_fw->rxp) ||
+           check_mips_fw_entry(bp->mips_firmware, &mips_fw->tpat) ||
+           check_mips_fw_entry(bp->mips_firmware, &mips_fw->txp)) {
+               printk(KERN_ERR PFX "Firmware file \"%s\" is invalid\n",
+                      mips_fw_file);
+               return -EINVAL;
+       }
+       if (bp->rv2p_firmware->size < sizeof(*rv2p_fw) ||
+           check_fw_section(bp->rv2p_firmware, &rv2p_fw->proc1.rv2p, 8, true) ||
+           check_fw_section(bp->rv2p_firmware, &rv2p_fw->proc2.rv2p, 8, true)) {
+               printk(KERN_ERR PFX "Firmware file \"%s\" is invalid\n",
+                      rv2p_fw_file);
+               return -EINVAL;
+       }
+
+       return 0;
+}
+
+static u32
+rv2p_fw_fixup(u32 rv2p_proc, int idx, u32 loc, u32 rv2p_code)
+{
+       switch (idx) {
+       case RV2P_P1_FIXUP_PAGE_SIZE_IDX:
+               rv2p_code &= ~RV2P_BD_PAGE_SIZE_MSK;
+               rv2p_code |= RV2P_BD_PAGE_SIZE;
+               break;
+       }
+       return rv2p_code;
+}
+
+static int
+load_rv2p_fw(struct bnx2 *bp, u32 rv2p_proc,
+            const struct bnx2_rv2p_fw_file_entry *fw_entry)
+{
+       u32 rv2p_code_len, file_offset;
+       __be32 *rv2p_code;
        int i;
-       u32 val;
+       u32 val, cmd, addr;
+
+       rv2p_code_len = be32_to_cpu(fw_entry->rv2p.len);
+       file_offset = be32_to_cpu(fw_entry->rv2p.offset);
+
+       rv2p_code = (__be32 *)(bp->rv2p_firmware->data + file_offset);
 
-       if (rv2p_proc == RV2P_PROC2 && CHIP_NUM(bp) == CHIP_NUM_5709) {
-               val = le32_to_cpu(rv2p_code[XI_RV2P_PROC2_MAX_BD_PAGE_LOC]);
-               val &= ~XI_RV2P_PROC2_BD_PAGE_SIZE_MSK;
-               val |= XI_RV2P_PROC2_BD_PAGE_SIZE;
-               rv2p_code[XI_RV2P_PROC2_MAX_BD_PAGE_LOC] = cpu_to_le32(val);
+       if (rv2p_proc == RV2P_PROC1) {
+               cmd = BNX2_RV2P_PROC1_ADDR_CMD_RDWR;
+               addr = BNX2_RV2P_PROC1_ADDR_CMD;
+       } else {
+               cmd = BNX2_RV2P_PROC2_ADDR_CMD_RDWR;
+               addr = BNX2_RV2P_PROC2_ADDR_CMD;
        }
 
        for (i = 0; i < rv2p_code_len; i += 8) {
-               REG_WR(bp, BNX2_RV2P_INSTR_HIGH, le32_to_cpu(*rv2p_code));
+               REG_WR(bp, BNX2_RV2P_INSTR_HIGH, be32_to_cpu(*rv2p_code));
                rv2p_code++;
-               REG_WR(bp, BNX2_RV2P_INSTR_LOW, le32_to_cpu(*rv2p_code));
+               REG_WR(bp, BNX2_RV2P_INSTR_LOW, be32_to_cpu(*rv2p_code));
                rv2p_code++;
 
-               if (rv2p_proc == RV2P_PROC1) {
-                       val = (i / 8) | BNX2_RV2P_PROC1_ADDR_CMD_RDWR;
-                       REG_WR(bp, BNX2_RV2P_PROC1_ADDR_CMD, val);
-               }
-               else {
-                       val = (i / 8) | BNX2_RV2P_PROC2_ADDR_CMD_RDWR;
-                       REG_WR(bp, BNX2_RV2P_PROC2_ADDR_CMD, val);
+               val = (i / 8) | cmd;
+               REG_WR(bp, addr, val);
+       }
+
+       rv2p_code = (__be32 *)(bp->rv2p_firmware->data + file_offset);
+       for (i = 0; i < 8; i++) {
+               u32 loc, code;
+
+               loc = be32_to_cpu(fw_entry->fixup[i]);
+               if (loc && ((loc * 4) < rv2p_code_len)) {
+                       code = be32_to_cpu(*(rv2p_code + loc - 1));
+                       REG_WR(bp, BNX2_RV2P_INSTR_HIGH, code);
+                       code = be32_to_cpu(*(rv2p_code + loc));
+                       code = rv2p_fw_fixup(rv2p_proc, i, loc, code);
+                       REG_WR(bp, BNX2_RV2P_INSTR_LOW, code);
+
+                       val = (loc / 2) | cmd;
+                       REG_WR(bp, addr, val);
                }
        }
 
@@ -3428,14 +3543,18 @@ load_rv2p_fw(struct bnx2 *bp, __le32 *rv2p_code, u32 rv2p_code_len,
        else {
                REG_WR(bp, BNX2_RV2P_COMMAND, BNX2_RV2P_COMMAND_PROC2_RESET);
        }
+
+       return 0;
 }
 
 static int
-load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw)
+load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg,
+           const struct bnx2_mips_fw_file_entry *fw_entry)
 {
+       u32 addr, len, file_offset;
+       __be32 *data;
        u32 offset;
        u32 val;
-       int rc;
 
        /* Halt the CPU. */
        val = bnx2_reg_rd_ind(bp, cpu_reg->mode);
@@ -3444,64 +3563,52 @@ load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw)
        bnx2_reg_wr_ind(bp, cpu_reg->state, cpu_reg->state_value_clear);
 
        /* Load the Text area. */
-       offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base);
-       if (fw->gz_text) {
-               int j;
-
-               rc = zlib_inflate_blob(fw->text, FW_BUF_SIZE, fw->gz_text,
-                                      fw->gz_text_len);
-               if (rc < 0)
-                       return rc;
+       addr = be32_to_cpu(fw_entry->text.addr);
+       len = be32_to_cpu(fw_entry->text.len);
+       file_offset = be32_to_cpu(fw_entry->text.offset);
+       data = (__be32 *)(bp->mips_firmware->data + file_offset);
 
-               for (j = 0; j < (fw->text_len / 4); j++, offset += 4) {
-                       bnx2_reg_wr_ind(bp, offset, le32_to_cpu(fw->text[j]));
-               }
-       }
-
-       /* Load the Data area. */
-       offset = cpu_reg->spad_base + (fw->data_addr - cpu_reg->mips_view_base);
-       if (fw->data) {
+       offset = cpu_reg->spad_base + (addr - cpu_reg->mips_view_base);
+       if (len) {
                int j;
 
-               for (j = 0; j < (fw->data_len / 4); j++, offset += 4) {
-                       bnx2_reg_wr_ind(bp, offset, fw->data[j]);
-               }
+               for (j = 0; j < (len / 4); j++, offset += 4)
+                       bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j]));
        }
 
-       /* Load the SBSS area. */
-       offset = cpu_reg->spad_base + (fw->sbss_addr - cpu_reg->mips_view_base);
-       if (fw->sbss_len) {
-               int j;
-
-               for (j = 0; j < (fw->sbss_len / 4); j++, offset += 4) {
-                       bnx2_reg_wr_ind(bp, offset, 0);
-               }
-       }
+       /* Load the Data area. */
+       addr = be32_to_cpu(fw_entry->data.addr);
+       len = be32_to_cpu(fw_entry->data.len);
+       file_offset = be32_to_cpu(fw_entry->data.offset);
+       data = (__be32 *)(bp->mips_firmware->data + file_offset);
 
-       /* Load the BSS area. */
-       offset = cpu_reg->spad_base + (fw->bss_addr - cpu_reg->mips_view_base);
-       if (fw->bss_len) {
+       offset = cpu_reg->spad_base + (addr - cpu_reg->mips_view_base);
+       if (len) {
                int j;
 
-               for (j = 0; j < (fw->bss_len/4); j++, offset += 4) {
-                       bnx2_reg_wr_ind(bp, offset, 0);
-               }
+               for (j = 0; j < (len / 4); j++, offset += 4)
+                       bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j]));
        }
 
        /* Load the Read-Only area. */
-       offset = cpu_reg->spad_base +
-               (fw->rodata_addr - cpu_reg->mips_view_base);
-       if (fw->rodata) {
+       addr = be32_to_cpu(fw_entry->rodata.addr);
+       len = be32_to_cpu(fw_entry->rodata.len);
+       file_offset = be32_to_cpu(fw_entry->rodata.offset);
+       data = (__be32 *)(bp->mips_firmware->data + file_offset);
+
+       offset = cpu_reg->spad_base + (addr - cpu_reg->mips_view_base);
+       if (len) {
                int j;
 
-               for (j = 0; j < (fw->rodata_len / 4); j++, offset += 4) {
-                       bnx2_reg_wr_ind(bp, offset, fw->rodata[j]);
-               }
+               for (j = 0; j < (len / 4); j++, offset += 4)
+                       bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j]));
        }
 
        /* Clear the pre-fetch instruction. */
        bnx2_reg_wr_ind(bp, cpu_reg->inst, 0);
-       bnx2_reg_wr_ind(bp, cpu_reg->pc, fw->start_addr);
+
+       val = be32_to_cpu(fw_entry->start_addr);
+       bnx2_reg_wr_ind(bp, cpu_reg->pc, val);
 
        /* Start the CPU. */
        val = bnx2_reg_rd_ind(bp, cpu_reg->mode);
@@ -3515,95 +3622,40 @@ load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw)
 static int
 bnx2_init_cpus(struct bnx2 *bp)
 {
-       struct fw_info *fw;
-       int rc, rv2p_len;
-       void *text, *rv2p;
+       const struct bnx2_mips_fw_file *mips_fw =
+               (const struct bnx2_mips_fw_file *) bp->mips_firmware->data;
+       const struct bnx2_rv2p_fw_file *rv2p_fw =
+               (const struct bnx2_rv2p_fw_file *) bp->rv2p_firmware->data;
+       int rc;
 
        /* Initialize the RV2P processor. */
-       text = vmalloc(FW_BUF_SIZE);
-       if (!text)
-               return -ENOMEM;
-       if (CHIP_NUM(bp) == CHIP_NUM_5709) {
-               rv2p = bnx2_xi_rv2p_proc1;
-               rv2p_len = sizeof(bnx2_xi_rv2p_proc1);
-       } else {
-               rv2p = bnx2_rv2p_proc1;
-               rv2p_len = sizeof(bnx2_rv2p_proc1);
-       }
-       rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len);
-       if (rc < 0)
-               goto init_cpu_err;
-
-       load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC1);
-
-       if (CHIP_NUM(bp) == CHIP_NUM_5709) {
-               rv2p = bnx2_xi_rv2p_proc2;
-               rv2p_len = sizeof(bnx2_xi_rv2p_proc2);
-       } else {
-               rv2p = bnx2_rv2p_proc2;
-               rv2p_len = sizeof(bnx2_rv2p_proc2);
-       }
-       rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len);
-       if (rc < 0)
-               goto init_cpu_err;
-
-       load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC2);
+       load_rv2p_fw(bp, RV2P_PROC1, &rv2p_fw->proc1);
+       load_rv2p_fw(bp, RV2P_PROC2, &rv2p_fw->proc2);
 
        /* Initialize the RX Processor. */
-       if (CHIP_NUM(bp) == CHIP_NUM_5709)
-               fw = &bnx2_rxp_fw_09;
-       else
-               fw = &bnx2_rxp_fw_06;
-
-       fw->text = text;
-       rc = load_cpu_fw(bp, &cpu_reg_rxp, fw);
+       rc = load_cpu_fw(bp, &cpu_reg_rxp, &mips_fw->rxp);
        if (rc)
                goto init_cpu_err;
 
        /* Initialize the TX Processor. */
-       if (CHIP_NUM(bp) == CHIP_NUM_5709)
-               fw = &bnx2_txp_fw_09;
-       else
-               fw = &bnx2_txp_fw_06;
-
-       fw->text = text;
-       rc = load_cpu_fw(bp, &cpu_reg_txp, fw);
+       rc = load_cpu_fw(bp, &cpu_reg_txp, &mips_fw->txp);
        if (rc)
                goto init_cpu_err;
 
        /* Initialize the TX Patch-up Processor. */
-       if (CHIP_NUM(bp) == CHIP_NUM_5709)
-               fw = &bnx2_tpat_fw_09;
-       else
-               fw = &bnx2_tpat_fw_06;
-
-       fw->text = text;
-       rc = load_cpu_fw(bp, &cpu_reg_tpat, fw);
+       rc = load_cpu_fw(bp, &cpu_reg_tpat, &mips_fw->tpat);
        if (rc)
                goto init_cpu_err;
 
        /* Initialize the Completion Processor. */
-       if (CHIP_NUM(bp) == CHIP_NUM_5709)
-               fw = &bnx2_com_fw_09;
-       else
-               fw = &bnx2_com_fw_06;
-
-       fw->text = text;
-       rc = load_cpu_fw(bp, &cpu_reg_com, fw);
+       rc = load_cpu_fw(bp, &cpu_reg_com, &mips_fw->com);
        if (rc)
                goto init_cpu_err;
 
        /* Initialize the Command Processor. */
-       if (CHIP_NUM(bp) == CHIP_NUM_5709)
-               fw = &bnx2_cp_fw_09;
-       else
-               fw = &bnx2_cp_fw_06;
-
-       fw->text = text;
-       rc = load_cpu_fw(bp, &cpu_reg_cp, fw);
+       rc = load_cpu_fw(bp, &cpu_reg_cp, &mips_fw->cp);
 
 init_cpu_err:
-       vfree(text);
        return rc;
 }
 
@@ -7473,9 +7525,9 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
 
        /* 5708 cannot support DMA addresses > 40-bit.  */
        if (CHIP_NUM(bp) == CHIP_NUM_5708)
-               persist_dma_mask = dma_mask = DMA_40BIT_MASK;
+               persist_dma_mask = dma_mask = DMA_BIT_MASK(40);
        else
-               persist_dma_mask = dma_mask = DMA_64BIT_MASK;
+               persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
 
        /* Configure DMA attributes. */
        if (pci_set_dma_mask(pdev, dma_mask) == 0) {
@@ -7486,7 +7538,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
                                "pci_set_consistent_dma_mask failed, aborting.\n");
                        goto err_out_unmap;
                }
-       } else if ((rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) != 0) {
+       } else if ((rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
                dev_err(&pdev->dev, "System does not support DMA, aborting.\n");
                goto err_out_unmap;
        }
@@ -7807,6 +7859,10 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        pci_set_drvdata(pdev, dev);
 
+       rc = bnx2_request_firmware(bp);
+       if (rc)
+               goto error;
+
        memcpy(dev->dev_addr, bp->mac_addr, 6);
        memcpy(dev->perm_addr, bp->mac_addr, 6);
 
@@ -7823,13 +7879,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        if ((rc = register_netdev(dev))) {
                dev_err(&pdev->dev, "Cannot register net device\n");
-               if (bp->regview)
-                       iounmap(bp->regview);
-               pci_release_regions(pdev);
-               pci_disable_device(pdev);
-               pci_set_drvdata(pdev, NULL);
-               free_netdev(dev);
-               return rc;
+               goto error;
        }
 
        printk(KERN_INFO "%s: %s (%c%d) %s found at mem %lx, "
@@ -7843,6 +7893,20 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                bp->pdev->irq, dev->dev_addr);
 
        return 0;
+
+error:
+       if (bp->mips_firmware)
+               release_firmware(bp->mips_firmware);
+       if (bp->rv2p_firmware)
+               release_firmware(bp->rv2p_firmware);
+
+       if (bp->regview)
+               iounmap(bp->regview);
+       pci_release_regions(pdev);
+       pci_disable_device(pdev);
+       pci_set_drvdata(pdev, NULL);
+       free_netdev(dev);
+       return rc;
 }
 
 static void __devexit
@@ -7855,6 +7919,11 @@ bnx2_remove_one(struct pci_dev *pdev)
 
        unregister_netdev(dev);
 
+       if (bp->mips_firmware)
+               release_firmware(bp->mips_firmware);
+       if (bp->rv2p_firmware)
+               release_firmware(bp->rv2p_firmware);
+
        if (bp->regview)
                iounmap(bp->regview);
 
index 704cbbc..5b570e1 100644 (file)
@@ -6885,6 +6885,8 @@ struct bnx2 {
 
        u32                     idle_chk_status_idx;
 
+       const struct firmware   *mips_firmware;
+       const struct firmware   *rv2p_firmware;
 };
 
 #define REG_RD(bp, offset)                                     \
@@ -6915,44 +6917,41 @@ struct cpu_reg {
        u32 mips_view_base;
 };
 
-struct fw_info {
-       const u32 ver_major;
-       const u32 ver_minor;
-       const u32 ver_fix;
-
-       const u32 start_addr;
-
-       /* Text section. */
-       const u32 text_addr;
-       const u32 text_len;
-       const u32 text_index;
-       __le32 *text;
-       u8 *gz_text;
-       const u32 gz_text_len;
-
-       /* Data section. */
-       const u32 data_addr;
-       const u32 data_len;
-       const u32 data_index;
-       const u32 *data;
-
-       /* SBSS section. */
-       const u32 sbss_addr;
-       const u32 sbss_len;
-       const u32 sbss_index;
-
-       /* BSS section. */
-       const u32 bss_addr;
-       const u32 bss_len;
-       const u32 bss_index;
-
-       /* Read-only section. */
-       const u32 rodata_addr;
-       const u32 rodata_len;
-       const u32 rodata_index;
-       const u32 *rodata;
+struct bnx2_fw_file_section {
+       __be32 addr;
+       __be32 len;
+       __be32 offset;
 };
 
+struct bnx2_mips_fw_file_entry {
+       __be32 start_addr;
+       struct bnx2_fw_file_section text;
+       struct bnx2_fw_file_section data;
+       struct bnx2_fw_file_section rodata;
+};
+
+struct bnx2_rv2p_fw_file_entry {
+       struct bnx2_fw_file_section rv2p;
+       __be32 fixup[8];
+};
+
+struct bnx2_mips_fw_file {
+       struct bnx2_mips_fw_file_entry com;
+       struct bnx2_mips_fw_file_entry cp;
+       struct bnx2_mips_fw_file_entry rxp;
+       struct bnx2_mips_fw_file_entry tpat;
+       struct bnx2_mips_fw_file_entry txp;
+};
+
+struct bnx2_rv2p_fw_file {
+       struct bnx2_rv2p_fw_file_entry proc1;
+       struct bnx2_rv2p_fw_file_entry proc2;
+};
+
+#define RV2P_P1_FIXUP_PAGE_SIZE_IDX            0
+#define RV2P_BD_PAGE_SIZE_MSK                  0xffff
+#define RV2P_BD_PAGE_SIZE                      ((BCM_PAGE_SIZE / 16) - 1)
+
 #define RV2P_PROC1                              0
 #define RV2P_PROC2                              1
 
index 6a4f1d6..940eb91 100644 (file)
@@ -4,883 +4,9 @@
  *
  * 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, except as noted below.
- *
- * This file contains firmware data derived from proprietary unpublished
- * source code, Copyright (c) 2004, 2005, 2006, 2007 Broadcom Corporation.
- *
- * Permission is hereby granted for the distribution of this firmware data
- * in hexadecimal or equivalent format, provided this copyright notice is
- * accompanying it.
+ * the Free Software Foundation.
  */
 
-static u8 bnx2_COM_b06FwText[] = {
-       0xcd, 0x7c, 0x0d, 0x70, 0x5c, 0xd7, 0x75, 0xde, 0xd9, 0xb7, 0xbb, 0xc0,
-       0x12, 0x04, 0xc1, 0x07, 0x68, 0x05, 0xad, 0x24, 0x24, 0xde, 0x87, 0x7d,
-       0x00, 0x56, 0x22, 0xe4, 0x3c, 0x32, 0x10, 0x0d, 0xb9, 0x5b, 0x72, 0xbd,
-       0x0b, 0x50, 0x90, 0x43, 0x23, 0x90, 0x84, 0x28, 0x6a, 0x86, 0xe3, 0x41,
-       0x97, 0xa0, 0x62, 0x69, 0xdc, 0x86, 0x1e, 0x2b, 0x29, 0xe5, 0x2a, 0xe6,
-       0x6a, 0x01, 0xca, 0x94, 0x02, 0x72, 0x61, 0x12, 0x04, 0xd5, 0x54, 0x6d,
-       0xd7, 0x0b, 0x80, 0x54, 0xd4, 0x25, 0x97, 0x94, 0xfc, 0xa3, 0x99, 0xd8,
-       0x21, 0x4a, 0xd1, 0x92, 0xed, 0x71, 0xa7, 0x92, 0xc7, 0x9d, 0xaa, 0x33,
-       0x9a, 0x94, 0xa5, 0xe4, 0xda, 0xf1, 0x34, 0x8d, 0x6a, 0x7b, 0x1a, 0x25,
-       0xb1, 0xf3, 0xfa, 0x7d, 0xf7, 0xdd, 0x0b, 0x2c, 0x20, 0x48, 0x56, 0x92,
-       0xf1, 0x4c, 0x30, 0xb3, 0xbc, 0xef, 0xde, 0x77, 0x7f, 0xcf, 0x39, 0xf7,
-       0x9c, 0xef, 0x9c, 0x7b, 0x1f, 0x77, 0x89, 0xb4, 0x88, 0xfe, 0xdb, 0x82,
-       0xdf, 0xc0, 0xbf, 0xf8, 0x9d, 0xfd, 0xdb, 0x3f, 0xb8, 0xf3, 0x83, 0x78,
-       0xdc, 0x69, 0xd9, 0x4d, 0x11, 0x96, 0x87, 0xf1, 0x8b, 0xe3, 0xb7, 0x43,
-       0x3f, 0x6f, 0xf4, 0x67, 0xb3, 0x41, 0x48, 0x64, 0xe2, 0x87, 0x22, 0xa1,
-       0x75, 0xef, 0x62, 0xef, 0xd2, 0xe6, 0xbd, 0xfe, 0xac, 0xf7, 0x59, 0xcf,
-       0xfe, 0x7b, 0xf4, 0x6d, 0xfe, 0xc2, 0xba, 0xf9, 0x16, 0xfd, 0x93, 0x98,
-       0x95, 0xb9, 0xfa, 0xb1, 0x9c, 0x2b, 0xb1, 0x70, 0xe6, 0xbb, 0xa3, 0xfb,
-       0x5d, 0x91, 0x6c, 0x6d, 0x5b, 0x32, 0x2f, 0x3f, 0xf3, 0x8b, 0xf1, 0x88,
-       0xb0, 0xfc, 0x97, 0x32, 0x3f, 0x3d, 0xfc, 0xb5, 0x0f, 0x39, 0x6f, 0x55,
-       0xc2, 0x12, 0xb3, 0x33, 0x6f, 0x8b, 0xdd, 0x2b, 0xb1, 0x2e, 0xb4, 0x79,
-       0xba, 0xef, 0x59, 0x4b, 0xda, 0x4c, 0x5f, 0xf6, 0x44, 0x38, 0x23, 0x63,
-       0x93, 0x33, 0x87, 0x7d, 0xcb, 0x95, 0xe2, 0x4d, 0x19, 0x37, 0x59, 0x92,
-       0xd6, 0xc1, 0xe9, 0x81, 0x0f, 0x09, 0xf2, 0x63, 0x93, 0xb5, 0x98, 0xe4,
-       0xea, 0xc5, 0x56, 0xcb, 0x75, 0x91, 0xc6, 0x8a, 0x37, 0x67, 0x24, 0xd6,
-       0x94, 0x79, 0xba, 0xf9, 0x25, 0x97, 0xe3, 0x27, 0x46, 0x73, 0xee, 0xcd,
-       0x12, 0x71, 0x7d, 0x7f, 0x1a, 0xe3, 0xef, 0xa9, 0xfd, 0xcc, 0x7f, 0x2c,
-       0x12, 0x8c, 0x6d, 0x65, 0x8a, 0x61, 0xa6, 0xa1, 0x4c, 0x72, 0xb4, 0xbb,
-       0xa6, 0xf2, 0x4d, 0x41, 0xde, 0x35, 0xf9, 0x2d, 0x41, 0x7e, 0x42, 0xe7,
-       0xed, 0x96, 0x60, 0x2d, 0xb1, 0x4d, 0x58, 0x4b, 0x2c, 0x92, 0x19, 0xda,
-       0x84, 0x3e, 0x63, 0xd1, 0x8c, 0x9b, 0x59, 0x52, 0xf5, 0x3e, 0xa1, 0xeb,
-       0x1d, 0x8c, 0x06, 0xed, 0x26, 0x47, 0x7b, 0x6b, 0x4c, 0x1f, 0x1e, 0xed,
-       0x51, 0xe9, 0xa3, 0xa3, 0x29, 0x95, 0x16, 0x55, 0xbd, 0x50, 0x66, 0x7a,
-       0xd4, 0x55, 0x69, 0x97, 0x2e, 0x4f, 0x8f, 0x26, 0x55, 0xda, 0xaf, 0x53,
-       0x4f, 0xa7, 0x03, 0x3a, 0x1d, 0xd4, 0x69, 0x46, 0xa7, 0x59, 0x9d, 0x0e,
-       0xe9, 0x7e, 0x46, 0x74, 0x7e, 0xaf, 0x4e, 0xc7, 0x74, 0x3a, 0xae, 0xd3,
-       0xfb, 0x75, 0xba, 0x4f, 0xcf, 0xeb, 0x93, 0x3a, 0x7f, 0x50, 0xcf, 0xef,
-       0x10, 0xe6, 0xf1, 0x93, 0x26, 0x2d, 0xbf, 0x58, 0x67, 0x52, 0xf6, 0xcf,
-       0xc4, 0xa4, 0x54, 0x0e, 0x4b, 0x5e, 0xf1, 0xb5, 0x3f, 0x2a, 0x2d, 0x31,
-       0x99, 0xaa, 0xc7, 0xe4, 0xaa, 0x12, 0xdb, 0x1f, 0xf8, 0x5f, 0xeb, 0xb3,
-       0xe5, 0x42, 0x3d, 0x2e, 0x97, 0xea, 0x12, 0x1a, 0xeb, 0xdb, 0x24, 0xd6,
-       0x89, 0x9b, 0x24, 0x6b, 0x87, 0x24, 0xac, 0xe8, 0x9b, 0x94, 0xdc, 0x4c,
-       0x27, 0xf2, 0x4e, 0x42, 0x64, 0x32, 0x1a, 0xf0, 0x33, 0x26, 0xe1, 0x79,
-       0xf2, 0x67, 0x7e, 0xf4, 0xa5, 0xb9, 0x84, 0x44, 0x8e, 0x27, 0xd1, 0x7f,
-       0xab, 0x44, 0xe7, 0xa5, 0x2b, 0x2c, 0x3d, 0x89, 0x07, 0x50, 0x63, 0xa8,
-       0x16, 0x91, 0xe1, 0x5a, 0x08, 0x3c, 0x8b, 0x41, 0x5e, 0x5a, 0xf1, 0xb3,
-       0xf1, 0x8b, 0xe3, 0x97, 0xc0, 0xef, 0x09, 0xf4, 0xd3, 0x25, 0xf9, 0x1a,
-       0xfb, 0xc4, 0xb8, 0x65, 0x8c, 0x5f, 0x76, 0xec, 0x09, 0xe1, 0x9c, 0x12,
-       0xf2, 0xb5, 0xbe, 0x60, 0x4e, 0x97, 0xea, 0xb1, 0x50, 0xee, 0xb4, 0x1c,
-       0xcc, 0x7b, 0x92, 0xb4, 0xdc, 0x16, 0x29, 0xd8, 0xa1, 0xe4, 0x64, 0xba,
-       0x43, 0x8a, 0xe3, 0x78, 0x57, 0x96, 0xac, 0x85, 0xbe, 0x0b, 0xb6, 0x4c,
-       0x04, 0xef, 0x58, 0xf6, 0x37, 0xd8, 0xb7, 0x8e, 0x4d, 0x01, 0xbe, 0x54,
-       0xfe, 0x63, 0x3c, 0xb3, 0xaf, 0xff, 0x17, 0x0e, 0xe6, 0xfc, 0xd7, 0xc8,
-       0xb3, 0xfc, 0xcb, 0x5b, 0x83, 0x3c, 0x9f, 0x59, 0xd7, 0x8c, 0x69, 0xd6,
-       0xca, 0xb1, 0xfb, 0xb0, 0x5e, 0x8e, 0xbf, 0xb2, 0x5e, 0xcc, 0xa3, 0x35,
-       0x94, 0x3f, 0x9d, 0x94, 0x23, 0xe5, 0x5d, 0x92, 0xf3, 0x7c, 0x7f, 0xbf,
-       0x27, 0x71, 0x4b, 0x7a, 0xec, 0x3c, 0xde, 0x56, 0x6b, 0x12, 0xca, 0x95,
-       0x0d, 0x3d, 0xd8, 0x6f, 0x04, 0x65, 0x9d, 0xa8, 0xdf, 0x16, 0x1a, 0x3a,
-       0x8d, 0xb9, 0x67, 0x48, 0x17, 0xc8, 0xae, 0xd7, 0x93, 0x98, 0xc4, 0x78,
-       0x0b, 0xb5, 0x1e, 0xef, 0xb2, 0xd8, 0xe8, 0xb3, 0x03, 0x75, 0x48, 0x23,
-       0xf6, 0xc5, 0x3e, 0xd9, 0x5f, 0x2b, 0xda, 0xc6, 0xf1, 0x8e, 0x73, 0xf2,
-       0xfd, 0x9c, 0x67, 0x33, 0x2f, 0x15, 0xd0, 0xad, 0x42, 0xba, 0xb5, 0x74,
-       0xc9, 0x99, 0x1a, 0xc7, 0xd8, 0x68, 0xde, 0xb7, 0xfe, 0x23, 0x9b, 0x77,
-       0x02, 0xfd, 0xc7, 0x91, 0x6e, 0x0e, 0xe5, 0x4e, 0xfa, 0x18, 0x3f, 0x81,
-       0xe7, 0x8d, 0xd6, 0x70, 0x55, 0xcb, 0x60, 0x02, 0x73, 0x8f, 0xcb, 0x45,
-       0x25, 0x87, 0x9b, 0x25, 0x0c, 0x39, 0x24, 0x8f, 0xdb, 0xe7, 0x6f, 0x97,
-       0x42, 0xdc, 0x49, 0x52, 0x87, 0x76, 0xef, 0xd8, 0x84, 0x35, 0x6a, 0x6d,
-       0x78, 0x3c, 0x0e, 0x39, 0xbc, 0xdc, 0x6e, 0xa1, 0xc4, 0x12, 0xc7, 0xfe,
-       0x2d, 0x29, 0x4a, 0x7e, 0xf1, 0x91, 0x90, 0xb4, 0x58, 0xa8, 0xb7, 0x2d,
-       0x14, 0xd0, 0x80, 0xf4, 0xc9, 0x82, 0x3e, 0x21, 0x09, 0xf6, 0x73, 0x56,
-       0xba, 0x6b, 0xea, 0x7d, 0xd2, 0x52, 0xef, 0x86, 0xf0, 0x2e, 0x22, 0xa9,
-       0x1d, 0xe6, 0xfd, 0x10, 0xde, 0xdf, 0x24, 0x13, 0x36, 0xe6, 0x52, 0x7e,
-       0xc1, 0xca, 0x61, 0x8e, 0x1f, 0x89, 0xa8, 0xb5, 0xa2, 0xee, 0x44, 0x43,
-       0x3f, 0x13, 0xa8, 0xf7, 0x34, 0xc6, 0xc2, 0x7c, 0xcb, 0x49, 0xcc, 0xa5,
-       0x13, 0x73, 0xe1, 0x1c, 0x8b, 0x56, 0xae, 0x1e, 0x41, 0x7e, 0xda, 0xca,
-       0x9f, 0x3d, 0x8a, 0x67, 0xb1, 0xad, 0xcc, 0x0b, 0x4c, 0xd1, 0x7e, 0x5f,
-       0x43, 0xfb, 0x7d, 0x68, 0xcf, 0x31, 0xd8, 0x3e, 0x90, 0xff, 0xa2, 0x92,
-       0xc5, 0xe4, 0x7b, 0xd0, 0x23, 0xfc, 0xf7, 0xa0, 0xc7, 0xd7, 0x34, 0x3d,
-       0x7e, 0x26, 0xbf, 0x78, 0x7a, 0x5c, 0xfd, 0x05, 0xd1, 0x43, 0xa4, 0x70,
-       0x92, 0xcf, 0x11, 0x29, 0x2a, 0xbd, 0xc5, 0x7d, 0x4b, 0x79, 0xa7, 0xce,
-       0x22, 0x9d, 0x28, 0xc7, 0xd8, 0x03, 0xf5, 0x08, 0xd2, 0x67, 0x90, 0x6e,
-       0x0e, 0x8d, 0x9d, 0x7c, 0x13, 0xfc, 0xf7, 0xc5, 0xde, 0x61, 0xec, 0x47,
-       0x31, 0x61, 0x4b, 0x97, 0xd8, 0x1f, 0x84, 0xf1, 0xee, 0x74, 0xec, 0x82,
-       0x7c, 0x9f, 0xef, 0x43, 0xc6, 0xce, 0xe7, 0x66, 0x36, 0xbd, 0x9d, 0x55,
-       0x4f, 0x51, 0xd2, 0x33, 0x6b, 0x65, 0x22, 0xa1, 0x7c, 0x39, 0x39, 0x61,
-       0x65, 0xe2, 0xd0, 0x53, 0xcc, 0x0f, 0x86, 0x82, 0x39, 0x0f, 0xa0, 0xae,
-       0xd1, 0x59, 0x66, 0xee, 0x03, 0x98, 0xfb, 0x7a, 0xdd, 0x95, 0xc5, 0x5c,
-       0x38, 0x07, 0xce, 0xab, 0xa8, 0x75, 0x10, 0xfb, 0x39, 0xa4, 0xfa, 0x09,
-       0x67, 0x06, 0x85, 0xb6, 0xb4, 0x30, 0xc3, 0x7d, 0xc0, 0x76, 0xec, 0x2b,
-       0xd0, 0xc9, 0x85, 0x9a, 0xe9, 0xa3, 0xd8, 0xd8, 0x07, 0xe6, 0x23, 0x5b,
-       0x2d, 0x37, 0x0a, 0xde, 0xb3, 0xab, 0xa3, 0x78, 0xf7, 0xb4, 0xe4, 0xce,
-       0xde, 0x61, 0x61, 0x0d, 0xe8, 0x97, 0x34, 0x1a, 0x83, 0xce, 0xe6, 0x3e,
-       0x8b, 0x49, 0x3e, 0xce, 0xb2, 0x49, 0x3d, 0x6e, 0x44, 0xb2, 0x2a, 0x9f,
-       0x6b, 0x5b, 0x9d, 0xc7, 0x0b, 0x7a, 0x3d, 0x19, 0xac, 0x87, 0x73, 0x30,
-       0x6b, 0xc9, 0x34, 0xac, 0xc5, 0xd0, 0x9a, 0xb4, 0xb0, 0xa1, 0xe3, 0x63,
-       0xda, 0x86, 0xb0, 0xdd, 0x74, 0x03, 0xef, 0xa6, 0xd1, 0x86, 0xb4, 0x47,
-       0x9d, 0x75, 0x76, 0x85, 0x36, 0x65, 0x08, 0xfd, 0x94, 0xe6, 0x2c, 0xc9,
-       0x7b, 0xb0, 0xd9, 0xde, 0xcd, 0x5a, 0x5e, 0x57, 0x65, 0x29, 0xba, 0xa1,
-       0x2c, 0x3d, 0x66, 0x05, 0xfa, 0x1a, 0xb6, 0x05, 0xf6, 0x67, 0x6a, 0xce,
-       0x49, 0x1b, 0x59, 0x2a, 0xcd, 0xbc, 0x1f, 0x59, 0x32, 0xed, 0x63, 0x90,
-       0x5d, 0x33, 0xc6, 0xfa, 0x39, 0x9b, 0x3a, 0x98, 0x63, 0x79, 0x48, 0x63,
-       0x15, 0x8e, 0x13, 0xd8, 0x86, 0xca, 0x1a, 0xdb, 0x70, 0x14, 0x6d, 0x25,
-       0x94, 0xef, 0x6b, 0x95, 0x03, 0x73, 0xa6, 0x8f, 0xa3, 0x4a, 0x66, 0x27,
-       0x67, 0x1c, 0x7b, 0x38, 0x2c, 0xd9, 0xe1, 0xd9, 0x41, 0x19, 0xaa, 0x77,
-       0x81, 0xa7, 0x6f, 0xfb, 0xb0, 0x9d, 0x1f, 0x8c, 0x8a, 0x0b, 0xbd, 0x88,
-       0x35, 0x0f, 0x80, 0xc6, 0xf5, 0xa8, 0x58, 0x19, 0x0f, 0x69, 0x23, 0xd6,
-       0x8a, 0x44, 0x86, 0xd7, 0xe4, 0x9b, 0x50, 0x07, 0x7d, 0x0f, 0xac, 0xaf,
-       0x07, 0xf9, 0x04, 0x6d, 0x73, 0xde, 0xcf, 0x7c, 0xd8, 0x61, 0x6d, 0xb3,
-       0x58, 0x4a, 0x3d, 0x61, 0x74, 0xc4, 0x6f, 0x60, 0x7f, 0xab, 0xbd, 0x50,
-       0x04, 0x76, 0x41, 0x1f, 0xa2, 0xe4, 0xb4, 0x54, 0x7f, 0xce, 0xec, 0x7b,
-       0x55, 0xbe, 0x67, 0x80, 0xb2, 0x57, 0x01, 0x26, 0xe0, 0x9a, 0x16, 0xd5,
-       0x5e, 0xcf, 0xdb, 0x71, 0x99, 0x2e, 0x73, 0x3d, 0x8b, 0x92, 0xaa, 0xfd,
-       0x7b, 0xc9, 0x9f, 0x15, 0xf9, 0xd6, 0x0c, 0xeb, 0x7d, 0x55, 0xd7, 0x7b,
-       0x01, 0xf5, 0x52, 0xc9, 0xa1, 0x90, 0x03, 0x3b, 0xe0, 0x60, 0x9b, 0x6c,
-       0x4b, 0x22, 0xb5, 0x47, 0xf0, 0x1b, 0xa2, 0x91, 0x41, 0xbd, 0x00, 0xfb,
-       0xbc, 0x00, 0x7a, 0x88, 0xdc, 0x5d, 0x6e, 0x86, 0x3e, 0xf9, 0x9f, 0x98,
-       0x6b, 0x5c, 0x9e, 0xc4, 0x3a, 0x5e, 0x9a, 0x21, 0xbe, 0xfa, 0xaa, 0x2c,
-       0xcd, 0x10, 0x6f, 0xbd, 0x20, 0xd3, 0x33, 0x29, 0xef, 0x5b, 0xa0, 0xf3,
-       0x19, 0xe1, 0x5a, 0xb6, 0x79, 0x48, 0x81, 0x05, 0x9d, 0xe4, 0xe3, 0xd0,
-       0x67, 0x7d, 0x3b, 0x82, 0xfe, 0x7a, 0x74, 0x7f, 0x6e, 0xcd, 0x91, 0xab,
-       0x36, 0xf5, 0xd3, 0x3b, 0xf7, 0x78, 0x4e, 0xef, 0xf1, 0x31, 0xaf, 0x4b,
-       0x2c, 0xec, 0xeb, 0xec, 0x78, 0x11, 0xd6, 0x8f, 0xfb, 0xfa, 0x6d, 0x6b,
-       0x15, 0xff, 0x24, 0x80, 0x59, 0x1d, 0x65, 0xef, 0xfe, 0x6e, 0x7b, 0xbc,
-       0x71, 0x6f, 0x73, 0xfc, 0x36, 0xb4, 0x89, 0x20, 0x7d, 0xef, 0x7d, 0x8d,
-       0x3e, 0x1a, 0xda, 0x0e, 0x72, 0x5f, 0xa0, 0xcd, 0xbf, 0x05, 0x2d, 0x48,
-       0xff, 0xf7, 0xb3, 0x9f, 0x6f, 0x0b, 0xbf, 0xaf, 0xfd, 0x3c, 0xfe, 0x5e,
-       0xfb, 0xb9, 0x71, 0x2f, 0x5f, 0x20, 0x2d, 0x30, 0xb6, 0xcc, 0x06, 0xb2,
-       0xd5, 0x03, 0x5a, 0x27, 0x21, 0xa7, 0x98, 0x43, 0xf9, 0x6f, 0xfd, 0x6c,
-       0x24, 0xc0, 0x73, 0x81, 0x3c, 0xb1, 0x9e, 0xa9, 0x13, 0xe8, 0xde, 0xa1,
-       0xfa, 0x55, 0xa5, 0x67, 0x2f, 0x2a, 0x3d, 0xeb, 0x1c, 0x2d, 0x0a, 0xe5,
-       0xed, 0xf6, 0x30, 0xe9, 0x7e, 0xc1, 0xfb, 0x7d, 0xcc, 0xd1, 0x49, 0x26,
-       0xad, 0x9e, 0xa2, 0x65, 0xfd, 0xbe, 0x1c, 0x5c, 0x78, 0x58, 0x0e, 0x96,
-       0xd9, 0xc7, 0x2e, 0xbc, 0x77, 0x51, 0xb6, 0x09, 0xba, 0x96, 0x3a, 0xfd,
-       0xed, 0x50, 0x30, 0x96, 0x05, 0xfb, 0xb5, 0x1c, 0xba, 0xbb, 0x7e, 0x25,
-       0x94, 0x5b, 0xe0, 0xde, 0x45, 0x79, 0xbd, 0x51, 0xe7, 0x1b, 0x7d, 0xff,
-       0x0a, 0xc6, 0x34, 0x72, 0xee, 0x35, 0xe8, 0xd4, 0x69, 0xe2, 0x41, 0x2b,
-       0xe7, 0x91, 0x7f, 0xb4, 0x2d, 0x8f, 0xd8, 0xc1, 0xfa, 0x0f, 0x81, 0x66,
-       0xb4, 0x49, 0xa4, 0x21, 0xec, 0x61, 0x84, 0xfb, 0x97, 0xcf, 0xe2, 0x87,
-       0x33, 0xdc, 0x83, 0x12, 0x09, 0x67, 0x80, 0x7f, 0xe3, 0xac, 0xb3, 0x0b,
-       0x73, 0x0e, 0xf6, 0x77, 0x71, 0x65, 0x7f, 0x77, 0xcb, 0xc4, 0x42, 0x16,
-       0x3a, 0x20, 0xaf, 0xfa, 0x89, 0xba, 0x6b, 0x6c, 0x0b, 0xea, 0x27, 0x35,
-       0x1f, 0x36, 0x1b, 0xfd, 0x87, 0x32, 0x4f, 0x97, 0x35, 0x35, 0x94, 0x19,
-       0x7e, 0x15, 0x30, 0x16, 0x6d, 0xc4, 0x88, 0xc6, 0x3d, 0xbe, 0x9f, 0x27,
-       0x9f, 0xfb, 0xf7, 0x09, 0xf7, 0xc4, 0xa5, 0x72, 0xd1, 0x0e, 0x2b, 0xd9,
-       0x5c, 0xfc, 0xd8, 0xaa, 0x6c, 0x02, 0x27, 0xab, 0x5e, 0x48, 0x5b, 0xce,
-       0xa5, 0x15, 0xb4, 0x1c, 0xc2, 0x1a, 0x40, 0xb3, 0xce, 0x10, 0xe8, 0xd6,
-       0x2a, 0x85, 0xfa, 0x2e, 0xfd, 0x8e, 0xe5, 0x11, 0x19, 0x8b, 0x1b, 0x3b,
-       0xf4, 0xe7, 0x5b, 0x03, 0xac, 0x8b, 0x3a, 0xe5, 0xff, 0x1d, 0x0e, 0x64,
-       0xdf, 0x96, 0xc2, 0xe9, 0x21, 0xc8, 0x18, 0xb1, 0xd8, 0x26, 0x2d, 0x63,
-       0xec, 0x07, 0xe5, 0x67, 0x29, 0xc3, 0xa2, 0xf5, 0xe7, 0x20, 0xd2, 0x1f,
-       0x87, 0x69, 0xb7, 0xd9, 0x57, 0xe1, 0xb4, 0x69, 0x6f, 0xe6, 0xd1, 0xb1,
-       0xd2, 0xcf, 0x98, 0x67, 0x49, 0x58, 0xcd, 0x05, 0x65, 0x67, 0xd7, 0xce,
-       0xc5, 0xea, 0x34, 0x73, 0x79, 0x34, 0x1c, 0xcc, 0xa5, 0xa3, 0xa1, 0xaf,
-       0x78, 0xc3, 0x5c, 0x9a, 0x30, 0x97, 0xb8, 0xb2, 0x37, 0x9c, 0xcb, 0x05,
-       0xf0, 0xbe, 0x70, 0xf6, 0xc6, 0xeb, 0x82, 0x36, 0xf1, 0x86, 0x36, 0x9d,
-       0xeb, 0xda, 0xb0, 0xbe, 0x19, 0x03, 0xef, 0xce, 0x5e, 0xdd, 0x1c, 0xb4,
-       0x61, 0xbd, 0x26, 0xd8, 0x37, 0xbe, 0x53, 0x7e, 0x5b, 0x83, 0xfc, 0x1f,
-       0x84, 0xfc, 0x1b, 0xb9, 0x32, 0xb6, 0xd9, 0xf0, 0x75, 0x53, 0x28, 0x7f,
-       0xf2, 0x03, 0xf4, 0x3d, 0x43, 0x63, 0xe5, 0x25, 0xf8, 0x0f, 0x49, 0x29,
-       0xa4, 0xe1, 0x9b, 0xd8, 0x83, 0xa2, 0xfc, 0x89, 0x34, 0x7c, 0x16, 0x7b,
-       0xb3, 0xc2, 0x5b, 0x85, 0x74, 0xbf, 0xb6, 0x59, 0xdf, 0x97, 0x09, 0xc8,
-       0x70, 0x21, 0x9d, 0xc6, 0x78, 0xd0, 0xd5, 0x6e, 0x2f, 0xda, 0x71, 0xdc,
-       0xb7, 0x22, 0xb4, 0x23, 0x17, 0xca, 0x1f, 0x47, 0x7e, 0x33, 0xde, 0xff,
-       0xa9, 0x9e, 0x4f, 0x1b, 0xea, 0x7c, 0x5a, 0xf9, 0x26, 0x17, 0x54, 0x1d,
-       0xf6, 0x71, 0x19, 0xf9, 0x3b, 0x50, 0x07, 0x9b, 0x1c, 0x12, 0x68, 0xb9,
-       0x3b, 0xf1, 0xfb, 0x36, 0xca, 0x3e, 0x84, 0xb2, 0x2f, 0xa3, 0xec, 0x76,
-       0xe4, 0x5f, 0x5c, 0xd7, 0xef, 0x36, 0xe4, 0x1f, 0xc3, 0x7b, 0xac, 0xd3,
-       0xfe, 0x06, 0xde, 0xdf, 0x81, 0xdf, 0x97, 0xd7, 0xd5, 0xf9, 0x37, 0xeb,
-       0xf2, 0xc6, 0x2f, 0xf8, 0x63, 0x2d, 0x73, 0xc6, 0x27, 0x08, 0xf4, 0xe8,
-       0x54, 0xb9, 0x35, 0x34, 0x7c, 0x3a, 0x16, 0xda, 0x73, 0x9a, 0x78, 0x23,
-       0xa2, 0xfc, 0x80, 0x08, 0xfc, 0x80, 0xe9, 0x39, 0x3a, 0x88, 0x11, 0x94,
-       0x11, 0xbb, 0xcb, 0x40, 0x93, 0xf4, 0x78, 0x57, 0xb0, 0x4f, 0x0a, 0xb5,
-       0x2e, 0xe4, 0xb9, 0x7f, 0x20, 0x63, 0xb5, 0x16, 0xc8, 0x75, 0x4f, 0xba,
-       0x0a, 0x19, 0x3b, 0x00, 0xdf, 0x64, 0x02, 0x36, 0x70, 0xa2, 0xd6, 0x25,
-       0x0f, 0xd4, 0xae, 0x44, 0x02, 0x39, 0x32, 0x63, 0x3f, 0xbd, 0x6e, 0xec,
-       0x18, 0xfd, 0x0a, 0xc8, 0xfd, 0xfc, 0xe8, 0xfe, 0x39, 0x8e, 0x6f, 0x75,
-       0x47, 0xa4, 0x0d, 0x73, 0xa0, 0xff, 0x28, 0xbd, 0x11, 0xe9, 0x49, 0x4e,
-       0x29, 0x07, 0xb5, 0x28, 0xe1, 0x4c, 0x0f, 0xec, 0x83, 0xca, 0xc3, 0x5f,
-       0x84, 0xbe, 0xab, 0xad, 0xfa, 0x91, 0xc3, 0x2b, 0x7e, 0x64, 0x17, 0xfc,
-       0xcc, 0x17, 0x23, 0xc1, 0xde, 0x6f, 0x85, 0x6e, 0xb8, 0x9e, 0x38, 0x47,
-       0xe9, 0x77, 0xee, 0xf1, 0x9c, 0xd7, 0xae, 0xf3, 0x94, 0x65, 0xe8, 0x0b,
-       0x2b, 0xaa, 0xf4, 0x95, 0x58, 0x78, 0x37, 0x40, 0xf9, 0x45, 0x7e, 0xa1,
-       0x71, 0x7f, 0xff, 0x0e, 0xf6, 0x32, 0xdf, 0x1b, 0x39, 0xc3, 0x3f, 0x4a,
-       0xc6, 0x18, 0xbf, 0xf8, 0x8b, 0x75, 0x6b, 0x3b, 0xb0, 0x6e, 0x6d, 0x91,
-       0x15, 0xba, 0x72, 0x8d, 0x51, 0xac, 0x71, 0x69, 0x8e, 0xb4, 0xed, 0x87,
-       0x7c, 0x8a, 0x1b, 0x11, 0xca, 0x31, 0xf5, 0x6a, 0x1b, 0x74, 0x35, 0x69,
-       0x17, 0x11, 0xc6, 0x3c, 0x26, 0xb0, 0xa6, 0x09, 0xac, 0x69, 0xa2, 0x81,
-       0x8e, 0x07, 0x56, 0xd6, 0x64, 0xe6, 0x8d, 0x7a, 0x6a, 0xbf, 0xf1, 0x99,
-       0x3f, 0xe8, 0xa9, 0x36, 0x83, 0x69, 0x38, 0x97, 0xdc, 0xba, 0xb9, 0x90,
-       0x16, 0x9c, 0xcb, 0xca, 0x3c, 0xe2, 0x8c, 0x1c, 0x1d, 0xac, 0x91, 0xaf,
-       0x1c, 0x73, 0xaf, 0x4c, 0x96, 0x3f, 0xa0, 0xe7, 0xd1, 0x8a, 0x79, 0x8c,
-       0x41, 0x6f, 0x70, 0x3c, 0xec, 0xff, 0xda, 0x38, 0x9e, 0xe3, 0xe4, 0xbf,
-       0x9e, 0x8b, 0xa1, 0x05, 0xfd, 0xb6, 0x84, 0xc6, 0xe2, 0x86, 0x5e, 0xae,
-       0xc2, 0x0e, 0x97, 0xca, 0xff, 0x6d, 0x6b, 0x30, 0xb7, 0xa4, 0x9e, 0x47,
-       0x40, 0x63, 0x60, 0x78, 0x60, 0xa9, 0xbc, 0xd6, 0x07, 0x8d, 0x74, 0xbd,
-       0xbb, 0x49, 0xeb, 0x2b, 0xc8, 0x40, 0x63, 0xf9, 0xa7, 0x9a, 0x56, 0xeb,
-       0x32, 0x3f, 0xaf, 0xf3, 0x5b, 0x42, 0xc3, 0x27, 0x4d, 0xd9, 0xd5, 0xa6,
-       0x77, 0xf6, 0xf7, 0xd5, 0x26, 0xa3, 0x3f, 0x2e, 0x95, 0x1b, 0xf7, 0xfb,
-       0x21, 0x2b, 0xb0, 0x3b, 0x45, 0x29, 0x0d, 0x64, 0xa1, 0xe7, 0x68, 0x7f,
-       0x86, 0xac, 0xc0, 0xf6, 0xb0, 0xce, 0x21, 0x85, 0x1d, 0x23, 0x99, 0x2a,
-       0xe5, 0x1e, 0xb4, 0xac, 0x8d, 0xe6, 0x66, 0x7c, 0x7f, 0xca, 0x5b, 0x4e,
-       0x84, 0x85, 0x7a, 0x99, 0xb8, 0x8d, 0xe5, 0xcf, 0xa0, 0x1c, 0x76, 0xbd,
-       0x3e, 0x26, 0x6c, 0xb7, 0x31, 0x3e, 0x4b, 0x6a, 0x7c, 0x16, 0x00, 0xbb,
-       0x9c, 0xc2, 0x53, 0x4f, 0x8d, 0xc2, 0xfe, 0xeb, 0xe7, 0xa7, 0xf1, 0x9c,
-       0x6c, 0xc4, 0x80, 0xe8, 0xb7, 0x32, 0x9a, 0x9b, 0x53, 0x76, 0x00, 0xfb,
-       0x81, 0xbc, 0x3a, 0x03, 0x5e, 0x85, 0x64, 0x5a, 0xd9, 0x04, 0xce, 0x83,
-       0xed, 0x2a, 0xa3, 0xdd, 0x8b, 0x4c, 0xab, 0xa3, 0xee, 0x62, 0x58, 0x0e,
-       0xc4, 0x83, 0xb6, 0xcc, 0x27, 0x17, 0x8d, 0xdd, 0x6e, 0x91, 0x68, 0x86,
-       0xba, 0xcd, 0x49, 0x03, 0x87, 0x62, 0x3d, 0x47, 0x47, 0xa7, 0x5d, 0xda,
-       0xcb, 0xff, 0x03, 0x79, 0x68, 0x91, 0x26, 0x25, 0x27, 0x4f, 0xea, 0xb1,
-       0xce, 0x60, 0xac, 0xad, 0x98, 0x6b, 0x18, 0x3a, 0x32, 0x92, 0xc0, 0x38,
-       0x87, 0x2d, 0x77, 0x1b, 0xc6, 0xa3, 0xd7, 0xd8, 0x25, 0x53, 0x75, 0xca,
-       0xfa, 0xdf, 0x44, 0x56, 0x7d, 0xc5, 0x13, 0x68, 0x67, 0x7c, 0x14, 0x8e,
-       0x57, 0x05, 0x46, 0x69, 0xc1, 0x3a, 0x1c, 0x3b, 0x17, 0x86, 0xed, 0x9b,
-       0x33, 0x75, 0x38, 0xa7, 0xe3, 0xa3, 0xa9, 0xc5, 0x14, 0xfa, 0xea, 0xa2,
-       0xec, 0x41, 0xe6, 0xc2, 0xf8, 0xb1, 0x6f, 0xb6, 0x83, 0x4e, 0x1e, 0x34,
-       0x76, 0x7c, 0xb5, 0xbd, 0x69, 0xd7, 0xbd, 0x38, 0xa2, 0x65, 0xf7, 0xaf,
-       0xfc, 0xec, 0x38, 0xdf, 0x37, 0xc6, 0x07, 0x4c, 0x3b, 0x53, 0x27, 0xac,
-       0xf5, 0xf1, 0x7d, 0xd1, 0xd5, 0x79, 0x3e, 0x35, 0x1a, 0xf8, 0x31, 0x12,
-       0xc9, 0xf7, 0x0d, 0x6a, 0xbe, 0x3d, 0x8d, 0x32, 0xb6, 0xc7, 0x5e, 0xa8,
-       0x37, 0x62, 0xf0, 0xa0, 0xdf, 0x22, 0xb0, 0x47, 0xa9, 0xdc, 0x04, 0x5d,
-       0x93, 0x6d, 0x0f, 0x62, 0x22, 0xef, 0x85, 0xbb, 0xc1, 0x53, 0xf4, 0x53,
-       0x5a, 0x69, 0xab, 0xe2, 0x93, 0xa3, 0x2f, 0xa1, 0xff, 0x23, 0xe5, 0x60,
-       0xaf, 0x05, 0x74, 0x20, 0x5e, 0x0a, 0xc9, 0x92, 0x9b, 0x84, 0x7f, 0x47,
-       0x3b, 0x94, 0x94, 0x97, 0x5d, 0x83, 0x9f, 0x88, 0x9d, 0x50, 0xbf, 0xce,
-       0xf9, 0x70, 0xdd, 0x27, 0xb0, 0x6e, 0x5f, 0x66, 0xbd, 0x40, 0x3e, 0xfa,
-       0xb0, 0x37, 0xff, 0x53, 0xc4, 0x39, 0x4a, 0x3f, 0xe0, 0x6a, 0xa4, 0x71,
-       0x5d, 0xc6, 0x9e, 0x3d, 0xa5, 0x63, 0x93, 0x27, 0x34, 0x2f, 0x2b, 0xe0,
-       0xe5, 0xb6, 0xa4, 0x2d, 0xbd, 0x98, 0x3b, 0xea, 0xf4, 0xf7, 0x00, 0x8f,
-       0xd3, 0xd7, 0x4b, 0x60, 0x3e, 0x36, 0x64, 0x7d, 0xab, 0xb6, 0xfb, 0x9f,
-       0x89, 0x52, 0x5f, 0xb4, 0xab, 0xb8, 0xe7, 0x09, 0x25, 0x6b, 0x81, 0xec,
-       0x85, 0xf5, 0x7b, 0xc3, 0xef, 0x30, 0xcd, 0xae, 0xac, 0xc6, 0xf9, 0x8c,
-       0xae, 0x66, 0xfd, 0x39, 0xd4, 0x0f, 0x61, 0x4d, 0xbe, 0x3f, 0xa9, 0xe6,
-       0x3b, 0x0f, 0x5e, 0x87, 0xa5, 0xb4, 0x22, 0x8f, 0xf3, 0x90, 0xc7, 0x26,
-       0x91, 0x8e, 0x46, 0xb9, 0xa1, 0xac, 0xbc, 0x1e, 0x65, 0x4c, 0x2e, 0x69,
-       0x19, 0xde, 0x45, 0x88, 0xdd, 0x90, 0x37, 0xbc, 0xe3, 0xf3, 0x46, 0x18,
-       0x90, 0x71, 0x27, 0xdf, 0x5f, 0xf2, 0x18, 0x23, 0x6c, 0x96, 0xa2, 0x1d,
-       0xe0, 0x97, 0x92, 0x47, 0x39, 0xcd, 0x25, 0x23, 0xe2, 0x24, 0x0e, 0xc8,
-       0x9b, 0xe8, 0x3b, 0x9b, 0x8e, 0x4a, 0xe0, 0xa7, 0x4e, 0x80, 0x6e, 0xcb,
-       0xb6, 0xef, 0xbf, 0x04, 0xbf, 0xba, 0x0a, 0xbf, 0x66, 0x09, 0x69, 0xa9,
-       0x86, 0x3d, 0xd0, 0x12, 0xc1, 0x9e, 0x32, 0x7b, 0x25, 0x26, 0x15, 0xd4,
-       0x59, 0xc0, 0xbb, 0xc7, 0x6b, 0x86, 0xcb, 0xbe, 0x6f, 0x61, 0x5d, 0xfb,
-       0xdd, 0xbf, 0xf6, 0x0b, 0xf1, 0xc6, 0xba, 0x06, 0x77, 0x11, 0x33, 0x11,
-       0xf3, 0x10, 0xab, 0xf0, 0x1d, 0xf1, 0xc7, 0x61, 0xcc, 0x85, 0x32, 0xdc,
-       0x26, 0xb1, 0x8c, 0x93, 0x18, 0x11, 0xa3, 0x8b, 0x5f, 0x03, 0xff, 0x8b,
-       0x7e, 0xb3, 0xdb, 0x25, 0xcf, 0x83, 0xd7, 0xcf, 0xd5, 0x0d, 0xef, 0x93,
-       0xe0, 0xbd, 0x53, 0x2c, 0x8a, 0x2f, 0x17, 0x3d, 0x37, 0xf9, 0x39, 0xa4,
-       0xdf, 0xf1, 0x7e, 0x85, 0xb4, 0x78, 0x0a, 0x26, 0x0f, 0x38, 0x1b, 0x7a,
-       0x75, 0xd6, 0xe0, 0xc7, 0x36, 0xe2, 0x7d, 0x4d, 0xc7, 0xab, 0xe8, 0xd3,
-       0xb1, 0x2d, 0x80, 0xa5, 0x3b, 0x51, 0x2f, 0x90, 0x6b, 0x53, 0x76, 0x18,
-       0x75, 0x39, 0x07, 0xfa, 0x62, 0xdf, 0xc5, 0x5e, 0xf2, 0xfd, 0x7b, 0xbd,
-       0xc9, 0x86, 0x3d, 0x31, 0x0f, 0x1e, 0x28, 0xd9, 0x1c, 0x68, 0x17, 0xc6,
-       0xee, 0xa4, 0xbf, 0x43, 0xf9, 0x0a, 0x7c, 0x86, 0x8c, 0x0e, 0xd0, 0x26,
-       0x24, 0x55, 0xdc, 0x8f, 0xb6, 0xe7, 0x39, 0xd0, 0xfe, 0xd3, 0x35, 0xf2,
-       0xa1, 0x55, 0xe9, 0xfe, 0xe7, 0xcb, 0xb4, 0xef, 0x01, 0x46, 0x9b, 0x50,
-       0xb1, 0x5c, 0xda, 0x84, 0x34, 0x78, 0x13, 0xc4, 0xf0, 0x1e, 0x50, 0x6d,
-       0x59, 0x8f, 0x6d, 0x1b, 0xf9, 0xc7, 0x3a, 0x5b, 0x81, 0xaf, 0x28, 0x83,
-       0x6d, 0xc0, 0x25, 0xed, 0x72, 0x20, 0xdd, 0x0c, 0xba, 0x77, 0x28, 0x3c,
-       0x65, 0xb9, 0x1f, 0x86, 0xed, 0x02, 0xa6, 0xb3, 0x1d, 0x6f, 0xd5, 0xf7,
-       0xb8, 0x1d, 0x65, 0x3f, 0x05, 0xfd, 0x59, 0xb6, 0x49, 0xc7, 0xaf, 0x1f,
-       0xc6, 0xfe, 0xab, 0x6c, 0x0d, 0xe2, 0x22, 0xe4, 0x83, 0xd1, 0x03, 0xc6,
-       0xfe, 0xd9, 0x1a, 0x47, 0x92, 0x37, 0x41, 0x0c, 0xc5, 0x52, 0x75, 0x89,
-       0xe7, 0x1b, 0xfd, 0x16, 0xee, 0x3b, 0xdf, 0xbf, 0xe8, 0x29, 0x7b, 0x0a,
-       0x1e, 0xec, 0x86, 0x0d, 0x8b, 0x68, 0x5a, 0xb7, 0x82, 0xd6, 0x81, 0x8d,
-       0x4d, 0x76, 0x40, 0xef, 0xb8, 0x56, 0x53, 0x40, 0x3f, 0x62, 0x85, 0xbf,
-       0x85, 0x1f, 0x4f, 0xff, 0x81, 0x38, 0x81, 0x73, 0x47, 0xbb, 0x05, 0xd6,
-       0xa5, 0x2d, 0x7e, 0x0c, 0x63, 0x84, 0x25, 0xd9, 0xc9, 0xfc, 0x03, 0xba,
-       0x0d, 0x9f, 0x7d, 0xe9, 0xdd, 0xd1, 0x28, 0xcf, 0x83, 0x98, 0x27, 0xd7,
-       0x63, 0xe2, 0x7a, 0x5d, 0x4a, 0x07, 0xac, 0xca, 0x85, 0x99, 0x93, 0x19,
-       0x97, 0x73, 0x4b, 0x48, 0x07, 0xe6, 0x76, 0x37, 0x74, 0xf4, 0x8e, 0x0e,
-       0xf6, 0x69, 0xc6, 0x6e, 0x9c, 0x93, 0xc1, 0x2f, 0x81, 0xdd, 0x8d, 0xba,
-       0xcd, 0xb2, 0xa3, 0x93, 0xb4, 0xeb, 0x52, 0xba, 0x7a, 0x95, 0x1f, 0xb4,
-       0xbf, 0x1c, 0x7b, 0x7d, 0xf9, 0x1d, 0x0d, 0xf3, 0x6a, 0x3c, 0x03, 0x20,
-       0x76, 0xd8, 0x89, 0x77, 0x9c, 0x13, 0x9c, 0xe4, 0xb8, 0x2f, 0x7b, 0x14,
-       0xdd, 0x38, 0xb7, 0xc6, 0x79, 0x10, 0x43, 0x71, 0xce, 0x9c, 0xc3, 0x7a,
-       0x6c, 0xc2, 0xf9, 0xfc, 0x57, 0xcd, 0xc3, 0x4d, 0x7a, 0x5d, 0x06, 0xcb,
-       0xa4, 0xd0, 0xf6, 0x3f, 0x60, 0x0d, 0x7c, 0xe6, 0x3a, 0x8c, 0xcd, 0x4e,
-       0x05, 0xfd, 0xb4, 0x98, 0x78, 0xb0, 0x89, 0x6b, 0x70, 0x5e, 0xdc, 0x33,
-       0x86, 0x4e, 0x1d, 0x9a, 0x47, 0xbb, 0xd7, 0x8d, 0xeb, 0x78, 0x6b, 0xf5,
-       0xc8, 0xed, 0x0d, 0xeb, 0xeb, 0x97, 0xe2, 0x02, 0xe5, 0xe2, 0x36, 0xa4,
-       0x06, 0x13, 0x0c, 0x40, 0xf7, 0xbf, 0x2b, 0x26, 0xe0, 0x59, 0xd5, 0x78,
-       0x01, 0x3e, 0x99, 0xd2, 0xfd, 0x6a, 0x2f, 0xc6, 0x90, 0x87, 0x3e, 0xa9,
-       0xdf, 0x43, 0x19, 0x1b, 0x9f, 0xa8, 0x79, 0xe3, 0x93, 0xb5, 0x81, 0x71,
-       0xe2, 0xa9, 0x40, 0xe6, 0x50, 0xbf, 0x26, 0x13, 0xf0, 0xb3, 0xc7, 0x73,
-       0xaa, 0x9d, 0x8a, 0x31, 0x6c, 0xd0, 0x8f, 0x70, 0x3f, 0x4e, 0x04, 0x63,
-       0xc5, 0xc6, 0xf3, 0xd0, 0x41, 0x0b, 0xb3, 0xb0, 0x4b, 0xae, 0x93, 0xa5,
-       0x5c, 0xee, 0xf7, 0x9c, 0x11, 0x25, 0x7b, 0x71, 0x67, 0x8c, 0xbc, 0xac,
-       0xce, 0xfe, 0xb2, 0x2c, 0xcc, 0xf9, 0x72, 0x17, 0x74, 0xe1, 0x43, 0x90,
-       0x55, 0x39, 0x07, 0x45, 0x78, 0x0e, 0xca, 0xeb, 0x5c, 0x5c, 0xac, 0x53,
-       0x5d, 0x12, 0x3d, 0x96, 0x90, 0xc8, 0x31, 0x62, 0xcb, 0x94, 0x7d, 0x97,
-       0x08, 0xec, 0xd8, 0x8b, 0x1f, 0xb2, 0xc4, 0x19, 0xcc, 0x4a, 0x2a, 0xf9,
-       0x38, 0x6c, 0x6f, 0x15, 0x69, 0x49, 0x52, 0xe9, 0xb3, 0xe8, 0x2b, 0x7a,
-       0x0e, 0x75, 0xd1, 0x6e, 0xd3, 0x52, 0x12, 0xbf, 0x4e, 0x69, 0x59, 0x0a,
-       0xf6, 0x4a, 0xcb, 0xd2, 0x5a, 0xff, 0x7c, 0x68, 0xc5, 0x3f, 0xe7, 0xfb,
-       0xb7, 0x75, 0x5c, 0xe1, 0x8b, 0xfa, 0x8c, 0x81, 0x32, 0x42, 0x7b, 0xa4,
-       0x7c, 0x63, 0xe8, 0xfd, 0x2f, 0xc2, 0xc7, 0x02, 0x0e, 0x2c, 0xc3, 0x97,
-       0xca, 0xf8, 0xf2, 0xac, 0x57, 0xf4, 0x73, 0x03, 0xbe, 0xbc, 0xe6, 0xb9,
-       0xc5, 0x82, 0x38, 0x6f, 0x53, 0xdf, 0xfd, 0x85, 0xf7, 0x4f, 0xe4, 0xfe,
-       0x76, 0xe7, 0xfe, 0x6c, 0xa8, 0xe8, 0xb7, 0xc2, 0xb7, 0xba, 0x31, 0x73,
-       0x58, 0xf6, 0x6f, 0x5f, 0x86, 0x0f, 0x9c, 0xbd, 0x11, 0x38, 0x2b, 0x51,
-       0x50, 0xba, 0xea, 0x75, 0xe5, 0xb7, 0x7d, 0xa2, 0xe7, 0xb0, 0x6c, 0xd9,
-       0xee, 0xd8, 0xd7, 0xc2, 0xc4, 0x40, 0x87, 0x25, 0x0f, 0xfd, 0x9f, 0x0f,
-       0xbb, 0xf6, 0x5e, 0x71, 0x46, 0x1e, 0x11, 0x9e, 0x0d, 0xba, 0xd2, 0x7d,
-       0xcc, 0x4d, 0x7c, 0x32, 0xd4, 0x7b, 0xf0, 0x93, 0xc0, 0xae, 0xdd, 0xe7,
-       0x98, 0xf7, 0x25, 0xb6, 0xdd, 0xc6, 0x73, 0x5c, 0xba, 0x4f, 0x25, 0x25,
-       0x05, 0xba, 0xf4, 0x29, 0x9a, 0xf0, 0x6c, 0x22, 0x21, 0xbd, 0xc7, 0x88,
-       0x49, 0x14, 0x6d, 0xfa, 0x40, 0x9b, 0x34, 0x68, 0x03, 0x9f, 0x66, 0x9b,
-       0x7d, 0x0d, 0xe9, 0x65, 0x49, 0x0d, 0x7e, 0x0f, 0xb4, 0xe9, 0x03, 0x6d,
-       0x7a, 0xcf, 0x25, 0xd1, 0x1e, 0x7d, 0x2c, 0x75, 0x23, 0x6d, 0x91, 0x5f,
-       0xbb, 0xbe, 0x13, 0xcf, 0xae, 0xa4, 0x8e, 0xc5, 0x30, 0x46, 0x48, 0xf6,
-       0xf4, 0x14, 0x65, 0x78, 0x3b, 0x30, 0x74, 0xfc, 0xb0, 0x5c, 0x81, 0x1d,
-       0x2a, 0xc3, 0x7f, 0x7b, 0x76, 0xd0, 0x19, 0x5b, 0x86, 0x2e, 0xad, 0xdf,
-       0xed, 0xcb, 0x37, 0xb6, 0x7f, 0xd3, 0x4f, 0x5c, 0xef, 0xdc, 0x2f, 0xa1,
-       0x01, 0x99, 0x2e, 0x2b, 0xfb, 0x90, 0xc8, 0x85, 0x15, 0xd6, 0xc1, 0x1a,
-       0x8b, 0xb0, 0x31, 0x3c, 0xf3, 0x74, 0xa1, 0xeb, 0x1f, 0x91, 0x87, 0x2a,
-       0x53, 0xf8, 0x01, 0x77, 0xcf, 0xb0, 0xee, 0x41, 0xe0, 0xed, 0x87, 0xe5,
-       0xc0, 0x0c, 0xb0, 0x58, 0x06, 0xf3, 0x1e, 0x70, 0x81, 0xcb, 0x33, 0xcd,
-       0xd2, 0x86, 0x32, 0xd0, 0x76, 0xac, 0xbe, 0x1e, 0xd7, 0x2e, 0x83, 0x0f,
-       0x83, 0xf2, 0x27, 0xf5, 0x01, 0xf9, 0x4a, 0xbd, 0x5f, 0xbe, 0x04, 0xdb,
-       0xf2, 0x5c, 0xbd, 0x0b, 0x7b, 0x25, 0x01, 0x9e, 0x64, 0xc0, 0x1f, 0x4f,
-       0xbe, 0x5c, 0x4f, 0xcb, 0x17, 0x41, 0xab, 0xe7, 0xf1, 0x1b, 0x2e, 0xa7,
-       0x65, 0x4f, 0xb9, 0x5f, 0xf3, 0x88, 0xfc, 0x71, 0x31, 0x1f, 0x17, 0x6b,
-       0x77, 0x9e, 0x29, 0x62, 0xff, 0x2d, 0xd4, 0xdd, 0xb7, 0xaa, 0x34, 0xb2,
-       0x6d, 0xb6, 0x9c, 0x59, 0xb1, 0x2f, 0x45, 0xdf, 0x76, 0x9d, 0xa3, 0x13,
-       0xe0, 0x43, 0x15, 0xfb, 0x74, 0x4c, 0xd1, 0x7e, 0xd5, 0xf6, 0x54, 0x03,
-       0xdb, 0x63, 0xd6, 0x37, 0x5b, 0x90, 0xef, 0x48, 0xee, 0xc4, 0xb4, 0xec,
-       0x3f, 0xe9, 0xcb, 0x6f, 0x7a, 0x3e, 0xe4, 0x98, 0xba, 0x78, 0x80, 0x3a,
-       0x3e, 0x39, 0x11, 0xb6, 0x94, 0x9f, 0x1b, 0x60, 0x8d, 0xef, 0x75, 0x60,
-       0xcf, 0xa6, 0xb3, 0xd6, 0x94, 0xa4, 0x4e, 0x4c, 0x49, 0xf7, 0x09, 0xc8,
-       0x82, 0xc7, 0xbe, 0x96, 0x6d, 0xeb, 0x1d, 0xf2, 0xc0, 0x71, 0x9c, 0xc1,
-       0xbc, 0xb8, 0xf6, 0x5b, 0x92, 0xc6, 0xf8, 0x87, 0xa4, 0x07, 0x6d, 0x5c,
-       0xb4, 0xb9, 0xa6, 0xc6, 0x6e, 0xc5, 0xd8, 0xcd, 0x72, 0x24, 0xee, 0x40,
-       0xd6, 0x68, 0xc3, 0xff, 0xaf, 0xe4, 0xaa, 0x4c, 0x7f, 0x24, 0xb9, 0x33,
-       0x6f, 0x37, 0x4b, 0x0b, 0x9f, 0xa1, 0x1a, 0xe6, 0x59, 0xde, 0x8d, 0x94,
-       0xe5, 0xae, 0x58, 0xc7, 0x7f, 0x22, 0xb9, 0xf3, 0x1c, 0xfb, 0x2d, 0x94,
-       0x7f, 0x43, 0x72, 0xc7, 0x7f, 0x8a, 0xfc, 0x15, 0xa4, 0x6f, 0x23, 0x1d,
-       0x93, 0xee, 0xe3, 0xf0, 0x91, 0xcf, 0x7f, 0x1b, 0x79, 0xf8, 0x74, 0xe7,
-       0x8f, 0xa0, 0xde, 0x6e, 0xcc, 0xef, 0xde, 0x18, 0xb0, 0x06, 0x74, 0x5e,
-       0xec, 0xba, 0x60, 0xfe, 0x2c, 0x67, 0x19, 0xdf, 0x1d, 0x81, 0x4e, 0xfb,
-       0x1f, 0xd0, 0x69, 0xfa, 0x79, 0x81, 0x79, 0xea, 0x36, 0x3e, 0x4f, 0x81,
-       0x26, 0x87, 0x90, 0xf7, 0xe5, 0x61, 0x8f, 0xf6, 0x66, 0xa7, 0x8c, 0xdb,
-       0x45, 0xbf, 0x05, 0xb8, 0xa2, 0x15, 0xfb, 0x60, 0x6a, 0xc7, 0xc6, 0xfb,
-       0xe0, 0x68, 0xef, 0x61, 0xd9, 0xb4, 0xdd, 0xac, 0xdf, 0xac, 0xd7, 0xb5,
-       0x7f, 0xa8, 0xe8, 0xe0, 0x14, 0x3f, 0x29, 0x5c, 0x87, 0x9b, 0x78, 0xd2,
-       0xea, 0xbd, 0xff, 0x21, 0xec, 0x03, 0xeb, 0x3c, 0xf3, 0xc1, 0x3e, 0xb0,
-       0xce, 0x43, 0x37, 0xcc, 0xc3, 0x47, 0x9b, 0xef, 0x92, 0xe6, 0xe3, 0xab,
-       0xfb, 0xa0, 0xe9, 0xf8, 0xcf, 0xdf, 0x07, 0xcd, 0xe7, 0x51, 0xef, 0x3c,
-       0x69, 0x86, 0x3e, 0xce, 0x90, 0x66, 0x9d, 0x48, 0x1f, 0xc1, 0x5a, 0x39,
-       0xf7, 0x66, 0xcc, 0x3d, 0xc0, 0x45, 0x1f, 0x82, 0xbc, 0x7f, 0x62, 0xfb,
-       0x21, 0x5d, 0xfe, 0x9f, 0xfd, 0x91, 0xb8, 0x53, 0x91, 0x10, 0x69, 0x8a,
-       0xba, 0x55, 0xd2, 0xf0, 0x79, 0xd0, 0xe6, 0xa0, 0x74, 0x93, 0x7e, 0xd5,
-       0xbd, 0xc8, 0x17, 0xfd, 0x28, 0x7d, 0x74, 0x45, 0x4f, 0xe0, 0xa4, 0x01,
-       0x96, 0xbf, 0x0a, 0x99, 0x21, 0xc6, 0x7c, 0x5d, 0xf6, 0xcf, 0xf8, 0x32,
-       0xee, 0x71, 0xfd, 0x6f, 0x62, 0xfd, 0xd9, 0xed, 0x71, 0x59, 0x4e, 0xc6,
-       0x41, 0x93, 0x05, 0xe8, 0xf6, 0x2b, 0x12, 0xd0, 0x81, 0x31, 0xe7, 0x3d,
-       0xe2, 0x26, 0x86, 0xc5, 0x4d, 0x7f, 0x0f, 0x74, 0x18, 0x86, 0xec, 0xe7,
-       0xeb, 0x94, 0x9d, 0x57, 0x64, 0x08, 0x32, 0xf1, 0x86, 0xe7, 0xa4, 0x81,
-       0x85, 0xa0, 0x2f, 0x28, 0x17, 0x94, 0x89, 0x36, 0xa5, 0x93, 0xe6, 0x3d,
-       0xe7, 0xa9, 0xaa, 0xdc, 0x2a, 0xf3, 0x0a, 0x9b, 0xe2, 0xdd, 0x71, 0x65,
-       0x2f, 0xd2, 0x13, 0x56, 0x0f, 0x74, 0x74, 0x5a, 0xec, 0xde, 0x9b, 0x9b,
-       0xcd, 0x3d, 0x85, 0xc2, 0x89, 0x90, 0x4c, 0xf5, 0x92, 0x57, 0xec, 0x17,
-       0xf9, 0x6a, 0xd1, 0x8f, 0xb8, 0x6f, 0xf9, 0xa7, 0x3b, 0x93, 0xf2, 0xe9,
-       0xde, 0x15, 0xb9, 0xac, 0x88, 0x04, 0xfb, 0x62, 0x48, 0xf1, 0xc3, 0xcc,
-       0xdb, 0xac, 0xc5, 0xbc, 0xeb, 0x6f, 0x78, 0xc7, 0xb5, 0x50, 0xd6, 0x57,
-       0xf6, 0x4e, 0xf2, 0x9d, 0x73, 0xfd, 0x5d, 0xd0, 0xcc, 0x79, 0xaa, 0x24,
-       0xaf, 0x41, 0xf6, 0x40, 0xc3, 0xf3, 0x4c, 0x49, 0xc3, 0x29, 0xc8, 0xfd,
-       0xab, 0xb2, 0xe7, 0x04, 0xf7, 0xcc, 0xab, 0x58, 0xab, 0xd2, 0x25, 0xd0,
-       0x11, 0xec, 0xcf, 0x97, 0x69, 0x8f, 0xb1, 0x92, 0x5b, 0x13, 0x93, 0xf0,
-       0xe1, 0x26, 0x6c, 0x5f, 0x96, 0xbc, 0xa2, 0x2c, 0x0d, 0xa2, 0x4d, 0xf5,
-       0x11, 0xfc, 0xda, 0xf4, 0xda, 0x3e, 0x0b, 0xba, 0x3b, 0xc9, 0x8a, 0xf5,
-       0x19, 0xd0, 0xfd, 0x61, 0x49, 0x1d, 0x5f, 0xd1, 0x35, 0x90, 0xbb, 0x40,
-       0xd7, 0xa4, 0xce, 0xdb, 0x52, 0x2d, 0xbb, 0xf2, 0x71, 0xea, 0x90, 0x32,
-       0xd7, 0x05, 0x1d, 0xc3, 0xf3, 0xdb, 0x32, 0xf4, 0x4c, 0x19, 0x3a, 0x05,
-       0x3a, 0xe4, 0x4b, 0x28, 0xff, 0x22, 0xea, 0x3c, 0x0f, 0x9f, 0xe7, 0x39,
-       0x60, 0xbf, 0x8b, 0xc0, 0x14, 0x17, 0xca, 0x59, 0xed, 0x1b, 0xaa, 0xf5,
-       0xc2, 0x66, 0x29, 0x7f, 0x45, 0xaa, 0x15, 0xd2, 0xe3, 0x27, 0x8a, 0xb7,
-       0x39, 0x6f, 0x2b, 0x71, 0x16, 0x66, 0x26, 0x52, 0xa9, 0x18, 0x9a, 0x50,
-       0xf7, 0x31, 0xf6, 0x6f, 0x74, 0x65, 0xeb, 0x3a, 0x5d, 0x29, 0xf2, 0x62,
-       0x2d, 0xc0, 0x93, 0xc4, 0xc7, 0xa5, 0x99, 0xe4, 0xca, 0x19, 0x59, 0x09,
-       0x76, 0xf3, 0x32, 0xfc, 0x92, 0x58, 0xe6, 0x5b, 0x12, 0x3b, 0xe5, 0xfb,
-       0xdf, 0x87, 0xdd, 0x2c, 0x82, 0x27, 0x56, 0x08, 0xe5, 0x8b, 0x7c, 0x47,
-       0xb9, 0xa7, 0x6c, 0x87, 0x18, 0x2b, 0x97, 0x97, 0x51, 0x56, 0x55, 0x3e,
-       0xd3, 0xb7, 0x31, 0x1f, 0x3d, 0x3f, 0x55, 0xc6, 0x7a, 0xcd, 0x92, 0x1f,
-       0x4f, 0xcb, 0xe3, 0xe5, 0x6d, 0x76, 0x33, 0xda, 0x57, 0x16, 0xd9, 0xc6,
-       0x19, 0xe4, 0x95, 0x9d, 0x97, 0x17, 0x59, 0xde, 0x25, 0x57, 0x66, 0x32,
-       0x6a, 0x0e, 0xd5, 0xb9, 0x8c, 0x04, 0x31, 0x49, 0xea, 0x2b, 0xce, 0x15,
-       0x79, 0xfa, 0x96, 0x65, 0xda, 0xd9, 0x88, 0x14, 0x13, 0xa4, 0x75, 0x42,
-       0x2e, 0xcf, 0xc4, 0x37, 0x31, 0x86, 0x93, 0x73, 0xf9, 0x6c, 0x62, 0x07,
-       0xf6, 0xfb, 0x88, 0x1d, 0x30, 0x5e, 0x10, 0x81, 0x2d, 0x53, 0x31, 0x04,
-       0xa4, 0xc9, 0x06, 0x9f, 0x95, 0xef, 0x03, 0x6c, 0xb4, 0x8a, 0x1f, 0x89,
-       0x27, 0xb9, 0x5e, 0xa7, 0xb8, 0x0c, 0xfd, 0xd1, 0x91, 0x79, 0x49, 0xee,
-       0x99, 0x0f, 0xd6, 0x67, 0x9d, 0x11, 0xde, 0xd3, 0x90, 0x6b, 0x73, 0x8e,
-       0x77, 0x15, 0x98, 0x22, 0x1f, 0xf7, 0xc0, 0xaf, 0x3f, 0x8b, 0x41, 0x7f,
-       0x0d, 0x66, 0xad, 0x3d, 0x9b, 0x02, 0x7c, 0x16, 0x91, 0xa9, 0x19, 0x9e,
-       0xa9, 0x41, 0xb7, 0x01, 0x43, 0xfe, 0xf3, 0x08, 0x9e, 0x6b, 0xcc, 0xc3,
-       0x4f, 0x0b, 0x7c, 0x50, 0x3c, 0x07, 0xfd, 0x91, 0xe6, 0xd6, 0x3c, 0xd7,
-       0x1e, 0x92, 0x7b, 0x80, 0x4e, 0x04, 0xfd, 0x77, 0xeb, 0xb1, 0xba, 0xcf,
-       0xa4, 0x19, 0xc3, 0x93, 0x14, 0xf4, 0x45, 0x6e, 0x2e, 0x82, 0xb1, 0xba,
-       0x34, 0x36, 0xe7, 0xbb, 0xf5, 0xd8, 0xd3, 0xf8, 0x78, 0x69, 0x79, 0xa2,
-       0x6c, 0xb0, 0x5e, 0x1a, 0x36, 0x56, 0x22, 0x23, 0x7d, 0xbe, 0x7c, 0xdf,
-       0x23, 0xbd, 0xfa, 0x91, 0xf7, 0xe4, 0x68, 0xfd, 0xdd, 0xce, 0xce, 0x1a,
-       0xff, 0x5a, 0x31, 0x47, 0xfe, 0x30, 0x3f, 0xe0, 0x23, 0xce, 0xdd, 0x82,
-       0x3d, 0x2f, 0x01, 0x77, 0x59, 0xe7, 0xba, 0xd4, 0x3b, 0x0b, 0xd8, 0xa0,
-       0x3a, 0x03, 0xdd, 0x78, 0x8e, 0xe7, 0x89, 0xd0, 0x6d, 0xe7, 0xa2, 0x52,
-       0x9a, 0xa5, 0x5c, 0x4a, 0x87, 0x05, 0x7e, 0xb1, 0x7e, 0x75, 0xa6, 0x0b,
-       0x69, 0x2b, 0xd2, 0xa4, 0xea, 0xa7, 0x3a, 0xe3, 0xaa, 0xf6, 0xd5, 0x99,
-       0xb4, 0x6a, 0x57, 0x9d, 0xe9, 0x47, 0xea, 0x49, 0xd3, 0x39, 0x38, 0x4e,
-       0xe7, 0x7a, 0x65, 0xea, 0x34, 0xec, 0xcb, 0x80, 0xa5, 0xce, 0xe2, 0x27,
-       0x60, 0x7f, 0x22, 0xf0, 0xb2, 0xae, 0xda, 0x83, 0xc0, 0x58, 0x3b, 0x81,
-       0x41, 0x76, 0x8a, 0x7b, 0x8a, 0xeb, 0xa7, 0xee, 0xbd, 0xcc, 0x78, 0x52,
-       0xe2, 0x41, 0xc9, 0xca, 0x81, 0xd9, 0x66, 0xec, 0xd7, 0x88, 0x5d, 0x92,
-       0x1e, 0x7b, 0x18, 0xf9, 0x42, 0x85, 0x74, 0xbb, 0x4f, 0xf9, 0x6e, 0x39,
-       0xef, 0x1c, 0x78, 0x92, 0xc1, 0x18, 0xef, 0xa7, 0x7d, 0x1f, 0xe4, 0xcf,
-       0xd5, 0x7d, 0x64, 0x30, 0x9f, 0x46, 0x7a, 0xf0, 0x1c, 0x31, 0xfb, 0x73,
-       0xce, 0x11, 0x29, 0xd7, 0xa4, 0xef, 0x7d, 0x72, 0xd9, 0xcd, 0xc8, 0xcb,
-       0x6e, 0x5a, 0xae, 0xb8, 0x3b, 0xe4, 0xeb, 0xb0, 0xd3, 0x2f, 0xb9, 0x7d,
-       0x9b, 0x88, 0x05, 0xaa, 0xea, 0x6c, 0xc6, 0xf0, 0xca, 0xd5, 0xf1, 0xc4,
-       0x1f, 0xc8, 0xd2, 0x0c, 0xb1, 0xb3, 0xbf, 0x7b, 0xbf, 0x57, 0xa4, 0xdd,
-       0xc2, 0x1c, 0x88, 0xd5, 0x8a, 0xb0, 0x7f, 0x87, 0x65, 0xd8, 0xa3, 0xdd,
-       0x53, 0x36, 0x2a, 0x31, 0x1c, 0xec, 0x67, 0xaf, 0x00, 0xbd, 0x7a, 0x79,
-       0x16, 0xfb, 0x49, 0x28, 0xff, 0x78, 0xae, 0x90, 0xef, 0xae, 0x3c, 0x59,
-       0xe6, 0x3a, 0x4b, 0xd7, 0xb5, 0x48, 0x58, 0x46, 0x14, 0x5e, 0x68, 0x93,
-       0x17, 0x17, 0x37, 0x8b, 0x05, 0x0b, 0x65, 0xdd, 0x12, 0x55, 0xb7, 0x18,
-       0xe8, 0x7f, 0x4b, 0x3b, 0xef, 0x22, 0xbd, 0x05, 0xda, 0x30, 0x16, 0x80,
-       0xb5, 0xb5, 0x73, 0x25, 0x26, 0xdf, 0x8f, 0xfd, 0xf5, 0x96, 0xda, 0x6b,
-       0x79, 0x37, 0x8e, 0x67, 0xa6, 0xdc, 0x73, 0x8c, 0x3b, 0x85, 0x75, 0xfc,
-       0xf7, 0xaf, 0xd4, 0xfb, 0x66, 0x77, 0x17, 0x70, 0x1d, 0xe5, 0x15, 0xe9,
-       0x52, 0x30, 0x6e, 0x1e, 0x38, 0xae, 0xd0, 0xcf, 0x3b, 0x14, 0x4e, 0xba,
-       0x88, 0xbd, 0x30, 0xa1, 0xea, 0xef, 0xc4, 0x7e, 0xda, 0xd4, 0x42, 0xfc,
-       0xb0, 0x07, 0xb2, 0xf8, 0xd2, 0x0c, 0x9f, 0xf9, 0x9e, 0xfe, 0x15, 0xe3,
-       0x6b, 0x17, 0x46, 0xa7, 0xdd, 0xdf, 0xd2, 0xfb, 0x47, 0x42, 0x77, 0xf5,
-       0x01, 0x87, 0x1e, 0x6b, 0xc2, 0x5a, 0x9c, 0x64, 0x32, 0x64, 0x75, 0x5a,
-       0xc0, 0xf1, 0xc3, 0xca, 0xe6, 0xf6, 0x61, 0xfe, 0x69, 0x39, 0x93, 0x6e,
-       0x93, 0xaa, 0xed, 0xaa, 0x3b, 0x57, 0xcb, 0xf6, 0x76, 0x62, 0x7d, 0xfc,
-       0x36, 0xa1, 0xac, 0x07, 0x69, 0x33, 0xd2, 0xdb, 0xa4, 0x74, 0xb2, 0xaf,
-       0x25, 0xe8, 0x2f, 0xba, 0x2e, 0xff, 0x75, 0x3d, 0xce, 0x5f, 0x6a, 0x7f,
-       0x8a, 0xe3, 0x44, 0xc5, 0xfd, 0x7c, 0xab, 0xf4, 0x1c, 0xb3, 0x81, 0x6d,
-       0x13, 0xc0, 0xba, 0x5d, 0x92, 0x3e, 0x96, 0x94, 0x5b, 0x8e, 0x99, 0x38,
-       0xd1, 0x97, 0x47, 0x53, 0x2a, 0x66, 0xf8, 0xa5, 0x51, 0xb7, 0xa2, 0xce,
-       0x53, 0xf5, 0xdd, 0xb0, 0x65, 0x7d, 0x67, 0xec, 0x1b, 0xa3, 0x7d, 0x2a,
-       0xfd, 0xf6, 0x68, 0x5a, 0xa5, 0xaf, 0x8c, 0xde, 0x52, 0x0b, 0xfc, 0xa3,
-       0xd2, 0x42, 0x5a, 0x3e, 0x57, 0x26, 0xbe, 0x1c, 0x00, 0x76, 0xf4, 0xa0,
-       0x67, 0xfa, 0xa1, 0x67, 0xd2, 0xd0, 0x33, 0x83, 0xd4, 0x33, 0xd0, 0xdb,
-       0xaf, 0x40, 0x6f, 0x7b, 0xf2, 0x06, 0xe4, 0xf5, 0x82, 0xd7, 0x0c, 0x5c,
-       0xe8, 0xfb, 0xc1, 0x5a, 0x9d, 0xa7, 0x96, 0xc1, 0xdf, 0xea, 0x59, 0x89,
-       0xb5, 0x43, 0x07, 0x6d, 0x9f, 0x6f, 0x92, 0x85, 0xb8, 0xef, 0x9f, 0xf0,
-       0x5c, 0xb9, 0x86, 0xfa, 0x39, 0x97, 0xfb, 0x78, 0xa2, 0x85, 0xfe, 0xd8,
-       0xb5, 0x99, 0x1d, 0xd0, 0x49, 0x94, 0xf7, 0x98, 0x54, 0xc7, 0x13, 0xb2,
-       0x08, 0xff, 0x6c, 0xb5, 0x4e, 0x1a, 0xcf, 0xdc, 0xff, 0xff, 0x12, 0x75,
-       0xd3, 0xb0, 0x0f, 0xb6, 0x2c, 0xf5, 0x25, 0xe5, 0x4c, 0x9f, 0x33, 0x98,
-       0xb4, 0xa8, 0xbb, 0x92, 0x52, 0x81, 0xaf, 0x5f, 0x2d, 0xb3, 0x3e, 0xeb,
-       0x61, 0x7f, 0x96, 0x83, 0x76, 0xd3, 0x65, 0xa3, 0x27, 0x20, 0x9f, 0x73,
-       0x8c, 0x03, 0x06, 0x36, 0xc0, 0xb2, 0x9a, 0x21, 0x07, 0x1e, 0xe8, 0x3f,
-       0x8e, 0xf2, 0x01, 0xde, 0x25, 0x40, 0x19, 0xb1, 0x50, 0x49, 0xf1, 0x38,
-       0xef, 0x8d, 0xa3, 0x8c, 0x6d, 0x9c, 0x44, 0x0a, 0xe5, 0x63, 0x92, 0x4a,
-       0x14, 0xd4, 0xbd, 0xa6, 0x4e, 0x94, 0xb1, 0x8f, 0xb0, 0x8e, 0xc7, 0xcc,
-       0xb6, 0x50, 0x8e, 0xc2, 0xae, 0x29, 0xdf, 0xa6, 0x62, 0x03, 0x59, 0xdb,
-       0xc3, 0x7e, 0x60, 0x59, 0xca, 0x66, 0xbb, 0xbc, 0xe7, 0x29, 0x5d, 0x78,
-       0xaf, 0x3e, 0xb7, 0xb8, 0xa7, 0xd6, 0x2a, 0xf9, 0x5a, 0xd3, 0x7b, 0xe8,
-       0x7f, 0xb3, 0x27, 0x2f, 0x27, 0x6c, 0xe1, 0x19, 0x7b, 0xb0, 0xcf, 0x23,
-       0x3b, 0xb8, 0x27, 0x40, 0x77, 0xd8, 0xdf, 0xe7, 0xb1, 0xde, 0xe7, 0x60,
-       0x7f, 0x2f, 0xc2, 0xfe, 0x5e, 0x28, 0xaf, 0xea, 0x8f, 0xc0, 0xee, 0x52,
-       0x07, 0x3c, 0x03, 0x9e, 0x8d, 0x01, 0xf7, 0xef, 0x85, 0x3f, 0x30, 0x02,
-       0xec, 0x3f, 0x04, 0xfe, 0x65, 0xc0, 0xbb, 0x71, 0xde, 0x45, 0x01, 0x1f,
-       0x07, 0xd5, 0x59, 0xe6, 0xac, 0x3a, 0xcf, 0xff, 0x81, 0xb2, 0xbd, 0x8f,
-       0x97, 0x2d, 0xd8, 0x87, 0xa2, 0x7f, 0x9d, 0xeb, 0x00, 0xff, 0xad, 0xec,
-       0xe7, 0xc1, 0x17, 0xa1, 0x57, 0x7e, 0x8c, 0x79, 0x3d, 0x37, 0x4b, 0x7b,
-       0x8e, 0x3a, 0x01, 0xde, 0xf6, 0x18, 0xeb, 0xc2, 0x7e, 0x3e, 0x7a, 0x59,
-       0x96, 0x81, 0x3b, 0xb2, 0x94, 0x63, 0xf8, 0x0f, 0xce, 0x85, 0x8a, 0xf4,
-       0x52, 0x07, 0x02, 0x13, 0x0d, 0xca, 0xc0, 0xf1, 0x04, 0xb0, 0x1e, 0x90,
-       0xbc, 0x3a, 0xaf, 0xc3, 0xf3, 0xf9, 0x2d, 0x62, 0x11, 0xef, 0x79, 0x3c,
-       0x9b, 0xa1, 0xde, 0x30, 0x18, 0x69, 0x79, 0xb0, 0x43, 0xb2, 0xdb, 0x3b,
-       0x94, 0xee, 0x70, 0xbc, 0x97, 0x31, 0xee, 0x1e, 0xb8, 0x20, 0x6f, 0x00,
-       0x21, 0x58, 0x99, 0x43, 0xf2, 0xbf, 0x3c, 0xc6, 0xa8, 0x02, 0xdf, 0x0f,
-       0x73, 0x89, 0x81, 0x66, 0x9b, 0xf6, 0xbb, 0x76, 0x6c, 0x4f, 0x9d, 0xfd,
-       0xc7, 0x14, 0xc6, 0xca, 0x0b, 0xfb, 0x87, 0x9d, 0xc0, 0x98, 0xa9, 0xe3,
-       0x94, 0xfd, 0x6d, 0xe0, 0xdb, 0x3f, 0x05, 0x06, 0x22, 0x55, 0x87, 0x36,
-       0x07, 0xfb, 0x85, 0xf3, 0x5f, 0x26, 0x9e, 0x60, 0x4c, 0x3d, 0xf0, 0xcb,
-       0x57, 0xe6, 0xb6, 0x13, 0xf6, 0xeb, 0xb6, 0xcd, 0x94, 0x81, 0x71, 0x0f,
-       0x7e, 0xdf, 0xf1, 0xc0, 0x5e, 0x77, 0x9f, 0x47, 0xab, 0x13, 0xd2, 0xc9,
-       0xd3, 0x4e, 0x4b, 0x6e, 0x91, 0x8f, 0x44, 0x82, 0x7e, 0xac, 0x79, 0x1b,
-       0xb2, 0x4a, 0x3d, 0xd0, 0x09, 0x39, 0x67, 0x9e, 0x3a, 0x85, 0x3a, 0x81,
-       0xb2, 0xe0, 0x4a, 0xa9, 0x0e, 0x9d, 0xd0, 0xd6, 0x25, 0x15, 0xd2, 0x6c,
-       0x9e, 0x7a, 0xe2, 0x07, 0x32, 0xbd, 0x4e, 0x57, 0x0e, 0x89, 0xf1, 0x6b,
-       0x5b, 0x25, 0x9a, 0x71, 0xed, 0x7b, 0xd5, 0x1a, 0x03, 0x7d, 0x79, 0x80,
-       0xf8, 0x73, 0x36, 0xeb, 0x74, 0x88, 0xc6, 0x9e, 0x0a, 0x3f, 0xbd, 0x89,
-       0xb5, 0xb2, 0x0f, 0x45, 0xa7, 0xc1, 0xa1, 0xc0, 0x17, 0x50, 0x31, 0x3f,
-       0xe0, 0xe0, 0xc4, 0x8f, 0xa1, 0x6b, 0xf3, 0xc4, 0x25, 0xa0, 0x73, 0xf7,
-       0x09, 0xca, 0xd1, 0x75, 0xea, 0x6c, 0xbc, 0x62, 0xa5, 0xa9, 0xaf, 0x65,
-       0xf1, 0x38, 0x30, 0x97, 0xb5, 0x4b, 0x0a, 0x94, 0x57, 0x9e, 0x7d, 0x2f,
-       0x5a, 0x32, 0x3d, 0xd7, 0x26, 0x3d, 0xf3, 0x8c, 0xaf, 0xee, 0x6e, 0x91,
-       0x36, 0xc6, 0x58, 0x69, 0x83, 0x06, 0x24, 0x8f, 0xf2, 0xee, 0xf9, 0xb0,
-       0x8a, 0x87, 0x55, 0x2c, 0xd2, 0xa8, 0x1f, 0xfa, 0xc0, 0x49, 0x2f, 0x5b,
-       0xff, 0x25, 0x16, 0x60, 0x48, 0xc8, 0x52, 0x19, 0x32, 0x56, 0x86, 0x8c,
-       0x95, 0x21, 0x63, 0x65, 0xc8, 0x18, 0xb0, 0xdf, 0x73, 0xd8, 0x7f, 0x17,
-       0xcb, 0x83, 0xda, 0xae, 0xdf, 0xaf, 0xec, 0xfa, 0x91, 0x32, 0xcf, 0xf0,
-       0xe9, 0x83, 0x26, 0x95, 0x0e, 0xb9, 0xa4, 0x7c, 0x51, 0xe3, 0xa3, 0xbe,
-       0x22, 0xcf, 0xcc, 0xbe, 0x2a, 0x67, 0x66, 0x57, 0x71, 0xe0, 0x54, 0xd9,
-       0x97, 0x97, 0x3d, 0xf8, 0x9f, 0x0b, 0xc4, 0x54, 0xd9, 0xf6, 0x66, 0x85,
-       0xad, 0x0e, 0x4b, 0x41, 0xe1, 0x64, 0x65, 0x47, 0x80, 0xaf, 0x14, 0x2e,
-       0xe4, 0xde, 0x94, 0x8e, 0xed, 0xaf, 0xc9, 0x45, 0xd8, 0xf1, 0xc5, 0xfa,
-       0xeb, 0xf2, 0xbc, 0xc2, 0xe3, 0xa4, 0xc3, 0x07, 0xe4, 0x47, 0x76, 0x70,
-       0x4e, 0x7c, 0x06, 0x58, 0x63, 0xb1, 0x8f, 0xba, 0x23, 0x02, 0x5b, 0xe0,
-       0x14, 0xbb, 0xb1, 0xaf, 0x0f, 0x5a, 0x37, 0x00, 0xd3, 0xf0, 0xfd, 0x16,
-       0x79, 0x71, 0xb6, 0xd8, 0x20, 0x13, 0xd4, 0x0f, 0xce, 0x51, 0xb1, 0x68,
-       0xa7, 0x68, 0x37, 0xb9, 0x5e, 0xda, 0xa9, 0x3f, 0xd8, 0xcc, 0xb3, 0xd4,
-       0xea, 0xc9, 0x73, 0x2d, 0x8c, 0x37, 0xc6, 0x5d, 0xd2, 0xf4, 0x35, 0x39,
-       0x58, 0x63, 0xd9, 0xab, 0xe0, 0x0f, 0xd3, 0xef, 0xf9, 0xf7, 0xc4, 0x39,
-       0x1e, 0xfb, 0x05, 0x6e, 0xea, 0xc4, 0x5a, 0xcb, 0x7f, 0xa9, 0x63, 0x5e,
-       0xfd, 0x0a, 0x47, 0xbf, 0x13, 0x2f, 0x9b, 0x7b, 0x0d, 0xaf, 0xa9, 0x78,
-       0xe0, 0x06, 0x71, 0xe2, 0xa7, 0xb0, 0xaf, 0x8a, 0x57, 0x85, 0x31, 0x4b,
-       0xc6, 0x73, 0x19, 0x2b, 0x6e, 0xd4, 0x18, 0xea, 0xbc, 0x54, 0xee, 0x86,
-       0x7e, 0xb9, 0x07, 0xfa, 0xe5, 0xde, 0x77, 0xdc, 0xaf, 0x35, 0x71, 0xfb,
-       0x9e, 0x62, 0xd8, 0xea, 0x92, 0xb1, 0x5a, 0x63, 0x5b, 0xc6, 0x71, 0x37,
-       0x8a, 0xdb, 0x32, 0xa6, 0x9b, 0x5e, 0x17, 0x0b, 0xa4, 0x6c, 0xf8, 0xf2,
-       0x92, 0xc7, 0xb8, 0x9b, 0xb9, 0x9b, 0xbd, 0x11, 0xfe, 0xfa, 0xc3, 0xcd,
-       0x26, 0xe6, 0x1c, 0xc9, 0x5c, 0x15, 0xde, 0xd1, 0x2e, 0xcd, 0x10, 0x0f,
-       0xa8, 0xb3, 0x40, 0x15, 0xbb, 0xce, 0x07, 0xf1, 0x03, 0x94, 0xc3, 0xea,
-       0xc2, 0xdf, 0x61, 0xec, 0xda, 0xde, 0xe1, 0xd8, 0x63, 0xe1, 0xe0, 0xae,
-       0x1f, 0xf7, 0x72, 0xa0, 0xcb, 0x20, 0x8b, 0xf5, 0xd5, 0x3b, 0x74, 0x43,
-       0x4a, 0x5f, 0x5c, 0xc5, 0x1e, 0x20, 0xbf, 0xe0, 0x2f, 0x60, 0x9f, 0x4c,
-       0x41, 0x3f, 0x15, 0x54, 0x7f, 0x31, 0xca, 0x45, 0x36, 0x17, 0xb6, 0x24,
-       0x7a, 0x8a, 0xbe, 0x50, 0x10, 0x6b, 0xc9, 0x87, 0x1d, 0xa5, 0xbf, 0x31,
-       0x77, 0xe0, 0x33, 0xee, 0xcf, 0xe4, 0x44, 0x73, 0xa6, 0x09, 0x76, 0x15,
-       0xfc, 0xab, 0x33, 0x26, 0x80, 0xbd, 0xbb, 0xf4, 0x5d, 0x39, 0x30, 0x77,
-       0x69, 0x73, 0x20, 0xff, 0x8c, 0x23, 0x73, 0x7d, 0x66, 0x0e, 0x6b, 0xfb,
-       0xb6, 0x4e, 0x49, 0xac, 0x05, 0x36, 0xed, 0xa3, 0xa7, 0x88, 0x07, 0x9a,
-       0x65, 0x39, 0xce, 0x7e, 0x83, 0x3d, 0x33, 0x5d, 0x66, 0xdf, 0xdf, 0x95,
-       0xe1, 0xb9, 0x74, 0x2b, 0xf5, 0xc8, 0x12, 0xf4, 0xc0, 0x65, 0x9b, 0x36,
-       0x74, 0x1c, 0x36, 0xae, 0x53, 0xde, 0x9c, 0xa3, 0x7d, 0x4c, 0xd9, 0x67,
-       0x64, 0x5b, 0xe2, 0x0c, 0xe6, 0xf4, 0x84, 0x17, 0xa1, 0x8f, 0xe6, 0x0f,
-       0xa1, 0xec, 0xeb, 0x92, 0xb2, 0xbb, 0x43, 0x7c, 0xde, 0x66, 0x3f, 0x29,
-       0xbc, 0x6f, 0x90, 0xb2, 0x6f, 0x0d, 0x51, 0x8e, 0xe0, 0x73, 0x2f, 0xad,
-       0xce, 0xf3, 0x7b, 0x73, 0xca, 0x4f, 0x52, 0x7a, 0x66, 0xc9, 0xe3, 0x78,
-       0x97, 0xb4, 0x6e, 0xbb, 0x15, 0xfa, 0x24, 0xa6, 0xcf, 0xc2, 0xd0, 0x86,
-       0xd8, 0xc6, 0x8b, 0xe8, 0xfc, 0x67, 0x25, 0x77, 0x3a, 0x0e, 0x7d, 0xc6,
-       0xbe, 0x8c, 0xef, 0x40, 0x1b, 0x69, 0xf0, 0x36, 0xed, 0xdd, 0x2e, 0xd8,
-       0xbd, 0x9b, 0xd4, 0x7c, 0x46, 0xbc, 0x7e, 0x99, 0x3a, 0xc9, 0xb1, 0xfb,
-       0xa0, 0xcb, 0x13, 0x4a, 0x6e, 0x4b, 0xe5, 0xcb, 0x89, 0x18, 0x74, 0x72,
-       0x6c, 0x3b, 0xe9, 0xf9, 0x61, 0xb9, 0xd3, 0x1d, 0x97, 0xbb, 0x20, 0x3b,
-       0x43, 0xae, 0x27, 0xc3, 0xe0, 0xc5, 0x1e, 0x17, 0x76, 0x47, 0x61, 0xe8,
-       0x66, 0xf8, 0x5d, 0x1c, 0x9b, 0xf7, 0xc4, 0xd9, 0x36, 0xc0, 0x8f, 0x7f,
-       0x54, 0x0f, 0x68, 0x94, 0x9b, 0xfb, 0x88, 0xa2, 0xcd, 0x88, 0xb7, 0x53,
-       0xdb, 0xd9, 0x36, 0xc9, 0xab, 0x7a, 0x3b, 0x95, 0x3d, 0x2e, 0x2d, 0xde,
-       0x87, 0x14, 0xb6, 0x79, 0x11, 0xfa, 0x06, 0x98, 0xbb, 0x54, 0xdb, 0x81,
-       0x3c, 0x6c, 0xe8, 0x62, 0x06, 0xe9, 0x87, 0x91, 0xb2, 0x6e, 0xa8, 0x35,
-       0x88, 0xe5, 0x1a, 0x3c, 0xba, 0x7a, 0xbf, 0xf0, 0xa3, 0x0a, 0x97, 0x5e,
-       0x55, 0xf7, 0xcb, 0x2c, 0x60, 0x9d, 0x1c, 0xf4, 0x4a, 0x2b, 0x30, 0xd0,
-       0xcc, 0x29, 0x27, 0x3d, 0x1c, 0xda, 0x2d, 0xbf, 0x06, 0x5f, 0xbe, 0xea,
-       0x91, 0x97, 0x3b, 0xe4, 0xc1, 0x3b, 0x28, 0x23, 0xbb, 0x65, 0xff, 0x1d,
-       0x21, 0xd9, 0xdf, 0xef, 0x64, 0x39, 0xef, 0x5b, 0x6e, 0x33, 0xfe, 0x74,
-       0xcf, 0x48, 0x2a, 0x34, 0x20, 0x4f, 0x42, 0xc6, 0x8a, 0x90, 0xaf, 0xe1,
-       0x3a, 0x69, 0x4e, 0x7d, 0x4f, 0x3d, 0x9f, 0x06, 0x56, 0x36, 0xd8, 0xcf,
-       0x95, 0x99, 0x7a, 0x93, 0x24, 0xaf, 0x67, 0x3c, 0x39, 0x19, 0x9c, 0x71,
-       0x5c, 0x4f, 0x99, 0x80, 0x0f, 0x72, 0x7d, 0xb0, 0x3f, 0xd5, 0xbd, 0x2e,
-       0xf5, 0x1c, 0xa7, 0xff, 0xeb, 0x13, 0xe7, 0x15, 0x14, 0x5f, 0x68, 0x23,
-       0x98, 0xfe, 0xbb, 0xd6, 0x15, 0x7c, 0xd7, 0x46, 0xff, 0x61, 0x67, 0xeb,
-       0xea, 0xbd, 0xf4, 0xf5, 0xb2, 0x68, 0xe2, 0x6e, 0x15, 0xac, 0x99, 0x36,
-       0xdd, 0xb1, 0xa9, 0x0b, 0xdb, 0xdd, 0xfb, 0xe5, 0x4f, 0x60, 0xdf, 0xbf,
-       0xb2, 0x62, 0xdf, 0xf7, 0x81, 0x1e, 0xeb, 0x31, 0x80, 0x6b, 0xdf, 0x8d,
-       0xb5, 0x8c, 0x80, 0x9f, 0x77, 0xe1, 0x77, 0x67, 0x79, 0x4d, 0x1c, 0x6f,
-       0xb6, 0x08, 0x3c, 0xd9, 0xe4, 0xb2, 0xbf, 0x35, 0xf1, 0xbc, 0x62, 0x41,
-       0x56, 0x62, 0x85, 0x83, 0xd7, 0x84, 0x76, 0xef, 0x2d, 0x89, 0xf6, 0xba,
-       0x6f, 0x75, 0x87, 0xdc, 0x17, 0xac, 0x10, 0xcf, 0x95, 0x3d, 0x39, 0x5b,
-       0x27, 0x0e, 0xbb, 0x22, 0xd6, 0x79, 0x62, 0xb0, 0x6f, 0xa8, 0x18, 0x54,
-       0xb5, 0xfc, 0x6d, 0xa4, 0xa8, 0x0f, 0xfd, 0x18, 0x0e, 0xe2, 0x14, 0x0a,
-       0xab, 0x50, 0xcf, 0xde, 0x05, 0x3e, 0x4c, 0xe1, 0xd7, 0xbd, 0xfd, 0x56,
-       0xec, 0x5f, 0xca, 0x29, 0x63, 0x5f, 0xbd, 0xf6, 0xf6, 0x10, 0xdf, 0x6d,
-       0x14, 0x07, 0xfb, 0x8e, 0x44, 0x4e, 0xc0, 0xd6, 0x59, 0xd4, 0x0f, 0x5c,
-       0x07, 0xed, 0xa4, 0x2d, 0x0b, 0x27, 0xb9, 0xd7, 0x37, 0xaa, 0x6f, 0xea,
-       0x9a, 0xb5, 0x28, 0xbb, 0x91, 0x2d, 0x30, 0xc6, 0x59, 0x26, 0x0f, 0x3c,
-       0xf0, 0xc0, 0x97, 0x53, 0x5e, 0x3b, 0xf4, 0x76, 0x5c, 0xc2, 0xa7, 0x7c,
-       0x19, 0x52, 0xd8, 0x75, 0x1b, 0x30, 0xd7, 0x16, 0x8d, 0x1b, 0xe2, 0x12,
-       0x39, 0xd5, 0x25, 0xcd, 0xc0, 0xd5, 0x4d, 0xc7, 0x68, 0x23, 0x53, 0xc9,
-       0x21, 0x08, 0x41, 0x44, 0xdd, 0x55, 0x74, 0x06, 0xdf, 0x94, 0x6d, 0xc9,
-       0x37, 0x85, 0x78, 0xe9, 0x86, 0x2d, 0xf0, 0x09, 0xbc, 0x2b, 0x1b, 0xd4,
-       0x2f, 0xad, 0xd6, 0x87, 0x1c, 0x31, 0xb6, 0xc6, 0x36, 0x8c, 0xb5, 0xa5,
-       0x06, 0xdf, 0x60, 0x8c, 0x0d, 0xbe, 0x66, 0xd3, 0xb9, 0x60, 0x0e, 0xd6,
-       0x52, 0x87, 0x54, 0x4f, 0x73, 0x8f, 0x32, 0xce, 0x62, 0x07, 0x7e, 0x6a,
-       0x99, 0xfe, 0x2a, 0xdf, 0x27, 0xf5, 0xfb, 0x6e, 0xfd, 0x9e, 0xfe, 0x68,
-       0xd1, 0x6f, 0x02, 0x4d, 0xf7, 0x40, 0x7f, 0xde, 0xb7, 0xc3, 0x55, 0xb8,
-       0xe1, 0xbe, 0x15, 0x9e, 0xed, 0x15, 0xeb, 0x38, 0xfc, 0xd4, 0xf2, 0x61,
-       0x71, 0xb7, 0x2f, 0xa7, 0x23, 0x32, 0x06, 0x5e, 0x30, 0x9f, 0xe5, 0x7c,
-       0xd2, 0x47, 0xe4, 0xa0, 0xe2, 0x4d, 0xf5, 0xa4, 0x73, 0x34, 0x19, 0x9a,
-       0x12, 0xab, 0xca, 0xe7, 0x47, 0x90, 0x1e, 0x01, 0xde, 0x09, 0x62, 0x97,
-       0x56, 0x75, 0x2d, 0x2d, 0x81, 0x31, 0xec, 0x3d, 0x6b, 0xe2, 0x58, 0xab,
-       0x31, 0x2e, 0xbe, 0x1f, 0x52, 0xef, 0xd3, 0x6b, 0xe2, 0x5c, 0x79, 0x8b,
-       0x58, 0xc6, 0xbc, 0x27, 0x2f, 0xc8, 0x2f, 0xd8, 0xe2, 0x93, 0x26, 0xe6,
-       0xd5, 0xa6, 0xf9, 0x42, 0xfe, 0xcc, 0xc8, 0x45, 0xdb, 0x19, 0xa1, 0xfc,
-       0xfd, 0xea, 0x8e, 0x1b, 0x65, 0xa2, 0x93, 0xf1, 0xb6, 0xc6, 0x39, 0xac,
-       0x8f, 0xa3, 0x35, 0x8e, 0xbf, 0x3e, 0xfe, 0xc6, 0xb1, 0x83, 0x18, 0x5b,
-       0x6e, 0x4d, 0x8c, 0xad, 0x71, 0x3c, 0x8e, 0xb5, 0x05, 0xfe, 0x53, 0xd1,
-       0x8f, 0xbb, 0xe4, 0x51, 0x4f, 0x72, 0x8e, 0xf9, 0x2f, 0x58, 0xe0, 0x63,
-       0x1c, 0x76, 0x84, 0xbc, 0x34, 0x67, 0xcf, 0xe4, 0x69, 0x2a, 0x79, 0x24,
-       0xe0, 0xe7, 0x60, 0xc0, 0xf7, 0x80, 0xff, 0x57, 0x56, 0xf8, 0x48, 0xfb,
-       0x40, 0x3e, 0x76, 0x8a, 0x40, 0xcf, 0x5a, 0xc7, 0xc8, 0x43, 0xa6, 0xe4,
-       0x21, 0xdf, 0x91, 0x87, 0xdd, 0xfa, 0x1d, 0xf9, 0x07, 0x9c, 0xf6, 0x79,
-       0x60, 0x0c, 0x2f, 0xa7, 0xbe, 0xb1, 0xe9, 0xee, 0x35, 0x7b, 0x31, 0x2d,
-       0xcf, 0x2f, 0xb4, 0x88, 0x9d, 0x09, 0xd6, 0x35, 0xbe, 0x26, 0xde, 0xce,
-       0xf3, 0xab, 0x7e, 0x62, 0x4f, 0xb3, 0xae, 0x04, 0xd7, 0x75, 0x50, 0x5e,
-       0x93, 0xc2, 0x4c, 0x04, 0x3e, 0x60, 0x1a, 0x38, 0xa7, 0x1f, 0xfa, 0x96,
-       0xf1, 0x51, 0x94, 0xd5, 0x88, 0x57, 0x68, 0xeb, 0xd2, 0xd8, 0x2b, 0xd4,
-       0xc1, 0xc4, 0x23, 0xaf, 0x4a, 0xbe, 0x62, 0x74, 0x0c, 0xfa, 0xb7, 0x4c,
-       0xff, 0xa4, 0x73, 0xf6, 0x96, 0xeb, 0x64, 0x39, 0x79, 0x9d, 0x38, 0xc9,
-       0x45, 0x59, 0xe5, 0xeb, 0xf8, 0xc6, 0x74, 0xf7, 0xee, 0x0b, 0xaf, 0xca,
-       0xc6, 0xf8, 0x06, 0xbc, 0x9f, 0x14, 0xf3, 0xde, 0xf0, 0x7e, 0x43, 0x3e,
-       0x14, 0x5f, 0x11, 0xf2, 0x82, 0x34, 0x20, 0x1e, 0x8e, 0xca, 0xef, 0xc6,
-       0xb9, 0x1f, 0x8b, 0xea, 0x7c, 0x33, 0x65, 0xf5, 0x2a, 0x9d, 0x31, 0xe4,
-       0x05, 0xf2, 0x5a, 0xc4, 0x38, 0xb1, 0x9e, 0xdf, 0xf3, 0x87, 0xe2, 0xf0,
-       0x73, 0x7b, 0xa8, 0x5f, 0xcc, 0x9e, 0x6e, 0x51, 0x7b, 0xfa, 0x09, 0x2f,
-       0x24, 0x25, 0x37, 0x24, 0x53, 0xee, 0x61, 0x85, 0xf1, 0x7f, 0x03, 0x7d,
-       0x3d, 0xa8, 0xfb, 0x9a, 0x92, 0x5e, 0xad, 0x7f, 0x0e, 0x41, 0xce, 0x7d,
-       0xb9, 0xd7, 0xdb, 0x21, 0xbf, 0xda, 0xce, 0x3d, 0x60, 0xd6, 0x7f, 0x58,
-       0x7a, 0x76, 0x2c, 0x27, 0xe1, 0x19, 0xdc, 0x12, 0x5d, 0xa1, 0x01, 0xf7,
-       0x99, 0x91, 0xef, 0x80, 0x0e, 0xc1, 0xfa, 0xd7, 0xac, 0x55, 0xaf, 0x93,
-       0x6b, 0x66, 0x3d, 0xae, 0x35, 0xc0, 0xf2, 0xab, 0x6b, 0x35, 0xf5, 0x5b,
-       0x21, 0x4b, 0x4e, 0x52, 0x42, 0x8d, 0xb4, 0x59, 0xd1, 0x51, 0x23, 0x8c,
-       0x91, 0x2c, 0xdb, 0x4e, 0x3a, 0x19, 0x32, 0xb1, 0xe8, 0x00, 0xeb, 0x76,
-       0x03, 0x87, 0xbb, 0xbd, 0xbd, 0xe9, 0x82, 0x8a, 0x91, 0x5a, 0x6a, 0x5d,
-       0x53, 0xc0, 0x64, 0x0b, 0xde, 0x2b, 0xfe, 0xa7, 0x81, 0x59, 0x27, 0xe4,
-       0x61, 0x09, 0xaf, 0x89, 0xe5, 0x22, 0x7f, 0x9e, 0xf1, 0x5c, 0x27, 0x99,
-       0x05, 0x8f, 0x7f, 0x13, 0x3e, 0x7c, 0x15, 0x7a, 0xff, 0xe3, 0xb4, 0x0d,
-       0x65, 0xd8, 0x0b, 0xe0, 0x92, 0xaf, 0xbc, 0x27, 0x86, 0x9f, 0x68, 0x88,
-       0xe5, 0x06, 0xf8, 0xf4, 0xa2, 0xc2, 0xa4, 0xc4, 0xed, 0x47, 0x43, 0x77,
-       0xf7, 0x85, 0xe1, 0x67, 0x14, 0xfd, 0x98, 0x4b, 0x1c, 0x77, 0x58, 0xee,
-       0x04, 0x7f, 0xce, 0x2e, 0x14, 0x43, 0x7b, 0xca, 0x46, 0x56, 0xe1, 0x57,
-       0xd6, 0x9d, 0xf4, 0x65, 0xd0, 0xe3, 0x19, 0x8d, 0xf9, 0x78, 0x5e, 0x53,
-       0xd5, 0x3e, 0x0b, 0x63, 0x43, 0xa5, 0xfa, 0x61, 0x99, 0xf6, 0x18, 0xdb,
-       0xe9, 0x91, 0x52, 0x3c, 0x7b, 0x63, 0xf3, 0x0a, 0x8d, 0x1c, 0x1b, 0x3e,
-       0x5f, 0x9a, 0xfa, 0xbb, 0xaa, 0xcf, 0x3b, 0x9e, 0x51, 0xf2, 0x65, 0xe2,
-       0xc2, 0xf4, 0x8f, 0x78, 0x5e, 0xd5, 0x63, 0x8f, 0xf0, 0xb9, 0x42, 0x19,
-       0x50, 0x3e, 0x13, 0x68, 0xf9, 0x90, 0x64, 0xc7, 0x92, 0x0a, 0xb7, 0x3c,
-       0x5e, 0xe6, 0x7e, 0x21, 0xfe, 0x7f, 0x0d, 0xd8, 0x3f, 0x02, 0x9e, 0xd1,
-       0x0f, 0xe0, 0xd8, 0xdc, 0x17, 0x28, 0xab, 0xd9, 0xef, 0xb2, 0x2f, 0x5e,
-       0x6b, 0x23, 0xc6, 0xb8, 0x54, 0x16, 0x45, 0xbf, 0x65, 0x31, 0xb1, 0x73,
-       0x85, 0x05, 0x8b, 0xb9, 0x70, 0x48, 0x52, 0x27, 0xfe, 0x35, 0x64, 0xe8,
-       0xd7, 0xe1, 0x23, 0xa9, 0x7a, 0xea, 0xfc, 0x6a, 0x08, 0x98, 0xcb, 0x72,
-       0x6f, 0x90, 0x92, 0x1d, 0x95, 0x92, 0xba, 0xa3, 0xc9, 0xf3, 0xdc, 0xb0,
-       0x8a, 0xed, 0x94, 0x6c, 0x62, 0xfe, 0xff, 0xde, 0x16, 0xd8, 0xfa, 0x0e,
-       0xe4, 0xd9, 0x8e, 0x79, 0x96, 0x4f, 0x49, 0xf4, 0xc4, 0x21, 0x69, 0x3a,
-       0xf1, 0xb0, 0x34, 0x1f, 0x27, 0xc6, 0x63, 0xec, 0xde, 0xda, 0xd5, 0x2c,
-       0xc4, 0xdc, 0x43, 0x18, 0xfb, 0xb0, 0x7c, 0xdf, 0x33, 0x73, 0x5a, 0xc4,
-       0x1c, 0x59, 0xc7, 0xe4, 0x0d, 0x1e, 0xdf, 0x85, 0xf9, 0x70, 0xfd, 0x49,
-       0x8d, 0xfb, 0x76, 0x35, 0xf8, 0xae, 0x4d, 0xda, 0x77, 0x65, 0xbb, 0x4f,
-       0x61, 0xad, 0x27, 0x25, 0xea, 0x9a, 0xf6, 0xbb, 0x51, 0x2f, 0xd1, 0x70,
-       0x07, 0x82, 0x75, 0xf4, 0x9d, 0x80, 0x36, 0xe2, 0x1e, 0x9e, 0xb7, 0xb3,
-       0x2c, 0x38, 0xf3, 0xb7, 0xaa, 0xbb, 0xc2, 0x6b, 0xc7, 0xdf, 0xd9, 0x50,
-       0xd7, 0x94, 0x99, 0x36, 0xd1, 0xc0, 0xe7, 0x1f, 0x88, 0x36, 0xb4, 0x83,
-       0x71, 0x53, 0x69, 0xe0, 0x7b, 0x04, 0x7e, 0x10, 0xd7, 0x90, 0x6e, 0xc0,
-       0x39, 0x6b, 0xbf, 0x45, 0xcc, 0xa3, 0xbc, 0x30, 0x67, 0xee, 0x91, 0x59,
-       0x58, 0x8b, 0x53, 0xa4, 0xff, 0x62, 0xf3, 0x4e, 0xee, 0x5c, 0x11, 0xf3,
-       0xbe, 0x49, 0xdd, 0x25, 0xe2, 0xdd, 0x0d, 0xd4, 0x4b, 0x06, 0xf8, 0x93,
-       0xf9, 0x04, 0x78, 0x7e, 0x5b, 0x97, 0x95, 0xf9, 0xf3, 0x1b, 0x73, 0x03,
-       0xc4, 0x37, 0x5b, 0x79, 0x0e, 0x09, 0xdc, 0x4c, 0x39, 0xfb, 0x2e, 0xe4,
-       0xac, 0x59, 0x9d, 0xfb, 0x94, 0xca, 0xf4, 0xe7, 0x0a, 0x90, 0x1f, 0xde,
-       0x87, 0xa3, 0xdf, 0x57, 0xd0, 0xf1, 0x58, 0xce, 0x93, 0x98, 0xde, 0xf8,
-       0x07, 0xec, 0x73, 0xfd, 0x19, 0x6c, 0xe3, 0xfd, 0x12, 0xca, 0x5b, 0x42,
-       0xcd, 0x79, 0x78, 0x9d, 0xbf, 0x72, 0x04, 0xba, 0x60, 0x01, 0xf2, 0x3c,
-       0x09, 0x1d, 0x38, 0x14, 0xe6, 0xfe, 0x6c, 0xd1, 0xbe, 0xac, 0x4b, 0xbf,
-       0x3d, 0x34, 0x86, 0x3e, 0xac, 0xe3, 0xaf, 0xcb, 0x14, 0xf4, 0xff, 0x74,
-       0x3d, 0xa5, 0xbe, 0x17, 0xc9, 0x26, 0x78, 0x07, 0x8c, 0xe5, 0x63, 0x18,
-       0xff, 0x75, 0xe0, 0xe1, 0xcd, 0xa0, 0xa7, 0xa5, 0x79, 0xf5, 0x2b, 0x3a,
-       0x16, 0x15, 0x63, 0x2c, 0x1e, 0x7a, 0xb3, 0x14, 0x60, 0xcd, 0xf8, 0x34,
-       0xd2, 0xcd, 0x2d, 0x81, 0xbc, 0x4e, 0x6e, 0xd5, 0x77, 0x2f, 0x50, 0xfe,
-       0x98, 0x8a, 0x41, 0x06, 0x6b, 0x72, 0xb4, 0xaf, 0x12, 0x85, 0xcc, 0x71,
-       0x5d, 0xf7, 0xa2, 0x1e, 0x65, 0xad, 0x4f, 0x9f, 0xcd, 0xb6, 0x28, 0xfd,
-       0x98, 0x87, 0x2c, 0x15, 0x94, 0x1f, 0x01, 0x7c, 0xef, 0xb1, 0xdd, 0xaf,
-       0x6f, 0xe5, 0xd9, 0x67, 0x93, 0xab, 0x7c, 0x8b, 0xce, 0xb0, 0x98, 0xb2,
-       0x8f, 0xa0, 0x8c, 0x72, 0x76, 0x03, 0x78, 0xc3, 0xb2, 0x1c, 0xf2, 0x1c,
-       0xeb, 0x46, 0x3d, 0x0e, 0xc7, 0xb8, 0xb4, 0x79, 0xed, 0x9c, 0xb8, 0x96,
-       0xce, 0x75, 0x77, 0xe7, 0x59, 0x76, 0x83, 0x2e, 0x8b, 0xe8, 0xf5, 0xfd,
-       0xa9, 0xfe, 0xb6, 0xc1, 0x39, 0x9a, 0x5d, 0xc1, 0xc6, 0x9c, 0x5f, 0x4c,
-       0xb5, 0xcb, 0xda, 0x81, 0xec, 0x1c, 0x01, 0x3f, 0x22, 0x99, 0xaf, 0xf1,
-       0x4c, 0x19, 0xf4, 0x35, 0x7b, 0x22, 0xa1, 0xfc, 0xce, 0xa4, 0x15, 0xdc,
-       0x5d, 0xba, 0x58, 0x6e, 0xf4, 0x19, 0xcc, 0xfd, 0x6f, 0x57, 0xc6, 0x56,
-       0x78, 0x45, 0xbe, 0x91, 0x5f, 0xef, 0xc6, 0x2b, 0xf2, 0x91, 0xfc, 0x2a,
-       0x48, 0x69, 0x96, 0x7c, 0xa2, 0xbc, 0x8c, 0x29, 0x79, 0x29, 0x55, 0x0c,
-       0x4e, 0xa6, 0x2e, 0xe1, 0x37, 0x0f, 0x1b, 0x9d, 0xd7, 0x9b, 0xbb, 0x61,
-       0xbf, 0x44, 0xfa, 0x85, 0x86, 0xe1, 0x1e, 0x2d, 0xcc, 0x2a, 0x9d, 0x02,
-       0xbb, 0x98, 0x50, 0xba, 0xa2, 0x30, 0xce, 0xfc, 0xd2, 0x56, 0x7e, 0x9b,
-       0x8b, 0x79, 0xa0, 0xbc, 0x53, 0xf3, 0xf5, 0x06, 0x75, 0xbf, 0x89, 0x7b,
-       0xb0, 0x54, 0xa9, 0xab, 0xf7, 0x67, 0xe7, 0x9a, 0x54, 0xfd, 0xb3, 0x73,
-       0xeb, 0xef, 0x28, 0xb1, 0xec, 0x66, 0xc6, 0x55, 0x64, 0x71, 0xa6, 0x49,
-       0x96, 0xe6, 0xfe, 0x90, 0x7e, 0x22, 0x8c, 0xc1, 0xca, 0xf7, 0x1d, 0xfa,
-       0x5b, 0x2c, 0x5f, 0x86, 0x21, 0x37, 0x0b, 0x83, 0xd3, 0x52, 0x1d, 0xa4,
-       0x1f, 0xa4, 0xee, 0x0e, 0x62, 0xbd, 0x4d, 0xc0, 0xc0, 0xc0, 0x85, 0x2e,
-       0xe3, 0xcf, 0x5b, 0xb4, 0x3e, 0x79, 0xb0, 0x75, 0x25, 0x2e, 0x1d, 0x2f,
-       0xfa, 0x55, 0xd7, 0x7c, 0x33, 0xc3, 0x3e, 0xf9, 0xdd, 0x0c, 0x79, 0x66,
-       0xa1, 0x3d, 0xef, 0x64, 0x76, 0x33, 0xae, 0xad, 0xf9, 0x1c, 0x46, 0x7d,
-       0xa6, 0xbf, 0xa7, 0xf3, 0x73, 0x3a, 0xfd, 0xac, 0xec, 0x3f, 0xf9, 0x19,
-       0xcc, 0x7b, 0x53, 0x70, 0xef, 0x4a, 0x1a, 0xbf, 0x9b, 0x88, 0xe8, 0x6f,
-       0x34, 0x3e, 0x8b, 0x32, 0xc6, 0xe2, 0x3e, 0xab, 0xd6, 0xc4, 0xbb, 0x7d,
-       0x45, 0xf9, 0x79, 0x77, 0x54, 0x8c, 0x3f, 0xc8, 0xfb, 0x53, 0x2d, 0xba,
-       0xbf, 0x3d, 0x5a, 0x96, 0xc6, 0x65, 0x3f, 0xec, 0x5d, 0x01, 0xb8, 0x98,
-       0x77, 0xce, 0x26, 0xc2, 0x8d, 0x63, 0x9a, 0xfd, 0x14, 0xc4, 0x1a, 0xcc,
-       0xdd, 0x87, 0xb0, 0xf2, 0x89, 0x56, 0xe2, 0x16, 0xba, 0x7c, 0x5c, 0x0e,
-       0x94, 0x55, 0xfc, 0x42, 0x9d, 0x59, 0x4e, 0x43, 0x2f, 0x0c, 0x29, 0x9b,
-       0x16, 0x0b, 0x0d, 0xd7, 0x32, 0x52, 0x38, 0xbd, 0x17, 0xe3, 0x30, 0x16,
-       0x98, 0xd5, 0x67, 0x83, 0xfb, 0x64, 0x7f, 0x3d, 0x18, 0x7b, 0xb2, 0xcc,
-       0xf7, 0x29, 0xe0, 0x04, 0xbe, 0xcf, 0x27, 0xc2, 0xea, 0x74, 0xe3, 0x56,
-       0xb4, 0x6d, 0xd2, 0x74, 0xe6, 0xbd, 0x6b, 0xb6, 0xa7, 0x0e, 0x00, 0xc0,
-       0x69, 0xc9, 0xe3, 0x3d, 0xdb, 0x98, 0xfe, 0x26, 0x61, 0xb7, 0xe8, 0x9f,
-       0x3f, 0x2a, 0xcb, 0x95, 0x69, 0xb9, 0x5c, 0x31, 0xb2, 0xce, 0xbb, 0xd7,
-       0x9c, 0xfb, 0x5d, 0xc1, 0xb7, 0xbf, 0xe5, 0x2c, 0xf8, 0xb3, 0x96, 0x56,
-       0xf9, 0x35, 0xdf, 0xdb, 0xfc, 0x2b, 0x3b, 0xf8, 0xe6, 0x6d, 0xb7, 0xba,
-       0xc3, 0xb5, 0x76, 0xcf, 0xb1, 0x9f, 0xfd, 0x36, 0xcf, 0x3a, 0x82, 0x7b,
-       0x68, 0x9d, 0x0d, 0xef, 0xe3, 0xfa, 0xee, 0xd7, 0xa7, 0xec, 0x80, 0x8f,
-       0xa4, 0xe7, 0x98, 0x9e, 0xef, 0xad, 0xd8, 0xff, 0xec, 0xf3, 0x31, 0xcd,
-       0x37, 0xa4, 0x0b, 0x7c, 0xe6, 0xfe, 0x5a, 0xd6, 0xe7, 0xbf, 0xb6, 0x1e,
-       0xa3, 0xf1, 0xee, 0x5d, 0x53, 0xc3, 0xb8, 0x6c, 0x4f, 0xfb, 0x64, 0xee,
-       0x80, 0xb3, 0xec, 0xa4, 0xbe, 0xe3, 0x77, 0xb5, 0xa1, 0xcc, 0xdc, 0x45,
-       0x23, 0xbd, 0x18, 0xd3, 0x44, 0x5a, 0x1f, 0xd3, 0xcf, 0x63, 0x0d, 0xdf,
-       0xc8, 0x98, 0x3e, 0x23, 0xe8, 0xc3, 0xdc, 0x41, 0x6f, 0xbc, 0x53, 0xcc,
-       0xef, 0x83, 0x28, 0x8b, 0x16, 0xbf, 0x61, 0xa6, 0x1f, 0x08, 0xec, 0xb6,
-       0x45, 0x26, 0xd5, 0x7c, 0x8a, 0xea, 0xbe, 0x06, 0xbf, 0x9b, 0x19, 0xb2,
-       0x83, 0xfc, 0xe4, 0xc2, 0x7a, 0x39, 0x65, 0xf9, 0x33, 0xcd, 0xd2, 0x52,
-       0xc4, 0x38, 0x7c, 0xbf, 0xd1, 0xf7, 0xf4, 0x51, 0xfd, 0x9d, 0x90, 0x87,
-       0x36, 0x4f, 0x50, 0xde, 0x8b, 0xc5, 0x95, 0x7b, 0xa2, 0xc5, 0xe0, 0x1b,
-       0x26, 0xcb, 0xdc, 0xd7, 0xe4, 0x37, 0xda, 0x22, 0x17, 0x6a, 0xfc, 0x3e,
-       0x69, 0xb7, 0xba, 0x47, 0x13, 0x9c, 0x4d, 0x72, 0x5e, 0x3d, 0xca, 0x2e,
-       0x54, 0x6b, 0x25, 0xd2, 0x54, 0xdb, 0xf6, 0xa8, 0xb6, 0xed, 0xa4, 0xf1,
-       0x08, 0x68, 0xfc, 0x25, 0xcd, 0x17, 0xb6, 0xcf, 0xaa, 0xfb, 0xdd, 0xd9,
-       0x38, 0xcf, 0xc7, 0x1e, 0x53, 0x6b, 0xa1, 0x9d, 0x40, 0xdb, 0x5f, 0x0e,
-       0xab, 0x78, 0xa7, 0xfa, 0x06, 0x1c, 0xf2, 0xc9, 0x6f, 0xba, 0xa1, 0xe3,
-       0xcb, 0xfc, 0x76, 0x7b, 0x04, 0x29, 0xbf, 0xd9, 0xde, 0xab, 0xee, 0xff,
-       0x57, 0xd5, 0x37, 0x01, 0x46, 0x1e, 0xc3, 0x7a, 0xac, 0x6f, 0x62, 0x8c,
-       0x80, 0xef, 0x85, 0x32, 0xbf, 0xe5, 0x36, 0x77, 0x4c, 0x37, 0x2f, 0x73,
-       0x4f, 0x88, 0xf2, 0xf3, 0x83, 0x6f, 0xfb, 0xab, 0xea, 0x3b, 0x82, 0x24,
-       0xbf, 0x2b, 0x84, 0xfd, 0xba, 0x1f, 0xcf, 0x3c, 0x57, 0xde, 0x87, 0x14,
-       0xfa, 0xa7, 0x36, 0x81, 0xf4, 0x61, 0xc9, 0xab, 0xb8, 0x5f, 0x2b, 0xf2,
-       0x93, 0x6a, 0xec, 0x52, 0xed, 0x13, 0xb2, 0xff, 0xf4, 0x43, 0xfc, 0x5e,
-       0x42, 0x7d, 0x77, 0x9e, 0xf3, 0x38, 0xc7, 0xb8, 0x4c, 0xa9, 0x75, 0x17,
-       0x35, 0xed, 0xcd, 0x59, 0xcc, 0xcf, 0xd4, 0xb7, 0x19, 0xc5, 0x5a, 0x2b,
-       0xe6, 0x18, 0xd2, 0xf7, 0x4c, 0xe9, 0x0f, 0x98, 0xf5, 0xb7, 0xf0, 0xee,
-       0xa2, 0xcf, 0xf3, 0xc3, 0xfd, 0x65, 0xde, 0x23, 0x4d, 0xe9, 0x38, 0x01,
-       0x63, 0x87, 0x3c, 0x9f, 0xa0, 0x8c, 0x3b, 0xe9, 0x09, 0x58, 0xa0, 0xa8,
-       0x24, 0x78, 0xb6, 0xad, 0xd7, 0xd2, 0xda, 0xb0, 0x16, 0xde, 0x9d, 0x0d,
-       0xd6, 0xc3, 0xef, 0x21, 0x0a, 0xe5, 0xc6, 0x6f, 0x2a, 0xd4, 0x37, 0xd0,
-       0xfc, 0x76, 0x46, 0x26, 0x6a, 0x9f, 0x94, 0x07, 0xca, 0x5b, 0xf4, 0xf7,
-       0x14, 0x31, 0x79, 0xa0, 0xf6, 0xba, 0xa2, 0x69, 0x41, 0x7d, 0xd7, 0x11,
-       0xd5, 0x3c, 0x33, 0xdf, 0x54, 0x04, 0xfd, 0x1d, 0xa8, 0x39, 0x0d, 0xdf,
-       0x2f, 0x44, 0x65, 0x62, 0xe1, 0x47, 0x91, 0x8d, 0xbf, 0x61, 0x78, 0x54,
-       0x72, 0xa7, 0x69, 0xa3, 0xa7, 0xe5, 0xf1, 0x8a, 0xef, 0xdf, 0xe9, 0x11,
-       0x5b, 0x6e, 0x96, 0xcb, 0xf1, 0xb1, 0x3d, 0x6f, 0xb8, 0x1d, 0xa1, 0xea,
-       0x6c, 0x33, 0x74, 0x2f, 0xf1, 0x8c, 0xb4, 0x30, 0xbf, 0x30, 0xcb, 0x7d,
-       0x1a, 0xc1, 0x1a, 0x1d, 0xfb, 0x9a, 0xdc, 0xde, 0xce, 0xb8, 0xdb, 0x9d,
-       0xf0, 0x65, 0x7f, 0xdb, 0x0b, 0xf4, 0xf5, 0xe7, 0x16, 0xf7, 0xca, 0xe7,
-       0x6a, 0xb1, 0x50, 0x75, 0x86, 0xf7, 0x0d, 0x9d, 0x91, 0x8a, 0xa4, 0x50,
-       0x8f, 0xfd, 0x43, 0x5e, 0x12, 0xd7, 0xc9, 0xb3, 0x27, 0x7f, 0xea, 0x5f,
-       0x73, 0xf1, 0x1e, 0xba, 0xe6, 0xb2, 0x67, 0x62, 0x8b, 0x63, 0xf0, 0x5d,
-       0x59, 0xef, 0x3a, 0xc8, 0x01, 0xb0, 0x03, 0xf6, 0x1c, 0xfd, 0xdc, 0x6b,
-       0x5a, 0x6f, 0x59, 0xc7, 0x6e, 0x92, 0x6b, 0x2b, 0xf7, 0x95, 0x5f, 0x83,
-       0x6c, 0x27, 0x03, 0xfa, 0xab, 0x58, 0xfc, 0x21, 0x09, 0x7f, 0x1e, 0x36,
-       0xe5, 0xf3, 0x4d, 0x4a, 0xb7, 0xd3, 0xb6, 0xc1, 0x07, 0x82, 0x9f, 0x13,
-       0x41, 0x3f, 0xa9, 0xf6, 0x40, 0x66, 0xa7, 0x45, 0xbe, 0xb0, 0x49, 0xb2,
-       0xed, 0xf4, 0xa3, 0xe5, 0xe7, 0xe8, 0xaf, 0xc6, 0x7d, 0x96, 0x96, 0x3f,
-       0xe2, 0x1e, 0xaf, 0x73, 0x2d, 0xa9, 0xc4, 0x9f, 0xc9, 0xa7, 0x65, 0x22,
-       0xc1, 0xb5, 0x3c, 0x2a, 0xc5, 0xca, 0x63, 0xf8, 0x71, 0x9d, 0x9c, 0xf7,
-       0xc7, 0xf4, 0x5d, 0x86, 0x31, 0x29, 0xcd, 0x64, 0x64, 0x6a, 0x6e, 0x92,
-       0xdf, 0xa0, 0x8e, 0xdc, 0xa9, 0xce, 0xf8, 0x9c, 0x44, 0x2a, 0xb4, 0x2d,
-       0x39, 0xc5, 0xbb, 0x1b, 0x6a, 0x3d, 0x93, 0x58, 0xcf, 0xe3, 0xed, 0xbc,
-       0xb3, 0x7e, 0x0d, 0xfa, 0xd7, 0x3a, 0x45, 0x39, 0x74, 0xec, 0xee, 0x10,
-       0xf3, 0xfb, 0xe0, 0xbf, 0xb3, 0x6c, 0x9f, 0x84, 0x8f, 0xad, 0xe8, 0x79,
-       0x94, 0xeb, 0xb3, 0x66, 0xd5, 0xfe, 0x14, 0xda, 0xa2, 0xde, 0x31, 0xd3,
-       0xd6, 0xd4, 0x61, 0x5b, 0xae, 0x73, 0xaf, 0x34, 0x9f, 0x33, 0xf3, 0x82,
-       0x1c, 0x26, 0x1a, 0xe9, 0xdd, 0xb2, 0x8e, 0xde, 0x11, 0x62, 0x5e, 0xd0,
-       0x8b, 0x34, 0x0e, 0x6b, 0x1a, 0x7f, 0x05, 0xfd, 0x1b, 0x1e, 0xdc, 0x89,
-       0x32, 0x5b, 0x7f, 0x93, 0xf4, 0x7e, 0xe8, 0x4e, 0x9a, 0xb3, 0x3e, 0xe9,
-       0x4e, 0xd9, 0xe2, 0x7c, 0x36, 0xa2, 0xf9, 0xeb, 0x9a, 0x2f, 0xfb, 0x40,
-       0x2f, 0xde, 0x2b, 0xdd, 0xa6, 0xbe, 0x2f, 0xc8, 0x8e, 0xef, 0x83, 0xec,
-       0x98, 0x75, 0x6d, 0x83, 0x8c, 0xf1, 0xdc, 0x84, 0xf5, 0x1b, 0x69, 0x12,
-       0xd8, 0xbd, 0x30, 0x63, 0x1f, 0x2e, 0xd7, 0x0a, 0x5c, 0xfa, 0x05, 0xda,
-       0x28, 0x7e, 0x63, 0x7d, 0xb3, 0xb6, 0x51, 0x3f, 0x8f, 0xc7, 0x3f, 0x6a,
-       0x0f, 0x6c, 0x94, 0x0d, 0x9a, 0xb4, 0xe9, 0x36, 0xfb, 0x80, 0x91, 0x19,
-       0x0f, 0x4e, 0x25, 0x1e, 0x14, 0x33, 0x8e, 0xbf, 0x9b, 0x7e, 0xef, 0xd0,
-       0xc0, 0x36, 0xa0, 0x16, 0x75, 0x67, 0x27, 0xc1, 0x3b, 0x40, 0xa9, 0xd0,
-       0x3e, 0x75, 0x7f, 0x63, 0xed, 0xf7, 0x23, 0x69, 0x79, 0x76, 0x55, 0x56,
-       0x46, 0x7e, 0x28, 0x8e, 0x24, 0x6f, 0xa4, 0xac, 0xb0, 0xdf, 0x49, 0xae,
-       0x33, 0xf1, 0x90, 0x5a, 0xa7, 0x0d, 0x3f, 0x92, 0x77, 0x2d, 0xec, 0x50,
-       0x75, 0x8e, 0x7c, 0x47, 0xba, 0xc8, 0x67, 0x73, 0xde, 0xab, 0xf4, 0x0a,
-       0xc6, 0x65, 0x19, 0x75, 0x23, 0xdf, 0x67, 0xf4, 0x79, 0x70, 0x7b, 0x07,
-       0xef, 0x24, 0x14, 0x50, 0x56, 0x59, 0xdc, 0x78, 0x6e, 0xbf, 0xad, 0xe4,
-       0xe0, 0x51, 0xd0, 0xfd, 0x9f, 0xa1, 0xee, 0x63, 0x48, 0xb9, 0xc6, 0xcc,
-       0x0a, 0xdf, 0x49, 0xef, 0x8f, 0xca, 0x20, 0xe4, 0x82, 0xf9, 0x47, 0x81,
-       0x37, 0x69, 0x4f, 0x91, 0x56, 0xf8, 0x4c, 0x5d, 0xef, 0x6a, 0x7b, 0xca,
-       0xb9, 0xec, 0xc3, 0x5c, 0xd4, 0x3a, 0xb5, 0x3c, 0xdd, 0xaf, 0xdb, 0x8d,
-       0xaf, 0xd0, 0xea, 0xa1, 0x77, 0xe0, 0x8d, 0xe8, 0x0a, 0xde, 0x08, 0xc6,
-       0xca, 0x76, 0x18, 0xac, 0x11, 0xac, 0x21, 0xc0, 0x1a, 0x81, 0x9c, 0x4f,
-       0x4a, 0x04, 0x72, 0x1c, 0x5e, 0x95, 0x63, 0xe0, 0x9e, 0x60, 0xcf, 0x4c,
-       0xf1, 0x1c, 0x53, 0xd1, 0x99, 0x72, 0x48, 0xf9, 0x25, 0x1f, 0x1b, 0x79,
-       0x7d, 0xfb, 0xbb, 0xf0, 0xba, 0xd4, 0x61, 0xf0, 0xc3, 0x3f, 0x6c, 0x1f,
-       0x3c, 0xd2, 0xb1, 0xba, 0x0f, 0x6e, 0xfa, 0x05, 0xed, 0x83, 0xf5, 0x72,
-       0xd9, 0x28, 0x53, 0x36, 0xe4, 0x89, 0xfc, 0xa2, 0x3c, 0x51, 0x8e, 0x48,
-       0x4b, 0xea, 0xd3, 0x66, 0xfa, 0x6f, 0x89, 0xab, 0xea, 0xdb, 0x91, 0x69,
-       0xe8, 0xa0, 0x8e, 0x50, 0xa5, 0x12, 0x97, 0xd2, 0xe2, 0x4f, 0x94, 0x4c,
-       0x3f, 0x5b, 0xa7, 0x5e, 0x7a, 0xaf, 0xb5, 0xaf, 0xd5, 0xb9, 0x85, 0x75,
-       0x3a, 0xb7, 0xb0, 0xa2, 0x73, 0xdb, 0xb5, 0xcf, 0xf6, 0x0f, 0xd1, 0xb9,
-       0xf1, 0x86, 0xb3, 0x21, 0x73, 0x2e, 0x24, 0xa1, 0x5c, 0x5f, 0x8b, 0xec,
-       0x81, 0x1d, 0x19, 0x99, 0xd9, 0x2b, 0x7f, 0x30, 0x33, 0xad, 0xee, 0x49,
-       0x7d, 0xd3, 0x4b, 0x25, 0x3e, 0x11, 0xf2, 0xe5, 0xa3, 0xf0, 0xb9, 0x27,
-       0xba, 0x9a, 0x64, 0xcf, 0x6d, 0xea, 0xbc, 0xd3, 0xce, 0x85, 0x3a, 0x85,
-       0x91, 0xf8, 0xbc, 0xe7, 0x78, 0xc9, 0x10, 0xef, 0xcc, 0x35, 0xcb, 0x44,
-       0xbc, 0x55, 0xf6, 0x02, 0x3b, 0x15, 0xaf, 0xf7, 0xd4, 0x37, 0xd3, 0x59,
-       0x75, 0x9e, 0xf4, 0x86, 0xe6, 0x3b, 0xe8, 0xd0, 0x66, 0xcb, 0x7f, 0xac,
-       0x33, 0xcf, 0xf2, 0x07, 0xd7, 0xe5, 0xf9, 0xfc, 0x04, 0xfc, 0xb9, 0x38,
-       0x68, 0xd5, 0x78, 0xff, 0x28, 0xac, 0xe8, 0x59, 0xaa, 0x8c, 0xab, 0x7b,
-       0x5d, 0x57, 0xc3, 0xa4, 0x97, 0xf2, 0xa1, 0x12, 0xb9, 0x30, 0x30, 0xce,
-       0x2c, 0x90, 0xb4, 0x4b, 0xbf, 0x53, 0xe3, 0x4f, 0xe8, 0xff, 0xfd, 0xea,
-       0x7c, 0x79, 0x19, 0xb4, 0xf1, 0x55, 0xfc, 0xb9, 0x10, 0x27, 0xae, 0x5f,
-       0xbd, 0xc3, 0xfc, 0x4e, 0x7c, 0xaf, 0xb0, 0xbd, 0x39, 0x0b, 0xd1, 0xf1,
-       0x2a, 0x1d, 0x07, 0x50, 0x67, 0x7b, 0x1b, 0xfd, 0xbf, 0x0b, 0xc4, 0x7a,
-       0xfc, 0xae, 0x9f, 0xd8, 0xce, 0x39, 0x5a, 0x91, 0x1f, 0x2a, 0x5f, 0x34,
-       0x4b, 0xfa, 0x56, 0xc1, 0xa7, 0xe3, 0x09, 0x63, 0xcf, 0x43, 0xdd, 0xe7,
-       0x1b, 0x7d, 0x51, 0xf6, 0x11, 0x53, 0x77, 0x42, 0x56, 0xff, 0x9f, 0x17,
-       0xc6, 0x98, 0xb2, 0xa1, 0xbb, 0xcb, 0xd3, 0x12, 0x3e, 0x31, 0x26, 0x91,
-       0xe3, 0x8c, 0xe7, 0x67, 0xa5, 0x14, 0xf7, 0xe5, 0x01, 0x6f, 0xad, 0x6f,
-       0xd2, 0x6d, 0xad, 0x9f, 0xfb, 0xa3, 0x32, 0x74, 0xfa, 0x31, 0x89, 0x9e,
-       0xe0, 0xbb, 0x35, 0x67, 0x39, 0xd0, 0x47, 0x9b, 0xa5, 0x12, 0x67, 0x4c,
-       0x3b, 0xaa, 0xce, 0xc6, 0x2f, 0x8f, 0xbf, 0x1e, 0x2d, 0x01, 0x2b, 0x14,
-       0x94, 0x6e, 0x41, 0xba, 0xe2, 0x4b, 0xe4, 0xae, 0xe3, 0x9e, 0x82, 0xbf,
-       0x19, 0x9a, 0xa8, 0x44, 0xd5, 0x1d, 0xa5, 0xcb, 0x71, 0xd6, 0x7d, 0x0c,
-       0x7e, 0x37, 0x71, 0x06, 0x74, 0xc7, 0x98, 0xb4, 0x30, 0x1f, 0x3e, 0xb1,
-       0x8a, 0x33, 0xa8, 0x13, 0x86, 0xbc, 0xb8, 0x44, 0xce, 0x04, 0x6b, 0xe7,
-       0x7f, 0x1c, 0x64, 0xcd, 0xef, 0x95, 0xf0, 0x71, 0x3e, 0x37, 0xfa, 0x43,
-       0xc4, 0xee, 0xb0, 0x0d, 0xe7, 0x7f, 0x1f, 0xfd, 0xf1, 0x5d, 0x56, 0x7f,
-       0x87, 0x8b, 0x7c, 0xf5, 0xef, 0xfa, 0x7f, 0x04, 0x50, 0xf6, 0xff, 0x3f,
-       0xc3, 0x8e, 0xbb, 0xb0, 0xa8, 0x4d, 0x00, 0x00, 0x00 };
-
-static const u32 bnx2_COM_b06FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_COM_b06FwRodata[(0x14/4) + 1] = {
-       0x08000e7c, 0x08000ec4, 0x08000f04, 0x08000f50, 0x08000f84, 0x00000000
-};
-
-static struct fw_info bnx2_com_fw_06 = {
-       /* Firmware version: 4.6.16 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0x10,
-
-       .start_addr                     = 0x080000f8,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x4da4,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_COM_b06FwText,
-       .gz_text_len                    = sizeof(bnx2_COM_b06FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_COM_b06FwData,
-
-       .sbss_addr                      = 0x08004de0,
-       .sbss_len                       = 0x38,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08004e18,
-       .bss_len                        = 0xbc,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x08004da4,
-       .rodata_len                     = 0x14,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_COM_b06FwRodata,
-};
-
 /* Initialized Values for the Completion Processor. */
 static const struct cpu_reg cpu_reg_com = {
        .mode = BNX2_COM_CPU_MODE,
@@ -897,1277 +23,6 @@ static const struct cpu_reg cpu_reg_com = {
        .mips_view_base = 0x8000000,
 };
 
-static u8 bnx2_CP_b06FwText[] = {
-       0x9d, 0xbc, 0x0d, 0x7c, 0x1b, 0xe5, 0x95, 0x2e, 0xfe, 0xcc, 0x48, 0xb2,
-       0x65, 0x5b, 0xb6, 0xc7, 0x8e, 0x92, 0x28, 0xac, 0x37, 0xd1, 0xc4, 0x23,
-       0x47, 0xc1, 0xa6, 0x8c, 0x12, 0x27, 0xa8, 0xac, 0x4a, 0x54, 0xc7, 0x24,
-       0x4e, 0x48, 0xc1, 0x29, 0x69, 0x6b, 0xb8, 0x2d, 0xa8, 0xf9, 0xc2, 0x84,
-       0x40, 0x43, 0xcb, 0xde, 0x6b, 0xee, 0xed, 0xae, 0x55, 0xdb, 0x49, 0x9c,
-       0x44, 0x96, 0x6c, 0xc7, 0x24, 0xa1, 0xdb, 0xff, 0xa2, 0xc4, 0xce, 0x07,
-       0x54, 0xb6, 0xd2, 0x96, 0xee, 0x86, 0xde, 0x74, 0xd1, 0x4d, 0x02, 0x18,
-       0xca, 0x47, 0xda, 0xe5, 0x76, 0x69, 0x7f, 0xbd, 0xc5, 0x97, 0x42, 0x08,
-       0x5b, 0x0a, 0xe9, 0xe7, 0x86, 0x7e, 0x30, 0xf7, 0x39, 0x23, 0x29, 0x31,
-       0x2c, 0xdb, 0x76, 0xff, 0xfa, 0xfd, 0xe6, 0x27, 0xcd, 0xe8, 0xfd, 0x38,
-       0xef, 0x79, 0xcf, 0x79, 0xce, 0x73, 0xde, 0x79, 0x67, 0xfc, 0x40, 0x39,
-       0x0a, 0x9f, 0x4a, 0x1e, 0x1f, 0x6a, 0xde, 0xb6, 0x61, 0x69, 0xe8, 0x43,
-       0x4b, 0xe5, 0xdc, 0xa9, 0x95, 0x38, 0xf1, 0x67, 0x7e, 0xfc, 0x7f, 0x6e,
-       0xc1, 0xc2, 0x47, 0xe1, 0xd1, 0x58, 0xf8, 0xed, 0x00, 0xb4, 0x62, 0xff,
-       0x72, 0xc0, 0xad, 0x46, 0xc6, 0x3a, 0x5a, 0x0c, 0xb8, 0x1d, 0x91, 0x6d,
-       0xb7, 0x6f, 0x30, 0x80, 0x68, 0xa6, 0xd1, 0xbf, 0x1c, 0x7f, 0xb0, 0xe2,
-       0x5e, 0x27, 0xe4, 0xfa, 0x5f, 0x46, 0x7e, 0xdf, 0xfd, 0xed, 0x6b, 0xf4,
-       0x0b, 0x69, 0x07, 0xdc, 0x5a, 0x24, 0x0e, 0xad, 0x01, 0xee, 0x3a, 0xd6,
-       0xf9, 0xca, 0x82, 0xaf, 0x28, 0xa8, 0x2a, 0xb6, 0x75, 0xde, 0xfa, 0xf6,
-       0x02, 0x5f, 0xac, 0x2c, 0xa2, 0xe1, 0xf1, 0x2c, 0xda, 0x9b, 0x06, 0xba,
-       0xad, 0x4a, 0x23, 0x04, 0xb7, 0x61, 0x74, 0x0c, 0x28, 0x9e, 0xf0, 0x96,
-       0x25, 0xf0, 0x94, 0x1a, 0x88, 0x5f, 0x11, 0x41, 0xfb, 0x95, 0xe3, 0xe5,
-       0x71, 0x67, 0xc4, 0x8d, 0xb6, 0xac, 0x3b, 0xfe, 0x17, 0x11, 0x03, 0x2b,
-       0xb3, 0x46, 0x19, 0xaa, 0x34, 0xf4, 0x65, 0x5f, 0x77, 0xe7, 0xdb, 0x6b,
-       0x2e, 0x7c, 0xdf, 0x56, 0x9b, 0xff, 0x9e, 0x15, 0x73, 0x46, 0x80, 0xed,
-       0x09, 0xcb, 0x2a, 0x89, 0xdc, 0x7c, 0xb3, 0x1a, 0x31, 0x7c, 0x47, 0xb0,
-       0x0c, 0xeb, 0x35, 0x7c, 0x71, 0x47, 0xf3, 0x2f, 0x94, 0x53, 0x23, 0x4d,
-       0x88, 0x1f, 0x75, 0x20, 0xaa, 0x3d, 0xcb, 0xef, 0xb9, 0x73, 0x3b, 0xc2,
-       0x4d, 0x38, 0x70, 0xf4, 0x22, 0xaf, 0x3b, 0xed, 0x6b, 0xbd, 0xfb, 0xe7,
-       0xce, 0xbd, 0x25, 0xfc, 0x2c, 0x1e, 0x3c, 0x2a, 0xbf, 0xef, 0x40, 0x77,
-       0x93, 0x82, 0xa9, 0x9b, 0x37, 0xc3, 0x61, 0x34, 0xa1, 0x6f, 0xbf, 0xe2,
-       0xec, 0x69, 0x52, 0x11, 0xf5, 0xea, 0xc1, 0x18, 0x27, 0xc1, 0x69, 0x20,
-       0x56, 0x1a, 0x09, 0x3b, 0xdf, 0x48, 0x44, 0x34, 0x87, 0x61, 0x59, 0xc1,
-       0xd0, 0x6c, 0x38, 0x6a, 0x2c, 0xeb, 0x31, 0xd3, 0x03, 0xff, 0xa7, 0x9e,
-       0x47, 0x7c, 0xb4, 0x1d, 0xaa, 0xf1, 0x3c, 0x7a, 0x46, 0x9f, 0xc7, 0x43,
-       0x7b, 0xcb, 0x31, 0x35, 0x83, 0xe3, 0x4d, 0xf9, 0xf0, 0xed, 0x05, 0xd2,
-       0xb7, 0xc8, 0xd1, 0xcc, 0xc3, 0x8d, 0x29, 0xc7, 0x39, 0x7e, 0x4b, 0x99,
-       0x8b, 0xd6, 0xd4, 0xec, 0xcb, 0x65, 0xb6, 0xb3, 0x4c, 0xdf, 0xfb, 0xca,
-       0xc4, 0x47, 0x23, 0xf8, 0x4e, 0x42, 0xc1, 0x96, 0x50, 0x15, 0xa2, 0x35,
-       0x32, 0x5e, 0xcb, 0x3a, 0x6a, 0x9e, 0xb3, 0xa6, 0x34, 0xe9, 0x6b, 0x12,
-       0xcf, 0xf2, 0xbf, 0x1d, 0xa1, 0x57, 0xad, 0x9c, 0x57, 0xda, 0xfb, 0x3c,
-       0x6d, 0x68, 0x2d, 0xaf, 0x3b, 0x91, 0x4a, 0x20, 0x56, 0x15, 0xf9, 0x04,
-       0xcf, 0x75, 0xf3, 0x2d, 0xc5, 0xed, 0x7e, 0x3b, 0xe1, 0xfe, 0x54, 0xa5,
-       0xa1, 0xde, 0x57, 0x0d, 0x27, 0x9e, 0xa3, 0xcc, 0x27, 0xcc, 0xcd, 0x70,
-       0x19, 0x5f, 0x10, 0x9b, 0xe3, 0xb8, 0x5e, 0xb4, 0x30, 0xbb, 0x58, 0x5f,
-       0xda, 0xd5, 0xb0, 0x23, 0x65, 0x59, 0xbb, 0xcc, 0xe8, 0x87, 0xcb, 0x68,
-       0x10, 0xa7, 0x13, 0xed, 0x70, 0x47, 0x02, 0xfe, 0xf3, 0x08, 0x63, 0x79,
-       0xd6, 0x8b, 0x27, 0x12, 0x70, 0xb6, 0x2c, 0xa8, 0x43, 0x4f, 0x36, 0x82,
-       0xeb, 0xb3, 0x26, 0x5a, 0xb3, 0x7f, 0xda, 0xca, 0x6e, 0x48, 0xf9, 0x39,
-       0x86, 0x3f, 0x58, 0xf9, 0x31, 0xc8, 0xf8, 0xe4, 0x9b, 0xf3, 0x9a, 0xba,
-       0x02, 0xbb, 0x47, 0x0c, 0xec, 0xe4, 0xfc, 0xad, 0x0a, 0xe5, 0xa2, 0x65,
-       0xd0, 0xcd, 0xf3, 0x88, 0x60, 0x45, 0xd6, 0xe0, 0x9c, 0x46, 0xb0, 0x3c,
-       0x55, 0xaf, 0x8d, 0x62, 0x21, 0xa2, 0xbe, 0xbc, 0x6d, 0xef, 0xe1, 0x78,
-       0xd7, 0x07, 0xda, 0x51, 0x49, 0x1b, 0xc9, 0x2c, 0x09, 0xa3, 0x85, 0xfd,
-       0xaf, 0xf9, 0x33, 0xfa, 0xbf, 0x89, 0xfd, 0xbf, 0xc5, 0xfe, 0x73, 0x76,
-       0xff, 0x70, 0xae, 0xe6, 0xb9, 0x9b, 0xf6, 0xb8, 0x3b, 0xe3, 0x74, 0xae,
-       0x4a, 0x79, 0xb1, 0x2b, 0x63, 0xd2, 0xe6, 0xe4, 0x2f, 0x1f, 0x76, 0x8c,
-       0xd4, 0x61, 0xe7, 0x88, 0xee, 0x7b, 0x8a, 0xbf, 0x7b, 0xc7, 0xae, 0xc0,
-       0xf6, 0x11, 0x05, 0x87, 0x8c, 0x2b, 0xd0, 0xc3, 0xdf, 0x07, 0x46, 0xe6,
-       0xe2, 0xc1, 0x11, 0x07, 0xc2, 0x33, 0xa6, 0x8f, 0x43, 0xbe, 0xaf, 0x40,
-       0x7c, 0xcc, 0x8f, 0x9e, 0xc4, 0xb3, 0xb6, 0x0e, 0x2b, 0x23, 0xdf, 0x2e,
-       0xfa, 0x33, 0x7d, 0xc7, 0x8f, 0x0d, 0x09, 0x1f, 0x7a, 0x52, 0xe2, 0x07,
-       0x6e, 0xda, 0xa6, 0xf8, 0xc1, 0xaf, 0x80, 0x2a, 0xb6, 0x9f, 0x2d, 0xfe,
-       0xaf, 0xc0, 0xc9, 0x79, 0xdb, 0xc8, 0xff, 0x76, 0xa5, 0xc4, 0x26, 0xa4,
-       0x4d, 0xb1, 0x0b, 0xf9, 0x5d, 0x4b, 0xbb, 0x2b, 0x87, 0xff, 0x70, 0x39,
-       0x82, 0x0f, 0x68, 0x78, 0xad, 0x59, 0xae, 0xd3, 0xde, 0x43, 0x52, 0x66,
-       0x10, 0x47, 0x32, 0xe2, 0xa7, 0x7e, 0xb4, 0x24, 0x26, 0xd9, 0x7e, 0x33,
-       0xdb, 0x36, 0xf1, 0x4f, 0xd9, 0x26, 0xfc, 0x63, 0x36, 0x88, 0x7f, 0xa0,
-       0x1e, 0xbf, 0x99, 0xf5, 0xe3, 0xd1, 0x6c, 0x1d, 0xbe, 0x91, 0xf5, 0xe1,
-       0xeb, 0x9c, 0xbf, 0xaf, 0x65, 0xdb, 0x69, 0xfb, 0x1a, 0x8e, 0x67, 0x45,
-       0xff, 0x25, 0x1c, 0x6f, 0x39, 0x7a, 0x47, 0xea, 0x83, 0xa7, 0x69, 0x5b,
-       0xff, 0x60, 0xae, 0x46, 0xae, 0xb6, 0xd9, 0xb6, 0xc9, 0x5d, 0xbc, 0xbe,
-       0x7b, 0xa4, 0x3e, 0x7a, 0xa5, 0x62, 0x59, 0x6a, 0xa8, 0x31, 0x7c, 0x4a,
-       0x55, 0x31, 0xe5, 0xd5, 0xfd, 0x39, 0x55, 0xf7, 0x47, 0xe1, 0x42, 0x82,
-       0xbe, 0x11, 0x9f, 0xa9, 0xa7, 0xe3, 0xb4, 0x29, 0xaf, 0x31, 0xca, 0xf1,
-       0xe8, 0xfe, 0xb8, 0xaa, 0x61, 0x67, 0x4a, 0x3f, 0x10, 0x57, 0xbd, 0x88,
-       0x67, 0xcb, 0xf1, 0xb3, 0x11, 0xbd, 0x3f, 0xae, 0xde, 0x88, 0x78, 0xad,
-       0x65, 0x7d, 0x3d, 0x84, 0x6d, 0xb3, 0x23, 0x88, 0xce, 0x8c, 0x20, 0x36,
-       0x37, 0x52, 0x87, 0x54, 0x0a, 0x78, 0x6b, 0xc0, 0xf0, 0xfd, 0x8b, 0xd2,
-       0x8e, 0xbf, 0x6e, 0xd7, 0xfd, 0x7e, 0xb5, 0x31, 0x3e, 0xaa, 0x2e, 0xa1,
-       0x4b, 0xc3, 0xef, 0x8b, 0xac, 0x44, 0x97, 0x7d, 0x4d, 0x81, 0x66, 0x78,
-       0xd1, 0x9b, 0xfa, 0x30, 0x62, 0xde, 0xfa, 0x8e, 0x21, 0xb5, 0xfe, 0xa2,
-       0xa9, 0xea, 0x93, 0xed, 0xaa, 0x65, 0xfd, 0x7c, 0xf1, 0x5b, 0x96, 0x7f,
-       0x96, 0x65, 0x2d, 0x5a, 0x2c, 0x7d, 0xfa, 0x51, 0x13, 0x31, 0xb1, 0xd6,
-       0x9e, 0xc3, 0x72, 0x9c, 0x1b, 0xa9, 0x65, 0x1f, 0x1a, 0xfe, 0xf7, 0x35,
-       0x7a, 0x70, 0xb3, 0x5a, 0x8e, 0xd7, 0xc6, 0xca, 0xf1, 0x0a, 0xc7, 0xf3,
-       0x8b, 0x11, 0x1f, 0x7e, 0x35, 0x62, 0x59, 0x9f, 0x32, 0xff, 0x0a, 0xc3,
-       0xb5, 0x83, 0xf8, 0xc7, 0x09, 0x2f, 0x7e, 0x96, 0xd0, 0xf0, 0x6a, 0x22,
-       0x7a, 0xef, 0x0c, 0xe8, 0xd1, 0x09, 0xe5, 0xf4, 0xed, 0x55, 0x68, 0x6c,
-       0xaf, 0x52, 0xf4, 0xb6, 0x3d, 0xd0, 0x7d, 0x57, 0x2a, 0x5e, 0x9c, 0xcf,
-       0x68, 0xf8, 0x49, 0xa6, 0x3e, 0xfc, 0xcf, 0xec, 0xf3, 0x37, 0xe6, 0x63,
-       0x56, 0x6e, 0x96, 0xe8, 0x4d, 0x74, 0x44, 0x3d, 0xa7, 0xa8, 0xe7, 0x14,
-       0xf5, 0x9c, 0xa2, 0x9e, 0x29, 0xc3, 0xa3, 0x29, 0xea, 0x99, 0xba, 0xfb,
-       0x3a, 0x6d, 0xea, 0x6b, 0x9c, 0xc7, 0xe3, 0xf6, 0x3c, 0x86, 0x39, 0x5f,
-       0x7f, 0x81, 0xbf, 0xb5, 0xb1, 0xf5, 0x59, 0xeb, 0xbf, 0x79, 0x65, 0x4c,
-       0x0f, 0xcf, 0xcc, 0xe3, 0x97, 0x8c, 0xed, 0x3b, 0x56, 0x4c, 0x93, 0x71,
-       0xc9, 0xf8, 0x6c, 0xfd, 0xf9, 0xb7, 0x29, 0x3b, 0x15, 0x94, 0x5b, 0xd6,
-       0x5e, 0xb3, 0xf0, 0xbf, 0xb7, 0x38, 0xbe, 0x9b, 0x95, 0xbc, 0x5d, 0xfd,
-       0x5d, 0x29, 0xf5, 0x1d, 0x8c, 0xaa, 0x2b, 0x79, 0xae, 0xc7, 0xa3, 0xf8,
-       0xa8, 0xe3, 0xbd, 0xe7, 0xf7, 0x7a, 0x65, 0x3e, 0xfc, 0x97, 0xce, 0x69,
-       0x8f, 0x76, 0x7f, 0x77, 0xf2, 0x5c, 0xc6, 0x22, 0xb6, 0x28, 0x36, 0xe0,
-       0xa5, 0xbd, 0x5c, 0x53, 0xf8, 0x0f, 0x71, 0x35, 0xb2, 0x0d, 0xed, 0xcd,
-       0x8f, 0xd8, 0x7d, 0x94, 0x24, 0xc5, 0x6f, 0x14, 0xbc, 0xf5, 0x61, 0x05,
-       0xa7, 0x42, 0x06, 0x6d, 0xe6, 0x18, 0x71, 0x01, 0x28, 0x4d, 0xc2, 0xed,
-       0x89, 0x44, 0x90, 0x18, 0x80, 0xbb, 0x2c, 0x12, 0xc6, 0xc2, 0x81, 0xfa,
-       0xce, 0x73, 0xd0, 0x83, 0x03, 0x8a, 0xde, 0xce, 0x58, 0x62, 0x8e, 0x53,
-       0x8f, 0x57, 0x2a, 0xba, 0xbf, 0x44, 0x81, 0x5b, 0x61, 0xb9, 0x40, 0xe6,
-       0x18, 0x76, 0x66, 0xe5, 0x77, 0x18, 0x46, 0xe6, 0x37, 0xc5, 0xbe, 0x24,
-       0xa6, 0xd0, 0xee, 0xcf, 0x71, 0xec, 0xba, 0x9f, 0xf8, 0xea, 0x76, 0x45,
-       0x3a, 0x71, 0x38, 0x01, 0x77, 0x49, 0x64, 0x2b, 0x9e, 0x4c, 0x84, 0x67,
-       0x16, 0xcb, 0x29, 0x2c, 0xe7, 0xcf, 0x4c, 0x97, 0xe5, 0xc7, 0x56, 0xd4,
-       0x9b, 0x97, 0xa5, 0x3c, 0x79, 0x0c, 0x7b, 0x52, 0x52, 0x37, 0x62, 0xd7,
-       0x75, 0xb2, 0x8f, 0xbe, 0x44, 0x7d, 0xdb, 0x0d, 0x8a, 0x1e, 0x7e, 0x98,
-       0xf3, 0xd7, 0x83, 0xc6, 0xe8, 0x1b, 0xd0, 0xb5, 0x4e, 0xe4, 0x65, 0x59,
-       0x90, 0xc9, 0xcb, 0x31, 0x3f, 0x03, 0xe5, 0xf6, 0x14, 0xac, 0x39, 0x06,
-       0x3c, 0x3e, 0xc3, 0xf0, 0xbf, 0xe3, 0xa8, 0xc5, 0x01, 0xce, 0x4f, 0x1f,
-       0x7d, 0x45, 0xf0, 0xec, 0xee, 0xbd, 0x7e, 0x78, 0x0c, 0x0b, 0x47, 0x42,
-       0xb5, 0x78, 0x96, 0x58, 0x5b, 0x45, 0xdf, 0x7c, 0x5e, 0x43, 0x74, 0x4e,
-       0x24, 0xac, 0xdc, 0x92, 0x1d, 0x2d, 0xcc, 0xc1, 0x8b, 0x35, 0x05, 0x19,
-       0xdf, 0x77, 0xbd, 0x5a, 0xf9, 0xe0, 0xeb, 0x50, 0x3a, 0x52, 0x7a, 0x30,
-       0x0e, 0x0b, 0xd5, 0x8b, 0x75, 0xff, 0x94, 0xf2, 0x96, 0x8a, 0x2a, 0x62,
-       0x75, 0xf6, 0xfd, 0xe5, 0x1a, 0xb5, 0x31, 0xc6, 0x65, 0x07, 0x43, 0x5f,
-       0x54, 0xd3, 0x4d, 0x36, 0x13, 0x74, 0xd9, 0xd7, 0x1c, 0x48, 0x3b, 0xa3,
-       0x3e, 0x07, 0x7e, 0x6f, 0x45, 0xd7, 0xc9, 0xb5, 0x72, 0xc4, 0xda, 0x1b,
-       0x7d, 0x4e, 0x34, 0x86, 0xb7, 0xd3, 0x07, 0xa7, 0xd6, 0xb5, 0xf0, 0xbf,
-       0x80, 0x79, 0x1a, 0xf5, 0xfe, 0xed, 0x90, 0xdf, 0xef, 0xd0, 0x6e, 0x5a,
-       0xa4, 0x2e, 0xcb, 0x88, 0x1d, 0xea, 0x9a, 0xf8, 0x78, 0x9f, 0x69, 0x59,
-       0x87, 0xcd, 0x13, 0x4a, 0x4b, 0xea, 0x5d, 0x2b, 0xea, 0x8c, 0x47, 0x4b,
-       0x23, 0x01, 0x73, 0x27, 0xc1, 0xd8, 0x11, 0x89, 0x2b, 0xd1, 0x6c, 0x9f,
-       0x72, 0x7d, 0xb6, 0x5f, 0x59, 0x91, 0x95, 0xf2, 0x27, 0x94, 0xe5, 0x59,
-       0x29, 0x5f, 0x2c, 0x1b, 0x66, 0x59, 0xe0, 0x48, 0x22, 0x10, 0x2c, 0x96,
-       0x5f, 0xc1, 0xb2, 0xd7, 0x5f, 0x2a, 0x1b, 0xa6, 0xad, 0x9a, 0x9c, 0x97,
-       0x0a, 0x6c, 0xd6, 0xf4, 0x68, 0x9c, 0x3a, 0x2f, 0x8d, 0xf8, 0x6e, 0x7d,
-       0xdd, 0xc8, 0x05, 0x1d, 0x9c, 0x83, 0xa3, 0x1c, 0x59, 0x2b, 0x71, 0x6e,
-       0x83, 0xe1, 0x42, 0xbf, 0x56, 0x8d, 0x0d, 0xe6, 0x6f, 0xad, 0xcd, 0xeb,
-       0xe4, 0xbf, 0xbc, 0x6c, 0xb0, 0xcb, 0xd7, 0xb1, 0xbc, 0x6e, 0x1e, 0x2d,
-       0x60, 0xeb, 0xa9, 0x04, 0x06, 0x1d, 0x11, 0x62, 0x7e, 0x73, 0xc0, 0xdf,
-       0x03, 0x99, 0x1b, 0x3f, 0xae, 0xa7, 0x2c, 0x69, 0xe7, 0x74, 0xfc, 0x45,
-       0xfc, 0x72, 0x19, 0xb9, 0x26, 0xe5, 0xa6, 0x68, 0xdf, 0x82, 0x75, 0x96,
-       0x35, 0x64, 0x8a, 0x9d, 0xfb, 0x68, 0xe7, 0x33, 0xe1, 0xaf, 0xd5, 0xe3,
-       0x69, 0x56, 0x38, 0x9c, 0x98, 0x81, 0xb4, 0xa6, 0x12, 0x73, 0xef, 0xf2,
-       0xa0, 0x2a, 0xaa, 0x94, 0x90, 0xdb, 0x60, 0x42, 0xc6, 0x59, 0x89, 0xa8,
-       0x53, 0x0f, 0xca, 0xdc, 0x95, 0x30, 0xe6, 0x35, 0xa8, 0xac, 0x77, 0xc9,
-       0x97, 0x65, 0xcc, 0x7e, 0xfa, 0x72, 0xdc, 0xd6, 0x51, 0xeb, 0xa5, 0x71,
-       0x4b, 0x7b, 0x45, 0x1d, 0xfd, 0x67, 0xea, 0x59, 0xd6, 0x8e, 0x4b, 0xba,
-       0x2d, 0x89, 0x96, 0x51, 0xb7, 0xc7, 0x12, 0x81, 0xf0, 0xd3, 0x88, 0x2b,
-       0x6d, 0x59, 0x27, 0xc6, 0x12, 0x52, 0xaf, 0x8f, 0xe5, 0xfb, 0x95, 0x95,
-       0x97, 0xea, 0x4c, 0x15, 0xfc, 0x56, 0xc6, 0x23, 0xe3, 0xbb, 0x0e, 0x1b,
-       0xf6, 0xea, 0xf1, 0x38, 0xc4, 0xae, 0xa2, 0x58, 0x6f, 0xea, 0x7e, 0xda,
-       0x1f, 0xed, 0x06, 0xa8, 0x49, 0xc6, 0xdc, 0x79, 0x0c, 0x00, 0xee, 0xd8,
-       0xdb, 0xce, 0xb1, 0x5a, 0x78, 0xcd, 0xac, 0xc5, 0x18, 0xbd, 0xb4, 0x3a,
-       0x29, 0xd7, 0xa7, 0xcb, 0x18, 0x51, 0xd6, 0x1f, 0xf5, 0x97, 0xa1, 0x5c,
-       0xe4, 0xfc, 0x1b, 0x35, 0x6f, 0xbf, 0x1f, 0x54, 0xff, 0x17, 0xd6, 0x98,
-       0x37, 0x7f, 0xad, 0x3a, 0x29, 0x9c, 0xaf, 0x1d, 0x5a, 0xd2, 0xc3, 0x78,
-       0x17, 0xb7, 0x2a, 0x0c, 0xbd, 0xfd, 0x82, 0xd2, 0x8d, 0x1b, 0x43, 0x7a,
-       0xec, 0x87, 0x8a, 0x1e, 0x1d, 0x50, 0x0c, 0xfa, 0x61, 0x10, 0xab, 0xb2,
-       0xef, 0xef, 0xeb, 0xfb, 0x50, 0x0f, 0x4b, 0x3f, 0xd2, 0xdf, 0x59, 0xf4,
-       0xdb, 0x63, 0x2a, 0x8e, 0x47, 0xc6, 0xa6, 0x60, 0xb3, 0x3d, 0xa6, 0x15,
-       0xb6, 0x7f, 0x7c, 0xd7, 0x74, 0x61, 0xe3, 0xde, 0x53, 0x0b, 0xc5, 0x40,
-       0x36, 0x1d, 0x8d, 0xa2, 0xb7, 0xd9, 0x85, 0x0d, 0xa3, 0x37, 0xa9, 0x22,
-       0x1b, 0xd4, 0xf9, 0x65, 0xf9, 0x6f, 0x85, 0xbc, 0xc5, 0x83, 0xf5, 0x59,
-       0xce, 0x1d, 0x31, 0x74, 0xfd, 0x51, 0x99, 0xdb, 0x5a, 0x7e, 0xcb, 0xdc,
-       0x7a, 0xf9, 0x2d, 0xf3, 0x3c, 0x8b, 0xdf, 0xd5, 0xf0, 0xcf, 0x12, 0x59,
-       0x9a, 0x91, 0xd8, 0x0f, 0x77, 0x45, 0xa4, 0x0b, 0x77, 0x0d, 0x58, 0x56,
-       0x7f, 0xc0, 0xb2, 0xca, 0x42, 0xe4, 0x59, 0x81, 0xc6, 0xf0, 0x95, 0x4a,
-       0x09, 0xa6, 0xb4, 0x66, 0xf4, 0x1f, 0x2d, 0x89, 0x55, 0x47, 0x66, 0xd1,
-       0xf7, 0x35, 0xfc, 0x6c, 0x49, 0x3b, 0x26, 0xc6, 0xa7, 0x8f, 0x21, 0x6f,
-       0x67, 0xdf, 0x5e, 0x50, 0xb4, 0x33, 0x91, 0x5f, 0x64, 0xd7, 0xfb, 0xd3,
-       0xf4, 0xcb, 0xb8, 0x86, 0x18, 0xfd, 0x83, 0x32, 0xd5, 0xa2, 0xe7, 0x12,
-       0xa7, 0xfe, 0xa0, 0xfa, 0x17, 0x1b, 0x3b, 0x13, 0xef, 0x5a, 0x0c, 0xa7,
-       0xfc, 0xe4, 0x1a, 0xef, 0xcd, 0xbc, 0xd7, 0x6e, 0xca, 0x6c, 0xbb, 0x91,
-       0xb2, 0x17, 0x1b, 0xef, 0xcc, 0xac, 0xb0, 0xc7, 0x9c, 0x66, 0xe1, 0x4d,
-       0x7b, 0x45, 0xa7, 0xa2, 0x03, 0x0b, 0xc7, 0xcd, 0xeb, 0x88, 0x15, 0xaf,
-       0x5b, 0x8e, 0x59, 0xd2, 0x46, 0x97, 0xd2, 0x4a, 0x7b, 0x8a, 0x3b, 0x4b,
-       0x41, 0x4e, 0xad, 0x95, 0x44, 0xa2, 0xca, 0x5a, 0x5b, 0xff, 0xad, 0xca,
-       0xca, 0xd1, 0xe9, 0x6d, 0x77, 0xd1, 0x77, 0x1f, 0x57, 0xf3, 0xf3, 0x7d,
-       0xde, 0x1e, 0x43, 0x5e, 0x7e, 0x3f, 0xda, 0x53, 0xd2, 0x8e, 0xe8, 0x35,
-       0xef, 0x6f, 0xed, 0x12, 0x23, 0x2e, 0xc9, 0x9c, 0xe7, 0x1e, 0x97, 0x31,
-       0x61, 0xc9, 0x7b, 0xf0, 0xe3, 0x7a, 0xe2, 0x47, 0xf4, 0x3f, 0xc4, 0x8f,
-       0xa5, 0x7f, 0xa2, 0xec, 0x59, 0xca, 0x21, 0x3c, 0x45, 0xe2, 0x9e, 0xf0,
-       0x16, 0xe1, 0x2b, 0x41, 0xca, 0x25, 0xfc, 0xa5, 0x68, 0x1b, 0x96, 0xf5,
-       0x4d, 0x73, 0x01, 0x62, 0xb5, 0xfa, 0x20, 0x50, 0x87, 0x41, 0xca, 0xea,
-       0x48, 0x22, 0xce, 0x71, 0x52, 0xd7, 0xea, 0x75, 0x0e, 0xa8, 0x4d, 0x0e,
-       0x74, 0xe3, 0x55, 0xd3, 0xe8, 0xdf, 0x8c, 0xbf, 0x44, 0x8f, 0xd7, 0xc2,
-       0x61, 0x33, 0x48, 0x5c, 0x2a, 0x47, 0x67, 0x13, 0x27, 0x62, 0xad, 0x17,
-       0x43, 0xa9, 0x78, 0x07, 0x61, 0x83, 0x31, 0xec, 0xd9, 0x4f, 0x26, 0x02,
-       0x7a, 0xfb, 0x56, 0xa6, 0x40, 0xab, 0x06, 0xdc, 0xf0, 0x4b, 0x2a, 0xc4,
-       0x98, 0xf1, 0x75, 0xc6, 0xf9, 0x4d, 0xe6, 0x15, 0xd4, 0x6d, 0x1f, 0x6d,
-       0x48, 0xa5, 0xbd, 0x48, 0x3f, 0x41, 0xf2, 0x19, 0xa9, 0xcb, 0xb8, 0xd0,
-       0xa0, 0xe0, 0x86, 0x06, 0xda, 0x27, 0x79, 0xd1, 0xe7, 0x43, 0x4e, 0xfb,
-       0xff, 0x44, 0xb6, 0x31, 0x7a, 0xb3, 0xfa, 0x23, 0x0b, 0x33, 0xed, 0x36,
-       0xb4, 0xa8, 0x4a, 0xb9, 0xff, 0x28, 0x27, 0x30, 0x21, 0x5c, 0xad, 0xd2,
-       0xf8, 0x0d, 0xc6, 0xbd, 0x52, 0xa7, 0x0a, 0x15, 0xc3, 0xf1, 0x59, 0xe5,
-       0xb4, 0xe1, 0xd2, 0x88, 0x8e, 0xbb, 0x46, 0x2b, 0xe1, 0x18, 0xd6, 0x2f,
-       0xae, 0x74, 0x20, 0x56, 0x22, 0xfc, 0x70, 0xb4, 0x16, 0x35, 0xfb, 0xac,
-       0x6e, 0x77, 0xc4, 0xb2, 0x3c, 0x4b, 0x22, 0xb8, 0xf7, 0xa8, 0x06, 0x75,
-       0x9f, 0x0b, 0x15, 0xcc, 0x43, 0xd6, 0x99, 0x7d, 0xb8, 0x8f, 0xfc, 0x6e,
-       0x4e, 0x32, 0x88, 0xd5, 0xc4, 0xa2, 0x8b, 0xa9, 0xb6, 0xd6, 0x17, 0x12,
-       0x0d, 0xdb, 0xe6, 0x38, 0x84, 0xfb, 0xaf, 0xc1, 0xe6, 0xec, 0x1a, 0xdc,
-       0xc9, 0xd8, 0xf9, 0x9c, 0x81, 0xee, 0x39, 0xf4, 0xd7, 0x3b, 0xc9, 0xff,
-       0x36, 0xa6, 0xd6, 0x61, 0x63, 0x76, 0x1b, 0xff, 0xeb, 0xc0, 0xdd, 0x3c,
-       0x36, 0xa5, 0xc4, 0xbf, 0x3f, 0x8d, 0x4d, 0xd9, 0x7a, 0xc4, 0x46, 0x37,
-       0x62, 0x2b, 0x39, 0xc1, 0x5d, 0xa3, 0x5e, 0xea, 0xb6, 0x0d, 0x1b, 0xb2,
-       0x6d, 0xb8, 0x97, 0x63, 0xb9, 0x97, 0xf3, 0xa1, 0x26, 0xb7, 0xd2, 0xc7,
-       0x3c, 0xf0, 0x0e, 0x2f, 0xc5, 0x7d, 0xa3, 0xd7, 0x61, 0x0b, 0xe3, 0xe4,
-       0xed, 0x4b, 0xae, 0x43, 0xf7, 0xe8, 0x7d, 0xe8, 0x4a, 0x19, 0x5d, 0x73,
-       0x98, 0x6a, 0xbd, 0xb5, 0xe4, 0x3e, 0xdc, 0x43, 0x39, 0xb6, 0xed, 0xb5,
-       0x50, 0xb6, 0x68, 0xb1, 0x6a, 0xd4, 0xc4, 0x2d, 0x9f, 0x21, 0xb1, 0xf9,
-       0xc0, 0xad, 0x7d, 0xc6, 0xee, 0x02, 0xb6, 0x38, 0x51, 0x62, 0x28, 0x62,
-       0xa3, 0xf9, 0xeb, 0x89, 0xbf, 0xc1, 0xe6, 0x51, 0x17, 0xee, 0x18, 0xed,
-       0x52, 0x56, 0x8b, 0xad, 0xb8, 0x54, 0xce, 0x67, 0x94, 0xd8, 0xd7, 0xaa,
-       0xb4, 0x8c, 0xda, 0xf3, 0xac, 0x79, 0x23, 0x5d, 0xca, 0xba, 0xec, 0x9d,
-       0x0e, 0x94, 0xcb, 0x5c, 0x5c, 0x83, 0xf1, 0xa6, 0xaf, 0x58, 0xe9, 0xfc,
-       0x7c, 0xa6, 0xe9, 0x3e, 0x6e, 0x5f, 0xe4, 0x57, 0x9f, 0xf4, 0x2d, 0xd0,
-       0xbb, 0x0e, 0xa8, 0xc2, 0x2b, 0xdd, 0xc8, 0xd9, 0xf3, 0x59, 0xc2, 0x7e,
-       0x6a, 0x70, 0xc4, 0x9b, 0xe7, 0x12, 0xf3, 0xd8, 0x97, 0x95, 0x72, 0x71,
-       0xac, 0x94, 0x9b, 0xe3, 0x99, 0x93, 0xf4, 0xe1, 0x7e, 0xea, 0xa7, 0x8b,
-       0x73, 0xd4, 0x45, 0xbd, 0x7c, 0x2e, 0x75, 0x8a, 0x31, 0x62, 0x1b, 0x3e,
-       0x57, 0xe8, 0xa7, 0x2f, 0x5b, 0x8a, 0x72, 0xa3, 0x0f, 0x8f, 0x68, 0x25,
-       0xf4, 0x31, 0xe1, 0x19, 0x07, 0x6e, 0x3d, 0x6c, 0xac, 0xe3, 0x18, 0xbe,
-       0xc4, 0x36, 0x44, 0xae, 0x46, 0xad, 0x06, 0xf9, 0xb2, 0x3d, 0xc4, 0xec,
-       0x72, 0xe3, 0x37, 0xd6, 0x23, 0xde, 0x76, 0xbb, 0x6c, 0x15, 0xcb, 0x3e,
-       0x3f, 0xe0, 0xc7, 0x8d, 0xb4, 0xef, 0xb2, 0x64, 0x94, 0x7a, 0x77, 0x93,
-       0x53, 0xb5, 0x52, 0xe7, 0x9c, 0x63, 0xea, 0xf5, 0x0e, 0xda, 0xb3, 0x33,
-       0xb9, 0x86, 0xf3, 0xa0, 0xa1, 0x32, 0xd9, 0xc7, 0x79, 0xf0, 0xc2, 0x9d,
-       0x6c, 0x47, 0x27, 0xe5, 0x72, 0x25, 0xd7, 0x71, 0x2e, 0xea, 0xe0, 0x49,
-       0x76, 0x70, 0x2e, 0x80, 0xbb, 0xa8, 0xcb, 0xfb, 0x42, 0xbf, 0x56, 0x7a,
-       0x6b, 0x65, 0x18, 0x6d, 0x9c, 0xbf, 0x28, 0x36, 0xa7, 0xea, 0xc3, 0x3b,
-       0x24, 0xee, 0x3b, 0x99, 0x90, 0x19, 0x3f, 0x26, 0x17, 0xa6, 0xf5, 0x1b,
-       0x3d, 0xfc, 0x5d, 0x94, 0xb3, 0x88, 0xe3, 0x22, 0xa7, 0xc4, 0xd7, 0xa2,
-       0x9c, 0x2e, 0x94, 0x19, 0xcf, 0x5a, 0x0f, 0x7b, 0xe1, 0x77, 0xb1, 0x6c,
-       0x39, 0xcb, 0xae, 0xa6, 0x9c, 0xab, 0x29, 0xff, 0xbc, 0xe4, 0xa7, 0xd1,
-       0x4d, 0x39, 0xe7, 0x0c, 0xbb, 0xc9, 0x51, 0x75, 0xdc, 0x4f, 0xdd, 0x1f,
-       0x48, 0x95, 0xa1, 0x9a, 0xf3, 0xfc, 0x39, 0xfe, 0xde, 0x41, 0x3f, 0x7a,
-       0x7e, 0xd0, 0xc2, 0x99, 0x90, 0x86, 0x41, 0xad, 0x0c, 0xbd, 0xc1, 0xad,
-       0xe4, 0xe5, 0x32, 0x57, 0xcc, 0xa7, 0x8c, 0x0a, 0xc6, 0x75, 0xc4, 0x5d,
-       0xcd, 0x3a, 0xb6, 0x07, 0xdd, 0x48, 0x7b, 0x11, 0x75, 0x19, 0x51, 0xda,
-       0xb8, 0x0b, 0x03, 0x9a, 0x02, 0x17, 0xf1, 0xb0, 0x94, 0xfe, 0xb4, 0x93,
-       0x71, 0xd7, 0x15, 0x91, 0xff, 0x68, 0x27, 0xe4, 0x60, 0xd5, 0x11, 0x23,
-       0xfe, 0x82, 0x12, 0x68, 0x73, 0xa9, 0xf7, 0x51, 0x47, 0x15, 0x38, 0x33,
-       0xf8, 0x25, 0x6c, 0x64, 0x5f, 0x7d, 0x29, 0x0f, 0x73, 0x93, 0xbf, 0x53,
-       0x72, 0x36, 0x7e, 0x7a, 0x90, 0x1c, 0x79, 0xdc, 0x9a, 0x67, 0x88, 0xdd,
-       0x44, 0x70, 0xcf, 0xd1, 0x2a, 0x0c, 0x0e, 0x5e, 0x87, 0x6d, 0x2c, 0xb7,
-       0x2b, 0x55, 0x0d, 0x63, 0x68, 0x99, 0x5d, 0x67, 0x84, 0xfe, 0x35, 0x90,
-       0xbc, 0x0f, 0x2b, 0x53, 0xf5, 0xc1, 0xa3, 0x4a, 0x8c, 0x3a, 0xf4, 0xa2,
-       0x3f, 0xb9, 0xd1, 0xd6, 0x69, 0x62, 0x5f, 0x27, 0xb6, 0x1e, 0xbd, 0x02,
-       0x7b, 0xf6, 0x6d, 0xc1, 0x5d, 0x47, 0x99, 0xbf, 0xda, 0xb6, 0xac, 0xa2,
-       0x77, 0xdf, 0x75, 0xca, 0x06, 0xb6, 0xb7, 0x7b, 0x98, 0xf6, 0x4c, 0x9b,
-       0xbe, 0x7f, 0xaf, 0x91, 0x5b, 0xe6, 0xd8, 0xa2, 0xf8, 0x6b, 0xaf, 0x43,
-       0x97, 0x6d, 0x7b, 0x79, 0xbd, 0xed, 0xc8, 0xce, 0x67, 0x9e, 0xf3, 0xb7,
-       0xd6, 0xa3, 0xde, 0x52, 0x7b, 0x7e, 0x55, 0xea, 0xad, 0x25, 0xc1, 0xdc,
-       0xbf, 0x96, 0xb9, 0x57, 0xc1, 0x5e, 0x7a, 0xb3, 0x8b, 0xc9, 0x1b, 0xbd,
-       0xc8, 0x68, 0x41, 0xea, 0xa3, 0x38, 0x0f, 0x0d, 0x05, 0x7b, 0x79, 0x8b,
-       0x65, 0x6c, 0x5b, 0x7e, 0x9f, 0x2f, 0xc8, 0xfc, 0xb6, 0xa3, 0x86, 0xf1,
-       0x75, 0x43, 0x68, 0x9d, 0x72, 0xaf, 0x76, 0x69, 0xce, 0x7c, 0xc5, 0x39,
-       0x93, 0x3c, 0xd1, 0x6e, 0x2b, 0xf1, 0x25, 0xdb, 0x76, 0xaf, 0xcf, 0x36,
-       0xa3, 0x73, 0x74, 0x7a, 0xfb, 0xc5, 0x3a, 0x65, 0x9c, 0x8b, 0xe2, 0x3c,
-       0xeb, 0xfd, 0x82, 0x65, 0x81, 0x45, 0x45, 0x2c, 0xbb, 0xb3, 0xd0, 0xff,
-       0x41, 0x8b, 0x31, 0xc9, 0xe9, 0x32, 0x1c, 0x18, 0x09, 0xfe, 0x57, 0x25,
-       0x5e, 0xeb, 0xa4, 0xcc, 0x0a, 0xb1, 0xe4, 0xef, 0xac, 0x3d, 0xeb, 0x64,
-       0x5e, 0x3e, 0x42, 0x43, 0x86, 0xe2, 0xba, 0xe4, 0xb3, 0x6b, 0xb0, 0x3e,
-       0x25, 0xb2, 0xb6, 0x63, 0x43, 0xca, 0x96, 0xcb, 0x5f, 0x94, 0xab, 0x8f,
-       0x36, 0xa3, 0x25, 0x77, 0xdb, 0x32, 0xb5, 0xd3, 0xae, 0xee, 0xd9, 0xab,
-       0xe2, 0xe9, 0xd0, 0x26, 0xc5, 0x3f, 0x53, 0xe2, 0x70, 0x3d, 0xba, 0xf6,
-       0xca, 0xb7, 0x9f, 0x7c, 0x37, 0xa6, 0x4c, 0xcd, 0x1c, 0x60, 0xb9, 0x65,
-       0x58, 0xbf, 0xb7, 0x16, 0x73, 0x38, 0xd6, 0xdb, 0xcd, 0xff, 0xa2, 0xbc,
-       0x33, 0x43, 0xc6, 0xb3, 0xa2, 0x10, 0xcb, 0xeb, 0x71, 0xdf, 0x5e, 0xf1,
-       0x21, 0xf9, 0xdd, 0x82, 0xde, 0xa5, 0xf5, 0x85, 0x38, 0xff, 0x37, 0x9c,
-       0x97, 0x2e, 0xe5, 0x06, 0xe2, 0x42, 0x8c, 0xb8, 0x40, 0x9b, 0x52, 0xda,
-       0x89, 0x0b, 0xd7, 0x17, 0x70, 0xc1, 0x43, 0x5c, 0x58, 0x93, 0x7d, 0x9b,
-       0xf2, 0x88, 0x2f, 0xbe, 0x57, 0x9e, 0xbb, 0x29, 0xcf, 0xb1, 0xd0, 0x1c,
-       0xc0, 0x96, 0x67, 0x19, 0x79, 0x4c, 0x2d, 0xe7, 0xd0, 0x62, 0x7c, 0x50,
-       0x94, 0x11, 0x5b, 0xcf, 0xcb, 0x28, 0xb3, 0xd8, 0x94, 0x45, 0xb9, 0x7f,
-       0x8f, 0x06, 0x7b, 0x7d, 0xe0, 0xb2, 0x3c, 0xeb, 0xf7, 0xbe, 0xcb, 0x1c,
-       0x41, 0x7e, 0x13, 0x2f, 0x9a, 0xeb, 0x89, 0x73, 0xcb, 0x88, 0x7b, 0x2e,
-       0x8e, 0x4b, 0xb0, 0x4e, 0x64, 0x73, 0xd1, 0x2f, 0xa4, 0x6d, 0xd1, 0xc9,
-       0x52, 0x47, 0x7e, 0x1e, 0x8a, 0xf3, 0xec, 0xa4, 0x1f, 0xbb, 0x51, 0x1d,
-       0xd1, 0xa3, 0x37, 0x39, 0x64, 0xce, 0x88, 0xf2, 0x43, 0xed, 0x85, 0xbe,
-       0xfe, 0xbb, 0xd2, 0x50, 0xd3, 0x4f, 0x39, 0x4f, 0x28, 0xb7, 0x70, 0x5c,
-       0xfe, 0xd2, 0xaa, 0xa8, 0x27, 0x12, 0xe8, 0x48, 0xbc, 0x2f, 0x36, 0xde,
-       0x90, 0xcd, 0xf3, 0x4b, 0x75, 0x28, 0x6e, 0x95, 0xd3, 0xf6, 0x9d, 0x46,
-       0xe0, 0xe2, 0x6a, 0xf6, 0x30, 0xef, 0xa0, 0xf0, 0x19, 0x93, 0x6d, 0x15,
-       0xfb, 0xaa, 0x23, 0x96, 0x84, 0x0a, 0x76, 0xb0, 0x46, 0x61, 0xde, 0xd0,
-       0x16, 0xb5, 0xed, 0x61, 0x17, 0xf5, 0x75, 0x42, 0xf9, 0x98, 0x70, 0x66,
-       0x9b, 0x63, 0xc4, 0x95, 0x55, 0xc4, 0x95, 0xea, 0xa4, 0x12, 0xf5, 0x46,
-       0x1a, 0xb7, 0xd5, 0x20, 0xd0, 0xf6, 0x28, 0xfb, 0xac, 0x21, 0xcf, 0xbc,
-       0x89, 0xb1, 0x36, 0xc9, 0x3e, 0x57, 0xb1, 0xcf, 0xb5, 0xd9, 0x2d, 0x6c,
-       0x57, 0xb0, 0x55, 0xc5, 0x9c, 0x7d, 0x70, 0x7b, 0x69, 0x07, 0x23, 0x0d,
-       0x4e, 0x84, 0x17, 0xff, 0x02, 0x98, 0x81, 0x98, 0xca, 0xfc, 0x7d, 0x5e,
-       0x52, 0x72, 0xa9, 0x03, 0xb7, 0x2e, 0xcb, 0x08, 0x96, 0x6a, 0xf0, 0x0c,
-       0x7b, 0x25, 0x1e, 0xa1, 0x2f, 0x54, 0xa7, 0xec, 0xb1, 0xf1, 0x56, 0x45,
-       0xd9, 0x3e, 0x05, 0x57, 0x85, 0xbe, 0xae, 0xa4, 0x67, 0xe6, 0x31, 0x5f,
-       0xa5, 0x3e, 0x7a, 0x26, 0x04, 0x1b, 0xd3, 0xc4, 0xc6, 0x63, 0x4a, 0x7e,
-       0x3d, 0x86, 0x7e, 0x9f, 0x42, 0xbc, 0x2a, 0x22, 0x6b, 0x20, 0x81, 0xce,
-       0x0f, 0x29, 0xf7, 0x11, 0x0b, 0x5d, 0x8c, 0x43, 0x1e, 0x62, 0xa3, 0xc4,
-       0xe9, 0xf4, 0xad, 0x89, 0x81, 0x3a, 0xf4, 0xd3, 0xb7, 0x37, 0x1e, 0x3d,
-       0x75, 0x8b, 0x07, 0xb5, 0xfc, 0xf6, 0xf2, 0x98, 0xc5, 0xc3, 0x4d, 0x5f,
-       0x76, 0xc3, 0x31, 0x20, 0x7c, 0xaf, 0x89, 0xb1, 0xca, 0x83, 0xf2, 0x01,
-       0x13, 0x5b, 0x28, 0x4f, 0xe9, 0x50, 0x33, 0xe3, 0x09, 0xfd, 0x3c, 0x55,
-       0x83, 0xeb, 0x07, 0x97, 0x60, 0x93, 0x8d, 0x5f, 0xb5, 0x38, 0x3b, 0xb8,
-       0xd4, 0xc6, 0x8d, 0x87, 0x52, 0x33, 0xf0, 0xce, 0xde, 0x6b, 0x6c, 0x8c,
-       0x1b, 0x64, 0x6c, 0xf6, 0xed, 0x0b, 0xa3, 0x8b, 0x6d, 0x7a, 0xf7, 0x5d,
-       0x8b, 0xfb, 0x8e, 0xfa, 0xa8, 0x23, 0x83, 0x71, 0x40, 0x7d, 0xd7, 0xff,
-       0x49, 0xb1, 0xf3, 0xe9, 0xd8, 0x2f, 0x73, 0x2d, 0x75, 0x32, 0x34, 0x56,
-       0xf9, 0xed, 0xb4, 0xb9, 0x70, 0x5e, 0x47, 0x79, 0x9d, 0x5c, 0x4d, 0x9d,
-       0xdc, 0x94, 0xa5, 0x39, 0x0c, 0x3b, 0x39, 0xd7, 0xe4, 0x10, 0x35, 0xb5,
-       0xf4, 0xcb, 0x12, 0x1e, 0xb4, 0xff, 0xd1, 0xbf, 0x60, 0x6c, 0xcf, 0x71,
-       0x3e, 0xf9, 0xdb, 0x94, 0xf9, 0x94, 0xf8, 0xe9, 0x20, 0xe6, 0x2a, 0xd4,
-       0xef, 0xff, 0x02, 0x66, 0xe7, 0x73, 0x9b, 0xa2, 0xae, 0x54, 0x8e, 0xbf,
-       0x25, 0x91, 0xb3, 0x39, 0x3d, 0x33, 0x22, 0x5d, 0xe5, 0x7f, 0x1b, 0x8f,
-       0x92, 0x73, 0x27, 0xc5, 0x67, 0xbd, 0xb4, 0xe7, 0x26, 0xea, 0x4b, 0x63,
-       0xec, 0x30, 0x89, 0x73, 0xb3, 0xe0, 0xe2, 0x38, 0x36, 0x51, 0x3f, 0x1e,
-       0x8e, 0x63, 0x2b, 0xcb, 0xdd, 0xc5, 0xff, 0xee, 0x3a, 0x5a, 0xcb, 0xc3,
-       0xcb, 0x63, 0x16, 0x8f, 0x9f, 0x12, 0xb3, 0x9a, 0x69, 0xc7, 0x0e, 0x94,
-       0x0c, 0xab, 0x78, 0xca, 0x54, 0x70, 0xa1, 0x89, 0xfd, 0x35, 0x5c, 0xc6,
-       0x3a, 0x89, 0x65, 0xde, 0xe4, 0x97, 0x88, 0x73, 0x7e, 0xac, 0x23, 0x27,
-       0xe8, 0xdc, 0xab, 0xc1, 0x15, 0xca, 0x30, 0x67, 0x12, 0x19, 0x4e, 0x14,
-       0x38, 0xe6, 0x3c, 0xe6, 0x3a, 0x8d, 0x61, 0xda, 0x90, 0xb6, 0xd9, 0xb6,
-       0xa1, 0x38, 0xe3, 0x73, 0x90, 0xb9, 0x7e, 0xde, 0x76, 0x5b, 0xde, 0x63,
-       0x47, 0xf4, 0x31, 0x8e, 0x67, 0x4e, 0x44, 0xf7, 0xdf, 0x42, 0x5f, 0x10,
-       0xce, 0x57, 0x9a, 0x04, 0x0e, 0x0c, 0xb6, 0xa3, 0x9a, 0x36, 0xe3, 0x5d,
-       0x7c, 0x14, 0xa9, 0xda, 0x7e, 0xdb, 0x56, 0xf3, 0x6d, 0x97, 0x45, 0x2b,
-       0x23, 0x8d, 0x31, 0x69, 0x7b, 0xbc, 0xd0, 0xf6, 0x0a, 0xb6, 0x9d, 0x60,
-       0xdb, 0x2b, 0xff, 0x5d, 0xdb, 0xd3, 0xe3, 0x5d, 0x4f, 0x21, 0x2e, 0x4b,
-       0xde, 0x5c, 0xc4, 0xed, 0x22, 0xc7, 0xf8, 0x8d, 0xf7, 0x32, 0x4e, 0xee,
-       0x90, 0xb9, 0xf3, 0xe5, 0x7d, 0xf6, 0xbd, 0xd8, 0x7c, 0xb9, 0xad, 0x3d,
-       0xc5, 0x18, 0x6f, 0xd6, 0x4c, 0x6b, 0x6b, 0x0e, 0xff, 0xff, 0x70, 0x4a,
-       0xb8, 0x44, 0x3b, 0x2c, 0xca, 0xfa, 0xac, 0xa1, 0x77, 0x2d, 0x73, 0x18,
-       0xdb, 0x2e, 0x32, 0xd7, 0xb9, 0xf1, 0x52, 0x5f, 0xb2, 0x36, 0xd2, 0x8e,
-       0x85, 0x03, 0x7a, 0xe7, 0x2e, 0xf2, 0xd1, 0xc3, 0x21, 0x3d, 0xfa, 0x2d,
-       0xe8, 0xf1, 0x52, 0xe5, 0x25, 0x94, 0x4c, 0x9c, 0xc5, 0x60, 0xf6, 0x47,
-       0x92, 0x6f, 0xb2, 0x4d, 0xb7, 0xe2, 0x99, 0xe8, 0x43, 0x8c, 0xf5, 0xdc,
-       0xac, 0xe7, 0x1e, 0x80, 0xbb, 0x92, 0xf5, 0xc6, 0x07, 0xe2, 0x96, 0x8b,
-       0x5c, 0x50, 0x8d, 0xe8, 0x1d, 0x95, 0x8a, 0x11, 0xdb, 0xc4, 0xb6, 0xd7,
-       0x30, 0x96, 0x95, 0x27, 0xbb, 0xc9, 0x03, 0x74, 0xdf, 0x97, 0x55, 0xbd,
-       0x6b, 0x3d, 0x5e, 0xc2, 0xbf, 0x92, 0x3c, 0xce, 0x4b, 0x9e, 0x45, 0x8a,
-       0xed, 0x59, 0xe3, 0x1a, 0xf9, 0xcc, 0xbb, 0x56, 0x78, 0x41, 0x85, 0x53,
-       0xda, 0xbd, 0x38, 0xbe, 0xe0, 0xdd, 0xc4, 0x65, 0x3c, 0xd7, 0x5c, 0x46,
-       0xe3, 0xfb, 0xf0, 0xa9, 0xa9, 0x75, 0x45, 0x62, 0xfd, 0x56, 0x57, 0x64,
-       0xdb, 0xfd, 0xc7, 0x9b, 0xf3, 0x76, 0xeb, 0xcf, 0xb8, 0x71, 0xd6, 0x2b,
-       0xbe, 0xc4, 0xfc, 0x67, 0x7f, 0x13, 0x76, 0xef, 0x67, 0x5e, 0xa9, 0x36,
-       0x86, 0xcb, 0x95, 0x1a, 0xe6, 0x44, 0xc3, 0x36, 0x1f, 0x76, 0x1a, 0xbb,
-       0xec, 0x9c, 0x59, 0xe2, 0x83, 0xd4, 0x99, 0x9f, 0x91, 0xf8, 0x27, 0xeb,
-       0x39, 0x07, 0x6e, 0xdd, 0x90, 0xa0, 0xdf, 0x6a, 0xbd, 0x2c, 0xb3, 0xae,
-       0xb0, 0x4e, 0x2f, 0x6b, 0x18, 0xbd, 0xd3, 0x38, 0xc9, 0xba, 0x69, 0xb1,
-       0xaa, 0xd1, 0x5f, 0x73, 0x29, 0x8e, 0x74, 0x14, 0xca, 0x33, 0xd9, 0xb3,
-       0x65, 0x73, 0x4f, 0xc3, 0xb3, 0x1d, 0xbc, 0x96, 0xf7, 0x85, 0xcb, 0xf1,
-       0x6e, 0x67, 0x61, 0x6e, 0x0e, 0xb9, 0xf2, 0xb8, 0xff, 0x69, 0x77, 0x71,
-       0xbd, 0x28, 0x5f, 0xe6, 0xda, 0x12, 0x94, 0xef, 0xb9, 0x14, 0x5b, 0xe2,
-       0xc4, 0xf2, 0x6d, 0x7b, 0xf3, 0xeb, 0x93, 0x95, 0x4b, 0x05, 0xb7, 0xeb,
-       0x71, 0xb7, 0xed, 0xf7, 0x5f, 0x75, 0xe5, 0xed, 0xc0, 0x59, 0x18, 0x97,
-       0x49, 0x1b, 0xbc, 0x52, 0xd6, 0xfc, 0x0b, 0xf8, 0x39, 0x9b, 0xff, 0xf7,
-       0x42, 0xe6, 0xc2, 0x45, 0xff, 0x7c, 0xdc, 0x74, 0x60, 0x6a, 0x46, 0x9e,
-       0xaf, 0xab, 0xfb, 0x9a, 0xd0, 0x33, 0x46, 0xbc, 0xa1, 0x0f, 0xb5, 0x85,
-       0xd6, 0x5a, 0xa8, 0x91, 0x75, 0x83, 0x5a, 0x54, 0xec, 0x13, 0xde, 0x4c,
-       0x9e, 0x31, 0x76, 0xca, 0x1e, 0x4b, 0x6f, 0x26, 0xbf, 0x2e, 0xb2, 0x33,
-       0xd5, 0xf7, 0xee, 0x1d, 0x9a, 0xe0, 0x85, 0xd8, 0x46, 0xdd, 0xad, 0x0b,
-       0x03, 0x39, 0xbf, 0x03, 0xba, 0xb9, 0x4b, 0x56, 0x92, 0x12, 0xb7, 0x61,
-       0x7b, 0xad, 0x82, 0x2e, 0xa3, 0x1a, 0x8e, 0xc5, 0xbf, 0xb5, 0xee, 0x58,
-       0x27, 0xff, 0xbd, 0x5b, 0xc0, 0x97, 0x0f, 0xb2, 0x6f, 0x19, 0xb7, 0x70,
-       0x3a, 0x37, 0x2a, 0xe8, 0x53, 0x37, 0x38, 0x84, 0x73, 0x2a, 0x8c, 0x9d,
-       0xf6, 0x5c, 0xa0, 0x37, 0xad, 0x60, 0x77, 0x5a, 0x30, 0xd3, 0x49, 0x1c,
-       0xf4, 0x61, 0x67, 0x5a, 0x70, 0xd0, 0x45, 0x1c, 0x9c, 0x83, 0xed, 0x69,
-       0xc1, 0xc1, 0x12, 0xbc, 0x3c, 0x78, 0x05, 0x1e, 0xe2, 0xef, 0x07, 0x53,
-       0xa5, 0x08, 0xef, 0xfd, 0x0b, 0x1c, 0x48, 0x0b, 0x7f, 0x72, 0x23, 0x35,
-       0x5c, 0x87, 0x54, 0x3a, 0xcf, 0x25, 0xaa, 0x86, 0xff, 0x12, 0x49, 0xfe,
-       0x1e, 0x20, 0xef, 0xcb, 0x0c, 0xcd, 0x45, 0x82, 0xbf, 0x65, 0xbd, 0xcd,
-       0x43, 0xf9, 0x13, 0x81, 0x0a, 0x6c, 0x18, 0x92, 0x1c, 0xda, 0x77, 0xeb,
-       0x5d, 0x81, 0x79, 0xec, 0xb3, 0x0e, 0xbb, 0xc9, 0xd9, 0xda, 0x86, 0xfc,
-       0xe8, 0xe7, 0xef, 0x9d, 0xa9, 0x4a, 0xbc, 0x36, 0xa8, 0xdb, 0xfd, 0xf5,
-       0xa4, 0x56, 0xac, 0x70, 0x19, 0x55, 0x58, 0x31, 0x38, 0x1f, 0x3b, 0xd2,
-       0x82, 0xbd, 0xd5, 0xc4, 0xde, 0x7a, 0x3c, 0x98, 0x16, 0x7e, 0xa9, 0xc1,
-       0xbb, 0xd7, 0xc0, 0x48, 0x5a, 0xd6, 0x84, 0x6b, 0x70, 0x61, 0x28, 0x80,
-       0x41, 0xbb, 0x7f, 0x13, 0xc9, 0x54, 0x98, 0xf2, 0x79, 0x51, 0xb9, 0x2f,
-       0xe7, 0xab, 0x82, 0x82, 0xc9, 0x40, 0x10, 0x03, 0x63, 0xb3, 0x50, 0xbe,
-       0x4f, 0x37, 0xb7, 0x42, 0xbf, 0x78, 0x17, 0xae, 0xc4, 0xee, 0x31, 0x1f,
-       0x4a, 0xf7, 0x55, 0xc3, 0x1d, 0x6a, 0xc2, 0xce, 0xb1, 0x0f, 0x61, 0xfb,
-       0x58, 0x1d, 0xb1, 0x13, 0x78, 0x3a, 0x63, 0xa2, 0x9f, 0x18, 0x3c, 0x87,
-       0x31, 0xe6, 0x95, 0xac, 0xcc, 0xa3, 0xcc, 0x8f, 0x02, 0x4f, 0xa0, 0x9a,
-       0x31, 0x4a, 0x7e, 0xcb, 0xb5, 0xb0, 0x8d, 0xed, 0xf9, 0x75, 0x2a, 0x3d,
-       0xbe, 0x13, 0xb6, 0xbe, 0x91, 0xcb, 0x88, 0xee, 0x65, 0x4d, 0x68, 0xba,
-       0x3d, 0xed, 0xb4, 0xd7, 0xe8, 0x2f, 0xdb, 0xe5, 0x5f, 0x15, 0xec, 0xd2,
-       0x5e, 0x53, 0xc3, 0x93, 0x97, 0xf2, 0x5c, 0xb4, 0x96, 0x20, 0x60, 0x3a,
-       0x15, 0xf8, 0x99, 0xef, 0xfa, 0x9f, 0x7a, 0xdf, 0xda, 0xda, 0xe5, 0xf5,
-       0x9f, 0xe9, 0x6b, 0xb0, 0x72, 0x6f, 0x49, 0x65, 0x3c, 0x2f, 0x41, 0x5c,
-       0x93, 0x35, 0xaa, 0x46, 0x8d, 0x5a, 0x79, 0x5f, 0xde, 0x5d, 0x15, 0x2b,
-       0x8b, 0x34, 0xc3, 0x3f, 0x5e, 0xe7, 0x7f, 0x2d, 0x21, 0x3a, 0xfd, 0xbd,
-       0xe5, 0x36, 0x0c, 0xdf, 0x31, 0xd4, 0xf9, 0x7f, 0x92, 0x79, 0xbb, 0x04,
-       0x55, 0x1e, 0x5c, 0x9f, 0xf8, 0xe0, 0x7a, 0x6a, 0x04, 0xca, 0xca, 0x66,
-       0x1f, 0x79, 0x3f, 0x9c, 0xab, 0x17, 0x60, 0xda, 0x87, 0x7c, 0x24, 0x02,
-       0xf5, 0x74, 0x73, 0x98, 0xb9, 0x7e, 0xfe, 0x7e, 0xce, 0xf2, 0xac, 0xee,
-       0x8b, 0x2a, 0xf9, 0x7b, 0x36, 0x9d, 0xa1, 0x3f, 0xd0, 0xae, 0xbb, 0x85,
-       0xb3, 0xb0, 0x2f, 0x60, 0x6b, 0xc2, 0xb2, 0x9e, 0xa4, 0x0e, 0xe4, 0x5e,
-       0xe0, 0x9b, 0x99, 0xdf, 0x59, 0x93, 0x5e, 0x27, 0x5e, 0x37, 0xa6, 0xb7,
-       0x47, 0xae, 0x17, 0x31, 0x19, 0xfb, 0xec, 0x13, 0x75, 0xdc, 0x68, 0xdc,
-       0x76, 0x98, 0x79, 0xf2, 0xc2, 0x80, 0xee, 0x4f, 0xe2, 0xff, 0x5a, 0xc2,
-       0x0b, 0xd3, 0x4a, 0x71, 0xdd, 0xee, 0xfd, 0x6b, 0x27, 0x55, 0x31, 0x17,
-       0xc7, 0x77, 0x28, 0xa1, 0xf7, 0xc7, 0x99, 0xb7, 0x45, 0xbd, 0x88, 0x39,
-       0x23, 0x75, 0xfe, 0x9d, 0x09, 0x7b, 0x9c, 0xe6, 0x79, 0xce, 0xdd, 0xe9,
-       0xe6, 0x3a, 0x7f, 0x6f, 0x46, 0x6c, 0x50, 0xe1, 0x58, 0x9a, 0xf1, 0x70,
-       0x46, 0xc5, 0x9d, 0x0f, 0x78, 0xb1, 0x69, 0xc0, 0x83, 0x6d, 0x03, 0x5f,
-       0x82, 0x71, 0x95, 0x13, 0x77, 0x30, 0xf7, 0xdb, 0x3c, 0x50, 0x4a, 0x3d,
-       0x6a, 0xd8, 0x32, 0xe0, 0x44, 0xd3, 0x55, 0x55, 0x88, 0xcf, 0x2c, 0xc5,
-       0xf3, 0xf4, 0xdd, 0xab, 0x42, 0x15, 0x48, 0xdb, 0x9c, 0x43, 0xb0, 0x41,
-       0x78, 0x9b, 0xe8, 0x8d, 0x71, 0xd0, 0x10, 0x0c, 0xf9, 0xa0, 0xf5, 0x99,
-       0xdf, 0x58, 0xb9, 0x99, 0x7b, 0x6c, 0x3e, 0xe9, 0x88, 0x88, 0x6e, 0xa4,
-       0xae, 0xac, 0x35, 0x79, 0x19, 0x23, 0xdf, 0xa3, 0x47, 0x65, 0x5e, 0x24,
-       0x30, 0xb9, 0x4c, 0x71, 0x20, 0x1c, 0xa8, 0x8a, 0x55, 0x47, 0xc2, 0x58,
-       0x99, 0xed, 0xf1, 0xf9, 0xec, 0x7b, 0x59, 0x11, 0x9c, 0x5f, 0x62, 0xe2,
-       0x96, 0x2c, 0x9c, 0x2b, 0xa9, 0xfb, 0x56, 0xea, 0x75, 0x87, 0xf9, 0x07,
-       0x2b, 0x9f, 0xd7, 0xb8, 0x89, 0x97, 0x96, 0xb5, 0x99, 0xfa, 0x65, 0x4e,
-       0x81, 0x9f, 0x16, 0xf4, 0x2b, 0x3a, 0xad, 0x18, 0xff, 0x9d, 0x75, 0x9a,
-       0xfa, 0x75, 0xb3, 0x3d, 0x37, 0xdb, 0x2b, 0x1b, 0x7f, 0xaf, 0x9e, 0x4b,
-       0x29, 0xcf, 0x4a, 0x5b, 0x86, 0xd9, 0x72, 0x2f, 0xc0, 0x1f, 0x55, 0x8a,
-       0x3c, 0xf4, 0x4f, 0x8d, 0xe9, 0x25, 0x7b, 0xbd, 0xed, 0xeb, 0x59, 0xcb,
-       0x1a, 0x36, 0x45, 0xff, 0x7e, 0xea, 0x5f, 0xd6, 0x5d, 0x64, 0x0e, 0x9a,
-       0x10, 0xad, 0xd5, 0xfb, 0x01, 0x49, 0x7c, 0x15, 0xcc, 0x60, 0xae, 0xf5,
-       0x8d, 0x76, 0x0f, 0x5e, 0x4b, 0x54, 0xda, 0xe3, 0xbe, 0xaa, 0xc1, 0xb2,
-       0xbe, 0x16, 0xf2, 0xe3, 0x4d, 0xa3, 0x31, 0xbc, 0x48, 0xd5, 0x19, 0x13,
-       0x64, 0xed, 0x83, 0xba, 0x48, 0xcd, 0xe5, 0x7c, 0x89, 0xcf, 0x63, 0x1b,
-       0xed, 0xc9, 0xef, 0x88, 0x00, 0xaf, 0x26, 0x8c, 0xe0, 0x0e, 0xf6, 0x3f,
-       0xea, 0x8d, 0x60, 0x7b, 0x4a, 0x6d, 0x75, 0x92, 0x7c, 0x96, 0x31, 0xd7,
-       0xdb, 0x85, 0x7f, 0xb5, 0xd2, 0x5e, 0x0b, 0x25, 0x21, 0x89, 0x25, 0xf3,
-       0x70, 0x46, 0x73, 0xe0, 0x99, 0xe0, 0x2c, 0x44, 0x6b, 0x1c, 0xe4, 0x33,
-       0xaf, 0x5b, 0xff, 0xec, 0x95, 0x7e, 0x64, 0x2c, 0x7f, 0xe0, 0x38, 0x14,
-       0x1b, 0xef, 0x76, 0xa6, 0x22, 0xd4, 0xf7, 0xfb, 0xfb, 0xff, 0xbf, 0xd6,
-       0x94, 0x57, 0xfa, 0xd7, 0x35, 0x3f, 0xf9, 0xf9, 0xe3, 0x1f, 0xb8, 0xce,
-       0x12, 0xe4, 0x78, 0xbf, 0x67, 0x7d, 0xc7, 0x6e, 0xf3, 0x23, 0xa5, 0x79,
-       0x5e, 0x2f, 0xed, 0x3d, 0xcd, 0xf1, 0x49, 0x9b, 0xc5, 0x7e, 0x44, 0x6f,
-       0x93, 0xa5, 0x82, 0xd7, 0x3b, 0x53, 0xa2, 0x3f, 0xc9, 0x97, 0x4e, 0x5b,
-       0x98, 0x25, 0xe7, 0x0f, 0xdb, 0x65, 0xe3, 0xd4, 0x57, 0x0f, 0x6d, 0x88,
-       0xb1, 0x81, 0xf1, 0x42, 0xee, 0xb2, 0x6a, 0xc4, 0x5c, 0x0b, 0xdb, 0x19,
-       0xb2, 0xd2, 0xde, 0x6a, 0xec, 0x34, 0x69, 0x77, 0x86, 0x3a, 0xdf, 0x09,
-       0x0b, 0xa7, 0x4d, 0x39, 0x77, 0x61, 0xca, 0xeb, 0xc0, 0x2e, 0xd3, 0x89,
-       0x4e, 0x43, 0xd5, 0xe5, 0xba, 0x23, 0x24, 0xe7, 0x2e, 0xf8, 0x67, 0x2a,
-       0xd8, 0x13, 0x56, 0xb1, 0xc5, 0xe8, 0xf1, 0xcb, 0xf5, 0xe5, 0x21, 0x39,
-       0x57, 0xb0, 0x91, 0x3a, 0x89, 0x33, 0x57, 0xde, 0xca, 0x76, 0x7b, 0x43,
-       0xf9, 0x75, 0xf1, 0x18, 0x2c, 0x6b, 0x8f, 0xd9, 0xf2, 0xe1, 0x0a, 0x96,
-       0x3b, 0x67, 0x4a, 0xec, 0x38, 0x70, 0xcb, 0xc2, 0x40, 0x3c, 0x5a, 0x02,
-       0x3d, 0x56, 0x46, 0x3f, 0xdd, 0x39, 0x30, 0x8f, 0xf5, 0x04, 0xfb, 0x9d,
-       0xbe, 0xdd, 0x90, 0xf5, 0xae, 0x80, 0xff, 0x27, 0xe4, 0xde, 0x69, 0xef,
-       0x02, 0x6a, 0xd6, 0xf0, 0xbf, 0xc2, 0x79, 0xab, 0x36, 0x9c, 0xdb, 0x5e,
-       0x80, 0xde, 0x59, 0xa6, 0x2c, 0x08, 0x56, 0xc1, 0x85, 0x38, 0xf9, 0xf9,
-       0xd8, 0x38, 0xf3, 0xeb, 0x94, 0xa1, 0x1d, 0xb1, 0xd7, 0xcc, 0x3d, 0xd4,
-       0x85, 0x87, 0xf1, 0x22, 0xa0, 0x4d, 0x2a, 0xc5, 0xf3, 0x79, 0x82, 0x0d,
-       0x31, 0x47, 0x44, 0xf0, 0x2d, 0x6e, 0x3d, 0xd1, 0x4c, 0xd5, 0x19, 0x6e,
-       0x7f, 0x2c, 0xe3, 0xe1, 0xa1, 0xf1, 0xf0, 0xfa, 0x37, 0x65, 0x7c, 0xfe,
-       0x8d, 0x19, 0xf8, 0xd7, 0x67, 0x8a, 0x76, 0x59, 0xf4, 0x6d, 0xc1, 0x36,
-       0xcb, 0x92, 0x7b, 0xc9, 0x8f, 0x67, 0xa5, 0xad, 0x7c, 0x1c, 0x2b, 0xa1,
-       0xec, 0x4f, 0xd2, 0xd6, 0x5d, 0x8c, 0x55, 0xbb, 0x8c, 0x38, 0xa1, 0xd2,
-       0xb2, 0x0c, 0xf2, 0x99, 0x12, 0xc5, 0x8f, 0x9d, 0x4d, 0xbf, 0xe5, 0x7c,
-       0x02, 0x9b, 0x32, 0x01, 0x77, 0x7e, 0x3e, 0xc4, 0xcf, 0x04, 0x03, 0xfc,
-       0x8c, 0xbf, 0x3e, 0x7f, 0x0f, 0xfb, 0xd9, 0x9e, 0x99, 0xee, 0x03, 0x0a,
-       0x56, 0xb3, 0xad, 0x96, 0x10, 0x9c, 0x2b, 0x9a, 0xfe, 0xcd, 0xca, 0x79,
-       0xa7, 0xdf, 0x37, 0x75, 0x33, 0xe6, 0xc2, 0xb9, 0xbe, 0x49, 0xce, 0x15,
-       0xb4, 0x84, 0xe5, 0x5c, 0xc1, 0x7a, 0x43, 0xce, 0x89, 0xd9, 0x59, 0x39,
-       0xb7, 0xac, 0xcb, 0xe7, 0xef, 0xc7, 0x22, 0x13, 0x77, 0xa5, 0x64, 0xed,
-       0x4d, 0xb0, 0xc8, 0xed, 0xff, 0x4e, 0xa6, 0x09, 0x5b, 0x52, 0x72, 0x7f,
-       0x8c, 0xb9, 0x86, 0xe1, 0xf1, 0x3f, 0x93, 0xb9, 0x16, 0x77, 0xee, 0x0f,
-       0xa3, 0x73, 0x3f, 0x9a, 0xca, 0x38, 0x86, 0xd2, 0x50, 0xc0, 0x7f, 0x14,
-       0x9a, 0xff, 0x0c, 0x75, 0x72, 0x8a, 0x72, 0x9e, 0x7e, 0x8f, 0x9c, 0xa2,
-       0x43, 0xf8, 0xef, 0x4e, 0xb8, 0x91, 0x09, 0xbd, 0x63, 0xc5, 0xed, 0x5c,
-       0xc8, 0xeb, 0xbf, 0x27, 0xe1, 0x47, 0xce, 0xce, 0xc9, 0xde, 0x28, 0x15,
-       0xec, 0xee, 0x4b, 0xc5, 0xa3, 0x2a, 0x8a, 0xf3, 0xab, 0x87, 0x65, 0x6e,
-       0x5f, 0x4d, 0xc8, 0x7f, 0xd1, 0x2f, 0xa9, 0x8c, 0x4b, 0x2a, 0x73, 0xf9,
-       0x41, 0x59, 0xdf, 0x57, 0x4b, 0x45, 0x3f, 0x72, 0x8f, 0x22, 0x2e, 0x39,
-       0x63, 0x13, 0xaf, 0x6b, 0x8b, 0x10, 0xab, 0xa1, 0x9e, 0xca, 0x0d, 0xaf,
-       0xbf, 0x71, 0xc2, 0xe7, 0x37, 0x27, 0xe0, 0xbf, 0x72, 0x62, 0xba, 0x08,
-       0xe4, 0x0a, 0xea, 0x07, 0x61, 0x81, 0xd7, 0xbf, 0x39, 0x31, 0x8f, 0x3c,
-       0x33, 0x6e, 0x2d, 0x6f, 0x3e, 0x6f, 0xcd, 0x8b, 0x18, 0xb9, 0xd3, 0x94,
-       0xe1, 0x9d, 0x6b, 0xf4, 0xf8, 0x1c, 0xc7, 0xa9, 0xfb, 0xb5, 0x69, 0x7d,
-       0x5c, 0x08, 0xfd, 0xff, 0xed, 0xa3, 0x18, 0xe7, 0x68, 0x0f, 0xcd, 0x32,
-       0x06, 0x89, 0x77, 0xcc, 0x85, 0x6a, 0x65, 0x2c, 0x81, 0x02, 0x6f, 0x2b,
-       0x8e, 0x4b, 0xe1, 0x5c, 0xbb, 0xa9, 0x8b, 0x62, 0x0c, 0xb3, 0xac, 0x5e,
-       0xc3, 0x57, 0x58, 0x03, 0xe7, 0x9c, 0x65, 0x4f, 0x7d, 0xd8, 0xc9, 0x9c,
-       0xfd, 0x9c, 0xd9, 0xf2, 0x57, 0x4e, 0x44, 0x7d, 0xa5, 0x8c, 0xad, 0xb2,
-       0xf6, 0x74, 0xa6, 0x69, 0xca, 0x9a, 0x64, 0x1e, 0xd4, 0x92, 0x95, 0xfb,
-       0x4b, 0x0e, 0xda, 0xb7, 0x85, 0x87, 0x4d, 0xf9, 0x5f, 0x70, 0x26, 0x1e,
-       0x73, 0xd0, 0x56, 0xdc, 0x86, 0xde, 0xf1, 0x65, 0xa5, 0x8a, 0xae, 0xec,
-       0x0c, 0x4e, 0x42, 0x0f, 0x6f, 0x51, 0xe8, 0x87, 0x35, 0x0b, 0x4c, 0x99,
-       0x82, 0x37, 0x12, 0x01, 0x33, 0x50, 0x88, 0x4b, 0xe7, 0x38, 0x77, 0x6f,
-       0x25, 0x8c, 0xce, 0x27, 0x0b, 0xe7, 0x3f, 0xcb, 0x4c, 0x5f, 0x1f, 0x17,
-       0x7b, 0x74, 0xbb, 0xb7, 0x27, 0x70, 0xc1, 0xd1, 0x8c, 0x0b, 0x87, 0xcc,
-       0x12, 0x2c, 0x6f, 0x17, 0x3b, 0x75, 0xbb, 0x77, 0x26, 0x30, 0xe5, 0xe4,
-       0xb5, 0x73, 0xe6, 0x5c, 0x62, 0x9a, 0xbd, 0x7e, 0x29, 0x31, 0x22, 0xa6,
-       0x31, 0xbe, 0x96, 0x47, 0xbc, 0xee, 0xf2, 0x09, 0x68, 0x65, 0xe4, 0x40,
-       0xee, 0x08, 0x5a, 0x1d, 0x49, 0xdd, 0xdf, 0xe6, 0x68, 0xc2, 0xaa, 0xac,
-       0x9f, 0x3c, 0xfa, 0x05, 0xf2, 0x4e, 0xfb, 0x3e, 0x1f, 0x6d, 0xd2, 0xc9,
-       0x0a, 0x43, 0xb3, 0xd4, 0x88, 0xe4, 0x76, 0x55, 0xb8, 0x4b, 0xdb, 0xfa,
-       0x11, 0x35, 0x32, 0x88, 0x9b, 0x9a, 0xdd, 0xad, 0xd5, 0x13, 0x45, 0x9d,
-       0x20, 0xe6, 0x89, 0x40, 0xab, 0x32, 0xa0, 0x56, 0x46, 0x44, 0x37, 0xfe,
-       0xd6, 0xe4, 0xb8, 0xc8, 0xaa, 0xb9, 0x07, 0xc6, 0x7f, 0xe3, 0x46, 0x79,
-       0x94, 0x58, 0xf5, 0x43, 0xdf, 0x7f, 0xae, 0xde, 0x33, 0x6e, 0xc1, 0x7b,
-       0x97, 0x21, 0xdf, 0xb6, 0x6d, 0x31, 0x1f, 0x19, 0xfb, 0x8c, 0x3b, 0x60,
-       0x59, 0x8c, 0x93, 0x3e, 0x28, 0x73, 0x39, 0x1e, 0xfa, 0x1a, 0xe3, 0xd2,
-       0xc6, 0xcc, 0x1f, 0xac, 0x8f, 0x3a, 0x6d, 0x0e, 0x40, 0xde, 0xe4, 0xbf,
-       0xed, 0x75, 0xe3, 0xf7, 0x96, 0xf0, 0x11, 0x27, 0x7d, 0xba, 0x84, 0x78,
-       0xbe, 0xdb, 0x74, 0xb6, 0xad, 0x50, 0x14, 0xf4, 0x19, 0x0b, 0xb4, 0x32,
-       0xc6, 0xa9, 0x5e, 0xfa, 0x75, 0xcc, 0x6b, 0x04, 0x0f, 0x81, 0xe5, 0x32,
-       0x9b, 0x37, 0xbb, 0x22, 0xf7, 0x7c, 0x76, 0xac, 0x59, 0xb0, 0x60, 0xea,
-       0xb6, 0x27, 0x8d, 0x0e, 0xf2, 0xaf, 0xaf, 0x90, 0xa7, 0xe5, 0xfb, 0xc9,
-       0x61, 0xde, 0x07, 0xf4, 0xb3, 0x79, 0x73, 0x69, 0x44, 0x78, 0x58, 0xfa,
-       0xb6, 0xc3, 0x46, 0x1b, 0x73, 0xb0, 0x7b, 0x3e, 0x7b, 0xae, 0xf9, 0x00,
-       0xbf, 0xf3, 0x75, 0xd2, 0xa8, 0xfe, 0xc0, 0x3a, 0x15, 0x11, 0xe9, 0xc3,
-       0xcf, 0x3e, 0xee, 0xf9, 0x6c, 0xe7, 0x92, 0x31, 0x6c, 0xcf, 0x6e, 0xfb,
-       0x93, 0xfd, 0x54, 0x46, 0x64, 0x3d, 0x34, 0x76, 0xfb, 0xea, 0xc0, 0x3d,
-       0x9f, 0xcd, 0x2c, 0x19, 0x64, 0x1f, 0x9f, 0x66, 0x7c, 0xc9, 0xd7, 0x89,
-       0x2a, 0x8e, 0x0f, 0xd4, 0x41, 0x59, 0x64, 0xdb, 0xed, 0x0b, 0x03, 0xbf,
-       0xb7, 0x16, 0x0c, 0x94, 0xd8, 0x3a, 0x70, 0x51, 0x07, 0x0f, 0x9a, 0xce,
-       0x5c, 0xc0, 0x61, 0xeb, 0xa0, 0xcb, 0x47, 0x1d, 0x24, 0xa9, 0x83, 0xdc,
-       0x4c, 0x23, 0xfc, 0x36, 0x75, 0xb0, 0x60, 0x7c, 0xf3, 0xe6, 0xb2, 0x08,
-       0x9c, 0x0e, 0xe3, 0x47, 0x0e, 0xe6, 0x45, 0xaa, 0xcb, 0xd8, 0x4c, 0xbd,
-       0xdd, 0xf3, 0xd9, 0xf9, 0x4b, 0x6c, 0x9d, 0xdf, 0xea, 0x0e, 0xdc, 0x47,
-       0xbb, 0x69, 0xa5, 0xad, 0x6f, 0xe5, 0xd1, 0xce, 0xa3, 0x8f, 0x47, 0x02,
-       0xbb, 0xb3, 0x1b, 0xa9, 0xab, 0x35, 0x1c, 0xc7, 0x3a, 0xca, 0xd5, 0xc5,
-       0xdf, 0x31, 0xfe, 0x8e, 0xf3, 0xb7, 0xcc, 0x8f, 0x7a, 0x49, 0xb6, 0xd8,
-       0x25, 0xd9, 0x1c, 0x94, 0xc7, 0x63, 0xaf, 0x55, 0x96, 0x47, 0x8e, 0xdf,
-       0xba, 0x3a, 0xd0, 0xc9, 0x36, 0xfe, 0xbf, 0x32, 0xd9, 0x57, 0xe0, 0x32,
-       0xe2, 0x3e, 0x27, 0x44, 0x3e, 0xbd, 0xa3, 0x13, 0x39, 0x62, 0xef, 0xef,
-       0xf2, 0xd8, 0x4b, 0xd9, 0xaa, 0x38, 0x3f, 0xcf, 0x2d, 0x49, 0xcf, 0xf6,
-       0x18, 0xf0, 0xb9, 0x8d, 0x7e, 0x0c, 0x64, 0x47, 0xa8, 0x03, 0xb1, 0x93,
-       0x2f, 0x52, 0x7f, 0xdd, 0xac, 0x73, 0x8a, 0xb1, 0x4c, 0x8f, 0xd2, 0x67,
-       0x69, 0xb3, 0x7a, 0x98, 0x07, 0xed, 0xe5, 0x51, 0xb6, 0x9b, 0xa6, 0x4c,
-       0x25, 0xb4, 0x5f, 0x05, 0x72, 0x0f, 0xf7, 0x0c, 0xdb, 0x3f, 0x6c, 0xfc,
-       0xba, 0xe2, 0x14, 0xc7, 0x1e, 0xf5, 0x6e, 0xc6, 0x68, 0x93, 0xe8, 0x2a,
-       0x46, 0x5d, 0xe9, 0x3e, 0xff, 0x34, 0x5d, 0x5e, 0x96, 0xf7, 0x0a, 0xf2,
-       0x09, 0xcb, 0xfa, 0x89, 0xd1, 0xb2, 0x90, 0x49, 0x21, 0xd2, 0x76, 0xae,
-       0x64, 0x59, 0x25, 0xf6, 0xfe, 0xb3, 0xd8, 0xed, 0x1b, 0x0c, 0x91, 0xb7,
-       0xb1, 0x7d, 0x3b, 0x8d, 0x73, 0x73, 0x86, 0xfe, 0x1c, 0xf8, 0x9d, 0x15,
-       0x9d, 0x29, 0xf5, 0xe6, 0xe1, 0x15, 0xc6, 0xde, 0xa8, 0x16, 0xef, 0x74,
-       0x0b, 0xbf, 0x37, 0x9c, 0xe1, 0x35, 0x88, 0x33, 0xa1, 0xd4, 0x83, 0x77,
-       0x92, 0x7b, 0x9e, 0x33, 0xf2, 0x7e, 0x7c, 0x24, 0xa3, 0x47, 0x1f, 0xe6,
-       0x39, 0x39, 0x30, 0xb9, 0x54, 0x31, 0x4e, 0x05, 0xc9, 0x7b, 0x3d, 0x70,
-       0x32, 0x87, 0x6a, 0x75, 0xf4, 0x04, 0x5d, 0xa0, 0x2f, 0x96, 0xcb, 0xb8,
-       0xe2, 0x1c, 0xa3, 0xe0, 0xb6, 0x5b, 0xdb, 0x68, 0x63, 0x79, 0x7c, 0xa1,
-       0x0b, 0x1e, 0x6d, 0x53, 0xa6, 0x18, 0xe3, 0x3c, 0xda, 0xfa, 0x84, 0xe0,
-       0x82, 0xdc, 0x77, 0x0d, 0x53, 0xcf, 0x82, 0x0f, 0xaf, 0xda, 0x7b, 0xd5,
-       0x88, 0x11, 0x55, 0x4e, 0x23, 0xdf, 0xae, 0xc6, 0x76, 0xdb, 0x1d, 0x1a,
-       0x2e, 0xfb, 0xb8, 0xae, 0xb5, 0x3b, 0x64, 0x1f, 0x1d, 0xd1, 0x2b, 0x53,
-       0xa8, 0x97, 0xc7, 0xb9, 0x65, 0x2e, 0x1b, 0xe7, 0xd8, 0x06, 0xf3, 0x8e,
-       0xe5, 0x89, 0xf7, 0xf7, 0x2f, 0xfd, 0x49, 0xbf, 0x3d, 0x35, 0x2a, 0x64,
-       0x9f, 0x8f, 0xdc, 0x13, 0xeb, 0x64, 0xbe, 0x36, 0x7d, 0xaf, 0x8f, 0x7e,
-       0x82, 0xed, 0x1f, 0x8f, 0x73, 0x3e, 0xe7, 0x1a, 0xb2, 0x0f, 0x48, 0xee,
-       0xa1, 0x4d, 0xdf, 0xf7, 0x63, 0xdf, 0x9f, 0x2c, 0x17, 0x2e, 0x73, 0x98,
-       0x38, 0x19, 0x6d, 0x97, 0xfa, 0x96, 0xf5, 0xe3, 0x05, 0x41, 0xe4, 0x66,
-       0x38, 0x31, 0xd2, 0x00, 0x0c, 0x27, 0x45, 0xd7, 0xe9, 0xcf, 0x6c, 0x30,
-       0xfe, 0xcd, 0x8a, 0xd6, 0x36, 0x6a, 0xbd, 0xaa, 0xac, 0x67, 0x8c, 0xdd,
-       0xda, 0x67, 0xd4, 0x6b, 0x7d, 0x6a, 0xee, 0x18, 0xe3, 0xd0, 0x01, 0xe6,
-       0xe8, 0xe5, 0x82, 0x15, 0x35, 0x46, 0xb4, 0xbf, 0x06, 0x0d, 0xf0, 0xdb,
-       0xf7, 0x24, 0xf4, 0xf8, 0x37, 0x54, 0x23, 0xb8, 0x56, 0xf8, 0xa7, 0xfa,
-       0x8e, 0x95, 0xa6, 0x0d, 0x7c, 0xa1, 0xe1, 0x67, 0x65, 0x79, 0x6c, 0x8f,
-       0x76, 0xce, 0xe2, 0xbc, 0xbc, 0xb9, 0x48, 0xf7, 0x67, 0x14, 0xd1, 0x91,
-       0x70, 0xae, 0x11, 0xec, 0x62, 0x3c, 0xfe, 0xb7, 0x86, 0x08, 0x8e, 0xf0,
-       0xfb, 0xa7, 0xd7, 0xca, 0x1e, 0x37, 0xcb, 0x0a, 0x06, 0x16, 0x84, 0x6b,
-       0x38, 0x86, 0x67, 0xf8, 0x7f, 0x7f, 0xf6, 0x75, 0xeb, 0xdc, 0x2c, 0x63,
-       0x70, 0x25, 0x83, 0xe2, 0xf0, 0x84, 0xae, 0x4d, 0xa9, 0xff, 0xd9, 0x3d,
-       0x37, 0xf6, 0x3a, 0xe3, 0x67, 0x9e, 0x0f, 0x34, 0x6a, 0x49, 0xb5, 0xae,
-       0x5c, 0xf4, 0x3a, 0x3c, 0xf1, 0x52, 0x21, 0xce, 0xe7, 0xef, 0x75, 0x3e,
-       0x7e, 0x49, 0x3f, 0x72, 0xdf, 0x76, 0x1e, 0x6d, 0x2e, 0x1a, 0xa7, 0xde,
-       0xdd, 0x33, 0x38, 0xe6, 0x2f, 0x34, 0xdc, 0x69, 0x8f, 0xb3, 0xd6, 0x98,
-       0xc3, 0x31, 0x2a, 0xd0, 0x1a, 0x9c, 0xe5, 0x79, 0xfe, 0xd8, 0x42, 0x96,
-       0x96, 0xb6, 0x5a, 0xe9, 0x43, 0x25, 0xac, 0x73, 0xbd, 0x79, 0x70, 0x76,
-       0x4f, 0x93, 0xee, 0xfb, 0x02, 0x6d, 0x35, 0xd4, 0xf0, 0x2b, 0x2b, 0xaa,
-       0x39, 0xcd, 0xaf, 0x73, 0xd4, 0x77, 0x26, 0xa4, 0xac, 0xcc, 0xab, 0x11,
-       0x6d, 0x50, 0xde, 0xb2, 0x30, 0x33, 0x10, 0x6e, 0xb0, 0xc7, 0x0f, 0xdc,
-       0x91, 0x19, 0x61, 0xae, 0x2c, 0x6d, 0x2a, 0x58, 0x19, 0x78, 0xc3, 0xf2,
-       0xcf, 0x1a, 0xc1, 0xce, 0xec, 0x1f, 0xe3, 0xb0, 0x5f, 0x21, 0x87, 0xd6,
-       0x3b, 0xe2, 0x79, 0xbf, 0x6b, 0x03, 0xfb, 0x2d, 0x37, 0xec, 0x3c, 0xfc,
-       0xb6, 0x44, 0x40, 0xd6, 0x8c, 0xc6, 0x3e, 0x33, 0x1e, 0x90, 0xbd, 0x19,
-       0x5e, 0xe4, 0xda, 0xa5, 0x4c, 0xbd, 0x36, 0x8e, 0x1c, 0x19, 0xa6, 0xec,
-       0x23, 0x39, 0x54, 0x9e, 0x5f, 0x47, 0x70, 0xc8, 0x3a, 0xb8, 0xf6, 0x2a,
-       0x39, 0x61, 0x9b, 0x21, 0x6d, 0x28, 0x58, 0x18, 0x98, 0x81, 0xc6, 0xb5,
-       0x3f, 0x7a, 0xb9, 0x24, 0x90, 0xf7, 0xdb, 0x3e, 0xc3, 0xd8, 0x76, 0x1a,
-       0xbf, 0x26, 0x56, 0xc9, 0x3e, 0x93, 0xb4, 0xd4, 0x63, 0x5b, 0x0d, 0xc8,
-       0x68, 0x4e, 0x8c, 0x1a, 0xb2, 0x0f, 0xd2, 0xb2, 0x56, 0x07, 0x5e, 0xa3,
-       0xdf, 0x51, 0x9e, 0xac, 0xb3, 0x50, 0x57, 0xca, 0x14, 0xf6, 0x70, 0x28,
-       0x2d, 0x9f, 0x15, 0x9d, 0x3c, 0x61, 0xc6, 0x99, 0x35, 0x48, 0x7c, 0x18,
-       0xfb, 0xcc, 0xeb, 0x86, 0x70, 0x78, 0xdd, 0x5c, 0xa9, 0x54, 0x33, 0xde,
-       0x3a, 0xfd, 0x63, 0xf6, 0x7a, 0x86, 0x9f, 0x58, 0x2e, 0x3c, 0x54, 0x72,
-       0x43, 0x27, 0x9e, 0x34, 0x6a, 0xf0, 0x84, 0x96, 0xe7, 0x74, 0xc4, 0x44,
-       0xbc, 0x90, 0x58, 0x90, 0xa3, 0x87, 0x90, 0x1b, 0x1b, 0x9d, 0x17, 0x95,
-       0x5f, 0x33, 0x6f, 0x04, 0x9e, 0xcb, 0x74, 0xe1, 0x41, 0xb9, 0x8f, 0xa5,
-       0xd4, 0xb7, 0x35, 0x3a, 0xa4, 0xbf, 0x2e, 0xec, 0xb2, 0xd7, 0x65, 0xc7,
-       0x3e, 0x73, 0xd8, 0x78, 0xa4, 0x20, 0xab, 0x60, 0xfe, 0xd8, 0x67, 0x9e,
-       0x34, 0x4e, 0xdb, 0x73, 0x27, 0x7b, 0x16, 0xfa, 0x4d, 0xc1, 0xc6, 0x72,
-       0xa8, 0xcc, 0x2f, 0x1c, 0xc6, 0xa7, 0xe1, 0xa8, 0x19, 0xa3, 0xed, 0xc9,
-       0x7a, 0xcf, 0xed, 0x70, 0xd6, 0xb8, 0xe8, 0x9b, 0x77, 0xc0, 0x55, 0x23,
-       0x9c, 0xbe, 0xc8, 0xb7, 0xdb, 0xf8, 0xbf, 0xe8, 0x76, 0xca, 0xd6, 0xad,
-       0x93, 0xd8, 0xd3, 0x27, 0xf9, 0x9f, 0x51, 0x4d, 0x1d, 0xe9, 0x1d, 0xb2,
-       0xae, 0x5d, 0x49, 0x6c, 0x65, 0x1c, 0x75, 0x57, 0xb3, 0xcc, 0xdb, 0xd4,
-       0xfb, 0x82, 0x81, 0x0a, 0x72, 0x7d, 0xcb, 0x7a, 0x87, 0x5c, 0x7f, 0x61,
-       0xa0, 0x31, 0x67, 0x30, 0xfe, 0xe1, 0x66, 0xbd, 0x4d, 0xee, 0x11, 0x6f,
-       0x30, 0x2e, 0x5a, 0xb1, 0x75, 0x52, 0x46, 0xf7, 0xc5, 0x94, 0x62, 0x1f,
-       0x8b, 0xe0, 0x9f, 0x61, 0xc1, 0x15, 0xb1, 0x88, 0x5d, 0xba, 0x19, 0x45,
-       0x8b, 0xec, 0xf5, 0x69, 0x97, 0xf1, 0xbb, 0xe4, 0x7e, 0x03, 0xa2, 0x93,
-       0x2e, 0x18, 0xb9, 0x23, 0x32, 0x67, 0xb3, 0x2d, 0x04, 0x16, 0xff, 0x8e,
-       0x39, 0x93, 0xcc, 0x4f, 0x7d, 0xae, 0x49, 0xc9, 0x05, 0x7d, 0xe4, 0xfe,
-       0x8f, 0x40, 0x6f, 0x4f, 0x50, 0xd7, 0xad, 0x21, 0x1b, 0xf3, 0x7c, 0x09,
-       0xd8, 0x7c, 0xdf, 0x7c, 0x05, 0x1f, 0x45, 0x25, 0x73, 0xdc, 0x86, 0xf1,
-       0x35, 0xa8, 0xaa, 0x89, 0xfa, 0xca, 0xb1, 0x94, 0xe7, 0x5b, 0x99, 0xc7,
-       0x7c, 0x12, 0x55, 0x6b, 0x63, 0x48, 0x70, 0xec, 0x95, 0xc6, 0xad, 0xbc,
-       0xd6, 0x87, 0x64, 0xca, 0xc5, 0x71, 0xfc, 0xd0, 0xaa, 0x9a, 0x29, 0xb2,
-       0x99, 0xde, 0x0a, 0x83, 0x79, 0xb7, 0xad, 0x0b, 0x62, 0x79, 0x4a, 0xb8,
-       0x54, 0x63, 0x74, 0x0b, 0xfe, 0x40, 0xdb, 0xd5, 0x3b, 0x36, 0x2a, 0x71,
-       0xda, 0x6c, 0x82, 0x3a, 0x97, 0xb2, 0x96, 0xb5, 0x2a, 0xf0, 0x5b, 0xea,
-       0x38, 0xce, 0x73, 0xc3, 0xff, 0x1a, 0xd4, 0xa5, 0xa5, 0x38, 0x6b, 0xc5,
-       0x35, 0x1f, 0xed, 0x52, 0x5d, 0x27, 0xbc, 0x6b, 0x45, 0x48, 0xad, 0x40,
-       0xb9, 0x56, 0xb0, 0xd3, 0x74, 0x41, 0x97, 0x53, 0xb7, 0xf5, 0x19, 0x6f,
-       0x94, 0xcb, 0x75, 0x87, 0x7d, 0xdd, 0x5f, 0xb8, 0x9e, 0xe6, 0xf5, 0xf3,
-       0xbc, 0x3e, 0x48, 0xdd, 0xab, 0x57, 0x48, 0xfd, 0xcd, 0xa6, 0xd4, 0x27,
-       0x1d, 0x31, 0x12, 0x85, 0xf9, 0x88, 0xdd, 0x9e, 0x2f, 0xbb, 0xed, 0xf6,
-       0x7c, 0x1b, 0x4e, 0xb6, 0x11, 0x8f, 0x96, 0xc3, 0x44, 0x45, 0x40, 0x70,
-       0x5e, 0xe4, 0xe2, 0xdc, 0x65, 0x45, 0xae, 0xad, 0x8c, 0x8b, 0x3d, 0x4f,
-       0x97, 0x23, 0xde, 0x35, 0xc7, 0xb6, 0xc3, 0x34, 0x79, 0x8a, 0xee, 0x7f,
-       0x5d, 0x69, 0xf1, 0xc9, 0xb2, 0x4e, 0x8a, 0x9c, 0xf7, 0x7e, 0xd3, 0x19,
-       0x6e, 0x72, 0x2c, 0xc8, 0x95, 0xc2, 0x88, 0x5d, 0x54, 0x66, 0x57, 0x08,
-       0x3e, 0x24, 0x32, 0x2d, 0xcc, 0xd0, 0xe2, 0x41, 0xe6, 0x56, 0xc1, 0x2c,
-       0x75, 0xbb, 0x9e, 0x88, 0x7d, 0xc2, 0xde, 0xb3, 0xe4, 0x9c, 0x5c, 0x83,
-       0x16, 0xdd, 0x81, 0x05, 0xe1, 0x39, 0xcc, 0xd0, 0x68, 0x97, 0x66, 0xa9,
-       0x43, 0xf7, 0xdf, 0x84, 0xff, 0x62, 0xd7, 0x3b, 0x92, 0xc9, 0x75, 0x96,
-       0x73, 0x4e, 0xbf, 0x4a, 0x39, 0x76, 0x07, 0x44, 0x8e, 0xb1, 0x82, 0x1c,
-       0x31, 0xc6, 0x5c, 0x53, 0xbb, 0x21, 0x30, 0x78, 0x49, 0x6f, 0x4f, 0xdb,
-       0x7a, 0xeb, 0xe3, 0x79, 0x29, 0x76, 0x90, 0x3f, 0x9e, 0x6a, 0xf2, 0x16,
-       0xd6, 0xf6, 0x25, 0xa7, 0x13, 0xfc, 0x3d, 0xfb, 0xa9, 0x0d, 0x86, 0x1e,
-       0x76, 0xd8, 0xfc, 0xdf, 0x8d, 0xb8, 0xcd, 0xad, 0x1d, 0x10, 0xee, 0xf8,
-       0xb0, 0x5d, 0xce, 0x45, 0x9d, 0x54, 0xe0, 0x91, 0x82, 0xbf, 0x54, 0x30,
-       0xbe, 0x7d, 0xd5, 0xfe, 0x9d, 0xe6, 0xdc, 0xba, 0xe8, 0xab, 0xc5, 0x18,
-       0x25, 0xeb, 0x83, 0xfd, 0xb6, 0xef, 0xa7, 0xf1, 0x7d, 0xfb, 0x3b, 0x97,
-       0xcf, 0xcb, 0xd0, 0x47, 0x9f, 0x70, 0xb0, 0x8d, 0x5e, 0x7b, 0x2f, 0xaa,
-       0xac, 0x15, 0x5c, 0x8b, 0x1d, 0x1c, 0x95, 0xdb, 0xe8, 0x44, 0xbf, 0x26,
-       0x36, 0xd1, 0x8d, 0xa4, 0x66, 0x7a, 0xb3, 0x4d, 0xd3, 0x73, 0x2a, 0x13,
-       0x87, 0x9a, 0x7e, 0xcf, 0x58, 0x2e, 0xd7, 0xce, 0x5a, 0x87, 0x8d, 0x53,
-       0x21, 0x7a, 0x70, 0x67, 0x89, 0xad, 0xdf, 0xa9, 0xdb, 0xec, 0x7d, 0x5b,
-       0x94, 0xf9, 0xe9, 0x84, 0xc4, 0xd1, 0x79, 0xc8, 0x98, 0x22, 0x9b, 0xb3,
-       0x7d, 0x0f, 0xe7, 0xa4, 0x2f, 0x15, 0x88, 0x5e, 0xc9, 0xff, 0x26, 0x19,
-       0xcb, 0x7a, 0xa9, 0xcf, 0x58, 0xbb, 0xf0, 0xb8, 0xad, 0x38, 0x40, 0x1b,
-       0x9b, 0x30, 0x2d, 0xeb, 0x08, 0x31, 0xa2, 0x7a, 0x81, 0x8a, 0xdc, 0xcc,
-       0xad, 0x48, 0x31, 0x36, 0x1d, 0x31, 0x5a, 0x3e, 0x5a, 0x82, 0xb8, 0x9f,
-       0x31, 0xdc, 0xb7, 0x93, 0xa3, 0xb9, 0x9f, 0xf3, 0x75, 0xca, 0x14, 0x7e,
-       0xe9, 0xbc, 0xb8, 0x02, 0x46, 0x78, 0x99, 0xe3, 0x87, 0xd6, 0x94, 0xc8,
-       0x9e, 0xea, 0xf9, 0x5f, 0x94, 0x61, 0x9b, 0x38, 0x6f, 0x35, 0xe7, 0xf8,
-       0xed, 0x80, 0xde, 0xf6, 0x02, 0xfb, 0x69, 0x1c, 0x68, 0xe9, 0x14, 0x19,
-       0x0e, 0x87, 0x9c, 0xb1, 0x23, 0x08, 0xb4, 0x6f, 0x55, 0x8a, 0x39, 0x04,
-       0x70, 0xe5, 0xb8, 0x89, 0xa3, 0x4d, 0xcf, 0x90, 0xef, 0x48, 0xfd, 0x52,
-       0x3c, 0x66, 0x3e, 0x65, 0xd5, 0xcf, 0x7e, 0xde, 0x3a, 0x66, 0xa8, 0x5b,
-       0xa8, 0xed, 0x58, 0x25, 0x64, 0x4d, 0x33, 0x7d, 0xdb, 0x5d, 0x01, 0xdd,
-       0xdc, 0xc3, 0xb6, 0xce, 0x24, 0x4e, 0x05, 0xdd, 0x6c, 0xeb, 0x11, 0x53,
-       0x72, 0x08, 0x67, 0x5b, 0x1b, 0xe7, 0xb6, 0x27, 0x15, 0xf0, 0xc9, 0xba,
-       0xad, 0xe4, 0x79, 0xb7, 0x27, 0x64, 0xcf, 0xf8, 0x18, 0xc7, 0x13, 0xdd,
-       0xe6, 0x42, 0xcb, 0xfd, 0x55, 0xb4, 0x9f, 0x6a, 0x14, 0x6d, 0x5d, 0xf7,
-       0x11, 0xef, 0x70, 0x17, 0xcb, 0xbc, 0x1c, 0x98, 0x87, 0xe7, 0x42, 0x2d,
-       0x6b, 0xe7, 0xc1, 0x19, 0x3b, 0xa6, 0x04, 0xda, 0xb6, 0x2a, 0x71, 0x4d,
-       0x6c, 0xf1, 0xce, 0x8c, 0x1e, 0x6c, 0x85, 0x60, 0x77, 0x8c, 0xfa, 0x98,
-       0x87, 0x77, 0x16, 0x8b, 0x5c, 0xce, 0x70, 0xd0, 0x11, 0xe8, 0x7a, 0x8a,
-       0xf3, 0x5b, 0xb5, 0x40, 0x64, 0x07, 0xb2, 0x19, 0x91, 0x3f, 0x86, 0x64,
-       0xf6, 0xec, 0xdb, 0x87, 0x0d, 0x38, 0x4f, 0x34, 0x3d, 0x68, 0xc1, 0xde,
-       0x63, 0xde, 0x22, 0xf3, 0xd0, 0x21, 0xf3, 0x50, 0x4e, 0x7f, 0x5a, 0x4d,
-       0xb9, 0xb7, 0xd8, 0x72, 0xcf, 0xc3, 0xa8, 0x29, 0xeb, 0x64, 0x4e, 0xed,
-       0x4e, 0x0c, 0x12, 0x3b, 0x03, 0x17, 0x7b, 0xd8, 0xcf, 0xcb, 0x94, 0x79,
-       0x01, 0xf5, 0x3e, 0xd5, 0x2e, 0xfc, 0xb6, 0x0f, 0x03, 0xa9, 0xe2, 0x1e,
-       0x74, 0x05, 0x92, 0x7a, 0x4f, 0x39, 0xfa, 0xc8, 0xf7, 0x7a, 0xac, 0xa9,
-       0x99, 0x72, 0x3d, 0x8d, 0x1d, 0xa9, 0xa8, 0x46, 0x7f, 0xa0, 0xde, 0xa1,
-       0xcf, 0x83, 0x3e, 0xf9, 0xaa, 0x23, 0x4a, 0x1f, 0x30, 0xbd, 0x17, 0x89,
-       0x0d, 0x27, 0xd0, 0x65, 0xa1, 0xc6, 0xb6, 0x87, 0x9f, 0x8e, 0x19, 0x0e,
-       0x59, 0x6b, 0x0f, 0xe6, 0xa8, 0x03, 0x95, 0x73, 0x22, 0x3a, 0xa8, 0xa4,
-       0xcf, 0x8e, 0x07, 0x74, 0xff, 0x73, 0x94, 0x67, 0x0f, 0xe5, 0x59, 0x93,
-       0x9f, 0x43, 0xdf, 0x0e, 0x45, 0x7c, 0x3a, 0xd0, 0xbe, 0x81, 0xd7, 0x77,
-       0x53, 0x9e, 0xc0, 0x80, 0x82, 0x34, 0xd1, 0xac, 0x8f, 0x7c, 0xf6, 0xc0,
-       0x34, 0x79, 0xdc, 0xf6, 0x9c, 0xc5, 0xc9, 0x05, 0x4a, 0x71, 0xd8, 0x14,
-       0xfc, 0xd6, 0x30, 0x4a, 0x3b, 0x3d, 0xc4, 0x19, 0x89, 0x7a, 0x55, 0x94,
-       0x1a, 0x82, 0x01, 0x33, 0x79, 0xcd, 0xc5, 0xb9, 0xa9, 0xc6, 0x31, 0x2d,
-       0xcd, 0x38, 0x59, 0xe4, 0x76, 0x7f, 0xb0, 0x8e, 0x7a, 0x85, 0x9f, 0xc9,
-       0x3a, 0x9a, 0xac, 0x35, 0x7d, 0xb9, 0x22, 0xbf, 0xbf, 0x52, 0xf6, 0x3f,
-       0xe4, 0xaf, 0x3f, 0xad, 0x09, 0x47, 0x2e, 0x96, 0xff, 0xb9, 0xf5, 0x84,
-       0x5d, 0x5e, 0xca, 0xb9, 0x6c, 0x2e, 0x5f, 0x6e, 0x97, 0xfb, 0xb9, 0xf5,
-       0x8c, 0xe6, 0x9c, 0x56, 0xae, 0xb8, 0x07, 0xef, 0xd4, 0x97, 0x5c, 0xc4,
-       0x3c, 0x47, 0xc3, 0x32, 0x3c, 0x61, 0x9c, 0xad, 0x5f, 0xdf, 0xd4, 0xcd,
-       0x38, 0x56, 0xe4, 0x5a, 0x75, 0xf4, 0x2b, 0x0b, 0x43, 0xe6, 0xa9, 0xa1,
-       0x12, 0xf4, 0x90, 0x3b, 0x0a, 0x17, 0x10, 0x8e, 0x2a, 0xeb, 0x7c, 0xb7,
-       0x96, 0x5f, 0xce, 0x79, 0xf5, 0xa0, 0x5f, 0x6d, 0xb3, 0xb9, 0x61, 0x54,
-       0x15, 0xdc, 0xad, 0xb3, 0xc7, 0x7e, 0x39, 0xfe, 0x4b, 0xac, 0x98, 0xbe,
-       0x6e, 0xd7, 0x8d, 0x43, 0x46, 0x91, 0xb3, 0x9c, 0x7a, 0x50, 0x25, 0x4e,
-       0x0e, 0x9b, 0xcb, 0x24, 0x36, 0xfb, 0x59, 0x3f, 0x18, 0x53, 0xa7, 0x73,
-       0x9b, 0xbf, 0xa9, 0x40, 0x55, 0xcf, 0x2e, 0x07, 0x64, 0xff, 0xaf, 0xec,
-       0xd9, 0x96, 0xbe, 0xca, 0x0a, 0xeb, 0x57, 0x1f, 0xc4, 0x35, 0x8a, 0x7d,
-       0x09, 0xdf, 0xa8, 0x28, 0xca, 0x18, 0x8c, 0xda, 0x72, 0xfe, 0xd2, 0x5a,
-       0xab, 0xe5, 0xe6, 0x68, 0x78, 0xaf, 0xec, 0xd1, 0x82, 0xec, 0xb1, 0x0f,
-       0x5c, 0x7f, 0x93, 0x7e, 0xa6, 0xb7, 0x59, 0xdc, 0x7b, 0x2a, 0x6b, 0xb3,
-       0xf2, 0x9f, 0x82, 0x1e, 0xe2, 0x50, 0x54, 0x6b, 0x61, 0x9c, 0xd7, 0x7d,
-       0x9b, 0x38, 0x1f, 0x71, 0xaf, 0xec, 0x6b, 0x2d, 0xc6, 0xc8, 0x52, 0xe4,
-       0xd7, 0x48, 0x81, 0x43, 0x85, 0x75, 0x51, 0xda, 0x3d, 0x7a, 0x32, 0xbf,
-       0xb3, 0x72, 0x5e, 0x27, 0x63, 0xe1, 0xe5, 0xfd, 0xf7, 0x69, 0xea, 0x75,
-       0x94, 0xff, 0xed, 0xb8, 0xb4, 0xee, 0x22, 0x6b, 0x4f, 0x12, 0x7b, 0x7f,
-       0x6b, 0xad, 0x7f, 0x4f, 0xd9, 0xe9, 0x7b, 0x5f, 0x67, 0xc6, 0x64, 0x3f,
-       0xda, 0xd1, 0xc2, 0xfa, 0x7c, 0xeb, 0xbf, 0xdf, 0x8f, 0x46, 0x5b, 0x42,
-       0x74, 0x07, 0xb9, 0x5d, 0x1c, 0x7d, 0x38, 0x9a, 0x68, 0xd4, 0x76, 0x42,
-       0x93, 0x75, 0x69, 0x7e, 0xfa, 0x70, 0x2c, 0x81, 0x68, 0xc9, 0x55, 0xd5,
-       0xe4, 0x5b, 0x88, 0x3a, 0x64, 0x8f, 0x50, 0xa2, 0xb1, 0x6d, 0x37, 0xc7,
-       0xe4, 0x5f, 0xdb, 0x87, 0xd1, 0x44, 0xcb, 0xad, 0x8c, 0x23, 0xfe, 0x8a,
-       0x3c, 0xd7, 0xe9, 0x38, 0x4c, 0x1c, 0xd8, 0x5e, 0x58, 0x1b, 0x5b, 0x9f,
-       0xf8, 0x15, 0xe5, 0xb7, 0x85, 0x64, 0xbd, 0x3f, 0x56, 0xee, 0x2c, 0x7a,
-       0x53, 0x67, 0xb1, 0x79, 0x50, 0x11, 0xfb, 0xc2, 0xa6, 0xb4, 0xc8, 0x73,
-       0x16, 0x1b, 0x07, 0xbf, 0x87, 0x43, 0x83, 0xb3, 0xd1, 0x6a, 0xeb, 0xa6,
-       0x0b, 0x5b, 0xf7, 0x9e, 0xc4, 0x9e, 0x94, 0x85, 0xdd, 0x21, 0x0f, 0xb6,
-       0x1c, 0x54, 0xb0, 0x2a, 0x70, 0x06, 0x3b, 0xf7, 0x5a, 0x98, 0x1f, 0xea,
-       0x46, 0x9b, 0x59, 0x81, 0xd2, 0x9a, 0x05, 0x9d, 0x2a, 0xcb, 0xad, 0x1f,
-       0xed, 0x52, 0x6e, 0xe4, 0xb8, 0x73, 0xae, 0xe3, 0xc4, 0x02, 0x15, 0x3e,
-       0x03, 0x5a, 0x75, 0x24, 0xaa, 0xdc, 0x92, 0x6d, 0x55, 0x3a, 0x46, 0x6d,
-       0x3e, 0xa5, 0xdc, 0x94, 0xf5, 0x55, 0x4a, 0x4c, 0x3f, 0x14, 0x3a, 0x8b,
-       0x74, 0xba, 0xaa, 0x32, 0xef, 0x2f, 0x67, 0xc9, 0x1d, 0x24, 0xe7, 0x30,
-       0x69, 0x53, 0x7f, 0xec, 0xb9, 0x02, 0xb1, 0xbb, 0x29, 0xfc, 0x64, 0xe4,
-       0x15, 0xbc, 0x32, 0xf2, 0x2f, 0x58, 0xae, 0x49, 0x9e, 0x69, 0x75, 0x3b,
-       0x23, 0x96, 0xb5, 0xbf, 0x39, 0x6e, 0xcd, 0x34, 0x2c, 0xb6, 0x57, 0x85,
-       0x59, 0x91, 0xef, 0x62, 0xb7, 0xc6, 0xb6, 0x52, 0xc7, 0xed, 0x7b, 0xb7,
-       0xbe, 0xc8, 0xa7, 0xe1, 0x4b, 0xe5, 0xcc, 0x5a, 0x44, 0x87, 0x6a, 0xa1,
-       0x6f, 0xab, 0x71, 0x18, 0x5d, 0xff, 0x5b, 0x69, 0xc2, 0x4d, 0xd9, 0x57,
-       0xf0, 0xe6, 0x48, 0x37, 0x31, 0x53, 0xef, 0xf8, 0x96, 0x62, 0x75, 0xef,
-       0x0e, 0xe9, 0x6d, 0xff, 0x55, 0x89, 0xc6, 0xcb, 0x69, 0x53, 0x65, 0xcc,
-       0x09, 0x6e, 0x1e, 0x91, 0x7c, 0xb9, 0x03, 0xee, 0x01, 0x3d, 0xb7, 0x82,
-       0x3c, 0xfb, 0x0b, 0x8b, 0xe2, 0x73, 0x66, 0xd0, 0x2e, 0x1d, 0x8a, 0x1e,
-       0x34, 0xd4, 0x6e, 0x3c, 0x6e, 0xea, 0x93, 0xbf, 0x75, 0x18, 0xe9, 0x6f,
-       0xa2, 0x09, 0xeb, 0xb2, 0x7a, 0x7a, 0x29, 0xf3, 0xb0, 0x9d, 0x49, 0x13,
-       0xa9, 0xa4, 0xde, 0xd1, 0xe5, 0xe8, 0xc7, 0xdd, 0x81, 0xfa, 0x6d, 0x6f,
-       0x93, 0xcb, 0x79, 0x88, 0x29, 0xc9, 0x89, 0x0c, 0xf3, 0xdc, 0x7e, 0x6c,
-       0x3d, 0x18, 0xc1, 0x96, 0xfd, 0x26, 0xfa, 0x92, 0x19, 0xca, 0xf6, 0x1a,
-       0x6d, 0xdb, 0xb2, 0xda, 0x43, 0xf1, 0x1b, 0x54, 0x04, 0xa2, 0xec, 0xb3,
-       0x45, 0x8d, 0x04, 0xfc, 0xaa, 0xc2, 0xe8, 0x3f, 0xe1, 0x44, 0x2f, 0xcb,
-       0x0c, 0xa4, 0x68, 0x73, 0x49, 0x37, 0xe3, 0x65, 0x1d, 0x46, 0xc7, 0x7d,
-       0x38, 0x32, 0xee, 0x41, 0x7a, 0x5c, 0xe3, 0x51, 0x8e, 0x87, 0x86, 0x2d,
-       0x62, 0xb9, 0x17, 0x8f, 0x1d, 0x76, 0x63, 0xfb, 0x3e, 0x0f, 0xe6, 0x45,
-       0x66, 0xe1, 0xf0, 0xe1, 0x72, 0x1c, 0xe0, 0xf5, 0x9a, 0xc5, 0x7e, 0x7c,
-       0x8d, 0xd7, 0x07, 0xf7, 0xb9, 0x38, 0x0f, 0xf3, 0x71, 0x9c, 0x86, 0x9d,
-       0x1e, 0xaf, 0x40, 0x6a, 0x98, 0x26, 0x4f, 0xce, 0xfa, 0x3a, 0x33, 0x8c,
-       0xa3, 0x87, 0x19, 0x1b, 0x0f, 0x9a, 0x48, 0xb0, 0x9f, 0x3d, 0xd4, 0x55,
-       0x1f, 0x71, 0x6d, 0xeb, 0xb8, 0x60, 0xfc, 0x3a, 0xac, 0x1e, 0xd0, 0xdb,
-       0x5a, 0x15, 0x23, 0xba, 0x44, 0x09, 0xca, 0x73, 0x2b, 0x6e, 0x95, 0xd7,
-       0x5a, 0x12, 0xba, 0xd9, 0x8a, 0x6e, 0x9c, 0xe6, 0xb8, 0xff, 0x3b, 0xfd,
-       0x76, 0x99, 0x43, 0xef, 0xbf, 0x5e, 0x3d, 0x89, 0xa1, 0x6c, 0x8e, 0x5c,
-       0x1d, 0x08, 0x1f, 0x3a, 0x49, 0xfe, 0xf6, 0x38, 0xf1, 0xe7, 0x65, 0xcb,
-       0x67, 0xa8, 0xb8, 0xe9, 0x01, 0x23, 0x7c, 0x41, 0x09, 0x6c, 0xfb, 0x25,
-       0x75, 0x70, 0xe3, 0x61, 0x15, 0x1f, 0x1b, 0x5a, 0x86, 0x4c, 0x28, 0x8a,
-       0x3d, 0x4b, 0x54, 0xdc, 0x70, 0xf0, 0x24, 0x71, 0xff, 0xac, 0xcd, 0x93,
-       0x73, 0x99, 0x2f, 0x22, 0x38, 0x20, 0x6b, 0xf7, 0x6e, 0xc6, 0xef, 0x4a,
-       0x9c, 0x19, 0xec, 0xa6, 0xdf, 0x56, 0xe2, 0x54, 0xfa, 0x24, 0xed, 0xb1,
-       0x12, 0x8f, 0x0f, 0x1a, 0x93, 0x3f, 0x71, 0x54, 0xe2, 0x31, 0x9e, 0x0f,
-       0xf1, 0x7c, 0xf1, 0xb0, 0x31, 0xd8, 0xa5, 0x56, 0x62, 0xd1, 0xa1, 0x66,
-       0x0c, 0x26, 0xc5, 0x36, 0x35, 0x6c, 0x1b, 0x6f, 0x2a, 0xe8, 0x5e, 0x74,
-       0xee, 0xc5, 0x3d, 0xd4, 0xd5, 0xdd, 0x43, 0xdd, 0xec, 0xcf, 0x47, 0x9d,
-       0x9f, 0xc4, 0x43, 0xcc, 0xeb, 0x76, 0x27, 0x7d, 0x38, 0x9f, 0x32, 0xfc,
-       0x9f, 0x52, 0x0c, 0xb3, 0x4c, 0x09, 0x68, 0x67, 0xe0, 0xc3, 0x2b, 0xd9,
-       0x72, 0xf4, 0x0e, 0xd7, 0xe1, 0x27, 0xb4, 0xcf, 0x07, 0xf7, 0x9d, 0xb4,
-       0xed, 0xff, 0x40, 0x6a, 0x2e, 0x1e, 0x1b, 0x33, 0xd9, 0xb6, 0xcc, 0x93,
-       0xc3, 0xde, 0xdb, 0xe4, 0x4a, 0x89, 0x6f, 0x44, 0x87, 0x68, 0x16, 0xc4,
-       0xc4, 0x93, 0xc8, 0x0e, 0xea, 0xfd, 0x37, 0xab, 0xc2, 0xab, 0x55, 0xea,
-       0xd2, 0x81, 0x29, 0x4d, 0x8f, 0xd7, 0xa8, 0xf1, 0x41, 0xe6, 0xaf, 0xf1,
-       0x5a, 0xea, 0xe4, 0xb1, 0x41, 0x27, 0x16, 0x2c, 0x56, 0x79, 0x3d, 0x7e,
-       0x91, 0xb1, 0x2d, 0x3e, 0x4f, 0x35, 0x71, 0xc0, 0x96, 0x15, 0xf1, 0x12,
-       0x72, 0xfb, 0xea, 0xc5, 0xf5, 0x8c, 0x5f, 0x0e, 0xb1, 0xbd, 0x58, 0xa5,
-       0xea, 0xa4, 0xde, 0x5f, 0xc1, 0x18, 0xed, 0xfa, 0x11, 0x1e, 0xc7, 0x47,
-       0xac, 0xee, 0x55, 0xe4, 0xdc, 0xf3, 0x03, 0x56, 0xf7, 0xcd, 0xa6, 0xe1,
-       0x2b, 0x51, 0x03, 0xd1, 0x2f, 0xe0, 0x15, 0x1c, 0x1b, 0x93, 0x32, 0xb2,
-       0x0f, 0x24, 0x86, 0x91, 0xa4, 0xd5, 0x3d, 0x64, 0xce, 0x47, 0xb3, 0x9d,
-       0x1b, 0xbb, 0x2a, 0xf3, 0x98, 0x29, 0x7e, 0x24, 0x6b, 0x25, 0x53, 0xf8,
-       0x25, 0xdb, 0xb9, 0x30, 0x52, 0x8d, 0x19, 0xb5, 0xe2, 0x07, 0x67, 0xf1,
-       0xc6, 0xe0, 0x77, 0x71, 0x7e, 0xd0, 0xc2, 0xa2, 0x90, 0x05, 0x67, 0xa8,
-       0xd1, 0x6c, 0x55, 0x97, 0x12, 0x23, 0x14, 0xac, 0x6e, 0xf8, 0x1e, 0xde,
-       0x1a, 0x94, 0xfd, 0xa6, 0x96, 0x2d, 0xcb, 0x00, 0x16, 0x5b, 0x7b, 0x66,
-       0x8a, 0xdf, 0x48, 0xbd, 0x3f, 0x95, 0x07, 0xeb, 0x8c, 0x86, 0xc5, 0x5c,
-       0xf8, 0x15, 0x8c, 0x8e, 0x18, 0xd1, 0xcd, 0x45, 0x39, 0x07, 0x5f, 0xa1,
-       0x0e, 0xec, 0xf8, 0x74, 0xb0, 0x06, 0x0b, 0x2e, 0x32, 0x6b, 0xfc, 0xf0,
-       0x3c, 0xda, 0xce, 0xa2, 0xc5, 0x01, 0x73, 0xa5, 0xfa, 0x6f, 0xf4, 0xd3,
-       0x57, 0x70, 0x24, 0x5d, 0xc4, 0x6b, 0x1f, 0x5a, 0xe9, 0xe7, 0xf9, 0x7d,
-       0xfe, 0x5e, 0xb4, 0xa4, 0x4e, 0xd8, 0xeb, 0x0f, 0xc7, 0x89, 0x8f, 0x83,
-       0x29, 0x29, 0xa3, 0x61, 0x2c, 0xdb, 0x4a, 0x6c, 0x88, 0xe2, 0x9f, 0xb2,
-       0x11, 0xe2, 0x43, 0x98, 0xf8, 0xd0, 0x4c, 0x7c, 0x30, 0x89, 0x0f, 0x4d,
-       0xc4, 0x87, 0x20, 0xf1, 0xc1, 0xb0, 0xd7, 0xd6, 0xd3, 0x47, 0xbf, 0x8b,
-       0x92, 0xe1, 0xb3, 0x70, 0xd1, 0x07, 0xce, 0x98, 0x16, 0xf9, 0x49, 0xa3,
-       0xb6, 0x11, 0xf3, 0x95, 0xa8, 0xe6, 0x45, 0x9a, 0xed, 0x95, 0x0d, 0x6b,
-       0x1c, 0x8b, 0x85, 0x60, 0xa8, 0x3e, 0xdc, 0x4f, 0xac, 0xfe, 0x95, 0xd1,
-       0xd8, 0xef, 0x45, 0xe3, 0x81, 0x99, 0x30, 0x06, 0x17, 0xab, 0x0d, 0x4a,
-       0xf4, 0xe3, 0x5e, 0x8e, 0xb3, 0x16, 0x73, 0xf7, 0x69, 0x98, 0xc7, 0xe3,
-       0x1f, 0x53, 0xf5, 0x93, 0x2f, 0x3b, 0xe0, 0x9d, 0x4d, 0xba, 0x33, 0x87,
-       0x4c, 0x80, 0xac, 0xd6, 0xeb, 0xc3, 0x95, 0xc7, 0x5f, 0x51, 0x15, 0xe4,
-       0x3e, 0x2e, 0x31, 0xaf, 0x31, 0xd8, 0xa7, 0xaa, 0xb2, 0x96, 0x44, 0x0c,
-       0xe7, 0xa1, 0x22, 0x42, 0x16, 0x51, 0xc7, 0xfc, 0xc2, 0xda, 0x68, 0x96,
-       0x61, 0x47, 0x13, 0x39, 0xa7, 0x57, 0x3f, 0x21, 0x31, 0x6a, 0x36, 0x63,
-       0x44, 0x79, 0x32, 0x7e, 0xe7, 0x6c, 0x78, 0x50, 0x96, 0xb4, 0xac, 0xaf,
-       0x86, 0x34, 0x78, 0x22, 0x81, 0xe8, 0x56, 0xa6, 0x91, 0x1f, 0x5f, 0x10,
-       0xc6, 0xea, 0xec, 0x09, 0x0c, 0x73, 0x7c, 0xab, 0xb2, 0xc5, 0x67, 0xc5,
-       0xfe, 0xf8, 0xe7, 0xf2, 0x33, 0x67, 0x57, 0x1e, 0x98, 0x0d, 0x43, 0xbb,
-       0x57, 0x1d, 0xae, 0x22, 0x07, 0x3f, 0xce, 0xb8, 0xa7, 0x4c, 0x7d, 0x42,
-       0x41, 0xc7, 0x70, 0x1c, 0x33, 0x42, 0x2f, 0x28, 0xb1, 0x5a, 0xdd, 0xef,
-       0x57, 0x6a, 0xf1, 0x89, 0x7d, 0xd4, 0xf5, 0xa2, 0x1f, 0x7a, 0xe4, 0xb9,
-       0xb0, 0x6f, 0x1e, 0x15, 0xdd, 0xd6, 0xa7, 0x87, 0x38, 0x8e, 0xc9, 0x86,
-       0x13, 0x82, 0x93, 0x8f, 0xba, 0xe1, 0x78, 0x74, 0x16, 0xa2, 0x68, 0x6a,
-       0xb8, 0xb2, 0xeb, 0x5f, 0x54, 0xd1, 0x8b, 0xf0, 0x6b, 0x7d, 0x30, 0xae,
-       0x18, 0xda, 0xcf, 0x95, 0x13, 0xf6, 0x7d, 0xb8, 0xaf, 0x66, 0x4f, 0x52,
-       0x97, 0xc7, 0x0b, 0xf9, 0xd2, 0x3a, 0x24, 0x06, 0x64, 0x5f, 0xfe, 0x59,
-       0xcc, 0x1d, 0xd6, 0xdb, 0x77, 0x29, 0x46, 0xf0, 0x06, 0xe5, 0x2c, 0xe6,
-       0x0c, 0x07, 0x39, 0x97, 0x1a, 0x56, 0x26, 0x8b, 0xf8, 0x29, 0x18, 0xbc,
-       0x8e, 0x18, 0x6c, 0x2d, 0xfb, 0x89, 0x19, 0xd7, 0x65, 0x4f, 0x82, 0x53,
-       0xd1, 0x3b, 0x1a, 0x94, 0x38, 0x63, 0xa8, 0x71, 0x71, 0x3d, 0xeb, 0x78,
-       0x86, 0x9b, 0x70, 0x3b, 0xc7, 0xdc, 0xc6, 0x79, 0xfb, 0xee, 0x62, 0x0b,
-       0x4b, 0x16, 0xeb, 0x07, 0xca, 0x1c, 0xd1, 0x7b, 0x6b, 0x90, 0xeb, 0x9a,
-       0x49, 0xbb, 0xb9, 0x7b, 0x91, 0x1e, 0x7e, 0x81, 0xb8, 0x4b, 0x9c, 0x46,
-       0x2f, 0xe3, 0xce, 0x46, 0xc6, 0xa2, 0xf2, 0x88, 0xde, 0xcf, 0x1c, 0xf5,
-       0xc2, 0x1d, 0x8e, 0x68, 0x48, 0x9e, 0xff, 0xf8, 0x32, 0x96, 0xc1, 0x1d,
-       0xaa, 0x22, 0x0e, 0xea, 0xb9, 0xef, 0x42, 0x3f, 0x70, 0x3b, 0xfa, 0xf1,
-       0x03, 0xf2, 0xbb, 0x99, 0x57, 0xe5, 0x88, 0x51, 0x19, 0x3c, 0x98, 0x3d,
-       0x89, 0x03, 0xd9, 0x47, 0xb1, 0x37, 0xbb, 0x5b, 0x49, 0xdb, 0xf7, 0x20,
-       0x15, 0x79, 0xee, 0x26, 0x5a, 0xa5, 0x7c, 0x06, 0x95, 0xa1, 0xaf, 0x5b,
-       0xe9, 0x1a, 0x15, 0xd5, 0xa1, 0x20, 0x56, 0x27, 0xe3, 0x70, 0x44, 0xde,
-       0xb6, 0xe4, 0xb9, 0xcf, 0x2d, 0x13, 0x06, 0xae, 0x4f, 0x96, 0x23, 0x76,
-       0xc8, 0xb2, 0xfa, 0x9b, 0x9d, 0xd8, 0x34, 0xd1, 0x84, 0x95, 0xc3, 0x0f,
-       0x59, 0xf3, 0x18, 0x73, 0xde, 0xbd, 0xc6, 0x83, 0x3b, 0x0e, 0x79, 0xb0,
-       0x3e, 0x19, 0x85, 0x2f, 0x52, 0xc1, 0xdf, 0x01, 0x73, 0x39, 0x8c, 0xc9,
-       0x49, 0x18, 0xfd, 0xd7, 0x39, 0x02, 0xc7, 0xc2, 0xaa, 0x07, 0x7f, 0x4d,
-       0x1c, 0x5f, 0x45, 0xdc, 0x89, 0x4d, 0x58, 0xa8, 0x8e, 0x78, 0x71, 0x27,
-       0xeb, 0x7f, 0x8c, 0x73, 0xff, 0xd6, 0x92, 0xe3, 0xc4, 0x02, 0x23, 0x36,
-       0xa1, 0x68, 0xd8, 0x3a, 0xe1, 0xa6, 0xae, 0xdc, 0x88, 0x1d, 0xa9, 0xc5,
-       0xf5, 0xfb, 0xfc, 0xb8, 0x63, 0xc2, 0x83, 0x96, 0xa4, 0xb5, 0xec, 0xb8,
-       0x19, 0x5f, 0xab, 0xc1, 0xc0, 0xfa, 0x09, 0x2f, 0x6e, 0x4b, 0xea, 0xbe,
-       0x1b, 0x98, 0xf3, 0x8f, 0x99, 0x41, 0xfc, 0xed, 0x84, 0x0f, 0xb7, 0x24,
-       0x4f, 0x49, 0x1e, 0xb9, 0xdc, 0xc9, 0xd8, 0x73, 0xff, 0x44, 0x1d, 0xd6,
-       0x26, 0xf5, 0x8b, 0x93, 0xe4, 0x76, 0xdd, 0x47, 0x4c, 0xdc, 0x3b, 0xa1,
-       0xa2, 0x83, 0xed, 0x7c, 0x22, 0x39, 0x17, 0x5d, 0x47, 0x9a, 0x29, 0xc3,
-       0x62, 0xac, 0x1a, 0x76, 0xc2, 0x24, 0x8b, 0xc7, 0x27, 0x81, 0x76, 0xfa,
-       0x47, 0x22, 0xf5, 0x45, 0xec, 0x19, 0x30, 0x71, 0xd7, 0x84, 0x9c, 0x9f,
-       0xb4, 0x9f, 0x95, 0xbb, 0x70, 0x70, 0x31, 0x6e, 0x1c, 0x56, 0x89, 0x03,
-       0xa5, 0x48, 0xaf, 0x55, 0x70, 0x1b, 0xaf, 0xef, 0x4a, 0xd9, 0x7b, 0xab,
-       0x11, 0x1a, 0x0a, 0x1c, 0xab, 0x21, 0x67, 0x58, 0x72, 0x30, 0x7f, 0xfd,
-       0x41, 0xe2, 0x7c, 0x19, 0x71, 0xbe, 0x82, 0x1c, 0xf6, 0xba, 0xd1, 0x93,
-       0x78, 0x80, 0xb8, 0x7c, 0x62, 0xb8, 0x9b, 0x71, 0xa7, 0x12, 0x5f, 0x63,
-       0x1c, 0x48, 0xf2, 0xfc, 0xec, 0x90, 0xd1, 0x55, 0x46, 0x9c, 0x7e, 0x81,
-       0xf8, 0xdb, 0x4f, 0xcc, 0xb8, 0x3b, 0x49, 0xb7, 0x1f, 0x62, 0x0e, 0x70,
-       0x55, 0x74, 0xa1, 0x87, 0x39, 0xd6, 0x0d, 0x4a, 0xc0, 0xf7, 0x1a, 0x2a,
-       0xe1, 0x38, 0x58, 0x8b, 0x96, 0x7d, 0x52, 0x46, 0xf0, 0x4b, 0x85, 0x7a,
-       0xd8, 0x49, 0x9d, 0x9f, 0x84, 0x35, 0xe8, 0xe0, 0x78, 0xeb, 0x4d, 0x32,
-       0x70, 0xfc, 0xd8, 0xd4, 0xb5, 0x7f, 0x22, 0xd6, 0xbe, 0x43, 0x4c, 0xf5,
-       0xcf, 0x6e, 0x46, 0xab, 0x61, 0xf2, 0x38, 0x89, 0x57, 0x06, 0x0d, 0xf3,
-       0x10, 0x9c, 0x78, 0x99, 0x3c, 0x6f, 0x6a, 0x36, 0x63, 0xa6, 0x21, 0x7e,
-       0x98, 0xe1, 0x78, 0x54, 0xc9, 0x4b, 0xe0, 0x18, 0x07, 0xde, 0x38, 0xb8,
-       0x8c, 0xe3, 0x92, 0x58, 0x2a, 0xf1, 0x2e, 0x43, 0x59, 0x97, 0x61, 0x0d,
-       0xf5, 0xd1, 0x9a, 0x54, 0x91, 0x39, 0x12, 0xc1, 0x5d, 0xfb, 0xf3, 0x71,
-       0x78, 0x5b, 0x28, 0x7e, 0x33, 0xe3, 0x70, 0xb8, 0x9c, 0x71, 0xd8, 0x15,
-       0x11, 0xd9, 0x9c, 0x18, 0x65, 0xdc, 0xde, 0x91, 0x0a, 0xa3, 0x8d, 0x73,
-       0x38, 0x99, 0x61, 0xbf, 0xc9, 0x3a, 0x9c, 0xc9, 0x78, 0x18, 0xb3, 0x34,
-       0x1e, 0x44, 0xb5, 0xb1, 0x59, 0x3c, 0xfc, 0x3c, 0xe6, 0xf3, 0x30, 0xec,
-       0x6b, 0x1b, 0x93, 0x0a, 0xe2, 0xed, 0x8a, 0xcd, 0xe7, 0xcf, 0x64, 0x04,
-       0x9b, 0x65, 0x2d, 0x73, 0x7b, 0x95, 0x3c, 0x8b, 0x32, 0x98, 0xfa, 0x1e,
-       0xaa, 0xa9, 0xff, 0xaa, 0x02, 0x0e, 0xfd, 0x34, 0x24, 0xb8, 0x5b, 0x4f,
-       0xdc, 0x95, 0xe7, 0x04, 0x2c, 0x6b, 0x5d, 0x60, 0x3a, 0x1e, 0xfd, 0x9f,
-       0x77, 0xa3, 0xf6, 0x33, 0x17, 0x82, 0x49, 0xc4, 0xbf, 0x14, 0xf1, 0x8f,
-       0x63, 0xe8, 0xb9, 0x96, 0x18, 0x48, 0x99, 0xfe, 0x21, 0x45, 0x0c, 0x24,
-       0x4e, 0x3f, 0x4a, 0x9c, 0xfe, 0x06, 0x71, 0xfa, 0xeb, 0xc4, 0xe9, 0xaf,
-       0x11, 0x13, 0xf2, 0x6b, 0x7a, 0x6d, 0x72, 0xff, 0x85, 0xf3, 0xf1, 0x96,
-       0xbd, 0xb6, 0x38, 0x93, 0xba, 0x9a, 0x3b, 0xac, 0x60, 0x9e, 0xa1, 0x1f,
-       0x13, 0xbb, 0xff, 0x01, 0xe7, 0xc9, 0x3f, 0xa3, 0xce, 0x7e, 0x26, 0xa6,
-       0x35, 0xd9, 0x07, 0x77, 0xb2, 0x51, 0xeb, 0x87, 0xfd, 0x2c, 0xb2, 0x29,
-       0x5c, 0xb4, 0x24, 0xb9, 0x11, 0x8e, 0x64, 0xe3, 0xb1, 0xd3, 0x72, 0x9f,
-       0x77, 0x96, 0xe4, 0xf5, 0x1b, 0xe1, 0x4c, 0xea, 0xc7, 0xe2, 0x94, 0x65,
-       0x25, 0xff, 0x73, 0x25, 0x1b, 0xcd, 0xd7, 0x60, 0x63, 0x9b, 0x7f, 0xca,
-       0xfe, 0xaf, 0xfe, 0xc2, 0x03, 0xd4, 0x57, 0x8e, 0x6d, 0x66, 0xa8, 0xfb,
-       0x72, 0xf2, 0x95, 0x47, 0xb2, 0xf2, 0xbb, 0xb1, 0x23, 0xa1, 0x1e, 0x43,
-       0x6c, 0xa6, 0xf0, 0xf1, 0x30, 0x6e, 0x4a, 0x7a, 0x68, 0x07, 0x71, 0x54,
-       0xd1, 0xb7, 0x3e, 0x37, 0xd1, 0x4c, 0x5f, 0x7b, 0xc8, 0xd2, 0x22, 0x81,
-       0x8e, 0x09, 0x72, 0x9e, 0x2d, 0x13, 0xcb, 0xb0, 0x62, 0xd8, 0xb2, 0x3c,
-       0x4b, 0x8d, 0xf0, 0x56, 0xc5, 0x0f, 0x17, 0x7d, 0xd0, 0x41, 0xbf, 0xda,
-       0x7c, 0x28, 0xa0, 0xbd, 0x46, 0x3c, 0xed, 0x6c, 0x3e, 0x41, 0xfb, 0x30,
-       0x2e, 0xb6, 0x11, 0x4b, 0x9d, 0x91, 0x00, 0xf3, 0x44, 0x0f, 0x6d, 0xdf,
-       0x8b, 0x8b, 0x09, 0xf1, 0x2f, 0xbd, 0xeb, 0x9f, 0x98, 0x9b, 0x74, 0xd1,
-       0x37, 0x7e, 0x9e, 0xa8, 0xa3, 0x0f, 0xb8, 0xf1, 0x46, 0xc2, 0xa0, 0xbf,
-       0x79, 0xf0, 0x56, 0xa2, 0x89, 0x7d, 0x05, 0x59, 0xc6, 0x8f, 0x7b, 0x26,
-       0xc2, 0xf4, 0xb3, 0x6b, 0x79, 0xc8, 0x73, 0x99, 0xf5, 0xf1, 0x6f, 0x2a,
-       0xf5, 0x83, 0x73, 0xd5, 0x1a, 0x44, 0x6b, 0x35, 0x7c, 0x7e, 0xe2, 0x23,
-       0xf8, 0x57, 0xc6, 0xed, 0x4d, 0x49, 0x70, 0x0e, 0x11, 0x22, 0x0f, 0x9c,
-       0x3c, 0x22, 0xf7, 0x1c, 0xd1, 0x18, 0x6d, 0x70, 0xe8, 0xcc, 0x6d, 0xf5,
-       0xdc, 0x79, 0x87, 0x93, 0x7d, 0x92, 0x15, 0xb3, 0xec, 0xcf, 0x07, 0xcb,
-       0x71, 0xef, 0xa1, 0x13, 0xf4, 0x91, 0x12, 0x2c, 0x7a, 0xc0, 0x8d, 0xcf,
-       0x1f, 0xc9, 0x90, 0x3b, 0xa8, 0x90, 0xfd, 0xbc, 0x69, 0x12, 0x85, 0x39,
-       0xa3, 0x11, 0xdc, 0xb9, 0x3f, 0x83, 0xe1, 0x02, 0xcf, 0x0b, 0x85, 0xe2,
-       0xff, 0x43, 0xc5, 0x09, 0xf2, 0x88, 0x40, 0xe7, 0xd5, 0xb4, 0xb1, 0xaa,
-       0x48, 0x20, 0x2e, 0xe3, 0x6e, 0xa7, 0x8d, 0xf5, 0x71, 0x3e, 0x33, 0x1c,
-       0x47, 0x82, 0x36, 0xf6, 0x55, 0xca, 0xbf, 0x87, 0x36, 0x16, 0xa7, 0x8d,
-       0xc5, 0x69, 0x4f, 0x71, 0xda, 0x98, 0x3c, 0xfb, 0x1b, 0xa7, 0x8d, 0xc5,
-       0x69, 0x63, 0xf1, 0xcc, 0x32, 0x1c, 0x25, 0xd3, 0xd8, 0x39, 0xd6, 0x4c,
-       0x1c, 0x53, 0xec, 0xa8, 0x94, 0xbb, 0xf9, 0x23, 0xe4, 0xec, 0xd7, 0xf1,
-       0x50, 0xd0, 0x46, 0x9f, 0xec, 0x4f, 0x67, 0xc8, 0x79, 0xdc, 0xf8, 0x75,
-       0x56, 0x38, 0x7e, 0x33, 0xf3, 0xd8, 0x93, 0xe4, 0xf9, 0x2a, 0x9e, 0x30,
-       0x25, 0x0f, 0x36, 0x79, 0xce, 0x58, 0x93, 0x12, 0xbe, 0x76, 0x12, 0x77,
-       0x0f, 0x02, 0x37, 0x90, 0x17, 0xd6, 0x92, 0x97, 0x1c, 0x5e, 0xc4, 0xdf,
-       0x07, 0x4f, 0xd0, 0xe6, 0x4f, 0xda, 0x7b, 0xbb, 0x54, 0xb6, 0x75, 0x66,
-       0xb0, 0xde, 0x77, 0x3d, 0x7d, 0xf0, 0x7e, 0xd6, 0x75, 0x1e, 0x94, 0x3a,
-       0x27, 0xd8, 0xb6, 0x1e, 0xfe, 0x35, 0xe7, 0xbf, 0xe3, 0x81, 0x5a, 0xbc,
-       0xb1, 0x5f, 0x0f, 0xbf, 0x43, 0xcc, 0xab, 0x75, 0x58, 0xcb, 0xae, 0x0e,
-       0x05, 0xb6, 0x5d, 0xad, 0xe6, 0xf9, 0x5e, 0xfb, 0x90, 0x13, 0xc7, 0x42,
-       0xcb, 0xe0, 0x59, 0x54, 0xe4, 0x7c, 0xb4, 0xa5, 0x5a, 0xe1, 0x58, 0x7a,
-       0xf8, 0x3c, 0xb9, 0x4a, 0x92, 0xed, 0x1f, 0xcd, 0x3c, 0x4e, 0x0c, 0xf9,
-       0x22, 0x9e, 0x63, 0x7e, 0x3e, 0xf6, 0xa1, 0x97, 0xc9, 0x1d, 0xdd, 0x18,
-       0x27, 0x07, 0x3c, 0x3e, 0x18, 0xfd, 0xa8, 0x93, 0xb8, 0xef, 0x59, 0x54,
-       0x89, 0x4c, 0x5a, 0xb8, 0x62, 0x25, 0x9e, 0x19, 0x34, 0xb4, 0x1b, 0x94,
-       0x3c, 0x2f, 0xcc, 0xef, 0xfd, 0x32, 0x2e, 0x8e, 0x22, 0x30, 0x79, 0x9e,
-       0xdc, 0xf0, 0x9d, 0xb4, 0xc4, 0xb0, 0x93, 0xf4, 0x71, 0x3f, 0xc2, 0x49,
-       0x0d, 0x27, 0xc6, 0x0d, 0x2c, 0x4c, 0x7a, 0xf1, 0xf0, 0x78, 0x10, 0x57,
-       0xd3, 0x77, 0xb3, 0xe4, 0x87, 0x1f, 0x4a, 0x8a, 0x2f, 0xd6, 0x61, 0x62,
-       0xbc, 0x8e, 0x3e, 0x22, 0xbc, 0xfc, 0x67, 0xf0, 0xd4, 0x9e, 0xb5, 0xf7,
-       0x36, 0x8f, 0xa6, 0xf4, 0xfe, 0x18, 0xc7, 0x13, 0xf3, 0xea, 0xc7, 0x62,
-       0xd0, 0xd3, 0xc0, 0x87, 0xdf, 0x4d, 0x7f, 0x52, 0xe2, 0xa3, 0xf8, 0xa3,
-       0x86, 0x09, 0xf2, 0x9d, 0x52, 0x62, 0x6a, 0x79, 0xa4, 0xfe, 0xc2, 0xf7,
-       0x15, 0x3d, 0xf7, 0x94, 0x6a, 0x59, 0xdf, 0x5b, 0xac, 0xc1, 0x77, 0x44,
-       0x23, 0xf7, 0x30, 0xed, 0xe7, 0x62, 0xe4, 0x79, 0xf3, 0xd9, 0xfb, 0x6a,
-       0x31, 0x63, 0x5f, 0x12, 0xff, 0xad, 0x36, 0xfe, 0xd1, 0x59, 0x8c, 0xf3,
-       0xb3, 0x64, 0x7f, 0x76, 0xf2, 0xf4, 0x6c, 0xb9, 0x57, 0x34, 0xa9, 0x36,
-       0x76, 0x1c, 0x83, 0x7e, 0xec, 0x15, 0x45, 0xf7, 0x7d, 0x95, 0xb1, 0xc1,
-       0x45, 0x1b, 0x75, 0x4c, 0x68, 0xf4, 0xdd, 0xc6, 0x13, 0x33, 0x60, 0xc4,
-       0xaf, 0x51, 0x5d, 0x16, 0x6c, 0x79, 0x6e, 0xa8, 0xca, 0xe7, 0x45, 0x82,
-       0x3b, 0x12, 0x17, 0xc8, 0x17, 0x89, 0xc1, 0x9d, 0xf4, 0x97, 0x35, 0x76,
-       0x2c, 0x3a, 0x61, 0xef, 0xfd, 0xde, 0x3a, 0x11, 0xa7, 0x8f, 0x2c, 0x43,
-       0xc5, 0xb0, 0x07, 0x9f, 0xb3, 0xe3, 0xd0, 0x43, 0x56, 0x0d, 0xfd, 0xe5,
-       0xae, 0x43, 0x81, 0xce, 0xeb, 0xe9, 0x2f, 0xf5, 0x4b, 0x25, 0x86, 0x31,
-       0x6e, 0xa7, 0x0c, 0x73, 0x94, 0xd8, 0xf2, 0x50, 0xb3, 0x31, 0xf9, 0x32,
-       0xf2, 0x3e, 0xb3, 0x6b, 0xa0, 0x16, 0x7f, 0xff, 0xc0, 0x71, 0x7b, 0x2d,
-       0xe4, 0x4e, 0x9e, 0x27, 0x07, 0x7c, 0xb6, 0x7f, 0xc4, 0xf8, 0xfb, 0x1e,
-       0xc6, 0xbc, 0x18, 0xfd, 0x68, 0xe7, 0x80, 0xb5, 0xec, 0xf9, 0xc5, 0xf1,
-       0xb5, 0x55, 0x08, 0x32, 0x26, 0xb9, 0xd1, 0x3f, 0xa0, 0x0f, 0x76, 0x30,
-       0x06, 0x9d, 0x5d, 0x6c, 0x52, 0x16, 0x0f, 0x86, 0x06, 0x04, 0x53, 0x4f,
-       0xdd, 0x52, 0x8b, 0xf8, 0xff, 0xd0, 0x38, 0xbe, 0xcf, 0xd9, 0xf7, 0x08,
-       0xeb, 0xb0, 0xe9, 0xc8, 0x52, 0xca, 0xdc, 0x44, 0x1f, 0x64, 0x5e, 0xcd,
-       0x7c, 0x67, 0xc3, 0x7e, 0xf1, 0x0b, 0xb4, 0x48, 0x9e, 0xd6, 0x6d, 0x06,
-       0xcc, 0x57, 0xe9, 0x43, 0x25, 0xe4, 0x3a, 0x0f, 0xa6, 0xec, 0xe7, 0x73,
-       0x72, 0x15, 0x46, 0x18, 0x8b, 0x69, 0xa3, 0x25, 0x86, 0x0f, 0x33, 0xc8,
-       0xeb, 0x16, 0x72, 0x3e, 0xca, 0xb2, 0x1e, 0x80, 0x1c, 0x02, 0xc4, 0x27,
-       0x1c, 0x25, 0x08, 0x1e, 0xf5, 0xf3, 0x98, 0xcf, 0x83, 0x8a, 0xc8, 0xaa,
-       0x98, 0x79, 0x94, 0x75, 0x47, 0x33, 0xb6, 0x2d, 0xfe, 0x3d, 0xe7, 0x3d,
-       0x41, 0x5b, 0xff, 0x04, 0xb1, 0x7e, 0x72, 0x2f, 0xd0, 0x7f, 0x30, 0x6f,
-       0xdb, 0x29, 0xb6, 0xdf, 0x4e, 0xcc, 0xbb, 0x40, 0x9b, 0xed, 0xe3, 0x7c,
-       0x0f, 0x8d, 0x18, 0xc1, 0x46, 0x35, 0xa0, 0x4d, 0x70, 0x9e, 0x7b, 0xc6,
-       0x54, 0x0c, 0x0c, 0x2e, 0xc3, 0x28, 0xf3, 0xa0, 0xde, 0xb4, 0xf8, 0x88,
-       0x94, 0x39, 0x89, 0x6e, 0xfa, 0xc8, 0x2f, 0x17, 0x2b, 0x88, 0x7d, 0x5c,
-       0xf6, 0xbe, 0x3b, 0x99, 0xef, 0x7f, 0x11, 0x9b, 0x12, 0x8f, 0x5b, 0x95,
-       0x86, 0xde, 0x9f, 0x56, 0x99, 0x67, 0xd1, 0x36, 0x7b, 0x98, 0x9f, 0x2c,
-       0x67, 0x7e, 0xd2, 0x5b, 0xb0, 0xcb, 0x33, 0xb4, 0xc3, 0x01, 0xc6, 0xb1,
-       0x97, 0xd3, 0xf9, 0xb8, 0xf7, 0x83, 0x21, 0x3f, 0x16, 0x5e, 0x53, 0x89,
-       0xa7, 0x0f, 0xe6, 0x65, 0xdb, 0x4b, 0x9b, 0x7c, 0x8a, 0x7a, 0xbe, 0x83,
-       0x7a, 0x7d, 0x29, 0x25, 0x18, 0x15, 0xc4, 0x33, 0xe4, 0xd1, 0x5b, 0xc8,
-       0x05, 0xbe, 0x97, 0xca, 0xdb, 0xe4, 0xe7, 0x27, 0xd6, 0x68, 0xf9, 0xf8,
-       0xe0, 0x85, 0xba, 0x4f, 0xf6, 0x00, 0x5a, 0xd6, 0x72, 0x33, 0xd7, 0x49,
-       0x5e, 0xc3, 0xb6, 0x23, 0xe4, 0x46, 0x4e, 0xcc, 0x49, 0x46, 0xb0, 0x22,
-       0x55, 0xdf, 0xd6, 0x20, 0x9b, 0x3d, 0xe6, 0xe4, 0x39, 0xa0, 0x2b, 0x29,
-       0xef, 0x0e, 0xd0, 0x50, 0xc1, 0xdc, 0xe9, 0xaf, 0x0b, 0xef, 0x2b, 0xf8,
-       0xc4, 0x9f, 0xc1, 0x1d, 0xd7, 0x50, 0xa6, 0x14, 0xb9, 0xe3, 0x54, 0xe1,
-       0x7d, 0x05, 0x37, 0xdb, 0xef, 0x2b, 0x70, 0x63, 0xc6, 0x84, 0xd3, 0xf9,
-       0xa9, 0x94, 0x07, 0xb3, 0x27, 0x2e, 0x71, 0x50, 0x77, 0x49, 0xa4, 0x15,
-       0x4f, 0x26, 0x14, 0xcc, 0x32, 0xfe, 0x27, 0xbe, 0x6f, 0xaf, 0x09, 0xd4,
-       0xda, 0x7b, 0xf6, 0x5d, 0x91, 0x28, 0x0e, 0x27, 0xf4, 0xb6, 0xc7, 0x78,
-       0x5e, 0x46, 0x3c, 0xad, 0xda, 0xa7, 0xe0, 0xa9, 0x80, 0x17, 0xa5, 0x47,
-       0x64, 0xaf, 0xbb, 0x65, 0x39, 0x17, 0xaf, 0xb2, 0x76, 0xac, 0x13, 0xfb,
-       0xe6, 0x1c, 0x1e, 0x09, 0x54, 0x09, 0x06, 0x1e, 0x36, 0x65, 0xdd, 0xd2,
-       0x40, 0x5f, 0xa2, 0x96, 0xfc, 0xba, 0xbe, 0xb3, 0x15, 0xf5, 0xe6, 0xcf,
-       0x1c, 0xb5, 0x28, 0x39, 0x72, 0x87, 0x26, 0x6b, 0xf6, 0xdf, 0xe0, 0x9c,
-       0xf5, 0x12, 0xbb, 0x7a, 0x52, 0xf9, 0xf8, 0xd9, 0x9a, 0xb1, 0xaa, 0x45,
-       0x2f, 0xbd, 0xe4, 0x27, 0x6a, 0xf2, 0xa2, 0x5d, 0xa6, 0x22, 0x92, 0x23,
-       0xfe, 0xd4, 0xe1, 0x04, 0xf9, 0x82, 0xc4, 0xd2, 0x0a, 0x1e, 0x95, 0xe4,
-       0x8d, 0x3f, 0x67, 0x2c, 0xbd, 0x27, 0x94, 0x0b, 0xca, 0x9b, 0x2c, 0x6a,
-       0xc8, 0xc5, 0xe9, 0x03, 0x38, 0x12, 0xd2, 0xdb, 0x37, 0x38, 0xa2, 0x4f,
-       0x33, 0x07, 0x0b, 0x2f, 0x63, 0x4e, 0xbe, 0x2a, 0x90, 0xc1, 0x2e, 0xf2,
-       0xc0, 0x9d, 0xcc, 0xc5, 0x3b, 0x68, 0x9b, 0x9d, 0xfb, 0x19, 0xdb, 0x1c,
-       0x97, 0x73, 0x71, 0x2d, 0x14, 0xdf, 0x40, 0x0e, 0xd0, 0xe5, 0x51, 0xc5,
-       0x5e, 0xc5, 0x77, 0x02, 0x1d, 0xaf, 0x12, 0xa3, 0x1b, 0x19, 0x37, 0xc4,
-       0xde, 0xf7, 0xa4, 0xf4, 0x4e, 0x2a, 0xa0, 0xa6, 0x92, 0xb9, 0xe3, 0xbd,
-       0xe3, 0xcd, 0xf4, 0x9b, 0xfc, 0x33, 0x73, 0xce, 0x25, 0x75, 0xcc, 0x39,
-       0xaf, 0x43, 0xef, 0x10, 0xed, 0x9f, 0xbe, 0x74, 0xff, 0x00, 0xc8, 0xcf,
-       0xd4, 0x9d, 0x9c, 0xbf, 0xdc, 0x11, 0x04, 0x2e, 0xb6, 0xa3, 0xb1, 0xad,
-       0xc4, 0x21, 0x32, 0xe8, 0xed, 0x6f, 0x90, 0xa7, 0x75, 0x31, 0x3f, 0xdd,
-       0xc2, 0x5c, 0x3e, 0xc6, 0x5c, 0x3e, 0xc6, 0x7a, 0xa9, 0x21, 0xb9, 0x4f,
-       0x64, 0xb4, 0x9f, 0x61, 0xfe, 0xf3, 0x39, 0xf2, 0x9f, 0xa1, 0x07, 0x44,
-       0xae, 0x59, 0xb8, 0xf7, 0xf0, 0x75, 0x48, 0xd2, 0x9e, 0xee, 0xe1, 0xb5,
-       0x81, 0x07, 0xe6, 0xe3, 0x6e, 0xe6, 0xf1, 0xb1, 0xf1, 0x65, 0x18, 0x64,
-       0x26, 0xba, 0xed, 0xf0, 0x47, 0xd0, 0x43, 0x3e, 0xb5, 0x9c, 0x18, 0xbd,
-       0xe1, 0x60, 0xc6, 0xc6, 0x6c, 0xc1, 0xfc, 0x1f, 0x67, 0x80, 0xd7, 0xc8,
-       0xc9, 0x06, 0x53, 0x27, 0x6c, 0x9e, 0xe6, 0x62, 0x7c, 0x28, 0x25, 0x2e,
-       0x85, 0xf7, 0x1b, 0x5d, 0x2b, 0x55, 0x6b, 0x59, 0xd9, 0xe2, 0x40, 0xff,
-       0x1b, 0xf4, 0xd5, 0x9a, 0x23, 0x2a, 0x6a, 0x87, 0x25, 0x57, 0x27, 0x3f,
-       0x22, 0x46, 0x3f, 0x47, 0x8c, 0xae, 0x3c, 0x94, 0xcf, 0xcb, 0x13, 0xcc,
-       0xbb, 0x6a, 0x8d, 0x7c, 0x6e, 0xbe, 0x67, 0x40, 0xf6, 0xe8, 0xb8, 0xf1,
-       0x1d, 0xda, 0xfe, 0xa9, 0x82, 0xed, 0x9f, 0x2e, 0x60, 0xb0, 0xc5, 0xdc,
-       0xfc, 0x35, 0x1b, 0x7f, 0xf3, 0xb9, 0xf9, 0xc2, 0x61, 0xa3, 0x2b, 0x4c,
-       0x8c, 0xbe, 0xfa, 0x90, 0xf4, 0xaf, 0xa1, 0x96, 0x78, 0x32, 0x93, 0x58,
-       0x52, 0x35, 0x2c, 0xeb, 0x33, 0x81, 0xce, 0x09, 0xd5, 0x67, 0xf7, 0xb1,
-       0x9d, 0xb2, 0xf5, 0xd2, 0x07, 0xbe, 0x9a, 0x30, 0xb4, 0xad, 0x4a, 0xc0,
-       0x5c, 0x4d, 0x7d, 0x1e, 0xc9, 0x5c, 0x87, 0xce, 0xc1, 0x3a, 0x1c, 0x4b,
-       0x4b, 0x7c, 0x91, 0xf6, 0x25, 0x17, 0x77, 0xe2, 0x9d, 0xfd, 0x73, 0xf1,
-       0xce, 0xd8, 0xe5, 0x3c, 0x7c, 0x47, 0x2a, 0x7a, 0x3f, 0xc3, 0xeb, 0x2a,
-       0xc9, 0xc3, 0xbf, 0xc7, 0x3c, 0xfc, 0x0d, 0x45, 0xd6, 0x10, 0x55, 0x7c,
-       0x62, 0x91, 0x83, 0xf1, 0x45, 0xf7, 0x7f, 0xd7, 0x11, 0x97, 0xfb, 0xc8,
-       0xfe, 0x07, 0xf8, 0xff, 0xb3, 0x8c, 0xe7, 0xc3, 0x9c, 0x89, 0x68, 0xad,
-       0x03, 0x4f, 0x2f, 0x8e, 0x47, 0x65, 0x9d, 0xb4, 0x9f, 0x3c, 0x65, 0x0e,
-       0xe3, 0xe1, 0xdf, 0xa7, 0xea, 0xc3, 0x0b, 0x1d, 0x0e, 0x5c, 0x34, 0xf5,
-       0xf6, 0x03, 0xbc, 0xf6, 0x4c, 0x56, 0x7c, 0x31, 0x4c, 0xfc, 0x5a, 0x59,
-       0xf0, 0xc5, 0x5a, 0x94, 0xd3, 0xce, 0xe7, 0xd2, 0x5e, 0x7f, 0x9c, 0xd2,
-       0x07, 0x9f, 0xa1, 0x9d, 0xd6, 0x5e, 0xb2, 0x53, 0x59, 0xa3, 0x95, 0xbc,
-       0xa6, 0x9d, 0x79, 0xcd, 0xf4, 0xe7, 0xa5, 0x8f, 0xa3, 0x2f, 0x7b, 0x1f,
-       0xee, 0xdd, 0xab, 0x77, 0x39, 0x1d, 0x71, 0x4b, 0x33, 0xba, 0x99, 0xa3,
-       0x75, 0x23, 0xb0, 0xc8, 0xe8, 0xb8, 0xa0, 0xe8, 0x9d, 0x3f, 0x54, 0xca,
-       0x99, 0xf3, 0x9d, 0xc1, 0xf6, 0x51, 0x3d, 0x98, 0x51, 0x0c, 0xdc, 0x40,
-       0x8c, 0x7b, 0x78, 0xa4, 0x84, 0x76, 0xb8, 0x1e, 0x47, 0x06, 0xf5, 0x70,
-       0x1c, 0x26, 0x31, 0xb4, 0xde, 0x5f, 0xa6, 0x5c, 0xc0, 0x69, 0xf3, 0x2c,
-       0xb6, 0x67, 0xe7, 0x60, 0xbd, 0x26, 0x7b, 0x9a, 0xd6, 0x63, 0x62, 0xf0,
-       0x02, 0x71, 0xa8, 0x9d, 0xdc, 0x4a, 0xf2, 0x06, 0x0b, 0x7b, 0x42, 0x57,
-       0x63, 0x8b, 0xed, 0xbf, 0xa5, 0xf2, 0x4e, 0x0b, 0xcf, 0x3c, 0xc3, 0x20,
-       0x4e, 0x48, 0x6e, 0xee, 0x9b, 0xb6, 0x3f, 0x57, 0xd6, 0x75, 0x1b, 0xab,
-       0xf2, 0xf7, 0x95, 0xff, 0x58, 0x99, 0x29, 0x1c, 0x1a, 0x91, 0xf5, 0x85,
-       0x19, 0xca, 0xe3, 0x83, 0x0d, 0xbe, 0x1e, 0xc6, 0x8f, 0xfb, 0xcd, 0x1c,
-       0x5e, 0x5f, 0x5c, 0x86, 0x29, 0xaf, 0x82, 0xd0, 0xd5, 0x61, 0xe9, 0x83,
-       0x9f, 0x73, 0x96, 0xff, 0x93, 0xd2, 0xce, 0x82, 0xc2, 0x9a, 0xc3, 0x3b,
-       0x35, 0x8c, 0x55, 0x3c, 0x97, 0xe7, 0x03, 0xe5, 0xbc, 0x78, 0xfd, 0x47,
-       0x56, 0xd4, 0x2b, 0xd7, 0x89, 0xd9, 0xb3, 0xc4, 0x7f, 0x67, 0x28, 0x77,
-       0x12, 0x6f, 0xe7, 0x87, 0x66, 0x28, 0xeb, 0xd3, 0xc5, 0x3a, 0x2f, 0x22,
-       0x3b, 0xf2, 0x22, 0xe7, 0x53, 0x0f, 0x4e, 0xc1, 0x55, 0x78, 0x56, 0x5e,
-       0xf6, 0x81, 0xb9, 0xc8, 0x43, 0x65, 0x2d, 0xfe, 0x1c, 0x86, 0xf6, 0x0b,
-       0x6f, 0xb4, 0xac, 0x40, 0xc3, 0x39, 0x6c, 0x3f, 0x7a, 0x42, 0xe9, 0x48,
-       0xbd, 0x6b, 0xa1, 0x74, 0x46, 0x6c, 0x8e, 0xbd, 0xdf, 0x59, 0xda, 0xe8,
-       0x53, 0xda, 0xb3, 0x81, 0xf0, 0xfd, 0x0c, 0xbe, 0x5a, 0x44, 0x9e, 0x63,
-       0x97, 0xb1, 0x9d, 0xe0, 0x35, 0xc3, 0x7e, 0x66, 0xe8, 0xb8, 0x3d, 0xce,
-       0xf7, 0xeb, 0xe1, 0x9b, 0x56, 0xb4, 0x5d, 0xea, 0x16, 0xe5, 0x9a, 0xcf,
-       0x89, 0x16, 0xd9, 0x8a, 0xff, 0x8f, 0x17, 0x64, 0x2f, 0x25, 0x77, 0xce,
-       0x97, 0xe9, 0xa4, 0xec, 0x25, 0xa1, 0x28, 0x4e, 0x35, 0x4f, 0x97, 0xbf,
-       0x38, 0xd6, 0x83, 0xef, 0x69, 0x2f, 0x5f, 0xf6, 0xe3, 0xb5, 0xb2, 0x4f,
-       0xea, 0x54, 0xf3, 0x24, 0xfe, 0xce, 0x5e, 0xd7, 0x78, 0xd3, 0xde, 0xdf,
-       0xb9, 0xcb, 0x6c, 0x89, 0x96, 0xe1, 0xa3, 0x50, 0xaf, 0x8a, 0x2f, 0x2c,
-       0xb3, 0xf9, 0x76, 0xb4, 0xbd, 0x8c, 0x39, 0xb7, 0xdb, 0x88, 0xde, 0xef,
-       0x46, 0x2e, 0x47, 0x9e, 0xd0, 0x71, 0x51, 0x39, 0xa6, 0xdc, 0x11, 0xd0,
-       0xb7, 0xbd, 0x4d, 0xfe, 0xf3, 0x6c, 0x20, 0xce, 0x39, 0x37, 0x7c, 0x03,
-       0x8a, 0x6e, 0x6e, 0x62, 0x8c, 0x7d, 0x86, 0x39, 0xed, 0xc6, 0x40, 0xbf,
-       0x7d, 0xcf, 0x53, 0x89, 0xac, 0xc1, 0x95, 0xf6, 0xfb, 0x26, 0xda, 0x61,
-       0x64, 0x5e, 0x94, 0x35, 0x38, 0xfe, 0x8e, 0x61, 0xa1, 0x7d, 0x6d, 0x23,
-       0x82, 0xf6, 0xf7, 0xba, 0xc2, 0x3b, 0x29, 0x3a, 0x50, 0x6f, 0x7f, 0x7f,
-       0x1a, 0x0d, 0x99, 0x4b, 0x6b, 0xd5, 0xe8, 0x35, 0x2d, 0xeb, 0x49, 0x53,
-       0x9e, 0x57, 0xbb, 0xb4, 0xb7, 0x7c, 0x8d, 0x83, 0x39, 0x10, 0x21, 0x25,
-       0x96, 0x7f, 0x27, 0xcf, 0xe5, 0xe7, 0xc5, 0x56, 0xbc, 0x67, 0x6f, 0xb9,
-       0xfd, 0xac, 0x93, 0xfd, 0xce, 0xa5, 0x05, 0x4b, 0x9c, 0xf8, 0x4e, 0xa2,
-       0x2a, 0xe6, 0xe1, 0xef, 0xed, 0x4b, 0x4a, 0xb0, 0x25, 0x44, 0x0e, 0x7a,
-       0xd5, 0x19, 0x9c, 0xcf, 0x38, 0x71, 0x26, 0x11, 0x0f, 0x8d, 0xb1, 0xbf,
-       0x53, 0x09, 0x15, 0xa7, 0x47, 0xfa, 0x42, 0x87, 0xec, 0xbe, 0x5f, 0x45,
-       0xef, 0x51, 0xb9, 0x0f, 0xd9, 0x8e, 0x0d, 0x89, 0xf3, 0x8c, 0xbb, 0xd2,
-       0x96, 0xac, 0x05, 0xe8, 0xb9, 0x8d, 0xcc, 0x9f, 0x55, 0x47, 0x10, 0xb7,
-       0x30, 0xde, 0x3d, 0x97, 0xe8, 0x86, 0x6b, 0xb1, 0xde, 0xf5, 0x2d, 0x72,
-       0x96, 0xaa, 0x88, 0x1e, 0x7c, 0x4b, 0xe9, 0x20, 0x37, 0x74, 0x63, 0x32,
-       0x21, 0x7e, 0x21, 0xef, 0xac, 0xf9, 0x34, 0x8e, 0x91, 0x23, 0x3f, 0x9b,
-       0xd0, 0x70, 0xbe, 0xd9, 0x83, 0x0c, 0x39, 0xf3, 0x77, 0x12, 0x6e, 0x7c,
-       0x95, 0x9c, 0xf9, 0x91, 0x11, 0x59, 0xb3, 0x6c, 0x45, 0x4b, 0x42, 0xd6,
-       0xab, 0xc9, 0x03, 0xc7, 0xbc, 0xb4, 0x6d, 0xcb, 0xea, 0x35, 0x67, 0xd3,
-       0x9f, 0xce, 0xb2, 0x4f, 0x59, 0xe7, 0x8c, 0x62, 0x35, 0x79, 0xd0, 0x23,
-       0x63, 0x3e, 0x3c, 0xcf, 0x5c, 0x21, 0xc9, 0x7a, 0xcf, 0x25, 0xfc, 0x18,
-       0xc8, 0xf8, 0xf0, 0x14, 0x73, 0x86, 0x9d, 0x3c, 0x97, 0xf7, 0x1f, 0x95,
-       0x18, 0x41, 0xf2, 0xf2, 0x93, 0xa8, 0x18, 0xb8, 0x02, 0x9b, 0xd7, 0x3e,
-       0x0a, 0x75, 0xe0, 0x04, 0x8f, 0x6b, 0xc9, 0x21, 0xae, 0x45, 0x6a, 0x24,
-       0x82, 0xd4, 0xd8, 0x8b, 0xe8, 0x1f, 0x91, 0x71, 0xc9, 0x7b, 0x6c, 0x64,
-       0x0f, 0x12, 0xb9, 0xe7, 0x80, 0x17, 0xe9, 0x31, 0xe9, 0xa7, 0x96, 0x7d,
-       0xff, 0xb9, 0xed, 0xff, 0xab, 0xb5, 0xf9, 0x13, 0xd2, 0xf6, 0xa3, 0x7f,
-       0xa4, 0x7d, 0xd1, 0x95, 0xac, 0xbd, 0xb4, 0x17, 0xd6, 0x5e, 0xdc, 0x6c,
-       0xd3, 0x03, 0x47, 0x24, 0xb7, 0xb6, 0x12, 0x7a, 0x74, 0xb7, 0x62, 0xb4,
-       0x55, 0x28, 0xe7, 0xb1, 0x3b, 0x2b, 0xef, 0x45, 0x28, 0xc5, 0x53, 0xc4,
-       0x6b, 0x57, 0x48, 0xd7, 0xbe, 0x45, 0xdb, 0x59, 0x4e, 0x8c, 0x7b, 0xd5,
-       0xbc, 0x1a, 0x71, 0x4d, 0xf4, 0x57, 0x8a, 0x17, 0x06, 0xdd, 0xc4, 0xa6,
-       0x08, 0xf2, 0xcf, 0xc8, 0x79, 0xf0, 0x83, 0x84, 0x97, 0xf3, 0xd5, 0x98,
-       0x33, 0x1c, 0x0d, 0xf2, 0x0c, 0x9e, 0x7d, 0xed, 0x54, 0x62, 0x23, 0x0e,
-       0x51, 0xde, 0xe7, 0x12, 0x17, 0x39, 0x3f, 0x9d, 0xd4, 0xbf, 0xe8, 0x3b,
-       0x5e, 0xd0, 0x75, 0x1f, 0x75, 0x5d, 0x87, 0x67, 0x12, 0x5f, 0xc4, 0x23,
-       0x94, 0xff, 0xe1, 0x41, 0x23, 0x3a, 0x5f, 0x39, 0x49, 0xfc, 0x2e, 0xc5,
-       0x69, 0xb6, 0x7d, 0x07, 0x33, 0xf7, 0x29, 0xe9, 0x2b, 0x25, 0xeb, 0xa5,
-       0x0a, 0xde, 0x5a, 0x72, 0x12, 0x13, 0xfc, 0xef, 0x07, 0x83, 0xf2, 0x1c,
-       0x5a, 0x35, 0xfb, 0x10, 0xfd, 0xf8, 0xed, 0xdc, 0xa4, 0x87, 0xbc, 0x6b,
-       0x55, 0xf3, 0x49, 0xec, 0x4a, 0xcb, 0xb5, 0xf5, 0xe8, 0x1f, 0xbc, 0x00,
-       0x47, 0xa8, 0x04, 0x77, 0x78, 0x9b, 0x69, 0xeb, 0x39, 0xec, 0xce, 0x34,
-       0xcf, 0xc8, 0x73, 0xe2, 0xaa, 0x19, 0xf2, 0x4c, 0xd6, 0xa9, 0x44, 0x29,
-       0xbe, 0xc3, 0x3a, 0x9b, 0x89, 0x15, 0xf9, 0x7b, 0x38, 0xe4, 0xfe, 0xc4,
-       0xfa, 0x0c, 0xfb, 0x48, 0xd8, 0x6d, 0xcc, 0x50, 0x0e, 0xd0, 0x0f, 0xab,
-       0x17, 0xcf, 0x50, 0x52, 0x69, 0xc9, 0x35, 0x5e, 0xc4, 0x13, 0x0f, 0xe4,
-       0x75, 0x78, 0xc8, 0xdc, 0x88, 0x74, 0xa6, 0xba, 0xd0, 0xde, 0x4b, 0x85,
-       0x7b, 0x6d, 0xf2, 0x3c, 0x88, 0x51, 0x78, 0x17, 0xc0, 0xe5, 0x7b, 0x6c,
-       0xdf, 0xc8, 0x56, 0x91, 0xcf, 0x97, 0xd3, 0xd6, 0x4a, 0x62, 0x5e, 0xc6,
-       0xf9, 0x8d, 0x8b, 0x34, 0xec, 0x5d, 0xfa, 0xd9, 0x5a, 0x54, 0x69, 0xce,
-       0x5f, 0x35, 0xbf, 0xc8, 0x7e, 0xaa, 0x62, 0x35, 0x91, 0x47, 0xec, 0x7d,
-       0x59, 0xa1, 0xa5, 0x33, 0x19, 0xe7, 0xe4, 0x5e, 0x75, 0x0c, 0xaf, 0x27,
-       0x6a, 0x63, 0xb5, 0x91, 0x6a, 0xe6, 0xf6, 0x17, 0x30, 0x30, 0xea, 0x44,
-       0x15, 0x79, 0x7c, 0x65, 0xb2, 0x16, 0x6e, 0x7b, 0x5d, 0xf1, 0x0a, 0xf2,
-       0xa7, 0xb9, 0xe4, 0x48, 0x75, 0xa8, 0x26, 0x4f, 0xf2, 0x84, 0x2c, 0xeb,
-       0xa7, 0x8b, 0x2d, 0xeb, 0x4a, 0x1e, 0x65, 0x3c, 0xce, 0x85, 0xc4, 0x4f,
-       0xa3, 0x68, 0xb4, 0xfd, 0xd5, 0x40, 0x93, 0xfd, 0xdd, 0x4a, 0x5f, 0xef,
-       0x0a, 0x2d, 0x9c, 0xf8, 0x62, 0xa8, 0x61, 0x62, 0x26, 0xd4, 0xe1, 0x59,
-       0x70, 0xb0, 0xad, 0x8f, 0x2f, 0xb5, 0xd0, 0x6a, 0xca, 0xfb, 0x04, 0x84,
-       0xa7, 0x6d, 0x24, 0x4f, 0xeb, 0x0f, 0x19, 0x13, 0x8f, 0xe2, 0x7a, 0xc6,
-       0x5d, 0xf7, 0xb0, 0x8f, 0xfd, 0x48, 0xce, 0xef, 0xcc, 0xcd, 0x23, 0xff,
-       0xbf, 0x7a, 0xb1, 0x70, 0xb6, 0x0e, 0x79, 0x97, 0x08, 0x3a, 0x26, 0x4e,
-       0xe2, 0x26, 0x96, 0xf1, 0x0c, 0xbf, 0x84, 0x64, 0xf6, 0x47, 0x18, 0xc8,
-       0x4a, 0x3c, 0xc9, 0xe1, 0x06, 0xb6, 0x5d, 0x3e, 0xdc, 0x46, 0xae, 0xba,
-       0x06, 0x9b, 0x27, 0x2c, 0xac, 0x0a, 0x4d, 0x62, 0xd5, 0x04, 0x39, 0xf0,
-       0x44, 0xd1, 0x5f, 0x85, 0xbf, 0xad, 0x81, 0x3c, 0x7f, 0xe6, 0x26, 0xb6,
-       0xc8, 0xda, 0x9e, 0x4a, 0x3f, 0x6c, 0xa1, 0x7d, 0x3f, 0x9e, 0x8a, 0x63,
-       0xc3, 0x84, 0x60, 0xee, 0x7d, 0xe8, 0x9d, 0x90, 0xb5, 0xe2, 0xaf, 0x84,
-       0xe6, 0x4f, 0xfc, 0x08, 0x2d, 0x13, 0xe9, 0xd0, 0x82, 0x89, 0x31, 0xca,
-       0x9d, 0xa0, 0x6c, 0x83, 0xa1, 0xfa, 0x89, 0x91, 0x50, 0x70, 0xe2, 0x40,
-       0x28, 0x30, 0xd1, 0x8e, 0x9d, 0x13, 0xeb, 0xb0, 0x63, 0x62, 0x1b, 0xb6,
-       0x4f, 0x08, 0x6e, 0x4f, 0x61, 0xe5, 0xc4, 0xab, 0x58, 0x31, 0xf1, 0x2c,
-       0x5a, 0x27, 0xce, 0x62, 0xf9, 0xc4, 0x8b, 0x68, 0x9b, 0x78, 0x89, 0x63,
-       0x91, 0xb5, 0x67, 0x59, 0x77, 0x2e, 0xde, 0xe7, 0x9b, 0xbe, 0x97, 0x5a,
-       0xd6, 0x56, 0xe4, 0x59, 0x30, 0x99, 0x43, 0x17, 0xd6, 0x6a, 0xe7, 0xd0,
-       0xb7, 0x5f, 0xde, 0xb5, 0xd6, 0xa8, 0xf5, 0x42, 0xee, 0xe1, 0xbe, 0x28,
-       0xcf, 0x06, 0xd0, 0xc6, 0xa6, 0xef, 0x1b, 0xd6, 0xb5, 0xa9, 0x4b, 0xf7,
-       0x3c, 0xe5, 0x99, 0x2c, 0x89, 0x3d, 0xe7, 0xd1, 0x93, 0xfd, 0x8d, 0x15,
-       0xd5, 0xa4, 0xac, 0x3c, 0x2b, 0x26, 0xf6, 0x70, 0x0e, 0x0f, 0xed, 0x3f,
-       0x4f, 0x0e, 0x35, 0x69, 0xaf, 0x1d, 0xbd, 0xbd, 0x40, 0xde, 0xd3, 0xe3,
-       0x27, 0x36, 0x9d, 0x43, 0xea, 0x28, 0x30, 0x71, 0x50, 0xfc, 0x70, 0x23,
-       0xfd, 0x70, 0x52, 0x7c, 0x32, 0x4e, 0x4c, 0xbe, 0xcd, 0x83, 0xfb, 0xc8,
-       0x93, 0x4a, 0x90, 0x1b, 0x2b, 0xc7, 0xd3, 0x23, 0x71, 0x6b, 0x9e, 0x21,
-       0xef, 0x2e, 0x31, 0x72, 0x57, 0x32, 0xee, 0xbf, 0xc4, 0x6b, 0x93, 0x83,
-       0xf0, 0xfb, 0x8c, 0x80, 0x6f, 0x1e, 0xcf, 0x4f, 0xa7, 0x27, 0xc9, 0x71,
-       0xba, 0x30, 0xc5, 0x6f, 0xc9, 0x89, 0x81, 0x5e, 0xa4, 0xd3, 0xa2, 0xcf,
-       0x76, 0xea, 0x53, 0x70, 0x51, 0xef, 0x6a, 0x25, 0x1e, 0x5a, 0x8a, 0xe0,
-       0xa1, 0x8a, 0x8a, 0x7d, 0xc2, 0x25, 0xec, 0x77, 0x9f, 0x98, 0x03, 0xca,
-       0x8b, 0xf8, 0x0e, 0x73, 0x98, 0xf2, 0x7d, 0xe4, 0x43, 0xc4, 0xca, 0xaa,
-       0x88, 0x62, 0xac, 0x0a, 0x9c, 0xc3, 0xd3, 0x63, 0x4e, 0xb8, 0x93, 0x4e,
-       0x4c, 0x12, 0x27, 0x1d, 0x49, 0xd9, 0x3f, 0xa0, 0x51, 0x16, 0x59, 0xa7,
-       0x3a, 0x8b, 0x9c, 0x7d, 0x7f, 0x4f, 0xee, 0xcf, 0x7c, 0xd7, 0xee, 0xc7,
-       0x49, 0xd9, 0xfb, 0x88, 0xa5, 0x3d, 0xa9, 0xef, 0xa1, 0x35, 0xed, 0xb1,
-       0x9f, 0xf3, 0xdb, 0x9d, 0x7a, 0x15, 0xa9, 0xfd, 0x75, 0xb8, 0xdd, 0x7e,
-       0xd6, 0xcf, 0x84, 0x46, 0xbd, 0xdd, 0x32, 0x6e, 0x22, 0x7a, 0x78, 0x1d,
-       0xd6, 0x1e, 0xfe, 0x24, 0x8f, 0x59, 0xb8, 0xe9, 0x70, 0x27, 0x6e, 0x1c,
-       0x8f, 0xa3, 0x63, 0xbc, 0x8f, 0xc7, 0x7a, 0x7c, 0x6c, 0xa8, 0x1a, 0x99,
-       0x90, 0xc6, 0x1c, 0x7f, 0x3d, 0x73, 0x7c, 0xe1, 0x67, 0x1b, 0xf0, 0x34,
-       0x71, 0x27, 0x18, 0xda, 0x80, 0x49, 0xdb, 0x17, 0x65, 0x8f, 0xe5, 0x06,
-       0x6c, 0x67, 0xfe, 0x3e, 0x8a, 0x0d, 0xe8, 0xe1, 0xb5, 0x21, 0x7b, 0x0e,
-       0x4e, 0x62, 0x19, 0xf3, 0xb3, 0x77, 0xae, 0x39, 0x89, 0x0f, 0x1f, 0x92,
-       0xbe, 0x2f, 0x20, 0xb5, 0x77, 0x23, 0xdb, 0xcc, 0xa1, 0x7d, 0xfc, 0x9f,
-       0x71, 0xe3, 0x10, 0xee, 0xac, 0x46, 0x35, 0x9e, 0x0d, 0x05, 0x3a, 0x06,
-       0x94, 0x7f, 0xb6, 0xdb, 0xde, 0x9e, 0xfa, 0x11, 0x76, 0xa5, 0xce, 0xe3,
-       0xe1, 0xcc, 0x4b, 0xe8, 0x4f, 0x4d, 0x9f, 0x53, 0x99, 0xcb, 0x37, 0x19,
-       0x0f, 0xbe, 0x8f, 0x23, 0x63, 0x53, 0xc4, 0xde, 0x57, 0x78, 0xbc, 0xff,
-       0x7e, 0x7a, 0xfe, 0x39, 0xdc, 0xbc, 0xdd, 0x48, 0x3e, 0x55, 0xe4, 0x6f,
-       0x71, 0xab, 0xda, 0xc8, 0xed, 0x9a, 0x03, 0x7d, 0x5b, 0x58, 0x95, 0xfb,
-       0x81, 0x46, 0xec, 0x05, 0x45, 0x6f, 0xff, 0x96, 0xe2, 0x61, 0xae, 0x21,
-       0xcf, 0x45, 0xea, 0xd1, 0x1b, 0xa8, 0xef, 0xb2, 0x07, 0xbe, 0x0f, 0xe7,
-       0x03, 0x4e, 0x94, 0x26, 0x65, 0x2d, 0x47, 0xde, 0x2b, 0x23, 0xef, 0x30,
-       0xc9, 0xe9, 0xa5, 0xf2, 0xae, 0x89, 0xe4, 0x24, 0x63, 0x7f, 0x6e, 0x61,
-       0x09, 0xe4, 0x39, 0xec, 0xeb, 0xb0, 0x71, 0x30, 0x8a, 0x1e, 0x53, 0x9e,
-       0x31, 0xca, 0x8f, 0x7f, 0x5e, 0xf3, 0xf7, 0xd1, 0xcb, 0xf8, 0xb3, 0x9e,
-       0x98, 0x78, 0xbb, 0x7d, 0x6f, 0xf6, 0xfb, 0xe8, 0x1b, 0xf9, 0x47, 0xb7,
-       0xf0, 0x9d, 0x3e, 0x53, 0x9e, 0xe3, 0xd6, 0xcd, 0xf7, 0xbe, 0xc3, 0x66,
-       0xbe, 0xec, 0x69, 0xa3, 0x4d, 0xe4, 0x16, 0xba, 0xb0, 0xbd, 0x36, 0xff,
-       0x1e, 0x95, 0x0f, 0x7a, 0xe7, 0xd0, 0x5f, 0xda, 0xef, 0x1c, 0x92, 0xfb,
-       0xfa, 0xf2, 0xbe, 0xaa, 0x27, 0x12, 0xf2, 0x1e, 0x09, 0x75, 0x99, 0x0b,
-       0xaa, 0xd7, 0x45, 0x5e, 0xf8, 0xaa, 0x39, 0x13, 0xbd, 0x5e, 0x0b, 0xd7,
-       0x53, 0x96, 0x63, 0x4d, 0x1f, 0x63, 0xe6, 0x12, 0xef, 0x70, 0xd9, 0xef,
-       0x26, 0x39, 0xff, 0xa9, 0x7f, 0xff, 0x6e, 0x92, 0x37, 0x89, 0x93, 0x0a,
-       0x2a, 0x8d, 0x5b, 0xf0, 0x9c, 0x1d, 0x13, 0x14, 0x54, 0x34, 0xc8, 0xba,
-       0xa8, 0x1f, 0xcf, 0x18, 0x8d, 0xfe, 0x1a, 0xb9, 0xdf, 0xa5, 0x9c, 0xb3,
-       0xe2, 0xde, 0x3a, 0xc6, 0x97, 0xff, 0x68, 0x2f, 0xfe, 0xf3, 0xd8, 0xb9,
-       0x37, 0x4c, 0xce, 0xe8, 0x95, 0x67, 0x23, 0x67, 0x14, 0x9f, 0xc5, 0xdc,
-       0x91, 0x92, 0x3d, 0xec, 0x0c, 0x8a, 0xe5, 0x6f, 0xd2, 0xcf, 0xde, 0x94,
-       0x3d, 0x58, 0xe4, 0x3c, 0x7f, 0x85, 0x60, 0xcd, 0x8c, 0xfc, 0x73, 0x52,
-       0xf6, 0x5e, 0x5f, 0x59, 0x0f, 0xd8, 0x5e, 0x78, 0xef, 0xa2, 0x94, 0x95,
-       0x7a, 0x6f, 0xda, 0x6b, 0xc2, 0x2e, 0xe3, 0x37, 0xd6, 0x6b, 0xde, 0x5a,
-       0x96, 0xfd, 0x45, 0xe1, 0xff, 0xf3, 0xe2, 0x33, 0x66, 0x14, 0x72, 0x4d,
-       0xea, 0x88, 0xae, 0x2e, 0xd7, 0xe9, 0x4d, 0x39, 0x88, 0x7b, 0x67, 0xad,
-       0x6e, 0xaf, 0x8c, 0x61, 0xec, 0x7d, 0x75, 0x54, 0xfb, 0x1d, 0x84, 0x79,
-       0xfd, 0x8a, 0x3c, 0xff, 0xbe, 0x4f, 0x59, 0x3f, 0x2e, 0x31, 0x2a, 0x70,
-       0xae, 0x26, 0xbf, 0xae, 0x73, 0x59, 0xc6, 0x47, 0xbc, 0xb2, 0xef, 0xaf,
-       0xd4, 0x3e, 0xb7, 0xfb, 0x35, 0x2f, 0xd7, 0xfb, 0x46, 0x61, 0xbc, 0xb5,
-       0xf6, 0xb3, 0x4a, 0x0f, 0xda, 0xbc, 0xc6, 0x31, 0x6d, 0xdc, 0xcb, 0xbc,
-       0xef, 0xed, 0x67, 0xa4, 0xd0, 0xaf, 0x6a, 0x3f, 0xef, 0x75, 0xb9, 0x0f,
-       0x91, 0xeb, 0xa9, 0x42, 0x1d, 0x3d, 0x1c, 0xb5, 0xfb, 0x57, 0x99, 0xbf,
-       0x15, 0xfb, 0xa4, 0x3f, 0x2d, 0x2e, 0xb6, 0x31, 0x29, 0xf6, 0xd5, 0x5d,
-       0xca, 0xd8, 0x74, 0xae, 0xf9, 0x3e, 0x6c, 0x4f, 0x88, 0x9e, 0xe5, 0x1d,
-       0x95, 0xc4, 0x60, 0x9b, 0x6b, 0xb9, 0xe8, 0x6f, 0x4b, 0x91, 0xd6, 0xe2,
-       0x38, 0xd4, 0x24, 0xcf, 0xe6, 0xb9, 0x68, 0xd3, 0x71, 0x94, 0x91, 0xdb,
-       0x46, 0x79, 0x4d, 0xf6, 0xb4, 0x1c, 0x31, 0xf5, 0xe8, 0x13, 0xf8, 0x12,
-       0x1c, 0x57, 0xd9, 0xeb, 0x5f, 0x6d, 0x69, 0xc8, 0x75, 0x93, 0xb9, 0xc9,
-       0xf4, 0x15, 0x83, 0x32, 0xda, 0x8e, 0xbd, 0x17, 0xdb, 0x94, 0x67, 0xf7,
-       0x06, 0x12, 0xf2, 0x0c, 0x59, 0x63, 0x8c, 0xfc, 0x10, 0xcf, 0x65, 0x64,
-       0xff, 0xc3, 0x6f, 0xad, 0xf8, 0x4c, 0xd9, 0x67, 0x39, 0xbd, 0x4e, 0x09,
-       0x71, 0x29, 0x10, 0xae, 0x52, 0x8a, 0xcf, 0x91, 0x5d, 0xfe, 0xdc, 0x44,
-       0x9b, 0x39, 0x6f, 0x3f, 0xfb, 0x27, 0x67, 0x11, 0xb4, 0xa4, 0xe4, 0x5d,
-       0x8c, 0xfa, 0xe4, 0x2a, 0x34, 0xe6, 0xea, 0x1d, 0xce, 0x02, 0xff, 0x08,
-       0x63, 0x0d, 0xed, 0x66, 0x47, 0x20, 0x6c, 0x3f, 0xe3, 0x26, 0xef, 0xdc,
-       0x78, 0x18, 0x7a, 0xe7, 0x1b, 0x2c, 0xff, 0xb1, 0xec, 0xf3, 0x56, 0xda,
-       0x2b, 0x63, 0x2a, 0xfa, 0xb8, 0xbc, 0xdb, 0x87, 0x7a, 0x8c, 0x88, 0x7f,
-       0x78, 0x50, 0x13, 0x09, 0xd3, 0x0f, 0x25, 0x7e, 0xcb, 0xf3, 0x71, 0xfa,
-       0x01, 0xc9, 0xab, 0x5a, 0xb2, 0xf2, 0xfc, 0xb7, 0xec, 0x9b, 0xd6, 0xfd,
-       0x6b, 0x1d, 0xc1, 0xc2, 0xfe, 0xe5, 0x62, 0xbc, 0xb7, 0xbc, 0x85, 0xbd,
-       0xd5, 0xee, 0x79, 0x8c, 0x6f, 0x96, 0xbd, 0x6f, 0x60, 0xa3, 0x8d, 0x0d,
-       0x9a, 0xa1, 0x1f, 0xfb, 0xa5, 0xa3, 0x1b, 0x8f, 0x2d, 0x32, 0xba, 0x8e,
-       0xab, 0xb9, 0xb4, 0x8f, 0x38, 0x71, 0xad, 0x23, 0x3a, 0xc4, 0x6f, 0xff,
-       0x77, 0x89, 0xcd, 0x37, 0xd9, 0x75, 0xf5, 0xe0, 0x3a, 0xb5, 0xf8, 0x6c,
-       0xb5, 0x3c, 0x73, 0xa1, 0x77, 0x7c, 0x43, 0xe9, 0xc6, 0xd6, 0x90, 0xd1,
-       0xbe, 0x4d, 0xd1, 0xdb, 0xbe, 0xac, 0xe8, 0xfe, 0x90, 0x22, 0xe5, 0xec,
-       0x77, 0xe8, 0x5c, 0x8a, 0x9d, 0x2e, 0xf6, 0x71, 0x38, 0xa1, 0x87, 0x67,
-       0xb0, 0xec, 0x39, 0xd3, 0xf0, 0x5d, 0x60, 0x9b, 0x3f, 0xe4, 0x31, 0x84,
-       0x20, 0x96, 0xdb, 0xed, 0x46, 0x17, 0xba, 0xec, 0xf7, 0xa4, 0x76, 0x30,
-       0x26, 0xc8, 0xfb, 0xb0, 0x62, 0xd0, 0x92, 0x75, 0x34, 0x31, 0xbd, 0xff,
-       0x66, 0x48, 0x4e, 0xdd, 0xc3, 0x80, 0xed, 0x81, 0x37, 0xd2, 0x8d, 0x86,
-       0x45, 0x86, 0x6f, 0x89, 0x6a, 0xd7, 0x0f, 0xca, 0xfb, 0x81, 0x96, 0x73,
-       0x9c, 0x23, 0x90, 0x36, 0x72, 0x96, 0xd6, 0x50, 0x6d, 0xd7, 0x59, 0xa4,
-       0x7e, 0x14, 0xae, 0x0f, 0xfd, 0xca, 0x4a, 0x6b, 0xd0, 0x6a, 0x0d, 0xa9,
-       0x13, 0x1f, 0xd2, 0xf0, 0x1f, 0xd5, 0x13, 0x5c, 0xf9, 0xa5, 0x85, 0x59,
-       0x52, 0x4f, 0xf6, 0xac, 0x7d, 0x1a, 0x77, 0x0d, 0xc8, 0x7b, 0x22, 0xc4,
-       0x1f, 0xf5, 0xe8, 0x17, 0xc8, 0x35, 0xcb, 0xed, 0xf7, 0x6f, 0x49, 0x2c,
-       0x59, 0x4f, 0x3c, 0xeb, 0x86, 0x16, 0xd2, 0xfb, 0xaf, 0x50, 0xe5, 0x1d,
-       0x43, 0x8f, 0xc9, 0xbe, 0x9d, 0x03, 0x0b, 0xd4, 0xfc, 0xfe, 0x9e, 0xd8,
-       0x1f, 0x7d, 0x5f, 0x11, 0xfb, 0x2a, 0x97, 0xf7, 0x15, 0xd5, 0xd9, 0xcf,
-       0xa7, 0xac, 0x4f, 0x38, 0x0a, 0xfb, 0x15, 0x2f, 0xbf, 0xc7, 0x73, 0x23,
-       0x79, 0xfd, 0x26, 0x79, 0x67, 0x1f, 0xc7, 0xba, 0x39, 0x21, 0x4b, 0x5a,
-       0xff, 0x0f, 0xdd, 0x0f, 0x6b, 0xf2, 0xd0, 0x56, 0x00, 0x00, 0x00 };
-
-static const u32 bnx2_CP_b06FwData[(0x84/4) + 1] = {
-       0x00000000, 0x0000001b, 0x0000000f, 0x0000000a, 0x00000008, 0x00000006,
-       0x00000005, 0x00000005, 0x00000004, 0x00000004, 0x00000003, 0x00000003,
-       0x00000003, 0x00000003, 0x00000003, 0x00000002, 0x00000002, 0x00000002,
-       0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002,
-       0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002,
-       0x00000001, 0x00000001, 0x00000001, 0x00000000 };
-static const u32 bnx2_CP_b06FwRodata[(0x134/4) + 1] = {
-       0x08000f30, 0x08000d88, 0x08000fc4, 0x0800106c, 0x08000f58, 0x08000f98,
-       0x080011a4, 0x08000da4, 0x080011c8, 0x08000df4, 0x08001498, 0x08001440,
-       0x08000da4, 0x08000da4, 0x08000da4, 0x08001254, 0x08001254, 0x08000da4,
-       0x08000da4, 0x080016e0, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4,
-       0x080013d4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4,
-       0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4,
-       0x08000da4, 0x08000da4, 0x08000da4, 0x08000fb8, 0x08000da4, 0x08000da4,
-       0x08001690, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4,
-       0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4,
-       0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4, 0x08000da4,
-       0x080015bc, 0x08000da4, 0x08000da4, 0x08001348, 0x080012b8, 0x08002e50,
-       0x08002e58, 0x08002e20, 0x08002e2c, 0x08002e38, 0x08002e44, 0x0800532c,
-       0x080052ec, 0x080052b8, 0x0800528c, 0x08005268, 0x08005224, 0x00000000
-};
-
-static struct fw_info bnx2_cp_fw_06 = {
-       /* Firmware version: 4.6.16 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0x10,
-
-       .start_addr                     = 0x08000080,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x56cc,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_CP_b06FwText,
-       .gz_text_len                    = sizeof(bnx2_CP_b06FwText),
-
-       .data_addr                      = 0x08005820,
-       .data_len                       = 0x84,
-       .data_index                     = 0x0,
-       .data                           = bnx2_CP_b06FwData,
-
-       .sbss_addr                      = 0x080058a4,
-       .sbss_len                       = 0xf1,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08005998,
-       .bss_len                        = 0x5d8,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x080056cc,
-       .rodata_len                     = 0x134,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_CP_b06FwRodata,
-};
-
 /* Initialized Values the Command Processor. */
 static const struct cpu_reg cpu_reg_cp = {
        .mode = BNX2_CP_CPU_MODE,
@@ -2184,771 +39,6 @@ static const struct cpu_reg cpu_reg_cp = {
        .mips_view_base = 0x8000000,
 };
 
-static u8 bnx2_RXP_b06FwText[] = {
-       0xec, 0x5b, 0x5d, 0x6c, 0x1c, 0xd7, 0x75, 0x3e, 0x33, 0x3b, 0x24, 0x57,
-       0x14, 0x45, 0x8e, 0xa8, 0x15, 0xb5, 0xb2, 0x99, 0x64, 0x97, 0x1c, 0x89,
-       0x1b, 0x93, 0x50, 0x86, 0xec, 0x5a, 0x66, 0x92, 0x45, 0xbc, 0x59, 0x52,
-       0x16, 0x53, 0x08, 0xf0, 0xda, 0x56, 0x5c, 0xa3, 0x31, 0x90, 0xc5, 0x92,
-       0x76, 0xd2, 0x37, 0xc9, 0xa9, 0x5d, 0x21, 0xb1, 0xab, 0xf5, 0x92, 0x91,
-       0x15, 0x75, 0xc5, 0x61, 0x24, 0x26, 0x72, 0x1b, 0xb7, 0xa0, 0xf9, 0x23,
-       0xaa, 0xc1, 0x4a, 0xe3, 0x9f, 0xd8, 0xf5, 0x43, 0x64, 0x31, 0xb2, 0xad,
-       0xfa, 0xa5, 0x80, 0xd3, 0x1f, 0xc0, 0x28, 0x8c, 0x56, 0x90, 0x6b, 0xd9,
-       0x68, 0x81, 0x42, 0x6d, 0x51, 0xd4, 0x6d, 0x64, 0x4d, 0xbf, 0xef, 0xce,
-       0x0c, 0xb9, 0x22, 0x94, 0xc6, 0x2f, 0x7d, 0x9b, 0x0b, 0x2c, 0xee, 0xdc,
-       0x3b, 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0xe7, 0xf7, 0x0e, 0xf9, 0x44, 0x9b,
-       0xb4, 0x4a, 0xd0, 0x36, 0xe1, 0x97, 0x3d, 0x70, 0xe8, 0xb1, 0xc1, 0x5d,
-       0xbb, 0x77, 0xe1, 0x71, 0x77, 0xcc, 0x6c, 0x36, 0x38, 0xaf, 0x49, 0xd4,
-       0xa2, 0x16, 0xb5, 0xa8, 0x45, 0x2d, 0x6a, 0x51, 0x8b, 0x5a, 0xd4, 0xa2,
-       0x16, 0xb5, 0xa8, 0x45, 0x2d, 0x6a, 0x51, 0x8b, 0x5a, 0xd4, 0xa2, 0x16,
-       0xb5, 0xa8, 0x45, 0x2d, 0x6a, 0x51, 0x8b, 0x5a, 0xd4, 0xa2, 0x16, 0xb5,
-       0xa8, 0x45, 0x2d, 0x6a, 0x51, 0x8b, 0x5a, 0xd4, 0xa2, 0x16, 0xb5, 0xa8,
-       0x45, 0x2d, 0x6a, 0x51, 0x8b, 0x5a, 0xd4, 0xa2, 0x16, 0xb5, 0xa8, 0x45,
-       0x2d, 0x6a, 0x51, 0x8b, 0x5a, 0xd4, 0xfe, 0x3f, 0x5a, 0x4c, 0xc4, 0x64,
-       0xbf, 0x29, 0xf8, 0x49, 0x5c, 0xcf, 0xa5, 0x0e, 0x16, 0x2c, 0x89, 0xc7,
-       0x72, 0x6f, 0x3f, 0x3e, 0x6e, 0x89, 0xe4, 0xeb, 0xfd, 0xa9, 0x11, 0xf9,
-       0xc4, 0xab, 0x24, 0x0c, 0xe1, 0xfc, 0x67, 0x72, 0xd7, 0x0f, 0x9f, 0xbf,
-       0x2b, 0x7d, 0x6d, 0x2e, 0x26, 0x71, 0x33, 0xf7, 0xee, 0xa0, 0xb9, 0x53,
-       0xe2, 0xdd, 0x58, 0xf3, 0x5c, 0xdf, 0xc4, 0x66, 0x69, 0x0f, 0x71, 0x79,
-       0xde, 0x92, 0xed, 0xc9, 0x25, 0xbb, 0xa2, 0x8d, 0xf4, 0xbd, 0xa6, 0x15,
-       0x9c, 0x1b, 0x5e, 0xde, 0xd0, 0x45, 0x07, 0xbe, 0x89, 0x7a, 0x5c, 0x1e,
-       0x59, 0x6c, 0x95, 0x47, 0xe7, 0x36, 0x4a, 0x79, 0x4e, 0x4c, 0x3d, 0x97,
-       0x94, 0x6f, 0x61, 0xee, 0x72, 0x0c, 0x70, 0xae, 0x94, 0x62, 0xb9, 0x8f,
-       0xef, 0x2d, 0xd7, 0x08, 0x2f, 0xba, 0x9e, 0x5b, 0xb9, 0x77, 0xa2, 0xfe,
-       0xe6, 0xbd, 0xe5, 0x3a, 0xe1, 0x08, 0x83, 0x77, 0xf5, 0x8f, 0xbc, 0xf3,
-       0x7d, 0x09, 0xb9, 0xe0, 0x9a, 0xf2, 0x82, 0xfb, 0x32, 0xf6, 0x4c, 0x57,
-       0x2a, 0xd2, 0x24, 0xe5, 0x93, 0x37, 0xbc, 0x98, 0x95, 0x4e, 0x61, 0x13,
-       0x73, 0x44, 0xf0, 0xde, 0xc1, 0x7b, 0x07, 0xf3, 0x0b, 0x3f, 0xdf, 0x2c,
-       0xad, 0x49, 0x39, 0xdf, 0xc7, 0x75, 0x5c, 0xc3, 0xb5, 0x8b, 0xed, 0xfe,
-       0x3a, 0xc1, 0xba, 0xa2, 0xc4, 0x2c, 0x4f, 0x0a, 0xb6, 0x21, 0x23, 0x09,
-       0xd1, 0x74, 0xab, 0x02, 0x3a, 0x7e, 0xd1, 0x26, 0xad, 0xc4, 0x55, 0xd1,
-       0xf2, 0x2e, 0xfb, 0x10, 0xdf, 0x53, 0x1d, 0x3e, 0xae, 0x67, 0x81, 0xab,
-       0x24, 0xaf, 0xbb, 0x0f, 0xcb, 0x5f, 0xb8, 0x63, 0xf2, 0x92, 0x3b, 0x01,
-       0x9c, 0x0f, 0xc9, 0xab, 0xee, 0x7e, 0x79, 0xc5, 0x2d, 0xca, 0xcf, 0xdc,
-       0x7d, 0xf2, 0xb2, 0x3b, 0x2a, 0x2f, 0xba, 0x79, 0xec, 0x97, 0xd1, 0x8a,
-       0xce, 0xdd, 0x32, 0x7e, 0x92, 0x34, 0xa6, 0xaf, 0x41, 0x36, 0xf2, 0x98,
-       0xdd, 0x67, 0xea, 0xa2, 0x61, 0xcf, 0xf4, 0x6b, 0x22, 0x8f, 0x4a, 0x3e,
-       0x31, 0x2c, 0x73, 0x6e, 0x97, 0x56, 0x38, 0xd9, 0xa9, 0x8d, 0x9c, 0x24,
-       0x2d, 0x9e, 0x8c, 0xdb, 0xe9, 0x54, 0x21, 0x96, 0x36, 0x47, 0x62, 0x92,
-       0xdf, 0x03, 0xb9, 0x55, 0x9d, 0xa4, 0xe4, 0x4d, 0xc9, 0x1f, 0xb5, 0x0c,
-       0xc8, 0x53, 0x93, 0x58, 0x8e, 0x7c, 0x6e, 0xe1, 0x1c, 0x5a, 0x9b, 0x2c,
-       0xd4, 0x6c, 0x29, 0x3b, 0xf3, 0x5a, 0x39, 0xa1, 0x51, 0x04, 0x18, 0x0f,
-       0x60, 0xfc, 0x67, 0xc1, 0xf8, 0x4b, 0x52, 0x3e, 0x25, 0xf9, 0xc9, 0x59,
-       0xcf, 0x2b, 0xd8, 0x7f, 0x1c, 0xcc, 0x0d, 0x63, 0x4e, 0x97, 0xd8, 0x8f,
-       0x38, 0x37, 0x1b, 0xcc, 0x51, 0x1e, 0x9e, 0x8c, 0xd8, 0x14, 0x23, 0xe8,
-       0x35, 0x8b, 0xe8, 0x9b, 0xd1, 0x73, 0x8f, 0x8d, 0x9b, 0xfc, 0xff, 0x03,
-       0xe2, 0xf9, 0x26, 0xf0, 0x6c, 0x83, 0x66, 0x89, 0x7f, 0x36, 0x77, 0xf4,
-       0xe0, 0x3f, 0xf4, 0xad, 0x8d, 0xf5, 0xdc, 0x7b, 0x52, 0xa8, 0x69, 0x4a,
-       0x57, 0x34, 0x3c, 0xf7, 0xd4, 0x9f, 0xea, 0xf4, 0xf5, 0xc2, 0x69, 0x97,
-       0x56, 0xc8, 0xc9, 0x21, 0xfd, 0x29, 0xd0, 0xbf, 0x49, 0xb6, 0xfc, 0x90,
-       0x3c, 0xf4, 0xa7, 0x74, 0xc9, 0xa7, 0x0d, 0xb1, 0x65, 0xd1, 0x35, 0xb4,
-       0x11, 0x27, 0x2f, 0x7a, 0xce, 0x4a, 0x96, 0x45, 0x97, 0x52, 0x22, 0x2f,
-       0xcf, 0x64, 0xd3, 0xc3, 0x15, 0x49, 0x49, 0x79, 0xc8, 0x96, 0x65, 0x17,
-       0x90, 0x89, 0x8a, 0x5c, 0xcd, 0xa6, 0xed, 0xcb, 0xb2, 0x51, 0x56, 0x4c,
-       0x5b, 0x4e, 0xbb, 0x71, 0x79, 0xeb, 0xe4, 0x3e, 0xf9, 0x96, 0xc3, 0x73,
-       0x92, 0xfe, 0x26, 0x79, 0x5a, 0x96, 0xb2, 0x4f, 0x5f, 0x5b, 0xb2, 0x8f,
-       0xb7, 0x49, 0x3b, 0x75, 0xb0, 0xd6, 0xee, 0xd3, 0xfd, 0x15, 0xf0, 0x96,
-       0x87, 0x6c, 0xdb, 0x21, 0x33, 0x43, 0xf1, 0x55, 0x78, 0xb0, 0x13, 0x3d,
-       0xd7, 0xfd, 0xfd, 0x16, 0xe8, 0x83, 0x2d, 0x5a, 0x48, 0x63, 0x93, 0x14,
-       0xba, 0xb8, 0xe6, 0x25, 0xe0, 0xc0, 0xfb, 0x55, 0xda, 0x6f, 0xd3, 0x0a,
-       0xa7, 0xda, 0xc5, 0xf8, 0xd1, 0x9d, 0x38, 0x4f, 0x43, 0x1e, 0x19, 0xf2,
-       0xbc, 0xaf, 0xdb, 0x46, 0x6a, 0x42, 0x72, 0xa4, 0x5d, 0x36, 0x1f, 0xdf,
-       0x2a, 0x73, 0x66, 0x5c, 0x12, 0xc7, 0xc3, 0xbd, 0x5a, 0x82, 0xf3, 0xf9,
-       0x32, 0xf1, 0xa7, 0x52, 0xfa, 0xa6, 0x60, 0x1c, 0xd2, 0x34, 0x8a, 0x33,
-       0xea, 0x35, 0x7b, 0xf4, 0x21, 0x2d, 0xaf, 0xfe, 0x8f, 0x6a, 0x2c, 0x18,
-       0xef, 0xd2, 0xbe, 0x6a, 0x74, 0x89, 0x61, 0xcd, 0x43, 0xae, 0x86, 0x5c,
-       0x74, 0xc2, 0xf9, 0xb8, 0xf8, 0x70, 0x94, 0xb3, 0x0c, 0xae, 0xc9, 0x59,
-       0x06, 0x7b, 0xea, 0x4f, 0x07, 0x38, 0xf3, 0x01, 0xec, 0x06, 0xc9, 0x27,
-       0xdb, 0x78, 0xa6, 0x01, 0xec, 0x75, 0xf9, 0xce, 0x50, 0xfa, 0x0c, 0xff,
-       0x57, 0x6b, 0x6d, 0x0d, 0xdf, 0xdb, 0x32, 0xef, 0xaa, 0x35, 0xc9, 0xfb,
-       0x70, 0xb6, 0xa5, 0xe4, 0x1d, 0xe6, 0x82, 0x1e, 0xd3, 0xf2, 0x09, 0xe2,
-       0x6a, 0x96, 0xc7, 0x13, 0xbd, 0x18, 0x6b, 0x52, 0xfe, 0x12, 0xf5, 0xf5,
-       0x13, 0xf1, 0xe7, 0x39, 0x97, 0x3e, 0xda, 0xab, 0x1f, 0x03, 0x7d, 0x94,
-       0x41, 0x3a, 0x29, 0x10, 0x7e, 0x79, 0xe8, 0x36, 0xf0, 0x67, 0xa2, 0x0f,
-       0xf9, 0xdf, 0x2c, 0xf9, 0x22, 0xe9, 0x57, 0x76, 0x0a, 0x39, 0x27, 0xb1,
-       0xdf, 0xdd, 0xb0, 0xc9, 0xf5, 0xf6, 0x0a, 0x1b, 0x6d, 0xa7, 0xad, 0x7e,
-       0x11, 0x3c, 0xa7, 0x33, 0x22, 0x16, 0xe4, 0x95, 0x94, 0x66, 0x6b, 0x1a,
-       0x3c, 0x51, 0x2f, 0xb7, 0x61, 0x7e, 0xc3, 0xc7, 0x79, 0xc5, 0x7a, 0x38,
-       0xf7, 0x41, 0x20, 0xcb, 0x7d, 0x32, 0xe1, 0xec, 0x57, 0x3c, 0x57, 0xf5,
-       0xcb, 0x92, 0xef, 0xee, 0x35, 0xa7, 0x40, 0x6f, 0xc1, 0x48, 0xcf, 0x55,
-       0x24, 0x29, 0x0b, 0xf0, 0x13, 0x2f, 0xc2, 0xe6, 0x5f, 0x71, 0x53, 0xb0,
-       0xaf, 0xbc, 0x3c, 0xea, 0xe4, 0x64, 0xe2, 0x14, 0x6d, 0x2c, 0x9d, 0x29,
-       0xc4, 0x72, 0x32, 0xef, 0xa4, 0x33, 0x0b, 0xd0, 0xbd, 0x05, 0xc7, 0xf3,
-       0xa6, 0xec, 0xfe, 0xd4, 0x28, 0x30, 0x5e, 0x74, 0x76, 0x24, 0x27, 0x20,
-       0xc8, 0x25, 0x2b, 0x25, 0x4b, 0x6e, 0x06, 0x3a, 0x86, 0xf7, 0xae, 0x85,
-       0x7e, 0x00, 0x3a, 0x9e, 0x85, 0x7d, 0x93, 0x16, 0x53, 0x16, 0xfb, 0x20,
-       0x3b, 0x47, 0x07, 0x2e, 0x4d, 0xf2, 0xfb, 0x6f, 0x40, 0xbe, 0x21, 0xdf,
-       0x77, 0x81, 0xb6, 0x04, 0x70, 0x92, 0xae, 0xdb, 0xa4, 0xda, 0x05, 0xf9,
-       0x0d, 0x25, 0x94, 0x5d, 0x16, 0x3a, 0xb7, 0x4a, 0xe1, 0x8e, 0x66, 0xbc,
-       0xef, 0xc2, 0x98, 0xf2, 0x6f, 0xc1, 0x1c, 0xdf, 0xff, 0x4b, 0x60, 0x5f,
-       0x4d, 0xeb, 0xc6, 0x57, 0xd1, 0xb7, 0xcb, 0x36, 0x8b, 0xbd, 0x89, 0xfe,
-       0x9f, 0xd1, 0x77, 0xa2, 0xef, 0xc5, 0x5e, 0xe7, 0x21, 0x43, 0xca, 0x0f,
-       0xcf, 0x0b, 0x5c, 0xb3, 0x3d, 0xd8, 0x97, 0x78, 0xdb, 0x81, 0x67, 0x53,
-       0xb0, 0x57, 0x3b, 0xc6, 0xad, 0xc1, 0x5e, 0x16, 0x68, 0x8e, 0x29, 0x19,
-       0x16, 0xac, 0xf8, 0xba, 0xb1, 0x86, 0x3e, 0x0e, 0xdc, 0x84, 0xd7, 0xe5,
-       0x4a, 0x57, 0x17, 0x9e, 0xb9, 0x27, 0x61, 0xf8, 0x1e, 0xbd, 0x4b, 0xfc,
-       0x1c, 0xe7, 0xe5, 0x09, 0x07, 0xfe, 0x89, 0xfa, 0xe6, 0x52, 0x8e, 0xbb,
-       0x65, 0x02, 0xbc, 0x8f, 0x3b, 0xe9, 0x99, 0xaa, 0xee, 0x79, 0x7a, 0xd6,
-       0x30, 0xab, 0x92, 0x86, 0x1d, 0x8f, 0xc9, 0x38, 0xe4, 0x77, 0xda, 0x89,
-       0xcb, 0x45, 0x65, 0x7b, 0xe4, 0xe9, 0x21, 0xc8, 0x05, 0xf1, 0xa4, 0x8b,
-       0xf6, 0x49, 0x9b, 0x82, 0xfc, 0x8a, 0xa6, 0x5c, 0xca, 0xd2, 0x96, 0xb3,
-       0xb2, 0xbc, 0x6a, 0xcb, 0x15, 0xd8, 0x32, 0xed, 0xb8, 0x02, 0x7b, 0xf6,
-       0xf5, 0xfa, 0x41, 0xd9, 0x06, 0xbd, 0x4e, 0x62, 0x3f, 0xea, 0xf5, 0xb3,
-       0xd0, 0x6b, 0xc8, 0xd4, 0x86, 0xae, 0x9b, 0xd4, 0x89, 0x6f, 0xc3, 0xa7,
-       0x81, 0xdf, 0x44, 0xf0, 0xbc, 0xfc, 0x5d, 0x29, 0x9c, 0x6a, 0x05, 0xdd,
-       0x7b, 0xdb, 0x29, 0xb3, 0xf2, 0x32, 0x7f, 0xa1, 0x2e, 0x3e, 0x05, 0xf9,
-       0xc1, 0x8f, 0x2a, 0x1d, 0x04, 0x6f, 0xd9, 0x3d, 0x80, 0x19, 0xc6, 0x39,
-       0xb7, 0x02, 0x3f, 0x69, 0xbc, 0x15, 0x1c, 0xdf, 0x83, 0xee, 0x2c, 0xf5,
-       0x15, 0xf3, 0x0b, 0xe1, 0x79, 0xb7, 0xa9, 0x3d, 0xcb, 0x43, 0xad, 0x01,
-       0x7f, 0x94, 0x03, 0xf5, 0x3e, 0x09, 0xbd, 0xd5, 0x64, 0x5c, 0xe9, 0x6e,
-       0x5e, 0xc9, 0x61, 0xde, 0xa1, 0xfe, 0x02, 0x87, 0x4d, 0x19, 0x98, 0x72,
-       0xbf, 0x82, 0x4f, 0xae, 0xd9, 0x77, 0x37, 0x69, 0xe7, 0x78, 0x83, 0xf4,
-       0x28, 0x1f, 0xd4, 0x1d, 0xe8, 0x76, 0x13, 0x6c, 0x9f, 0xef, 0x1e, 0x92,
-       0xc7, 0xdc, 0x61, 0x9c, 0x43, 0x52, 0x0e, 0xba, 0xdd, 0xf2, 0xfb, 0xee,
-       0x46, 0xb9, 0xdc, 0x09, 0xba, 0x56, 0x6d, 0xec, 0x6e, 0xf9, 0x03, 0xc6,
-       0x3c, 0xf5, 0x0c, 0x3f, 0xa9, 0xdf, 0x05, 0x1a, 0x68, 0x4f, 0xb4, 0x2b,
-       0xc2, 0xc5, 0xa4, 0xa4, 0xf6, 0xfc, 0x89, 0xef, 0xdb, 0x80, 0x77, 0xae,
-       0x93, 0xf6, 0x4b, 0xda, 0x8c, 0xc0, 0x66, 0xd3, 0x66, 0x49, 0xc8, 0x33,
-       0x69, 0xe5, 0x73, 0xa3, 0x2c, 0xd8, 0x37, 0xca, 0x20, 0xc4, 0x13, 0xda,
-       0xe5, 0xa8, 0xe4, 0x5d, 0xf6, 0xf4, 0x97, 0x88, 0x91, 0x0e, 0x62, 0xa4,
-       0x83, 0xd8, 0x08, 0x5b, 0x78, 0xc5, 0x41, 0x6c, 0x74, 0x10, 0x1b, 0xe1,
-       0xcf, 0x5e, 0x72, 0x10, 0x1f, 0xa1, 0x43, 0x2f, 0x38, 0x8c, 0xeb, 0xdf,
-       0x46, 0x4c, 0x35, 0xe4, 0x99, 0x9a, 0xc8, 0x91, 0x5a, 0x1a, 0xd4, 0xa5,
-       0x87, 0x3f, 0x90, 0xfe, 0xcc, 0x07, 0x92, 0xb6, 0x2f, 0xe2, 0xf7, 0x96,
-       0xe0, 0x9d, 0xca, 0x11, 0xf0, 0xbe, 0x1e, 0xe6, 0x13, 0x38, 0x7f, 0x8b,
-       0x39, 0x83, 0x3f, 0x0f, 0x97, 0x88, 0xb8, 0x41, 0x9b, 0x1e, 0x93, 0xf9,
-       0x59, 0xda, 0xf2, 0xed, 0x38, 0x8b, 0x4e, 0x99, 0xb2, 0xfc, 0x71, 0xc1,
-       0xbe, 0xc3, 0x1c, 0xa5, 0xee, 0x98, 0x31, 0xd0, 0x76, 0x1b, 0x7e, 0x29,
-       0xc4, 0xda, 0x3f, 0xd2, 0x0a, 0x0b, 0x71, 0xc4, 0x56, 0xc6, 0x5b, 0xc9,
-       0xfb, 0x7a, 0x74, 0xc3, 0x1b, 0x5f, 0x5d, 0xd3, 0x0f, 0xfd, 0x86, 0xdc,
-       0x13, 0x09, 0xc0, 0xcc, 0x6a, 0x23, 0xcb, 0x6f, 0xfb, 0x76, 0x92, 0xe5,
-       0xf8, 0x46, 0x60, 0x7b, 0xdc, 0x1f, 0x63, 0x97, 0x78, 0xf9, 0x4c, 0x9c,
-       0x97, 0x91, 0x1f, 0x24, 0x91, 0x17, 0x24, 0xe0, 0x7b, 0x98, 0x73, 0x74,
-       0x23, 0x3f, 0xf0, 0xbc, 0x17, 0x6d, 0xcf, 0x7b, 0x07, 0xbf, 0x7f, 0xb7,
-       0x57, 0x79, 0x40, 0xab, 0x68, 0xa3, 0x6e, 0x4a, 0x46, 0xdd, 0x9f, 0xb6,
-       0xfb, 0x72, 0x8c, 0xcb, 0xa4, 0x93, 0x90, 0x29, 0xa7, 0xa6, 0xdd, 0xb7,
-       0x3c, 0xad, 0x15, 0x97, 0x67, 0xb0, 0xaf, 0x81, 0x39, 0xa9, 0x54, 0xed,
-       0x33, 0xda, 0x88, 0x7b, 0x54, 0xbb, 0x7f, 0xb9, 0x5d, 0xd9, 0x79, 0xd5,
-       0x61, 0xce, 0x70, 0x5d, 0xe5, 0x2e, 0x05, 0x2b, 0x6d, 0xfe, 0x2e, 0x14,
-       0xaf, 0x50, 0x23, 0xdd, 0xcd, 0x01, 0xcd, 0xb0, 0xc3, 0x9c, 0x77, 0xb8,
-       0x90, 0xb5, 0x60, 0x8b, 0xa4, 0x51, 0xcd, 0x5d, 0xf0, 0xe9, 0x3e, 0xad,
-       0x15, 0x96, 0xdb, 0xb4, 0x91, 0x53, 0x8c, 0xc7, 0xd2, 0x1d, 0x13, 0xae,
-       0xdb, 0x01, 0x7b, 0xad, 0x63, 0x0f, 0xe6, 0x5b, 0x94, 0x2d, 0xe8, 0x86,
-       0x0e, 0xbf, 0x04, 0x7a, 0x5e, 0x54, 0xf9, 0x0f, 0xf9, 0x4b, 0xe1, 0xac,
-       0x42, 0xfe, 0x3c, 0xef, 0xaf, 0xed, 0x90, 0xfe, 0x74, 0x2a, 0xaf, 0x87,
-       0xfc, 0x7a, 0xde, 0xbf, 0xd9, 0xe4, 0x99, 0x3c, 0x79, 0xde, 0x0b, 0x76,
-       0x02, 0xf4, 0x7b, 0x17, 0x74, 0xab, 0x06, 0x7e, 0x18, 0xdb, 0x29, 0xf3,
-       0x69, 0xf0, 0x71, 0x14, 0x3c, 0x9e, 0x06, 0x7f, 0x33, 0xa0, 0xe5, 0x37,
-       0xed, 0xd9, 0x98, 0x4b, 0x4a, 0x8a, 0xb2, 0x2e, 0x2f, 0x32, 0xa7, 0x64,
-       0x1e, 0x69, 0x4a, 0x69, 0x31, 0x5c, 0x1f, 0xea, 0xc3, 0x01, 0xd9, 0xeb,
-       0x74, 0x42, 0x3e, 0x94, 0xe7, 0x35, 0xd0, 0x4b, 0x9f, 0x5f, 0xcd, 0xe8,
-       0x08, 0x80, 0x65, 0x1b, 0xb1, 0x5e, 0x46, 0x94, 0x2e, 0x2c, 0x5a, 0x92,
-       0x2f, 0xdb, 0x26, 0xed, 0x36, 0x55, 0xb6, 0x2b, 0xc8, 0x0c, 0x7c, 0x39,
-       0x8e, 0xd4, 0x0c, 0xbc, 0xe3, 0x58, 0x60, 0xf3, 0xa1, 0x6c, 0x0d, 0xd8,
-       0x5d, 0x28, 0xf3, 0x70, 0xee, 0xc1, 0x0e, 0xfa, 0xcc, 0x79, 0xf7, 0x0b,
-       0xc0, 0x41, 0xbc, 0xbf, 0x09, 0x47, 0x1c, 0x31, 0x84, 0x78, 0xe2, 0x72,
-       0xc6, 0x21, 0x3c, 0xf3, 0x8b, 0xb8, 0xb4, 0x22, 0x26, 0x6f, 0xc8, 0x89,
-       0xf6, 0xf9, 0x1d, 0x69, 0x73, 0x31, 0x16, 0x93, 0x63, 0x09, 0xb9, 0xc3,
-       0x60, 0x00, 0xd8, 0xec, 0x67, 0xea, 0x85, 0x19, 0x0d, 0xba, 0xdc, 0x26,
-       0x93, 0x03, 0x69, 0x73, 0x1e, 0x7b, 0xe8, 0xd8, 0xe3, 0x6b, 0x9c, 0xaf,
-       0xfd, 0x87, 0x57, 0x4a, 0xec, 0x84, 0x9d, 0x48, 0xdc, 0xc8, 0x19, 0x83,
-       0x53, 0xb5, 0x03, 0xc2, 0xfc, 0x6a, 0x72, 0x60, 0x03, 0xec, 0xbc, 0x77,
-       0x78, 0xaf, 0x30, 0x97, 0x8f, 0x0f, 0x8e, 0x5b, 0x3e, 0x5d, 0x23, 0xb0,
-       0xeb, 0x49, 0xe4, 0x79, 0x7b, 0xeb, 0xcc, 0x01, 0x8c, 0xc1, 0xde, 0xba,
-       0x21, 0x47, 0x60, 0xaf, 0xcd, 0xd0, 0x9f, 0x15, 0xa5, 0xcb, 0x26, 0x64,
-       0x4d, 0xdf, 0x3a, 0x0c, 0xdc, 0xef, 0x40, 0x6e, 0x16, 0x62, 0x67, 0x37,
-       0xf2, 0xd9, 0x0c, 0xce, 0x33, 0x85, 0xd8, 0xd7, 0xa8, 0xd7, 0x12, 0xdf,
-       0x0a, 0xb8, 0x57, 0x76, 0x32, 0x2f, 0xf3, 0xbc, 0x07, 0xac, 0xf4, 0xb3,
-       0xe4, 0x65, 0xca, 0x91, 0x7c, 0xd5, 0x56, 0xbe, 0x10, 0x3a, 0x9b, 0x62,
-       0x3e, 0x07, 0xfd, 0x83, 0x4e, 0x16, 0x39, 0x5e, 0xd5, 0xc1, 0xe4, 0xa4,
-       0xcc, 0x43, 0x76, 0x62, 0x16, 0xb2, 0x84, 0x0d, 0xe1, 0x5a, 0x02, 0xdd,
-       0xf6, 0xbc, 0x18, 0x74, 0x77, 0x3c, 0x4b, 0x38, 0xa9, 0x28, 0x9b, 0x83,
-       0xcc, 0x26, 0xdd, 0x5d, 0x1d, 0x7e, 0x3e, 0x09, 0x5f, 0x99, 0xe0, 0x5e,
-       0x9f, 0x85, 0x0e, 0x77, 0x23, 0x86, 0x78, 0x1e, 0x6c, 0x38, 0xa1, 0x0b,
-       0x75, 0x18, 0xf6, 0xe2, 0xf2, 0x5d, 0x1b, 0xe6, 0xc5, 0x9c, 0x84, 0x4f,
-       0x2b, 0x99, 0x9e, 0x77, 0x0f, 0x68, 0xa9, 0xda, 0x1d, 0x58, 0xd7, 0x24,
-       0x08, 0x7b, 0xa6, 0xbf, 0xdf, 0x46, 0x15, 0x3b, 0x30, 0x6e, 0xc7, 0x7e,
-       0x9b, 0x98, 0x7b, 0x4e, 0xd2, 0x16, 0xb2, 0xb4, 0x7d, 0x23, 0xf0, 0xe7,
-       0x6f, 0x82, 0x4e, 0xae, 0x51, 0x70, 0xf1, 0xa6, 0x5c, 0x56, 0x96, 0x6a,
-       0xdb, 0x65, 0x6e, 0x3f, 0xf7, 0xe8, 0xa6, 0x1d, 0x22, 0xfe, 0xf3, 0x99,
-       0x74, 0xd3, 0x8f, 0x74, 0x06, 0x63, 0xed, 0x73, 0xfe, 0x1e, 0x62, 0x32,
-       0xdf, 0x1d, 0x51, 0xf4, 0x8a, 0x7e, 0xd1, 0xde, 0xe8, 0xc7, 0xa8, 0x5c,
-       0xbb, 0x76, 0x0f, 0x72, 0xf0, 0xbd, 0xbb, 0xa9, 0x03, 0x86, 0x5c, 0xb2,
-       0x3c, 0xef, 0x92, 0xdd, 0x04, 0xfe, 0x74, 0x69, 0xb2, 0x8e, 0x9b, 0xd2,
-       0x0a, 0x99, 0x3b, 0x5a, 0x20, 0x97, 0x36, 0x25, 0x97, 0x49, 0x15, 0xf7,
-       0xde, 0xc5, 0xd9, 0x70, 0x6d, 0x45, 0xc5, 0x97, 0x82, 0x5a, 0xc7, 0x35,
-       0x3c, 0xd3, 0x77, 0x91, 0x73, 0x1f, 0xc3, 0xda, 0x98, 0xb4, 0x28, 0xdd,
-       0x66, 0xfc, 0x27, 0xaf, 0xd2, 0xe1, 0xe3, 0x61, 0xac, 0xa5, 0x0e, 0x87,
-       0xfc, 0x8f, 0x06, 0x3c, 0x12, 0xaf, 0x0d, 0xbc, 0x6d, 0xaa, 0xce, 0x28,
-       0xfb, 0xe7, 0xd7, 0x11, 0x53, 0xf2, 0x40, 0x5d, 0x94, 0x0b, 0x7d, 0x21,
-       0x41, 0x43, 0xba, 0x9f, 0xc1, 0x3e, 0xa4, 0x61, 0x13, 0xf2, 0x5e, 0xd1,
-       0xaa, 0xe4, 0xcb, 0x0c, 0xf7, 0x11, 0x3d, 0x96, 0x6b, 0x91, 0x11, 0x68,
-       0x5d, 0xd5, 0xb1, 0xcc, 0x07, 0xa0, 0x7b, 0x5f, 0x07, 0x8f, 0x85, 0x19,
-       0xfa, 0xaa, 0x2f, 0x61, 0xdd, 0x4a, 0x5a, 0xf7, 0xb7, 0x95, 0x23, 0x0e,
-       0x65, 0xfa, 0x0e, 0x64, 0xaa, 0x77, 0x35, 0x4b, 0x87, 0x14, 0x91, 0x4f,
-       0xcd, 0x0f, 0x83, 0xaf, 0x81, 0x36, 0x89, 0xed, 0xa2, 0xaf, 0x42, 0xed,
-       0x93, 0x58, 0x41, 0x60, 0xb8, 0xee, 0xe9, 0x3b, 0xb1, 0x7e, 0x20, 0x01,
-       0xf9, 0x52, 0x66, 0x7a, 0x00, 0x47, 0x18, 0x14, 0x4a, 0x66, 0xa1, 0xb3,
-       0x59, 0x88, 0x9b, 0xef, 0xfa, 0x93, 0xa6, 0x70, 0x1e, 0x3e, 0xbd, 0xc8,
-       0xb5, 0xa4, 0xd9, 0x5f, 0xd3, 0x64, 0x85, 0xb2, 0xfe, 0x2b, 0xf8, 0xa7,
-       0x5f, 0x79, 0x7b, 0x87, 0xc2, 0xf7, 0xe4, 0x87, 0x7c, 0xe1, 0x0c, 0x41,
-       0xd3, 0xe6, 0x9c, 0x25, 0x83, 0xd3, 0xa2, 0x15, 0x90, 0x7b, 0x50, 0x47,
-       0x7a, 0x86, 0xd2, 0x95, 0x94, 0xbe, 0x0d, 0xbc, 0x1a, 0xb2, 0x7f, 0x88,
-       0xfc, 0x6e, 0x0d, 0xf2, 0x8e, 0x46, 0x9e, 0x3b, 0x02, 0x9e, 0xd5, 0x7e,
-       0xc3, 0x79, 0x7d, 0x8d, 0xf7, 0xd1, 0x99, 0x70, 0x5f, 0x03, 0xb6, 0xbc,
-       0x82, 0x9a, 0x87, 0xfb, 0x93, 0x9e, 0x1b, 0x9e, 0x6e, 0x59, 0x95, 0x1e,
-       0xfd, 0x57, 0xde, 0xfd, 0x43, 0x9a, 0xca, 0xd3, 0x74, 0xe4, 0x8c, 0xfa,
-       0x10, 0x78, 0x1d, 0xe2, 0x79, 0xe9, 0x72, 0xff, 0x6e, 0xe2, 0x3b, 0x42,
-       0xde, 0x80, 0xb3, 0xd5, 0xaf, 0x61, 0x86, 0xc2, 0x3d, 0x1a, 0xf5, 0x27,
-       0xc4, 0x49, 0x5c, 0x84, 0xe1, 0x99, 0xd0, 0xdf, 0x4a, 0xbc, 0x60, 0xc7,
-       0x83, 0xb3, 0x0e, 0xd7, 0x89, 0x66, 0x58, 0xeb, 0xd7, 0xc1, 0x68, 0x1f,
-       0xa4, 0xde, 0xf5, 0x04, 0x76, 0x16, 0xea, 0x21, 0xf7, 0x64, 0x7f, 0x2b,
-       0x9d, 0xe5, 0x3a, 0xae, 0x27, 0x3c, 0x61, 0xe0, 0x33, 0xe0, 0x83, 0x7e,
-       0x06, 0xdb, 0x78, 0xf9, 0x26, 0x5f, 0xce, 0xd8, 0x4e, 0x1f, 0x63, 0xaf,
-       0xf7, 0xe7, 0xac, 0x7d, 0xf0, 0xac, 0xc3, 0x7e, 0x1b, 0xfd, 0x3a, 0xe7,
-       0x50, 0x4f, 0x2c, 0x8e, 0xa2, 0xb7, 0x64, 0xed, 0x1e, 0x80, 0x7e, 0x3e,
-       0xac, 0xe7, 0xdb, 0x4a, 0x46, 0x8e, 0x35, 0xbd, 0x14, 0xab, 0xb5, 0xc3,
-       0x88, 0xc9, 0x52, 0xb9, 0x4d, 0xd5, 0xc6, 0x6d, 0xc3, 0x85, 0x2c, 0xe6,
-       0xea, 0x8c, 0xcb, 0x30, 0x7f, 0xac, 0x43, 0x6c, 0x88, 0xeb, 0xd3, 0xf1,
-       0xca, 0xed, 0x39, 0xda, 0x49, 0x4a, 0x52, 0xf5, 0x6b, 0x88, 0x79, 0xc8,
-       0x1f, 0x95, 0x0e, 0x7d, 0xf1, 0x76, 0xd2, 0x5f, 0x45, 0xec, 0x32, 0x72,
-       0x62, 0xe8, 0xb9, 0xe6, 0xf8, 0x64, 0xb6, 0x0d, 0xb1, 0x7e, 0x6c, 0xbb,
-       0x7e, 0x6e, 0xdf, 0xf6, 0xd8, 0xb9, 0xae, 0x52, 0x53, 0xae, 0xb2, 0x5d,
-       0x9f, 0x86, 0x2f, 0xaf, 0x89, 0x8e, 0x98, 0x8a, 0x1a, 0x01, 0xe3, 0x73,
-       0x0f, 0x3c, 0xa0, 0xe7, 0x62, 0x52, 0x4e, 0xc8, 0x93, 0x8b, 0x59, 0xf8,
-       0xf5, 0x5a, 0x3a, 0x55, 0x94, 0x27, 0xa5, 0x5a, 0x3b, 0x24, 0x93, 0xb5,
-       0xf0, 0xde, 0x80, 0x77, 0x06, 0x49, 0xe5, 0xbf, 0xe8, 0x5f, 0x27, 0x03,
-       0xda, 0x41, 0x73, 0x7e, 0x84, 0x31, 0x3a, 0x4b, 0xdf, 0x7d, 0x0d, 0x3a,
-       0xd1, 0x12, 0xd4, 0xda, 0xbe, 0xfe, 0x19, 0xb9, 0x8f, 0x30, 0x47, 0xfd,
-       0xdb, 0xb0, 0x7a, 0x6e, 0x7b, 0x4e, 0xfd, 0x89, 0x8a, 0xa9, 0x4b, 0x36,
-       0x9f, 0x09, 0xf3, 0xf6, 0xe0, 0x94, 0x75, 0xdd, 0x64, 0x6d, 0x70, 0xc1,
-       0x21, 0x3e, 0x53, 0x9d, 0xb5, 0x91, 0xbb, 0x8c, 0xb5, 0xad, 0xa4, 0x0b,
-       0xcd, 0xc0, 0x3c, 0xf6, 0x77, 0x9a, 0x83, 0x71, 0xb8, 0xf6, 0xb5, 0x86,
-       0xb5, 0x9c, 0x63, 0x4f, 0xdc, 0xd8, 0xa3, 0xe1, 0xce, 0xe4, 0x82, 0x9b,
-       0x51, 0x35, 0x7b, 0xc1, 0x55, 0xb9, 0x02, 0x6a, 0x74, 0xe8, 0x93, 0xba,
-       0x43, 0x81, 0x3f, 0x72, 0xff, 0xce, 0xf4, 0xcf, 0x9d, 0xfe, 0x63, 0x45,
-       0x18, 0xdf, 0xa8, 0x6f, 0x53, 0xca, 0x4f, 0xbd, 0xd9, 0x70, 0x17, 0xf0,
-       0x26, 0xfc, 0xd2, 0x9d, 0x9b, 0xfd, 0x9a, 0xc6, 0x0c, 0x7c, 0x5a, 0xab,
-       0xca, 0x53, 0x7c, 0x9f, 0x96, 0x6a, 0x80, 0x4d, 0xf1, 0xde, 0xa0, 0xc3,
-       0xaf, 0xbd, 0x7f, 0x2b, 0x58, 0xc3, 0xfc, 0xc1, 0x32, 0x99, 0x3b, 0xf8,
-       0xb2, 0xf0, 0x9e, 0x59, 0x1d, 0x27, 0x4a, 0x01, 0xbe, 0xa6, 0xe0, 0xdd,
-       0x5b, 0x6d, 0x3e, 0x4d, 0xe1, 0xda, 0x3f, 0x0d, 0xee, 0xa6, 0x94, 0x2f,
-       0xcc, 0x03, 0x16, 0x3c, 0xa4, 0x4a, 0x3a, 0xf4, 0x66, 0xa4, 0xee, 0xcb,
-       0x1b, 0xf1, 0x8e, 0xf7, 0x4f, 0x8a, 0xb6, 0x0b, 0x2a, 0xe7, 0x68, 0xe4,
-       0x3f, 0x4f, 0xbe, 0xf3, 0x06, 0x69, 0x74, 0xc7, 0xb0, 0x56, 0x0e, 0xf8,
-       0x77, 0x14, 0xa6, 0x4c, 0x98, 0xfd, 0xe6, 0x24, 0xf1, 0x26, 0x04, 0xf8,
-       0x90, 0x97, 0xe4, 0xc2, 0x33, 0xfc, 0x26, 0xf7, 0x06, 0xde, 0x8d, 0x1c,
-       0xa3, 0xff, 0x66, 0x40, 0xcb, 0x8f, 0x03, 0x79, 0x85, 0xef, 0x7f, 0xb1,
-       0xf9, 0xe6, 0xf1, 0x3d, 0xb7, 0x07, 0xf2, 0xc4, 0xf3, 0xa1, 0x5f, 0x43,
-       0x13, 0xf5, 0xfd, 0x34, 0xf0, 0xa8, 0x18, 0x5c, 0xd1, 0x73, 0x88, 0xf9,
-       0x59, 0x64, 0x34, 0x35, 0xd8, 0xb4, 0x20, 0xf6, 0xbb, 0x69, 0xbb, 0x84,
-       0x55, 0x1f, 0xd5, 0xe8, 0x57, 0xaf, 0xc3, 0xaf, 0xf2, 0xac, 0x3f, 0x96,
-       0xa9, 0x5a, 0xaf, 0xdd, 0xac, 0xa9, 0xfc, 0x3a, 0x73, 0x5a, 0xfa, 0xed,
-       0xd3, 0xc8, 0x3d, 0x50, 0xa3, 0xa5, 0x8e, 0x08, 0x65, 0x7e, 0x5d, 0x76,
-       0xa8, 0x9c, 0xe0, 0x63, 0xb1, 0x20, 0x93, 0x22, 0xea, 0x04, 0x7d, 0xe8,
-       0x5f, 0x3d, 0x95, 0xd3, 0x68, 0xa8, 0x42, 0x6f, 0x81, 0xeb, 0x6d, 0x85,
-       0x87, 0xf8, 0x1a, 0x71, 0x69, 0xd2, 0x32, 0x14, 0xe2, 0x4b, 0xc9, 0x51,
-       0x37, 0xc4, 0x69, 0xc8, 0x65, 0x64, 0x2d, 0xfa, 0x90, 0x17, 0xf0, 0xcf,
-       0xe7, 0x5f, 0x7a, 0xcc, 0x09, 0xf4, 0xdc, 0xdd, 0x81, 0x0c, 0x7e, 0x8f,
-       0x32, 0xc0, 0x18, 0x3a, 0xef, 0x7c, 0xc5, 0xaf, 0x45, 0x54, 0x2d, 0x37,
-       0x86, 0x9a, 0x82, 0x73, 0x2b, 0x2d, 0x05, 0x3b, 0x3c, 0xe3, 0x7d, 0x98,
-       0x2b, 0xe2, 0x47, 0xb9, 0x10, 0x66, 0x3f, 0x9e, 0xf3, 0x01, 0x9c, 0x0c,
-       0xfb, 0x35, 0x79, 0x58, 0x8b, 0x84, 0x39, 0xa1, 0xcc, 0xe8, 0x39, 0xe6,
-       0xef, 0x3b, 0x40, 0x2b, 0x73, 0x56, 0x9c, 0xe7, 0xaa, 0xff, 0x59, 0x85,
-       0xa9, 0xac, 0xc1, 0xf8, 0xb9, 0xe7, 0xa8, 0x1b, 0xe6, 0xbb, 0xcc, 0x69,
-       0xc3, 0xdc, 0x27, 0xaf, 0x15, 0x9d, 0x31, 0xed, 0x3e, 0x87, 0xf0, 0xfa,
-       0xec, 0x66, 0xb1, 0x52, 0x3d, 0xba, 0x27, 0x23, 0x43, 0xac, 0x9d, 0x8f,
-       0xe1, 0xcc, 0x3b, 0xa4, 0x9c, 0x41, 0x1e, 0x60, 0xde, 0x85, 0xbe, 0x19,
-       0x73, 0x5f, 0xc6, 0x1c, 0x74, 0x23, 0xc3, 0xfc, 0x66, 0x83, 0xaa, 0x41,
-       0x4a, 0x2a, 0x76, 0xec, 0x08, 0xf4, 0xe5, 0x89, 0x4e, 0x5f, 0x3f, 0xbe,
-       0x87, 0xf1, 0x46, 0xcc, 0x7f, 0x03, 0xbd, 0xe7, 0xf5, 0x0c, 0x85, 0xf3,
-       0xd4, 0xfb, 0x61, 0xcc, 0xdf, 0x09, 0x1c, 0x15, 0x3c, 0x7f, 0x0e, 0xcf,
-       0x7f, 0xb8, 0x6e, 0xed, 0x77, 0x31, 0xae, 0x60, 0xbe, 0xb0, 0x6e, 0x3e,
-       0xf4, 0xb3, 0xdc, 0xaf, 0xa2, 0x15, 0xdd, 0x29, 0x2d, 0xaf, 0xea, 0x88,
-       0x63, 0xa8, 0x55, 0xe8, 0x6b, 0x59, 0xb3, 0xcc, 0x20, 0x17, 0xa7, 0x9f,
-       0x3d, 0x88, 0x35, 0x8b, 0xd0, 0xbb, 0x56, 0x95, 0x65, 0xea, 0xca, 0x1e,
-       0x0f, 0x1d, 0xec, 0x99, 0x63, 0x5f, 0x39, 0x68, 0xd7, 0x09, 0xc3, 0xe7,
-       0x27, 0x0f, 0xf6, 0xd4, 0x0f, 0x01, 0x96, 0xf9, 0x7a, 0xe3, 0x1d, 0xef,
-       0x37, 0xd6, 0xed, 0xe9, 0xd7, 0x38, 0x45, 0x75, 0x37, 0x78, 0xe8, 0x60,
-       0x61, 0x86, 0x71, 0x9a, 0xf5, 0x26, 0xf3, 0xd2, 0xca, 0xc1, 0xf1, 0xda,
-       0x54, 0x50, 0xd3, 0x84, 0xef, 0xf9, 0x8e, 0xf2, 0xbf, 0x15, 0x6d, 0xa4,
-       0xab, 0x11, 0x8f, 0xca, 0x6b, 0x80, 0xe7, 0x49, 0xe0, 0x61, 0x6d, 0xa4,
-       0xee, 0x90, 0x15, 0xbd, 0xa9, 0xb9, 0x5b, 0xd1, 0x46, 0x5c, 0xdc, 0x2b,
-       0xc4, 0x77, 0x02, 0x75, 0xc7, 0x77, 0x48, 0x2f, 0xf0, 0x7c, 0x26, 0xc8,
-       0x6d, 0x78, 0x37, 0x65, 0xf8, 0x77, 0x38, 0x6a, 0x1c, 0xd6, 0xbe, 0x4d,
-       0xeb, 0x6a, 0xdf, 0xa6, 0xe0, 0x1e, 0x8b, 0xb0, 0x7a, 0x00, 0xab, 0xee,
-       0xd0, 0x31, 0x97, 0x0a, 0xee, 0x94, 0xe3, 0xbc, 0x53, 0x6e, 0x90, 0x45,
-       0x53, 0x20, 0x7f, 0xd2, 0x11, 0xd6, 0x2b, 0x8d, 0xf4, 0xf1, 0xbe, 0x79,
-       0x0a, 0xef, 0xc3, 0xb3, 0x09, 0x79, 0x5f, 0xc4, 0x3c, 0xe9, 0x3d, 0x03,
-       0xf8, 0x90, 0xde, 0x4f, 0x7b, 0xa6, 0x5c, 0x7b, 0x06, 0xbf, 0x70, 0xbf,
-       0x50, 0x2e, 0xa4, 0xf5, 0xd7, 0xd5, 0x5a, 0xa1, 0xdf, 0x5b, 0x0c, 0x62,
-       0x3a, 0xe9, 0xa2, 0x0f, 0xa2, 0x3f, 0x0e, 0xef, 0xc0, 0x59, 0x63, 0x33,
-       0x56, 0xf0, 0xbc, 0x5a, 0xa0, 0x2b, 0x84, 0xd3, 0x90, 0x5f, 0xeb, 0xcc,
-       0xc3, 0x52, 0xa8, 0x35, 0x92, 0x8f, 0xc8, 0x0f, 0xb0, 0x57, 0x3e, 0xd3,
-       0xa4, 0xec, 0x88, 0xf7, 0x08, 0xcd, 0xb2, 0x02, 0x9d, 0xbe, 0x84, 0xfa,
-       0x63, 0x1e, 0xb5, 0xd1, 0x12, 0xef, 0xb5, 0xeb, 0x27, 0x3b, 0x79, 0x1f,
-       0x32, 0x65, 0xad, 0xd5, 0xf1, 0x73, 0x80, 0x59, 0xb0, 0x58, 0xeb, 0x4b,
-       0xd0, 0x10, 0x23, 0x91, 0x67, 0x8c, 0x5b, 0xff, 0xe3, 0x95, 0x13, 0x8d,
-       0xb0, 0xb7, 0xaa, 0xb3, 0xdb, 0xa4, 0x3a, 0x9b, 0x3e, 0x3a, 0x87, 0x7a,
-       0x77, 0xc6, 0xd2, 0xb7, 0xe8, 0x7e, 0xad, 0x34, 0x03, 0xdf, 0xa4, 0x6a,
-       0xad, 0x39, 0x79, 0xae, 0x93, 0x67, 0xd7, 0x64, 0xf5, 0x9b, 0x9d, 0xfa,
-       0xef, 0x50, 0x17, 0x15, 0xe5, 0xb1, 0x13, 0x1b, 0xa4, 0x3c, 0x70, 0x1f,
-       0x72, 0x2d, 0xc8, 0xf3, 0x44, 0x05, 0x95, 0x21, 0xf5, 0xea, 0xbd, 0x03,
-       0xe3, 0x16, 0x6b, 0x26, 0xf1, 0xe3, 0x9a, 0xf8, 0x3c, 0xc6, 0x4e, 0xb4,
-       0x29, 0x9f, 0xe4, 0xdf, 0x99, 0xf7, 0x9a, 0x45, 0xe4, 0x63, 0x85, 0x01,
-       0x24, 0x8d, 0xc8, 0x5e, 0xcc, 0x9d, 0x22, 0x3d, 0xcc, 0x19, 0xe1, 0x8f,
-       0x7b, 0xce, 0xc1, 0xcb, 0x9d, 0x20, 0xbc, 0x2e, 0xc6, 0x89, 0x98, 0x34,
-       0x9d, 0x60, 0x9d, 0x2d, 0x5d, 0xa8, 0x51, 0x88, 0xb3, 0xc7, 0x40, 0x3f,
-       0x8a, 0xdf, 0x1e, 0xe4, 0x51, 0x26, 0xf2, 0xda, 0x5b, 0xc0, 0x03, 0x96,
-       0x6b, 0x6e, 0x05, 0xff, 0x6a, 0x27, 0xeb, 0xce, 0x9e, 0x73, 0x84, 0xe7,
-       0x7d, 0x76, 0x17, 0xe8, 0xf1, 0xf7, 0x27, 0x0e, 0xe3, 0x84, 0x48, 0xef,
-       0xb4, 0x74, 0xea, 0x6a, 0x8d, 0x21, 0xe3, 0x59, 0xbe, 0x6b, 0x03, 0xfc,
-       0xab, 0xca, 0x3e, 0x7b, 0xd5, 0x3a, 0xff, 0xce, 0xa2, 0xbc, 0x46, 0x37,
-       0xe6, 0x34, 0x3c, 0x23, 0x57, 0xca, 0x9a, 0xd2, 0x3b, 0xef, 0xc3, 0xf6,
-       0x9c, 0xeb, 0xd8, 0xe2, 0xdf, 0xed, 0xf8, 0xb4, 0xf1, 0x6e, 0xb0, 0x0c,
-       0xa9, 0x1a, 0x3b, 0x59, 0xf3, 0x13, 0x86, 0xdf, 0x52, 0xd8, 0x73, 0x2d,
-       0xe5, 0xe7, 0xcf, 0xe9, 0xfa, 0xff, 0xa5, 0x5f, 0xeb, 0xbf, 0xe1, 0x84,
-       0x77, 0x4b, 0xa9, 0x86, 0xbb, 0xa5, 0x74, 0xc3, 0xb7, 0x97, 0x9f, 0xb4,
-       0x05, 0x7a, 0x27, 0x93, 0xb6, 0x27, 0xe1, 0xf7, 0xa5, 0xbd, 0x37, 0xe5,
-       0x90, 0x19, 0x15, 0xa7, 0xc7, 0x21, 0xfb, 0x2b, 0x75, 0xd2, 0x8b, 0x98,
-       0x53, 0x8f, 0xcb, 0xfb, 0x8b, 0xad, 0x72, 0x65, 0xce, 0xcf, 0x29, 0xaf,
-       0xa8, 0x6f, 0x4e, 0xa6, 0x7c, 0x80, 0xc2, 0xff, 0x72, 0x3d, 0x83, 0x5f,
-       0xa7, 0x5c, 0x5d, 0xbc, 0x39, 0xa7, 0xbc, 0xe0, 0xde, 0x0d, 0x5a, 0x3a,
-       0x03, 0x1b, 0x46, 0xdd, 0x86, 0x18, 0x58, 0x09, 0xee, 0xea, 0x55, 0xce,
-       0x62, 0xd0, 0x16, 0x78, 0x27, 0x1f, 0xde, 0x57, 0xf7, 0x9a, 0x17, 0x21,
-       0xe3, 0xaf, 0x1a, 0x9d, 0xa8, 0xa3, 0x79, 0xd7, 0x16, 0xc6, 0xec, 0x30,
-       0xf6, 0x90, 0xee, 0xb7, 0x81, 0x7b, 0x00, 0x7a, 0x4a, 0xdd, 0xb4, 0xa1,
-       0xb3, 0xa6, 0x2c, 0xf5, 0xa5, 0x67, 0x2a, 0xc2, 0xef, 0x02, 0x59, 0xec,
-       0xb9, 0x0c, 0xbd, 0xcc, 0x40, 0x1e, 0xcc, 0xf5, 0x28, 0x57, 0x9c, 0xed,
-       0xf4, 0x94, 0x94, 0xdd, 0xad, 0xc0, 0x97, 0x97, 0x92, 0x3b, 0x8c, 0xbd,
-       0x8e, 0x43, 0x6f, 0x7f, 0xb9, 0x85, 0x77, 0x99, 0xcd, 0x56, 0x16, 0x34,
-       0xde, 0x25, 0xe3, 0x27, 0xa7, 0x64, 0xc2, 0x59, 0xfd, 0x66, 0x94, 0xe1,
-       0xf7, 0x94, 0x45, 0xd4, 0xb4, 0xbe, 0x3d, 0xe6, 0x64, 0xfc, 0x14, 0x70,
-       0x38, 0xac, 0x8d, 0x7b, 0xa1, 0x37, 0xfd, 0xaa, 0x36, 0x2e, 0x29, 0x9f,
-       0xc4, 0xf9, 0xef, 0x01, 0x57, 0x6f, 0x65, 0x0f, 0xe0, 0xca, 0xa8, 0x9f,
-       0x8b, 0xc8, 0x85, 0x17, 0x1c, 0x43, 0xca, 0x36, 0x7c, 0x6b, 0x31, 0xa9,
-       0xeb, 0xbb, 0xba, 0x65, 0xde, 0xe9, 0x37, 0x75, 0xde, 0x3d, 0x26, 0x7c,
-       0xdf, 0x57, 0x56, 0xf6, 0x9d, 0xd4, 0x0d, 0xab, 0x5b, 0x16, 0x9d, 0x8a,
-       0x54, 0x07, 0x38, 0xe6, 0xf9, 0x55, 0xc4, 0xb4, 0x7c, 0x5f, 0x99, 0xd7,
-       0x35, 0x75, 0xb7, 0x5d, 0x76, 0xd5, 0xfd, 0x68, 0xca, 0x94, 0xc3, 0xa0,
-       0x0f, 0xcf, 0x0b, 0xd0, 0xf1, 0x69, 0xe6, 0x78, 0xfe, 0x9d, 0xf1, 0x81,
-       0xe5, 0x22, 0x68, 0x68, 0x97, 0xde, 0x1f, 0xd3, 0xc6, 0x1e, 0xc2, 0x1c,
-       0xc7, 0x69, 0xe8, 0xeb, 0xc3, 0x78, 0x26, 0x6c, 0x12, 0x3d, 0xe5, 0xd0,
-       0x8d, 0xde, 0x04, 0x2d, 0xd0, 0x4b, 0xd6, 0xa5, 0xfb, 0x53, 0x32, 0x7f,
-       0x72, 0xb7, 0x94, 0x16, 0x76, 0x03, 0xff, 0x3f, 0x22, 0xe7, 0xbf, 0x33,
-       0xb8, 0x8b, 0x65, 0xde, 0xcf, 0x7d, 0x5e, 0xdc, 0xa2, 0x6c, 0x63, 0x9a,
-       0xf3, 0xec, 0xf7, 0x61, 0x3d, 0xea, 0x07, 0x47, 0xdd, 0x4f, 0x03, 0x06,
-       0x67, 0xe7, 0x36, 0x7e, 0xfb, 0xeb, 0x84, 0x9f, 0xae, 0xb0, 0x76, 0x40,
-       0x6c, 0x99, 0x1b, 0x2c, 0xd4, 0xd2, 0x66, 0x41, 0x7d, 0x97, 0xc8, 0x88,
-       0x1f, 0x6f, 0x38, 0x17, 0x17, 0x6b, 0x1a, 0xf5, 0x68, 0x8e, 0xef, 0x0e,
-       0xab, 0xfb, 0x1f, 0xf5, 0x7d, 0x4e, 0xde, 0x95, 0x51, 0xe8, 0x58, 0xef,
-       0x74, 0x06, 0x39, 0xf1, 0x7b, 0xc8, 0x27, 0x7f, 0x1e, 0xc8, 0x60, 0x38,
-       0xd0, 0x8d, 0xd6, 0x06, 0x9d, 0xc0, 0x39, 0x3b, 0x38, 0x7b, 0x07, 0x7a,
-       0xe0, 0xe0, 0xac, 0x57, 0xf5, 0x63, 0xb8, 0xc1, 0xe7, 0x6e, 0x92, 0xbf,
-       0x9c, 0x49, 0x67, 0x56, 0xa0, 0x3f, 0x57, 0xc1, 0xeb, 0x0a, 0xea, 0xbc,
-       0x2b, 0x88, 0x23, 0x0b, 0x35, 0x7e, 0x4b, 0xe0, 0xb7, 0x38, 0x8e, 0xb7,
-       0xe1, 0x3c, 0x42, 0x7f, 0xfc, 0x52, 0x60, 0x17, 0x9b, 0xd4, 0x7d, 0xe7,
-       0xfb, 0x38, 0xc3, 0x15, 0xd3, 0xcf, 0x17, 0xfd, 0x35, 0x9b, 0x24, 0xfc,
-       0xde, 0xe7, 0xeb, 0x0f, 0x69, 0xa1, 0xfe, 0x7c, 0xb2, 0xc5, 0xcf, 0xfb,
-       0xf9, 0x0d, 0x8c, 0xf5, 0x0b, 0x9f, 0xef, 0xdf, 0xe2, 0xe3, 0x6a, 0xd4,
-       0xdb, 0x8f, 0x3d, 0xd6, 0x6a, 0x85, 0x3e, 0xf8, 0x6c, 0xd7, 0x93, 0x63,
-       0xf6, 0xcd, 0xf6, 0x76, 0x8f, 0x13, 0xca, 0x87, 0xf2, 0x2b, 0xca, 0x11,
-       0x37, 0x0d, 0x5b, 0xa0, 0xec, 0xac, 0x06, 0xd9, 0x89, 0xfc, 0xb9, 0x23,
-       0xbc, 0xef, 0xc2, 0x3b, 0x25, 0xbb, 0x64, 0x21, 0xd6, 0xca, 0xfb, 0x5a,
-       0xe8, 0xe3, 0xdf, 0xca, 0xc4, 0xac, 0xc8, 0x32, 0xde, 0x2f, 0x39, 0xb4,
-       0xd1, 0x0c, 0xf2, 0xd7, 0x8d, 0x32, 0x3f, 0x87, 0x3a, 0xcb, 0x91, 0x52,
-       0xe1, 0x4e, 0xc6, 0x99, 0xb8, 0x5c, 0x51, 0xf7, 0x7b, 0x22, 0x3b, 0xcf,
-       0x1a, 0x62, 0x9c, 0x45, 0x41, 0x07, 0x99, 0x9f, 0xef, 0x0b, 0xef, 0xfb,
-       0x7c, 0x5b, 0xaf, 0xd6, 0xb0, 0xd6, 0xe9, 0x55, 0xfe, 0xb1, 0x5a, 0x1f,
-       0x97, 0xf2, 0x0c, 0xf7, 0x42, 0x3f, 0x97, 0xc2, 0x3b, 0x5b, 0x26, 0x4f,
-       0x66, 0xe4, 0xfb, 0xfc, 0x5e, 0x93, 0x1d, 0xc5, 0x1e, 0x05, 0xa9, 0x2c,
-       0x63, 0xbe, 0xfe, 0x4f, 0x32, 0xb7, 0x38, 0x2e, 0xf3, 0x33, 0x17, 0x1a,
-       0xee, 0x73, 0x31, 0x9e, 0x6b, 0xac, 0x4f, 0x8b, 0xac, 0xa9, 0x50, 0x7f,
-       0x5a, 0x18, 0xc3, 0x06, 0xea, 0x93, 0xa5, 0x9b, 0xef, 0x1f, 0x1b, 0xeb,
-       0xd2, 0x51, 0x39, 0x8a, 0x33, 0xae, 0x9e, 0xcc, 0xa8, 0xba, 0xa6, 0x25,
-       0x37, 0xfb, 0xf8, 0x87, 0x88, 0x11, 0x63, 0x42, 0x3d, 0xbb, 0x2e, 0x5f,
-       0xb3, 0x8f, 0xca, 0x23, 0x88, 0x1d, 0x47, 0x90, 0x5f, 0xff, 0x36, 0xea,
-       0xba, 0xd4, 0x66, 0x9e, 0x21, 0xe8, 0xb5, 0x58, 0x57, 0x7a, 0x32, 0x6a,
-       0xdf, 0x61, 0xfe, 0x00, 0x92, 0x7d, 0xbf, 0xce, 0xf8, 0xf8, 0xdf, 0x5e,
-       0x1e, 0xf1, 0xee, 0x43, 0x0b, 0x3e, 0x41, 0xc1, 0x69, 0x3e, 0xdc, 0x0c,
-       0xe1, 0xfa, 0xcd, 0x63, 0x84, 0x9b, 0xd3, 0x02, 0x38, 0x0d, 0x70, 0x31,
-       0xb9, 0x68, 0x1b, 0xd0, 0x8d, 0x51, 0xf0, 0x09, 0xdf, 0x3e, 0x18, 0x7e,
-       0x6f, 0xdc, 0x80, 0x98, 0xba, 0xb6, 0xfe, 0x8d, 0x60, 0xfd, 0xf7, 0x83,
-       0xf5, 0x97, 0x56, 0xd7, 0x87, 0x71, 0xf5, 0x13, 0x4f, 0x1a, 0xe8, 0x7a,
-       0xa3, 0xe6, 0xc3, 0x1f, 0x0d, 0xe8, 0xba, 0xb4, 0x4a, 0x57, 0x08, 0x0f,
-       0x79, 0x2a, 0x9e, 0xe9, 0x93, 0xe9, 0x9b, 0x7b, 0x21, 0x47, 0x7e, 0x47,
-       0x86, 0x4d, 0x38, 0xfc, 0x7e, 0x4b, 0x3b, 0xd1, 0x65, 0x25, 0x71, 0x54,
-       0xc6, 0xac, 0xf4, 0xf0, 0xa4, 0xc4, 0xa0, 0xc3, 0xf4, 0x29, 0x31, 0x99,
-       0xa7, 0xaf, 0x41, 0x5f, 0xb6, 0x6f, 0x4d, 0xeb, 0xfb, 0x0d, 0xb4, 0xc6,
-       0x9e, 0x27, 0x8d, 0x3e, 0xad, 0xf1, 0x1d, 0x6b, 0xb4, 0xfa, 0xf0, 0x3e,
-       0xad, 0xef, 0xd7, 0x1a, 0xe0, 0xcf, 0x1a, 0x01, 0xbc, 0xd1, 0x00, 0x4f,
-       0x7d, 0x66, 0x3e, 0x41, 0x7d, 0x26, 0x6d, 0x5f, 0x50, 0xf7, 0x66, 0x1b,
-       0x72, 0xb3, 0x07, 0x3f, 0xbf, 0xc3, 0x93, 0x38, 0xf2, 0x8c, 0x66, 0xbc,
-       0xbb, 0x32, 0xc3, 0x1c, 0x44, 0xef, 0x69, 0x96, 0x9d, 0xd0, 0x59, 0x9e,
-       0x5d, 0xe3, 0x9d, 0xab, 0x27, 0x8f, 0xd8, 0xa4, 0xe5, 0x3f, 0xbd, 0x33,
-       0x89, 0x9d, 0x76, 0x55, 0xfa, 0xcc, 0x66, 0xe1, 0x9d, 0xae, 0xc2, 0x99,
-       0x21, 0x2d, 0xa7, 0xfb, 0x7a, 0xcd, 0xb7, 0xc0, 0xe7, 0xe8, 0x8c, 0x26,
-       0xf3, 0x56, 0x3a, 0x79, 0x1e, 0x38, 0xf6, 0xe0, 0x6c, 0xe6, 0x07, 0x48,
-       0x8f, 0xc8, 0x04, 0xf4, 0x7b, 0x5e, 0xc5, 0x43, 0xea, 0x71, 0x7a, 0xac,
-       0x82, 0x1c, 0xe7, 0xa7, 0x2a, 0xa6, 0x79, 0xde, 0x87, 0x88, 0x6b, 0x63,
-       0xeb, 0x74, 0x4f, 0x3f, 0xeb, 0xeb, 0x9e, 0x7e, 0x16, 0xb5, 0xf1, 0xf1,
-       0xb8, 0xb4, 0x2c, 0xc1, 0x7e, 0x9e, 0xef, 0x52, 0xfa, 0xa7, 0x3f, 0xcf,
-       0x6f, 0x19, 0xf0, 0x73, 0xc7, 0x0d, 0xb1, 0x8e, 0xab, 0x38, 0x00, 0x79,
-       0x17, 0x64, 0xf2, 0x14, 0x7d, 0xa9, 0x25, 0x3b, 0x8e, 0xf3, 0x3c, 0x98,
-       0xcf, 0xcc, 0x0d, 0x8e, 0xc3, 0x46, 0xa6, 0xf8, 0x7d, 0x70, 0xe9, 0x23,
-       0x19, 0xb7, 0x28, 0x07, 0x94, 0xfa, 0x4b, 0xa6, 0xc4, 0x96, 0xe0, 0x13,
-       0x96, 0x92, 0xd2, 0x04, 0xdb, 0xd2, 0xcf, 0x26, 0xb4, 0xea, 0xec, 0x7f,
-       0xc1, 0x1e, 0xf8, 0x4d, 0x20, 0x83, 0x71, 0x52, 0xab, 0xd6, 0x06, 0xd0,
-       0x53, 0xcf, 0x91, 0x46, 0x9d, 0xa5, 0x9e, 0x93, 0x8e, 0xd0, 0x5e, 0xf0,
-       0x7c, 0x36, 0xa3, 0xee, 0x6c, 0x3f, 0xb4, 0xc9, 0xcb, 0xdf, 0x48, 0x61,
-       0x26, 0xfc, 0x1b, 0x10, 0xd9, 0x8c, 0x1c, 0xa6, 0xa3, 0x60, 0xef, 0x18,
-       0xbe, 0x22, 0x9f, 0x96, 0xaf, 0x6d, 0x9f, 0x82, 0x2f, 0xf2, 0xd1, 0xc8,
-       0x17, 0x79, 0x6a, 0x97, 0x26, 0xc5, 0x57, 0xc8, 0x0f, 0x04, 0x0d, 0x7e,
-       0x7a, 0x8e, 0x27, 0x81, 0xff, 0x61, 0xf8, 0x80, 0x6e, 0xf4, 0x0f, 0xa1,
-       0x47, 0x28, 0x3b, 0x4b, 0xde, 0xc9, 0xeb, 0x55, 0xe4, 0x8b, 0x21, 0x9f,
-       0x25, 0x3c, 0xbf, 0x2e, 0x93, 0xb3, 0xde, 0x61, 0xc4, 0x53, 0xde, 0x27,
-       0x77, 0xea, 0x4a, 0x77, 0xd7, 0xf3, 0xfe, 0xba, 0xf8, 0xf2, 0xe1, 0x5d,
-       0x3c, 0x9e, 0x17, 0xd7, 0xcb, 0xa2, 0xd1, 0x77, 0x24, 0x83, 0xbf, 0x7b,
-       0xa1, 0x9f, 0xa0, 0x8c, 0xae, 0x4a, 0x61, 0x96, 0x77, 0x5a, 0x3e, 0xbe,
-       0xd2, 0xea, 0xdf, 0xbe, 0x34, 0xae, 0x19, 0x00, 0x5c, 0x37, 0xe0, 0x48,
-       0xd7, 0x0a, 0xe5, 0x07, 0x9f, 0xb3, 0xbd, 0xc1, 0xd7, 0x34, 0xae, 0xcb,
-       0xca, 0x33, 0x88, 0xff, 0x6f, 0xd8, 0x37, 0xc9, 0xb5, 0xc4, 0x1c, 0x68,
-       0xbe, 0xbe, 0x0f, 0x36, 0xd9, 0x04, 0x5f, 0x66, 0xca, 0x95, 0x5a, 0xb3,
-       0xcc, 0x23, 0xcf, 0x59, 0x58, 0xa4, 0x2f, 0x24, 0xed, 0xad, 0x98, 0xf7,
-       0xfd, 0x17, 0x7d, 0xed, 0x95, 0x1a, 0xe2, 0x2b, 0x6c, 0xfb, 0x4a, 0x2d,
-       0x81, 0xbe, 0x1b, 0xbd, 0x85, 0x3e, 0x85, 0x3e, 0x83, 0x7e, 0x00, 0xfd,
-       0x00, 0x7a, 0x0b, 0x6b, 0x93, 0xe8, 0xc3, 0x5a, 0x82, 0xb8, 0xd6, 0xf8,
-       0xae, 0xaa, 0xfd, 0xf8, 0xdd, 0x90, 0xb1, 0xcc, 0xb0, 0x47, 0x50, 0x63,
-       0x17, 0x06, 0xc2, 0xbf, 0xb9, 0xb9, 0xe1, 0x99, 0x16, 0x6b, 0xf7, 0x8a,
-       0xb6, 0x47, 0x7d, 0x5f, 0x98, 0x41, 0x5c, 0x78, 0x6e, 0xab, 0xb4, 0x5a,
-       0xe6, 0x3d, 0xea, 0xee, 0x68, 0x16, 0x63, 0x3e, 0xa3, 0x3e, 0x4e, 0x4c,
-       0x21, 0x3e, 0xd1, 0x7f, 0xfe, 0x6f, 0xe7, 0xd6, 0x1b, 0xdb, 0xc6, 0x59,
-       0xc6, 0x1f, 0x9f, 0x9d, 0x34, 0xe9, 0x9a, 0xf6, 0x92, 0x38, 0xa9, 0x93,
-       0x85, 0xcd, 0x8e, 0x2f, 0xad, 0x45, 0xd2, 0x71, 0xed, 0x2c, 0x16, 0xa6,
-       0x8c, 0x78, 0x76, 0x92, 0x76, 0x30, 0xa6, 0xb4, 0x74, 0xd3, 0x84, 0x10,
-       0x58, 0xc9, 0xba, 0x75, 0x13, 0xd2, 0x28, 0x30, 0x34, 0x89, 0xa2, 0x18,
-       0x27, 0x61, 0x19, 0x18, 0xc7, 0x0b, 0x81, 0x4e, 0xf0, 0xc5, 0x38, 0xd1,
-       0x06, 0x22, 0x4a, 0x3a, 0x8d, 0x0f, 0x08, 0x6d, 0x74, 0xb8, 0x83, 0xef,
-       0xfc, 0x11, 0x62, 0x12, 0x1f, 0xaa, 0xa8, 0x63, 0x20, 0x21, 0xe0, 0x23,
-       0xd2, 0x98, 0x8e, 0xdf, 0xef, 0x79, 0xef, 0x12, 0xc7, 0x64, 0x54, 0xf0,
-       0xc1, 0x3a, 0xbf, 0x77, 0xf7, 0xbe, 0xf7, 0xde, 0xfb, 0x3c, 0xef, 0xef,
-       0xf9, 0x3d, 0x7f, 0xce, 0x43, 0x9f, 0x19, 0xe0, 0xf8, 0x11, 0x61, 0x0c,
-       0x36, 0x9b, 0xc6, 0xff, 0xea, 0xc5, 0x1e, 0x63, 0x4b, 0xc1, 0xdb, 0x77,
-       0xb8, 0x61, 0x60, 0xab, 0x46, 0xd0, 0x67, 0x3f, 0x9f, 0x00, 0x36, 0xb0,
-       0x92, 0xa8, 0x54, 0xb1, 0x07, 0x7f, 0xed, 0xce, 0x29, 0xa7, 0xa3, 0x2c,
-       0x16, 0xc1, 0x4d, 0x73, 0x65, 0x72, 0x97, 0xcb, 0xf0, 0x47, 0xe0, 0xcb,
-       0x45, 0xe9, 0xbb, 0xd3, 0x16, 0x90, 0x83, 0xfe, 0x12, 0x73, 0xa3, 0x1d,
-       0xf8, 0x26, 0x9e, 0x87, 0xf7, 0x5a, 0xf3, 0xb0, 0x66, 0xa7, 0xc1, 0x05,
-       0x3d, 0x2f, 0xe2, 0x4c, 0x4a, 0xfc, 0x1c, 0x31, 0x47, 0xd0, 0xdf, 0xc4,
-       0xb2, 0xc8, 0xab, 0x32, 0xd3, 0x9a, 0x83, 0x84, 0x72, 0xfd, 0x0e, 0x7d,
-       0x7b, 0xc4, 0xc4, 0xa7, 0x18, 0x7f, 0x16, 0x99, 0x2c, 0x1b, 0x2e, 0x0b,
-       0xbf, 0xac, 0x61, 0xbc, 0xbb, 0xfd, 0xf1, 0x78, 0xdd, 0xd2, 0x71, 0x6a,
-       0xd2, 0x6b, 0x62, 0xbb, 0x63, 0x23, 0xb0, 0x11, 0x51, 0xa9, 0x43, 0x2e,
-       0xd7, 0x21, 0x93, 0x37, 0x4b, 0xd4, 0xf5, 0x61, 0xe8, 0x7d, 0x0b, 0xf3,
-       0xb3, 0x18, 0x6b, 0x44, 0x9f, 0x5d, 0x2f, 0x01, 0x3b, 0x6d, 0xf5, 0x4f,
-       0x7b, 0xc9, 0x0b, 0x69, 0x07, 0xcd, 0x38, 0x03, 0xe6, 0x3e, 0x09, 0xae,
-       0x75, 0xeb, 0x7c, 0x6a, 0x1a, 0x03, 0xe3, 0x3a, 0x41, 0x07, 0x4b, 0xdd,
-       0xfe, 0x3d, 0x5e, 0x8f, 0xa9, 0x77, 0xe2, 0x39, 0xbe, 0xc7, 0x88, 0x64,
-       0xcb, 0x41, 0xbf, 0x4e, 0xf4, 0x6b, 0x6f, 0x18, 0xeb, 0x68, 0xd3, 0x3b,
-       0x58, 0xfe, 0x3b, 0xf0, 0x7a, 0x33, 0xdf, 0x4f, 0xd8, 0x05, 0x09, 0x38,
-       0x3f, 0xed, 0x2f, 0x65, 0x93, 0xd6, 0xfc, 0xb6, 0x91, 0xcf, 0x80, 0xef,
-       0x03, 0x24, 0x96, 0x0a, 0x02, 0xbe, 0x18, 0xa5, 0x8c, 0xd2, 0xd8, 0xd7,
-       0x3f, 0x89, 0xca, 0x61, 0x57, 0x2a, 0xa5, 0x03, 0x62, 0x75, 0xb5, 0x68,
-       0x8d, 0x4e, 0xdc, 0x6a, 0x7c, 0xe6, 0x67, 0xfd, 0x67, 0xc2, 0xf7, 0x5e,
-       0x69, 0xd7, 0xb8, 0x34, 0xec, 0x0c, 0xee, 0x39, 0xd4, 0x34, 0xb7, 0x87,
-       0xfd, 0xfb, 0x78, 0xdd, 0x91, 0x02, 0xf8, 0x67, 0xae, 0x0c, 0x26, 0x0f,
-       0xfc, 0xb6, 0xc6, 0x98, 0xe3, 0x61, 0x0c, 0x6f, 0x38, 0x3e, 0x8f, 0x39,
-       0x16, 0xec, 0x31, 0xc6, 0xcd, 0x30, 0x46, 0x5f, 0xd3, 0x18, 0x13, 0xfe,
-       0x18, 0x59, 0x29, 0x5e, 0x99, 0xc0, 0x5e, 0x1b, 0x83, 0x7d, 0x4f, 0xda,
-       0xa7, 0xe5, 0x23, 0x22, 0x9d, 0x38, 0xf7, 0x72, 0x0a, 0x72, 0xf2, 0xbc,
-       0x49, 0x77, 0x1a, 0xf3, 0x7e, 0x0d, 0xb6, 0x35, 0xe0, 0x3c, 0xc5, 0x58,
-       0x18, 0x36, 0xec, 0xf3, 0x2e, 0xe3, 0x62, 0x05, 0x30, 0xb2, 0x84, 0x6d,
-       0x85, 0x86, 0x53, 0x35, 0xf0, 0xba, 0x2a, 0x2c, 0x69, 0xd1, 0xe1, 0x7b,
-       0x76, 0x48, 0xd1, 0x0e, 0x8d, 0x87, 0xc1, 0x6b, 0xb2, 0x65, 0xee, 0x23,
-       0x19, 0x0a, 0x8f, 0xb5, 0x82, 0x8b, 0x7a, 0xf2, 0x36, 0xa0, 0xa6, 0x58,
-       0x5a, 0x92, 0xfa, 0x86, 0x8d, 0xe3, 0x05, 0xc8, 0xe1, 0x45, 0xfc, 0x7f,
-       0x3e, 0xaa, 0x75, 0x4a, 0xe0, 0xeb, 0x8b, 0x78, 0x1f, 0xf2, 0x19, 0xf2,
-       0x88, 0x1a, 0xec, 0xad, 0x05, 0x5b, 0x03, 0x5e, 0x35, 0x4a, 0xde, 0xf5,
-       0xdc, 0xda, 0x4d, 0x79, 0x73, 0x35, 0x81, 0x67, 0xd1, 0x2e, 0x9f, 0x21,
-       0x1e, 0xd8, 0x0b, 0x69, 0x9c, 0x5b, 0x37, 0xdc, 0xb7, 0xb8, 0x85, 0x0d,
-       0xd4, 0x05, 0x8e, 0x00, 0x8e, 0xbd, 0x0d, 0x0c, 0x2c, 0xe2, 0xfe, 0xfa,
-       0x6a, 0x44, 0xd6, 0x1c, 0xf2, 0x22, 0x89, 0x67, 0x71, 0x6f, 0x7d, 0x7d,
-       0xb1, 0xd7, 0xe4, 0x51, 0xd8, 0x7f, 0x42, 0x0a, 0xe0, 0x75, 0xa7, 0xb5,
-       0xef, 0xad, 0xe4, 0xcc, 0x39, 0x35, 0xfa, 0x77, 0xb3, 0x52, 0xe7, 0x7e,
-       0xd2, 0xdc, 0x03, 0xb9, 0xc1, 0x65, 0xe8, 0x2c, 0x39, 0x3b, 0xfd, 0x00,
-       0xfc, 0xdf, 0xe0, 0x75, 0xbe, 0x3b, 0x8e, 0xd5, 0x24, 0xd6, 0x86, 0xfb,
-       0xbe, 0x10, 0x9a, 0x3e, 0x0e, 0x3b, 0x6a, 0x71, 0xaf, 0x17, 0x15, 0x0b,
-       0x8a, 0xcb, 0xb3, 0xb0, 0x29, 0xac, 0xb5, 0xe8, 0x83, 0x2e, 0x3e, 0x08,
-       0x59, 0xa6, 0x71, 0x5f, 0x93, 0x2d, 0xd9, 0x2c, 0x2a, 0x2f, 0xb3, 0x5e,
-       0x32, 0xb8, 0x66, 0xd5, 0xc0, 0xd1, 0xb0, 0x7f, 0xac, 0x4d, 0xe8, 0x16,
-       0xf6, 0x90, 0xb5, 0x19, 0xc5, 0x11, 0x78, 0xbc, 0x09, 0xbf, 0x02, 0xf8,
-       0x66, 0x6d, 0xc2, 0x27, 0x00, 0xbe, 0x59, 0x9b, 0x29, 0x1c, 0x81, 0xf1,
-       0x9b, 0x01, 0xae, 0x71, 0xfc, 0x94, 0xe6, 0xe1, 0x0d, 0xbe, 0x90, 0x4b,
-       0x12, 0x5f, 0x02, 0x3e, 0x69, 0x74, 0xe1, 0xeb, 0xcb, 0xc4, 0x10, 0xea,
-       0x75, 0x12, 0xb8, 0x45, 0x5d, 0x30, 0x5c, 0x72, 0xbd, 0x62, 0xd6, 0x6c,
-       0x7e, 0xeb, 0x9a, 0xda, 0x88, 0x29, 0x71, 0xa0, 0x63, 0x5c, 0x3b, 0x5c,
-       0x53, 0x1b, 0xf0, 0xba, 0x64, 0xf4, 0xc8, 0x35, 0xfb, 0xb9, 0x64, 0xd6,
-       0x53, 0xf2, 0x0d, 0xc5, 0xad, 0x00, 0xb3, 0xc8, 0x21, 0x63, 0x58, 0x3f,
-       0x47, 0x9e, 0xff, 0xf6, 0x4d, 0xc9, 0x7e, 0x87, 0xb8, 0x35, 0x1c, 0x6b,
-       0x0f, 0x11, 0xab, 0x3c, 0xd9, 0x80, 0x6d, 0x3a, 0xed, 0x26, 0x1e, 0x65,
-       0xfd, 0x66, 0x1e, 0xba, 0xd2, 0x7a, 0x32, 0xe1, 0xc6, 0x43, 0xc9, 0x47,
-       0xdb, 0x43, 0xb4, 0x8d, 0xc3, 0xf6, 0x45, 0x39, 0xe5, 0xc7, 0xa3, 0x0e,
-       0xc8, 0x45, 0xe5, 0xfe, 0x2c, 0xcf, 0x78, 0x57, 0x73, 0x23, 0xef, 0xa4,
-       0xb9, 0xd6, 0x68, 0x6f, 0x6a, 0xdc, 0xa8, 0xed, 0x9d, 0x74, 0x8b, 0x14,
-       0x7b, 0x3c, 0xef, 0xc2, 0xc9, 0xb7, 0xa2, 0x26, 0xce, 0xd5, 0x7f, 0xd4,
-       0x60, 0x01, 0x00, 0x4c, 0xdb, 0x9f, 0xc0, 0x91, 0xba, 0x4d, 0x7b, 0x4b,
-       0xfb, 0x48, 0xb9, 0xe1, 0xb8, 0xce, 0xff, 0xb4, 0xbd, 0x4b, 0xb0, 0xbd,
-       0xb4, 0x97, 0x47, 0x24, 0xc7, 0x9c, 0x9c, 0xa5, 0xe7, 0x0b, 0x86, 0x4b,
-       0xfb, 0xf7, 0x55, 0xf2, 0x32, 0x5f, 0x21, 0x87, 0xaa, 0xc3, 0x96, 0xb1,
-       0xf6, 0x91, 0x36, 0x6d, 0x0e, 0xf6, 0x9c, 0xb9, 0x5a, 0x5c, 0xab, 0xb2,
-       0x5f, 0x22, 0x15, 0xb7, 0xf0, 0xce, 0x3b, 0x3a, 0x55, 0x82, 0xfe, 0x51,
-       0x9f, 0x20, 0xf7, 0x17, 0xe8, 0x5b, 0x0c, 0xa9, 0x8e, 0x64, 0x7f, 0xc0,
-       0xb5, 0xf7, 0xbc, 0x33, 0x2e, 0xd4, 0xb0, 0xd3, 0xec, 0x01, 0xf2, 0x80,
-       0x8f, 0x63, 0x5d, 0xa6, 0xdc, 0x9b, 0xb4, 0xdd, 0x7f, 0xb7, 0x9c, 0xe1,
-       0xd4, 0xc5, 0x10, 0xf7, 0x36, 0xda, 0xeb, 0x61, 0xa9, 0x46, 0xf9, 0xfe,
-       0x58, 0xaf, 0x10, 0xf7, 0xce, 0x7e, 0xeb, 0xd0, 0xbc, 0x06, 0x59, 0xac,
-       0x01, 0xd7, 0x32, 0x58, 0x03, 0xfe, 0x9f, 0x80, 0xbc, 0xe8, 0x33, 0x10,
-       0x87, 0xf1, 0x7f, 0xcb, 0x3c, 0x9b, 0x75, 0x99, 0xbb, 0x73, 0xe6, 0x7c,
-       0x29, 0xd3, 0xd7, 0x25, 0xa7, 0xf2, 0x5d, 0x92, 0x5c, 0xe5, 0x75, 0x99,
-       0xac, 0x2c, 0xc9, 0x03, 0xce, 0x38, 0xde, 0xf7, 0x86, 0x37, 0xeb, 0xa8,
-       0xaf, 0x32, 0x3a, 0x83, 0x67, 0xcf, 0x8e, 0xf4, 0xc9, 0x9f, 0x5d, 0x47,
-       0x16, 0xd7, 0x6c, 0xc9, 0xdb, 0x69, 0x79, 0x5e, 0x63, 0xf9, 0xf4, 0x4f,
-       0x42, 0xe0, 0xa4, 0xcc, 0xc9, 0xb7, 0x89, 0xf4, 0x38, 0xb1, 0x6d, 0x21,
-       0xa7, 0x6c, 0x81, 0xac, 0xe3, 0x86, 0x37, 0xdb, 0xe6, 0xfa, 0xb1, 0x17,
-       0xc0, 0xdd, 0xdd, 0xb7, 0x7a, 0x83, 0xf8, 0xb0, 0xe1, 0xb7, 0x7f, 0xf0,
-       0xf3, 0x62, 0x69, 0xa9, 0x30, 0x07, 0xa7, 0x38, 0xeb, 0x40, 0x97, 0x98,
-       0xc3, 0x8f, 0x69, 0xdc, 0xa1, 0xa5, 0x4c, 0x8c, 0xba, 0x0a, 0x8c, 0x1a,
-       0x25, 0x76, 0x8d, 0xaf, 0xb9, 0x8c, 0x0b, 0x44, 0xe5, 0xb7, 0x25, 0xe2,
-       0x70, 0x5c, 0x7e, 0x53, 0x7a, 0x16, 0xf3, 0x49, 0x54, 0x19, 0xcf, 0xbc,
-       0x5e, 0x29, 0x90, 0x27, 0x29, 0x9f, 0xcf, 0xba, 0x5f, 0x54, 0x3b, 0x10,
-       0xb7, 0x8a, 0xdd, 0x2d, 0x8a, 0x37, 0x4f, 0x6b, 0x1e, 0x36, 0x6e, 0x0d,
-       0xc8, 0xf5, 0x55, 0xbe, 0x6f, 0x0a, 0x63, 0x47, 0x43, 0xb9, 0x75, 0xda,
-       0xa5, 0x64, 0x6c, 0xc6, 0x3a, 0x20, 0x17, 0xa2, 0x8c, 0x53, 0x8f, 0x11,
-       0x9f, 0x61, 0x0b, 0x87, 0xed, 0x19, 0xd6, 0x38, 0xa9, 0xfd, 0x89, 0x35,
-       0xe1, 0xec, 0xd3, 0x3e, 0xce, 0xf2, 0xda, 0x18, 0x64, 0x4a, 0x5b, 0x94,
-       0xa8, 0x4c, 0x58, 0x49, 0xd8, 0x3c, 0xfc, 0xdf, 0xe0, 0xf8, 0x71, 0xf9,
-       0xc2, 0xc6, 0x45, 0xf0, 0xef, 0x61, 0xfb, 0x1c, 0xed, 0xaa, 0x3d, 0x8a,
-       0x7b, 0xf9, 0xfc, 0x0f, 0x34, 0x8d, 0xf5, 0x69, 0x7f, 0x2c, 0x5e, 0xc7,
-       0x3e, 0x2f, 0x3b, 0x32, 0x5b, 0x62, 0x2e, 0xda, 0xcc, 0x75, 0xef, 0xbd,
-       0x67, 0x77, 0x9e, 0xbb, 0xb0, 0x4c, 0x7e, 0x63, 0xea, 0xdc, 0x8a, 0xe0,
-       0x42, 0x9f, 0xec, 0xe2, 0x33, 0xf9, 0xbc, 0xc3, 0x92, 0x7d, 0x04, 0xf8,
-       0x52, 0xe6, 0xaf, 0xe0, 0xd7, 0xde, 0xc2, 0x5f, 0x89, 0xf6, 0xef, 0x63,
-       0x9b, 0xee, 0xf3, 0xc7, 0xfb, 0x3d, 0x74, 0x28, 0xda, 0x70, 0x3f, 0x63,
-       0x2a, 0x6c, 0xc7, 0xa5, 0xb0, 0xc1, 0xa3, 0xe7, 0x75, 0x39, 0xad, 0x72,
-       0xce, 0xbe, 0xbd, 0x69, 0x8c, 0x13, 0x38, 0x67, 0x38, 0x41, 0xb8, 0x1c,
-       0xf2, 0xb9, 0xc5, 0x9d, 0xe4, 0x4d, 0xfe, 0xff, 0x36, 0x8d, 0xc5, 0xc4,
-       0xad, 0xfe, 0xa6, 0xf7, 0xb8, 0x73, 0xc7, 0x0e, 0xc7, 0x2d, 0x62, 0xe7,
-       0x8f, 0x71, 0x8d, 0x3a, 0xe4, 0x29, 0x8f, 0x8f, 0x80, 0xe7, 0xe7, 0x80,
-       0x05, 0x51, 0xe7, 0xb6, 0x18, 0x8b, 0x4d, 0xae, 0x2d, 0x9b, 0x7a, 0x54,
-       0x72, 0xe0, 0x6b, 0xfb, 0xe6, 0x6a, 0x53, 0xd0, 0x65, 0x8c, 0x7f, 0x90,
-       0xe3, 0x8f, 0xf8, 0xeb, 0x9c, 0x70, 0x0b, 0xd6, 0x87, 0x65, 0x66, 0xd5,
-       0xe8, 0x5f, 0xd6, 0x81, 0xee, 0x1d, 0x46, 0x7b, 0x9d, 0x36, 0xe1, 0xfd,
-       0xc6, 0x09, 0x6c, 0x43, 0x4a, 0x6d, 0xc3, 0xfc, 0x32, 0xf5, 0x93, 0x7a,
-       0x19, 0xe8, 0x63, 0x80, 0x79, 0xd4, 0x51, 0xe2, 0x6c, 0x5a, 0x5e, 0x58,
-       0xe6, 0xda, 0x64, 0x34, 0xa7, 0x35, 0xb4, 0x32, 0xab, 0xf5, 0x3d, 0x83,
-       0xe5, 0xc4, 0x8b, 0x05, 0x19, 0x97, 0xab, 0x2e, 0xd7, 0x2c, 0x51, 0xcd,
-       0x87, 0x3b, 0x1a, 0xde, 0xff, 0x9c, 0xbf, 0x66, 0x29, 0xd5, 0xab, 0xc1,
-       0xf2, 0xe5, 0x1d, 0x79, 0xe7, 0xad, 0xc3, 0x4d, 0xeb, 0x14, 0x70, 0xb8,
-       0xb8, 0x90, 0x3f, 0x44, 0xba, 0xd8, 0x87, 0xcf, 0x25, 0xe7, 0xe3, 0xb3,
-       0x68, 0x5b, 0xef, 0x60, 0x3d, 0x83, 0xd0, 0x8f, 0x8b, 0x3c, 0x62, 0xb8,
-       0x45, 0xde, 0x7a, 0x18, 0xeb, 0x76, 0x50, 0xeb, 0x28, 0xe7, 0xbf, 0xfb,
-       0x1e, 0xfa, 0xe7, 0x7d, 0x7e, 0x9e, 0xc6, 0x78, 0x7c, 0x77, 0xee, 0xa9,
-       0xd2, 0x49, 0xea, 0xe6, 0xa4, 0xe6, 0x03, 0xd9, 0x87, 0xfb, 0x96, 0x6b,
-       0x44, 0x39, 0x5c, 0x8e, 0x19, 0x7b, 0x7a, 0xa2, 0x69, 0x3e, 0x49, 0x7f,
-       0x3e, 0xc1, 0xf5, 0x16, 0x89, 0xf4, 0xa6, 0xb4, 0x96, 0x24, 0x59, 0xa6,
-       0x8f, 0x02, 0x5b, 0x35, 0xcd, 0xb1, 0x6e, 0x8d, 0xbd, 0xf9, 0xff, 0x13,
-       0x7b, 0xf3, 0x56, 0x49, 0xe7, 0xd8, 0xe2, 0xfc, 0x2f, 0x72, 0x6c, 0xac,
-       0xa7, 0x37, 0x72, 0x7b, 0x6e, 0x99, 0xf6, 0x29, 0xa3, 0xb1, 0xe3, 0x3f,
-       0x95, 0xb8, 0x96, 0x9c, 0xe3, 0x55, 0xce, 0x71, 0xbc, 0xae, 0xb5, 0x74,
-       0x0f, 0xe9, 0x9e, 0x5d, 0x5c, 0x26, 0xa6, 0x74, 0xc8, 0x5a, 0x25, 0xc0,
-       0x95, 0x07, 0x7c, 0x4e, 0x5b, 0xec, 0x6e, 0xc5, 0x3e, 0x39, 0xe3, 0x5a,
-       0x5a, 0x47, 0x68, 0x3d, 0xcc, 0x73, 0x03, 0x52, 0x5b, 0xa5, 0x9d, 0x4d,
-       0xc2, 0xaf, 0x88, 0x86, 0x6a, 0xeb, 0xcc, 0x45, 0xb2, 0x4e, 0x64, 0x5c,
-       0x98, 0xbb, 0xcf, 0xd9, 0xf3, 0xd8, 0x5f, 0x31, 0xf8, 0xfd, 0xe4, 0xf0,
-       0x8c, 0x8f, 0x35, 0xcb, 0x7b, 0x74, 0x87, 0x03, 0xee, 0x95, 0xf3, 0x2f,
-       0xb0, 0xde, 0xd4, 0x6b, 0xc7, 0xbe, 0x0e, 0x3b, 0x99, 0x8b, 0xf2, 0xff,
-       0x0c, 0xb8, 0x3f, 0x7d, 0x8d, 0xb8, 0xfa, 0x1a, 0xb5, 0x6a, 0x46, 0x96,
-       0x54, 0xf7, 0x3b, 0xfc, 0x58, 0x52, 0x87, 0xea, 0x07, 0x75, 0x2c, 0xaf,
-       0x9c, 0x7b, 0x54, 0x71, 0xaa, 0x58, 0x1a, 0x36, 0x75, 0x26, 0x76, 0xcc,
-       0xaf, 0x27, 0x6f, 0x7c, 0x7e, 0xcc, 0x7f, 0xfe, 0x5f, 0x7c, 0xf9, 0xda,
-       0x8a, 0x31, 0xba, 0xd6, 0x56, 0x52, 0x7d, 0xcb, 0xf9, 0x65, 0xea, 0x07,
-       0xf5, 0x84, 0x38, 0x17, 0xdc, 0x17, 0xc8, 0x24, 0x68, 0xf3, 0x7e, 0xea,
-       0x7c, 0x63, 0x4d, 0x41, 0xb0, 0x3f, 0x83, 0x73, 0x81, 0x8c, 0x78, 0xad,
-       0xd1, 0x0e, 0x70, 0xaf, 0xc5, 0x21, 0xa7, 0xdd, 0xfd, 0xd6, 0x55, 0xde,
-       0x95, 0x4d, 0xf6, 0x14, 0xe7, 0x7f, 0x99, 0x71, 0x5c, 0xec, 0xb1, 0xfd,
-       0xe4, 0xf3, 0x65, 0x95, 0x4f, 0x1e, 0xf2, 0xe9, 0x52, 0xdc, 0xa7, 0x8f,
-       0x77, 0xc9, 0xd7, 0xb9, 0x0e, 0xac, 0x19, 0xe3, 0xb2, 0xc0, 0xb7, 0xf3,
-       0xc4, 0xf9, 0xbe, 0x3e, 0xe2, 0x0b, 0x63, 0x8a, 0x99, 0xe9, 0x43, 0xc0,
-       0x30, 0xb6, 0x8f, 0x2b, 0x07, 0x31, 0x3e, 0x56, 0x5c, 0x63, 0x8b, 0x61,
-       0x60, 0x72, 0xad, 0x04, 0x7e, 0xc6, 0xba, 0xaf, 0x3d, 0xf2, 0x7a, 0xca,
-       0x5f, 0xaf, 0x89, 0x3e, 0xca, 0x87, 0xfb, 0x80, 0x58, 0xd9, 0x89, 0xf1,
-       0xce, 0x46, 0x53, 0xd0, 0xb1, 0x71, 0x9c, 0x1f, 0x52, 0x1f, 0x22, 0x8c,
-       0x7d, 0xbe, 0x5d, 0xea, 0xf5, 0xfd, 0x36, 0x07, 0x6d, 0xf8, 0xaa, 0xa5,
-       0x2e, 0xfa, 0x11, 0x1a, 0x47, 0x6c, 0x2d, 0xc3, 0x67, 0x05, 0x76, 0xd7,
-       0xd5, 0x06, 0x8d, 0xe0, 0xfa, 0x6d, 0xac, 0x89, 0xd3, 0xda, 0xe0, 0x6d,
-       0x95, 0x19, 0x7d, 0xcd, 0x63, 0xba, 0xa6, 0xb5, 0x52, 0x22, 0xf6, 0xb8,
-       0xf8, 0xe7, 0xa6, 0xf9, 0xdc, 0xc1, 0x86, 0x79, 0x4d, 0xca, 0xd9, 0x1d,
-       0x1b, 0x41, 0xdf, 0x19, 0xbc, 0xbd, 0x62, 0x6c, 0x40, 0xb1, 0x9a, 0xd2,
-       0xfa, 0xa5, 0xf0, 0xd8, 0x06, 0xd6, 0x92, 0x3c, 0xf4, 0x06, 0xb8, 0xf7,
-       0x08, 0xd6, 0x90, 0x5c, 0xdb, 0x9b, 0x5b, 0x70, 0x33, 0xcc, 0x85, 0xc1,
-       0x86, 0xcd, 0x49, 0x0e, 0xbe, 0x40, 0x2e, 0x7c, 0x98, 0x31, 0x64, 0xf0,
-       0xc1, 0x82, 0x1f, 0x6f, 0x1c, 0x61, 0x9c, 0x54, 0x56, 0xd6, 0x39, 0x77,
-       0xee, 0x6f, 0xe3, 0x6f, 0xd7, 0x4a, 0x9c, 0xaf, 0x89, 0x3d, 0xb0, 0x6d,
-       0x95, 0x5d, 0x1c, 0xb9, 0x16, 0x69, 0x1c, 0xef, 0xc5, 0x9e, 0xe0, 0xbd,
-       0x38, 0xae, 0xdf, 0x90, 0x5f, 0xad, 0x06, 0xf6, 0x3c, 0x24, 0x6f, 0x3a,
-       0xde, 0xdc, 0xbc, 0xdb, 0xcd, 0x35, 0x70, 0x0b, 0xcc, 0x65, 0x3b, 0x8e,
-       0x5b, 0x14, 0xcf, 0xab, 0xbb, 0xf5, 0x6e, 0x4b, 0x65, 0x49, 0x0c, 0xf8,
-       0x1a, 0xd6, 0xf0, 0x8d, 0xbb, 0x2d, 0x31, 0xf2, 0xa3, 0x6c, 0xae, 0xfd,
-       0x57, 0xfc, 0x0f, 0x30, 0x90, 0xfa, 0x48, 0xbd, 0xbc, 0x21, 0x53, 0x8a,
-       0xf9, 0xfb, 0xf5, 0x6b, 0xc4, 0x89, 0x80, 0xd3, 0x12, 0xd3, 0xa9, 0x8b,
-       0x31, 0xf5, 0x09, 0x8e, 0x95, 0x9b, 0x71, 0xe1, 0x33, 0x7e, 0x0e, 0x61,
-       0x3f, 0xdd, 0x7b, 0xd4, 0xc7, 0x86, 0x31, 0xe5, 0xcb, 0x19, 0x9b, 0x18,
-       0xc1, 0xf9, 0x1c, 0x94, 0xd9, 0x2b, 0x8d, 0x38, 0x4c, 0x5f, 0xcf, 0xe0,
-       0x87, 0x7e, 0xe3, 0xa1, 0xfc, 0xd7, 0x92, 0xc1, 0x15, 0xf2, 0x25, 0x07,
-       0x58, 0xda, 0x23, 0xf9, 0xe9, 0xb0, 0x24, 0x57, 0x7e, 0xd6, 0x67, 0xf8,
-       0x2d, 0xf5, 0x0f, 0xfb, 0x4d, 0xcf, 0xb1, 0x5d, 0xc7, 0xf9, 0x23, 0xc2,
-       0x67, 0x1b, 0x7d, 0xc6, 0x7e, 0x3e, 0x1f, 0x5c, 0xb3, 0x9b, 0x74, 0xf4,
-       0x5e, 0x5f, 0x47, 0x79, 0xdd, 0x32, 0xb9, 0x0e, 0xdc, 0x3b, 0xb8, 0xc2,
-       0x39, 0x9a, 0x7e, 0x83, 0x2b, 0xc6, 0x47, 0xdf, 0xdb, 0x6f, 0x64, 0xa7,
-       0x1f, 0xae, 0x83, 0xef, 0x9a, 0xb1, 0xa7, 0x46, 0xc1, 0xe3, 0x46, 0x58,
-       0x83, 0x44, 0x9b, 0x3d, 0xe4, 0x4e, 0x09, 0xf5, 0x3d, 0xe1, 0xeb, 0x1c,
-       0xf1, 0xa6, 0xcb, 0xc7, 0x9b, 0x5d, 0x1b, 0x93, 0x33, 0x35, 0x27, 0x8c,
-       0x83, 0x34, 0xd8, 0x18, 0xe9, 0xff, 0x4f, 0x1b, 0x73, 0xc4, 0x1f, 0x27,
-       0xb8, 0x16, 0xe0, 0x4a, 0xd0, 0x0e, 0x70, 0xa5, 0x99, 0xc7, 0x06, 0xb2,
-       0x6f, 0x3c, 0xdf, 0xe8, 0xe7, 0x65, 0x7c, 0x7f, 0xde, 0xd2, 0xfd, 0xf3,
-       0xca, 0x8e, 0x1f, 0x4f, 0x19, 0x27, 0xa0, 0x7a, 0x25, 0xec, 0xed, 0xf7,
-       0xd4, 0x6f, 0x5e, 0xbc, 0x32, 0xa1, 0xb1, 0x9c, 0x9a, 0xca, 0xfa, 0xab,
-       0x58, 0x9f, 0x33, 0xd8, 0x47, 0x0f, 0x46, 0x77, 0xeb, 0x86, 0x56, 0x9f,
-       0xc9, 0xfa, 0xbc, 0x25, 0x23, 0x5d, 0x98, 0x5f, 0x5a, 0xeb, 0xb0, 0xda,
-       0x9d, 0xaf, 0xc8, 0x03, 0x66, 0xee, 0x6d, 0x6d, 0x63, 0xeb, 0xcf, 0xb4,
-       0x7d, 0x2b, 0xd0, 0x73, 0xea, 0xcf, 0xea, 0x33, 0xb3, 0x15, 0x6f, 0x3c,
-       0x72, 0x72, 0xd8, 0x2e, 0x0a, 0x6b, 0xbd, 0xc7, 0xe5, 0x09, 0x97, 0xd7,
-       0x7f, 0x88, 0xeb, 0xd3, 0xf4, 0x21, 0x13, 0x11, 0xfd, 0xfe, 0x20, 0x11,
-       0x7b, 0x0c, 0x7b, 0x6f, 0x46, 0xbf, 0xf7, 0x38, 0xa4, 0x35, 0xe2, 0x35,
-       0x21, 0x97, 0x62, 0x8d, 0xc1, 0xb3, 0xf2, 0xb8, 0x3b, 0xe4, 0xd6, 0xc5,
-       0x70, 0xdc, 0x19, 0xcd, 0xf7, 0x1c, 0x90, 0xc7, 0xdc, 0x48, 0x5b, 0x76,
-       0xcb, 0xe8, 0xfc, 0x44, 0x38, 0xd3, 0xbe, 0xe0, 0x44, 0xdb, 0xa6, 0xb6,
-       0xb0, 0xa7, 0xb7, 0x80, 0xf7, 0x5b, 0xb1, 0x50, 0x6e, 0x83, 0xef, 0x1e,
-       0x36, 0x35, 0x1d, 0xea, 0x5f, 0x11, 0x43, 0xee, 0x93, 0x6d, 0xfb, 0xb8,
-       0x6c, 0xa7, 0xf8, 0x4d, 0xd6, 0x29, 0xb4, 0x07, 0x35, 0xe7, 0xb2, 0x0d,
-       0xbc, 0xd9, 0x4e, 0xb5, 0xa9, 0x0e, 0xaa, 0x1f, 0x06, 0x9c, 0xda, 0xb6,
-       0x89, 0x4f, 0x77, 0xf0, 0x88, 0x77, 0x9e, 0x83, 0x1c, 0x58, 0xef, 0x71,
-       0x02, 0x6d, 0xe2, 0x9a, 0xdd, 0x74, 0xbe, 0x1f, 0xed, 0xbb, 0x31, 0x46,
-       0xab, 0xbe, 0xa3, 0xe5, 0x9c, 0x34, 0x79, 0xcc, 0x3d, 0xf7, 0x74, 0x36,
-       0xb5, 0x3f, 0x77, 0xd4, 0x7c, 0x6f, 0xf4, 0x3d, 0xca, 0xb8, 0x90, 0x91,
-       0xbf, 0xc5, 0xf6, 0xb6, 0x97, 0xfb, 0xf6, 0xb6, 0x0f, 0x4b, 0x7b, 0x0f,
-       0x45, 0xd1, 0xdd, 0x74, 0x5f, 0xa0, 0x43, 0x41, 0xfb, 0x28, 0x71, 0x85,
-       0x76, 0x4b, 0x7d, 0xa6, 0xed, 0x28, 0x9f, 0xb5, 0xd8, 0xd4, 0x87, 0xff,
-       0xd9, 0x87, 0x7d, 0x19, 0xbf, 0xfb, 0xbe, 0xd1, 0x33, 0x8b, 0xbe, 0x3f,
-       0xe3, 0x17, 0xd4, 0xd3, 0xfd, 0xfc, 0xa9, 0x84, 0x7e, 0x1f, 0xb4, 0xbf,
-       0xae, 0x05, 0x38, 0x12, 0xf3, 0x63, 0x0a, 0x26, 0xef, 0x64, 0xe2, 0xbe,
-       0x94, 0x9d, 0xe6, 0x9d, 0x62, 0xd7, 0x21, 0xe7, 0x0b, 0x90, 0xf3, 0x64,
-       0x98, 0xbe, 0x1f, 0xf3, 0x4b, 0x8e, 0xe4, 0xb6, 0x28, 0x6f, 0xda, 0x75,
-       0xea, 0x26, 0x78, 0xc4, 0x16, 0x31, 0xc5, 0x02, 0x07, 0xca, 0x60, 0x8e,
-       0xaf, 0xe1, 0xbc, 0xe5, 0xd7, 0x6f, 0xa4, 0x61, 0xd3, 0x5c, 0xfc, 0x28,
-       0x77, 0xf8, 0xf4, 0x6b, 0x94, 0x31, 0xeb, 0xd9, 0x18, 0x0b, 0xe0, 0xfc,
-       0x98, 0x63, 0x77, 0xa1, 0xd3, 0x13, 0xd0, 0xdd, 0x88, 0x38, 0xe5, 0x13,
-       0x52, 0x98, 0x9e, 0x50, 0xfb, 0x3f, 0x08, 0xfb, 0x34, 0xef, 0x66, 0x65,
-       0xe1, 0xe5, 0x3b, 0xb1, 0x4f, 0xe9, 0xe7, 0x6b, 0x0c, 0xc3, 0x6b, 0x51,
-       0x9d, 0x26, 0xe7, 0x60, 0xdc, 0xcd, 0xe4, 0x92, 0xfd, 0xef, 0xaa, 0xfa,
-       0xe5, 0x70, 0x56, 0x2a, 0x57, 0x6c, 0xad, 0x85, 0xc9, 0xc8, 0x7b, 0x1e,
-       0x65, 0x38, 0x73, 0x3e, 0x0e, 0x9c, 0x22, 0x77, 0xff, 0x60, 0xd4, 0xac,
-       0xe9, 0x5f, 0xfb, 0xe9, 0x03, 0x27, 0xcb, 0x8d, 0x63, 0x68, 0xfd, 0x0c,
-       0xae, 0x3d, 0x74, 0xd4, 0xec, 0x1f, 0xfa, 0xc3, 0x37, 0xbd, 0x4c, 0x94,
-       0xcf, 0xe4, 0xbd, 0xcc, 0xd1, 0x52, 0x57, 0x38, 0xb7, 0x77, 0x7d, 0xbd,
-       0xfe, 0x28, 0xc6, 0x8b, 0xcb, 0xe0, 0xe6, 0x84, 0xfa, 0xf1, 0xf3, 0x7b,
-       0x7c, 0x56, 0x13, 0x1f, 0x30, 0x7e, 0xeb, 0x1b, 0xf2, 0xd8, 0x06, 0xe5,
-       0x44, 0xfb, 0x1e, 0x92, 0x1f, 0x39, 0xc3, 0xf6, 0x93, 0x5a, 0x77, 0x9c,
-       0xc8, 0x30, 0x1f, 0x73, 0xd0, 0x49, 0xda, 0x6b, 0x12, 0x19, 0xfd, 0x98,
-       0xf0, 0x9b, 0x16, 0xd6, 0x7a, 0x0c, 0xbb, 0x4f, 0x4a, 0x50, 0xef, 0x31,
-       0x94, 0x39, 0x10, 0xfa, 0xa7, 0xf7, 0xc6, 0x79, 0xde, 0x63, 0xea, 0x3d,
-       0x24, 0x44, 0xb9, 0xfd, 0xf1, 0x0e, 0x7e, 0xe3, 0xb9, 0x37, 0xde, 0x77,
-       0xff, 0xd3, 0xe7, 0xd2, 0x89, 0x25, 0xfa, 0xac, 0x2d, 0xce, 0xbf, 0xfa,
-       0xcd, 0xbb, 0x16, 0x0a, 0x9d, 0xa2, 0xf9, 0xb2, 0x4b, 0xef, 0x38, 0xac,
-       0x7b, 0x48, 0xc4, 0x0e, 0x58, 0x8c, 0x7b, 0x13, 0xdf, 0x98, 0x43, 0x61,
-       0x8c, 0x0d, 0x6d, 0x70, 0x86, 0x97, 0x46, 0x2c, 0xb9, 0x3f, 0x92, 0x89,
-       0x5b, 0x72, 0x2c, 0xbe, 0x22, 0x78, 0x26, 0xf3, 0x29, 0x1b, 0x89, 0x02,
-       0xef, 0x8f, 0x94, 0x39, 0x5e, 0x5c, 0xfd, 0x93, 0xe4, 0x31, 0xcf, 0xbb,
-       0xe4, 0x4a, 0x28, 0x79, 0xd7, 0xdb, 0x1e, 0x73, 0xde, 0xd6, 0xe6, 0xfb,
-       0xd5, 0x23, 0x10, 0x37, 0x16, 0x9e, 0x32, 0xb5, 0x87, 0x4b, 0x97, 0x06,
-       0x37, 0xf4, 0x9b, 0xb9, 0x69, 0xd3, 0x2e, 0xa1, 0xdd, 0xea, 0xd7, 0x41,
-       0x55, 0x2e, 0x0d, 0x56, 0x8f, 0xdc, 0x6e, 0xfc, 0x6d, 0xf2, 0xab, 0xc0,
-       0x87, 0x89, 0xef, 0xa9, 0x0b, 0x3b, 0xbb, 0x7c, 0x26, 0x74, 0x66, 0xd9,
-       0x5a, 0x6d, 0x63, 0x0e, 0xec, 0x94, 0x27, 0xdd, 0x27, 0x83, 0x38, 0x15,
-       0xe3, 0x5a, 0x22, 0x9d, 0x9b, 0x13, 0x26, 0xe7, 0xb1, 0x69, 0x29, 0x17,
-       0xea, 0x7a, 0x89, 0xb1, 0xaa, 0xa8, 0x62, 0x43, 0xf7, 0x26, 0xeb, 0xc1,
-       0x7a, 0x64, 0x46, 0x31, 0xa3, 0x47, 0xf1, 0xc0, 0xe8, 0x5d, 0x97, 0xc6,
-       0x61, 0xc9, 0x97, 0xae, 0x2d, 0xbb, 0x03, 0xac, 0xe1, 0x79, 0x75, 0xf9,
-       0x09, 0xb4, 0x89, 0x33, 0xf7, 0x34, 0x9d, 0x6f, 0xcc, 0xc9, 0x26, 0xec,
-       0x41, 0xab, 0x39, 0x1f, 0xcb, 0x73, 0xcd, 0x79, 0xd8, 0x57, 0x25, 0xdf,
-       0xcb, 0xdc, 0x6b, 0x10, 0x6f, 0x77, 0xfd, 0x78, 0xfb, 0x87, 0x06, 0xa8,
-       0x83, 0xf0, 0x6f, 0xf2, 0x91, 0xb1, 0xb6, 0x91, 0xf9, 0x52, 0xf8, 0x1f,
-       0xbb, 0xb1, 0x53, 0xb4, 0x37, 0x76, 0xf2, 0xe3, 0xb8, 0xf6, 0x25, 0x70,
-       0x92, 0x22, 0xf8, 0x45, 0xc1, 0xaf, 0xc3, 0xe7, 0xf5, 0x9d, 0xfe, 0xb7,
-       0x98, 0xd3, 0x41, 0xcd, 0xad, 0x0f, 0xee, 0xc9, 0xad, 0xdf, 0x35, 0xc0,
-       0xda, 0xe3, 0xe2, 0xd6, 0x6e, 0xdf, 0x88, 0xdf, 0x77, 0xe2, 0x96, 0xef,
-       0x63, 0xf6, 0x4c, 0x51, 0xf7, 0xcc, 0x65, 0x8d, 0x11, 0xcf, 0x6f, 0x2d,
-       0xc9, 0x8c, 0xd3, 0x25, 0xb9, 0xd5, 0xc0, 0x4e, 0x78, 0xe3, 0xb3, 0x6e,
-       0xa1, 0x2f, 0x2c, 0xec, 0xcf, 0xe7, 0x29, 0x47, 0x8b, 0xe5, 0xc2, 0x1c,
-       0xff, 0x90, 0x44, 0xc6, 0x68, 0x3b, 0x68, 0x13, 0x3e, 0x05, 0x2c, 0x03,
-       0x4f, 0xdf, 0x6a, 0xcc, 0x7d, 0xbf, 0x9f, 0x1c, 0x29, 0xc3, 0xe0, 0x9d,
-       0x0b, 0x5e, 0x2b, 0xf6, 0xdf, 0x31, 0xd6, 0xb4, 0xec, 0xcc, 0x95, 0x36,
-       0x4b, 0x6d, 0x93, 0xbe, 0xc7, 0x94, 0xff, 0x1e, 0x61, 0xcc, 0x67, 0xb6,
-       0x14, 0xdc, 0x33, 0x27, 0xc7, 0x4f, 0x25, 0x62, 0x49, 0x4b, 0xe7, 0xa5,
-       0xf6, 0x2b, 0xeb, 0xce, 0xc1, 0x2e, 0xd1, 0x86, 0x29, 0xae, 0x81, 0xab,
-       0x12, 0xd7, 0x68, 0x9f, 0xd4, 0xa6, 0xc5, 0x8b, 0x98, 0x67, 0x6e, 0x4b,
-       0xf3, 0x0f, 0xb1, 0xd3, 0xe1, 0x44, 0x65, 0x46, 0xb1, 0x0e, 0x7c, 0x55,
-       0xe7, 0x0e, 0x7b, 0x1c, 0x6a, 0xcc, 0x2d, 0xd1, 0xbf, 0x64, 0x1e, 0xa6,
-       0x43, 0xb2, 0x15, 0x91, 0x57, 0xa0, 0xdf, 0x57, 0xd7, 0xb9, 0xe7, 0xc2,
-       0xbd, 0xc6, 0x47, 0xac, 0xdf, 0x63, 0x49, 0xaf, 0xe6, 0x6b, 0x8b, 0x58,
-       0x2f, 0xf0, 0xab, 0xf1, 0xf0, 0x29, 0xf8, 0x09, 0x5a, 0x27, 0xc1, 0x18,
-       0xeb, 0x2c, 0x7c, 0xca, 0xc6, 0xb8, 0x10, 0x30, 0x62, 0x9a, 0xe7, 0x67,
-       0xc0, 0x8b, 0x77, 0x73, 0x35, 0xc5, 0xea, 0x82, 0xc6, 0x63, 0x6b, 0xeb,
-       0x1d, 0x6a, 0x2f, 0x6a, 0xd5, 0x3e, 0xac, 0x8b, 0x1c, 0xb7, 0xc6, 0x8a,
-       0xfe, 0xf9, 0x16, 0xa9, 0x56, 0xd9, 0x96, 0x81, 0x56, 0xd5, 0x97, 0x20,
-       0x1f, 0x65, 0xcb, 0x1a, 0xb8, 0x6e, 0x75, 0xc3, 0xc1, 0x2f, 0x85, 0xdf,
-       0x08, 0x7e, 0x0f, 0x4a, 0xb6, 0x4c, 0xfe, 0xcd, 0xfc, 0x53, 0x47, 0xd3,
-       0xf3, 0x5b, 0xf4, 0xfb, 0x11, 0xd6, 0xb4, 0x15, 0x7d, 0x3f, 0xad, 0x58,
-       0xdd, 0x8f, 0x9b, 0x32, 0xbe, 0x9b, 0xf2, 0xb1, 0xee, 0xa7, 0x7e, 0x6d,
-       0xed, 0xbf, 0x01, 0x17, 0x24, 0x5e, 0x9d, 0xe0, 0x70, 0x00, 0x00, 0x00 };
-
-static const u32 bnx2_RXP_b06FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_RXP_b06FwRodata[(0x24/4) + 1] = {
-       0x08004c28, 0x08004c28, 0x08004ba0, 0x08004bd8, 0x08004c0c, 0x08004c30,
-       0x08004c30, 0x08004c30, 0x08004b10, 0x00000000 };
-
-static struct fw_info bnx2_rxp_fw_06 = {
-       /* Firmware version: 4.6.16 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0x10,
-
-       .start_addr                     = 0x080031d8,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x70dc,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_RXP_b06FwText,
-       .gz_text_len                    = sizeof(bnx2_RXP_b06FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_RXP_b06FwData,
-
-       .sbss_addr                      = 0x08007120,
-       .sbss_len                       = 0x54,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08007178,
-       .bss_len                        = 0x450,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x080070dc,
-       .rodata_len                     = 0x24,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_RXP_b06FwRodata,
-};
-
 /* Initialized Values for the RX Processor. */
 static const struct cpu_reg cpu_reg_rxp = {
        .mode = BNX2_RXP_CPU_MODE,
@@ -2965,595 +55,6 @@ static const struct cpu_reg cpu_reg_rxp = {
        .mips_view_base = 0x8000000,
 };
 
-static u8 bnx2_rv2p_proc1[] = {
-       /* Date:        02/03/2009 14:20 */
-       0xa5, 0x56, 0x4f, 0x68, 0x14, 0x67, 0x14, 0x7f, 0x33, 0xbb, 0xb3, 0xb3,
-       0x99, 0x9d, 0xd9, 0xdd, 0x92, 0x18, 0x96, 0x18, 0xcc, 0x1a, 0x84, 0x92,
-       0x75, 0xb7, 0x6e, 0x6c, 0x0f, 0x42, 0x03, 0x29, 0xb9, 0x08, 0x35, 0x87,
-       0x12, 0x11, 0x8a, 0x2d, 0x68, 0xb7, 0x22, 0x14, 0x0a, 0xa5, 0x07, 0x8f,
-       0xa5, 0x83, 0x71, 0x53, 0x5a, 0xbc, 0xe4, 0xd0, 0x80, 0x42, 0x35, 0x27,
-       0x5b, 0x62, 0x0e, 0x3b, 0xe0, 0xa1, 0x88, 0xe0, 0x41, 0x8f, 0x7a, 0xaa,
-       0x7f, 0x5a, 0x28, 0x46, 0x29, 0xb5, 0x87, 0x82, 0xc7, 0xde, 0x9a, 0xe9,
-       0xf7, 0xfe, 0x7c, 0xbb, 0x33, 0x5f, 0x66, 0x13, 0xa1, 0x42, 0xfc, 0xf1,
-       0xbd, 0x79, 0xef, 0xfb, 0xde, 0x9f, 0xdf, 0x7b, 0x6f, 0xab, 0x00, 0x60,
-       0x43, 0x18, 0x4d, 0x29, 0x04, 0x2b, 0x67, 0x15, 0x11, 0x00, 0x36, 0x81,
-       0xff, 0x39, 0x3e, 0x9d, 0xc3, 0x23, 0x72, 0x3e, 0xcc, 0x10, 0x1e, 0xae,
-       0xaa, 0xff, 0x3f, 0x85, 0xf9, 0x3a, 0x62, 0x0e, 0xe6, 0x0f, 0x22, 0x1e,
-       0x85, 0xbb, 0xf5, 0x9a, 0xc2, 0x7f, 0x63, 0x08, 0xf1, 0x1c, 0xf4, 0x7e,
-       0x8e, 0x4a, 0x74, 0xff, 0x96, 0xd8, 0xff, 0x9a, 0x63, 0x3c, 0xd6, 0xac,
-       0x12, 0x3e, 0x5a, 0xc5, 0xf7, 0x4e, 0x9d, 0x82, 0x02, 0xda, 0x5d, 0x50,
-       0x17, 0x23, 0x96, 0xd4, 0x83, 0x45, 0xb2, 0x03, 0xbb, 0xa2, 0x70, 0x12,
-       0x9e, 0x2f, 0xa0, 0xfe, 0x1b, 0xde, 0xa5, 0x55, 0xc4, 0x12, 0x74, 0x9a,
-       0xa8, 0x77, 0x00, 0xb2, 0xf5, 0x6a, 0x4a, 0x0f, 0xe5, 0x11, 0x84, 0x4d,
-       0xc4, 0x11, 0x80, 0x56, 0xf2, 0x3d, 0xd7, 0x0a, 0x5b, 0x68, 0xff, 0x85,
-       0xbc, 0xb7, 0x4f, 0xee, 0x51, 0x71, 0x47, 0x88, 0x3d, 0xb1, 0x53, 0x7f,
-       0x2d, 0x96, 0xb3, 0xfe, 0x67, 0x4a, 0x4f, 0xc7, 0xe3, 0x73, 0xde, 0xa6,
-       0x38, 0x1e, 0x57, 0xe2, 0x79, 0xb6, 0xaa, 0xf3, 0x86, 0xfa, 0xbf, 0xc7,
-       0x69, 0x7d, 0xd8, 0x43, 0xff, 0x89, 0xd2, 0x4f, 0xdf, 0xcb, 0xf2, 0x5f,
-       0x06, 0xf2, 0x99, 0xf4, 0xf7, 0xad, 0x06, 0xfa, 0xe7, 0x00, 0x34, 0x24,
-       0x8f, 0xa4, 0xff, 0x30, 0xe6, 0x78, 0xe6, 0xe0, 0x90, 0x5d, 0x23, 0xbd,
-       0x3c, 0xd4, 0x28, 0x3f, 0x1c, 0xef, 0x01, 0xc1, 0x25, 0xc1, 0x6b, 0x82,
-       0x3f, 0x08, 0xc2, 0xff, 0xc4, 0xad, 0x21, 0xf2, 0x7d, 0x82, 0xfb, 0x0d,
-       0xf9, 0x2d, 0xc1, 0xb7, 0x0c, 0x7b, 0xcf, 0x62, 0x7c, 0xac, 0xbf, 0xcb,
-       0xf9, 0x5d, 0xc3, 0xfe, 0x4b, 0xe0, 0xfc, 0x58, 0x46, 0xde, 0x36, 0x85,
-       0x87, 0x58, 0x77, 0xf9, 0x3e, 0xa3, 0xf5, 0x84, 0x37, 0x8d, 0xa4, 0xfe,
-       0x8d, 0x5d, 0xf4, 0x59, 0x6d, 0x61, 0x26, 0xcb, 0xee, 0x7a, 0x2c, 0x79,
-       0x14, 0x7b, 0xaf, 0x77, 0x67, 0x08, 0xef, 0xe7, 0x32, 0x79, 0x3f, 0x2e,
-       0x71, 0xa8, 0xa6, 0x23, 0xfb, 0xdb, 0x16, 0xf3, 0xdb, 0x11, 0x5e, 0xee,
-       0xc6, 0x63, 0xe1, 0xd5, 0x8c, 0xe6, 0x57, 0x9a, 0x57, 0xcc, 0x8f, 0x82,
-       0xc1, 0x8f, 0x6f, 0xf7, 0xc8, 0x4b, 0xc9, 0x88, 0x6f, 0x39, 0xd6, 0xf9,
-       0xb6, 0x45, 0x7c, 0xb1, 0x50, 0xa5, 0x7b, 0xbf, 0x8b, 0xe8, 0x38, 0xe6,
-       0xaf, 0xe0, 0x39, 0x0f, 0x97, 0x23, 0x6d, 0x27, 0xfd, 0xd4, 0xd0, 0xef,
-       0xb0, 0x7d, 0x20, 0x9f, 0x6d, 0x47, 0xfb, 0xc9, 0x72, 0x0f, 0xf0, 0x3c,
-       0xda, 0x5b, 0x37, 0xf2, 0x56, 0xa7, 0xb8, 0x41, 0xe2, 0x07, 0x23, 0x7e,
-       0x9d, 0xbf, 0x57, 0xc2, 0xf7, 0x49, 0x95, 0x0f, 0xfe, 0x3e, 0x05, 0xfa,
-       0x7e, 0x9c, 0x0b, 0x45, 0x38, 0x7b, 0xbc, 0x42, 0xfe, 0x94, 0x0b, 0x7c,
-       0xcd, 0x87, 0x15, 0xc6, 0x73, 0x1e, 0xe3, 0x9f, 0x9e, 0xca, 0x2d, 0xc4,
-       0xf1, 0xf9, 0x12, 0x9f, 0x3f, 0x09, 0xf0, 0xde, 0x51, 0xf5, 0xb0, 0xb6,
-       0xd7, 0x7e, 0xed, 0xe6, 0x0f, 0xbe, 0xaf, 0xdf, 0xd1, 0x7e, 0xe8, 0xf7,
-       0xd2, 0x75, 0x19, 0xfe, 0x2e, 0x63, 0xc7, 0x4e, 0xe7, 0x21, 0x3f, 0xcb,
-       0x78, 0xb5, 0x4d, 0x50, 0x5b, 0xf3, 0xd9, 0xee, 0x8a, 0x9f, 0xc7, 0xf3,
-       0x3b, 0x57, 0x1e, 0xe0, 0xfd, 0xf6, 0xd1, 0xb5, 0x48, 0xfc, 0xab, 0xe8,
-       0xba, 0x92, 0x1c, 0xa6, 0x81, 0xcf, 0x4b, 0xc2, 0x93, 0x25, 0xe2, 0x71,
-       0x59, 0x7d, 0x42, 0x9c, 0x80, 0xd0, 0x26, 0x3d, 0xef, 0x3e, 0xd9, 0xe7,
-       0x44, 0xae, 0xea, 0x37, 0x9d, 0xe6, 0xff, 0x16, 0xf3, 0xa2, 0x98, 0xe6,
-       0xd3, 0x7c, 0x62, 0xce, 0x25, 0xf3, 0x61, 0xf5, 0x79, 0xb4, 0xb3, 0x8e,
-       0xe9, 0x7a, 0x3d, 0x5a, 0xd5, 0xf9, 0x61, 0xbe, 0xb2, 0x9e, 0x2a, 0x56,
-       0x8b, 0xd5, 0xc3, 0xb6, 0x24, 0x72, 0x56, 0xbe, 0xb7, 0x4c, 0xde, 0x66,
-       0xf1, 0xbe, 0x6a, 0xf0, 0xb8, 0x21, 0xbc, 0x1f, 0xe9, 0xad, 0xbf, 0xd6,
-       0x7e, 0xb8, 0x29, 0xbc, 0xaf, 0x0e, 0xf6, 0xc3, 0x26, 0xed, 0x27, 0x75,
-       0x26, 0xf5, 0x5e, 0x98, 0x4b, 0xd5, 0xe9, 0x3d, 0xc8, 0xec, 0xef, 0xab,
-       0x72, 0x4f, 0x5b, 0xfa, 0xbc, 0x90, 0xd8, 0x23, 0xa4, 0x5e, 0x06, 0xf2,
-       0xc3, 0x35, 0xfa, 0x74, 0x2c, 0x96, 0x77, 0x54, 0xbf, 0x65, 0xc5, 0xeb,
-       0xc2, 0x5f, 0xc2, 0x83, 0x0e, 0xf5, 0x93, 0x33, 0xf6, 0xf9, 0xed, 0x54,
-       0x9d, 0x00, 0x0e, 0xea, 0xfd, 0x90, 0xf4, 0x2b, 0xb9, 0xdf, 0xf0, 0xbe,
-       0x1a, 0x74, 0x66, 0x93, 0x7b, 0xee, 0x72, 0xbf, 0xdf, 0x03, 0xea, 0xa3,
-       0xf2, 0x8e, 0xbe, 0xd4, 0xf3, 0xac, 0xde, 0x4c, 0xf6, 0xf7, 0x98, 0xcc,
-       0x2f, 0x5b, 0xf6, 0x73, 0xc9, 0x8c, 0x53, 0xed, 0xbd, 0xec, 0x7a, 0x71,
-       0xbc, 0xff, 0x6c, 0xbf, 0xde, 0xbc, 0xdb, 0xab, 0xee, 0x9e, 0x51, 0xf7,
-       0xbf, 0xb7, 0x75, 0x1e, 0x6d, 0x27, 0x6b, 0xbf, 0x7f, 0xa0, 0xee, 0x15,
-       0x7d, 0x99, 0x1b, 0x67, 0xea, 0x59, 0x7c, 0x2d, 0xee, 0xd0, 0x4b, 0xcf,
-       0x2f, 0xed, 0xe7, 0xc6, 0x06, 0xd7, 0xfd, 0xa3, 0xb8, 0xbf, 0x97, 0x52,
-       0xf3, 0x75, 0x44, 0xea, 0xac, 0xf4, 0xc8, 0xbf, 0xa7, 0xdb, 0x83, 0x79,
-       0x9c, 0xe4, 0xcd, 0x49, 0xe1, 0xab, 0x3d, 0xb7, 0x4e, 0xfd, 0xe1, 0x76,
-       0x5e, 0x1a, 0x75, 0x98, 0x6d, 0x62, 0xfd, 0xbf, 0x86, 0x48, 0xfc, 0xfc,
-       0x2d, 0xe5, 0x6f, 0x20, 0xfd, 0x55, 0x80, 0x9f, 0x22, 0x1d, 0x97, 0xae,
-       0x1b, 0xe3, 0x8f, 0x4d, 0xe9, 0x93, 0x7e, 0x7c, 0xf8, 0xee, 0xa2, 0xbc,
-       0x5b, 0x85, 0x1b, 0x91, 0x9e, 0x63, 0x38, 0xd7, 0x5c, 0x68, 0xcb, 0xdc,
-       0x3c, 0x2b, 0xf3, 0xeb, 0x85, 0xc7, 0xf3, 0xb1, 0x73, 0x82, 0x78, 0x08,
-       0xe3, 0x32, 0xc7, 0x3a, 0x01, 0x9f, 0x27, 0x02, 0xfe, 0x7d, 0xd8, 0x76,
-       0x7d, 0xd2, 0x9b, 0x08, 0x18, 0xc7, 0x4b, 0x68, 0x57, 0x83, 0x3f, 0x16,
-       0x49, 0xbd, 0x39, 0x98, 0x63, 0xe6, 0xfc, 0x92, 0x38, 0xdf, 0x46, 0xb9,
-       0xda, 0x93, 0xd3, 0x7c, 0xe6, 0x3a, 0xfb, 0x7d, 0x5e, 0x5f, 0x97, 0xaa,
-       0xd4, 0x2b, 0xc9, 0x3c, 0xeb, 0x3e, 0xba, 0x69, 0xe4, 0x57, 0xd7, 0xe7,
-       0xcd, 0x58, 0xcf, 0xf7, 0xe9, 0xe3, 0xe8, 0x6f, 0x05, 0xca, 0x2e, 0xf3,
-       0x82, 0x51, 0xdd, 0x63, 0xbb, 0x68, 0x36, 0xd9, 0x95, 0x79, 0xd8, 0xbd,
-       0x48, 0xd7, 0x2c, 0x76, 0xb5, 0x7c, 0x81, 0x1a, 0x61, 0x69, 0xe3, 0x1e,
-       0xc9, 0xcb, 0x51, 0x8e, 0xe5, 0xee, 0x09, 0x9d, 0xaf, 0x0a, 0xc5, 0xbf,
-       0xc6, 0xf9, 0xfa, 0xf8, 0x7b, 0xc6, 0xd3, 0xf0, 0x3e, 0xa1, 0x37, 0x98,
-       0xe3, 0x45, 0x42, 0x08, 0x92, 0x73, 0xdc, 0x51, 0xee, 0x55, 0xc9, 0x9f,
-       0x41, 0xfd, 0xcc, 0xfd, 0xb8, 0x5b, 0x1d, 0x47, 0x13, 0xfc, 0xd3, 0x75,
-       0x34, 0xe7, 0x39, 0xf1, 0xc4, 0xe0, 0x63, 0x77, 0x08, 0x1f, 0xad, 0x21,
-       0x7c, 0x36, 0xe7, 0xd6, 0x57, 0xd2, 0xc7, 0x79, 0x70, 0x72, 0xb4, 0x70,
-       0xfd, 0xfc, 0x32, 0xd5, 0xd5, 0xee, 0xf2, 0x0f, 0x08, 0xdf, 0x59, 0xb1,
-       0x28, 0x5f, 0xfe, 0x0a, 0xeb, 0xe5, 0x59, 0x5e, 0xd3, 0xf8, 0xcd, 0xb2,
-       0xfe, 0xbd, 0xf1, 0x1f, 0xb6, 0x34, 0x9b, 0xb9, 0xa0, 0x0c, 0x00, 0x00,
-       0x00 };
-
-static u8 bnx2_rv2p_proc2[] = {
-       /* Date:        02/03/2009 14:20 */
-       0xad, 0x57, 0x4d, 0x68, 0x5c, 0x55, 0x14, 0x3e, 0xf3, 0xe6, 0xef, 0xcd,
-       0xcc, 0x9b, 0xcc, 0x34, 0x8d, 0x93, 0x31, 0x29, 0x26, 0x4d, 0x68, 0xea,
-       0xc8, 0x44, 0xf3, 0x47, 0x05, 0x5d, 0x18, 0x46, 0x48, 0x7f, 0x2c, 0x34,
-       0x8d, 0x2e, 0x8a, 0x9b, 0x36, 0x53, 0x3b, 0x3a, 0x6d, 0xed, 0xc2, 0xec,
-       0xdc, 0xf8, 0xb0, 0x35, 0x41, 0x98, 0x45, 0x53, 0x4c, 0x13, 0x44, 0xa8,
-       0xe8, 0xce, 0xdd, 0x88, 0x9a, 0xd6, 0x8d, 0x50, 0x68, 0x28, 0x76, 0x51,
-       0x04, 0x05, 0xed, 0x42, 0x10, 0xad, 0xa1, 0x15, 0x41, 0x51, 0xb3, 0x92,
-       0x8c, 0xf7, 0x9e, 0xef, 0xdc, 0x37, 0xef, 0x4d, 0xa6, 0xa4, 0x0b, 0x67,
-       0xf3, 0xe5, 0xdc, 0x77, 0xee, 0xb9, 0xe7, 0xe7, 0x3b, 0xe7, 0xde, 0x64,
-       0x89, 0x28, 0x42, 0x6e, 0xbd, 0x4f, 0x21, 0x85, 0xc2, 0x21, 0x5b, 0x41,
-       0x83, 0x28, 0x9a, 0xd7, 0x32, 0x59, 0x24, 0xbf, 0x27, 0xb2, 0x0c, 0xdf,
-       0xd6, 0x1d, 0xad, 0x46, 0x6e, 0x41, 0xeb, 0xd9, 0xf4, 0x92, 0x05, 0xbd,
-       0x08, 0x69, 0x54, 0x3a, 0xae, 0xc6, 0x1d, 0x82, 0xcf, 0x08, 0x46, 0x42,
-       0xc0, 0xb0, 0xa0, 0xd5, 0x82, 0x24, 0x7a, 0x5d, 0x22, 0x6f, 0x8a, 0xec,
-       0x08, 0xe6, 0x65, 0xfd, 0xb4, 0xe0, 0xab, 0xb2, 0x7e, 0x47, 0x70, 0x5d,
-       0xa1, 0xf1, 0x53, 0xcb, 0xbf, 0x35, 0x9a, 0xb2, 0x03, 0xf3, 0x05, 0xf8,
-       0xff, 0x62, 0x3f, 0xeb, 0x37, 0x82, 0xfa, 0x77, 0x1b, 0xc6, 0x0f, 0x13,
-       0xaf, 0x15, 0xd5, 0xfa, 0xbb, 0x27, 0x2e, 0x2f, 0x62, 0xdf, 0xf1, 0x7e,
-       0xac, 0x3f, 0x56, 0xd4, 0x71, 0xc7, 0xc8, 0x15, 0xa4, 0x61, 0x9b, 0xe3,
-       0x70, 0x87, 0x4d, 0xa2, 0xa0, 0xff, 0xe3, 0x22, 0xa4, 0xd9, 0x34, 0xec,
-       0x26, 0x03, 0x76, 0x73, 0x5b, 0xec, 0x7e, 0x9f, 0xf0, 0xdb, 0xff, 0x54,
-       0xec, 0x27, 0xb7, 0xb5, 0x5f, 0x4e, 0x03, 0x77, 0x16, 0xdb, 0x9d, 0x93,
-       0xd8, 0xc6, 0xff, 0xd3, 0xdb, 0xda, 0x7f, 0xd3, 0xf3, 0xdf, 0xac, 0x03,
-       0xfb, 0xf0, 0xf9, 0x13, 0xf7, 0x29, 0x93, 0x47, 0x13, 0xaf, 0xf8, 0x15,
-       0x06, 0x4e, 0x16, 0x19, 0x6a, 0x27, 0x25, 0xb1, 0x53, 0x43, 0xfa, 0xbc,
-       0x4e, 0x8a, 0x58, 0xda, 0xce, 0x5e, 0x3b, 0x76, 0x0d, 0xeb, 0xc7, 0x32,
-       0xc0, 0x57, 0x24, 0x80, 0xbb, 0x49, 0x9d, 0x90, 0x46, 0xa3, 0x92, 0x12,
-       0xfb, 0x28, 0x23, 0xb9, 0x29, 0xec, 0x5f, 0x73, 0xb4, 0x5f, 0xb7, 0x54,
-       0xdd, 0xb4, 0x1c, 0x26, 0x37, 0x13, 0xf4, 0xff, 0x0a, 0x41, 0x6f, 0xc7,
-       0x5e, 0xac, 0x5e, 0xac, 0x40, 0xee, 0xfd, 0x38, 0xcb, 0xfa, 0x2b, 0x75,
-       0x13, 0x87, 0x5e, 0x57, 0xfc, 0xcf, 0xc0, 0x0e, 0x0d, 0xd8, 0x7c, 0x18,
-       0xf2, 0xa3, 0x0e, 0x1d, 0x36, 0xf6, 0xf0, 0xbb, 0xbc, 0xc7, 0xf0, 0x09,
-       0x72, 0x25, 0xc6, 0x90, 0x9f, 0x9d, 0xd7, 0xfe, 0x66, 0xe8, 0x84, 0xa5,
-       0x1d, 0xb1, 0x24, 0xbe, 0xb0, 0xed, 0x7c, 0x01, 0xfd, 0xaf, 0xfa, 0x1c,
-       0xf6, 0xad, 0x32, 0x8e, 0x7d, 0x5d, 0x63, 0xc0, 0xa5, 0xb1, 0xa8, 0x86,
-       0x62, 0x65, 0x8e, 0xc5, 0x27, 0x7f, 0x1e, 0xb5, 0x59, 0xcf, 0x1d, 0x36,
-       0x7c, 0x35, 0x79, 0xd7, 0xf1, 0x5e, 0x6c, 0xf2, 0x76, 0x10, 0xf9, 0xf9,
-       0x75, 0x8f, 0xd6, 0x57, 0x49, 0x1a, 0xc0, 0x39, 0x33, 0xd5, 0x76, 0x7c,
-       0x7f, 0x57, 0xed, 0x7b, 0xb8, 0xfa, 0x4d, 0x72, 0xdc, 0x93, 0x12, 0x7f,
-       0xbf, 0xf0, 0x63, 0x57, 0x1b, 0x7e, 0x64, 0xf8, 0xef, 0xfb, 0xa5, 0x2c,
-       0xe7, 0xef, 0x08, 0xd6, 0x2f, 0x4d, 0xad, 0x22, 0xcf, 0x07, 0x39, 0x7e,
-       0x4a, 0x5e, 0xf8, 0x1c, 0xbb, 0x66, 0xd3, 0x5a, 0x7e, 0x79, 0xa2, 0xf2,
-       0x25, 0xe4, 0x72, 0x58, 0xcb, 0xc7, 0x9c, 0x93, 0x57, 0xa1, 0x1f, 0x3d,
-       0x9f, 0xe5, 0xbc, 0x1d, 0x91, 0x53, 0x0e, 0xaa, 0x51, 0xa1, 0x7e, 0xb5,
-       0xd8, 0x79, 0x16, 0x9d, 0x35, 0xfe, 0x9e, 0xa5, 0x85, 0x3a, 0xbe, 0x9f,
-       0x4b, 0xe9, 0xb8, 0xce, 0xa8, 0xb8, 0x58, 0xaf, 0xab, 0x1a, 0xc3, 0xfe,
-       0xda, 0xa2, 0xb6, 0x17, 0xa2, 0x7b, 0x9f, 0x69, 0xf9, 0x70, 0xf1, 0x1e,
-       0xf4, 0x8b, 0xd5, 0x79, 0x31, 0x6c, 0x21, 0x6f, 0xf7, 0x2d, 0xe8, 0x0b,
-       0xad, 0x92, 0x11, 0xae, 0x5b, 0x88, 0x9c, 0x29, 0xe0, 0x3b, 0xfc, 0xfd,
-       0xdf, 0x50, 0x8d, 0xf3, 0xf5, 0x7c, 0x47, 0x64, 0xd5, 0xe4, 0x47, 0x30,
-       0x63, 0xe2, 0x02, 0x3e, 0x2c, 0x6f, 0xe7, 0x1d, 0xc3, 0x57, 0xa9, 0x57,
-       0xe1, 0x41, 0x7c, 0x05, 0x4e, 0x0d, 0x01, 0x63, 0x83, 0x5a, 0x2f, 0xda,
-       0x86, 0xb7, 0xc1, 0xba, 0x48, 0x5d, 0x7d, 0xfc, 0x62, 0x50, 0xbc, 0x0a,
-       0xf0, 0x4c, 0xf1, 0x98, 0xe7, 0x90, 0xca, 0xa7, 0xe1, 0x8b, 0x36, 0x14,
-       0xa7, 0x33, 0x62, 0xaf, 0x2a, 0x71, 0x9d, 0x95, 0xb8, 0x7e, 0x4f, 0x9a,
-       0xbc, 0x9b, 0x78, 0x80, 0x0b, 0x5e, 0x3c, 0x86, 0x6f, 0xb8, 0x1f, 0x66,
-       0xaa, 0x01, 0x7f, 0x6a, 0x37, 0x06, 0xf0, 0x47, 0xef, 0x20, 0xd0, 0x8b,
-       0x73, 0x88, 0xfb, 0xa4, 0xa3, 0xfb, 0xaa, 0xf1, 0x43, 0xd7, 0x75, 0x43,
-       0xf8, 0x6a, 0xa9, 0x78, 0xfd, 0xfd, 0xd9, 0xd3, 0xa6, 0x3f, 0x83, 0xfd,
-       0x62, 0xe2, 0x3f, 0x97, 0xe6, 0x01, 0x34, 0x71, 0x7b, 0x3d, 0xd8, 0x0f,
-       0xe0, 0x7f, 0xdc, 0xe3, 0x51, 0xd7, 0x3e, 0xc9, 0x93, 0x60, 0xee, 0x69,
-       0x6d, 0x6f, 0x5a, 0xec, 0x8f, 0x88, 0x7d, 0xc7, 0xd7, 0x8f, 0xda, 0xbf,
-       0x3e, 0xaf, 0x0f, 0x4d, 0x7d, 0x9a, 0xfd, 0x68, 0xf2, 0xc4, 0xe7, 0x17,
-       0x6f, 0xaf, 0xeb, 0xfd, 0xbd, 0xdb, 0xf4, 0xe7, 0x23, 0x9e, 0xbd, 0xef,
-       0xbc, 0x7e, 0xd4, 0xdf, 0x53, 0xf4, 0x9c, 0x88, 0xc1, 0x39, 0xf3, 0x87,
-       0x9a, 0x33, 0x1c, 0x87, 0xed, 0xac, 0xca, 0x5c, 0x99, 0xd3, 0xe7, 0xe4,
-       0xc5, 0xef, 0xbc, 0x99, 0xeb, 0xca, 0x6f, 0x99, 0x3f, 0xc7, 0xfd, 0x73,
-       0x24, 0xde, 0xe6, 0x3c, 0xc0, 0x64, 0xb1, 0x35, 0x5f, 0xc8, 0x3b, 0xec,
-       0xaa, 0xfc, 0x9b, 0x39, 0x30, 0x6e, 0xec, 0x43, 0x74, 0x47, 0xfd, 0xfa,
-       0xad, 0xf5, 0x89, 0x3c, 0x60, 0x9e, 0x6d, 0x6c, 0xe2, 0xde, 0xfd, 0x67,
-       0xb3, 0x79, 0x1f, 0x07, 0xea, 0xe8, 0x12, 0xd7, 0x3d, 0xae, 0xea, 0xcf,
-       0xef, 0x03, 0xef, 0x9e, 0xb7, 0xa2, 0x7a, 0x5d, 0xe5, 0x42, 0x78, 0xf5,
-       0xfa, 0xe3, 0xb2, 0xbf, 0x80, 0xb9, 0xf4, 0xda, 0x29, 0xce, 0xff, 0x7b,
-       0x67, 0x37, 0x78, 0x3e, 0x7d, 0xf8, 0xc6, 0x35, 0x1d, 0xd7, 0xa3, 0xb4,
-       0x3e, 0xe7, 0xb0, 0x3f, 0xa5, 0xdd, 0x50, 0xdf, 0x78, 0xb6, 0xb5, 0x1e,
-       0x78, 0xd7, 0xa0, 0x5e, 0x4a, 0x6f, 0x36, 0x78, 0xaf, 0x36, 0xfd, 0x43,
-       0xbf, 0xec, 0xcf, 0x40, 0xdf, 0xf4, 0x73, 0xb0, 0xae, 0x77, 0x36, 0x9b,
-       0x73, 0xd7, 0xe4, 0x3b, 0xc8, 0xd3, 0xa3, 0xe3, 0x7e, 0xbb, 0x83, 0xb4,
-       0x56, 0x87, 0xdd, 0x69, 0xe9, 0xc3, 0x13, 0x72, 0xf0, 0x4f, 0xc9, 0x0c,
-       0x9f, 0x53, 0x7e, 0x81, 0x79, 0x46, 0xb9, 0x14, 0xe2, 0x2c, 0x1f, 0xc6,
-       0xf7, 0x72, 0x1a, 0xeb, 0x3d, 0x69, 0xdc, 0x6f, 0xd3, 0x71, 0x87, 0xf5,
-       0x7b, 0xd2, 0xc0, 0x9c, 0xf4, 0xeb, 0x9a, 0x37, 0x8f, 0x80, 0x2b, 0x31,
-       0x7f, 0xff, 0x46, 0xe8, 0x7a, 0x4c, 0x2b, 0xa8, 0xcb, 0xba, 0x80, 0xfe,
-       0x2b, 0x0d, 0x39, 0xfc, 0x7d, 0xa6, 0x80, 0xb9, 0x4a, 0x03, 0xc1, 0xfb,
-       0x50, 0xfa, 0xb9, 0xa7, 0x39, 0xb7, 0xfc, 0x73, 0x2d, 0x31, 0xb6, 0x5c,
-       0x0f, 0xde, 0x97, 0x2b, 0x31, 0xff, 0x9c, 0xd0, 0x76, 0x59, 0x54, 0xf3,
-       0xc1, 0x3f, 0xd7, 0xc2, 0x52, 0xef, 0xbf, 0x64, 0x0e, 0xec, 0xa4, 0x9b,
-       0x75, 0xc4, 0xb5, 0x56, 0x6f, 0xcd, 0xb3, 0x39, 0xcf, 0xd8, 0x83, 0xdf,
-       0x26, 0x8e, 0xa6, 0x7d, 0x9c, 0x7f, 0x4a, 0xfc, 0xfc, 0x85, 0xdf, 0x21,
-       0x39, 0x89, 0x47, 0xdb, 0xc5, 0xfa, 0x01, 0x99, 0xb3, 0xae, 0x27, 0x07,
-       0xe7, 0xe3, 0x34, 0xfb, 0xd5, 0x49, 0x78, 0x77, 0xe4, 0xbc, 0xbe, 0x36,
-       0xf1, 0x75, 0x8d, 0x00, 0x97, 0x46, 0x4c, 0x1d, 0x4c, 0xbd, 0x4c, 0x7d,
-       0x50, 0xc7, 0xdc, 0x28, 0xab, 0x4d, 0x94, 0x47, 0x99, 0xa7, 0x23, 0xe5,
-       0x3f, 0x83, 0xef, 0xb4, 0xa3, 0x45, 0xad, 0xff, 0x16, 0x7d, 0xc3, 0x7d,
-       0x44, 0xf4, 0x83, 0x60, 0x73, 0x1e, 0x49, 0x01, 0x02, 0xef, 0xb2, 0x30,
-       0x5d, 0x8f, 0xca, 0xf2, 0xb8, 0xe9, 0x9b, 0x60, 0xdf, 0x5d, 0xe1, 0x77,
-       0xfa, 0xc2, 0xe6, 0xd6, 0xfe, 0x37, 0xf1, 0x69, 0xbd, 0x61, 0xe1, 0xa1,
-       0x4d, 0xa5, 0xfd, 0x78, 0xd7, 0x74, 0xc4, 0xc1, 0xf3, 0x8e, 0xb8, 0xbf,
-       0x4e, 0x8a, 0x0f, 0x89, 0xb8, 0x16, 0x77, 0x75, 0x26, 0x38, 0x8e, 0x4b,
-       0x5f, 0xdf, 0xe2, 0xcf, 0x1f, 0x2d, 0xa7, 0xb0, 0xde, 0x5d, 0x82, 0xf9,
-       0x08, 0xf3, 0x35, 0x4c, 0x17, 0xc0, 0xe7, 0x0f, 0x96, 0x80, 0xef, 0xd3,
-       0x21, 0xd8, 0xe9, 0x7c, 0x9b, 0xef, 0x71, 0xbb, 0x1b, 0xe9, 0xac, 0x2d,
-       0x0b, 0x4f, 0xf3, 0x16, 0xff, 0x3f, 0xd2, 0xa0, 0xb4, 0xbc, 0x5b, 0xa5,
-       0xcf, 0xc0, 0xcf, 0x88, 0xaf, 0xce, 0xdb, 0xf1, 0x55, 0xa3, 0xa3, 0xf8,
-       0x88, 0xed, 0xc2, 0x5b, 0xbb, 0x95, 0xb7, 0xa6, 0x8e, 0x79, 0xab, 0x2d,
-       0x4f, 0xf7, 0x05, 0x79, 0x1a, 0x13, 0x9e, 0xfe, 0xed, 0xcd, 0xd3, 0xad,
-       0x76, 0x31, 0xc7, 0x6f, 0xfe, 0x6f, 0xbc, 0x05, 0x1e, 0x18, 0xd4, 0xe7,
-       0x77, 0xfb, 0xf8, 0x67, 0xfc, 0xf2, 0xcf, 0x9f, 0x43, 0x6a, 0xae, 0xfe,
-       0x07, 0x92, 0xe2, 0x88, 0x7c, 0xe0, 0x0d, 0x00, 0x00, 0x00 };
-
-static u8 bnx2_TPAT_b06FwText[] = {
-       0xbd, 0x58, 0x6d, 0x70, 0x5c, 0xd5, 0x79, 0x7e, 0xce, 0xbd, 0x77, 0xb5,
-       0xd7, 0xd2, 0x4a, 0xba, 0xb2, 0xd6, 0x66, 0x5d, 0xdc, 0xfa, 0x1e, 0x74,
-       0x57, 0x52, 0x58, 0x01, 0x77, 0x6d, 0x01, 0xeb, 0xe6, 0xb6, 0xbe, 0xc8,
-       0xb2, 0xbc, 0xfe, 0x00, 0xe4, 0xc0, 0x4c, 0xe4, 0x96, 0x8e, 0x37, 0xc6,
-       0x18, 0xd9, 0x90, 0xa9, 0x28, 0xfc, 0x58, 0x37, 0x4c, 0xbd, 0x95, 0x65,
-       0x63, 0xc3, 0x4a, 0x6b, 0x0c, 0xb1, 0x4c, 0xda, 0x99, 0x78, 0x84, 0xb1,
-       0x4c, 0x22, 0x7b, 0x0d, 0xe4, 0x07, 0x49, 0xc3, 0xa0, 0xc1, 0x0e, 0x08,
-       0x06, 0xf3, 0x31, 0x6d, 0x67, 0x98, 0xe9, 0xa4, 0xf5, 0x18, 0xf3, 0x11,
-       0x92, 0x18, 0x87, 0x4e, 0x3a, 0xa2, 0x10, 0x9f, 0x3e, 0x67, 0x77, 0xc5,
-       0x57, 0x32, 0xd3, 0xfe, 0xaa, 0x66, 0x56, 0x7b, 0xf7, 0xec, 0xf9, 0x78,
-       0xcf, 0xfb, 0x3e, 0xef, 0xf3, 0x3e, 0xef, 0x5e, 0x21, 0x50, 0x8f, 0xda,
-       0x5f, 0x23, 0x5f, 0xdd, 0xdf, 0x1a, 0xba, 0x2f, 0x7d, 0xf5, 0x75, 0x57,
-       0xf3, 0xf1, 0x3a, 0xe1, 0xd4, 0x59, 0xf8, 0x7f, 0xfc, 0x33, 0x01, 0x67,
-       0xce, 0x0e, 0xfd, 0x82, 0x6d, 0x04, 0x85, 0xcb, 0x7b, 0x3c, 0xd8, 0x66,
-       0x10, 0x77, 0x6f, 0xf7, 0x80, 0x70, 0x2a, 0xe5, 0xae, 0xc4, 0xef, 0x54,
-       0x21, 0x6e, 0x41, 0x8f, 0xff, 0x71, 0xf0, 0xe9, 0x35, 0xcf, 0x5d, 0x2f,
-       0x2f, 0x1e, 0x36, 0x61, 0x3b, 0xc1, 0x5e, 0xcb, 0x69, 0x87, 0xbd, 0x98,
-       0x6b, 0xfe, 0xb1, 0xe3, 0x2f, 0x04, 0x9a, 0xe6, 0xf6, 0x52, 0x6a, 0xc4,
-       0x8f, 0x62, 0xd8, 0x4f, 0x60, 0x77, 0xc9, 0x40, 0xe8, 0x44, 0xb1, 0xcb,
-       0x9b, 0x55, 0x5b, 0x7c, 0xe9, 0xef, 0x86, 0x5a, 0x72, 0xda, 0x97, 0x89,
-       0x5e, 0x13, 0xe1, 0x77, 0xbc, 0xc5, 0xd8, 0x5d, 0x4e, 0x60, 0xa4, 0x6c,
-       0xe3, 0xac, 0x39, 0x82, 0xde, 0xf2, 0xdc, 0x3a, 0x97, 0xeb, 0x3a, 0xb1,
-       0xe7, 0xcb, 0x6b, 0xdd, 0xdd, 0x48, 0x25, 0xf6, 0xc0, 0x40, 0x2e, 0xee,
-       0x71, 0x5d, 0x9b, 0xbb, 0x07, 0xb2, 0x93, 0xfb, 0x14, 0xea, 0xba, 0x5d,
-       0xee, 0x51, 0xe0, 0x7a, 0xe9, 0x1e, 0x85, 0xde, 0x2b, 0xc3, 0xcf, 0x6f,
-       0xa9, 0xe7, 0x3a, 0x16, 0xe3, 0x19, 0xee, 0xff, 0x74, 0xd9, 0xc1, 0xc9,
-       0xb2, 0x87, 0xe7, 0xcb, 0x2e, 0x7e, 0x54, 0x8e, 0xe3, 0xa9, 0xb2, 0x9d,
-       0xb3, 0x03, 0xf4, 0xc7, 0x47, 0x77, 0xaa, 0x84, 0x87, 0xc2, 0x1f, 0x05,
-       0xde, 0xa1, 0x43, 0x46, 0x2c, 0xf3, 0x37, 0xd7, 0xa1, 0x7f, 0xfe, 0x71,
-       0x1b, 0x1b, 0x4a, 0x8b, 0x73, 0xd1, 0x00, 0x9c, 0x23, 0xe0, 0x5f, 0x67,
-       0xa3, 0x9f, 0x7b, 0x14, 0xb8, 0x7f, 0x58, 0x1e, 0xe1, 0xcb, 0xc6, 0xbb,
-       0x45, 0xdb, 0x6e, 0x1e, 0x5d, 0xa8, 0xe7, 0xe0, 0x57, 0xc5, 0x8b, 0xea,
-       0x42, 0xda, 0xc1, 0x2b, 0xcb, 0x95, 0x6a, 0x0c, 0x50, 0x68, 0xe8, 0x2e,
-       0xc0, 0x0c, 0x64, 0x76, 0x9d, 0x29, 0xd0, 0x7b, 0x95, 0xd7, 0x39, 0x2a,
-       0x6e, 0xb9, 0xc5, 0x08, 0x60, 0x8b, 0xc0, 0xb5, 0xda, 0xa6, 0x32, 0xd8,
-       0x57, 0xe6, 0xbd, 0x68, 0xcf, 0x48, 0x19, 0xe1, 0x5f, 0x76, 0x98, 0x98,
-       0x88, 0xe3, 0xfe, 0xb7, 0xbb, 0x2d, 0x7c, 0x5c, 0x94, 0x89, 0x4e, 0xf3,
-       0x7e, 0xec, 0x2c, 0xe6, 0x71, 0x47, 0x11, 0x05, 0x23, 0x18, 0xc2, 0x37,
-       0xba, 0x03, 0xde, 0x33, 0xc4, 0xf7, 0xcb, 0xb0, 0x5b, 0x83, 0xd3, 0x97,
-       0xdf, 0xdb, 0x2e, 0x0f, 0x87, 0x06, 0x90, 0x1d, 0x03, 0xfa, 0x4a, 0x02,
-       0xa7, 0x32, 0x02, 0x5b, 0xfc, 0xcb, 0x50, 0x70, 0xba, 0xb1, 0xb7, 0x2c,
-       0xb3, 0x05, 0x7e, 0x77, 0xd5, 0x28, 0xec, 0x45, 0xc1, 0x6d, 0xd6, 0xf2,
-       0x12, 0xec, 0x96, 0x60, 0xc0, 0x4a, 0x8f, 0xb5, 0xcd, 0x1e, 0x13, 0x32,
-       0xbf, 0xc2, 0x94, 0x21, 0x20, 0x33, 0x9d, 0x46, 0xaa, 0xa0, 0x84, 0x1c,
-       0xba, 0x08, 0x6d, 0xd3, 0x6d, 0xd6, 0x35, 0x53, 0xfa, 0x7d, 0xc0, 0xba,
-       0x7a, 0x0a, 0x58, 0xcf, 0x3d, 0x1f, 0x5a, 0x2e, 0xb0, 0x3d, 0xfd, 0x6b,
-       0x15, 0x2e, 0x90, 0xe1, 0x61, 0xd1, 0x8d, 0xd1, 0x32, 0x70, 0xd3, 0x18,
-       0xec, 0x18, 0xe7, 0x16, 0xb9, 0x77, 0x3d, 0xe7, 0xae, 0x1d, 0x6d, 0x1b,
-       0x9c, 0x11, 0x92, 0x77, 0x93, 0x03, 0x40, 0xca, 0x3f, 0x0e, 0xe9, 0xae,
-       0x13, 0xd2, 0xd9, 0x53, 0xdb, 0x33, 0x59, 0xdb, 0xf3, 0x8a, 0x29, 0x5b,
-       0xac, 0x2a, 0x41, 0xf4, 0x96, 0xe0, 0x3e, 0xe9, 0x83, 0x77, 0x89, 0xf1,
-       0xde, 0xf5, 0x70, 0x5b, 0xa4, 0x7f, 0x98, 0x73, 0xa3, 0x41, 0x97, 0xf5,
-       0x5e, 0x51, 0xe0, 0x43, 0x4f, 0xcf, 0xef, 0xd2, 0xb6, 0x84, 0x4e, 0x90,
-       0x11, 0xfd, 0xe5, 0xfd, 0x73, 0x39, 0x62, 0x9c, 0xf4, 0xe3, 0xc0, 0x42,
-       0x34, 0xb7, 0x78, 0xf3, 0xf1, 0xb0, 0x83, 0xc6, 0xa8, 0xb7, 0xcc, 0x78,
-       0xc0, 0xa9, 0xc3, 0x49, 0xff, 0xb7, 0x0a, 0xdf, 0xd0, 0xf3, 0x81, 0x6f,
-       0x3f, 0xe2, 0x20, 0xe6, 0x5d, 0xc4, 0xd1, 0xf4, 0x36, 0xe3, 0x55, 0x67,
-       0x08, 0x4d, 0xde, 0xcf, 0x8d, 0xd7, 0x9c, 0x38, 0x1e, 0xe2, 0x7d, 0xee,
-       0x4c, 0xc6, 0xf1, 0x40, 0xf9, 0xab, 0xfb, 0x5a, 0x22, 0x3b, 0xfe, 0x8e,
-       0x42, 0x4b, 0x65, 0x7d, 0xf8, 0xac, 0x3f, 0x01, 0x5c, 0xa6, 0xc7, 0xf3,
-       0x62, 0x63, 0xe9, 0x92, 0x72, 0xa3, 0x19, 0x3c, 0x50, 0xb2, 0x31, 0x8f,
-       0x76, 0x45, 0x3c, 0x1b, 0x6f, 0x17, 0xf3, 0x62, 0x55, 0x39, 0x14, 0x6b,
-       0x26, 0x7b, 0x44, 0x38, 0x69, 0x89, 0x9e, 0x71, 0x10, 0x9b, 0x4a, 0xad,
-       0xf1, 0x05, 0xfe, 0xc3, 0xff, 0x57, 0xe3, 0x6c, 0xab, 0x0c, 0x5d, 0x71,
-       0x49, 0x79, 0x49, 0x03, 0xf5, 0x5e, 0x9f, 0x58, 0x3b, 0xa9, 0xd4, 0x5e,
-       0x3f, 0x2b, 0x7a, 0x27, 0x61, 0x37, 0x04, 0x81, 0x75, 0xd7, 0xe8, 0x69,
-       0x23, 0xb7, 0x20, 0x86, 0x52, 0xc9, 0xc5, 0x29, 0x5f, 0xe3, 0x77, 0x1e,
-       0x2c, 0x4f, 0xf0, 0x85, 0xd8, 0x19, 0x1f, 0x56, 0x8c, 0xcf, 0x53, 0x1b,
-       0x2c, 0x8c, 0x74, 0xaf, 0xad, 0xac, 0x89, 0x10, 0x2b, 0x4f, 0x14, 0xb3,
-       0x30, 0x88, 0xbf, 0x45, 0x41, 0x72, 0x76, 0x82, 0x98, 0x7f, 0xcb, 0x4f,
-       0x76, 0x7e, 0x6c, 0x92, 0x1c, 0x5a, 0x65, 0x82, 0x86, 0x0a, 0x2b, 0x48,
-       0x76, 0x1e, 0x81, 0x80, 0xe9, 0x59, 0x78, 0xc5, 0x8f, 0x20, 0xdc, 0x60,
-       0x63, 0x17, 0x71, 0x55, 0xc7, 0xf1, 0xa3, 0x95, 0x71, 0xfd, 0x19, 0xce,
-       0xaa, 0xf2, 0x57, 0x73, 0x9e, 0xe3, 0xa5, 0x36, 0xe4, 0x2a, 0x79, 0x0f,
-       0x67, 0x1d, 0xef, 0xfb, 0xad, 0x88, 0x7e, 0xfc, 0x93, 0xcf, 0xc6, 0x6e,
-       0xa4, 0x9d, 0x66, 0xe0, 0xe5, 0x1e, 0x17, 0x8b, 0x50, 0x68, 0x01, 0xed,
-       0x36, 0x70, 0x21, 0xbd, 0x10, 0xd3, 0x2d, 0xfa, 0xeb, 0xb8, 0xd3, 0x3f,
-       0xde, 0xaa, 0x63, 0xa2, 0xf7, 0x72, 0x56, 0x8d, 0x2b, 0xf5, 0xbc, 0x5f,
-       0x87, 0xd9, 0x8e, 0xe1, 0x19, 0x66, 0x89, 0xbf, 0x88, 0x39, 0xf9, 0x12,
-       0xcf, 0x6f, 0x59, 0x66, 0xc2, 0x5c, 0xe6, 0x9a, 0xee, 0x7c, 0x60, 0xa2,
-       0xa8, 0x39, 0x41, 0xce, 0xbe, 0xc4, 0xff, 0xe7, 0xca, 0x1a, 0x9f, 0x3e,
-       0xf1, 0x29, 0xd0, 0xde, 0xa1, 0xe3, 0xee, 0x5b, 0xed, 0xc4, 0xde, 0x76,
-       0xfa, 0x33, 0xc2, 0x3c, 0x78, 0x90, 0xf6, 0x9e, 0x2b, 0x7e, 0xcf, 0x58,
-       0xe5, 0x48, 0x57, 0x9f, 0xf0, 0x4e, 0x11, 0xe2, 0x79, 0xff, 0xef, 0xb4,
-       0x8f, 0x5d, 0x6e, 0x4b, 0xcc, 0xdc, 0x47, 0xcc, 0x68, 0xee, 0x59, 0x6f,
-       0x39, 0x63, 0x72, 0xe0, 0x7d, 0x1a, 0x91, 0x08, 0x86, 0xac, 0x44, 0x29,
-       0xb5, 0x77, 0x90, 0xdf, 0xdb, 0x41, 0xd6, 0xb2, 0x47, 0x65, 0x9e, 0xe7,
-       0xe5, 0x2c, 0x43, 0x26, 0x9a, 0xcd, 0xd4, 0xd0, 0x88, 0x90, 0x83, 0xcd,
-       0x42, 0xf6, 0xdf, 0x03, 0xe9, 0x9c, 0x10, 0xfa, 0xcc, 0xf5, 0x56, 0x57,
-       0x05, 0xa3, 0x59, 0x62, 0x54, 0xbf, 0xdf, 0x67, 0xa5, 0x2a, 0xef, 0x43,
-       0xd6, 0x95, 0x53, 0x09, 0x8c, 0x96, 0xa4, 0xef, 0x8a, 0x28, 0xbe, 0x96,
-       0xb6, 0x71, 0x22, 0xa9, 0x96, 0xbc, 0x90, 0x96, 0xb9, 0x1e, 0x73, 0x31,
-       0x73, 0x21, 0x81, 0x61, 0x62, 0xe9, 0x1f, 0x92, 0x23, 0xe8, 0x29, 0x9b,
-       0xc4, 0xb1, 0x8b, 0xfd, 0xa5, 0x28, 0x66, 0xc8, 0x4f, 0x75, 0xe9, 0x4e,
-       0x8c, 0x94, 0x64, 0xe7, 0x1b, 0x48, 0xe5, 0x8f, 0x30, 0x5e, 0x67, 0x17,
-       0x78, 0xd8, 0x5f, 0x6e, 0x63, 0x8c, 0xa4, 0xbb, 0x8a, 0x1c, 0x65, 0x76,
-       0x4b, 0x67, 0x17, 0x7d, 0x5b, 0x17, 0x90, 0xdb, 0xca, 0x19, 0xee, 0x53,
-       0xc0, 0xaa, 0x72, 0x5e, 0xf4, 0x95, 0xe7, 0x70, 0xfa, 0x73, 0x62, 0x53,
-       0x63, 0xd5, 0xc6, 0xe6, 0x12, 0x70, 0x67, 0xc9, 0x47, 0x8b, 0x67, 0xbc,
-       0x18, 0xc5, 0x45, 0xfa, 0x71, 0x02, 0xf7, 0x38, 0x21, 0x16, 0x79, 0xeb,
-       0xd4, 0x8e, 0xb8, 0x9e, 0x9f, 0x17, 0x6b, 0x19, 0xb7, 0x30, 0x02, 0x63,
-       0xd2, 0x37, 0x71, 0x36, 0x3e, 0x3c, 0x3f, 0x52, 0xe1, 0x5d, 0xfd, 0x6e,
-       0xa2, 0xdf, 0xc7, 0x1a, 0x07, 0x72, 0xc8, 0x17, 0x85, 0xc1, 0x26, 0xfa,
-       0xe1, 0xa4, 0x28, 0x0c, 0xc4, 0x20, 0x0b, 0xf7, 0x0a, 0x3a, 0x6b, 0x8c,
-       0x24, 0xb1, 0x60, 0x8e, 0xa7, 0x2d, 0xfc, 0x75, 0xe9, 0x29, 0xe3, 0x5c,
-       0xa4, 0x0e, 0xe6, 0x81, 0x08, 0xa2, 0x07, 0x2c, 0x34, 0x1f, 0x10, 0xc4,
-       0x5d, 0xa1, 0x33, 0xaa, 0xd7, 0x21, 0x81, 0x7d, 0xa3, 0x36, 0xee, 0xe9,
-       0x88, 0xe0, 0x42, 0x52, 0x0e, 0x5e, 0x21, 0x86, 0xfd, 0x26, 0x8e, 0x8d,
-       0x1e, 0x97, 0xae, 0x6b, 0x14, 0x22, 0x68, 0x8a, 0x23, 0xd2, 0x5e, 0x87,
-       0x06, 0xae, 0xdb, 0x59, 0x52, 0x3b, 0xed, 0xa0, 0xe0, 0x36, 0x40, 0xfa,
-       0x0f, 0x73, 0xdf, 0x53, 0x45, 0xa5, 0xea, 0xaf, 0xf5, 0x66, 0x3e, 0x30,
-       0xe5, 0xf4, 0x0e, 0x7e, 0x7e, 0x6b, 0xaa, 0xba, 0xff, 0xbc, 0x03, 0x36,
-       0x1a, 0x0f, 0x56, 0xf6, 0x9f, 0x7d, 0x8a, 0x16, 0x7c, 0x58, 0xd2, 0xf9,
-       0xa4, 0x54, 0x34, 0xf0, 0xfa, 0xdf, 0x13, 0x4a, 0xdd, 0xe4, 0xcb, 0xdc,
-       0xcb, 0xa2, 0x6d, 0x60, 0x94, 0xcf, 0x83, 0xe9, 0xa4, 0x9b, 0xa5, 0xcd,
-       0xe7, 0xcb, 0x51, 0xda, 0xc7, 0x5c, 0xf0, 0xb6, 0x19, 0x3b, 0x1c, 0x13,
-       0x75, 0xde, 0x0e, 0x63, 0x6b, 0x05, 0xab, 0x0e, 0x16, 0x8d, 0xd5, 0x63,
-       0x89, 0x17, 0x8a, 0x4d, 0xcc, 0xcd, 0x8d, 0x93, 0x16, 0xe7, 0xe9, 0xdc,
-       0x14, 0x88, 0x7a, 0xbd, 0x62, 0xe5, 0x64, 0x5f, 0x25, 0x5f, 0x07, 0xc6,
-       0x0d, 0xbc, 0xe9, 0xdf, 0x80, 0x48, 0x90, 0x15, 0x03, 0x93, 0x3a, 0x7f,
-       0xd6, 0x8a, 0xd5, 0x93, 0x8c, 0xdf, 0x7c, 0x9d, 0x3b, 0x37, 0x88, 0x48,
-       0xa0, 0xf3, 0xe5, 0xf3, 0x1c, 0xb2, 0x99, 0x43, 0xc7, 0xfe, 0x97, 0x1c,
-       0x7a, 0xa8, 0x64, 0x21, 0xd7, 0x52, 0xcd, 0x97, 0x5e, 0xc6, 0xe2, 0xef,
-       0x6b, 0x75, 0x7b, 0x3b, 0xc7, 0xa3, 0x07, 0x74, 0x0e, 0xf7, 0x32, 0x87,
-       0x35, 0x9e, 0x2d, 0xb1, 0x69, 0x1c, 0x76, 0x73, 0x10, 0x5a, 0x1f, 0x8e,
-       0x2a, 0xbc, 0xed, 0x2b, 0xf5, 0xf1, 0x32, 0xed, 0x13, 0x39, 0xf8, 0x2c,
-       0xf1, 0x08, 0x12, 0xd2, 0xbb, 0x9e, 0x52, 0x33, 0x7e, 0x2a, 0xfb, 0x2c,
-       0x79, 0xf9, 0x9c, 0xd0, 0xf7, 0x8f, 0xc2, 0x49, 0x6b, 0x3c, 0xf6, 0x5a,
-       0x57, 0x55, 0x70, 0x19, 0x12, 0xaf, 0xac, 0xd5, 0xf3, 0x35, 0x36, 0xa3,
-       0x68, 0x48, 0xce, 0xd2, 0x37, 0x72, 0xa8, 0x51, 0xa8, 0x25, 0xaf, 0xa6,
-       0xab, 0xb8, 0x2c, 0xb2, 0x36, 0xad, 0xe7, 0x59, 0xbd, 0xe3, 0xb2, 0xb0,
-       0xde, 0xac, 0xd6, 0xd1, 0xbd, 0xc4, 0x86, 0xe6, 0xb8, 0xcb, 0xdb, 0xa3,
-       0xd8, 0x47, 0x8c, 0x7a, 0x69, 0x17, 0xc3, 0xac, 0xab, 0xbb, 0x4b, 0xd2,
-       0x1d, 0x26, 0x4e, 0x77, 0xd7, 0x70, 0x3a, 0xcc, 0x5a, 0xba, 0x1b, 0x72,
-       0xaf, 0xae, 0xa5, 0x11, 0xe2, 0x94, 0x34, 0x56, 0xc1, 0xe9, 0x48, 0x0d,
-       0xa7, 0xbd, 0x15, 0x9c, 0xee, 0x36, 0x34, 0x3e, 0x35, 0xf6, 0x36, 0xf1,
-       0xbe, 0x67, 0xa3, 0x30, 0x7e, 0xc0, 0xfd, 0xc3, 0x05, 0xc3, 0x3d, 0x35,
-       0xec, 0xf5, 0x68, 0xec, 0x19, 0x69, 0xdc, 0x63, 0xf0, 0x6e, 0x2f, 0x88,
-       0x42, 0xae, 0x11, 0x32, 0x3b, 0x2c, 0x0a, 0x9d, 0xf3, 0x88, 0xbd, 0x67,
-       0x38, 0xa3, 0x81, 0xd8, 0xab, 0xfa, 0x4c, 0xcf, 0x8f, 0x11, 0x7b, 0xff,
-       0x29, 0xce, 0x46, 0x34, 0xd7, 0xea, 0xd8, 0x02, 0x8b, 0x4e, 0x68, 0xae,
-       0x8d, 0x92, 0x30, 0x2c, 0xe4, 0x4b, 0xc6, 0xe2, 0x04, 0x14, 0xb6, 0x92,
-       0xdb, 0xde, 0xf4, 0x76, 0xf9, 0x2d, 0xb8, 0x01, 0xa7, 0xbb, 0x0c, 0x68,
-       0x1d, 0x62, 0x4e, 0x54, 0xb1, 0x7b, 0x17, 0x39, 0xa3, 0x29, 0x90, 0x9d,
-       0x67, 0xa9, 0x37, 0xb6, 0xa4, 0x1b, 0x50, 0xf2, 0x86, 0xc3, 0x66, 0x56,
-       0x43, 0x9b, 0xe7, 0xae, 0x86, 0xae, 0x85, 0x71, 0x58, 0xed, 0x36, 0x1a,
-       0x8e, 0x7a, 0xb9, 0x13, 0x42, 0xe3, 0x15, 0xe8, 0x3a, 0x6e, 0xd3, 0x7e,
-       0x38, 0xf5, 0x81, 0x97, 0xf9, 0xc0, 0x7c, 0x5c, 0x9c, 0x75, 0xaa, 0xf5,
-       0xa0, 0x6f, 0x5c, 0x63, 0xec, 0x57, 0xea, 0x4d, 0xcf, 0xc0, 0x1d, 0xdd,
-       0x4a, 0x79, 0x4b, 0xa3, 0x88, 0x4c, 0xd8, 0xa8, 0x3b, 0xd8, 0x8a, 0x97,
-       0xba, 0x22, 0x38, 0x7b, 0xab, 0xfe, 0x3e, 0x8a, 0x7a, 0xe2, 0x70, 0xd3,
-       0xb5, 0x51, 0x2c, 0x99, 0xa8, 0x62, 0xb2, 0xc1, 0xfb, 0x89, 0xb8, 0x8b,
-       0x98, 0x9c, 0xe7, 0x9d, 0x11, 0xdb, 0x9c, 0x0c, 0xf6, 0xd2, 0xa6, 0xd7,
-       0xc9, 0xf1, 0xe7, 0x93, 0xbb, 0x66, 0x2c, 0xda, 0xbf, 0x62, 0x59, 0xa1,
-       0x73, 0x09, 0x22, 0x58, 0x34, 0x21, 0x07, 0x8e, 0xe9, 0x0a, 0x33, 0x6a,
-       0x89, 0x0d, 0xc4, 0xbb, 0xe6, 0x57, 0x93, 0x71, 0xba, 0x62, 0x69, 0xdb,
-       0xd0, 0xcd, 0xb8, 0xa4, 0xce, 0x24, 0x93, 0xd9, 0x51, 0x62, 0x7d, 0xdb,
-       0xf1, 0x08, 0xea, 0x0e, 0xfc, 0x97, 0x32, 0x02, 0xe6, 0x42, 0xb7, 0x22,
-       0x3e, 0x0b, 0x99, 0x7a, 0x72, 0xc8, 0x45, 0xc4, 0xf1, 0xd8, 0xfe, 0x9d,
-       0x6a, 0x09, 0xc7, 0xdf, 0xbb, 0xbe, 0x19, 0x6d, 0xcb, 0x64, 0x7e, 0x2b,
-       0xf7, 0x9f, 0x4d, 0x17, 0x3a, 0x13, 0x8c, 0xdd, 0x49, 0xb8, 0xb8, 0x6a,
-       0x4c, 0xe6, 0x8e, 0xa1, 0x0e, 0xcd, 0x13, 0x5e, 0xf6, 0x84, 0x88, 0xa1,
-       0xf1, 0x44, 0x0c, 0xfb, 0x8e, 0xeb, 0xfc, 0x8c, 0xc1, 0x1a, 0xf3, 0x66,
-       0x3b, 0x44, 0xa1, 0x9f, 0xf9, 0x39, 0xd3, 0x2f, 0xda, 0xd1, 0x3e, 0x2e,
-       0xa7, 0xb3, 0xc2, 0x0b, 0x1f, 0x80, 0x87, 0x76, 0xd6, 0x65, 0xfb, 0x84,
-       0x8b, 0x15, 0xba, 0x7e, 0x94, 0x75, 0xfe, 0xe8, 0x7a, 0x6a, 0xf0, 0x4e,
-       0xa1, 0x58, 0x5f, 0xa9, 0x79, 0xbd, 0x7c, 0xf5, 0xb1, 0xfe, 0x59, 0x62,
-       0xdd, 0xb8, 0xce, 0x2d, 0x03, 0x33, 0xfe, 0x25, 0xb5, 0x3d, 0x99, 0x65,
-       0xad, 0x9b, 0xc7, 0xbc, 0xaa, 0xe6, 0x13, 0x5a, 0x74, 0x6e, 0xcd, 0xab,
-       0xe5, 0x93, 0x85, 0x33, 0x8c, 0xdd, 0xe1, 0xff, 0x73, 0x5d, 0xb2, 0x90,
-       0x38, 0x60, 0xa0, 0xa5, 0x23, 0x8a, 0x6b, 0x96, 0xb6, 0x39, 0xcd, 0x88,
-       0xe2, 0x26, 0xdf, 0x41, 0x13, 0x31, 0xb1, 0x9f, 0x39, 0x85, 0xf9, 0xd5,
-       0x5c, 0x5b, 0xa9, 0xeb, 0x55, 0x2d, 0xd7, 0xf2, 0xa5, 0x04, 0x6b, 0x93,
-       0xae, 0x05, 0xbd, 0xac, 0x05, 0x16, 0x0e, 0x95, 0xb5, 0x6f, 0x1d, 0xbc,
-       0x4b, 0xce, 0x7e, 0xc5, 0xd7, 0xbe, 0x5d, 0x8c, 0x12, 0x73, 0xe3, 0x41,
-       0xe6, 0xc6, 0xda, 0xf2, 0x25, 0xb5, 0xc6, 0xd3, 0xf5, 0x38, 0x64, 0x3d,
-       0xb6, 0xc4, 0x4d, 0xe3, 0x72, 0xd0, 0x15, 0xa7, 0xee, 0x24, 0x36, 0x3b,
-       0x1b, 0x0d, 0xa5, 0x5e, 0x4e, 0xa7, 0x42, 0xea, 0x98, 0xcc, 0xdd, 0x42,
-       0xba, 0xef, 0x93, 0x9b, 0xd6, 0x9a, 0x51, 0x2c, 0xaf, 0xe5, 0x60, 0xb2,
-       0x96, 0x83, 0x1e, 0x73, 0xd0, 0x6d, 0x45, 0xf8, 0x09, 0x6d, 0x6c, 0x63,
-       0x0e, 0x6e, 0xa3, 0x4e, 0xfd, 0x7e, 0xa9, 0xc2, 0xfb, 0x99, 0x15, 0x22,
-       0x35, 0x73, 0x9e, 0xf9, 0xe4, 0x5e, 0xe6, 0x51, 0xaf, 0xb5, 0x65, 0xce,
-       0x33, 0x66, 0xab, 0x6b, 0xf9, 0xb4, 0xbb, 0xc6, 0xfb, 0x0f, 0xd4, 0xf2,
-       0x69, 0xf5, 0x97, 0xf2, 0x49, 0xf3, 0xd3, 0x0b, 0xbf, 0x43, 0xab, 0xd6,
-       0x22, 0x79, 0xa1, 0xef, 0x97, 0xb3, 0x10, 0xfe, 0xd8, 0xd7, 0x67, 0xd9,
-       0xb0, 0x82, 0xc6, 0x0a, 0xdf, 0x58, 0x41, 0x28, 0x7a, 0x59, 0x3b, 0x6d,
-       0x2f, 0x2f, 0xb2, 0xf4, 0x9d, 0x5e, 0xb7, 0x96, 0xb1, 0xd8, 0x99, 0xfe,
-       0x05, 0xce, 0xb6, 0x2a, 0xd5, 0x97, 0xbe, 0xa4, 0xde, 0x60, 0x5c, 0x62,
-       0xd4, 0x1f, 0xeb, 0x27, 0xb3, 0xa2, 0x7f, 0x52, 0xfb, 0xa6, 0x11, 0x11,
-       0x6f, 0xad, 0x58, 0x35, 0x09, 0xdc, 0x43, 0x3d, 0x73, 0x8e, 0x7e, 0x59,
-       0xe3, 0xcb, 0xa1, 0x35, 0xbc, 0xdb, 0x19, 0xdf, 0xc2, 0xc3, 0xe5, 0xaa,
-       0x7f, 0xf6, 0x95, 0x65, 0x66, 0x1a, 0x23, 0x58, 0xc3, 0x9a, 0x76, 0x98,
-       0x7c, 0xf1, 0x6f, 0xc9, 0x28, 0x5e, 0x24, 0x5f, 0xbc, 0xc4, 0xfb, 0x1d,
-       0xaa, 0xde, 0xcf, 0x9f, 0x45, 0x2a, 0x73, 0x5a, 0xf3, 0x05, 0xb5, 0xf7,
-       0xa1, 0x72, 0x9b, 0x7f, 0x9a, 0x78, 0x7c, 0xb0, 0x24, 0x07, 0xfa, 0x78,
-       0x47, 0xbb, 0x5b, 0xce, 0x0e, 0x0a, 0x81, 0x8d, 0x49, 0x38, 0x66, 0xa0,
-       0xef, 0xe1, 0x52, 0xe3, 0x66, 0xe8, 0x87, 0x02, 0xfa, 0x78, 0xd7, 0x95,
-       0xac, 0x71, 0x8f, 0x95, 0xbf, 0xa4, 0xeb, 0xb0, 0xad, 0xa4, 0xb9, 0x4a,
-       0xa9, 0x8e, 0xb4, 0xd6, 0x4a, 0x79, 0x71, 0xb3, 0xe6, 0x94, 0x48, 0x14,
-       0xca, 0x6f, 0x4b, 0x2c, 0x61, 0xec, 0xf3, 0xc4, 0xd7, 0xbb, 0x5e, 0x3d,
-       0x79, 0x21, 0x24, 0xaf, 0xf7, 0x90, 0xb7, 0x7b, 0x45, 0x5f, 0x85, 0xcf,
-       0xb3, 0x22, 0x3b, 0x69, 0x8b, 0x1e, 0x6a, 0x94, 0x0d, 0xcc, 0x33, 0x77,
-       0xe1, 0x3c, 0x62, 0x4a, 0xe3, 0xca, 0xc0, 0x0f, 0xfc, 0xb5, 0xe4, 0xfc,
-       0x1b, 0xe8, 0x2b, 0xf2, 0x52, 0x05, 0x8b, 0x37, 0x50, 0x27, 0x55, 0xb1,
-       0xf8, 0x43, 0x62, 0x31, 0x57, 0xc3, 0x62, 0x24, 0x48, 0x92, 0xef, 0x3e,
-       0xc7, 0x62, 0xef, 0x1f, 0xe0, 0xf7, 0x2f, 0x62, 0x6e, 0xbd, 0xe6, 0xf7,
-       0xc8, 0x1c, 0xe6, 0x58, 0x9f, 0x3b, 0x02, 0xf2, 0xb0, 0xc6, 0x9b, 0x8d,
-       0xbe, 0x47, 0xeb, 0xb1, 0xe1, 0xd1, 0x18, 0x6e, 0x7e, 0x54, 0xa9, 0xd7,
-       0x7c, 0x78, 0x2d, 0xe4, 0xa2, 0x5f, 0xa4, 0x27, 0x70, 0xa6, 0x25, 0xe9,
-       0xee, 0x83, 0xee, 0xa3, 0x7a, 0xad, 0xdb, 0x8b, 0x5a, 0xa3, 0x84, 0xd4,
-       0x28, 0xb2, 0xff, 0x7d, 0xe6, 0xfa, 0xa6, 0xa4, 0xcc, 0xef, 0xac, 0x70,
-       0x7f, 0xca, 0xa7, 0x16, 0xdf, 0x6b, 0x98, 0x32, 0xdb, 0x6e, 0x54, 0xb1,
-       0x76, 0x4d, 0x0d, 0x6b, 0x5f, 0x9b, 0xb2, 0xf1, 0x4b, 0xd6, 0x85, 0xcd,
-       0xe9, 0x28, 0x56, 0xeb, 0x1a, 0xef, 0xe8, 0x5e, 0x2a, 0x8a, 0x7e, 0xc6,
-       0xc5, 0x58, 0xaa, 0xa8, 0x37, 0xa8, 0x3b, 0x18, 0xcb, 0x55, 0xec, 0xa7,
-       0xce, 0x50, 0x9f, 0xdc, 0x68, 0x56, 0x7b, 0xa9, 0xd1, 0x9a, 0x3e, 0xb9,
-       0xb1, 0xac, 0xf3, 0xd1, 0x25, 0x06, 0xa2, 0x38, 0xcd, 0x35, 0x7b, 0xfc,
-       0xaa, 0x3e, 0x79, 0x1d, 0xa9, 0xac, 0xd6, 0x27, 0x2e, 0x79, 0xbf, 0x54,
-       0xd1, 0x27, 0x5a, 0x8f, 0x68, 0x2d, 0xa2, 0xfb, 0x85, 0x6e, 0xf6, 0x0b,
-       0x72, 0x5a, 0xeb, 0x15, 0xa3, 0x5b, 0xfa, 0x86, 0x19, 0x61, 0x8d, 0xcc,
-       0x30, 0x96, 0x97, 0x61, 0xd7, 0x23, 0x4d, 0x8c, 0x45, 0x23, 0x76, 0x38,
-       0x2b, 0xac, 0x25, 0x9e, 0xe6, 0x4f, 0x6a, 0x90, 0xdf, 0xd3, 0x2e, 0x47,
-       0x35, 0xc7, 0x32, 0xfe, 0x73, 0xe3, 0xff, 0x5e, 0x1b, 0xd7, 0xf3, 0xb3,
-       0xac, 0xd1, 0x7a, 0xcd, 0x8f, 0xac, 0x2a, 0xee, 0xd1, 0xdc, 0xe4, 0xfd,
-       0x19, 0x2e, 0xd0, 0xc6, 0x37, 0xbf, 0x14, 0x47, 0x9b, 0x79, 0xa1, 0xe3,
-       0xf8, 0x09, 0xd7, 0xea, 0x78, 0xdb, 0x78, 0x87, 0x3e, 0x3e, 0x47, 0x1f,
-       0xff, 0xf2, 0xd1, 0x80, 0xdc, 0x84, 0x4f, 0x0d, 0xfa, 0x78, 0x3b, 0x71,
-       0xf3, 0x63, 0xff, 0x7a, 0xb4, 0xb7, 0x26, 0xdd, 0x0f, 0xcc, 0xb9, 0x7a,
-       0x0b, 0x7b, 0x09, 0x7d, 0xa7, 0xe8, 0x67, 0xdd, 0xeb, 0x1c, 0xa3, 0x7f,
-       0x99, 0xcb, 0x15, 0x0d, 0xd2, 0x6e, 0x56, 0xfd, 0xdb, 0x51, 0xf3, 0x6f,
-       0x66, 0x6a, 0x1b, 0xcf, 0xd1, 0xf5, 0x54, 0xeb, 0xd1, 0xfb, 0x2b, 0xfd,
-       0x92, 0x19, 0xdc, 0x5a, 0x89, 0x55, 0x5d, 0x90, 0xb7, 0x5e, 0x2c, 0xea,
-       0x9a, 0xdd, 0xcf, 0x9a, 0xcd, 0x9e, 0xc9, 0x94, 0x83, 0x83, 0x48, 0x4d,
-       0x73, 0xaf, 0xbd, 0xa7, 0x91, 0x0a, 0xd9, 0x4f, 0x0d, 0x9d, 0x67, 0xef,
-       0x93, 0x31, 0x64, 0x6e, 0xa6, 0xa2, 0x27, 0x6f, 0xad, 0xd5, 0xe9, 0xfe,
-       0x9a, 0xae, 0xbc, 0xbf, 0x76, 0x4e, 0x9e, 0xba, 0x72, 0xee, 0x1c, 0x7d,
-       0x97, 0xcb, 0x2d, 0xfd, 0xac, 0xfb, 0x80, 0x37, 0xfc, 0x9f, 0x29, 0x2c,
-       0x6c, 0xac, 0xe8, 0x8e, 0xcf, 0xef, 0x6c, 0x89, 0x8d, 0xe3, 0x17, 0x55,
-       0xa6, 0xe3, 0x2e, 0x13, 0xf5, 0x4a, 0x59, 0xcb, 0x42, 0x14, 0x4b, 0x33,
-       0xaa, 0x18, 0x97, 0x05, 0x0d, 0xca, 0x96, 0xe0, 0x6e, 0xc6, 0x07, 0xb6,
-       0x15, 0x0c, 0x5a, 0x23, 0x45, 0x39, 0xc4, 0x5e, 0x2e, 0xcf, 0x3e, 0x2c,
-       0xdc, 0x0f, 0xad, 0x6f, 0xf5, 0x79, 0x77, 0xeb, 0x3e, 0x8e, 0xef, 0x83,
-       0xb4, 0x67, 0xee, 0xdc, 0x10, 0x8f, 0x95, 0xfe, 0x4a, 0x3d, 0x16, 0x97,
-       0x39, 0xbd, 0x47, 0x84, 0x73, 0x9e, 0xa8, 0xe8, 0xe7, 0x41, 0xad, 0x9f,
-       0x5d, 0x8d, 0xc7, 0x31, 0x4f, 0xce, 0x9e, 0x40, 0x6a, 0xe0, 0x82, 0x29,
-       0xfb, 0x63, 0xd4, 0xcc, 0xeb, 0x6a, 0x7b, 0xad, 0xa8, 0xed, 0xd5, 0x36,
-       0xf5, 0x10, 0xed, 0xd6, 0x78, 0xac, 0xd6, 0x37, 0x23, 0x88, 0xa1, 0x69,
-       0xd4, 0x63, 0x8d, 0x4f, 0xe6, 0x8e, 0xb0, 0xce, 0xc4, 0x8e, 0xef, 0xa8,
-       0xd8, 0xfb, 0xba, 0xff, 0xa4, 0x59, 0xc9, 0xef, 0x13, 0xba, 0x4e, 0x58,
-       0xb0, 0x58, 0x77, 0xae, 0x1c, 0x93, 0xe1, 0x16, 0xf1, 0x91, 0x5a, 0x92,
-       0xf4, 0x12, 0xab, 0x85, 0xd6, 0x3e, 0x49, 0x6a, 0x9f, 0x18, 0x32, 0x27,
-       0xfe, 0x85, 0xf6, 0x69, 0xfd, 0xa6, 0x6b, 0xa1, 0x83, 0x96, 0x51, 0xaf,
-       0xb3, 0xcd, 0x48, 0x52, 0x3b, 0x3b, 0x68, 0xfe, 0x6c, 0x3f, 0x4b, 0xac,
-       0xe2, 0x3e, 0x75, 0x07, 0x1c, 0x5c, 0x33, 0x26, 0x9d, 0xa3, 0xb8, 0x40,
-       0x0e, 0xf7, 0x06, 0xb5, 0x4e, 0xbc, 0x3a, 0x9d, 0x64, 0x4d, 0x77, 0xd0,
-       0xf5, 0xd9, 0x3e, 0x31, 0xd4, 0x8d, 0xe9, 0xb3, 0x0b, 0xd3, 0x26, 0xe3,
-       0xe4, 0x98, 0x47, 0x39, 0xee, 0xa2, 0xfd, 0x44, 0x23, 0xfb, 0x2d, 0xa5,
-       0xfa, 0x59, 0x0f, 0x2c, 0xd6, 0xdc, 0x5e, 0xb4, 0x0f, 0x8e, 0x88, 0xd4,
-       0x40, 0x23, 0x52, 0xfd, 0x31, 0x78, 0xce, 0x3a, 0xa1, 0x7f, 0x63, 0x98,
-       0xd3, 0x24, 0xc0, 0xe3, 0xc5, 0x3f, 0xe7, 0xba, 0xa4, 0xb3, 0x85, 0x18,
-       0x6b, 0xf9, 0xd3, 0x54, 0xbe, 0x05, 0xa9, 0x21, 0x07, 0x9e, 0xfb, 0x3a,
-       0xe7, 0x15, 0xbe, 0x30, 0xef, 0xd9, 0xca, 0x3c, 0xfa, 0xe2, 0x7a, 0xad,
-       0xb5, 0x94, 0x7a, 0x82, 0x7a, 0xab, 0xe0, 0x68, 0xce, 0x11, 0x18, 0xf6,
-       0xf5, 0x9e, 0x3d, 0xae, 0x05, 0x99, 0xb8, 0x03, 0x9f, 0xa8, 0x42, 0x3c,
-       0xec, 0x8c, 0x54, 0x7e, 0x97, 0x90, 0x4e, 0x8e, 0xdc, 0x36, 0x5d, 0xed,
-       0xb3, 0xd8, 0x17, 0x29, 0xf5, 0x22, 0xb9, 0xe9, 0x09, 0x6a, 0x9f, 0xe1,
-       0xa9, 0x4f, 0xd4, 0x34, 0xb5, 0xcd, 0x88, 0xa7, 0xe7, 0x55, 0x39, 0xe8,
-       0xb0, 0xa3, 0xd4, 0xe3, 0xfc, 0x6e, 0xcf, 0xd4, 0x1c, 0x2f, 0xf1, 0x3c,
-       0x72, 0xc2, 0xed, 0xde, 0x7f, 0xab, 0xcd, 0x5f, 0x9a, 0xab, 0xd4, 0x18,
-       0x6d, 0x78, 0xcb, 0xc7, 0xfd, 0x11, 0x24, 0x73, 0xb3, 0xf4, 0xcf, 0x99,
-       0xe5, 0xb2, 0x7f, 0x8a, 0xf7, 0x5c, 0x2f, 0x64, 0x96, 0x77, 0xec, 0x9d,
-       0x07, 0xcd, 0xb5, 0x92, 0xf9, 0x60, 0x78, 0x75, 0x7c, 0xfe, 0x99, 0x2f,
-       0x13, 0x47, 0xf8, 0xbe, 0x39, 0xa3, 0xf7, 0x50, 0xaa, 0xc7, 0xd7, 0x3d,
-       0xfe, 0x08, 0x7b, 0xfc, 0x82, 0x6a, 0xf0, 0xde, 0x50, 0xcf, 0x75, 0xc8,
-       0xfe, 0x11, 0xe1, 0x71, 0xad, 0xcb, 0xba, 0xa0, 0xfb, 0xaa, 0x11, 0xf6,
-       0x55, 0x2e, 0x9e, 0x26, 0xc7, 0x9c, 0x2c, 0x77, 0xe2, 0xf9, 0xb2, 0x87,
-       0x67, 0x58, 0x3f, 0x9e, 0x2a, 0x5b, 0xd8, 0xfa, 0x88, 0xcc, 0x58, 0x62,
-       0x27, 0xce, 0xfb, 0xd2, 0xf9, 0x1e, 0xed, 0x36, 0x03, 0xb9, 0x7f, 0x25,
-       0x79, 0x85, 0x67, 0x14, 0x72, 0x66, 0x8b, 0xb0, 0x03, 0x1b, 0xdf, 0xe9,
-       0x30, 0x70, 0x38, 0x3e, 0x84, 0xbe, 0xf6, 0xbb, 0xf9, 0xb2, 0xd0, 0x7a,
-       0x40, 0xd7, 0x6a, 0xdd, 0x6f, 0x34, 0xe3, 0x4e, 0xf2, 0xd9, 0xd5, 0x4b,
-       0x43, 0xfc, 0x3a, 0xdd, 0xd6, 0xf9, 0x92, 0xa0, 0x66, 0x68, 0x91, 0x59,
-       0xe0, 0xa7, 0xd8, 0xc8, 0x7e, 0x21, 0xb3, 0x6c, 0x7f, 0xad, 0x37, 0xff,
-       0x29, 0x56, 0xea, 0x3e, 0xc3, 0x6f, 0x66, 0xbd, 0xab, 0xc6, 0xe1, 0x70,
-       0xc5, 0x8f, 0x06, 0x9a, 0x0e, 0x16, 0x54, 0xbd, 0x27, 0x73, 0x93, 0x15,
-       0x1d, 0xb5, 0xd0, 0xb9, 0x91, 0x7d, 0x40, 0xc3, 0x01, 0xcf, 0x5d, 0x27,
-       0x14, 0x63, 0xb1, 0x9b, 0xb1, 0x48, 0x86, 0x31, 0xb6, 0xdb, 0xcd, 0x41,
-       0x32, 0x6c, 0x16, 0x79, 0x71, 0x8b, 0xae, 0xb1, 0x75, 0xf5, 0xec, 0xbf,
-       0x59, 0x53, 0x27, 0x0d, 0xf6, 0x23, 0xba, 0x1f, 0x8f, 0x62, 0x2a, 0xdd,
-       0xc6, 0x3e, 0x29, 0x8a, 0xed, 0xe9, 0x1e, 0xea, 0x1a, 0x03, 0xc6, 0xc1,
-       0x4b, 0x6a, 0xe5, 0x17, 0xfa, 0x88, 0x4d, 0xe3, 0x9a, 0xc3, 0x6c, 0xb1,
-       0x91, 0xf9, 0x9b, 0x59, 0x46, 0xb1, 0x76, 0x8b, 0xee, 0xe1, 0xf5, 0x1d,
-       0x1c, 0xf6, 0xc7, 0x06, 0xa6, 0x17, 0x38, 0xd8, 0xd5, 0x2d, 0x13, 0x05,
-       0xe8, 0x5c, 0xfe, 0x6a, 0x4d, 0x81, 0x93, 0xfd, 0xbd, 0x3a, 0x03, 0x67,
-       0x03, 0x6d, 0x91, 0x75, 0x4a, 0xb5, 0xa6, 0x4d, 0xe4, 0x2a, 0xf5, 0x26,
-       0xe1, 0x64, 0xd9, 0xff, 0xcd, 0x4c, 0xb1, 0x27, 0x3b, 0xa8, 0xd4, 0x4e,
-       0x62, 0xe9, 0xe3, 0x8e, 0xe1, 0x43, 0xec, 0xc4, 0xf7, 0xb6, 0xb2, 0xb7,
-       0xfa, 0x3a, 0xdb, 0xb7, 0xb7, 0x8a, 0xdf, 0x24, 0x7f, 0x1b, 0xdd, 0x09,
-       0xe8, 0x7e, 0xa7, 0xa0, 0x22, 0x9e, 0x37, 0xfb, 0x38, 0xb5, 0xe0, 0x6f,
-       0x96, 0x75, 0xc1, 0x9d, 0x5f, 0xf5, 0xd5, 0x6a, 0x6a, 0xa9, 0x8f, 0xc8,
-       0xf9, 0x61, 0xe5, 0x73, 0xcc, 0x59, 0x37, 0x7e, 0x49, 0x6d, 0xa6, 0x6f,
-       0x7a, 0xaa, 0x76, 0x59, 0xf5, 0x01, 0x9b, 0xc4, 0x6b, 0xe1, 0xac, 0xf9,
-       0x03, 0x36, 0x7d, 0x5e, 0xef, 0x62, 0xce, 0x9a, 0xf1, 0xc5, 0xb4, 0x51,
-       0xba, 0xd3, 0x15, 0xfc, 0xf8, 0xf8, 0xc8, 0x1b, 0x4e, 0xcc, 0x47, 0xa1,
-       0x93, 0x39, 0x36, 0xfb, 0x4f, 0x1c, 0x6b, 0x5f, 0x0a, 0xfc, 0xa6, 0xfc,
-       0x5d, 0xf2, 0xbe, 0xd1, 0xd5, 0x82, 0xc2, 0x0c, 0x6d, 0x3c, 0xf4, 0x75,
-       0x62, 0x32, 0x3f, 0x86, 0xfb, 0xd8, 0x46, 0xe0, 0x59, 0xd6, 0xdb, 0x63,
-       0xe4, 0x8c, 0xe6, 0xb4, 0x83, 0x32, 0x9f, 0x8f, 0x94, 0x92, 0x83, 0xa7,
-       0x99, 0xb7, 0xc7, 0xf9, 0x7c, 0x94, 0xf7, 0xdc, 0x4a, 0x7d, 0x77, 0xef,
-       0x78, 0x3d, 0xbe, 0x3d, 0x1e, 0xc3, 0xd6, 0xf1, 0x80, 0x9a, 0x02, 0xb7,
-       0x35, 0x72, 0xdf, 0x57, 0x89, 0xe7, 0xcd, 0x4b, 0xaf, 0xc3, 0x5a, 0x27,
-       0xe9, 0xde, 0xcd, 0xdc, 0xab, 0x3b, 0x08, 0xc7, 0x21, 0x8e, 0xfe, 0xd9,
-       0x5b, 0x2e, 0xd0, 0x44, 0xbd, 0xbf, 0xd4, 0x12, 0xeb, 0xc7, 0x57, 0x57,
-       0x9e, 0x47, 0xd2, 0x79, 0x6a, 0x0b, 0x62, 0xb2, 0x44, 0x4c, 0x32, 0x36,
-       0x4f, 0x97, 0x88, 0x4b, 0x6a, 0xc3, 0x93, 0x25, 0x8d, 0x6d, 0x1f, 0xcf,
-       0x75, 0x0c, 0xa9, 0x2a, 0x56, 0x3e, 0x55, 0x4f, 0x78, 0xaf, 0x45, 0x50,
-       0x6f, 0xe9, 0xdf, 0x76, 0xf0, 0x66, 0x31, 0xe1, 0x6c, 0x28, 0x6b, 0x3c,
-       0xfc, 0x6d, 0x0d, 0x0f, 0x6f, 0x47, 0xaa, 0xfa, 0x44, 0xce, 0x4c, 0x42,
-       0x73, 0xdd, 0x62, 0xe7, 0xa6, 0xd2, 0xf0, 0x34, 0x7d, 0x9f, 0xa7, 0xc6,
-       0x76, 0xdf, 0x67, 0xc8, 0xc7, 0xa6, 0x8c, 0x2e, 0xf6, 0xd4, 0xf4, 0x87,
-       0xbe, 0x33, 0xf3, 0x37, 0x2d, 0x3b, 0x75, 0x4c, 0x8e, 0x17, 0x71, 0x2b,
-       0xfb, 0x1e, 0x3f, 0x44, 0xf5, 0x6e, 0x53, 0xbc, 0xf3, 0x43, 0xbc, 0xf3,
-       0x0f, 0xf9, 0x3c, 0x51, 0x4a, 0x66, 0x7b, 0x78, 0xe7, 0x27, 0xf9, 0x3c,
-       0x59, 0x6a, 0xad, 0xd3, 0x67, 0x4c, 0x4e, 0x85, 0xac, 0x03, 0x2f, 0xab,
-       0x52, 0xbc, 0x12, 0x0e, 0xf6, 0xc0, 0x06, 0x1a, 0x0e, 0xce, 0xf1, 0xb3,
-       0xfe, 0x6d, 0x49, 0xd7, 0x38, 0xcd, 0xf9, 0x83, 0xba, 0x26, 0x67, 0xae,
-       0x14, 0x97, 0xd4, 0x47, 0x9e, 0x0c, 0x9f, 0xc6, 0x29, 0x35, 0x1f, 0xa9,
-       0x99, 0xf9, 0x42, 0x4e, 0xaf, 0x30, 0xa4, 0xbb, 0xc8, 0xac, 0x72, 0x75,
-       0x67, 0x8d, 0xab, 0xbd, 0xa9, 0x1b, 0xeb, 0xaa, 0x77, 0x48, 0x39, 0x47,
-       0x30, 0x8f, 0xd8, 0xd7, 0x35, 0x55, 0xf3, 0x8f, 0xfe, 0x4c, 0x7d, 0x67,
-       0x85, 0x09, 0x93, 0x7e, 0x08, 0x6f, 0xd5, 0x63, 0xd1, 0xda, 0x6f, 0x3e,
-       0x29, 0x5f, 0xf7, 0x82, 0xd3, 0xf1, 0x1e, 0x7e, 0xa7, 0x7b, 0xc1, 0x4f,
-       0x54, 0x2e, 0xde, 0xf3, 0x19, 0x67, 0x15, 0xd0, 0x45, 0xed, 0xf1, 0x3e,
-       0x39, 0xa1, 0x83, 0x2a, 0x4a, 0xe0, 0x14, 0xfb, 0xb0, 0x23, 0x5d, 0x49,
-       0x67, 0x17, 0xf7, 0x0b, 0x1d, 0x87, 0x5c, 0xb0, 0x93, 0x3a, 0x93, 0x73,
-       0xca, 0x1d, 0x5c, 0xa3, 0xb9, 0xf0, 0x3e, 0xfa, 0xe6, 0xb7, 0xed, 0x96,
-       0xe7, 0x63, 0x57, 0xe9, 0x39, 0xc3, 0xf2, 0xb4, 0x5f, 0x52, 0x99, 0x5d,
-       0xb4, 0xe7, 0x2c, 0xed, 0x89, 0x78, 0x21, 0xb9, 0x31, 0x55, 0x59, 0x5f,
-       0xb0, 0xb4, 0x1d, 0x15, 0x7b, 0x38, 0xa6, 0x39, 0x4f, 0xf6, 0x9f, 0x62,
-       0x8d, 0xdd, 0x02, 0xfd, 0x3b, 0x85, 0xb6, 0xa1, 0x2d, 0xb1, 0x85, 0xf6,
-       0x1c, 0x8e, 0x57, 0xf8, 0x94, 0xdf, 0xf1, 0xbc, 0x92, 0xb1, 0xbe, 0x9e,
-       0x78, 0xbf, 0x22, 0x9d, 0x60, 0x6c, 0xbb, 0xa8, 0xef, 0xab, 0x71, 0xde,
-       0x57, 0xc1, 0xf2, 0xff, 0x00, 0xb0, 0x60, 0x72, 0xf9, 0x60, 0x17, 0x00,
-       0x00, 0x00 };
-
-static const u32 bnx2_TPAT_b06FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_TPAT_b06FwRodata[(0x0/4) + 1] = { 0x0 };
-
-static struct fw_info bnx2_tpat_fw_06 = {
-       /* Firmware version: 4.6.16 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0x10,
-
-       .start_addr                     = 0x08000488,
-
-       .text_addr                      = 0x08000400,
-       .text_len                       = 0x175c,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_TPAT_b06FwText,
-       .gz_text_len                    = sizeof(bnx2_TPAT_b06FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_TPAT_b06FwData,
-
-       .sbss_addr                      = 0x08001b80,
-       .sbss_len                       = 0x44,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08001bc4,
-       .bss_len                        = 0x450,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x00000000,
-       .rodata_len                     = 0x0,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_TPAT_b06FwRodata,
-};
-
 /* Initialized Values for the TX Patch-up Processor. */
 static const struct cpu_reg cpu_reg_tpat = {
        .mode = BNX2_TPAT_CPU_MODE,
@@ -3570,882 +71,6 @@ static const struct cpu_reg cpu_reg_tpat = {
        .mips_view_base = 0x8000000,
 };
 
-static u8 bnx2_TXP_b06FwText[] = {
-       0xad, 0x7b, 0x0f, 0x70, 0x54, 0xe7, 0x75, 0xef, 0xef, 0xee, 0x1f, 0x69,
-       0x57, 0x5a, 0xad, 0x2e, 0x78, 0xc1, 0xab, 0x54, 0x29, 0x7b, 0xd9, 0xbb,
-       0xd2, 0x1a, 0x09, 0xb8, 0x0b, 0xc2, 0x88, 0xe8, 0xd6, 0x6c, 0x85, 0x00,
-       0x21, 0x64, 0x2c, 0x63, 0x25, 0x15, 0x7d, 0x9e, 0x5a, 0x0f, 0x64, 0x23,
-       0xdb, 0xd8, 0x16, 0x35, 0x6d, 0xe5, 0xd4, 0xad, 0xd6, 0x92, 0xc0, 0xc2,
-       0xac, 0xb8, 0x22, 0x0b, 0x11, 0xee, 0xf4, 0xbd, 0xc8, 0x96, 0xb0, 0xb0,
-       0xb3, 0x62, 0xed, 0xa4, 0xaf, 0xd3, 0xcc, 0x34, 0xe3, 0x7d, 0xfe, 0x83,
-       0x49, 0x1e, 0xb6, 0xd3, 0x4e, 0xe7, 0x3d, 0xa7, 0xf3, 0xde, 0x84, 0x17,
-       0x63, 0x62, 0xa7, 0x89, 0xed, 0xe6, 0xa5, 0xf3, 0x44, 0xea, 0xf8, 0xbe,
-       0xdf, 0xb9, 0x77, 0x17, 0x88, 0x9b, 0x4e, 0x67, 0x3a, 0x4f, 0x33, 0x9a,
-       0xd5, 0xde, 0x3f, 0xdf, 0x77, 0xce, 0xf9, 0xce, 0xf9, 0x9d, 0xdf, 0x39,
-       0xdf, 0xa7, 0x06, 0xa0, 0x0a, 0xa5, 0x9f, 0x1a, 0xfe, 0xb6, 0x0c, 0x0d,
-       0x1f, 0x4a, 0xad, 0xb9, 0x75, 0x0d, 0xff, 0xbc, 0x15, 0x6a, 0x85, 0x4f,
-       0x6e, 0xde, 0xaa, 0x00, 0xfd, 0x3f, 0xc6, 0xbf, 0xeb, 0xe7, 0xf3, 0xff,
-       0xbe, 0xd7, 0x9c, 0x1f, 0x2f, 0xa0, 0x96, 0xe5, 0x92, 0x5f, 0x04, 0x3c,
-       0xe6, 0xcc, 0x17, 0xda, 0x75, 0x04, 0xbc, 0x66, 0xaf, 0xb9, 0x4f, 0x07,
-       0xd2, 0xf9, 0xa6, 0xd8, 0x16, 0xfc, 0xd2, 0xce, 0x44, 0x7c, 0x90, 0xeb,
-       0x9f, 0x37, 0x3f, 0x19, 0xf9, 0xf6, 0x46, 0xed, 0xe3, 0x19, 0x2f, 0x02,
-       0xaa, 0x79, 0x1a, 0x6a, 0x03, 0x02, 0xf5, 0x7c, 0xe7, 0xcf, 0x1b, 0xfd,
-       0x5e, 0x84, 0xcb, 0x63, 0xb5, 0x62, 0xcc, 0x42, 0x26, 0x60, 0x0e, 0xa1,
-       0x72, 0x03, 0xf0, 0x5e, 0x36, 0x61, 0x8c, 0x01, 0x53, 0x1e, 0x33, 0x11,
-       0x7b, 0x05, 0x06, 0x0e, 0x17, 0x62, 0xe8, 0xe0, 0xef, 0x0e, 0xeb, 0x53,
-       0x3b, 0xe6, 0x47, 0xc6, 0xcb, 0xe7, 0xf6, 0xb6, 0x00, 0x5b, 0xb3, 0x06,
-       0x8e, 0x58, 0x08, 0xd4, 0x99, 0x8f, 0x63, 0x13, 0x3f, 0xc3, 0xe6, 0x30,
-       0xde, 0x9a, 0x8c, 0xc7, 0x9e, 0x83, 0xd6, 0xa7, 0x7b, 0xb5, 0x61, 0xa0,
-       0x69, 0x70, 0x40, 0xd1, 0xfa, 0xdf, 0x56, 0xb4, 0x9e, 0x49, 0x05, 0x01,
-       0x85, 0xcf, 0x35, 0xe5, 0xe5, 0x73, 0x18, 0xab, 0xf2, 0x01, 0x5c, 0xf2,
-       0xca, 0xfc, 0xbf, 0x45, 0x7b, 0x2b, 0xf0, 0xe9, 0xad, 0x18, 0xa7, 0x0c,
-       0x7e, 0x53, 0xc1, 0xb3, 0x2d, 0x89, 0xe8, 0x28, 0xe4, 0x7e, 0x0c, 0x5b,
-       0x0a, 0xf2, 0xa9, 0x51, 0x6b, 0xdb, 0x1e, 0x37, 0x6c, 0xfb, 0x8c, 0x51,
-       0x89, 0x8c, 0xaa, 0x45, 0x01, 0x05, 0xa3, 0x86, 0x07, 0x69, 0xb5, 0x3d,
-       0xe6, 0x83, 0x16, 0xbd, 0x17, 0xff, 0x4c, 0x9d, 0xd3, 0x49, 0x3f, 0xdc,
-       0xe7, 0xfb, 0x51, 0x89, 0xa2, 0xea, 0x5a, 0xed, 0xd9, 0xac, 0x6d, 0x9f,
-       0xd7, 0x7d, 0x38, 0x43, 0xfb, 0x8c, 0xe6, 0xff, 0xd9, 0x2e, 0xd2, 0x36,
-       0xe3, 0x7a, 0x79, 0xfe, 0x00, 0x66, 0x54, 0xdb, 0x9e, 0xe5, 0xbd, 0x23,
-       0xf9, 0xb2, 0x9d, 0x6d, 0xdb, 0xa3, 0xdb, 0xf6, 0x3e, 0xfd, 0x17, 0xf6,
-       0xde, 0x5f, 0x79, 0xd6, 0xb6, 0x9f, 0x32, 0x6e, 0xc2, 0xd9, 0x5c, 0x87,
-       0xd2, 0x35, 0xbf, 0x3c, 0xbc, 0x63, 0xda, 0xc6, 0x79, 0x03, 0xaa, 0xc7,
-       0xdc, 0xa6, 0xec, 0x98, 0xef, 0x54, 0xb6, 0x16, 0x76, 0x2b, 0xdb, 0x66,
-       0x7f, 0x57, 0xe9, 0x9c, 0xef, 0x57, 0xb6, 0x17, 0xa2, 0x98, 0xb3, 0x22,
-       0x98, 0xb5, 0xfa, 0x94, 0x8e, 0xf9, 0x5e, 0xc5, 0xd5, 0x63, 0x58, 0x69,
-       0x2f, 0x94, 0xc7, 0xba, 0x6e, 0xc7, 0x1d, 0x59, 0x13, 0x13, 0x56, 0x25,
-       0xe7, 0x59, 0xb4, 0xbf, 0xdd, 0xb8, 0x48, 0x3d, 0x0d, 0x1c, 0x2d, 0x3c,
-       0x85, 0xdb, 0xa7, 0x6d, 0x3b, 0x9f, 0x02, 0xf2, 0x05, 0xe0, 0xeb, 0x56,
-       0xbc, 0x67, 0x50, 0xb1, 0xed, 0xed, 0x09, 0x7b, 0xc5, 0x15, 0xa3, 0x29,
-       0xf9, 0x1a, 0xfe, 0xaf, 0x3d, 0x13, 0x41, 0x26, 0xc4, 0x31, 0x8e, 0x71,
-       0xcd, 0x1e, 0x98, 0x44, 0xa0, 0xd2, 0x1c, 0xc7, 0x8f, 0xb2, 0x08, 0x54,
-       0x98, 0x19, 0x9c, 0xcf, 0x8e, 0xaa, 0x01, 0xc4, 0xa3, 0x3b, 0x94, 0xcc,
-       0xb0, 0x07, 0xda, 0xd0, 0xbb, 0xd0, 0x62, 0x5c, 0x8f, 0x0b, 0xaf, 0x2a,
-       0x5a, 0xf1, 0x35, 0x68, 0xe9, 0x5f, 0x28, 0x5a, 0x67, 0x9d, 0x17, 0x69,
-       0x4f, 0x22, 0x80, 0x6f, 0x37, 0xca, 0x9a, 0x8c, 0x63, 0x8d, 0xb3, 0x36,
-       0x19, 0xdc, 0x72, 0x6d, 0x6d, 0x4c, 0x8c, 0x52, 0xae, 0x23, 0x94, 0xeb,
-       0x75, 0x43, 0x8b, 0x3e, 0x0b, 0x7b, 0xc5, 0x80, 0x21, 0xf7, 0x4c, 0x8c,
-       0x17, 0xec, 0x58, 0xd8, 0xbc, 0x44, 0x79, 0x91, 0xf9, 0x9c, 0x19, 0xc8,
-       0xd4, 0x9a, 0xbf, 0xb4, 0xdf, 0xdc, 0x10, 0xc5, 0xcb, 0x85, 0x08, 0x5e,
-       0x2a, 0xa8, 0x78, 0xb1, 0xd0, 0x01, 0xab, 0x80, 0xf0, 0xed, 0x85, 0x5f,
-       0xe7, 0xc7, 0x36, 0x42, 0x7c, 0x9e, 0x72, 0x87, 0x77, 0x16, 0x7c, 0xfd,
-       0x15, 0x26, 0x7a, 0xbe, 0x93, 0x1d, 0xb1, 0xab, 0x74, 0xf4, 0x2f, 0x31,
-       0xf5, 0xf4, 0x2a, 0x25, 0xd4, 0x4a, 0x3f, 0xec, 0x79, 0x23, 0xdf, 0xea,
-       0xd3, 0x8f, 0x07, 0xe1, 0xa7, 0xfd, 0xb7, 0x16, 0x6c, 0x7b, 0xcc, 0x38,
-       0xb8, 0x76, 0x6f, 0xeb, 0x37, 0x8b, 0x3d, 0x7a, 0x37, 0x32, 0x85, 0x01,
-       0x20, 0x6c, 0xf2, 0x93, 0xa1, 0xb8, 0xbb, 0xb9, 0x23, 0x76, 0xae, 0xdf,
-       0xe7, 0xfa, 0x33, 0x65, 0xa0, 0xdd, 0x5f, 0xb2, 0x28, 0x83, 0xf5, 0x47,
-       0x61, 0x54, 0xc5, 0xa8, 0xdf, 0xf7, 0x28, 0x67, 0x12, 0xdf, 0x28, 0xe8,
-       0x94, 0xad, 0x99, 0x32, 0xc6, 0x28, 0x5f, 0x00, 0x7b, 0x73, 0xda, 0x54,
-       0x06, 0xda, 0xc4, 0x0c, 0x56, 0x23, 0x1d, 0x51, 0xe9, 0x83, 0x7f, 0x06,
-       0x77, 0x8c, 0x6e, 0x1c, 0xb7, 0xb0, 0x4e, 0x35, 0xb9, 0xbe, 0x29, 0x3c,
-       0x5e, 0x81, 0x44, 0xff, 0xc7, 0x8a, 0x82, 0x37, 0x13, 0xdd, 0x98, 0xa4,
-       0x3e, 0xdd, 0xf9, 0x20, 0x1e, 0xcc, 0x55, 0xe1, 0xfe, 0x9c, 0x8d, 0x07,
-       0x52, 0x30, 0xab, 0xa8, 0x4f, 0x32, 0x95, 0x88, 0xbd, 0x0f, 0x1f, 0x3a,
-       0xf2, 0xdd, 0x8c, 0xa5, 0x2d, 0x48, 0x57, 0x04, 0xb0, 0x25, 0x1f, 0x62,
-       0x3c, 0xa6, 0x71, 0x7a, 0x3a, 0x00, 0xff, 0x7a, 0x0f, 0x66, 0x22, 0x15,
-       0x48, 0x36, 0x78, 0xf8, 0x1b, 0x09, 0xb7, 0x4f, 0xd7, 0x87, 0xb7, 0x5a,
-       0x3e, 0xec, 0xb7, 0x3c, 0x18, 0xc9, 0xd9, 0x76, 0x87, 0x61, 0xe3, 0xea,
-       0x7a, 0x15, 0xdf, 0xa2, 0xfd, 0x0e, 0x5a, 0x51, 0x9c, 0x2d, 0x3c, 0x49,
-       0x59, 0x22, 0xae, 0xbc, 0x16, 0x65, 0xb7, 0x28, 0xbb, 0x45, 0xb9, 0x2d,
-       0x91, 0xf3, 0x55, 0xc6, 0x8c, 0x41, 0xbd, 0x82, 0x94, 0xa1, 0x1a, 0x83,
-       0x94, 0x23, 0x9e, 0xb2, 0xe1, 0x49, 0x69, 0x99, 0xbd, 0x04, 0xaf, 0x15,
-       0x0d, 0xb6, 0xfd, 0xf1, 0x7a, 0xd1, 0x85, 0x6b, 0xee, 0xe9, 0x96, 0x18,
-       0xfd, 0xed, 0x1a, 0xc6, 0xd5, 0xf7, 0x69, 0xb7, 0xa7, 0x0b, 0x41, 0x0c,
-       0xe7, 0x1c, 0xbf, 0x3d, 0x54, 0x41, 0xb9, 0x45, 0xae, 0x82, 0x9e, 0x60,
-       0x8c, 0x26, 0xfa, 0x18, 0xa3, 0xd8, 0x49, 0x99, 0x1f, 0xb0, 0x22, 0xe1,
-       0x8e, 0xe9, 0x44, 0xeb, 0x6e, 0xc5, 0x87, 0xed, 0xf9, 0xeb, 0x72, 0x52,
-       0x5f, 0x89, 0x41, 0xea, 0xaa, 0x52, 0xbe, 0x08, 0xf6, 0x51, 0xce, 0x97,
-       0x4a, 0x72, 0xce, 0x16, 0x64, 0xae, 0xcf, 0xca, 0x5a, 0x96, 0x13, 0x99,
-       0xa5, 0x66, 0x44, 0x41, 0x55, 0x08, 0xbb, 0xf3, 0xef, 0x70, 0x2d, 0xea,
-       0xf1, 0x4d, 0xae, 0xc1, 0xcb, 0x8c, 0x91, 0x6f, 0x5c, 0xf3, 0x17, 0x59,
-       0x8f, 0x27, 0xb8, 0x0e, 0xda, 0xe9, 0x0c, 0x42, 0xe8, 0x2f, 0xa4, 0x71,
-       0x78, 0x1a, 0xe9, 0x39, 0xe3, 0x18, 0xe3, 0x7d, 0x39, 0xbc, 0x7a, 0x65,
-       0x5a, 0xd5, 0xab, 0xb0, 0x6f, 0x36, 0x82, 0xa1, 0x42, 0x3b, 0xac, 0x5c,
-       0x04, 0x07, 0xe8, 0x9b, 0x1f, 0xa6, 0xd2, 0x0f, 0x84, 0x21, 0xb2, 0x47,
-       0xf0, 0x20, 0xdf, 0x79, 0x6a, 0x3a, 0x82, 0x41, 0xda, 0x68, 0x47, 0x2a,
-       0xd1, 0x1a, 0xe4, 0xb5, 0xfd, 0xbc, 0x76, 0x84, 0xf6, 0x7f, 0xd5, 0x98,
-       0x44, 0x7f, 0x8f, 0x96, 0x04, 0x22, 0xb8, 0xcf, 0x82, 0x4a, 0x17, 0x7e,
-       0x82, 0xf8, 0x96, 0x7c, 0x95, 0xdf, 0xef, 0x2d, 0x54, 0x51, 0xdf, 0x30,
-       0xa2, 0xfa, 0x27, 0xb6, 0xbf, 0xc5, 0xb6, 0xbf, 0x66, 0x24, 0x2e, 0xfc,
-       0xd0, 0xeb, 0xc3, 0x63, 0x05, 0x0f, 0x86, 0x67, 0xab, 0xf0, 0xfb, 0x39,
-       0x1f, 0xee, 0x6c, 0xa8, 0xc2, 0xc1, 0xd9, 0x34, 0xc6, 0xa6, 0xab, 0x30,
-       0x90, 0xc3, 0x8a, 0xfb, 0x8c, 0xb1, 0x25, 0x15, 0xd0, 0x16, 0x3b, 0x90,
-       0xc4, 0x55, 0xae, 0xc3, 0x63, 0xb3, 0xa1, 0x70, 0xdf, 0xb4, 0x8a, 0xe1,
-       0xf9, 0x20, 0x9f, 0xf7, 0xf0, 0xf9, 0x4a, 0x18, 0xeb, 0xe2, 0xc3, 0x2a,
-       0x44, 0xc6, 0x6a, 0x3c, 0x3c, 0x1b, 0xc4, 0x43, 0x39, 0x15, 0x07, 0xa6,
-       0x5b, 0x30, 0x65, 0xa5, 0x71, 0x94, 0xd8, 0xf1, 0xf5, 0x94, 0xd6, 0x73,
-       0x40, 0xd1, 0xd2, 0x5b, 0x95, 0x34, 0x1a, 0x53, 0x7e, 0x5c, 0x22, 0x0e,
-       0xf9, 0x53, 0x4d, 0xad, 0x2f, 0x12, 0x1b, 0x2a, 0xcc, 0x08, 0xbf, 0x6b,
-       0x13, 0x8c, 0xd9, 0xb4, 0xdf, 0xb3, 0x1e, 0x58, 0x26, 0xf1, 0x1b, 0x09,
-       0x77, 0x59, 0x6a, 0xb8, 0xab, 0x50, 0x1f, 0xde, 0x61, 0x45, 0xc3, 0x3b,
-       0x18, 0x5f, 0x5b, 0xc5, 0x1f, 0xad, 0x00, 0x8e, 0xa5, 0x7e, 0x69, 0xf7,
-       0x2f, 0x71, 0xf0, 0x2c, 0x7c, 0xfb, 0xb4, 0x96, 0x99, 0x81, 0x66, 0x30,
-       0x1b, 0x60, 0x72, 0xde, 0xc7, 0xf5, 0x53, 0xb0, 0x44, 0x6f, 0x21, 0x8e,
-       0xab, 0x78, 0x98, 0x98, 0xf2, 0xb7, 0xc4, 0x94, 0x81, 0xe3, 0x71, 0x75,
-       0x0a, 0x41, 0xda, 0x1b, 0xd8, 0x7b, 0x2e, 0xc2, 0x35, 0xef, 0xc4, 0x93,
-       0x94, 0x6b, 0xc7, 0x86, 0x08, 0xee, 0x2f, 0xa8, 0xe1, 0x4e, 0xae, 0xdf,
-       0xfb, 0xf9, 0x68, 0x78, 0x0b, 0xd7, 0xf2, 0xdd, 0xbc, 0x16, 0x2b, 0xe2,
-       0x9f, 0xc4, 0x9f, 0x92, 0xf0, 0x00, 0xf7, 0x1d, 0xf7, 0xa3, 0x18, 0x91,
-       0xb9, 0x68, 0x73, 0xeb, 0x65, 0x3b, 0xa4, 0xeb, 0xa7, 0x0f, 0xd0, 0xd6,
-       0x8f, 0x16, 0x42, 0x78, 0xc8, 0xd2, 0x92, 0xdf, 0x50, 0x42, 0xb4, 0x69,
-       0x80, 0x76, 0x20, 0xc0, 0x2c, 0x97, 0xe7, 0x52, 0x88, 0x2d, 0x77, 0xb1,
-       0xf6, 0xe0, 0xac, 0xf8, 0x09, 0xd7, 0xde, 0xa2, 0x0f, 0xd0, 0x7f, 0xbe,
-       0x71, 0x2d, 0x56, 0x35, 0x35, 0xe3, 0x60, 0x77, 0x92, 0xfe, 0xe2, 0xda,
-       0xe8, 0xc4, 0xb4, 0xd8, 0x41, 0x9b, 0x82, 0x27, 0x8d, 0xb5, 0xeb, 0xfe,
-       0xd6, 0xbe, 0xb4, 0x4c, 0xec, 0xa1, 0x62, 0x84, 0x36, 0x3c, 0x6d, 0xd9,
-       0xf6, 0xd5, 0xf5, 0x3f, 0xb5, 0x5b, 0x6f, 0x16, 0xbb, 0x88, 0xae, 0xdf,
-       0x52, 0x24, 0x8f, 0x2c, 0xd1, 0xc3, 0xff, 0x1f, 0x7c, 0xe5, 0x0f, 0xed,
-       0x7e, 0x47, 0x3f, 0xf1, 0x17, 0x1f, 0x7d, 0xf1, 0x49, 0x8e, 0xed, 0x41,
-       0x3f, 0xc7, 0x7b, 0xc4, 0xb2, 0x3f, 0xaa, 0x33, 0x3f, 0xb5, 0x5b, 0x37,
-       0xea, 0x43, 0x8b, 0xca, 0xff, 0xe0, 0xf5, 0x08, 0x1e, 0x2e, 0xb4, 0xd2,
-       0x76, 0x1d, 0x78, 0xca, 0x12, 0x3c, 0xec, 0x64, 0xbc, 0x45, 0xe9, 0xcf,
-       0xf5, 0xf4, 0x6f, 0x9f, 0xb2, 0xd5, 0xca, 0x63, 0xc7, 0x64, 0x06, 0xdb,
-       0xe9, 0xef, 0x17, 0xb2, 0xf1, 0xd6, 0xe7, 0xa1, 0x65, 0xa8, 0x43, 0xb8,
-       0x93, 0x36, 0xee, 0xb0, 0xb4, 0x4e, 0x59, 0xd3, 0x0e, 0xe2, 0xd2, 0x2b,
-       0xd9, 0x68, 0xb8, 0xbd, 0x20, 0xf6, 0xae, 0x0f, 0x6f, 0x29, 0xdc, 0xca,
-       0xb5, 0x57, 0xb0, 0x69, 0x75, 0x80, 0x38, 0x73, 0x07, 0xdc, 0x75, 0x75,
-       0xd7, 0xee, 0xcd, 0x54, 0x53, 0xff, 0x4f, 0xd1, 0x85, 0xcc, 0x32, 0xf7,
-       0xda, 0x30, 0xaf, 0xd5, 0xae, 0x47, 0xf8, 0x0e, 0xfa, 0xc1, 0x3d, 0xf4,
-       0x83, 0xab, 0xeb, 0x7f, 0x69, 0xc7, 0x6e, 0x72, 0xfd, 0xa0, 0x7d, 0xda,
-       0x17, 0xde, 0x46, 0x3b, 0x6d, 0x35, 0x14, 0xcc, 0x1a, 0x4f, 0xa1, 0xff,
-       0x1a, 0x77, 0x48, 0xcf, 0x9c, 0x35, 0xd2, 0xc4, 0x91, 0x36, 0xf8, 0x96,
-       0x60, 0xe6, 0x79, 0xe3, 0x30, 0x62, 0xae, 0xef, 0xe0, 0x40, 0x2e, 0x88,
-       0xcc, 0x9d, 0x2a, 0xe6, 0x1a, 0x55, 0x3c, 0xc2, 0xb1, 0x3f, 0x4c, 0x35,
-       0x0d, 0xbe, 0x45, 0x1b, 0xcc, 0x2c, 0x91, 0x6b, 0x69, 0xfc, 0x95, 0xf1,
-       0x65, 0xe0, 0x26, 0x77, 0xee, 0x79, 0x89, 0xd1, 0xf9, 0x16, 0x1c, 0x29,
-       0xf4, 0x29, 0x2e, 0x6e, 0x6a, 0x9d, 0x69, 0x7c, 0xcf, 0x16, 0x2c, 0x9d,
-       0x27, 0x86, 0xb4, 0xd3, 0xa7, 0xc6, 0xe9, 0x47, 0xa3, 0xc4, 0x90, 0xed,
-       0xf4, 0xa3, 0x27, 0xf3, 0xa2, 0x53, 0xc2, 0x30, 0xbc, 0x37, 0x33, 0x37,
-       0xd3, 0x3e, 0x96, 0x93, 0xf3, 0x6b, 0x55, 0xfd, 0x30, 0xa6, 0x1c, 0xd9,
-       0x86, 0x95, 0x3b, 0xc8, 0x31, 0x2e, 0xf9, 0x51, 0x1b, 0xd5, 0x1f, 0xc1,
-       0x69, 0xe7, 0x5a, 0x84, 0xef, 0xa6, 0x3d, 0x1e, 0x1d, 0xaa, 0x6a, 0x76,
-       0x30, 0xaf, 0x8a, 0xef, 0x77, 0x2a, 0x3b, 0x98, 0x6b, 0xd3, 0xcc, 0xb5,
-       0x69, 0xe6, 0xda, 0x34, 0xe7, 0x4f, 0x33, 0xc7, 0xb6, 0x17, 0x86, 0x95,
-       0x1e, 0xb1, 0xbb, 0xd8, 0xdf, 0x72, 0xf9, 0x03, 0xb1, 0x27, 0xbc, 0xbd,
-       0xb0, 0xc6, 0xe3, 0x72, 0xba, 0x61, 0xa5, 0xc4, 0x61, 0x02, 0x55, 0x3a,
-       0x73, 0x98, 0x35, 0xac, 0x74, 0x31, 0xcf, 0xf6, 0x39, 0x36, 0x8c, 0x0f,
-       0x5d, 0x66, 0x7e, 0x7d, 0x93, 0xf9, 0x35, 0x9f, 0x62, 0x3c, 0xad, 0xbe,
-       0x6a, 0xf7, 0x2f, 0x73, 0x73, 0xc1, 0x18, 0xe5, 0xfc, 0x1a, 0xd7, 0xaa,
-       0xc8, 0x1c, 0xda, 0xe1, 0x55, 0x70, 0x9f, 0x8e, 0xda, 0x3a, 0x62, 0xe9,
-       0x91, 0x02, 0xf1, 0xdf, 0x88, 0xb7, 0x7e, 0x40, 0x83, 0x1e, 0xd1, 0xfd,
-       0xb8, 0x7a, 0x13, 0x49, 0x8e, 0xde, 0x8e, 0x63, 0xb9, 0x4a, 0x0c, 0xa6,
-       0xd2, 0x4b, 0x03, 0xe4, 0x28, 0x9d, 0x2d, 0x78, 0x9c, 0x53, 0x2b, 0x51,
-       0x33, 0x41, 0x7f, 0x41, 0xfa, 0x38, 0xf3, 0xc3, 0xa4, 0x75, 0x2b, 0xf2,
-       0xcc, 0xa3, 0x73, 0x86, 0x0f, 0x6f, 0xe6, 0xd7, 0x10, 0xdf, 0x12, 0x46,
-       0x48, 0xa9, 0x62, 0xdc, 0x9a, 0xc8, 0x5a, 0x82, 0x4b, 0xb6, 0x3d, 0x27,
-       0x32, 0x24, 0x12, 0xe9, 0x51, 0x08, 0x56, 0xd9, 0x2b, 0xee, 0x4d, 0x55,
-       0x60, 0x53, 0x22, 0x8c, 0x15, 0x7a, 0xbf, 0xd2, 0x59, 0x48, 0x18, 0xaf,
-       0xe2, 0x77, 0x95, 0x7b, 0xe6, 0x4d, 0xc6, 0x74, 0x9f, 0xb2, 0x67, 0xbe,
-       0x0a, 0x97, 0x22, 0x22, 0x23, 0x6a, 0xfd, 0xba, 0x07, 0xef, 0xdd, 0xa5,
-       0x40, 0xd5, 0xd3, 0x38, 0xdf, 0xa2, 0xd2, 0x9f, 0x3a, 0xc9, 0x2d, 0x62,
-       0xf0, 0x2e, 0x44, 0xc3, 0x3b, 0xb9, 0x06, 0xd5, 0x0b, 0xb2, 0x2e, 0x1d,
-       0xb4, 0x55, 0x3d, 0xfd, 0xaf, 0x53, 0xe9, 0xa0, 0x1d, 0xbb, 0x66, 0xa1,
-       0x56, 0x99, 0xbd, 0xca, 0xb6, 0x82, 0x46, 0x3b, 0x89, 0x4d, 0x86, 0xc9,
-       0x91, 0xc4, 0x47, 0xca, 0x6b, 0x28, 0x7e, 0x7a, 0xe3, 0x3a, 0xf6, 0x79,
-       0x24, 0xd6, 0x36, 0xad, 0x36, 0x19, 0x87, 0x1e, 0xca, 0x25, 0x32, 0x04,
-       0x50, 0xdb, 0x68, 0xaf, 0xf8, 0x30, 0xb5, 0xc0, 0x7b, 0x26, 0x8e, 0x17,
-       0xba, 0xb9, 0x2e, 0xcd, 0x25, 0xbf, 0x52, 0xe9, 0x87, 0x1d, 0x1c, 0x5f,
-       0xfc, 0x3b, 0x0d, 0x77, 0x2d, 0x3b, 0xc9, 0x89, 0xfe, 0xb5, 0x35, 0x3c,
-       0xc8, 0x31, 0x64, 0x1d, 0x2b, 0xca, 0x7e, 0x19, 0xbe, 0x67, 0x3a, 0x8d,
-       0xf7, 0x9c, 0x1c, 0x5a, 0xf6, 0xe1, 0x61, 0xa5, 0x93, 0x6b, 0x09, 0xbf,
-       0x3b, 0xfe, 0xae, 0x69, 0xf8, 0x6b, 0x4c, 0xc4, 0xbc, 0xe4, 0x6d, 0x17,
-       0x53, 0x09, 0x75, 0x52, 0xe9, 0xe6, 0x58, 0x8c, 0x2d, 0x62, 0x7d, 0x35,
-       0xfd, 0xa6, 0x83, 0xfa, 0x76, 0x51, 0xdf, 0x2e, 0x67, 0x4e, 0xf1, 0xbb,
-       0x5f, 0x9d, 0x77, 0x4b, 0xe1, 0x1e, 0x47, 0xf7, 0x9d, 0x7c, 0x67, 0x0f,
-       0x65, 0xdd, 0xc3, 0xe7, 0xb7, 0x58, 0xdf, 0xe7, 0x35, 0x91, 0x57, 0xe2,
-       0xfa, 0xc6, 0x5c, 0x25, 0xb1, 0xfd, 0xdd, 0x12, 0x57, 0x40, 0xc6, 0x63,
-       0x4a, 0xec, 0x0f, 0xa1, 0xa7, 0x05, 0x81, 0xa5, 0xe6, 0x50, 0xdb, 0xee,
-       0x06, 0xe2, 0x14, 0x71, 0x32, 0x70, 0x9c, 0x1c, 0x99, 0xd8, 0x3b, 0xd7,
-       0xaa, 0x60, 0xcc, 0xb8, 0x99, 0xf1, 0x67, 0x60, 0xa2, 0xa0, 0x75, 0xc6,
-       0x78, 0xaf, 0x79, 0x52, 0xb8, 0xfb, 0x01, 0xb4, 0x93, 0xaf, 0x45, 0xcd,
-       0x41, 0x44, 0xad, 0x78, 0x74, 0x42, 0xd1, 0x06, 0xb7, 0x40, 0xbb, 0x40,
-       0xcc, 0x1f, 0x9e, 0x55, 0xb4, 0xa1, 0x3a, 0xaf, 0x96, 0x7e, 0xdb, 0xe1,
-       0xcd, 0x07, 0xb0, 0xda, 0xe1, 0x66, 0x83, 0x48, 0x92, 0xa3, 0xee, 0xe4,
-       0x98, 0xfb, 0x37, 0x29, 0xb8, 0x62, 0xfc, 0x94, 0xeb, 0xa4, 0xa5, 0x33,
-       0x8a, 0x81, 0x2c, 0xe3, 0x3f, 0x7a, 0x5c, 0x38, 0xf8, 0x01, 0x72, 0x70,
-       0x04, 0x42, 0x7c, 0x36, 0x3b, 0x19, 0x1f, 0x0e, 0x78, 0xb5, 0x24, 0xf9,
-       0x77, 0x9a, 0x63, 0x1a, 0x05, 0xf2, 0x72, 0xce, 0x11, 0xbb, 0xaf, 0x34,
-       0x66, 0xa2, 0x34, 0xa6, 0x9e, 0x07, 0xe3, 0x62, 0x02, 0xdb, 0x13, 0xcc,
-       0x01, 0xc4, 0xb2, 0xa3, 0xc2, 0xf5, 0x39, 0x5e, 0xe5, 0x71, 0x83, 0xdf,
-       0x87, 0x95, 0x3d, 0x12, 0x33, 0x95, 0x2e, 0x73, 0xab, 0xe5, 0x1c, 0x35,
-       0xe6, 0x21, 0x2c, 0x38, 0x73, 0x0c, 0xc9, 0x1c, 0x43, 0x3f, 0x52, 0xb4,
-       0xe4, 0x39, 0x45, 0x30, 0xb8, 0xa9, 0xef, 0x1c, 0x63, 0xe4, 0x88, 0xa2,
-       0xb5, 0x1e, 0xa3, 0xfa, 0x41, 0x5d, 0xc6, 0x3f, 0x54, 0x9a, 0x67, 0x08,
-       0x8d, 0x79, 0xc6, 0x5f, 0x21, 0xa0, 0x6c, 0xc9, 0xb5, 0x63, 0x6c, 0xb6,
-       0x1d, 0xa3, 0x39, 0x05, 0xf7, 0x18, 0xcb, 0x70, 0xe9, 0x66, 0xa7, 0xfe,
-       0xa8, 0x59, 0xa1, 0xd7, 0x61, 0x44, 0x45, 0xad, 0x47, 0xff, 0x3c, 0xf6,
-       0x96, 0xb8, 0xfb, 0xf6, 0x13, 0x3d, 0xc4, 0x73, 0x1b, 0x1f, 0x30, 0x56,
-       0xe2, 0x4b, 0x90, 0xf6, 0x9b, 0xad, 0xe4, 0xd9, 0x4b, 0xbd, 0x6e, 0x3c,
-       0xff, 0x7d, 0xc0, 0x5d, 0x03, 0xb1, 0xff, 0x67, 0xef, 0xb5, 0xe3, 0xe9,
-       0x5c, 0x05, 0x5a, 0xd7, 0xe3, 0xce, 0x28, 0x6a, 0x3c, 0xcc, 0x5d, 0xef,
-       0xec, 0x56, 0x1e, 0xe6, 0x3d, 0xe7, 0xd9, 0xc0, 0x6f, 0x98, 0x1f, 0xb7,
-       0xfd, 0x71, 0xa3, 0x5c, 0x97, 0x67, 0x6f, 0xbc, 0xae, 0x9a, 0xff, 0xf2,
-       0xba, 0x82, 0x17, 0x08, 0x50, 0x5f, 0x67, 0xae, 0xc8, 0x67, 0x6d, 0x78,
-       0x4d, 0x1f, 0x06, 0x27, 0x63, 0x38, 0xb0, 0x10, 0xc1, 0x42, 0x56, 0xeb,
-       0xbf, 0xc4, 0xba, 0x60, 0x6f, 0x8b, 0x8e, 0x87, 0x16, 0xa2, 0x98, 0xcf,
-       0xc2, 0x0e, 0x9a, 0x7a, 0x31, 0xa8, 0x24, 0xb1, 0x7f, 0xa1, 0x1e, 0xe7,
-       0xb2, 0xfa, 0x85, 0x51, 0x25, 0x31, 0x5c, 0x47, 0x3e, 0xf1, 0xc8, 0x42,
-       0x33, 0x1e, 0x5e, 0x08, 0xf0, 0x1d, 0x1b, 0x5d, 0xa9, 0x7a, 0x3e, 0xef,
-       0xc1, 0xf3, 0x27, 0x6d, 0x5b, 0xf8, 0xd4, 0xe0, 0x02, 0x30, 0x3f, 0xc5,
-       0x1c, 0x73, 0x86, 0xf9, 0xe6, 0x19, 0x60, 0xff, 0x33, 0x1e, 0xcc, 0x4e,
-       0xd9, 0xd8, 0x6b, 0x8c, 0xd6, 0x79, 0xe8, 0xe4, 0xfd, 0xcc, 0x07, 0x7e,
-       0xe6, 0xb6, 0x7b, 0x55, 0x17, 0xa7, 0x2f, 0x11, 0x87, 0x1e, 0x78, 0x26,
-       0x89, 0x77, 0xb2, 0x19, 0x74, 0x91, 0x77, 0x0f, 0x53, 0x96, 0xb7, 0xb3,
-       0xcc, 0x4f, 0x0b, 0x06, 0xde, 0xca, 0x06, 0x38, 0x4f, 0x33, 0x5e, 0xcb,
-       0xca, 0x33, 0xf2, 0x6c, 0x08, 0x03, 0x94, 0xe5, 0xcd, 0x6c, 0x94, 0x73,
-       0x46, 0xf0, 0x1d, 0x3e, 0x77, 0xff, 0x82, 0xce, 0x7c, 0x14, 0xe0, 0xbc,
-       0x31, 0xbc, 0x91, 0x0d, 0x51, 0xd6, 0x08, 0x73, 0xd0, 0x00, 0xc6, 0xb2,
-       0x4d, 0x17, 0xb6, 0x90, 0xb3, 0xb8, 0x39, 0x44, 0xae, 0x5d, 0xb6, 0xbb,
-       0x9d, 0x98, 0x93, 0x79, 0xca, 0xf3, 0x0e, 0x60, 0x34, 0xfb, 0x9a, 0xb7,
-       0x5c, 0x27, 0xbf, 0x30, 0xb5, 0xe8, 0x70, 0xba, 0xe7, 0x2d, 0xfe, 0x3d,
-       0x0b, 0x9c, 0xb3, 0x32, 0x76, 0xad, 0x49, 0x0e, 0xcb, 0xdc, 0xf3, 0xc3,
-       0x0d, 0xcd, 0x9c, 0x57, 0xef, 0x7f, 0x45, 0x91, 0x3a, 0xc6, 0x87, 0xd8,
-       0x33, 0x62, 0x2f, 0xc6, 0xf1, 0x3c, 0xf0, 0x57, 0xe4, 0x95, 0x8d, 0x93,
-       0x9a, 0xf8, 0x7d, 0x1f, 0xf9, 0x4a, 0x4f, 0x11, 0x0d, 0xc9, 0x87, 0x30,
-       0x62, 0x57, 0x90, 0x77, 0xd7, 0x92, 0xaf, 0x2e, 0x34, 0x33, 0xff, 0x6c,
-       0xb0, 0xed, 0xef, 0xb7, 0xc0, 0xf6, 0x98, 0xba, 0x51, 0xe7, 0x2d, 0x7e,
-       0xbe, 0x06, 0xfa, 0x85, 0xb0, 0xa2, 0x17, 0x7f, 0x88, 0xc4, 0xd0, 0xab,
-       0x10, 0xbb, 0x02, 0x6b, 0x16, 0x7c, 0x58, 0x4b, 0x7d, 0xb6, 0x4e, 0x72,
-       0x6e, 0xf2, 0x8e, 0x04, 0x75, 0xba, 0x7d, 0x92, 0x5c, 0x4a, 0x0f, 0x61,
-       0x35, 0x6d, 0x3c, 0x78, 0xca, 0xb6, 0x2b, 0x69, 0xe3, 0x46, 0xae, 0xcf,
-       0x7d, 0x27, 0x6c, 0xbc, 0x62, 0xbc, 0x42, 0x9b, 0x2a, 0xe4, 0x83, 0x2d,
-       0x7c, 0x27, 0xc2, 0xe7, 0x03, 0xd8, 0x3f, 0x29, 0x75, 0x50, 0x3d, 0x9f,
-       0xb9, 0x88, 0x63, 0xd9, 0x24, 0x9a, 0x69, 0xbf, 0x18, 0xc7, 0x6c, 0xe2,
-       0x3b, 0xb1, 0x05, 0x37, 0x97, 0xc4, 0x16, 0x7e, 0x1d, 0x0e, 0x00, 0xa7,
-       0xa7, 0xb4, 0x89, 0x22, 0xb9, 0x74, 0x8d, 0x39, 0x02, 0xe6, 0x62, 0xbc,
-       0x3d, 0xa3, 0xe0, 0xf8, 0x14, 0x6b, 0xb7, 0x0d, 0xb0, 0xab, 0xa8, 0xc7,
-       0x5b, 0x33, 0xbf, 0x89, 0xe7, 0x4e, 0x52, 0xf7, 0x67, 0x23, 0xf8, 0x7a,
-       0xd6, 0x87, 0x5b, 0x8e, 0x0b, 0x3f, 0xd3, 0x93, 0x07, 0x14, 0xa9, 0x75,
-       0xa4, 0x06, 0x49, 0xc4, 0xfc, 0x8a, 0x07, 0x0d, 0xcf, 0xf9, 0xa0, 0x9f,
-       0x8b, 0xc1, 0xdf, 0x10, 0x80, 0xde, 0xf0, 0xfb, 0xc4, 0x17, 0x0f, 0x2a,
-       0x58, 0x97, 0x6e, 0xff, 0x4a, 0x92, 0xd7, 0x22, 0xbc, 0x86, 0xdf, 0xac,
-       0x84, 0x77, 0xb9, 0x97, 0xf9, 0xb8, 0x42, 0x27, 0xb7, 0xf2, 0xd9, 0xb6,
-       0x97, 0x78, 0xbf, 0xe7, 0xab, 0xb6, 0x1d, 0x5f, 0x2f, 0xcf, 0xab, 0x88,
-       0x9f, 0xd3, 0xf9, 0x9c, 0x9b, 0x03, 0xaf, 0x73, 0x2b, 0x2f, 0x7d, 0x47,
-       0xe2, 0xf3, 0x71, 0xb8, 0xf5, 0x90, 0xcb, 0xc1, 0x5f, 0x2a, 0x08, 0x4f,
-       0x89, 0x39, 0x3a, 0x9c, 0x9d, 0x52, 0x88, 0x73, 0x26, 0x9f, 0xdd, 0x0c,
-       0x6f, 0x4a, 0x9b, 0xc8, 0x70, 0xed, 0xf7, 0xaa, 0xad, 0x78, 0xc1, 0xf2,
-       0xa3, 0x5a, 0x5f, 0x8e, 0x07, 0x7b, 0x54, 0xbc, 0x40, 0x8e, 0xcf, 0x75,
-       0x4a, 0x16, 0x51, 0xc9, 0x5a, 0x8b, 0xe3, 0x79, 0xfe, 0x1a, 0xfa, 0x57,
-       0x3c, 0xc4, 0x36, 0xaf, 0x83, 0x6d, 0x15, 0x0d, 0x40, 0x31, 0xef, 0xc3,
-       0x79, 0xdd, 0xe5, 0x77, 0x2f, 0x39, 0x79, 0x58, 0x53, 0x8b, 0xd7, 0x78,
-       0x9d, 0xd6, 0x9a, 0x56, 0x0e, 0x7b, 0x45, 0xce, 0x17, 0x0b, 0x3b, 0x7d,
-       0xae, 0xff, 0x5c, 0xf4, 0x4a, 0xfd, 0x70, 0xfd, 0x7b, 0x15, 0x3c, 0xa6,
-       0x16, 0x6d, 0xf7, 0x22, 0xe0, 0x33, 0x03, 0x6d, 0xe3, 0xfa, 0xe7, 0x6e,
-       0x90, 0xbd, 0x19, 0x63, 0x85, 0xeb, 0x75, 0x73, 0x67, 0xd6, 0xf1, 0x9b,
-       0x4e, 0xb1, 0xfd, 0x53, 0x86, 0x60, 0xeb, 0xb0, 0xd2, 0x41, 0xac, 0xca,
-       0xf8, 0xdc, 0xba, 0xf8, 0x08, 0xeb, 0xe2, 0xd7, 0xb3, 0xd2, 0x1b, 0x39,
-       0x84, 0x7d, 0x0e, 0xce, 0x0e, 0x09, 0xce, 0xc6, 0xce, 0x42, 0x1b, 0x1c,
-       0x28, 0xe1, 0xec, 0x9c, 0x8b, 0xb3, 0xfd, 0x2e, 0xce, 0x1e, 0x2a, 0xe1,
-       0xec, 0x10, 0x9a, 0xf3, 0x11, 0x72, 0xe0, 0x0e, 0xe6, 0xda, 0x6e, 0x72,
-       0x0e, 0xc9, 0x91, 0x7d, 0xca, 0xce, 0xf9, 0x80, 0xb2, 0x2d, 0x17, 0xc0,
-       0xeb, 0xe4, 0x53, 0x33, 0xbd, 0x50, 0x6f, 0xd9, 0x80, 0xe0, 0xce, 0x5c,
-       0x0f, 0x2a, 0x75, 0xa9, 0x03, 0x2b, 0xb1, 0xdd, 0xc9, 0x55, 0x52, 0x2f,
-       0x49, 0x2f, 0xa0, 0x97, 0x58, 0x07, 0x35, 0x68, 0xba, 0x75, 0xbf, 0xe0,
-       0xde, 0xed, 0x7c, 0xf7, 0x2c, 0xfd, 0x10, 0x6e, 0x4e, 0x53, 0xee, 0x60,
-       0x3d, 0xf0, 0x61, 0x4a, 0x41, 0xf1, 0xce, 0x00, 0x38, 0x16, 0xf5, 0x3d,
-       0xd0, 0x36, 0x3e, 0xd5, 0xa3, 0x74, 0xcc, 0xce, 0x05, 0x99, 0xb7, 0x99,
-       0x93, 0x66, 0x82, 0x6e, 0xae, 0xfe, 0xec, 0x58, 0xd2, 0x73, 0x49, 0xb6,
-       0x6d, 0x22, 0xc7, 0x69, 0x5d, 0xff, 0x8f, 0x36, 0x7e, 0x47, 0xde, 0xff,
-       0xcf, 0x25, 0xfb, 0xa5, 0x29, 0x4f, 0x24, 0xb0, 0xbd, 0xa0, 0x06, 0xd2,
-       0x85, 0x0e, 0xbe, 0xdf, 0xc3, 0xb1, 0x7a, 0x83, 0x1d, 0xd6, 0xdd, 0xc1,
-       0xad, 0x56, 0x77, 0x70, 0x9b, 0xc5, 0xd8, 0x2d, 0xf4, 0xd2, 0x8e, 0x3d,
-       0xac, 0xe1, 0xef, 0x26, 0x7f, 0x90, 0x31, 0xfb, 0xc9, 0x65, 0x82, 0xd4,
-       0x6d, 0x84, 0xba, 0x15, 0xa3, 0x7e, 0xa4, 0x35, 0x3f, 0x34, 0x75, 0xcc,
-       0x59, 0xb7, 0x09, 0xa7, 0x8f, 0x54, 0x65, 0xae, 0x6e, 0xeb, 0x3a, 0x41,
-       0x4c, 0x37, 0x1b, 0xda, 0x6e, 0x39, 0x85, 0x25, 0x7e, 0x53, 0xea, 0x5e,
-       0xd6, 0xb2, 0x89, 0x84, 0xf1, 0x3e, 0x12, 0xd1, 0xd7, 0xf9, 0xec, 0x28,
-       0x7d, 0x75, 0xcc, 0xe9, 0x1d, 0x70, 0x01, 0xf2, 0xcd, 0xe8, 0xb2, 0x02,
-       0xc1, 0xdb, 0x59, 0x57, 0x85, 0x4d, 0xad, 0x75, 0x97, 0x57, 0x7a, 0x19,
-       0xc5, 0xdf, 0x0e, 0xa1, 0x19, 0x9d, 0x85, 0x40, 0x70, 0xcb, 0xf4, 0xe7,
-       0xf0, 0x0f, 0x27, 0x99, 0xbb, 0x20, 0x7e, 0x67, 0xdb, 0xf7, 0xb3, 0x26,
-       0x39, 0x9a, 0xaf, 0xc7, 0x15, 0x67, 0x4d, 0x7d, 0x38, 0x92, 0x8f, 0xe1,
-       0x32, 0xf1, 0xc9, 0xb7, 0x50, 0x87, 0x77, 0xa7, 0xbc, 0xd8, 0x67, 0xdc,
-       0x56, 0xca, 0x09, 0x1e, 0xdc, 0x9b, 0x3c, 0x48, 0x1e, 0xe0, 0x41, 0x2d,
-       0x39, 0xd8, 0x23, 0xce, 0x35, 0x2f, 0x6b, 0xb7, 0x2f, 0x62, 0xd8, 0xcd,
-       0x19, 0x94, 0xb1, 0x9e, 0x32, 0xb6, 0x04, 0xb7, 0xe4, 0xb4, 0xe0, 0x1d,
-       0x39, 0x04, 0xfc, 0xe6, 0xca, 0xb6, 0x33, 0x27, 0x6d, 0x0c, 0x18, 0xab,
-       0xf0, 0xe1, 0xc9, 0xd1, 0x41, 0x1f, 0xfd, 0xe5, 0x27, 0xa9, 0x3e, 0x58,
-       0xd3, 0x38, 0x4f, 0x26, 0x71, 0x31, 0x44, 0xfc, 0x6e, 0x24, 0x67, 0xa0,
-       0x1f, 0x18, 0xf3, 0x8c, 0xc5, 0x6d, 0xf4, 0x0f, 0xfa, 0x43, 0xda, 0x6b,
-       0x26, 0xfa, 0xc7, 0x48, 0x00, 0x6b, 0x28, 0x4f, 0x90, 0xf8, 0x1c, 0x5a,
-       0x88, 0x05, 0xf7, 0x30, 0xa7, 0x44, 0x59, 0x9b, 0x05, 0x13, 0xb8, 0xad,
-       0x0e, 0x89, 0xe4, 0x22, 0xf5, 0xf6, 0x2f, 0x34, 0x07, 0x77, 0x31, 0x47,
-       0x5c, 0x49, 0xd8, 0x23, 0xaf, 0x18, 0x21, 0x84, 0x17, 0x0c, 0xda, 0xbb,
-       0x0f, 0xa3, 0xf3, 0x2c, 0x97, 0x12, 0xac, 0xd7, 0x17, 0x5a, 0x83, 0xb7,
-       0x33, 0x16, 0x6b, 0x88, 0x53, 0x4d, 0x0b, 0xe9, 0xa0, 0xd4, 0x6b, 0xcd,
-       0x0b, 0x1b, 0x29, 0x9f, 0xac, 0x63, 0x73, 0xdb, 0x26, 0xfa, 0x41, 0x6c,
-       0x01, 0xdb, 0x09, 0x65, 0xaf, 0x71, 0xcc, 0xbe, 0x28, 0x79, 0xe8, 0xfe,
-       0x0d, 0x21, 0x62, 0x91, 0xd8, 0x92, 0x76, 0x2c, 0x94, 0x75, 0x92, 0xdc,
-       0xdb, 0xd0, 0xb6, 0x70, 0x4a, 0x72, 0x6f, 0xb4, 0x2d, 0x7b, 0x4a, 0xc7,
-       0x65, 0xe6, 0x8f, 0x35, 0x29, 0xcd, 0x38, 0xa7, 0xc4, 0xa3, 0x17, 0xa9,
-       0x8b, 0x0f, 0x3f, 0xb3, 0xf7, 0xea, 0x89, 0xe2, 0x4a, 0xc6, 0x4f, 0x2d,
-       0xf1, 0x2f, 0x4a, 0x5c, 0xaf, 0x5d, 0xa0, 0x61, 0x16, 0x7e, 0x46, 0xff,
-       0x88, 0x22, 0x90, 0xd0, 0xf1, 0xde, 0xc9, 0x24, 0xed, 0x70, 0x6d, 0xcc,
-       0x03, 0xa4, 0x50, 0x03, 0x4c, 0x77, 0x4f, 0x3c, 0x47, 0x1f, 0x1c, 0xe7,
-       0xbc, 0x15, 0x0b, 0x22, 0xb3, 0x3c, 0x1f, 0xe1, 0xf3, 0xd7, 0xe7, 0xae,
-       0xe5, 0xdc, 0x1f, 0x9d, 0x92, 0xfe, 0x52, 0xb4, 0xed, 0xfc, 0x49, 0x77,
-       0xee, 0x44, 0x2a, 0x89, 0x9f, 0x9e, 0xd4, 0x86, 0xde, 0x53, 0xe2, 0xfd,
-       0xe7, 0x15, 0x99, 0x1f, 0xf5, 0x35, 0xf8, 0xd0, 0x1e, 0x4d, 0x24, 0x86,
-       0xf7, 0x72, 0xcc, 0xd6, 0x8d, 0xb4, 0xbf, 0x23, 0x07, 0x13, 0x3b, 0xb1,
-       0xd4, 0x4f, 0x79, 0x5c, 0x59, 0xea, 0x39, 0xf6, 0xc9, 0x52, 0x9d, 0xc5,
-       0x1a, 0xf3, 0xba, 0x3c, 0x11, 0xda, 0x21, 0xb0, 0xa7, 0x25, 0x84, 0x3a,
-       0xe7, 0x39, 0x95, 0xcf, 0x89, 0x1d, 0x7e, 0xae, 0x78, 0xf4, 0xf7, 0x89,
-       0x5b, 0x82, 0x1d, 0x11, 0x62, 0xd6, 0xdd, 0x52, 0x8f, 0x66, 0x32, 0xf4,
-       0x77, 0x3f, 0xfd, 0x7d, 0xab, 0xf8, 0xb4, 0x45, 0x9f, 0xb6, 0xe8, 0xd3,
-       0x96, 0x16, 0x1d, 0x42, 0x5c, 0x1d, 0xe0, 0xba, 0xa5, 0xa3, 0xe2, 0xeb,
-       0xbd, 0xd8, 0xc7, 0xdf, 0xfb, 0x78, 0xff, 0x08, 0x6b, 0x54, 0x2c, 0x95,
-       0x39, 0x0f, 0xa1, 0xc3, 0x7a, 0x02, 0x83, 0x39, 0xfc, 0x22, 0xd8, 0x52,
-       0x89, 0xca, 0xd5, 0x52, 0x7f, 0x6b, 0xea, 0x51, 0x3c, 0xc1, 0x1a, 0xe8,
-       0xe7, 0x4a, 0xb5, 0xee, 0xeb, 0x39, 0xa6, 0x68, 0x6a, 0x07, 0x6b, 0xd9,
-       0xbd, 0x85, 0xbb, 0xb9, 0xbe, 0xf1, 0xc1, 0xd7, 0x15, 0xd6, 0x41, 0x75,
-       0x9c, 0x9b, 0xb1, 0x74, 0x07, 0xe7, 0xb1, 0x44, 0x0e, 0x07, 0x5f, 0x7f,
-       0x0f, 0x62, 0xdb, 0x6f, 0x37, 0x0e, 0x70, 0x7e, 0x57, 0x8e, 0x51, 0xd6,
-       0x83, 0x03, 0x8c, 0xb1, 0x7d, 0x4e, 0x7c, 0xf5, 0x72, 0x8c, 0xeb, 0xb8,
-       0xb5, 0x25, 0x2b, 0xf9, 0xd2, 0xc6, 0x93, 0x86, 0x8d, 0xe7, 0xf9, 0x7b,
-       0x81, 0xd8, 0x35, 0x76, 0x03, 0x76, 0x79, 0xf8, 0xdc, 0x1e, 0x3e, 0xd7,
-       0x4a, 0xdc, 0x9e, 0x9f, 0x95, 0xbe, 0xde, 0x21, 0xe9, 0xeb, 0x21, 0x6f,
-       0x89, 0xed, 0x87, 0x70, 0x3e, 0x1b, 0x1f, 0xf6, 0x7a, 0xed, 0x11, 0xc6,
-       0xd5, 0x85, 0x8f, 0xe8, 0xbb, 0x6f, 0x6e, 0xd0, 0x7a, 0x68, 0xc3, 0xe4,
-       0xa4, 0xa2, 0x45, 0xbf, 0x8b, 0xe2, 0xf6, 0x00, 0x9a, 0x62, 0x6b, 0xbd,
-       0x09, 0x95, 0x38, 0x57, 0x1c, 0xa0, 0xa6, 0xcf, 0x16, 0x5c, 0x6c, 0xdb,
-       0x54, 0xc2, 0xb6, 0xd6, 0x7c, 0x15, 0xb1, 0x87, 0x39, 0x78, 0xd6, 0xce,
-       0x84, 0x99, 0x9f, 0x0a, 0xb3, 0x32, 0xf6, 0x08, 0x9a, 0x52, 0x32, 0x96,
-       0xde, 0x39, 0xa9, 0xe0, 0x4b, 0xd5, 0x48, 0x30, 0x37, 0xc1, 0xa8, 0xd4,
-       0x33, 0x36, 0x73, 0x90, 0xea, 0x37, 0x25, 0x3f, 0x76, 0x13, 0x0f, 0x7b,
-       0x89, 0x87, 0xc2, 0x99, 0xa5, 0xd7, 0xe9, 0xe2, 0xd1, 0xd6, 0x82, 0xac,
-       0x8b, 0xac, 0x89, 0xac, 0xcd, 0x21, 0xdc, 0x6b, 0x49, 0xdd, 0x6e, 0x63,
-       0xca, 0x48, 0xc4, 0x9e, 0x83, 0xac, 0xd3, 0x21, 0xda, 0xc2, 0x8f, 0x7d,
-       0xc4, 0xbf, 0xbd, 0x2d, 0xb4, 0x55, 0xd8, 0x8f, 0xbd, 0x4e, 0x1f, 0xa0,
-       0x6c, 0x3f, 0x3f, 0xd7, 0x50, 0x61, 0x4e, 0xfb, 0xaa, 0xdf, 0xb5, 0xa3,
-       0xdb, 0x57, 0xf4, 0x9a, 0x32, 0x5e, 0xb9, 0xa7, 0xe8, 0xda, 0x6e, 0x7b,
-       0x56, 0xc6, 0xb5, 0x71, 0xd6, 0x70, 0xb9, 0x69, 0xd9, 0x66, 0x82, 0xed,
-       0x4b, 0x36, 0x02, 0x6b, 0x6f, 0xe0, 0xa7, 0x55, 0xbc, 0xd6, 0x75, 0x9d,
-       0x9f, 0xf6, 0x09, 0x07, 0x26, 0x3f, 0xed, 0xdc, 0x49, 0x7e, 0xda, 0xa0,
-       0x94, 0xb9, 0xa9, 0xf4, 0x14, 0xca, 0xfc, 0xb4, 0xb6, 0x84, 0xcd, 0x87,
-       0xb0, 0x97, 0xdc, 0xa5, 0xae, 0x61, 0x04, 0x81, 0x75, 0x9e, 0x4f, 0x3d,
-       0x18, 0x61, 0xed, 0x51, 0x01, 0x2c, 0xb3, 0xb1, 0x72, 0x7d, 0xc6, 0xae,
-       0xd4, 0x1b, 0x62, 0x95, 0x1e, 0xe9, 0x19, 0x27, 0x32, 0x63, 0xc4, 0x12,
-       0xcf, 0x3a, 0x2d, 0x93, 0x46, 0x40, 0x5d, 0xa2, 0xdf, 0x5d, 0xaa, 0x09,
-       0xa2, 0x81, 0x1d, 0xe4, 0x36, 0x89, 0xd4, 0x2f, 0xed, 0x99, 0xc8, 0x08,
-       0xa2, 0xeb, 0x8a, 0xc3, 0x51, 0xa4, 0x0f, 0x46, 0x1d, 0x5c, 0x99, 0x40,
-       0x3e, 0x11, 0x0d, 0x74, 0x17, 0x32, 0xc1, 0xae, 0xc6, 0x18, 0x76, 0x4e,
-       0x76, 0xb0, 0xe6, 0xd0, 0xb1, 0x6d, 0xb2, 0x93, 0xf5, 0x51, 0x8f, 0xd2,
-       0x33, 0x2b, 0xf6, 0x11, 0xfb, 0x6a, 0x6a, 0xcc, 0x73, 0x63, 0x2f, 0xb3,
-       0x5c, 0xcf, 0xbe, 0xef, 0xf8, 0xce, 0xb8, 0xa1, 0xd2, 0x2e, 0xff, 0xdb,
-       0x8f, 0xb0, 0x8d, 0x33, 0x86, 0xf8, 0x1c, 0xbf, 0xb3, 0xb6, 0xda, 0xda,
-       0x32, 0x65, 0xfb, 0x74, 0xe9, 0x49, 0x47, 0x9d, 0xf5, 0x92, 0x1a, 0xab,
-       0x63, 0xb6, 0x97, 0x6b, 0x54, 0xee, 0x3f, 0xdf, 0xb8, 0x56, 0x9b, 0x83,
-       0x5b, 0x89, 0x67, 0xac, 0xc7, 0x02, 0x01, 0x62, 0x64, 0xe0, 0x94, 0x8d,
-       0x59, 0xe3, 0x1d, 0xfb, 0x49, 0xdd, 0xc7, 0xf5, 0xb8, 0x95, 0x78, 0x2b,
-       0xfc, 0xc3, 0x0c, 0xee, 0x9a, 0xf6, 0x79, 0x58, 0x5b, 0xb5, 0x54, 0xc0,
-       0xa9, 0xad, 0x9c, 0x3e, 0xe1, 0xb1, 0xfc, 0x6d, 0xc1, 0xae, 0x1c, 0xeb,
-       0x04, 0xd6, 0xa9, 0x6e, 0x8d, 0x76, 0x6b, 0xf0, 0x9e, 0x9c, 0x57, 0xa9,
-       0x33, 0xe1, 0x6d, 0xdd, 0x68, 0xe3, 0xe3, 0xf5, 0x89, 0xe1, 0xa8, 0x87,
-       0xd8, 0xc8, 0xb1, 0xac, 0x7c, 0x4b, 0xb0, 0x8f, 0x58, 0x7c, 0x7b, 0x0e,
-       0x69, 0xe9, 0xa9, 0x86, 0xd7, 0x8f, 0xf6, 0x87, 0x21, 0xfd, 0x2f, 0x7c,
-       0x89, 0xd1, 0x18, 0xa1, 0xaf, 0x45, 0xdb, 0x95, 0xc4, 0xe2, 0x20, 0x12,
-       0x17, 0x3e, 0xf6, 0xbe, 0x63, 0x3f, 0x9d, 0xdf, 0xc8, 0xe7, 0x3b, 0x89,
-       0x93, 0x69, 0xe2, 0xe6, 0xe8, 0xb0, 0x1f, 0xf2, 0x8e, 0xd6, 0xf7, 0xb6,
-       0x12, 0xa7, 0x8f, 0xe3, 0x77, 0xf8, 0xbc, 0xba, 0x8d, 0x18, 0x39, 0x6b,
-       0x24, 0xd2, 0x5b, 0x90, 0xe9, 0xac, 0x85, 0x66, 0x34, 0x2a, 0xd2, 0xaf,
-       0x12, 0xfb, 0x27, 0xf1, 0x3d, 0xce, 0xe9, 0xd3, 0xc5, 0x8e, 0x9b, 0x31,
-       0x30, 0xab, 0xa9, 0xd7, 0xfd, 0x4c, 0x6c, 0x20, 0x76, 0xe9, 0xa8, 0x40,
-       0xd5, 0x52, 0xea, 0xf6, 0x3d, 0x07, 0x4f, 0x82, 0xba, 0x8e, 0xff, 0x42,
-       0x1e, 0xf4, 0x17, 0x05, 0xe9, 0x4b, 0x96, 0xb9, 0x9d, 0xf8, 0x44, 0x73,
-       0xdb, 0x2d, 0x33, 0xc9, 0x52, 0x9f, 0x32, 0x10, 0xec, 0x9c, 0xb6, 0x71,
-       0xd2, 0x08, 0x43, 0xea, 0xf3, 0xca, 0x54, 0x91, 0x19, 0xbf, 0x19, 0xdb,
-       0x78, 0xbd, 0x63, 0xba, 0x5a, 0xe9, 0xc8, 0xd9, 0xf8, 0xa6, 0xa1, 0x65,
-       0xda, 0xbd, 0x8c, 0x65, 0x43, 0x3b, 0x0b, 0x5c, 0x26, 0x27, 0x12, 0xdf,
-       0xf2, 0x21, 0xa4, 0xbb, 0x63, 0x35, 0xcf, 0xdc, 0x46, 0xbe, 0x20, 0xb1,
-       0xe5, 0x5d, 0x53, 0x85, 0x94, 0x32, 0xe3, 0x13, 0xbb, 0x75, 0x22, 0x5d,
-       0xa8, 0x56, 0x76, 0xd3, 0x96, 0x77, 0xac, 0xab, 0xc0, 0x25, 0xc7, 0x96,
-       0xb7, 0xd1, 0x96, 0x78, 0x6b, 0x05, 0xbc, 0xe7, 0xeb, 0xd0, 0xa9, 0xc0,
-       0xa9, 0xbd, 0xaa, 0x99, 0x9f, 0xd3, 0xe4, 0xae, 0xe4, 0x7d, 0x6a, 0x2f,
-       0xbe, 0x42, 0x9c, 0x79, 0x92, 0x3e, 0xfa, 0x33, 0xbd, 0x19, 0x55, 0x5f,
-       0x6d, 0xe1, 0x3a, 0x6e, 0x0c, 0xee, 0xc8, 0xf5, 0xe1, 0xa9, 0x79, 0x1b,
-       0xcf, 0x31, 0x3e, 0x1a, 0x53, 0x19, 0xb5, 0x92, 0xb5, 0x18, 0x73, 0xd9,
-       0xe2, 0x09, 0xc7, 0xbf, 0x57, 0xb6, 0x6d, 0x9e, 0x8b, 0xc2, 0xfb, 0x15,
-       0xf9, 0xbb, 0xbe, 0x2d, 0x36, 0x27, 0x9f, 0x51, 0x7e, 0xda, 0x18, 0x32,
-       0xb4, 0xf4, 0xc7, 0xde, 0x2a, 0x54, 0x27, 0x6c, 0x7b, 0x28, 0x25, 0xd7,
-       0xf5, 0xb6, 0xa4, 0x73, 0xbf, 0x81, 0x9f, 0xe5, 0x3e, 0xf2, 0xeb, 0xc2,
-       0xf9, 0x62, 0x69, 0xea, 0xbc, 0x93, 0x79, 0xbd, 0x8f, 0x79, 0xbd, 0xce,
-       0xd4, 0xd2, 0x7b, 0xbc, 0xd2, 0x3b, 0x29, 0x1e, 0xac, 0xe5, 0xf5, 0x5d,
-       0xa5, 0xbc, 0x5e, 0x73, 0x4a, 0xfa, 0x70, 0xe4, 0x7a, 0x70, 0xf7, 0x2f,
-       0xba, 0x99, 0xd7, 0xab, 0x26, 0x7d, 0xe8, 0x62, 0x4e, 0xf7, 0x93, 0x67,
-       0x6f, 0xcd, 0xd7, 0x21, 0x78, 0xc2, 0x8b, 0x78, 0xea, 0xdb, 0x38, 0x48,
-       0x1f, 0x3b, 0x98, 0xf4, 0x2a, 0xb1, 0xe5, 0x1e, 0xda, 0xe9, 0x9f, 0x70,
-       0x40, 0xf5, 0xa2, 0x46, 0xff, 0x2e, 0x1e, 0xfa, 0x35, 0xb9, 0xbc, 0x2f,
-       0x27, 0x31, 0xbd, 0xb2, 0xad, 0xeb, 0x94, 0x9b, 0xcb, 0x43, 0xa7, 0x46,
-       0x17, 0x25, 0x97, 0xd7, 0xad, 0xef, 0xc3, 0xe9, 0x69, 0xfc, 0xe1, 0x0a,
-       0x92, 0xc4, 0x3a, 0xce, 0xd9, 0x90, 0x4a, 0xb0, 0x6e, 0xd6, 0x06, 0xb7,
-       0x29, 0x89, 0x89, 0x1a, 0xc6, 0xfe, 0x69, 0xe6, 0xf2, 0x80, 0x99, 0x50,
-       0x93, 0x1e, 0x74, 0xfb, 0xb9, 0x1e, 0x1f, 0xb0, 0x86, 0xfe, 0x61, 0x3e,
-       0xc6, 0x31, 0x2b, 0xe0, 0x63, 0x2e, 0xff, 0x40, 0xc7, 0xa7, 0x5e, 0xfa,
-       0xde, 0x65, 0x6f, 0x00, 0x57, 0xf3, 0x6e, 0x2e, 0xaf, 0x6d, 0xb4, 0x47,
-       0xae, 0xa4, 0x42, 0xf8, 0x30, 0x6f, 0xd0, 0x07, 0xfb, 0x70, 0x84, 0xb9,
-       0xfc, 0x8a, 0xae, 0xe2, 0xa7, 0xf9, 0x56, 0xfa, 0x65, 0x04, 0x3f, 0x21,
-       0xcf, 0x5d, 0xc7, 0x5c, 0x7e, 0x27, 0x7d, 0x2a, 0xc5, 0x5c, 0xde, 0xee,
-       0xf0, 0x8c, 0xe6, 0xb6, 0x33, 0x53, 0x4e, 0x2e, 0x6f, 0x64, 0x89, 0x5f,
-       0xef, 0x47, 0x62, 0x91, 0xf8, 0x60, 0xff, 0x6c, 0x63, 0x88, 0xcf, 0xd2,
-       0x6e, 0x85, 0xf5, 0x98, 0x71, 0x72, 0xcf, 0xe6, 0xe0, 0x6e, 0xce, 0xbd,
-       0xcc, 0x89, 0x33, 0x1b, 0x3b, 0xd7, 0xbd, 0x89, 0x3f, 0x58, 0xe2, 0xa1,
-       0x1f, 0x9a, 0xc1, 0x3b, 0x18, 0x6b, 0x61, 0xfa, 0xd7, 0x4f, 0x53, 0x89,
-       0xfe, 0x73, 0xac, 0x21, 0x7f, 0xc2, 0x38, 0xbb, 0x93, 0xbe, 0xb1, 0x72,
-       0x5d, 0x80, 0xeb, 0xee, 0xc6, 0x59, 0x07, 0xe3, 0x2c, 0xca, 0x38, 0x5b,
-       0xc1, 0x38, 0x7b, 0xda, 0x48, 0x24, 0x37, 0x93, 0x6f, 0xbd, 0x9e, 0x97,
-       0x58, 0x6b, 0xe1, 0xb8, 0x1a, 0xf5, 0x1a, 0xed, 0x97, 0x98, 0xd9, 0xb9,
-       0x6e, 0xf4, 0x6c, 0x35, 0xc4, 0x56, 0xf8, 0x74, 0x19, 0xb9, 0x05, 0x11,
-       0xe9, 0xc2, 0xa2, 0x37, 0x31, 0xbc, 0xca, 0x9b, 0x18, 0x7a, 0x5f, 0x79,
-       0xc7, 0x7e, 0x8b, 0x71, 0x76, 0x3b, 0xe3, 0x6c, 0x37, 0xe3, 0xac, 0xdd,
-       0xb2, 0xf1, 0x52, 0x4a, 0xeb, 0x6b, 0xf6, 0xc4, 0x8d, 0x76, 0x0f, 0x56,
-       0x54, 0x33, 0x25, 0x04, 0x91, 0xe8, 0xfc, 0x03, 0xca, 0x7f, 0xc1, 0x48,
-       0xf4, 0x24, 0x15, 0x89, 0xad, 0x18, 0x7e, 0x4c, 0xbd, 0x2b, 0x4b, 0xb1,
-       0xb5, 0x7f, 0xf6, 0xd5, 0x92, 0x6f, 0x94, 0x75, 0xf7, 0xe2, 0x45, 0x83,
-       0x18, 0xba, 0x54, 0x8b, 0x65, 0x3c, 0xbd, 0x98, 0xa0, 0x1d, 0x83, 0x89,
-       0x5e, 0x1c, 0x65, 0x1e, 0xbc, 0x9f, 0xf9, 0xf7, 0x01, 0x2b, 0xde, 0xba,
-       0x83, 0x75, 0xce, 0xa5, 0xa8, 0x16, 0x8b, 0x29, 0xbd, 0x18, 0xa0, 0x0f,
-       0x0f, 0x30, 0x5f, 0xb4, 0x5b, 0x3f, 0x57, 0xb6, 0x91, 0x23, 0xdc, 0x57,
-       0x90, 0xf7, 0xb4, 0x64, 0xbf, 0x67, 0x10, 0xfd, 0xf3, 0x82, 0x6d, 0x50,
-       0x6f, 0x32, 0x7b, 0x71, 0xdc, 0xaa, 0x40, 0x6f, 0x4b, 0xb7, 0xb2, 0xab,
-       0x20, 0xbd, 0x33, 0xc6, 0xa3, 0xc5, 0x78, 0x75, 0xe4, 0x55, 0x88, 0xa5,
-       0xdd, 0xc8, 0x4a, 0x7c, 0x5a, 0xbb, 0x95, 0x3b, 0x67, 0x25, 0xc6, 0x7b,
-       0x95, 0x5e, 0x89, 0x61, 0x6b, 0x58, 0xb9, 0x4b, 0x62, 0xda, 0xe9, 0x33,
-       0x4b, 0xdc, 0xcb, 0x3e, 0xc4, 0x6d, 0xe4, 0x6f, 0x60, 0x4c, 0x79, 0xbf,
-       0x1a, 0x65, 0xdc, 0xb5, 0x57, 0x78, 0xe8, 0xa7, 0x71, 0xae, 0x9d, 0x07,
-       0x1d, 0xc6, 0x6f, 0xda, 0x19, 0xb5, 0x9f, 0x31, 0xd5, 0x8b, 0x23, 0xd6,
-       0x6f, 0xd8, 0x57, 0x1c, 0x5e, 0x52, 0xc6, 0xf3, 0xcd, 0xb8, 0x37, 0xb7,
-       0x1c, 0x01, 0x5d, 0xf2, 0x75, 0x08, 0xc9, 0x25, 0x01, 0x54, 0xe9, 0x92,
-       0x67, 0x9a, 0xdb, 0x16, 0x4e, 0x50, 0x86, 0x0d, 0xe5, 0xf8, 0xde, 0x8c,
-       0x07, 0x89, 0x03, 0xfb, 0x52, 0xf7, 0xe2, 0x01, 0xb5, 0x0a, 0x61, 0xda,
-       0xe9, 0x61, 0x35, 0x44, 0x7c, 0xfd, 0xbd, 0xd2, 0x38, 0xff, 0xa9, 0xa2,
-       0x54, 0x33, 0x5f, 0xe3, 0x54, 0x75, 0x8c, 0xb1, 0x4d, 0xd3, 0x52, 0x9b,
-       0x44, 0xdb, 0xa2, 0xd3, 0x3a, 0xc2, 0xac, 0x55, 0x37, 0xa7, 0xb4, 0xe1,
-       0xcd, 0xde, 0xf8, 0xe0, 0xa2, 0x82, 0x6c, 0x98, 0x7c, 0x2e, 0x9f, 0x48,
-       0xf4, 0x34, 0x8b, 0x8d, 0xf5, 0x28, 0xb6, 0xd3, 0x4e, 0x5d, 0xf9, 0x08,
-       0x63, 0xe8, 0xbd, 0x0a, 0xe1, 0x46, 0xe9, 0xfc, 0xf5, 0xb1, 0xa2, 0x1c,
-       0x2b, 0x3a, 0x2d, 0x3c, 0x2d, 0x4a, 0x9e, 0xa6, 0x33, 0x0e, 0x6d, 0x7b,
-       0x13, 0xf9, 0x59, 0xe8, 0x94, 0xd4, 0x38, 0xf1, 0x09, 0x72, 0xda, 0x66,
-       0xf2, 0xdd, 0x5e, 0x7a, 0xb5, 0xbd, 0xb2, 0x21, 0x61, 0xb4, 0x2b, 0x78,
-       0x62, 0xae, 0x85, 0xf5, 0x11, 0xc7, 0xbc, 0x9c, 0x57, 0x71, 0x25, 0x1f,
-       0xc5, 0xbb, 0x1c, 0xfb, 0x92, 0x33, 0x76, 0x3d, 0x7e, 0x54, 0xc2, 0xad,
-       0x14, 0x71, 0x6b, 0x4b, 0x4e, 0xa1, 0xbf, 0xc6, 0x30, 0x62, 0xfc, 0xdd,
-       0xa7, 0x97, 0x6e, 0x0e, 0xd0, 0x6e, 0xa2, 0x8b, 0x8f, 0x9f, 0xe3, 0x78,
-       0xd8, 0xc1, 0xe9, 0x37, 0x3f, 0x9d, 0x59, 0xc2, 0xb5, 0xa2, 0xed, 0x6b,
-       0x4b, 0xef, 0xad, 0x9d, 0xf9, 0xf3, 0x92, 0xbe, 0x3a, 0x3c, 0xa7, 0x92,
-       0xa8, 0x38, 0x75, 0x4d, 0x56, 0x5d, 0xe2, 0x83, 0x19, 0xf5, 0x89, 0xaf,
-       0x71, 0xfe, 0xc7, 0xc8, 0xf5, 0x6c, 0xce, 0x7f, 0xd5, 0x99, 0x37, 0xc2,
-       0x79, 0x95, 0x6b, 0xbc, 0x30, 0x7a, 0xed, 0x1d, 0x95, 0xba, 0xe3, 0xf1,
-       0x28, 0x6d, 0xf7, 0xe1, 0x06, 0x79, 0x2e, 0x84, 0x5d, 0xf9, 0x15, 0x95,
-       0x82, 0xe3, 0x41, 0xd6, 0x01, 0xae, 0x2f, 0x91, 0xe7, 0x59, 0xcf, 0xf1,
-       0x9e, 0xf0, 0xae, 0xcd, 0xe4, 0x18, 0x9f, 0xb5, 0x7b, 0x84, 0x6b, 0xf1,
-       0x7f, 0xf8, 0x8e, 0xdc, 0xfb, 0x75, 0x79, 0xf4, 0x4f, 0x31, 0xcc, 0x1a,
-       0xe8, 0xb1, 0x5c, 0x06, 0x0f, 0xe7, 0xbe, 0xec, 0xec, 0xab, 0xad, 0x5d,
-       0x8f, 0xfb, 0x38, 0xe7, 0x81, 0x5a, 0xc6, 0xd1, 0x7f, 0x4b, 0x25, 0x84,
-       0x1b, 0xed, 0xae, 0x86, 0xe4, 0xda, 0x44, 0xeb, 0x2a, 0xc5, 0x46, 0x45,
-       0x0a, 0x43, 0x1d, 0x2d, 0x89, 0xe4, 0x15, 0x3c, 0x61, 0x4b, 0x5f, 0xd3,
-       0x5b, 0xca, 0xbb, 0x52, 0xff, 0x49, 0x6f, 0xb5, 0xbd, 0xc4, 0x91, 0xb6,
-       0x14, 0xde, 0xf9, 0x4c, 0xef, 0x40, 0xea, 0x6e, 0xc9, 0x37, 0x41, 0xa5,
-       0x9d, 0xf3, 0x1c, 0x21, 0x66, 0xbf, 0x68, 0xbc, 0x12, 0x65, 0x36, 0x86,
-       0x6f, 0x9d, 0x82, 0x83, 0x86, 0x1f, 0x99, 0x88, 0x8d, 0xdd, 0xfc, 0xdc,
-       0x4f, 0xde, 0xf4, 0x9e, 0x51, 0x83, 0x19, 0x55, 0x25, 0x57, 0x24, 0x06,
-       0x7b, 0xde, 0xf4, 0xcb, 0x5e, 0x4c, 0xcc, 0x23, 0xfb, 0xe6, 0xff, 0xd6,
-       0x5e, 0xca, 0x3a, 0xf2, 0x16, 0xd1, 0x3d, 0xa8, 0x10, 0x43, 0x93, 0x20,
-       0x97, 0xd9, 0x6b, 0x14, 0x63, 0x1e, 0xa4, 0xaf, 0x7a, 0xa0, 0x9d, 0xbe,
-       0xcc, 0xfa, 0xee, 0xb1, 0x06, 0xed, 0x74, 0x9b, 0x57, 0xc7, 0xf0, 0xf1,
-       0x00, 0x1e, 0x39, 0xbe, 0x0d, 0xb5, 0x4e, 0xef, 0x67, 0x9c, 0x36, 0xf5,
-       0xb0, 0xae, 0x1a, 0xfd, 0xa5, 0x8f, 0xf5, 0xd5, 0xd5, 0xf5, 0x8f, 0xa3,
-       0xd5, 0xb9, 0x3e, 0x86, 0xfb, 0x72, 0x41, 0xa5, 0x2b, 0xe7, 0xc3, 0xb6,
-       0x3b, 0x1f, 0x87, 0x7f, 0x5d, 0x3f, 0xe5, 0x92, 0xeb, 0xf2, 0xf7, 0x5d,
-       0xac, 0xcb, 0x44, 0xbe, 0x0a, 0xc4, 0x96, 0x53, 0xb6, 0x75, 0x3a, 0x46,
-       0x8e, 0xfb, 0x94, 0x3d, 0xd6, 0x7f, 0xb7, 0xaf, 0x3a, 0xfb, 0x34, 0x72,
-       0xad, 0x4a, 0xf6, 0xef, 0xf9, 0x8c, 0x60, 0xce, 0x00, 0x72, 0x8c, 0xed,
-       0xbb, 0x9c, 0xf7, 0xff, 0xb8, 0xc2, 0xd5, 0x29, 0xcd, 0x7a, 0xb5, 0x83,
-       0xeb, 0x27, 0xcf, 0x24, 0x4b, 0xd7, 0x9a, 0x03, 0xee, 0x19, 0x01, 0xf1,
-       0x85, 0x01, 0xdc, 0xc2, 0x45, 0x68, 0x48, 0x88, 0x8f, 0x0d, 0xa0, 0x21,
-       0x4f, 0x40, 0x5d, 0xee, 0xca, 0xfb, 0x90, 0x55, 0x64, 0xad, 0xa9, 0x13,
-       0x37, 0x69, 0xbb, 0x65, 0xf2, 0xfe, 0x2f, 0x2a, 0x7f, 0xf5, 0x7d, 0xc1,
-       0x5b, 0x72, 0xcc, 0xb0, 0x70, 0xcd, 0x5f, 0x77, 0xff, 0xb7, 0x20, 0xf7,
-       0x7c, 0xfa, 0x9f, 0x30, 0x8e, 0x13, 0x3d, 0xd5, 0x1e, 0xf1, 0x9f, 0x3f,
-       0xc1, 0x03, 0xb3, 0x8f, 0xf0, 0xbe, 0x8c, 0x7f, 0x88, 0x35, 0x84, 0x4f,
-       0xe9, 0x24, 0xfe, 0xec, 0x3f, 0xee, 0xd9, 0x55, 0x81, 0xbf, 0xb4, 0x2b,
-       0x97, 0x8d, 0xa0, 0x21, 0x35, 0xc6, 0xe7, 0x15, 0x74, 0x90, 0x2f, 0x3e,
-       0x65, 0x6c, 0xc1, 0xb6, 0x25, 0x82, 0x01, 0x2f, 0xda, 0x03, 0xbd, 0x62,
-       0x43, 0x05, 0x5b, 0x79, 0xfd, 0x25, 0xae, 0xef, 0xb3, 0x86, 0x0f, 0x0d,
-       0x4b, 0xa5, 0x8f, 0xa7, 0x4d, 0xa5, 0xd1, 0x1e, 0x70, 0xf7, 0xab, 0x32,
-       0x76, 0xad, 0xae, 0x0f, 0xdd, 0xe1, 0x69, 0x98, 0x7a, 0x9b, 0xfe, 0xd4,
-       0xbe, 0xee, 0xc6, 0x7b, 0x65, 0x9b, 0x18, 0xe4, 0x90, 0x2f, 0xd8, 0xb8,
-       0x69, 0x14, 0xea, 0xba, 0x1b, 0xd7, 0xbf, 0x2c, 0xf7, 0x21, 0xc6, 0x20,
-       0x32, 0xb5, 0xa6, 0xf4, 0x79, 0x12, 0x1c, 0xe7, 0x10, 0x7e, 0xbf, 0x30,
-       0x86, 0x83, 0xb9, 0x12, 0xa7, 0xa6, 0x6f, 0xeb, 0xeb, 0xae, 0xeb, 0xf6,
-       0x50, 0x2e, 0xd1, 0x5f, 0x53, 0xd2, 0xed, 0x00, 0xeb, 0x8b, 0x6a, 0x62,
-       0xec, 0x83, 0xb4, 0xe9, 0x90, 0x63, 0xd3, 0x5e, 0x18, 0xf9, 0xeb, 0xe3,
-       0x0e, 0x72, 0xdc, 0xa0, 0x29, 0x76, 0x93, 0x3d, 0xb2, 0x43, 0xd8, 0xcf,
-       0x71, 0xf7, 0xdd, 0x30, 0xee, 0x80, 0x71, 0x7d, 0xdc, 0xbd, 0xb9, 0xc4,
-       0x69, 0x4f, 0x69, 0xdc, 0x47, 0x67, 0xcb, 0x63, 0x64, 0x70, 0xfb, 0xba,
-       0x0c, 0xf2, 0x9b, 0x0e, 0xd8, 0x07, 0x1c, 0x7b, 0x9c, 0x72, 0xae, 0x6f,
-       0x6d, 0x10, 0xee, 0xc5, 0x3f, 0x4d, 0xd9, 0x8f, 0x4f, 0x92, 0x7b, 0xe9,
-       0xce, 0x9e, 0xf0, 0x37, 0x0a, 0xe5, 0xbe, 0x94, 0xf6, 0x4e, 0x97, 0x37,
-       0xcd, 0xd8, 0x8e, 0x04, 0x76, 0x7c, 0xa6, 0x97, 0xb1, 0x8d, 0xf5, 0xd7,
-       0x76, 0xab, 0x3b, 0xd8, 0x69, 0x05, 0xc8, 0xbb, 0xaa, 0x95, 0xad, 0x39,
-       0xe9, 0x69, 0x48, 0x2c, 0x97, 0xb8, 0x70, 0x41, 0xea, 0xbc, 0xbb, 0x59,
-       0x1f, 0x2c, 0x0f, 0x20, 0xdc, 0x8f, 0x89, 0xc2, 0xef, 0x2a, 0xe9, 0x88,
-       0xec, 0x4d, 0x4b, 0x5e, 0x01, 0x73, 0x5e, 0x0f, 0xaa, 0xe9, 0x4b, 0x11,
-       0xd3, 0x30, 0x4f, 0x36, 0xd8, 0x20, 0x47, 0x09, 0x2c, 0x35, 0xd3, 0xe6,
-       0xee, 0x06, 0x2f, 0x8e, 0x39, 0xfc, 0x4b, 0x9b, 0xe1, 0xef, 0x94, 0xc4,
-       0xcc, 0x1d, 0x39, 0xc9, 0x63, 0xa4, 0x90, 0xfa, 0x08, 0xfe, 0x31, 0x55,
-       0x1c, 0x5a, 0x82, 0xf4, 0xfd, 0x4b, 0x20, 0xf5, 0xc4, 0x04, 0xfe, 0x4a,
-       0x8f, 0x06, 0xfa, 0x0a, 0x3e, 0xa5, 0xcb, 0x9a, 0x0b, 0xee, 0xb4, 0xc2,
-       0x08, 0xb1, 0x1e, 0xeb, 0xf6, 0xc6, 0x59, 0x5f, 0x88, 0x1d, 0x03, 0x6d,
-       0xb7, 0xe4, 0xfb, 0x82, 0x1d, 0x96, 0x8b, 0x85, 0x2b, 0x67, 0x02, 0xc1,
-       0x6d, 0xd3, 0xf1, 0xe8, 0x84, 0xc3, 0xc5, 0x42, 0x6d, 0xf1, 0xbc, 0x6d,
-       0xbf, 0x61, 0x14, 0xaf, 0x56, 0x3a, 0xdf, 0x8d, 0xb6, 0x64, 0xbe, 0x19,
-       0xf7, 0x90, 0x3f, 0xb5, 0x4f, 0x37, 0xc3, 0x98, 0x06, 0x4e, 0x1c, 0x8f,
-       0x62, 0x6d, 0x4e, 0x3b, 0x3d, 0xec, 0xed, 0xc3, 0xd4, 0x7c, 0x27, 0x72,
-       0x85, 0xe0, 0x62, 0xcc, 0x43, 0x5e, 0x9d, 0xf2, 0x60, 0x97, 0x71, 0x5c,
-       0x29, 0x2e, 0x53, 0x70, 0x17, 0x11, 0xbc, 0xdf, 0xe1, 0x13, 0x73, 0xac,
-       0x47, 0x15, 0xdc, 0xe4, 0xe0, 0x6e, 0x4b, 0xdb, 0x5a, 0xf2, 0xed, 0x3b,
-       0xc9, 0x07, 0x77, 0x11, 0x57, 0x12, 0xeb, 0x6c, 0xbc, 0x99, 0xca, 0xf4,
-       0xd7, 0x40, 0xeb, 0x39, 0xcc, 0x1a, 0xa8, 0x47, 0x71, 0xf9, 0x5d, 0xd3,
-       0x9c, 0xcb, 0x09, 0x57, 0xcd, 0xb5, 0x90, 0x37, 0xb2, 0xae, 0x49, 0x69,
-       0x31, 0x8f, 0x47, 0xc5, 0x94, 0x33, 0x46, 0xac, 0xcd, 0x98, 0xab, 0x60,
-       0xbe, 0xeb, 0xc5, 0xd3, 0x8e, 0xfc, 0x49, 0xca, 0x77, 0x37, 0xbe, 0x66,
-       0xf5, 0x05, 0xfb, 0x2c, 0xd9, 0xbf, 0x8c, 0x27, 0xaf, 0x7a, 0x4d, 0xf2,
-       0xd7, 0x78, 0xac, 0xce, 0xfb, 0x05, 0x25, 0xe3, 0x6b, 0x6a, 0x9d, 0x83,
-       0xa9, 0x5c, 0x2a, 0x71, 0x36, 0xd1, 0x2f, 0x41, 0x8e, 0xd5, 0x7e, 0x3c,
-       0xb8, 0x98, 0x86, 0xdb, 0xb3, 0xd9, 0x66, 0xfc, 0x2f, 0x14, 0x23, 0xda,
-       0x44, 0x9a, 0x18, 0xb0, 0x85, 0x98, 0xdb, 0xdf, 0xeb, 0xe3, 0x7d, 0xe9,
-       0x79, 0xa9, 0x6d, 0xe3, 0x59, 0x14, 0x83, 0x66, 0x22, 0x73, 0x94, 0x9e,
-       0xd3, 0x53, 0x90, 0xfd, 0x8d, 0x00, 0x1e, 0x60, 0xed, 0x94, 0x2e, 0xed,
-       0xfd, 0x6c, 0x9d, 0x76, 0xf7, 0xb3, 0x0e, 0xcf, 0xfb, 0xc2, 0xdd, 0x56,
-       0x0b, 0xf3, 0xbd, 0xef, 0x86, 0xb1, 0x13, 0x13, 0x2b, 0x3d, 0x1e, 0xac,
-       0x5e, 0xb7, 0x47, 0x99, 0x59, 0x56, 0xce, 0xad, 0x51, 0x27, 0x1f, 0x56,
-       0x50, 0xcf, 0xf3, 0x27, 0x65, 0x8e, 0xcf, 0xb5, 0x8d, 0x9f, 0x94, 0x5c,
-       0xab, 0xb6, 0x6d, 0xb2, 0xb4, 0x3e, 0xa9, 0xfd, 0xa2, 0xb4, 0x53, 0x94,
-       0xba, 0xad, 0x30, 0xd7, 0xb4, 0xd9, 0xd3, 0x5a, 0x74, 0x40, 0x49, 0x93,
-       0xf7, 0x69, 0xc9, 0x5b, 0xbc, 0x1e, 0x3c, 0xa2, 0x6b, 0x83, 0xd2, 0x13,
-       0x7c, 0x19, 0x2e, 0x07, 0x6e, 0x9a, 0x1b, 0x60, 0x5e, 0x73, 0x6d, 0xeb,
-       0xf6, 0x07, 0xeb, 0xdb, 0x9a, 0x1d, 0x5e, 0x6c, 0xdb, 0x97, 0x53, 0xdd,
-       0xe4, 0x0c, 0xc2, 0x8b, 0xe5, 0xfa, 0xea, 0xb6, 0xc6, 0x99, 0x00, 0x65,
-       0x53, 0xf0, 0x3e, 0x73, 0xd2, 0x44, 0xa1, 0x2c, 0xa3, 0xcb, 0x99, 0x77,
-       0x90, 0x33, 0x57, 0x99, 0x5a, 0x6b, 0x17, 0x39, 0xb3, 0x9e, 0x2a, 0xd6,
-       0xf9, 0xd0, 0x8b, 0xa7, 0xac, 0x66, 0x39, 0xe3, 0xe4, 0xf0, 0xe6, 0x2b,
-       0x27, 0xb5, 0xb4, 0x70, 0xe6, 0x1f, 0x18, 0xc0, 0x3d, 0xe4, 0xcc, 0x57,
-       0xb3, 0x3e, 0xec, 0x21, 0x67, 0x5e, 0xcc, 0x06, 0xd0, 0x47, 0xce, 0xfc,
-       0x11, 0xf9, 0xd5, 0xbb, 0xa9, 0x2b, 0x78, 0xb4, 0xd4, 0x07, 0xdb, 0x9b,
-       0xf4, 0xd0, 0xaf, 0x85, 0x37, 0xff, 0xbc, 0xc4, 0x9b, 0xe7, 0xff, 0x05,
-       0x6f, 0xde, 0x4a, 0x3e, 0xd8, 0x9d, 0x13, 0x4e, 0xb0, 0x92, 0x9c, 0xc0,
-       0xc6, 0xcb, 0xa5, 0x1e, 0xd8, 0x0a, 0xe6, 0xb3, 0xa7, 0x53, 0x7d, 0xc8,
-       0x4e, 0x63, 0x79, 0x8d, 0xd3, 0x77, 0x12, 0x99, 0x34, 0xe3, 0xb2, 0x92,
-       0xe8, 0xec, 0x43, 0x82, 0xf5, 0xb1, 0x96, 0xbc, 0xe8, 0xf6, 0xc0, 0x16,
-       0xdf, 0x85, 0xf4, 0x88, 0x7c, 0xa8, 0x59, 0x00, 0x56, 0xdc, 0xd0, 0x03,
-       0xab, 0x49, 0xe0, 0x4f, 0xeb, 0x20, 0xfb, 0x9a, 0x0c, 0xb3, 0x85, 0x66,
-       0xc6, 0xa7, 0x82, 0x23, 0x89, 0x10, 0xba, 0x8f, 0x93, 0xf3, 0x38, 0x3d,
-       0x30, 0x7b, 0xe4, 0x3b, 0x46, 0x1f, 0x8e, 0xce, 0xbb, 0x3d, 0xb0, 0xed,
-       0xe4, 0x6e, 0xbe, 0x44, 0x04, 0x95, 0x0b, 0x3e, 0xbc, 0x40, 0xee, 0xbc,
-       0x95, 0xeb, 0x7c, 0xa6, 0xd4, 0x07, 0x5b, 0xc1, 0x18, 0xb1, 0x73, 0x2a,
-       0x66, 0x16, 0xf0, 0x86, 0x17, 0xb8, 0xb8, 0xc2, 0xe9, 0xed, 0x4b, 0xff,
-       0x3f, 0x84, 0x73, 0x0e, 0x77, 0x0e, 0x2e, 0x66, 0x14, 0x57, 0xb7, 0x0a,
-       0xae, 0x89, 0xac, 0xab, 0x87, 0xeb, 0xda, 0x7e, 0x52, 0xeb, 0x7c, 0x85,
-       0xb6, 0x68, 0x4a, 0xbc, 0xea, 0xac, 0xc7, 0x40, 0x4a, 0x6a, 0xd9, 0x40,
-       0x5b, 0xc0, 0x39, 0x0f, 0xa5, 0xb6, 0xfd, 0x28, 0x1b, 0xef, 0xa9, 0x2c,
-       0xc5, 0xe3, 0xaa, 0x7c, 0x05, 0xd2, 0x25, 0x1f, 0x09, 0xd0, 0xa7, 0x03,
-       0x93, 0x69, 0x54, 0x6d, 0x70, 0xfd, 0x7b, 0x55, 0x7e, 0x9c, 0xbc, 0xb5,
-       0x53, 0xea, 0xe8, 0xf0, 0x76, 0xab, 0x13, 0x53, 0x56, 0x0c, 0x95, 0xe7,
-       0x4a, 0x7b, 0xa6, 0xe7, 0xe4, 0xec, 0x5c, 0x7d, 0x9b, 0xfa, 0xd5, 0x32,
-       0x1f, 0x4c, 0x93, 0xe3, 0x44, 0x02, 0x77, 0x14, 0x84, 0x2b, 0xf6, 0xe0,
-       0xa8, 0xa5, 0x45, 0xbf, 0x87, 0xf8, 0xd0, 0xfd, 0xb4, 0x51, 0xb1, 0xee,
-       0x7a, 0xbf, 0x69, 0x40, 0xfa, 0x51, 0x9f, 0xe9, 0x37, 0x0d, 0xe7, 0xf0,
-       0x8b, 0xba, 0x96, 0x4a, 0x78, 0xd6, 0xfa, 0xc9, 0xe7, 0xb5, 0xe8, 0xd3,
-       0x78, 0x02, 0x23, 0xb9, 0x9f, 0x2b, 0x21, 0xdd, 0x37, 0xf8, 0x13, 0xaf,
-       0x16, 0x9d, 0x53, 0x42, 0x7c, 0xf7, 0xee, 0x60, 0x97, 0x75, 0x37, 0x71,
-       0x27, 0x9e, 0xec, 0x54, 0xbc, 0x98, 0x89, 0x3a, 0x5c, 0x34, 0xd8, 0xc3,
-       0x6b, 0x53, 0x85, 0x32, 0xa7, 0x71, 0x6b, 0xfe, 0xed, 0xc7, 0x5d, 0xfc,
-       0x88, 0xe7, 0x83, 0x8b, 0x97, 0xe0, 0xea, 0x56, 0x4d, 0x5d, 0x1f, 0x9c,
-       0x54, 0xed, 0xfe, 0x65, 0x12, 0xc3, 0x3a, 0xf6, 0xd0, 0xf7, 0xee, 0x99,
-       0x1e, 0xa0, 0x9c, 0xc2, 0xa5, 0x57, 0x10, 0xa7, 0xfa, 0x30, 0x4e, 0x9c,
-       0xb1, 0x28, 0x5f, 0x8e, 0x35, 0xe4, 0xe2, 0xfa, 0x8c, 0x3d, 0xb9, 0x41,
-       0x37, 0x56, 0x7b, 0x8b, 0x4b, 0xa2, 0xe4, 0x36, 0xeb, 0x98, 0xb7, 0xdb,
-       0x0b, 0xcd, 0xb8, 0x7c, 0x46, 0x67, 0x7d, 0xdb, 0x41, 0xee, 0xde, 0x83,
-       0x87, 0xa9, 0xcf, 0xa3, 0x85, 0xc7, 0x91, 0xfe, 0x92, 0x0f, 0x87, 0x8f,
-       0xa7, 0xb1, 0x6a, 0x5d, 0x0a, 0xe9, 0x2f, 0x06, 0x88, 0x53, 0x21, 0x4c,
-       0x30, 0x16, 0xa1, 0xb8, 0x7e, 0x2e, 0xe7, 0x7f, 0xfe, 0x82, 0x36, 0xfb,
-       0x26, 0xed, 0xf7, 0x8d, 0x6b, 0x7b, 0x00, 0x65, 0xfe, 0x7d, 0x9d, 0xab,
-       0x7a, 0xb9, 0x86, 0xfb, 0x9c, 0xd8, 0x8c, 0x32, 0x36, 0x75, 0x5c, 0x2d,
-       0xf5, 0x12, 0x17, 0x4f, 0x6a, 0x8b, 0xf7, 0x22, 0x3e, 0x7c, 0xd9, 0x8b,
-       0x81, 0x3a, 0xfa, 0x5d, 0x94, 0x5c, 0xf5, 0xc3, 0x44, 0xc2, 0x38, 0x47,
-       0xae, 0x3a, 0xba, 0xc1, 0xe5, 0xaa, 0x9e, 0x05, 0x15, 0x15, 0x0b, 0xac,
-       0x65, 0x9d, 0x5e, 0xe2, 0x37, 0x83, 0x6e, 0x2f, 0x51, 0xf8, 0x4d, 0xab,
-       0x9c, 0x75, 0xba, 0x8d, 0xb5, 0x5c, 0xfa, 0x0a, 0x32, 0xe8, 0x2c, 0xcc,
-       0x04, 0xef, 0x21, 0x36, 0xf7, 0x49, 0x6f, 0xa4, 0x10, 0x09, 0xdf, 0x43,
-       0xde, 0xf5, 0x2d, 0xae, 0xaf, 0xec, 0xed, 0xf6, 0x15, 0x56, 0xf3, 0xbd,
-       0x28, 0x3f, 0x05, 0x57, 0x45, 0xf6, 0x1b, 0xf5, 0xe8, 0xa9, 0x92, 0xbd,
-       0x86, 0x97, 0xa9, 0x43, 0xff, 0xdc, 0x4a, 0x3c, 0x3a, 0xe7, 0xaf, 0x12,
-       0xc2, 0xff, 0x68, 0xde, 0xc5, 0xb6, 0x58, 0xfe, 0xae, 0xa0, 0xf0, 0xc9,
-       0xf6, 0xe3, 0xee, 0x77, 0xfd, 0x86, 0xef, 0x65, 0xfd, 0x56, 0x50, 0x3f,
-       0x7b, 0x5a, 0xea, 0xa2, 0x68, 0xdb, 0x19, 0xea, 0xb7, 0x78, 0xd2, 0x89,
-       0x2f, 0xd6, 0x98, 0xf1, 0xe1, 0x84, 0x57, 0xf4, 0xfa, 0x99, 0xe8, 0x45,
-       0xae, 0xc2, 0x78, 0xe1, 0xb8, 0x1e, 0x3d, 0xe2, 0xe8, 0xe5, 0xea, 0xe3,
-       0xf6, 0x69, 0xaf, 0x9c, 0x4c, 0xde, 0xd8, 0x17, 0xd5, 0xc9, 0x97, 0x3f,
-       0x61, 0x6c, 0x3c, 0x71, 0x98, 0x9c, 0xf9, 0x2a, 0x6b, 0x4a, 0x3f, 0x9f,
-       0xaf, 0x73, 0x9e, 0x97, 0x3e, 0xad, 0xe7, 0x1a, 0x67, 0x5e, 0xbc, 0xfe,
-       0x4e, 0x89, 0x2f, 0x4b, 0x4f, 0x5a, 0x9e, 0x53, 0x1d, 0x3b, 0xed, 0x76,
-       0x78, 0xa0, 0x70, 0x2b, 0x1b, 0x1d, 0xeb, 0xfe, 0xad, 0x35, 0x0b, 0x2e,
-       0xce, 0x38, 0x6e, 0xd5, 0x55, 0x25, 0x7b, 0xe1, 0xab, 0xd6, 0x3d, 0x68,
-       0xbb, 0xfe, 0x1c, 0x09, 0xef, 0x62, 0x9c, 0x7c, 0x85, 0xef, 0xec, 0x3a,
-       0x57, 0x1f, 0xbe, 0xcb, 0x6a, 0x71, 0x6c, 0x74, 0xd7, 0xb9, 0x28, 0x46,
-       0x2d, 0xe9, 0xeb, 0x43, 0xf1, 0x99, 0x87, 0xb1, 0x7d, 0x2a, 0x86, 0x77,
-       0x8d, 0x60, 0xe9, 0xec, 0x89, 0xc4, 0xa4, 0xc1, 0x98, 0x8c, 0xd0, 0x77,
-       0xe3, 0xb1, 0x77, 0xc9, 0x51, 0x33, 0x3e, 0xe0, 0x68, 0x8e, 0xb8, 0x46,
-       0xde, 0x08, 0xc5, 0x3d, 0xbb, 0xe9, 0xbe, 0x5b, 0xfe, 0xbb, 0x1a, 0xb1,
-       0x25, 0xf1, 0xd6, 0xfd, 0xa8, 0x47, 0x96, 0xd8, 0x1f, 0xd4, 0xff, 0x1a,
-       0xc7, 0x4e, 0x78, 0x98, 0x1f, 0x08, 0x4e, 0x77, 0x1a, 0xfc, 0xde, 0x34,
-       0xf8, 0x01, 0xfe, 0xd1, 0x9e, 0x91, 0xf3, 0x51, 0x8a, 0x9c, 0xc5, 0xf8,
-       0xc4, 0xae, 0xd3, 0xf5, 0xe2, 0xb7, 0xa0, 0x0f, 0x5f, 0x45, 0xd3, 0xd0,
-       0x22, 0x7e, 0x6c, 0x17, 0x79, 0xef, 0x7d, 0xc6, 0xd1, 0x2b, 0x46, 0x3c,
-       0xea, 0xa1, 0xf0, 0xc5, 0x88, 0x17, 0xf7, 0x1b, 0xb2, 0xa7, 0xa4, 0x0d,
-       0x3d, 0x0f, 0x6d, 0xf0, 0xbc, 0x22, 0x67, 0x6a, 0x2e, 0xd9, 0x99, 0x25,
-       0x32, 0xaf, 0x82, 0xb5, 0xab, 0x9b, 0x3a, 0x2b, 0xa0, 0xb5, 0xfa, 0x15,
-       0xdd, 0xf8, 0x40, 0xf9, 0x7b, 0xbb, 0x18, 0xf9, 0xc4, 0xbe, 0xac, 0x97,
-       0xc7, 0xd5, 0x62, 0x01, 0x6f, 0x59, 0xb6, 0x7a, 0x1c, 0xb3, 0x64, 0x2f,
-       0xee, 0xaf, 0xf1, 0xc0, 0x09, 0x1f, 0x3a, 0x52, 0x3f, 0xb1, 0x33, 0x11,
-       0x19, 0xf3, 0x13, 0xda, 0x42, 0xc6, 0x77, 0xfb, 0xd5, 0x2f, 0x17, 0xa0,
-       0x6c, 0xb3, 0x84, 0x33, 0x8b, 0x5f, 0x4c, 0xc1, 0xb6, 0xa4, 0x87, 0x68,
-       0xe3, 0x8e, 0xd4, 0x08, 0xde, 0x4f, 0xa5, 0xff, 0x63, 0x00, 0xda, 0x85,
-       0x2b, 0x5e, 0xad, 0xd8, 0xec, 0x8d, 0x29, 0xc1, 0x46, 0x7d, 0xa8, 0xd1,
-       0xdd, 0x9f, 0x67, 0xfd, 0x14, 0x0a, 0xec, 0x2a, 0x48, 0x9d, 0x39, 0x85,
-       0x85, 0xc9, 0x0c, 0x7c, 0xe4, 0x77, 0xa3, 0x2d, 0x5a, 0xdf, 0x73, 0x8a,
-       0x16, 0x3d, 0xa0, 0xc4, 0x94, 0x7b, 0xf5, 0x61, 0xbc, 0x60, 0x24, 0xd2,
-       0xed, 0x4a, 0x7d, 0xa0, 0xb3, 0x50, 0x1e, 0xbb, 0x83, 0xb8, 0xa1, 0x15,
-       0xaf, 0x78, 0x2b, 0x51, 0xb7, 0x5e, 0xef, 0xac, 0xf4, 0x6a, 0xc3, 0x5f,
-       0x60, 0x1d, 0xb0, 0xa3, 0x50, 0x0c, 0x7e, 0x90, 0xf0, 0x60, 0x8d, 0xb3,
-       0x87, 0x90, 0x2d, 0xf5, 0x47, 0xa7, 0xd0, 0x35, 0x69, 0x6f, 0xbe, 0x98,
-       0xd2, 0xa2, 0xcf, 0x29, 0x99, 0x3d, 0x21, 0xf2, 0x9a, 0x07, 0xa1, 0xc7,
-       0xe6, 0x19, 0xc7, 0x1d, 0x05, 0x0f, 0x56, 0x3a, 0x7e, 0x9c, 0xe5, 0x98,
-       0x87, 0x51, 0x79, 0xc2, 0xde, 0xbc, 0xc7, 0xd0, 0x86, 0xaf, 0x78, 0x33,
-       0xff, 0xb5, 0x8e, 0x76, 0xdb, 0xa6, 0x68, 0xac, 0x4f, 0x47, 0x70, 0x91,
-       0x3a, 0x7c, 0x3d, 0xa5, 0x25, 0xff, 0x4c, 0xd1, 0x7a, 0xbe, 0x4c, 0x5f,
-       0xf6, 0x9a, 0x61, 0xca, 0xa9, 0x25, 0x67, 0x21, 0xbd, 0xf3, 0x18, 0xae,
-       0x18, 0x99, 0xe0, 0xf6, 0xc6, 0x24, 0xf9, 0x59, 0x94, 0xf9, 0x30, 0x86,
-       0xa3, 0xe4, 0x77, 0x87, 0x0b, 0x15, 0x28, 0xaa, 0x3a, 0xf9, 0x59, 0x0f,
-       0x3c, 0x93, 0x21, 0x65, 0x2e, 0x1b, 0x37, 0x3a, 0xf0, 0x47, 0x28, 0x3a,
-       0x38, 0x77, 0x18, 0xa1, 0x13, 0x3f, 0xb0, 0x6b, 0x74, 0xbd, 0x75, 0x52,
-       0xe1, 0xbc, 0xcf, 0x44, 0x69, 0x63, 0xbe, 0x27, 0xe7, 0x4e, 0xac, 0x6e,
-       0xdc, 0x3b, 0x19, 0xe1, 0xfb, 0x35, 0x58, 0x7b, 0x22, 0x86, 0x0f, 0x53,
-       0x37, 0xa3, 0xe8, 0x70, 0x04, 0x85, 0x7e, 0x40, 0x3f, 0x62, 0xad, 0x95,
-       0x21, 0x8f, 0x94, 0x7d, 0xa3, 0xc3, 0x96, 0xd4, 0xe8, 0x3e, 0x7e, 0x0f,
-       0xf1, 0x57, 0xec, 0xf9, 0x39, 0x72, 0x1d, 0xf9, 0x5c, 0xd3, 0x16, 0x9b,
-       0xfb, 0x5e, 0x95, 0xb3, 0x7f, 0x89, 0x18, 0x9f, 0x53, 0x9d, 0xde, 0xe0,
-       0x28, 0xc7, 0x3c, 0x3b, 0x25, 0xb5, 0x5b, 0xfb, 0xa6, 0x40, 0x69, 0x7f,
-       0xfd, 0x87, 0x86, 0x07, 0x9b, 0x59, 0xdf, 0x47, 0x75, 0x39, 0x9b, 0x39,
-       0xaa, 0xd5, 0x61, 0x13, 0x4e, 0xab, 0x2c, 0xc4, 0xf5, 0xff, 0x80, 0x09,
-       0x35, 0x49, 0xac, 0xd1, 0xf1, 0x5e, 0xf6, 0x37, 0x58, 0xf3, 0xd4, 0xcb,
-       0xd9, 0x1b, 0xac, 0x3c, 0xe1, 0xe7, 0x9c, 0x9b, 0xc9, 0x75, 0xb6, 0xe3,
-       0xbb, 0xaa, 0x5b, 0x6f, 0x10, 0x8f, 0x30, 0x3e, 0x1b, 0x22, 0x1f, 0x0d,
-       0xf0, 0xf7, 0x46, 0xd9, 0x7e, 0x9d, 0x4c, 0xa2, 0xcb, 0xbf, 0x25, 0x53,
-       0x80, 0x7c, 0x80, 0x78, 0x99, 0x7d, 0x0d, 0x1f, 0x72, 0xec, 0xcc, 0xac,
-       0x3b, 0xe6, 0xf1, 0x82, 0x8c, 0x2b, 0xf3, 0xc5, 0x99, 0x37, 0x65, 0xfc,
-       0x90, 0x9c, 0xbf, 0xfd, 0x77, 0xce, 0x41, 0x86, 0x77, 0x82, 0x35, 0xb2,
-       0xd1, 0x88, 0x0e, 0x95, 0xeb, 0x65, 0xc9, 0x1c, 0x1a, 0xeb, 0x51, 0x79,
-       0x37, 0x8a, 0x35, 0x93, 0xf6, 0x48, 0xd4, 0x94, 0xeb, 0xb6, 0x5d, 0xbb,
-       0x51, 0x8f, 0xbe, 0xad, 0xf8, 0x98, 0xf3, 0x7c, 0xb4, 0xc1, 0x38, 0xce,
-       0x66, 0x9b, 0x2e, 0xbc, 0x4f, 0x0e, 0x15, 0x63, 0xbd, 0x77, 0xc9, 0x3b,
-       0x8e, 0xb9, 0xec, 0xb1, 0x6a, 0xe9, 0x13, 0x30, 0x0f, 0x2a, 0xb3, 0xd9,
-       0xfb, 0xab, 0x05, 0xab, 0xc6, 0xe8, 0x0b, 0xcd, 0x93, 0x22, 0xab, 0x3d,
-       0x52, 0xc3, 0x71, 0x8e, 0x72, 0x9c, 0xd9, 0x0d, 0x7a, 0xdf, 0x98, 0x22,
-       0x36, 0x0b, 0xe1, 0x58, 0xe1, 0xa2, 0xf4, 0xd0, 0x68, 0xb7, 0x69, 0x3e,
-       0x2f, 0x76, 0x8b, 0xe0, 0xbb, 0xa5, 0x71, 0x9e, 0x2a, 0x5c, 0xc0, 0x6c,
-       0xf6, 0x2d, 0xe7, 0xef, 0x31, 0xd6, 0x0d, 0xe3, 0xac, 0x21, 0xf3, 0xc4,
-       0x93, 0xc9, 0x6c, 0x53, 0xdf, 0x24, 0xe5, 0x70, 0xcf, 0xca, 0x0d, 0xe0,
-       0xd9, 0xd2, 0x33, 0xa3, 0x7c, 0x77, 0xf4, 0xda, 0xdf, 0x62, 0x23, 0x77,
-       0x0f, 0xdf, 0xdd, 0x53, 0xa8, 0xe4, 0xda, 0xb9, 0xb5, 0xf8, 0x11, 0xcb,
-       0x2f, 0x7d, 0x70, 0xbc, 0x36, 0xb5, 0x19, 0x63, 0xc6, 0x5f, 0x62, 0x2f,
-       0xf5, 0x1e, 0xa7, 0x3d, 0x4f, 0x58, 0xce, 0x5e, 0xbd, 0x9c, 0xcb, 0x22,
-       0x96, 0x87, 0xda, 0xce, 0x90, 0x93, 0x1d, 0x63, 0xcc, 0xdc, 0x97, 0x6a,
-       0xea, 0x79, 0x9d, 0x7e, 0x97, 0xfe, 0xa2, 0xec, 0x87, 0x03, 0x93, 0xb9,
-       0x47, 0x31, 0xb3, 0xa4, 0x69, 0xf1, 0x45, 0x62, 0xc2, 0x69, 0xe2, 0x94,
-       0x8f, 0x98, 0x50, 0x9b, 0xf3, 0x94, 0xf6, 0x77, 0x0d, 0x7e, 0x6f, 0xba,
-       0x30, 0x87, 0xbf, 0xa1, 0x5d, 0x44, 0xbe, 0x78, 0x72, 0x0e, 0xf2, 0xac,
-       0xdb, 0x83, 0xd5, 0xe7, 0x06, 0x71, 0xe9, 0x66, 0xb7, 0x8f, 0xe6, 0x65,
-       0xee, 0xde, 0x97, 0x6d, 0x52, 0xc7, 0x64, 0xec, 0x5e, 0x2d, 0x9a, 0xe1,
-       0x5a, 0x4d, 0x38, 0x1c, 0x5c, 0x65, 0x8e, 0x97, 0x73, 0x58, 0x35, 0xf0,
-       0xd1, 0xf7, 0xc7, 0x0c, 0x39, 0xbf, 0x10, 0x0d, 0xef, 0xe0, 0x1a, 0x8e,
-       0x59, 0x4d, 0xad, 0x71, 0x65, 0x0f, 0xca, 0xfc, 0xdb, 0xe5, 0xd4, 0x5a,
-       0xdf, 0x51, 0x34, 0xf5, 0x3c, 0x88, 0x2f, 0x21, 0xbd, 0xa4, 0xa9, 0x7f,
-       0x0a, 0x71, 0xe3, 0x7e, 0xc8, 0x39, 0x4e, 0x77, 0xac, 0x86, 0x3c, 0x33,
-       0xc9, 0xd2, 0x4f, 0xec, 0x15, 0xfa, 0x53, 0x98, 0x22, 0x77, 0x6c, 0x5c,
-       0xa7, 0x5f, 0xf8, 0x5a, 0xe9, 0x9e, 0xbb, 0x4f, 0x24, 0xfe, 0x12, 0xa0,
-       0x0d, 0x2a, 0xe1, 0x5b, 0x5a, 0xcf, 0x39, 0x68, 0x0b, 0xe7, 0x8c, 0xef,
-       0x45, 0x1c, 0xa4, 0xbf, 0x4d, 0x15, 0x14, 0x18, 0x0d, 0x17, 0x31, 0x24,
-       0xb9, 0x8b, 0xef, 0xb4, 0x67, 0x43, 0xe4, 0xb2, 0x51, 0x54, 0xea, 0xf1,
-       0xd8, 0x28, 0xf5, 0x6b, 0x27, 0x96, 0x8f, 0x13, 0x43, 0x32, 0x6a, 0xc8,
-       0x39, 0x77, 0x5a, 0xa9, 0x47, 0x9d, 0xff, 0x15, 0x90, 0x5a, 0xa8, 0x71,
-       0x46, 0xf6, 0xa8, 0x0f, 0xe3, 0xe2, 0x54, 0x11, 0xc7, 0x52, 0x69, 0xec,
-       0x5f, 0xa2, 0x62, 0xd2, 0x5a, 0xe6, 0xf4, 0x0e, 0xa4, 0xe6, 0xea, 0xca,
-       0x1d, 0x72, 0xfa, 0x91, 0x5b, 0x53, 0x9e, 0x06, 0x39, 0xa7, 0x31, 0xcb,
-       0xda, 0x6b, 0xca, 0x18, 0xc1, 0x41, 0xe3, 0xcb, 0x30, 0x96, 0x0a, 0x76,
-       0x8e, 0xe1, 0xd5, 0x19, 0xc9, 0x71, 0xc9, 0xb6, 0x5b, 0x26, 0xc5, 0x3e,
-       0x1e, 0x72, 0xdf, 0x00, 0x9a, 0x1d, 0x2e, 0xf7, 0x50, 0xdb, 0xea, 0x19,
-       0x97, 0xd3, 0x35, 0xe7, 0xe5, 0xac, 0x74, 0x0d, 0xc2, 0xb4, 0xd7, 0xf9,
-       0x94, 0x9f, 0x98, 0x23, 0xf6, 0x94, 0x33, 0x7a, 0xae, 0x9e, 0xc9, 0xbc,
-       0x82, 0xb1, 0x96, 0x1b, 0xf7, 0x58, 0xe4, 0xff, 0x06, 0xae, 0x9d, 0x1b,
-       0x2c, 0xf5, 0xc7, 0xff, 0xcc, 0xbe, 0x74, 0x93, 0xe8, 0xbd, 0x22, 0x44,
-       0x4c, 0x8f, 0xcd, 0x5c, 0xb3, 0xaf, 0xd8, 0xf4, 0x9c, 0xe4, 0x0c, 0xc7,
-       0xe6, 0x6e, 0xcf, 0x4d, 0x1b, 0xba, 0xac, 0x34, 0x31, 0x9f, 0xd0, 0xaf,
-       0x96, 0xd0, 0xdf, 0x9a, 0xd1, 0xbf, 0xc2, 0xf4, 0xf5, 0x5e, 0xb5, 0x36,
-       0xa3, 0x75, 0xfd, 0x7b, 0x36, 0x6e, 0x6e, 0x87, 0x57, 0x97, 0xeb, 0x33,
-       0x76, 0x5a, 0x95, 0xbf, 0xff, 0x24, 0x24, 0xb9, 0xfe, 0x65, 0xab, 0x68,
-       0xaf, 0x5e, 0xe6, 0x72, 0xc4, 0x1f, 0x64, 0x65, 0xdf, 0x2b, 0x63, 0xb3,
-       0xde, 0xbe, 0xf0, 0xae, 0xf7, 0x10, 0xbe, 0x9f, 0x3f, 0x8c, 0x77, 0xa6,
-       0x7c, 0x08, 0xeb, 0xa2, 0xcb, 0x66, 0xd4, 0xae, 0x4f, 0xa4, 0xdf, 0x23,
-       0x2e, 0x5e, 0x98, 0x29, 0xfb, 0xc5, 0x43, 0x6d, 0x6b, 0x66, 0x14, 0x8e,
-       0x55, 0x83, 0x0a, 0xea, 0xf9, 0x1d, 0xc3, 0x8b, 0x58, 0x89, 0xe3, 0x7a,
-       0x29, 0xa7, 0x9c, 0x7b, 0x10, 0xee, 0x1b, 0xcf, 0x1f, 0x0a, 0xb9, 0x3d,
-       0xb0, 0x10, 0x71, 0x74, 0x1c, 0x13, 0xd9, 0xa6, 0xe4, 0xfb, 0x72, 0x0e,
-       0x87, 0x35, 0xd9, 0x25, 0x8c, 0xe3, 0x44, 0xb6, 0x8c, 0xa1, 0x51, 0x39,
-       0x97, 0x9a, 0x8c, 0x79, 0x5c, 0x8c, 0x8c, 0x79, 0xb4, 0x4c, 0xcc, 0xe3,
-       0x0f, 0x09, 0x77, 0x18, 0x2d, 0xc4, 0xa3, 0x95, 0xf0, 0xe2, 0x3e, 0xc3,
-       0xf5, 0x8f, 0x86, 0x39, 0x3f, 0x62, 0x4b, 0x25, 0x2f, 0x4b, 0x4e, 0xf6,
-       0x31, 0x27, 0x2f, 0x23, 0xbf, 0xf6, 0xe1, 0x4d, 0x5d, 0xec, 0xb1, 0xa6,
-       0x6c, 0x0f, 0xe3, 0x1c, 0x1e, 0xb6, 0x8b, 0x3d, 0xe2, 0x4b, 0x7e, 0x1c,
-       0x6e, 0x9e, 0xb5, 0x67, 0x22, 0xa2, 0xbb, 0x17, 0xa7, 0x89, 0xaf, 0xb8,
-       0x39, 0x1e, 0x3d, 0xcd, 0x9c, 0x3d, 0xa6, 0x97, 0x7d, 0xfc, 0xb7, 0x4b,
-       0x72, 0xea, 0x7d, 0xf3, 0xb8, 0x9f, 0x7f, 0x37, 0x44, 0xf7, 0x2b, 0xee,
-       0x7c, 0xab, 0xe7, 0xfe, 0x26, 0x54, 0xee, 0x9f, 0xca, 0xb3, 0xb1, 0xfc,
-       0xe3, 0xfc, 0x2e, 0x63, 0x85, 0xe8, 0x9f, 0x95, 0xe8, 0x8f, 0xc8, 0xff,
-       0x89, 0x88, 0x5d, 0x64, 0x3f, 0x11, 0xb4, 0x87, 0x8d, 0xd7, 0x68, 0x8f,
-       0xc3, 0xd7, 0xce, 0x4c, 0xb9, 0xf8, 0x55, 0xc5, 0xeb, 0x3b, 0x52, 0xaf,
-       0x6c, 0x0a, 0xe2, 0x17, 0xf6, 0xa5, 0x48, 0x94, 0x98, 0x50, 0xe6, 0xa1,
-       0x62, 0x33, 0xc3, 0xb1, 0x99, 0x5b, 0x2b, 0x5e, 0xd3, 0xa3, 0x38, 0x40,
-       0xbe, 0xbd, 0x90, 0x2d, 0x9f, 0x15, 0x89, 0x13, 0x6b, 0x3e, 0x8f, 0xfe,
-       0x3a, 0x19, 0xaf, 0x9e, 0xfe, 0x95, 0xa4, 0x0d, 0xd4, 0xf0, 0xce, 0x69,
-       0xa9, 0xb5, 0xc9, 0x8f, 0x27, 0xe3, 0xc6, 0x43, 0xe4, 0x91, 0x13, 0x93,
-       0xb6, 0xfd, 0x96, 0x81, 0x3b, 0xc3, 0xcc, 0xef, 0x2f, 0x90, 0x4f, 0x90,
-       0x6f, 0xc4, 0x2a, 0x95, 0xa6, 0xe8, 0x2a, 0xe6, 0xfa, 0x31, 0xd6, 0x0a,
-       0x4f, 0x13, 0xe3, 0x4e, 0x2f, 0x54, 0xc1, 0x3a, 0x21, 0xfb, 0x82, 0x55,
-       0x98, 0x7c, 0x26, 0x49, 0xd9, 0x97, 0x72, 0x9c, 0x00, 0xaa, 0xcf, 0xb4,
-       0xa2, 0xea, 0x94, 0x82, 0x1d, 0x89, 0x56, 0x04, 0xcf, 0xd4, 0x30, 0xff,
-       0x06, 0x70, 0xa5, 0x85, 0x6b, 0xfc, 0x4c, 0x59, 0x0f, 0x67, 0x8f, 0x14,
-       0x4f, 0xe6, 0x62, 0xe4, 0xf1, 0x11, 0x2c, 0x58, 0xb2, 0x1f, 0x1c, 0x70,
-       0xb0, 0xf4, 0xc2, 0x86, 0x7a, 0x67, 0xcf, 0xea, 0xc5, 0x82, 0x1e, 0x3d,
-       0xab, 0xd4, 0xe0, 0xc7, 0x27, 0x8a, 0x37, 0x57, 0xc2, 0x7e, 0x79, 0x85,
-       0x99, 0xe8, 0xdb, 0x4b, 0xff, 0x5f, 0xb3, 0x3a, 0xc2, 0xfa, 0xc6, 0xb6,
-       0xaf, 0x6e, 0x94, 0x3a, 0xd8, 0x70, 0xea, 0x60, 0x77, 0x6f, 0x5f, 0x1f,
-       0x7c, 0x4c, 0xc9, 0x6c, 0x0f, 0xc3, 0xfe, 0xa8, 0xd2, 0xb4, 0x3f, 0xf6,
-       0x9b, 0x09, 0xbe, 0x2f, 0x7b, 0x7c, 0xb6, 0xfd, 0xc3, 0x16, 0xdb, 0xce,
-       0xb7, 0xc4, 0xfb, 0x54, 0xaf, 0x8a, 0x33, 0x8d, 0xb2, 0x2f, 0xe8, 0xc1,
-       0x8f, 0x13, 0x7a, 0x74, 0x2f, 0x64, 0x0f, 0x9e, 0x78, 0xbf, 0x4c, 0xce,
-       0x18, 0xd6, 0x87, 0x3b, 0xad, 0xa5, 0x78, 0x61, 0x7e, 0x23, 0xfa, 0xfd,
-       0x70, 0xce, 0xc5, 0xd8, 0x06, 0xde, 0x5e, 0x01, 0xc9, 0xe1, 0x89, 0xd6,
-       0xc7, 0x10, 0xc1, 0x7c, 0xe1, 0x30, 0x1e, 0x39, 0x21, 0xf5, 0xd7, 0xea,
-       0xb6, 0xc0, 0x09, 0xfb, 0x07, 0x51, 0xb3, 0x48, 0x8c, 0xb4, 0xed, 0xaa,
-       0x8d, 0x4d, 0x51, 0xa6, 0x26, 0xf2, 0x8d, 0x18, 0x79, 0xb3, 0x3e, 0xf8,
-       0x63, 0x2c, 0xc1, 0xd9, 0xd9, 0xf4, 0xcd, 0xe4, 0xf2, 0x9d, 0xcf, 0x2a,
-       0xc2, 0xdb, 0x23, 0x78, 0xbe, 0x20, 0x9c, 0x65, 0x6d, 0x5b, 0xd7, 0x89,
-       0xe5, 0x78, 0x79, 0x3e, 0x82, 0xb3, 0x96, 0x4e, 0xce, 0x04, 0xa5, 0xda,
-       0xb4, 0x6b, 0x6b, 0x29, 0x6b, 0xb5, 0xd7, 0x8b, 0xed, 0x29, 0xa9, 0x19,
-       0xf5, 0xc1, 0x90, 0x82, 0xe5, 0x95, 0xd0, 0x17, 0x1f, 0x06, 0x86, 0x82,
-       0x66, 0xe2, 0xc2, 0xb3, 0x4a, 0xa2, 0xef, 0x03, 0x6f, 0x04, 0xdf, 0x22,
-       0x16, 0x7d, 0xbd, 0x20, 0x67, 0xa5, 0x88, 0x37, 0xb3, 0x31, 0xae, 0x5b,
-       0x00, 0x9e, 0x86, 0x1a, 0x1c, 0x61, 0xec, 0xbc, 0x66, 0x54, 0x10, 0xaf,
-       0xe4, 0xec, 0x94, 0x60, 0x7d, 0xbd, 0x9c, 0x19, 0xb1, 0x5f, 0xd4, 0xdd,
-       0x7a, 0xdf, 0x98, 0xbb, 0xf1, 0x4c, 0xb1, 0x4a, 0x8c, 0x6f, 0xea, 0x89,
-       0x2a, 0x6f, 0xd8, 0xe9, 0x2f, 0x2a, 0xd4, 0xb3, 0xb7, 0x06, 0x55, 0x8e,
-       0xae, 0x18, 0xcd, 0x95, 0xf3, 0x4b, 0xad, 0xd4, 0x77, 0x3d, 0x99, 0x92,
-       0x3f, 0x56, 0x33, 0xee, 0x8f, 0x32, 0x5f, 0x57, 0x9e, 0x90, 0xbc, 0x42,
-       0xfe, 0xad, 0x6c, 0x26, 0x2f, 0x16, 0x0e, 0x11, 0xc0, 0x83, 0xaa, 0xf8,
-       0x86, 0x4a, 0xfd, 0x36, 0xf9, 0xe4, 0x2c, 0xd4, 0x0b, 0x05, 0xc9, 0xeb,
-       0x82, 0x0b, 0xe5, 0xf9, 0xa2, 0xa8, 0x9b, 0x94, 0x35, 0x52, 0xdb, 0x3e,
-       0x9a, 0x0c, 0xc9, 0xd9, 0xf7, 0x11, 0x0f, 0xeb, 0xef, 0x00, 0xfd, 0xeb,
-       0x9e, 0x16, 0x7d, 0x70, 0xb3, 0x57, 0x63, 0x0d, 0x1e, 0x67, 0x2d, 0xa1,
-       0xb5, 0x4e, 0x28, 0x37, 0x8e, 0xf3, 0x6c, 0x8d, 0xc4, 0x4b, 0x86, 0x7a,
-       0x3e, 0xe9, 0xe8, 0xb4, 0x86, 0x3a, 0x09, 0x5e, 0x27, 0x89, 0xd7, 0x35,
-       0xb8, 0x32, 0x05, 0x9d, 0x11, 0x8c, 0x57, 0x0d, 0x02, 0x95, 0x9a, 0x48,
-       0x77, 0x40, 0x62, 0x41, 0xeb, 0x17, 0x3e, 0x55, 0x4d, 0x7c, 0x9e, 0x9d,
-       0x92, 0x7c, 0xa3, 0x08, 0x57, 0xc9, 0xd4, 0x9a, 0x43, 0xf8, 0x70, 0x03,
-       0xf0, 0xc6, 0xa4, 0xbb, 0xef, 0xde, 0x27, 0x67, 0x6f, 0x2b, 0xdd, 0x33,
-       0x0d, 0x8f, 0x39, 0x67, 0x15, 0x64, 0xfc, 0x43, 0x38, 0x93, 0x15, 0x7e,
-       0x39, 0x44, 0x7e, 0x19, 0x1f, 0x26, 0xf7, 0x6c, 0x2d, 0x40, 0x62, 0xb2,
-       0xc9, 0xf8, 0x88, 0xbe, 0xff, 0x2c, 0x79, 0xeb, 0x11, 0xb8, 0xfb, 0xee,
-       0x8d, 0xa5, 0xb3, 0x08, 0xf1, 0x7c, 0xa7, 0xb2, 0xd3, 0x39, 0xcf, 0x64,
-       0x30, 0xde, 0x3a, 0x94, 0x1d, 0xf3, 0xdb, 0x94, 0xae, 0xf9, 0x6e, 0x65,
-       0x4f, 0x41, 0xea, 0xd8, 0xd5, 0x6d, 0x0f, 0x9e, 0xd8, 0xad, 0xec, 0x9c,
-       0xed, 0x55, 0xc8, 0x6f, 0xd5, 0x80, 0xd9, 0xa7, 0x74, 0xcf, 0xbb, 0xfd,
-       0xf4, 0x4e, 0xd6, 0x70, 0x3b, 0x2d, 0xf1, 0x07, 0xb5, 0xad, 0x6b, 0x52,
-       0xfe, 0x17, 0x2b, 0x22, 0xff, 0xf7, 0xd0, 0xbf, 0x55, 0xb1, 0xed, 0x55,
-       0xa9, 0xd7, 0x65, 0x3d, 0xec, 0xe7, 0x53, 0xcc, 0x93, 0x56, 0x0d, 0x06,
-       0x58, 0x83, 0x8c, 0x1a, 0xb7, 0x94, 0xf6, 0xcf, 0x44, 0x27, 0x39, 0x2f,
-       0x21, 0xfe, 0x8a, 0x4c, 0x25, 0x65, 0xf8, 0x07, 0xca, 0xbf, 0xbf, 0xa4,
-       0x57, 0xb7, 0x9c, 0x27, 0xf0, 0x23, 0x23, 0x3a, 0xe4, 0xa9, 0xef, 0xb1,
-       0xc9, 0xeb, 0x7a, 0xf9, 0x78, 0x6d, 0x9c, 0x5c, 0x75, 0xbf, 0xa2, 0x0d,
-       0x3f, 0xe7, 0xea, 0x75, 0xe1, 0x8a, 0xa2, 0x15, 0x47, 0x21, 0xb8, 0xe0,
-       0xea, 0xb5, 0xb6, 0xa4, 0xd7, 0x9a, 0x7c, 0xa7, 0x73, 0x4e, 0xab, 0x86,
-       0x7a, 0x2d, 0x4c, 0x76, 0x28, 0x9d, 0xf3, 0xd2, 0xcb, 0x14, 0xdd, 0x44,
-       0x8f, 0x13, 0x76, 0x95, 0xde, 0xad, 0xdc, 0xee, 0x9c, 0x2b, 0x93, 0xb3,
-       0x5d, 0xb2, 0xdf, 0x5f, 0xd6, 0x4b, 0x72, 0xfa, 0xd2, 0xf0, 0xb6, 0x69,
-       0x35, 0xbc, 0x75, 0xda, 0xb6, 0xbf, 0x6b, 0xfc, 0xb3, 0xa3, 0xcb, 0x59,
-       0x43, 0x74, 0x91, 0x73, 0x23, 0x65, 0x7d, 0xbe, 0x50, 0xd2, 0x47, 0xd6,
-       0xea, 0xfa, 0x3a, 0x95, 0xff, 0x87, 0xef, 0xdd, 0xac, 0x7b, 0xa6, 0xa4,
-       0xac, 0x4f, 0xd8, 0x2c, 0x9f, 0x2f, 0x1b, 0xc2, 0x1b, 0xbc, 0xff, 0x93,
-       0x6c, 0x59, 0x2f, 0x2f, 0xe6, 0x66, 0xc5, 0xfe, 0x43, 0xf2, 0x3f, 0x7c,
-       0xc4, 0x91, 0xb8, 0x31, 0x46, 0x3f, 0x72, 0xf5, 0xd3, 0x86, 0x57, 0x7a,
-       0x9b, 0x8a, 0x57, 0xa0, 0xf5, 0x2f, 0x2a, 0x89, 0x34, 0x6b, 0x70, 0x9c,
-       0x2d, 0xfc, 0xea, 0xfa, 0x35, 0xe7, 0xab, 0x94, 0x6d, 0x39, 0x19, 0xfb,
-       0x21, 0x8e, 0x2d, 0x67, 0x4a, 0x14, 0x3c, 0x37, 0x0b, 0xcc, 0x5a, 0x9c,
-       0xd6, 0x1c, 0xc1, 0xd3, 0x86, 0x6d, 0x3f, 0xdb, 0xa2, 0xcb, 0x59, 0xa0,
-       0xf3, 0x6e, 0xaf, 0x08, 0x46, 0x8d, 0x2e, 0x7b, 0x79, 0x72, 0x9e, 0xa4,
-       0x97, 0x36, 0x10, 0xdd, 0xc5, 0x07, 0xca, 0x6b, 0x2f, 0xe7, 0xdc, 0x32,
-       0xb4, 0x8f, 0xd8, 0xa6, 0x7c, 0xde, 0x4d, 0xfa, 0x30, 0x37, 0xda, 0x64,
-       0x6d, 0xd8, 0x59, 0x5f, 0x43, 0xfc, 0x95, 0xe8, 0x43, 0x5f, 0x9d, 0x23,
-       0x97, 0x18, 0x33, 0xfc, 0x0e, 0x6f, 0x3b, 0x42, 0xae, 0x32, 0xc1, 0xd8,
-       0x79, 0xd2, 0xba, 0x80, 0x0b, 0xf9, 0xd7, 0xf0, 0xc6, 0xb5, 0xff, 0x67,
-       0x13, 0x7f, 0xb9, 0xb8, 0xb1, 0xcb, 0x39, 0xd3, 0x74, 0xba, 0xf5, 0x96,
-       0x84, 0xe0, 0x50, 0x77, 0xb3, 0x9c, 0x71, 0xaa, 0x34, 0xf3, 0x9b, 0x64,
-       0xbf, 0xab, 0xc2, 0x34, 0x6f, 0x3d, 0xaf, 0x8b, 0x6d, 0xfe, 0x62, 0xfd,
-       0x19, 0x5d, 0xf4, 0xfa, 0x9f, 0x6b, 0xc7, 0x9d, 0xff, 0xaf, 0xfc, 0xbb,
-       0x5b, 0xf7, 0xe9, 0x12, 0x3b, 0x67, 0x5b, 0xda, 0x1d, 0x4c, 0x68, 0x35,
-       0x57, 0x39, 0x36, 0x68, 0x31, 0x6f, 0x71, 0x3e, 0x0d, 0x33, 0xe9, 0x7c,
-       0x9a, 0xa6, 0x6b, 0x9b, 0x6e, 0xb3, 0xc1, 0xf9, 0xec, 0x30, 0xdd, 0xf3,
-       0xcf, 0x69, 0x53, 0x77, 0x3e, 0x7b, 0xcc, 0xb8, 0xf3, 0xd9, 0x69, 0xae,
-       0xbc, 0x2e, 0x17, 0x7f, 0xfe, 0x1f, 0x9b, 0x97, 0x53, 0xd9, 0x78, 0x3a,
-       0x00, 0x00, 0x00 };
-
-static const u32 bnx2_TXP_b06FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_TXP_b06FwRodata[(0x0/4) + 1] = { 0x0 };
-
-static struct fw_info bnx2_txp_fw_06 = {
-       /* Firmware version: 4.6.16 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0x10,
-
-       .start_addr                     = 0x08000098,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x3a74,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_TXP_b06FwText,
-       .gz_text_len                    = sizeof(bnx2_TXP_b06FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_TXP_b06FwData,
-
-       .sbss_addr                      = 0x08003aa0,
-       .sbss_len                       = 0x68,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08003b08,
-       .bss_len                        = 0x14c,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x00000000,
-       .rodata_len                     = 0x0,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_TXP_b06FwRodata,
-};
-
 /* Initialized Values for the TX Processor. */
 static const struct cpu_reg cpu_reg_txp = {
        .mode = BNX2_TXP_CPU_MODE,
@@ -4461,4 +86,3 @@ static const struct cpu_reg cpu_reg_txp = {
        .spad_base = BNX2_TXP_SCRATCH,
        .mips_view_base = 0x8000000,
 };
-
diff --git a/drivers/net/bnx2_fw2.h b/drivers/net/bnx2_fw2.h
deleted file mode 100644 (file)
index c54e488..0000000
+++ /dev/null
@@ -1,4547 +0,0 @@
-/* bnx2_fw2.h: Broadcom NX2 network driver.
- *
- * Copyright (c) 2004, 2005, 2006, 2007 Broadcom Corporation
- *
- * 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, except as noted below.
- *
- * This file contains firmware data derived from proprietary unpublished
- * source code, Copyright (c) 2004, 2005, 2006, 2007 Broadcom Corporation.
- *
- * Permission is hereby granted for the distribution of this firmware data
- * in hexadecimal or equivalent format, provided this copyright notice is
- * accompanying it.
- */
-
-static u8 bnx2_COM_b09FwText[] = {
-       0xcd, 0x7c, 0x7b, 0x6c, 0x5c, 0xd7, 0x99, 0xdf, 0x77, 0xef, 0xcc, 0x90,
-       0x43, 0x6a, 0x44, 0x5d, 0x32, 0x13, 0x66, 0x1c, 0x33, 0xcd, 0x3c, 0x2e,
-       0x29, 0xda, 0x64, 0x92, 0x31, 0x77, 0xa4, 0xd0, 0xc9, 0xad, 0x3d, 0x99,
-       0x19, 0xc9, 0x4c, 0xa8, 0x0d, 0xe8, 0x44, 0x2e, 0x52, 0x54, 0x28, 0xd8,
-       0x21, 0xe5, 0x28, 0x8b, 0xec, 0xae, 0xf2, 0x28, 0x9a, 0x2e, 0xd2, 0xd5,
-       0x64, 0x48, 0x29, 0xca, 0x62, 0xc4, 0x19, 0xd3, 0x34, 0x93, 0xa2, 0x01,
-       0x32, 0x19, 0x92, 0x72, 0x76, 0x31, 0x12, 0x15, 0xdb, 0xcd, 0x1a, 0x41,
-       0xe2, 0xb0, 0xd4, 0x23, 0xde, 0x20, 0x2d, 0xb4, 0x1b, 0x17, 0x4d, 0xd3,
-       0x45, 0x21, 0xc8, 0x4e, 0x6c, 0x6c, 0xb3, 0x6d, 0x50, 0x2c, 0x10, 0x77,
-       0x91, 0x64, 0xfa, 0xfb, 0x9d, 0x73, 0xee, 0x70, 0x44, 0x31, 0x4e, 0xba,
-       0x7f, 0x95, 0xc0, 0xe0, 0xdc, 0x7b, 0x9e, 0xdf, 0xf9, 0xce, 0xf7, 0x3e,
-       0xdf, 0xe5, 0x43, 0x22, 0xbd, 0x62, 0xfe, 0xf6, 0xe3, 0x97, 0xf9, 0xfd,
-       0x3f, 0x9c, 0x7b, 0xe0, 0x9d, 0x87, 0xdf, 0x89, 0xc7, 0x43, 0xf6, 0x81,
-       0xae, 0x20, 0xeb, 0x03, 0xf8, 0x45, 0xf1, 0x9b, 0x30, 0xcf, 0x7b, 0xfd,
-       0x39, 0xf8, 0x1d, 0xb6, 0x44, 0x66, 0xff, 0x46, 0xc4, 0xda, 0xd5, 0x16,
-       0xfe, 0x35, 0x63, 0xde, 0xe8, 0xcf, 0xfe, 0x2d, 0xfb, 0x39, 0xff, 0x80,
-       0xb9, 0xfd, 0xbf, 0x80, 0x19, 0xbe, 0xdf, 0xfc, 0x24, 0x6c, 0x7b, 0xb7,
-       0x3e, 0x90, 0x73, 0x25, 0x1c, 0xf0, 0x7e, 0x38, 0x3d, 0xe7, 0x8a, 0x64,
-       0x9b, 0x63, 0xf1, 0xbc, 0xfc, 0xb2, 0x55, 0x8a, 0x06, 0x85, 0xf5, 0x6f,
-       0xf3, 0x7e, 0xf1, 0x95, 0x6f, 0xbf, 0x3b, 0xf1, 0xb3, 0x7a, 0x40, 0xc2,
-       0x8e, 0xf7, 0xba, 0x38, 0x23, 0x12, 0x1e, 0xc2, 0x98, 0x2f, 0x1f, 0x9c,
-       0xb5, 0xa5, 0xcf, 0x9f, 0xeb, 0xb5, 0xd6, 0xb7, 0x0f, 0x4a, 0xc9, 0xf6,
-       0x1c, 0xb9, 0xb2, 0x19, 0x95, 0xef, 0x6c, 0x8a, 0x35, 0x93, 0xe9, 0x11,
-       0x7b, 0xf9, 0xad, 0x92, 0x75, 0x2c, 0x09, 0xb8, 0x5c, 0x27, 0x2e, 0xb9,
-       0xca, 0x20, 0xde, 0x13, 0x31, 0x91, 0x7f, 0xbe, 0x5f, 0x8f, 0x0d, 0x4b,
-       0x60, 0x55, 0xc2, 0x5d, 0xde, 0x0b, 0xd3, 0x37, 0x56, 0x62, 0x12, 0x5c,
-       0x1a, 0x97, 0x72, 0x35, 0x22, 0xa1, 0x55, 0x19, 0x0a, 0xc8, 0x70, 0xec,
-       0x71, 0xf4, 0x28, 0x34, 0x83, 0x72, 0xa4, 0x69, 0x49, 0xd0, 0x0d, 0x03,
-       0xb6, 0x08, 0x7e, 0x0e, 0x7e, 0x51, 0xfc, 0x62, 0xf8, 0x9d, 0xc5, 0x3c,
-       0x43, 0x92, 0x6f, 0x72, 0x4e, 0xac, 0x5b, 0xc5, 0xfa, 0xd5, 0x84, 0x33,
-       0x8b, 0x79, 0x6f, 0x05, 0x62, 0xf2, 0xed, 0x83, 0x84, 0xcb, 0x21, 0x3c,
-       0x80, 0x2d, 0x6c, 0xe5, 0x56, 0xe4, 0x74, 0x3e, 0x2d, 0x71, 0xdb, 0xed,
-       0x95, 0xa2, 0x63, 0xc5, 0xe7, 0x47, 0x07, 0xa4, 0x74, 0x1c, 0xed, 0x55,
-       0xc9, 0xda, 0x98, 0xbf, 0xe8, 0xc8, 0xac, 0x6e, 0x63, 0xdd, 0x17, 0x41,
-       0x27, 0x09, 0x87, 0x08, 0xfb, 0x4e, 0xf5, 0x31, 0x3c, 0x73, 0xbe, 0x78,
-       0x50, 0xc3, 0xbd, 0x8a, 0x77, 0xd6, 0xff, 0x41, 0x44, 0xbf, 0xf3, 0x99,
-       0x7d, 0xfd, 0x75, 0xfd, 0xfd, 0x72, 0xfd, 0x51, 0xec, 0x99, 0x30, 0xf8,
-       0x7b, 0x96, 0x52, 0x08, 0xb0, 0x34, 0x56, 0x22, 0xd6, 0xda, 0xca, 0xb8,
-       0x9c, 0xab, 0x3e, 0x24, 0xb9, 0x74, 0xab, 0x35, 0x97, 0x96, 0xa8, 0x2d,
-       0xc3, 0x4e, 0x1e, 0x1d, 0xb6, 0x9b, 0x62, 0x35, 0x2a, 0x12, 0xee, 0x06,
-       0x5e, 0x5e, 0x5d, 0xe1, 0xdc, 0x41, 0xd4, 0x0d, 0xa2, 0x7f, 0x9f, 0xb5,
-       0xbe, 0x02, 0xf8, 0x3d, 0xe2, 0xa7, 0xd5, 0x5a, 0x4c, 0x0f, 0xc7, 0xe6,
-       0xb1, 0xe6, 0xd5, 0xe6, 0xf0, 0xe4, 0x6d, 0x71, 0x30, 0xe7, 0x00, 0xfa,
-       0x10, 0x57, 0x9c, 0x8b, 0x73, 0x72, 0xbe, 0x08, 0xc6, 0x46, 0xd1, 0x46,
-       0xb8, 0x5a, 0xad, 0x5c, 0xda, 0xe1, 0xbb, 0x6c, 0x01, 0x7f, 0x5b, 0xc4,
-       0x5f, 0xef, 0x90, 0x7c, 0xb7, 0xc9, 0x35, 0xda, 0xb0, 0x97, 0xba, 0xbc,
-       0xe7, 0xed, 0xed, 0x0a, 0xcf, 0x2d, 0x2c, 0xef, 0x0b, 0x26, 0x46, 0x4b,
-       0x8a, 0x4e, 0x66, 0xb1, 0x1f, 0x4b, 0xd1, 0x84, 0x85, 0xe7, 0x64, 0x93,
-       0xfd, 0x89, 0xeb, 0xb8, 0x2c, 0xe0, 0x5c, 0xcb, 0x2b, 0x25, 0xfb, 0x6a,
-       0xf3, 0x17, 0xad, 0x9c, 0xbb, 0x68, 0x6f, 0xaf, 0xb3, 0xff, 0x09, 0xf4,
-       0x0f, 0xca, 0x62, 0xa5, 0x4f, 0x08, 0x93, 0x1e, 0x77, 0x02, 0xe3, 0xc4,
-       0xb1, 0xbd, 0x73, 0xf6, 0xd5, 0xf5, 0xf3, 0xf6, 0x35, 0x75, 0x6e, 0x58,
-       0xab, 0x3d, 0x57, 0x27, 0xde, 0xc6, 0xfe, 0x3f, 0xc4, 0x5b, 0x0c, 0xf3,
-       0x47, 0x51, 0xee, 0xb3, 0x1a, 0xb5, 0x16, 0xd6, 0x8f, 0xe1, 0x79, 0x2f,
-       0x1c, 0xde, 0x52, 0x74, 0x77, 0x05, 0x74, 0xe7, 0x78, 0x31, 0x79, 0x66,
-       0x73, 0x08, 0xfb, 0x88, 0xca, 0xd7, 0xc1, 0x17, 0x03, 0x87, 0xf7, 0x49,
-       0x1e, 0x7c, 0x41, 0x7a, 0x7b, 0x74, 0xf5, 0x9f, 0x49, 0x31, 0x9a, 0x18,
-       0xa5, 0xfc, 0x48, 0x4e, 0x80, 0x9e, 0x0d, 0x6b, 0xe7, 0x96, 0xb2, 0x29,
-       0x5b, 0x1e, 0x16, 0xdb, 0xc3, 0xba, 0x99, 0x31, 0xa7, 0x20, 0x41, 0xb4,
-       0x65, 0x25, 0xe0, 0x45, 0x25, 0xb7, 0xfa, 0x5e, 0x0b, 0x74, 0x19, 0x5f,
-       0xc0, 0xa0, 0xc0, 0x92, 0x58, 0xb6, 0xdb, 0x25, 0xc5, 0xe3, 0xac, 0x0f,
-       0x83, 0xc6, 0xc1, 0xb3, 0x2b, 0x07, 0x00, 0x97, 0x0c, 0xdb, 0xc2, 0xba,
-       0x61, 0xa7, 0x2c, 0x25, 0xb1, 0x2f, 0xff, 0xa1, 0x65, 0x64, 0x9e, 0xc1,
-       0xef, 0xa8, 0x59, 0xab, 0xcd, 0x87, 0x96, 0xbd, 0x1a, 0xb1, 0x02, 0xab,
-       0xe3, 0x72, 0x76, 0x0f, 0xbc, 0x36, 0x80, 0x57, 0x7b, 0xc9, 0xe7, 0xd3,
-       0x20, 0xde, 0x07, 0xd1, 0xb7, 0xcf, 0x0a, 0xae, 0xde, 0x8d, 0xd3, 0xb5,
-       0xe6, 0x70, 0x7a, 0x1b, 0x38, 0xb5, 0x57, 0x07, 0xd0, 0xe7, 0x6e, 0x9c,
-       0x36, 0x80, 0x53, 0x7b, 0x55, 0xe3, 0xb3, 0x01, 0x7c, 0xda, 0x4b, 0x51,
-       0x94, 0xfb, 0x2c, 0x7b, 0x59, 0xe3, 0xb3, 0x61, 0x78, 0xfa, 0x62, 0x93,
-       0xb0, 0x66, 0x3b, 0x68, 0x2e, 0x4b, 0xda, 0x81, 0x9c, 0x2a, 0xc8, 0x5c,
-       0xc5, 0x06, 0xbe, 0x82, 0xe2, 0x4e, 0x58, 0x32, 0xa7, 0xda, 0x0a, 0x92,
-       0x02, 0x0d, 0x95, 0x9c, 0xb1, 0x51, 0x5b, 0x12, 0xf1, 0xac, 0x0d, 0x7c,
-       0x57, 0x81, 0xf7, 0x2a, 0x70, 0xae, 0x64, 0xc2, 0x8b, 0xe0, 0xd7, 0x38,
-       0xce, 0x65, 0x77, 0x7d, 0xc2, 0xa9, 0x2b, 0x9e, 0x8d, 0x9b, 0x33, 0x23,
-       0xed, 0xf3, 0x9c, 0x62, 0x38, 0x2f, 0x75, 0x7e, 0xd6, 0x5f, 0x66, 0xf6,
-       0x49, 0x6a, 0x39, 0xa0, 0xce, 0x2b, 0xbd, 0xfa, 0xae, 0xf6, 0x79, 0xd9,
-       0x13, 0x94, 0x65, 0x3c, 0x23, 0x91, 0xd4, 0x12, 0xcf, 0x29, 0x9b, 0x0a,
-       0x08, 0xcf, 0x2a, 0x24, 0xd9, 0x19, 0x9e, 0x4b, 0x54, 0x92, 0xab, 0x3c,
-       0xb3, 0x0d, 0x73, 0x5e, 0xfa, 0x9c, 0x92, 0x7b, 0x9c, 0x53, 0xd2, 0x9c,
-       0xd3, 0x76, 0xf3, 0x8a, 0x39, 0xa7, 0x7f, 0x2b, 0x86, 0xe6, 0xdf, 0x10,
-       0x07, 0x36, 0x70, 0x10, 0xbc, 0x03, 0x07, 0xdd, 0x6d, 0x1c, 0xc4, 0x6d,
-       0xec, 0xe1, 0xae, 0xfd, 0x77, 0xd6, 0x75, 0xee, 0x5d, 0x4a, 0x41, 0x4f,
-       0xac, 0x85, 0x0a, 0xe1, 0x0e, 0x48, 0x71, 0x86, 0x30, 0x52, 0xae, 0x6b,
-       0x58, 0xf3, 0x2b, 0x94, 0x6d, 0x07, 0x04, 0x34, 0xf1, 0xb6, 0x80, 0x1a,
-       0x53, 0x92, 0x85, 0x26, 0xdb, 0x4a, 0x92, 0xcb, 0x80, 0x5e, 0x6b, 0xac,
-       0x03, 0x83, 0x6e, 0x6a, 0x3e, 0xde, 0xd1, 0x07, 0xd1, 0x36, 0x1e, 0xf3,
-       0x95, 0x38, 0xe4, 0x74, 0x10, 0xe5, 0xd7, 0x50, 0xee, 0xb3, 0x66, 0x6a,
-       0x7f, 0x65, 0x49, 0x5f, 0x4b, 0x9c, 0x09, 0xee, 0x31, 0x36, 0x9d, 0x73,
-       0x4b, 0x31, 0x47, 0xde, 0x26, 0xce, 0x3b, 0x43, 0x22, 0x83, 0x09, 0xa7,
-       0x28, 0xff, 0x05, 0xed, 0x89, 0x58, 0x56, 0xfe, 0xb7, 0x4f, 0xbb, 0xc0,
-       0x43, 0xcf, 0xeb, 0x59, 0xf5, 0xc4, 0x7a, 0x8e, 0xcb, 0xa0, 0x2e, 0x24,
-       0xb3, 0xd0, 0x31, 0x05, 0x97, 0xeb, 0x71, 0xfe, 0xf8, 0x2c, 0xd7, 0xcd,
-       0x37, 0x7d, 0x7d, 0x20, 0xd9, 0x80, 0xc7, 0x36, 0xf2, 0xe5, 0xa4, 0x95,
-       0x6f, 0x12, 0x57, 0x19, 0x71, 0x9b, 0x1a, 0x66, 0x0d, 0x6b, 0x1b, 0x4e,
-       0xf0, 0x6b, 0x16, 0x34, 0x49, 0xd8, 0xe2, 0xe0, 0x9b, 0x73, 0x01, 0xff,
-       0x1c, 0x82, 0xde, 0xa4, 0x2c, 0x42, 0x3f, 0x96, 0x2b, 0x9c, 0xef, 0x33,
-       0x56, 0xe0, 0xb2, 0x3f, 0x3f, 0xcf, 0x86, 0x73, 0xeb, 0xf9, 0xca, 0xcd,
-       0xd7, 0x0c, 0xef, 0x2b, 0x3d, 0x88, 0xf9, 0x4a, 0x1d, 0xf3, 0x95, 0xc8,
-       0xb3, 0x07, 0x94, 0xae, 0x39, 0x4e, 0xfc, 0x9d, 0x47, 0xdb, 0x2d, 0xd0,
-       0x08, 0xf9, 0x81, 0xfc, 0x41, 0x5e, 0x7d, 0xb7, 0x8d, 0xfd, 0x76, 0xe0,
-       0x76, 0x06, 0x72, 0x98, 0xbc, 0x11, 0x96, 0x7c, 0x94, 0xf5, 0x8f, 0x1b,
-       0x98, 0x20, 0x13, 0xd4, 0xfb, 0xf1, 0x1e, 0x5f, 0x3e, 0x82, 0x16, 0x01,
-       0xdb, 0xf3, 0x6a, 0x8f, 0xb6, 0xe7, 0x01, 0x37, 0x9d, 0x30, 0x72, 0xdf,
-       0x9e, 0x91, 0xdb, 0x3e, 0xbc, 0x3c, 0x2b, 0xca, 0x55, 0xb1, 0xd6, 0x33,
-       0x61, 0xc8, 0x70, 0x5b, 0xf2, 0x69, 0xd0, 0x66, 0x3a, 0x60, 0xe4, 0xc3,
-       0x8b, 0xc6, 0x56, 0xd2, 0x38, 0x0e, 0x2a, 0x3d, 0xbe, 0x88, 0x79, 0x4f,
-       0x00, 0x46, 0xce, 0x19, 0xb4, 0xd6, 0x2a, 0x11, 0xe8, 0x6c, 0xc0, 0xe6,
-       0x24, 0xe2, 0x80, 0x09, 0xef, 0x7e, 0x9f, 0x88, 0x2c, 0x6c, 0xfa, 0xeb,
-       0x2e, 0xb6, 0xf5, 0x45, 0x49, 0xe1, 0xdb, 0x99, 0x0d, 0xec, 0xd0, 0xc6,
-       0xcc, 0xc9, 0xca, 0x99, 0x96, 0xed, 0x92, 0x06, 0xdd, 0xd1, 0x86, 0x44,
-       0x26, 0x37, 0x32, 0xef, 0x06, 0xbf, 0xa1, 0x1e, 0x63, 0xca, 0xcd, 0x52,
-       0xc4, 0x76, 0x5d, 0x94, 0x94, 0x3f, 0x27, 0xba, 0x6f, 0xb8, 0x3e, 0xbd,
-       0x0c, 0x49, 0xc8, 0x6d, 0xb5, 0x36, 0x70, 0x26, 0x47, 0x9b, 0xbf, 0x6c,
-       0x7d, 0x35, 0xa8, 0xed, 0x15, 0xdb, 0xfb, 0xa9, 0xa5, 0xd7, 0x8c, 0x4f,
-       0x27, 0x15, 0x1e, 0x62, 0x5d, 0xfa, 0xdd, 0x35, 0xef, 0xd7, 0x22, 0x46,
-       0x87, 0x99, 0xf7, 0xf9, 0xa0, 0xb6, 0x7f, 0xc2, 0x3d, 0xe4, 0xa3, 0xa0,
-       0xe7, 0xf4, 0xe0, 0x9c, 0xc3, 0x21, 0x6f, 0x6a, 0x7c, 0x43, 0xf5, 0x2b,
-       0x99, 0x7e, 0xd1, 0x6e, 0x3d, 0xee, 0xd4, 0xf4, 0x88, 0xa2, 0xa1, 0x4f,
-       0x4f, 0x0f, 0xab, 0xf2, 0xb3, 0xd3, 0x29, 0x55, 0x2e, 0x4e, 0xbb, 0xaa,
-       0x3c, 0xaf, 0xfa, 0x5b, 0xde, 0x90, 0xa9, 0x1f, 0x9d, 0x8e, 0xab, 0x72,
-       0xdc, 0x94, 0x69, 0x53, 0x66, 0x4c, 0x39, 0x69, 0x4a, 0xcf, 0x94, 0x59,
-       0x53, 0x16, 0xcc, 0x7c, 0x53, 0xe6, 0xfd, 0x98, 0x29, 0x67, 0x4c, 0x79,
-       0xdc, 0x94, 0x1f, 0x31, 0xe5, 0x09, 0x03, 0xd7, 0xbc, 0x29, 0x3f, 0x6e,
-       0xea, 0x4f, 0x1b, 0x38, 0x3f, 0x03, 0x78, 0x1e, 0x09, 0xed, 0xd0, 0xca,
-       0x69, 0x4d, 0x5f, 0x15, 0x47, 0xca, 0x9b, 0xdc, 0x7f, 0x1c, 0x32, 0x25,
-       0x88, 0xb3, 0x04, 0xbf, 0x3b, 0xa4, 0x09, 0x17, 0x72, 0x38, 0x88, 0x33,
-       0xe4, 0xf3, 0x69, 0xf9, 0x53, 0xf4, 0x1d, 0xbd, 0xe0, 0xc8, 0x62, 0x95,
-       0xfa, 0xf5, 0x5b, 0xf2, 0x6a, 0x85, 0xe7, 0xf1, 0xbc, 0xdc, 0xa8, 0xa4,
-       0xe2, 0x41, 0x8b, 0x74, 0x94, 0x98, 0x7c, 0x45, 0x12, 0x90, 0xfd, 0x63,
-       0x71, 0x96, 0xd7, 0xa8, 0x54, 0xd0, 0xef, 0xa0, 0x5a, 0xfb, 0x79, 0x01,
-       0x4c, 0x72, 0xa5, 0xd2, 0x0d, 0x99, 0xf5, 0x4a, 0x8b, 0x7a, 0xfd, 0xfc,
-       0xa6, 0xc8, 0xc8, 0x05, 0xe2, 0xf9, 0x5b, 0xb2, 0x51, 0x21, 0xde, 0x9f,
-       0x87, 0xad, 0x90, 0x4a, 0xbf, 0x28, 0x89, 0xd1, 0x8b, 0xc2, 0xf9, 0xc6,
-       0xd2, 0x28, 0xe3, 0x65, 0xfc, 0xce, 0x41, 0xde, 0x76, 0x4f, 0xe8, 0xf9,
-       0x86, 0xcd, 0x7c, 0x2e, 0xec, 0xc2, 0x5b, 0x0e, 0x65, 0xe0, 0x7f, 0xb5,
-       0xf4, 0x9e, 0xb4, 0x3c, 0xcc, 0x3a, 0x41, 0x96, 0xb6, 0xcf, 0x23, 0xf6,
-       0xc4, 0xf5, 0x16, 0xe4, 0x31, 0xf9, 0xdf, 0xd4, 0x6d, 0x1b, 0xfe, 0x92,
-       0x9a, 0xed, 0x81, 0x3e, 0x33, 0xc3, 0x58, 0x83, 0xef, 0x71, 0xd8, 0x9a,
-       0x52, 0x22, 0x1e, 0x8a, 0x95, 0x5f, 0xb5, 0xb2, 0x41, 0x6d, 0x9f, 0x6a,
-       0x19, 0xc1, 0x76, 0x4b, 0xf2, 0xe8, 0xbb, 0x60, 0x64, 0x66, 0xa1, 0x79,
-       0x4b, 0xc9, 0x8d, 0xaf, 0x2b, 0x1a, 0x4e, 0x9c, 0x2f, 0x09, 0x75, 0x86,
-       0x1d, 0xa0, 0x4c, 0xbb, 0x92, 0xae, 0xb7, 0x16, 0xaa, 0x94, 0xc1, 0xc3,
-       0x52, 0xac, 0x0d, 0x97, 0x6c, 0x94, 0xa7, 0xeb, 0x31, 0x39, 0x5d, 0xe1,
-       0x3c, 0xfb, 0xd1, 0xc7, 0x45, 0x1d, 0x18, 0x6b, 0x90, 0xf2, 0x98, 0x6b,
-       0xbe, 0x6e, 0xe9, 0x35, 0xb1, 0x07, 0x77, 0xcb, 0xfa, 0x44, 0xf3, 0x9a,
-       0x55, 0xac, 0xd3, 0x4e, 0x42, 0x7d, 0xb3, 0x53, 0x66, 0xfb, 0xf2, 0xfa,
-       0x79, 0xac, 0x5d, 0xc0, 0x7a, 0x59, 0x25, 0xb3, 0xba, 0x21, 0xf7, 0x7e,
-       0x52, 0xf9, 0x72, 0xab, 0x5c, 0x1d, 0x95, 0x8b, 0x9b, 0x71, 0x39, 0x52,
-       0x19, 0x97, 0x8d, 0x4d, 0x4f, 0x0a, 0x95, 0xb4, 0xac, 0xa3, 0x4f, 0xbe,
-       0x92, 0x91, 0xb5, 0xcd, 0x63, 0xea, 0xac, 0x2f, 0x42, 0x2e, 0x6d, 0xa0,
-       0x4f, 0x63, 0x73, 0x12, 0x3f, 0xdf, 0x1e, 0x88, 0xa1, 0xdf, 0x10, 0xfa,
-       0x88, 0xf5, 0xb3, 0xca, 0x3d, 0xc0, 0x21, 0xe6, 0xae, 0xfa, 0xb6, 0xc1,
-       0xb8, 0x2c, 0x54, 0x79, 0x4e, 0x2f, 0x4c, 0x6f, 0xac, 0xc4, 0xb2, 0xd4,
-       0x77, 0xa7, 0x9b, 0xc3, 0xe0, 0x53, 0xe8, 0xef, 0x2a, 0x65, 0x42, 0x50,
-       0x8a, 0x90, 0xb5, 0x0d, 0xc0, 0x46, 0x58, 0x1b, 0xb0, 0xdf, 0x8b, 0xcd,
-       0x21, 0x94, 0x0e, 0x4a, 0xac, 0x03, 0xd8, 0x8b, 0x4d, 0x17, 0x65, 0x0c,
-       0xa5, 0xd6, 0xed, 0x27, 0x9b, 0x9c, 0x3f, 0xab, 0x74, 0x90, 0xc6, 0xf1,
-       0xd4, 0x1d, 0xb6, 0x7a, 0xc0, 0x5b, 0xb4, 0x8a, 0x2b, 0x62, 0xe7, 0xd2,
-       0x21, 0xfa, 0x0b, 0x90, 0x2b, 0x37, 0x0f, 0x68, 0x58, 0x3e, 0x1b, 0xa0,
-       0xdc, 0x09, 0xba, 0xe7, 0x81, 0xaf, 0x5e, 0xc9, 0x06, 0x69, 0x73, 0xf1,
-       0x59, 0x5a, 0x01, 0xcf, 0xa5, 0xad, 0x12, 0x0c, 0x50, 0x5f, 0x45, 0xd9,
-       0xa7, 0xde, 0xa2, 0x5c, 0xca, 0xd5, 0xb4, 0x6d, 0x5e, 0x6a, 0xdb, 0xe6,
-       0xeb, 0xa8, 0xb7, 0x20, 0x3b, 0xe0, 0x9b, 0xd4, 0x79, 0x1e, 0x03, 0x98,
-       0x33, 0x6b, 0x15, 0x2a, 0xfe, 0x79, 0xd6, 0x5b, 0x4f, 0x54, 0x69, 0xaf,
-       0xd1, 0x6e, 0x53, 0xf2, 0x49, 0x92, 0xcb, 0x71, 0x23, 0x83, 0x23, 0x8a,
-       0x37, 0x88, 0x83, 0xe4, 0x72, 0xda, 0xd4, 0x75, 0x77, 0xd4, 0xf9, 0xb2,
-       0xfa, 0x73, 0x80, 0x61, 0x48, 0x9d, 0xad, 0xed, 0x4d, 0x59, 0x39, 0x65,
-       0x2b, 0xb6, 0x5a, 0x79, 0x37, 0x24, 0xc5, 0xf1, 0x3f, 0xc2, 0x9e, 0xd8,
-       0x56, 0x72, 0x40, 0x5a, 0xe0, 0xbb, 0xca, 0x07, 0xe6, 0xdc, 0x84, 0xb2,
-       0xb3, 0x72, 0x15, 0xf8, 0x38, 0x5a, 0xd5, 0x95, 0xfa, 0xa1, 0x87, 0xdc,
-       0x25, 0xd2, 0x53, 0xbd, 0xb5, 0x0c, 0x9c, 0xce, 0x2c, 0x15, 0xac, 0xe4,
-       0x12, 0xe8, 0x63, 0x10, 0xb6, 0x87, 0x1b, 0x91, 0xdc, 0x65, 0xd2, 0x11,
-       0xfb, 0xb0, 0xbe, 0x4b, 0x66, 0xa2, 0xbb, 0x6d, 0x9b, 0x87, 0x0e, 0x68,
-       0x9d, 0x8f, 0xbe, 0x4b, 0x70, 0xe6, 0x7a, 0xb5, 0x9f, 0x92, 0x5c, 0xa5,
-       0x9c, 0x2d, 0x40, 0xd7, 0x53, 0xe7, 0xf4, 0xc0, 0x9e, 0x61, 0x3d, 0xe7,
-       0x44, 0xdb, 0xc5, 0xac, 0x05, 0xfd, 0x66, 0x97, 0x95, 0x8d, 0x3e, 0x89,
-       0xf2, 0xde, 0x20, 0x6d, 0x5b, 0xea, 0x90, 0xe4, 0xaa, 0x3f, 0x47, 0x27,
-       0x3e, 0xf6, 0x29, 0x9d, 0x34, 0xe0, 0x0d, 0xa8, 0x79, 0x61, 0x97, 0x58,
-       0x73, 0x6a, 0xde, 0x58, 0xc7, 0xbc, 0x68, 0xbb, 0xf8, 0xb7, 0x01, 0x3d,
-       0x0f, 0xf0, 0xac, 0xf6, 0xc4, 0x36, 0x8e, 0x29, 0x58, 0x79, 0xd8, 0x4e,
-       0x33, 0x69, 0x5b, 0x02, 0x83, 0x7e, 0x5f, 0xbd, 0xaf, 0x02, 0xf6, 0x95,
-       0xc3, 0xbe, 0xec, 0xc1, 0xdd, 0xfb, 0x2a, 0x05, 0xf4, 0xbe, 0x06, 0x3a,
-       0x60, 0x8a, 0xee, 0x5a, 0xbf, 0x73, 0x5f, 0x68, 0xbb, 0xb8, 0x7b, 0x8e,
-       0xc7, 0x06, 0xf4, 0x1c, 0xd1, 0x8e, 0x39, 0x06, 0x77, 0xcd, 0x01, 0x7a,
-       0x8e, 0x72, 0xfc, 0xe0, 0x1e, 0xe3, 0x5f, 0xef, 0xd5, 0xe3, 0x39, 0xa6,
-       0x0b, 0x7a, 0x58, 0x9d, 0x75, 0x58, 0xc9, 0xd4, 0xb6, 0xad, 0x76, 0x1a,
-       0x3a, 0xaf, 0x73, 0xcc, 0x9d, 0x76, 0xa6, 0xad, 0xec, 0xcc, 0x3b, 0xe8,
-       0xcc, 0x7a, 0x14, 0x3e, 0x73, 0x6a, 0x19, 0xbe, 0x73, 0xe5, 0xed, 0x58,
-       0xf7, 0xcf, 0xe0, 0x87, 0x42, 0x16, 0x8d, 0xd2, 0x2f, 0x98, 0x14, 0xe5,
-       0x97, 0x8e, 0xc2, 0xff, 0x75, 0xf6, 0x29, 0x5b, 0xb4, 0x38, 0x3a, 0xee,
-       0xfb, 0x0b, 0xd6, 0x2c, 0xe4, 0x46, 0x71, 0x14, 0x36, 0x7d, 0x14, 0xf8,
-       0x72, 0x47, 0x30, 0x8e, 0xf0, 0xbc, 0x3b, 0x44, 0x9f, 0xf5, 0x99, 0xea,
-       0x2c, 0xde, 0xf7, 0xa1, 0xfd, 0xe7, 0x06, 0xce, 0x3e, 0xf4, 0xf9, 0x57,
-       0xa8, 0x63, 0x1b, 0xfb, 0x70, 0x8a, 0x1f, 0xe0, 0xfd, 0x41, 0xf4, 0x01,
-       0x4f, 0x81, 0x53, 0x6c, 0xf7, 0x30, 0x7e, 0x2f, 0xa3, 0xee, 0xdd, 0xa8,
-       0xbb, 0x8e, 0xba, 0x43, 0x78, 0xff, 0xe1, 0xae, 0x79, 0xdf, 0x81, 0xf7,
-       0xcf, 0xa1, 0x1d, 0xfb, 0x77, 0x5e, 0x44, 0xfb, 0x83, 0xf8, 0xfd, 0xc5,
-       0xae, 0x3e, 0x8d, 0x5d, 0xef, 0xbe, 0xbc, 0x79, 0xc9, 0xf0, 0xc0, 0x8e,
-       0x6f, 0x07, 0xfe, 0xb1, 0xa8, 0x8f, 0x0a, 0x15, 0xca, 0x9b, 0xb0, 0x3c,
-       0xb2, 0xe2, 0xcb, 0x1c, 0x91, 0x79, 0xc8, 0xfa, 0x42, 0x45, 0xbc, 0x6e,
-       0x19, 0x9e, 0xfc, 0x31, 0x64, 0xfa, 0x3c, 0xf0, 0x5a, 0x80, 0x7d, 0x71,
-       0x74, 0x25, 0x8c, 0xe7, 0x21, 0xc8, 0x3b, 0xc9, 0x74, 0x09, 0x79, 0x3e,
-       0x02, 0xd9, 0xd2, 0x0b, 0x9e, 0x57, 0x3e, 0x88, 0x3c, 0x0e, 0xb9, 0x34,
-       0x8b, 0xbe, 0xb3, 0xe8, 0xf3, 0xd1, 0xe6, 0xff, 0x31, 0xb4, 0xec, 0xc3,
-       0xf0, 0xec, 0x2e, 0x18, 0xc2, 0xe2, 0xae, 0x92, 0x1f, 0x5f, 0x98, 0x9e,
-       0x5b, 0x89, 0xc8, 0xf0, 0xaa, 0x9d, 0xa4, 0xb3, 0x3f, 0xb2, 0xca, 0x98,
-       0x84, 0x8c, 0x04, 0x85, 0xb2, 0x5f, 0xc6, 0x43, 0xb0, 0xd1, 0x02, 0xde,
-       0x30, 0x74, 0x94, 0x7a, 0x97, 0x2c, 0x60, 0xcb, 0x36, 0x77, 0x62, 0x13,
-       0x47, 0xda, 0xb1, 0x89, 0x21, 0xe8, 0x88, 0xd7, 0x83, 0x5a, 0x5e, 0x45,
-       0x40, 0x27, 0x6f, 0x01, 0xfe, 0x29, 0x5b, 0x42, 0xe0, 0x1f, 0x07, 0xbc,
-       0xf3, 0x26, 0xda, 0x6f, 0xd4, 0x5b, 0xa0, 0x77, 0xc8, 0x38, 0x9b, 0xf5,
-       0x2c, 0xd1, 0x96, 0x21, 0x0f, 0xe0, 0xbd, 0xd1, 0xc9, 0x6b, 0xe7, 0xb4,
-       0x8d, 0x75, 0x97, 0x6f, 0xf3, 0xa0, 0xa3, 0x69, 0x91, 0xf6, 0xfa, 0xe1,
-       0xd0, 0x9d, 0x7b, 0xfc, 0xa3, 0x5d, 0x7b, 0x0c, 0x4a, 0x72, 0x89, 0xf8,
-       0x8d, 0xa8, 0xbd, 0xfa, 0xf8, 0x2d, 0x2a, 0x5b, 0x7e, 0x1c, 0x3e, 0x89,
-       0x40, 0x9a, 0x2b, 0x5b, 0x14, 0x3a, 0xb1, 0x0f, 0xb2, 0x9e, 0x72, 0x9e,
-       0xf8, 0x0e, 0x03, 0x87, 0x11, 0xfc, 0x1c, 0xfc, 0x76, 0x70, 0x7a, 0xb2,
-       0xbd, 0x3f, 0x7f, 0x0f, 0xeb, 0x90, 0x55, 0x2c, 0x09, 0x3f, 0xf0, 0x71,
-       0x91, 0xcf, 0x90, 0xaf, 0x7d, 0x94, 0xb7, 0x3e, 0x4c, 0x8f, 0xed, 0x82,
-       0x89, 0xb8, 0x21, 0x4c, 0xf5, 0x16, 0x6c, 0x8b, 0x28, 0xa3, 0x60, 0xa7,
-       0x9b, 0xd4, 0x29, 0x5c, 0x73, 0x92, 0xf6, 0xb6, 0x81, 0x93, 0x7a, 0xc5,
-       0x93, 0x73, 0x95, 0xb7, 0x1b, 0xb8, 0x78, 0xbe, 0xb0, 0xf9, 0x96, 0xb8,
-       0x7e, 0x54, 0xe9, 0x1e, 0x0d, 0xd3, 0x6e, 0xfc, 0xd0, 0x3f, 0x27, 0x7e,
-       0xa8, 0x0f, 0x88, 0x4b, 0xda, 0xd4, 0xc4, 0xe7, 0xef, 0x00, 0x9f, 0xec,
-       0xeb, 0x1a, 0xdd, 0xf2, 0x2e, 0x03, 0xd7, 0xdd, 0xfa, 0xf8, 0xf4, 0x1d,
-       0xfa, 0xd8, 0xc7, 0xf1, 0x5e, 0x67, 0xf1, 0xfb, 0x7d, 0xbe, 0xcc, 0x1d,
-       0x5e, 0xdd, 0xab, 0x7d, 0xd9, 0xb4, 0xb3, 0xad, 0xb3, 0xfe, 0xdb, 0x7d,
-       0xfe, 0x19, 0x0e, 0x2f, 0xef, 0x6e, 0xeb, 0x3b, 0xb0, 0x33, 0x66, 0xf7,
-       0x7c, 0x3f, 0xee, 0xdb, 0xdb, 0xaf, 0xdd, 0xf1, 0xeb, 0xe0, 0xab, 0xd8,
-       0x3b, 0x7b, 0xc9, 0xda, 0xf3, 0xcd, 0x82, 0xad, 0xf7, 0xc2, 0x3e, 0x68,
-       0x6b, 0x6e, 0xf5, 0x07, 0x95, 0x6e, 0xcc, 0xda, 0xf4, 0x63, 0x4a, 0x6b,
-       0x7c, 0xbe, 0x07, 0x65, 0xe7, 0xd8, 0x21, 0xf0, 0x40, 0x16, 0x7d, 0x39,
-       0xc7, 0xee, 0xf1, 0xbe, 0x8d, 0x94, 0x96, 0x85, 0x5a, 0x08, 0xed, 0x89,
-       0x6c, 0x49, 0x1e, 0x86, 0xaf, 0x98, 0x98, 0xa2, 0xdf, 0x00, 0x7f, 0x79,
-       0x46, 0xe4, 0x98, 0x94, 0x6b, 0x1f, 0x94, 0x85, 0x95, 0x96, 0xbc, 0x1f,
-       0x7a, 0xf0, 0xf7, 0xa0, 0x47, 0xe5, 0x12, 0x84, 0xd7, 0x25, 0x1c, 0xc6,
-       0xa5, 0xa8, 0xd8, 0x4f, 0xc1, 0x96, 0xbf, 0x10, 0x93, 0xe0, 0x05, 0xd2,
-       0x5e, 0xca, 0x79, 0xbf, 0x48, 0xbf, 0x2d, 0x57, 0xe1, 0x08, 0x25, 0x26,
-       0xb3, 0x92, 0x82, 0xfd, 0x37, 0xe6, 0x34, 0x50, 0x96, 0x25, 0x35, 0xfa,
-       0xb4, 0xa0, 0xef, 0x25, 0xf4, 0xc5, 0xb8, 0x9e, 0x8d, 0x38, 0x7e, 0x83,
-       0xd2, 0xbb, 0x41, 0x18, 0x92, 0xa6, 0x24, 0x2c, 0x3f, 0x6c, 0xd1, 0xd7,
-       0x7d, 0x66, 0x33, 0x0c, 0xdd, 0x14, 0x97, 0xe7, 0x20, 0x67, 0x9f, 0x55,
-       0xf1, 0x17, 0xb7, 0xed, 0x8f, 0x3e, 0x7a, 0x18, 0x74, 0xb7, 0x2c, 0xe1,
-       0xa8, 0xf7, 0x73, 0x59, 0x59, 0x6e, 0xc1, 0xef, 0xa1, 0xac, 0x7f, 0x00,
-       0xf2, 0x2a, 0xf1, 0xa5, 0x12, 0x6d, 0x49, 0x37, 0x03, 0xd8, 0x4b, 0x32,
-       0x73, 0xf8, 0x5d, 0x03, 0x9a, 0x3e, 0x8e, 0x49, 0x70, 0xb9, 0x00, 0xfb,
-       0xf9, 0x8c, 0x2c, 0xa6, 0xe1, 0x9f, 0xda, 0xa5, 0x56, 0xc0, 0x75, 0x63,
-       0xd0, 0xdb, 0xd0, 0xa7, 0x2b, 0xf4, 0x87, 0xe5, 0xc8, 0x32, 0xfb, 0x9c,
-       0x01, 0x6d, 0x75, 0x01, 0x77, 0xdd, 0x72, 0x36, 0x9a, 0x28, 0xe5, 0xc1,
-       0x4f, 0xb6, 0xdb, 0x0f, 0x5e, 0x66, 0x49, 0xfd, 0xf6, 0x34, 0xe8, 0x87,
-       0xcf, 0x38, 0xce, 0x55, 0xd6, 0x27, 0x51, 0xb2, 0xde, 0x15, 0x7b, 0x29,
-       0x8c, 0xb9, 0xa0, 0x93, 0x2e, 0x97, 0xe4, 0x6c, 0xe6, 0x98, 0x34, 0x6a,
-       0xf0, 0xc9, 0x33, 0xb0, 0xa3, 0xea, 0x9e, 0x34, 0x2a, 0xb4, 0x9f, 0x4e,
-       0x81, 0x1f, 0x5e, 0x41, 0x39, 0x8f, 0xf2, 0x16, 0xca, 0x8f, 0xa3, 0x7c,
-       0x0d, 0x25, 0x61, 0x3f, 0x25, 0x8d, 0xfa, 0x55, 0xcc, 0xcd, 0x39, 0xa6,
-       0x0c, 0xcc, 0xf0, 0x21, 0x0f, 0x9f, 0x82, 0x9d, 0xe3, 0xd7, 0x9f, 0x12,
-       0x69, 0x7c, 0x0c, 0xbf, 0x96, 0x7a, 0xa7, 0x8f, 0xb9, 0x90, 0x99, 0x84,
-       0xbd, 0x2b, 0xd6, 0xd9, 0xcc, 0xc7, 0xcd, 0x3c, 0x1f, 0xc3, 0x7a, 0xd7,
-       0xb1, 0x76, 0x18, 0xe7, 0xd9, 0x92, 0x47, 0xd3, 0x67, 0xe4, 0x93, 0xe9,
-       0x7b, 0x65, 0x62, 0x20, 0x5c, 0x0a, 0x7b, 0xdc, 0x3f, 0xed, 0xda, 0xbd,
-       0xf6, 0xef, 0xef, 0x9b, 0x7b, 0x8e, 0x60, 0x2f, 0xfb, 0xb5, 0xed, 0x66,
-       0xff, 0x13, 0xe3, 0x73, 0x58, 0x92, 0x1c, 0xe1, 0x7c, 0x9e, 0x04, 0x96,
-       0x47, 0x9c, 0x8c, 0x3d, 0x06, 0xeb, 0x3d, 0x85, 0xdf, 0x19, 0xd0, 0x8a,
-       0x7b, 0x3e, 0x69, 0xff, 0x47, 0xc0, 0x84, 0xb6, 0x06, 0xd7, 0x11, 0x2b,
-       0x78, 0xe8, 0x26, 0xf6, 0x56, 0x92, 0xee, 0x43, 0x9e, 0xdc, 0x6e, 0xf2,
-       0x19, 0x92, 0xf2, 0xd2, 0x31, 0xf9, 0x71, 0xed, 0xba, 0x9c, 0xab, 0x1d,
-       0x93, 0x97, 0x51, 0x2e, 0xd6, 0x4a, 0xc0, 0x23, 0x7d, 0x46, 0xce, 0xd1,
-       0xc2, 0xb9, 0x50, 0x2e, 0xdf, 0x1f, 0x9b, 0xc7, 0xf9, 0xcd, 0x3a, 0x2d,
-       0xd9, 0x48, 0x97, 0x64, 0x63, 0x12, 0x63, 0xea, 0x3d, 0x12, 0xfa, 0x2a,
-       0xf7, 0xdb, 0x27, 0xf9, 0x5a, 0x49, 0x0a, 0x19, 0xfa, 0x34, 0xbd, 0x92,
-       0x87, 0x4d, 0x0e, 0x3b, 0xe8, 0x8c, 0x8e, 0xb3, 0xb9, 0xb1, 0x22, 0x6c,
-       0xf8, 0x85, 0xe6, 0xeb, 0x56, 0xa3, 0x6d, 0xff, 0x6f, 0x59, 0xcf, 0xc2,
-       0x76, 0xfd, 0x0e, 0xe4, 0xc6, 0x73, 0xb0, 0x09, 0x9f, 0xbd, 0x83, 0xc7,
-       0x48, 0x23, 0xd7, 0xac, 0x46, 0x7d, 0x94, 0x7c, 0x66, 0xf8, 0x01, 0x63,
-       0xe1, 0xe7, 0x34, 0x6a, 0xb7, 0x0c, 0xfd, 0x29, 0x5b, 0x00, 0xe7, 0x42,
-       0xbd, 0xf2, 0x77, 0xf0, 0xaf, 0x28, 0x77, 0x7c, 0xbd, 0xaf, 0xfd, 0x86,
-       0x3a, 0x60, 0xcd, 0x47, 0x13, 0x80, 0x4a, 0xa4, 0x5e, 0x2f, 0x28, 0x5c,
-       0xb9, 0xcb, 0x43, 0x52, 0xab, 0x12, 0xbf, 0x09, 0xc7, 0xb6, 0x95, 0x5d,
-       0x0b, 0xbc, 0xba, 0x38, 0x1f, 0xbf, 0x3d, 0x01, 0xff, 0xe1, 0x8c, 0x38,
-       0x13, 0xbd, 0xd8, 0x13, 0x9f, 0x45, 0x66, 0x2e, 0xff, 0x3a, 0x19, 0xd0,
-       0x05, 0xbf, 0x3e, 0x84, 0xb3, 0x8c, 0xc8, 0x59, 0xd8, 0xff, 0xe7, 0x40,
-       0x47, 0x9f, 0xaf, 0x0c, 0xc9, 0xf9, 0x4a, 0x1c, 0xfe, 0x16, 0xed, 0x94,
-       0xe5, 0xe9, 0xe4, 0x3a, 0xcb, 0x27, 0xa6, 0x53, 0x75, 0x96, 0x5f, 0x32,
-       0xfe, 0xe2, 0x97, 0x8d, 0x1f, 0xb9, 0x3e, 0xad, 0x7d, 0xb8, 0xaf, 0x4d,
-       0x8f, 0xaa, 0xb2, 0x39, 0xbd, 0x13, 0x3b, 0x09, 0x1b, 0xbd, 0x9d, 0xa1,
-       0x7e, 0x06, 0x8c, 0x12, 0x3c, 0x09, 0x7a, 0x9a, 0x87, 0xdc, 0xce, 0xc1,
-       0xf7, 0x38, 0x0b, 0x1f, 0xa4, 0xd8, 0x84, 0x4c, 0xf0, 0xd2, 0x28, 0xc5,
-       0xfc, 0xf9, 0x63, 0xbb, 0x18, 0xdf, 0xe4, 0x99, 0x19, 0xff, 0x2b, 0x4d,
-       0xff, 0xab, 0xf3, 0x8f, 0xf3, 0x81, 0x36, 0xa9, 0x2b, 0x7f, 0x09, 0x9f,
-       0x51, 0x82, 0xc5, 0x0c, 0xc7, 0xa6, 0xe9, 0xaf, 0xca, 0x36, 0xec, 0x83,
-       0xb0, 0xf7, 0x3d, 0x09, 0x3f, 0xd5, 0x6a, 0xbd, 0x0a, 0x59, 0x53, 0x82,
-       0xcf, 0x68, 0x5b, 0xa8, 0x5f, 0x67, 0x1b, 0xe5, 0xc8, 0x98, 0x73, 0x1b,
-       0x34, 0x97, 0x3d, 0x2e, 0xf2, 0x5d, 0xd4, 0x35, 0x56, 0x78, 0x06, 0xdf,
-       0xc7, 0x19, 0x98, 0x33, 0x51, 0x75, 0xec, 0x07, 0xfb, 0x3d, 0xca, 0x7d,
-       0x8c, 0x39, 0xdd, 0x18, 0x5f, 0x5f, 0xe7, 0x98, 0xc4, 0x24, 0xaf, 0x74,
-       0xbe, 0xbb, 0xae, 0xf7, 0x77, 0x34, 0x33, 0x2a, 0x57, 0x2b, 0x6a, 0x0e,
-       0xd0, 0xfa, 0xaf, 0x30, 0x66, 0x0b, 0x74, 0xcb, 0x18, 0x95, 0x27, 0x65,
-       0xe8, 0xa4, 0x72, 0x25, 0x05, 0xda, 0x09, 0xca, 0x6c, 0x8c, 0x60, 0xbb,
-       0xb2, 0x5d, 0xf9, 0x72, 0x97, 0x8e, 0x8f, 0xf0, 0x19, 0x3a, 0xac, 0x39,
-       0x23, 0xbc, 0x1b, 0x81, 0x7d, 0x83, 0x3d, 0x75, 0xe2, 0x42, 0xff, 0x15,
-       0x71, 0x16, 0x66, 0x8f, 0xea, 0x4f, 0xaf, 0x83, 0xf1, 0x66, 0x9d, 0x02,
-       0x14, 0x77, 0x1e, 0xeb, 0xa7, 0x2e, 0x05, 0x83, 0x8c, 0xa9, 0x27, 0x2f,
-       0x81, 0xad, 0x3c, 0x83, 0x8b, 0xa6, 0x4f, 0x6b, 0xbe, 0x2f, 0x4a, 0xda,
-       0x22, 0x0e, 0x12, 0xa5, 0x2d, 0x20, 0x7b, 0xc0, 0xbb, 0x21, 0x1f, 0x5a,
-       0xd5, 0x7b, 0xb6, 0x2f, 0x0a, 0xef, 0x5b, 0xe4, 0xf6, 0x4a, 0x22, 0x7d,
-       0x0b, 0xb2, 0x39, 0x1f, 0x4d, 0x83, 0x56, 0x3e, 0xd1, 0x05, 0x9e, 0x9e,
-       0xcc, 0xda, 0x3f, 0xe8, 0xd2, 0xb6, 0x20, 0x7c, 0x7e, 0xc6, 0x01, 0x2a,
-       0x59, 0x8c, 0xe9, 0x96, 0x7f, 0x11, 0xc4, 0x73, 0x93, 0xef, 0xb0, 0x73,
-       0x82, 0x1a, 0xbe, 0xb2, 0xc1, 0x21, 0xfc, 0x04, 0xd1, 0xb1, 0x5c, 0x4b,
-       0x3e, 0x04, 0x29, 0x2f, 0x98, 0x3f, 0x69, 0xd6, 0x4a, 0x5e, 0x0c, 0xb7,
-       0x6d, 0xba, 0xd4, 0xaa, 0x07, 0xdb, 0x22, 0x68, 0x7c, 0x22, 0xca, 0x18,
-       0xd9, 0xc3, 0xa6, 0xee, 0xb4, 0x8f, 0xc3, 0x2a, 0x5e, 0xc7, 0x7b, 0x24,
-       0xd2, 0xd6, 0x94, 0xa1, 0xad, 0x8f, 0x81, 0xb6, 0x4e, 0x29, 0xda, 0x6a,
-       0xc9, 0xab, 0xe9, 0xb4, 0x7c, 0x61, 0x4f, 0xfa, 0xda, 0xfd, 0x17, 0x01,
-       0xbc, 0xfc, 0x0d, 0xca, 0xc2, 0x17, 0xb1, 0x2e, 0xf4, 0x4e, 0xb9, 0x92,
-       0xc8, 0xce, 0xd2, 0x16, 0x82, 0x1e, 0x29, 0xc3, 0xe7, 0x4a, 0x5e, 0x1a,
-       0x52, 0x7d, 0x92, 0xd0, 0x29, 0x0d, 0xd0, 0x1b, 0xf1, 0x5b, 0xae, 0x40,
-       0x0e, 0x5f, 0x0a, 0x41, 0x6f, 0x91, 0x67, 0x65, 0xc0, 0x86, 0x6c, 0x60,
-       0xff, 0x06, 0x78, 0x27, 0x79, 0x29, 0x82, 0x32, 0xae, 0xe6, 0x6a, 0x54,
-       0x5c, 0x35, 0xbe, 0x51, 0x19, 0x55, 0xe3, 0x1a, 0xb0, 0x5f, 0x93, 0x97,
-       0x20, 0xdf, 0x33, 0x69, 0x19, 0xb9, 0x94, 0x91, 0xf8, 0x25, 0x4b, 0x8a,
-       0x33, 0xad, 0x56, 0x18, 0xb0, 0x8f, 0x5e, 0xea, 0x97, 0x5b, 0x2a, 0xb6,
-       0x1a, 0x56, 0xf1, 0xd6, 0xc5, 0xcc, 0x0c, 0x78, 0x93, 0xf8, 0xf3, 0x30,
-       0xa6, 0x00, 0xfd, 0x58, 0x90, 0xb3, 0x2b, 0xc4, 0x0f, 0xe3, 0xe5, 0xdb,
-       0xb1, 0x80, 0x24, 0x20, 0xcb, 0x8e, 0xcb, 0x7c, 0xad, 0x1b, 0xb2, 0x2c,
-       0x08, 0x1d, 0xf8, 0x50, 0xb7, 0xf4, 0x0e, 0x93, 0x1e, 0x80, 0x17, 0x0f,
-       0x73, 0x17, 0x24, 0x8f, 0x31, 0x85, 0x95, 0x9d, 0xfe, 0x45, 0xe9, 0x06,
-       0x4f, 0x1d, 0x97, 0x93, 0x35, 0xce, 0x13, 0x74, 0xca, 0x72, 0x10, 0x34,
-       0xe4, 0x3a, 0x47, 0x30, 0x0f, 0xf4, 0x76, 0xc7, 0x1f, 0xf9, 0x2f, 0xfb,
-       0x06, 0x34, 0xe9, 0xf3, 0x5d, 0xb8, 0xd4, 0xe5, 0xcd, 0x58, 0xdb, 0x19,
-       0x09, 0xce, 0x65, 0x3e, 0x60, 0x7d, 0x37, 0x93, 0xb1, 0xae, 0x65, 0xb2,
-       0xd6, 0xf5, 0x4c, 0xc1, 0xba, 0x01, 0xdd, 0xd4, 0xd8, 0x7c, 0x0e, 0xf4,
-       0x03, 0xdd, 0xcf, 0x98, 0x79, 0xfb, 0x0c, 0xa3, 0x26, 0x66, 0xf0, 0x9a,
-       0x6c, 0x54, 0x68, 0x3b, 0xb4, 0x1e, 0x9e, 0x4b, 0x97, 0xee, 0x01, 0x7c,
-       0x80, 0x83, 0xbe, 0xee, 0x8e, 0xee, 0x08, 0x79, 0xa3, 0xb2, 0xa6, 0x74,
-       0x47, 0x84, 0xba, 0x23, 0x9d, 0x97, 0xfd, 0xb2, 0x5d, 0x03, 0xff, 0x89,
-       0xb2, 0x83, 0x65, 0xbb, 0x1e, 0x95, 0x2f, 0x54, 0x7d, 0x5a, 0xe2, 0x7e,
-       0xcb, 0x6f, 0xea, 0x91, 0x80, 0x4c, 0x29, 0x7d, 0xdd, 0x27, 0x57, 0xd7,
-       0xe1, 0x0f, 0xc1, 0x5a, 0xb0, 0xef, 0x63, 0xac, 0xc0, 0x56, 0xbe, 0xb1,
-       0xf4, 0xf3, 0xee, 0xea, 0x2c, 0x70, 0xc5, 0xfb, 0x25, 0xec, 0xb3, 0x9f,
-       0x3b, 0xf2, 0xdf, 0xc7, 0xc1, 0x93, 0x7c, 0xb6, 0x24, 0x0f, 0xbb, 0x91,
-       0xf7, 0x5c, 0x79, 0xd8, 0x3d, 0xdb, 0x95, 0x31, 0xc0, 0x15, 0x80, 0x4d,
-       0x1e, 0x06, 0x1c, 0x55, 0xd5, 0xde, 0xed, 0x8a, 0x35, 0x07, 0x3d, 0x5c,
-       0x54, 0xf7, 0x57, 0x28, 0xd7, 0xf5, 0xda, 0x79, 0xf8, 0xab, 0xc5, 0xf1,
-       0x1e, 0xea, 0xb7, 0xd1, 0x12, 0xf9, 0x5e, 0xd9, 0xf1, 0x19, 0xf0, 0xdc,
-       0x57, 0xba, 0xa9, 0xdb, 0x8f, 0xa6, 0x27, 0xe5, 0x46, 0x85, 0xcf, 0x6c,
-       0x4f, 0xa4, 0x45, 0xc5, 0x8f, 0x2b, 0xd3, 0x8b, 0xee, 0x6b, 0x86, 0xc7,
-       0x6a, 0xa0, 0xf1, 0x53, 0xf2, 0x8d, 0xcd, 0x79, 0xf9, 0xf7, 0x9b, 0xb3,
-       0xb0, 0x4f, 0x4e, 0xc0, 0x3e, 0xf9, 0x08, 0x78, 0xf8, 0x38, 0x78, 0xf8,
-       0xe3, 0xa0, 0xfb, 0x19, 0x15, 0x77, 0xa8, 0x55, 0x12, 0x57, 0x4a, 0x2a,
-       0xce, 0xfd, 0x1a, 0x68, 0x7e, 0x42, 0x82, 0xab, 0x43, 0xc0, 0x6b, 0xa9,
-       0x15, 0x75, 0x5b, 0x0f, 0xc3, 0x06, 0xc1, 0x59, 0x97, 0x12, 0x41, 0x45,
-       0x23, 0xae, 0xf3, 0x69, 0xe0, 0xf2, 0x4d, 0x5e, 0xa2, 0xc6, 0x23, 0xde,
-       0xa8, 0x8d, 0x4a, 0xf1, 0x32, 0xfa, 0x2f, 0x47, 0x80, 0x37, 0xea, 0xc6,
-       0xc4, 0xf9, 0xa2, 0x6c, 0x81, 0x2e, 0xb2, 0xc0, 0xcf, 0x3b, 0xa4, 0x1c,
-       0x4d, 0x7c, 0x4d, 0x64, 0x52, 0x0e, 0x2d, 0x81, 0xa6, 0x97, 0x6c, 0xec,
-       0x99, 0xb8, 0xc4, 0xf3, 0x65, 0x4f, 0xec, 0x65, 0xca, 0xa2, 0x03, 0xc6,
-       0x37, 0xd1, 0xfa, 0xbe, 0x2e, 0x5c, 0x97, 0xeb, 0x7d, 0x46, 0xe6, 0xa1,
-       0x53, 0x61, 0x7f, 0x43, 0x66, 0xbb, 0x31, 0xac, 0x19, 0x9e, 0xbb, 0xec,
-       0x84, 0xe7, 0x2f, 0x73, 0x9e, 0xb0, 0x04, 0x96, 0x78, 0xb6, 0x9c, 0x07,
-       0x3c, 0x80, 0xb9, 0x53, 0x4b, 0xc4, 0xdb, 0x18, 0xc6, 0xfd, 0x63, 0xe8,
-       0x63, 0x4d, 0x57, 0xb9, 0x65, 0x2d, 0x1f, 0x72, 0x8d, 0x4e, 0x9d, 0x88,
-       0x33, 0x80, 0xfc, 0xc8, 0x36, 0xb4, 0x7e, 0x2b, 0x28, 0xfd, 0xa7, 0x75,
-       0xdf, 0x71, 0x81, 0x51, 0xd7, 0xeb, 0xaa, 0xfd, 0x04, 0x96, 0xb7, 0xa8,
-       0xef, 0xb1, 0x06, 0xc7, 0x84, 0x3a, 0xe0, 0xce, 0x40, 0xee, 0xdc, 0x1b,
-       0x26, 0xee, 0x1f, 0x83, 0x7e, 0x4d, 0x2e, 0xe9, 0x98, 0x7c, 0xf2, 0x72,
-       0x1a, 0xfb, 0x91, 0x41, 0x46, 0x17, 0x6c, 0xec, 0xe1, 0x7d, 0x4a, 0x7e,
-       0x4d, 0x40, 0x66, 0x39, 0xb2, 0x7e, 0x90, 0x67, 0x33, 0x28, 0x8d, 0xa7,
-       0xf9, 0xce, 0x33, 0xe2, 0x79, 0x93, 0x17, 0xa3, 0xd0, 0x2f, 0x38, 0xa7,
-       0xbe, 0x21, 0xa9, 0x6f, 0xb2, 0x6d, 0x48, 0xd1, 0x72, 0x10, 0x67, 0xb0,
-       0x58, 0x69, 0x3d, 0x9c, 0x4b, 0x97, 0x40, 0x6d, 0xc4, 0x39, 0xf1, 0x41,
-       0xbc, 0x8f, 0x03, 0x36, 0xe2, 0xb8, 0x8f, 0xba, 0x18, 0x75, 0xfb, 0xa5,
-       0x58, 0x23, 0x3d, 0xa3, 0xac, 0xef, 0x37, 0xbe, 0xde, 0x67, 0x78, 0x27,
-       0x84, 0xbd, 0x6b, 0x3a, 0x2e, 0x80, 0xa6, 0xca, 0xf0, 0xbb, 0xae, 0x2e,
-       0x49, 0xf8, 0x4d, 0x90, 0xcf, 0x9f, 0xa2, 0x0c, 0x05, 0x7d, 0x95, 0xd7,
-       0x27, 0x40, 0x6b, 0x7d, 0x90, 0x97, 0xad, 0xd6, 0x71, 0xd8, 0xc9, 0xa7,
-       0xd3, 0xc4, 0xd1, 0x4d, 0xe0, 0xa8, 0x3b, 0x76, 0x1a, 0xe7, 0xb5, 0xf6,
-       0xf4, 0x43, 0x4a, 0x5e, 0xc0, 0xd6, 0x51, 0x7a, 0x4b, 0xc7, 0x38, 0xd2,
-       0xb4, 0x8d, 0x14, 0x0f, 0xe7, 0x5c, 0xca, 0xc3, 0x3c, 0xf0, 0x30, 0xae,
-       0xe4, 0xb7, 0x96, 0x2d, 0x3d, 0x52, 0x3c, 0x9e, 0xc5, 0x7e, 0x27, 0x77,
-       0xf5, 0xcb, 0xe0, 0x1d, 0xb6, 0x5f, 0xf3, 0x43, 0x61, 0xc6, 0x43, 0x03,
-       0xde, 0xa4, 0x6c, 0x1c, 0x9c, 0x92, 0x8b, 0x07, 0x13, 0x93, 0xb3, 0x36,
-       0x75, 0xc2, 0x94, 0xd4, 0x9f, 0xce, 0xca, 0x5a, 0x55, 0xeb, 0xe6, 0x39,
-       0x77, 0x52, 0xf2, 0xcd, 0x02, 0xde, 0x3d, 0x94, 0xec, 0xef, 0xcb, 0x5d,
-       0x7f, 0x4f, 0x39, 0xee, 0x09, 0x32, 0x42, 0xeb, 0x5e, 0xdb, 0xee, 0xc6,
-       0xf9, 0x50, 0x2e, 0x7c, 0x10, 0xf5, 0x39, 0xc8, 0x36, 0x9e, 0x67, 0x0a,
-       0x67, 0x77, 0x4a, 0x9d, 0x53, 0x3e, 0x4d, 0x7f, 0x80, 0x63, 0x12, 0xb1,
-       0x39, 0xd4, 0xcf, 0x08, 0x75, 0x28, 0xf7, 0xe6, 0xcf, 0xe7, 0x19, 0xf8,
-       0x03, 0x8c, 0x31, 0xe1, 0xef, 0x33, 0x61, 0xf2, 0x64, 0xc0, 0xf5, 0xeb,
-       0xc7, 0xa0, 0x7f, 0x43, 0x6a, 0x8d, 0x72, 0x95, 0x75, 0x29, 0x87, 0xe3,
-       0xf3, 0x69, 0xbe, 0x8b, 0x3c, 0x66, 0xfc, 0xf2, 0xe3, 0xf0, 0x5b, 0xf3,
-       0xcd, 0xae, 0xdf, 0xa0, 0x7f, 0x77, 0x64, 0x9d, 0x96, 0xcb, 0xdb, 0x31,
-       0xc7, 0xc8, 0xde, 0x93, 0x35, 0xc6, 0xac, 0x2d, 0xe9, 0x82, 0x2c, 0x3d,
-       0x2a, 0xc3, 0x46, 0x8e, 0x72, 0x3f, 0x7d, 0x4a, 0xd7, 0xe5, 0x67, 0x62,
-       0x72, 0x6e, 0xed, 0xff, 0x85, 0xae, 0x7f, 0xbd, 0x5d, 0x57, 0xd8, 0xc3,
-       0xae, 0xbb, 0x79, 0x19, 0xf2, 0xa0, 0x0a, 0x59, 0x51, 0x85, 0xac, 0xa8,
-       0x42, 0x56, 0x54, 0x21, 0x2b, 0xaa, 0x90, 0x15, 0x55, 0xc8, 0x8a, 0xea,
-       0x8c, 0xd1, 0x9b, 0xa7, 0x21, 0x73, 0xe9, 0xf3, 0xd0, 0xcf, 0xe9, 0xb4,
-       0x05, 0xe2, 0x90, 0x25, 0xf4, 0x67, 0x12, 0xa5, 0x5b, 0xc0, 0xcd, 0xd7,
-       0xd3, 0xf4, 0xb9, 0x5b, 0xf2, 0x57, 0xe9, 0xce, 0xdd, 0xab, 0xf8, 0x86,
-       0x3c, 0x0a, 0x7c, 0x7d, 0x08, 0xf8, 0xfa, 0xf0, 0x5d, 0x39, 0x16, 0x7e,
-       0x4c, 0x64, 0xb8, 0x14, 0x80, 0xff, 0x39, 0x73, 0x07, 0xee, 0xe8, 0x7b,
-       0x63, 0x8d, 0xbb, 0x6c, 0x63, 0xfa, 0xdc, 0xa3, 0xea, 0xde, 0x7c, 0x03,
-       0x76, 0xf9, 0x8d, 0x74, 0x29, 0x12, 0x50, 0xf7, 0x73, 0x2e, 0x69, 0x67,
-       0x8f, 0xbf, 0x6f, 0x84, 0xb5, 0x5c, 0xd4, 0x67, 0x9f, 0xcf, 0xf4, 0x81,
-       0x0f, 0x68, 0xdf, 0xdd, 0x50, 0xf6, 0xdd, 0xd1, 0x74, 0x50, 0xb6, 0xa2,
-       0xd4, 0xa9, 0x3f, 0x92, 0x93, 0x2b, 0x91, 0x1e, 0xfa, 0xdf, 0x8b, 0xd5,
-       0x83, 0xb2, 0xad, 0x64, 0xca, 0x07, 0xd1, 0xd7, 0x93, 0x79, 0xd0, 0xc4,
-       0x11, 0xf8, 0x8e, 0x17, 0x65, 0x2c, 0x76, 0x11, 0x7b, 0xfd, 0x3c, 0xc6,
-       0xc0, 0x07, 0x68, 0x15, 0x50, 0x77, 0x1d, 0x7e, 0xc6, 0x6d, 0xe1, 0xf3,
-       0x98, 0x73, 0x1e, 0x88, 0xce, 0x3a, 0x29, 0xe7, 0x35, 0xf1, 0xe9, 0x8c,
-       0x34, 0xc5, 0xbb, 0xb6, 0x41, 0xc9, 0xaf, 0xd3, 0x2f, 0xeb, 0x03, 0x1f,
-       0xfe, 0x08, 0x7a, 0x98, 0x6b, 0x50, 0x2e, 0x70, 0x0f, 0xff, 0x0d, 0xf0,
-       0xc5, 0x67, 0xbb, 0xbd, 0xfb, 0xa1, 0x7b, 0x29, 0xf7, 0xb5, 0xef, 0x94,
-       0xc7, 0x18, 0xa5, 0x1b, 0xd2, 0xbc, 0x77, 0xe0, 0xfe, 0xfe, 0x18, 0x76,
-       0x4e, 0x14, 0x74, 0x80, 0xfa, 0x75, 0xdf, 0xce, 0xf5, 0xed, 0x19, 0x1d,
-       0xeb, 0xbb, 0xa2, 0x6c, 0x9a, 0x1c, 0xf4, 0xd8, 0x31, 0xf4, 0x65, 0xac,
-       0xbd, 0xd5, 0x3a, 0x95, 0x86, 0xdf, 0xf1, 0x24, 0x65, 0xd9, 0x7d, 0xe0,
-       0x69, 0xda, 0x45, 0xd4, 0xb9, 0x62, 0xdd, 0xcc, 0x6c, 0x3b, 0x61, 0xe8,
-       0xcb, 0x19, 0xd0, 0x5c, 0x0e, 0x74, 0x18, 0x78, 0x60, 0x0a, 0xfa, 0x57,
-       0xc5, 0x9c, 0x41, 0xeb, 0x5c, 0xf7, 0x83, 0xd6, 0x5f, 0x64, 0xc6, 0xa1,
-       0x8f, 0x1f, 0x82, 0x3e, 0xe6, 0x7d, 0x74, 0x0e, 0x3a, 0x99, 0xfa, 0xd8,
-       0x91, 0x3f, 0xdd, 0xcc, 0x41, 0x76, 0xdd, 0xd7, 0x43, 0x5e, 0x9b, 0x6a,
-       0xf3, 0x54, 0xc1, 0xf0, 0xdc, 0x01, 0x13, 0xfb, 0x28, 0x28, 0xde, 0x2c,
-       0xaf, 0xd3, 0x0e, 0x01, 0x9f, 0xae, 0x53, 0x46, 0xd0, 0xa6, 0xa4, 0xec,
-       0x80, 0xac, 0x59, 0xff, 0x00, 0xca, 0x29, 0x94, 0xda, 0x56, 0xbb, 0x52,
-       0x7d, 0x35, 0xec, 0xdf, 0x23, 0xef, 0xd8, 0x6b, 0x75, 0xec, 0xef, 0x18,
-       0x73, 0x1b, 0x4a, 0xfd, 0xde, 0x47, 0xb0, 0xc7, 0xe3, 0xa0, 0xc1, 0x19,
-       0xd0, 0xe0, 0x14, 0xf6, 0x7a, 0xde, 0x1a, 0x39, 0x1c, 0x80, 0x3e, 0x3f,
-       0x23, 0x85, 0x34, 0x64, 0xee, 0x5a, 0xc9, 0x9a, 0x58, 0x12, 0xf5, 0x9e,
-       0x4f, 0xf3, 0x4e, 0xfd, 0xbd, 0x2a, 0x3e, 0xb8, 0xbc, 0x19, 0x34, 0x71,
-       0xc4, 0x20, 0xea, 0xa8, 0xc3, 0x21, 0xb3, 0x1c, 0xcc, 0x55, 0xfd, 0x59,
-       0xaf, 0xf4, 0x62, 0xbe, 0xea, 0x34, 0xde, 0x19, 0x5b, 0x38, 0x66, 0xdd,
-       0x59, 0xcf, 0xd8, 0x45, 0xc2, 0xc9, 0xc1, 0x17, 0x0d, 0xba, 0x8c, 0x5f,
-       0xb8, 0x38, 0x9f, 0xac, 0xe4, 0x47, 0x60, 0x93, 0x29, 0x99, 0xdc, 0x6b,
-       0x64, 0x32, 0xe4, 0x5d, 0xcd, 0x93, 0xb5, 0x4d, 0xda, 0x4e, 0x9e, 0xf2,
-       0xa7, 0x29, 0xc7, 0x8a, 0x35, 0xd8, 0x3f, 0xe9, 0xdf, 0xb3, 0xb2, 0x6a,
-       0xce, 0xb0, 0xca, 0xd5, 0x28, 0xad, 0x89, 0xe5, 0x1c, 0xbe, 0x09, 0xff,
-       0x35, 0x03, 0x1e, 0xf6, 0x20, 0x37, 0x1d, 0xc8, 0x45, 0xea, 0xb5, 0xaf,
-       0x76, 0x4b, 0x1f, 0xea, 0x2f, 0xc3, 0xe6, 0x79, 0x92, 0x7c, 0x7b, 0x5d,
-       0xec, 0xc6, 0x1b, 0xc5, 0x47, 0x18, 0x1b, 0x19, 0x32, 0x77, 0xb3, 0xff,
-       0x0b, 0xf0, 0xea, 0x35, 0x42, 0xb0, 0xeb, 0xaf, 0xd6, 0xf6, 0xc1, 0x47,
-       0x3c, 0x66, 0xe5, 0xa3, 0xac, 0x2b, 0xc9, 0x7a, 0x86, 0x76, 0x28, 0x63,
-       0x24, 0x61, 0xd4, 0xef, 0xf6, 0x49, 0xa9, 0xff, 0x9f, 0x53, 0x77, 0x34,
-       0x0b, 0x4a, 0xee, 0xfa, 0xf1, 0xe5, 0xe7, 0x24, 0xd9, 0xf4, 0xe3, 0x54,
-       0x5c, 0x7f, 0xcb, 0x2a, 0x36, 0xff, 0x1c, 0xeb, 0x10, 0x06, 0xee, 0x45,
-       0xaf, 0x63, 0x2f, 0x4f, 0x98, 0x75, 0x1c, 0x2b, 0x74, 0x38, 0x86, 0xfd,
-       0xec, 0xef, 0x93, 0xbe, 0x00, 0xe4, 0xd9, 0x28, 0x9e, 0x6f, 0xa1, 0x6e,
-       0xe7, 0xbd, 0x51, 0x15, 0x2b, 0x70, 0x18, 0xde, 0x33, 0xf4, 0x77, 0x03,
-       0x32, 0xc7, 0x86, 0xfe, 0x6c, 0x54, 0x3f, 0x8e, 0x12, 0xe3, 0x9e, 0xbc,
-       0x2e, 0x73, 0xda, 0xdf, 0x86, 0x4d, 0x39, 0xac, 0x74, 0xf0, 0x4c, 0x9a,
-       0xb1, 0x90, 0x33, 0x90, 0x8f, 0xf7, 0xa3, 0x8e, 0x7e, 0x53, 0x49, 0x9c,
-       0xf7, 0x14, 0x8c, 0xbf, 0xaf, 0xcf, 0x25, 0xa0, 0xf4, 0xf5, 0x0a, 0xce,
-       0x83, 0x73, 0x50, 0xdf, 0xfd, 0x5c, 0x3e, 0xd5, 0x11, 0x47, 0xc9, 0xd9,
-       0xed, 0xb8, 0x41, 0x36, 0x0f, 0x1d, 0xbd, 0x56, 0x25, 0x0f, 0x66, 0x70,
-       0xde, 0x59, 0xf9, 0xda, 0xe6, 0x3d, 0xc0, 0x75, 0x54, 0x02, 0x4f, 0xb5,
-       0x40, 0x3f, 0xd4, 0x0d, 0x63, 0x90, 0xc9, 0x8e, 0xb1, 0x25, 0xa2, 0x12,
-       0x7c, 0x6a, 0x48, 0xba, 0x2f, 0xc4, 0xa4, 0xeb, 0x02, 0xf3, 0x4f, 0x52,
-       0x71, 0xd8, 0xc5, 0xb4, 0x87, 0x78, 0x0f, 0xc9, 0xfb, 0xc3, 0xb8, 0xbe,
-       0x8f, 0xe4, 0x5d, 0x24, 0xfa, 0xc1, 0x76, 0xef, 0xba, 0xe4, 0x00, 0x3f,
-       0x7a, 0xce, 0xdd, 0x63, 0xcb, 0x7a, 0x2c, 0xef, 0x31, 0x63, 0x25, 0x49,
-       0x99, 0x7b, 0xcc, 0x14, 0xc6, 0xa6, 0x26, 0x5f, 0x6e, 0x8f, 0xe7, 0x58,
-       0xea, 0xc4, 0x28, 0xf8, 0xfb, 0xad, 0xd2, 0xf8, 0x22, 0xf9, 0xdc, 0xbf,
-       0xeb, 0x1a, 0x32, 0x77, 0x5f, 0xec, 0x13, 0x37, 0xed, 0x49, 0xd3, 0xee,
-       0x2a, 0x3d, 0x19, 0x6c, 0xc7, 0x5b, 0x78, 0x2f, 0x96, 0x38, 0xcf, 0xe4,
-       0x11, 0x7d, 0x47, 0x46, 0x5f, 0x0a, 0xbe, 0xc5, 0x93, 0xb0, 0x31, 0xeb,
-       0x2c, 0x7b, 0xa4, 0x5c, 0x3f, 0x25, 0xb3, 0xea, 0xf9, 0x43, 0xf2, 0xa8,
-       0x43, 0xdc, 0x9d, 0x91, 0xf4, 0x84, 0xb6, 0xc7, 0xc4, 0xd6, 0xb8, 0xed,
-       0x76, 0xcf, 0xc8, 0xd1, 0xb4, 0xd2, 0x21, 0xce, 0x23, 0xc0, 0x71, 0xb1,
-       0xd9, 0x45, 0x7a, 0x07, 0xec, 0x1e, 0x78, 0x2c, 0x2b, 0x17, 0x37, 0xd1,
-       0x17, 0x67, 0xf5, 0x08, 0xdf, 0xeb, 0xc0, 0x27, 0x63, 0x16, 0x4f, 0x11,
-       0x9f, 0xdc, 0x3b, 0x75, 0x28, 0x71, 0x4a, 0x1c, 0x50, 0x2f, 0x33, 0xe6,
-       0x96, 0x98, 0xbc, 0x2d, 0xf4, 0x9b, 0x89, 0x33, 0xce, 0xe3, 0xef, 0x5b,
-       0x8f, 0xb3, 0x37, 0x06, 0x85, 0xe6, 0x98, 0x7d, 0xc1, 0x11, 0xfb, 0x12,
-       0xcb, 0x08, 0x4a, 0xb6, 0x01, 0xa4, 0x8d, 0xa4, 0x69, 0x73, 0x51, 0x07,
-       0x3b, 0xf2, 0x09, 0xf2, 0x96, 0xce, 0xff, 0x4b, 0x8e, 0x4c, 0xca, 0x95,
-       0xb5, 0xbb, 0xf9, 0x2b, 0x70, 0x41, 0xdb, 0x25, 0x77, 0xf2, 0xd7, 0xe4,
-       0x3f, 0x80, 0xbf, 0xb8, 0xc6, 0x19, 0x95, 0xbb, 0xf0, 0xa9, 0x68, 0x22,
-       0x9e, 0xd5, 0xfe, 0x85, 0x93, 0xb2, 0x47, 0xe2, 0xb4, 0x47, 0x1b, 0x4f,
-       0x8e, 0xe3, 0xdc, 0x5b, 0xf2, 0x44, 0xda, 0xa7, 0x2f, 0xe6, 0xf8, 0xb5,
-       0xa4, 0x06, 0xfd, 0x5c, 0x76, 0x2d, 0x59, 0x70, 0xcf, 0x28, 0x7b, 0xf2,
-       0xc3, 0xd1, 0x96, 0x9c, 0x4e, 0xeb, 0xb1, 0x0b, 0x32, 0x62, 0x68, 0x5c,
-       0xf9, 0x6b, 0x90, 0xbf, 0x3c, 0x2f, 0xbe, 0xdf, 0x23, 0xe9, 0x81, 0x33,
-       0x92, 0x9c, 0xd8, 0x22, 0xbe, 0x70, 0x0e, 0x94, 0x3b, 0xbf, 0x36, 0x16,
-       0xa6, 0x72, 0x9e, 0xf2, 0x15, 0xc2, 0xb4, 0x0f, 0x74, 0x9b, 0x85, 0xbf,
-       0xb4, 0x13, 0x0f, 0x4b, 0x8d, 0x94, 0x5a, 0x21, 0xac, 0x5d, 0x84, 0x3f,
-       0xf1, 0xe1, 0xa8, 0x1b, 0x1f, 0xb6, 0x47, 0x62, 0x67, 0xa5, 0xa6, 0x60,
-       0xfd, 0x44, 0x5a, 0xd3, 0xcb, 0x62, 0x66, 0xaf, 0x18, 0x55, 0x67, 0x8c,
-       0x9a, 0x73, 0x6d, 0x59, 0x9f, 0x6c, 0xea, 0x78, 0xd4, 0x4e, 0x9c, 0x7a,
-       0x47, 0xe6, 0x04, 0x8d, 0x2c, 0x28, 0xd7, 0xde, 0x25, 0xbe, 0xcc, 0xa9,
-       0x65, 0x70, 0x56, 0xcb, 0x3c, 0xa3, 0xb8, 0xb9, 0x47, 0x0a, 0x77, 0xd8,
-       0xca, 0x21, 0xe6, 0xfd, 0xc5, 0xb3, 0xf6, 0x32, 0x64, 0xc3, 0x93, 0x12,
-       0x72, 0xfd, 0xb9, 0x98, 0xd3, 0x19, 0x33, 0xf7, 0x11, 0xfb, 0x19, 0xb7,
-       0x42, 0x9f, 0x07, 0xd1, 0x7e, 0x3f, 0xfa, 0x51, 0x57, 0xf2, 0x1e, 0x80,
-       0x7a, 0x93, 0xb1, 0xf6, 0x01, 0xf4, 0xeb, 0x91, 0x7c, 0x7d, 0xbf, 0xa9,
-       0xf3, 0xe7, 0x38, 0xdc, 0xd1, 0xdf, 0xaf, 0xd3, 0xf7, 0x07, 0x59, 0x1b,
-       0x32, 0x7e, 0x99, 0x7d, 0xe3, 0xed, 0x3b, 0x10, 0xbb, 0xf1, 0xa0, 0xa3,
-       0xc7, 0xb3, 0x1f, 0x65, 0x3e, 0x74, 0x4b, 0x15, 0xfa, 0xa6, 0x3a, 0xc5,
-       0xbb, 0x40, 0x63, 0x57, 0xcc, 0x9a, 0x7c, 0x16, 0xda, 0x17, 0xaf, 0x19,
-       0x7d, 0xbb, 0x93, 0x8b, 0x7a, 0x24, 0xe3, 0xe7, 0xf5, 0x30, 0x17, 0x91,
-       0xeb, 0xf2, 0x3c, 0x40, 0x53, 0x9b, 0xda, 0x96, 0xb6, 0x33, 0x5d, 0xbc,
-       0x6b, 0x83, 0x7e, 0xd7, 0xfa, 0xbf, 0x01, 0xfd, 0xbf, 0xb1, 0x02, 0x9d,
-       0xdf, 0x47, 0xdd, 0xaf, 0xf3, 0x4f, 0xec, 0x76, 0xbe, 0x8f, 0x7f, 0x8f,
-       0xbc, 0xa5, 0xee, 0xf1, 0x7a, 0x3c, 0xca, 0xf4, 0x8c, 0xfc, 0x39, 0x6c,
-       0xad, 0x67, 0x36, 0x27, 0xb1, 0x5e, 0x1a, 0x7e, 0xdd, 0x38, 0xfc, 0xba,
-       0x51, 0xf8, 0x75, 0x2e, 0x74, 0xe1, 0x90, 0xca, 0x27, 0xa3, 0xde, 0x9f,
-       0x38, 0x24, 0xd6, 0xd7, 0x32, 0x62, 0x1d, 0xbc, 0x00, 0x1b, 0x61, 0xe9,
-       0x25, 0xd0, 0x7f, 0xe2, 0x79, 0x11, 0xf2, 0x04, 0xf9, 0xef, 0x31, 0xc9,
-       0xc6, 0x86, 0xe4, 0xf3, 0x9b, 0x6c, 0x23, 0x3d, 0x65, 0xe5, 0x15, 0xf7,
-       0x25, 0xc5, 0x67, 0x17, 0x6b, 0xd7, 0x25, 0xf4, 0x84, 0x96, 0xb5, 0x3f,
-       0x80, 0x3d, 0xd5, 0x48, 0x6b, 0xda, 0xbb, 0x2d, 0xa4, 0x3d, 0xe8, 0xa7,
-       0x35, 0xca, 0xd8, 0x9b, 0x12, 0xbd, 0xf0, 0x92, 0xbc, 0xf9, 0x82, 0xab,
-       0xe2, 0x12, 0x6b, 0x4f, 0x2a, 0xdd, 0x07, 0xb9, 0x16, 0x95, 0xf5, 0xcd,
-       0xdf, 0x91, 0x4f, 0x39, 0x89, 0x2b, 0x94, 0x99, 0x94, 0x5d, 0x5a, 0xa7,
-       0x41, 0xc6, 0x56, 0x12, 0xa5, 0x32, 0x6c, 0xef, 0x2b, 0xf6, 0x98, 0x64,
-       0x83, 0xa5, 0x56, 0x3f, 0xfd, 0x82, 0x9a, 0xeb, 0x24, 0x6d, 0x9e, 0xef,
-       0xbd, 0xb0, 0xad, 0x13, 0x75, 0x25, 0xa3, 0xa8, 0x27, 0x33, 0xd4, 0x9b,
-       0xd4, 0x7d, 0xd4, 0x3f, 0x8c, 0x97, 0xe3, 0x79, 0x8d, 0xba, 0xe9, 0xef,
-       0xd4, 0x9d, 0x67, 0x71, 0xc6, 0x91, 0xfa, 0x1a, 0xe5, 0x13, 0xf4, 0xfc,
-       0x93, 0xb4, 0x73, 0x45, 0xd1, 0x3f, 0xed, 0xdc, 0x47, 0xc5, 0xb7, 0x71,
-       0xd9, 0xb6, 0xdb, 0xc6, 0xfd, 0x83, 0x7d, 0xd2, 0x1b, 0x05, 0x7e, 0xc8,
-       0xff, 0x3b, 0x36, 0x60, 0x2e, 0x73, 0x13, 0xb6, 0x26, 0xf7, 0x61, 0xc9,
-       0xa0, 0x7b, 0x1d, 0x74, 0xc4, 0xb5, 0x6f, 0xb6, 0x3e, 0x1c, 0xe5, 0x1e,
-       0x2c, 0x65, 0x23, 0x6c, 0x0f, 0xfe, 0xa6, 0x3b, 0x0a, 0xca, 0x88, 0x7d,
-       0xb0, 0xcd, 0x6d, 0x43, 0xb3, 0x9f, 0x34, 0xbe, 0x04, 0xf8, 0x79, 0x95,
-       0x7b, 0x28, 0xf3, 0x4e, 0x04, 0x36, 0xd7, 0x22, 0x63, 0x52, 0x6a, 0xdd,
-       0xf7, 0x67, 0x22, 0x92, 0xbc, 0xd0, 0x25, 0xa9, 0xa7, 0xec, 0x41, 0x9d,
-       0xb7, 0xf8, 0x30, 0x74, 0xcf, 0x41, 0xb4, 0x1f, 0x90, 0xb2, 0x13, 0x85,
-       0x3f, 0x33, 0x2a, 0xe5, 0xd1, 0x30, 0x78, 0xe6, 0x01, 0xde, 0x75, 0x28,
-       0x38, 0xca, 0xce, 0x30, 0xca, 0x6e, 0x94, 0xf7, 0x48, 0xf9, 0xc9, 0x4b,
-       0xfb, 0xb4, 0x2d, 0xbb, 0xfb, 0xfd, 0x9f, 0x76, 0xab, 0xd8, 0xb9, 0xf5,
-       0x8e, 0x88, 0xb9, 0x47, 0xff, 0x2d, 0x60, 0xf7, 0xfb, 0x12, 0x9e, 0x90,
-       0xb8, 0x4f, 0x44, 0x64, 0x18, 0xb2, 0x77, 0x04, 0x7a, 0xeb, 0xe0, 0x85,
-       0x21, 0x19, 0xbd, 0x10, 0x97, 0xfb, 0x2e, 0xf8, 0xf6, 0xc0, 0xf2, 0x74,
-       0xca, 0xc4, 0x71, 0xdd, 0xdf, 0x32, 0x8e, 0x7b, 0x9f, 0x9a, 0x1f, 0x30,
-       0xae, 0x41, 0x1e, 0x46, 0x3f, 0xa7, 0xec, 0x06, 0x8d, 0xfb, 0x1f, 0xc9,
-       0x91, 0x95, 0x90, 0x1c, 0x55, 0xbc, 0xe8, 0xdb, 0xf0, 0xff, 0x13, 0xfb,
-       0x48, 0x80, 0x47, 0x4e, 0x18, 0xbf, 0xb3, 0x17, 0x78, 0x25, 0x0e, 0xa1,
-       0xeb, 0xe0, 0x8b, 0x32, 0x3f, 0xb5, 0x98, 0xee, 0x1c, 0xcf, 0xb1, 0x3f,
-       0xc5, 0x98, 0x2c, 0x6c, 0x0b, 0xb6, 0xcb, 0x60, 0x40, 0xf6, 0x6a, 0x7f,
-       0x1f, 0xda, 0x29, 0x73, 0x8e, 0x42, 0xe6, 0xec, 0x6e, 0xcf, 0xa1, 0x8d,
-       0xeb, 0xdf, 0x83, 0x75, 0xc9, 0x8f, 0x5c, 0xd7, 0xc7, 0x09, 0xcf, 0x75,
-       0x10, 0xfe, 0x07, 0xcf, 0xb5, 0x4b, 0x0a, 0x0e, 0x73, 0x37, 0x59, 0xf7,
-       0x16, 0x73, 0xd6, 0x13, 0xe6, 0xac, 0x05, 0xb6, 0x31, 0xed, 0x2d, 0x9d,
-       0xaf, 0x50, 0x88, 0x26, 0x4a, 0x22, 0x71, 0x15, 0xbf, 0x5b, 0xaf, 0xf8,
-       0xf6, 0x49, 0xb6, 0x9f, 0xf7, 0x10, 0x8b, 0x69, 0x15, 0x5b, 0x8b, 0x07,
-       0x3c, 0xda, 0x37, 0xe9, 0x30, 0xf3, 0x92, 0x1b, 0x2b, 0xbc, 0x93, 0x0c,
-       0xe0, 0x07, 0x3c, 0x07, 0x2d, 0x71, 0x5c, 0xd6, 0x95, 0xb4, 0x6e, 0x9b,
-       0x01, 0xff, 0xda, 0xaa, 0x4f, 0x3c, 0x97, 0x1e, 0x34, 0xef, 0x31, 0x59,
-       0xab, 0xbc, 0x63, 0xc8, 0xf6, 0xfe, 0xf6, 0x9e, 0x5c, 0xa6, 0x9f, 0xf7,
-       0x49, 0xa8, 0x23, 0x9f, 0xbc, 0xa4, 0x72, 0x15, 0xb5, 0xef, 0x10, 0xe4,
-       0x3d, 0x24, 0xf6, 0xf9, 0x53, 0xd0, 0xf5, 0xee, 0x3d, 0x77, 0x99, 0x3d,
-       0x73, 0xbf, 0xc4, 0x37, 0xc7, 0xfb, 0x7a, 0x8e, 0x38, 0x0f, 0x77, 0xf8,
-       0x1b, 0x91, 0x81, 0x9d, 0xfb, 0x73, 0xca, 0x42, 0xca, 0xbf, 0x49, 0x95,
-       0xef, 0x72, 0xcb, 0x86, 0x1c, 0xaa, 0x42, 0x2e, 0x55, 0x21, 0x8b, 0xaa,
-       0x90, 0x45, 0xb0, 0x41, 0x9e, 0x85, 0x5c, 0x7d, 0x06, 0xbe, 0xda, 0xd7,
-       0xab, 0xbe, 0xfd, 0x9e, 0x85, 0x1c, 0x53, 0x36, 0x1d, 0xed, 0x9f, 0x9a,
-       0xed, 0x75, 0xff, 0xd6, 0xf9, 0x50, 0x01, 0xcf, 0x1f, 0xd7, 0x2d, 0x45,
-       0x35, 0x26, 0x2e, 0xf3, 0xcd, 0xbd, 0xfa, 0x72, 0x7f, 0xa1, 0x8e, 0xfd,
-       0x9a, 0xbb, 0x7e, 0x15, 0x8b, 0xa0, 0x0c, 0xfe, 0x4d, 0x3c, 0xd0, 0x99,
-       0xa7, 0xc9, 0x33, 0x56, 0x39, 0x42, 0x38, 0x53, 0xe2, 0x9d, 0x76, 0x61,
-       0x59, 0x16, 0x26, 0x17, 0xa5, 0x3c, 0x69, 0xc9, 0xdc, 0x38, 0xce, 0x68,
-       0x7c, 0x18, 0x3a, 0x32, 0x0d, 0x5d, 0xbb, 0x80, 0x79, 0xc8, 0x7f, 0x0f,
-       0xe2, 0x5c, 0x1c, 0x73, 0x27, 0xfe, 0xa5, 0xe9, 0x5c, 0x4d, 0xac, 0x6b,
-       0x2a, 0x47, 0x7c, 0x79, 0xfa, 0xd5, 0x95, 0x87, 0x61, 0x3f, 0x4d, 0xc8,
-       0xd5, 0xc9, 0x87, 0x65, 0xfb, 0x8e, 0xf1, 0x38, 0x07, 0xc8, 0xe1, 0xcf,
-       0x6f, 0xf2, 0x1e, 0xb4, 0x4b, 0x66, 0xa3, 0x8c, 0x81, 0xc1, 0xc6, 0x71,
-       0xfb, 0x65, 0x5b, 0xf9, 0xa1, 0x07, 0xe4, 0xb6, 0xa2, 0x2d, 0xd6, 0x85,
-       0x50, 0xa7, 0xed, 0xd1, 0xb5, 0x8a, 0x6f, 0x5b, 0x28, 0x1c, 0x99, 0x98,
-       0x1f, 0xf5, 0x0d, 0xe3, 0x49, 0x8c, 0x2f, 0xad, 0x45, 0x76, 0x64, 0x01,
-       0x4b, 0xff, 0x5c, 0x3b, 0xfd, 0xe3, 0xbf, 0x8e, 0xe8, 0x6f, 0x0b, 0xba,
-       0xa4, 0x1c, 0x2d, 0xb5, 0xca, 0x6e, 0xd0, 0xba, 0xda, 0xce, 0x69, 0xf5,
-       0xdb, 0x48, 0xcb, 0x36, 0x60, 0x25, 0x1d, 0x24, 0x55, 0xee, 0xce, 0x77,
-       0xaa, 0x03, 0xfb, 0xf4, 0x37, 0x0a, 0x01, 0x8c, 0xe3, 0xfb, 0x89, 0x88,
-       0x7e, 0xf7, 0xef, 0xdd, 0xdf, 0x86, 0xbe, 0x31, 0x25, 0xaf, 0xd6, 0x6a,
-       0x01, 0xf0, 0xf0, 0x20, 0x9e, 0x5f, 0x44, 0x9f, 0x30, 0xce, 0x86, 0xb1,
-       0xa4, 0xb7, 0xa8, 0xfc, 0x9b, 0x80, 0xeb, 0xe7, 0xf5, 0x52, 0x77, 0xff,
-       0x67, 0xd5, 0xfe, 0xf4, 0x4a, 0x37, 0xf3, 0x55, 0x51, 0x52, 0xaf, 0xff,
-       0x0a, 0xbe, 0x56, 0x48, 0xf2, 0x35, 0x17, 0xb6, 0x78, 0x88, 0xf4, 0x8b,
-       0xfa, 0x7b, 0xa1, 0xa3, 0x04, 0xfc, 0xd4, 0x05, 0xbd, 0xa9, 0x70, 0x0d,
-       0x4a, 0xa2, 0x4f, 0xef, 0xe7, 0x99, 0x6a, 0x38, 0x42, 0xde, 0xf7, 0x98,
-       0x6f, 0x10, 0x0e, 0x78, 0x2f, 0x4d, 0xcf, 0x55, 0x68, 0x2b, 0xb5, 0x5a,
-       0xd0, 0x65, 0xd8, 0xc9, 0xcf, 0x94, 0x5f, 0xb1, 0x2d, 0xda, 0x57, 0x5b,
-       0x50, 0xf9, 0x96, 0x37, 0xa7, 0x35, 0x8d, 0x74, 0xde, 0x9f, 0xbc, 0xd1,
-       0xdd, 0x49, 0x58, 0xb6, 0xd3, 0x3d, 0x86, 0x2f, 0xc2, 0xc1, 0x62, 0x25,
-       0x12, 0x9c, 0x53, 0xf7, 0x5b, 0x5b, 0x26, 0x1f, 0xf3, 0xda, 0x74, 0xaa,
-       0x19, 0x56, 0xb9, 0x00, 0xbc, 0x4b, 0xc8, 0x57, 0x78, 0x97, 0xa2, 0xdb,
-       0x53, 0xa6, 0x3d, 0xd9, 0x54, 0x6d, 0x2a, 0xde, 0xc5, 0x18, 0x57, 0x37,
-       0xca, 0xdb, 0x15, 0xca, 0x07, 0xcc, 0xaf, 0x65, 0x09, 0x60, 0x7f, 0x71,
-       0x7a, 0x6e, 0x85, 0xf0, 0x7d, 0x7f, 0x3a, 0xb7, 0xc2, 0x1c, 0xc8, 0xff,
-       0x34, 0x7d, 0x63, 0xc5, 0x92, 0x0d, 0x37, 0xa1, 0xe2, 0x57, 0xeb, 0x8c,
-       0xb1, 0x72, 0x9c, 0x9a, 0xf3, 0x45, 0x23, 0x93, 0xbf, 0x37, 0x3d, 0xbc,
-       0x1e, 0x90, 0x73, 0x66, 0x0e, 0xbe, 0xc7, 0xd7, 0xef, 0xa0, 0x6b, 0xd0,
-       0xca, 0x15, 0xd0, 0x4a, 0x2f, 0x6c, 0x09, 0xd2, 0x37, 0x7d, 0xb2, 0x5e,
-       0xc8, 0x01, 0xae, 0xf3, 0x8c, 0x5a, 0x27, 0x80, 0x75, 0xe6, 0x54, 0xce,
-       0x78, 0x80, 0x79, 0xb7, 0xb0, 0x35, 0x61, 0x13, 0xba, 0x8c, 0x59, 0xdb,
-       0xd8, 0xf3, 0x28, 0xf4, 0x12, 0xf3, 0x3f, 0xfe, 0x7b, 0x64, 0x27, 0x6f,
-       0xfc, 0x39, 0x33, 0xee, 0x9b, 0x18, 0xc7, 0x33, 0x51, 0xf9, 0xe6, 0x6f,
-       0xb6, 0x65, 0x58, 0xd9, 0x90, 0x3a, 0x07, 0x89, 0x30, 0xd4, 0xb1, 0x57,
-       0xea, 0xe2, 0x2e, 0xc9, 0xab, 0x7d, 0x7d, 0x53, 0x8d, 0xb3, 0xbc, 0x6f,
-       0x00, 0x76, 0xda, 0x25, 0x98, 0xbb, 0xaa, 0xe3, 0x6d, 0x79, 0xc5, 0xd3,
-       0xe0, 0x91, 0x49, 0x3f, 0x57, 0x4f, 0x8f, 0xf3, 0xfb, 0x27, 0xd7, 0x8f,
-       0x98, 0x9c, 0x8e, 0xbf, 0x6f, 0x65, 0x8f, 0xf7, 0x2a, 0x1b, 0x6c, 0xe7,
-       0x9b, 0x08, 0x7f, 0x8c, 0xdf, 0xc7, 0xcf, 0x31, 0x7e, 0x74, 0xff, 0x0e,
-       0xcc, 0x5b, 0xe6, 0xcc, 0x39, 0x8e, 0xb1, 0x49, 0x95, 0xaf, 0xcb, 0xba,
-       0xe0, 0x7c, 0x86, 0x73, 0x74, 0xde, 0xf7, 0x8c, 0x83, 0x47, 0xb5, 0xcd,
-       0x57, 0x82, 0x9d, 0x55, 0x06, 0xbf, 0x04, 0x3c, 0xca, 0xf1, 0x61, 0x13,
-       0x57, 0x7b, 0xa3, 0x38, 0x1f, 0xef, 0x12, 0xc7, 0x21, 0x7b, 0xfc, 0xf1,
-       0x3c, 0xc7, 0x6b, 0xd3, 0x37, 0x2a, 0xae, 0x9c, 0xad, 0xea, 0x7c, 0x47,
-       0x8d, 0x07, 0xc6, 0x6e, 0x78, 0xb6, 0x71, 0x99, 0x73, 0xa9, 0x67, 0xe3,
-       0xf2, 0x5d, 0xd7, 0x8f, 0xad, 0xf1, 0x7e, 0x0a, 0xfd, 0x61, 0xeb, 0x2d,
-       0x6c, 0x72, 0xff, 0xdf, 0xc4, 0xfe, 0xe9, 0x53, 0x68, 0x5a, 0x3a, 0x08,
-       0xb9, 0xf5, 0x1f, 0x82, 0xf0, 0x19, 0xa0, 0xbb, 0x6f, 0x05, 0x3b, 0xf7,
-       0xe7, 0xeb, 0x6b, 0x4d, 0x97, 0x41, 0xd0, 0xc8, 0x62, 0x1b, 0xef, 0x96,
-       0x04, 0xde, 0x39, 0x02, 0x1d, 0x64, 0x49, 0x61, 0xdc, 0x8d, 0x2d, 0xf0,
-       0x6e, 0xc1, 0x19, 0x73, 0x1c, 0x95, 0xc7, 0x16, 0x07, 0xbc, 0x7c, 0xe6,
-       0xb7, 0x02, 0xcc, 0x39, 0x8b, 0xab, 0x5c, 0xdd, 0x6c, 0xd4, 0x05, 0xbc,
-       0x8e, 0xb2, 0x4f, 0xb4, 0x5e, 0xfe, 0x97, 0xfb, 0x29, 0x6b, 0xfa, 0x5d,
-       0xff, 0xec, 0x39, 0xf7, 0x8b, 0x98, 0x3b, 0x60, 0xda, 0x7d, 0x1a, 0x09,
-       0x30, 0xe5, 0x4d, 0x76, 0xbe, 0x01, 0xf1, 0xe3, 0x7c, 0xec, 0xff, 0x2d,
-       0x05, 0xcb, 0x1c, 0xf4, 0xd0, 0xbc, 0xda, 0xcf, 0x0b, 0xa0, 0x05, 0xca,
-       0x15, 0x9f, 0x7e, 0x5f, 0x00, 0xfd, 0xee, 0x63, 0x0a, 0xdf, 0x1e, 0xb4,
-       0xe6, 0xd3, 0x18, 0xe9, 0x8b, 0xb4, 0xf5, 0x8a, 0xe2, 0xb9, 0x52, 0xfb,
-       0xdc, 0x29, 0xb3, 0x12, 0x4e, 0xdc, 0xf6, 0xcf, 0x9d, 0xcf, 0x7b, 0xe5,
-       0xb8, 0xfa, 0xfc, 0x91, 0xf9, 0x07, 0x9c, 0x6d, 0xda, 0x9c, 0x6d, 0xa6,
-       0xe3, 0x9b, 0x04, 0x7f, 0x3e, 0xfa, 0xfb, 0xd4, 0xaf, 0xbc, 0x0b, 0xe2,
-       0xf7, 0x12, 0xca, 0x44, 0x90, 0x72, 0x9a, 0x7c, 0x94, 0x8b, 0xf3, 0x3e,
-       0xe5, 0xa4, 0x04, 0xfa, 0x60, 0xb7, 0x8c, 0x86, 0xc4, 0xff, 0x2e, 0xa9,
-       0x4b, 0xb6, 0x9c, 0x56, 0xeb, 0x06, 0xef, 0x8d, 0x2b, 0x41, 0xd9, 0x50,
-       0x77, 0x9f, 0xe0, 0xd1, 0xde, 0xa0, 0x2c, 0xba, 0x6d, 0x3d, 0x27, 0x75,
-       0xf4, 0x59, 0x43, 0xdb, 0xb9, 0x36, 0x6c, 0xd4, 0x07, 0xb0, 0x21, 0xdd,
-       0xbf, 0x6f, 0x15, 0xa3, 0x77, 0xf4, 0x35, 0x32, 0x96, 0xb1, 0x47, 0xc6,
-       0xa7, 0x1d, 0xc9, 0xaf, 0x0f, 0xe0, 0x07, 0x19, 0xaf, 0xe4, 0x02, 0x63,
-       0x91, 0x8c, 0xe7, 0x96, 0xe0, 0x9f, 0x6a, 0x3f, 0x9f, 0xf6, 0xf6, 0x95,
-       0xcd, 0x44, 0xa9, 0x24, 0x6e, 0xfc, 0x91, 0xf6, 0x77, 0x3c, 0x7d, 0xa5,
-       0xb0, 0xd7, 0x19, 0xf3, 0x8d, 0xab, 0xfc, 0xd9, 0x1e, 0x2f, 0x11, 0x3b,
-       0x05, 0xdf, 0xf5, 0xeb, 0x69, 0xc6, 0x7a, 0xef, 0x23, 0xbe, 0xbf, 0xc4,
-       0x4d, 0xda, 0x23, 0xe3, 0xe2, 0x5e, 0x72, 0x47, 0x1f, 0x11, 0xfa, 0xa7,
-       0x89, 0xf8, 0x14, 0xf1, 0xd6, 0xfe, 0xbe, 0x20, 0x68, 0xec, 0xa5, 0x71,
-       0x19, 0xbe, 0xf4, 0x23, 0x15, 0x63, 0xff, 0x70, 0x7a, 0x37, 0x6d, 0xa8,
-       0x58, 0xf1, 0x78, 0xbf, 0x0c, 0x8f, 0xae, 0x89, 0x40, 0x5b, 0xf0, 0x7b,
-       0x03, 0x0b, 0x3e, 0xaa, 0x7a, 0x87, 0xbd, 0x1e, 0x57, 0xdf, 0x5c, 0x65,
-       0x55, 0xde, 0x23, 0x63, 0xc9, 0x3c, 0xd3, 0x88, 0xca, 0x85, 0x7b, 0x16,
-       0x67, 0x5b, 0x68, 0xf2, 0x7c, 0x19, 0x57, 0x66, 0xdc, 0x98, 0xb1, 0x65,
-       0xc6, 0x88, 0xf5, 0xf7, 0x53, 0x47, 0x9a, 0x7b, 0xc5, 0x91, 0x89, 0x8b,
-       0x51, 0xf3, 0x4d, 0x9a, 0x58, 0xdb, 0xd0, 0xbb, 0xf9, 0x9a, 0xa3, 0xee,
-       0xfd, 0x8a, 0x4e, 0xbf, 0x9c, 0x1c, 0xed, 0x06, 0xce, 0x07, 0x54, 0x3e,
-       0xa4, 0xed, 0xbe, 0x07, 0x7e, 0x25, 0xfd, 0x38, 0xea, 0x5b, 0x1f, 0xcf,
-       0x87, 0x50, 0xf7, 0x0b, 0xe0, 0x9e, 0x75, 0xf0, 0x39, 0x95, 0xee, 0xfd,
-       0xb4, 0x6c, 0x57, 0x98, 0x9f, 0x5d, 0x3f, 0x90, 0x53, 0xe7, 0xc1, 0x98,
-       0x8d, 0x2f, 0x9b, 0xfc, 0x5c, 0x35, 0xfa, 0xcc, 0x8e, 0xb9, 0xab, 0x66,
-       0xcc, 0x66, 0x40, 0x8a, 0xeb, 0x94, 0x3f, 0x96, 0x5a, 0xeb, 0x56, 0xe0,
-       0xad, 0x52, 0xaa, 0xef, 0x75, 0xef, 0xde, 0x6a, 0x3d, 0x93, 0x56, 0xbe,
-       0xec, 0xf9, 0x92, 0x39, 0x63, 0xfd, 0x1d, 0x64, 0x70, 0x27, 0x7f, 0x38,
-       0xaa, 0xe3, 0x09, 0xd9, 0x81, 0x5e, 0xfa, 0x0f, 0x7d, 0x1a, 0xbf, 0xf4,
-       0x7b, 0x7f, 0x65, 0x6c, 0x51, 0xfa, 0xbc, 0x03, 0x4a, 0x4f, 0xdb, 0x0d,
-       0x9f, 0x4e, 0x98, 0x73, 0x43, 0x7f, 0xf8, 0xa0, 0x64, 0xeb, 0x90, 0x9b,
-       0x83, 0x7c, 0x3f, 0x6b, 0xc6, 0xf2, 0xb9, 0x25, 0x47, 0x27, 0x76, 0xdf,
-       0xa7, 0x4f, 0x6a, 0x3f, 0xbb, 0xd7, 0xbf, 0x53, 0xf7, 0x73, 0x4d, 0x7d,
-       0x78, 0x15, 0x9c, 0xa0, 0x27, 0x1f, 0x06, 0xbd, 0xd6, 0x11, 0xc0, 0xcb,
-       0x18, 0xe4, 0x80, 0xcb, 0x5c, 0x9d, 0x80, 0x4c, 0x0c, 0x24, 0x98, 0xc3,
-       0xa7, 0xe0, 0x69, 0xd4, 0x43, 0x68, 0xf3, 0xe1, 0xd4, 0xfe, 0x79, 0xa3,
-       0xce, 0xf6, 0x38, 0xd6, 0xea, 0x96, 0x89, 0x41, 0xe2, 0x79, 0x37, 0x1c,
-       0x03, 0x81, 0xbd, 0x73, 0xd4, 0x1e, 0xec, 0x80, 0xef, 0xee, 0xef, 0x47,
-       0x73, 0xf0, 0xc3, 0x72, 0x2b, 0x8c, 0x15, 0x10, 0xc6, 0x01, 0xc8, 0x39,
-       0xec, 0x31, 0xed, 0xe7, 0x0e, 0xfb, 0x78, 0xf1, 0x63, 0x0c, 0x21, 0x45,
-       0x17, 0x73, 0x19, 0xee, 0x25, 0x64, 0x62, 0x0e, 0x84, 0x2b, 0x61, 0xf2,
-       0x0f, 0x09, 0x9f, 0x7d, 0x40, 0x9f, 0xff, 0xfd, 0x66, 0xbf, 0x7e, 0xce,
-       0x22, 0xe7, 0xba, 0x17, 0xe3, 0xbf, 0xd2, 0xc2, 0x5a, 0x34, 0xe8, 0xc0,
-       0xff, 0xbe, 0xaf, 0x7f, 0xaf, 0x9e, 0xab, 0xd7, 0xff, 0xa6, 0x2f, 0x66,
-       0xbe, 0xe3, 0x23, 0x9c, 0xe4, 0x2f, 0x1f, 0x87, 0x9c, 0x63, 0xc0, 0xdc,
-       0x23, 0x10, 0x86, 0x9e, 0x5d, 0x30, 0x24, 0xd2, 0x77, 0xca, 0xb8, 0x43,
-       0x1d, 0x7b, 0x27, 0xad, 0xf5, 0xc9, 0x42, 0xad, 0x57, 0xca, 0x35, 0xe6,
-       0x53, 0xf3, 0xfb, 0x32, 0xda, 0x59, 0xe4, 0x4b, 0x95, 0x37, 0x69, 0xf2,
-       0x15, 0x7d, 0xfe, 0xec, 0x43, 0x3f, 0xea, 0x10, 0x94, 0x75, 0x2d, 0x9f,
-       0xea, 0x72, 0x77, 0xce, 0xe2, 0x7c, 0x3b, 0x67, 0x51, 0xe7, 0x25, 0x15,
-       0xdb, 0x79, 0x22, 0xcc, 0x89, 0xeb, 0xcc, 0x41, 0x2a, 0xc9, 0xa3, 0x87,
-       0x7b, 0x24, 0xb9, 0xdc, 0x6b, 0x68, 0xf4, 0x3d, 0x66, 0x1d, 0xac, 0xb7,
-       0x34, 0x29, 0xc9, 0xa5, 0x3f, 0x86, 0x6f, 0xaf, 0xf2, 0x22, 0x3b, 0xf2,
-       0xdb, 0x87, 0xcd, 0xb7, 0x48, 0x59, 0x8b, 0xf9, 0x28, 0xf9, 0x25, 0x9c,
-       0xd7, 0xe1, 0xc4, 0x68, 0xdc, 0xe6, 0xb7, 0xb8, 0x27, 0x24, 0xb9, 0x3a,
-       0xa9, 0xbf, 0x89, 0x4b, 0xf3, 0x46, 0x3e, 0xa1, 0xec, 0xe9, 0xd4, 0x65,
-       0x3d, 0x9f, 0xbb, 0xc4, 0xf6, 0x14, 0x6c, 0x47, 0xb6, 0xe7, 0x63, 0x01,
-       0x75, 0x6b, 0x7f, 0x3f, 0xe8, 0xa9, 0xcb, 0xd8, 0x03, 0xcc, 0xe9, 0xe4,
-       0x78, 0xda, 0x1e, 0xa7, 0x71, 0x66, 0xf9, 0xb8, 0x2d, 0x1c, 0xa3, 0xe6,
-       0xc3, 0xb3, 0x7f, 0x47, 0x44, 0x5c, 0x8f, 0xcb, 0x7a, 0xd3, 0x05, 0x4f,
-       0xe8, 0x9c, 0xf8, 0x62, 0xdd, 0xcf, 0xe5, 0x7c, 0xb4, 0x9d, 0xcb, 0x49,
-       0x18, 0x0b, 0x95, 0xdd, 0xb4, 0x77, 0xc8, 0xe4, 0x54, 0xf6, 0xa8, 0xfb,
-       0xd9, 0x0e, 0xf9, 0x67, 0xfa, 0x3f, 0x73, 0x80, 0x77, 0xf7, 0x22, 0x6c,
-       0x1f, 0x34, 0xed, 0xb0, 0x8f, 0xa2, 0x51, 0xc5, 0x07, 0xc9, 0x86, 0xdf,
-       0xef, 0xfa, 0x01, 0x9d, 0x0b, 0x4a, 0x3c, 0x79, 0x06, 0xe6, 0x09, 0xf8,
-       0xb1, 0xac, 0x3b, 0x88, 0xb1, 0x3c, 0x27, 0x94, 0x8d, 0x83, 0x2a, 0xd7,
-       0x30, 0xe0, 0x4d, 0x99, 0x7b, 0xc1, 0x41, 0xb5, 0x96, 0xe3, 0x71, 0x7e,
-       0x5f, 0x36, 0xf4, 0x74, 0xac, 0xbf, 0x1b, 0x5e, 0xc6, 0xe0, 0xfc, 0xdc,
-       0x51, 0xb6, 0xf3, 0x7d, 0x77, 0x1f, 0x3f, 0x4f, 0x34, 0x6b, 0x05, 0xdb,
-       0x39, 0xf6, 0xc4, 0x25, 0xef, 0x96, 0x51, 0x5e, 0xf6, 0x00, 0x23, 0x9f,
-       0x51, 0x9a, 0x6f, 0x07, 0x82, 0x4b, 0xfc, 0xed, 0x9e, 0x27, 0x88, 0xb9,
-       0x7d, 0x9e, 0xdd, 0x3b, 0xa7, 0xb4, 0xcb, 0x3b, 0x6f, 0x6d, 0x57, 0x98,
-       0x27, 0x51, 0x92, 0x93, 0x99, 0x3e, 0x99, 0xab, 0xd9, 0xfc, 0xc6, 0x93,
-       0x31, 0x7a, 0xde, 0x83, 0xcb, 0xbc, 0x92, 0x71, 0x23, 0xc6, 0xe7, 0xee,
-       0x81, 0x6f, 0x4e, 0x7a, 0x1e, 0x91, 0xf5, 0xfa, 0x4c, 0x47, 0xfe, 0x6d,
-       0x97, 0xa1, 0xb3, 0x7f, 0x1d, 0x92, 0xde, 0x12, 0x7c, 0x32, 0x9f, 0xa7,
-       0x47, 0xa4, 0x50, 0xef, 0xbc, 0x3b, 0x63, 0xae, 0x4f, 0xe7, 0x37, 0xb4,
-       0x4a, 0x0f, 0xd6, 0x4a, 0xb4, 0xab, 0xa2, 0x8c, 0x4b, 0xb0, 0xdf, 0x7e,
-       0xa3, 0x6f, 0xe1, 0x08, 0xf5, 0xbe, 0xc5, 0x12, 0x97, 0xb0, 0x41, 0x47,
-       0xa8, 0x75, 0x52, 0x72, 0x34, 0x5a, 0x82, 0x8f, 0x3a, 0x62, 0xd6, 0x7d,
-       0x3b, 0xde, 0xd9, 0xf7, 0x80, 0x69, 0xbf, 0xd7, 0xbc, 0xf7, 0x9a, 0xf7,
-       0x00, 0xde, 0xeb, 0xad, 0x5a, 0x95, 0x73, 0xb2, 0xe4, 0xf7, 0x22, 0xbc,
-       0xdb, 0xf2, 0x24, 0x74, 0x59, 0xa0, 0xa7, 0x7a, 0xe5, 0xf1, 0xba, 0xc2,
-       0xaf, 0xe5, 0x2e, 0xd1, 0x20, 0xd8, 0x6f, 0x9e, 0xef, 0xe6, 0xc1, 0x4f,
-       0xde, 0x91, 0x37, 0x3c, 0xec, 0x98, 0xdc, 0xec, 0x0e, 0x78, 0xb3, 0x80,
-       0xf5, 0xd7, 0xe5, 0x41, 0x51, 0x47, 0x69, 0x5f, 0xb9, 0x50, 0xd1, 0xf9,
-       0x3e, 0x27, 0x2b, 0x80, 0xb5, 0xf6, 0x3f, 0x0e, 0xe8, 0xdc, 0x14, 0x3f,
-       0x9f, 0x91, 0xf9, 0xee, 0x23, 0x26, 0x27, 0x82, 0x63, 0x99, 0x57, 0xe9,
-       0xdf, 0x39, 0x76, 0xda, 0xaa, 0xd4, 0x45, 0xd4, 0x33, 0xfc, 0x6e, 0x25,
-       0x8d, 0xbe, 0x8b, 0x94, 0x35, 0xd0, 0x53, 0xbe, 0x2d, 0xf1, 0x39, 0xe5,
-       0x1f, 0x76, 0x7e, 0xf7, 0x73, 0x0e, 0xb0, 0xfe, 0x65, 0x93, 0x71, 0xe1,
-       0x1e, 0x09, 0x2c, 0xfb, 0x79, 0x50, 0x3c, 0x63, 0xda, 0x61, 0xfc, 0xb6,
-       0xfa, 0x77, 0x77, 0xc5, 0x8c, 0x7d, 0x5b, 0x81, 0x74, 0x3e, 0xe7, 0x30,
-       0xc7, 0xd4, 0xf1, 0xfc, 0x38, 0x33, 0x73, 0x6b, 0x68, 0x73, 0x1d, 0x14,
-       0x5b, 0xc5, 0x8d, 0xd8, 0x56, 0x92, 0xfe, 0xc3, 0xbf, 0x4b, 0xde, 0xf8,
-       0x47, 0xfc, 0x16, 0x46, 0xe7, 0x79, 0xab, 0x75, 0xa2, 0xda, 0x86, 0xe4,
-       0x37, 0xda, 0x69, 0xf0, 0xd5, 0xbe, 0x2d, 0x9d, 0xf3, 0x1d, 0xc1, 0x7b,
-       0x06, 0x74, 0x0c, 0x99, 0x2a, 0xfc, 0x1e, 0x9b, 0x7c, 0xc7, 0xef, 0xb1,
-       0x3d, 0x95, 0x6f, 0xb2, 0x6d, 0xbe, 0x2f, 0xba, 0xde, 0x0c, 0x8a, 0xbd,
-       0x34, 0xce, 0x6f, 0xd5, 0xf8, 0x6d, 0x23, 0x6c, 0xb5, 0x38, 0xda, 0x99,
-       0xc7, 0x36, 0xa4, 0xf2, 0x54, 0xca, 0xcd, 0x8f, 0xa0, 0xfc, 0x34, 0xfc,
-       0x75, 0x1d, 0x9f, 0x2f, 0x37, 0x99, 0xaf, 0xe2, 0xa8, 0x7b, 0xcf, 0xe4,
-       0x52, 0x01, 0xeb, 0xf9, 0xdf, 0x3e, 0x47, 0x51, 0x47, 0xf8, 0x4a, 0x86,
-       0x47, 0xfd, 0x5c, 0x84, 0x0d, 0x87, 0x3a, 0xa1, 0xd4, 0x8c, 0xa8, 0x1c,
-       0x17, 0x6d, 0x8f, 0xd0, 0xd6, 0x0b, 0xa3, 0x2f, 0xf7, 0xda, 0x4b, 0x7d,
-       0xd5, 0xa2, 0x4c, 0x4a, 0x61, 0x9d, 0x86, 0xca, 0x0f, 0x24, 0x9e, 0x5d,
-       0xa7, 0x48, 0x7f, 0x4d, 0xc9, 0xf8, 0xc4, 0xe8, 0xac, 0xe4, 0x9d, 0x10,
-       0x7c, 0xb1, 0xb2, 0xf2, 0x73, 0x5e, 0x80, 0x0d, 0x1d, 0xd9, 0x0a, 0x78,
-       0xdc, 0x1b, 0xd7, 0xa6, 0x1f, 0xa2, 0xf7, 0xa3, 0xef, 0x8e, 0xc4, 0x2a,
-       0xab, 0xef, 0xf5, 0x58, 0xcf, 0x7b, 0x01, 0xff, 0x7b, 0x6c, 0xe6, 0xef,
-       0xc3, 0x4f, 0x68, 0x4e, 0xc9, 0xd9, 0xca, 0x7e, 0xe6, 0xc6, 0xa7, 0xb7,
-       0x81, 0xb7, 0x93, 0xed, 0x7c, 0x7d, 0xe6, 0xb0, 0xf9, 0xba, 0x87, 0x67,
-       0xc5, 0x5c, 0x79, 0xd2, 0x19, 0xf3, 0xe5, 0x69, 0x87, 0x0d, 0xc9, 0xe3,
-       0x4d, 0x3f, 0x47, 0x7e, 0x2f, 0x3b, 0x9c, 0x34, 0xf8, 0x59, 0xf8, 0x86,
-       0x7e, 0x2e, 0x24, 0x73, 0x36, 0x5b, 0xad, 0x93, 0x69, 0xde, 0xc7, 0xce,
-       0x1c, 0x5d, 0xc3, 0x1e, 0xaf, 0xd5, 0x81, 0xc3, 0xe3, 0xac, 0x63, 0xee,
-       0x56, 0xb7, 0xe4, 0xc6, 0x55, 0xbc, 0xaf, 0x77, 0xcd, 0xdd, 0x2f, 0x57,
-       0x6b, 0x51, 0x95, 0x87, 0x56, 0x84, 0x9d, 0xdf, 0x90, 0xdb, 0x0e, 0xef,
-       0xa3, 0x8f, 0xa8, 0xf1, 0x3e, 0xbf, 0x73, 0x9d, 0xa8, 0x1c, 0x59, 0xd7,
-       0xf2, 0xe4, 0x54, 0x06, 0x76, 0xcb, 0x25, 0xb1, 0x3e, 0x9a, 0x19, 0x82,
-       0xef, 0xcd, 0xb5, 0x52, 0x18, 0x07, 0xda, 0x89, 0x91, 0xd7, 0x7f, 0xd1,
-       0x6a, 0x00, 0xde, 0xdb, 0x4d, 0xda, 0xeb, 0xb0, 0xa1, 0x66, 0x38, 0xc6,
-       0x13, 0xfb, 0x02, 0xfb, 0x0c, 0x80, 0xfe, 0x42, 0xfa, 0x7b, 0xb4, 0xca,
-       0x01, 0x69, 0x38, 0x6c, 0xe3, 0x73, 0x4c, 0x1a, 0x51, 0xdf, 0x4f, 0xf9,
-       0x21, 0xf0, 0x17, 0x57, 0x32, 0xc9, 0xbf, 0xc3, 0x67, 0x4e, 0xe9, 0x5c,
-       0xed, 0x18, 0x78, 0x28, 0x68, 0x6c, 0xb3, 0x20, 0xe6, 0xf8, 0xbe, 0xa3,
-       0x6d, 0x05, 0xde, 0xf1, 0x6b, 0x5b, 0x44, 0xeb, 0x18, 0xde, 0xfb, 0x05,
-       0xe1, 0x0b, 0xf8, 0x7c, 0x79, 0xc8, 0xd8, 0x14, 0x9d, 0xbe, 0x7c, 0x2a,
-       0x76, 0x91, 0xff, 0x0f, 0x62, 0xf3, 0x83, 0x32, 0x0b, 0x98, 0xcf, 0x9b,
-       0x7d, 0x3e, 0x92, 0x71, 0xe5, 0x56, 0x9d, 0x77, 0xf0, 0x07, 0x51, 0x32,
-       0xdf, 0x90, 0x30, 0x8f, 0x99, 0x9c, 0x4a, 0x0f, 0x7b, 0x3d, 0x21, 0x2f,
-       0xc3, 0xbe, 0x7e, 0xa5, 0x92, 0x4a, 0x1f, 0x51, 0x71, 0xe7, 0x44, 0xec,
-       0xaa, 0x8c, 0xc5, 0xe9, 0x03, 0x96, 0x9c, 0x44, 0xec, 0x16, 0xe8, 0xe1,
-       0x76, 0xe5, 0x50, 0x3f, 0xff, 0x27, 0x45, 0x03, 0xfa, 0xf0, 0xb6, 0xca,
-       0x81, 0x49, 0x30, 0x66, 0x82, 0xf7, 0x21, 0x93, 0x87, 0xc3, 0x75, 0xd8,
-       0x36, 0x24, 0x2f, 0x57, 0xda, 0xfa, 0x97, 0xeb, 0xe8, 0xdc, 0x36, 0xa5,
-       0x5f, 0x8f, 0xf6, 0x53, 0x0e, 0x71, 0x3d, 0x3d, 0x87, 0xdf, 0x87, 0x78,
-       0xf5, 0x63, 0x91, 0x8e, 0xfe, 0xbe, 0xc1, 0x62, 0xde, 0x0b, 0xf7, 0xfe,
-       0x13, 0x47, 0xdb, 0x40, 0x1c, 0x97, 0x72, 0x8e, 0xaa, 0xf9, 0x78, 0xdf,
-       0x3b, 0x24, 0x3f, 0x6e, 0xfa, 0xf3, 0x30, 0x1f, 0x87, 0x39, 0x3f, 0x94,
-       0x7d, 0x9d, 0x30, 0x68, 0xfd, 0xff, 0xb2, 0x8a, 0xeb, 0x4d, 0xa2, 0x3f,
-       0x75, 0x34, 0xe8, 0xa5, 0x1e, 0xd3, 0xff, 0xdf, 0xa1, 0x2d, 0xe3, 0xf8,
-       0x4c, 0x7c, 0x72, 0x1d, 0xd8, 0xf8, 0x0f, 0x38, 0xa6, 0xdd, 0xb7, 0x4b,
-       0x87, 0xc0, 0xaf, 0x27, 0xa4, 0xb1, 0x92, 0x8a, 0x3d, 0x2e, 0xfe, 0xbc,
-       0xad, 0x87, 0x79, 0x2f, 0x56, 0xc8, 0x8c, 0x39, 0x0b, 0x0a, 0x1e, 0xde,
-       0xdd, 0x26, 0x9c, 0xab, 0x58, 0xaf, 0xd1, 0xdc, 0x1d, 0x7b, 0x48, 0x64,
-       0xb7, 0x24, 0x95, 0xd6, 0x67, 0x33, 0x22, 0x5b, 0x38, 0x9b, 0x3f, 0x31,
-       0x67, 0xf3, 0x7e, 0xcc, 0xed, 0x5e, 0x18, 0x97, 0xd4, 0x85, 0x54, 0xfc,
-       0xbc, 0xf0, 0x8e, 0xf9, 0x00, 0xef, 0x98, 0xad, 0x47, 0x32, 0x71, 0xec,
-       0x37, 0x81, 0xfd, 0xa2, 0x6c, 0xf2, 0x99, 0xdf, 0xf7, 0xef, 0x23, 0x6f,
-       0x3f, 0x4c, 0x99, 0x49, 0x5c, 0x14, 0x54, 0x1b, 0xec, 0x93, 0xa7, 0x08,
-       0xd3, 0xbf, 0xe3, 0xf9, 0xa8, 0x58, 0xe8, 0xad, 0x26, 0xbf, 0x5b, 0xd5,
-       0xf0, 0xe5, 0x01, 0xdf, 0xbc, 0x86, 0x2f, 0x3e, 0xdb, 0xb6, 0x5d, 0x13,
-       0xb1, 0xb3, 0x42, 0x7b, 0x89, 0xf6, 0x0b, 0xed, 0xfa, 0xbf, 0xe9, 0xd7,
-       0xb1, 0x3d, 0xf8, 0xb1, 0x0f, 0x64, 0xdb, 0x7b, 0xef, 0x42, 0xdf, 0x6b,
-       0x19, 0x95, 0x63, 0xec, 0x4c, 0xc9, 0x7b, 0x25, 0xfb, 0x91, 0x44, 0x3c,
-       0x6b, 0xb9, 0xc6, 0x06, 0x44, 0x59, 0xe7, 0x33, 0x65, 0xae, 0x6b, 0x6c,
-       0x0b, 0x9e, 0x4d, 0x06, 0x6b, 0x29, 0xdc, 0xc2, 0x67, 0x1a, 0x02, 0xcd,
-       0x93, 0xd6, 0xde, 0x05, 0x1e, 0xd2, 0xff, 0x13, 0xe3, 0x2a, 0xf0, 0x58,
-       0x06, 0x1e, 0x4f, 0xdd, 0x65, 0x83, 0x85, 0xda, 0x36, 0xd8, 0xb6, 0x5a,
-       0xef, 0x26, 0x60, 0xca, 0x3b, 0xb4, 0xbf, 0xca, 0x6d, 0x5a, 0x21, 0x4c,
-       0xe3, 0xfc, 0x2e, 0x5b, 0xae, 0x67, 0x78, 0x1e, 0xb0, 0xc1, 0x30, 0xdf,
-       0xda, 0x0e, 0x2d, 0x61, 0xff, 0x8a, 0x7e, 0x41, 0xbb, 0x09, 0x27, 0x68,
-       0xf1, 0x2c, 0x38, 0x9f, 0x58, 0x37, 0x00, 0xcb, 0xb6, 0xa2, 0x03, 0x4d,
-       0x03, 0xdb, 0xf5, 0xde, 0x37, 0xa0, 0x01, 0xee, 0x93, 0xf4, 0xe7, 0xd3,
-       0x5e, 0xfb, 0xbb, 0x75, 0xf8, 0xb7, 0x25, 0xb9, 0xff, 0x90, 0x27, 0xb9,
-       0x0b, 0x2d, 0x59, 0x48, 0x8b, 0x35, 0x76, 0x88, 0x34, 0x49, 0x3b, 0x01,
-       0x36, 0x64, 0x8c, 0x38, 0xd6, 0xf6, 0xe0, 0xec, 0x57, 0xf7, 0xe3, 0xf7,
-       0x6f, 0xfa, 0x79, 0xbf, 0x94, 0xdb, 0xa0, 0xbc, 0x12, 0xeb, 0xbe, 0x43,
-       0xda, 0x3f, 0xbc, 0x1d, 0x05, 0xce, 0xd1, 0x9e, 0x7c, 0xa2, 0xcb, 0xc4,
-       0x51, 0xb5, 0x5e, 0x4e, 0x3e, 0x41, 0xbc, 0xa2, 0xfc, 0xea, 0x4f, 0x1c,
-       0x3f, 0x27, 0x49, 0xc7, 0x04, 0xc9, 0x17, 0x25, 0x99, 0xcf, 0x30, 0x27,
-       0xb4, 0x57, 0x8e, 0x40, 0xae, 0x4d, 0x55, 0x26, 0xe5, 0x0b, 0x95, 0x88,
-       0xb2, 0x1b, 0xfe, 0x2c, 0x9d, 0x8a, 0x8d, 0x5a, 0x2d, 0x79, 0x04, 0xf6,
-       0xcf, 0xec, 0x50, 0x97, 0xbc, 0x32, 0xae, 0xf3, 0x6f, 0x6f, 0x33, 0xb9,
-       0xce, 0x61, 0xce, 0x28, 0xf7, 0x03, 0xb9, 0x6f, 0xc1, 0x17, 0xb0, 0xba,
-       0x65, 0x36, 0x1a, 0x91, 0xe9, 0x34, 0xca, 0x37, 0xa7, 0xd5, 0x37, 0xa4,
-       0xd9, 0x68, 0xa7, 0x1c, 0x21, 0xcc, 0x2c, 0xdf, 0x62, 0xca, 0x9f, 0xf5,
-       0x77, 0xc0, 0x62, 0xcd, 0x67, 0x02, 0x6a, 0x7f, 0xe5, 0x3a, 0xe5, 0x1b,
-       0xc7, 0x40, 0x9e, 0x34, 0x79, 0x0f, 0x59, 0x92, 0x35, 0xc8, 0x97, 0x62,
-       0x4d, 0xac, 0x8d, 0x0c, 0x2c, 0x6a, 0x57, 0xdb, 0x9f, 0x45, 0xd0, 0xd7,
-       0x5c, 0x8d, 0xf2, 0x6f, 0x4a, 0xe5, 0x4e, 0xcf, 0xc1, 0xd6, 0x85, 0x4f,
-       0x3c, 0xdb, 0xed, 0x99, 0x7b, 0xce, 0x5e, 0xc6, 0x43, 0x3a, 0x65, 0x98,
-       0xff, 0x3f, 0x73, 0x0e, 0x0f, 0x48, 0x5f, 0x09, 0xe7, 0xe2, 0xdb, 0xdc,
-       0xc0, 0x29, 0xd6, 0xcc, 0xa9, 0x73, 0xf2, 0xcf, 0x84, 0xb2, 0xa7, 0x33,
-       0x67, 0xdb, 0xb7, 0x39, 0xc8, 0xb3, 0xd4, 0x17, 0x52, 0x0a, 0xc3, 0xa6,
-       0xed, 0xb9, 0x00, 0xdd, 0x5d, 0xf3, 0x40, 0x2b, 0x93, 0xd0, 0x87, 0x93,
-       0x52, 0x86, 0xed, 0xf6, 0xd1, 0xf4, 0x67, 0xc5, 0x7e, 0xea, 0xa0, 0xac,
-       0xd5, 0x7a, 0x80, 0x0f, 0xea, 0x85, 0x90, 0xf2, 0xaf, 0x6f, 0x1f, 0xa7,
-       0xbe, 0xa3, 0x2e, 0xd1, 0x67, 0xb1, 0x5d, 0xff, 0xc4, 0x80, 0xfe, 0x7e,
-       0x65, 0xbf, 0x6c, 0xd5, 0x7d, 0x5d, 0x08, 0xff, 0xb0, 0x16, 0x32, 0x7a,
-       0xb9, 0x17, 0xb2, 0xfb, 0xaf, 0x43, 0x0d, 0xe5, 0xab, 0x73, 0xff, 0xd4,
-       0x41, 0xea, 0xff, 0x70, 0xf4, 0x36, 0x5c, 0xee, 0xbd, 0x53, 0x07, 0x69,
-       0xbb, 0xc3, 0x39, 0xcc, 0xf5, 0x78, 0x1f, 0xc7, 0x3d, 0x46, 0x25, 0x74,
-       0xf1, 0x84, 0xd8, 0xf0, 0x5b, 0x02, 0x4b, 0xb4, 0xf5, 0xee, 0xf4, 0x5d,
-       0x02, 0x97, 0x6d, 0xf3, 0xad, 0xed, 0xb0, 0xb6, 0x65, 0x32, 0x28, 0x1b,
-       0xfe, 0xf7, 0xb7, 0xfc, 0xdd, 0xe1, 0xdb, 0x1d, 0x78, 0x03, 0x5d, 0x8a,
-       0xbf, 0xff, 0x0b, 0xc4, 0xbf, 0x6d, 0x24, 0x80, 0x4a, 0x00, 0x00, 0x00 };
-
-static const u32 bnx2_COM_b09FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_COM_b09FwRodata[(0x30/4) + 1] = {
-       0x80080100, 0x80080080, 0x80080000, 0x80080240, 0x08000ea4, 0x08000efc,
-       0x08000f40, 0x08000fd4, 0x08001018, 0x80080100, 0x80080080, 0x80080000,
-       0x00000000 };
-
-static struct fw_info bnx2_com_fw_09 = {
-       /* Firmware version: 4.6.15 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0xf,
-
-       .start_addr                     = 0x080000f8,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x4a7c,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_COM_b09FwText,
-       .gz_text_len                    = sizeof(bnx2_COM_b09FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_COM_b09FwData,
-
-       .sbss_addr                      = 0x08004ae0,
-       .sbss_len                       = 0x38,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08004b18,
-       .bss_len                        = 0xc0,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x08004a7c,
-       .rodata_len                     = 0x30,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_COM_b09FwRodata,
-};
-
-static u8 bnx2_CP_b09FwText[] = {
-       0xa5, 0xbc, 0x0d, 0x74, 0x1c, 0xe5, 0x95, 0x26, 0xfc, 0x54, 0x75, 0xb7,
-       0xd4, 0x92, 0x5a, 0x52, 0x49, 0x6e, 0x8b, 0x36, 0x68, 0x70, 0xb5, 0x55,
-       0x2d, 0x0b, 0x4b, 0x40, 0xb5, 0x24, 0x3b, 0xed, 0x6c, 0x83, 0x3b, 0xb6,
-       0x6c, 0x64, 0x63, 0x40, 0x36, 0x06, 0xc4, 0xb7, 0xfe, 0x3e, 0x7a, 0xfc,
-       0x03, 0x86, 0x38, 0x19, 0x91, 0xcd, 0xce, 0x0a, 0xd6, 0x59, 0x55, 0xe4,
-       0x3f, 0xd9, 0x6e, 0x75, 0x4b, 0x42, 0xfe, 0xe1, 0xec, 0x9c, 0xa5, 0x2d,
-       0xcb, 0x96, 0x21, 0xad, 0x16, 0x24, 0x6c, 0xc6, 0x39, 0x27, 0x09, 0x1a,
-       0x63, 0x83, 0x0d, 0x18, 0xc8, 0x24, 0xf9, 0x86, 0xc9, 0xd9, 0x5d, 0x34,
-       0xc6, 0xfc, 0x19, 0x70, 0x1c, 0x92, 0xc9, 0x9a, 0x19, 0x4c, 0xed, 0x73,
-       0xab, 0xd5, 0xb6, 0xec, 0x30, 0xc9, 0xcc, 0x59, 0x9d, 0xd3, 0xa7, 0xab,
-       0xab, 0xde, 0x9f, 0xfb, 0xde, 0xf7, 0xde, 0xe7, 0x3e, 0xf7, 0x7d, 0xdf,
-       0x92, 0x0e, 0x14, 0x63, 0xf2, 0xaf, 0x94, 0x9f, 0x9b, 0x9a, 0x3b, 0xd6,
-       0xce, 0x0d, 0xdf, 0x34, 0x4f, 0x7e, 0xbb, 0xcb, 0x0b, 0xdc, 0xf8, 0xb2,
-       0xbf, 0x28, 0x22, 0x57, 0xdf, 0xd2, 0xbf, 0xb4, 0xe0, 0xbf, 0xf0, 0x17,
-       0x41, 0x50, 0xe1, 0x57, 0xfd, 0xe4, 0x4f, 0x17, 0xa0, 0xe5, 0xfb, 0x97,
-       0x0f, 0xbc, 0x6a, 0xd4, 0xb8, 0x77, 0xa1, 0x01, 0xaf, 0x2b, 0xba, 0xaa,
-       0x7d, 0xad, 0x01, 0xc4, 0x32, 0xf5, 0xfa, 0x22, 0x5c, 0xb4, 0x2d, 0xbf,
-       0x1b, 0x72, 0xff, 0xcf, 0xa2, 0x9f, 0x3f, 0xf5, 0x93, 0xaf, 0x04, 0xcf,
-       0xa7, 0x5d, 0xf0, 0x6a, 0x51, 0x0b, 0x5a, 0x2d, 0xbc, 0xd5, 0xac, 0xf3,
-       0x57, 0xb3, 0xb7, 0xa9, 0x28, 0xcb, 0xb7, 0x15, 0x0c, 0xa4, 0x11, 0xd4,
-       0x2c, 0x04, 0xeb, 0x2c, 0x20, 0xee, 0x8e, 0x22, 0x5e, 0x18, 0xf5, 0xa2,
-       0xc0, 0x28, 0x40, 0x5c, 0xeb, 0xd4, 0xb7, 0x34, 0x03, 0x0b, 0x13, 0x5e,
-       0xfd, 0x74, 0x06, 0x58, 0x9b, 0xf0, 0x62, 0xc2, 0xe5, 0xd3, 0xdf, 0xc9,
-       0x44, 0xca, 0x72, 0xfa, 0x88, 0xc1, 0x65, 0x20, 0xae, 0x46, 0xe5, 0x3e,
-       0xf4, 0x45, 0x19, 0xa9, 0x0b, 0x6c, 0x4b, 0x7d, 0x5b, 0x7f, 0x37, 0x11,
-       0xd4, 0xb6, 0xa1, 0x3e, 0x30, 0x84, 0x42, 0xc4, 0xfd, 0xc1, 0x3a, 0xe0,
-       0xf3, 0x8b, 0x3b, 0x53, 0x0a, 0x3c, 0xc6, 0x34, 0xb4, 0xec, 0x07, 0x76,
-       0xa4, 0x82, 0x31, 0x83, 0xc3, 0xeb, 0x19, 0x93, 0xba, 0x41, 0x2d, 0xcd,
-       0xe7, 0x5b, 0x52, 0xc0, 0xd6, 0xd4, 0x34, 0x6c, 0xeb, 0xb3, 0xf1, 0xa2,
-       0x59, 0xa3, 0x1d, 0x60, 0x0f, 0xdd, 0xce, 0xf3, 0x69, 0xb0, 0xd2, 0xf2,
-       0xfc, 0x03, 0xfb, 0x27, 0xb3, 0x35, 0x3c, 0x3b, 0xe6, 0xc7, 0x0b, 0x63,
-       0x15, 0xd8, 0xd1, 0x57, 0x81, 0xed, 0x7d, 0x75, 0x50, 0x0d, 0x1b, 0x75,
-       0xe1, 0x3a, 0x14, 0xcc, 0xb7, 0xf1, 0x8e, 0xd9, 0x80, 0xad, 0x6c, 0xf8,
-       0xcd, 0x86, 0x2a, 0xac, 0xd1, 0xaa, 0xb1, 0xc5, 0xf8, 0x0a, 0x72, 0x63,
-       0xfd, 0xfc, 0x62, 0x2a, 0x85, 0xb8, 0x27, 0xea, 0x56, 0x55, 0xe3, 0x56,
-       0x9c, 0xdb, 0x1d, 0xc5, 0x27, 0xbb, 0xb1, 0xba, 0x0c, 0xb6, 0x9d, 0x09,
-       0x87, 0xda, 0x36, 0x2a, 0x9a, 0xfe, 0x4c, 0x86, 0x02, 0xad, 0x74, 0xb3,
-       0x3d, 0xe8, 0x43, 0x99, 0xa9, 0x53, 0xc1, 0xfe, 0x52, 0xec, 0x37, 0x25,
-       0xb2, 0x04, 0xf0, 0x93, 0xd9, 0x7f, 0x41, 0x7b, 0xc8, 0x8d, 0x69, 0x6b,
-       0xea, 0x2d, 0xca, 0xa4, 0x53, 0x9e, 0x6a, 0xfc, 0x60, 0x2c, 0x80, 0xef,
-       0x53, 0xb6, 0xe7, 0xc6, 0x44, 0xc6, 0xe0, 0x3e, 0x0b, 0x15, 0x18, 0xee,
-       0xab, 0xc6, 0xb3, 0x46, 0x03, 0x9e, 0xa3, 0x8c, 0x9b, 0xcd, 0x3a, 0xac,
-       0x89, 0xdc, 0x4f, 0x79, 0x14, 0xac, 0x6c, 0xf8, 0xf3, 0x49, 0xb9, 0x82,
-       0x3a, 0x54, 0x15, 0xb1, 0xca, 0x60, 0x9d, 0xae, 0x4a, 0x9b, 0x97, 0xe5,
-       0xed, 0x4d, 0xc1, 0xf2, 0x46, 0x45, 0xe6, 0x5b, 0x91, 0xa1, 0xbc, 0xdf,
-       0xdb, 0x1d, 0x32, 0x37, 0xa8, 0x58, 0xee, 0xa3, 0xcc, 0x8f, 0x84, 0x43,
-       0x91, 0x39, 0x94, 0x79, 0x24, 0xa3, 0x72, 0x3c, 0x7e, 0xfd, 0x10, 0x65,
-       0x8f, 0xad, 0x54, 0x29, 0x3b, 0x65, 0x49, 0x51, 0x96, 0x14, 0x65, 0x49,
-       0x51, 0x16, 0x47, 0xee, 0x3a, 0xca, 0x9c, 0x9b, 0xa3, 0xa1, 0xcc, 0x04,
-       0xe5, 0x9d, 0x2a, 0x67, 0x35, 0x65, 0x47, 0xbc, 0x22, 0xfa, 0x6d, 0xbd,
-       0x26, 0x49, 0x7d, 0xa7, 0x6c, 0xfb, 0x4d, 0xd3, 0xb6, 0x3f, 0x35, 0x7d,
-       0xd4, 0x5f, 0x8a, 0x76, 0x90, 0x97, 0x67, 0xa6, 0x55, 0x10, 0x45, 0x0b,
-       0x4d, 0xd0, 0x3e, 0xde, 0x1c, 0x8a, 0x54, 0x2a, 0x2a, 0xdc, 0x86, 0xa6,
-       0xcf, 0xce, 0x06, 0x4d, 0xea, 0x47, 0x0f, 0x65, 0xa1, 0x1b, 0x59, 0xb6,
-       0x75, 0x45, 0xbf, 0x41, 0x6d, 0x1c, 0xd2, 0xaf, 0xce, 0xfe, 0x27, 0x26,
-       0xe7, 0x4e, 0xda, 0x0f, 0xb0, 0x4f, 0xe9, 0x5f, 0xda, 0xb6, 0xed, 0xdf,
-       0x98, 0x30, 0x34, 0x84, 0xac, 0x7e, 0xda, 0x9f, 0x2b, 0xaa, 0xe9, 0x1d,
-       0x19, 0x3e, 0xbf, 0xd4, 0x46, 0x6e, 0x3e, 0xd6, 0x64, 0xf4, 0xc9, 0x31,
-       0x04, 0x29, 0x82, 0xd8, 0x41, 0x20, 0xee, 0x8b, 0x6a, 0x22, 0x7b, 0xdb,
-       0xbe, 0xde, 0x2e, 0x7b, 0x86, 0x21, 0xba, 0x32, 0x3a, 0x67, 0xb8, 0x7c,
-       0x91, 0x73, 0x73, 0x1f, 0xb5, 0x4a, 0x9b, 0xc3, 0x28, 0x36, 0xe0, 0x2b,
-       0x32, 0xd0, 0x96, 0x1c, 0x2d, 0xb6, 0x4a, 0xa2, 0x3f, 0xbe, 0xbb, 0x77,
-       0xd4, 0x8b, 0xe2, 0x51, 0x03, 0x45, 0xa3, 0x4f, 0xbb, 0x51, 0xd6, 0x80,
-       0x5d, 0x63, 0x0f, 0xb9, 0x73, 0x63, 0x5b, 0x32, 0x39, 0x46, 0xc7, 0xf6,
-       0xbd, 0xef, 0x26, 0xce, 0xdb, 0x05, 0x46, 0xd1, 0x7d, 0xae, 0xa8, 0xa1,
-       0x1f, 0x02, 0xce, 0xaf, 0x69, 0x5e, 0x84, 0x6e, 0x4d, 0xc1, 0x4c, 0xe3,
-       0x95, 0x12, 0x94, 0x45, 0x60, 0x8d, 0x55, 0xc5, 0x0b, 0xa2, 0xfe, 0x38,
-       0xe7, 0x06, 0x2f, 0x27, 0xd2, 0xf0, 0xf4, 0xda, 0xb6, 0x94, 0x7d, 0x07,
-       0x77, 0xdf, 0xad, 0x46, 0x8f, 0xde, 0xec, 0x41, 0x0b, 0xcb, 0x63, 0xd3,
-       0x89, 0xe6, 0x4f, 0x15, 0x75, 0x77, 0x1b, 0xac, 0x11, 0x17, 0x62, 0x5a,
-       0x9c, 0xdf, 0xd7, 0x5f, 0xbf, 0x3c, 0xd2, 0x86, 0xc4, 0xc8, 0x05, 0xde,
-       0x77, 0xf3, 0x5e, 0x04, 0xc9, 0xd4, 0xf5, 0xd7, 0xdf, 0x11, 0x89, 0xa3,
-       0x77, 0x44, 0xae, 0xdd, 0x18, 0xaf, 0x88, 0x63, 0xfb, 0x5e, 0x1d, 0xe5,
-       0x46, 0x1b, 0x52, 0x23, 0x72, 0x6d, 0xdb, 0x67, 0xcc, 0xef, 0x62, 0x5f,
-       0x03, 0xfd, 0xff, 0x9a, 0x36, 0x6c, 0xdb, 0x6b, 0xa1, 0xd0, 0xb0, 0xa8,
-       0x7b, 0xc5, 0xfd, 0xf7, 0x0d, 0x0a, 0xf4, 0xbb, 0xe1, 0x2e, 0x30, 0x44,
-       0x6f, 0x11, 0xf7, 0xfa, 0x44, 0x54, 0x9b, 0x69, 0xd8, 0xf6, 0x90, 0x39,
-       0x07, 0x0f, 0xb4, 0xad, 0x81, 0x75, 0xc0, 0x07, 0x6b, 0x95, 0x7c, 0xb7,
-       0x51, 0x87, 0x6b, 0xd0, 0x7d, 0x60, 0x0d, 0x7a, 0x9e, 0xa0, 0xe3, 0x56,
-       0x68, 0xce, 0x3c, 0xfd, 0x64, 0xb6, 0xc8, 0x24, 0xf2, 0xb5, 0xf3, 0x23,
-       0xba, 0xfd, 0x4b, 0x7e, 0x4b, 0x99, 0x0b, 0x36, 0xa6, 0x5f, 0x2e, 0xb3,
-       0x9d, 0x65, 0xb6, 0x5d, 0x51, 0x26, 0x82, 0xa7, 0xc6, 0x44, 0x17, 0xa2,
-       0xb2, 0x3f, 0xa5, 0x8b, 0x9f, 0xda, 0xdd, 0x7e, 0xd1, 0x85, 0xd5, 0xee,
-       0x41, 0xb0, 0xed, 0x41, 0xc5, 0x8d, 0xa5, 0xbd, 0x60, 0x1d, 0x3a, 0x41,
-       0x71, 0x30, 0x56, 0xab, 0x44, 0x51, 0xdc, 0xab, 0x60, 0x69, 0xb8, 0x08,
-       0x7a, 0x85, 0xb4, 0xf7, 0x4b, 0xdb, 0xd2, 0x44, 0xde, 0x13, 0x28, 0xe1,
-       0xfd, 0x75, 0xe1, 0x9f, 0x13, 0xcf, 0x44, 0xa6, 0x30, 0xcb, 0xaf, 0xe0,
-       0xfd, 0x37, 0xa6, 0xfc, 0x96, 0x72, 0xb6, 0xbd, 0x99, 0x3e, 0xdf, 0x43,
-       0x1b, 0xdf, 0x9e, 0x8a, 0x05, 0xa9, 0x25, 0xcb, 0x13, 0xe5, 0xfd, 0x68,
-       0xa8, 0xb5, 0x1b, 0xd2, 0x0f, 0x94, 0xe2, 0x28, 0xdc, 0x99, 0xe6, 0x09,
-       0xef, 0xa9, 0x84, 0xd1, 0xfe, 0x8c, 0xe2, 0xa1, 0xb1, 0x4b, 0x3f, 0x13,
-       0xde, 0x37, 0x12, 0x0a, 0xde, 0x37, 0x42, 0x1d, 0x67, 0x95, 0x09, 0xef,
-       0xeb, 0x19, 0x0d, 0x33, 0x7a, 0x83, 0xed, 0x96, 0x12, 0xc1, 0x8f, 0x32,
-       0x7e, 0x04, 0x7a, 0xa3, 0x38, 0x92, 0x31, 0xf1, 0xf4, 0x15, 0x38, 0xf0,
-       0xa5, 0x7f, 0x96, 0x8b, 0x63, 0x5f, 0x97, 0xd0, 0xd1, 0x6d, 0x5e, 0xb4,
-       0x63, 0x1a, 0xe2, 0xe5, 0xd1, 0x09, 0xef, 0x27, 0xbd, 0x50, 0xca, 0xa2,
-       0x46, 0x20, 0xab, 0xfc, 0x83, 0x1d, 0xf7, 0x4b, 0x31, 0xca, 0xe7, 0x60,
-       0x59, 0x94, 0x76, 0x47, 0x8c, 0x4a, 0x9d, 0xb7, 0x4b, 0x68, 0xb3, 0x05,
-       0xd1, 0x6b, 0x31, 0x32, 0x68, 0xe0, 0xe9, 0x84, 0x6d, 0x7f, 0x6c, 0x8e,
-       0x47, 0x7c, 0x30, 0xda, 0x3e, 0x42, 0x30, 0x36, 0x87, 0x7a, 0x39, 0x91,
-       0x31, 0x30, 0x9c, 0x88, 0xe2, 0xc5, 0x44, 0x8d, 0xb6, 0x19, 0x4d, 0x88,
-       0x05, 0x72, 0x31, 0x64, 0x94, 0x72, 0x0f, 0x85, 0xda, 0x50, 0x1e, 0x8d,
-       0xe0, 0x28, 0xe5, 0x3e, 0x37, 0x57, 0xda, 0x31, 0xf1, 0xfa, 0xbf, 0x42,
-       0x56, 0xe2, 0x3b, 0x9e, 0xa4, 0xac, 0x91, 0xa6, 0x8b, 0x36, 0xa6, 0x79,
-       0x71, 0xda, 0xbc, 0x86, 0x76, 0x08, 0xab, 0x28, 0xea, 0x75, 0xf7, 0x24,
-       0x34, 0x1c, 0xce, 0xf8, 0xdc, 0x9b, 0x13, 0x7e, 0x1c, 0xa0, 0xbf, 0xcd,
-       0x88, 0xc2, 0x0a, 0xb0, 0xdd, 0x19, 0xc4, 0xb5, 0xec, 0x60, 0x35, 0xc6,
-       0x06, 0x83, 0xe6, 0x1b, 0x4a, 0x00, 0x87, 0x86, 0xaf, 0xc5, 0xe8, 0xa0,
-       0x82, 0x91, 0x10, 0x65, 0xe7, 0xf5, 0xf7, 0x06, 0xaf, 0x47, 0x66, 0xd0,
-       0x85, 0x5d, 0x8e, 0x5e, 0x1d, 0x9c, 0x99, 0xfc, 0xbe, 0x16, 0xe9, 0x61,
-       0xb8, 0xe7, 0xf4, 0x6a, 0x78, 0x26, 0xe3, 0x76, 0x1b, 0xbd, 0x7e, 0x0c,
-       0x67, 0x7e, 0xca, 0x79, 0x93, 0xb6, 0x75, 0x0c, 0x25, 0x0e, 0x39, 0x73,
-       0x58, 0x1e, 0x65, 0x63, 0xb9, 0xf8, 0xca, 0x58, 0xa6, 0x33, 0xce, 0x34,
-       0x13, 0x87, 0xc4, 0xc7, 0xbd, 0xc4, 0x20, 0xf1, 0xf1, 0xb7, 0x14, 0x94,
-       0x35, 0x63, 0xf3, 0x58, 0xfe, 0xb9, 0x42, 0xfb, 0x77, 0x63, 0x9d, 0xd6,
-       0x80, 0x44, 0x4a, 0xec, 0x34, 0x8f, 0xcb, 0x72, 0x2d, 0xf3, 0x5f, 0x0c,
-       0xeb, 0x60, 0x31, 0x76, 0xd1, 0xc7, 0x76, 0xee, 0x96, 0xfb, 0xb6, 0xfd,
-       0x50, 0xb8, 0x9c, 0x36, 0x86, 0xc5, 0x45, 0x08, 0x99, 0x1f, 0x38, 0xb2,
-       0x59, 0x38, 0x94, 0x91, 0x18, 0xaa, 0x33, 0xbe, 0x9d, 0x60, 0x5f, 0xcd,
-       0xec, 0xc7, 0xc4, 0x4f, 0x39, 0x37, 0x7f, 0x3d, 0x56, 0x87, 0x1f, 0x8e,
-       0x19, 0xf8, 0xef, 0x63, 0x3a, 0x9e, 0xbf, 0x02, 0xd7, 0xef, 0xa6, 0xae,
-       0x04, 0xc3, 0x1a, 0xb0, 0x25, 0x55, 0x80, 0x6d, 0x83, 0xc5, 0xd8, 0x3c,
-       0x58, 0x53, 0xf7, 0x22, 0xf1, 0xf8, 0x87, 0xe6, 0x1d, 0x18, 0xaf, 0x6c,
-       0x76, 0x7c, 0x66, 0x07, 0xef, 0xef, 0x1c, 0xac, 0xe1, 0x1c, 0xda, 0xb6,
-       0x1a, 0xae, 0x8f, 0x1c, 0x25, 0xbe, 0x4f, 0xf8, 0x83, 0xfa, 0xb8, 0x1a,
-       0xd4, 0x63, 0xf0, 0x20, 0xd1, 0xa0, 0xc2, 0x9a, 0x1e, 0x4c, 0xd3, 0x8b,
-       0xe1, 0x37, 0x1e, 0xe2, 0xd8, 0x82, 0xba, 0xa5, 0x36, 0xd0, 0x7e, 0x19,
-       0x33, 0x54, 0x93, 0xf8, 0x52, 0x8c, 0x4f, 0x06, 0x83, 0x3d, 0x96, 0xba,
-       0x02, 0x56, 0xa5, 0x6d, 0x7f, 0x3f, 0x8c, 0x8e, 0x6b, 0xa2, 0x88, 0x4d,
-       0x67, 0x2c, 0xb8, 0x3e, 0x1a, 0x05, 0xe3, 0x18, 0xce, 0xf5, 0x1a, 0x81,
-       0xbf, 0x53, 0xee, 0xc6, 0x7f, 0x6c, 0x0b, 0xea, 0xba, 0x5a, 0x6f, 0x1d,
-       0x50, 0x49, 0x36, 0xaa, 0xa0, 0x07, 0xa2, 0xcb, 0xd0, 0xe9, 0xf0, 0x04,
-       0x05, 0x9a, 0x61, 0x62, 0x73, 0x8a, 0x95, 0xfc, 0x35, 0xed, 0xfd, 0x6a,
-       0xcd, 0x05, 0x53, 0x0d, 0x9e, 0x68, 0x53, 0x89, 0xb7, 0x4d, 0xe7, 0x6c,
-       0xbd, 0xca, 0xb6, 0x1b, 0x9b, 0xa4, 0x4f, 0x1d, 0x95, 0x9c, 0xe7, 0x0a,
-       0xce, 0x73, 0x63, 0xb6, 0x18, 0x67, 0x07, 0x61, 0x5d, 0x13, 0x0d, 0xb6,
-       0x3e, 0xa2, 0x16, 0xe3, 0xc3, 0xe1, 0x62, 0xbc, 0x33, 0xe8, 0xc6, 0x07,
-       0x83, 0xb6, 0xbd, 0xde, 0x2c, 0x47, 0x41, 0x18, 0xd3, 0x0b, 0x10, 0x3a,
-       0x3f, 0x04, 0x0b, 0x5f, 0xb0, 0xec, 0xef, 0x06, 0x03, 0xf8, 0xc7, 0xc1,
-       0xaf, 0xe2, 0xf9, 0xca, 0xd8, 0xc9, 0x69, 0x8c, 0x91, 0x17, 0x68, 0x3f,
-       0xe7, 0x12, 0xc1, 0xf6, 0x19, 0xae, 0x60, 0x27, 0x79, 0xcb, 0x86, 0xc7,
-       0x94, 0x60, 0xfc, 0x0d, 0x25, 0xa8, 0xf7, 0x2a, 0x7e, 0x7c, 0x44, 0x3b,
-       0x3d, 0x93, 0xa9, 0x89, 0xfc, 0x9c, 0xfd, 0xff, 0xde, 0xfc, 0xa1, 0x3d,
-       0x5e, 0x25, 0x3a, 0x14, 0x7d, 0x51, 0xe7, 0x29, 0xea, 0x9c, 0xfe, 0xfb,
-       0xc3, 0x14, 0x75, 0x4e, 0x79, 0x9e, 0xff, 0x83, 0xf8, 0x25, 0xf3, 0x15,
-       0xe1, 0x3c, 0x5e, 0x87, 0xff, 0xe2, 0x8c, 0xed, 0xa4, 0xfd, 0x9f, 0xfc,
-       0x32, 0xbe, 0xcf, 0xfd, 0x39, 0x0c, 0x92, 0x71, 0x9e, 0xb0, 0xe3, 0x9a,
-       0x8c, 0x51, 0xc6, 0xea, 0xe8, 0x52, 0xef, 0x50, 0x1e, 0x55, 0x51, 0x6c,
-       0xdb, 0x4f, 0x98, 0x93, 0xcf, 0xfd, 0xf9, 0xb1, 0x7e, 0x95, 0xf7, 0x65,
-       0xbc, 0x67, 0x5d, 0xa2, 0x7b, 0x5d, 0xbd, 0x89, 0xbf, 0x83, 0x56, 0x0c,
-       0xa7, 0x0b, 0xf9, 0xbb, 0x2e, 0x76, 0xe9, 0xf7, 0x93, 0xa5, 0x57, 0x3e,
-       0xa7, 0x9d, 0x3a, 0xfd, 0xdd, 0xcd, 0xdf, 0x32, 0x96, 0x37, 0x69, 0x37,
-       0x5f, 0x66, 0x27, 0x62, 0x23, 0x75, 0xb4, 0xa7, 0x33, 0x12, 0x57, 0x2c,
-       0x7f, 0xd4, 0x6b, 0xa9, 0x51, 0xe8, 0x74, 0x7d, 0xaf, 0x12, 0xed, 0x80,
-       0x9e, 0xb1, 0x70, 0x4f, 0xb3, 0x0b, 0xdf, 0x6a, 0x56, 0x30, 0xcd, 0xe8,
-       0x40, 0xdf, 0x3c, 0xcb, 0xae, 0x30, 0xf6, 0xab, 0xe2, 0x03, 0x05, 0x49,
-       0x58, 0xf4, 0x3b, 0x44, 0xc8, 0x95, 0xca, 0xff, 0x9d, 0x82, 0xd3, 0xe1,
-       0x10, 0x6d, 0x6e, 0x0b, 0x39, 0x15, 0x50, 0x98, 0x84, 0xb7, 0x94, 0xf3,
-       0x3f, 0xda, 0x0b, 0x6f, 0x31, 0x7d, 0x7f, 0x59, 0x6f, 0x4d, 0xc7, 0x7b,
-       0xc4, 0x8a, 0xac, 0x12, 0x6c, 0xa7, 0xbe, 0xcd, 0x32, 0x25, 0xd8, 0x7a,
-       0x3b, 0xf5, 0x5d, 0xab, 0x48, 0x3f, 0x51, 0xd4, 0x65, 0xb6, 0x10, 0x73,
-       0xe4, 0x3a, 0x02, 0x23, 0xf3, 0xab, 0x49, 0xd9, 0xe1, 0xf5, 0x50, 0x86,
-       0x83, 0x89, 0x77, 0xed, 0xb4, 0x16, 0xd4, 0xd3, 0xce, 0xef, 0x0d, 0xfc,
-       0x0d, 0x6f, 0x41, 0x74, 0x23, 0x5e, 0x4a, 0x3c, 0xe5, 0xcf, 0x97, 0xcb,
-       0xc9, 0x7a, 0xb5, 0x3c, 0xff, 0xd3, 0x8e, 0xf9, 0x73, 0xf2, 0xf8, 0x92,
-       0x5b, 0x40, 0x8e, 0xe2, 0x2d, 0x64, 0x5f, 0xef, 0x3b, 0xf5, 0x23, 0xac,
-       0x5f, 0xd3, 0xde, 0xab, 0x04, 0xeb, 0x3e, 0x42, 0xbd, 0xfe, 0x3d, 0x04,
-       0x5b, 0x8f, 0x92, 0x5b, 0x1a, 0x93, 0xf2, 0x84, 0x32, 0x0e, 0x9f, 0x71,
-       0xe4, 0x99, 0x95, 0x81, 0xe2, 0xea, 0x85, 0x6f, 0xa6, 0x51, 0x8b, 0x2e,
-       0x67, 0x4e, 0xa1, 0x04, 0x7a, 0x75, 0x94, 0x91, 0xbf, 0x04, 0x46, 0x81,
-       0xb1, 0x01, 0x72, 0xb9, 0x70, 0x0d, 0xbe, 0xc9, 0x58, 0x30, 0x83, 0x65,
-       0x1e, 0xd3, 0x2e, 0xe1, 0x97, 0xd2, 0x93, 0x20, 0xc0, 0x4c, 0xcf, 0xf1,
-       0xb2, 0xf8, 0xbd, 0x88, 0xc9, 0xbd, 0x27, 0x13, 0x50, 0x52, 0x89, 0xe0,
-       0x3e, 0xc0, 0x18, 0x0f, 0xbb, 0x62, 0x0f, 0x07, 0xd0, 0x85, 0x73, 0xe1,
-       0x50, 0x3c, 0xab, 0x84, 0xda, 0x07, 0x14, 0xd3, 0xbb, 0x8b, 0xfd, 0x6d,
-       0x67, 0x99, 0x1d, 0xfc, 0x9c, 0x35, 0x0c, 0x73, 0x85, 0x12, 0xbb, 0xa1,
-       0x80, 0x65, 0x6a, 0xc2, 0x21, 0xf2, 0xcc, 0xd0, 0x85, 0x95, 0x30, 0xbd,
-       0x4f, 0x65, 0xa4, 0xad, 0x88, 0xb2, 0x25, 0xfb, 0xa4, 0x9a, 0xc3, 0xa3,
-       0xdf, 0x4f, 0xea, 0xec, 0x1d, 0xf9, 0xed, 0xf4, 0xed, 0xee, 0xfd, 0xaf,
-       0x85, 0x7f, 0x78, 0xef, 0xaf, 0xa7, 0x5d, 0x79, 0xaf, 0x5e, 0x1b, 0xa6,
-       0xff, 0xb9, 0x8c, 0x22, 0xce, 0x9d, 0xf0, 0xa3, 0x58, 0x9d, 0x07, 0x72,
-       0xcf, 0x85, 0xb4, 0x3b, 0x16, 0x70, 0xe1, 0x73, 0x3b, 0xb6, 0x4a, 0xee,
-       0x15, 0x23, 0xde, 0x56, 0x1f, 0x70, 0xa3, 0x3e, 0xb2, 0x95, 0x58, 0x30,
-       0xb1, 0x6a, 0x21, 0x9f, 0x85, 0xcc, 0x17, 0x51, 0xa3, 0x6f, 0x85, 0x5c,
-       0x7f, 0x46, 0x9b, 0x5d, 0x28, 0x75, 0x59, 0x26, 0xc7, 0x7d, 0x04, 0x6b,
-       0xb6, 0x98, 0x36, 0x5e, 0x22, 0x4c, 0x14, 0x46, 0x8f, 0x28, 0xa7, 0x13,
-       0x5f, 0xd8, 0x31, 0x37, 0x96, 0xd3, 0x2f, 0x4d, 0xea, 0x59, 0xf7, 0x46,
-       0x43, 0xfa, 0x09, 0x66, 0x0a, 0xae, 0xa8, 0xa5, 0x4c, 0x64, 0xb6, 0x28,
-       0xef, 0x66, 0x7a, 0x94, 0x33, 0x19, 0xa9, 0x7b, 0x44, 0x79, 0x27, 0x23,
-       0xf1, 0xb0, 0x5a, 0x3f, 0x4e, 0x7e, 0x43, 0x4e, 0xa5, 0x6e, 0x36, 0xa1,
-       0x6c, 0x33, 0xcb, 0xc8, 0xf3, 0x8d, 0xba, 0x21, 0xca, 0x7b, 0xb0, 0x19,
-       0xe6, 0x76, 0xd3, 0x83, 0x09, 0x0d, 0xbe, 0xcd, 0xa6, 0x5b, 0x7e, 0x33,
-       0x1f, 0x90, 0xba, 0xd5, 0xfa, 0xd6, 0xcc, 0x45, 0xfa, 0x57, 0xee, 0xf7,
-       0xc1, 0xe6, 0xfc, 0xbd, 0xdf, 0xda, 0xe3, 0xab, 0x54, 0xfe, 0xfe, 0x77,
-       0x2e, 0x0e, 0x85, 0x75, 0xa7, 0xf2, 0x73, 0xe1, 0x52, 0x2a, 0xf9, 0x63,
-       0x05, 0x2c, 0x2d, 0x68, 0xa5, 0x99, 0x0e, 0x6d, 0x4e, 0x35, 0xd2, 0xdf,
-       0x02, 0x8c, 0x95, 0x51, 0xe2, 0x3b, 0x79, 0x2f, 0xfb, 0x2c, 0x30, 0x7c,
-       0x58, 0x9c, 0xa8, 0x71, 0xe5, 0xf4, 0xa7, 0x12, 0xc3, 0x5c, 0x8c, 0xe9,
-       0xc2, 0xf1, 0xae, 0xe6, 0xdc, 0xd5, 0xfa, 0x07, 0x94, 0xbb, 0xc8, 0x30,
-       0xea, 0x8a, 0x94, 0x6a, 0xfd, 0xdd, 0x4c, 0x94, 0x3e, 0xde, 0xce, 0x7e,
-       0x7d, 0x78, 0x37, 0x51, 0xc6, 0x1c, 0x24, 0x18, 0xb3, 0xd8, 0xe0, 0x92,
-       0xe6, 0x00, 0xc8, 0xf9, 0xa6, 0xfc, 0xb5, 0x81, 0xf1, 0x5f, 0x62, 0xb4,
-       0x7a, 0xdb, 0xdc, 0x08, 0x36, 0x64, 0xe0, 0x5e, 0xd7, 0x1c, 0xc5, 0x7a,
-       0xc6, 0xf6, 0x87, 0x18, 0x2f, 0x37, 0x32, 0x16, 0xee, 0x0a, 0x73, 0x6c,
-       0x15, 0xb6, 0x5d, 0x68, 0x74, 0x49, 0x3e, 0x83, 0x5e, 0xc6, 0xe2, 0xb5,
-       0x8c, 0x2f, 0x5b, 0x78, 0x7d, 0x2a, 0xf3, 0xcf, 0xf6, 0x43, 0xcc, 0xa7,
-       0x5e, 0xba, 0xa2, 0x4d, 0xa8, 0xc3, 0x46, 0x7d, 0xdd, 0x56, 0xc6, 0x62,
-       0xb6, 0x6b, 0x95, 0x45, 0x6d, 0xfb, 0x86, 0x50, 0x30, 0xe6, 0x51, 0x4c,
-       0xbc, 0x38, 0x3a, 0x61, 0xeb, 0xd3, 0x25, 0x97, 0xca, 0xc7, 0x41, 0x19,
-       0xab, 0xe4, 0x08, 0x82, 0x0f, 0x92, 0x27, 0x4c, 0xc5, 0x08, 0x15, 0x4b,
-       0x06, 0x25, 0x4f, 0x08, 0x60, 0x65, 0xe2, 0xbb, 0x78, 0xb1, 0xc1, 0x8d,
-       0x56, 0xe6, 0x58, 0xb7, 0x25, 0x7c, 0x58, 0x41, 0x2c, 0x5d, 0x9a, 0x60,
-       0xee, 0xa4, 0xf9, 0xb1, 0x2c, 0xe1, 0xc6, 0xb1, 0x06, 0xe6, 0x40, 0xfe,
-       0x42, 0x7c, 0x64, 0xba, 0x70, 0xdc, 0xd4, 0x90, 0x76, 0xfc, 0x61, 0x17,
-       0x31, 0x90, 0x7a, 0x54, 0x25, 0x77, 0x10, 0x1d, 0xba, 0xa8, 0x4f, 0x15,
-       0xf1, 0x4b, 0x3a, 0xfc, 0xb2, 0x5c, 0x40, 0xe4, 0x92, 0x7c, 0xe0, 0x37,
-       0x76, 0x7c, 0xba, 0xd4, 0x87, 0xe5, 0x8b, 0xca, 0x38, 0x84, 0xdf, 0x12,
-       0x27, 0x47, 0x4d, 0x72, 0xbb, 0xa9, 0x43, 0x3d, 0x4f, 0x6e, 0x5d, 0x8e,
-       0xb7, 0x0c, 0xe1, 0xd6, 0x6f, 0x42, 0xa3, 0xef, 0xf6, 0x8c, 0x86, 0x3a,
-       0xce, 0x2b, 0x2e, 0x9c, 0x32, 0xca, 0xc8, 0xfb, 0x38, 0x0f, 0xa3, 0x70,
-       0x6f, 0x9d, 0x6b, 0x22, 0x39, 0xda, 0x1d, 0x29, 0xe5, 0x78, 0xdd, 0x73,
-       0x73, 0x9c, 0xe8, 0xeb, 0xd4, 0xed, 0x9a, 0xb0, 0xc3, 0x89, 0x72, 0x7c,
-       0x40, 0xb3, 0xed, 0x77, 0x0c, 0xd1, 0x33, 0x70, 0x78, 0x52, 0xc7, 0x07,
-       0x79, 0xdd, 0x33, 0xa9, 0xe3, 0x2d, 0x6c, 0x8f, 0xfe, 0x87, 0x6d, 0x57,
-       0xf0, 0x18, 0x1d, 0xcc, 0x29, 0xc9, 0x6f, 0x88, 0xc3, 0xc4, 0x95, 0x18,
-       0x75, 0xfc, 0x72, 0x66, 0x83, 0xe0, 0x36, 0xa7, 0xbb, 0xd1, 0xc1, 0xef,
-       0x98, 0x7a, 0x98, 0x76, 0x20, 0x7a, 0x78, 0x6b, 0x32, 0xb7, 0xb1, 0xed,
-       0x01, 0x53, 0x74, 0x9c, 0xcf, 0xcb, 0x44, 0xd7, 0x37, 0x4a, 0x8e, 0xd5,
-       0x03, 0x7c, 0xc1, 0xb2, 0x2e, 0xe2, 0xee, 0x42, 0xfc, 0xa0, 0x4d, 0x6c,
-       0xa7, 0xd4, 0x89, 0x95, 0xf3, 0x6b, 0x6d, 0x3b, 0xdc, 0xa4, 0xe3, 0x82,
-       0x51, 0x1f, 0x69, 0x54, 0x67, 0x51, 0xd6, 0x28, 0xf6, 0x91, 0x0f, 0x74,
-       0xa7, 0x66, 0x22, 0xe6, 0x17, 0x5b, 0x43, 0x47, 0x41, 0x0e, 0xc3, 0x71,
-       0x26, 0x61, 0xd4, 0x6d, 0xc3, 0x0c, 0x1c, 0xf0, 0xb7, 0x90, 0xc7, 0xa9,
-       0x2d, 0x4c, 0xff, 0xc9, 0x9f, 0x0c, 0x6b, 0x07, 0xce, 0xda, 0x69, 0xbf,
-       0xcd, 0x38, 0x49, 0x18, 0xa0, 0x2e, 0x5f, 0xd1, 0x5c, 0x78, 0xb5, 0xee,
-       0x9a, 0x49, 0xbe, 0x29, 0x9c, 0xe5, 0x3d, 0xfb, 0x98, 0x5f, 0xfa, 0x62,
-       0x9e, 0xa7, 0x2e, 0x73, 0x49, 0x1e, 0xe8, 0x36, 0xa4, 0x6d, 0xe6, 0x0b,
-       0x63, 0x57, 0xcb, 0x30, 0x61, 0x4f, 0xf8, 0x45, 0x86, 0xa0, 0xa6, 0xab,
-       0x7f, 0x6c, 0x1e, 0xaf, 0xc3, 0xcf, 0x35, 0x37, 0x7c, 0xe4, 0xc5, 0xaf,
-       0xf9, 0x73, 0x6d, 0xf4, 0x9a, 0xe3, 0x33, 0x4a, 0x1d, 0xac, 0x3c, 0xa2,
-       0x24, 0x89, 0x0f, 0xe3, 0x1e, 0x68, 0xe5, 0x51, 0xb7, 0xae, 0x11, 0x13,
-       0x36, 0x13, 0x13, 0x2c, 0x62, 0x42, 0x5f, 0xe6, 0x88, 0x92, 0xca, 0x7c,
-       0x46, 0x5d, 0x48, 0x1d, 0xb1, 0x9d, 0x2d, 0x94, 0xe5, 0x27, 0x36, 0xaa,
-       0x44, 0x9e, 0x0b, 0xbc, 0xdf, 0x42, 0x1e, 0x92, 0x97, 0x53, 0x7c, 0x95,
-       0x10, 0x54, 0x2c, 0xcf, 0x52, 0xb9, 0xdf, 0xaa, 0x5c, 0xcf, 0x70, 0x4b,
-       0xb9, 0xee, 0xb1, 0xa3, 0x4b, 0xdd, 0x58, 0x80, 0xd9, 0xe1, 0x85, 0x8b,
-       0x44, 0x17, 0x6a, 0x34, 0xa6, 0x7b, 0x61, 0x55, 0xb9, 0x88, 0xe5, 0xef,
-       0x35, 0x34, 0x60, 0x11, 0x73, 0xce, 0xb3, 0x04, 0xa7, 0x6e, 0xc3, 0x85,
-       0x71, 0xea, 0xe7, 0x69, 0x53, 0xd6, 0x1b, 0x6c, 0xdc, 0x16, 0xb6, 0xe2,
-       0xf4, 0x78, 0xab, 0x94, 0xb6, 0x57, 0x6c, 0x08, 0x4f, 0x28, 0x43, 0x49,
-       0xd4, 0x5d, 0x77, 0x16, 0x41, 0x73, 0x17, 0x79, 0x92, 0x5e, 0x31, 0x3b,
-       0xe2, 0xa1, 0xe6, 0x5e, 0x4f, 0x84, 0x22, 0xc7, 0x95, 0x9c, 0x3f, 0xbd,
-       0x4c, 0xdb, 0x78, 0x2b, 0x61, 0x74, 0x16, 0xba, 0x72, 0xbf, 0xdf, 0x70,
-       0xf2, 0xd9, 0xbc, 0x3f, 0x05, 0x26, 0x71, 0xc7, 0xeb, 0x3d, 0x93, 0xc0,
-       0x79, 0xb5, 0x59, 0xf2, 0x5a, 0x9c, 0xdf, 0x6c, 0x8e, 0x2b, 0x1e, 0xa3,
-       0x8c, 0xfa, 0x10, 0x2c, 0x2e, 0x20, 0xa7, 0x14, 0xee, 0xe0, 0xf5, 0x9e,
-       0x65, 0x19, 0x72, 0xc2, 0x89, 0xba, 0xf9, 0xf5, 0x11, 0x2f, 0x62, 0x56,
-       0x21, 0xfd, 0xba, 0x34, 0xea, 0xf7, 0xde, 0x98, 0xb5, 0xaa, 0x7c, 0xf4,
-       0x8b, 0x12, 0xe6, 0xbb, 0xb3, 0x93, 0x0b, 0xcb, 0x24, 0x57, 0xdc, 0x38,
-       0xca, 0x91, 0x55, 0xf6, 0x57, 0xa9, 0x51, 0x59, 0xc3, 0xd0, 0xe0, 0xa9,
-       0xdc, 0x78, 0x8b, 0x1a, 0x9d, 0x40, 0x7b, 0xb3, 0xb7, 0x25, 0x92, 0x85,
-       0xb7, 0x22, 0xba, 0x09, 0xe1, 0xa4, 0xe4, 0xad, 0x82, 0xb1, 0xb1, 0xad,
-       0x44, 0xbd, 0xaa, 0xf2, 0x79, 0xf9, 0xb9, 0x82, 0x5a, 0x16, 0x95, 0xfc,
-       0x55, 0x6f, 0x79, 0xc3, 0xc1, 0x62, 0x8d, 0xf9, 0xc6, 0xaf, 0x02, 0xff,
-       0x77, 0xf5, 0x5b, 0xdd, 0x32, 0x77, 0x1e, 0x43, 0xbe, 0x65, 0xdd, 0x00,
-       0x6e, 0x95, 0x58, 0xda, 0x3d, 0xe2, 0x66, 0x7e, 0x26, 0xf3, 0x25, 0xf1,
-       0xf8, 0xc8, 0xbd, 0x2f, 0xd1, 0xdf, 0x3c, 0xd4, 0xfd, 0x0e, 0xc3, 0x62,
-       0x98, 0xb0, 0x6d, 0x23, 0x1c, 0x0c, 0x14, 0x28, 0x3a, 0xb6, 0x37, 0xfc,
-       0x13, 0xed, 0x0b, 0xc4, 0x41, 0x90, 0x98, 0x97, 0x61, 0xcb, 0x48, 0xc1,
-       0x94, 0x7a, 0x91, 0xfb, 0xf2, 0xf5, 0x7a, 0x0d, 0x2b, 0x2e, 0xf5, 0x86,
-       0xc3, 0xc1, 0xf6, 0x6d, 0xac, 0xb7, 0x93, 0xf5, 0x62, 0x8c, 0xbd, 0xeb,
-       0x47, 0x35, 0x27, 0x1f, 0xb4, 0x46, 0x8a, 0xa7, 0xf6, 0x77, 0xa9, 0xde,
-       0x93, 0x86, 0x35, 0xee, 0xf4, 0xd7, 0x14, 0xec, 0x2c, 0x70, 0xb9, 0x91,
-       0x64, 0xbd, 0x71, 0xd6, 0x7b, 0x77, 0x54, 0xd6, 0x33, 0x70, 0xcb, 0x48,
-       0x22, 0x35, 0xe1, 0x32, 0x0c, 0xed, 0x1d, 0xc4, 0x88, 0xd9, 0xce, 0x5c,
-       0xde, 0x72, 0x28, 0xd3, 0x85, 0xed, 0xc6, 0xd1, 0x70, 0x21, 0xeb, 0x1d,
-       0x37, 0x8e, 0x06, 0x3c, 0xf4, 0x99, 0x75, 0x6c, 0xaf, 0x9b, 0x79, 0x91,
-       0x4a, 0x8c, 0xdc, 0x32, 0x22, 0xdc, 0xc1, 0xc4, 0x6c, 0xe6, 0x67, 0x8e,
-       0x6d, 0xca, 0xda, 0x09, 0x64, 0x4e, 0x65, 0x7c, 0xc1, 0xba, 0x11, 0x67,
-       0x7c, 0xca, 0x35, 0x87, 0x25, 0x57, 0xae, 0xb0, 0xb0, 0xb9, 0x41, 0xe2,
-       0xa7, 0x42, 0xec, 0x0e, 0xd6, 0x8d, 0x33, 0x9e, 0x6c, 0x1b, 0xfb, 0x33,
-       0x8c, 0x6b, 0x95, 0xcc, 0x65, 0x6d, 0xfb, 0x15, 0x63, 0x61, 0x05, 0x43,
-       0xbc, 0xd7, 0x4b, 0x99, 0xbd, 0xa1, 0x62, 0x89, 0xd3, 0x4e, 0x5b, 0x31,
-       0x08, 0x3e, 0x29, 0x48, 0x1a, 0xd6, 0x06, 0x91, 0xff, 0x58, 0x38, 0x18,
-       0x3f, 0xac, 0xd4, 0xb7, 0x6f, 0xc3, 0x3f, 0x11, 0x2f, 0x41, 0xac, 0x9b,
-       0x89, 0x21, 0x93, 0xd6, 0xd2, 0x66, 0x31, 0x42, 0x4a, 0x8c, 0x77, 0x9f,
-       0x58, 0xc4, 0x08, 0xe7, 0x46, 0xb0, 0xb3, 0x95, 0xe5, 0x23, 0xb9, 0x75,
-       0x16, 0x5c, 0x18, 0x0d, 0x32, 0x0e, 0x8b, 0x2e, 0x80, 0xad, 0x99, 0x7c,
-       0x2c, 0xb0, 0xed, 0x83, 0xa6, 0x6d, 0xbf, 0x64, 0xce, 0xc4, 0x61, 0x33,
-       0x18, 0x17, 0x1f, 0x78, 0xdf, 0x5c, 0x78, 0x83, 0xe4, 0xc5, 0x80, 0xc8,
-       0xa6, 0x30, 0x76, 0x29, 0x28, 0xe1, 0x27, 0x10, 0x72, 0xeb, 0x25, 0x8a,
-       0x0d, 0x6f, 0x53, 0x6d, 0x67, 0x2d, 0xf5, 0x5e, 0x36, 0x5f, 0xc1, 0x27,
-       0x37, 0x2a, 0x38, 0x7a, 0x63, 0x28, 0x30, 0xa4, 0x94, 0x32, 0x2e, 0x84,
-       0xda, 0x5a, 0x14, 0xeb, 0x04, 0xeb, 0xc6, 0x1a, 0x5c, 0xc1, 0x00, 0x94,
-       0x72, 0x62, 0xd6, 0x6c, 0x5d, 0x68, 0x8b, 0xbb, 0x37, 0x14, 0xd8, 0xc9,
-       0x6f, 0xd7, 0xa8, 0x82, 0x51, 0x23, 0x18, 0x83, 0xd3, 0x3e, 0xfb, 0x66,
-       0xca, 0x7c, 0x53, 0xc8, 0xb6, 0x4f, 0x86, 0xeb, 0xb5, 0x93, 0x78, 0x9f,
-       0xb8, 0x2c, 0xfd, 0xe4, 0x65, 0x03, 0xf3, 0x70, 0x23, 0xd6, 0xa2, 0xdc,
-       0x24, 0xb4, 0x84, 0x71, 0x52, 0x62, 0x79, 0x5e, 0xde, 0x7c, 0x4c, 0xb7,
-       0xed, 0xf7, 0xcd, 0x5c, 0x5b, 0x5a, 0x73, 0x30, 0x0e, 0xcc, 0xc4, 0x98,
-       0x11, 0x6c, 0x1d, 0xa7, 0x1e, 0x02, 0xf4, 0xf5, 0x19, 0x46, 0x15, 0x26,
-       0x3c, 0x41, 0x6d, 0x42, 0x59, 0xf4, 0x99, 0x8a, 0x39, 0x1b, 0x9e, 0x52,
-       0xea, 0x3b, 0x8a, 0x60, 0x90, 0x9f, 0x5e, 0x23, 0xf3, 0x11, 0xf0, 0x91,
-       0x0b, 0xae, 0x83, 0xc3, 0x2f, 0x70, 0x7b, 0xc2, 0x1d, 0xbb, 0x80, 0x1a,
-       0xfa, 0x9d, 0xd1, 0xfe, 0x90, 0x12, 0x64, 0xf2, 0xf2, 0x35, 0x26, 0x38,
-       0x22, 0x6b, 0x15, 0xe2, 0xf7, 0xd8, 0xf6, 0xc3, 0x94, 0x75, 0x17, 0x65,
-       0xdd, 0x18, 0xfe, 0xd8, 0xfe, 0x07, 0xa7, 0xcd, 0x5b, 0x31, 0x64, 0x5c,
-       0xdd, 0xee, 0x47, 0x36, 0xa6, 0x4b, 0xbb, 0x1e, 0x2c, 0x99, 0xce, 0x5c,
-       0xab, 0x59, 0xf0, 0xaa, 0xd2, 0x43, 0x7c, 0x62, 0x7b, 0x8c, 0x7f, 0xea,
-       0xd5, 0x1c, 0xc2, 0x05, 0xc6, 0xe6, 0x40, 0x5c, 0x51, 0xab, 0x4b, 0xa0,
-       0xc1, 0x6b, 0xd8, 0x78, 0x84, 0x7c, 0x27, 0x36, 0xbd, 0x1c, 0xdf, 0xe4,
-       0x9c, 0x96, 0x86, 0xd4, 0x6b, 0x5d, 0x9c, 0x93, 0xc3, 0x61, 0xf9, 0xed,
-       0xc1, 0xf8, 0x74, 0x17, 0xba, 0x38, 0xcb, 0x5a, 0x48, 0x9d, 0x21, 0xf7,
-       0xbd, 0x8d, 0xf2, 0x9b, 0xf2, 0x5f, 0xa3, 0xe0, 0x61, 0x5a, 0xa4, 0x1a,
-       0xea, 0x0e, 0xc8, 0xfd, 0x56, 0x53, 0x7e, 0x2b, 0xe4, 0x92, 0x6e, 0xce,
-       0x8b, 0x0d, 0x97, 0x2c, 0x4d, 0x84, 0x78, 0x3f, 0x2c, 0xd7, 0xb1, 0x87,
-       0x39, 0xee, 0xd8, 0x01, 0x45, 0x30, 0xee, 0x97, 0xf6, 0x2b, 0x8c, 0x81,
-       0x1a, 0x9f, 0x7f, 0x93, 0x7d, 0x9f, 0x08, 0xbf, 0x64, 0xcf, 0xa8, 0x50,
-       0x70, 0x32, 0xa2, 0x63, 0xe6, 0x8d, 0xd5, 0x98, 0xb8, 0x5b, 0xc6, 0xac,
-       0xa0, 0xd4, 0x38, 0xe8, 0x91, 0x1c, 0xb9, 0xcc, 0xb8, 0x06, 0x4b, 0x56,
-       0xe4, 0xee, 0x15, 0x85, 0x64, 0x8d, 0x53, 0x47, 0xd1, 0x8d, 0x95, 0xd0,
-       0x27, 0xef, 0x2d, 0x0a, 0xb9, 0xdb, 0x4a, 0x15, 0x43, 0xbb, 0x5d, 0x91,
-       0xe7, 0xbf, 0x23, 0x2f, 0xb7, 0xed, 0x47, 0x38, 0x5f, 0xb3, 0xc3, 0x3e,
-       0x9c, 0x63, 0x3f, 0xdd, 0xd4, 0xdf, 0xf2, 0x4b, 0xf3, 0x95, 0xaf, 0xff,
-       0xa9, 0xad, 0xdf, 0x23, 0x75, 0xa5, 0x8d, 0xda, 0xd6, 0x25, 0xca, 0x03,
-       0x1e, 0xc9, 0x91, 0x36, 0x86, 0x1d, 0x9d, 0xb1, 0xec, 0x73, 0xce, 0x6f,
-       0xad, 0xf9, 0xad, 0x4b, 0xeb, 0x75, 0xe7, 0x9d, 0x58, 0xba, 0x70, 0xbe,
-       0x86, 0x09, 0xbb, 0xa2, 0xd1, 0xd2, 0x0a, 0x21, 0x31, 0xb5, 0xa6, 0xee,
-       0x39, 0xb6, 0xfb, 0x73, 0x33, 0x17, 0x6f, 0x0f, 0x9a, 0xc1, 0x3e, 0x8b,
-       0xfe, 0x13, 0x67, 0x8e, 0xdb, 0x22, 0xbc, 0x63, 0xec, 0x16, 0xce, 0xc3,
-       0x4c, 0x14, 0x36, 0x06, 0x7b, 0x66, 0x31, 0xe7, 0x73, 0x35, 0x4b, 0x9c,
-       0x96, 0xf9, 0x71, 0xca, 0xb0, 0xaf, 0x22, 0x2c, 0xa2, 0x8c, 0xe1, 0xc6,
-       0x3f, 0x15, 0xdf, 0xa4, 0x1d, 0xb1, 0xce, 0x60, 0x4f, 0x0c, 0x7f, 0xaa,
-       0x2c, 0xc8, 0x28, 0x64, 0x2d, 0xcc, 0x7b, 0x4b, 0x3c, 0xa3, 0x92, 0x23,
-       0x15, 0x68, 0xdd, 0xcd, 0x55, 0xfc, 0xc8, 0x73, 0xf7, 0x2d, 0x6b, 0x32,
-       0x97, 0xd6, 0x20, 0xd1, 0x67, 0x16, 0x40, 0xbd, 0x49, 0xe2, 0x05, 0x7d,
-       0x59, 0x93, 0xf1, 0x59, 0xb4, 0x72, 0x59, 0x5f, 0x30, 0x56, 0xad, 0x25,
-       0x5e, 0xbc, 0xc8, 0x1e, 0x87, 0xc9, 0xc5, 0x2c, 0xc7, 0x33, 0x9c, 0xf8,
-       0x37, 0x65, 0x4d, 0x52, 0xe2, 0x57, 0x7e, 0x5d, 0xb3, 0x12, 0xfd, 0x7b,
-       0x57, 0x40, 0xaf, 0xca, 0x61, 0xa0, 0x1a, 0x6d, 0xc2, 0xc2, 0xbe, 0x40,
-       0x41, 0x2e, 0x7f, 0x28, 0x43, 0xef, 0xde, 0x30, 0xd2, 0xd3, 0x9d, 0xfa,
-       0xbc, 0xe7, 0x85, 0x60, 0xf4, 0xf6, 0xbd, 0xd7, 0xca, 0x7a, 0x40, 0x40,
-       0xda, 0x8d, 0xd3, 0x77, 0x54, 0xe3, 0x43, 0xdb, 0xd2, 0xa4, 0xfd, 0xa3,
-       0x37, 0x10, 0x47, 0xcc, 0xc5, 0xa8, 0x6f, 0x3f, 0x84, 0x33, 0xe4, 0xa4,
-       0x4e, 0xbe, 0xa4, 0x17, 0x46, 0xc7, 0x1f, 0xf6, 0x20, 0x14, 0x1f, 0x21,
-       0x0e, 0xf8, 0x46, 0xbd, 0xe4, 0x56, 0x33, 0x9d, 0x75, 0xaf, 0x85, 0xc4,
-       0x96, 0x38, 0x79, 0xf9, 0xd7, 0xdc, 0x6e, 0xac, 0x25, 0x66, 0x1c, 0x34,
-       0xea, 0x3b, 0x0e, 0xe1, 0x1f, 0x89, 0xb3, 0x52, 0x5e, 0x65, 0x7f, 0xd2,
-       0xa6, 0x9b, 0xfd, 0xc1, 0x4b, 0x2e, 0x70, 0x2f, 0xf9, 0xac, 0xdb, 0x63,
-       0xfc, 0xc4, 0x23, 0xbc, 0x43, 0x78, 0xf7, 0xae, 0xbd, 0x0a, 0x5a, 0xd8,
-       0xce, 0x4e, 0xda, 0xcc, 0xc3, 0x21, 0xb8, 0x5b, 0x6f, 0x24, 0xbf, 0x02,
-       0x5d, 0x70, 0xba, 0x0f, 0x3b, 0x46, 0x10, 0xc9, 0x18, 0xe3, 0x33, 0x7c,
-       0xa8, 0x62, 0x3b, 0x12, 0x53, 0x0a, 0x26, 0xdb, 0x89, 0xdc, 0x77, 0x65,
-       0x3b, 0x65, 0x78, 0x72, 0xb2, 0x9d, 0x7d, 0x6c, 0xe7, 0xe6, 0xd9, 0x70,
-       0x97, 0xdd, 0x2c, 0x73, 0xd5, 0x40, 0xff, 0x29, 0x43, 0xca, 0x89, 0x2b,
-       0xe4, 0xa3, 0x5f, 0x85, 0x62, 0xd4, 0x4a, 0xee, 0x72, 0xd6, 0xa9, 0xb7,
-       0xb8, 0x61, 0xfc, 0x02, 0x69, 0x91, 0x72, 0x7e, 0xf6, 0x38, 0x1d, 0x35,
-       0xaf, 0x9b, 0x2a, 0x6c, 0xdd, 0x5b, 0x9c, 0x97, 0x97, 0xfd, 0xe4, 0xfb,
-       0xa8, 0xe4, 0x3d, 0x3f, 0x76, 0x30, 0x07, 0x5d, 0xcc, 0x7e, 0x0e, 0x9b,
-       0xc2, 0x23, 0xeb, 0xcd, 0x22, 0x45, 0x72, 0xf2, 0x00, 0x39, 0x45, 0x25,
-       0x36, 0x3b, 0x71, 0x28, 0xc0, 0xfa, 0x0d, 0x65, 0x39, 0x7e, 0x02, 0xcf,
-       0x32, 0x96, 0x6d, 0x09, 0xe7, 0xfa, 0x23, 0x0e, 0x33, 0xcf, 0x6d, 0xc4,
-       0xc1, 0xc1, 0x4b, 0xcf, 0x83, 0x8b, 0x8d, 0xa9, 0xf3, 0x35, 0x1e, 0xf4,
-       0xa0, 0x8d, 0xdf, 0x05, 0x12, 0x67, 0xae, 0x18, 0xfb, 0x96, 0x91, 0x47,
-       0xf8, 0x5d, 0x8c, 0xad, 0x23, 0x36, 0xb6, 0x38, 0x39, 0x4e, 0x01, 0xba,
-       0x1b, 0x04, 0x0f, 0xc5, 0x96, 0xa6, 0x4b, 0xec, 0x88, 0xa4, 0x21, 0xf1,
-       0x55, 0xec, 0x27, 0xea, 0xd8, 0x8f, 0x4b, 0x99, 0x6a, 0x3f, 0x5d, 0x78,
-       0xcd, 0x38, 0xba, 0xa2, 0x10, 0x47, 0xef, 0x97, 0xb5, 0xfb, 0x8e, 0x30,
-       0x8e, 0xdd, 0x46, 0xdf, 0x7c, 0x97, 0xd8, 0xb2, 0x65, 0x36, 0xe3, 0x97,
-       0x83, 0x59, 0x0a, 0x0a, 0xc9, 0x2b, 0xb6, 0xed, 0x0d, 0xea, 0x05, 0xaa,
-       0xc6, 0x3e, 0xaf, 0xc6, 0x2e, 0x91, 0xdf, 0x64, 0x9e, 0x7e, 0xf4, 0xb1,
-       0x42, 0xf8, 0x24, 0x5f, 0x7a, 0xfb, 0x0c, 0xdb, 0x58, 0x6c, 0xe6, 0x75,
-       0xe5, 0xe8, 0x69, 0xb2, 0x9d, 0x4a, 0x24, 0xf7, 0xe6, 0xeb, 0x2b, 0x38,
-       0x15, 0x0a, 0x4c, 0xae, 0x9d, 0x57, 0xa2, 0x77, 0xe4, 0xe8, 0x49, 0xf2,
-       0x1c, 0xc6, 0xa9, 0xa3, 0x9d, 0x01, 0xca, 0x72, 0x3e, 0x9c, 0x9f, 0x53,
-       0xf1, 0xcd, 0xa9, 0x6d, 0x88, 0xed, 0x42, 0x29, 0xab, 0xc5, 0x96, 0x32,
-       0xda, 0x68, 0x26, 0x84, 0x78, 0x49, 0xb4, 0x0c, 0x89, 0x11, 0xfa, 0xd6,
-       0x68, 0x01, 0xdc, 0xf3, 0x24, 0xee, 0x0a, 0xd7, 0x72, 0xdf, 0x72, 0x3a,
-       0x51, 0x80, 0x07, 0xcc, 0x8b, 0xb6, 0xe0, 0xe2, 0x49, 0x03, 0xd7, 0x15,
-       0x10, 0x13, 0x6b, 0xc3, 0xa1, 0xd8, 0x3a, 0xe6, 0xb4, 0xc7, 0x1b, 0xdc,
-       0xb7, 0x7c, 0x90, 0xf9, 0x3d, 0x79, 0xf1, 0xd5, 0xe3, 0x11, 0x7d, 0xe0,
-       0xc4, 0xd2, 0x90, 0xf4, 0x29, 0xfd, 0xe5, 0x6d, 0x54, 0xfa, 0xb7, 0xed,
-       0x50, 0xd8, 0xe7, 0xcc, 0x79, 0x7e, 0x0c, 0xef, 0x19, 0xf9, 0x31, 0xf8,
-       0x9c, 0xf8, 0xcd, 0x1c, 0x98, 0x98, 0x23, 0x79, 0xc1, 0x11, 0xe5, 0xa8,
-       0x93, 0x03, 0x5b, 0x31, 0xe6, 0xbe, 0x91, 0x9e, 0xc9, 0xdc, 0x77, 0x9c,
-       0x3c, 0xf7, 0x38, 0x79, 0xee, 0xcb, 0x93, 0xb9, 0xef, 0x8b, 0x19, 0xa9,
-       0x33, 0xb5, 0x7c, 0x24, 0x26, 0x6b, 0xd6, 0x23, 0x89, 0x50, 0x5d, 0xbe,
-       0xce, 0xcb, 0x2c, 0x7f, 0xfc, 0x52, 0xf9, 0xd5, 0xcc, 0x57, 0x57, 0x61,
-       0x5b, 0xaa, 0x04, 0x0f, 0x6a, 0x4e, 0x6e, 0xe9, 0x2d, 0x8c, 0x9e, 0xb8,
-       0xef, 0x7d, 0x63, 0xbc, 0xce, 0x45, 0x1c, 0x1a, 0xe1, 0xe0, 0x5b, 0x12,
-       0x0a, 0xfd, 0xce, 0x83, 0x1e, 0xad, 0x1c, 0x6b, 0xcd, 0x7f, 0xb2, 0x1f,
-       0x5c, 0x25, 0xcf, 0xf2, 0x7b, 0x14, 0x52, 0xfe, 0x35, 0x96, 0x0f, 0x9a,
-       0x23, 0x93, 0xb9, 0xe0, 0xd1, 0x04, 0xfa, 0x24, 0xcf, 0x5a, 0xd3, 0x1c,
-       0xd2, 0xbb, 0x9d, 0x75, 0x63, 0x1d, 0xeb, 0x32, 0x3a, 0xd6, 0x53, 0x9e,
-       0xb4, 0x7b, 0x32, 0x47, 0xca, 0xc5, 0x62, 0x4b, 0x78, 0xe6, 0x22, 0x96,
-       0xdb, 0x3c, 0x89, 0x33, 0x2d, 0x97, 0x78, 0xae, 0x6d, 0xf7, 0x9b, 0x79,
-       0xae, 0xcb, 0x58, 0x50, 0x29, 0xb9, 0x35, 0x68, 0x17, 0x15, 0x48, 0xfb,
-       0x65, 0x4f, 0x66, 0xea, 0x18, 0x11, 0x2b, 0x8c, 0x86, 0xf4, 0xd9, 0xea,
-       0x54, 0xec, 0x92, 0xb1, 0x0a, 0x6e, 0x59, 0x8e, 0x7e, 0x8e, 0x5d, 0x1a,
-       0x6f, 0x7d, 0xa1, 0x60, 0xd6, 0xc1, 0x44, 0x77, 0x01, 0x6d, 0x4b, 0x2d,
-       0x10, 0x7b, 0x40, 0xee, 0x1e, 0xb2, 0xb6, 0xbd, 0xfd, 0x0a, 0xdd, 0x15,
-       0xc4, 0x98, 0x0a, 0xe0, 0xe9, 0x44, 0x28, 0x76, 0x16, 0x96, 0x72, 0x32,
-       0xe3, 0xa6, 0xad, 0x4b, 0xbb, 0x5b, 0xd8, 0x5e, 0x8f, 0x72, 0xe2, 0x52,
-       0x9b, 0x17, 0x2e, 0x6e, 0x76, 0xd6, 0x71, 0xf3, 0xbe, 0xe2, 0xc5, 0x43,
-       0x7d, 0xf9, 0xbd, 0xc6, 0x18, 0xde, 0x33, 0x05, 0x17, 0xbd, 0xe4, 0x3d,
-       0xcc, 0xd2, 0x13, 0xdb, 0x90, 0xf3, 0x4b, 0xf9, 0xe4, 0xe7, 0xfd, 0xa0,
-       0x5b, 0x30, 0xec, 0x27, 0xb3, 0x63, 0x93, 0x6b, 0x2e, 0x7f, 0xac, 0x4c,
-       0x1e, 0xdb, 0x2f, 0x5c, 0xec, 0x4b, 0x55, 0x4f, 0xc9, 0xb3, 0x69, 0x5f,
-       0x03, 0xc1, 0x1e, 0x0b, 0x95, 0x6c, 0xc3, 0x8d, 0xbf, 0x65, 0xfc, 0x76,
-       0x0f, 0x1c, 0xbd, 0x41, 0x52, 0x32, 0xcf, 0xa1, 0x18, 0x36, 0x37, 0x7b,
-       0xe0, 0x1a, 0xaa, 0x2e, 0xcc, 0xad, 0xf3, 0x91, 0x3c, 0x3b, 0xdf, 0x8a,
-       0x83, 0xd3, 0x6a, 0x56, 0xf2, 0x6a, 0xd2, 0x88, 0x43, 0xa2, 0xd7, 0x4a,
-       0x7e, 0x8b, 0x5e, 0xfc, 0xfc, 0x16, 0x1d, 0x55, 0xf1, 0xbb, 0x1c, 0xb1,
-       0x2a, 0xd9, 0xf3, 0x6a, 0x47, 0x82, 0x98, 0x55, 0x12, 0xed, 0xc4, 0xd7,
-       0x7b, 0x6d, 0xbb, 0x87, 0x7e, 0x59, 0xc4, 0x18, 0xff, 0x48, 0xa8, 0x3e,
-       0x32, 0x47, 0x29, 0x20, 0xdf, 0x69, 0x47, 0xcf, 0x48, 0x41, 0xbc, 0x3c,
-       0x5a, 0xc5, 0x98, 0xae, 0xe1, 0x93, 0xb9, 0x6d, 0xc8, 0x8e, 0x5e, 0xbd,
-       0x57, 0x36, 0x75, 0x9f, 0x2c, 0xbf, 0x3f, 0x26, 0xe3, 0x11, 0xb9, 0x45,
-       0xfe, 0x0b, 0x17, 0xb7, 0xa6, 0x44, 0x36, 0x0f, 0x0e, 0xf4, 0x89, 0xbc,
-       0x36, 0x3a, 0xcc, 0x5b, 0x29, 0x27, 0x91, 0xbe, 0x72, 0xea, 0xfc, 0xe6,
-       0xdb, 0x91, 0x75, 0xf0, 0x4e, 0x65, 0x98, 0xf3, 0x65, 0xb9, 0x0b, 0xc5,
-       0xbf, 0x34, 0xe6, 0x15, 0xca, 0x73, 0x19, 0x69, 0xa3, 0x45, 0x19, 0x49,
-       0x4f, 0xad, 0xd3, 0xa9, 0x1c, 0xca, 0x3c, 0x5c, 0x28, 0x9c, 0xe3, 0xb2,
-       0x1e, 0xf3, 0x32, 0x90, 0xdc, 0xd2, 0x5e, 0x2a, 0x92, 0xa2, 0x7f, 0xd1,
-       0x8f, 0x0e, 0x77, 0x96, 0xbf, 0xb3, 0x5f, 0xd6, 0xe7, 0xd5, 0x3e, 0x36,
-       0xf7, 0x0a, 0x9f, 0x3c, 0x4e, 0x9f, 0x1c, 0xff, 0xa3, 0x3e, 0x39, 0xef,
-       0x4f, 0x94, 0xcf, 0xaf, 0xb7, 0xda, 0xf6, 0x6e, 0x53, 0xd6, 0xe8, 0x65,
-       0xdd, 0xb5, 0xe1, 0x4b, 0xf6, 0x5e, 0x65, 0x3d, 0x7e, 0x36, 0xd2, 0x95,
-       0xc1, 0xb4, 0xac, 0xbf, 0x0c, 0xa4, 0x80, 0x45, 0x49, 0xe9, 0x27, 0x46,
-       0x7d, 0xa9, 0xb7, 0x32, 0x1a, 0x31, 0x43, 0xe8, 0xc2, 0x19, 0xd3, 0xd8,
-       0xf7, 0x20, 0x79, 0x77, 0x37, 0x73, 0xd2, 0x83, 0xe6, 0x72, 0xfa, 0x7b,
-       0x31, 0x36, 0x34, 0xd0, 0x18, 0x57, 0x98, 0xf4, 0x7b, 0xab, 0x9d, 0xae,
-       0xe8, 0xf5, 0x45, 0xdb, 0x57, 0x25, 0x42, 0xc1, 0xb6, 0x8d, 0xc4, 0xf3,
-       0xa5, 0xbd, 0x5e, 0xe8, 0x8a, 0xc3, 0x07, 0x5a, 0x7f, 0xa1, 0x0a, 0x46,
-       0x9d, 0x29, 0xc8, 0xe5, 0xcd, 0xb2, 0xe6, 0x22, 0xfd, 0x2c, 0x67, 0x5e,
-       0x22, 0x75, 0x75, 0xb4, 0xd7, 0x2a, 0x48, 0xd5, 0x06, 0xfb, 0xe0, 0xb2,
-       0xed, 0xdf, 0x91, 0x17, 0x8e, 0x3b, 0xb9, 0x7c, 0x7d, 0xdd, 0x6e, 0xf5,
-       0x7f, 0x10, 0x0b, 0x9d, 0x36, 0x34, 0x59, 0xf3, 0x7f, 0xe1, 0x4f, 0xae,
-       0x7b, 0x9b, 0x90, 0xbd, 0x89, 0x42, 0x63, 0x89, 0x32, 0xe2, 0xcf, 0x71,
-       0x8a, 0xdb, 0x06, 0x3e, 0xbf, 0xf8, 0x64, 0x4a, 0xec, 0x1c, 0x55, 0x01,
-       0x63, 0x06, 0x66, 0x1f, 0x28, 0xc5, 0xb2, 0x01, 0xe1, 0x0a, 0x3e, 0xab,
-       0x30, 0x1a, 0xc0, 0x9c, 0x03, 0x95, 0x68, 0xd9, 0x23, 0xfb, 0x50, 0x76,
-       0x57, 0x45, 0x74, 0x35, 0xdc, 0x87, 0x34, 0x3c, 0xb0, 0xc7, 0xb6, 0x67,
-       0xcd, 0x23, 0xb5, 0x63, 0x4c, 0x7c, 0xb7, 0x69, 0x15, 0x3c, 0xd9, 0x6a,
-       0x2c, 0x49, 0xd6, 0x39, 0x6b, 0xad, 0x1f, 0x26, 0x5a, 0x5b, 0xce, 0xf5,
-       0xd6, 0x6e, 0xa8, 0x55, 0x82, 0xe6, 0x29, 0x25, 0x82, 0x82, 0x6c, 0x04,
-       0xae, 0xa4, 0x82, 0x57, 0x0d, 0x74, 0x95, 0x45, 0xa3, 0x70, 0x65, 0xa3,
-       0xf0, 0x25, 0xdd, 0x68, 0xa0, 0xbe, 0x4b, 0x38, 0xf7, 0xd3, 0x92, 0xd5,
-       0x98, 0x96, 0xbd, 0x0e, 0xfa, 0x81, 0x06, 0xfa, 0x48, 0x25, 0xfb, 0xf3,
-       0xa3, 0x25, 0xd9, 0x86, 0x69, 0x46, 0x33, 0x6d, 0xa3, 0x19, 0x33, 0x93,
-       0x7e, 0x2c, 0xe0, 0x7c, 0x2c, 0x4e, 0xb6, 0xb2, 0x1f, 0x1f, 0xda, 0x07,
-       0xee, 0x44, 0x60, 0xc8, 0x8b, 0xf2, 0x01, 0x1d, 0x1f, 0xce, 0xf5, 0xa2,
-       0x68, 0x28, 0x80, 0xd2, 0xa4, 0xec, 0x8d, 0x21, 0xb6, 0xb1, 0x39, 0x00,
-       0x5f, 0x16, 0x28, 0x19, 0xb0, 0xf1, 0xad, 0xf0, 0xa8, 0x7a, 0x77, 0xa5,
-       0x65, 0x4f, 0x73, 0x62, 0x41, 0x6b, 0xfb, 0x16, 0xe3, 0xce, 0x49, 0xbf,
-       0x77, 0x33, 0xcf, 0x52, 0xc8, 0xd7, 0x25, 0x06, 0xb6, 0xb6, 0x1f, 0x4c,
-       0xc8, 0xda, 0x46, 0x88, 0x7e, 0xeb, 0x81, 0x77, 0xa8, 0x53, 0xe9, 0xa3,
-       0xed, 0xa0, 0x40, 0xf4, 0xaf, 0xd2, 0xbf, 0xa0, 0x95, 0xd2, 0xce, 0xb7,
-       0x66, 0x5a, 0x94, 0x64, 0xba, 0x53, 0xe9, 0xcd, 0x94, 0x78, 0x51, 0x2c,
-       0xf3, 0xf2, 0x15, 0x8c, 0x36, 0x3c, 0x69, 0xa7, 0x2b, 0x9c, 0xb9, 0xb5,
-       0x3c, 0x90, 0x9c, 0xdb, 0x5a, 0x15, 0xae, 0x0d, 0x76, 0x56, 0xa8, 0xb2,
-       0x9f, 0x42, 0x1c, 0x52, 0x72, 0x7d, 0x69, 0x46, 0x12, 0xcf, 0xfa, 0x65,
-       0x7d, 0x55, 0xe6, 0xbf, 0xb5, 0x3d, 0xd1, 0x7b, 0xe1, 0xa2, 0xcc, 0xe9,
-       0xc7, 0xb4, 0xc3, 0xdb, 0x93, 0x9f, 0x5f, 0xdc, 0x97, 0x6a, 0x63, 0x9e,
-       0x66, 0xe2, 0x55, 0xfe, 0x5e, 0xc4, 0x71, 0xbf, 0x98, 0xf1, 0x61, 0x61,
-       0xb2, 0xd9, 0xd9, 0x8b, 0x5b, 0x96, 0x8c, 0xe0, 0x15, 0x7e, 0xb7, 0x24,
-       0x57, 0xe1, 0x18, 0xf3, 0xd4, 0x07, 0x92, 0x51, 0xbc, 0x9d, 0x09, 0xe0,
-       0x7e, 0xea, 0x6f, 0x06, 0xed, 0xf4, 0xae, 0xa4, 0x8e, 0x37, 0x32, 0xc0,
-       0xcf, 0xfa, 0x6c, 0x84, 0x1a, 0xbf, 0xa3, 0x3e, 0xed, 0xac, 0x8d, 0x35,
-       0xe3, 0x67, 0x09, 0x13, 0x6f, 0x24, 0x6a, 0xcc, 0x9b, 0xd5, 0xdf, 0x62,
-       0xdc, 0x9d, 0xa0, 0x4d, 0x9d, 0x47, 0xbc, 0x52, 0xd6, 0xf1, 0x72, 0xf2,
-       0x77, 0x8f, 0x79, 0x98, 0x63, 0x6d, 0xc0, 0x11, 0xbf, 0xb3, 0x2e, 0x71,
-       0x85, 0x5c, 0xb2, 0x36, 0xb1, 0x88, 0x72, 0x3d, 0x95, 0x22, 0x57, 0x34,
-       0xaa, 0x29, 0x8f, 0x17, 0x0b, 0x07, 0xbc, 0xa8, 0xa4, 0x6d, 0x9c, 0x3e,
-       0x10, 0xc5, 0xce, 0x54, 0x11, 0x5a, 0xfa, 0x03, 0x38, 0xc3, 0xeb, 0xad,
-       0xb4, 0xf1, 0x1f, 0xb1, 0x6f, 0xa3, 0x49, 0xc3, 0x80, 0x56, 0x84, 0x9e,
-       0xba, 0x1f, 0x93, 0xef, 0xa9, 0xcc, 0x39, 0x98, 0x1b, 0x18, 0x25, 0xd8,
-       0xc1, 0xb4, 0xbe, 0xb0, 0x39, 0x88, 0xfe, 0x3a, 0xda, 0x7a, 0x15, 0xe3,
-       0x87, 0x11, 0x43, 0x39, 0x31, 0x26, 0xc5, 0x5c, 0xb1, 0x30, 0x6a, 0x51,
-       0x06, 0x15, 0xfb, 0x34, 0x55, 0xd6, 0xe4, 0xf8, 0x2c, 0x80, 0x63, 0x09,
-       0xd8, 0xc5, 0x51, 0xe3, 0xc2, 0x4e, 0x84, 0x4e, 0xbc, 0xcf, 0xb8, 0xfe,
-       0xf7, 0x99, 0x12, 0x7c, 0xbf, 0x6f, 0x36, 0xfe, 0x36, 0x2d, 0xeb, 0xbd,
-       0x3e, 0xac, 0x1f, 0x0c, 0xab, 0xb9, 0xb5, 0x4a, 0x1f, 0x1e, 0x1a, 0x84,
-       0x35, 0x93, 0xf6, 0xf8, 0xf2, 0x70, 0x19, 0xd6, 0xf4, 0xbd, 0x60, 0x33,
-       0x77, 0xa6, 0x5d, 0x7b, 0x71, 0x34, 0x2d, 0x32, 0x96, 0x53, 0xc6, 0x22,
-       0x1c, 0xe3, 0x75, 0x0f, 0x6d, 0xbf, 0xb2, 0xf7, 0xdb, 0xf8, 0x2c, 0x55,
-       0x53, 0x77, 0xbf, 0xda, 0x8e, 0xe3, 0xce, 0x7e, 0x6c, 0x03, 0xde, 0xa2,
-       0x1e, 0xcb, 0x77, 0xdb, 0xf6, 0x6f, 0xc2, 0x31, 0xfc, 0x2c, 0x73, 0x2d,
-       0x8a, 0x78, 0x6d, 0x86, 0x5b, 0xf0, 0x66, 0xa6, 0x1a, 0x65, 0xbd, 0xad,
-       0x78, 0x9d, 0x9c, 0xbf, 0x74, 0x77, 0x27, 0x4e, 0xb1, 0x7d, 0x5f, 0xbf,
-       0x17, 0xaf, 0xa5, 0xbd, 0x78, 0xb5, 0xcf, 0xd0, 0xd6, 0x2a, 0x7f, 0xa7,
-       0xc4, 0x2b, 0x73, 0xfd, 0x0c, 0xa4, 0x72, 0xfa, 0xdc, 0x3e, 0x56, 0x00,
-       0xc1, 0xf2, 0x43, 0x7e, 0x59, 0xbf, 0x95, 0xf3, 0x31, 0xad, 0xed, 0x5a,
-       0xf2, 0x77, 0x17, 0x13, 0xd4, 0xe7, 0x9b, 0xa3, 0x01, 0xdc, 0x91, 0x14,
-       0xdd, 0x7e, 0x7e, 0x71, 0x17, 0xb1, 0xa3, 0x77, 0x34, 0x82, 0x13, 0x09,
-       0x8f, 0xb3, 0xe7, 0xd8, 0x33, 0x2a, 0xfb, 0xb1, 0xdf, 0xe5, 0xdc, 0x00,
-       0x6b, 0x47, 0x73, 0x6d, 0x6d, 0x19, 0x2b, 0xa4, 0xee, 0x6e, 0xc7, 0xd3,
-       0x5a, 0x81, 0xc4, 0xdf, 0x9c, 0x8d, 0x1a, 0x41, 0xda, 0xee, 0x77, 0x9d,
-       0xf5, 0xbd, 0x81, 0x54, 0xbd, 0x36, 0x0d, 0xf9, 0x79, 0xac, 0xc1, 0x4c,
-       0xe3, 0xf7, 0xf6, 0x0b, 0x7e, 0x59, 0x77, 0x15, 0xbe, 0xd8, 0xda, 0xbe,
-       0x36, 0x21, 0xfd, 0xe8, 0xd8, 0x3c, 0x7a, 0xe1, 0x62, 0x3f, 0xf9, 0xfa,
-       0x12, 0xda, 0xc8, 0xba, 0x90, 0x1f, 0x8b, 0x6b, 0xeb, 0x50, 0x9b, 0x95,
-       0x35, 0xdd, 0x08, 0x39, 0xab, 0x89, 0x8e, 0x50, 0xd4, 0xd9, 0xd7, 0x82,
-       0x9a, 0xbf, 0xe7, 0xc5, 0xbb, 0x7f, 0xe0, 0x2b, 0xc0, 0xac, 0x81, 0x36,
-       0xf6, 0x6b, 0x63, 0x99, 0xf9, 0x0f, 0x76, 0xcb, 0x3d, 0xd2, 0x7f, 0x4d,
-       0x59, 0xee, 0x19, 0x27, 0xbc, 0x58, 0x7e, 0x37, 0xd1, 0x97, 0x1a, 0x71,
-       0xd8, 0x2f, 0x3c, 0x43, 0xfc, 0xa0, 0xb5, 0x3d, 0x4c, 0xfb, 0xd9, 0x41,
-       0x19, 0x56, 0xd0, 0x76, 0x96, 0x11, 0x17, 0xca, 0x8d, 0x0b, 0x17, 0x7b,
-       0x53, 0x26, 0xe6, 0x8c, 0xfa, 0x68, 0xcb, 0x45, 0xec, 0xaf, 0x19, 0xc6,
-       0x28, 0x71, 0x84, 0xf6, 0xbd, 0x60, 0xd4, 0x4f, 0x7b, 0xd6, 0x31, 0x7f,
-       0x54, 0x7c, 0xdc, 0x40, 0x88, 0xb1, 0xac, 0x9d, 0x75, 0x22, 0xa3, 0x15,
-       0xb8, 0x79, 0xbf, 0x1b, 0x77, 0x26, 0xc3, 0xd4, 0x4f, 0x1d, 0x63, 0xdc,
-       0x65, 0x7d, 0x6f, 0x1b, 0x9b, 0x85, 0x0a, 0xe3, 0x88, 0xfd, 0x9c, 0x83,
-       0x61, 0x85, 0x8e, 0x9e, 0x02, 0xec, 0x37, 0x90, 0x82, 0x55, 0xce, 0xf8,
-       0x72, 0x61, 0xf4, 0xb9, 0x2f, 0xe2, 0xf7, 0x8a, 0x2e, 0xa7, 0x8e, 0x47,
-       0x30, 0xe5, 0x02, 0xb1, 0x0e, 0x68, 0x7c, 0xc2, 0xc6, 0xe2, 0xc6, 0x8d,
-       0xca, 0x0f, 0x1c, 0x5b, 0x92, 0x76, 0x85, 0x3b, 0xe4, 0xf5, 0x9f, 0xd7,
-       0xf9, 0x6f, 0x0a, 0x72, 0x3a, 0xcf, 0x8f, 0x33, 0xb8, 0x4f, 0x70, 0x7a,
-       0x7d, 0x63, 0x1e, 0xa7, 0xa5, 0xbc, 0xdc, 0x5f, 0x61, 0xf7, 0x6a, 0x70,
-       0x17, 0x1a, 0x2e, 0x6c, 0xaf, 0x7b, 0x46, 0x99, 0xd0, 0xc4, 0xe7, 0x15,
-       0x62, 0xc7, 0xed, 0x36, 0xdd, 0x96, 0x76, 0xfd, 0x12, 0xcb, 0x41, 0x29,
-       0xbc, 0x34, 0x97, 0xc2, 0x3f, 0xba, 0x27, 0xe7, 0x52, 0x78, 0x6f, 0x7e,
-       0x4c, 0x79, 0x59, 0x23, 0xe4, 0x76, 0x22, 0xaf, 0xd8, 0x86, 0x94, 0x79,
-       0xb0, 0xc8, 0x59, 0x8f, 0x46, 0xf7, 0x14, 0x7b, 0xc8, 0x73, 0x18, 0xa7,
-       0x0d, 0x0d, 0x97, 0xec, 0xc1, 0x8d, 0xb6, 0xa4, 0xcc, 0x3b, 0xac, 0x62,
-       0xea, 0xa1, 0x6d, 0xd4, 0xc3, 0xf9, 0x13, 0x2e, 0xae, 0x62, 0x89, 0xb9,
-       0x5d, 0x19, 0xf7, 0xef, 0x64, 0x1b, 0x9f, 0x5f, 0x64, 0x1d, 0xde, 0xeb,
-       0xe5, 0xf5, 0x75, 0xb8, 0x9d, 0x38, 0xba, 0x36, 0x6c, 0x29, 0xb9, 0x73,
-       0x05, 0x45, 0xb8, 0x71, 0xa0, 0x12, 0x3e, 0x43, 0xd6, 0x2d, 0xfe, 0xb3,
-       0xe2, 0xab, 0x90, 0xf1, 0x3b, 0x9c, 0x81, 0x76, 0x72, 0x1d, 0x16, 0x0f,
-       0x30, 0x64, 0x3b, 0x7b, 0x04, 0x0b, 0xf1, 0x74, 0xf3, 0x75, 0x58, 0xea,
-       0x70, 0x9d, 0x10, 0x6e, 0x1a, 0x12, 0x0c, 0xed, 0x54, 0xfa, 0x89, 0x9d,
-       0x4c, 0x38, 0xe8, 0xd7, 0x31, 0xa5, 0x8f, 0x98, 0xb9, 0xcf, 0xf1, 0x11,
-       0x59, 0x2f, 0xee, 0x54, 0x52, 0x99, 0x0a, 0x8e, 0x43, 0x6c, 0xf7, 0xb2,
-       0x8c, 0x33, 0x29, 0xe3, 0x79, 0x62, 0xd1, 0xfc, 0x49, 0x19, 0x67, 0x37,
-       0x49, 0x2e, 0x2b, 0x32, 0x16, 0xa1, 0x96, 0x72, 0x54, 0x52, 0x8e, 0x63,
-       0x66, 0x85, 0x32, 0xa0, 0xe5, 0x64, 0xab, 0x61, 0xff, 0x8c, 0x39, 0x58,
-       0x63, 0xfa, 0x94, 0x65, 0xce, 0xbd, 0xbc, 0x6c, 0x9f, 0x5f, 0xec, 0x49,
-       0x7d, 0x61, 0xfb, 0x8c, 0x9c, 0x9c, 0x65, 0xfd, 0x3a, 0x4e, 0xcd, 0xbd,
-       0x0e, 0xa5, 0xfb, 0x8b, 0xd0, 0x48, 0x5c, 0xaf, 0x1f, 0x30, 0xfa, 0x36,
-       0x2a, 0x22, 0xab, 0x87, 0xbf, 0x9d, 0x75, 0x03, 0xea, 0xf3, 0xff, 0x2f,
-       0xbc, 0xd2, 0x8e, 0xdd, 0x58, 0x91, 0xcc, 0xd9, 0xb0, 0xe3, 0xbf, 0xb5,
-       0x62, 0xbf, 0xb2, 0x46, 0x48, 0x7b, 0xce, 0xb8, 0xb0, 0x84, 0x7d, 0x1f,
-       0x33, 0x1f, 0x56, 0x2c, 0xed, 0xc2, 0x45, 0xd9, 0xaf, 0x57, 0x29, 0x63,
-       0x77, 0xfa, 0x3a, 0xdc, 0x31, 0x30, 0x6e, 0x7b, 0x8d, 0x05, 0xc8, 0x84,
-       0x43, 0xed, 0x3d, 0x8a, 0x17, 0xbb, 0xd2, 0x2e, 0x2c, 0x1a, 0x20, 0x5f,
-       0x33, 0xe3, 0x4a, 0x6c, 0x7a, 0x8e, 0x87, 0x2f, 0x4c, 0x32, 0x1f, 0xcd,
-       0x4a, 0x7e, 0xd8, 0xd6, 0xbe, 0x30, 0xf1, 0x80, 0x12, 0xd3, 0x3e, 0xbf,
-       0x98, 0x4c, 0x1d, 0xfd, 0xae, 0xea, 0xf0, 0x30, 0x1f, 0xde, 0x3c, 0xe8,
-       0xa3, 0x2f, 0x28, 0xf4, 0x13, 0x3f, 0x7d, 0xbf, 0x01, 0x6f, 0xd3, 0x37,
-       0xee, 0x67, 0x5c, 0xfc, 0xfb, 0xd1, 0x2a, 0xdc, 0xb6, 0x27, 0x8a, 0x97,
-       0x0f, 0xfa, 0xd1, 0xbe, 0xe7, 0x56, 0xbc, 0xc5, 0x72, 0x63, 0x8c, 0x07,
-       0x63, 0xc3, 0x95, 0xfc, 0xf8, 0xf9, 0xa9, 0xe2, 0x67, 0x2d, 0xf1, 0xa8,
-       0x02, 0x27, 0xf7, 0xbb, 0xd0, 0x32, 0xa0, 0x62, 0xc0, 0x54, 0x70, 0xf7,
-       0x4d, 0x32, 0x1e, 0x2f, 0xd6, 0xd4, 0x5e, 0xb6, 0x8b, 0x25, 0x49, 0xe1,
-       0x70, 0x5e, 0xce, 0x93, 0x8e, 0x43, 0xf4, 0xcb, 0xdb, 0xc8, 0xc1, 0x76,
-       0xf4, 0xb5, 0xd1, 0x8f, 0x6c, 0xcc, 0x0a, 0xff, 0x18, 0x2b, 0xb4, 0x1e,
-       0xc9, 0x6b, 0x9d, 0x75, 0xfe, 0x14, 0xe7, 0x71, 0xc2, 0x53, 0x6f, 0x4d,
-       0x43, 0x51, 0x2c, 0x10, 0x0d, 0x69, 0x47, 0xb0, 0x1c, 0x7d, 0x63, 0xd0,
-       0x64, 0xcd, 0x7f, 0x1b, 0x79, 0xd4, 0x76, 0xf2, 0xa8, 0xee, 0xcc, 0x11,
-       0xce, 0xb1, 0xcf, 0x2b, 0x7b, 0xdf, 0xdb, 0xa8, 0xbb, 0xc5, 0x0e, 0x27,
-       0xf2, 0x5a, 0x45, 0x6c, 0xff, 0x38, 0x63, 0xd2, 0x82, 0xfe, 0x1c, 0x6e,
-       0x7c, 0xd6, 0xf4, 0x3c, 0x8c, 0x69, 0x3d, 0xf4, 0xf9, 0x5c, 0xdb, 0x3b,
-       0x85, 0x9b, 0x79, 0xca, 0x62, 0x65, 0xd1, 0xd0, 0x86, 0xd7, 0xa9, 0x7c,
-       0x2f, 0xdb, 0xdc, 0x3a, 0xb9, 0x8f, 0xd0, 0xcb, 0x36, 0x7b, 0x58, 0xb7,
-       0xbe, 0xdf, 0xe2, 0x5c, 0xba, 0x59, 0x3f, 0x14, 0xd8, 0xa8, 0x98, 0xac,
-       0xeb, 0xe4, 0x11, 0xa8, 0xd9, 0x7f, 0x79, 0xae, 0xda, 0x88, 0x31, 0xfd,
-       0x93, 0xfe, 0x7e, 0x7e, 0xf4, 0x3a, 0x84, 0x68, 0x24, 0x4f, 0x9b, 0x9b,
-       0xa0, 0xd3, 0x66, 0x5d, 0x93, 0x7d, 0x6d, 0x97, 0x71, 0xb8, 0x67, 0xc6,
-       0x66, 0xb2, 0x8f, 0xbe, 0x4c, 0x48, 0xeb, 0x42, 0xfd, 0x89, 0x69, 0x90,
-       0x71, 0x48, 0x7f, 0xcb, 0xf1, 0xe4, 0xd8, 0xd5, 0xe3, 0xa8, 0x26, 0x3e,
-       0x5d, 0x2c, 0x98, 0x3c, 0x33, 0xe7, 0xe4, 0xe2, 0x31, 0xc7, 0xc7, 0x76,
-       0x38, 0xf2, 0x7b, 0xd8, 0x66, 0x36, 0xb7, 0x07, 0x22, 0x69, 0x95, 0x32,
-       0xc2, 0x58, 0xd1, 0x96, 0x54, 0x62, 0x15, 0xd1, 0xfa, 0xce, 0x69, 0x08,
-       0x45, 0x7e, 0xc6, 0xb6, 0xa7, 0xb1, 0xed, 0x67, 0xd9, 0x76, 0x8a, 0x6d,
-       0x8f, 0xb0, 0xed, 0x1f, 0x5c, 0x6a, 0x5b, 0xc5, 0xfd, 0x7b, 0xf2, 0xb6,
-       0xe5, 0x46, 0xa4, 0x89, 0x59, 0xdf, 0x34, 0xd9, 0x03, 0xad, 0xe6, 0xdc,
-       0x8b, 0xee, 0x74, 0xc6, 0xf6, 0x9c, 0xbd, 0x2d, 0x60, 0xec, 0xb9, 0x6b,
-       0x8f, 0x82, 0xf7, 0xc3, 0xef, 0x63, 0xc2, 0x9f, 0xe3, 0x11, 0x79, 0x1b,
-       0xd2, 0x68, 0x43, 0x5a, 0xf2, 0x7f, 0xd2, 0xf4, 0xa5, 0x8e, 0xd8, 0x8f,
-       0xec, 0x3f, 0x90, 0x3f, 0x27, 0x44, 0x1f, 0xbf, 0x23, 0xee, 0x86, 0x4e,
-       0xbc, 0xc7, 0xd8, 0xf9, 0xa3, 0x8c, 0x07, 0xe9, 0xb4, 0x0f, 0xcf, 0x66,
-       0x04, 0x1b, 0xdb, 0x88, 0x8d, 0x82, 0xf7, 0xe4, 0x81, 0xc3, 0x47, 0x1f,
-       0x0b, 0xb0, 0xf2, 0xb3, 0xb4, 0x9f, 0x67, 0x69, 0x3f, 0xcf, 0x0e, 0xfb,
-       0x70, 0xf3, 0x21, 0x2f, 0xce, 0x11, 0x6b, 0x7a, 0x59, 0x26, 0x91, 0x6a,
-       0xc0, 0x4d, 0xe4, 0x59, 0x87, 0x7b, 0x19, 0x97, 0x19, 0xff, 0xeb, 0xb2,
-       0x1a, 0x76, 0xf5, 0x57, 0xa0, 0x7e, 0x48, 0x62, 0x70, 0x05, 0x1e, 0xe9,
-       0xf3, 0x62, 0xce, 0x7e, 0xd9, 0x87, 0x24, 0x2f, 0xec, 0xbb, 0x13, 0xc3,
-       0x8e, 0x8f, 0x4f, 0xa3, 0x7f, 0x54, 0xa2, 0x76, 0x48, 0xae, 0xc9, 0x53,
-       0x68, 0xb3, 0x0b, 0x0e, 0x55, 0x71, 0xbc, 0xb7, 0x62, 0xfe, 0xa1, 0x00,
-       0xf1, 0xdc, 0x8f, 0x48, 0x76, 0xf9, 0x45, 0xc1, 0xe4, 0xed, 0x63, 0x53,
-       0x63, 0x9a, 0xf8, 0xa1, 0x83, 0x61, 0x91, 0x3c, 0x86, 0x5d, 0x7e, 0x3e,
-       0x15, 0x27, 0x7f, 0xcb, 0x67, 0x52, 0x26, 0x1f, 0x7b, 0xa6, 0xe2, 0xe2,
-       0x65, 0x7c, 0x6a, 0x1c, 0x90, 0x6f, 0x0d, 0xed, 0xf3, 0xc4, 0xd7, 0xaf,
-       0x43, 0xc4, 0x91, 0xe7, 0xfe, 0x62, 0x96, 0x0b, 0xe4, 0xfc, 0x7d, 0x2a,
-       0x9e, 0xfb, 0x26, 0xfd, 0xd4, 0x85, 0x58, 0x45, 0x8e, 0x0b, 0xdf, 0xbe,
-       0xa7, 0x01, 0xbb, 0xa8, 0x8f, 0x56, 0xfa, 0x91, 0x2f, 0x1c, 0xb5, 0xad,
-       0x0a, 0xc9, 0x5b, 0x2b, 0x71, 0xe7, 0x1e, 0x3f, 0x63, 0xf8, 0xb5, 0x48,
-       0x0e, 0xcf, 0x66, 0x5b, 0xd5, 0xe8, 0x9d, 0xcc, 0xe7, 0xb7, 0xa7, 0x96,
-       0xd9, 0x0f, 0x39, 0x7b, 0xf2, 0xb2, 0xf6, 0xff, 0xda, 0x7d, 0xde, 0xd0,
-       0xb8, 0xce, 0x7c, 0xde, 0x64, 0xce, 0x41, 0x0e, 0x76, 0x02, 0xa1, 0x4a,
-       0xe6, 0xe7, 0x46, 0x39, 0x16, 0x31, 0x9f, 0x7f, 0xc8, 0x2f, 0xcf, 0x6e,
-       0x15, 0x59, 0x9c, 0xf2, 0x97, 0xc7, 0xb8, 0x6b, 0xca, 0x18, 0xeb, 0x23,
-       0xd3, 0x90, 0xe7, 0x63, 0x5f, 0xd8, 0x7f, 0x6f, 0x40, 0xe9, 0x0f, 0xd1,
-       0x6a, 0x1b, 0x83, 0x7d, 0x0f, 0x29, 0x86, 0xd6, 0xa4, 0x12, 0xba, 0x46,
-       0xdf, 0xc4, 0x92, 0xec, 0x2f, 0x10, 0xcb, 0xae, 0xf6, 0x8a, 0x2c, 0xf7,
-       0x67, 0x57, 0x61, 0x9c, 0x73, 0x5c, 0xc4, 0x3a, 0x37, 0xf4, 0xfa, 0x68,
-       0xa3, 0x50, 0x0e, 0x37, 0xd7, 0xe1, 0x43, 0xf2, 0x9c, 0xb6, 0xe4, 0x9b,
-       0xd0, 0x18, 0x5f, 0xef, 0x4c, 0xfe, 0x02, 0x65, 0xc4, 0x94, 0x3b, 0x92,
-       0x5f, 0xd8, 0x23, 0xa1, 0x7d, 0x4e, 0xbd, 0xc2, 0xd1, 0x03, 0x17, 0xfb,
-       0x2e, 0xc7, 0x27, 0xad, 0xd0, 0x78, 0xe5, 0x2a, 0x3c, 0x6c, 0x68, 0xd9,
-       0x9c, 0x18, 0xfd, 0x5f, 0x9e, 0xe8, 0xaf, 0x7f, 0xfa, 0xfd, 0xe6, 0x9c,
-       0x5d, 0xea, 0x99, 0xbb, 0xf0, 0x2d, 0x07, 0x77, 0xd7, 0x6c, 0x74, 0x47,
-       0x3b, 0x1e, 0x93, 0xb5, 0xd0, 0x35, 0xce, 0x3a, 0x41, 0x3b, 0x76, 0xee,
-       0x6d, 0xc3, 0xe6, 0xbd, 0x82, 0xad, 0xf5, 0xad, 0x8b, 0x94, 0x19, 0xf4,
-       0xc3, 0x01, 0x27, 0x97, 0x71, 0x1b, 0x9f, 0xca, 0x9a, 0xab, 0xea, 0x71,
-       0xf6, 0xc0, 0x74, 0xac, 0x19, 0xcd, 0xb5, 0x35, 0x2b, 0x53, 0x4a, 0xff,
-       0x8a, 0x22, 0xc9, 0x9c, 0xc5, 0xc7, 0xd8, 0xc9, 0x79, 0xc1, 0xa9, 0x7e,
-       0x89, 0x3b, 0x0a, 0x7c, 0xf7, 0xc8, 0x5e, 0xe6, 0x32, 0xe4, 0xf9, 0x7a,
-       0x4c, 0xdb, 0xcc, 0xdf, 0x3b, 0x8a, 0x73, 0x72, 0x6d, 0xbe, 0x8a, 0x17,
-       0xe5, 0xed, 0x41, 0x74, 0x97, 0xb7, 0xa1, 0x4f, 0x39, 0x06, 0xe6, 0xd8,
-       0xe4, 0x83, 0x97, 0xfd, 0xf9, 0x8b, 0x22, 0x67, 0x5d, 0x30, 0x3b, 0x35,
-       0xbe, 0x6f, 0x9f, 0xd4, 0xfd, 0x75, 0xc5, 0xf9, 0xd8, 0x94, 0x93, 0xd7,
-       0x24, 0x16, 0x5e, 0x83, 0x98, 0x3f, 0xef, 0xff, 0xdf, 0xe4, 0xf3, 0xcd,
-       0x82, 0x01, 0x93, 0x75, 0xef, 0x2e, 0x41, 0xf1, 0x76, 0x87, 0xc3, 0x5d,
-       0x6e, 0x9f, 0x64, 0xf8, 0x8a, 0xf6, 0xa7, 0xda, 0xaf, 0xb4, 0x2f, 0x71,
-       0x5a, 0x74, 0xda, 0xc8, 0xba, 0xa2, 0x3f, 0x07, 0xa3, 0x65, 0x4d, 0x96,
-       0xdc, 0xad, 0xcd, 0xd9, 0xa7, 0x29, 0x26, 0x6f, 0xee, 0x66, 0x0e, 0x55,
-       0xb2, 0x9f, 0xd7, 0xe4, 0x3e, 0x4b, 0x07, 0x02, 0x28, 0xda, 0xef, 0x21,
-       0xae, 0xcf, 0x80, 0x7b, 0x7f, 0x01, 0xed, 0x55, 0x38, 0xc2, 0x6b, 0xf7,
-       0x6d, 0x31, 0xae, 0x85, 0x6b, 0x7f, 0x21, 0x79, 0xb9, 0x70, 0xbe, 0x13,
-       0xf7, 0xad, 0x65, 0x1c, 0x57, 0xf7, 0x7b, 0x19, 0x9f, 0xab, 0xe1, 0x61,
-       0xcc, 0x5b, 0x32, 0xf0, 0x67, 0x28, 0xd8, 0x5f, 0x8c, 0x07, 0x06, 0xae,
-       0xc7, 0xcc, 0xfd, 0x25, 0xb8, 0x7f, 0x60, 0x26, 0x66, 0xec, 0x97, 0xdc,
-       0x49, 0x47, 0x60, 0x7f, 0x29, 0x56, 0x0c, 0x04, 0x51, 0xb1, 0xbf, 0x0c,
-       0x6d, 0x03, 0xb3, 0xa0, 0xed, 0x2f, 0xc7, 0x5d, 0x03, 0x35, 0x28, 0xdf,
-       0xaf, 0xe1, 0xce, 0x01, 0x03, 0x65, 0xfb, 0x2b, 0x18, 0xd3, 0x42, 0x8c,
-       0x9d, 0x7e, 0x2c, 0xdf, 0xc3, 0xb9, 0x39, 0x58, 0x45, 0xbf, 0x58, 0x45,
-       0x4e, 0xbd, 0x1a, 0xfb, 0x52, 0x73, 0x50, 0x72, 0x30, 0x80, 0xa5, 0x7b,
-       0xc6, 0x35, 0x52, 0x1a, 0x2c, 0x0e, 0x35, 0xa0, 0xe8, 0xa0, 0xe4, 0x7e,
-       0xc1, 0x13, 0x2d, 0x08, 0x5e, 0x58, 0x84, 0x72, 0xe6, 0xbe, 0xc0, 0x7b,
-       0x63, 0xc0, 0xec, 0x31, 0x17, 0x8e, 0x68, 0xab, 0xb0, 0x75, 0xec, 0x9b,
-       0x93, 0x36, 0x2f, 0xfb, 0x47, 0xe5, 0x9c, 0x5f, 0xb9, 0x96, 0x7b, 0xab,
-       0xd1, 0x33, 0x96, 0x5f, 0x07, 0x0b, 0xf6, 0x6d, 0xa7, 0x06, 0xc7, 0x33,
-       0xf2, 0x4c, 0x7c, 0x04, 0xb4, 0x6f, 0xa5, 0x5b, 0xce, 0x8f, 0xbb, 0xa2,
-       0x6a, 0x59, 0x77, 0xf3, 0x86, 0x5b, 0xe2, 0x99, 0x4d, 0xcc, 0xbb, 0x24,
-       0x87, 0xdd, 0x78, 0xcb, 0x9a, 0xcc, 0x07, 0x97, 0xf6, 0x13, 0xfa, 0xcc,
-       0x85, 0x01, 0x0d, 0x5f, 0xc3, 0x1a, 0x67, 0x0d, 0x55, 0xe5, 0x9c, 0xc9,
-       0x79, 0x56, 0xe7, 0x2c, 0x39, 0xed, 0x2c, 0x0e, 0xd3, 0xc1, 0xd4, 0x75,
-       0xa8, 0xc9, 0x38, 0x6b, 0xb5, 0x75, 0x71, 0xbc, 0xa0, 0xb6, 0x1a, 0xd6,
-       0xe4, 0xd9, 0x0f, 0x6b, 0xbe, 0x86, 0x98, 0xa9, 0x5d, 0x3a, 0x1f, 0x12,
-       0xd4, 0x47, 0x10, 0x0c, 0x6c, 0xc3, 0x3a, 0xe7, 0x7c, 0xa0, 0x12, 0x6d,
-       0x97, 0x73, 0x46, 0xfc, 0x5e, 0x0d, 0x23, 0x93, 0x5f, 0x6b, 0x94, 0xb3,
-       0xd7, 0xb2, 0x8f, 0x65, 0x33, 0xe7, 0x97, 0x3c, 0xf9, 0x88, 0xa2, 0xf6,
-       0x3a, 0xeb, 0x63, 0xab, 0x5c, 0x8c, 0x01, 0x2d, 0x0a, 0xe2, 0x45, 0xd1,
-       0x90, 0xfe, 0xe1, 0xe4, 0xba, 0x83, 0x67, 0x74, 0x8b, 0x52, 0x30, 0xda,
-       0xa3, 0xb8, 0x47, 0x73, 0xeb, 0x0e, 0x2e, 0xf2, 0xd8, 0x6d, 0xa9, 0x4a,
-       0x96, 0xd1, 0x30, 0x7b, 0xae, 0x1b, 0xaf, 0x26, 0xca, 0x9c, 0xb3, 0xc7,
-       0x5b, 0xe7, 0x16, 0xe0, 0x11, 0xda, 0x7e, 0xeb, 0x8d, 0xc7, 0xf0, 0x41,
-       0x86, 0x5c, 0x23, 0x61, 0x85, 0x87, 0xd9, 0xe7, 0xd1, 0x84, 0x8a, 0x17,
-       0x07, 0xb7, 0x84, 0x87, 0x9c, 0xfe, 0xbf, 0x8d, 0xcd, 0x23, 0x92, 0x77,
-       0xb5, 0xd9, 0xdb, 0x53, 0xed, 0xb6, 0xc4, 0xdd, 0x6c, 0xa2, 0x92, 0xb9,
-       0xb9, 0x86, 0x0f, 0xe6, 0x6e, 0xc0, 0x39, 0x96, 0x19, 0x4d, 0x6c, 0xc4,
-       0x27, 0xe4, 0x08, 0x99, 0xc4, 0x72, 0xbc, 0xc6, 0x5c, 0xf2, 0x7b, 0x89,
-       0x56, 0xe6, 0x96, 0xab, 0xf0, 0xca, 0xa0, 0xf0, 0x8f, 0x16, 0x2c, 0x4c,
-       0x28, 0x58, 0x1a, 0x5a, 0x85, 0x93, 0xc3, 0xcc, 0x29, 0x07, 0xe5, 0xbc,
-       0xeb, 0x35, 0x58, 0x93, 0x3b, 0x0f, 0xc5, 0xe7, 0x31, 0x3e, 0x5f, 0x89,
-       0xa3, 0xc3, 0x01, 0x1c, 0x60, 0x0e, 0xf9, 0x0e, 0x31, 0x64, 0x28, 0xd1,
-       0x80, 0xd3, 0xcc, 0x95, 0x7e, 0x94, 0x88, 0xe0, 0x33, 0xfe, 0x3e, 0x92,
-       0x90, 0xf5, 0xef, 0x66, 0x5c, 0xc8, 0xfc, 0x18, 0x05, 0xbd, 0x33, 0x70,
-       0xbc, 0xed, 0x79, 0x52, 0xc9, 0x23, 0xfc, 0xb4, 0xe2, 0xf4, 0x70, 0x2b,
-       0xce, 0x0c, 0x2e, 0xc3, 0x99, 0xe1, 0x5f, 0xe1, 0x83, 0x41, 0x91, 0x57,
-       0xce, 0x2c, 0x3a, 0xef, 0x16, 0xb0, 0x5d, 0xe2, 0xd4, 0xf0, 0xbf, 0xa5,
-       0xed, 0x8f, 0xec, 0xe3, 0xab, 0xa4, 0xdd, 0xe7, 0xff, 0x48, 0xdb, 0xa2,
-       0x4b, 0x89, 0xf5, 0x5e, 0x9c, 0x4c, 0x78, 0x99, 0x57, 0x8d, 0xdf, 0x50,
-       0x84, 0xf1, 0xf9, 0xcc, 0x36, 0xb1, 0x3d, 0x53, 0x88, 0x17, 0xfb, 0xdc,
-       0xe4, 0x8a, 0x5f, 0x25, 0x7e, 0x74, 0xd2, 0x0e, 0x0b, 0x99, 0xbf, 0x79,
-       0xa9, 0xe3, 0xf9, 0xc4, 0xfb, 0x55, 0xd4, 0x9f, 0x0f, 0xa7, 0x12, 0x7e,
-       0xbc, 0x9e, 0xa8, 0x8f, 0x67, 0x95, 0x46, 0x58, 0x15, 0xb9, 0xbc, 0xf2,
-       0x68, 0xa2, 0xc3, 0x91, 0xe9, 0xd5, 0x44, 0x9b, 0xbd, 0x95, 0x3a, 0xee,
-       0x49, 0x7d, 0xdb, 0x39, 0x6f, 0xf8, 0x4a, 0xe2, 0x82, 0x2d, 0xe7, 0x88,
-       0x9f, 0xa1, 0x4e, 0x4f, 0x26, 0xe2, 0x28, 0x62, 0x9e, 0x72, 0x2c, 0x31,
-       0x8e, 0x61, 0xda, 0xe5, 0x3b, 0x7d, 0xc6, 0x89, 0x35, 0xd8, 0x84, 0xcf,
-       0xd2, 0x85, 0x78, 0x8b, 0x7d, 0x94, 0x37, 0xb9, 0x31, 0xe1, 0xb4, 0xb7,
-       0x09, 0x9f, 0xf4, 0x29, 0xc8, 0xcc, 0xdd, 0x84, 0x8f, 0xf9, 0xec, 0x0d,
-       0x5e, 0x9f, 0x0b, 0x53, 0xc2, 0xc9, 0x67, 0x67, 0xfa, 0x54, 0x27, 0x07,
-       0xee, 0x6e, 0xde, 0x84, 0xd3, 0xe9, 0x8f, 0x71, 0x80, 0xb9, 0xf4, 0x63,
-       0xe6, 0x34, 0x44, 0xa6, 0x11, 0x70, 0x8d, 0x42, 0x9c, 0xe4, 0xf3, 0x5a,
-       0x59, 0xef, 0xd1, 0x72, 0xe5, 0x3f, 0xe2, 0x78, 0x1e, 0x61, 0x5b, 0x67,
-       0xd3, 0xdf, 0x61, 0xbb, 0xc2, 0x39, 0xbf, 0xc3, 0x76, 0x7f, 0x85, 0x91,
-       0x49, 0x7d, 0x9c, 0x36, 0x65, 0x5c, 0x1b, 0x7c, 0x28, 0xf6, 0x73, 0x1c,
-       0x0f, 0xf3, 0xbb, 0x03, 0x13, 0x99, 0x9d, 0xfc, 0x7e, 0x0d, 0x87, 0x33,
-       0x12, 0xdb, 0xf3, 0x67, 0x87, 0x64, 0x7d, 0x4b, 0xfc, 0x47, 0x9f, 0x5c,
-       0x97, 0x9b, 0x8e, 0x54, 0x7f, 0x59, 0x7c, 0x1a, 0xed, 0xe8, 0x3f, 0xcc,
-       0x2b, 0xc7, 0x47, 0x61, 0x0b, 0xbb, 0x0e, 0xb8, 0x91, 0xea, 0x25, 0x9f,
-       0xed, 0xad, 0xc4, 0x53, 0xbb, 0x35, 0x3c, 0xb9, 0xfb, 0x5a, 0x6c, 0xd9,
-       0x7d, 0x3d, 0xf6, 0xed, 0xae, 0x46, 0x92, 0xb9, 0xf2, 0x27, 0x4d, 0xb6,
-       0x3d, 0x87, 0x9f, 0x1d, 0xf4, 0x05, 0x2f, 0xbf, 0x5f, 0x0e, 0x8b, 0x9f,
-       0x18, 0xb8, 0xd1, 0xf1, 0x97, 0x16, 0xdc, 0xe0, 0x7c, 0xc7, 0x30, 0x27,
-       0xd3, 0x19, 0xde, 0x90, 0xdd, 0x14, 0x7e, 0x28, 0x3b, 0x1d, 0x5b, 0xfb,
-       0xab, 0xd0, 0xbf, 0xbb, 0x32, 0x5e, 0xc9, 0x7e, 0x56, 0xce, 0xb3, 0x31,
-       0xc4, 0xba, 0x66, 0x63, 0x4f, 0x78, 0x4d, 0xf6, 0x79, 0xb4, 0x65, 0xfd,
-       0xd8, 0xdc, 0x1f, 0x60, 0x5f, 0xb2, 0x86, 0xef, 0x3e, 0xf1, 0x20, 0x6c,
-       0xfb, 0x42, 0xd3, 0x11, 0xc6, 0xb7, 0x1f, 0xa3, 0x9d, 0xcf, 0x92, 0xfd,
-       0x1b, 0xc8, 0xa9, 0x0a, 0xe2, 0xde, 0xa8, 0x8d, 0x53, 0xe1, 0x71, 0xdc,
-       0xc1, 0xf6, 0x76, 0xf6, 0x97, 0x51, 0xa6, 0xe2, 0x78, 0x21, 0xef, 0x2d,
-       0x0d, 0x6f, 0xc4, 0xae, 0x31, 0x59, 0x03, 0x3c, 0x81, 0xa5, 0xe4, 0x2c,
-       0x15, 0x73, 0x7f, 0x56, 0x82, 0x32, 0xcd, 0x7d, 0xbe, 0x59, 0xec, 0x2f,
-       0x4e, 0xfb, 0x13, 0xac, 0x5c, 0x87, 0xb5, 0xce, 0xd9, 0xc2, 0x76, 0xbc,
-       0x94, 0x10, 0x9c, 0x5e, 0x8d, 0x83, 0x89, 0x75, 0xd8, 0x92, 0x92, 0x7d,
-       0xc0, 0xe5, 0xa8, 0xc9, 0xfe, 0x55, 0x78, 0x3d, 0xe3, 0xa9, 0x2b, 0xfb,
-       0x3f, 0xb0, 0x38, 0x9b, 0xa6, 0x5c, 0xc3, 0xe1, 0xb5, 0xd9, 0x7d, 0xe1,
-       0x07, 0xb3, 0xad, 0x98, 0x95, 0x95, 0xf5, 0xb4, 0x36, 0xe2, 0xbb, 0xac,
-       0xa7, 0x4d, 0x60, 0x61, 0xf6, 0x0c, 0x16, 0x65, 0xdf, 0x62, 0x2c, 0x16,
-       0xdc, 0x90, 0x75, 0xb6, 0x5f, 0x31, 0x39, 0x91, 0x7d, 0xc3, 0xbf, 0xc4,
-       0xd6, 0xbd, 0x71, 0xc6, 0xc2, 0x3c, 0x46, 0xd5, 0x6b, 0x07, 0x04, 0x5f,
-       0xc6, 0x3c, 0x4e, 0x2c, 0xe8, 0x4b, 0xdd, 0x43, 0x7b, 0x54, 0xc9, 0xf3,
-       0x25, 0xce, 0xac, 0xa3, 0x2f, 0x77, 0x92, 0x9f, 0x4b, 0xfc, 0xbb, 0x6b,
-       0xf2, 0xbe, 0xf0, 0x3a, 0x89, 0x7d, 0x3a, 0x8e, 0x66, 0x9c, 0xbd, 0x0c,
-       0xdd, 0x6b, 0xdc, 0xc1, 0x67, 0x52, 0xff, 0x2f, 0x91, 0xdc, 0xbb, 0xca,
-       0xde, 0xe9, 0xac, 0x19, 0x29, 0x38, 0x1e, 0x62, 0x5f, 0xa4, 0x91, 0x4b,
-       0xf7, 0xcb, 0x59, 0xce, 0x75, 0x72, 0x96, 0xd3, 0x72, 0x19, 0x6d, 0xf6,
-       0x96, 0x14, 0x1e, 0x2c, 0x45, 0x00, 0xcb, 0x47, 0x0b, 0x10, 0x3b, 0x58,
-       0x8c, 0xdb, 0x77, 0xb7, 0xd3, 0x96, 0x2d, 0xda, 0xaf, 0x61, 0xae, 0x55,
-       0x8a, 0xb1, 0x84, 0xf7, 0x1e, 0xe8, 0x0f, 0xb6, 0x02, 0xa1, 0x13, 0xa7,
-       0x5d, 0xc5, 0xb8, 0x9f, 0xb1, 0x23, 0x9d, 0x5e, 0x8e, 0xd8, 0xfe, 0xe3,
-       0xb0, 0xd2, 0xb4, 0xc9, 0x3d, 0xc4, 0x99, 0xbd, 0x6e, 0xa8, 0xd1, 0x5f,
-       0x61, 0xdf, 0xb0, 0x8a, 0xf2, 0x3d, 0x2f, 0xd8, 0x01, 0x43, 0x31, 0xce,
-       0x85, 0xb2, 0xe4, 0x40, 0x6e, 0x94, 0x26, 0x5b, 0x30, 0x4a, 0xac, 0xf1,
-       0x25, 0x63, 0xc8, 0x64, 0xda, 0x90, 0x26, 0x96, 0xa4, 0xc9, 0x9b, 0x4a,
-       0x92, 0x26, 0x63, 0x79, 0x1d, 0x76, 0xd1, 0x5f, 0x0a, 0x98, 0xcb, 0x6f,
-       0xcb, 0xdc, 0x0a, 0x6b, 0xf8, 0x4e, 0x6c, 0x1f, 0x6e, 0xe3, 0x87, 0xfc,
-       0x71, 0xf8, 0xdb, 0x58, 0x38, 0x7a, 0x02, 0x3d, 0x99, 0x38, 0xed, 0xf1,
-       0x63, 0x6c, 0x4f, 0x1f, 0xc3, 0x53, 0x7d, 0x5d, 0xcc, 0x11, 0x8e, 0xe1,
-       0x49, 0x5e, 0xf7, 0xf5, 0x19, 0x9d, 0x01, 0xf5, 0x18, 0x52, 0xe9, 0x4d,
-       0xb8, 0xb3, 0x5f, 0x61, 0x0e, 0xb7, 0x09, 0x77, 0xec, 0xa7, 0x2d, 0x3e,
-       0xd1, 0x81, 0xd6, 0xd1, 0xd7, 0x90, 0xc8, 0xbc, 0xc4, 0xfc, 0x6a, 0x23,
-       0x7a, 0x52, 0x1b, 0xc8, 0xbd, 0x9e, 0x67, 0x3b, 0x47, 0xe8, 0xe7, 0x9d,
-       0x1c, 0xe3, 0xe3, 0xfc, 0x5c, 0xc2, 0x70, 0x4d, 0x57, 0xf2, 0x58, 0x4d,
-       0xbf, 0x4f, 0x49, 0xee, 0xb0, 0x8e, 0x38, 0x71, 0x6f, 0x29, 0x8a, 0x45,
-       0xbf, 0xf9, 0x35, 0x69, 0x99, 0x0b, 0xb1, 0x7d, 0x59, 0x9b, 0x76, 0xa3,
-       0x28, 0x29, 0xeb, 0xd1, 0xe3, 0xc1, 0x22, 0x72, 0x00, 0x6f, 0x52, 0x74,
-       0xd8, 0x6e, 0x77, 0xa7, 0x04, 0x4b, 0x72, 0xdc, 0xfc, 0xe5, 0xcc, 0xaf,
-       0xb0, 0x75, 0x70, 0x1a, 0x16, 0xf5, 0x55, 0x23, 0xee, 0xb7, 0xed, 0xe7,
-       0xe8, 0x6b, 0x09, 0xe6, 0x58, 0xbb, 0xfa, 0x63, 0xc4, 0x94, 0x12, 0xe4,
-       0x72, 0x3d, 0xd1, 0x4d, 0xd0, 0xd4, 0xaf, 0xd8, 0x23, 0x99, 0xc5, 0x79,
-       0x13, 0xee, 0x3a, 0x7e, 0x43, 0x29, 0xce, 0x97, 0xe4, 0xd6, 0xc5, 0xff,
-       0xfc, 0x12, 0xb7, 0xf9, 0xd7, 0x95, 0xbf, 0xff, 0xdf, 0x58, 0x7e, 0x62,
-       0xca, 0xd9, 0xb5, 0xfc, 0x7b, 0x39, 0x32, 0xd6, 0xeb, 0xe5, 0xdc, 0x9a,
-       0x25, 0x7c, 0x49, 0xce, 0xdc, 0x1e, 0x4f, 0x14, 0x30, 0x4e, 0xaa, 0x0b,
-       0x3c, 0x50, 0xfd, 0x1e, 0x14, 0x32, 0x9e, 0x55, 0x61, 0xb3, 0xdf, 0xc6,
-       0x62, 0xb3, 0x00, 0x87, 0x1b, 0x62, 0x72, 0xce, 0xa2, 0xdd, 0xe3, 0xf0,
-       0xd1, 0xd5, 0xf7, 0xfc, 0xe1, 0xba, 0xf5, 0x26, 0x72, 0x37, 0x39, 0x5f,
-       0xd0, 0x86, 0x53, 0x15, 0xf2, 0xae, 0xd0, 0x26, 0xe7, 0xdc, 0x59, 0x51,
-       0xad, 0xac, 0xa3, 0xe9, 0x38, 0x61, 0xd4, 0xeb, 0x95, 0x2a, 0xe3, 0xb9,
-       0xf2, 0xae, 0x6d, 0xf9, 0xa3, 0x8c, 0xf5, 0x72, 0x86, 0xe2, 0x5f, 0xda,
-       0xa7, 0x58, 0x83, 0xed, 0x4f, 0x34, 0x63, 0x62, 0x95, 0xc4, 0xff, 0xff,
-       0xe6, 0xcb, 0x73, 0xba, 0x6d, 0xa9, 0x1f, 0x96, 0xca, 0xb9, 0x24, 0x69,
-       0x7b, 0x3b, 0xf3, 0x27, 0x8f, 0x11, 0xc6, 0xbb, 0xc2, 0xd2, 0x9c, 0xfd,
-       0xa4, 0x1c, 0xa7, 0x28, 0x34, 0xce, 0x4f, 0xbe, 0x3b, 0xf2, 0xd7, 0xa5,
-       0xc2, 0x0f, 0xb7, 0xa5, 0x36, 0x91, 0x9b, 0x8b, 0x3c, 0xbf, 0xb7, 0xd7,
-       0xf8, 0x2b, 0x59, 0xf6, 0xee, 0xc9, 0xf6, 0xc4, 0x16, 0xe4, 0x4c, 0x8e,
-       0xdc, 0x93, 0x3a, 0xa2, 0xb3, 0xa9, 0x75, 0x5c, 0xcc, 0x85, 0x6f, 0xc0,
-       0xa3, 0xf4, 0xc1, 0x99, 0xc6, 0xeb, 0x76, 0x97, 0x9c, 0x9f, 0xa9, 0xd5,
-       0xa6, 0xf4, 0xf5, 0x0b, 0x47, 0x96, 0x42, 0xca, 0xd2, 0x9f, 0x92, 0xb3,
-       0xa8, 0x9f, 0xd9, 0xb5, 0x55, 0xf2, 0xfc, 0xc2, 0x64, 0xfb, 0x35, 0xce,
-       0xd9, 0xbe, 0x7d, 0xa9, 0xbc, 0xdc, 0xb2, 0xde, 0xea, 0xcf, 0xf7, 0x55,
-       0x77, 0x79, 0x3c, 0x22, 0x5b, 0xbc, 0xf4, 0x4a, 0x99, 0xe1, 0xcb, 0x9f,
-       0x59, 0x9d, 0xe1, 0xd4, 0xc9, 0xf7, 0x29, 0x32, 0x6e, 0x62, 0x9e, 0x7a,
-       0xf5, 0x18, 0xb5, 0x29, 0x63, 0x92, 0x3a, 0x32, 0x2e, 0x6d, 0xd2, 0x0e,
-       0x4a, 0xcb, 0x50, 0x2c, 0x75, 0x84, 0xbb, 0x6a, 0x0e, 0x07, 0x2f, 0x17,
-       0x5e, 0x2e, 0xb6, 0x51, 0x66, 0xdb, 0xef, 0x39, 0x31, 0x53, 0xda, 0xe1,
-       0x38, 0xc6, 0x56, 0xd1, 0xce, 0xed, 0x2e, 0xe2, 0xa7, 0xfd, 0x5e, 0x73,
-       0x00, 0x5b, 0x13, 0xa2, 0x6b, 0x23, 0x70, 0x88, 0xd8, 0xb1, 0xd9, 0xe1,
-       0x1b, 0x1e, 0x74, 0xa7, 0xf3, 0xfb, 0xa3, 0x85, 0x72, 0xf6, 0x36, 0x20,
-       0x3a, 0xef, 0x36, 0xc9, 0xb3, 0xb4, 0x85, 0xba, 0x9b, 0x5c, 0x69, 0x3d,
-       0xfe, 0x99, 0xf3, 0x2b, 0xe7, 0x8f, 0x73, 0x7b, 0x95, 0x71, 0xda, 0x51,
-       0x2e, 0x5e, 0x81, 0xf1, 0x9d, 0x3c, 0x69, 0xf2, 0x5c, 0x66, 0x77, 0xe6,
-       0x9f, 0xed, 0x71, 0xe7, 0x5c, 0xe6, 0xe5, 0x77, 0x3a, 0xd2, 0x9a, 0x6d,
-       0x1f, 0xe0, 0xb3, 0xcb, 0x67, 0x34, 0x19, 0xd3, 0x0d, 0x39, 0xcb, 0xf9,
-       0x4f, 0x9c, 0xbb, 0xa9, 0x65, 0xc7, 0x2b, 0x72, 0x67, 0x96, 0x63, 0xea,
-       0x42, 0x23, 0x8f, 0xab, 0x41, 0xcb, 0x72, 0x70, 0xf5, 0x0e, 0x67, 0x0f,
-       0x3e, 0x8d, 0x60, 0x6b, 0x1b, 0x2c, 0xbb, 0xd8, 0xc8, 0xe3, 0x80, 0x61,
-       0xce, 0x51, 0xba, 0x30, 0x3b, 0x5c, 0x2c, 0x1c, 0x3b, 0xe8, 0x8e, 0x06,
-       0xb5, 0x0f, 0x10, 0xaa, 0x3b, 0xe6, 0xec, 0x95, 0x0a, 0x36, 0x18, 0x58,
-       0x9f, 0x21, 0xdf, 0x1e, 0x93, 0x77, 0x1d, 0xe5, 0xda, 0x69, 0x9f, 0xd7,
-       0x82, 0xa5, 0xed, 0xc4, 0x52, 0xeb, 0xcf, 0x3d, 0x4e, 0x7b, 0xc1, 0xf6,
-       0x61, 0x25, 0xd8, 0xba, 0x51, 0xc9, 0xb7, 0xe7, 0xfb, 0x92, 0xf6, 0xea,
-       0x58, 0xbf, 0x7a, 0xf2, 0xfd, 0x42, 0x83, 0x6d, 0x5c, 0xbd, 0x9f, 0x3c,
-       0x3d, 0x2e, 0x7b, 0x51, 0x87, 0x27, 0x39, 0xe1, 0xb1, 0x3f, 0xd8, 0x8b,
-       0xfa, 0xd2, 0x3e, 0x63, 0xec, 0xb3, 0xb5, 0x58, 0x89, 0x91, 0x31, 0x74,
-       0xa1, 0x30, 0x1c, 0xaa, 0x7b, 0x19, 0xd0, 0xdd, 0xd1, 0x50, 0x60, 0xd8,
-       0xd9, 0xd3, 0x35, 0xbd, 0x8b, 0x9c, 0xfa, 0xd5, 0xe4, 0xc5, 0x7f, 0x5c,
-       0x27, 0x25, 0x86, 0xd1, 0x56, 0xaf, 0xc4, 0xe6, 0x17, 0xb3, 0x9d, 0xba,
-       0x30, 0xf4, 0x82, 0x68, 0x5e, 0x47, 0xa1, 0xba, 0x0f, 0x38, 0x9f, 0x47,
-       0x9b, 0x43, 0x81, 0x21, 0xe7, 0x8c, 0xa7, 0xe8, 0xc5, 0xf4, 0xe6, 0xe6,
-       0x5e, 0x17, 0xbe, 0xcd, 0x7c, 0x32, 0x8e, 0x91, 0x84, 0x97, 0x63, 0xa9,
-       0xd7, 0xb6, 0xa3, 0x82, 0x36, 0x8e, 0xd8, 0xe6, 0x06, 0xe2, 0x77, 0x02,
-       0x31, 0xd7, 0x8d, 0xe5, 0x88, 0x93, 0x40, 0xbb, 0x8c, 0x38, 0x39, 0x51,
-       0x7d, 0xdd, 0x0e, 0xda, 0x6f, 0xda, 0x1f, 0x0c, 0x58, 0x88, 0xe3, 0xc5,
-       0xc4, 0xc2, 0xff, 0xc7, 0x05, 0xcb, 0x2c, 0x81, 0xbc, 0x5f, 0x90, 0xbe,
-       0x67, 0x59, 0x28, 0xa8, 0xbf, 0x32, 0xb9, 0x27, 0xdd, 0x9d, 0xf8, 0xad,
-       0xbc, 0xc7, 0xc4, 0x7a, 0x7f, 0xac, 0x8c, 0xf4, 0xed, 0xc5, 0xa1, 0xbe,
-       0x3e, 0x6c, 0x79, 0x82, 0x32, 0x1a, 0x36, 0x16, 0x9a, 0x5d, 0xcc, 0xa5,
-       0x7d, 0x58, 0xa7, 0xcd, 0x8e, 0xa8, 0x2c, 0x37, 0x94, 0xce, 0xad, 0x3b,
-       0x6e, 0x75, 0xf6, 0xbc, 0x7b, 0x98, 0xa3, 0x38, 0xf1, 0x53, 0xf3, 0x46,
-       0x63, 0xca, 0xce, 0x4c, 0x8b, 0xb2, 0x23, 0x2d, 0x6d, 0x75, 0x2a, 0x3d,
-       0x99, 0xbf, 0xa5, 0x4f, 0x58, 0x38, 0x6d, 0xca, 0xbb, 0x39, 0xd2, 0xae,
-       0x85, 0xe1, 0xe6, 0x7f, 0xcd, 0x3b, 0x3a, 0xa2, 0xd3, 0x4e, 0x6c, 0x1e,
-       0x7c, 0x1c, 0xdd, 0x83, 0xa7, 0x9c, 0x33, 0x46, 0x1e, 0xc3, 0x6b, 0x5d,
-       0x1f, 0x0d, 0x1e, 0xb1, 0x90, 0x2d, 0x97, 0xf3, 0xf9, 0x55, 0xd1, 0x13,
-       0xd8, 0xa9, 0xc9, 0xbb, 0x27, 0x3d, 0xe4, 0x11, 0xb2, 0x6f, 0xbb, 0x1a,
-       0x5f, 0xef, 0x95, 0x39, 0x2c, 0xb3, 0x0a, 0xa3, 0xc1, 0xd8, 0x3a, 0x67,
-       0x0e, 0x1b, 0x70, 0x32, 0xfb, 0x38, 0xde, 0xdb, 0xd3, 0x05, 0x35, 0x1c,
-       0x0c, 0xdc, 0x06, 0xbb, 0xeb, 0xb8, 0x19, 0xb3, 0x3c, 0x08, 0x1e, 0x76,
-       0xa9, 0xc0, 0x0b, 0x7b, 0xe0, 0x9d, 0xc1, 0xf9, 0x9f, 0xcf, 0x18, 0x5d,
-       0x6e, 0xd8, 0x0b, 0xfe, 0xb1, 0x29, 0xd8, 0x63, 0xb8, 0xac, 0xbf, 0x99,
-       0x8e, 0x60, 0x5f, 0x44, 0x35, 0xda, 0xef, 0x52, 0xa1, 0xf8, 0xa2, 0xf2,
-       0x5e, 0x69, 0x17, 0xee, 0x6c, 0xf4, 0x59, 0xa5, 0xd1, 0x60, 0xdf, 0x29,
-       0x25, 0x58, 0x67, 0xa9, 0x6d, 0x9c, 0xe7, 0x3a, 0xbc, 0x42, 0x0e, 0xd2,
-       0xca, 0xd8, 0xbb, 0x34, 0xa9, 0x3b, 0xeb, 0x4c, 0xaa, 0x51, 0x13, 0x29,
-       0x52, 0x34, 0xdc, 0x96, 0x05, 0x8e, 0xa6, 0x57, 0xe3, 0x9d, 0x3d, 0x26,
-       0xf3, 0x54, 0x9d, 0xb8, 0xf5, 0xbd, 0x32, 0xc1, 0x80, 0x0e, 0xd3, 0xaa,
-       0x57, 0x19, 0xfb, 0x3d, 0x2a, 0x16, 0xce, 0x8c, 0x86, 0xc6, 0x17, 0xb8,
-       0xdc, 0x88, 0x64, 0x65, 0xfd, 0x53, 0x97, 0xb3, 0xc9, 0xb8, 0x2b, 0xe9,
-       0x25, 0xff, 0xac, 0xc6, 0x6f, 0xc8, 0x83, 0x7f, 0x4d, 0xbe, 0x3b, 0xc1,
-       0x78, 0x3e, 0x91, 0x29, 0x66, 0xbe, 0xe8, 0x91, 0x1c, 0x78, 0xdc, 0xc3,
-       0xb9, 0x28, 0x6b, 0xf4, 0xe3, 0xdc, 0xb0, 0x17, 0x77, 0xec, 0x09, 0xee,
-       0x9b, 0x50, 0xab, 0xf0, 0xc9, 0x70, 0x31, 0x96, 0x0f, 0x78, 0x29, 0x9b,
-       0x8d, 0x5d, 0xc4, 0xff, 0x8f, 0xf8, 0xac, 0x65, 0x0f, 0x94, 0xcc, 0xdc,
-       0x59, 0xe4, 0xec, 0x06, 0xeb, 0x97, 0x60, 0xd9, 0x80, 0xf0, 0x34, 0x15,
-       0x1f, 0x0e, 0x2b, 0xf8, 0x20, 0x6d, 0x62, 0x21, 0xfb, 0xdb, 0x9c, 0x7a,
-       0xc1, 0xf6, 0xd2, 0xcf, 0xd7, 0x64, 0x4c, 0x3c, 0x98, 0xd6, 0x19, 0x53,
-       0xde, 0xb6, 0x5d, 0x46, 0x23, 0xde, 0xde, 0x6d, 0x9c, 0x78, 0xd7, 0x15,
-       0x1a, 0x9f, 0xeb, 0x6a, 0xc4, 0x5b, 0x07, 0x1b, 0xf1, 0xb3, 0xfe, 0x05,
-       0xb8, 0xb9, 0x31, 0x86, 0xf3, 0x73, 0x1b, 0xf1, 0xe6, 0x7e, 0x1d, 0x3b,
-       0x52, 0xcd, 0xd0, 0x47, 0xc7, 0xc9, 0x4f, 0x23, 0xa8, 0x67, 0x4e, 0x65,
-       0xf4, 0xdb, 0x5d, 0x25, 0xd1, 0x2e, 0xec, 0x34, 0xa3, 0x98, 0xb3, 0x5f,
-       0xf4, 0x60, 0xdb, 0xeb, 0xe6, 0x46, 0xf1, 0x72, 0x9f, 0x41, 0x3f, 0x8d,
-       0x52, 0x0f, 0x3a, 0x9e, 0x24, 0x36, 0x87, 0x9e, 0x30, 0x2e, 0x1c, 0xe0,
-       0xef, 0x05, 0x07, 0x9a, 0xd1, 0xce, 0xfe, 0x13, 0xa9, 0x18, 0xf6, 0x8d,
-       0x36, 0x70, 0xcc, 0x26, 0xc7, 0x5f, 0x63, 0xfd, 0x46, 0x69, 0x41, 0xdf,
-       0x68, 0x2b, 0xf9, 0x66, 0x17, 0x79, 0x66, 0x2b, 0x7a, 0xd9, 0xd6, 0xd6,
-       0x94, 0x89, 0x65, 0xc9, 0x56, 0x3c, 0x9d, 0x90, 0x33, 0x8d, 0x46, 0x64,
-       0x9e, 0x22, 0xef, 0x7d, 0xb5, 0xe2, 0x10, 0x75, 0xb2, 0x70, 0x60, 0x39,
-       0xed, 0xd0, 0x8b, 0x45, 0x7b, 0x74, 0x3c, 0x95, 0xba, 0x13, 0xef, 0x8c,
-       0x98, 0x68, 0x4b, 0x8a, 0xbe, 0xe5, 0x5c, 0x4d, 0x1c, 0xc7, 0x19, 0x5b,
-       0x7e, 0x33, 0x10, 0xfb, 0x1b, 0x4e, 0xf3, 0x49, 0x15, 0xc1, 0xce, 0x19,
-       0x9c, 0xf0, 0x9b, 0x1a, 0xe5, 0x6c, 0x94, 0x8b, 0xa8, 0x16, 0xb4, 0xca,
-       0x55, 0x4b, 0xe7, 0x7d, 0xcb, 0xad, 0x6e, 0xc2, 0x37, 0x06, 0xdc, 0xe4,
-       0xf4, 0x2a, 0x73, 0x11, 0xab, 0x83, 0xb6, 0x61, 0x95, 0xa9, 0xb9, 0x79,
-       0xdb, 0x2e, 0xef, 0xa1, 0x19, 0x2e, 0xec, 0x32, 0x6b, 0xda, 0x4a, 0x58,
-       0x6f, 0x69, 0x38, 0x18, 0x2b, 0x52, 0x9b, 0x99, 0x27, 0x3e, 0x8e, 0x75,
-       0x7b, 0x1e, 0xc7, 0x1a, 0x7e, 0x3a, 0xf6, 0xd8, 0x5d, 0x4b, 0x4c, 0x05,
-       0x2f, 0x1a, 0x76, 0x57, 0x97, 0x69, 0x70, 0x6e, 0x65, 0x5e, 0x1f, 0x47,
-       0xe7, 0xa1, 0xc7, 0xf1, 0x28, 0xed, 0xab, 0x92, 0x7e, 0xbc, 0x32, 0x69,
-       0x77, 0xdd, 0xdc, 0x58, 0x87, 0x4f, 0x9d, 0xfc, 0x43, 0xec, 0x75, 0xab,
-       0x93, 0x13, 0xa7, 0x55, 0xb9, 0xde, 0xed, 0x5c, 0x5b, 0xea, 0x2b, 0x65,
-       0xf9, 0xd8, 0xf2, 0x5b, 0xb6, 0xfb, 0xbb, 0x3d, 0xe5, 0x78, 0xa2, 0x52,
-       0xe2, 0x87, 0xac, 0xed, 0x42, 0x31, 0xe6, 0x32, 0xcf, 0x7a, 0xe2, 0x38,
-       0xb6, 0x93, 0xb7, 0xf9, 0xc3, 0x92, 0x03, 0xd7, 0x9b, 0x5b, 0xd4, 0x5b,
-       0x89, 0xed, 0x0a, 0x76, 0xd6, 0xf6, 0xa1, 0x97, 0xbe, 0xba, 0xab, 0x36,
-       0x18, 0xef, 0x45, 0xd4, 0xde, 0x35, 0xbd, 0xe7, 0xdf, 0xf0, 0x5e, 0x96,
-       0xbc, 0xb7, 0x9d, 0x7f, 0x37, 0xeb, 0x71, 0x74, 0xed, 0x91, 0xf9, 0x7f,
-       0x1c, 0x8f, 0x51, 0xfe, 0xce, 0x81, 0xc7, 0xf1, 0x4d, 0xda, 0x4e, 0x45,
-       0xd3, 0xd1, 0xc7, 0x2a, 0x30, 0xbb, 0xaf, 0x1c, 0xe3, 0x0f, 0x57, 0xca,
-       0x39, 0x28, 0x62, 0x62, 0xaf, 0xf2, 0x38, 0xd6, 0x0f, 0x1d, 0xa0, 0x2f,
-       0x3a, 0xfe, 0x47, 0x2c, 0xce, 0xc7, 0xab, 0x00, 0xd6, 0x11, 0x93, 0x73,
-       0xb8, 0xee, 0xc7, 0x9a, 0xc4, 0x61, 0xc7, 0xf7, 0x0b, 0xa2, 0xab, 0xe8,
-       0xf7, 0x6d, 0xf4, 0xfb, 0xe5, 0xf4, 0xfb, 0x56, 0xfa, 0x7d, 0x0b, 0xfd,
-       0x3e, 0x46, 0xbf, 0x8f, 0xd2, 0xef, 0x23, 0xf4, 0xfb, 0x66, 0xfa, 0xbd,
-       0x49, 0xbf, 0x87, 0x72, 0xa2, 0xf9, 0x38, 0x3c, 0xfd, 0x5e, 0xda, 0x50,
-       0xee, 0x3d, 0x99, 0x83, 0xc4, 0x9f, 0xd3, 0xe6, 0x9c, 0xc0, 0x62, 0xc6,
-       0xd5, 0x61, 0x62, 0x44, 0x7a, 0xe4, 0xaf, 0x9c, 0x77, 0x2a, 0xd2, 0xc4,
-       0xfd, 0x57, 0xa8, 0x8f, 0xa5, 0xe1, 0x1a, 0xf3, 0x69, 0xc6, 0xb0, 0x5f,
-       0x18, 0xf5, 0x3d, 0x7e, 0x96, 0xf9, 0x41, 0xaa, 0xbe, 0x6f, 0x1a, 0x0c,
-       0xab, 0x51, 0xdd, 0x0a, 0xac, 0xf4, 0x73, 0xcc, 0x72, 0xde, 0x6e, 0x25,
-       0x1e, 0x1b, 0x6c, 0xc3, 0x7f, 0x19, 0xd4, 0xa8, 0x8b, 0x9a, 0xf1, 0x5b,
-       0x5d, 0xf8, 0x71, 0x00, 0x2e, 0xff, 0x35, 0xc0, 0xe7, 0x55, 0x98, 0x73,
-       0x58, 0xde, 0xef, 0x4b, 0x57, 0xb9, 0x1a, 0x66, 0x42, 0x6c, 0x04, 0x44,
-       0x6a, 0x17, 0x33, 0xc1, 0x39, 0xce, 0x3b, 0x40, 0xb1, 0x55, 0x82, 0xe9,
-       0x45, 0xd8, 0x5a, 0xe7, 0xe0, 0xec, 0xb3, 0x72, 0x6e, 0xb0, 0x8a, 0x78,
-       0xe4, 0x8b, 0xb6, 0x62, 0x5b, 0xaf, 0x75, 0x7f, 0x15, 0x96, 0xa3, 0xa7,
-       0x37, 0xa7, 0x83, 0x87, 0xc3, 0x1a, 0xa9, 0x42, 0x48, 0x9f, 0xa3, 0xc0,
-       0xdd, 0xd1, 0x1c, 0xc1, 0x83, 0x99, 0x04, 0xfa, 0x38, 0xc6, 0x0d, 0xf4,
-       0xb3, 0x75, 0x7f, 0xfa, 0xdd, 0x4e, 0x7c, 0x33, 0xa1, 0xd3, 0xfe, 0x2f,
-       0xda, 0xe9, 0x8a, 0x39, 0x7d, 0x55, 0x30, 0x3a, 0x57, 0xa8, 0xf3, 0x98,
-       0xd3, 0x06, 0x8f, 0xc8, 0xc2, 0xf7, 0xf4, 0xa8, 0xd7, 0xaa, 0x20, 0x36,
-       0xcf, 0x1a, 0x80, 0x32, 0x9c, 0x94, 0xf7, 0x20, 0xba, 0xf0, 0xff, 0x99,
-       0x6d, 0x8e, 0xfd, 0x8c, 0xbb, 0x34, 0xcc, 0x4c, 0xca, 0x7d, 0x7b, 0xc1,
-       0x67, 0x4d, 0xc1, 0x3a, 0xdd, 0xb5, 0x81, 0xf7, 0xab, 0xf1, 0x23, 0xc6,
-       0xd9, 0xc0, 0xc0, 0x02, 0xa8, 0x4d, 0x5e, 0xdc, 0xdd, 0x50, 0x8a, 0xf8,
-       0x4a, 0xe1, 0xa1, 0x92, 0xef, 0xbb, 0xa9, 0xcf, 0xff, 0x17, 0x0f, 0x99,
-       0xcf, 0x61, 0xc2, 0x9f, 0x70, 0xf6, 0xdd, 0xd7, 0x99, 0x77, 0x28, 0x16,
-       0xaf, 0xb7, 0xa5, 0x2c, 0x6c, 0x30, 0x99, 0x0b, 0xdd, 0x53, 0xc9, 0x9c,
-       0x44, 0xca, 0x4b, 0xbb, 0x5b, 0x9d, 0xf6, 0x0e, 0xa6, 0xe4, 0x7a, 0xf7,
-       0x64, 0x9f, 0x77, 0x01, 0x95, 0x5e, 0xe2, 0xad, 0x82, 0x33, 0xb5, 0x09,
-       0xfa, 0x34, 0x7e, 0xec, 0x46, 0x4d, 0xba, 0x5f, 0x75, 0xfd, 0xf8, 0x1a,
-       0xcc, 0x31, 0x7f, 0xaf, 0xca, 0x7c, 0xc4, 0xf0, 0x54, 0x48, 0x41, 0xa5,
-       0x61, 0x9c, 0xff, 0x19, 0x7d, 0x6b, 0xc2, 0x95, 0xc0, 0x53, 0x63, 0xa7,
-       0xec, 0xf1, 0x6b, 0xfc, 0x9c, 0x73, 0xa9, 0xdb, 0x86, 0x0f, 0x06, 0x65,
-       0xce, 0x64, 0x9d, 0x9f, 0xb1, 0x5d, 0xd5, 0x51, 0xca, 0x7b, 0xa7, 0x87,
-       0x4d, 0xe6, 0x3a, 0x6d, 0xf8, 0xc7, 0xc1, 0x95, 0xf8, 0xfd, 0x60, 0x4d,
-       0xdb, 0x7f, 0x52, 0x6d, 0x7b, 0x69, 0xf8, 0x6b, 0xf8, 0x65, 0xa5, 0x86,
-       0xa7, 0x69, 0x43, 0xbf, 0x4f, 0x58, 0x4b, 0xaf, 0x21, 0x16, 0xfc, 0xef,
-       0x44, 0xf0, 0xc2, 0x49, 0x67, 0x5f, 0xa9, 0xde, 0xfc, 0xd0, 0x15, 0x8c,
-       0x9f, 0x51, 0x83, 0xd6, 0x36, 0x65, 0x39, 0xec, 0x4c, 0x2b, 0xce, 0x67,
-       0xa6, 0xda, 0x42, 0x97, 0x8d, 0x2a, 0xb1, 0x03, 0xb1, 0x07, 0xda, 0x22,
-       0x73, 0xb9, 0x9f, 0x92, 0x47, 0x77, 0x7f, 0x95, 0xf6, 0x98, 0xa2, 0x3d,
-       0xa6, 0x68, 0x8f, 0xc4, 0xa4, 0xe7, 0x89, 0x55, 0x3f, 0x48, 0xd1, 0x1e,
-       0xe9, 0x3f, 0xcf, 0xd1, 0x7f, 0x72, 0x5c, 0xb9, 0xdd, 0x39, 0xb7, 0xf6,
-       0x06, 0x63, 0x62, 0xe2, 0x09, 0x79, 0x27, 0xad, 0x66, 0x43, 0x16, 0xc1,
-       0xf6, 0x5e, 0xe5, 0xb3, 0x72, 0x39, 0x67, 0xfb, 0xed, 0x90, 0xf8, 0x40,
-       0x6e, 0x3f, 0xe0, 0xc8, 0xc8, 0x63, 0x65, 0xf2, 0x7e, 0xd4, 0xc1, 0xbd,
-       0xff, 0x92, 0xce, 0xfe, 0x3b, 0xe5, 0x10, 0x7d, 0xfd, 0x5b, 0xc7, 0x2e,
-       0xba, 0xfc, 0x1b, 0xfb, 0x97, 0x55, 0x32, 0xfe, 0x55, 0xf8, 0x62, 0xb0,
-       0x05, 0xe7, 0x19, 0x7f, 0xdf, 0x6a, 0x1a, 0xef, 0x0c, 0x20, 0xd8, 0x51,
-       0xae, 0x46, 0x91, 0xcd, 0xb4, 0xe0, 0xb3, 0x44, 0x14, 0x07, 0x12, 0x35,
-       0xed, 0x35, 0xae, 0xb3, 0x6a, 0x7c, 0x86, 0x58, 0x54, 0x0c, 0x9f, 0x92,
-       0x5f, 0x2e, 0xac, 0x8d, 0x60, 0x88, 0x6d, 0x7a, 0xa2, 0x1a, 0x46, 0x9a,
-       0xc5, 0x56, 0x73, 0xef, 0x4e, 0xfd, 0xa9, 0xbf, 0x2e, 0xda, 0xe3, 0x7b,
-       0x4d, 0x17, 0xed, 0x71, 0xcd, 0x6b, 0x69, 0xf4, 0xe1, 0xd2, 0x3d, 0xf2,
-       0x6e, 0xa9, 0xf8, 0xb3, 0x82, 0x1f, 0x84, 0xc7, 0xdb, 0xa6, 0x21, 0xf8,
-       0xec, 0x7d, 0xb4, 0xf5, 0x93, 0x49, 0x59, 0x53, 0x6c, 0xc1, 0xfb, 0x2c,
-       0xef, 0xa6, 0x5f, 0x9c, 0xcc, 0xb8, 0xdd, 0xbf, 0x4c, 0x2a, 0xcc, 0x4b,
-       0x97, 0xe3, 0x97, 0x99, 0x37, 0xd5, 0x8f, 0x35, 0x13, 0x67, 0xb2, 0x2b,
-       0x69, 0x4f, 0x92, 0xff, 0xc7, 0x98, 0xff, 0x07, 0x3b, 0x8f, 0x60, 0x25,
-       0xca, 0x0f, 0xad, 0x42, 0xd9, 0x1e, 0xe2, 0x67, 0x88, 0xf9, 0x3f, 0xaf,
-       0x67, 0xec, 0x91, 0xf7, 0x0d, 0xca, 0xed, 0xed, 0xab, 0x44, 0x2f, 0x82,
-       0x27, 0x7f, 0x57, 0x8e, 0xb2, 0x55, 0xc0, 0x21, 0xa9, 0x67, 0xb0, 0xde,
-       0x4a, 0x54, 0xee, 0xa9, 0x89, 0x2c, 0x46, 0xcd, 0xf9, 0xdb, 0xd4, 0x95,
-       0xb8, 0xfe, 0xd0, 0x3f, 0x73, 0x0e, 0xa4, 0x6c, 0x35, 0x9e, 0xa0, 0xdd,
-       0x16, 0x92, 0x13, 0xb6, 0x24, 0x7f, 0x6d, 0xcf, 0xa4, 0x2f, 0x7e, 0xf6,
-       0x15, 0x60, 0x5d, 0xd6, 0x60, 0xbc, 0x2b, 0x46, 0x7c, 0xe8, 0x29, 0xbb,
-       0x3c, 0xea, 0xc6, 0x9a, 0x6c, 0x03, 0x16, 0x0f, 0xd8, 0xf6, 0xb9, 0xb9,
-       0x31, 0xf8, 0xa2, 0x3e, 0x62, 0x98, 0x0f, 0x8f, 0x26, 0x4b, 0xf8, 0x2d,
-       0xc7, 0x4f, 0x42, 0xe3, 0xb3, 0x55, 0x63, 0xc3, 0x0c, 0x97, 0xd1, 0x9e,
-       0x55, 0x24, 0xee, 0xfb, 0xf0, 0x08, 0xe3, 0xf3, 0xd2, 0x64, 0x00, 0xf1,
-       0xac, 0x6d, 0xbf, 0xd9, 0xec, 0xc7, 0xc3, 0xac, 0xdf, 0x9a, 0xec, 0x41,
-       0x37, 0xed, 0x22, 0x7e, 0xc8, 0xd0, 0x35, 0xc6, 0xfb, 0x75, 0x59, 0x2f,
-       0x63, 0x58, 0x25, 0x6e, 0x63, 0x2c, 0x7a, 0x54, 0xce, 0xca, 0xd0, 0x07,
-       0xdf, 0x31, 0xad, 0x1b, 0x5c, 0x30, 0xd0, 0x99, 0xf5, 0x63, 0x79, 0x32,
-       0x78, 0x41, 0xde, 0xcd, 0xfb, 0xcc, 0xac, 0xc3, 0xc6, 0x6c, 0x00, 0xb7,
-       0x27, 0x8f, 0x3e, 0x3a, 0x13, 0xd6, 0x7f, 0x9e, 0x81, 0x06, 0x7c, 0x3d,
-       0x5b, 0xcd, 0xf6, 0x83, 0x1b, 0xde, 0x50, 0xaa, 0xf1, 0x8d, 0x43, 0x26,
-       0xdb, 0x57, 0xb1, 0x8c, 0xed, 0x2c, 0x49, 0x5e, 0x8f, 0x47, 0x0e, 0x35,
-       0xe3, 0xc1, 0x6c, 0x13, 0x16, 0x31, 0x3e, 0x75, 0x30, 0x37, 0xc4, 0xbd,
-       0xc0, 0xed, 0x03, 0xa2, 0x7b, 0x28, 0x6f, 0x36, 0x8f, 0x33, 0x5f, 0x36,
-       0x41, 0x43, 0x74, 0xf6, 0x92, 0x77, 0xd2, 0x56, 0x6f, 0xdf, 0xdf, 0x84,
-       0xa5, 0x03, 0x2a, 0x6a, 0xc2, 0x85, 0x88, 0xb7, 0x29, 0x68, 0x19, 0x90,
-       0x38, 0x2b, 0xdc, 0xc6, 0x64, 0x5c, 0x0d, 0xb1, 0x0f, 0x93, 0x71, 0x35,
-       0x77, 0xbf, 0x3b, 0x25, 0x6b, 0x0b, 0x6f, 0x93, 0x2f, 0x85, 0xd1, 0xe2,
-       0xc4, 0x68, 0x59, 0x13, 0xb7, 0xe0, 0x66, 0xec, 0x0e, 0xd3, 0xc6, 0x17,
-       0x34, 0x4a, 0xac, 0xd6, 0x9d, 0xbd, 0xa9, 0xb1, 0x7e, 0xa3, 0xe3, 0x82,
-       0x42, 0xfb, 0xda, 0x2f, 0x31, 0xd1, 0x8f, 0x8d, 0xc9, 0x28, 0xde, 0xe9,
-       0x63, 0xbc, 0xb9, 0x31, 0xb6, 0xb4, 0x04, 0x86, 0xf9, 0x08, 0x42, 0xd6,
-       0x49, 0xc6, 0xf6, 0xf3, 0xe9, 0x4a, 0x2c, 0xde, 0x23, 0x65, 0x1a, 0xf1,
-       0xee, 0xb0, 0xec, 0x4d, 0x6e, 0xc2, 0x53, 0x7d, 0x2e, 0x0c, 0x99, 0x35,
-       0x3d, 0x2a, 0xe3, 0xe7, 0xfc, 0xc6, 0xa0, 0xf6, 0x23, 0x72, 0xd5, 0x0b,
-       0x4d, 0x8c, 0xca, 0xd7, 0x34, 0xa3, 0x85, 0x72, 0xb5, 0x18, 0xe2, 0x93,
-       0x16, 0x1e, 0x6c, 0xde, 0x84, 0x93, 0x7d, 0x86, 0xf5, 0xb4, 0xac, 0x03,
-       0x34, 0xf2, 0xf9, 0x74, 0x37, 0x36, 0x1b, 0xc2, 0x69, 0x75, 0xfa, 0x16,
-       0x59, 0xa7, 0xd1, 0x8c, 0x77, 0x68, 0xaf, 0x3d, 0xe9, 0x05, 0x8c, 0xfd,
-       0x12, 0xf3, 0xbd, 0x56, 0x80, 0xf5, 0xca, 0xbf, 0xa2, 0xe0, 0xf4, 0x01,
-       0xe1, 0x58, 0x0b, 0x70, 0xff, 0x80, 0xec, 0x0b, 0xa8, 0x98, 0x7f, 0x68,
-       0x35, 0xce, 0xed, 0xce, 0x71, 0xae, 0x37, 0xc3, 0xd6, 0xd7, 0xc9, 0xb9,
-       0xda, 0x4b, 0xc9, 0xb9, 0xc8, 0xe5, 0xea, 0x36, 0x2a, 0x6e, 0x84, 0xb2,
-       0x11, 0xf2, 0x0a, 0xe1, 0x17, 0x01, 0x3c, 0x93, 0x69, 0xc6, 0x6d, 0xc9,
-       0x6a, 0x8c, 0x90, 0x6f, 0xa5, 0x89, 0x17, 0xe9, 0x0c, 0xe3, 0xca, 0x70,
-       0x15, 0x3f, 0x3a, 0x3f, 0xb3, 0xf8, 0x31, 0x9c, 0x7b, 0x6b, 0x68, 0xcb,
-       0xb1, 0x36, 0xc5, 0xd9, 0xdb, 0x18, 0xca, 0x48, 0xac, 0x56, 0x98, 0xb7,
-       0xde, 0xa5, 0x49, 0x6e, 0x2a, 0xe7, 0x0e, 0x7e, 0xde, 0xa7, 0xe3, 0x5b,
-       0x8d, 0x3b, 0x95, 0x58, 0xa5, 0xf3, 0x5e, 0x92, 0x55, 0x4c, 0xd9, 0x6e,
-       0x9b, 0x2b, 0x6b, 0x94, 0x62, 0x97, 0x6c, 0x83, 0x39, 0xfa, 0xc3, 0x66,
-       0x05, 0xf4, 0x0a, 0x5d, 0xce, 0x50, 0xd2, 0xdf, 0xfd, 0x78, 0x35, 0x11,
-       0x47, 0x26, 0x51, 0xdf, 0xb3, 0x51, 0x71, 0xc9, 0xd9, 0xf3, 0xba, 0xb8,
-       0x22, 0x3e, 0x16, 0x87, 0x27, 0xe9, 0xb5, 0xca, 0x59, 0xff, 0x9d, 0xb9,
-       0x1d, 0x8c, 0x07, 0xf5, 0x9c, 0x62, 0xd5, 0x39, 0x7f, 0x9e, 0x46, 0x07,
-       0xd6, 0x25, 0x0c, 0xc6, 0xc0, 0xd5, 0x76, 0x37, 0xe7, 0xe1, 0x58, 0xa2,
-       0x03, 0xf7, 0x27, 0xea, 0xc7, 0x9f, 0xa4, 0x6d, 0xe1, 0xee, 0x0e, 0xb4,
-       0xf0, 0xd9, 0x50, 0xaa, 0xe6, 0x42, 0x37, 0x75, 0x3d, 0x31, 0xad, 0xce,
-       0x59, 0x97, 0x77, 0x1b, 0x3a, 0xcb, 0xeb, 0xc4, 0xb3, 0xfa, 0xd8, 0x80,
-       0xfa, 0xef, 0x15, 0x4c, 0x97, 0x5c, 0x32, 0x82, 0xe3, 0x09, 0x1f, 0xbe,
-       0x9e, 0xb4, 0xe8, 0x03, 0xc0, 0xfa, 0x6c, 0x33, 0xf3, 0x88, 0xa7, 0xec,
-       0x0a, 0x87, 0xeb, 0xba, 0x69, 0x83, 0x0b, 0x70, 0x82, 0xb1, 0xb7, 0x66,
-       0x9e, 0xa1, 0x2d, 0x52, 0xe4, 0x7d, 0xeb, 0x5f, 0xdb, 0xee, 0x68, 0x09,
-       0x36, 0x0c, 0x85, 0x22, 0x2b, 0x19, 0x67, 0x9f, 0x6a, 0x36, 0xc6, 0x6d,
-       0xc6, 0xc0, 0x19, 0xd1, 0x04, 0xe7, 0x3a, 0x24, 0xff, 0xaf, 0x03, 0x7f,
-       0x41, 0x3b, 0xff, 0x24, 0x21, 0x7e, 0x62, 0x10, 0x37, 0xfd, 0xf8, 0x06,
-       0xed, 0xfc, 0x7c, 0xa2, 0x0e, 0x59, 0xfa, 0x65, 0x07, 0xfd, 0xe3, 0xdd,
-       0x44, 0x30, 0x7e, 0x93, 0xca, 0x7c, 0x8f, 0xfe, 0xf1, 0x51, 0x22, 0x42,
-       0xdf, 0xf9, 0x2a, 0x3f, 0x0d, 0xf4, 0x87, 0x3a, 0xd6, 0xd1, 0xe9, 0x07,
-       0x7e, 0x9c, 0x65, 0xf9, 0x03, 0xa9, 0x9a, 0xd6, 0x15, 0x4a, 0x8d, 0x59,
-       0xa3, 0x54, 0x30, 0x9f, 0xd5, 0x68, 0xff, 0xb7, 0xe0, 0x43, 0x59, 0x4f,
-       0x4e, 0x12, 0x8b, 0x92, 0xe8, 0x2f, 0x22, 0x97, 0x5b, 0xe9, 0x9c, 0xe5,
-       0xaf, 0x3f, 0xf1, 0xa9, 0x12, 0x1c, 0x3f, 0xe3, 0x0a, 0x76, 0xcc, 0x20,
-       0x8f, 0xfe, 0x0b, 0xfa, 0xc1, 0x37, 0x59, 0xf6, 0x93, 0xbe, 0x62, 0x7c,
-       0x63, 0x88, 0x31, 0x37, 0x55, 0x80, 0x82, 0x3d, 0x5e, 0x3c, 0x78, 0x48,
-       0xc7, 0x3e, 0x27, 0x57, 0x17, 0x9d, 0x52, 0x77, 0xc4, 0x88, 0x73, 0x73,
-       0x81, 0x19, 0x07, 0x56, 0xe3, 0xd4, 0x6e, 0x9d, 0x71, 0x2f, 0x67, 0x27,
-       0xcf, 0x86, 0x1d, 0x6e, 0x1e, 0x17, 0x6e, 0x5e, 0xc0, 0x71, 0x6d, 0x4d,
-       0x85, 0xda, 0xb7, 0x51, 0x17, 0xb7, 0x67, 0xc5, 0xfe, 0x22, 0x78, 0x8e,
-       0x63, 0xeb, 0xa7, 0xad, 0x1c, 0x48, 0x54, 0x33, 0x47, 0xf7, 0xc1, 0xa2,
-       0xad, 0x58, 0xf2, 0x0e, 0x13, 0x6d, 0xc5, 0xa2, 0xad, 0x58, 0xb4, 0x15,
-       0x8b, 0xb6, 0x62, 0x65, 0x16, 0xe0, 0x99, 0x3e, 0x03, 0x23, 0xec, 0x73,
-       0xe7, 0x30, 0x39, 0xbc, 0xf3, 0x3e, 0x50, 0x9d, 0xe4, 0x29, 0xca, 0xc4,
-       0xdd, 0xb7, 0x60, 0xa8, 0xef, 0x56, 0x7e, 0x14, 0xb4, 0xd2, 0x66, 0x7a,
-       0xd2, 0x62, 0x83, 0x22, 0x93, 0x17, 0xc3, 0x99, 0x9b, 0x2b, 0x51, 0x2c,
-       0xf1, 0x5d, 0xc1, 0x0e, 0xe7, 0x7e, 0xde, 0xd6, 0xe4, 0x9e, 0x85, 0x9a,
-       0x79, 0x9b, 0xf0, 0x48, 0x9f, 0x8a, 0xdb, 0xc2, 0xf2, 0x7f, 0x08, 0x9a,
-       0x99, 0x0f, 0xc8, 0xfe, 0x7c, 0x82, 0xfe, 0x99, 0xb3, 0x15, 0x19, 0x53,
-       0xa6, 0x7f, 0x13, 0x4e, 0xf4, 0x1b, 0x8c, 0x59, 0x26, 0x32, 0xe9, 0x04,
-       0x7d, 0x42, 0xfc, 0xdc, 0xc0, 0x33, 0x6c, 0x6b, 0xf6, 0x80, 0x0b, 0x95,
-       0x8d, 0x6e, 0x94, 0xd0, 0xdf, 0x6f, 0x4b, 0xd7, 0x04, 0xbe, 0xa5, 0x24,
-       0x9c, 0xf5, 0xd7, 0x5d, 0x29, 0x8c, 0xcf, 0x34, 0x2a, 0xb1, 0x6f, 0xb0,
-       0x11, 0x8f, 0xed, 0x76, 0xd1, 0x46, 0xed, 0x05, 0xe5, 0x4d, 0x46, 0xc7,
-       0x02, 0x97, 0xe0, 0x45, 0x23, 0xbe, 0xc1, 0x1c, 0x60, 0x7d, 0x7f, 0xd0,
-       0x7c, 0x05, 0x41, 0xf3, 0x24, 0x16, 0xe0, 0x59, 0x93, 0xb8, 0x39, 0xaf,
-       0x11, 0x1b, 0xf7, 0x1b, 0xb4, 0x29, 0x37, 0xf3, 0x63, 0xf9, 0xbf, 0x37,
-       0xba, 0xb3, 0xc6, 0xf3, 0x32, 0xe4, 0x9c, 0x43, 0xb3, 0xfc, 0x4f, 0x06,
-       0xa5, 0x87, 0xf8, 0x34, 0xa3, 0xd7, 0xe0, 0xb8, 0x5f, 0xb0, 0x4b, 0x0d,
-       0xf9, 0x7f, 0x1c, 0xc4, 0x11, 0x8e, 0xfb, 0xc2, 0xcd, 0x6f, 0xdb, 0x95,
-       0x86, 0xc4, 0x50, 0xe2, 0x49, 0x5a, 0xfa, 0x8f, 0xed, 0x08, 0x10, 0x3b,
-       0x3a, 0xfa, 0x8d, 0x78, 0x29, 0x63, 0xd8, 0x46, 0x07, 0x63, 0x04, 0x5f,
-       0x8c, 0xb6, 0x6f, 0x21, 0xa4, 0xad, 0x20, 0xee, 0x9c, 0xe6, 0x58, 0x7a,
-       0x52, 0x82, 0x51, 0x3a, 0x8a, 0x7a, 0x63, 0xb8, 0x81, 0x39, 0x63, 0x41,
-       0x6f, 0x0b, 0x6a, 0x99, 0x3f, 0xba, 0x7b, 0x5b, 0x61, 0x30, 0x97, 0x9c,
-       0xd9, 0xbb, 0x1c, 0x0b, 0xc6, 0xf2, 0x1c, 0x5a, 0xc7, 0x11, 0x67, 0xdd,
-       0xea, 0x29, 0x78, 0xee, 0xd3, 0x69, 0x53, 0x72, 0xe6, 0xc5, 0x6b, 0x55,
-       0x12, 0x37, 0xcf, 0x50, 0xd7, 0xed, 0x03, 0xab, 0xed, 0x81, 0x94, 0xf0,
-       0xa6, 0x2e, 0x78, 0x9a, 0x24, 0xf7, 0xd1, 0x31, 0x46, 0x8e, 0x3c, 0xcc,
-       0x1c, 0xec, 0x8d, 0xfd, 0xab, 0x71, 0xff, 0x9e, 0xcb, 0x39, 0x9b, 0xd9,
-       0x64, 0xfd, 0x7b, 0xda, 0xc5, 0x86, 0x12, 0xda, 0x85, 0x97, 0x76, 0xb1,
-       0x2b, 0x15, 0x32, 0x0f, 0xd3, 0x2e, 0x6a, 0x89, 0x21, 0x1d, 0xbd, 0x92,
-       0xef, 0x38, 0xef, 0xed, 0x55, 0x78, 0x10, 0xc0, 0x9b, 0xb4, 0x8f, 0x8d,
-       0xbd, 0x76, 0x97, 0x9b, 0xb1, 0xa7, 0xa7, 0xb9, 0x1a, 0xaf, 0x65, 0x6e,
-       0xc5, 0xa3, 0xfd, 0xd5, 0x78, 0x85, 0xb6, 0xf3, 0x76, 0x02, 0xf3, 0x2b,
-       0xa0, 0xce, 0xac, 0x60, 0xac, 0xbe, 0x4d, 0x09, 0xb5, 0x2e, 0x42, 0xfd,
-       0xf8, 0xcb, 0x4a, 0xb0, 0x93, 0x9c, 0xe5, 0xc4, 0x05, 0x62, 0xff, 0xeb,
-       0x19, 0x39, 0x77, 0xe7, 0xc3, 0x38, 0xed, 0x6a, 0x9c, 0xf5, 0xbe, 0xd1,
-       0x5f, 0xc7, 0x79, 0xf3, 0xa0, 0xd0, 0xf0, 0xe3, 0x14, 0xb1, 0xb4, 0x63,
-       0x37, 0xc6, 0x03, 0x86, 0x71, 0xa2, 0x55, 0xa9, 0xc2, 0x9b, 0xc3, 0xb7,
-       0x62, 0x63, 0x7f, 0x50, 0x8f, 0xd1, 0x37, 0x5f, 0xe3, 0xb3, 0xf5, 0xbb,
-       0x67, 0xe1, 0x38, 0x6d, 0x6f, 0x9c, 0xb6, 0xb7, 0xb6, 0x5f, 0xc5, 0x8b,
-       0xc3, 0xb7, 0xb0, 0x5f, 0x05, 0xb3, 0x6a, 0x15, 0x27, 0xff, 0xda, 0x91,
-       0x72, 0xfe, 0x77, 0x81, 0xf3, 0x8e, 0xde, 0x9c, 0x51, 0x13, 0xb3, 0xf7,
-       0xcb, 0xf8, 0xc8, 0xc3, 0x9c, 0xb5, 0xe9, 0x46, 0xdc, 0xbc, 0xa7, 0x12,
-       0xe7, 0xf6, 0x1a, 0x56, 0xb9, 0xcb, 0x5e, 0x70, 0x2a, 0x1c, 0xe2, 0x3c,
-       0x34, 0xa2, 0xe1, 0x50, 0x23, 0x42, 0x03, 0xb9, 0x18, 0xa1, 0x19, 0x0b,
-       0xf0, 0x3d, 0xce, 0xfb, 0x5a, 0xe6, 0x80, 0x35, 0x43, 0x82, 0xbd, 0x36,
-       0x73, 0xc5, 0x66, 0x4c, 0x8c, 0x8d, 0x73, 0x6c, 0x11, 0x9c, 0x25, 0xbf,
-       0x7d, 0x9f, 0x31, 0xe3, 0x43, 0xe6, 0x80, 0x1f, 0x3a, 0x31, 0x43, 0xde,
-       0xa5, 0xbd, 0x32, 0x6e, 0xec, 0xe2, 0x9c, 0x6e, 0xec, 0x37, 0xea, 0xfa,
-       0xf8, 0x7b, 0xbd, 0x33, 0xc7, 0x31, 0xe2, 0xb9, 0x60, 0x85, 0xe0, 0x7f,
-       0x0b, 0x73, 0xde, 0x56, 0x9c, 0xed, 0x0b, 0x99, 0x0b, 0x95, 0x56, 0xbc,
-       0x47, 0x99, 0xfb, 0x28, 0x5f, 0x92, 0xbc, 0x6c, 0x66, 0xd2, 0x18, 0xff,
-       0xd0, 0x25, 0x18, 0xd3, 0x8a, 0xf2, 0xec, 0xad, 0x38, 0xd5, 0xbf, 0x1c,
-       0xa5, 0x43, 0xc2, 0x35, 0xa5, 0x4d, 0x37, 0xb6, 0xee, 0xbe, 0x13, 0xeb,
-       0x0f, 0xe6, 0x72, 0xbe, 0xf5, 0x89, 0x4d, 0xcc, 0x75, 0x85, 0xbf, 0xd7,
-       0xe1, 0x50, 0x2a, 0x26, 0x47, 0x42, 0x77, 0x30, 0x9f, 0x8b, 0xac, 0x20,
-       0x7e, 0x2e, 0x0d, 0x13, 0x63, 0x2b, 0x82, 0x81, 0x97, 0x61, 0xe9, 0xbc,
-       0x17, 0x58, 0x07, 0xd1, 0x89, 0x85, 0x65, 0x8c, 0x3b, 0xb7, 0xf5, 0xbb,
-       0x29, 0xbb, 0x3c, 0xaf, 0xc3, 0x8f, 0x52, 0x56, 0x5c, 0x9e, 0x6f, 0x84,
-       0xf8, 0x8a, 0xe8, 0xc9, 0x05, 0xb3, 0xa9, 0x26, 0xd6, 0x41, 0x8c, 0x2e,
-       0x0d, 0x07, 0xcd, 0x6f, 0xa0, 0x99, 0x73, 0x2f, 0x32, 0x47, 0xb0, 0xfe,
-       0x10, 0x9c, 0x7d, 0x7f, 0x79, 0x47, 0xe4, 0x3f, 0xf4, 0xed, 0x76, 0xec,
-       0x69, 0x7d, 0xe3, 0x65, 0x1b, 0x3c, 0x90, 0xaa, 0xef, 0x74, 0xa1, 0xc6,
-       0x2a, 0x87, 0x91, 0xee, 0x23, 0x2f, 0x8d, 0x23, 0xd8, 0x13, 0x87, 0xc4,
-       0x8c, 0x7a, 0x4b, 0x43, 0x35, 0xdb, 0x8e, 0xe0, 0xad, 0x84, 0x4b, 0xb0,
-       0x09, 0xf2, 0x4f, 0x8a, 0x22, 0xc4, 0xe1, 0x37, 0x12, 0xc5, 0xd0, 0x87,
-       0x12, 0xce, 0xff, 0x11, 0xba, 0x39, 0x6b, 0x91, 0xaf, 0x2d, 0xc0, 0xab,
-       0xfd, 0x3e, 0xcc, 0x27, 0x4f, 0xa9, 0x4b, 0x3e, 0x65, 0x97, 0x12, 0x87,
-       0xeb, 0x87, 0x42, 0x9a, 0x47, 0xb1, 0xed, 0x03, 0x73, 0x7f, 0x6d, 0x4f,
-       0x8b, 0x4a, 0x59, 0x23, 0xb2, 0x48, 0xfe, 0x9f, 0xd4, 0x3c, 0xa3, 0xf5,
-       0x2c, 0x7c, 0xb8, 0x81, 0x58, 0x7a, 0xac, 0xb7, 0x12, 0x6f, 0xed, 0xee,
-       0x91, 0x35, 0x4b, 0x18, 0xfc, 0xfd, 0x5a, 0x6f, 0x00, 0x3a, 0xb1, 0x4c,
-       0xe7, 0x75, 0x03, 0x31, 0x5a, 0x27, 0x3e, 0xbf, 0xdd, 0x6b, 0x2f, 0xf0,
-       0x35, 0x59, 0x6c, 0xbd, 0x0e, 0x0b, 0x88, 0xd1, 0x6f, 0xf4, 0x06, 0x4f,
-       0x2c, 0x51, 0x15, 0x94, 0x34, 0x99, 0xec, 0xdb, 0x87, 0x17, 0x69, 0xdf,
-       0x4f, 0xa4, 0x8e, 0x7e, 0x6d, 0x06, 0xac, 0xfa, 0x12, 0x04, 0x37, 0x78,
-       0x14, 0x59, 0xe3, 0x90, 0xd8, 0x56, 0x8d, 0x1b, 0xc9, 0x4d, 0x74, 0xe2,
-       0x77, 0x4d, 0x56, 0xe2, 0x1c, 0xb0, 0x66, 0x68, 0x35, 0x3e, 0x1c, 0x14,
-       0x1f, 0xc5, 0x42, 0xb1, 0xff, 0x05, 0xe1, 0x90, 0x79, 0x86, 0xb8, 0x5c,
-       0x3b, 0x96, 0x20, 0xfe, 0xca, 0xb9, 0x3c, 0x8c, 0xab, 0xc4, 0x81, 0xca,
-       0x94, 0x60, 0x57, 0x00, 0x8d, 0xcc, 0xf7, 0xca, 0x53, 0xe2, 0x93, 0x96,
-       0x9c, 0x1b, 0xc1, 0xcd, 0x63, 0x3e, 0xe8, 0x63, 0x1a, 0x3f, 0x7e, 0xe8,
-       0x23, 0x55, 0xfc, 0x50, 0xd6, 0x91, 0x59, 0xfc, 0x50, 0x56, 0xc6, 0x31,
-       0x73, 0x44, 0xc1, 0x4d, 0x8e, 0x6d, 0x89, 0x0f, 0x7a, 0xf1, 0xec, 0x28,
-       0xb0, 0xa1, 0xdf, 0xc4, 0xe1, 0xfd, 0x39, 0x9c, 0xdb, 0xcc, 0x3e, 0x42,
-       0x03, 0x61, 0xac, 0x4f, 0x8b, 0x7d, 0x36, 0xe2, 0xb7, 0x7b, 0x8d, 0xb6,
-       0x35, 0x6a, 0x28, 0xb2, 0x9c, 0x18, 0xf6, 0xfe, 0x48, 0x23, 0x3e, 0x7c,
-       0x62, 0x01, 0x8c, 0x70, 0x23, 0xce, 0x1c, 0xd8, 0x84, 0xf2, 0x27, 0x54,
-       0xe2, 0x8f, 0x8a, 0xf1, 0xe9, 0x82, 0xed, 0x82, 0xa3, 0x5e, 0xab, 0x8c,
-       0xb8, 0xb5, 0x8d, 0xb8, 0xf5, 0xb3, 0xb9, 0xe3, 0x98, 0x9f, 0x94, 0x73,
-       0xad, 0xcc, 0xaf, 0xd4, 0x08, 0x9e, 0x24, 0x6e, 0xed, 0xea, 0x93, 0xf9,
-       0xe2, 0xdc, 0x12, 0xb3, 0xb6, 0xa6, 0x73, 0x9c, 0xe8, 0x70, 0xbf, 0xa1,
-       0xb9, 0x68, 0xcb, 0x43, 0x93, 0x78, 0xf5, 0x5b, 0xc6, 0xff, 0x47, 0xe6,
-       0x45, 0x71, 0x36, 0x2d, 0x7e, 0x25, 0x71, 0x45, 0xc7, 0x87, 0xb4, 0xf1,
-       0xa5, 0xd4, 0xf5, 0x19, 0xe6, 0x16, 0x2d, 0x8c, 0x73, 0x1f, 0xd3, 0x9e,
-       0x97, 0x93, 0x3f, 0xbe, 0x97, 0x12, 0x1b, 0x59, 0x8e, 0x25, 0x59, 0xb1,
-       0x05, 0x67, 0x9d, 0x95, 0xdf, 0x31, 0x9c, 0x4e, 0xfc, 0xb1, 0xb8, 0xb0,
-       0x12, 0xaf, 0x0e, 0xca, 0x79, 0x17, 0x03, 0xde, 0xde, 0xa0, 0x56, 0xa2,
-       0xc8, 0x9e, 0x6e, 0x9e, 0xfb, 0x4e, 0x38, 0x39, 0x76, 0x69, 0x34, 0xbf,
-       0xbf, 0x98, 0xdf, 0x77, 0xb0, 0xf0, 0xfd, 0xb9, 0x01, 0xf2, 0x4f, 0x28,
-       0x87, 0xe7, 0x16, 0xe0, 0xf6, 0x3d, 0x6d, 0x18, 0xd9, 0xfd, 0x31, 0x8a,
-       0xfa, 0xd5, 0x7b, 0x7d, 0xa8, 0xa9, 0x7b, 0x48, 0xe9, 0xc2, 0xa2, 0xb0,
-       0xbc, 0xe7, 0x23, 0x6b, 0xe6, 0x7d, 0xd8, 0x7c, 0x80, 0x79, 0xcc, 0xd8,
-       0x75, 0x38, 0xaa, 0x31, 0x1e, 0x9a, 0x1f, 0xa3, 0xa0, 0xdf, 0xe3, 0x9c,
-       0x05, 0x3c, 0x6a, 0x36, 0x61, 0xe5, 0xe4, 0x59, 0x40, 0x54, 0x5d, 0xbd,
-       0x97, 0x00, 0x5f, 0xe9, 0xe4, 0xff, 0x1f, 0xc8, 0xbd, 0xdb, 0x63, 0xa0,
-       0x77, 0xf4, 0x7f, 0x95, 0xe7, 0xce, 0x06, 0xfd, 0x6b, 0xca, 0x76, 0xa2,
-       0x7d, 0xcf, 0xe3, 0x58, 0xb1, 0xe7, 0x3b, 0xb8, 0x73, 0xa0, 0xb6, 0x33,
-       0xc2, 0x5c, 0xe7, 0x83, 0xf0, 0x38, 0x8e, 0x85, 0x8b, 0x60, 0xf9, 0xc9,
-       0xb1, 0x6e, 0xfc, 0x8a, 0xbc, 0x4e, 0xca, 0xbf, 0xd3, 0xb6, 0x7e, 0xaf,
-       0xb4, 0xf7, 0xf6, 0xa4, 0x7f, 0xfd, 0x7c, 0x9a, 0x9c, 0xa7, 0x79, 0x21,
-       0xf5, 0x2b, 0x5b, 0x77, 0x9e, 0xe7, 0xef, 0xbf, 0x65, 0xc7, 0xfc, 0x72,
-       0x7f, 0xd6, 0x64, 0xbd, 0xef, 0xe0, 0x01, 0xe6, 0xbf, 0xa7, 0x9b, 0xbe,
-       0x83, 0x85, 0x43, 0x97, 0xea, 0xa0, 0x68, 0xf7, 0x3a, 0x07, 0xbb, 0xe9,
-       0x61, 0xe4, 0x48, 0xb2, 0x57, 0x25, 0xfb, 0x27, 0x7f, 0x89, 0xcd, 0x7b,
-       0x65, 0x6d, 0xd3, 0xb6, 0xd7, 0x1b, 0xb2, 0xc7, 0x97, 0x3f, 0x37, 0x27,
-       0xed, 0x58, 0x8a, 0x95, 0x91, 0xba, 0x5b, 0x94, 0xbe, 0xcc, 0xd4, 0x31,
-       0x4d, 0x93, 0xff, 0x97, 0xa7, 0x95, 0x44, 0xa7, 0x8e, 0xad, 0x47, 0xd9,
-       0x9e, 0x39, 0xa2, 0xec, 0xca, 0x5c, 0xad, 0x8f, 0xe7, 0xec, 0x58, 0x9b,
-       0xb4, 0x21, 0x32, 0xc1, 0x8f, 0x62, 0x91, 0x2b, 0xff, 0xec, 0x99, 0x49,
-       0xb9, 0x0b, 0xa1, 0x57, 0xe6, 0xe4, 0xbe, 0x9f, 0x72, 0x9b, 0x4d, 0x31,
-       0xa8, 0xf3, 0xa6, 0xca, 0x9e, 0x1f, 0xe7, 0x7f, 0xbb, 0xd4, 0x56, 0xae,
-       0xdc, 0xcd, 0x7e, 0xb1, 0x21, 0x75, 0xde, 0xd4, 0x35, 0xfb, 0x02, 0xe2,
-       0x47, 0x48, 0xdb, 0x8a, 0x5c, 0xbe, 0xb7, 0xe6, 0xca, 0x7c, 0x4f, 0xb0,
-       0x0b, 0x23, 0x09, 0x0d, 0xef, 0x99, 0x92, 0xdf, 0xc9, 0xad, 0x28, 0xbe,
-       0xc7, 0xfc, 0xf1, 0x99, 0x44, 0xb0, 0x75, 0x9d, 0x52, 0x1f, 0x9b, 0xc3,
-       0x38, 0x87, 0x0a, 0x59, 0x4f, 0x8f, 0x38, 0xff, 0xaf, 0x2a, 0x13, 0x8a,
-       0x20, 0x43, 0x7f, 0x78, 0x23, 0x11, 0xec, 0x38, 0xa3, 0xe4, 0xfe, 0x0f,
-       0xd6, 0xeb, 0xce, 0xfb, 0x1c, 0x79, 0xbb, 0x13, 0xce, 0x39, 0x75, 0x3d,
-       0x57, 0x6c, 0x30, 0xd8, 0x97, 0x46, 0xa5, 0xac, 0x9b, 0x58, 0x16, 0xf3,
-       0xa1, 0xee, 0x94, 0x15, 0x50, 0xf1, 0x15, 0xc4, 0xfd, 0xb2, 0x47, 0x72,
-       0xcb, 0xe4, 0xff, 0xa9, 0x11, 0x7e, 0xf4, 0x2f, 0xaf, 0x4f, 0xc9, 0xff,
-       0x06, 0xca, 0xdb, 0x8b, 0x35, 0x76, 0x3d, 0xd2, 0x9a, 0xac, 0x7d, 0xc0,
-       0x9a, 0x46, 0x5d, 0xfb, 0x8d, 0x4d, 0x1c, 0xb7, 0x07, 0xd3, 0x99, 0xdb,
-       0x85, 0x6b, 0xeb, 0xdb, 0x1a, 0xd5, 0x6b, 0x10, 0xab, 0x08, 0x6a, 0x31,
-       0x72, 0xcd, 0x1e, 0xe7, 0xff, 0xed, 0xc8, 0xb9, 0x14, 0xab, 0xd5, 0x4b,
-       0x4c, 0x6f, 0x52, 0x14, 0x14, 0x84, 0xe0, 0x7e, 0x28, 0xe3, 0x86, 0x56,
-       0xfb, 0x5b, 0xfb, 0x17, 0x7e, 0x03, 0xdb, 0xc6, 0x6e, 0xb9, 0xf4, 0xff,
-       0x87, 0xfe, 0x63, 0xf6, 0xea, 0xec, 0x37, 0xdf, 0xe6, 0xc7, 0x76, 0x6c,
-       0xba, 0xf4, 0x2d, 0xed, 0xfe, 0x31, 0x59, 0xf3, 0xef, 0x7a, 0xd4, 0xe8,
-       0x2e, 0x94, 0x63, 0xab, 0xb9, 0xde, 0x2f, 0x67, 0xe5, 0xd6, 0x43, 0xf6,
-       0xff, 0x65, 0x0e, 0xe4, 0x1d, 0xc3, 0x08, 0xf3, 0x6e, 0xd1, 0x4b, 0x14,
-       0x0f, 0x66, 0xe4, 0x9d, 0xa0, 0x59, 0x90, 0xff, 0xfb, 0xf5, 0x60, 0x26,
-       0xa7, 0xbf, 0x47, 0x33, 0x3e, 0xe6, 0x00, 0x3e, 0xda, 0x60, 0x07, 0xf9,
-       0x0b, 0xf9, 0xd3, 0x25, 0x5d, 0xde, 0xeb, 0x97, 0x75, 0x85, 0xef, 0xd3,
-       0xa7, 0xdd, 0xb5, 0x72, 0x6d, 0xc9, 0xb9, 0x51, 0x25, 0x77, 0x7d, 0xde,
-       0x79, 0x37, 0x52, 0x8d, 0xae, 0xc3, 0xc2, 0xc4, 0x34, 0x39, 0x3f, 0x29,
-       0x6b, 0x36, 0x96, 0x3f, 0x2a, 0xef, 0x61, 0xf8, 0x88, 0xb1, 0x5f, 0xf5,
-       0x4f, 0xbe, 0x73, 0xd5, 0xba, 0x82, 0x38, 0x36, 0x27, 0x6c, 0xc4, 0x9a,
-       0x94, 0xa0, 0xbe, 0x52, 0x69, 0x63, 0xbd, 0x3a, 0xf4, 0x64, 0xa5, 0x0d,
-       0xc5, 0xf9, 0xdf, 0x92, 0x1e, 0xb6, 0x71, 0x30, 0x51, 0xaf, 0x7b, 0xd4,
-       0x4f, 0x6d, 0xcb, 0x39, 0x03, 0x29, 0xfb, 0xf6, 0x71, 0xbc, 0x94, 0x98,
-       0x4e, 0x94, 0xba, 0xba, 0xdd, 0x4b, 0xeb, 0xe7, 0x7f, 0xa3, 0x21, 0xc6,
-       0xb6, 0x82, 0x9d, 0x61, 0x57, 0x70, 0xc3, 0x05, 0xe2, 0x4a, 0x36, 0x6c,
-       0xc4, 0x7f, 0xc0, 0x3e, 0xfe, 0x56, 0xa9, 0x43, 0x62, 0x4a, 0xfb, 0xb9,
-       0xb6, 0xea, 0xdb, 0x0b, 0xd4, 0xf3, 0xce, 0xbb, 0xf8, 0xd2, 0xbe, 0x16,
-       0x5d, 0x0d, 0x2d, 0x69, 0xd9, 0x7e, 0xb6, 0x39, 0x33, 0x1a, 0xdc, 0x57,
-       0x41, 0x30, 0xfa, 0xb6, 0xda, 0x85, 0x35, 0x72, 0x3c, 0x24, 0x1a, 0xd4,
-       0x1f, 0xa0, 0x7d, 0x34, 0x3a, 0x6d, 0xc4, 0xea, 0x0a, 0x20, 0x9c, 0xf2,
-       0x4b, 0xed, 0x84, 0x39, 0x81, 0x70, 0x31, 0x96, 0x73, 0xce, 0x03, 0xc8,
-       0xb9, 0x49, 0xe6, 0x0d, 0x09, 0xf9, 0xbf, 0x7d, 0x4e, 0x37, 0x93, 0x7b,
-       0x5a, 0xcc, 0xd7, 0x19, 0xaf, 0xd7, 0xcb, 0xff, 0x48, 0x2a, 0xf6, 0xe1,
-       0xc1, 0x84, 0xac, 0x81, 0xfc, 0x1f, 0x05, 0x3f, 0x96, 0xb4, 0x1c, 0x54,
-       0x00, 0x00, 0x00 };
-
-static const u32 bnx2_CP_b09FwData[(0x84/4) + 1] = {
-       0x00000000, 0x0000001b, 0x0000000f, 0x0000000a, 0x00000008, 0x00000006,
-       0x00000005, 0x00000005, 0x00000004, 0x00000004, 0x00000003, 0x00000003,
-       0x00000003, 0x00000003, 0x00000003, 0x00000002, 0x00000002, 0x00000002,
-       0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002,
-       0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002, 0x00000002,
-       0x00000001, 0x00000001, 0x00000001, 0x00000000 };
-static const u32 bnx2_CP_b09FwRodata[(0x16c/4) + 1] = {
-       0x80080100, 0x80080080, 0x80080000, 0x08001800, 0x08001800, 0x08001838,
-       0x08001838, 0x0800184c, 0x0800181c, 0x08001a74, 0x08001a40, 0x08001acc,
-       0x08001acc, 0x08001b54, 0x08001a84, 0x80080240, 0x080021c4, 0x08002010,
-       0x080021ec, 0x08002284, 0x080023d4, 0x08002420, 0x08002544, 0x0800244c,
-       0x080024d0, 0x08002080, 0x080029f8, 0x0800299c, 0x0800202c, 0x0800202c,
-       0x0800202c, 0x080025b8, 0x080025b8, 0x0800202c, 0x0800202c, 0x08002874,
-       0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x080028d4, 0x0800202c,
-       0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c,
-       0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c,
-       0x0800202c, 0x08002440, 0x0800202c, 0x0800202c, 0x08002944, 0x0800202c,
-       0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c,
-       0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c,
-       0x0800202c, 0x0800202c, 0x0800202c, 0x0800202c, 0x08002798, 0x0800202c,
-       0x0800202c, 0x08002700, 0x0800265c, 0x080037c0, 0x08003794, 0x08003760,
-       0x08003734, 0x08003714, 0x080036c8, 0x80080100, 0x80080080, 0x80080000,
-       0x80080080, 0x00000000 };
-
-static struct fw_info bnx2_cp_fw_09 = {
-       /* Firmware version: 4.6.15 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0xf,
-
-       .start_addr                     = 0x08000080,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x5418,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_CP_b09FwText,
-       .gz_text_len                    = sizeof(bnx2_CP_b09FwText),
-
-       .data_addr                      = 0x080055a0,
-       .data_len                       = 0x84,
-       .data_index                     = 0x0,
-       .data                           = bnx2_CP_b09FwData,
-
-       .sbss_addr                      = 0x08005624,
-       .sbss_len                       = 0x91,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x080056b8,
-       .bss_len                        = 0x19c,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x08005418,
-       .rodata_len                     = 0x16c,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_CP_b09FwRodata,
-};
-
-static u8 bnx2_RXP_b09FwText[] = {
-       0xec, 0x5c, 0x7d, 0x70, 0x1c, 0xe5, 0x79, 0xff, 0xbd, 0x7b, 0x7b, 0xd2,
-       0x4a, 0x3a, 0x9d, 0x56, 0xa7, 0x93, 0x7c, 0x22, 0x04, 0xef, 0xa2, 0x3d,
-       0xf9, 0xb0, 0x0c, 0xec, 0x9d, 0x4f, 0xb6, 0xa0, 0xdb, 0xb2, 0x83, 0x0d,
-       0x11, 0x21, 0x13, 0x84, 0x4d, 0x52, 0x33, 0x49, 0x27, 0x37, 0xc6, 0x18,
-       0x81, 0x4d, 0x70, 0x0d, 0x6d, 0x55, 0x86, 0x19, 0x6f, 0x2c, 0x7f, 0x01,
-       0x27, 0x9d, 0x62, 0x64, 0x63, 0xd2, 0x0e, 0x68, 0x6c, 0x59, 0x08, 0x7c,
-       0xd2, 0x61, 0x20, 0xad, 0xe8, 0x84, 0xfa, 0x26, 0xd8, 0xe0, 0x94, 0xcf,
-       0x21, 0x0c, 0xc3, 0x1f, 0xcd, 0xa0, 0x62, 0x3e, 0xcc, 0x94, 0xa1, 0x26,
-       0x38, 0xa9, 0xdd, 0xb8, 0x7e, 0xfb, 0x3c, 0x7b, 0x3a, 0x9b, 0x90, 0x26,
-       0x9d, 0xfc, 0xd1, 0xff, 0xf6, 0x99, 0xb9, 0xb9, 0xbd, 0x77, 0xdf, 0xf7,
-       0xf9, 0xfe, 0x7c, 0x3d, 0xf2, 0x5f, 0x47, 0x50, 0x8f, 0x39, 0x68, 0xa4,
-       0x4f, 0x76, 0xc3, 0xc0, 0xc6, 0xf4, 0x65, 0x4b, 0x2e, 0xa3, 0xc7, 0xee,
-       0x50, 0x53, 0x8d, 0xca, 0xeb, 0x02, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01,
-       0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10,
-       0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00,
-       0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04,
-       0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40,
-       0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0xfc, 0x7f, 0x40, 0x08, 0xd0,
-       0xf9, 0xbb, 0x71, 0xee, 0x03, 0x4d, 0x71, 0xdc, 0x7b, 0xaf, 0xb6, 0xa0,
-       0x85, 0x9c, 0x99, 0x7b, 0x6f, 0xb1, 0x00, 0xb7, 0xd8, 0x65, 0x2c, 0xc3,
-       0x7f, 0x4b, 0x2f, 0xae, 0x82, 0xd7, 0xbf, 0xea, 0x9c, 0x79, 0xec, 0xf9,
-       0xa5, 0xe6, 0x89, 0xb1, 0x10, 0x34, 0xdd, 0x79, 0x27, 0xad, 0x77, 0x42,
-       0xbb, 0x90, 0xce, 0xfc, 0xfd, 0x82, 0x95, 0x31, 0x44, 0xab, 0xb8, 0xe0,
-       0x29, 0x8e, 0x94, 0xfb, 0x6d, 0x89, 0x17, 0x6d, 0x4f, 0x2c, 0xcb, 0xc2,
-       0xd3, 0x9c, 0x19, 0x51, 0x37, 0x74, 0x56, 0x1a, 0xe1, 0x0a, 0xe5, 0x35,
-       0x45, 0x05, 0xaa, 0xa5, 0xe1, 0xd6, 0xf1, 0x7a, 0xac, 0x1d, 0x6b, 0xc0,
-       0x9a, 0xb1, 0x04, 0x6e, 0x2b, 0x42, 0x0f, 0x39, 0x1a, 0x66, 0x43, 0x33,
-       0x22, 0x34, 0x85, 0x5c, 0xd8, 0x39, 0x75, 0xc3, 0xde, 0xfc, 0x59, 0xe9,
-       0xfa, 0x7f, 0x63, 0x52, 0xbe, 0x61, 0xdc, 0x7f, 0x0f, 0x45, 0x75, 0x0e,
-       0xd3, 0x33, 0xef, 0x3b, 0x75, 0xc3, 0xbe, 0xe2, 0x71, 0xf9, 0xfc, 0x82,
-       0x38, 0x0e, 0x95, 0x74, 0x3c, 0x55, 0xda, 0x4f, 0x3c, 0x98, 0x9e, 0x07,
-       0xcd, 0x53, 0x1d, 0x0f, 0x5b, 0xb3, 0x61, 0x4c, 0x8c, 0x9c, 0x95, 0x21,
-       0xcb, 0x34, 0xa0, 0x58, 0xfa, 0x0b, 0xa0, 0x7d, 0x05, 0xda, 0x57, 0x08,
-       0x63, 0xef, 0x58, 0x29, 0x86, 0xfa, 0x04, 0x9e, 0x5f, 0xc0, 0xe7, 0xf9,
-       0x2c, 0xe3, 0x78, 0x3b, 0x5a, 0x3d, 0x5f, 0x43, 0xe7, 0x8f, 0x64, 0x81,
-       0xf1, 0x91, 0x3e, 0x3a, 0x2a, 0x31, 0x68, 0xd7, 0x62, 0xb5, 0x0e, 0xaf,
-       0xce, 0x61, 0x5c, 0x55, 0x3c, 0x9e, 0x30, 0xa6, 0x8e, 0x34, 0x55, 0xf0,
-       0x40, 0x68, 0x16, 0xbc, 0xda, 0x2f, 0xbd, 0x3f, 0x5e, 0xac, 0xbe, 0xdf,
-       0x41, 0x74, 0x34, 0xd2, 0xc3, 0x06, 0xfc, 0x73, 0xa9, 0x1f, 0xff, 0x50,
-       0xca, 0xe1, 0xd9, 0x52, 0x1f, 0xd1, 0xbd, 0x87, 0xe8, 0xae, 0xc7, 0x3f,
-       0x96, 0xd6, 0xe0, 0xc7, 0xa5, 0xef, 0xe2, 0x99, 0xd2, 0x2a, 0x3c, 0x5d,
-       0xba, 0x09, 0x07, 0x4b, 0x1e, 0xc2, 0xdd, 0x8c, 0x2f, 0x25, 0x3e, 0xcb,
-       0xd7, 0x11, 0x1f, 0x5b, 0x30, 0x5b, 0x64, 0x79, 0x24, 0x46, 0x6c, 0x73,
-       0x0c, 0x58, 0x90, 0xa8, 0x81, 0xc0, 0x6a, 0xdb, 0x7c, 0x0a, 0xb8, 0x0d,
-       0x6e, 0xdc, 0x3c, 0xc1, 0x5a, 0x7a, 0x62, 0xc4, 0x40, 0x98, 0xf8, 0xb5,
-       0xd2, 0x6d, 0xd8, 0xaa, 0xf7, 0xa1, 0xde, 0x1a, 0xc2, 0x03, 0xbe, 0x8d,
-       0xa1, 0x45, 0x9c, 0x7f, 0x45, 0x7e, 0x48, 0xe0, 0xc1, 0x24, 0x34, 0x41,
-       0xcf, 0x5d, 0xc5, 0xbf, 0x6b, 0xa9, 0xd8, 0x8c, 0x78, 0x28, 0x10, 0x5f,
-       0x05, 0xe2, 0xa3, 0x40, 0xbc, 0x15, 0x88, 0x97, 0x02, 0xf1, 0x57, 0x20,
-       0x7e, 0x0a, 0xc4, 0x4f, 0x81, 0xf8, 0x29, 0x10, 0xaf, 0x05, 0xd6, 0xf9,
-       0x00, 0xc9, 0x52, 0xb1, 0x71, 0xab, 0x63, 0x63, 0xac, 0xd4, 0x26, 0xf6,
-       0xee, 0x56, 0xc5, 0x73, 0xc3, 0x06, 0xe6, 0x3b, 0x88, 0x3c, 0xbd, 0xc4,
-       0x2a, 0x5f, 0x15, 0xea, 0x9a, 0x49, 0xc0, 0x4d, 0xcf, 0x83, 0x8d, 0x89,
-       0x92, 0x2a, 0xa6, 0x87, 0xa5, 0x5c, 0x69, 0xbb, 0x68, 0x72, 0xcc, 0x9e,
-       0x8d, 0x8a, 0xd5, 0xff, 0xba, 0x68, 0xc4, 0x2f, 0x47, 0x7a, 0x31, 0xd6,
-       0xec, 0xe2, 0x70, 0xd6, 0xc0, 0xb2, 0x8c, 0x82, 0x5c, 0xdc, 0xc3, 0xb6,
-       0xac, 0x69, 0x7b, 0x18, 0x45, 0x39, 0xce, 0xe7, 0x34, 0xd2, 0xb5, 0x87,
-       0x64, 0xb7, 0x86, 0xc9, 0x11, 0x17, 0x35, 0xe9, 0x1a, 0x94, 0xfb, 0x58,
-       0x7f, 0x2a, 0xc9, 0xb4, 0x0f, 0xf5, 0xb1, 0x18, 0x1a, 0xac, 0x4b, 0xd0,
-       0x10, 0xe3, 0x35, 0x88, 0x56, 0xd2, 0xd5, 0x3c, 0xe7, 0x02, 0xf1, 0xf9,
-       0xee, 0x28, 0x3e, 0x1d, 0xd5, 0x50, 0xda, 0xa9, 0xe2, 0x1b, 0x19, 0x29,
-       0xff, 0x2a, 0xa3, 0xf6, 0x7f, 0x2a, 0x1c, 0x4c, 0x95, 0x54, 0x7c, 0x9e,
-       0x4f, 0xc3, 0x6b, 0xd6, 0xf0, 0x9f, 0x79, 0x0f, 0x21, 0xc2, 0x3b, 0x40,
-       0x78, 0x6b, 0x17, 0xa7, 0x30, 0x1b, 0x67, 0x71, 0xfa, 0xb0, 0x31, 0xdf,
-       0xb1, 0x63, 0xa3, 0x52, 0x03, 0xa3, 0x06, 0x64, 0xff, 0x2c, 0x36, 0xe5,
-       0x3b, 0x8e, 0x6e, 0x52, 0xb6, 0xe0, 0xe2, 0x5a, 0x0d, 0x9b, 0x87, 0x79,
-       0x6d, 0x39, 0xca, 0x45, 0x41, 0xfe, 0xf0, 0xc7, 0xea, 0x6b, 0x26, 0x42,
-       0x7e, 0x65, 0xfc, 0xf1, 0x7a, 0x4e, 0x34, 0xa2, 0xde, 0x34, 0xca, 0x58,
-       0x1f, 0xe7, 0xf3, 0x39, 0xe5, 0x5d, 0xe9, 0xc6, 0x99, 0x0f, 0xcd, 0x0b,
-       0x91, 0x6e, 0x6e, 0xc9, 0x66, 0xb1, 0x26, 0xdf, 0xa1, 0xaf, 0x51, 0x48,
-       0xdb, 0x6a, 0xc5, 0xc6, 0x71, 0x07, 0xe9, 0xd1, 0x61, 0x81, 0x91, 0x4e,
-       0xb6, 0x31, 0xd2, 0x76, 0xd1, 0x8f, 0x09, 0xc3, 0x50, 0x2a, 0x31, 0xf1,
-       0x58, 0x36, 0x89, 0xb3, 0x0f, 0xf1, 0x6f, 0x15, 0x3f, 0x5b, 0x9a, 0xc4,
-       0xc7, 0xfb, 0x4a, 0x73, 0x71, 0xfb, 0x68, 0xa4, 0xb2, 0xef, 0x1a, 0xa2,
-       0xc9, 0x32, 0x32, 0xae, 0xc9, 0x7b, 0x47, 0x3b, 0x6b, 0xe9, 0x77, 0xc5,
-       0xd6, 0xfd, 0xf9, 0x0e, 0xbb, 0x5f, 0xd1, 0x50, 0x4e, 0x44, 0x48, 0xf7,
-       0xd0, 0xea, 0x08, 0xff, 0x25, 0x43, 0x67, 0xb0, 0x22, 0x63, 0x4e, 0xf2,
-       0xdf, 0x80, 0x25, 0x93, 0x15, 0x9a, 0xc9, 0xa2, 0x8d, 0x03, 0x25, 0x1b,
-       0x77, 0xe4, 0x3b, 0xdc, 0x95, 0x62, 0x16, 0x68, 0x5f, 0x98, 0x9b, 0x54,
-       0x7e, 0x21, 0xbd, 0x56, 0xa6, 0xb3, 0x10, 0x93, 0xb1, 0x8e, 0x81, 0x49,
-       0xc5, 0xdc, 0xd3, 0xaf, 0x48, 0xf9, 0xab, 0xb4, 0x82, 0xaf, 0x65, 0xb2,
-       0x98, 0xd5, 0x75, 0xdc, 0x9c, 0xd1, 0xbc, 0x16, 0xe2, 0x71, 0xc3, 0x12,
-       0x0d, 0x17, 0xed, 0x74, 0xf1, 0xf6, 0xe2, 0x9f, 0xa3, 0xbc, 0x82, 0x75,
-       0xcf, 0x7c, 0xb1, 0x1c, 0x09, 0xc4, 0xac, 0x3a, 0xc4, 0xf6, 0x86, 0x31,
-       0x6f, 0xe7, 0x59, 0x99, 0xb0, 0x78, 0xdd, 0x9a, 0x3c, 0xa5, 0xb0, 0x0c,
-       0x61, 0xb4, 0xee, 0xbd, 0x82, 0x72, 0x8a, 0x99, 0x02, 0xbe, 0x16, 0xe7,
-       0xbd, 0x35, 0x56, 0x55, 0x96, 0x08, 0x76, 0xef, 0xac, 0xc8, 0xff, 0x68,
-       0xb6, 0x07, 0x2f, 0x15, 0xb0, 0xaf, 0x0d, 0x3f, 0xc0, 0xc8, 0x12, 0xce,
-       0x4f, 0x8c, 0x63, 0x88, 0x64, 0xff, 0xc1, 0x89, 0x70, 0xa6, 0x6a, 0xe3,
-       0xea, 0x39, 0x81, 0x6f, 0x5e, 0x29, 0xf0, 0x6a, 0x7a, 0x5a, 0x8e, 0xb5,
-       0x32, 0xbf, 0x0f, 0x37, 0x56, 0xfe, 0x16, 0xae, 0xee, 0x94, 0x8b, 0x36,
-       0xa2, 0x55, 0xdd, 0xc7, 0x38, 0x2e, 0x69, 0x25, 0xfd, 0xa5, 0x66, 0xf1,
-       0x5f, 0x11, 0xd4, 0xb3, 0x9d, 0xef, 0x96, 0x46, 0x4b, 0x85, 0xe6, 0xfd,
-       0x44, 0xb3, 0x63, 0x48, 0xc5, 0xe6, 0x7c, 0xc7, 0xa9, 0xf7, 0x94, 0xef,
-       0xcb, 0xd9, 0xf9, 0x4c, 0xa7, 0xc3, 0x3e, 0xa6, 0x08, 0xfc, 0x54, 0x35,
-       0x67, 0x72, 0x48, 0x60, 0xb2, 0x04, 0xaf, 0xdd, 0xd1, 0x29, 0xfe, 0xe3,
-       0x94, 0x07, 0x0c, 0xd1, 0xf9, 0xb0, 0x8d, 0x85, 0x43, 0xdf, 0x85, 0xb5,
-       0xcb, 0xc1, 0x4c, 0xc1, 0xc6, 0x54, 0x41, 0xca, 0xed, 0xb6, 0x94, 0xef,
-       0xda, 0xe6, 0x86, 0xe3, 0x21, 0xb8, 0x97, 0x2f, 0xed, 0x4a, 0xd5, 0x86,
-       0x54, 0xd6, 0x4d, 0xee, 0x75, 0x91, 0x5c, 0xb5, 0x5f, 0xf4, 0xe2, 0x89,
-       0x92, 0x81, 0x62, 0x29, 0x85, 0x27, 0x4b, 0xac, 0x7f, 0x8b, 0xbe, 0x17,
-       0x51, 0x7c, 0x66, 0x29, 0xb7, 0x30, 0xbf, 0x3a, 0xc6, 0x17, 0xd8, 0x98,
-       0x2c, 0x28, 0x08, 0x91, 0xce, 0x73, 0x3a, 0xed, 0x2f, 0x9c, 0x25, 0xdb,
-       0x69, 0xe8, 0xf8, 0xa1, 0x8b, 0xdb, 0xed, 0x16, 0x18, 0x37, 0x5a, 0x18,
-       0x2f, 0x68, 0x94, 0xbb, 0x55, 0xf4, 0xe6, 0xc7, 0x31, 0xaf, 0x39, 0x4e,
-       0xb1, 0x26, 0xb0, 0x2a, 0x13, 0x01, 0x56, 0xf2, 0xbb, 0x08, 0xda, 0xad,
-       0x32, 0xda, 0x63, 0x8d, 0x98, 0xbf, 0xf0, 0x9f, 0x30, 0xdb, 0x12, 0x25,
-       0x1d, 0xd7, 0x93, 0x1e, 0x04, 0x54, 0xb2, 0x53, 0x9b, 0x65, 0x11, 0x4e,
-       0x01, 0x2b, 0x49, 0x7b, 0x29, 0x7e, 0x13, 0x24, 0x7b, 0x78, 0x69, 0x1c,
-       0x8f, 0x13, 0xff, 0xa5, 0xbc, 0x94, 0x91, 0xac, 0xb9, 0x61, 0x3b, 0xe5,
-       0x84, 0xe9, 0x62, 0x0f, 0x4a, 0xa5, 0x6f, 0x62, 0x6a, 0x84, 0xf8, 0xcc,
-       0x3b, 0xc4, 0x93, 0xaa, 0x17, 0x85, 0xd9, 0xb7, 0x5a, 0x64, 0xf1, 0x24,
-       0xf9, 0xce, 0x44, 0xc1, 0x34, 0x8e, 0x93, 0x9f, 0xbd, 0x60, 0x37, 0x10,
-       0x9f, 0x2e, 0xe1, 0x32, 0xf0, 0x5c, 0xbe, 0x00, 0xab, 0x85, 0xed, 0x15,
-       0xc1, 0xfd, 0x3b, 0xb3, 0x84, 0x13, 0x83, 0x75, 0xf0, 0xa0, 0x2e, 0xf1,
-       0x4e, 0x6c, 0xb5, 0x87, 0x22, 0x55, 0x1f, 0xaf, 0x27, 0x9a, 0x7d, 0xdd,
-       0x36, 0x42, 0xc3, 0x3d, 0x84, 0x97, 0xfc, 0x15, 0xb7, 0x92, 0xbf, 0x7a,
-       0xb8, 0x9c, 0xe2, 0x21, 0xea, 0xec, 0x49, 0xbf, 0x36, 0xe4, 0xc9, 0x5a,
-       0xcb, 0xea, 0xff, 0x48, 0x6c, 0xc2, 0x27, 0x69, 0xb6, 0x83, 0x4a, 0xf2,
-       0xea, 0x78, 0x39, 0x3d, 0x82, 0x57, 0x8b, 0x7f, 0x82, 0x5c, 0xb3, 0x99,
-       0xda, 0x2c, 0xd6, 0x61, 0x66, 0xe4, 0x0a, 0xe0, 0xcf, 0xd9, 0x7e, 0x02,
-       0xf3, 0xad, 0x75, 0x38, 0x34, 0x76, 0x2f, 0x8e, 0x8c, 0xd6, 0xe3, 0x39,
-       0x2b, 0x86, 0xf6, 0x89, 0x0a, 0x9d, 0x6b, 0xe6, 0x72, 0x93, 0x9e, 0xa6,
-       0xe0, 0x6b, 0xe3, 0x98, 0x14, 0xb8, 0x3e, 0xb3, 0x0e, 0x39, 0xdf, 0xcf,
-       0x3d, 0xac, 0xa1, 0xdc, 0x96, 0xcf, 0xbb, 0x14, 0xd7, 0x75, 0xd8, 0xd9,
-       0x0c, 0x71, 0x0b, 0xd5, 0x93, 0x3b, 0x29, 0x5e, 0xef, 0x54, 0x62, 0x70,
-       0x13, 0x2e, 0xd9, 0x55, 0xe0, 0x22, 0xcb, 0xc0, 0x9e, 0x22, 0x70, 0x77,
-       0x51, 0xc5, 0xdf, 0x14, 0x2f, 0x45, 0xb9, 0x8d, 0xcf, 0x2e, 0x40, 0x79,
-       0x1e, 0x7f, 0x87, 0x31, 0x16, 0x33, 0x13, 0x20, 0x9d, 0xed, 0x2f, 0xa8,
-       0xf8, 0xb1, 0xbd, 0xeb, 0xec, 0xd8, 0x0a, 0x53, 0xcf, 0x51, 0xac, 0x85,
-       0xac, 0xd3, 0xe4, 0x67, 0xfc, 0x0c, 0x7c, 0x3f, 0xff, 0x99, 0xfc, 0xb9,
-       0x4f, 0x53, 0xc5, 0x6d, 0xf9, 0x8e, 0x81, 0x8f, 0x94, 0x8f, 0xe5, 0xbf,
-       0x85, 0x19, 0xff, 0x77, 0xa2, 0x15, 0x7f, 0xdd, 0xc3, 0x79, 0xc4, 0xad,
-       0xf8, 0xed, 0xbc, 0x2f, 0xf8, 0x6d, 0xc5, 0x3f, 0x47, 0xb2, 0xcc, 0x47,
-       0x35, 0xc6, 0x62, 0xb8, 0x68, 0x22, 0x89, 0xba, 0x9d, 0xfc, 0x9b, 0xd7,
-       0x05, 0x2e, 0xee, 0xe6, 0xf8, 0x4a, 0x42, 0xd9, 0x7b, 0x2d, 0xe1, 0x63,
-       0xd9, 0xab, 0xb9, 0xe2, 0x7b, 0x73, 0xf8, 0xcf, 0xe7, 0x98, 0x76, 0xc2,
-       0xb7, 0x74, 0x29, 0x3f, 0xf3, 0x99, 0x3a, 0xfc, 0x7a, 0xaf, 0x69, 0x97,
-       0x95, 0xa5, 0x44, 0x93, 0x63, 0x92, 0x63, 0xf3, 0x2f, 0xe6, 0xce, 0x24,
-       0xc8, 0xce, 0xd3, 0xb2, 0xbc, 0x8a, 0xf1, 0x55, 0xcf, 0x27, 0x11, 0x3a,
-       0x47, 0x57, 0xc5, 0xea, 0xec, 0x97, 0xe9, 0xda, 0x94, 0xf7, 0x5b, 0xd1,
-       0xb0, 0xd0, 0x22, 0x3b, 0xb5, 0xa1, 0x91, 0xe2, 0x3a, 0x62, 0xad, 0x92,
-       0x91, 0x6f, 0xb3, 0x8f, 0x6a, 0x5e, 0xd8, 0xf9, 0x0a, 0x4a, 0x23, 0xcf,
-       0x93, 0x7d, 0xa3, 0xec, 0x8b, 0x1b, 0x3e, 0x12, 0x5f, 0xc1, 0xf4, 0x98,
-       0x88, 0xb2, 0xac, 0xab, 0x28, 0xb6, 0xe7, 0x53, 0x7d, 0xf8, 0xe0, 0xe1,
-       0xbb, 0xe4, 0x58, 0x9f, 0x8e, 0x17, 0xb3, 0x49, 0x5a, 0x67, 0x5f, 0xb2,
-       0xf1, 0x4c, 0x5e, 0xc3, 0xee, 0xe1, 0x84, 0xef, 0xc7, 0xf7, 0x74, 0xd6,
-       0x9d, 0x2a, 0x2b, 0x36, 0x9e, 0x25, 0x3f, 0x3c, 0x58, 0x60, 0x1d, 0xab,
-       0xb8, 0x38, 0xf3, 0x75, 0x59, 0xd3, 0xc6, 0xbe, 0x1d, 0xa1, 0x33, 0x3a,
-       0xe1, 0x8e, 0x42, 0xb7, 0x96, 0xcb, 0x37, 0x56, 0xf0, 0x73, 0x03, 0xad,
-       0xb5, 0xd1, 0xf7, 0x12, 0xd9, 0xf8, 0x3b, 0x7c, 0xe8, 0xff, 0x1b, 0x1f,
-       0xf4, 0x1d, 0xa3, 0x75, 0x90, 0xbf, 0xcc, 0x88, 0xd5, 0x95, 0xfe, 0x46,
-       0x53, 0xad, 0x19, 0xb1, 0xc6, 0xef, 0x69, 0xfc, 0x34, 0x4e, 0x38, 0x7a,
-       0xb1, 0x77, 0x54, 0xca, 0x2d, 0x76, 0x3b, 0x5c, 0x3d, 0x86, 0x2d, 0x16,
-       0xc5, 0xeb, 0x28, 0x9f, 0x91, 0x32, 0x95, 0x5e, 0xd8, 0xa3, 0x8a, 0x16,
-       0xca, 0x99, 0x9e, 0x58, 0x9b, 0x35, 0xc4, 0x9d, 0xa3, 0x2a, 0xf2, 0x85,
-       0x0b, 0x28, 0x27, 0x4b, 0xf9, 0x64, 0x1a, 0xee, 0x60, 0xba, 0x01, 0x2f,
-       0x8f, 0xe9, 0x14, 0x3b, 0x67, 0xe5, 0xf2, 0x64, 0x2f, 0x4a, 0x84, 0xe7,
-       0xd3, 0x74, 0x57, 0xea, 0xb0, 0x88, 0x60, 0x2c, 0x1e, 0xc1, 0x9e, 0x42,
-       0x1c, 0x87, 0xc7, 0x23, 0xd8, 0x46, 0xfe, 0xf7, 0xd3, 0x2c, 0xd3, 0x8c,
-       0x60, 0x73, 0x89, 0x7b, 0x8d, 0x10, 0xe9, 0xc0, 0x13, 0xef, 0xf9, 0x6b,
-       0x0d, 0x58, 0x3e, 0xc6, 0x7b, 0xcf, 0xca, 0x76, 0xcb, 0xd2, 0xdb, 0x43,
-       0xd5, 0x7d, 0xef, 0x50, 0x1f, 0x63, 0x50, 0xef, 0x72, 0x21, 0xe5, 0xaa,
-       0x04, 0xf5, 0x2a, 0x71, 0xea, 0x55, 0xac, 0xb9, 0xfe, 0xcb, 0xa4, 0x48,
-       0x93, 0xf2, 0x19, 0xca, 0x53, 0x6f, 0xd2, 0xe7, 0xa4, 0x4d, 0xe5, 0x96,
-       0x64, 0xbc, 0x78, 0x98, 0x65, 0xf4, 0x84, 0xbd, 0x84, 0x3a, 0xce, 0x69,
-       0xd3, 0x70, 0x95, 0x5f, 0x50, 0x9f, 0x65, 0xa0, 0x63, 0x9a, 0x79, 0x50,
-       0xb1, 0xb5, 0x00, 0x0c, 0x16, 0xe0, 0x1d, 0xa6, 0xd8, 0x6e, 0x99, 0x88,
-       0x22, 0x36, 0xa1, 0x23, 0x3c, 0x91, 0xa2, 0xbd, 0x1a, 0xe2, 0xf4, 0xdb,
-       0xa3, 0xbe, 0xab, 0xc9, 0x69, 0x13, 0x8b, 0x76, 0x9f, 0x91, 0x0f, 0x52,
-       0xac, 0xdd, 0x91, 0x34, 0x7b, 0x6f, 0x14, 0x70, 0x53, 0x43, 0x52, 0xd6,
-       0xa6, 0x6b, 0xa9, 0x7e, 0xcb, 0x43, 0x71, 0x92, 0x3d, 0xea, 0xc8, 0x4d,
-       0xaf, 0x76, 0x5b, 0xf6, 0xab, 0x20, 0xbc, 0x25, 0x3e, 0xc3, 0xeb, 0x9e,
-       0xf8, 0xac, 0xdb, 0xda, 0xf3, 0x16, 0x3a, 0xb1, 0x78, 0x42, 0x15, 0xbf,
-       0x1c, 0x5a, 0x84, 0xcc, 0x34, 0xf4, 0x1a, 0xe2, 0xeb, 0xc3, 0x29, 0xe2,
-       0xbb, 0x40, 0xb2, 0x14, 0x48, 0x96, 0x02, 0xc9, 0x42, 0x7a, 0x39, 0xe8,
-       0xf7, 0x6d, 0x2c, 0x6b, 0x8a, 0xea, 0xef, 0x3b, 0x7e, 0x6f, 0x79, 0xb0,
-       0xc4, 0x72, 0x98, 0xae, 0x07, 0x96, 0x9b, 0xe5, 0x94, 0xf2, 0x2d, 0x9b,
-       0xe5, 0x31, 0x0d, 0x4f, 0x21, 0x6b, 0x4d, 0x1b, 0x48, 0x4d, 0x57, 0xf5,
-       0x21, 0xe5, 0xe7, 0x36, 0xeb, 0x83, 0x65, 0x94, 0xf2, 0x69, 0x92, 0x69,
-       0x2b, 0xc9, 0x38, 0x58, 0x90, 0x87, 0x6a, 0x2c, 0xcb, 0x98, 0x20, 0xde,
-       0x62, 0x24, 0x53, 0x7c, 0x42, 0x23, 0x59, 0x3b, 0xa1, 0x92, 0xac, 0xa1,
-       0x09, 0xe8, 0x0a, 0xeb, 0x69, 0xfa, 0xff, 0xe2, 0x87, 0xfb, 0x6a, 0x4f,
-       0x5c, 0x43, 0xfd, 0xb4, 0x4a, 0xfb, 0x07, 0xc9, 0x77, 0x72, 0x2a, 0x8c,
-       0x5a, 0x4b, 0xa1, 0x3c, 0xac, 0xe1, 0xf1, 0xf1, 0x06, 0x4c, 0x90, 0xdd,
-       0xc7, 0xc6, 0xa1, 0x87, 0xe9, 0xfd, 0xd6, 0x73, 0xfe, 0x04, 0xf2, 0xa7,
-       0x0d, 0x18, 0xa7, 0xfc, 0xf3, 0x40, 0x3e, 0x26, 0x26, 0x46, 0x54, 0x6c,
-       0x29, 0x9c, 0x20, 0xd9, 0x24, 0xe5, 0xd8, 0xcd, 0x09, 0xda, 0x22, 0x36,
-       0xdb, 0x66, 0x0f, 0x70, 0x05, 0xf9, 0x5a, 0x08, 0x6b, 0x2d, 0xb8, 0xdb,
-       0xed, 0x2b, 0x30, 0xdb, 0x07, 0x63, 0x87, 0xed, 0xe9, 0x35, 0x30, 0x8f,
-       0x5e, 0x43, 0xa3, 0xc0, 0xe5, 0x24, 0xc7, 0x80, 0xe5, 0x6d, 0xa0, 0x84,
-       0x44, 0xf9, 0xdb, 0xec, 0x3f, 0x42, 0x36, 0x28, 0x52, 0x5d, 0x2b, 0x52,
-       0x0f, 0x78, 0x60, 0xf4, 0x8c, 0xbc, 0x3d, 0x6d, 0xba, 0x49, 0x5a, 0x0b,
-       0x0f, 0x69, 0xd8, 0x5f, 0xd2, 0x28, 0x5e, 0x4c, 0x1b, 0xe0, 0x98, 0x87,
-       0x56, 0x4b, 0x3d, 0xda, 0x47, 0xd6, 0xa3, 0xd4, 0x0b, 0x6b, 0xa0, 0x3e,
-       0x19, 0x57, 0x8f, 0x08, 0xec, 0xa7, 0xf8, 0x9d, 0x5a, 0x64, 0x1e, 0x5d,
-       0x0d, 0xaf, 0xdc, 0x0e, 0x73, 0xa0, 0x96, 0x18, 0xf9, 0x74, 0xa8, 0x86,
-       0xfa, 0xc2, 0x4e, 0xfb, 0x35, 0x98, 0xfa, 0xfe, 0xd0, 0xaf, 0xe4, 0x64,
-       0x1c, 0x17, 0x84, 0x71, 0x52, 0x1a, 0xdf, 0xe2, 0x33, 0x2c, 0xf7, 0x06,
-       0x6c, 0xcf, 0x42, 0x0b, 0x3b, 0x6a, 0x7a, 0x7f, 0x1e, 0x38, 0x96, 0x37,
-       0x30, 0xb9, 0xa8, 0x0e, 0x68, 0xee, 0xe8, 0xb9, 0x03, 0xde, 0xaa, 0xb0,
-       0xdf, 0xe7, 0x6a, 0xe9, 0x3c, 0xf9, 0xc8, 0x7a, 0x21, 0xf0, 0x24, 0xd1,
-       0x5a, 0x30, 0xc5, 0x7d, 0x89, 0x9a, 0x5e, 0x48, 0x79, 0x76, 0x5b, 0x49,
-       0xa0, 0xd6, 0x32, 0xf5, 0x59, 0xb0, 0x6e, 0x74, 0xd2, 0xe9, 0x19, 0x89,
-       0x66, 0x96, 0xdd, 0xcb, 0x91, 0x9c, 0xab, 0xb6, 0x12, 0xff, 0x6b, 0x48,
-       0xa6, 0xdb, 0x2d, 0xaf, 0x87, 0xb0, 0x52, 0xed, 0x31, 0x13, 0x1f, 0x90,
-       0xec, 0x6b, 0x29, 0x47, 0x8c, 0x95, 0x86, 0x9b, 0x38, 0x1f, 0x4c, 0x94,
-       0x78, 0x4e, 0xea, 0xc1, 0xd5, 0xf9, 0x6a, 0x2c, 0xb0, 0xdd, 0xd9, 0xe6,
-       0x17, 0xfa, 0xf5, 0xfb, 0xa0, 0xef, 0x23, 0xdc, 0x3f, 0xf5, 0x60, 0xb4,
-       0x53, 0xa1, 0xde, 0x5c, 0xca, 0x15, 0x96, 0x39, 0xc2, 0xf9, 0x99, 0x7c,
-       0xdd, 0xdd, 0x67, 0x37, 0x51, 0x6c, 0xc2, 0x7b, 0xc2, 0x36, 0x50, 0xe3,
-       0xb0, 0x4f, 0x34, 0x90, 0x8f, 0x47, 0xb0, 0x9d, 0x7c, 0x44, 0xb3, 0xac,
-       0x14, 0x35, 0x53, 0xfa, 0xb1, 0x2c, 0xed, 0x2d, 0xc1, 0x28, 0xd9, 0xf5,
-       0x98, 0x6d, 0x55, 0xd1, 0xec, 0x1c, 0x92, 0x2d, 0xd6, 0x7f, 0x10, 0x7d,
-       0x4b, 0xbf, 0x1b, 0xab, 0x61, 0xb4, 0x1a, 0x68, 0x70, 0xf8, 0xfd, 0x69,
-       0x39, 0xdb, 0x1c, 0x21, 0xff, 0xe2, 0x3d, 0x96, 0x77, 0x10, 0xbf, 0x96,
-       0x88, 0xf1, 0x5e, 0x97, 0xf2, 0x27, 0xc4, 0x0c, 0xd1, 0x42, 0x0b, 0xc7,
-       0x2d, 0xf7, 0xe7, 0xd6, 0xd1, 0x43, 0x54, 0x53, 0x8c, 0x16, 0x50, 0x2e,
-       0x55, 0x11, 0x72, 0x2c, 0x7d, 0x1f, 0x8e, 0x92, 0xcd, 0xd9, 0x45, 0x2e,
-       0x12, 0xd7, 0xed, 0xba, 0x50, 0xf4, 0xee, 0x92, 0xb2, 0x33, 0x0d, 0x9a,
-       0xc2, 0x92, 0xc6, 0x4b, 0xb4, 0xba, 0x85, 0x7c, 0xbf, 0xd1, 0x89, 0x88,
-       0xe2, 0x2e, 0xe8, 0x07, 0x6c, 0x8d, 0xf2, 0xae, 0x94, 0xdb, 0xd2, 0x06,
-       0xa6, 0x6d, 0xea, 0xc7, 0x5b, 0xc3, 0x68, 0xb6, 0xa0, 0xeb, 0x8e, 0x35,
-       0xf0, 0x14, 0xee, 0x26, 0x3e, 0x11, 0x99, 0x4f, 0x35, 0x90, 0xd6, 0xc4,
-       0x5e, 0xbb, 0x0e, 0xee, 0x4d, 0x02, 0x11, 0x27, 0x4e, 0xbc, 0xd5, 0x20,
-       0xe7, 0x3f, 0xb3, 0x8c, 0x70, 0xdf, 0xb7, 0x7f, 0x44, 0xf2, 0x8a, 0xf9,
-       0xf5, 0x0e, 0xaf, 0x59, 0x76, 0x11, 0xeb, 0xa9, 0xe7, 0xa7, 0x25, 0x7a,
-       0xbf, 0x85, 0xde, 0x3f, 0x44, 0xb8, 0x73, 0x31, 0x7f, 0xd6, 0x6b, 0x6a,
-       0x77, 0xac, 0xf2, 0x73, 0x78, 0x90, 0x64, 0xe0, 0xfc, 0xcd, 0x6b, 0xcc,
-       0xf3, 0x22, 0xe6, 0x99, 0x6a, 0x37, 0xfb, 0x95, 0x8d, 0x8f, 0xf2, 0x77,
-       0x73, 0x0f, 0xef, 0xee, 0xb0, 0x21, 0x26, 0xec, 0x3d, 0x28, 0xeb, 0x68,
-       0x8a, 0x3a, 0x56, 0xff, 0x34, 0xa0, 0x44, 0x9c, 0x51, 0x14, 0x9b, 0x81,
-       0x87, 0x0a, 0x96, 0xb7, 0x51, 0x31, 0x07, 0xe2, 0xd4, 0xf7, 0x9e, 0xfc,
-       0xa1, 0x8a, 0x9d, 0x9d, 0x65, 0x33, 0x46, 0x46, 0x8f, 0x3a, 0x51, 0xf1,
-       0xe2, 0x2e, 0x05, 0x0b, 0x96, 0xa8, 0x78, 0x8b, 0x72, 0xc8, 0x36, 0x9a,
-       0x45, 0xc2, 0x96, 0xda, 0x54, 0xe9, 0x89, 0x7f, 0x5f, 0x3c, 0x9a, 0xa4,
-       0xb1, 0x6a, 0x4c, 0x5a, 0x7d, 0x07, 0xf0, 0xa8, 0x74, 0x9b, 0xd9, 0x16,
-       0x11, 0xca, 0xc3, 0xe7, 0xf2, 0x50, 0x6a, 0x8a, 0xf0, 0x0f, 0x76, 0xbf,
-       0xeb, 0xfb, 0x0c, 0xd9, 0xd2, 0x7d, 0x23, 0x0f, 0xd1, 0x94, 0x71, 0x30,
-       0xdb, 0xcc, 0x76, 0xe1, 0xf9, 0x99, 0x94, 0x37, 0x4c, 0xc3, 0x47, 0x8b,
-       0x8a, 0xc5, 0x19, 0x34, 0x29, 0x8e, 0x75, 0x6a, 0x2f, 0xf1, 0xdc, 0xee,
-       0x34, 0xe1, 0x74, 0x0b, 0xe7, 0xc4, 0xa8, 0xf8, 0xd9, 0xa8, 0xd9, 0x43,
-       0x3d, 0xee, 0xaa, 0x8d, 0x30, 0xfb, 0xee, 0x11, 0xd4, 0x97, 0x11, 0xef,
-       0x56, 0x92, 0xf8, 0xb4, 0x55, 0xc4, 0x93, 0x65, 0x33, 0x8e, 0x2a, 0xbf,
-       0x67, 0x65, 0xcc, 0xb2, 0xbc, 0x98, 0xf2, 0x1b, 0x99, 0xce, 0xb0, 0x8f,
-       0xdf, 0x85, 0xda, 0x98, 0x40, 0x4d, 0x66, 0xc4, 0xd7, 0x6d, 0x94, 0xec,
-       0xdd, 0x94, 0x51, 0x89, 0xb6, 0x4a, 0x39, 0x9d, 0x68, 0x2f, 0x1e, 0xa0,
-       0x9e, 0x85, 0x75, 0xfa, 0x92, 0xcc, 0x7d, 0x9b, 0xe5, 0xbc, 0x65, 0x4e,
-       0x66, 0xd2, 0x6c, 0x3d, 0xff, 0x96, 0x0d, 0xac, 0xfb, 0x43, 0x94, 0xcf,
-       0x17, 0x2f, 0xed, 0xda, 0x31, 0xa0, 0x3c, 0x20, 0x8d, 0x15, 0x6c, 0xdb,
-       0x46, 0x7a, 0xef, 0xdb, 0x9d, 0xfa, 0xa9, 0x77, 0xf0, 0xda, 0x50, 0x54,
-       0x34, 0xed, 0xf6, 0xfc, 0xda, 0xf9, 0x2a, 0xf1, 0xf5, 0x61, 0x9a, 0xf9,
-       0xe1, 0x78, 0x7b, 0x07, 0x97, 0x16, 0xff, 0x94, 0xf6, 0x86, 0x88, 0x17,
-       0x68, 0x31, 0x92, 0x75, 0x05, 0xcd, 0x25, 0x57, 0x67, 0x0e, 0x48, 0x57,
-       0x67, 0xfc, 0xa4, 0xf7, 0x51, 0xd6, 0x3b, 0xcf, 0x45, 0x55, 0xdd, 0xf3,
-       0x7e, 0x3e, 0x3f, 0x4c, 0x31, 0xc9, 0xb6, 0x44, 0x53, 0x83, 0xc3, 0xfa,
-       0x85, 0xa8, 0x73, 0xba, 0x8c, 0x85, 0x62, 0x87, 0xf4, 0xe2, 0xd5, 0x7c,
-       0x16, 0x15, 0x13, 0xfe, 0x79, 0xa6, 0xfd, 0xe5, 0xf3, 0x6d, 0xe2, 0xd8,
-       0xc3, 0x54, 0x7c, 0xeb, 0x7d, 0x7f, 0xe9, 0x7d, 0x92, 0xe2, 0x49, 0x73,
-       0x6e, 0x95, 0xa9, 0x56, 0xf6, 0x37, 0x28, 0x2f, 0xdb, 0xb7, 0xc8, 0x5c,
-       0x2b, 0xfb, 0x1d, 0xbc, 0x38, 0xe1, 0xd9, 0xb9, 0xfb, 0x3c, 0x1f, 0xd7,
-       0x74, 0x4a, 0x39, 0x61, 0x5f, 0x45, 0xba, 0x60, 0x3c, 0x55, 0x5d, 0xfc,
-       0xe5, 0x9c, 0x6e, 0xa8, 0x89, 0xae, 0xaf, 0xd4, 0x2b, 0xce, 0x69, 0x35,
-       0xce, 0x1b, 0x78, 0x31, 0xaf, 0xb4, 0x85, 0xd1, 0x84, 0x3e, 0x5b, 0xe0,
-       0xdd, 0x1e, 0x81, 0xd3, 0x97, 0x47, 0x10, 0xba, 0xcc, 0x2a, 0x77, 0x84,
-       0xfa, 0x25, 0xe6, 0x95, 0xc9, 0x51, 0xce, 0x48, 0xad, 0x53, 0x45, 0xed,
-       0xa5, 0x5c, 0xa7, 0xd8, 0x0e, 0x0a, 0xfe, 0x85, 0xf6, 0x5d, 0x77, 0xa9,
-       0x65, 0x74, 0x50, 0x4b, 0xe0, 0xf5, 0x5d, 0x9d, 0x09, 0x9f, 0xf3, 0x43,
-       0xe6, 0xe1, 0x4a, 0x5f, 0x06, 0xf6, 0xc7, 0xc5, 0x64, 0xc7, 0xdc, 0x0a,
-       0x05, 0xe9, 0x25, 0xf0, 0x22, 0xf4, 0x7e, 0xdb, 0x2e, 0xf6, 0x85, 0x47,
-       0x74, 0x9e, 0x09, 0x81, 0xae, 0x84, 0x0e, 0x6b, 0xd5, 0x0b, 0x44, 0x9b,
-       0xfa, 0x4d, 0xd2, 0x07, 0xd3, 0xaa, 0xe2, 0xa9, 0xe2, 0x88, 0x8a, 0xd3,
-       0x0f, 0xf3, 0x19, 0x08, 0xd6, 0x51, 0x7a, 0x01, 0xc5, 0x76, 0x46, 0x9d,
-       0x93, 0x6d, 0x40, 0xaf, 0xf4, 0x61, 0x51, 0x31, 0x35, 0xca, 0xf8, 0x7c,
-       0x3f, 0x42, 0x91, 0x7d, 0x2b, 0xcd, 0x7b, 0x7e, 0x23, 0x17, 0x64, 0xfe,
-       0x9d, 0xf6, 0x30, 0xde, 0xa8, 0x38, 0xe2, 0xd3, 0xae, 0xe8, 0x68, 0x8a,
-       0x74, 0x3d, 0x91, 0xae, 0xe2, 0xd9, 0x48, 0x7b, 0xd8, 0xe7, 0x98, 0x87,
-       0x5e, 0xf1, 0x78, 0x9e, 0xf2, 0x0a, 0xd5, 0xdc, 0x89, 0xac, 0x62, 0xd5,
-       0x42, 0x62, 0xb3, 0xad, 0x63, 0x99, 0x5e, 0xa9, 0x57, 0xf7, 0xe7, 0xab,
-       0xf7, 0x3f, 0xbd, 0xa2, 0x90, 0x57, 0xa8, 0x7f, 0x83, 0x5e, 0xef, 0x28,
-       0xf7, 0x34, 0x51, 0x2c, 0xbd, 0x46, 0xb5, 0xeb, 0xd5, 0xb1, 0x5e, 0x91,
-       0xcf, 0xeb, 0x78, 0x65, 0x7c, 0xb9, 0x78, 0x30, 0x6f, 0xe1, 0xe5, 0x62,
-       0xe5, 0x2e, 0xe8, 0x81, 0xa2, 0x2b, 0xc6, 0xf3, 0xdc, 0xfb, 0x98, 0xa9,
-       0x32, 0x66, 0xc4, 0x5a, 0xc2, 0x53, 0x56, 0x2f, 0xf4, 0xeb, 0xc8, 0x78,
-       0xb1, 0x01, 0x93, 0x63, 0x95, 0x7a, 0x77, 0xeb, 0xb9, 0x7a, 0xf7, 0xc5,
-       0x3b, 0x9d, 0x48, 0x4e, 0x77, 0xd0, 0xd7, 0x38, 0xbc, 0x49, 0x46, 0xad,
-       0x10, 0xd5, 0x49, 0x2b, 0x37, 0x2d, 0x22, 0x3d, 0x3b, 0xba, 0x99, 0x5f,
-       0xf4, 0x69, 0xd4, 0x63, 0x4c, 0x14, 0xd9, 0x5f, 0x0d, 0x18, 0xc5, 0x6f,
-       0xb5, 0x56, 0xec, 0xdc, 0x96, 0xd3, 0x1c, 0xa0, 0x9e, 0xfa, 0x8b, 0x06,
-       0x9a, 0x0d, 0xea, 0x9c, 0x1b, 0xbd, 0x8e, 0x6e, 0xe4, 0x54, 0xc7, 0xea,
-       0xb9, 0x5e, 0xac, 0x5c, 0xa9, 0x38, 0xf7, 0xad, 0x0c, 0x4d, 0x1b, 0xc6,
-       0x16, 0xbf, 0x0e, 0x9d, 0x1c, 0xd8, 0x4f, 0x33, 0x50, 0x0d, 0xcd, 0xa5,
-       0xef, 0xe9, 0xb8, 0x2f, 0xd4, 0x7d, 0x1f, 0x36, 0xe5, 0x07, 0xf0, 0xb7,
-       0x79, 0xce, 0x13, 0x3a, 0x1e, 0x63, 0x1e, 0x0a, 0x7c, 0xff, 0x73, 0xb0,
-       0x85, 0x6b, 0xdf, 0x23, 0x25, 0x8a, 0xc3, 0x21, 0xe4, 0x12, 0x8e, 0x9f,
-       0x47, 0x12, 0xa7, 0xc4, 0xf9, 0xfd, 0xbf, 0xbb, 0x97, 0xf5, 0x46, 0xfd,
-       0x1c, 0xcd, 0x4e, 0x4a, 0xf6, 0x4a, 0xbe, 0x7f, 0xf2, 0x03, 0x74, 0x3b,
-       0xe5, 0x91, 0x0f, 0x6c, 0x13, 0x63, 0x7a, 0xc5, 0x7e, 0xdb, 0x47, 0xb9,
-       0x1e, 0x7d, 0x42, 0xf5, 0x28, 0x2a, 0xb6, 0xd2, 0x73, 0xa3, 0xf3, 0x4a,
-       0x7a, 0x8a, 0x78, 0x3f, 0x46, 0x39, 0x26, 0xe1, 0x1c, 0x47, 0xa2, 0xc0,
-       0xb3, 0xfa, 0x51, 0x9a, 0xd5, 0xcd, 0xdc, 0x32, 0x8a, 0xe7, 0x03, 0x76,
-       0xd7, 0xc0, 0xa0, 0x30, 0x8f, 0x52, 0x6d, 0x4e, 0x1c, 0xa0, 0xb9, 0x8b,
-       0xbe, 0x37, 0xb4, 0x87, 0xba, 0xec, 0x75, 0x30, 0xdd, 0x85, 0xc2, 0x34,
-       0x5e, 0x17, 0xa6, 0x5e, 0x23, 0x58, 0x27, 0x9f, 0x60, 0x91, 0xaf, 0x9b,
-       0xe3, 0xb0, 0xfc, 0xef, 0x57, 0xd2, 0x1d, 0xfe, 0xf7, 0xd1, 0xf4, 0xc5,
-       0xe7, 0x7b, 0x0b, 0x77, 0x07, 0xd5, 0xc6, 0x7c, 0x21, 0x83, 0x48, 0x33,
-       0xd7, 0x8a, 0xa8, 0x38, 0xb0, 0x0b, 0x5a, 0xbd, 0xf3, 0x3e, 0xbe, 0x3e,
-       0x04, 0x4d, 0x73, 0xa8, 0xd2, 0x12, 0x2f, 0xd4, 0x1b, 0xa4, 0xae, 0x13,
-       0xdc, 0x0f, 0x74, 0xe5, 0x9e, 0x80, 0xd9, 0x53, 0x43, 0x34, 0x3e, 0x01,
-       0xe3, 0x7a, 0x1f, 0x49, 0x1f, 0xe7, 0x2c, 0xce, 0xe3, 0x8c, 0x8a, 0xc1,
-       0xd1, 0xa8, 0xd8, 0x4c, 0xb2, 0xb4, 0x3b, 0x27, 0x71, 0x85, 0xcf, 0xff,
-       0x2b, 0xc4, 0x3f, 0xe7, 0x9c, 0x13, 0x94, 0x73, 0x18, 0xef, 0xd1, 0x34,
-       0xe3, 0x1d, 0xa0, 0x3e, 0xf3, 0x7a, 0xdb, 0x4c, 0xf5, 0x84, 0xcc, 0x44,
-       0x97, 0x30, 0x29, 0xa9, 0xb1, 0x3c, 0x5d, 0xfd, 0x33, 0xe0, 0xb9, 0xd8,
-       0x97, 0xa9, 0xa7, 0x9e, 0x64, 0x1a, 0x22, 0x7a, 0x1f, 0xfa, 0xf4, 0x4e,
-       0xce, 0xd1, 0x3b, 0xf1, 0x07, 0x64, 0x52, 0xdd, 0xfb, 0xc9, 0x1e, 0xdb,
-       0x0a, 0xaf, 0xc8, 0xce, 0xd6, 0x8a, 0x4c, 0x83, 0x3e, 0x2f, 0x3f, 0x49,
-       0x33, 0x2f, 0x51, 0x67, 0x86, 0xe6, 0x48, 0xa6, 0x6d, 0xae, 0x22, 0xba,
-       0x44, 0xb3, 0xcb, 0x18, 0x10, 0x66, 0x3f, 0xe9, 0xad, 0x6f, 0xdc, 0xd7,
-       0xdb, 0x4f, 0xd2, 0x5d, 0x3e, 0xce, 0x19, 0xea, 0x39, 0xbe, 0xe8, 0x93,
-       0xec, 0x73, 0xd5, 0xbb, 0xca, 0x94, 0x78, 0x8a, 0x7a, 0x97, 0xa7, 0x8a,
-       0xaa, 0xd8, 0x47, 0xf6, 0x1c, 0xa7, 0xb8, 0x19, 0xf4, 0xef, 0x1f, 0xa9,
-       0x06, 0x96, 0xbe, 0xd7, 0x3c, 0x97, 0x6f, 0xc8, 0xae, 0x65, 0xb2, 0x6b,
-       0x27, 0x65, 0x65, 0xee, 0xd9, 0xb8, 0xde, 0x1d, 0xa6, 0x7a, 0x27, 0xf0,
-       0xa1, 0x9f, 0x63, 0x0f, 0xa3, 0xb3, 0xc8, 0x3d, 0xa1, 0x25, 0x96, 0xe7,
-       0x8d, 0xdc, 0x7c, 0xc2, 0xfd, 0x7e, 0xa9, 0x92, 0x1f, 0xa9, 0x36, 0xba,
-       0x21, 0xa7, 0x47, 0xbc, 0x50, 0xe4, 0x9f, 0x54, 0x4c, 0x62, 0xec, 0x5b,
-       0xae, 0x68, 0xea, 0xf4, 0xd0, 0xde, 0xe9, 0x49, 0xd5, 0xb2, 0xca, 0xef,
-       0x0b, 0xeb, 0x94, 0x15, 0x72, 0x6f, 0x9f, 0x8f, 0x4d, 0xb8, 0x6c, 0xb1,
-       0x7b, 0x73, 0x02, 0xfe, 0x4c, 0x6c, 0x50, 0x4c, 0xa2, 0xb7, 0x3b, 0xd9,
-       0x33, 0x2d, 0x92, 0xd4, 0x43, 0x25, 0xbd, 0x94, 0x48, 0xa6, 0x8e, 0xc3,
-       0xd6, 0x8e, 0x14, 0x6d, 0xed, 0x8d, 0x62, 0xf5, 0x6e, 0x93, 0xe5, 0x62,
-       0x5f, 0xe5, 0xf8, 0xb0, 0xdc, 0xfb, 0x29, 0x0f, 0xc1, 0xef, 0x43, 0xe4,
-       0xa1, 0x46, 0x8a, 0xb1, 0x3b, 0x51, 0x4b, 0x4d, 0xb3, 0xdc, 0xde, 0x44,
-       0xf3, 0xcf, 0x5d, 0x44, 0xbf, 0xdc, 0x9a, 0x03, 0xd7, 0x93, 0x47, 0xf8,
-       0xc2, 0xb9, 0x85, 0x79, 0x7a, 0x33, 0x52, 0x91, 0x91, 0xca, 0x70, 0xe5,
-       0xff, 0x17, 0xd2, 0x1a, 0x28, 0x06, 0xd7, 0x0d, 0x09, 0xea, 0xef, 0x2b,
-       0xf1, 0xb8, 0x90, 0xef, 0x4e, 0xfd, 0x7b, 0xb3, 0x57, 0x64, 0xa5, 0xde,
-       0x7f, 0xdc, 0xcc, 0x77, 0x51, 0x8a, 0x33, 0x1c, 0xfb, 0xed, 0xb3, 0x15,
-       0xdd, 0xf2, 0x1c, 0x7f, 0xa8, 0xe4, 0x8a, 0x6b, 0xf3, 0xd8, 0x40, 0xbd,
-       0x83, 0x1b, 0x26, 0x1c, 0xd7, 0x16, 0x7b, 0x49, 0x37, 0x96, 0x31, 0x48,
-       0x44, 0xb7, 0xea, 0x5d, 0xfa, 0x38, 0xf5, 0x5a, 0x84, 0xcb, 0xa0, 0x7e,
-       0x94, 0x62, 0x7c, 0x1e, 0x76, 0xcc, 0xc5, 0x54, 0xbd, 0xc3, 0x77, 0xbb,
-       0x03, 0x62, 0xe1, 0x54, 0x25, 0xcd, 0x1f, 0x3a, 0x27, 0xdf, 0x69, 0xb9,
-       0xfd, 0x26, 0x7e, 0x5f, 0x3f, 0x67, 0x93, 0x2b, 0x99, 0x26, 0xfd, 0x7e,
-       0x76, 0x8e, 0x87, 0x3f, 0x74, 0xf6, 0x8e, 0xaf, 0xfe, 0xf6, 0x99, 0x59,
-       0xe2, 0x93, 0x7b, 0x45, 0x78, 0x31, 0x87, 0xfb, 0xc4, 0x0b, 0xe7, 0x7c,
-       0xe1, 0x52, 0xc2, 0xbd, 0x01, 0x37, 0xd2, 0x7c, 0xd4, 0x49, 0x73, 0x28,
-       0xcd, 0x2e, 0x48, 0x0d, 0xb3, 0x3e, 0xce, 0x90, 0x3e, 0xd8, 0xe6, 0xa7,
-       0xc8, 0xe6, 0x1d, 0x39, 0x8a, 0x99, 0xd4, 0x7a, 0x61, 0xf6, 0x92, 0xbf,
-       0x51, 0xed, 0x32, 0x13, 0x1f, 0xc3, 0x34, 0xd6, 0xfa, 0x3e, 0x7d, 0x66,
-       0xce, 0xa7, 0x4f, 0xb1, 0x4f, 0xa3, 0x6f, 0x38, 0x04, 0x25, 0xf3, 0x29,
-       0xe9, 0x8c, 0xe2, 0x4d, 0x30, 0x4e, 0xce, 0x53, 0x67, 0x40, 0xfd, 0xb2,
-       0x36, 0x9f, 0xf6, 0xc8, 0x42, 0x47, 0xe2, 0x28, 0xf5, 0xdb, 0xfb, 0xc0,
-       0x25, 0xa3, 0xeb, 0xe8, 0x31, 0x61, 0x96, 0xdf, 0x0b, 0x71, 0x0e, 0x10,
-       0x68, 0xcc, 0x54, 0xf0, 0x5d, 0x5e, 0x4c, 0x60, 0x47, 0xa9, 0x82, 0xf3,
-       0x32, 0xf2, 0xe1, 0x31, 0xff, 0x7e, 0x41, 0x81, 0x96, 0x79, 0x9b, 0x6b,
-       0x33, 0xc1, 0x25, 0x73, 0xf2, 0x7f, 0x67, 0xce, 0x06, 0x6f, 0xce, 0xe9,
-       0x67, 0x4b, 0x8c, 0x6b, 0x8f, 0x96, 0xe1, 0x7c, 0x0d, 0xb1, 0x26, 0xff,
-       0x67, 0x54, 0x03, 0x34, 0xea, 0x81, 0xfd, 0xbc, 0x8f, 0x5c, 0x11, 0x94,
-       0xbf, 0xcb, 0xb5, 0x47, 0xec, 0xf0, 0x5c, 0xfe, 0xfa, 0x06, 0xad, 0xf5,
-       0xd1, 0x87, 0x75, 0xc6, 0x77, 0x12, 0x37, 0xd1, 0xb3, 0xeb, 0xef, 0xeb,
-       0xcf, 0xa3, 0xa7, 0x36, 0x4d, 0xfd, 0xad, 0xbf, 0xcf, 0xbf, 0xaf, 0xa0,
-       0x3d, 0xcb, 0xf9, 0xdd, 0x08, 0xdf, 0xb5, 0xac, 0xce, 0x26, 0x8d, 0xcd,
-       0x60, 0x3a, 0x06, 0xd6, 0x14, 0x0d, 0xdc, 0x4a, 0x75, 0x61, 0xcc, 0xbf,
-       0x07, 0x3d, 0x3f, 0xf7, 0x28, 0xb4, 0x6f, 0x19, 0xed, 0x1b, 0xf4, 0xd7,
-       0x0c, 0x2c, 0x2f, 0x9e, 0x9f, 0xe9, 0x54, 0x3a, 0x77, 0xe8, 0xdc, 0x1c,
-       0xcb, 0x76, 0x70, 0xc5, 0xce, 0x7c, 0xaf, 0x18, 0xc9, 0x47, 0x89, 0x96,
-       0x42, 0x19, 0x40, 0xa2, 0x23, 0x73, 0x33, 0xe5, 0x5d, 0x2b, 0xa5, 0x2a,
-       0x4d, 0x58, 0x9b, 0x22, 0x3f, 0xd6, 0x97, 0xe2, 0x8e, 0x54, 0x0d, 0xf5,
-       0x34, 0xc3, 0xb8, 0x4d, 0xaf, 0x45, 0x7f, 0xea, 0x52, 0xe0, 0xc6, 0x3a,
-       0xea, 0x41, 0x06, 0xfc, 0x9e, 0xbe, 0x86, 0xe8, 0xd5, 0x59, 0x4f, 0xe1,
-       0xf6, 0x73, 0xff, 0xae, 0x42, 0x34, 0x7e, 0xef, 0x3c, 0x77, 0x33, 0xdc,
-       0xe6, 0x1e, 0xaa, 0x83, 0xdd, 0x58, 0x97, 0x0a, 0x53, 0x6f, 0xcd, 0xf9,
-       0x61, 0x3e, 0x22, 0xd6, 0x67, 0x72, 0xfd, 0xb9, 0x3e, 0x67, 0x46, 0xcc,
-       0x90, 0x5c, 0xa8, 0xf5, 0xc4, 0x73, 0x34, 0xbf, 0x65, 0x4a, 0x7c, 0x1f,
-       0xa5, 0x20, 0x66, 0xf1, 0xcc, 0x48, 0xc3, 0x1f, 0xcd, 0x59, 0xe9, 0xc7,
-       0xeb, 0x71, 0xd5, 0xbe, 0x06, 0x64, 0xf6, 0xe9, 0xb0, 0x1f, 0xb7, 0x68,
-       0x2d, 0x45, 0x9f, 0x19, 0xb1, 0xb7, 0xf8, 0x87, 0x68, 0x77, 0x60, 0x8d,
-       0xfe, 0x3f, 0x95, 0x7d, 0x0b, 0x70, 0x54, 0xe7, 0x95, 0xe6, 0x77, 0xfb,
-       0x21, 0xb5, 0x9e, 0x5c, 0x09, 0x09, 0x5a, 0x20, 0x9b, 0x6e, 0xf7, 0x6d,
-       0xa9, 0x8d, 0x3a, 0xe1, 0x36, 0x88, 0xb5, 0x9c, 0xed, 0x2d, 0x1a, 0x2c,
-       0x8c, 0x08, 0x60, 0xcb, 0xb6, 0x3c, 0x83, 0x77, 0x32, 0x6b, 0xc5, 0x36,
-       0x18, 0x3f, 0x92, 0x91, 0x09, 0x5b, 0x25, 0x53, 0x53, 0xd1, 0x1d, 0x01,
-       0x42, 0x40, 0xbf, 0x24, 0xc1, 0x00, 0x33, 0x53, 0xe3, 0x46, 0x0f, 0x20,
-       0xb8, 0x5b, 0xc2, 0x71, 0x66, 0x4a, 0xc9, 0xd4, 0x56, 0x34, 0x20, 0x0c,
-       0x04, 0x63, 0x3c, 0x93, 0x99, 0x29, 0xb2, 0xeb, 0x2d, 0x13, 0x1c, 0xc0,
-       0x0f, 0xfc, 0x4c, 0xb2, 0x16, 0xf1, 0xc4, 0x77, 0xbf, 0x73, 0xbb, 0x1b,
-       0x04, 0x45, 0x3c, 0x35, 0x54, 0x75, 0xb5, 0x6e, 0xdf, 0xff, 0xfe, 0x8f,
-       0xf3, 0x9f, 0xf3, 0x9d, 0xef, 0x9c, 0xf3, 0xdf, 0xa2, 0x84, 0xfe, 0xfb,
-       0xdf, 0xcc, 0x75, 0x8c, 0x4f, 0xdc, 0x0b, 0x69, 0x66, 0xb3, 0x65, 0xbc,
-       0x0b, 0x5f, 0x0e, 0x24, 0x9c, 0xe8, 0xea, 0x77, 0xe0, 0xda, 0xa2, 0x73,
-       0xa6, 0x67, 0xf6, 0x8d, 0xfc, 0x4e, 0xc4, 0xe6, 0xc4, 0x33, 0xfd, 0xf2,
-       0xed, 0x40, 0x60, 0x71, 0x36, 0xe7, 0xba, 0x61, 0xd0, 0x89, 0xa7, 0xd9,
-       0xf6, 0xa2, 0x6e, 0xcb, 0xed, 0xb1, 0x55, 0x1b, 0xc0, 0x73, 0xfd, 0x8c,
-       0x6d, 0x34, 0x13, 0xcf, 0x86, 0x8a, 0x71, 0x7f, 0x75, 0x76, 0x1d, 0xc3,
-       0x5c, 0x87, 0xe1, 0x30, 0x94, 0x4c, 0xa3, 0x13, 0xe5, 0x9c, 0x3f, 0xb9,
-       0x18, 0x7e, 0x98, 0x29, 0xc1, 0xe8, 0x81, 0x71, 0x25, 0x9d, 0xce, 0xb6,
-       0x19, 0xb2, 0x62, 0x5a, 0x43, 0x19, 0x6b, 0xb4, 0x61, 0x26, 0xfd, 0xfb,
-       0x85, 0x8c, 0x03, 0x9f, 0x65, 0x5c, 0xf8, 0x74, 0xa4, 0x18, 0xbf, 0x3e,
-       0x50, 0xc2, 0x8f, 0x8a, 0x4f, 0x46, 0x34, 0xfe, 0xde, 0xac, 0xbc, 0x12,
-       0x95, 0xd8, 0x23, 0x80, 0x4f, 0x33, 0xe3, 0xca, 0xd1, 0xaf, 0x5c, 0x6b,
-       0xc6, 0xfc, 0x8e, 0x6a, 0x70, 0xcc, 0xbf, 0x36, 0xbf, 0x3b, 0x4d, 0xae,
-       0xd3, 0xc7, 0xaa, 0xd4, 0x4a, 0xf0, 0xd9, 0x01, 0x19, 0x47, 0xfa, 0x6f,
-       0x56, 0x5e, 0x8d, 0x8a, 0x7c, 0x2b, 0xf1, 0xeb, 0x11, 0x91, 0xe3, 0x27,
-       0xd4, 0x69, 0xe9, 0x7f, 0x5c, 0x39, 0x9e, 0x7b, 0xe6, 0xe7, 0xdc, 0x8b,
-       0x8d, 0xa3, 0x0e, 0x90, 0x4c, 0xf0, 0x59, 0x17, 0x5e, 0x38, 0x68, 0x23,
-       0x27, 0x2e, 0xc6, 0xc6, 0xc1, 0x12, 0xbc, 0x30, 0xa8, 0xa2, 0xe3, 0x60,
-       0xb3, 0x42, 0xbe, 0xaf, 0xce, 0x20, 0xef, 0xed, 0x18, 0x0d, 0xb0, 0xdd,
-       0xb8, 0x72, 0x2e, 0xdd, 0x30, 0x33, 0xdb, 0x4f, 0x36, 0xf7, 0x93, 0xe5,
-       0x31, 0x86, 0xc2, 0x38, 0x8d, 0x5c, 0x72, 0xdf, 0xe6, 0xd7, 0x18, 0x21,
-       0x3e, 0x9c, 0xb6, 0x53, 0xc7, 0x24, 0x1e, 0x15, 0xbb, 0x4f, 0x6d, 0xbe,
-       0x12, 0x95, 0xb9, 0x1a, 0xca, 0x91, 0x46, 0x9b, 0xc5, 0xb1, 0x5f, 0x67,
-       0x5c, 0xb8, 0x82, 0xb6, 0xf2, 0x10, 0xe5, 0xb1, 0x9a, 0xf2, 0x68, 0xa6,
-       0x3c, 0x5a, 0x39, 0xdf, 0x97, 0xa3, 0x82, 0x93, 0xde, 0x40, 0x44, 0xd1,
-       0xb0, 0x2a, 0x23, 0x7d, 0x58, 0xe3, 0xb8, 0x1c, 0xe1, 0xbf, 0xd9, 0xbc,
-       0x35, 0x7a, 0xab, 0x5c, 0xa0, 0x96, 0x87, 0xc5, 0xaf, 0x89, 0x6c, 0x02,
-       0xe4, 0x50, 0xe3, 0xca, 0xa8, 0x15, 0x23, 0xef, 0xdb, 0xec, 0x49, 0xe5,
-       0x6d, 0xa7, 0x44, 0xec, 0x53, 0xf2, 0xe1, 0xca, 0x3e, 0x72, 0xb5, 0x1a,
-       0x2d, 0x7b, 0xff, 0xde, 0x94, 0x7c, 0xa7, 0x36, 0x2f, 0xb4, 0xf0, 0xe6,
-       0x6f, 0x36, 0x37, 0x5d, 0x5f, 0xd3, 0xb8, 0xf2, 0x36, 0xd7, 0x73, 0x81,
-       0x7a, 0x7a, 0x92, 0x73, 0x2d, 0x92, 0xbd, 0x4b, 0x73, 0xef, 0x38, 0xd7,
-       0x4f, 0x87, 0x8b, 0xf1, 0x5e, 0xaa, 0x84, 0x1f, 0xca, 0x76, 0x98, 0x7b,
-       0x97, 0x6e, 0x56, 0x4e, 0x59, 0xf2, 0x0d, 0xe0, 0x5d, 0x8e, 0x7d, 0xec,
-       0x7a, 0x1f, 0x59, 0xde, 0x96, 0xad, 0xc3, 0xe5, 0xed, 0x57, 0xf0, 0x54,
-       0xd6, 0x66, 0x28, 0x91, 0xeb, 0xb5, 0x34, 0xc9, 0x8b, 0x49, 0x7d, 0x91,
-       0x3e, 0x46, 0x95, 0xfc, 0xa8, 0x42, 0x8c, 0xa1, 0xfe, 0xa9, 0xcb, 0x3c,
-       0x0e, 0xe2, 0xe2, 0x3a, 0x7c, 0xc1, 0x38, 0x21, 0x42, 0x8b, 0x92, 0xb5,
-       0x48, 0x8e, 0xb4, 0x50, 0x62, 0x42, 0xeb, 0xdf, 0x20, 0xb9, 0xd4, 0x6b,
-       0xe4, 0xb9, 0x54, 0x21, 0x74, 0xa7, 0xbf, 0x30, 0x27, 0xaa, 0xe8, 0x57,
-       0xb5, 0xeb, 0x79, 0x37, 0xae, 0xd9, 0x34, 0x87, 0x78, 0xaf, 0x27, 0x8d,
-       0xdc, 0x3f, 0x72, 0x2f, 0xf2, 0xdd, 0x27, 0xb5, 0xdf, 0x99, 0x4f, 0xdc,
-       0xd4, 0x36, 0x8f, 0xe5, 0xf9, 0x78, 0x5f, 0xb0, 0xbc, 0x14, 0x3d, 0xbb,
-       0xbd, 0xc9, 0x14, 0xaa, 0x90, 0xd4, 0x6c, 0x73, 0x0b, 0x38, 0x3b, 0x3b,
-       0xbc, 0xbd, 0xcd, 0xb0, 0xf2, 0x20, 0x9e, 0x14, 0xfe, 0x61, 0xa6, 0xd8,
-       0x8c, 0x53, 0x6b, 0xf0, 0x54, 0xd8, 0x2a, 0x65, 0xee, 0xd6, 0xac, 0xec,
-       0xfd, 0x45, 0x58, 0x17, 0x2c, 0x42, 0xaa, 0x95, 0x18, 0xd7, 0x6f, 0xb4,
-       0xb0, 0x7b, 0xf2, 0xa7, 0xc0, 0x8b, 0xdf, 0xf4, 0x0b, 0x1f, 0x03, 0x0a,
-       0x63, 0x1c, 0x13, 0x39, 0x0c, 0xec, 0xf7, 0x1a, 0x36, 0x9b, 0x3c, 0xff,
-       0x99, 0x69, 0xb4, 0xc9, 0xb3, 0xd2, 0x47, 0xad, 0xc5, 0x1b, 0x6f, 0xd6,
-       0x7b, 0x0f, 0xe5, 0xf4, 0xaf, 0x33, 0x25, 0xe7, 0xa8, 0xd6, 0x31, 0xee,
-       0xe9, 0x97, 0x9a, 0x4d, 0x04, 0xbb, 0xaa, 0x7d, 0x1d, 0xba, 0xad, 0x18,
-       0x67, 0xbf, 0xf6, 0xdf, 0x88, 0xe9, 0x05, 0x70, 0xd5, 0x01, 0xf7, 0xc5,
-       0x6d, 0xb0, 0xd5, 0x11, 0xab, 0xa9, 0xd3, 0xcd, 0xa3, 0x36, 0xcc, 0xeb,
-       0x57, 0xf0, 0x58, 0xd2, 0x86, 0x07, 0x92, 0x76, 0xac, 0x4a, 0xe2, 0xfb,
-       0xf3, 0x80, 0xc9, 0x1a, 0xf8, 0xdb, 0xa7, 0xe8, 0x9a, 0xcb, 0xe1, 0x6f,
-       0x8d, 0x91, 0x17, 0xac, 0x62, 0x2c, 0xba, 0x72, 0x94, 0x38, 0xc8, 0xb6,
-       0xce, 0x3e, 0xea, 0x66, 0x9f, 0x1d, 0x35, 0x7d, 0xb8, 0xb3, 0x10, 0xa0,
-       0x75, 0xfb, 0xa7, 0xe8, 0x97, 0x2a, 0x1d, 0xf0, 0xd3, 0xaf, 0xf8, 0x3b,
-       0x6b, 0xec, 0x0c, 0xc4, 0xea, 0xfe, 0xd5, 0xe2, 0xb4, 0x0f, 0xd2, 0x5e,
-       0xe6, 0xf5, 0xb3, 0x7d, 0x9d, 0x0d, 0x2a, 0xf5, 0xf9, 0x93, 0x3f, 0x96,
-       0x7c, 0xaf, 0xdc, 0x93, 0xba, 0xab, 0x82, 0xf2, 0x7e, 0x3b, 0xf1, 0xf0,
-       0x8c, 0x79, 0xb6, 0xda, 0xaa, 0x41, 0xe1, 0x31, 0xce, 0xcd, 0xcd, 0xdf,
-       0xd4, 0x3a, 0x17, 0x16, 0xdc, 0xa3, 0x62, 0xed, 0xa0, 0xb4, 0x85, 0xd5,
-       0x8f, 0x93, 0xb8, 0x53, 0xa0, 0x4d, 0x98, 0x07, 0xab, 0xa4, 0xad, 0x8d,
-       0x6b, 0xb4, 0xa3, 0xa4, 0x1f, 0x58, 0x19, 0xc7, 0xc3, 0xa5, 0xf0, 0x47,
-       0x64, 0x8e, 0xf5, 0x8b, 0x1d, 0x7c, 0xb6, 0x14, 0x2d, 0xa3, 0xd9, 0xe7,
-       0x56, 0x8c, 0xbe, 0x37, 0x33, 0x9b, 0xfb, 0xfe, 0xc3, 0x75, 0xe3, 0x2d,
-       0x8d, 0x7e, 0xac, 0x4b, 0x52, 0xe7, 0x6c, 0x1e, 0x0c, 0xe6, 0x72, 0xd0,
-       0x4f, 0xa4, 0xbc, 0xd3, 0xea, 0xba, 0x7f, 0x5b, 0x9a, 0xab, 0xf9, 0xd2,
-       0x8e, 0xa7, 0xd8, 0x8f, 0x65, 0xc3, 0x18, 0x1c, 0x33, 0x11, 0xd5, 0x4d,
-       0x64, 0xf8, 0x79, 0x43, 0x87, 0x51, 0x42, 0x1b, 0x7f, 0x2a, 0x26, 0x98,
-       0x97, 0xd5, 0xa4, 0x1f, 0x24, 0x02, 0xca, 0x86, 0x18, 0x70, 0x84, 0xf1,
-       0xe3, 0x21, 0x7e, 0x86, 0x13, 0x5c, 0x03, 0xe7, 0x6d, 0x23, 0x6e, 0x6c,
-       0x4b, 0x01, 0x43, 0x09, 0x44, 0xf6, 0x2f, 0x96, 0x58, 0xa6, 0x84, 0xe3,
-       0x01, 0xe3, 0x6c, 0x93, 0xe6, 0xe7, 0x20, 0x3f, 0x63, 0xdc, 0x53, 0x8e,
-       0x87, 0x00, 0xf1, 0x30, 0x92, 0xd1, 0x60, 0x64, 0x02, 0x98, 0xa0, 0x6d,
-       0x5d, 0x1b, 0x56, 0x51, 0x76, 0xa8, 0x12, 0x1f, 0x8d, 0x64, 0x63, 0xa5,
-       0x75, 0x19, 0xa9, 0x5d, 0xcb, 0xda, 0xa4, 0x7e, 0x2d, 0xb6, 0x54, 0x84,
-       0x43, 0xc9, 0x4a, 0xab, 0x86, 0xfd, 0x8e, 0xce, 0x7e, 0x55, 0xa9, 0xb1,
-       0xb6, 0xe2, 0x70, 0xd4, 0xe7, 0xe9, 0xa5, 0xbe, 0x1b, 0x0e, 0xb1, 0xaf,
-       0x46, 0x1c, 0x89, 0xe6, 0x6b, 0x67, 0xbe, 0x96, 0x9f, 0x49, 0x8e, 0xc8,
-       0x59, 0x49, 0xd9, 0xca, 0xbd, 0xbc, 0xdf, 0x95, 0xf5, 0x4a, 0x0e, 0x3f,
-       0xcf, 0x71, 0xa6, 0xff, 0x7e, 0x8a, 0xe3, 0x05, 0x69, 0x07, 0xde, 0xde,
-       0x14, 0x74, 0xcb, 0x97, 0x8e, 0xd4, 0x7b, 0x93, 0x06, 0x64, 0x6f, 0x1b,
-       0x39, 0x87, 0xd7, 0xa8, 0xf7, 0x01, 0xca, 0xf9, 0x2f, 0xe8, 0x23, 0x5c,
-       0x8c, 0x65, 0x2b, 0xb0, 0xab, 0xaf, 0x12, 0x3b, 0xfb, 0x0c, 0xf4, 0x2c,
-       0x6e, 0xc3, 0xa9, 0xa8, 0x89, 0x75, 0x21, 0x13, 0x2b, 0x19, 0x23, 0xfc,
-       0x00, 0x0d, 0x4d, 0x87, 0xf1, 0x20, 0x63, 0x65, 0x95, 0xf2, 0xf8, 0x16,
-       0xde, 0xde, 0xed, 0xc0, 0x7a, 0xfd, 0x8f, 0x68, 0xbf, 0xa6, 0xf9, 0xab,
-       0x45, 0xb5, 0x18, 0x4c, 0x34, 0xa8, 0xdd, 0x9c, 0x5f, 0xa4, 0x8d, 0xfb,
-       0x14, 0x74, 0xe0, 0x69, 0xfd, 0xfb, 0x6c, 0xeb, 0xb6, 0x39, 0x34, 0xb9,
-       0x96, 0xba, 0x96, 0xec, 0xa3, 0x41, 0xdd, 0xca, 0xfb, 0xac, 0x6c, 0xad,
-       0x74, 0x7d, 0xa3, 0xe4, 0x44, 0x4a, 0x71, 0x92, 0x32, 0x3b, 0x96, 0x8c,
-       0xd0, 0x55, 0x43, 0x79, 0xba, 0xb1, 0x0b, 0x8f, 0x93, 0x9b, 0xbc, 0x4d,
-       0xd2, 0x70, 0x6f, 0x5c, 0x41, 0x53, 0xbd, 0x8e, 0xf3, 0xe9, 0x6f, 0xe1,
-       0xcd, 0xe1, 0x30, 0xde, 0x20, 0x07, 0x58, 0xf0, 0x97, 0xc2, 0xe9, 0x3d,
-       0x38, 0x9b, 0x0e, 0xe3, 0x4c, 0xd4, 0xdb, 0xfa, 0xbc, 0x52, 0x8b, 0x9f,
-       0x11, 0xd3, 0xee, 0x8e, 0x03, 0xef, 0xb1, 0x1f, 0x7f, 0xdc, 0x81, 0x4b,
-       0x69, 0x15, 0x87, 0xb9, 0x37, 0x8e, 0xd0, 0x02, 0x18, 0x6d, 0x1e, 0x1c,
-       0x1c, 0x78, 0x00, 0x13, 0xa9, 0x07, 0x70, 0x22, 0xf9, 0xb6, 0xe9, 0xd2,
-       0xa4, 0x06, 0xe6, 0xc2, 0x25, 0x62, 0xea, 0x24, 0xa5, 0x51, 0x7a, 0x4f,
-       0x2b, 0x71, 0x51, 0x33, 0x44, 0xee, 0x6f, 0xf2, 0xb7, 0x7b, 0xe3, 0x4d,
-       0xd8, 0x9f, 0xa1, 0x48, 0x13, 0x3a, 0x12, 0x31, 0x19, 0xab, 0x11, 0x31,
-       0x72, 0xc8, 0x5d, 0x7d, 0xe2, 0x37, 0xef, 0xc6, 0xca, 0x0a, 0x28, 0x2d,
-       0x75, 0x63, 0xb9, 0x75, 0x34, 0x4d, 0xab, 0x6d, 0x4a, 0xbc, 0x49, 0xb9,
-       0xf2, 0xb9, 0x1f, 0x26, 0x28, 0xf7, 0x04, 0x65, 0x7b, 0x7d, 0x3f, 0x9a,
-       0xb8, 0x1f, 0xdf, 0xc2, 0xf9, 0xdd, 0x6d, 0x78, 0x93, 0x58, 0x57, 0xbe,
-       0xc8, 0xd7, 0xe9, 0xb4, 0x35, 0xb0, 0xef, 0xb4, 0x99, 0xaa, 0x16, 0x99,
-       0xb6, 0xe1, 0x17, 0x51, 0x91, 0x69, 0x9a, 0xd8, 0xe7, 0xf3, 0xf8, 0xed,
-       0x23, 0x55, 0xd4, 0x65, 0x5b, 0x77, 0x30, 0x5b, 0xaf, 0x2b, 0xbd, 0xc7,
-       0x85, 0xcb, 0xd6, 0xdc, 0x64, 0xae, 0x5f, 0x35, 0xbf, 0x5f, 0x98, 0x2b,
-       0xab, 0x65, 0x7e, 0x86, 0xc9, 0x98, 0x3a, 0xc0, 0x78, 0x91, 0xb6, 0x13,
-       0x80, 0xe4, 0x9c, 0xeb, 0xe3, 0x5d, 0xb0, 0x87, 0x4a, 0x0d, 0x35, 0xec,
-       0x9d, 0xea, 0xc0, 0x9b, 0xb8, 0x42, 0x8e, 0x72, 0x57, 0x5c, 0x63, 0x7c,
-       0x7b, 0x81, 0x63, 0xfd, 0x0b, 0x2e, 0xf2, 0xda, 0x17, 0xcf, 0xda, 0x5a,
-       0x77, 0x63, 0x1b, 0xee, 0x4b, 0xcb, 0xfa, 0xfe, 0x0b, 0x07, 0xd2, 0x11,
-       0x49, 0xcb, 0x3a, 0x63, 0xb4, 0x0b, 0x59, 0x67, 0xe5, 0x7f, 0xb0, 0xce,
-       0x23, 0xec, 0xaf, 0x96, 0x76, 0x94, 0xf7, 0x1b, 0x65, 0x38, 0x98, 0x54,
-       0x71, 0x52, 0x2f, 0xc5, 0x05, 0x55, 0xf2, 0xf5, 0xd9, 0x5a, 0x66, 0x33,
-       0xe3, 0xd3, 0x21, 0x7e, 0x9e, 0x62, 0x0c, 0x75, 0x5a, 0x77, 0xe0, 0x84,
-       0x5e, 0x4b, 0x9c, 0xbf, 0x55, 0x87, 0xe5, 0x1e, 0x03, 0x83, 0x8a, 0x4a,
-       0x9c, 0x91, 0x9c, 0xaa, 0x75, 0x5f, 0xce, 0x16, 0xb8, 0x20, 0x39, 0x8d,
-       0x82, 0xd8, 0x6f, 0xcd, 0xcb, 0x16, 0xce, 0xdc, 0x3a, 0xbf, 0x5b, 0xfb,
-       0x21, 0x55, 0xd0, 0xde, 0x33, 0x9f, 0xad, 0xce, 0xf9, 0x2d, 0x65, 0x47,
-       0x55, 0x16, 0x2b, 0xc4, 0x87, 0x8d, 0xe7, 0x71, 0x83, 0x7c, 0x7c, 0xdf,
-       0xa3, 0xf4, 0x41, 0xf4, 0xcf, 0xcd, 0xdf, 0xdb, 0xaa, 0x49, 0x9c, 0x97,
-       0x7a, 0x74, 0x99, 0x56, 0x00, 0xbb, 0xe5, 0x67, 0x0f, 0x6f, 0xce, 0xf2,
-       0xf9, 0xf4, 0xe6, 0x6c, 0x8c, 0x7a, 0x74, 0xf3, 0x5d, 0xd6, 0xf7, 0x8f,
-       0x36, 0xfb, 0x52, 0x37, 0x7c, 0x55, 0x96, 0x2f, 0x5b, 0x67, 0x6d, 0xd0,
-       0xab, 0x1b, 0xca, 0x8a, 0x46, 0xf1, 0xd7, 0x79, 0x8e, 0x22, 0x6d, 0x02,
-       0xca, 0x89, 0xa8, 0x61, 0xba, 0xb5, 0x62, 0xfa, 0x7a, 0x28, 0x63, 0x8c,
-       0xc5, 0xa6, 0xac, 0xba, 0xa7, 0x86, 0x37, 0xd2, 0x12, 0x13, 0x83, 0xfa,
-       0xfb, 0xbf, 0xb1, 0x6b, 0x37, 0xda, 0x8b, 0x16, 0x93, 0xb3, 0xd3, 0xcf,
-       0x3d, 0x1b, 0x72, 0xe0, 0xfd, 0x74, 0x76, 0x3d, 0xef, 0x0d, 0x97, 0xe0,
-       0xdd, 0x94, 0xf8, 0x6b, 0xa8, 0x85, 0xec, 0xf7, 0x64, 0x5a, 0x63, 0x6c,
-       0x2a, 0xe3, 0xb6, 0x61, 0xdb, 0x98, 0x03, 0xfb, 0xa3, 0x1a, 0x62, 0x89,
-       0x9f, 0x9a, 0x45, 0x9a, 0x6f, 0xc2, 0x6f, 0x77, 0x60, 0x5f, 0x7a, 0x12,
-       0x63, 0x7d, 0x1f, 0x9b, 0x76, 0xad, 0x0b, 0x1f, 0x85, 0x26, 0xc9, 0xeb,
-       0xa4, 0xfe, 0xa9, 0x63, 0xd7, 0x80, 0xc6, 0x58, 0xda, 0x86, 0x9d, 0x8b,
-       0x5b, 0xb0, 0x6b, 0xac, 0x19, 0xc6, 0x21, 0x0f, 0x76, 0x92, 0xf0, 0x4d,
-       0x0c, 0x4f, 0xe2, 0x54, 0x52, 0x6b, 0x2a, 0x52, 0x26, 0x71, 0x92, 0xe3,
-       0x6c, 0x4d, 0xbc, 0x05, 0x83, 0x7d, 0x6c, 0x4b, 0x4a, 0x8e, 0x57, 0xc6,
-       0x99, 0x44, 0x77, 0xea, 0x76, 0x35, 0x8f, 0x36, 0xec, 0x48, 0x6c, 0x69,
-       0xcf, 0xd6, 0x3d, 0x88, 0xab, 0x69, 0x4d, 0xe9, 0xe5, 0x1e, 0x1d, 0x4e,
-       0xe7, 0x6b, 0x20, 0x82, 0xa1, 0x59, 0x3c, 0xdc, 0x96, 0xd6, 0xd1, 0x3b,
-       0xd0, 0xc2, 0xf6, 0x1a, 0xba, 0x13, 0x52, 0x3f, 0xf6, 0x71, 0x3c, 0x13,
-       0xef, 0xe9, 0x5e, 0xf7, 0x5d, 0xfc, 0x1e, 0xd1, 0x3b, 0xb1, 0x81, 0xfd,
-       0x08, 0xe7, 0xd2, 0x14, 0x6f, 0x93, 0x01, 0x3b, 0x7e, 0xa5, 0xdb, 0x61,
-       0x54, 0xd9, 0x71, 0x44, 0x2f, 0x23, 0x3f, 0xb7, 0xa3, 0x21, 0x44, 0xdf,
-       0x9c, 0xf3, 0xd5, 0x1f, 0x26, 0x15, 0x3c, 0x40, 0x2c, 0x3d, 0x16, 0x6a,
-       0x68, 0x5f, 0x2e, 0x6c, 0xf7, 0x80, 0x82, 0x2b, 0xda, 0x35, 0xd3, 0xa0,
-       0xbf, 0x72, 0xf9, 0xf3, 0x7b, 0xf3, 0x6b, 0x33, 0x5b, 0x03, 0xfe, 0xc2,
-       0xcc, 0x3f, 0x37, 0xc5, 0xf9, 0x3d, 0xc6, 0xe7, 0xee, 0x5a, 0xd4, 0xd0,
-       0x29, 0xcf, 0xb9, 0x89, 0xe3, 0xf2, 0x9c, 0xe4, 0xf6, 0x6f, 0x3c, 0xa7,
-       0x63, 0xdb, 0x40, 0xc4, 0x9a, 0xef, 0xf6, 0x04, 0x16, 0x3a, 0x20, 0x76,
-       0xd4, 0xa0, 0x5e, 0x02, 0xba, 0x26, 0xf5, 0x19, 0xe4, 0x37, 0xfe, 0xc0,
-       0x53, 0x10, 0x39, 0x49, 0xbc, 0xf9, 0x16, 0x76, 0x46, 0x87, 0xc1, 0x98,
-       0x93, 0xf8, 0xe6, 0x5f, 0x3b, 0x84, 0x14, 0x9e, 0x4b, 0xa7, 0xf0, 0xbc,
-       0x70, 0x6c, 0x2b, 0xc7, 0x96, 0xc6, 0x77, 0xa2, 0x6f, 0x21, 0x66, 0xc5,
-       0x55, 0x87, 0xf1, 0x44, 0xf4, 0xdd, 0x6a, 0xc9, 0x65, 0x6e, 0x4d, 0x2c,
-       0x65, 0xff, 0x22, 0x53, 0x6f, 0xab, 0x81, 0x2f, 0xd9, 0xff, 0x52, 0x6c,
-       0x19, 0x92, 0x9c, 0x90, 0x89, 0xd7, 0xc9, 0xa9, 0xae, 0x50, 0x8f, 0x5a,
-       0x1a, 0xa5, 0xff, 0x71, 0x45, 0xb3, 0x7c, 0x57, 0x1b, 0xf7, 0x78, 0x16,
-       0xdc, 0x94, 0x73, 0x59, 0x46, 0x53, 0xee, 0x8a, 0xc9, 0x9e, 0x3b, 0x60,
-       0xcb, 0x78, 0xf0, 0x18, 0x79, 0x49, 0xe1, 0xc8, 0x8f, 0x14, 0xf1, 0x5f,
-       0x35, 0xe4, 0xa2, 0xee, 0x03, 0x1e, 0x65, 0xc1, 0x1e, 0x17, 0x1e, 0x88,
-       0x91, 0xa3, 0xc6, 0x9a, 0xb1, 0x65, 0xaf, 0xc6, 0x36, 0x5e, 0xfd, 0x1c,
-       0xe3, 0xd6, 0x93, 0xf0, 0x79, 0x86, 0xc8, 0xa5, 0xdc, 0xc4, 0x60, 0xc7,
-       0x48, 0x39, 0x4a, 0xc8, 0xb3, 0xa5, 0xdc, 0x5c, 0x3a, 0xe2, 0x46, 0x0d,
-       0xfd, 0x99, 0x3b, 0x73, 0x1e, 0x63, 0x7b, 0xa0, 0x96, 0x84, 0x3f, 0x37,
-       0x0b, 0x35, 0xa9, 0x57, 0x06, 0x50, 0x9e, 0xd9, 0x84, 0x74, 0x2c, 0x88,
-       0x52, 0xf2, 0xfb, 0x06, 0x8e, 0x77, 0x7f, 0x4c, 0x63, 0x3f, 0x59, 0x6e,
-       0xb3, 0x9c, 0xcf, 0xf4, 0x26, 0xbc, 0x6b, 0xa5, 0xde, 0x78, 0x45, 0x7f,
-       0x0d, 0x45, 0x7d, 0x37, 0xce, 0x9c, 0x69, 0x21, 0xcc, 0x21, 0xf7, 0x68,
-       0x7d, 0x1a, 0xd9, 0xf3, 0x67, 0x2b, 0x72, 0xeb, 0x09, 0xca, 0x7a, 0x9c,
-       0x6d, 0xd4, 0x83, 0xd9, 0x98, 0xc1, 0xf5, 0x5c, 0xa4, 0xde, 0xdc, 0xcb,
-       0xb9, 0x5e, 0x63, 0xec, 0xd0, 0xc9, 0xb5, 0xbc, 0x3f, 0xfc, 0x23, 0xa5,
-       0x86, 0x6b, 0x99, 0x22, 0x57, 0xfd, 0x38, 0xe5, 0x51, 0x7c, 0x5c, 0xcb,
-       0x77, 0x79, 0xff, 0x3b, 0x5c, 0xcb, 0xd6, 0xbd, 0xde, 0xd6, 0xe3, 0x8a,
-       0xb7, 0x7d, 0x8d, 0xe2, 0x53, 0xb7, 0x2a, 0xa5, 0xb8, 0x38, 0x5c, 0x8e,
-       0x4b, 0xf4, 0xbd, 0xd7, 0x86, 0x2b, 0x71, 0x79, 0xb8, 0x8a, 0x36, 0xa2,
-       0xb1, 0x0f, 0xd3, 0x2c, 0xd3, 0xdc, 0x98, 0x4a, 0x3f, 0x8f, 0x19, 0xb1,
-       0x5a, 0x7c, 0x9c, 0xde, 0x80, 0xf2, 0x98, 0xc4, 0x00, 0x1e, 0x7c, 0xc4,
-       0xfb, 0x1f, 0xa6, 0x47, 0x51, 0xbc, 0xe7, 0x73, 0xb6, 0x31, 0xcd, 0xfb,
-       0xb9, 0xbe, 0xcb, 0xe9, 0x0e, 0x94, 0xee, 0xd9, 0x08, 0xc7, 0x1e, 0xb3,
-       0x6b, 0x4b, 0x08, 0x3f, 0xb3, 0x73, 0x2d, 0xdd, 0xba, 0x77, 0xe2, 0x2e,
-       0x7b, 0x90, 0x7d, 0x8c, 0x2b, 0x0b, 0x32, 0x1b, 0x51, 0xbe, 0xc7, 0x83,
-       0x67, 0x29, 0xc3, 0x51, 0x68, 0x81, 0x35, 0xca, 0x46, 0x14, 0x8c, 0x64,
-       0xd7, 0xbf, 0x2e, 0x93, 0xb5, 0x8b, 0xfb, 0x1b, 0xa7, 0xc7, 0x32, 0x6e,
-       0x8b, 0x77, 0x4f, 0xa6, 0x4b, 0x70, 0x3a, 0x25, 0xf2, 0x81, 0xea, 0x08,
-       0x8f, 0xa2, 0x70, 0x0f, 0x31, 0x71, 0x58, 0xb7, 0xf8, 0x82, 0xd8, 0xc4,
-       0x70, 0xfa, 0x76, 0x36, 0x15, 0xc4, 0xce, 0x44, 0x0d, 0xed, 0xa9, 0x16,
-       0x2b, 0xf7, 0x48, 0x8d, 0x79, 0xe2, 0x5e, 0x17, 0xb5, 0xe8, 0x50, 0xfa,
-       0x56, 0x7b, 0x6a, 0xa4, 0x6e, 0x0a, 0xb6, 0x9a, 0x98, 0xd4, 0xb3, 0x78,
-       0x73, 0xcc, 0xaa, 0x61, 0x8b, 0x4d, 0xb6, 0x62, 0xcb, 0x00, 0xda, 0xf7,
-       0x37, 0x8a, 0x4d, 0x3a, 0x31, 0x44, 0xbe, 0x7f, 0x91, 0xb1, 0xc3, 0x0c,
-       0xed, 0x73, 0x62, 0x42, 0x01, 0x06, 0x87, 0x5d, 0xf8, 0xf1, 0xb0, 0x07,
-       0xee, 0x58, 0x31, 0xc6, 0x29, 0xe3, 0x31, 0x72, 0x9c, 0x8f, 0x18, 0x65,
-       0x8f, 0xd2, 0xa7, 0x7e, 0x18, 0xad, 0x42, 0x26, 0x5d, 0x8b, 0xab, 0xc4,
-       0x94, 0x34, 0xf7, 0xe3, 0x83, 0x68, 0x00, 0x2f, 0xa7, 0x83, 0x78, 0x3f,
-       0x2a, 0xd8, 0x13, 0xc4, 0x11, 0xca, 0xaf, 0x28, 0xe6, 0x66, 0xbf, 0x82,
-       0x43, 0x1e, 0x38, 0x63, 0x9a, 0x67, 0x28, 0xa7, 0x0b, 0x8e, 0x4c, 0x2b,
-       0xed, 0x46, 0xce, 0x44, 0x88, 0x1f, 0x70, 0xe8, 0x43, 0x8c, 0xb9, 0x07,
-       0x83, 0xf9, 0xfc, 0xaf, 0xd7, 0x3d, 0x81, 0x99, 0xb4, 0x9d, 0x2f, 0x4d,
-       0x55, 0x93, 0x98, 0x2a, 0x19, 0xba, 0x12, 0xd5, 0x24, 0x17, 0x48, 0x6c,
-       0x37, 0x14, 0xe7, 0x62, 0x72, 0x89, 0xaa, 0xad, 0x92, 0x17, 0xe6, 0xfc,
-       0xe5, 0x6c, 0x99, 0xc9, 0x76, 0x57, 0x31, 0xff, 0xc0, 0xd6, 0x59, 0xb9,
-       0x1c, 0x93, 0x7a, 0x83, 0xf7, 0xe5, 0x31, 0x5e, 0xe2, 0xb5, 0xdd, 0xa1,
-       0xd7, 0xa2, 0x7f, 0x3f, 0x4b, 0xea, 0x71, 0xc7, 0x11, 0xa4, 0x4c, 0x6e,
-       0x17, 0x0f, 0x98, 0x78, 0x93, 0x18, 0x72, 0x39, 0x29, 0xbc, 0x48, 0xf8,
-       0x50, 0x17, 0x7d, 0x4f, 0x19, 0xf9, 0x80, 0x86, 0x6d, 0xe4, 0xeb, 0xbe,
-       0xf8, 0x04, 0xe3, 0x91, 0xaf, 0x93, 0x93, 0x95, 0xb3, 0x9b, 0x1f, 0x70,
-       0xbc, 0x56, 0xec, 0xa4, 0x2d, 0x16, 0x69, 0x77, 0x61, 0x25, 0xf9, 0x8e,
-       0x43, 0xa3, 0xcb, 0x78, 0x58, 0xfc, 0x86, 0xe4, 0x70, 0x54, 0xa9, 0x95,
-       0xad, 0x7d, 0x1d, 0xf7, 0xa2, 0xbd, 0xda, 0x05, 0xa9, 0x6f, 0xbd, 0x81,
-       0x25, 0x48, 0x3d, 0x2a, 0xbe, 0x93, 0x1c, 0x39, 0xac, 0x19, 0xe7, 0x31,
-       0xcf, 0x62, 0xdd, 0xc5, 0x61, 0x99, 0x4f, 0x15, 0x65, 0xaf, 0xe2, 0x1d,
-       0xca, 0xf5, 0x52, 0xd4, 0x37, 0x75, 0x1f, 0x1a, 0x4e, 0x5d, 0xb2, 0x4b,
-       0xed, 0x4f, 0xda, 0x07, 0xa1, 0xb1, 0xbf, 0x4f, 0xa3, 0x21, 0xf4, 0xa9,
-       0x72, 0x2d, 0xfc, 0xb0, 0x15, 0xdd, 0x43, 0x32, 0x07, 0xd3, 0xac, 0x24,
-       0x1e, 0x3e, 0x6c, 0x8d, 0x2f, 0x63, 0xdf, 0x1a, 0x5b, 0x78, 0x19, 0x49,
-       0xe7, 0xe3, 0x8b, 0x49, 0x1c, 0x4e, 0x52, 0xfe, 0x8b, 0xdf, 0xa6, 0x1c,
-       0x26, 0x31, 0x9c, 0xd2, 0xc8, 0x1d, 0x4b, 0xe0, 0xa9, 0x0e, 0x62, 0x17,
-       0xfd, 0x75, 0x8c, 0xed, 0xd3, 0xb1, 0x12, 0x18, 0xd5, 0xd9, 0x31, 0xbf,
-       0x1e, 0xbf, 0x6a, 0x4e, 0x3c, 0x64, 0xc5, 0xa9, 0xbc, 0xfe, 0x1d, 0x9f,
-       0x99, 0x2d, 0xc7, 0x32, 0xb1, 0x3e, 0x76, 0xd9, 0x9c, 0x68, 0x9d, 0xfe,
-       0x7b, 0x85, 0x75, 0xa6, 0x2a, 0x62, 0xab, 0xe6, 0x77, 0x56, 0x2e, 0xdd,
-       0x94, 0xcb, 0x0c, 0xed, 0x2d, 0xf3, 0x41, 0x6b, 0x5e, 0xef, 0xcd, 0x12,
-       0x2e, 0x5f, 0x17, 0xf7, 0xcc, 0x46, 0x71, 0x15, 0xdb, 0x10, 0x43, 0xc3,
-       0x5a, 0xd3, 0x29, 0xfc, 0x8b, 0x79, 0xe1, 0xa6, 0x7e, 0x66, 0xf2, 0x9e,
-       0xf8, 0x9e, 0x0b, 0xb9, 0x9c, 0x8f, 0x3b, 0xc7, 0xf7, 0x27, 0x71, 0x3c,
-       0x29, 0xd8, 0xef, 0xc1, 0x13, 0x92, 0x9b, 0x52, 0xbd, 0xbd, 0x06, 0x26,
-       0xc8, 0xf1, 0xde, 0xa6, 0xec, 0x25, 0xff, 0x38, 0x41, 0x9e, 0x37, 0xdd,
-       0x37, 0x45, 0x90, 0xaa, 0x92, 0x1a, 0x8c, 0xe0, 0xe7, 0x24, 0xb6, 0x27,
-       0x7f, 0x4a, 0x1c, 0xfb, 0x98, 0xbc, 0xa7, 0x8b, 0x9c, 0x7a, 0x12, 0x5b,
-       0x52, 0xcd, 0x78, 0x69, 0x6f, 0x0b, 0x71, 0x45, 0xb0, 0xd1, 0x77, 0xea,
-       0xa2, 0xbd, 0x19, 0xfb, 0x0f, 0xa5, 0x91, 0x1a, 0x11, 0x7f, 0x28, 0x3e,
-       0x57, 0x7c, 0xa1, 0x86, 0x68, 0xe2, 0x24, 0x0c, 0x7e, 0xef, 0x4c, 0x6c,
-       0x44, 0x64, 0xe4, 0x2d, 0xf2, 0xf8, 0x49, 0x2c, 0xef, 0xd3, 0xd6, 0x1e,
-       0xc4, 0x24, 0x56, 0xd1, 0x57, 0x26, 0x13, 0x2d, 0xec, 0xbf, 0x19, 0x3d,
-       0x7b, 0xbd, 0x56, 0xbe, 0x49, 0x62, 0xf8, 0x6d, 0x63, 0x11, 0x18, 0x43,
-       0x72, 0x36, 0xc3, 0x85, 0x60, 0xdc, 0xa3, 0x7c, 0x48, 0x3e, 0xdc, 0x10,
-       0xf7, 0x32, 0x06, 0xf3, 0x1a, 0xab, 0x14, 0x9f, 0xa7, 0xc0, 0x26, 0xb5,
-       0xc0, 0x19, 0x38, 0xa5, 0x2b, 0x28, 0xba, 0x57, 0x41, 0x88, 0xbe, 0xca,
-       0x33, 0x8b, 0x3e, 0x64, 0x48, 0x47, 0xcf, 0x00, 0xd7, 0x7b, 0x7d, 0xdf,
-       0x64, 0xbf, 0x56, 0xb3, 0x3f, 0xd9, 0xbb, 0x16, 0xf4, 0x8c, 0xf9, 0x3a,
-       0x4e, 0xc1, 0x6d, 0x71, 0xab, 0x9e, 0x81, 0xeb, 0x79, 0x81, 0xd2, 0x8f,
-       0x1b, 0xbd, 0x81, 0x19, 0x8a, 0xb4, 0xdd, 0x4a, 0xcc, 0x9a, 0xde, 0xde,
-       0x50, 0x92, 0x8b, 0xc9, 0x3f, 0x6d, 0x62, 0x17, 0xdd, 0x96, 0xbd, 0x88,
-       0x2c, 0x7a, 0x92, 0x11, 0xea, 0xf4, 0x4f, 0xcc, 0x54, 0x6b, 0x2b, 0xe7,
-       0xd9, 0x28, 0xb5, 0x31, 0x0b, 0x13, 0xce, 0x4a, 0x2e, 0xce, 0x29, 0x98,
-       0xd0, 0xdd, 0xee, 0xa2, 0x3e, 0x15, 0x12, 0x97, 0x8a, 0x46, 0x5d, 0x70,
-       0x1d, 0x2c, 0x41, 0xe1, 0xa0, 0xf0, 0x31, 0xc9, 0x41, 0xa8, 0xb0, 0x8f,
-       0x96, 0xd2, 0x06, 0xb8, 0x87, 0xa3, 0xb4, 0xb1, 0xa8, 0x1b, 0xf3, 0x46,
-       0xdd, 0xf8, 0x31, 0x31, 0xa0, 0x66, 0x54, 0xc3, 0x38, 0x31, 0xc0, 0x3d,
-       0x1a, 0xc0, 0x58, 0x34, 0x88, 0x19, 0xa3, 0xe3, 0xca, 0x1b, 0xe9, 0x66,
-       0xee, 0xb7, 0x8c, 0x23, 0x32, 0xcc, 0xef, 0xa9, 0xec, 0x67, 0x0b, 0xb1,
-       0x4e, 0xf6, 0x36, 0x80, 0x1d, 0x03, 0x69, 0x2c, 0xdb, 0x63, 0xe2, 0x9f,
-       0xf4, 0x06, 0x77, 0x91, 0x22, 0xb1, 0x80, 0x89, 0x34, 0xfd, 0xda, 0x0a,
-       0xdd, 0xbb, 0x56, 0xce, 0x3b, 0xb7, 0x57, 0x99, 0x28, 0x08, 0x79, 0x75,
-       0xa2, 0xfb, 0xda, 0x22, 0x45, 0x7c, 0x54, 0x83, 0x67, 0x03, 0xe6, 0x22,
-       0x5b, 0x57, 0xbc, 0x0f, 0x1b, 0x54, 0x85, 0xb6, 0xd8, 0x82, 0x9d, 0x15,
-       0x86, 0xeb, 0x4a, 0xa3, 0x69, 0xae, 0x0b, 0xd5, 0xcd, 0xb2, 0x72, 0xd0,
-       0xb6, 0xf5, 0xfc, 0x6e, 0xe3, 0x9a, 0x65, 0xdd, 0x1d, 0x88, 0xed, 0x56,
-       0x90, 0xf6, 0x77, 0x20, 0x3a, 0xdc, 0x21, 0xfc, 0x89, 0x78, 0xd0, 0x4b,
-       0x3c, 0x30, 0xbb, 0x9e, 0x0e, 0x3d, 0x88, 0xcb, 0x96, 0xc7, 0x97, 0x67,
-       0xbc, 0x01, 0x8f, 0x6d, 0xfa, 0x1e, 0xe8, 0xb3, 0x25, 0xcf, 0x21, 0x76,
-       0xd3, 0xdc, 0x27, 0xbc, 0xd9, 0xdf, 0xdb, 0xc3, 0xbd, 0x7f, 0xe8, 0x80,
-       0xf8, 0x17, 0xd3, 0xec, 0x25, 0x2f, 0x45, 0x85, 0xac, 0x41, 0x43, 0x3c,
-       0x61, 0x7e, 0x5c, 0xa3, 0xf9, 0xa6, 0x76, 0xd1, 0x8f, 0x9f, 0xdf, 0xd3,
-       0xb0, 0x61, 0x83, 0x70, 0x96, 0x45, 0x1a, 0x63, 0xe9, 0x34, 0xce, 0x8d,
-       0xcc, 0x47, 0xea, 0x21, 0xae, 0x87, 0xfb, 0xe4, 0x8c, 0x7f, 0xc1, 0x38,
-       0x43, 0xb0, 0x4f, 0x53, 0x0f, 0x13, 0xf7, 0x6c, 0xa3, 0x7e, 0x6c, 0xa9,
-       0x80, 0x71, 0xa5, 0x51, 0xc6, 0xbf, 0x3e, 0x7f, 0xae, 0xb7, 0x19, 0xbb,
-       0xf6, 0x0a, 0xaf, 0x10, 0xfe, 0xe5, 0x33, 0x3e, 0x40, 0x0b, 0x92, 0x63,
-       0xd9, 0xb1, 0xa2, 0x89, 0x5b, 0xf5, 0x44, 0xf6, 0xfc, 0x24, 0x76, 0x50,
-       0x27, 0x5d, 0xec, 0x9f, 0x3e, 0x85, 0xfd, 0x69, 0x81, 0x22, 0x19, 0x6f,
-       0xf4, 0x27, 0xe6, 0xce, 0x6a, 0x91, 0x8d, 0xf4, 0xff, 0x9b, 0x6a, 0xc1,
-       0x8b, 0x75, 0xa1, 0xaf, 0x5a, 0xeb, 0x15, 0x7e, 0x4b, 0xce, 0x3a, 0x3f,
-       0x1f, 0x79, 0xe6, 0x76, 0xf3, 0xf9, 0x9c, 0xed, 0x64, 0x4e, 0x1d, 0xd8,
-       0xb1, 0x1b, 0x46, 0xb1, 0xa6, 0x45, 0xe6, 0x2b, 0x1d, 0xe8, 0xa5, 0x7c,
-       0xb7, 0x25, 0x3b, 0xb0, 0x9f, 0xf6, 0x3a, 0xa8, 0x1f, 0xab, 0xb1, 0xa1,
-       0x7e, 0xca, 0x8e, 0x89, 0x7f, 0x94, 0x9a, 0xc5, 0x82, 0x45, 0x7e, 0xda,
-       0x56, 0x07, 0xe2, 0xa9, 0x73, 0xb3, 0xad, 0x9a, 0xa8, 0x4d, 0x7c, 0x9e,
-       0xc8, 0xa2, 0x13, 0xc5, 0x7d, 0x27, 0xe1, 0xec, 0xeb, 0x44, 0x91, 0x7f,
-       0x09, 0x56, 0x84, 0x2e, 0x98, 0x97, 0x35, 0x87, 0xfb, 0x38, 0xe5, 0x73,
-       0x2c, 0x58, 0xc3, 0x98, 0x91, 0x71, 0xca, 0xd0, 0x1c, 0xda, 0x7d, 0x23,
-       0x76, 0x8c, 0xc9, 0x59, 0x08, 0x1b, 0x56, 0x2d, 0x96, 0x58, 0x5c, 0xa1,
-       0x5e, 0xcf, 0x62, 0x3c, 0xa9, 0xa9, 0xcf, 0x59, 0xe7, 0x56, 0xc8, 0xb9,
-       0xaa, 0x3c, 0x78, 0xd2, 0x3a, 0xaf, 0x21, 0xf7, 0x37, 0x31, 0x0e, 0xd8,
-       0x84, 0x9a, 0x98, 0x61, 0x8a, 0xbc, 0x8f, 0x23, 0xf2, 0xa2, 0x8d, 0xf3,
-       0x68, 0x5a, 0xe4, 0xdf, 0x30, 0xa5, 0x88, 0x3e, 0xfb, 0xdb, 0x47, 0x15,
-       0xdd, 0xb5, 0x3a, 0xa3, 0x20, 0xd0, 0xc7, 0xbe, 0x42, 0x23, 0xb3, 0xb3,
-       0xb9, 0xf1, 0x3c, 0xbf, 0xdb, 0x44, 0x5e, 0xb0, 0x09, 0x65, 0x31, 0xe1,
-       0xe4, 0x82, 0x0b, 0x91, 0xa5, 0xe5, 0x7c, 0x3e, 0x1d, 0xf2, 0xb7, 0x96,
-       0x2a, 0xc2, 0x7d, 0xfc, 0x4d, 0xab, 0x14, 0xe1, 0x2a, 0xf2, 0x9c, 0xee,
-       0xaa, 0xcf, 0x9c, 0xcf, 0xd5, 0x31, 0x1b, 0x89, 0x0d, 0x72, 0xce, 0x24,
-       0x7f, 0xd6, 0xea, 0x46, 0xce, 0xda, 0x19, 0x97, 0xd8, 0xe1, 0x68, 0x68,
-       0x59, 0xb4, 0x89, 0x38, 0x67, 0x2e, 0x39, 0x44, 0xbd, 0xbf, 0x88, 0x2a,
-       0xfc, 0x73, 0x54, 0x30, 0xcd, 0x83, 0x9f, 0x47, 0x0b, 0x25, 0x26, 0x4e,
-       0x49, 0x5e, 0xf6, 0x4c, 0xd2, 0x30, 0x29, 0xd7, 0x96, 0x55, 0xd4, 0xa5,
-       0x40, 0xa8, 0x14, 0xa8, 0xee, 0x7e, 0xd2, 0x69, 0xc5, 0xe8, 0x65, 0xa8,
-       0x20, 0xfe, 0xf7, 0x0d, 0xfd, 0xa1, 0xf3, 0x0e, 0xc4, 0xe0, 0x62, 0xc9,
-       0x15, 0xda, 0xb1, 0x2d, 0xf4, 0x1b, 0x33, 0xd5, 0x26, 0xcf, 0xd4, 0xe2,
-       0xdc, 0x6e, 0xd1, 0xd3, 0x00, 0x0a, 0xe3, 0xe7, 0xa9, 0x93, 0x2a, 0xce,
-       0x46, 0x7d, 0xfa, 0x1a, 0xdb, 0xb7, 0xa8, 0xff, 0xf3, 0x6e, 0xc2, 0xed,
-       0x79, 0xda, 0x03, 0x78, 0xdc, 0xc2, 0xed, 0x30, 0xb6, 0xd0, 0x2f, 0x90,
-       0xb7, 0xed, 0x7b, 0xd2, 0xa6, 0xd2, 0x9f, 0xfb, 0x54, 0x1f, 0x63, 0xea,
-       0x2d, 0x1c, 0x43, 0xf8, 0xe4, 0x4c, 0xf2, 0xbd, 0xa7, 0xa3, 0x0d, 0x9e,
-       0x5f, 0xe3, 0x09, 0xda, 0xa3, 0x8c, 0x21, 0x6b, 0xd2, 0x50, 0xca, 0xd8,
-       0xf1, 0x04, 0xd7, 0xb1, 0xad, 0x22, 0x3b, 0x6e, 0x79, 0xae, 0xef, 0xf8,
-       0x90, 0xf0, 0xad, 0x7b, 0xb0, 0xc6, 0xea, 0x3b, 0x68, 0xd9, 0xe6, 0xbe,
-       0xa8, 0x82, 0x19, 0xf5, 0x1a, 0x12, 0xe9, 0x66, 0x6c, 0xac, 0xac, 0xc5,
-       0xfe, 0xc4, 0x26, 0x2c, 0x24, 0xe7, 0x7d, 0xa4, 0xd2, 0xa0, 0x5f, 0x24,
-       0x06, 0xc5, 0x35, 0x75, 0xbe, 0xf2, 0x8d, 0x5c, 0xae, 0xba, 0x0a, 0x8e,
-       0xb8, 0xf8, 0xbb, 0x02, 0xf4, 0xab, 0x73, 0x51, 0x62, 0x9d, 0x81, 0xcc,
-       0xf6, 0xbd, 0x6b, 0xc8, 0x9b, 0xf3, 0x81, 0x44, 0x8d, 0xb8, 0x75, 0x4e,
-       0x25, 0xf0, 0x3c, 0x79, 0x44, 0x8a, 0xde, 0xaf, 0x20, 0xac, 0xa5, 0xd6,
-       0xa3, 0x08, 0xc6, 0x2c, 0xc1, 0x43, 0x79, 0x66, 0xce, 0x2d, 0x73, 0xaa,
-       0xcc, 0xcd, 0x29, 0x7f, 0xff, 0x34, 0xef, 0x89, 0x6e, 0x09, 0xb7, 0x90,
-       0xdf, 0x8b, 0xd1, 0x4a, 0x7d, 0xaa, 0xe2, 0x9c, 0x13, 0x09, 0xb9, 0xef,
-       0xd5, 0x0d, 0x5b, 0x23, 0x3e, 0xdb, 0x93, 0xd5, 0xc1, 0xb5, 0x75, 0xdc,
-       0xff, 0xf2, 0x46, 0x4c, 0x8d, 0x88, 0x2f, 0xfb, 0xc3, 0x67, 0x50, 0x8c,
-       0xeb, 0x67, 0x50, 0x44, 0xae, 0xde, 0x53, 0xef, 0xa0, 0x61, 0xe2, 0x31,
-       0xdb, 0x61, 0x13, 0x33, 0x45, 0xc6, 0x71, 0xb7, 0xc4, 0x9a, 0x36, 0x72,
-       0x08, 0x23, 0x3d, 0xee, 0x16, 0x3f, 0xe9, 0x88, 0x03, 0xf3, 0xe2, 0x06,
-       0x0a, 0xc3, 0xda, 0xbe, 0x2b, 0xf6, 0x6b, 0x66, 0xfb, 0xac, 0x39, 0x8c,
-       0xf9, 0x6e, 0xac, 0xb9, 0x97, 0x73, 0xb7, 0x6b, 0x3f, 0x31, 0xef, 0xab,
-       0x92, 0x39, 0xfe, 0xd2, 0x9d, 0x3d, 0xfb, 0x70, 0x07, 0xe5, 0x92, 0x97,
-       0x89, 0x49, 0xfd, 0xf9, 0x2b, 0xf3, 0x9b, 0x37, 0xdd, 0x17, 0x2e, 0x23,
-       0x7a, 0x3a, 0xfd, 0x3c, 0xa0, 0xe8, 0xac, 0xd4, 0x56, 0x26, 0x71, 0x28,
-       0x29, 0xba, 0x2b, 0x32, 0x8e, 0xe0, 0x22, 0x79, 0x61, 0x41, 0xff, 0x24,
-       0x06, 0xc9, 0x0b, 0xed, 0x71, 0xef, 0x3e, 0x4a, 0x12, 0x1b, 0xd5, 0x25,
-       0xc4, 0xea, 0x32, 0xce, 0x23, 0x3f, 0x87, 0x3a, 0x4b, 0xee, 0xe2, 0x5f,
-       0x76, 0x72, 0xbd, 0x45, 0xe4, 0x48, 0xcd, 0xb1, 0x42, 0x68, 0x15, 0xe5,
-       0x28, 0xd5, 0xe4, 0x0c, 0x7c, 0xb6, 0x5d, 0x94, 0x73, 0x29, 0xd1, 0xe6,
-       0x62, 0x95, 0xd5, 0xd6, 0x63, 0x9d, 0x01, 0xd1, 0x2a, 0xc5, 0xff, 0x8a,
-       0xcf, 0x25, 0xdf, 0x5e, 0x2c, 0x3e, 0x37, 0xcc, 0xb9, 0xcd, 0xc9, 0xd5,
-       0x99, 0x56, 0x59, 0xf7, 0xf7, 0x25, 0x2e, 0x7c, 0xd9, 0x9f, 0xf8, 0x3d,
-       0x9f, 0xe9, 0x80, 0xba, 0xb7, 0x18, 0x0f, 0xfd, 0x65, 0x09, 0xf4, 0xca,
-       0x6c, 0xae, 0x7c, 0x5e, 0x38, 0x1a, 0x32, 0x13, 0xc2, 0x93, 0xee, 0x84,
-       0x67, 0xb6, 0x8c, 0x25, 0x18, 0x20, 0x7b, 0x21, 0x7b, 0x27, 0x39, 0xdc,
-       0xdb, 0xd5, 0x18, 0xbc, 0xea, 0xc4, 0xf5, 0x7d, 0x98, 0x0f, 0xed, 0xe1,
-       0x2a, 0xae, 0x2d, 0xeb, 0x23, 0x76, 0xd0, 0x47, 0x04, 0xfc, 0x59, 0x0c,
-       0x93, 0x1a, 0xbd, 0x93, 0x3e, 0x62, 0x84, 0x3e, 0xe2, 0xa2, 0x5e, 0x8e,
-       0xe5, 0x39, 0x1f, 0xd1, 0x6e, 0xd3, 0xad, 0xfe, 0x9d, 0xda, 0x7d, 0x35,
-       0xc4, 0x30, 0x8e, 0xf1, 0xb5, 0x9b, 0xb8, 0xd8, 0x4c, 0xed, 0x97, 0xe6,
-       0x23, 0x55, 0xb2, 0xc6, 0xe6, 0x9a, 0x6c, 0x8e, 0xbc, 0x03, 0xfb, 0x88,
-       0x8f, 0x35, 0x9a, 0x3c, 0xa3, 0x25, 0x6b, 0xec, 0x1d, 0xe8, 0x67, 0xff,
-       0x7d, 0xc4, 0xc8, 0x18, 0x31, 0x52, 0x5f, 0x78, 0xec, 0x45, 0x15, 0xf5,
-       0x1d, 0x64, 0x0f, 0xdf, 0x16, 0x6c, 0x79, 0x99, 0xd8, 0xf2, 0x3c, 0x31,
-       0x72, 0x67, 0x4a, 0xc6, 0x91, 0xf1, 0xf2, 0xe3, 0x48, 0x9f, 0xff, 0x66,
-       0xae, 0xaf, 0x92, 0xb9, 0xde, 0x6e, 0x1e, 0xf2, 0xdb, 0x9f, 0xf2, 0xef,
-       0x62, 0x8b, 0x43, 0xf5, 0x26, 0xa6, 0x9f, 0xa9, 0x98, 0x24, 0xbe, 0x5a,
-       0x71, 0x00, 0xfd, 0x6b, 0x04, 0x2b, 0x17, 0xab, 0xb8, 0x1c, 0x9d, 0x44,
-       0xd1, 0x81, 0x3c, 0x16, 0x99, 0x4b, 0x4e, 0x10, 0x87, 0x06, 0x21, 0xd8,
-       0xd3, 0xc4, 0x3d, 0x30, 0x68, 0x13, 0x65, 0x18, 0x4d, 0xca, 0xd9, 0x0b,
-       0x13, 0xbb, 0x42, 0x2e, 0x72, 0xd8, 0xee, 0xe3, 0x05, 0x96, 0x4f, 0x28,
-       0x23, 0x5e, 0xe7, 0xf9, 0xb5, 0x70, 0x6b, 0xc1, 0x1a, 0xc6, 0x11, 0x43,
-       0x76, 0x14, 0x2c, 0xca, 0xc6, 0x0e, 0xe7, 0xda, 0xa4, 0x5d, 0x2d, 0x06,
-       0x77, 0x8b, 0xae, 0xf9, 0x50, 0xa3, 0x9d, 0x67, 0x2c, 0x01, 0xbc, 0x1b,
-       0xb5, 0xdd, 0xe9, 0x22, 0x07, 0xee, 0xd2, 0x17, 0xe3, 0xda, 0xcc, 0x2d,
-       0xb4, 0x6f, 0x37, 0x7f, 0x9b, 0xc0, 0xc1, 0xa8, 0x0b, 0x05, 0x56, 0x8d,
-       0xb2, 0x9c, 0xeb, 0xc9, 0xea, 0xcb, 0x36, 0xea, 0x4b, 0x21, 0x63, 0xb3,
-       0x15, 0x96, 0x5d, 0x4a, 0x3f, 0x93, 0xd6, 0xbb, 0x32, 0xda, 0x62, 0xe1,
-       0xad, 0x41, 0xfa, 0xc0, 0x32, 0xc4, 0xfb, 0xba, 0x70, 0x36, 0x54, 0x86,
-       0xd8, 0x01, 0xb1, 0xa7, 0x5a, 0xc1, 0x4d, 0x8e, 0xdb, 0x44, 0xf9, 0xa8,
-       0xc4, 0x95, 0x86, 0x4e, 0xbb, 0xbd, 0x0c, 0x17, 0x2a, 0x18, 0xaf, 0x5a,
-       0xef, 0x13, 0xb5, 0x62, 0x7f, 0x6e, 0x8f, 0x54, 0xf2, 0x9b, 0xd6, 0xeb,
-       0x7c, 0x39, 0xbf, 0x96, 0xbc, 0x7d, 0x66, 0x6b, 0xe4, 0x3d, 0xe4, 0x30,
-       0x2f, 0x49, 0x3e, 0xc8, 0xe6, 0xa3, 0xdf, 0x60, 0x5c, 0x34, 0x26, 0xb2,
-       0xce, 0xeb, 0xd6, 0xeb, 0x35, 0xd9, 0x33, 0x3d, 0xf9, 0x3d, 0xc8, 0x5f,
-       0x6b, 0x6b, 0x8b, 0x95, 0x5f, 0x98, 0xcf, 0x56, 0xcb, 0xfc, 0xae, 0x32,
-       0x0e, 0xfb, 0x31, 0x7f, 0x5f, 0x86, 0x9e, 0xa1, 0xe9, 0x7e, 0x41, 0x6c,
-       0xce, 0x73, 0xd3, 0xd9, 0xc3, 0x8a, 0xb8, 0xbc, 0xbf, 0x75, 0x34, 0xf4,
-       0x24, 0xf7, 0xc1, 0xbf, 0xb0, 0xc1, 0xca, 0xa5, 0x90, 0xe3, 0x32, 0xfe,
-       0x10, 0x3c, 0x35, 0xe8, 0xcf, 0xcb, 0xf0, 0xb3, 0xa4, 0xf8, 0x57, 0x13,
-       0x85, 0xa1, 0x12, 0xfa, 0xbb, 0xee, 0xe7, 0x2a, 0x2c, 0xce, 0x5c, 0x86,
-       0x4a, 0xea, 0x5e, 0xff, 0xd0, 0xed, 0xf4, 0xfc, 0x86, 0x0f, 0x48, 0x87,
-       0x14, 0x62, 0xc2, 0x6f, 0xcc, 0x5d, 0x8f, 0x66, 0x9f, 0x39, 0x97, 0x74,
-       0xe1, 0xa3, 0x50, 0x3b, 0x26, 0x2a, 0xc2, 0x18, 0x48, 0x14, 0xa1, 0x7d,
-       0x56, 0xbd, 0xf5, 0xce, 0x45, 0x4d, 0xdc, 0x83, 0xf3, 0x51, 0x27, 0x9a,
-       0x66, 0x7b, 0xac, 0x7c, 0x92, 0x8d, 0x76, 0xf1, 0x76, 0x34, 0x42, 0x5f,
-       0xe0, 0xb9, 0xc9, 0x3f, 0x14, 0x68, 0x8b, 0x70, 0x7f, 0x0e, 0xc3, 0xf7,
-       0x27, 0x3e, 0x27, 0xc6, 0x94, 0x1b, 0x33, 0xc3, 0x65, 0xb8, 0x7b, 0x40,
-       0xce, 0x29, 0x48, 0x9d, 0x4a, 0x9b, 0x9a, 0xaf, 0x94, 0x61, 0xc9, 0x90,
-       0xe0, 0xb9, 0x9c, 0xfd, 0x48, 0x87, 0x5c, 0xb1, 0x36, 0xee, 0x51, 0x27,
-       0xea, 0xf7, 0x5a, 0x72, 0x55, 0xed, 0x8a, 0xd9, 0x75, 0x49, 0x8f, 0xe8,
-       0xf4, 0x67, 0x9d, 0xf7, 0x53, 0xef, 0xa7, 0x42, 0xde, 0xf6, 0x99, 0x76,
-       0xad, 0xe3, 0x57, 0x4a, 0x10, 0xa3, 0x19, 0xa0, 0x6f, 0x24, 0x80, 0x0f,
-       0x12, 0xc2, 0xed, 0x03, 0x78, 0x7f, 0x2c, 0x88, 0x77, 0xe8, 0x87, 0x8a,
-       0xe2, 0xde, 0xc8, 0x33, 0x8c, 0xdd, 0xde, 0xe5, 0x75, 0x61, 0x5c, 0xc7,
-       0x15, 0xca, 0xcf, 0x19, 0x6f, 0xc4, 0xa5, 0xb1, 0x6f, 0xe0, 0xf2, 0x5e,
-       0x05, 0xc7, 0xb4, 0x6f, 0xe0, 0xe2, 0xa1, 0x4e, 0x2c, 0xda, 0x2b, 0x67,
-       0xf5, 0x8e, 0x86, 0x54, 0xfa, 0x81, 0x27, 0xeb, 0xcc, 0xae, 0x17, 0xf4,
-       0x7a, 0x62, 0x86, 0x57, 0x6f, 0x67, 0x6c, 0x24, 0xf8, 0x1d, 0xb1, 0xc9,
-       0x9e, 0xc9, 0xde, 0x75, 0xe2, 0xb2, 0x85, 0xd9, 0xb7, 0xc7, 0x89, 0x1b,
-       0x78, 0x2d, 0xe3, 0x88, 0x6d, 0xdf, 0x81, 0x57, 0x19, 0x94, 0x6e, 0x61,
-       0x3b, 0x17, 0x71, 0xee, 0xe9, 0x68, 0x11, 0x0a, 0xab, 0xcb, 0x2d, 0x7b,
-       0x2b, 0x8e, 0x07, 0x70, 0x9a, 0xb2, 0x5b, 0x59, 0xed, 0xe5, 0xb5, 0xf8,
-       0xd8, 0x20, 0xe3, 0x93, 0x99, 0xf8, 0xe0, 0x26, 0xdf, 0xfa, 0xaa, 0x85,
-       0x0d, 0x0e, 0xed, 0x81, 0x39, 0x59, 0x6c, 0x20, 0xa0, 0x13, 0x93, 0x25,
-       0x27, 0x58, 0xae, 0x69, 0x1b, 0xbe, 0x4b, 0x1b, 0x4f, 0x87, 0x8e, 0xfd,
-       0x49, 0x29, 0x39, 0xf0, 0x0b, 0xa1, 0x7a, 0xa3, 0x02, 0x2b, 0x78, 0x7f,
-       0x62, 0x91, 0x8a, 0x75, 0xfc, 0xf6, 0xb3, 0x5d, 0x90, 0xf3, 0xb8, 0x6a,
-       0xa6, 0x54, 0x1f, 0xff, 0xae, 0xa5, 0x2f, 0xdf, 0x84, 0xb3, 0xb1, 0x86,
-       0xf6, 0x11, 0xe5, 0x8a, 0x69, 0x54, 0xd7, 0xf1, 0xb7, 0x2a, 0x9c, 0x8b,
-       0x7a, 0x27, 0x0e, 0xa1, 0xc1, 0x33, 0xa5, 0xec, 0x37, 0x0d, 0x55, 0xf6,
-       0x47, 0xd6, 0x2b, 0xcf, 0xdf, 0xc5, 0xfb, 0x17, 0xa6, 0xe9, 0xe1, 0x8d,
-       0xf8, 0xca, 0x79, 0x5d, 0xff, 0x84, 0x83, 0x98, 0x4b, 0x86, 0xf5, 0x06,
-       0x75, 0x0b, 0xb1, 0x20, 0xa2, 0xde, 0x4e, 0xff, 0x8a, 0xa8, 0x7f, 0x61,
-       0xc6, 0x8b, 0x65, 0x50, 0x2d, 0x5f, 0xd4, 0x8a, 0xe4, 0xd0, 0x74, 0x1e,
-       0x29, 0x7a, 0x97, 0xe5, 0xa4, 0xed, 0x15, 0xdd, 0xc7, 0x9d, 0xf4, 0x87,
-       0x09, 0x62, 0x78, 0x9c, 0x18, 0x5e, 0x48, 0x0c, 0xbf, 0xba, 0xa7, 0x18,
-       0x67, 0xf7, 0x34, 0x21, 0x5d, 0x21, 0xcf, 0xd8, 0xe1, 0xe4, 0xea, 0x52,
-       0x96, 0x6f, 0xb7, 0xa1, 0xa6, 0x7f, 0xa9, 0x9c, 0x75, 0x85, 0xf8, 0xd0,
-       0x82, 0x38, 0x11, 0xb1, 0xd5, 0x0e, 0x87, 0xf5, 0x7e, 0xc1, 0x8c, 0x9b,
-       0xf4, 0xcf, 0xa5, 0x15, 0xa2, 0xa5, 0x4a, 0xf0, 0xe1, 0xe2, 0x1c, 0xf1,
-       0x99, 0x3f, 0xe5, 0x5c, 0x8e, 0x53, 0xa7, 0x9f, 0xd2, 0xef, 0x91, 0x1a,
-       0x1d, 0xdb, 0xcb, 0x73, 0x12, 0xc3, 0x98, 0xd8, 0x41, 0x0d, 0xab, 0xaf,
-       0x36, 0x91, 0xd0, 0xc3, 0xf4, 0x4f, 0x21, 0x44, 0x2a, 0x82, 0xf4, 0x4b,
-       0x72, 0xad, 0xe2, 0x12, 0xe3, 0xaf, 0x4c, 0x50, 0xc1, 0x47, 0x5f, 0x13,
-       0xbf, 0xef, 0xd7, 0xcf, 0x2a, 0xa7, 0x67, 0x65, 0xdf, 0x6b, 0x10, 0x8c,
-       0x28, 0xb7, 0x30, 0xa2, 0xd0, 0xe2, 0x40, 0xb3, 0x2d, 0x6c, 0xf1, 0xd8,
-       0xe4, 0x4c, 0x51, 0x34, 0x74, 0x6f, 0xa2, 0x61, 0xc2, 0x67, 0x27, 0x1f,
-       0xfb, 0xe3, 0xaf, 0x91, 0x87, 0x59, 0x7c, 0x60, 0xba, 0xdf, 0x69, 0x02,
-       0xa6, 0xcb, 0x23, 0x7f, 0x76, 0xd9, 0x93, 0xc5, 0xca, 0x72, 0xe1, 0x6d,
-       0xff, 0xcf, 0x6c, 0xbd, 0x69, 0xfe, 0x79, 0x1c, 0xf9, 0x25, 0xaf, 0xe5,
-       0x79, 0xb1, 0x3b, 0xea, 0x45, 0xfc, 0x1f, 0xcd, 0xc7, 0x2d, 0xee, 0x76,
-       0x6c, 0x8e, 0x9c, 0xcb, 0x74, 0xf4, 0xff, 0xfd, 0x1c, 0x79, 0x9f, 0xc1,
-       0x36, 0x8d, 0x03, 0x64, 0xfd, 0xea, 0x3b, 0xe6, 0x2a, 0x6b, 0xae, 0xa7,
-       0x73, 0xed, 0x24, 0x56, 0x96, 0xb9, 0x28, 0xf8, 0x81, 0xd6, 0xa0, 0x9e,
-       0x46, 0xa9, 0xe0, 0x49, 0x44, 0xea, 0x91, 0xc5, 0x9a, 0xcf, 0x7d, 0x90,
-       0xdf, 0xbb, 0x78, 0xff, 0x35, 0xcd, 0xd1, 0xf4, 0x2c, 0xa4, 0x06, 0x6b,
-       0xe3, 0x5e, 0x35, 0xb8, 0x4f, 0xc3, 0x1f, 0x29, 0x54, 0xa6, 0xcc, 0xf6,
-       0x2a, 0x69, 0x93, 0xad, 0xc5, 0x42, 0x39, 0x6f, 0xe5, 0x49, 0xb2, 0x3a,
-       0x53, 0x4b, 0x9d, 0x11, 0xec, 0x12, 0xde, 0xb1, 0x80, 0x6b, 0x57, 0x31,
-       0x34, 0x26, 0x1c, 0xc1, 0x65, 0xf1, 0x20, 0xb5, 0xae, 0xce, 0xb3, 0x1e,
-       0xca, 0x5c, 0x62, 0x2c, 0xb6, 0xea, 0xb8, 0xd3, 0x86, 0xb7, 0xee, 0xb4,
-       0x85, 0x97, 0xfe, 0xd9, 0xfd, 0x8d, 0x77, 0xcf, 0x95, 0x77, 0x5f, 0xc8,
-       0xe6, 0x24, 0x2f, 0xeb, 0x96, 0xba, 0xe1, 0x72, 0xf2, 0xaa, 0x41, 0xc6,
-       0xf2, 0xcb, 0x83, 0xbf, 0x33, 0xbf, 0xed, 0x88, 0x78, 0xec, 0xa8, 0xf3,
-       0xf4, 0xe0, 0x9a, 0x99, 0xaa, 0xb2, 0xee, 0xcf, 0x95, 0xf7, 0x0d, 0x9c,
-       0xd2, 0x3f, 0xb9, 0xc8, 0xdd, 0x75, 0x26, 0xe3, 0x64, 0xdb, 0x32, 0x3b,
-       0xed, 0x82, 0x32, 0x33, 0xeb, 0x67, 0xd5, 0xb9, 0x6d, 0x4a, 0x3d, 0xb5,
-       0xa3, 0x0a, 0x47, 0xa8, 0xbf, 0x47, 0xc6, 0xc4, 0xff, 0xa9, 0x38, 0x4c,
-       0x3b, 0x3d, 0x54, 0xef, 0xeb, 0xbc, 0xcc, 0xb8, 0xf1, 0x43, 0xf2, 0xf9,
-       0x37, 0x34, 0x6f, 0xfb, 0x29, 0xc9, 0x29, 0x86, 0x1c, 0x38, 0x13, 0xbc,
-       0x66, 0xe5, 0x78, 0x63, 0x07, 0x54, 0x0c, 0x26, 0xb2, 0xf6, 0xfe, 0x0a,
-       0xed, 0xf8, 0xc6, 0x99, 0x03, 0x1d, 0x5b, 0x06, 0xc4, 0x3e, 0x1a, 0x2d,
-       0x3b, 0xba, 0x91, 0x13, 0x12, 0xbc, 0x16, 0xbb, 0x78, 0x42, 0x6a, 0x71,
-       0x46, 0x0a, 0x0e, 0xca, 0x77, 0x39, 0xf9, 0xae, 0xf8, 0xd8, 0x00, 0x63,
-       0x5b, 0x07, 0xed, 0xe7, 0x14, 0xe3, 0x0c, 0xce, 0x2d, 0x6c, 0x9a, 0xef,
-       0x30, 0xee, 0x1a, 0x42, 0x83, 0x7a, 0x02, 0x6b, 0xc8, 0x59, 0xc9, 0x67,
-       0xc6, 0x9a, 0xb1, 0xd3, 0x8a, 0x9b, 0x7c, 0xea, 0x0a, 0x65, 0x21, 0xd7,
-       0xdf, 0x8c, 0xee, 0x43, 0xb5, 0xe4, 0x35, 0xa6, 0xb9, 0x5a, 0xff, 0x73,
-       0x54, 0x0e, 0x74, 0x77, 0x56, 0x52, 0x1e, 0x9f, 0x86, 0x8c, 0x0e, 0x62,
-       0xfa, 0x86, 0x13, 0x4a, 0xc3, 0xda, 0x98, 0xf2, 0x6d, 0xee, 0x87, 0xe4,
-       0x41, 0x3c, 0x8c, 0xc7, 0x57, 0xd3, 0x9f, 0xfd, 0x0f, 0xec, 0x50, 0x95,
-       0x25, 0xb6, 0xb0, 0xf0, 0x41, 0xf8, 0xd5, 0xb0, 0x76, 0xea, 0xa2, 0x7d,
-       0x33, 0xbd, 0x4f, 0x23, 0xef, 0x89, 0x5f, 0x97, 0xb6, 0x72, 0xb6, 0xbe,
-       0x13, 0xc7, 0xd3, 0xd4, 0xeb, 0x68, 0x2f, 0x4e, 0xa4, 0x65, 0x4c, 0xe1,
-       0x53, 0x01, 0xc4, 0x06, 0xec, 0x18, 0xd5, 0x7d, 0x91, 0x72, 0xca, 0xa5,
-       0x38, 0xe4, 0x8d, 0xac, 0x51, 0x02, 0xe4, 0x6d, 0x69, 0x9c, 0xd9, 0xed,
-       0x6d, 0xaf, 0x67, 0x8c, 0x18, 0x1d, 0x83, 0xfa, 0xcc, 0xe2, 0x34, 0x4e,
-       0x0f, 0x3f, 0x04, 0xcf, 0x2c, 0xaf, 0x67, 0xb9, 0xd2, 0x82, 0xad, 0x63,
-       0xff, 0x51, 0x2e, 0xc9, 0xc3, 0xb1, 0x5b, 0x60, 0x50, 0xf6, 0xdb, 0xd1,
-       0x3f, 0x57, 0x6c, 0xbe, 0x67, 0xac, 0x14, 0xf3, 0xe8, 0x8f, 0x5e, 0xb2,
-       0xfc, 0x6c, 0xd6, 0x8e, 0x6a, 0xb4, 0x8f, 0xcc, 0xc7, 0x72, 0x3e, 0xfc,
-       0xab, 0xe5, 0xf5, 0x77, 0x66, 0x44, 0x15, 0x79, 0xc9, 0x73, 0x35, 0x28,
-       0x62, 0x3f, 0x3b, 0x72, 0xfe, 0xba, 0x42, 0xfb, 0xbf, 0xe6, 0x43, 0x56,
-       0x1f, 0x4f, 0xcd, 0x95, 0xa0, 0x60, 0x9b, 0x15, 0xd3, 0xcb, 0xba, 0x75,
-       0x7c, 0x16, 0x95, 0x9c, 0x86, 0x8a, 0x13, 0xba, 0xe0, 0x48, 0x0b, 0x6d,
-       0xd5, 0x89, 0x0d, 0x41, 0x9a, 0xa3, 0x95, 0xcf, 0x9f, 0xc4, 0xce, 0xe4,
-       0xbf, 0x9b, 0xcf, 0x51, 0x8f, 0x56, 0x92, 0xc3, 0x78, 0x88, 0x03, 0x4f,
-       0x85, 0x56, 0x93, 0x73, 0x72, 0xcd, 0x09, 0x07, 0x31, 0x48, 0x41, 0xa2,
-       0x89, 0xf6, 0x1f, 0x5a, 0x80, 0x09, 0xab, 0x7d, 0xd5, 0xdc, 0x6c, 0x0e,
-       0xf1, 0x83, 0xb9, 0xd9, 0x38, 0x50, 0xe4, 0xff, 0x9f, 0x91, 0xdf, 0x2b,
-       0xa6, 0xa7, 0x52, 0xe4, 0xe7, 0x80, 0x9b, 0x7e, 0x6b, 0x1f, 0xdb, 0x9c,
-       0xdb, 0xed, 0x40, 0xbf, 0xd6, 0x82, 0xfe, 0x31, 0x78, 0x3e, 0x65, 0x9b,
-       0x7f, 0x1a, 0x1e, 0x98, 0x9b, 0xe5, 0x0a, 0x6f, 0xa1, 0x3b, 0xfa, 0xbc,
-       0xb9, 0xac, 0x52, 0xd6, 0xeb, 0x84, 0x9b, 0xeb, 0xdd, 0x77, 0x3d, 0x9f,
-       0xb7, 0xde, 0x7c, 0xd8, 0xf2, 0x13, 0xbb, 0xe7, 0x4a, 0xbd, 0xec, 0xa7,
-       0x09, 0x13, 0x97, 0xf4, 0xa3, 0x56, 0x1c, 0x2e, 0xd8, 0xd0, 0x93, 0x90,
-       0xbd, 0x95, 0xb9, 0x6d, 0xcd, 0xc9, 0xe3, 0xff, 0x54, 0xdf, 0x3c, 0xef,
-       0x65, 0x39, 0x5d, 0x96, 0x5a, 0x75, 0x9e, 0xe3, 0x8b, 0x2e, 0x8b, 0x1e,
-       0x5b, 0xef, 0xfd, 0x24, 0xe5, 0xfd, 0xd9, 0x27, 0xd4, 0xdf, 0x73, 0x0c,
-       0xc9, 0xa9, 0xb4, 0xb0, 0x0f, 0xd3, 0x5c, 0xaf, 0x37, 0x78, 0x4e, 0xe0,
-       0x8f, 0xa8, 0xdb, 0x3a, 0xb6, 0x0f, 0x48, 0xbe, 0xd5, 0xa3, 0x38, 0xf6,
-       0xac, 0xc1, 0x25, 0xfa, 0xff, 0x9d, 0x96, 0x1e, 0x0a, 0xae, 0xc8, 0x3c,
-       0x04, 0x5b, 0xda, 0xe8, 0xc7, 0xad, 0xb3, 0x2e, 0x91, 0x9a, 0x70, 0xa7,
-       0xf2, 0x61, 0x7d, 0x27, 0x8e, 0x86, 0x0c, 0xb3, 0x5c, 0xf3, 0xaf, 0x65,
-       0xd0, 0x5f, 0x34, 0xd6, 0x58, 0x88, 0xf1, 0x90, 0xf0, 0x47, 0xb8, 0xd2,
-       0x69, 0xaf, 0x31, 0xc3, 0xae, 0xba, 0x5e, 0x4e, 0xe7, 0xb0, 0xd2, 0xf6,
-       0xc0, 0x5c, 0x89, 0x97, 0x92, 0x16, 0x8e, 0x7c, 0x1d, 0xf7, 0x59, 0x7b,
-       0xab, 0xd2, 0x87, 0x4a, 0xbe, 0xf7, 0x68, 0xe8, 0x4a, 0x54, 0x30, 0xc5,
-       0x5c, 0xd2, 0x1c, 0x6a, 0x50, 0xb7, 0xe3, 0x4e, 0x62, 0xd7, 0x12, 0x9c,
-       0xd1, 0xa5, 0xae, 0x61, 0x7c, 0xdb, 0x01, 0xa9, 0xc1, 0x1d, 0x0e, 0x6d,
-       0x8d, 0x2e, 0xc5, 0xbe, 0x01, 0x43, 0x71, 0x86, 0xbd, 0x91, 0x18, 0xb9,
-       0x10, 0xe3, 0x71, 0x2b, 0xdf, 0x27, 0xf9, 0x84, 0xc1, 0xc6, 0x4e, 0x6c,
-       0xd7, 0x0b, 0xd1, 0xa3, 0x47, 0x8a, 0xb6, 0x2c, 0xee, 0xc2, 0x7e, 0xbd,
-       0xd4, 0x98, 0x17, 0x36, 0x88, 0xe9, 0xda, 0x86, 0x24, 0xfc, 0x2d, 0x17,
-       0xc9, 0x39, 0x8e, 0xc3, 0xdb, 0xb1, 0xc4, 0x4e, 0xcc, 0xbd, 0xc7, 0xe1,
-       0x8a, 0x65, 0x9a, 0x90, 0x18, 0xab, 0x72, 0xed, 0xc8, 0x04, 0x11, 0x1f,
-       0xe3, 0x7e, 0x33, 0xae, 0x75, 0x64, 0x96, 0x92, 0x83, 0x8a, 0x1c, 0xed,
-       0xd4, 0xc5, 0x7a, 0x3c, 0xd3, 0x7a, 0xc1, 0x7c, 0xd2, 0x2f, 0xf8, 0x59,
-       0x8b, 0x67, 0x55, 0x9f, 0xc5, 0x29, 0x23, 0xb6, 0xaf, 0xb2, 0x0f, 0x3b,
-       0x75, 0xee, 0x55, 0xd3, 0xf3, 0xa8, 0xc8, 0x8d, 0xc1, 0x56, 0xf1, 0x6a,
-       0xe2, 0xa7, 0xfc, 0x2d, 0xb2, 0x13, 0x19, 0x9a, 0x58, 0xa7, 0x4b, 0x2e,
-       0xaf, 0x91, 0x36, 0xe3, 0xc6, 0xdb, 0xea, 0x8d, 0x7d, 0x78, 0x5a, 0xf7,
-       0xe9, 0x87, 0x20, 0x39, 0xbc, 0xff, 0xce, 0xe7, 0x24, 0xdf, 0xd2, 0x84,
-       0x17, 0x2b, 0xb2, 0xf1, 0x87, 0xc7, 0x56, 0x42, 0xdc, 0xcd, 0xfb, 0x11,
-       0xb9, 0xef, 0x4d, 0x46, 0xa8, 0xa7, 0x1b, 0x83, 0x53, 0x66, 0xa4, 0xd2,
-       0xe8, 0x94, 0xb3, 0x28, 0xee, 0xf0, 0xea, 0x17, 0xdd, 0xf5, 0xde, 0x8e,
-       0x29, 0x05, 0x38, 0x13, 0xa3, 0x1f, 0xb6, 0xfe, 0xbb, 0x47, 0xe9, 0xdb,
-       0x89, 0xa1, 0xe0, 0x1d, 0x68, 0x6f, 0x93, 0xb1, 0x9a, 0xd1, 0xbb, 0xd7,
-       0x34, 0x4b, 0x43, 0x3e, 0x35, 0x0d, 0x27, 0x56, 0x04, 0xed, 0xb8, 0xa0,
-       0x9a, 0x70, 0x84, 0xfe, 0xdd, 0xcc, 0xd0, 0x3f, 0x0e, 0xd3, 0x4e, 0x76,
-       0x50, 0xc7, 0xe4, 0x5d, 0x28, 0x3f, 0xed, 0x24, 0x4e, 0x3b, 0x39, 0x13,
-       0x9a, 0x9f, 0x7b, 0x57, 0x52, 0x23, 0xaf, 0x98, 0xc4, 0x92, 0x01, 0x15,
-       0x9f, 0xde, 0x33, 0x89, 0xd0, 0x50, 0x7e, 0xee, 0x62, 0x97, 0xf9, 0xf9,
-       0x4b, 0x6d, 0x50, 0xe6, 0x2e, 0x73, 0x94, 0xb5, 0xc8, 0xdf, 0xf9, 0x7b,
-       0xf9, 0xdf, 0xc4, 0xcf, 0x3a, 0xd1, 0x6a, 0xad, 0xed, 0x2f, 0x6a, 0xb2,
-       0x98, 0x91, 0x5f, 0x93, 0xeb, 0x96, 0xeb, 0x4b, 0xb7, 0x5c, 0x3f, 0xee,
-       0xbe, 0xf9, 0x7a, 0xfb, 0x9c, 0x9b, 0xaf, 0xf3, 0x36, 0x71, 0x43, 0xae,
-       0x1d, 0xba, 0x6f, 0xe2, 0x28, 0xd7, 0x3a, 0x63, 0xc1, 0x21, 0xf3, 0x42,
-       0x85, 0xcc, 0x45, 0x62, 0xd6, 0xec, 0x5c, 0x97, 0x65, 0xa6, 0xcf, 0xf5,
-       0xcd, 0x5c, 0x6d, 0xc0, 0x3a, 0xf7, 0x4b, 0xbb, 0xd1, 0xe4, 0x1d, 0xdf,
-       0xdc, 0x3b, 0x74, 0xd9, 0xb3, 0x88, 0xa5, 0xe1, 0x80, 0xd2, 0x1b, 0x33,
-       0xcc, 0x19, 0x5a, 0xb1, 0x21, 0xef, 0x4a, 0xa9, 0x7e, 0x03, 0x25, 0x7e,
-       0x6d, 0xc3, 0x0c, 0x5b, 0x17, 0x9c, 0x0b, 0xb5, 0x8e, 0x3f, 0x53, 0x92,
-       0x88, 0x67, 0xbc, 0x81, 0x43, 0x94, 0x55, 0x2c, 0x73, 0x95, 0x71, 0x75,
-       0x17, 0x9e, 0x09, 0x39, 0x8c, 0xe2, 0xb0, 0xd7, 0x3d, 0x5f, 0x59, 0x86,
-       0xed, 0x43, 0x7f, 0x8e, 0xf5, 0x49, 0xe1, 0xf8, 0xb5, 0xd8, 0x32, 0x66,
-       0xc3, 0x31, 0xea, 0x77, 0x2f, 0xc7, 0x21, 0xfe, 0xb9, 0x53, 0x90, 0xb3,
-       0x79, 0x8d, 0x8c, 0x91, 0x75, 0xeb, 0xb3, 0x75, 0xe8, 0x75, 0xac, 0x8f,
-       0x9a, 0xf8, 0x54, 0xa7, 0xef, 0xd1, 0x64, 0x7e, 0x12, 0x3b, 0xb7, 0x5a,
-       0x58, 0xfa, 0x48, 0x9c, 0xfb, 0x39, 0x4b, 0x6c, 0x75, 0x29, 0x6d, 0x56,
-       0xc1, 0x67, 0x52, 0x77, 0xac, 0xe4, 0x9c, 0xc9, 0x0d, 0xc7, 0xa3, 0x9b,
-       0x30, 0x1c, 0x35, 0xe4, 0x7d, 0xc0, 0xde, 0x1a, 0x7b, 0xe4, 0x85, 0x0a,
-       0xf2, 0xec, 0x84, 0xee, 0x6f, 0x3f, 0xa7, 0xc0, 0x53, 0x16, 0xf6, 0xd3,
-       0xcf, 0x7c, 0x89, 0xdf, 0xea, 0x92, 0x4f, 0xd3, 0x5d, 0xab, 0xa8, 0xef,
-       0x7b, 0x86, 0x02, 0x56, 0x7e, 0xe0, 0xef, 0x6e, 0x9b, 0xbf, 0x90, 0x1a,
-       0xb3, 0x9e, 0xcb, 0x35, 0xbe, 0x8e, 0x83, 0x69, 0x17, 0x1e, 0x8b, 0x7b,
-       0x94, 0x79, 0x7b, 0x54, 0xdc, 0x1f, 0xf7, 0x4e, 0x2c, 0xb1, 0x93, 0x7f,
-       0x2c, 0x9a, 0xc1, 0xfe, 0x14, 0xfc, 0x68, 0xa1, 0xf8, 0x82, 0xff, 0x0a,
-       0x63, 0x56, 0x84, 0x7d, 0xa2, 0xb4, 0x60, 0xb1, 0x57, 0x3d, 0x68, 0xf3,
-       0xb9, 0x7f, 0x8b, 0xad, 0xb0, 0x67, 0x56, 0xa3, 0x9b, 0xf3, 0x5f, 0x19,
-       0x97, 0x9a, 0x55, 0x03, 0x50, 0xd1, 0x8c, 0x1d, 0x87, 0xc4, 0x36, 0xe5,
-       0x9d, 0x75, 0x78, 0xaa, 0xc2, 0x2d, 0x77, 0xa0, 0xf8, 0x4b, 0x72, 0xed,
-       0x49, 0x89, 0x3f, 0x37, 0x94, 0xdb, 0x4c, 0xc6, 0x2f, 0xf3, 0x73, 0x35,
-       0x89, 0xa5, 0xd8, 0x3a, 0x20, 0xf9, 0x76, 0xe2, 0xb6, 0xce, 0x38, 0xa8,
-       0x42, 0x0b, 0x3c, 0x65, 0x93, 0x3a, 0xd0, 0x26, 0xf8, 0x62, 0x9b, 0x10,
-       0x88, 0x89, 0xcd, 0x6a, 0x6a, 0x07, 0x22, 0xa7, 0x25, 0xcf, 0x37, 0x2f,
-       0xe4, 0xe7, 0xbc, 0xfc, 0xbd, 0x55, 0x76, 0xdd, 0xf5, 0xca, 0xa8, 0x8a,
-       0x09, 0x35, 0x1b, 0x47, 0x1e, 0x4a, 0x6a, 0x6b, 0x0b, 0x6d, 0x72, 0x26,
-       0xe2, 0xb2, 0x19, 0xb1, 0xfa, 0x55, 0x6a, 0x51, 0xde, 0x8c, 0xbe, 0xbd,
-       0xef, 0xd2, 0x07, 0xc9, 0x18, 0xbf, 0x37, 0x9d, 0xd4, 0xcb, 0xe5, 0x6d,
-       0x1e, 0xdc, 0x17, 0x97, 0x3c, 0x69, 0x4f, 0x75, 0xf6, 0x4c, 0x87, 0x5c,
-       0x3b, 0xd0, 0xa1, 0x13, 0x64, 0x67, 0x7d, 0x61, 0x56, 0x59, 0x71, 0xe9,
-       0x97, 0x59, 0x9d, 0x49, 0xdc, 0x7d, 0x87, 0xd8, 0x78, 0xcf, 0x58, 0x83,
-       0x3b, 0xab, 0x77, 0x4d, 0xbc, 0x96, 0xbe, 0xb4, 0x7d, 0x9b, 0xe4, 0x34,
-       0x2e, 0xf9, 0xcc, 0x23, 0xa3, 0xd3, 0xdb, 0xe7, 0x73, 0x30, 0x55, 0x39,
-       0x4e, 0x95, 0xd7, 0x37, 0xa9, 0xf5, 0x45, 0x94, 0x87, 0xa3, 0x2d, 0xca,
-       0xaa, 0xa8, 0xd4, 0xfb, 0x6c, 0xd1, 0x12, 0xeb, 0x5c, 0xab, 0x89, 0xef,
-       0x85, 0xc6, 0x95, 0x6d, 0xd6, 0x99, 0x59, 0x43, 0x49, 0x36, 0x02, 0x95,
-       0xa3, 0xcd, 0xca, 0xf6, 0xe8, 0x27, 0xe6, 0x53, 0x56, 0x5d, 0x7d, 0xa6,
-       0x75, 0xbe, 0xa6, 0x70, 0xd4, 0x85, 0x8a, 0x83, 0x25, 0x28, 0x18, 0xd4,
-       0x30, 0x73, 0xf4, 0x41, 0xf2, 0x56, 0xe1, 0x3a, 0x46, 0x8b, 0xc3, 0x3a,
-       0xa3, 0xf6, 0xfa, 0xf5, 0x33, 0x6a, 0x0e, 0xe2, 0x82, 0x01, 0xeb, 0x1f,
-       0x63, 0xa5, 0xc3, 0x8c, 0x95, 0xcc, 0x25, 0xdf, 0x0b, 0x19, 0x3b, 0x66,
-       0xc2, 0x1b, 0xa8, 0xb4, 0x19, 0xa6, 0xe4, 0x6e, 0x5e, 0x21, 0x61, 0x5c,
-       0x53, 0x67, 0x60, 0x45, 0x9d, 0xbc, 0x9b, 0xe9, 0x30, 0xec, 0xe1, 0x2e,
-       0x1c, 0x0e, 0x75, 0xe1, 0x3d, 0xbd, 0x0b, 0x3b, 0xf5, 0x62, 0xa3, 0x3c,
-       0x5c, 0x2a, 0x67, 0xd9, 0x27, 0xa2, 0xd0, 0xf4, 0xb4, 0xa2, 0x9d, 0xba,
-       0x0a, 0xef, 0x3e, 0x9f, 0xe2, 0x35, 0x96, 0x29, 0x1a, 0x2e, 0x67, 0xbc,
-       0x53, 0xe5, 0xb4, 0x81, 0x6b, 0x99, 0x00, 0xa6, 0x88, 0xab, 0xc9, 0x31,
-       0x39, 0x4f, 0x52, 0x8b, 0x81, 0xb1, 0xff, 0x29, 0xdc, 0xc0, 0x20, 0x26,
-       0x59, 0x67, 0x2a, 0x9f, 0x93, 0x5a, 0xa6, 0x33, 0x98, 0xe3, 0x30, 0x86,
-       0xb2, 0xae, 0xb1, 0x0c, 0xd7, 0xe8, 0x9d, 0x7e, 0x98, 0xee, 0x64, 0x3c,
-       0x87, 0xd7, 0x6a, 0x60, 0xff, 0xbe, 0x1b, 0xf5, 0xc9, 0x19, 0x38, 0x56,
-       0x5f, 0x89, 0x02, 0x1c, 0x1d, 0xee, 0x20, 0xc7, 0xef, 0x6e, 0x2f, 0x67,
-       0x7c, 0x3a, 0x3a, 0xec, 0x44, 0x2a, 0x25, 0x39, 0x07, 0xab, 0x36, 0x39,
-       0xe9, 0xa0, 0x2d, 0xed, 0x4a, 0xa0, 0xbe, 0x26, 0xec, 0x4f, 0xd6, 0xd8,
-       0x55, 0xf6, 0x51, 0x85, 0x54, 0x5a, 0xe3, 0x27, 0xc0, 0x4f, 0x90, 0x9f,
-       0x26, 0x7c, 0x8f, 0x36, 0x5b, 0x41, 0xbc, 0x7d, 0x35, 0x5d, 0x86, 0x4f,
-       0x92, 0x5a, 0x40, 0xa7, 0x1e, 0x0c, 0x33, 0x46, 0x30, 0x2c, 0x39, 0x95,
-       0xe1, 0x2a, 0xed, 0xf4, 0xa5, 0x50, 0x19, 0xcc, 0xd4, 0xed, 0x62, 0x42,
-       0x79, 0xff, 0x25, 0x7f, 0x0e, 0x33, 0x5b, 0x5f, 0x3d, 0x92, 0x81, 0xf2,
-       0x78, 0x9d, 0x41, 0x7d, 0x61, 0x0c, 0xbb, 0x48, 0x6a, 0x29, 0x5a, 0xe7,
-       0x25, 0x7b, 0xb1, 0x51, 0x13, 0xf6, 0x7a, 0x6a, 0xec, 0x1a, 0xce, 0xa5,
-       0x27, 0x11, 0x4f, 0xca, 0xbb, 0x6d, 0xa2, 0xc7, 0xef, 0x9b, 0x46, 0x85,
-       0x9c, 0xc9, 0xe8, 0x44, 0x5c, 0xab, 0x64, 0x1c, 0x24, 0xef, 0x3e, 0x1e,
-       0x0e, 0x45, 0x63, 0xa5, 0xf2, 0x9e, 0xf0, 0x92, 0x97, 0x43, 0xde, 0x96,
-       0x7e, 0xc5, 0x78, 0xa8, 0xc4, 0x7a, 0xaf, 0xa3, 0x8b, 0x58, 0xac, 0xa9,
-       0x4e, 0xc5, 0xdb, 0xb4, 0x05, 0x01, 0x1c, 0x4b, 0x8b, 0xdc, 0x28, 0xa7,
-       0xb1, 0xac, 0xdc, 0x6e, 0x9c, 0x9d, 0xce, 0xea, 0xc1, 0xc6, 0xa8, 0x83,
-       0xdf, 0xb2, 0xf7, 0x72, 0xae, 0x95, 0x3e, 0xc2, 0xda, 0xff, 0x9f, 0xdf,
-       0x91, 0x3b, 0xbf, 0xda, 0x5e, 0x19, 0x76, 0x05, 0x97, 0xc7, 0xed, 0x9f,
-       0xc8, 0xfb, 0xc8, 0x4f, 0x34, 0xca, 0x7b, 0x6b, 0xae, 0xe0, 0xe3, 0xa3,
-       0xae, 0xe0, 0xda, 0xf8, 0x51, 0x85, 0xf2, 0xda, 0x57, 0x63, 0x77, 0x05,
-       0x1f, 0xb9, 0xd1, 0x9e, 0xfb, 0xde, 0x85, 0xb1, 0x50, 0xb1, 0xa1, 0x86,
-       0xc5, 0xa7, 0x7b, 0x03, 0x9f, 0x28, 0x96, 0x2f, 0x37, 0x4a, 0xe8, 0x63,
-       0x9f, 0xcf, 0x8c, 0x9b, 0xed, 0xb3, 0x04, 0xab, 0xec, 0x1c, 0xeb, 0x2a,
-       0x5e, 0x49, 0xdd, 0x78, 0xae, 0x85, 0xcf, 0x15, 0xf3, 0xb9, 0x92, 0xb0,
-       0xc4, 0x8d, 0x5e, 0x7d, 0x95, 0xa2, 0x79, 0x8a, 0x14, 0xa9, 0x87, 0x69,
-       0xf8, 0x55, 0xfa, 0x9f, 0xef, 0x90, 0x78, 0xb7, 0x67, 0xac, 0x12, 0x6b,
-       0x76, 0x9b, 0x4b, 0xe6, 0x2d, 0x34, 0x97, 0xa4, 0x43, 0x31, 0xf3, 0xa5,
-       0x6a, 0xd9, 0x4f, 0xa9, 0xf1, 0xc9, 0x33, 0x9a, 0xea, 0x63, 0x9c, 0xf9,
-       0x4d, 0x7d, 0xbb, 0xbc, 0xa3, 0x07, 0x79, 0x7f, 0xa9, 0x90, 0x63, 0x9c,
-       0x4c, 0x89, 0x8e, 0x6c, 0x6d, 0x77, 0x31, 0x16, 0x95, 0x77, 0x67, 0x0f,
-       0x73, 0xef, 0x0f, 0xa6, 0xfe, 0xd7, 0x1d, 0x72, 0x76, 0x5d, 0xce, 0x06,
-       0x00, 0xff, 0x1f, 0x17, 0x23, 0xca, 0x76, 0xf8, 0x78, 0x00, 0x00, 0x00 };
-
-static const u32 bnx2_RXP_b09FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_RXP_b09FwRodata[(0x124/4) + 1] = {
-       0x5f865437, 0xe4ac62cc, 0x50103a45, 0x36621985, 0xbf14c0e8, 0x1bc27a1e,
-       0x84f4b556, 0x094ea6fe, 0x7dda01e7, 0xc04d7481, 0x80080100, 0x80080080,
-       0x80080000, 0x08004fbc, 0x08004fbc, 0x08005098, 0x0800506c, 0x08005050,
-       0x08004f8c, 0x08004f8c, 0x08004f8c, 0x08004fc4, 0x080072ac, 0x080072f8,
-       0x080072b8, 0x080071dc, 0x080072b8, 0x080072e8, 0x080072b8, 0x080071dc,
-       0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc,
-       0x080071dc, 0x080071dc, 0x080071dc, 0x080072d8, 0x080072c8, 0x080071dc,
-       0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc,
-       0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc, 0x080071dc, 0x080072c8,
-       0x0800787c, 0x08007748, 0x08007844, 0x08007748, 0x08007814, 0x08007630,
-       0x08007748, 0x08007748, 0x08007748, 0x08007748, 0x08007748, 0x08007748,
-       0x08007748, 0x08007748, 0x08007748, 0x08007748, 0x08007748, 0x08007748,
-       0x08007770, 0x00000000 };
-
-static struct fw_info bnx2_rxp_fw_09 = {
-       /* Firmware version: 4.6.15 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0xf,
-
-       .start_addr                     = 0x080031d8,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x78f4,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_RXP_b09FwText,
-       .gz_text_len                    = sizeof(bnx2_RXP_b09FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_RXP_b09FwData,
-
-       .sbss_addr                      = 0x08007a40,
-       .sbss_len                       = 0x58,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08007a98,
-       .bss_len                        = 0x20,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x080078f4,
-       .rodata_len                     = 0x124,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_RXP_b09FwRodata,
-};
-
-static u8 bnx2_xi_rv2p_proc1[] = {
-       /* Date:        01/27/2009 19:01 */
-#define XI_RV2P_PROC1_POST_WAIT_TIMEOUT_MSK    0xffff
-       0xa5, 0x56, 0xdd, 0x6b, 0x1c, 0x55, 0x14, 0x3f, 0x33, 0xbb, 0x33, 0xb3,
-       0xd9, 0x9d, 0xd9, 0x5d, 0x9a, 0x34, 0x8e, 0xb1, 0x34, 0xdb, 0x20, 0xca,
-       0xa6, 0x13, 0xdd, 0x68, 0x1f, 0x04, 0x03, 0x2d, 0x01, 0x29, 0x98, 0xe2,
-       0x43, 0xa0, 0x52, 0x8a, 0x60, 0x5c, 0xb4, 0x08, 0xf6, 0x2f, 0x10, 0xc1,
-       0x21, 0x31, 0x11, 0xc4, 0xaf, 0x7d, 0xe8, 0x42, 0x02, 0x6a, 0x40, 0x50,
-       0x09, 0x11, 0x77, 0xdf, 0x24, 0x16, 0x7c, 0x68, 0xf1, 0x41, 0xda, 0xa7,
-       0x16, 0xd4, 0x97, 0x46, 0x11, 0xbf, 0x5e, 0x04, 0xd1, 0xc7, 0x9a, 0xf1,
-       0x9e, 0x8f, 0xbb, 0x3b, 0x73, 0xb3, 0x9b, 0x14, 0x5c, 0x48, 0x7e, 0x9c,
-       0x7b, 0xcf, 0x39, 0xf7, 0x7c, 0x9f, 0xa9, 0x02, 0x80, 0x0d, 0x71, 0x77,
-       0x52, 0x21, 0x58, 0xb9, 0x5c, 0x01, 0x01, 0x60, 0x1b, 0xf8, 0xe7, 0xf8,
-       0x44, 0xc7, 0x8f, 0x0a, 0x7d, 0x92, 0x21, 0x3e, 0x59, 0x55, 0xff, 0x2f,
-       0xc3, 0xe9, 0x1a, 0x62, 0x0e, 0x4e, 0x9f, 0x40, 0x7c, 0x12, 0xbe, 0xae,
-       0x85, 0x0a, 0xff, 0x4d, 0x20, 0x46, 0xfa, 0x68, 0xe7, 0xcb, 0x6e, 0x89,
-       0xf4, 0xef, 0x8a, 0xfc, 0xf7, 0x39, 0xc6, 0x27, 0xa2, 0x02, 0xeb, 0x11,
-       0x84, 0x99, 0x2a, 0xc1, 0xed, 0x16, 0xd2, 0xe7, 0xcf, 0x83, 0x8b, 0x7a,
-       0xde, 0x53, 0x0c, 0x48, 0x1f, 0xb3, 0xe2, 0x19, 0xb1, 0xcb, 0x66, 0xbe,
-       0x3b, 0xad, 0x0a, 0x9e, 0xc3, 0x8f, 0xf3, 0x48, 0xdf, 0x57, 0x7c, 0xa3,
-       0x85, 0x38, 0x0e, 0x97, 0x0a, 0x3e, 0xfb, 0x53, 0x17, 0x9c, 0x64, 0xf5,
-       0xbb, 0xd3, 0x28, 0xaf, 0x64, 0xa6, 0x45, 0xbf, 0x83, 0xfa, 0x7f, 0x4f,
-       0x58, 0x3f, 0xea, 0x4d, 0xeb, 0xbb, 0x5f, 0xe9, 0xc3, 0x73, 0x57, 0xec,
-       0x73, 0x0d, 0xfb, 0x5c, 0x65, 0x0f, 0xca, 0xaf, 0x00, 0xfb, 0x39, 0xaa,
-       0xde, 0x45, 0xfa, 0xaf, 0xbe, 0xbe, 0x2e, 0xa2, 0x6f, 0xb1, 0xbc, 0xfa,
-       0x13, 0xfb, 0x59, 0xee, 0x35, 0x25, 0xa7, 0xe3, 0x92, 0xb5, 0xd3, 0x8b,
-       0xb4, 0x7f, 0x3a, 0xfe, 0xc8, 0x7f, 0x2b, 0xc9, 0xf2, 0xc3, 0x21, 0xfc,
-       0x37, 0x15, 0x7f, 0x56, 0x2f, 0x9f, 0x7f, 0xdb, 0x3f, 0x1f, 0x18, 0x1f,
-       0xc7, 0x88, 0xcf, 0x75, 0xf1, 0xe7, 0x29, 0x78, 0xd0, 0x0e, 0x89, 0x2f,
-       0x0f, 0x21, 0xc5, 0x09, 0x62, 0xc4, 0xe3, 0x82, 0x2f, 0x09, 0x7e, 0x2e,
-       0xb8, 0x2d, 0x08, 0xff, 0x13, 0xff, 0x1e, 0x72, 0x7e, 0x54, 0xf0, 0x01,
-       0xe3, 0xfc, 0x9a, 0xe0, 0x23, 0x86, 0xfc, 0x71, 0x8b, 0xf1, 0x0f, 0xa1,
-       0xe7, 0x85, 0x7e, 0xc6, 0x90, 0x8f, 0x81, 0xe3, 0x63, 0x19, 0x71, 0xfb,
-       0x58, 0xea, 0x19, 0xf3, 0x2f, 0xf7, 0x75, 0xcd, 0x57, 0xa0, 0x38, 0xc2,
-       0x74, 0x9a, 0xff, 0x83, 0x03, 0xf8, 0x99, 0x6d, 0xbe, 0x3e, 0x48, 0xae,
-       0x9d, 0xb0, 0x1d, 0x57, 0x44, 0xbe, 0xd8, 0xb9, 0x3a, 0xa4, 0x7f, 0xe6,
-       0xa2, 0x41, 0xfd, 0x52, 0x17, 0x3f, 0xbe, 0x92, 0xba, 0xdc, 0xb1, 0x9a,
-       0x51, 0xc8, 0x79, 0xa5, 0x3c, 0x06, 0x52, 0x8f, 0x23, 0x46, 0x3d, 0x7b,
-       0xaa, 0x9e, 0xa5, 0xae, 0xea, 0xba, 0xbe, 0xb2, 0x75, 0xc5, 0xf5, 0xe1,
-       0x1a, 0xf5, 0x11, 0x1f, 0x12, 0x97, 0x92, 0xe1, 0xdf, 0xab, 0x09, 0x86,
-       0x18, 0x7f, 0xb6, 0xcd, 0xb8, 0xc1, 0x18, 0xf9, 0x6e, 0x1e, 0xf1, 0x94,
-       0xff, 0x0d, 0xeb, 0x9b, 0x04, 0x44, 0x3f, 0x6c, 0x53, 0x1f, 0xe5, 0xa1,
-       0xed, 0x2a, 0x9b, 0xe1, 0x6e, 0xf2, 0x0e, 0xf3, 0x4d, 0x38, 0x37, 0x09,
-       0xc3, 0x8d, 0x1b, 0xcc, 0xff, 0x5d, 0x8d, 0xed, 0x7e, 0x56, 0xe6, 0x53,
-       0xff, 0xa7, 0xef, 0xa5, 0xff, 0x2a, 0x48, 0xff, 0x63, 0xc5, 0x5d, 0xfd,
-       0x8e, 0xc8, 0xbd, 0xa2, 0xeb, 0x9b, 0x7f, 0xcb, 0x6e, 0x95, 0xfc, 0x7d,
-       0xab, 0x4b, 0xe4, 0x98, 0xbf, 0x56, 0xa5, 0xdb, 0xb7, 0xbb, 0xda, 0x1f,
-       0xe9, 0xf3, 0x69, 0xed, 0x3f, 0xcb, 0x07, 0x72, 0x6d, 0x3b, 0x3a, 0x7e,
-       0x7c, 0x5e, 0x24, 0x3b, 0x46, 0x3b, 0x9b, 0x46, 0x3e, 0x6b, 0xf7, 0x34,
-       0x07, 0xff, 0x4c, 0xfa, 0x73, 0x30, 0x1d, 0x1f, 0x3d, 0x07, 0x0b, 0xb0,
-       0x74, 0xb6, 0x42, 0xf6, 0x94, 0x5d, 0x56, 0x73, 0xa1, 0xc2, 0xf8, 0x62,
-       0x91, 0xf1, 0x97, 0x22, 0xc6, 0x2f, 0x49, 0x2e, 0x95, 0x98, 0x7e, 0x21,
-       0x40, 0xbd, 0xa3, 0xea, 0x61, 0x2d, 0xaf, 0xed, 0x3a, 0xc8, 0x1e, 0x7c,
-       0x5f, 0xbf, 0xa3, 0xed, 0xd0, 0xef, 0x65, 0xeb, 0x65, 0xf8, 0xbb, 0x8c,
-       0x4d, 0x3b, 0x1b, 0x87, 0xfc, 0x2c, 0xe3, 0x46, 0x03, 0xed, 0xba, 0x9a,
-       0xf4, 0xfa, 0xb0, 0x5e, 0x25, 0xbe, 0x29, 0x60, 0x7a, 0x51, 0xea, 0x73,
-       0x91, 0xfa, 0xa7, 0xac, 0xae, 0x10, 0x27, 0x20, 0xa6, 0xbd, 0x60, 0x17,
-       0xaf, 0x53, 0xbd, 0xe4, 0xe4, 0x5c, 0xe5, 0x67, 0x2a, 0xdb, 0x77, 0xbb,
-       0x5c, 0x8f, 0x85, 0x6c, 0x1d, 0x3f, 0x9c, 0x9a, 0xaf, 0x69, 0x7f, 0xad,
-       0x5e, 0xfd, 0xee, 0xcf, 0x53, 0x36, 0x1f, 0xb7, 0x5b, 0xda, 0x7f, 0x73,
-       0x6f, 0x30, 0x7b, 0xdc, 0x90, 0x40, 0xcd, 0xca, 0xfd, 0x8c, 0xd9, 0x2f,
-       0x83, 0xfa, 0xad, 0x6a, 0xf4, 0xcf, 0x11, 0xe9, 0xb7, 0x91, 0xce, 0x66,
-       0xeb, 0xb0, 0x7e, 0x46, 0xfe, 0x2f, 0x64, 0x9e, 0x54, 0xa1, 0xb7, 0x97,
-       0xb6, 0x91, 0x2e, 0x81, 0xf4, 0x61, 0x27, 0xce, 0x65, 0xf2, 0x70, 0x06,
-       0x06, 0xce, 0x95, 0x0f, 0x45, 0x4f, 0x43, 0xe6, 0x8b, 0x9b, 0xda, 0x5f,
-       0xc4, 0x5e, 0x06, 0xb2, 0xc3, 0x33, 0xe6, 0xc3, 0xdd, 0x3d, 0xdd, 0xef,
-       0xcb, 0xee, 0x20, 0x7f, 0x3d, 0xf8, 0xcd, 0xe7, 0xfa, 0x68, 0x52, 0xbf,
-       0x38, 0x63, 0x97, 0x77, 0x32, 0x79, 0x02, 0x38, 0xa1, 0xf7, 0x52, 0xda,
-       0xae, 0xf4, 0x5e, 0x45, 0x7d, 0x21, 0x34, 0x67, 0xd3, 0xfb, 0xf5, 0xfd,
-       0x44, 0xcf, 0xf5, 0x80, 0xfa, 0xa4, 0xbc, 0xaf, 0xef, 0xf4, 0x1c, 0xad,
-       0x45, 0xe9, 0xfe, 0x1d, 0x93, 0xb9, 0x69, 0x03, 0xcf, 0xcd, 0x92, 0xe9,
-       0xa7, 0xda, 0xb7, 0x83, 0xf3, 0xc5, 0xfe, 0xde, 0xd9, 0xbb, 0xb7, 0x39,
-       0x7b, 0x58, 0xde, 0x8b, 0x46, 0xde, 0x6f, 0xf5, 0xe2, 0x68, 0x3b, 0x83,
-       0xbe, 0x2b, 0x4e, 0x29, 0xbd, 0xc2, 0x2f, 0x73, 0xe1, 0x79, 0x9a, 0x77,
-       0x67, 0x84, 0x6f, 0x2e, 0x55, 0xaf, 0x83, 0xf8, 0x62, 0xa3, 0xae, 0x0b,
-       0xfb, 0xf8, 0xb2, 0x73, 0x4c, 0xfb, 0xb3, 0xb5, 0xc5, 0xf5, 0x71, 0x31,
-       0xd5, 0xaf, 0xe9, 0xf9, 0x3f, 0x22, 0xf5, 0xa0, 0xf8, 0xc8, 0x8f, 0x9d,
-       0xbd, 0xfe, 0xbe, 0x48, 0xd7, 0xd7, 0xa2, 0xd4, 0xb5, 0x3d, 0xb7, 0x49,
-       0x7d, 0xe4, 0x35, 0x7f, 0x35, 0xf2, 0x35, 0x1b, 0x61, 0x9d, 0xbc, 0x0e,
-       0x5d, 0xb1, 0xf3, 0x87, 0x8c, 0xbd, 0x81, 0xf4, 0xa1, 0x0b, 0x9f, 0x75,
-       0xb5, 0x5f, 0x7c, 0x5d, 0x8b, 0x18, 0x3f, 0x8d, 0xa4, 0x9f, 0x7a, 0xfe,
-       0xe1, 0xbb, 0x0b, 0xf2, 0x6e, 0x15, 0x3e, 0xe9, 0xed, 0x03, 0x9c, 0x6f,
-       0x1e, 0x34, 0x64, 0x7e, 0x2e, 0xc9, 0x1c, 0xfb, 0xa9, 0xc8, 0x73, 0xb2,
-       0xb9, 0x40, 0xf5, 0x0a, 0xe3, 0x32, 0xcf, 0x9a, 0x01, 0xd3, 0x13, 0x01,
-       0x7f, 0x07, 0x37, 0x3c, 0x9f, 0xf8, 0x26, 0x02, 0xc6, 0xf1, 0x12, 0xca,
-       0x85, 0xf0, 0xf3, 0x39, 0x62, 0x8f, 0xd6, 0x7d, 0xde, 0x73, 0xeb, 0x37,
-       0x64, 0x9e, 0x54, 0x74, 0xdc, 0xc4, 0xcf, 0xc7, 0xf1, 0x7c, 0x5c, 0xcd,
-       0x2d, 0xa6, 0xb9, 0x1e, 0xfc, 0x5e, 0xfd, 0x7f, 0x24, 0x59, 0xa9, 0x55,
-       0xd2, 0x71, 0xd6, 0xfd, 0xf6, 0xae, 0x11, 0x5f, 0x9d, 0x9f, 0x87, 0x12,
-       0x3d, 0xe7, 0xa7, 0xce, 0xa2, 0xbd, 0x15, 0x28, 0x7b, 0x5c, 0x3f, 0x8c,
-       0x4a, 0x8f, 0xed, 0xa1, 0xd8, 0xb1, 0x55, 0x99, 0x9b, 0xab, 0xcb, 0xa4,
-       0xe6, 0xdc, 0xaa, 0x3e, 0x9f, 0xa7, 0x86, 0x59, 0xdc, 0xba, 0x46, 0xe7,
-       0xe5, 0x6e, 0x8e, 0xcf, 0xbd, 0x05, 0x1d, 0xaf, 0x0a, 0xf9, 0xdf, 0xe6,
-       0x78, 0x3d, 0x77, 0x85, 0xf1, 0x22, 0x3c, 0x4d, 0x58, 0x6c, 0x4b, 0x9f,
-       0xaf, 0xfb, 0x05, 0x42, 0xa0, 0x78, 0xd9, 0x8f, 0xf1, 0x7e, 0x77, 0x64,
-       0x2f, 0x17, 0x52, 0xf9, 0x33, 0xf7, 0xe4, 0x41, 0x79, 0x3c, 0x62, 0xec,
-       0x0b, 0xbd, 0xd7, 0x2d, 0xe3, 0xfb, 0x36, 0x30, 0xea, 0xf1, 0xe5, 0x21,
-       0xf5, 0x08, 0x43, 0xea, 0xd9, 0x9c, 0x6f, 0x4b, 0xd2, 0xef, 0x79, 0x70,
-       0x72, 0xb4, 0x78, 0xfd, 0xfc, 0x0a, 0xe5, 0xd5, 0x5e, 0xe5, 0xef, 0x1a,
-       0xdf, 0x59, 0xb3, 0x28, 0x5e, 0xfe, 0x1a, 0xf3, 0xe5, 0xf9, 0x3c, 0xd4,
-       0xf8, 0xe6, 0x0a, 0xf7, 0x95, 0x0d, 0xff, 0x01, 0xd7, 0x0e, 0x41, 0x60,
-       0x88, 0x0d, 0x00, 0x00, 0x00 };
-
-static u8 bnx2_xi_rv2p_proc2[] = {
-       /* Date:        01/27/2009 19:01 */
-#define XI_RV2P_PROC2_MAX_BD_PAGE_LOC   5
-#define XI_RV2P_PROC2_BD_PAGE_SIZE_MSK 0xffff
-#define XI_RV2P_PROC2_BD_PAGE_SIZE     ((BCM_PAGE_SIZE / 16) - 1)
-       0xad, 0x57, 0x4d, 0x68, 0x5c, 0x55, 0x14, 0xbe, 0x33, 0x6f, 0x7e, 0xde,
-       0xcc, 0xbc, 0xc9, 0x4c, 0x93, 0x38, 0x99, 0x26, 0xc5, 0xa4, 0x09, 0x8d,
-       0x4e, 0x9d, 0x69, 0x27, 0x3f, 0x44, 0xb0, 0x42, 0x43, 0x90, 0xb4, 0xb5,
-       0x4a, 0xd3, 0x28, 0xc5, 0x5d, 0x92, 0xa9, 0x1d, 0x8c, 0x69, 0x23, 0x18,
-       0x70, 0xe1, 0xc6, 0x47, 0x5a, 0xd3, 0xcd, 0x2c, 0x4c, 0x31, 0x3f, 0x8a,
-       0xa0, 0xd8, 0x9d, 0xb8, 0x19, 0x50, 0xdb, 0x8a, 0x22, 0x14, 0x0c, 0x52,
-       0x17, 0x45, 0xb0, 0x58, 0x37, 0x8a, 0x58, 0x1b, 0x1a, 0x11, 0x8d, 0x8b,
-       0xae, 0x24, 0xe3, 0xbd, 0xe7, 0x3b, 0xf7, 0xcd, 0xbc, 0xc9, 0x8b, 0x89,
-       0x62, 0x36, 0x27, 0xe7, 0xbe, 0x73, 0xcf, 0x39, 0xf7, 0x9c, 0xef, 0x7c,
-       0xf7, 0x4e, 0x52, 0x08, 0x11, 0x10, 0x76, 0xb9, 0x5d, 0x4a, 0xe1, 0x33,
-       0x0c, 0x53, 0x8a, 0x8a, 0x10, 0xc1, 0xb4, 0xd2, 0x85, 0x5f, 0xf0, 0xdf,
-       0xfe, 0x24, 0x89, 0x6f, 0xcb, 0x96, 0x32, 0x13, 0x76, 0x46, 0xd9, 0x45,
-       0xc4, 0xb3, 0xfe, 0x88, 0x94, 0x87, 0xc5, 0x68, 0x06, 0xf6, 0x01, 0xa1,
-       0xa4, 0xb4, 0xb5, 0x95, 0xdc, 0xc5, 0xf2, 0x38, 0xcb, 0xc7, 0x7d, 0x90,
-       0x87, 0x58, 0x3e, 0x56, 0x27, 0x05, 0xdb, 0x3d, 0xcd, 0xfa, 0x00, 0x4b,
-       0x8b, 0xd7, 0x47, 0x59, 0xff, 0x90, 0xa5, 0xcd, 0xeb, 0x61, 0xd6, 0x1f,
-       0xf0, 0xa9, 0x25, 0xe4, 0xab, 0xf4, 0xb5, 0x4a, 0x55, 0xb7, 0xe0, 0x3e,
-       0x83, 0x73, 0x3c, 0xd3, 0xa1, 0xbe, 0xdf, 0xad, 0xb8, 0xed, 0xef, 0x38,
-       0xfa, 0xac, 0xa1, 0xf4, 0x1f, 0xa5, 0xee, 0x53, 0x6a, 0x73, 0x0a, 0xdb,
-       0x9b, 0xd3, 0x25, 0xb5, 0xdf, 0x10, 0xcb, 0xf3, 0x26, 0x55, 0x67, 0xd1,
-       0x82, 0x6e, 0x97, 0x4d, 0xaa, 0xcb, 0xa2, 0xc5, 0xfe, 0x58, 0xee, 0x8e,
-       0x23, 0xde, 0xa9, 0x0e, 0xd4, 0xed, 0xbb, 0x47, 0x60, 0x67, 0x27, 0x74,
-       0x61, 0xf1, 0xbd, 0x5d, 0xf0, 0xf7, 0x29, 0xa5, 0xaf, 0xfb, 0x9a, 0x7c,
-       0xa8, 0x47, 0x98, 0xad, 0xfc, 0x41, 0xb5, 0xbe, 0xb7, 0x7f, 0x71, 0x1e,
-       0xf6, 0x63, 0x1d, 0x58, 0x7f, 0x30, 0xab, 0xfc, 0x85, 0x84, 0xcd, 0x52,
-       0xe4, 0x28, 0x2f, 0x9f, 0x9d, 0x73, 0xfb, 0xff, 0x61, 0x1e, 0xda, 0x44,
-       0x1c, 0x7e, 0xa3, 0x2e, 0xbf, 0xa9, 0x4d, 0x7e, 0x6f, 0x47, 0x6a, 0xfd,
-       0x37, 0xf8, 0xe0, 0x3f, 0xba, 0xad, 0xff, 0x42, 0x1c, 0xb2, 0x29, 0xeb,
-       0x15, 0x27, 0xb2, 0x4d, 0xfe, 0x2f, 0x6e, 0xeb, 0xff, 0x55, 0x27, 0x7f,
-       0xbd, 0x5e, 0x5f, 0x3f, 0x52, 0x3f, 0xb0, 0x0f, 0xf2, 0xf6, 0xfd, 0xfa,
-       0xdc, 0x9c, 0x9f, 0x01, 0x39, 0x98, 0x25, 0x51, 0x3a, 0xcd, 0x00, 0x1f,
-       0xee, 0x56, 0x71, 0x1b, 0x45, 0xc0, 0xaf, 0xfc, 0x1d, 0x30, 0x43, 0xd7,
-       0xb0, 0xfe, 0x1c, 0xf7, 0xe9, 0x79, 0x3e, 0xc8, 0x2f, 0x51, 0x55, 0x98,
-       0x4a, 0xa5, 0x18, 0x63, 0xff, 0xdc, 0x67, 0x3b, 0x86, 0xfd, 0x2b, 0x96,
-       0xca, 0xef, 0x86, 0xc4, 0x8d, 0x57, 0xdf, 0x8d, 0x7f, 0xe8, 0x3b, 0xf6,
-       0xef, 0x7a, 0x08, 0x5f, 0xdf, 0x28, 0x42, 0x6f, 0xbb, 0x9c, 0xa4, 0xfa,
-       0x2c, 0x97, 0xbd, 0x70, 0x52, 0xef, 0x5f, 0xce, 0x71, 0x02, 0x71, 0x44,
-       0xa7, 0x49, 0xc9, 0xa1, 0xae, 0xd2, 0x26, 0xe7, 0x59, 0x27, 0xb1, 0xb8,
-       0x4f, 0xcf, 0x05, 0xf4, 0x62, 0x88, 0x44, 0x7a, 0x62, 0x4e, 0x9d, 0x33,
-       0x21, 0xc6, 0xfd, 0x2a, 0x61, 0x3f, 0xd7, 0xc5, 0x30, 0xad, 0x4f, 0x60,
-       0xff, 0x45, 0xbb, 0x45, 0x67, 0x28, 0xf6, 0x61, 0x5f, 0x73, 0x2f, 0xe4,
-       0x42, 0x6f, 0x50, 0x89, 0x6c, 0x71, 0x86, 0xd4, 0x03, 0x3f, 0xf7, 0x98,
-       0x64, 0x67, 0xe7, 0xf4, 0xdc, 0xe9, 0xbe, 0xa9, 0x3a, 0xbd, 0x52, 0x9d,
-       0xbf, 0x2e, 0xd4, 0xf5, 0xee, 0x3e, 0x65, 0x2f, 0x8b, 0xdb, 0x89, 0x38,
-       0xa3, 0x93, 0x5e, 0x73, 0xfb, 0x92, 0x53, 0xdf, 0x9d, 0xf6, 0x7f, 0x90,
-       0xea, 0x30, 0xc8, 0xf5, 0xe8, 0x60, 0x9c, 0xed, 0xf1, 0xc0, 0x59, 0x82,
-       0xfe, 0x5f, 0x1b, 0x4a, 0x52, 0x3d, 0x4f, 0x60, 0xfd, 0xd2, 0xf0, 0x15,
-       0xf4, 0xe3, 0x18, 0xd5, 0x41, 0x44, 0x2f, 0x7c, 0x8c, 0x5d, 0x13, 0x34,
-       0xdf, 0xe7, 0xfa, 0x8b, 0x9f, 0x42, 0x2f, 0x18, 0x4a, 0x9f, 0xb2, 0x4e,
-       0x5f, 0x85, 0x7d, 0xf0, 0x7c, 0x92, 0xea, 0x77, 0x82, 0xa3, 0x1c, 0x33,
-       0x88, 0x4f, 0x4a, 0xa1, 0xf3, 0xa4, 0x5a, 0x2b, 0xf4, 0x3d, 0x29, 0x2e,
-       0x96, 0xf1, 0x7d, 0x3a, 0xa6, 0xce, 0x37, 0xe2, 0xf0, 0xce, 0x64, 0x08,
-       0xfb, 0x4b, 0xf3, 0xe0, 0x8d, 0x7b, 0x1f, 0x29, 0x7d, 0x2c, 0x7b, 0x0f,
-       0xf6, 0xd9, 0xc9, 0x39, 0x76, 0xec, 0x47, 0xfd, 0xd6, 0xfc, 0xb0, 0x67,
-       0x58, 0x46, 0x03, 0xd4, 0x3f, 0x9f, 0xb0, 0x86, 0x21, 0x5f, 0xa7, 0xef,
-       0x7f, 0xf9, 0x4a, 0x54, 0xb7, 0x53, 0x0d, 0x81, 0x2b, 0xba, 0x3e, 0x2c,
-       0x13, 0xfa, 0x5c, 0x90, 0x3b, 0xc5, 0xfd, 0x9c, 0xb5, 0x15, 0xde, 0xb9,
-       0x8f, 0x99, 0xed, 0xf0, 0x0e, 0x39, 0xdc, 0x0d, 0x19, 0xea, 0x22, 0xbe,
-       0xf8, 0x17, 0xb8, 0xe7, 0xbc, 0x36, 0xcd, 0x15, 0x56, 0xab, 0xf8, 0x24,
-       0x21, 0x71, 0xe9, 0xc2, 0xa9, 0x9c, 0x03, 0xe2, 0x57, 0xd9, 0x07, 0x8d,
-       0x37, 0xe5, 0x30, 0x2c, 0xa6, 0xd8, 0xef, 0x24, 0xd7, 0xe3, 0x2c, 0xd7,
-       0xe3, 0x37, 0x96, 0xd3, 0x31, 0x5d, 0x07, 0xc8, 0x8b, 0x34, 0xff, 0x69,
-       0x8f, 0x7b, 0x43, 0xdf, 0x0f, 0xe8, 0xcf, 0x32, 0xf7, 0xf3, 0x2d, 0xe7,
-       0x9e, 0xd0, 0x75, 0xdd, 0xea, 0xbe, 0xd0, 0xf8, 0xc7, 0xfa, 0xe8, 0xa4,
-       0xe7, 0x39, 0x4b, 0x5f, 0x76, 0xc2, 0x4d, 0x63, 0x17, 0xa4, 0x53, 0xdf,
-       0x6e, 0x9a, 0xdf, 0x86, 0x96, 0xab, 0xfa, 0x7c, 0x2a, 0xcf, 0x5f, 0xf5,
-       0xfc, 0x35, 0x2c, 0xcd, 0x92, 0x8c, 0x36, 0x5e, 0x56, 0xf1, 0x5a, 0x3d,
-       0xf8, 0xc3, 0x3d, 0xc7, 0xf5, 0xf5, 0x9d, 0x8e, 0x13, 0xb1, 0xf6, 0xdf,
-       0x5c, 0x75, 0xcf, 0x2b, 0xe6, 0x33, 0xec, 0xe0, 0xbb, 0x79, 0x80, 0xfb,
-       0xc0, 0x32, 0xf5, 0xa8, 0xf2, 0x3b, 0xc2, 0x71, 0xf2, 0x1c, 0xc7, 0xaa,
-       0xe1, 0x0b, 0x95, 0xe7, 0xfa, 0x86, 0xe6, 0x09, 0x8d, 0x8f, 0x2a, 0x5f,
-       0xe8, 0x3e, 0x50, 0xfc, 0xec, 0xcd, 0x55, 0xb5, 0xbf, 0x6d, 0x1b, 0xfe,
-       0x58, 0x75, 0xfc, 0xdd, 0x72, 0x78, 0x22, 0x49, 0x71, 0x0f, 0xb3, 0xea,
-       0xe6, 0xc1, 0x3f, 0x24, 0x0f, 0xaa, 0xef, 0xa6, 0x69, 0x39, 0xf3, 0xc2,
-       0xfc, 0x37, 0xa3, 0xe2, 0xa5, 0x39, 0xff, 0xb4, 0xbe, 0xbf, 0x64, 0xfe,
-       0xcc, 0x93, 0x63, 0xb5, 0x7c, 0x77, 0xdb, 0x23, 0xee, 0x7f, 0xf5, 0xc7,
-       0xf3, 0x95, 0x65, 0xbe, 0xcf, 0x51, 0x9e, 0x95, 0xf1, 0x3c, 0xe3, 0x25,
-       0x57, 0xdf, 0x07, 0xf4, 0x15, 0xf6, 0xb2, 0xbf, 0x9a, 0xf7, 0xfa, 0xb4,
-       0x7f, 0xa8, 0x76, 0x4f, 0xad, 0x7d, 0x7d, 0xff, 0x03, 0x5b, 0xf0, 0xf8,
-       0xe7, 0x1b, 0x78, 0x7f, 0x7d, 0xb6, 0x51, 0x7d, 0x4f, 0x79, 0xe2, 0xc4,
-       0x16, 0x74, 0x3f, 0x85, 0x25, 0x9e, 0xe9, 0xbd, 0x26, 0xb4, 0xbd, 0x3f,
-       0x88, 0xf7, 0xa4, 0x60, 0xfc, 0x9e, 0x7b, 0x98, 0xfd, 0x64, 0xc0, 0xc7,
-       0x2f, 0x9c, 0xa1, 0xfe, 0xbe, 0x79, 0xf6, 0x3e, 0xf1, 0xf2, 0x7b, 0x2f,
-       0x5f, 0x53, 0x7e, 0x77, 0x8b, 0xd5, 0x19, 0x8b, 0xf2, 0x1a, 0xda, 0x0b,
-       0xf3, 0xfb, 0x87, 0xea, 0xfb, 0xad, 0xfc, 0x9a, 0x8c, 0x07, 0x69, 0x37,
-       0xe1, 0x7e, 0x97, 0x6c, 0xce, 0x13, 0x73, 0x7f, 0x24, 0x81, 0x7d, 0x9a,
-       0xbf, 0xdc, 0xf8, 0x79, 0x77, 0xa3, 0x7a, 0xff, 0xc0, 0xcd, 0xad, 0x83,
-       0xde, 0x73, 0x71, 0xb2, 0xaf, 0x36, 0x4e, 0x46, 0xac, 0x94, 0xe1, 0x7f,
-       0x84, 0x79, 0x65, 0x9c, 0x13, 0xf9, 0x29, 0x9a, 0xa0, 0x78, 0x85, 0xe3,
-       0x84, 0x6b, 0x91, 0x8a, 0xe1, 0xdc, 0x85, 0xa7, 0xf0, 0xbd, 0x10, 0xc7,
-       0x7a, 0x6b, 0x1c, 0xef, 0xcd, 0x91, 0xb0, 0x45, 0xf6, 0xad, 0x71, 0xc8,
-       0x14, 0xf3, 0xcf, 0x8a, 0xc3, 0xcb, 0x90, 0xcb, 0xa1, 0xad, 0x78, 0x19,
-       0xf7, 0xdb, 0xf5, 0x90, 0x5a, 0x97, 0x8f, 0xa0, 0x0c, 0x78, 0x69, 0xa8,
-       0xdb, 0xa2, 0xef, 0xa3, 0x19, 0xe0, 0x48, 0x74, 0x7a, 0x9f, 0xab, 0x0d,
-       0xfc, 0xd2, 0x5a, 0xe5, 0xef, 0x5a, 0x9e, 0xb7, 0x7a, 0x97, 0x1c, 0x1e,
-       0x75, 0xe7, 0x01, 0xfe, 0x52, 0xfe, 0x49, 0x95, 0x7c, 0xb5, 0x13, 0x7e,
-       0x37, 0x18, 0x2f, 0xbf, 0xf3, 0xbd, 0xdf, 0x24, 0xbe, 0x2a, 0xa3, 0x0e,
-       0x2b, 0xe5, 0xfa, 0xfe, 0xe8, 0x3c, 0x74, 0x1c, 0x9c, 0x4b, 0x9f, 0xb3,
-       0x1a, 0x17, 0x79, 0x9d, 0xe1, 0xfc, 0xef, 0xd0, 0xfb, 0x2f, 0xc5, 0xe7,
-       0x55, 0x7e, 0xb1, 0x7e, 0x94, 0xee, 0xa1, 0xa0, 0x7c, 0xdf, 0x6b, 0xdd,
-       0x7d, 0x3f, 0x8c, 0x50, 0x5e, 0x8d, 0x72, 0x41, 0xef, 0x77, 0x9f, 0xbb,
-       0x39, 0x0f, 0xb9, 0x90, 0xd7, 0x7d, 0xd3, 0xfd, 0xd5, 0xfd, 0x44, 0xdf,
-       0x53, 0x3d, 0x64, 0xd6, 0x5f, 0xe8, 0x21, 0x9c, 0xe7, 0x0b, 0xeb, 0xee,
-       0x77, 0xf2, 0xc9, 0xac, 0xb2, 0x7f, 0x4d, 0x7c, 0x43, 0xf3, 0x28, 0xc4,
-       0xf7, 0x2c, 0xab, 0x7c, 0x29, 0xf8, 0xaf, 0x96, 0x77, 0x0d, 0x71, 0x3d,
-       0xc8, 0xcb, 0x7d, 0x7a, 0xee, 0xdc, 0xf3, 0x5b, 0xad, 0xbb, 0x3a, 0xc7,
-       0x13, 0x1e, 0xfc, 0xa4, 0xcf, 0xa9, 0xec, 0xf3, 0x8c, 0x5f, 0x53, 0x0c,
-       0x1d, 0xc1, 0xfb, 0xb0, 0x21, 0x8c, 0x39, 0x69, 0x08, 0x7b, 0xdd, 0xef,
-       0x12, 0x3f, 0x11, 0xfa, 0x05, 0xb3, 0xa7, 0x31, 0x42, 0xe7, 0xba, 0x74,
-       0xe3, 0x6b, 0x32, 0x7b, 0x7f, 0x29, 0x86, 0xf5, 0x96, 0x21, 0x84, 0x09,
-       0x10, 0xde, 0x0d, 0x71, 0x01, 0xf3, 0xf0, 0xce, 0x02, 0xe4, 0xdb, 0xe2,
-       0x49, 0xf8, 0x69, 0x9c, 0xa5, 0xfb, 0xd4, 0x6c, 0x41, 0x79, 0x4b, 0x4b,
-       0x8c, 0xf3, 0xb4, 0x9f, 0x7e, 0xaf, 0x56, 0x44, 0x9c, 0x7f, 0x47, 0xf0,
-       0xbc, 0x02, 0xcf, 0x81, 0x9a, 0xbe, 0xef, 0x14, 0xdf, 0x4a, 0x8f, 0x4b,
-       0xfc, 0xc2, 0x0d, 0xe3, 0xdc, 0xac, 0xc7, 0xb9, 0xee, 0x6f, 0xda, 0xef,
-       0x89, 0xeb, 0x81, 0xcd, 0xb8, 0xd6, 0xf9, 0xa9, 0x3a, 0xff, 0xe9, 0xbc,
-       0x7b, 0x37, 0xfb, 0x57, 0xfb, 0x62, 0x12, 0xdf, 0xff, 0x17, 0xae, 0x21,
-       0x8f, 0x76, 0xa9, 0xf8, 0x2d, 0x35, 0xf8, 0xf4, 0x9e, 0x3b, 0xf0, 0x9b,
-       0x21, 0x79, 0xfc, 0x6f, 0x6a, 0x8c, 0x09, 0xd0, 0x18, 0x10, 0x00, 0x00,
-       0x00 };
-
-static u8 bnx2_TPAT_b09FwText[] = {
-       0xbd, 0x58, 0x5d, 0x6c, 0x1c, 0x57, 0x15, 0x3e, 0x73, 0xe7, 0xee, 0xee,
-       0x78, 0xb1, 0xe3, 0x71, 0x3b, 0xa4, 0xdb, 0x62, 0xc8, 0x8c, 0x7d, 0xfd,
-       0x03, 0xb6, 0xc2, 0x94, 0x6e, 0xdb, 0xad, 0x18, 0x45, 0xc3, 0xec, 0xda,
-       0xb1, 0xa2, 0x3c, 0xb8, 0x52, 0xa4, 0x46, 0x6a, 0x04, 0x66, 0x1d, 0x93,
-       0x3e, 0xa6, 0x88, 0x07, 0xa4, 0x3e, 0x64, 0x59, 0x3b, 0xa9, 0x1f, 0x96,
-       0x2c, 0xb8, 0xc8, 0x7e, 0x41, 0x28, 0x72, 0x6a, 0xbb, 0x48, 0x8b, 0x37,
-       0x11, 0x48, 0x3c, 0x45, 0x8d, 0x1c, 0x14, 0x55, 0xea, 0x0b, 0x0f, 0xfc,
-       0x3d, 0x46, 0x6a, 0x45, 0xfb, 0x50, 0x90, 0x55, 0xa9, 0xa8, 0x82, 0xe0,
-       0xcb, 0x77, 0x66, 0x67, 0x9c, 0x4d, 0xec, 0x08, 0x9e, 0xb0, 0xb4, 0xba,
-       0x33, 0x73, 0xef, 0x39, 0xf7, 0xdc, 0x73, 0xbe, 0xef, 0x9c, 0x73, 0x3d,
-       0x64, 0x50, 0x9e, 0x92, 0xbf, 0x3e, 0xfc, 0x8a, 0xdf, 0xbd, 0xf8, 0x83,
-       0x67, 0x8f, 0xbf, 0x70, 0x1c, 0x8f, 0xcf, 0x1b, 0xfd, 0x59, 0x49, 0xff,
-       0xc7, 0x3f, 0x93, 0xc8, 0x4e, 0xed, 0xe0, 0x1f, 0x59, 0x22, 0xb8, 0xfd,
-       0x54, 0xa4, 0xc8, 0x32, 0x83, 0xdf, 0x7c, 0x6d, 0x5e, 0x11, 0x85, 0xad,
-       0x09, 0xb7, 0x4c, 0xff, 0xd6, 0x35, 0x47, 0x12, 0x7f, 0xff, 0x72, 0x70,
-       0xff, 0xeb, 0xb7, 0x5e, 0xf4, 0x76, 0xaf, 0x99, 0x64, 0xd9, 0xc1, 0xb2,
-       0xb4, 0x47, 0xc9, 0x1a, 0x84, 0xcc, 0xcf, 0xc7, 0xbe, 0x2d, 0xe8, 0x48,
-       0xaa, 0xab, 0xa6, 0x85, 0xba, 0xa7, 0x6f, 0x8d, 0x29, 0xbb, 0x8e, 0x0d,
-       0x6e, 0xb4, 0x5d, 0x8a, 0xda, 0x05, 0x7a, 0xb7, 0xed, 0xd0, 0xcd, 0xb6,
-       0xa4, 0x85, 0xb7, 0x2e, 0xd1, 0x92, 0xef, 0x15, 0x2a, 0xa6, 0x45, 0x22,
-       0xf0, 0x0a, 0x55, 0x72, 0x69, 0xc3, 0xf7, 0x6a, 0x73, 0xe6, 0x80, 0x61,
-       0x05, 0x16, 0xbd, 0x31, 0x26, 0xe8, 0x9a, 0x73, 0x8e, 0xbe, 0xa7, 0xce,
-       0xe2, 0x27, 0x49, 0xac, 0x48, 0xa3, 0xbc, 0x26, 0x49, 0xae, 0xf4, 0xd3,
-       0x49, 0x5f, 0xeb, 0x79, 0x3f, 0x84, 0xfc, 0xf0, 0xf8, 0x05, 0xea, 0xa1,
-       0x9a, 0xed, 0xcd, 0x10, 0x65, 0x78, 0x0d, 0x45, 0x7e, 0x86, 0x42, 0xbb,
-       0x73, 0xae, 0x6b, 0xf1, 0x78, 0x5f, 0x6f, 0x40, 0xbe, 0x47, 0xa5, 0xf3,
-       0x4f, 0x24, 0xf3, 0x76, 0x32, 0x2f, 0x48, 0xac, 0x7a, 0xee, 0x16, 0x8d,
-       0x84, 0xd2, 0xd8, 0xd3, 0x91, 0x3a, 0x6a, 0x47, 0x5b, 0x92, 0xcc, 0x15,
-       0xb6, 0x5f, 0xd9, 0x65, 0xd2, 0x90, 0x31, 0x59, 0x46, 0x8a, 0xe0, 0xfb,
-       0x88, 0xdb, 0x48, 0x28, 0x0c, 0xa2, 0x9d, 0x46, 0xc1, 0x8e, 0xda, 0x3f,
-       0x34, 0xa2, 0xe6, 0x9e, 0x0e, 0x65, 0x9e, 0x84, 0x0a, 0x8d, 0x68, 0x8b,
-       0x75, 0xf5, 0x90, 0x54, 0x39, 0xc8, 0x0c, 0xdb, 0x82, 0x78, 0x8c, 0x92,
-       0xef, 0xac, 0xbb, 0x82, 0xe7, 0x69, 0x23, 0xdc, 0x92, 0x46, 0xb4, 0x36,
-       0x83, 0x67, 0x0b, 0xf2, 0xf0, 0x8b, 0x6f, 0x50, 0x38, 0x6b, 0x40, 0x8e,
-       0xcf, 0x69, 0xe3, 0x5d, 0x50, 0xe8, 0xd8, 0xb4, 0x58, 0xf4, 0x0a, 0x35,
-       0x3a, 0x65, 0x94, 0xb7, 0x0e, 0x04, 0xcd, 0x9e, 0x69, 0x1f, 0xfc, 0xc6,
-       0xb6, 0x7c, 0x4b, 0x6a, 0x2d, 0x9e, 0xcd, 0x25, 0x67, 0x64, 0x7d, 0x61,
-       0xc7, 0x7e, 0x87, 0xdf, 0x61, 0x73, 0x13, 0xb6, 0xb7, 0xb2, 0xb0, 0x47,
-       0x6b, 0xde, 0x27, 0x52, 0x65, 0xd8, 0x19, 0xe2, 0xe7, 0x2d, 0x57, 0x01,
-       0x85, 0xa1, 0xd5, 0x3e, 0x72, 0x07, 0xb4, 0xae, 0xf8, 0x9e, 0xbd, 0x45,
-       0x01, 0x2d, 0x36, 0x07, 0xed, 0xa9, 0x66, 0x1d, 0xf3, 0x35, 0x5e, 0x03,
-       0x7f, 0x10, 0x4d, 0xb5, 0xb4, 0xde, 0xf4, 0x7f, 0x9b, 0xa1, 0x23, 0x62,
-       0x32, 0x43, 0x9e, 0x1b, 0xe2, 0xdb, 0xd0, 0xe6, 0xa3, 0x3e, 0x3b, 0x96,
-       0xd8, 0xc0, 0x7e, 0xc7, 0x3e, 0xfe, 0x97, 0x92, 0xf7, 0x5e, 0x3b, 0x5a,
-       0x4b, 0xfd, 0x1c, 0xdb, 0x0d, 0xbf, 0xfa, 0x14, 0x15, 0x61, 0xff, 0x63,
-       0xcf, 0x94, 0xca, 0xb1, 0x2d, 0x6c, 0x37, 0xd6, 0xab, 0x07, 0x36, 0xbd,
-       0x7a, 0xc0, 0x26, 0xb6, 0x47, 0x90, 0x5c, 0xb5, 0x68, 0x49, 0x7d, 0x64,
-       0xd0, 0x11, 0xad, 0x97, 0x7c, 0x69, 0x54, 0xd6, 0x3e, 0x4b, 0x9e, 0x81,
-       0xc3, 0x26, 0x70, 0xd8, 0x04, 0x2e, 0x9b, 0x64, 0x8b, 0xc0, 0xa5, 0x5b,
-       0x63, 0x16, 0xdd, 0x33, 0x11, 0xcf, 0x36, 0xcf, 0xe7, 0xa8, 0xee, 0x2b,
-       0xba, 0xdc, 0x64, 0xcf, 0xe4, 0x68, 0x51, 0x7d, 0xae, 0xcf, 0xc3, 0x1f,
-       0x6f, 0x93, 0x3e, 0x16, 0x01, 0xb3, 0x11, 0xdc, 0xf9, 0x86, 0x1a, 0xa7,
-       0xcb, 0x6d, 0x45, 0xf5, 0x36, 0xcb, 0x2d, 0x51, 0x47, 0xae, 0x1f, 0x72,
-       0x93, 0x90, 0x2b, 0xd2, 0x95, 0x58, 0xb6, 0x1f, 0xb2, 0xbb, 0x89, 0xec,
-       0x44, 0x61, 0x9a, 0x7c, 0xc8, 0x0c, 0xbb, 0xd3, 0xc0, 0xdc, 0x9c, 0x33,
-       0x09, 0xd9, 0x49, 0x5a, 0xc2, 0xaf, 0xde, 0xa4, 0x9a, 0x2c, 0xb2, 0x5e,
-       0xaf, 0x70, 0x9e, 0x7d, 0x1e, 0xeb, 0xac, 0x41, 0xa7, 0x83, 0x39, 0x0b,
-       0x7a, 0x24, 0xc6, 0x0f, 0x75, 0xbd, 0x09, 0x6c, 0x3b, 0xfc, 0xfc, 0xae,
-       0x16, 0x01, 0xfc, 0x50, 0x54, 0x6e, 0x9d, 0xf8, 0x3d, 0x4b, 0x65, 0xc4,
-       0x52, 0xa8, 0x7e, 0xaa, 0xda, 0x86, 0x21, 0x02, 0x93, 0xaa, 0xf0, 0x42,
-       0x38, 0x2b, 0xe3, 0x6f, 0x73, 0xb6, 0x01, 0x8e, 0x1d, 0x17, 0x9d, 0x9c,
-       0x93, 0xc1, 0x1a, 0xc4, 0x5f, 0xf5, 0x52, 0xd5, 0x19, 0xc0, 0x5a, 0x10,
-       0x2d, 0x3f, 0x02, 0x8e, 0x0e, 0x60, 0x0d, 0x8f, 0x1c, 0x07, 0xac, 0x57,
-       0xbc, 0xbe, 0x17, 0x36, 0xa6, 0xdf, 0x7a, 0xa9, 0xf6, 0x50, 0x7c, 0xd8,
-       0xc6, 0x38, 0x2e, 0xd8, 0x5f, 0x26, 0xb1, 0xed, 0x8e, 0x57, 0x3a, 0x6f,
-       0x63, 0x7e, 0xe7, 0xab, 0x82, 0x76, 0xf5, 0x75, 0x15, 0x15, 0xf0, 0xe9,
-       0xf3, 0x8a, 0x0a, 0x07, 0xcc, 0x18, 0x4b, 0x29, 0xa6, 0x78, 0xe4, 0x7c,
-       0x43, 0x85, 0x79, 0x65, 0x98, 0x4b, 0x93, 0x4f, 0x52, 0xcd, 0xf1, 0xfc,
-       0x32, 0x15, 0x68, 0xa9, 0x39, 0x01, 0xdf, 0xf5, 0xe3, 0xdc, 0x9e, 0x4f,
-       0x34, 0x8c, 0xe7, 0xf0, 0x69, 0xc8, 0x20, 0x5f, 0xd4, 0xa0, 0x8b, 0xc7,
-       0x41, 0xe8, 0xf7, 0x60, 0x23, 0xfc, 0xa1, 0x26, 0xec, 0x29, 0xf8, 0x23,
-       0x74, 0x78, 0x8e, 0xf3, 0x98, 0xf3, 0x4c, 0xa4, 0x3c, 0xbf, 0x1a, 0xdb,
-       0xe2, 0xd9, 0xb7, 0x89, 0xf3, 0x51, 0x9a, 0x83, 0x38, 0x27, 0x59, 0x73,
-       0x32, 0xa0, 0xd9, 0x7a, 0xe3, 0x92, 0x36, 0x15, 0xcd, 0x65, 0x03, 0xc6,
-       0x6e, 0x6f, 0x09, 0x58, 0x9c, 0xad, 0xb7, 0x06, 0x4f, 0xef, 0x34, 0xa8,
-       0xf6, 0x4c, 0x20, 0x8e, 0x0a, 0xec, 0x1f, 0xf9, 0xcc, 0x29, 0xec, 0xd5,
-       0x1e, 0x3c, 0x7d, 0xa7, 0x71, 0x0c, 0xbe, 0xa2, 0xfb, 0xf0, 0x3f, 0xf6,
-       0xdf, 0x79, 0xda, 0x84, 0x9d, 0x1c, 0x33, 0x70, 0x2b, 0x7c, 0x75, 0xcc,
-       0x00, 0x96, 0xf1, 0x0c, 0x6c, 0xd4, 0xda, 0x83, 0x73, 0x22, 0xa8, 0x51,
-       0xd8, 0x5e, 0xc2, 0xcf, 0xa2, 0xa9, 0x86, 0x65, 0xdd, 0x81, 0x4e, 0x51,
-       0xf4, 0xdc, 0xc8, 0xdc, 0x65, 0xae, 0xf0, 0x39, 0x58, 0x97, 0x65, 0x04,
-       0xae, 0x1c, 0x6a, 0xf5, 0xbc, 0x22, 0x82, 0x00, 0x98, 0x90, 0x88, 0x4d,
-       0x11, 0x58, 0xe1, 0x38, 0x5c, 0x45, 0x1c, 0x80, 0x03, 0xd8, 0x0c, 0xff,
-       0xd7, 0x44, 0x70, 0x91, 0x2a, 0x45, 0xa2, 0xc5, 0x06, 0x61, 0x3f, 0xec,
-       0x55, 0xc2, 0x0f, 0x78, 0x0e, 0xed, 0x12, 0x6c, 0xf0, 0xc2, 0x1a, 0x79,
-       0xfe, 0x1c, 0xbc, 0x9e, 0xfb, 0x31, 0x59, 0x99, 0xe0, 0x9c, 0xdc, 0x68,
-       0x90, 0x25, 0x83, 0xb3, 0x72, 0xa9, 0x31, 0xec, 0xff, 0x15, 0xbe, 0x26,
-       0xf2, 0xc6, 0x37, 0x69, 0xc2, 0xdf, 0x04, 0x6f, 0xeb, 0xf8, 0x5d, 0x21,
-       0xde, 0xfb, 0x9c, 0x1c, 0x69, 0xf1, 0x78, 0x56, 0xaa, 0x56, 0xb7, 0xde,
-       0xbf, 0x69, 0xf6, 0xfb, 0x3d, 0x2a, 0xd1, 0x9b, 0xc9, 0xde, 0xf0, 0x0d,
-       0x9d, 0x6c, 0x94, 0x80, 0xef, 0x03, 0xfa, 0x4b, 0xa9, 0xfe, 0xad, 0x58,
-       0x37, 0x63, 0x77, 0xc2, 0xdf, 0x3a, 0x74, 0x8f, 0xa3, 0x69, 0x7e, 0x42,
-       0x1e, 0xec, 0xe4, 0xeb, 0xc5, 0x66, 0x0e, 0x9c, 0xd0, 0xba, 0xaa, 0x7e,
-       0x8f, 0xf3, 0xe6, 0x81, 0x5f, 0x1b, 0x3f, 0xc4, 0x72, 0x96, 0xe7, 0x0c,
-       0xaa, 0xa2, 0x0e, 0xd5, 0xdb, 0xfc, 0xcc, 0x73, 0x9c, 0xcf, 0x72, 0x18,
-       0xff, 0x8c, 0xb5, 0x1f, 0xea, 0x5a, 0x9b, 0xb9, 0xc6, 0xbe, 0x02, 0x47,
-       0xda, 0x96, 0x51, 0x6e, 0x92, 0x51, 0x69, 0x92, 0x5b, 0xf5, 0x65, 0x1c,
-       0x97, 0xd0, 0xb6, 0xe1, 0x53, 0xc6, 0xc3, 0xa4, 0x8c, 0x1a, 0x46, 0x5c,
-       0xc3, 0x0c, 0x3c, 0x0f, 0xb5, 0x7e, 0x9d, 0x01, 0x27, 0x42, 0xf8, 0x5f,
-       0x2c, 0x20, 0x47, 0x5e, 0x73, 0xa8, 0x5f, 0xa8, 0x39, 0x51, 0x77, 0xa8,
-       0x4f, 0x28, 0xb6, 0xed, 0x3d, 0x01, 0xdb, 0x78, 0x3e, 0xac, 0xfa, 0xbf,
-       0xc2, 0x9e, 0x41, 0xcc, 0xc7, 0x4a, 0x23, 0xcd, 0xfb, 0xd0, 0xa9, 0x38,
-       0x67, 0x58, 0x49, 0xfe, 0x8f, 0x92, 0xdc, 0x2e, 0x81, 0x5b, 0xad, 0x5f,
-       0x46, 0x5e, 0xaf, 0xc7, 0xb8, 0xf1, 0x6a, 0xae, 0xd8, 0xd3, 0xc3, 0xa3,
-       0xcc, 0x51, 0xad, 0x2f, 0xfa, 0xd3, 0x58, 0x2b, 0x4d, 0xca, 0xcf, 0x20,
-       0xb7, 0x73, 0x3d, 0x60, 0xdb, 0x02, 0xd8, 0xd6, 0xd7, 0xc9, 0xfb, 0xa8,
-       0x09, 0xf5, 0xb8, 0x06, 0xf4, 0x90, 0xa9, 0x0c, 0xfc, 0x3c, 0x77, 0x8e,
-       0xf8, 0x3b, 0xf5, 0x08, 0xbc, 0x57, 0xc1, 0xeb, 0xa5, 0xe2, 0x29, 0xa3,
-       0xb2, 0x75, 0xcc, 0x4c, 0xfa, 0x08, 0xd8, 0x0d, 0x5e, 0x3b, 0x2c, 0x97,
-       0x85, 0x5c, 0x1f, 0x64, 0xbe, 0x82, 0xb9, 0x0c, 0xc6, 0x6e, 0x3d, 0x71,
-       0x2d, 0xc1, 0x5e, 0x2e, 0xf6, 0x9a, 0x21, 0x19, 0xe4, 0x51, 0xaf, 0x47,
-       0xdc, 0x0a, 0x3d, 0x97, 0xd4, 0x6d, 0xe6, 0xf2, 0x89, 0x2e, 0x2e, 0xbb,
-       0x64, 0xc6, 0x9c, 0x78, 0x29, 0xc9, 0x41, 0x9c, 0xc7, 0x5f, 0x48, 0xe6,
-       0x1d, 0xe4, 0xe3, 0xe7, 0x92, 0xba, 0x62, 0xe1, 0x39, 0xa0, 0xe5, 0x38,
-       0x37, 0x67, 0x39, 0x37, 0x17, 0x90, 0x9b, 0x4b, 0xe0, 0xa7, 0xff, 0x31,
-       0x19, 0xc8, 0x4d, 0x44, 0xbf, 0x6b, 0x48, 0xe4, 0x21, 0x13, 0xf2, 0xdc,
-       0x1b, 0xcc, 0xc1, 0x36, 0xcf, 0xfe, 0x18, 0x67, 0x0a, 0xcf, 0x70, 0xde,
-       0xd4, 0x3a, 0x13, 0x28, 0xf7, 0x32, 0x8d, 0x16, 0x2e, 0x23, 0x4f, 0x9a,
-       0x34, 0x81, 0xdd, 0x78, 0xdf, 0xb4, 0x96, 0xa7, 0x3d, 0x05, 0xff, 0xbd,
-       0x6f, 0x90, 0xe2, 0xfa, 0xfb, 0x1d, 0xe8, 0x18, 0x71, 0xa7, 0xc0, 0xfb,
-       0xc5, 0xd2, 0x7f, 0x93, 0xf9, 0x43, 0x22, 0x83, 0xba, 0x56, 0xe4, 0x7d,
-       0x89, 0x2a, 0x2d, 0xf6, 0x83, 0xdf, 0x85, 0x07, 0x1f, 0x78, 0x20, 0xaa,
-       0x36, 0xc1, 0x3f, 0xc4, 0x38, 0xc6, 0x1a, 0xd6, 0x8b, 0x22, 0x72, 0xaa,
-       0xc3, 0xb8, 0x66, 0xbc, 0x9f, 0x49, 0xf0, 0x3e, 0x0b, 0xbc, 0x7b, 0xe3,
-       0x37, 0xc0, 0xa3, 0x1b, 0x0f, 0xf1, 0xe8, 0x4c, 0x82, 0xf1, 0x59, 0x60,
-       0xfc, 0x97, 0xc0, 0x96, 0x85, 0x9a, 0x0e, 0xdc, 0x36, 0xc8, 0x88, 0x50,
-       0x1b, 0x80, 0x83, 0x44, 0xcf, 0xe9, 0x44, 0xcf, 0xcc, 0x63, 0xf4, 0x9c,
-       0x4e, 0xf4, 0xcc, 0x74, 0xeb, 0x81, 0x5c, 0x25, 0x91, 0x0b, 0x1f, 0x23,
-       0x57, 0x49, 0xe4, 0xc2, 0x2e, 0x39, 0x0b, 0x67, 0xe2, 0x73, 0x71, 0x1e,
-       0xdb, 0x45, 0x2c, 0x7c, 0x8a, 0xb1, 0x62, 0x87, 0x18, 0xef, 0x61, 0x04,
-       0x66, 0x9a, 0x37, 0xb1, 0x96, 0xfd, 0x90, 0x61, 0x0e, 0x3c, 0xe2, 0xbb,
-       0x3d, 0xf8, 0x6e, 0x1f, 0xef, 0xf8, 0xfb, 0x66, 0x82, 0x15, 0xae, 0x45,
-       0x5e, 0x2d, 0x7c, 0x68, 0x6d, 0x46, 0xb0, 0x9f, 0xc5, 0xd5, 0xc3, 0x62,
-       0x60, 0x61, 0x0e, 0x35, 0xa7, 0x69, 0x52, 0x59, 0x32, 0x57, 0x5f, 0x91,
-       0x31, 0x76, 0xb7, 0xb1, 0x7e, 0xbb, 0xc3, 0xab, 0x99, 0x46, 0x8e, 0x68,
-       0xbd, 0x97, 0x16, 0x50, 0x4f, 0xce, 0x03, 0x4b, 0xd7, 0x7d, 0xb0, 0x90,
-       0x86, 0x81, 0x0b, 0x0d, 0x5c, 0x7b, 0x71, 0x6c, 0x23, 0xb5, 0x08, 0x66,
-       0xfc, 0x88, 0x76, 0x26, 0xf3, 0x94, 0xd9, 0xec, 0xd4, 0x43, 0xb9, 0xde,
-       0xbd, 0x8f, 0x8b, 0x7d, 0x02, 0xd4, 0xe0, 0x3f, 0xa2, 0x17, 0x70, 0x48,
-       0x8e, 0x22, 0x97, 0x36, 0x39, 0x27, 0x80, 0xa3, 0x9b, 0x5c, 0xeb, 0x39,
-       0xe7, 0x5a, 0xc0, 0x62, 0x9a, 0x7f, 0x72, 0xe8, 0x5b, 0x3e, 0x41, 0xed,
-       0x10, 0x34, 0x5f, 0xd4, 0x7a, 0xca, 0xff, 0x04, 0xb8, 0xc2, 0xb7, 0x75,
-       0x9e, 0xdb, 0xc5, 0x77, 0xfe, 0x66, 0x51, 0x76, 0xf5, 0x49, 0xec, 0x89,
-       0xfd, 0xce, 0xf0, 0xfa, 0x1c, 0x7a, 0x1a, 0xce, 0xf3, 0x18, 0xd7, 0xf9,
-       0xdd, 0x48, 0x7c, 0x6a, 0x62, 0xfc, 0x02, 0x46, 0x3e, 0x4f, 0x0f, 0xce,
-       0xa7, 0xf5, 0x5d, 0x9f, 0x9f, 0xb5, 0x96, 0x41, 0x2f, 0x95, 0x1b, 0x0a,
-       0xf5, 0x7d, 0xa4, 0xb0, 0x00, 0x9e, 0x95, 0x5b, 0xe9, 0x3c, 0xcf, 0xd9,
-       0x5d, 0x73, 0x78, 0x6e, 0xf1, 0x77, 0x41, 0x3b, 0x6a, 0x11, 0x75, 0x11,
-       0xfd, 0xd3, 0x3a, 0xf7, 0x61, 0xdc, 0x53, 0xc5, 0xf5, 0x72, 0x9c, 0x7b,
-       0xb0, 0x77, 0x90, 0xff, 0xd7, 0xc1, 0x29, 0xf0, 0xfb, 0x29, 0x41, 0x4f,
-       0x50, 0xd9, 0x49, 0xcf, 0xa3, 0x35, 0x38, 0x5b, 0x30, 0x0d, 0xe6, 0xe2,
-       0xb0, 0x3d, 0x4d, 0xdc, 0x6b, 0x8d, 0x84, 0x55, 0x96, 0x69, 0x21, 0x1f,
-       0xac, 0x68, 0xaa, 0x76, 0xf4, 0xd8, 0xb3, 0xc8, 0xd1, 0xd1, 0x4f, 0xb8,
-       0xb6, 0xb1, 0x6f, 0x4f, 0xc0, 0x1e, 0xf4, 0x05, 0xeb, 0x92, 0xde, 0x6e,
-       0xb0, 0x9e, 0x3c, 0x99, 0xe8, 0x11, 0x97, 0xfd, 0x54, 0xcf, 0x9f, 0xa0,
-       0x87, 0x1c, 0x41, 0xdc, 0xff, 0x4a, 0xe8, 0x62, 0x1f, 0x64, 0xd0, 0x8f,
-       0x8f, 0xd3, 0xbc, 0x5a, 0x8c, 0x6b, 0xf1, 0x79, 0xd4, 0xde, 0xa8, 0x98,
-       0x85, 0xef, 0x72, 0xb1, 0x9e, 0x7a, 0xf3, 0x5f, 0x9a, 0xf3, 0x0f, 0xea,
-       0x24, 0xf4, 0xe3, 0xbd, 0x8d, 0xb9, 0x95, 0x80, 0xde, 0x6c, 0xc6, 0xb5,
-       0xdb, 0xbe, 0x88, 0x9e, 0xbf, 0xd2, 0xf8, 0x47, 0xda, 0xcb, 0x84, 0xc0,
-       0x71, 0xe1, 0x02, 0x7c, 0x23, 0xb7, 0x7b, 0xe9, 0x35, 0xf4, 0xa8, 0x99,
-       0x15, 0xd4, 0x65, 0xf8, 0x4d, 0x5c, 0xad, 0x8d, 0x73, 0x9f, 0x79, 0x03,
-       0x5c, 0x9f, 0x2f, 0x2a, 0xdf, 0x34, 0x46, 0x69, 0xf9, 0x67, 0x5c, 0x67,
-       0xe2, 0x7a, 0x0d, 0xfc, 0xb8, 0x74, 0xa5, 0xa5, 0x68, 0xb9, 0x65, 0xc3,
-       0x2e, 0xfb, 0x41, 0x2f, 0xae, 0x38, 0x1f, 0x57, 0xf0, 0x8b, 0xf3, 0x2d,
-       0xce, 0x04, 0x3e, 0x04, 0xec, 0x0f, 0xee, 0xbd, 0x39, 0x66, 0x9c, 0xff,
-       0x4e, 0xe1, 0x99, 0xcf, 0xca, 0xbd, 0x32, 0xfb, 0x81, 0x7b, 0xe2, 0xee,
-       0xfe, 0x9d, 0x73, 0x23, 0x74, 0x6e, 0x33, 0x87, 0xb8, 0x47, 0xa9, 0xc8,
-       0xf9, 0x86, 0x1d, 0xf3, 0xaa, 0xde, 0xee, 0xf8, 0x3b, 0xf2, 0x59, 0xa7,
-       0x57, 0x0a, 0xe9, 0xce, 0x8b, 0x22, 0xee, 0x3b, 0x42, 0xe4, 0x15, 0x3e,
-       0xcb, 0x04, 0xee, 0x27, 0x1e, 0x7c, 0xe7, 0xa1, 0x2f, 0xe9, 0xf0, 0x73,
-       0x38, 0xe1, 0xe7, 0x50, 0xeb, 0x44, 0x26, 0xed, 0xc7, 0x0e, 0x72, 0xee,
-       0x17, 0xe2, 0x7f, 0xe7, 0xdc, 0x46, 0xc2, 0xb9, 0x6c, 0x8c, 0x4d, 0xb1,
-       0xd2, 0x3d, 0xf7, 0x0e, 0xe6, 0x72, 0x5d, 0xf7, 0xa2, 0xc3, 0x62, 0x12,
-       0xf3, 0x03, 0x9c, 0xe4, 0x75, 0x88, 0xff, 0x4a, 0x2f, 0x99, 0x57, 0x99,
-       0x97, 0x29, 0x46, 0x5c, 0xe0, 0x31, 0xd5, 0xd1, 0x83, 0x3d, 0x70, 0xd7,
-       0x59, 0xcd, 0xc4, 0xf8, 0x37, 0x83, 0x74, 0x4d, 0x81, 0xa6, 0x1b, 0x9e,
-       0x7f, 0x87, 0xc7, 0x16, 0xcf, 0x4b, 0xca, 0xae, 0x58, 0xf4, 0xfa, 0x98,
-       0xe7, 0xba, 0xc2, 0xf3, 0x77, 0x60, 0xf7, 0x5d, 0xe5, 0x50, 0x66, 0x94,
-       0x39, 0xc9, 0x15, 0x2a, 0x0b, 0xdc, 0xe0, 0x0e, 0xd8, 0xd4, 0x97, 0xd0,
-       0x1f, 0xb9, 0x12, 0xb1, 0xfd, 0x29, 0x6c, 0xe1, 0x7c, 0x0b, 0xbb, 0xc6,
-       0xd7, 0x81, 0x83, 0x05, 0x7e, 0xdf, 0xc7, 0x18, 0xdf, 0x2d, 0x78, 0x7f,
-       0x07, 0x67, 0xb0, 0x28, 0xb7, 0xaa, 0x71, 0xf7, 0x7b, 0x20, 0x77, 0x25,
-       0xc1, 0x6b, 0x06, 0xdf, 0xe7, 0x63, 0xbc, 0x72, 0x1c, 0xd9, 0xe7, 0x5a,
-       0x7f, 0x80, 0x38, 0x96, 0xe9, 0x2f, 0x31, 0x8f, 0xef, 0xfa, 0x31, 0x7e,
-       0x61, 0x0f, 0x64, 0x5a, 0x9f, 0xca, 0x98, 0xe7, 0xe0, 0xc3, 0x65, 0x3f,
-       0xc6, 0xd7, 0xf8, 0x4d, 0x1c, 0xbb, 0x83, 0xfd, 0x6e, 0x3d, 0xc3, 0xf6,
-       0x49, 0x8a, 0x39, 0xe5, 0x2e, 0x72, 0x8f, 0xe9, 0x8f, 0x20, 0xdf, 0x62,
-       0x5d, 0x2b, 0xe5, 0x7d, 0x16, 0x7c, 0x67, 0x5f, 0x33, 0xf7, 0x07, 0x92,
-       0xe7, 0x2f, 0x22, 0xb6, 0x36, 0xfc, 0xd8, 0xe9, 0x05, 0xcc, 0x15, 0xb6,
-       0xad, 0x97, 0xd4, 0xd5, 0xd4, 0xae, 0x4f, 0x63, 0x7b, 0x1e, 0xd6, 0x89,
-       0xf9, 0xed, 0xc3, 0xe4, 0xec, 0x2e, 0xb9, 0xbf, 0x1f, 0x22, 0x87, 0xf9,
-       0x6d, 0x96, 0xc9, 0xef, 0xf7, 0x20, 0xe5, 0x7d, 0x3c, 0x87, 0xc0, 0x3b,
-       0xcb, 0x3e, 0x7a, 0xef, 0xec, 0xc6, 0x7e, 0x5a, 0xfb, 0x19, 0xdf, 0xbc,
-       0xa7, 0xe7, 0x72, 0xef, 0xde, 0xc1, 0x76, 0x1e, 0x79, 0x2f, 0xf6, 0x03,
-       0x72, 0xa6, 0x37, 0x3e, 0x47, 0x29, 0xfe, 0x1f, 0x60, 0x7c, 0x01, 0x76,
-       0x55, 0x68, 0xa2, 0xc4, 0xe3, 0xc9, 0x03, 0x18, 0xe7, 0xfb, 0x3a, 0xd7,
-       0xa6, 0x3c, 0xee, 0x61, 0x5c, 0xe7, 0xf9, 0x2e, 0xd6, 0xc9, 0x53, 0x95,
-       0x35, 0x7e, 0xff, 0x2c, 0x79, 0xe7, 0xbc, 0xcc, 0x7d, 0xd4, 0x0d, 0x9c,
-       0x9f, 0xeb, 0xd1, 0x18, 0xd5, 0x1d, 0xf8, 0xd5, 0x67, 0x1b, 0x2e, 0xd0,
-       0x83, 0x1e, 0xec, 0xb0, 0xba, 0xb2, 0x6a, 0x76, 0x71, 0xe5, 0xb0, 0x7e,
-       0x8c, 0xef, 0x27, 0x46, 0x79, 0xcd, 0x48, 0x7a, 0x78, 0xee, 0xbf, 0xf6,
-       0xb4, 0x19, 0xf7, 0x62, 0x9c, 0x17, 0xb8, 0x07, 0x7b, 0x0d, 0xfb, 0xf6,
-       0xc5, 0xef, 0xe1, 0x16, 0x8f, 0xec, 0x17, 0x8a, 0x79, 0xd1, 0xe1, 0x79,
-       0x6a, 0x77, 0x84, 0x75, 0xf0, 0x8f, 0x88, 0x52, 0x9b, 0xa8, 0xfa, 0x16,
-       0xd7, 0x54, 0x3b, 0xc9, 0xff, 0x17, 0x31, 0x3e, 0x9f, 0x60, 0x20, 0x3d,
-       0x4b, 0xec, 0x57, 0xec, 0xaf, 0xf5, 0x2c, 0x30, 0xf5, 0xba, 0x9f, 0xda,
-       0x0a, 0x6c, 0x7f, 0x23, 0xcd, 0x31, 0x88, 0x97, 0xda, 0xd3, 0x72, 0x34,
-       0x84, 0x2d, 0xfc, 0xff, 0x82, 0x0a, 0x7a, 0x3b, 0xb6, 0x65, 0xc6, 0x78,
-       0x79, 0xff, 0x7f, 0x04, 0x8f, 0xf6, 0x71, 0x1c, 0x3f, 0x8e, 0xef, 0x7e,
-       0xfc, 0xac, 0x1c, 0x7c, 0xff, 0x51, 0xc3, 0xb3, 0x07, 0x04, 0xe7, 0x23,
-       0xb2, 0xb2, 0x88, 0xc1, 0x5d, 0xc4, 0x28, 0x24, 0xaf, 0xf4, 0x41, 0xdc,
-       0x9b, 0x13, 0x38, 0x37, 0x11, 0xe2, 0x19, 0x1c, 0xc0, 0xd9, 0x46, 0x3d,
-       0xff, 0x3d, 0xe2, 0x38, 0x58, 0xb8, 0x6b, 0x74, 0x62, 0x37, 0x96, 0xc4,
-       0x6e, 0xb4, 0xf5, 0xf0, 0x99, 0x5d, 0xf1, 0x52, 0xf2, 0xce, 0x67, 0xe2,
-       0x5e, 0xc1, 0xe5, 0x1e, 0x09, 0x3e, 0x28, 0x19, 0x9d, 0x7b, 0x7b, 0x93,
-       0xef, 0x97, 0x35, 0xce, 0xe5, 0xdc, 0xcf, 0x81, 0x6b, 0xa8, 0x96, 0x23,
-       0xb8, 0x6b, 0x68, 0x5d, 0x2f, 0x31, 0x76, 0x27, 0xc6, 0xa7, 0x62, 0x0c,
-       0x8b, 0x41, 0x41, 0x29, 0xb7, 0xba, 0x9f, 0x31, 0x96, 0xf8, 0x9e, 0xc6,
-       0xef, 0x1d, 0x1d, 0x1b, 0xc0, 0x1d, 0x6e, 0x32, 0xb8, 0x1d, 0xb2, 0x7e,
-       0xa3, 0xd3, 0x13, 0xdb, 0x11, 0xf3, 0x1e, 0xb8, 0x7b, 0x1f, 0x76, 0x85,
-       0xe0, 0x6d, 0xe7, 0x6e, 0x37, 0x87, 0x9c, 0x72, 0x1b, 0xb1, 0xbd, 0xab,
-       0x3a, 0x75, 0x71, 0x83, 0xfb, 0xae, 0x16, 0xf2, 0x4d, 0x1e, 0xbd, 0xb2,
-       0x4a, 0xef, 0xa2, 0x16, 0x5d, 0xc3, 0x9a, 0xeb, 0x98, 0xbb, 0xd2, 0x4a,
-       0x71, 0x84, 0x1e, 0x0f, 0xd8, 0x9c, 0x57, 0xff, 0xd4, 0x55, 0xa7, 0x7b,
-       0x2d, 0xff, 0xfd, 0x07, 0x5d, 0xe7, 0x92, 0xbb, 0xa8, 0x13, 0x00, 0x00,
-       0x00 };
-
-static const u32 bnx2_TPAT_b09FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_TPAT_b09FwRodata[(0x4/4) + 1] = {
-       0x00000001, 0x00000000 };
-
-static struct fw_info bnx2_tpat_fw_09 = {
-       /* Firmware version: 4.6.15 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0xf,
-
-       .start_addr                     = 0x08000488,
-
-       .text_addr                      = 0x08000400,
-       .text_len                       = 0x13a4,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_TPAT_b09FwText,
-       .gz_text_len                    = sizeof(bnx2_TPAT_b09FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_TPAT_b09FwData,
-
-       .sbss_addr                      = 0x080017c0,
-       .sbss_len                       = 0x40,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08001800,
-       .bss_len                        = 0x12b4,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x080017a4,
-       .rodata_len                     = 0x4,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_TPAT_b09FwRodata,
-};
-
-static u8 bnx2_TXP_b09FwText[] = {
-       0xc5, 0x7b, 0x7d, 0x70, 0x1b, 0xe7, 0x79, 0xe7, 0xef, 0xc5, 0x02, 0xe4,
-       0x02, 0x04, 0x41, 0x90, 0x82, 0x64, 0xf0, 0xca, 0x44, 0x58, 0x61, 0x41,
-       0xc1, 0x26, 0x2d, 0x2f, 0x28, 0x50, 0x82, 0xcb, 0x55, 0x85, 0x4a, 0xb4,
-       0x44, 0xc7, 0x74, 0x43, 0x3b, 0x6a, 0x4b, 0x67, 0x3c, 0x09, 0x2a, 0x51,
-       0x16, 0x2d, 0xcb, 0x16, 0xed, 0xf8, 0x7a, 0xec, 0x9c, 0x27, 0xda, 0x50,
-       0x1f, 0x96, 0x25, 0x10, 0x00, 0x3f, 0x64, 0xca, 0x9d, 0xce, 0x19, 0x26,
-       0x29, 0x51, 0xb6, 0xf1, 0x21, 0xc7, 0x4a, 0x6a, 0xcf, 0x24, 0x11, 0x4e,
-       0x96, 0x65, 0xd9, 0x89, 0x3f, 0x92, 0xf8, 0x7a, 0x4e, 0xa7, 0x37, 0xd5,
-       0x48, 0xfe, 0x90, 0x2c, 0xf9, 0xa3, 0x69, 0x6f, 0x2a, 0xb5, 0x4e, 0xf7,
-       0x9e, 0x67, 0x17, 0x94, 0x15, 0xd7, 0x9d, 0x9b, 0xf6, 0xfe, 0x38, 0xce,
-       0x70, 0x00, 0xec, 0xbe, 0xfb, 0xbe, 0xcf, 0xf7, 0xf3, 0x7b, 0x9e, 0xf7,
-       0xdd, 0x56, 0xc0, 0x83, 0xea, 0x5f, 0x3d, 0xfd, 0xc7, 0x87, 0x86, 0x1f,
-       0x8e, 0x2d, 0x5b, 0xb1, 0x8c, 0xbe, 0x76, 0xa2, 0xa1, 0xc6, 0xc9, 0x37,
-       0x57, 0x08, 0x20, 0xf5, 0x21, 0xfe, 0x43, 0x7f, 0x5f, 0xf9, 0x8f, 0x3d,
-       0x66, 0xfd, 0x49, 0x80, 0x7f, 0x9e, 0x2e, 0xfe, 0x87, 0xec, 0xd0, 0x93,
-       0x5d, 0x6b, 0x54, 0xc8, 0x92, 0x7e, 0x79, 0xd5, 0x26, 0x15, 0x48, 0x16,
-       0xda, 0x42, 0x6b, 0xf1, 0x1b, 0xd3, 0x08, 0x38, 0xc1, 0xd7, 0xbf, 0xa2,
-       0x7f, 0xb6, 0xe3, 0xc7, 0x2b, 0x95, 0x4f, 0xf3, 0x12, 0x64, 0xbf, 0x7e,
-       0x10, 0xfe, 0x56, 0xc8, 0x2d, 0xf4, 0xcc, 0x5f, 0x2c, 0x2d, 0x39, 0xe1,
-       0x9b, 0x9f, 0x0b, 0x86, 0x4b, 0xd7, 0xb0, 0x33, 0x3b, 0x84, 0x23, 0x71,
-       0xa0, 0x76, 0x34, 0xa2, 0xed, 0x04, 0x72, 0x0e, 0x3d, 0x12, 0x3a, 0x81,
-       0x10, 0x66, 0x0b, 0x2a, 0x1e, 0x2d, 0xc3, 0x70, 0xea, 0x21, 0x3c, 0x96,
-       0xfe, 0x17, 0x33, 0xe4, 0xe2, 0x47, 0x86, 0xb0, 0x8b, 0xc6, 0xee, 0x4e,
-       0x43, 0x0e, 0xea, 0x8f, 0x20, 0x98, 0x85, 0x5c, 0xaf, 0x0f, 0xa3, 0x38,
-       0x1a, 0x3e, 0x3d, 0x07, 0xa5, 0xaf, 0x59, 0x52, 0x86, 0x80, 0xb6, 0xd4,
-       0x5d, 0x42, 0xe9, 0x2f, 0x09, 0x25, 0xb1, 0x4d, 0x40, 0x16, 0x34, 0xee,
-       0x86, 0x02, 0x7f, 0x0e, 0x63, 0x69, 0x41, 0xc6, 0x19, 0x89, 0xe7, 0x59,
-       0x45, 0xf2, 0x16, 0x70, 0xaa, 0x1a, 0x76, 0x67, 0x79, 0x0d, 0x81, 0x9d,
-       0xf1, 0x88, 0x7f, 0x06, 0x7c, 0x3f, 0x84, 0x11, 0x6b, 0x9c, 0x42, 0x5c,
-       0x9b, 0xe6, 0x2e, 0xcd, 0x34, 0x0f, 0x69, 0xb5, 0x30, 0xfc, 0x4a, 0x10,
-       0x10, 0x18, 0xd1, 0x1c, 0x48, 0xfa, 0xd7, 0x84, 0x9c, 0x50, 0x82, 0x9b,
-       0xf1, 0xcf, 0xc4, 0x73, 0x32, 0xea, 0x82, 0x3d, 0x3e, 0x85, 0x5a, 0x54,
-       0xfc, 0xb6, 0xd4, 0xa6, 0xd3, 0xa6, 0x79, 0x4a, 0x75, 0xe2, 0x10, 0xc9,
-       0x67, 0xa4, 0xf0, 0xcf, 0x66, 0x85, 0x64, 0xb3, 0x4b, 0x9d, 0x5f, 0x5f,
-       0x46, 0xde, 0x6f, 0x9a, 0x33, 0x74, 0x6f, 0x4f, 0x61, 0x5e, 0xce, 0xa6,
-       0xe9, 0x50, 0x4d, 0x73, 0x93, 0xfa, 0x4f, 0xe6, 0xc6, 0xdf, 0x1a, 0x1b,
-       0xc3, 0x33, 0x39, 0x3f, 0x9e, 0xcd, 0x26, 0x51, 0x48, 0x9b, 0x90, 0x74,
-       0x27, 0x06, 0x47, 0x43, 0xd8, 0x56, 0xec, 0x46, 0x31, 0xad, 0xa4, 0xce,
-       0xd0, 0x73, 0x1b, 0xe3, 0x2a, 0xee, 0x2f, 0xf6, 0x60, 0x2e, 0x0d, 0xd3,
-       0xad, 0xab, 0x15, 0xb7, 0x88, 0x62, 0x4b, 0xb1, 0x17, 0xa5, 0xb4, 0x7a,
-       0x7a, 0x44, 0x44, 0x86, 0x9b, 0x25, 0x27, 0xb6, 0x17, 0xdb, 0xf1, 0x40,
-       0x31, 0x41, 0xcf, 0x98, 0xf8, 0x5a, 0xac, 0x85, 0xc6, 0x77, 0xe0, 0xe9,
-       0x49, 0xd3, 0x8c, 0xc6, 0xfc, 0x18, 0x2c, 0x6a, 0x98, 0xcb, 0x39, 0x90,
-       0x3a, 0xe4, 0x44, 0xea, 0x29, 0x60, 0xcb, 0x53, 0x1d, 0x98, 0xc9, 0x99,
-       0xd8, 0xa8, 0x8d, 0x34, 0x3b, 0xe0, 0x42, 0xca, 0x2f, 0xe0, 0x52, 0x7d,
-       0xd8, 0xec, 0xb7, 0x69, 0x3f, 0x23, 0x09, 0x6c, 0x7d, 0x2a, 0x8a, 0x77,
-       0xd2, 0x06, 0xbe, 0xd6, 0x19, 0xc4, 0x70, 0x31, 0x80, 0x37, 0xd3, 0x01,
-       0x5a, 0x43, 0xc3, 0x1b, 0x69, 0x99, 0xd6, 0x69, 0xc7, 0xc9, 0x34, 0x8f,
-       0xe1, 0xb1, 0x5e, 0x0c, 0x14, 0x5b, 0xf0, 0x7a, 0x3a, 0x48, 0x6b, 0x06,
-       0xf0, 0x2a, 0x8d, 0xbb, 0xb7, 0xa8, 0xe2, 0x34, 0x8d, 0x1b, 0x2c, 0x86,
-       0xf0, 0x4a, 0xda, 0x4b, 0xb4, 0x06, 0x70, 0x22, 0x3d, 0x84, 0x9d, 0xe9,
-       0xb6, 0xd3, 0x6b, 0x49, 0x86, 0xa1, 0x05, 0xbc, 0x0e, 0x5f, 0x7b, 0xd7,
-       0xec, 0x0d, 0x58, 0xa6, 0x42, 0xeb, 0xcc, 0xaf, 0x3b, 0x84, 0x91, 0xf4,
-       0xa9, 0xaa, 0xbf, 0x68, 0x78, 0x2c, 0x77, 0xd9, 0xfc, 0xf1, 0xd2, 0x16,
-       0x1c, 0xc9, 0x02, 0x4f, 0xcf, 0x00, 0x33, 0x59, 0xc3, 0xac, 0xd7, 0x4d,
-       0x73, 0xba, 0xb3, 0x9d, 0xe4, 0xa5, 0xf6, 0x6f, 0xa4, 0x51, 0xcf, 0x96,
-       0x9d, 0xc0, 0x53, 0x4a, 0x7f, 0x05, 0x0e, 0xe4, 0xe7, 0x9c, 0xa8, 0x19,
-       0x55, 0x7a, 0xf2, 0x50, 0x4e, 0x6f, 0x21, 0x8f, 0x3a, 0x94, 0x55, 0xfa,
-       0x0c, 0xec, 0x30, 0x83, 0x7a, 0x6b, 0xa8, 0x5d, 0x32, 0xe1, 0x23, 0x5b,
-       0x48, 0xb7, 0x9b, 0x66, 0xc3, 0x4a, 0xd3, 0x7c, 0xbd, 0x13, 0xa6, 0x43,
-       0x57, 0x4f, 0x97, 0xa1, 0x56, 0x3e, 0x82, 0x3a, 0x7c, 0x02, 0x95, 0xaf,
-       0x78, 0x11, 0x19, 0x0c, 0x4b, 0x91, 0xa1, 0xcb, 0xf4, 0x6c, 0x7d, 0x91,
-       0xcc, 0x99, 0x78, 0x51, 0x47, 0x81, 0x62, 0x59, 0x86, 0x93, 0xf8, 0x69,
-       0x1f, 0x35, 0x4d, 0xa7, 0xea, 0x85, 0x97, 0xe4, 0xbb, 0xfe, 0x80, 0x69,
-       0xbe, 0xaf, 0xf9, 0x51, 0x43, 0xba, 0xb9, 0x65, 0xcc, 0xc4, 0xb4, 0x76,
-       0x82, 0xe4, 0x29, 0x90, 0xea, 0x8b, 0xd3, 0x33, 0x01, 0x1a, 0x9f, 0xc0,
-       0xfa, 0xd1, 0x20, 0x9e, 0xc9, 0xca, 0xf8, 0xf1, 0xd2, 0x28, 0xea, 0x68,
-       0x2e, 0x0f, 0xc9, 0xaa, 0x96, 0xe4, 0x87, 0x22, 0x99, 0x5b, 0xd1, 0xb6,
-       0x47, 0x14, 0xcf, 0x10, 0x8f, 0x41, 0x7c, 0xbf, 0x1c, 0xc0, 0x73, 0x65,
-       0x3f, 0x8e, 0x96, 0x5b, 0x70, 0xbc, 0xac, 0xe1, 0x60, 0x4e, 0xd9, 0x5b,
-       0x81, 0x89, 0x7a, 0x7d, 0x07, 0x1a, 0x96, 0x03, 0x6f, 0xe6, 0x63, 0xc8,
-       0xe4, 0x4c, 0xb3, 0x40, 0x74, 0x7b, 0x88, 0x8f, 0x37, 0xf2, 0x5f, 0xc5,
-       0xe1, 0x49, 0x27, 0x42, 0xd3, 0x01, 0x3c, 0x9b, 0x76, 0xe2, 0xfa, 0x8c,
-       0x62, 0xe4, 0xa1, 0x46, 0xb7, 0x09, 0x35, 0x79, 0x83, 0x50, 0x72, 0x06,
-       0x22, 0x21, 0x97, 0x70, 0xa0, 0xf5, 0xb0, 0x13, 0x6a, 0x29, 0x04, 0x57,
-       0xab, 0x0c, 0xb5, 0xf5, 0x21, 0xc0, 0xe7, 0x40, 0x0d, 0xf9, 0xc6, 0xfa,
-       0xf1, 0x28, 0x5d, 0x0b, 0xd0, 0x35, 0x7c, 0xb5, 0x16, 0xd2, 0x22, 0x09,
-       0x24, 0x3b, 0x55, 0x42, 0xd2, 0x69, 0x9a, 0x92, 0xda, 0x81, 0xbb, 0x1e,
-       0x37, 0xcd, 0xf0, 0x72, 0x1e, 0xef, 0x47, 0xb8, 0x44, 0x72, 0x68, 0x25,
-       0xba, 0xb2, 0x44, 0x67, 0x96, 0xe8, 0xcc, 0x12, 0x9d, 0x59, 0x89, 0xec,
-       0x46, 0xd1, 0x80, 0x47, 0x48, 0x5f, 0x21, 0xe2, 0xf1, 0x1d, 0x4b, 0x57,
-       0xcf, 0x95, 0x83, 0xc4, 0x43, 0xc8, 0xe2, 0xe1, 0xe9, 0x9c, 0x80, 0x43,
-       0x55, 0xfa, 0xce, 0x60, 0x35, 0xc2, 0x31, 0x25, 0x99, 0x47, 0x92, 0x9e,
-       0x53, 0xf6, 0x1a, 0x50, 0x7a, 0x2a, 0x64, 0x03, 0x1b, 0xfd, 0x09, 0xcc,
-       0x65, 0x5d, 0xa8, 0x53, 0x95, 0x10, 0xe9, 0x2c, 0x5a, 0xc1, 0x02, 0xdc,
-       0xe7, 0xa7, 0x39, 0x1d, 0xb2, 0xb0, 0x63, 0xc9, 0x23, 0x88, 0x8c, 0x3b,
-       0x30, 0xab, 0x49, 0xe4, 0xa3, 0x1a, 0xa4, 0x56, 0x5a, 0xae, 0x14, 0xa7,
-       0x4f, 0x9a, 0x3f, 0x4b, 0x6b, 0x11, 0x3d, 0x34, 0x1f, 0xf9, 0x26, 0xcb,
-       0x32, 0x4a, 0x34, 0x3c, 0x6a, 0xd1, 0x7b, 0xb4, 0xfc, 0x75, 0x61, 0xdb,
-       0x90, 0x4e, 0x36, 0xa3, 0x84, 0x20, 0x94, 0x68, 0x48, 0x28, 0x5a, 0x52,
-       0xf8, 0x31, 0x53, 0x7e, 0x83, 0xc6, 0x04, 0xae, 0x19, 0xd3, 0x87, 0x91,
-       0xac, 0xc0, 0x5a, 0xd5, 0xc4, 0x1a, 0xad, 0x0f, 0x3b, 0xcb, 0xf3, 0xbe,
-       0xc9, 0x31, 0xcc, 0xef, 0x9b, 0x49, 0x77, 0x63, 0x57, 0x36, 0x84, 0x9d,
-       0x85, 0xa0, 0x6f, 0x3a, 0xcd, 0xf7, 0x54, 0xf2, 0x79, 0xbe, 0x17, 0xb8,
-       0xe6, 0x5e, 0xcb, 0x35, 0xf7, 0x12, 0x18, 0x99, 0xf8, 0x1d, 0x8a, 0x23,
-       0x0d, 0xd8, 0xa9, 0x7e, 0x4a, 0xf6, 0xa2, 0x26, 0x06, 0xd0, 0x8c, 0x33,
-       0xfe, 0x76, 0xec, 0x9f, 0xea, 0xc5, 0xae, 0xa9, 0x65, 0x78, 0x6c, 0xa2,
-       0x25, 0xe5, 0xd1, 0x49, 0x38, 0x9e, 0x70, 0x72, 0x40, 0x28, 0x43, 0x92,
-       0x08, 0x47, 0x07, 0xc8, 0x7e, 0x5b, 0x1b, 0x4d, 0xf3, 0x44, 0x8c, 0xec,
-       0x5b, 0x6b, 0xd3, 0xd6, 0x93, 0x00, 0x2a, 0x7d, 0x4a, 0xcf, 0xbb, 0xf0,
-       0xe2, 0x76, 0xb2, 0xbb, 0x99, 0x18, 0x06, 0x24, 0x48, 0xed, 0x5e, 0xfc,
-       0xbd, 0xf9, 0x94, 0x93, 0xe5, 0x6e, 0xee, 0xd8, 0xa4, 0xed, 0x15, 0x1c,
-       0xeb, 0x6a, 0xae, 0xc6, 0x13, 0x9e, 0x9f, 0x9f, 0x21, 0xdd, 0xd1, 0x3c,
-       0x83, 0xb1, 0xb6, 0xc4, 0x20, 0x2e, 0x9b, 0x67, 0x36, 0xf4, 0x62, 0xe7,
-       0xdc, 0x32, 0xec, 0x9b, 0x70, 0x21, 0xd9, 0x28, 0xd0, 0xa0, 0x86, 0x2b,
-       0xf7, 0x61, 0x19, 0x8c, 0x19, 0x7e, 0xae, 0x17, 0x07, 0xe7, 0xec, 0xdf,
-       0xd9, 0xab, 0xbf, 0xe7, 0xe7, 0x3b, 0x4f, 0x3a, 0x65, 0x79, 0x72, 0xac,
-       0x24, 0x15, 0xe8, 0x6d, 0x38, 0x32, 0x11, 0x20, 0xdd, 0x76, 0x0b, 0xe7,
-       0xe1, 0x45, 0x3e, 0xcf, 0xe3, 0x26, 0x4e, 0x69, 0xa4, 0xe7, 0xec, 0x3a,
-       0xe1, 0x39, 0xdc, 0x23, 0x5c, 0xa5, 0x3b, 0x45, 0xcd, 0xf4, 0x37, 0x85,
-       0x7c, 0x38, 0x25, 0x6a, 0x4b, 0xed, 0x24, 0xfb, 0x7e, 0xe1, 0x3e, 0xac,
-       0x84, 0x42, 0xe2, 0x11, 0xd2, 0xe7, 0x06, 0x21, 0x95, 0xe0, 0x77, 0xe8,
-       0xc3, 0xc2, 0x51, 0xa2, 0x39, 0x2c, 0x1b, 0xe2, 0x75, 0x82, 0xa4, 0x37,
-       0x18, 0x92, 0x3e, 0x84, 0x8d, 0x14, 0xff, 0x6f, 0x4d, 0xeb, 0x78, 0x34,
-       0x5b, 0x4b, 0x31, 0x92, 0x7d, 0xff, 0x32, 0xad, 0xab, 0xe2, 0x31, 0xca,
-       0x15, 0xb2, 0xbe, 0x0f, 0x3e, 0xf2, 0xb9, 0xd7, 0x63, 0xec, 0x8f, 0x40,
-       0x21, 0x1b, 0xee, 0x7f, 0x54, 0x98, 0xe6, 0xd6, 0x88, 0xb9, 0x78, 0x5d,
-       0xac, 0x2d, 0x7a, 0x12, 0xff, 0x68, 0xe6, 0x03, 0x43, 0xa8, 0xef, 0xa4,
-       0x7b, 0xa3, 0x90, 0x5d, 0xfa, 0x2e, 0x1c, 0xa2, 0x5c, 0xe2, 0xd1, 0x29,
-       0xbe, 0x8c, 0x86, 0xfb, 0x1f, 0x13, 0x1c, 0xf3, 0x95, 0xca, 0xb3, 0x18,
-       0x39, 0x5d, 0x0b, 0x25, 0xb4, 0x46, 0xb4, 0x69, 0x75, 0x92, 0x91, 0x68,
-       0xa6, 0x14, 0xe7, 0xee, 0x54, 0x86, 0xf7, 0x40, 0xf1, 0x5f, 0x00, 0xfb,
-       0x2a, 0xe7, 0x93, 0x5d, 0x48, 0x58, 0x79, 0xc5, 0xc0, 0x4d, 0x57, 0xf3,
-       0x8a, 0x4e, 0x76, 0x52, 0x8b, 0x3d, 0x44, 0xd7, 0xcb, 0x9a, 0x12, 0x9c,
-       0x86, 0xb9, 0x78, 0x40, 0xe3, 0x7b, 0x3a, 0x76, 0x95, 0xcd, 0x90, 0xa4,
-       0xb3, 0xac, 0x90, 0xaa, 0xd5, 0x99, 0x56, 0x3f, 0xf9, 0xc6, 0x6f, 0xcc,
-       0x81, 0xb8, 0xac, 0xbd, 0x57, 0xf0, 0x93, 0xbc, 0xe0, 0x73, 0x16, 0xbf,
-       0x2c, 0xff, 0x9a, 0x70, 0xe8, 0xbf, 0x31, 0xbf, 0x1d, 0x87, 0x6f, 0x71,
-       0xd1, 0x99, 0xaa, 0xd3, 0xd1, 0x37, 0x3c, 0xba, 0xc3, 0x6c, 0x56, 0x1d,
-       0x14, 0xab, 0x54, 0x8a, 0xed, 0xde, 0xc4, 0xa5, 0x4e, 0xb7, 0x78, 0xbd,
-       0x33, 0xd8, 0xfb, 0x51, 0xc1, 0x4d, 0x7a, 0x46, 0xdf, 0xb6, 0x62, 0xc2,
-       0xf9, 0x21, 0xd9, 0x5a, 0x0d, 0xc5, 0x55, 0x14, 0x5b, 0x7a, 0x2f, 0x50,
-       0x2e, 0xba, 0x25, 0xe6, 0xfe, 0xe3, 0x1a, 0xdd, 0xf1, 0x55, 0x37, 0x1e,
-       0xbc, 0x69, 0x36, 0xd1, 0x40, 0xb1, 0xdd, 0x8f, 0xd3, 0xf1, 0x1e, 0x8c,
-       0x94, 0x6b, 0xc9, 0x0e, 0x9f, 0xaf, 0xec, 0x56, 0x5b, 0x7a, 0x2f, 0xa6,
-       0x17, 0x53, 0x2c, 0xc1, 0x67, 0x85, 0x4e, 0xb5, 0x6f, 0x9b, 0x38, 0x71,
-       0xab, 0x07, 0x71, 0x92, 0xab, 0x2c, 0x5f, 0x49, 0xe3, 0xd3, 0xc5, 0xaa,
-       0x5a, 0x59, 0x2d, 0xb5, 0x0e, 0xc9, 0x52, 0xeb, 0x70, 0x0d, 0xc5, 0xe1,
-       0xf3, 0x37, 0x0a, 0x9c, 0xba, 0x31, 0x92, 0xa8, 0x11, 0x6e, 0x9c, 0xe9,
-       0x4b, 0x90, 0x9d, 0xb4, 0xa4, 0xdc, 0x3a, 0xc5, 0x8f, 0x51, 0x01, 0x49,
-       0x4d, 0x60, 0xe7, 0x0c, 0x1e, 0x19, 0xd1, 0x7a, 0x61, 0xcc, 0xb1, 0x0d,
-       0xb5, 0x63, 0x64, 0xae, 0x0f, 0x46, 0x59, 0x42, 0x3e, 0x40, 0xcc, 0x97,
-       0x91, 0x72, 0xe9, 0xed, 0xdd, 0xf9, 0xc2, 0x5d, 0x2e, 0xdb, 0x87, 0x89,
-       0xff, 0xec, 0xa4, 0x0f, 0x1e, 0xd6, 0xf3, 0x69, 0x92, 0x51, 0x3b, 0x9e,
-       0x2f, 0x47, 0x29, 0xde, 0x69, 0x24, 0x17, 0x95, 0xe2, 0x45, 0x88, 0xec,
-       0x4b, 0xc6, 0xc6, 0x09, 0xe5, 0x20, 0xc5, 0x85, 0x5c, 0x9e, 0x40, 0x51,
-       0x32, 0xe0, 0xa7, 0xfc, 0xfd, 0x6a, 0x35, 0x06, 0x0c, 0xd2, 0xa7, 0x62,
-       0x24, 0x81, 0x93, 0x0e, 0xa0, 0xa3, 0x59, 0x8f, 0xec, 0x6d, 0x26, 0x7d,
-       0x34, 0x96, 0xdc, 0xd8, 0x3e, 0xd1, 0x84, 0x07, 0xa6, 0x3c, 0xd8, 0x3a,
-       0x61, 0xe2, 0x52, 0x8c, 0x6d, 0x43, 0xe9, 0x27, 0x12, 0xbb, 0xeb, 0x48,
-       0xae, 0xb7, 0xc6, 0x22, 0x09, 0xb7, 0x70, 0xa2, 0xb6, 0xd4, 0x47, 0x38,
-       0x20, 0xc9, 0x7e, 0xa1, 0xd1, 0x1c, 0xa1, 0x9d, 0xda, 0xed, 0x48, 0x05,
-       0x64, 0xb8, 0x4a, 0x5e, 0x8a, 0x25, 0xec, 0xc7, 0x7c, 0xef, 0xeb, 0xd8,
-       0x58, 0xe3, 0x85, 0x94, 0x91, 0x91, 0x23, 0x0c, 0x80, 0x45, 0x35, 0xe8,
-       0x69, 0x75, 0xd0, 0x7f, 0xc0, 0x37, 0x3b, 0xd9, 0xe2, 0x3b, 0x44, 0xf1,
-       0x75, 0x4b, 0xd6, 0xc1, 0xeb, 0x30, 0x66, 0xa0, 0xb9, 0xfd, 0x78, 0x9a,
-       0xe2, 0xf5, 0x43, 0x14, 0x7f, 0x8e, 0x94, 0xcb, 0x82, 0xe3, 0x89, 0xc5,
-       0x4f, 0x96, 0x78, 0xcb, 0x12, 0x6f, 0x59, 0xe2, 0x8b, 0xe2, 0xc2, 0xd1,
-       0x2c, 0xf3, 0xf1, 0x6b, 0xf2, 0xd1, 0x04, 0xf1, 0xee, 0xc6, 0x66, 0xa2,
-       0xf7, 0xc1, 0xa9, 0x3a, 0x6c, 0x23, 0x7a, 0x8b, 0x9a, 0xa2, 0x3d, 0x27,
-       0x4c, 0xec, 0x8f, 0x29, 0xc6, 0x4f, 0x29, 0x10, 0x39, 0x5a, 0x4d, 0xb3,
-       0x4f, 0x63, 0x9e, 0x29, 0x5e, 0x39, 0x2c, 0x9e, 0xf7, 0x26, 0xe1, 0xc6,
-       0x20, 0x3d, 0x33, 0x30, 0x85, 0xcf, 0x1c, 0xc4, 0x93, 0x9b, 0x78, 0xdc,
-       0xa7, 0x29, 0x89, 0x1b, 0x28, 0xae, 0x9f, 0x53, 0x23, 0x95, 0x73, 0x12,
-       0x7e, 0x9f, 0xe4, 0x31, 0xcc, 0xf2, 0xb8, 0x89, 0xf8, 0x79, 0x80, 0xf0,
-       0x4e, 0x3d, 0xc5, 0xa5, 0xc2, 0x81, 0x48, 0xf4, 0x97, 0xc4, 0x7b, 0xa4,
-       0x44, 0xb4, 0x8f, 0xda, 0xb4, 0xdf, 0xc7, 0xb4, 0xc7, 0x4c, 0xdc, 0x43,
-       0xb4, 0x1f, 0x26, 0xda, 0x07, 0xb3, 0x2c, 0x0f, 0xce, 0x3b, 0x36, 0xfd,
-       0x47, 0xca, 0xbc, 0xee, 0x97, 0xf1, 0x30, 0x4f, 0x7f, 0x13, 0x36, 0x4e,
-       0xcd, 0xcb, 0xcb, 0x34, 0xbf, 0xad, 0x1d, 0x33, 0xff, 0x84, 0x64, 0xb6,
-       0xb8, 0xc4, 0x72, 0x83, 0x51, 0xab, 0x47, 0x0e, 0x6e, 0xc1, 0x7d, 0x0e,
-       0x78, 0xbc, 0x58, 0x50, 0xe2, 0x5c, 0x10, 0xc2, 0x31, 0xd2, 0xef, 0x71,
-       0xca, 0x67, 0xcf, 0x97, 0xaf, 0xcd, 0x6f, 0xac, 0xeb, 0x49, 0xd2, 0xb1,
-       0x92, 0x37, 0x28, 0xb6, 0xa5, 0xca, 0x49, 0xec, 0x9e, 0x42, 0x72, 0x56,
-       0xfb, 0x6f, 0x14, 0x60, 0x16, 0x91, 0x7d, 0xd5, 0x26, 0xfd, 0xaa, 0x07,
-       0x9b, 0x66, 0x02, 0x18, 0x2a, 0xaf, 0x41, 0x96, 0xe2, 0xcd, 0x36, 0x8a,
-       0xcf, 0x1f, 0xc7, 0x92, 0x5b, 0x7d, 0x88, 0x90, 0x7e, 0x03, 0xb8, 0x8f,
-       0x9e, 0xd9, 0x37, 0xc5, 0x3c, 0xf8, 0xab, 0x7a, 0x0e, 0x60, 0x0b, 0x5d,
-       0xdb, 0x33, 0x25, 0xe3, 0x25, 0xed, 0x49, 0xc2, 0x34, 0x36, 0xc6, 0xb8,
-       0x27, 0x0b, 0x3f, 0xb9, 0x27, 0x61, 0xc0, 0x48, 0xf4, 0x25, 0xfa, 0xbd,
-       0xb9, 0xec, 0xf1, 0x8d, 0x4c, 0xe2, 0x7b, 0x8b, 0x75, 0x1f, 0x16, 0x10,
-       0x1e, 0xbb, 0x4b, 0x8b, 0x90, 0xdd, 0x3b, 0x31, 0x5c, 0x76, 0xe0, 0x3b,
-       0x33, 0x1e, 0x3c, 0x34, 0xf1, 0x99, 0x59, 0x13, 0x77, 0xe2, 0x8e, 0x56,
-       0x0f, 0x1e, 0x9c, 0x49, 0x62, 0xef, 0x14, 0x42, 0xb5, 0xb1, 0x31, 0x8a,
-       0xdd, 0x76, 0x3e, 0xa8, 0x23, 0xde, 0x1f, 0x9b, 0xf2, 0xfa, 0x06, 0x0f,
-       0xb0, 0x0c, 0xd6, 0x04, 0xdd, 0x40, 0xa5, 0x36, 0x26, 0x61, 0xb3, 0x26,
-       0x2d, 0xa8, 0x25, 0x43, 0x7f, 0x92, 0xe6, 0x9b, 0x86, 0xf4, 0xda, 0x62,
-       0x44, 0x0e, 0x36, 0x4b, 0x95, 0xdc, 0x02, 0x34, 0xe1, 0xa1, 0xb9, 0x24,
-       0xc6, 0xc8, 0x46, 0xb7, 0x4f, 0x8c, 0x7c, 0xaf, 0x91, 0x62, 0x88, 0xaf,
-       0x43, 0x19, 0x7c, 0x53, 0xe8, 0x28, 0x44, 0xdc, 0xd8, 0x36, 0xe3, 0xf5,
-       0x6d, 0x3d, 0x60, 0xae, 0x66, 0x7b, 0xba, 0x77, 0xae, 0x09, 0xf7, 0x4f,
-       0xd1, 0xb5, 0x09, 0xb6, 0x61, 0xb2, 0xb5, 0x48, 0x2d, 0xf1, 0x16, 0x4e,
-       0xba, 0x09, 0x33, 0x49, 0xb1, 0x3a, 0x92, 0x87, 0x1b, 0x5b, 0x2c, 0x5b,
-       0xf0, 0x63, 0xf3, 0x94, 0x89, 0xb3, 0x5a, 0x14, 0x39, 0xb2, 0xeb, 0x83,
-       0x53, 0xca, 0xe5, 0x6e, 0xc2, 0x3b, 0xef, 0x49, 0xca, 0xc1, 0x56, 0x29,
-       0x89, 0xa6, 0xe5, 0x14, 0xe3, 0x9b, 0x4c, 0xf3, 0x9e, 0x8e, 0xb6, 0xa1,
-       0xb7, 0x88, 0xe6, 0x46, 0x7d, 0x11, 0x2a, 0x8d, 0x4a, 0x8e, 0xb0, 0xf3,
-       0x70, 0x8d, 0xe3, 0x46, 0x9c, 0x59, 0x48, 0x7a, 0x06, 0xc7, 0xf2, 0x80,
-       0xaf, 0x29, 0x63, 0xe7, 0xb8, 0x26, 0xb2, 0x93, 0xc6, 0x4c, 0xd0, 0xd7,
-       0x58, 0x82, 0xaf, 0xa6, 0x04, 0xbc, 0x40, 0xf1, 0x65, 0xc1, 0xf2, 0xdf,
-       0x98, 0xa9, 0x26, 0x0b, 0x13, 0xfa, 0x5e, 0x9c, 0x54, 0x8c, 0x0a, 0x94,
-       0xbd, 0x14, 0x2a, 0xf1, 0xc4, 0x9c, 0xd3, 0x77, 0x98, 0xf0, 0x5f, 0x93,
-       0x1a, 0xc5, 0x1e, 0xd2, 0xe7, 0x0e, 0xb2, 0x85, 0xbf, 0x27, 0x7c, 0xf2,
-       0x58, 0x26, 0x1c, 0xd2, 0x44, 0x3f, 0x4d, 0x0c, 0xec, 0x2a, 0x51, 0xcc,
-       0x77, 0xac, 0xa5, 0x20, 0xa6, 0x44, 0x29, 0xad, 0x21, 0x9d, 0x71, 0xc1,
-       0x58, 0x68, 0xeb, 0xe4, 0xfe, 0xec, 0x71, 0xd3, 0xa7, 0xaa, 0xf9, 0x12,
-       0xe9, 0xec, 0xe1, 0xb2, 0x17, 0xc3, 0x84, 0x07, 0x16, 0x10, 0x8e, 0x7c,
-       0x90, 0xec, 0x62, 0xfb, 0x84, 0x44, 0xf4, 0xf1, 0xb8, 0x24, 0x92, 0x8b,
-       0x6c, 0x3c, 0xfa, 0xd0, 0x0c, 0xdb, 0x25, 0xd9, 0x11, 0xd9, 0xe2, 0x31,
-       0xca, 0xf9, 0xcf, 0xff, 0x16, 0x06, 0x51, 0xfc, 0xc6, 0xd5, 0xdc, 0x6f,
-       0xcb, 0x63, 0x64, 0x8a, 0x79, 0x56, 0x0e, 0xc2, 0x91, 0xc4, 0x2d, 0xda,
-       0xaf, 0x28, 0x27, 0x30, 0xef, 0x84, 0x83, 0xa7, 0xa2, 0x94, 0x57, 0x08,
-       0xdb, 0xc4, 0x2e, 0x99, 0x5b, 0x02, 0x2c, 0x03, 0xe6, 0xe7, 0x66, 0x89,
-       0xf3, 0x67, 0x13, 0xe1, 0xdf, 0xff, 0x77, 0xbb, 0xdb, 0x64, 0xa6, 0x2c,
-       0x3c, 0x4b, 0x38, 0x9b, 0xec, 0x29, 0x75, 0xd5, 0x7e, 0x1e, 0x34, 0xcf,
-       0x04, 0x38, 0x5f, 0x37, 0x21, 0x75, 0xd5, 0x16, 0xd8, 0x96, 0xb0, 0x58,
-       0xeb, 0xd8, 0xf9, 0xa0, 0x1f, 0x6c, 0x0f, 0xd1, 0x6b, 0xec, 0xc1, 0x43,
-       0x34, 0xf9, 0xb1, 0x75, 0x8e, 0xed, 0xd7, 0xfc, 0x64, 0xb1, 0xfe, 0x2f,
-       0xe6, 0x95, 0x95, 0xea, 0xc1, 0x5f, 0xe1, 0xeb, 0x74, 0x3d, 0x80, 0xef,
-       0x90, 0x1f, 0xdd, 0x47, 0x7c, 0x6e, 0xed, 0x7c, 0xc0, 0xf2, 0xdb, 0xad,
-       0xe5, 0xdf, 0xa3, 0xeb, 0x2c, 0xef, 0x6e, 0x8a, 0x73, 0x1a, 0xf6, 0x65,
-       0x2b, 0x9c, 0x87, 0xc8, 0xe6, 0xe3, 0xf8, 0x4b, 0x8a, 0xb3, 0xc7, 0xca,
-       0x8c, 0xc9, 0x12, 0x16, 0x1e, 0xfb, 0x61, 0xb9, 0x1d, 0x3f, 0x20, 0x9f,
-       0x7c, 0x9e, 0x62, 0xee, 0xf7, 0x2d, 0x9c, 0xe6, 0x14, 0x8f, 0xa6, 0x55,
-       0x3c, 0x4d, 0x58, 0x7f, 0x5f, 0x21, 0x84, 0x23, 0xe9, 0xf0, 0xde, 0x0b,
-       0x50, 0x5e, 0x20, 0x79, 0xf9, 0xf6, 0x52, 0x8d, 0x76, 0x38, 0xad, 0xe4,
-       0x81, 0xa0, 0x6f, 0x4f, 0xc1, 0xef, 0x1b, 0x49, 0x07, 0x7c, 0x23, 0x84,
-       0x81, 0x76, 0xa6, 0x5b, 0x7c, 0x3b, 0x0b, 0xcb, 0x11, 0x6a, 0x82, 0xb1,
-       0x88, 0x72, 0xc2, 0x7d, 0x13, 0x1b, 0x90, 0x6a, 0xb4, 0xe3, 0xfc, 0x03,
-       0x53, 0x1c, 0x83, 0xdb, 0x52, 0x37, 0x3a, 0xbe, 0x5e, 0xd5, 0xb7, 0x1f,
-       0x43, 0x74, 0xad, 0xa1, 0x03, 0xbe, 0x37, 0xad, 0x58, 0x0b, 0x3c, 0x4f,
-       0xb6, 0xf5, 0x50, 0xc7, 0x6f, 0xcc, 0x64, 0xd5, 0xb6, 0x7e, 0x30, 0xe9,
-       0xa4, 0xf8, 0x6a, 0x9a, 0x47, 0x3b, 0x04, 0x02, 0x1d, 0xdd, 0x30, 0x9a,
-       0xe6, 0x6b, 0xc8, 0x64, 0xbe, 0xb9, 0x83, 0x22, 0x94, 0x7a, 0x0b, 0x12,
-       0x0b, 0x28, 0xb5, 0x74, 0xac, 0xae, 0xde, 0x93, 0xf1, 0x9d, 0x09, 0x37,
-       0x52, 0x4d, 0x7e, 0xcc, 0x12, 0x36, 0xd9, 0x68, 0xc5, 0xa2, 0xb6, 0xd3,
-       0xc7, 0xa9, 0x96, 0x09, 0x7d, 0xc3, 0x4f, 0xbc, 0x26, 0x21, 0x77, 0x10,
-       0x90, 0xa8, 0xd2, 0xc4, 0xbf, 0x73, 0x73, 0x51, 0xec, 0x2e, 0xff, 0xd8,
-       0x61, 0xe7, 0x13, 0x25, 0x9f, 0xc4, 0x4f, 0x28, 0x2f, 0xd2, 0xbd, 0xec,
-       0x9b, 0x66, 0xc8, 0xb2, 0x33, 0x81, 0xc7, 0x97, 0x45, 0xf6, 0xfe, 0x4f,
-       0xc7, 0x75, 0xc4, 0x17, 0xc9, 0x2a, 0x6b, 0xd5, 0x8e, 0x0d, 0xd7, 0xa9,
-       0x0f, 0xe2, 0x2f, 0xfd, 0x2c, 0xcb, 0x61, 0x91, 0xa5, 0x3a, 0xf5, 0x8c,
-       0x0b, 0x0d, 0x41, 0x35, 0x8b, 0x17, 0xfa, 0xf8, 0x5a, 0xc0, 0xf7, 0x44,
-       0x3a, 0xe9, 0x08, 0xa8, 0xf0, 0xbb, 0xf4, 0x6e, 0xf1, 0x04, 0x61, 0xc0,
-       0x89, 0x74, 0x8f, 0x98, 0x28, 0xdc, 0x29, 0x8c, 0xfc, 0x37, 0x85, 0x31,
-       0x9b, 0x12, 0x46, 0xa1, 0x9f, 0x3e, 0x37, 0x88, 0xc9, 0xc2, 0xb0, 0xd8,
-       0x5d, 0xe0, 0x79, 0x49, 0x27, 0x34, 0xf7, 0x0f, 0x29, 0xc6, 0xfe, 0x80,
-       0x62, 0xec, 0x31, 0x8a, 0xb1, 0xcf, 0x93, 0x5d, 0x7f, 0xff, 0x2a, 0x96,
-       0x65, 0x5b, 0x4e, 0x32, 0x06, 0xf1, 0xfd, 0xbc, 0xf4, 0x12, 0xe9, 0x95,
-       0x65, 0xf6, 0x13, 0xb2, 0x61, 0x96, 0xc5, 0x7f, 0xe6, 0x9c, 0x40, 0xfa,
-       0xf8, 0xd0, 0xb2, 0xd9, 0xc7, 0x97, 0x31, 0x66, 0x1a, 0x16, 0x3b, 0x98,
-       0xae, 0x5a, 0xaa, 0xdb, 0x55, 0xc2, 0x21, 0xd9, 0x61, 0xb1, 0xb1, 0xc0,
-       0xd7, 0xf7, 0xe1, 0x3e, 0xaa, 0xff, 0xb6, 0xc6, 0xc2, 0x89, 0x6e, 0xc2,
-       0x48, 0x17, 0x54, 0x73, 0x71, 0x34, 0x46, 0x98, 0xe1, 0xc6, 0x2b, 0x54,
-       0xab, 0x22, 0xb9, 0x2d, 0xae, 0xe4, 0xf3, 0x76, 0x5e, 0xcd, 0xa5, 0xc1,
-       0x75, 0x3a, 0x1a, 0x9c, 0xaa, 0x72, 0x24, 0x89, 0xf0, 0xde, 0xb8, 0x03,
-       0x46, 0x8d, 0xee, 0xc2, 0x80, 0x55, 0x17, 0xae, 0x41, 0x66, 0x42, 0xe0,
-       0x65, 0xf2, 0x01, 0x17, 0xc9, 0xe8, 0x50, 0x27, 0x3e, 0x23, 0xb5, 0x0a,
-       0xaa, 0xe3, 0x4f, 0x9f, 0xa5, 0x9c, 0x73, 0x17, 0xe5, 0xd6, 0x89, 0xec,
-       0x0a, 0x04, 0x3b, 0x64, 0x34, 0x74, 0x38, 0xf1, 0x8d, 0xd2, 0xef, 0xe3,
-       0x4c, 0x63, 0xe4, 0xe0, 0x0b, 0xf0, 0xf8, 0x5e, 0x9a, 0x64, 0x7a, 0xf0,
-       0xbd, 0x3a, 0xaa, 0xd7, 0xb6, 0x12, 0x4e, 0x1a, 0x27, 0x1a, 0x7a, 0x3a,
-       0x22, 0x3d, 0xb7, 0x09, 0xf8, 0x6b, 0xf5, 0x1a, 0x8c, 0xb7, 0xfa, 0xe0,
-       0x57, 0x53, 0xe2, 0xd5, 0x02, 0xe5, 0x0d, 0xc7, 0x37, 0xc5, 0x5b, 0xb3,
-       0x3a, 0xf6, 0x96, 0xfb, 0xc5, 0x2f, 0x66, 0x65, 0x90, 0x4e, 0x28, 0x3e,
-       0x69, 0xc8, 0x10, 0x5d, 0x2e, 0xc2, 0x42, 0x2f, 0xdf, 0x21, 0x70, 0x9d,
-       0x9a, 0xc4, 0x77, 0x56, 0xb0, 0xcd, 0xdb, 0xb1, 0x2b, 0x98, 0x51, 0x42,
-       0x49, 0x47, 0xb7, 0x08, 0x52, 0xec, 0x6a, 0xc8, 0xf4, 0x88, 0x06, 0xc2,
-       0x9e, 0x0b, 0xa7, 0x37, 0x88, 0x05, 0x25, 0xc6, 0x9a, 0xf0, 0x2f, 0x24,
-       0xd9, 0x2c, 0x2c, 0x7d, 0x20, 0xd9, 0x18, 0xdf, 0xc5, 0xb6, 0x43, 0x39,
-       0x4a, 0xf6, 0xfd, 0x7a, 0x32, 0x89, 0x5b, 0x3b, 0xd6, 0x20, 0x64, 0xd9,
-       0xc7, 0xb0, 0xd8, 0x47, 0xf2, 0x4b, 0x5a, 0xfd, 0x07, 0xbf, 0xef, 0xc0,
-       0x24, 0x5c, 0x7e, 0x1d, 0x21, 0x89, 0x72, 0x43, 0xa9, 0x23, 0x32, 0xf8,
-       0x96, 0xe8, 0x15, 0xa3, 0x85, 0x80, 0x2f, 0x9d, 0x86, 0xbf, 0x8e, 0x74,
-       0x9c, 0x26, 0x1d, 0xef, 0x21, 0x1d, 0xef, 0xf9, 0x12, 0x1d, 0xef, 0x24,
-       0x1d, 0xef, 0x2f, 0xfc, 0x9d, 0xa5, 0x33, 0xa7, 0xae, 0x63, 0x94, 0x72,
-       0xee, 0x78, 0xab, 0xcd, 0x4f, 0x81, 0x30, 0xea, 0x9e, 0x58, 0xaf, 0x13,
-       0x1e, 0x9d, 0x62, 0x66, 0x2f, 0x3d, 0xd3, 0x5c, 0xb5, 0x65, 0xbf, 0xef,
-       0xc9, 0x74, 0xb7, 0x78, 0xd2, 0xf2, 0x2b, 0xc6, 0x8d, 0x49, 0x34, 0xaa,
-       0x3d, 0x34, 0x17, 0xdb, 0xca, 0x9d, 0x02, 0x4f, 0xb1, 0xbd, 0x7c, 0x93,
-       0x04, 0xcf, 0x36, 0x93, 0x12, 0x28, 0xb2, 0xdd, 0xf4, 0xd3, 0x6f, 0xb6,
-       0x9d, 0x0d, 0xa2, 0xb1, 0xf8, 0x45, 0xfb, 0x81, 0xdf, 0xa9, 0xb3, 0xfd,
-       0xb0, 0x1d, 0x0d, 0x0b, 0x67, 0x91, 0x7c, 0x96, 0xe6, 0x1f, 0x21, 0xba,
-       0x77, 0xa6, 0xf7, 0x3b, 0x99, 0x36, 0x59, 0x67, 0x3b, 0x62, 0xfb, 0xb9,
-       0x48, 0xb4, 0xb2, 0xcd, 0x5f, 0xed, 0xd9, 0xd0, 0xdf, 0xef, 0x4a, 0x50,
-       0xb7, 0x38, 0x6d, 0x1e, 0x38, 0x87, 0x73, 0xce, 0xe6, 0x78, 0xea, 0xb7,
-       0x6a, 0xba, 0x63, 0x57, 0x73, 0x39, 0xe7, 0x75, 0xc8, 0x0b, 0xf4, 0x80,
-       0xfe, 0x9d, 0xd6, 0x2b, 0x34, 0xdf, 0x10, 0xb4, 0x15, 0x90, 0x03, 0xfa,
-       0xa4, 0x3e, 0xd9, 0x4a, 0xf1, 0x96, 0xe6, 0x94, 0x33, 0x80, 0x9a, 0x11,
-       0xd8, 0x99, 0x10, 0x84, 0x47, 0x17, 0x91, 0xbf, 0xc1, 0xf0, 0xe8, 0x4a,
-       0x4f, 0x92, 0xee, 0x2d, 0x25, 0x7c, 0xbe, 0x58, 0xdf, 0x06, 0x33, 0x0b,
-       0xb9, 0x41, 0x1f, 0xc4, 0x27, 0xa3, 0x61, 0xff, 0x79, 0x28, 0xa9, 0xb3,
-       0x92, 0x52, 0xa1, 0x3c, 0x35, 0x34, 0x22, 0x94, 0xc1, 0xcb, 0x42, 0x49,
-       0x96, 0xac, 0x1e, 0xcf, 0x36, 0xb4, 0x5b, 0x58, 0x7c, 0x10, 0xd1, 0x02,
-       0x70, 0x1b, 0x01, 0xbc, 0x7b, 0x6e, 0x26, 0x9b, 0xd4, 0x3e, 0xe2, 0xd8,
-       0x9e, 0x3c, 0x43, 0x54, 0x2f, 0xce, 0x70, 0xcf, 0x68, 0x5b, 0xb5, 0x67,
-       0x34, 0x68, 0xf5, 0x8c, 0xce, 0x4b, 0x4a, 0x62, 0xbe, 0x67, 0x74, 0x05,
-       0x3c, 0x97, 0xd2, 0xef, 0xad, 0xce, 0xb7, 0xb4, 0x3a, 0x5f, 0x5b, 0x01,
-       0x22, 0x9a, 0x31, 0xcc, 0x1a, 0xd5, 0x43, 0xfc, 0x26, 0x1d, 0xae, 0x88,
-       0xda, 0x73, 0x18, 0x21, 0x44, 0xa9, 0xde, 0xbd, 0x9e, 0xf2, 0xa0, 0x3b,
-       0xb3, 0x03, 0x33, 0x9a, 0xd2, 0x37, 0x00, 0xb6, 0x9d, 0x6e, 0xec, 0xa3,
-       0x18, 0xba, 0xb7, 0xcc, 0xf5, 0xc8, 0xb0, 0x38, 0xcb, 0x76, 0xe3, 0xb4,
-       0xa5, 0x66, 0xaf, 0xff, 0x70, 0x75, 0xfd, 0x21, 0x6b, 0xfd, 0x0b, 0x92,
-       0xd2, 0x5f, 0x5d, 0x5f, 0xfb, 0x33, 0xa1, 0xa4, 0x68, 0xfd, 0x9e, 0x3d,
-       0xb4, 0xbe, 0x4b, 0xe5, 0xb5, 0x1f, 0xe6, 0xb5, 0xe9, 0x73, 0x08, 0xd7,
-       0x93, 0xdd, 0xbc, 0x57, 0x90, 0xc5, 0xbb, 0xb9, 0x35, 0xd8, 0x35, 0xb3,
-       0x06, 0x3b, 0xc9, 0xdf, 0xb6, 0x6a, 0x0d, 0x54, 0xa7, 0xa1, 0xde, 0xa7,
-       0xe2, 0xb2, 0x23, 0x22, 0xa4, 0xf5, 0xed, 0x2d, 0x84, 0x41, 0x4e, 0x34,
-       0xcb, 0xf8, 0xd4, 0x1c, 0x50, 0xd7, 0xf4, 0x39, 0x91, 0xfc, 0x7d, 0x0f,
-       0xfe, 0x5c, 0x22, 0xff, 0x7d, 0x67, 0x81, 0x40, 0xd2, 0x63, 0xd5, 0x1c,
-       0x09, 0xe1, 0x29, 0xfe, 0xd8, 0x69, 0xdb, 0x7b, 0x2b, 0x7c, 0x8d, 0x68,
-       0x68, 0x50, 0x6f, 0x40, 0x43, 0xa3, 0x6c, 0x38, 0xa8, 0x8e, 0x59, 0x4f,
-       0x21, 0xd1, 0xcc, 0xf5, 0x51, 0x3c, 0x35, 0x71, 0x65, 0xf9, 0xdf, 0x9b,
-       0x89, 0xeb, 0xf8, 0x39, 0x02, 0x15, 0x56, 0x4c, 0xfc, 0xb2, 0x39, 0xe2,
-       0xe4, 0xbf, 0x6d, 0x54, 0x97, 0xd6, 0x51, 0xf0, 0xed, 0xc1, 0x9e, 0xac,
-       0x92, 0xda, 0x43, 0x75, 0xe5, 0xfe, 0x48, 0x5b, 0xcf, 0x26, 0x51, 0x83,
-       0xd0, 0xc2, 0xf0, 0xe0, 0x00, 0x92, 0xcd, 0xf5, 0x55, 0x3a, 0x1e, 0x46,
-       0xb3, 0x8b, 0x9e, 0xe3, 0x79, 0xae, 0xb1, 0xa7, 0x22, 0xd9, 0x13, 0xdf,
-       0xe7, 0xef, 0x57, 0xef, 0xcb, 0xbf, 0xa3, 0x4f, 0xae, 0xfa, 0xaf, 0x4b,
-       0xbf, 0xec, 0xfa, 0xb1, 0x2f, 0xb9, 0xfe, 0x6f, 0xd5, 0xe7, 0x95, 0x46,
-       0xa7, 0x95, 0xfb, 0x93, 0x0e, 0xee, 0x4b, 0x3a, 0xf5, 0x42, 0xd7, 0x2e,
-       0xf5, 0x3f, 0x51, 0xcc, 0xe2, 0x7e, 0x04, 0xe7, 0xdb, 0x33, 0x56, 0x3f,
-       0xe2, 0xf8, 0x6f, 0x61, 0x4f, 0x8e, 0x1d, 0x6e, 0x51, 0x37, 0x6e, 0x98,
-       0x4d, 0xea, 0x1f, 0x51, 0x7d, 0xb2, 0x03, 0x03, 0x31, 0x0d, 0x63, 0x59,
-       0xa5, 0xef, 0x0e, 0xa8, 0xc9, 0x3b, 0x05, 0x4d, 0x54, 0x72, 0x0b, 0x69,
-       0xbc, 0x7a, 0x4f, 0x33, 0xa8, 0xe6, 0xaa, 0xa0, 0x96, 0x62, 0x8f, 0x53,
-       0xf5, 0xcb, 0x28, 0x05, 0x64, 0x67, 0x29, 0x28, 0xd7, 0x94, 0x5a, 0xe4,
-       0x5a, 0x1a, 0xe7, 0x1d, 0x57, 0x2e, 0xdf, 0x81, 0x1d, 0xb8, 0xbc, 0xdc,
-       0x63, 0x34, 0xeb, 0x8a, 0xbf, 0x59, 0xda, 0x81, 0x5d, 0x31, 0x7e, 0xb6,
-       0x9b, 0x6a, 0x2f, 0x88, 0xc6, 0x0c, 0x21, 0x5c, 0x5d, 0x60, 0x37, 0xd5,
-       0x97, 0x4b, 0x1c, 0x6a, 0xcf, 0xaf, 0x85, 0x53, 0x76, 0x97, 0x20, 0x7c,
-       0x19, 0x07, 0x0e, 0x76, 0xc2, 0xed, 0x5e, 0xa1, 0x0c, 0x9e, 0x10, 0xc3,
-       0x78, 0x36, 0x16, 0xe9, 0xdb, 0x2c, 0x42, 0xb2, 0x87, 0xee, 0xb9, 0x32,
-       0x10, 0x72, 0xc6, 0x70, 0xbb, 0x56, 0x28, 0x41, 0x87, 0x48, 0x62, 0x40,
-       0x55, 0xb5, 0x71, 0xc8, 0xb4, 0x26, 0x44, 0x6d, 0x46, 0xb9, 0x7c, 0x96,
-       0xb0, 0xd1, 0x95, 0xa5, 0xc3, 0xe8, 0x58, 0x1e, 0xd9, 0xdb, 0xef, 0x50,
-       0x65, 0xc2, 0x6c, 0xc2, 0x99, 0xf1, 0xe2, 0xa6, 0x03, 0xf3, 0xfd, 0x19,
-       0xd3, 0xfc, 0x38, 0x56, 0xb9, 0x97, 0x44, 0x28, 0xd7, 0x97, 0xa2, 0xb2,
-       0x97, 0xf0, 0x79, 0xdb, 0x01, 0xc6, 0x4b, 0x9c, 0x0f, 0x2a, 0x64, 0x37,
-       0xed, 0xc4, 0x63, 0x1f, 0x66, 0xd2, 0x8c, 0x9f, 0x74, 0x4c, 0x53, 0x6d,
-       0xa3, 0x8e, 0xb6, 0x50, 0xae, 0x4f, 0x60, 0x2e, 0xcd, 0x7d, 0x9c, 0x41,
-       0x92, 0x71, 0x3f, 0xd1, 0xbf, 0x81, 0xea, 0xda, 0x14, 0xc5, 0x2b, 0x96,
-       0xf1, 0x00, 0xf7, 0x6b, 0xa9, 0x96, 0xfe, 0x79, 0xd7, 0xd7, 0xc6, 0x20,
-       0xbb, 0xf5, 0xd7, 0xba, 0xae, 0x3f, 0x80, 0x46, 0xca, 0xe7, 0x3a, 0x55,
-       0x2e, 0x88, 0x46, 0x22, 0xda, 0x79, 0x44, 0x82, 0x2f, 0x93, 0x3e, 0x46,
-       0x54, 0x60, 0xa7, 0x55, 0x33, 0x3b, 0x61, 0x14, 0xd8, 0xa6, 0xe0, 0xae,
-       0xed, 0x6c, 0xc4, 0xfb, 0xb9, 0xa8, 0xd5, 0x0b, 0x32, 0xa8, 0x8e, 0x79,
-       0x49, 0x53, 0x52, 0x79, 0x7a, 0x6e, 0xa3, 0xff, 0x7f, 0xed, 0xa9, 0x8b,
-       0x43, 0xae, 0x53, 0xd9, 0xbf, 0xfe, 0xdc, 0x73, 0x96, 0x6c, 0xf4, 0xae,
-       0xc9, 0xbf, 0xf0, 0x7c, 0x12, 0xcf, 0x7b, 0x3e, 0x8a, 0x9b, 0x66, 0x82,
-       0x70, 0x65, 0x3f, 0xd5, 0xcd, 0x1f, 0x8f, 0x1a, 0x9e, 0xf3, 0x71, 0xee,
-       0xe9, 0x3a, 0xf1, 0x07, 0xf4, 0xfb, 0xe9, 0x51, 0x19, 0xb7, 0x16, 0x9b,
-       0xe1, 0x1a, 0x93, 0xc8, 0x3f, 0xd7, 0x52, 0xae, 0x72, 0xe0, 0x9e, 0xe8,
-       0x51, 0x54, 0x02, 0x0e, 0x1a, 0xb3, 0x9f, 0x7e, 0x73, 0x6f, 0xea, 0x71,
-       0x6c, 0xf6, 0xcf, 0x7a, 0xde, 0x8f, 0x33, 0xbd, 0x15, 0xa6, 0x97, 0x72,
-       0xe4, 0xed, 0xd8, 0x78, 0x07, 0x0c, 0x9f, 0x6e, 0xfd, 0xbb, 0x5f, 0xee,
-       0x6c, 0xc2, 0xe1, 0x5c, 0x33, 0x5e, 0xcc, 0x19, 0xee, 0x9f, 0x76, 0x46,
-       0x31, 0x38, 0x6a, 0xe2, 0x15, 0xcd, 0x18, 0xae, 0x25, 0x3b, 0x4f, 0x50,
-       0xad, 0x14, 0x5e, 0xae, 0xf8, 0x2f, 0x0b, 0x44, 0x24, 0x44, 0x86, 0x08,
-       0x2c, 0xde, 0x4d, 0xa1, 0x2b, 0x55, 0xaf, 0x47, 0xb4, 0xd7, 0x85, 0x59,
-       0x73, 0x6f, 0xa7, 0x93, 0x68, 0x00, 0xd6, 0x51, 0x4c, 0x9e, 0x4b, 0x47,
-       0x71, 0x6b, 0x44, 0xc6, 0xfa, 0xa2, 0x86, 0x17, 0xd3, 0x5e, 0xdc, 0x55,
-       0x8c, 0x13, 0x86, 0xf6, 0x13, 0xed, 0x09, 0x94, 0xd3, 0x01, 0x7c, 0xbd,
-       0xd8, 0x42, 0xf2, 0x0e, 0x62, 0x6d, 0x91, 0x31, 0x16, 0xe7, 0x67, 0xdd,
-       0xbd, 0x31, 0xde, 0x82, 0x1e, 0x8a, 0xdf, 0xb3, 0x69, 0xb8, 0xb7, 0xc7,
-       0x43, 0xe8, 0x2e, 0x46, 0x51, 0x24, 0x2c, 0x76, 0x3b, 0xcd, 0x79, 0x17,
-       0xe9, 0xa4, 0x9d, 0xea, 0xfb, 0x25, 0x11, 0x42, 0xa8, 0x45, 0xaf, 0x18,
-       0x26, 0xcc, 0x94, 0x28, 0x36, 0xe1, 0xfc, 0x18, 0xdb, 0xf9, 0x5b, 0x5d,
-       0xbb, 0x72, 0x7e, 0x84, 0x8a, 0xb8, 0x49, 0x06, 0xb6, 0x51, 0x95, 0x97,
-       0x2a, 0x12, 0xbd, 0xfb, 0x3a, 0xed, 0x7e, 0xec, 0x0d, 0xc5, 0xcf, 0xf9,
-       0x6d, 0x20, 0x3d, 0x7d, 0x72, 0x60, 0xd6, 0x73, 0x85, 0x64, 0xe0, 0xd3,
-       0x7f, 0xd4, 0xf5, 0xc6, 0x01, 0x20, 0x3a, 0xc5, 0xbc, 0x71, 0x7c, 0x0d,
-       0x27, 0x28, 0xbe, 0xb6, 0xcb, 0xf8, 0xb5, 0x49, 0xb5, 0x64, 0x68, 0x86,
-       0x7b, 0xff, 0xaa, 0x97, 0xe8, 0xf0, 0x23, 0x49, 0x6b, 0xdf, 0x56, 0xfc,
-       0xa1, 0xb9, 0x71, 0x61, 0x10, 0x5f, 0x8b, 0xd8, 0xb2, 0x7a, 0x9d, 0x74,
-       0x38, 0x3d, 0xd6, 0x8c, 0xb9, 0x31, 0xee, 0xad, 0x9c, 0xea, 0x3a, 0x34,
-       0x69, 0x62, 0x9d, 0x66, 0x78, 0x7e, 0xda, 0x79, 0x03, 0x1e, 0x38, 0x30,
-       0x72, 0xba, 0x86, 0xf4, 0x7a, 0x59, 0xbb, 0x1b, 0x8f, 0x4e, 0xe1, 0xab,
-       0xcd, 0xc0, 0x23, 0x41, 0x70, 0xff, 0x59, 0x09, 0x1d, 0x41, 0xa4, 0x67,
-       0x3b, 0x22, 0x7e, 0x55, 0x28, 0xda, 0x2b, 0x14, 0xab, 0xea, 0x08, 0x3b,
-       0xdc, 0x46, 0xb5, 0x7c, 0x0d, 0x79, 0xf0, 0x5d, 0x45, 0x27, 0xc9, 0x28,
-       0x88, 0xf2, 0x58, 0x0d, 0x24, 0xf2, 0x93, 0x0b, 0x2a, 0xd6, 0x35, 0x90,
-       0xac, 0x25, 0x21, 0x93, 0x9e, 0xdb, 0x71, 0x68, 0x74, 0x5e, 0x56, 0x5e,
-       0xdc, 0x42, 0x32, 0x7c, 0x76, 0xd4, 0xdc, 0xa1, 0xc6, 0x02, 0x24, 0x6b,
-       0x3f, 0xd1, 0x37, 0x2f, 0x27, 0x96, 0xdf, 0xbc, 0x9c, 0xee, 0xc6, 0xae,
-       0x39, 0x96, 0xdb, 0xbf, 0x47, 0x5e, 0xb3, 0x96, 0xdd, 0xad, 0x9b, 0x8c,
-       0xa2, 0xf9, 0xc0, 0x55, 0xd9, 0x31, 0x7d, 0x8f, 0x10, 0x1f, 0xdf, 0xf3,
-       0xad, 0x8c, 0x0c, 0x5e, 0x14, 0x5e, 0xa2, 0xc7, 0x4f, 0xba, 0x39, 0xeb,
-       0x62, 0x0c, 0x4e, 0x32, 0xb9, 0x2a, 0xe3, 0x20, 0xc9, 0x38, 0x38, 0xc5,
-       0xb2, 0xfe, 0x11, 0xc9, 0x1a, 0x78, 0x83, 0x70, 0xd7, 0xcd, 0xb1, 0x28,
-       0xea, 0x0f, 0x28, 0xc9, 0x66, 0x29, 0x9c, 0x68, 0x10, 0xa0, 0xea, 0x02,
-       0xed, 0xf5, 0xf8, 0x98, 0xe5, 0xac, 0x91, 0x9c, 0xbf, 0x37, 0x42, 0xfc,
-       0xac, 0xa1, 0xf9, 0xd6, 0x91, 0x9c, 0x93, 0xc4, 0xff, 0x6d, 0xd6, 0xbc,
-       0x2d, 0x34, 0xef, 0x06, 0xaa, 0x21, 0x66, 0x3d, 0x17, 0x88, 0x9e, 0xe8,
-       0xe7, 0xb4, 0x10, 0xca, 0x8e, 0x04, 0x2f, 0x52, 0xad, 0xbc, 0xd6, 0x1a,
-       0xe7, 0xa7, 0x71, 0x4c, 0xfb, 0x5b, 0xb5, 0x0e, 0xf5, 0xcb, 0x7a, 0xc7,
-       0x77, 0x83, 0x7b, 0x07, 0x06, 0xfa, 0xb1, 0x37, 0xbb, 0x81, 0x6a, 0x1e,
-       0x99, 0x30, 0xa4, 0x81, 0xef, 0xc7, 0x95, 0x68, 0xa3, 0xe0, 0xf8, 0x67,
-       0x90, 0x1f, 0x56, 0xa8, 0xde, 0x09, 0x87, 0xe6, 0x10, 0x94, 0x1d, 0x25,
-       0x99, 0xf0, 0x5e, 0x8b, 0x2c, 0x95, 0xc8, 0x5f, 0x83, 0xfd, 0x84, 0x93,
-       0x9d, 0x78, 0xb9, 0xe0, 0xc4, 0xab, 0xe9, 0x0d, 0x94, 0xe7, 0xdc, 0x84,
-       0x87, 0x0d, 0xb7, 0x73, 0xc5, 0x81, 0x1a, 0x3b, 0x26, 0x2f, 0x45, 0xef,
-       0xf8, 0xc3, 0xa8, 0xcb, 0x38, 0xfb, 0x28, 0x47, 0x6b, 0xb7, 0x91, 0x5c,
-       0xd6, 0x95, 0xf8, 0x7e, 0x0b, 0x32, 0xe9, 0x14, 0xb2, 0xd9, 0x30, 0xd5,
-       0x32, 0x4e, 0xe4, 0x9b, 0x5b, 0xac, 0xfe, 0x6c, 0x8e, 0xae, 0xe5, 0xca,
-       0x5f, 0xec, 0x1b, 0x7f, 0xab, 0xda, 0x2f, 0x1e, 0xa4, 0x9c, 0xd2, 0x4f,
-       0xd8, 0x73, 0x03, 0xc5, 0x77, 0x9b, 0xc6, 0xd9, 0x78, 0x1f, 0xf6, 0x14,
-       0xf4, 0xab, 0xf1, 0x63, 0xba, 0x60, 0xf7, 0x05, 0xb7, 0x90, 0x3c, 0xce,
-       0xa5, 0x4d, 0x3c, 0xaa, 0xb1, 0x3e, 0x29, 0x2e, 0xa5, 0xb9, 0x37, 0x68,
-       0xe2, 0x19, 0x4d, 0x70, 0xbc, 0xa1, 0x3c, 0xba, 0x01, 0x4b, 0x0a, 0x26,
-       0x4e, 0x6b, 0x2a, 0xc5, 0x2e, 0x18, 0x6e, 0xc2, 0x7e, 0x91, 0xd1, 0x7f,
-       0x31, 0xf3, 0xce, 0x21, 0xb4, 0x75, 0x02, 0x9b, 0x47, 0x25, 0xcc, 0xcd,
-       0x5c, 0xcd, 0xd1, 0x78, 0xf1, 0xf3, 0x3c, 0x9d, 0x98, 0x81, 0xb9, 0xc3,
-       0xa9, 0x2b, 0xc3, 0xbc, 0xd7, 0x32, 0x12, 0x57, 0x12, 0xb5, 0x56, 0xce,
-       0x56, 0xfb, 0x97, 0x48, 0x8a, 0x56, 0x12, 0x6d, 0xa9, 0x4f, 0x50, 0x59,
-       0x2f, 0x43, 0x09, 0xfe, 0x0c, 0x91, 0xe8, 0x20, 0xef, 0x29, 0x94, 0xed,
-       0xfc, 0xbd, 0xb4, 0x9a, 0xbf, 0xc3, 0x05, 0x8f, 0x50, 0xc7, 0x1c, 0xc8,
-       0xcf, 0x98, 0x94, 0x67, 0x05, 0x66, 0x49, 0xc1, 0x2f, 0x64, 0x77, 0xe0,
-       0xeb, 0x31, 0xd3, 0xbc, 0x2b, 0xae, 0x0e, 0x36, 0x4b, 0xf8, 0xd3, 0x06,
-       0xc2, 0x14, 0x64, 0xf7, 0x84, 0x01, 0x10, 0xda, 0xda, 0x69, 0x98, 0x32,
-       0xd5, 0x0c, 0x35, 0x3a, 0xf7, 0x1a, 0x7b, 0x45, 0x7b, 0x71, 0x83, 0xb8,
-       0xa1, 0xd8, 0x2f, 0x42, 0x87, 0xee, 0x14, 0xd1, 0xa7, 0x6c, 0xdc, 0xd6,
-       0x5a, 0xfc, 0xbc, 0x1f, 0xda, 0x43, 0x7c, 0xef, 0xd3, 0x4c, 0x3c, 0x4d,
-       0xbc, 0xed, 0x2d, 0xdb, 0xb5, 0xc8, 0xee, 0xb4, 0xcd, 0xdb, 0xa3, 0x74,
-       0xff, 0x62, 0x9a, 0xfd, 0xf1, 0x61, 0xab, 0xd7, 0xd9, 0x4c, 0xcf, 0xdc,
-       0x9c, 0x0d, 0x87, 0x06, 0x85, 0x32, 0x34, 0x0b, 0xee, 0x77, 0xb6, 0x55,
-       0x4e, 0x0a, 0xca, 0x3d, 0x12, 0xc7, 0x57, 0xf6, 0x79, 0x9b, 0xf6, 0x65,
-       0x05, 0x58, 0x71, 0x91, 0xe9, 0xbf, 0x91, 0xea, 0xbe, 0x9f, 0xa5, 0xdb,
-       0xfa, 0xdd, 0x24, 0xb6, 0xf3, 0xf1, 0x6e, 0x71, 0x89, 0xea, 0xbe, 0x57,
-       0xd3, 0xc9, 0x85, 0x75, 0xe8, 0x11, 0x17, 0x0a, 0x7d, 0xe2, 0xc3, 0x7c,
-       0x2f, 0x9c, 0x63, 0xf7, 0x8b, 0x77, 0xf3, 0x4c, 0x5b, 0xbf, 0x38, 0x33,
-       0x7b, 0xde, 0x92, 0xfd, 0x2e, 0x8d, 0xfb, 0x9a, 0xf5, 0xb5, 0xf0, 0x99,
-       0x04, 0x4f, 0x59, 0x8f, 0xdc, 0xe7, 0xb3, 0xfb, 0x43, 0xeb, 0xe2, 0x39,
-       0xd3, 0xa9, 0x72, 0xaf, 0x37, 0x68, 0xf1, 0x38, 0x43, 0x78, 0x79, 0x36,
-       0xbf, 0x41, 0x1c, 0x2e, 0xd8, 0xfc, 0x4d, 0x17, 0xd8, 0x6e, 0x65, 0xca,
-       0x0d, 0x5f, 0xcc, 0xcf, 0x06, 0xfc, 0x9d, 0x41, 0xd4, 0x58, 0xfd, 0x24,
-       0x13, 0xe3, 0x5a, 0x24, 0xf4, 0x0a, 0x82, 0x70, 0x96, 0xd8, 0xa6, 0x4d,
-       0x3c, 0xa7, 0xb9, 0x20, 0x8d, 0xcb, 0x24, 0x17, 0xb2, 0x21, 0x9f, 0x0b,
-       0x8e, 0x69, 0xae, 0x01, 0xe2, 0xb5, 0xdc, 0x67, 0x08, 0x39, 0xf8, 0xfb,
-       0x17, 0x6d, 0xcd, 0x45, 0x79, 0x80, 0xfb, 0xe3, 0x6f, 0xd6, 0xd8, 0x36,
-       0xc7, 0xf9, 0x68, 0xbe, 0xa7, 0x4d, 0x39, 0xb6, 0x93, 0x7b, 0xd9, 0x6e,
-       0xcc, 0xe5, 0x6a, 0xb8, 0xc5, 0xe0, 0xae, 0xe9, 0x34, 0x71, 0x4e, 0x73,
-       0x52, 0x5d, 0xf2, 0x10, 0xe5, 0x26, 0x07, 0x64, 0xf5, 0x6e, 0x94, 0x26,
-       0x9d, 0x0e, 0xde, 0x73, 0xfa, 0x59, 0x8c, 0x7b, 0x00, 0xc0, 0x7e, 0xe2,
-       0xe1, 0x99, 0x5c, 0x88, 0xea, 0x7f, 0xb9, 0x5a, 0x43, 0xfc, 0x01, 0x8e,
-       0xe7, 0x24, 0xd1, 0xac, 0x43, 0x4a, 0xac, 0x34, 0xf1, 0xc9, 0xf2, 0x48,
-       0xf4, 0x32, 0xc5, 0x2f, 0x3f, 0xe5, 0xaa, 0xdd, 0x85, 0x46, 0xfc, 0x2c,
-       0xd7, 0x88, 0x57, 0x73, 0xa4, 0xc3, 0xd8, 0x48, 0xbf, 0x87, 0x62, 0xe4,
-       0xd2, 0x98, 0x0b, 0x5b, 0x23, 0x86, 0xdf, 0x83, 0x28, 0xce, 0x25, 0xae,
-       0x47, 0x2a, 0x10, 0xee, 0x19, 0x41, 0x13, 0xde, 0xcc, 0x81, 0x30, 0x04,
-       0xdc, 0x4b, 0x68, 0x8e, 0xf7, 0x62, 0xc6, 0x90, 0x0b, 0x0a, 0xd5, 0x1f,
-       0x88, 0xd7, 0xc3, 0xac, 0x39, 0x19, 0xa7, 0x1c, 0x5d, 0x6c, 0x44, 0x6f,
-       0xae, 0x09, 0xfd, 0x94, 0xab, 0x56, 0xaf, 0x8c, 0xe3, 0xdd, 0xac, 0x57,
-       0xdc, 0x94, 0x1d, 0xe9, 0xf7, 0xd3, 0x9c, 0xae, 0xe5, 0xca, 0xd0, 0xb3,
-       0x04, 0xd8, 0x64, 0x84, 0xd9, 0xbc, 0xb7, 0xfb, 0x28, 0xde, 0x1e, 0x16,
-       0x9f, 0xe1, 0x49, 0xb2, 0xc1, 0x2d, 0x9a, 0x52, 0xb9, 0x20, 0x45, 0x4e,
-       0xaf, 0x87, 0x32, 0x7c, 0x9b, 0x30, 0xa2, 0x0d, 0x14, 0x47, 0x9a, 0xed,
-       0x18, 0x61, 0x44, 0x84, 0x4c, 0x98, 0xdc, 0x09, 0xb7, 0x6a, 0xa0, 0xa7,
-       0x93, 0x65, 0xea, 0x86, 0xfb, 0x29, 0xb2, 0x1b, 0xc7, 0x17, 0xfb, 0xf3,
-       0x8d, 0x78, 0x83, 0xf2, 0xe4, 0xeb, 0x39, 0xc8, 0xb5, 0x14, 0xfb, 0x3f,
-       0xa0, 0xd8, 0x7f, 0x2a, 0x36, 0x12, 0xe2, 0x98, 0x5f, 0x88, 0xe1, 0x5b,
-       0x04, 0x83, 0x5b, 0xbc, 0xb4, 0xe6, 0x26, 0xc1, 0xeb, 0x20, 0xb9, 0x58,
-       0xe7, 0xbe, 0x9a, 0xc5, 0x0f, 0xc5, 0x61, 0xe6, 0xe9, 0xff, 0x27, 0xed,
-       0xdb, 0x6b, 0xe1, 0x69, 0x22, 0x5d, 0xce, 0xf7, 0x24, 0xaf, 0xed, 0x47,
-       0x72, 0x1d, 0x63, 0xe3, 0xc2, 0x1a, 0xbd, 0x4e, 0xbc, 0x94, 0x63, 0x9b,
-       0x33, 0xf1, 0xbc, 0xa6, 0x51, 0xcd, 0xc2, 0xb5, 0xf6, 0x10, 0xd5, 0x2d,
-       0xdc, 0x27, 0x32, 0xdc, 0x27, 0x89, 0xc2, 0xbd, 0x39, 0xfc, 0x9e, 0x0c,
-       0x69, 0x59, 0x2d, 0xa6, 0x90, 0x77, 0x3a, 0x09, 0x6b, 0x70, 0x8c, 0x65,
-       0x3f, 0x7a, 0xab, 0x4b, 0xcd, 0xc3, 0xf0, 0xea, 0x3d, 0x30, 0x2c, 0xdf,
-       0xad, 0x13, 0x0f, 0x90, 0x8d, 0xbc, 0x1c, 0xab, 0x45, 0x9e, 0xea, 0x1e,
-       0xc2, 0xdf, 0xee, 0x3f, 0xa3, 0xe7, 0x13, 0x13, 0xd8, 0x13, 0x84, 0xf4,
-       0x5d, 0x3f, 0xfe, 0x02, 0x67, 0x5d, 0x8c, 0xcb, 0xe1, 0xee, 0x8b, 0x1b,
-       0x9e, 0xf5, 0xf1, 0x3a, 0x71, 0x7b, 0xae, 0x1d, 0x17, 0x27, 0x1b, 0xc9,
-       0xbe, 0x9b, 0xb0, 0x78, 0x3c, 0x88, 0xf7, 0x88, 0x96, 0x61, 0x8d, 0xb1,
-       0xba, 0x31, 0xdc, 0x0c, 0x65, 0x88, 0xea, 0xa1, 0xbe, 0x9f, 0x0b, 0xf6,
-       0x01, 0xa5, 0xe7, 0x0e, 0xe1, 0x81, 0x1a, 0x49, 0x92, 0xec, 0x4d, 0x73,
-       0x4c, 0x6b, 0xd3, 0xbc, 0xe0, 0xfe, 0xcf, 0xdd, 0xd8, 0x3f, 0xc7, 0xb4,
-       0x9c, 0xea, 0xba, 0x61, 0x96, 0x3f, 0x4f, 0x77, 0x5d, 0x6f, 0x7d, 0xbe,
-       0x56, 0xfd, 0xac, 0x74, 0x85, 0xac, 0xcf, 0x1f, 0xd1, 0x27, 0xf7, 0x99,
-       0xc3, 0x46, 0x8d, 0xf8, 0xbe, 0x8b, 0xfb, 0xcd, 0x49, 0xf0, 0xff, 0x71,
-       0x97, 0xdd, 0xaf, 0xbb, 0x1b, 0x86, 0xd5, 0x13, 0xf9, 0xb5, 0xd5, 0x8b,
-       0x0e, 0x91, 0x1b, 0xc8, 0xc4, 0x9f, 0x4c, 0x58, 0x2b, 0x10, 0xa3, 0xc2,
-       0xbc, 0x49, 0x36, 0x16, 0xeb, 0xfd, 0x54, 0x1b, 0xc8, 0xc4, 0xaf, 0x81,
-       0x3d, 0x9d, 0x02, 0xfb, 0x55, 0x1d, 0x3f, 0x2d, 0x70, 0x0c, 0x77, 0xe2,
-       0x99, 0xb4, 0x12, 0x4a, 0x89, 0x30, 0xd5, 0xf9, 0x0e, 0x84, 0x9a, 0xfb,
-       0xb1, 0x9f, 0xf2, 0xc9, 0x6c, 0x9a, 0xf3, 0x07, 0x7d, 0x52, 0x3c, 0x6f,
-       0xa0, 0xf8, 0xf3, 0xf1, 0xa8, 0x1d, 0xef, 0x8b, 0x71, 0x65, 0xef, 0x1f,
-       0x90, 0x4e, 0x9f, 0x2b, 0xf2, 0x9c, 0x06, 0xae, 0xac, 0x64, 0x1f, 0x56,
-       0xa2, 0x29, 0xc7, 0x7d, 0x08, 0xcd, 0x70, 0x6c, 0xa1, 0xe5, 0x68, 0xad,
-       0x83, 0xd9, 0x1a, 0xf4, 0xc5, 0x7b, 0x45, 0x7f, 0xa9, 0x8f, 0xf7, 0x14,
-       0xfc, 0x0b, 0xf4, 0x3b, 0xc5, 0x9a, 0x69, 0xee, 0x09, 0x6e, 0x10, 0x7d,
-       0x25, 0xee, 0x0b, 0x0e, 0x8b, 0x6f, 0x94, 0xd8, 0xe7, 0xe7, 0xfb, 0x83,
-       0xf3, 0xfa, 0xe7, 0xbe, 0xa0, 0xe1, 0x7e, 0x89, 0x64, 0xbf, 0x3d, 0xc7,
-       0x71, 0x58, 0x7a, 0xc0, 0x87, 0xe5, 0xc8, 0xbb, 0xe0, 0x3e, 0x11, 0xff,
-       0x1d, 0xdc, 0x45, 0xb8, 0x60, 0xb1, 0x6a, 0xeb, 0x6f, 0x75, 0xde, 0x81,
-       0xc4, 0x72, 0x12, 0xfa, 0x02, 0xd6, 0xe9, 0x00, 0xc5, 0xb3, 0x8c, 0x39,
-       0x18, 0x60, 0x5d, 0xb2, 0xbd, 0x59, 0x7d, 0x27, 0xca, 0x2b, 0x06, 0x22,
-       0x9d, 0x6e, 0xcc, 0xe6, 0x16, 0x51, 0x4d, 0x60, 0x62, 0xaf, 0x56, 0x8f,
-       0x5a, 0x2b, 0x06, 0xb8, 0x09, 0x47, 0x42, 0xf6, 0xd2, 0x3c, 0xe9, 0x31,
-       0x19, 0x1e, 0xba, 0x77, 0x92, 0x72, 0xd3, 0xfe, 0x4e, 0x7b, 0xee, 0xb6,
-       0xfc, 0x4d, 0xd8, 0x47, 0x1e, 0x5f, 0xaf, 0x46, 0x31, 0xea, 0xf7, 0x52,
-       0xac, 0xf9, 0x56, 0x75, 0xce, 0xcf, 0xc8, 0x36, 0x79, 0xbd, 0x4d, 0xb5,
-       0xb6, 0x1e, 0x96, 0xc9, 0x76, 0xed, 0x25, 0x1b, 0x75, 0xb4, 0xd6, 0xd6,
-       0xce, 0x0d, 0xe8, 0x19, 0xf5, 0x8a, 0x57, 0xd3, 0xf7, 0x98, 0xa1, 0x46,
-       0x1a, 0x47, 0x36, 0x5b, 0x53, 0xa5, 0xb7, 0x35, 0xff, 0xcf, 0xb5, 0x5c,
-       0xa7, 0x7b, 0x29, 0x8f, 0x3c, 0x98, 0x73, 0x20, 0x50, 0xbd, 0x1e, 0xcf,
-       0x87, 0xa0, 0x75, 0xd4, 0x01, 0x4d, 0x82, 0xae, 0xf1, 0xdc, 0xbc, 0x86,
-       0x8c, 0x46, 0xf2, 0x93, 0x6f, 0xc7, 0x13, 0xf8, 0x20, 0xeb, 0xc4, 0x7a,
-       0xca, 0xef, 0x6b, 0xd3, 0x3a, 0xce, 0x95, 0x6b, 0x79, 0x3d, 0xb2, 0xc3,
-       0xf9, 0x71, 0x4e, 0x1a, 0xe7, 0xc6, 0x74, 0xfe, 0x8b, 0xf4, 0x05, 0x88,
-       0xe6, 0x22, 0x8d, 0xe5, 0x7b, 0xe7, 0xad, 0xbe, 0xc0, 0xf1, 0x6b, 0xea,
-       0x29, 0xc7, 0x38, 0xf7, 0x8a, 0xec, 0x5c, 0xd0, 0xad, 0xb1, 0x2e, 0x7d,
-       0xb8, 0x3c, 0x61, 0xe0, 0xdc, 0xca, 0x06, 0x5c, 0x99, 0x68, 0xc5, 0x03,
-       0x39, 0x0f, 0x2e, 0x4c, 0x98, 0xb8, 0x69, 0x39, 0xee, 0x09, 0x12, 0x06,
-       0x6b, 0x20, 0xbf, 0xff, 0x29, 0xd5, 0x3c, 0x14, 0x4f, 0x89, 0xd2, 0x48,
-       0x62, 0x1d, 0xd9, 0x75, 0x34, 0x86, 0xd4, 0x2d, 0xf1, 0x48, 0xe8, 0x3c,
-       0xbe, 0x67, 0x52, 0x2c, 0xf6, 0x4b, 0x7a, 0xaf, 0x70, 0x5a, 0xfb, 0x84,
-       0x1b, 0xac, 0x7d, 0x45, 0xc7, 0xf4, 0xb0, 0x90, 0x4a, 0xd7, 0xfa, 0xf5,
-       0x97, 0xe5, 0x21, 0xce, 0x3d, 0x9c, 0x23, 0xc7, 0x4d, 0x97, 0xba, 0xc1,
-       0xea, 0xd3, 0xec, 0xce, 0x5f, 0xcd, 0x4d, 0x57, 0xf3, 0xd1, 0xce, 0x6a,
-       0x1e, 0x1a, 0x29, 0xbc, 0xf3, 0x05, 0xfc, 0x14, 0xaa, 0xee, 0x57, 0x70,
-       0xfe, 0x71, 0x8b, 0xb3, 0x64, 0x0e, 0x7b, 0xc8, 0x07, 0x8f, 0x6a, 0x27,
-       0x82, 0x94, 0x21, 0xe0, 0xec, 0x10, 0x78, 0x90, 0xcf, 0x8b, 0x04, 0x4c,
-       0xdc, 0xa9, 0xd9, 0xf6, 0xb0, 0xbc, 0xd3, 0x85, 0x41, 0xca, 0x49, 0xae,
-       0x98, 0x97, 0x7c, 0xdd, 0x8f, 0xd7, 0x34, 0xb6, 0xe1, 0x5b, 0xaa, 0x39,
-       0x89, 0xf7, 0xbf, 0xed, 0xbd, 0xea, 0xdf, 0xee, 0x5b, 0xcf, 0xdb, 0xa6,
-       0x86, 0xe4, 0x42, 0x78, 0xde, 0x8b, 0xab, 0x54, 0x37, 0xc8, 0x54, 0x33,
-       0xac, 0x47, 0x62, 0x81, 0x92, 0x64, 0xfd, 0xfb, 0x68, 0xee, 0x5f, 0x76,
-       0x0e, 0xe2, 0xfe, 0x71, 0x07, 0xea, 0x54, 0x8e, 0xb3, 0x06, 0xf6, 0x37,
-       0x72, 0x9c, 0xea, 0xc5, 0x8e, 0x71, 0xb7, 0x38, 0x99, 0x73, 0xe2, 0xc9,
-       0xbe, 0x47, 0xb0, 0xa0, 0x63, 0x4b, 0xb5, 0xd7, 0xc9, 0xdf, 0xbf, 0x89,
-       0xd4, 0x22, 0x5e, 0x9f, 0x7b, 0x68, 0x02, 0xde, 0x0e, 0xe6, 0x03, 0x9e,
-       0x8b, 0x34, 0xff, 0xe6, 0x51, 0xa7, 0x38, 0x9f, 0xfe, 0x1b, 0xf3, 0x48,
-       0x80, 0x71, 0x01, 0xdf, 0xab, 0x87, 0xd1, 0xc8, 0x63, 0x59, 0x87, 0x5e,
-       0xaa, 0x49, 0x07, 0x31, 0x4a, 0x74, 0xbd, 0x6e, 0xcd, 0x75, 0xb6, 0x4a,
-       0xbf, 0x57, 0x34, 0x64, 0x64, 0x23, 0x48, 0xb4, 0xf8, 0x57, 0xf6, 0xa1,
-       0xa1, 0x74, 0x6d, 0xbe, 0x25, 0xa3, 0xf7, 0x30, 0x7f, 0x9c, 0x13, 0x06,
-       0xf0, 0x41, 0x5a, 0xe0, 0x7d, 0xcb, 0x06, 0x07, 0xd0, 0x5a, 0xa0, 0xfa,
-       0xdf, 0x8a, 0x21, 0x3c, 0x2e, 0x6e, 0xdb, 0xb6, 0x63, 0x10, 0xdb, 0x89,
-       0x97, 0x7a, 0xe2, 0xe5, 0xe3, 0xd8, 0x12, 0x5a, 0x87, 0xaf, 0x1d, 0x93,
-       0xab, 0xfd, 0x87, 0xea, 0x5c, 0xab, 0xc0, 0xbd, 0x29, 0xa7, 0x1a, 0xc1,
-       0xb6, 0xf1, 0x48, 0xbf, 0xd7, 0xc1, 0x76, 0x18, 0xc1, 0x7d, 0xd3, 0x49,
-       0xba, 0xcf, 0x73, 0x05, 0xb1, 0x29, 0xe3, 0x14, 0xef, 0x52, 0x9d, 0x74,
-       0x3c, 0xed, 0x58, 0x24, 0xe1, 0x07, 0xe6, 0x93, 0x81, 0x1d, 0xb8, 0x45,
-       0xeb, 0xc5, 0xbd, 0x64, 0x83, 0xdd, 0xad, 0x3b, 0x30, 0x41, 0x36, 0xb0,
-       0xb9, 0x89, 0x6a, 0xb7, 0x58, 0xd9, 0x1c, 0x08, 0xb0, 0x1c, 0x05, 0x7a,
-       0xe8, 0x7a, 0x23, 0xd5, 0x73, 0x8e, 0x18, 0x59, 0x1b, 0xf9, 0x85, 0xac,
-       0x2a, 0xb9, 0x24, 0xea, 0xad, 0x35, 0x1b, 0x29, 0x4f, 0xbb, 0x18, 0x1f,
-       0xf8, 0x18, 0x27, 0x7c, 0x91, 0x1e, 0xc3, 0xac, 0x55, 0xd5, 0xe8, 0x7a,
-       0x47, 0x6b, 0x6e, 0x8e, 0x6c, 0x76, 0x4d, 0xc7, 0xb5, 0xcf, 0xcd, 0xcb,
-       0x48, 0x43, 0x4d, 0xc7, 0x8c, 0x59, 0xf1, 0x8f, 0xc0, 0xdf, 0x71, 0xad,
-       0xee, 0xe7, 0xe7, 0x60, 0x9a, 0xed, 0xb8, 0x16, 0x72, 0x44, 0xfc, 0xf7,
-       0xe0, 0xaf, 0x68, 0x8d, 0x20, 0x36, 0x96, 0x7a, 0x31, 0x30, 0x2e, 0x7d,
-       0x8e, 0x4f, 0x7c, 0x6c, 0xcb, 0x9f, 0xf3, 0xbf, 0x75, 0x3c, 0xd2, 0xe3,
-       0xa9, 0xf2, 0x7f, 0xef, 0xf4, 0xe7, 0x73, 0x0d, 0x67, 0x38, 0xaf, 0xf2,
-       0x7c, 0xbc, 0xef, 0x37, 0x2f, 0xdf, 0x20, 0xb6, 0x5b, 0xf3, 0xed, 0x75,
-       0xb3, 0x0f, 0xbb, 0xc8, 0xd7, 0xd7, 0x75, 0x18, 0x78, 0x2d, 0xf1, 0x80,
-       0xb9, 0xd5, 0x92, 0xc1, 0x9f, 0x58, 0xcf, 0xf7, 0xb4, 0x56, 0x2c, 0x7b,
-       0xb7, 0xfd, 0x96, 0xf7, 0x04, 0x78, 0x8f, 0x60, 0x7e, 0x5f, 0x20, 0x6a,
-       0xed, 0xd7, 0xd9, 0x7b, 0x03, 0xdf, 0xa2, 0x38, 0xcb, 0xfb, 0x06, 0xb2,
-       0x70, 0x8e, 0xd7, 0x09, 0xd7, 0x38, 0xd3, 0xf6, 0x81, 0x6c, 0xfb, 0xd8,
-       0x5f, 0x21, 0x19, 0xe0, 0xfe, 0xa4, 0x6d, 0xff, 0xd1, 0xce, 0xfb, 0x80,
-       0xa7, 0x0c, 0x77, 0xed, 0x0a, 0x50, 0x8d, 0xdf, 0x67, 0xd9, 0xc3, 0x75,
-       0xfa, 0xdb, 0xab, 0xfe, 0xb1, 0x95, 0xeb, 0x7c, 0xee, 0x09, 0xbe, 0xbb,
-       0x6a, 0xb2, 0x55, 0x22, 0x3c, 0xc5, 0x6b, 0xf2, 0xde, 0x02, 0xe7, 0x55,
-       0x2b, 0xee, 0x7a, 0x1a, 0x57, 0x18, 0xee, 0x05, 0x2b, 0x9c, 0x62, 0x51,
-       0xa6, 0x9f, 0x6c, 0x4f, 0x45, 0x22, 0x63, 0x78, 0x9a, 0x57, 0x84, 0xf0,
-       0x50, 0x66, 0x3e, 0x26, 0xb7, 0xa3, 0x7d, 0x0a, 0xf8, 0xdf, 0x99, 0x20,
-       0xda, 0x26, 0xc2, 0x43, 0xb7, 0x3b, 0xc2, 0xc3, 0xef, 0x38, 0xf8, 0x5e,
-       0xa1, 0xeb, 0x26, 0x0b, 0x7f, 0x1f, 0xed, 0x5a, 0x66, 0x7d, 0xbe, 0xdd,
-       0x75, 0x63, 0xe1, 0x6e, 0xa4, 0xe7, 0xdc, 0x97, 0xf3, 0x0e, 0x13, 0x0f,
-       0xc5, 0x1c, 0xf8, 0x9a, 0xf6, 0xd7, 0xe4, 0x5b, 0x82, 0x6c, 0xe3, 0x18,
-       0xe7, 0x60, 0x4b, 0xa7, 0xae, 0x15, 0x2a, 0xda, 0x32, 0x8d, 0x84, 0xd7,
-       0x9a, 0xa8, 0xe6, 0x6f, 0xc4, 0x0f, 0x73, 0x8c, 0xd7, 0x4c, 0x8a, 0xfb,
-       0x26, 0x5e, 0xef, 0x30, 0x86, 0x82, 0x50, 0x8c, 0x37, 0x85, 0x92, 0xba,
-       0xdd, 0xa1, 0x1c, 0x69, 0x72, 0xf8, 0xb1, 0x2f, 0x62, 0xe7, 0xd1, 0x4e,
-       0x2b, 0x6f, 0xbe, 0xd3, 0x65, 0xf7, 0xec, 0x4e, 0x56, 0xf3, 0xeb, 0xa9,
-       0x2e, 0x6d, 0x56, 0x39, 0x9a, 0x22, 0xff, 0x59, 0x48, 0xf1, 0x73, 0x3c,
-       0x9b, 0xb2, 0xce, 0x82, 0xfc, 0x32, 0x53, 0x43, 0xb6, 0x11, 0xd6, 0xc6,
-       0x11, 0x8e, 0x3e, 0x64, 0xd1, 0xfa, 0xb3, 0xae, 0x58, 0xa1, 0x8c, 0x8a,
-       0x53, 0x39, 0x08, 0x14, 0x09, 0x37, 0xb4, 0xf9, 0x5f, 0x46, 0x99, 0xfb,
-       0xa1, 0x56, 0xa0, 0x67, 0x1e, 0x5a, 0x0b, 0x40, 0x2e, 0xe3, 0xbe, 0x0c,
-       0xab, 0x17, 0xeb, 0xc0, 0x5a, 0x6d, 0x3b, 0xe1, 0x42, 0xde, 0xff, 0x15,
-       0x54, 0x63, 0x37, 0xa2, 0xb2, 0xc1, 0x89, 0xf1, 0x0c, 0xe7, 0xe1, 0x63,
-       0x5d, 0xf2, 0x28, 0x2a, 0x6e, 0x7b, 0x4f, 0x33, 0xe1, 0xa6, 0x0c, 0x3d,
-       0x57, 0x22, 0x4c, 0x4a, 0xb1, 0x63, 0x6b, 0xec, 0x37, 0x66, 0xb2, 0xd1,
-       0xde, 0x53, 0x19, 0x9d, 0x14, 0x58, 0xa0, 0x26, 0x31, 0x3a, 0xe7, 0xf4,
-       0xa5, 0xd3, 0x51, 0xa4, 0xcb, 0xfc, 0xbc, 0xfb, 0x72, 0xd2, 0x9a, 0x3f,
-       0xb2, 0x77, 0x89, 0xc3, 0x81, 0x65, 0x1d, 0x87, 0x50, 0x59, 0x68, 0xd3,
-       0x10, 0x24, 0x4c, 0xc0, 0x35, 0x6c, 0x13, 0xf1, 0x7a, 0xe7, 0xe3, 0x5c,
-       0x47, 0xfc, 0xa4, 0xeb, 0xe6, 0x29, 0xf6, 0xeb, 0x63, 0x5d, 0x1f, 0xa4,
-       0x95, 0x64, 0x93, 0x04, 0xb9, 0x8e, 0xf8, 0xbf, 0x6f, 0x94, 0xfb, 0x08,
-       0xbf, 0xe0, 0x3e, 0x02, 0xe5, 0x65, 0x65, 0xb8, 0x59, 0x78, 0xc5, 0xba,
-       0x0c, 0xd5, 0x15, 0x44, 0xf3, 0xa5, 0x88, 0xd2, 0x53, 0x22, 0x8c, 0xb2,
-       0x45, 0x50, 0x5d, 0x57, 0xb6, 0xe5, 0x65, 0x9f, 0xcd, 0xab, 0x5c, 0xc5,
-       0x21, 0x51, 0x0b, 0x77, 0xf0, 0x3e, 0x34, 0xe7, 0x71, 0x6b, 0x4f, 0x9f,
-       0xae, 0xff, 0xbc, 0x6b, 0x09, 0xd5, 0x16, 0x23, 0x4c, 0x1f, 0x78, 0xaf,
-       0x8f, 0x6a, 0xd0, 0xec, 0xf1, 0x2a, 0x2e, 0xf1, 0x56, 0xe5, 0xc2, 0xdf,
-       0xf9, 0x4c, 0xe2, 0x6b, 0x5d, 0x9b, 0x26, 0xf9, 0x8c, 0xe2, 0x4f, 0xba,
-       0xd6, 0x4c, 0x2a, 0xa1, 0x8d, 0xb4, 0xee, 0x6e, 0xde, 0x5f, 0xa7, 0x39,
-       0x67, 0x35, 0xa6, 0xbb, 0xd0, 0x75, 0x73, 0x96, 0x7b, 0xcb, 0xc7, 0xba,
-       0xcc, 0x6c, 0x98, 0x31, 0xa8, 0x65, 0x2b, 0x89, 0x02, 0x55, 0xf3, 0xd7,
-       0xd9, 0xbc, 0xba, 0x48, 0x1f, 0x87, 0xd2, 0x84, 0x76, 0xe2, 0xb6, 0x6e,
-       0x56, 0x17, 0xd6, 0x20, 0xd5, 0xd4, 0x4d, 0x35, 0xa8, 0xdf, 0xb7, 0x36,
-       0xd3, 0x8d, 0x09, 0xd2, 0xe1, 0xa6, 0x52, 0xd0, 0xd7, 0x9d, 0x51, 0x31,
-       0x50, 0xe2, 0x7a, 0xb3, 0xd2, 0xb5, 0x6b, 0x72, 0xaa, 0x5a, 0xff, 0xf6,
-       0x53, 0xcd, 0x4a, 0x76, 0x91, 0xb1, 0x6d, 0xae, 0xb5, 0x40, 0x34, 0x0b,
-       0x7b, 0x5e, 0x37, 0xad, 0x73, 0xfd, 0xe8, 0x77, 0xcd, 0xd0, 0x42, 0xb6,
-       0x85, 0xbb, 0xf1, 0xf8, 0x94, 0xcf, 0x08, 0xe8, 0x7e, 0x74, 0x76, 0x9c,
-       0xa2, 0x67, 0xdb, 0xf1, 0xf8, 0xe1, 0x5b, 0x90, 0xff, 0x23, 0x27, 0x2e,
-       0x66, 0x92, 0x58, 0xda, 0xf1, 0x55, 0x9c, 0xd9, 0x20, 0xe3, 0xef, 0x32,
-       0x5e, 0x5c, 0x22, 0xfe, 0x0c, 0x6b, 0x8e, 0x7f, 0xcf, 0xfe, 0x90, 0x5b,
-       0xb8, 0xc7, 0x35, 0xc6, 0x9e, 0xbf, 0xe7, 0x06, 0xf7, 0xde, 0x0c, 0xd4,
-       0x10, 0x0e, 0x0a, 0x13, 0xcd, 0x6a, 0x86, 0xcf, 0x38, 0x05, 0x7c, 0x9c,
-       0x2b, 0xa7, 0x89, 0x27, 0x47, 0xa9, 0xc5, 0xe7, 0x24, 0x7e, 0x9c, 0xa5,
-       0x73, 0x14, 0x03, 0xd8, 0x07, 0xdc, 0x97, 0x43, 0x96, 0x1d, 0x5c, 0xbb,
-       0xf6, 0x7e, 0x0f, 0xef, 0xf1, 0x1f, 0xcf, 0x72, 0x6c, 0x14, 0x54, 0xbb,
-       0x84, 0x90, 0x9c, 0x5d, 0x82, 0x9e, 0xd9, 0xed, 0x74, 0x5d, 0x45, 0x5f,
-       0xd5, 0xd7, 0x42, 0x05, 0x8f, 0x87, 0xf1, 0x49, 0x2e, 0x63, 0xff, 0x8e,
-       0x5c, 0xfd, 0xed, 0x16, 0x8d, 0xe3, 0x84, 0x1d, 0x11, 0xb7, 0xf2, 0xb0,
-       0xda, 0xf1, 0xef, 0xe2, 0xe5, 0x72, 0xca, 0xa2, 0x61, 0x37, 0xcd, 0xc5,
-       0xb2, 0x79, 0xce, 0x4c, 0xdd, 0xc9, 0xf2, 0x0b, 0xf8, 0x7e, 0x48, 0xfa,
-       0x98, 0xa4, 0x67, 0x1e, 0x27, 0x1e, 0xca, 0xc4, 0x5b, 0xb6, 0xf4, 0x5d,
-       0x1a, 0xc3, 0xf7, 0x40, 0xfa, 0x32, 0x14, 0x67, 0xf5, 0x6c, 0xe6, 0x08,
-       0xe5, 0xcb, 0x5a, 0x8a, 0x45, 0x67, 0xe3, 0xf7, 0x62, 0x6d, 0x4e, 0x49,
-       0x1a, 0x14, 0x2e, 0x53, 0x7e, 0x08, 0xa7, 0xce, 0x36, 0xfc, 0x36, 0xd9,
-       0x70, 0x0b, 0x61, 0x80, 0x70, 0xe8, 0x1c, 0x8d, 0x37, 0x9c, 0x32, 0x1e,
-       0x9b, 0x90, 0x70, 0x8e, 0xf7, 0x80, 0x85, 0xfd, 0xbc, 0x01, 0x1e, 0x3b,
-       0xff, 0xbd, 0x8e, 0xea, 0xba, 0x70, 0x82, 0xb2, 0xaa, 0x51, 0x4f, 0xb8,
-       0xbd, 0xd0, 0xf9, 0x08, 0xf6, 0x53, 0x7d, 0xbf, 0x35, 0x46, 0x32, 0x69,
-       0x8c, 0x53, 0xbd, 0xd1, 0x36, 0x74, 0x01, 0x7f, 0x67, 0x56, 0x78, 0x1f,
-       0x5d, 0x84, 0x13, 0x17, 0xf0, 0x99, 0x29, 0xa9, 0xea, 0xe9, 0x19, 0xa8,
-       0x95, 0x73, 0x68, 0x1b, 0xbe, 0x82, 0x0f, 0x4d, 0xde, 0x63, 0x97, 0x25,
-       0x89, 0x30, 0x60, 0xd8, 0xef, 0x44, 0x00, 0x95, 0x80, 0x84, 0x5b, 0x35,
-       0xee, 0x49, 0x2b, 0xc3, 0x4f, 0x13, 0x96, 0x7f, 0x5f, 0xb4, 0x0d, 0x7e,
-       0x8c, 0x33, 0x66, 0xbe, 0x91, 0xd7, 0x15, 0x48, 0xdc, 0xd8, 0x76, 0xba,
-       0x06, 0x4a, 0x8f, 0x4b, 0xa8, 0x89, 0x66, 0xe9, 0xaf, 0xcd, 0x33, 0x81,
-       0xcf, 0x4c, 0x35, 0xf2, 0x19, 0xe1, 0x20, 0x35, 0x38, 0x4d, 0x3e, 0x31,
-       0x88, 0x79, 0xda, 0xfe, 0x81, 0xf8, 0xd7, 0x88, 0x06, 0xc6, 0x7d, 0x86,
-       0x7b, 0x0f, 0xd1, 0xf6, 0x53, 0xc2, 0x01, 0x5b, 0x63, 0x17, 0xcc, 0xe4,
-       0x42, 0xeb, 0xfc, 0x5e, 0x9d, 0xdd, 0xfb, 0x66, 0x5f, 0xb9, 0x1b, 0x9b,
-       0xd2, 0x4e, 0x92, 0xd3, 0x3c, 0x5e, 0x73, 0x51, 0x0c, 0x66, 0x8c, 0x53,
-       0xb9, 0x9e, 0x4a, 0x33, 0xc7, 0xac, 0x0a, 0xec, 0xa2, 0xb8, 0xb0, 0xd3,
-       0xca, 0x05, 0xf0, 0x2c, 0x5e, 0xd1, 0x81, 0x2b, 0x53, 0xff, 0xc3, 0x43,
-       0xfa, 0x5b, 0xad, 0x2e, 0x87, 0x08, 0x66, 0x0c, 0xd1, 0xa0, 0x4b, 0xf8,
-       0xb8, 0x53, 0xe9, 0x71, 0x48, 0xc3, 0xb8, 0x31, 0x66, 0x98, 0x5e, 0x55,
-       0xed, 0x6f, 0x17, 0x91, 0xbe, 0x92, 0x88, 0xa2, 0xae, 0xe4, 0x95, 0xeb,
-       0x4a, 0xed, 0xb2, 0xa7, 0x64, 0xb8, 0xfd, 0x2b, 0xee, 0xa5, 0xba, 0x65,
-       0x07, 0xd5, 0xb6, 0x5e, 0xaa, 0xaf, 0x15, 0xb2, 0xc7, 0x1a, 0x92, 0x7f,
-       0x88, 0xe2, 0x80, 0x0e, 0x67, 0x66, 0x1b, 0x5c, 0x99, 0xb0, 0x7f, 0x37,
-       0x76, 0x20, 0x19, 0xb4, 0xb1, 0xad, 0x4c, 0xba, 0xaa, 0xed, 0x64, 0x2c,
-       0x73, 0x2f, 0xce, 0xe4, 0x19, 0x9f, 0x27, 0xb0, 0x31, 0xcd, 0xbf, 0xe1,
-       0x79, 0x39, 0xae, 0xe3, 0x28, 0xd5, 0x4e, 0xee, 0x8e, 0x66, 0xd2, 0x43,
-       0x0b, 0x46, 0xca, 0x82, 0x4d, 0x90, 0x74, 0x01, 0xcf, 0xd1, 0x4e, 0x19,
-       0xfb, 0x66, 0x28, 0x91, 0x50, 0x9e, 0x72, 0x92, 0x9d, 0xef, 0x26, 0x1b,
-       0xf2, 0xaa, 0x5e, 0xfa, 0x1d, 0xe0, 0x73, 0x47, 0x64, 0x93, 0x3f, 0xe9,
-       0x6a, 0xb7, 0x62, 0xcd, 0x2f, 0xa8, 0xc6, 0xf9, 0x15, 0xf1, 0xc2, 0xb2,
-       0xd0, 0x51, 0x37, 0x3e, 0x5f, 0x13, 0xae, 0xb9, 0xa3, 0x0e, 0x41, 0x9a,
-       0x33, 0x58, 0xdd, 0x23, 0x13, 0x58, 0x13, 0xeb, 0x40, 0x31, 0x27, 0xaa,
-       0x18, 0x6b, 0x44, 0xf1, 0x62, 0x35, 0xf6, 0x53, 0xed, 0xef, 0x53, 0x37,
-       0x22, 0xe3, 0xaf, 0x78, 0xde, 0x89, 0x73, 0x0d, 0x00, 0xcf, 0x00, 0x61,
-       0xa8, 0xd1, 0xf4, 0x57, 0x90, 0x5f, 0x08, 0xf7, 0x3d, 0x71, 0x3e, 0x9f,
-       0x49, 0x21, 0x4a, 0x5d, 0x8d, 0x86, 0xe5, 0xbd, 0xf8, 0xb8, 0x91, 0xf1,
-       0xaf, 0x97, 0x62, 0x83, 0x8c, 0xdd, 0x33, 0x01, 0xeb, 0x5c, 0x04, 0xc5,
-       0xc0, 0x2a, 0xcd, 0xd7, 0xd2, 0xfa, 0x65, 0x34, 0xb2, 0x4c, 0xfe, 0x6f,
-       0x34, 0x92, 0xcd, 0x12, 0xe6, 0xc9, 0xa5, 0x07, 0xf0, 0x4a, 0x9a, 0xe7,
-       0x0d, 0x27, 0x35, 0xe1, 0xe7, 0x9e, 0xbc, 0x25, 0x13, 0x63, 0x86, 0xd7,
-       0xf0, 0x5a, 0xb1, 0xc9, 0x5e, 0x27, 0xc0, 0xbd, 0xa2, 0xff, 0xe0, 0x5a,
-       0x1a, 0xe5, 0xc7, 0xd5, 0x54, 0x77, 0x46, 0xa1, 0x7e, 0xa3, 0x42, 0xfa,
-       0xe0, 0x1e, 0xf5, 0x12, 0xc2, 0xbc, 0x70, 0xbf, 0x1a, 0xe7, 0x73, 0xc8,
-       0xe6, 0x0e, 0x59, 0x37, 0x4d, 0x57, 0xa7, 0xea, 0x7f, 0x0f, 0x6c, 0x87,
-       0x5e, 0xde, 0xeb, 0x70, 0xef, 0xee, 0xf4, 0x62, 0x1f, 0xe5, 0xc0, 0x67,
-       0xd3, 0x6d, 0x06, 0xd7, 0x7e, 0x60, 0x1c, 0x2a, 0x52, 0xf4, 0xec, 0x50,
-       0x1d, 0x9f, 0x09, 0xda, 0x55, 0xde, 0x06, 0x47, 0xe6, 0xb6, 0x3a, 0xae,
-       0x37, 0x6a, 0xa8, 0x4e, 0x1e, 0x49, 0x33, 0xbd, 0xdc, 0x7b, 0x33, 0xcd,
-       0x9d, 0x71, 0xf5, 0xf2, 0x5a, 0xb2, 0x8b, 0x66, 0x9d, 0xe5, 0x18, 0xc0,
-       0x93, 0x34, 0x36, 0x54, 0x66, 0x59, 0x7e, 0xb7, 0x8e, 0xfb, 0x9d, 0x7b,
-       0x48, 0xbf, 0x0d, 0x59, 0x7b, 0x9e, 0x6c, 0x79, 0x10, 0x4b, 0x46, 0x5f,
-       0xa8, 0xb3, 0x6b, 0x1f, 0xae, 0xcb, 0x87, 0xb0, 0x27, 0x1d, 0xc0, 0x4c,
-       0xba, 0xcd, 0xff, 0x12, 0x9c, 0xd5, 0xbc, 0xca, 0xe7, 0x88, 0xe7, 0xc7,
-       0x04, 0x30, 0x7d, 0xf5, 0x3b, 0xcb, 0xc7, 0xee, 0x99, 0x1e, 0xb7, 0x30,
-       0xbf, 0x8c, 0x7c, 0xc0, 0xae, 0x63, 0x28, 0x56, 0x78, 0x1e, 0x25, 0xbd,
-       0xbe, 0x4f, 0x7a, 0x75, 0x90, 0x5e, 0x5f, 0xd2, 0xfe, 0x92, 0x31, 0x8b,
-       0x7b, 0x57, 0xdc, 0xcb, 0xfb, 0x43, 0x06, 0x81, 0x16, 0x6b, 0x4c, 0x26,
-       0xee, 0xc4, 0xeb, 0x94, 0x07, 0x6b, 0x28, 0xfe, 0x9d, 0x4a, 0x9b, 0xab,
-       0xe7, 0x62, 0x6d, 0xa9, 0xf7, 0x29, 0x4f, 0x1b, 0x7f, 0xa8, 0x68, 0x67,
-       0xc8, 0x4f, 0xb3, 0x13, 0x7f, 0x8a, 0x33, 0x8d, 0x6d, 0xfe, 0xb7, 0x60,
-       0xb8, 0x9f, 0x88, 0x3f, 0x42, 0x35, 0x3f, 0xd5, 0x0d, 0xcb, 0xff, 0x0b,
-       0x39, 0x59, 0x1c, 0x92, 0xda, 0x76, 0xf9, 0x25, 0xfc, 0x15, 0xce, 0x5c,
-       0x17, 0xd6, 0x5e, 0x02, 0x8f, 0xb1, 0xeb, 0xf1, 0xf0, 0xec, 0xfd, 0x7c,
-       0x1e, 0x2a, 0x48, 0xe9, 0xcc, 0xde, 0xc7, 0x4a, 0xf3, 0xbe, 0x9b, 0x40,
-       0x7e, 0x03, 0xd5, 0xd2, 0xd6, 0x39, 0x54, 0x78, 0x9e, 0x26, 0xbf, 0x88,
-       0x8e, 0xf1, 0xf8, 0x63, 0x5d, 0x6a, 0x21, 0x04, 0x89, 0x30, 0x0e, 0x61,
-       0x84, 0x1e, 0x3e, 0x9f, 0xf1, 0x74, 0x3a, 0x48, 0xb9, 0xa0, 0xad, 0x2f,
-       0x2a, 0xbe, 0x0d, 0x1b, 0x03, 0x70, 0x9e, 0x3b, 0x46, 0x79, 0x4e, 0x49,
-       0x3d, 0x8d, 0xb6, 0x7e, 0xaf, 0xb8, 0x1b, 0xa9, 0xc6, 0xb6, 0xc1, 0xa3,
-       0x08, 0x13, 0x66, 0x50, 0xa2, 0x67, 0x60, 0xcf, 0xb3, 0xb4, 0x20, 0x51,
-       0x9d, 0xc8, 0x71, 0x26, 0x8d, 0xa3, 0x7e, 0x09, 0x37, 0x74, 0xa8, 0x97,
-       0xa7, 0x31, 0x6f, 0x2f, 0xf6, 0x98, 0xd5, 0x05, 0x1a, 0x2f, 0xf9, 0x09,
-       0xdb, 0xd4, 0xc0, 0x49, 0xb5, 0xbf, 0xa4, 0x6f, 0xc3, 0xd6, 0x34, 0xe7,
-       0x69, 0x92, 0x0b, 0xf9, 0x66, 0x5f, 0x64, 0x1b, 0x86, 0x0a, 0x01, 0xec,
-       0xcf, 0x86, 0xf7, 0xee, 0x26, 0x5c, 0x37, 0x56, 0x0e, 0x87, 0x36, 0x8b,
-       0x00, 0xe9, 0x9b, 0xea, 0xff, 0xa6, 0x20, 0xd5, 0xc9, 0x7e, 0xfa, 0xb7,
-       0xeb, 0x99, 0x53, 0x54, 0xcf, 0xbc, 0x4e, 0xbe, 0xe6, 0xad, 0xd6, 0xaa,
-       0x4b, 0xf3, 0x26, 0xe6, 0x62, 0xeb, 0x71, 0xc9, 0xd2, 0x59, 0x90, 0x6c,
-       0x8c, 0x73, 0x08, 0x9f, 0x8d, 0x71, 0x8b, 0xcd, 0x63, 0x86, 0xfb, 0xc1,
-       0xce, 0x20, 0xe5, 0x34, 0xc6, 0x9c, 0x8e, 0x3f, 0x92, 0x48, 0x1e, 0x33,
-       0xea, 0x0e, 0xac, 0x8b, 0xed, 0xc0, 0x90, 0xf6, 0x5d, 0xd4, 0x34, 0x71,
-       0x3c, 0x92, 0x8d, 0x06, 0x9a, 0xf7, 0x42, 0x67, 0x2f, 0xc2, 0x4f, 0x31,
-       0x3e, 0xfa, 0x19, 0xe1, 0x23, 0xf6, 0x5d, 0x9e, 0xbf, 0x51, 0x5f, 0x46,
-       0xb8, 0xa2, 0xbe, 0xd3, 0xce, 0xf3, 0x37, 0x16, 0xf8, 0x4c, 0x26, 0xa8,
-       0x36, 0x85, 0xe7, 0xdd, 0x95, 0x3a, 0x9e, 0xa0, 0x18, 0x93, 0x58, 0xee,
-       0x02, 0x16, 0xf0, 0xd9, 0x63, 0xbb, 0x8e, 0x61, 0x7e, 0x97, 0x14, 0x04,
-       0x66, 0xe3, 0x64, 0x1f, 0xff, 0xea, 0x8c, 0x51, 0xa8, 0x7a, 0x36, 0x94,
-       0xfb, 0x27, 0x07, 0xcc, 0x24, 0xbf, 0x33, 0xe0, 0xa8, 0xf3, 0x52, 0xbc,
-       0x0d, 0x56, 0x20, 0x79, 0x39, 0x2e, 0x4b, 0xea, 0xbc, 0xdc, 0x59, 0xd6,
-       0x47, 0x38, 0xbe, 0x5b, 0xba, 0x70, 0xd2, 0x33, 0xbb, 0x26, 0x95, 0xe1,
-       0xdd, 0x68, 0x1b, 0xfa, 0x40, 0xd4, 0x5a, 0x3b, 0x97, 0xd3, 0xed, 0x48,
-       0x2d, 0xd6, 0x9d, 0x1b, 0xae, 0x64, 0x57, 0x13, 0x1d, 0xe7, 0x4c, 0x5c,
-       0xb7, 0xc6, 0xda, 0xdf, 0x9a, 0x6e, 0xff, 0x73, 0x9a, 0x9b, 0xbf, 0x3f,
-       0xe0, 0xe5, 0x33, 0x93, 0xc7, 0xb3, 0x2f, 0x9a, 0xd1, 0x85, 0xb6, 0x7c,
-       0x4e, 0x90, 0xef, 0x07, 0x75, 0x07, 0x9a, 0xd5, 0xc8, 0xe5, 0x7e, 0xfa,
-       0xfd, 0xb7, 0x05, 0x42, 0xfb, 0x2b, 0x07, 0xf1, 0xab, 0xbc, 0x8e, 0xc7,
-       0x28, 0x0f, 0x34, 0xa8, 0x8a, 0x3f, 0xcf, 0xfb, 0xd7, 0x31, 0x9b, 0xff,
-       0x9b, 0xf2, 0xe4, 0x87, 0x8d, 0x7e, 0xab, 0xc6, 0xb0, 0xf9, 0x2b, 0x10,
-       0x7f, 0x03, 0x5e, 0xf6, 0x85, 0xc5, 0xe4, 0x17, 0x7b, 0xc9, 0x5f, 0x1f,
-       0x23, 0x5b, 0xa3, 0x0a, 0x9e, 0xfc, 0x40, 0xd9, 0x0b, 0xf2, 0xd7, 0xb1,
-       0x34, 0xcb, 0x3f, 0xe8, 0x1b, 0x18, 0xe5, 0xb8, 0x6b, 0xf5, 0x55, 0xb5,
-       0x90, 0x83, 0xe3, 0xae, 0x15, 0x4f, 0x8d, 0x90, 0xe3, 0xd7, 0x75, 0x4c,
-       0xd7, 0x48, 0x39, 0x1c, 0xf4, 0xf0, 0x79, 0x7e, 0x02, 0x87, 0x03, 0x9a,
-       0x9d, 0x2b, 0xe7, 0x28, 0x1f, 0x5d, 0x22, 0x3a, 0xf6, 0xc7, 0x9a, 0x91,
-       0xa2, 0x7c, 0x94, 0x51, 0x6d, 0x5b, 0x52, 0x67, 0x19, 0x63, 0xfe, 0x82,
-       0x30, 0xa6, 0x12, 0x72, 0x49, 0x6d, 0xc3, 0x27, 0xb1, 0xcd, 0x3c, 0xd3,
-       0xc8, 0x36, 0xe5, 0xc2, 0xe1, 0xf6, 0x59, 0xb3, 0x12, 0x60, 0x7e, 0x25,
-       0xbc, 0xa8, 0x91, 0xcd, 0x5c, 0x17, 0x0e, 0xbe, 0x48, 0x39, 0x75, 0xa6,
-       0xaa, 0x8f, 0x70, 0x61, 0xde, 0x1e, 0x63, 0x2c, 0xeb, 0x68, 0x0a, 0x6a,
-       0xa2, 0x80, 0x3f, 0xa6, 0xef, 0xad, 0xc1, 0x4b, 0x55, 0x5b, 0x5d, 0x36,
-       0xfb, 0xdf, 0xbd, 0xd5, 0x77, 0x6c, 0xac, 0x67, 0x42, 0x85, 0xfb, 0xe9,
-       0x37, 0xcf, 0x19, 0xe0, 0xb3, 0x2d, 0x7c, 0xd6, 0xca, 0xb3, 0xb5, 0xb3,
-       0x86, 0xfd, 0xc5, 0xcf, 0xef, 0x15, 0xac, 0x1b, 0xe3, 0xbe, 0x30, 0xf7,
-       0x68, 0x24, 0xec, 0xbe, 0xfa, 0xde, 0x03, 0x7f, 0xf6, 0xe0, 0xd6, 0x31,
-       0xee, 0x45, 0x9c, 0xb8, 0x59, 0xc6, 0x3f, 0x51, 0x1e, 0x96, 0xd9, 0xe7,
-       0xc9, 0xd7, 0x7f, 0xd4, 0x75, 0x6a, 0x92, 0x73, 0xea, 0xdb, 0x5d, 0x9b,
-       0xd2, 0xf3, 0x3a, 0xbe, 0xca, 0xd3, 0xe9, 0x7b, 0x28, 0xee, 0x64, 0xd2,
-       0xca, 0x70, 0x44, 0xb2, 0xf6, 0xd5, 0x52, 0x25, 0xf1, 0x15, 0x2a, 0xd2,
-       0x78, 0xbe, 0x5e, 0xf4, 0x8f, 0x85, 0xa8, 0xb6, 0xf1, 0xfb, 0x1e, 0x38,
-       0x60, 0x52, 0xae, 0x70, 0xe2, 0xe9, 0xd1, 0xb0, 0xf6, 0x26, 0xe1, 0x9d,
-       0x67, 0x46, 0x4d, 0xf3, 0x4d, 0x0d, 0x7f, 0xd2, 0x40, 0x35, 0x72, 0xbb,
-       0x50, 0x12, 0x84, 0x0d, 0x42, 0xeb, 0x45, 0x5b, 0xb0, 0x00, 0xe5, 0xf4,
-       0x4e, 0x9a, 0xef, 0x50, 0x11, 0x78, 0xb1, 0xe8, 0xc1, 0x0b, 0x63, 0xdc,
-       0xfb, 0xf3, 0xa0, 0xf4, 0x54, 0x93, 0x6f, 0xdb, 0x81, 0x10, 0xc5, 0x58,
-       0x19, 0xbd, 0x87, 0x12, 0xb8, 0xf5, 0x80, 0x40, 0x34, 0x92, 0x40, 0xcf,
-       0xa1, 0x7a, 0xac, 0x1f, 0x93, 0x71, 0x31, 0x5e, 0x8f, 0xdb, 0x9e, 0x9a,
-       0xe7, 0xe3, 0x9d, 0x6a, 0x9d, 0x27, 0x5b, 0xe7, 0xd8, 0x8e, 0x66, 0x39,
-       0x66, 0x53, 0xbe, 0xc8, 0x72, 0x0c, 0x34, 0xcd, 0x60, 0xa7, 0xdd, 0xe7,
-       0x78, 0x8e, 0xf2, 0xc7, 0x13, 0x9d, 0x6a, 0x30, 0xe8, 0xd0, 0x71, 0xc3,
-       0x44, 0xe5, 0xdb, 0x0d, 0x30, 0x8f, 0xf3, 0x1e, 0xc6, 0xa7, 0xed, 0xa6,
-       0x79, 0x6b, 0x3c, 0x72, 0x99, 0x2a, 0x3b, 0xf2, 0xa9, 0xb7, 0xc9, 0xa7,
-       0x5a, 0xf0, 0x44, 0x76, 0x7e, 0xaf, 0x4b, 0xed, 0xbf, 0x20, 0x19, 0x3b,
-       0xfc, 0x30, 0x3f, 0xa9, 0xd5, 0xcd, 0x4f, 0x5d, 0x7a, 0x24, 0xb8, 0x5d,
-       0xf0, 0x19, 0x11, 0xee, 0x89, 0x9b, 0xe6, 0xd9, 0xb8, 0x69, 0x16, 0xe3,
-       0x86, 0x7b, 0xd9, 0x0a, 0x3f, 0x0e, 0x2d, 0xe5, 0x77, 0x0d, 0xc2, 0xc9,
-       0x66, 0xb2, 0x2f, 0xcf, 0x52, 0x35, 0xb8, 0x91, 0xea, 0x2b, 0x83, 0x82,
-       0x5c, 0x68, 0xa1, 0xd2, 0x0f, 0xb4, 0xf8, 0xf6, 0x8f, 0x36, 0xe1, 0x99,
-       0xb9, 0xdf, 0xe5, 0xe3, 0x39, 0x56, 0x3f, 0xed, 0x13, 0x0d, 0xab, 0x1b,
-       0x10, 0x49, 0x6e, 0x01, 0xf7, 0x46, 0xf9, 0x4c, 0xaa, 0x81, 0xdb, 0xe2,
-       0x83, 0xd8, 0x3a, 0xc6, 0xfb, 0x6b, 0x3f, 0xef, 0xfa, 0x64, 0xcc, 0xfc,
-       0x5b, 0x37, 0xd1, 0xbf, 0xba, 0xb3, 0x2d, 0xe5, 0xb1, 0xde, 0x55, 0x3a,
-       0x49, 0x75, 0x40, 0x23, 0xca, 0x33, 0x6a, 0x65, 0xb1, 0x48, 0xbe, 0xe9,
-       0x45, 0x24, 0xd8, 0x4c, 0xb1, 0x6a, 0x8e, 0x7c, 0x77, 0xa6, 0xcc, 0x75,
-       0xc0, 0x2f, 0xbb, 0xcc, 0x89, 0x45, 0x98, 0x9e, 0xa3, 0xb9, 0xb2, 0x6a,
-       0xcf, 0x47, 0x84, 0xf3, 0xea, 0x74, 0xb3, 0xc1, 0xa3, 0x47, 0x4e, 0xb7,
-       0x09, 0x09, 0x97, 0x97, 0x9b, 0x66, 0x6f, 0xa7, 0x3a, 0x5c, 0x2f, 0x30,
-       0xe4, 0xd0, 0xd5, 0x44, 0xbb, 0x84, 0xaf, 0x06, 0x11, 0xe9, 0x39, 0x8b,
-       0x48, 0xff, 0x39, 0x8a, 0x61, 0xcf, 0x96, 0xf9, 0x9c, 0xef, 0x23, 0xf8,
-       0xdb, 0xb1, 0x85, 0x38, 0x3e, 0xf3, 0x50, 0xb5, 0x27, 0x06, 0xcf, 0x8d,
-       0x2b, 0x74, 0x1c, 0x26, 0xbd, 0x9e, 0xd4, 0x6a, 0x28, 0xae, 0xcb, 0x70,
-       0xb4, 0x42, 0x6e, 0xa4, 0x3a, 0x21, 0xf6, 0xb8, 0x69, 0x2e, 0x6b, 0xb5,
-       0x6b, 0x9e, 0x65, 0xb3, 0xd7, 0xbe, 0xa3, 0x30, 0xdf, 0xef, 0x09, 0x92,
-       0xfe, 0xda, 0x52, 0x5b, 0xc5, 0x49, 0xd3, 0xf8, 0x43, 0x41, 0x3c, 0xdf,
-       0x56, 0x0f, 0x0f, 0xf3, 0x2d, 0x63, 0xe7, 0x04, 0xf7, 0xe1, 0x58, 0x6f,
-       0xf0, 0xf4, 0xc4, 0x79, 0x9f, 0x9c, 0x75, 0x54, 0xf1, 0xac, 0x8b, 0x53,
-       0x4c, 0x14, 0x3e, 0xc2, 0x53, 0x86, 0xbb, 0x9b, 0xf2, 0x53, 0xed, 0x18,
-       0xbf, 0x2f, 0xe1, 0xc5, 0x63, 0x14, 0x37, 0x2e, 0x69, 0x75, 0xd8, 0xdf,
-       0xc8, 0xb6, 0xc3, 0x74, 0x72, 0xcf, 0x70, 0x1b, 0xee, 0xe5, 0x77, 0x4e,
-       0xca, 0xbf, 0x6b, 0x9d, 0x0d, 0xa4, 0x6b, 0x84, 0x0d, 0x98, 0x8e, 0xf9,
-       0xf5, 0x7b, 0xb0, 0x78, 0x94, 0xf5, 0x78, 0xac, 0x2b, 0x48, 0x32, 0x7a,
-       0x82, 0xec, 0xc2, 0xa1, 0x77, 0x43, 0x26, 0x5b, 0x5c, 0x1b, 0xbf, 0x76,
-       0x0e, 0x75, 0xe8, 0x9c, 0x44, 0xf5, 0x9d, 0xc4, 0xfb, 0x79, 0x4a, 0xe2,
-       0x88, 0xb8, 0x76, 0xce, 0x7c, 0x3d, 0xf7, 0x13, 0x8d, 0x19, 0x3b, 0x2f,
-       0x1d, 0xa6, 0xbc, 0xf4, 0x4a, 0x8e, 0x7d, 0xe4, 0x17, 0x96, 0x8f, 0x38,
-       0x28, 0xd6, 0xae, 0x49, 0x87, 0x70, 0x4e, 0x83, 0x5a, 0x83, 0x18, 0xd1,
-       0x1d, 0xe9, 0xe9, 0xae, 0x62, 0x3e, 0x17, 0xc5, 0xff, 0x99, 0x9c, 0x32,
-       0x68, 0xf5, 0x9f, 0x54, 0xa5, 0x8f, 0x3f, 0x79, 0xef, 0x3f, 0xa8, 0x0f,
-       0xa1, 0x61, 0x25, 0x70, 0x7e, 0x94, 0xfb, 0x55, 0xbc, 0xcf, 0x35, 0x2c,
-       0xae, 0xf0, 0x7b, 0x61, 0xb5, 0x43, 0x78, 0x2f, 0xce, 0xef, 0x5b, 0xb1,
-       0xef, 0x3d, 0x0c, 0xf6, 0xbd, 0x06, 0x1a, 0xfb, 0xc9, 0x68, 0x38, 0xd4,
-       0x43, 0x7e, 0x33, 0x00, 0xeb, 0xbc, 0x90, 0x36, 0x6b, 0xf7, 0xc7, 0x93,
-       0xa7, 0xaa, 0xfb, 0x5b, 0x91, 0xea, 0xde, 0x5c, 0xb4, 0xd0, 0x23, 0x2e,
-       0x15, 0x98, 0xa6, 0xb7, 0x89, 0xa6, 0x6e, 0xf1, 0xe1, 0xec, 0x3a, 0x71,
-       0x71, 0xb6, 0x57, 0x9c, 0x2d, 0x70, 0x4c, 0xfe, 0x79, 0xd7, 0xae, 0x1c,
-       0xe7, 0xb3, 0x3b, 0xc5, 0xbb, 0xf9, 0x0d, 0xe2, 0x42, 0xa1, 0x5f, 0x7c,
-       0x34, 0x6b, 0xe0, 0xfe, 0x78, 0x2f, 0x0a, 0x63, 0xf0, 0xbb, 0xf5, 0xfb,
-       0xc5, 0xa5, 0xbc, 0xdd, 0x27, 0xbc, 0x50, 0x68, 0xf1, 0x15, 0xd2, 0x5c,
-       0x03, 0x1f, 0xa3, 0x1a, 0x78, 0x91, 0xef, 0x99, 0xc9, 0x80, 0xaf, 0x34,
-       0xa9, 0x0c, 0xde, 0x23, 0x4c, 0xf3, 0xb6, 0xd8, 0x69, 0xd6, 0xa1, 0xf9,
-       0x5a, 0xcc, 0xc6, 0x07, 0x3b, 0x49, 0x1e, 0x9b, 0x29, 0xb7, 0x4c, 0x6b,
-       0x6d, 0x55, 0x2c, 0xc2, 0xb6, 0xce, 0xbc, 0x72, 0xae, 0xe6, 0xfd, 0xa7,
-       0x21, 0x38, 0x3b, 0x81, 0xbd, 0xe9, 0xcf, 0x79, 0xbd, 0x44, 0xbc, 0x1a,
-       0xae, 0x21, 0x7c, 0x4c, 0xbc, 0xbe, 0x3e, 0xfa, 0xf9, 0x7e, 0x9e, 0x93,
-       0xc6, 0xee, 0x4a, 0x87, 0x53, 0x47, 0x84, 0x52, 0x29, 0xd8, 0xfb, 0x79,
-       0x9a, 0x57, 0x52, 0x4e, 0x8f, 0x50, 0x1d, 0xd1, 0x2a, 0xd9, 0xbc, 0x26,
-       0xaa, 0xbc, 0xde, 0x44, 0xbc, 0x5e, 0x2c, 0x70, 0x7d, 0xfe, 0x76, 0xd7,
-       0x1b, 0xa3, 0x63, 0x66, 0x3d, 0xd5, 0xff, 0x75, 0x6a, 0xb7, 0xb8, 0x40,
-       0x3c, 0x7f, 0x48, 0x3c, 0x7f, 0x5c, 0xb8, 0x53, 0x7c, 0x44, 0x7c, 0x5e,
-       0x2c, 0xf0, 0x1e, 0x9e, 0x5b, 0x7c, 0x98, 0xb3, 0x79, 0xfc, 0xf0, 0x2a,
-       0x8f, 0x41, 0xdf, 0xfe, 0x74, 0x93, 0xef, 0xd1, 0x49, 0xbf, 0x6f, 0xcf,
-       0xa4, 0x69, 0x7e, 0xa8, 0x49, 0x3e, 0xe6, 0xeb, 0x55, 0xed, 0x8b, 0x7c,
-       0xdd, 0x4c, 0x7c, 0xf1, 0xfe, 0xeb, 0x6f, 0xeb, 0x70, 0x9e, 0xaf, 0xc7,
-       0xac, 0x73, 0x6c, 0xf6, 0x19, 0xa9, 0x7a, 0xde, 0x83, 0x25, 0xbe, 0x7c,
-       0x74, 0xfd, 0x95, 0x7f, 0xcd, 0xd7, 0xe0, 0x05, 0xd2, 0x5f, 0xb1, 0xca,
-       0x57, 0xfd, 0xbf, 0xc9, 0x17, 0xd5, 0xba, 0x63, 0xcc, 0x57, 0xa3, 0xfe,
-       0xc6, 0x98, 0x49, 0xfa, 0x92, 0xac, 0x77, 0xc1, 0x8a, 0xd9, 0x1d, 0x78,
-       0x25, 0xc6, 0xef, 0xc7, 0x45, 0x42, 0x47, 0x28, 0x9e, 0xce, 0x96, 0x3d,
-       0xa2, 0xc6, 0xda, 0x87, 0xc5, 0x1b, 0xb5, 0x44, 0xd3, 0xe1, 0x19, 0x7e,
-       0xff, 0x0b, 0x1a, 0x61, 0x01, 0x3f, 0xbf, 0x37, 0x37, 0x0d, 0xee, 0x97,
-       0xf5, 0x8a, 0x86, 0x22, 0xef, 0xbb, 0x6e, 0x10, 0xbe, 0x22, 0x9f, 0xa3,
-       0xeb, 0x11, 0xde, 0x62, 0xb7, 0xf0, 0x1c, 0x32, 0x4c, 0x8f, 0xba, 0x4e,
-       0xd4, 0x1d, 0xba, 0x53, 0x78, 0xaa, 0x7b, 0xb0, 0xee, 0x62, 0xd0, 0x97,
-       0xbe, 0x46, 0x1e, 0x17, 0xb5, 0x9b, 0x2d, 0x79, 0xbc, 0xa6, 0xcd, 0xef,
-       0x1f, 0x5a, 0xe7, 0x10, 0xf9, 0x1c, 0x9c, 0x27, 0x48, 0xb5, 0x53, 0x43,
-       0xb5, 0x76, 0x7a, 0x37, 0xc6, 0xe7, 0x7b, 0x0c, 0x92, 0x3f, 0x42, 0x4e,
-       0x5d, 0xe9, 0x3f, 0x21, 0xd4, 0xd4, 0xfd, 0x22, 0x79, 0xab, 0x97, 0xea,
-       0x9f, 0xad, 0xb1, 0x48, 0xf2, 0x06, 0x11, 0x49, 0x38, 0x05, 0xe7, 0x15,
-       0x4d, 0xae, 0x2d, 0x19, 0xd8, 0x43, 0xf1, 0xed, 0xe5, 0x9c, 0x83, 0xb0,
-       0x03, 0xbf, 0x43, 0xe6, 0xc4, 0x5a, 0xbf, 0x17, 0x4f, 0x12, 0xee, 0x78,
-       0x22, 0x3b, 0x88, 0x27, 0x0b, 0x03, 0x78, 0xa2, 0xf0, 0xaf, 0xde, 0x95,
-       0x91, 0x3d, 0xfa, 0xf9, 0x95, 0xd5, 0x33, 0x08, 0x89, 0xeb, 0x23, 0x1c,
-       0xa3, 0x1f, 0x6e, 0x97, 0x23, 0x5c, 0xeb, 0xbe, 0x75, 0xf3, 0x07, 0x2a,
-       0xfb, 0xa2, 0xba, 0xe2, 0x94, 0x85, 0x45, 0x1e, 0x59, 0x7e, 0xc8, 0x3a,
-       0x1b, 0x95, 0xbe, 0x69, 0x97, 0xf5, 0x4e, 0xe7, 0x3b, 0x2b, 0x36, 0xa9,
-       0xec, 0x0f, 0x0f, 0xc7, 0xd7, 0x58, 0xf9, 0xf5, 0x6f, 0x56, 0xd9, 0x3d,
-       0x9a, 0x77, 0x56, 0x5d, 0x6f, 0xf7, 0xd1, 0x56, 0x45, 0xad, 0xcf, 0x33,
-       0xab, 0xec, 0xfd, 0xed, 0x4f, 0x57, 0xb5, 0x5a, 0x9f, 0xe7, 0x57, 0xd9,
-       0x3e, 0xf5, 0xee, 0x2a, 0xd5, 0xfa, 0xfc, 0x87, 0x55, 0x76, 0x5e, 0xbe,
-       0xb4, 0x6a, 0xc9, 0xd5, 0xf7, 0x63, 0xf8, 0xef, 0xff, 0x00, 0x88, 0xf4,
-       0x23, 0x6f, 0xec, 0x3a, 0x00, 0x00, 0x00 };
-
-static const u32 bnx2_TXP_b09FwData[(0x0/4) + 1] = { 0x0 };
-static const u32 bnx2_TXP_b09FwRodata[(0x30/4) + 1] = {
-       0x80000940, 0x80000900, 0x80080100, 0x80080080, 0x80080000, 0x800e0000,
-       0x80080080, 0x80080000, 0x80000a80, 0x80000a00, 0x80000980, 0x80000900,
-       0x00000000 };
-
-static struct fw_info bnx2_txp_fw_09 = {
-       /* Firmware version: 4.6.15 */
-       .ver_major                      = 0x4,
-       .ver_minor                      = 0x6,
-       .ver_fix                        = 0xf,
-
-       .start_addr                     = 0x08000098,
-
-       .text_addr                      = 0x08000000,
-       .text_len                       = 0x3ae8,
-       .text_index                     = 0x0,
-       .gz_text                        = bnx2_TXP_b09FwText,
-       .gz_text_len                    = sizeof(bnx2_TXP_b09FwText),
-
-       .data_addr                      = 0x00000000,
-       .data_len                       = 0x0,
-       .data_index                     = 0x0,
-       .data                           = bnx2_TXP_b09FwData,
-
-       .sbss_addr                      = 0x08003b40,
-       .sbss_len                       = 0x6c,
-       .sbss_index                     = 0x0,
-
-       .bss_addr                       = 0x08003bac,
-       .bss_len                        = 0x24c,
-       .bss_index                      = 0x0,
-
-       .rodata_addr                    = 0x08003ae8,
-       .rodata_len                     = 0x30,
-       .rodata_index                   = 0x0,
-       .rodata                         = bnx2_TXP_b09FwRodata,
-};
-
index 00a78e8..ad5ef25 100644 (file)
@@ -10979,16 +10979,16 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
                goto err_out_release;
        }
 
-       if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) == 0) {
                bp->flags |= USING_DAC_FLAG;
-               if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) {
+               if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) {
                        printk(KERN_ERR PFX "pci_set_consistent_dma_mask"
                               " failed, aborting\n");
                        rc = -EIO;
                        goto err_out_release;
                }
 
-       } else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) {
+       } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) {
                printk(KERN_ERR PFX "System does not support DMA,"
                       " aborting\n");
                rc = -EIO;
index 0effefa..f522276 100644 (file)
@@ -5074,10 +5074,10 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
 
 
        /* Configure DMA attributes. */
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
                err = pci_set_consistent_dma_mask(pdev,
-                                                 DMA_64BIT_MASK);
+                                                 DMA_BIT_MASK(64));
                if (err < 0) {
                        dev_err(&pdev->dev, "Unable to obtain 64-bit DMA "
                               "for consistent allocations\n");
@@ -5085,7 +5085,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
                }
 
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        dev_err(&pdev->dev, "No usable DMA configuration, "
                               "aborting.\n");
index 9b6011e..fa06994 100644 (file)
@@ -1056,17 +1056,17 @@ static int __devinit init_one(struct pci_dev *pdev,
                goto out_disable_pdev;
        }
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
 
-               if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
+               if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
                        CH_ERR("%s: unable to obtain 64-bit DMA for "
                               "consistent allocations\n", pci_name(pdev));
                        err = -ENODEV;
                        goto out_disable_pdev;
                }
 
-       } else if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) != 0) {
+       } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
                CH_ERR("%s: no usable DMA configuration\n", pci_name(pdev));
                goto out_disable_pdev;
        }
index 2c2aaa7..ab0e5fe 100644 (file)
@@ -3038,15 +3038,15 @@ static int __devinit init_one(struct pci_dev *pdev,
                goto out_release_regions;
        }
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (err) {
                        dev_err(&pdev->dev, "unable to obtain 64-bit DMA for "
                               "coherent allocations\n");
                        goto out_disable_device;
                }
-       } else if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) != 0) {
+       } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
                dev_err(&pdev->dev, "no usable DMA configuration\n");
                goto out_disable_device;
        }
index c749e9f..4a1b554 100644 (file)
@@ -714,7 +714,7 @@ rio_interrupt (int irq, void *dev_instance)
 
 static inline dma_addr_t desc_to_dma(struct netdev_desc *desc)
 {
-       return le64_to_cpu(desc->fraginfo) & DMA_48BIT_MASK;
+       return le64_to_cpu(desc->fraginfo) & DMA_BIT_MASK(48);
 }
 
 static void
index 0504db9..5c0b457 100644 (file)
@@ -2604,7 +2604,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
                goto err_out_disable_pdev;
        }
 
-       if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
+       if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
                DPRINTK(PROBE, ERR, "No usable DMA configuration, aborting.\n");
                goto err_out_free_res;
        }
index 93b861d..ddc5c53 100644 (file)
@@ -962,13 +962,13 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
        if (err)
                return err;
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
-           !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
+           !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
-                       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (err) {
                                E1000_ERR("No usable DMA configuration, "
                                          "aborting\n");
@@ -2335,6 +2335,12 @@ static void e1000_set_rx_mode(struct net_device *netdev)
        int mta_reg_count = (hw->mac_type == e1000_ich8lan) ?
                                E1000_NUM_MTA_REGISTERS_ICH8LAN :
                                E1000_NUM_MTA_REGISTERS;
+       u32 *mcarray = kcalloc(mta_reg_count, sizeof(u32), GFP_ATOMIC);
+
+       if (!mcarray) {
+               DPRINTK(PROBE, ERR, "memory allocation failed\n");
+               return;
+       }
 
        if (hw->mac_type == e1000_ich8lan)
                rar_entries = E1000_RAR_ENTRIES_ICH8LAN;
@@ -2401,22 +2407,34 @@ static void e1000_set_rx_mode(struct net_device *netdev)
        }
        WARN_ON(uc_ptr != NULL);
 
-       /* clear the old settings from the multicast hash table */
-
-       for (i = 0; i < mta_reg_count; i++) {
-               E1000_WRITE_REG_ARRAY(hw, MTA, i, 0);
-               E1000_WRITE_FLUSH();
-       }
-
        /* load any remaining addresses into the hash table */
 
        for (; mc_ptr; mc_ptr = mc_ptr->next) {
+               u32 hash_reg, hash_bit, mta;
                hash_value = e1000_hash_mc_addr(hw, mc_ptr->da_addr);
-               e1000_mta_set(hw, hash_value);
+               hash_reg = (hash_value >> 5) & 0x7F;
+               hash_bit = hash_value & 0x1F;
+               mta = (1 << hash_bit);
+               mcarray[hash_reg] |= mta;
        }
 
+       /* write the hash table completely, write from bottom to avoid
+        * both stupid write combining chipsets, and flushing each write */
+       for (i = mta_reg_count - 1; i >= 0 ; i--) {
+               /*
+                * If we are on an 82544 has an errata where writing odd
+                * offsets overwrites the previous even offset, but writing
+                * backwards over the range solves the issue by always
+                * writing the odd offset first
+                */
+               E1000_WRITE_REG_ARRAY(hw, MTA, i, mcarray[i]);
+       }
+       E1000_WRITE_FLUSH();
+
        if (hw->mac_type == e1000_82542_rev2_0)
                e1000_leave_82542_rst(adapter);
+
+       kfree(mcarray);
 }
 
 /* Need to wait a few seconds after link up to get diagnostic information from
index bfb2d6c..409b58c 100644 (file)
@@ -2203,7 +2203,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
        /* Setup the HW Tx Head and Tail descriptor pointers */
        tdba = tx_ring->dma;
        tdlen = tx_ring->count * sizeof(struct e1000_tx_desc);
-       ew32(TDBAL, (tdba & DMA_32BIT_MASK));
+       ew32(TDBAL, (tdba & DMA_BIT_MASK(32)));
        ew32(TDBAH, (tdba >> 32));
        ew32(TDLEN, tdlen);
        ew32(TDH, 0);
@@ -2459,7 +2459,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
         * the Base and Length of the Rx Descriptor Ring
         */
        rdba = rx_ring->dma;
-       ew32(RDBAL, (rdba & DMA_32BIT_MASK));
+       ew32(RDBAL, (rdba & DMA_BIT_MASK(32)));
        ew32(RDBAH, (rdba >> 32));
        ew32(RDLEN, rdlen);
        ew32(RDH, 0);
@@ -4763,16 +4763,16 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
                return err;
 
        pci_using_dac = 0;
-       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (!err) {
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (!err)
                        pci_using_dac = 1;
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        err = pci_set_consistent_dma_mask(pdev,
-                                                         DMA_32BIT_MASK);
+                                                         DMA_BIT_MASK(32));
                        if (err) {
                                dev_err(&pdev->dev, "No usable DMA "
                                        "configuration, aborting\n");
index 03403a5..9080f07 100644 (file)
@@ -1685,15 +1685,15 @@ static int __devinit enic_probe(struct pci_dev *pdev,
         * fail to 32-bit.
         */
 
-       err = pci_set_dma_mask(pdev, DMA_40BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(40));
        if (err) {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        printk(KERN_ERR PFX
                                "No usable DMA configuration, aborting.\n");
                        goto err_out_release_regions;
                }
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        printk(KERN_ERR PFX
                                "Unable to obtain 32-bit DMA "
@@ -1701,7 +1701,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
                        goto err_out_release_regions;
                }
        } else {
-               err = pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(40));
                if (err) {
                        printk(KERN_ERR PFX
                                "Unable to obtain 40-bit DMA "
index 51ead79..5210bb1 100644 (file)
@@ -542,6 +542,8 @@ static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
        }
        spin_unlock_bh(&eql->queue.lock);
 
+       dev_put(slave_dev);
+
        return ret;
 }
 
index a515acc..682e7f0 100644 (file)
@@ -1240,6 +1240,7 @@ static void __inline__ fec_phy_ack_intr(void)
        icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
        *icrp = 0x0d000000;
 }
+#endif
 
 #ifdef CONFIG_M5272
 static void __inline__ fec_get_mac(struct net_device *dev)
index a858c6f..d374650 100644 (file)
@@ -5632,12 +5632,12 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
                np->desc_ver = DESC_VER_3;
                np->txrxctl_bits = NVREG_TXRXCTL_DESC_3;
                if (dma_64bit) {
-                       if (pci_set_dma_mask(pci_dev, DMA_39BIT_MASK))
+                       if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(39)))
                                dev_printk(KERN_INFO, &pci_dev->dev,
                                        "64-bit DMA failed, using 32-bit addressing\n");
                        else
                                dev->features |= NETIF_F_HIGHDMA;
-                       if (pci_set_consistent_dma_mask(pci_dev, DMA_39BIT_MASK)) {
+                       if (pci_set_consistent_dma_mask(pci_dev, DMA_BIT_MASK(39))) {
                                dev_printk(KERN_INFO, &pci_dev->dev,
                                        "64-bit DMA (consistent) failed, using 32-bit ring buffers\n");
                        }
@@ -6117,6 +6117,9 @@ static int nv_resume(struct pci_dev *pdev)
 
        pci_write_config_dword(pdev, NV_MSI_PRIV_OFFSET, NV_MSI_PRIV_VALUE);
 
+       /* restore phy state, including autoneg */
+       phy_init(dev);
+
        netif_device_attach(dev);
        if (netif_running(dev)) {
                rc = nv_open(dev);
index ad8be7e..de3f49f 100644 (file)
@@ -580,7 +580,7 @@ static int __devinit hp100_probe1(struct net_device *dev, int ioaddr,
                         * Also, we can have EISA Busmaster cards (not tested),
                         * so beware !!! - Jean II */
                        if((bus == HP100_BUS_PCI) &&
-                          (pci_set_dma_mask(pci_dev, DMA_32BIT_MASK))) {
+                          (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)))) {
                                /* Gracefully fallback to shared memory */
                                goto busmasterfail;
                        }
index a815e17..77e4b5b 100644 (file)
@@ -1229,7 +1229,7 @@ static int emac_link_differs(struct emac_instance *dev)
 static void emac_link_timer(struct work_struct *work)
 {
        struct emac_instance *dev =
-               container_of((struct delayed_work *)work,
+               container_of(to_delayed_work(work),
                             struct emac_instance, link_work);
        int link_poll_interval;
 
index 03aa959..db7274e 100644 (file)
@@ -152,14 +152,13 @@ static struct notifier_block dca_notifier = {
 /* for netdump / net console */
 static void igb_netpoll(struct net_device *);
 #endif
-
 #ifdef CONFIG_PCI_IOV
-static ssize_t igb_set_num_vfs(struct device *, struct device_attribute *,
-                               const char *, size_t);
-static ssize_t igb_show_num_vfs(struct device *, struct device_attribute *,
-                               char *);
-DEVICE_ATTR(num_vfs, S_IRUGO | S_IWUSR, igb_show_num_vfs, igb_set_num_vfs);
-#endif
+static unsigned int max_vfs = 0;
+module_param(max_vfs, uint, 0);
+MODULE_PARM_DESC(max_vfs, "Maximum number of virtual functions to allocate "
+                 "per physical function");
+#endif /* CONFIG_PCI_IOV */
+
 static pci_ers_result_t igb_io_error_detected(struct pci_dev *,
                     pci_channel_state_t);
 static pci_ers_result_t igb_io_slot_reset(struct pci_dev *);
@@ -671,6 +670,21 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
 
        /* If we can't do MSI-X, try MSI */
 msi_only:
+#ifdef CONFIG_PCI_IOV
+       /* disable SR-IOV for non MSI-X configurations */
+       if (adapter->vf_data) {
+               struct e1000_hw *hw = &adapter->hw;
+               /* disable iov and allow time for transactions to clear */
+               pci_disable_sriov(adapter->pdev);
+               msleep(500);
+
+               kfree(adapter->vf_data);
+               adapter->vf_data = NULL;
+               wr32(E1000_IOVCTL, E1000_IOVCTL_REUSE_VFQ);
+               msleep(100);
+               dev_info(&adapter->pdev->dev, "IOV Disabled\n");
+       }
+#endif
        adapter->num_rx_queues = 1;
        adapter->num_tx_queues = 1;
        if (!pci_enable_msi(adapter->pdev))
@@ -1154,15 +1168,15 @@ static int __devinit igb_probe(struct pci_dev *pdev,
                return err;
 
        pci_using_dac = 0;
-       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (!err) {
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (!err)
                        pci_using_dac = 1;
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
-                       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (err) {
                                dev_err(&pdev->dev, "No usable DMA "
                                        "configuration, aborting\n");
@@ -1238,6 +1252,39 @@ static int __devinit igb_probe(struct pci_dev *pdev,
        if (err)
                goto err_sw_init;
 
+#ifdef CONFIG_PCI_IOV
+       /* since iov functionality isn't critical to base device function we
+        * can accept failure.  If it fails we don't allow iov to be enabled */
+       if (hw->mac.type == e1000_82576) {
+               /* 82576 supports a maximum of 7 VFs in addition to the PF */
+               unsigned int num_vfs = (max_vfs > 7) ? 7 : max_vfs;
+               int i;
+               unsigned char mac_addr[ETH_ALEN];
+
+               if (num_vfs)
+                       adapter->vf_data = kcalloc(num_vfs,
+                                               sizeof(struct vf_data_storage),
+                                               GFP_KERNEL);
+               if (!adapter->vf_data) {
+                       dev_err(&pdev->dev, "Could not allocate VF private "
+                               "data - IOV enable failed\n");
+               } else {
+                       err = pci_enable_sriov(pdev, num_vfs);
+                       if (!err) {
+                               adapter->vfs_allocated_count = num_vfs;
+                               dev_info(&pdev->dev, "%d vfs allocated\n", num_vfs);
+                               for (i = 0; i < adapter->vfs_allocated_count; i++) {
+                                       random_ether_addr(mac_addr);
+                                       igb_set_vf_mac(adapter, i, mac_addr);
+                               }
+                       } else {
+                               kfree(adapter->vf_data);
+                               adapter->vf_data = NULL;
+                       }
+               }
+       }
+
+#endif
        /* setup the private structure */
        err = igb_sw_init(adapter);
        if (err)
@@ -1397,19 +1444,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
        if (err)
                goto err_register;
 
-#ifdef CONFIG_PCI_IOV
-       /* since iov functionality isn't critical to base device function we
-        * can accept failure.  If it fails we don't allow iov to be enabled */
-       if (hw->mac.type == e1000_82576) {
-               err = pci_enable_sriov(pdev, 0);
-               if (!err)
-                       err = device_create_file(&netdev->dev,
-                                                &dev_attr_num_vfs);
-               if (err)
-                       dev_err(&pdev->dev, "Failed to initialize IOV\n");
-       }
-
-#endif
 #ifdef CONFIG_IGB_DCA
        if (dca_add_requester(&pdev->dev) == 0) {
                adapter->flags |= IGB_FLAG_DCA_ENABLED;
@@ -5422,89 +5456,4 @@ static void igb_vmm_control(struct igb_adapter *adapter)
        igb_vmdq_set_replication_pf(hw, true);
 }
 
-#ifdef CONFIG_PCI_IOV
-static ssize_t igb_show_num_vfs(struct device *dev,
-                                struct device_attribute *attr, char *buf)
-{
-       struct igb_adapter *adapter = netdev_priv(to_net_dev(dev));
-
-       return sprintf(buf, "%d\n", adapter->vfs_allocated_count);
-}
-
-static ssize_t igb_set_num_vfs(struct device *dev,
-                               struct device_attribute *attr,
-                               const char *buf, size_t count)
-{
-       struct net_device *netdev = to_net_dev(dev);
-       struct igb_adapter *adapter = netdev_priv(netdev);
-       struct e1000_hw *hw = &adapter->hw;
-       struct pci_dev *pdev = adapter->pdev;
-       unsigned int num_vfs, i;
-       unsigned char mac_addr[ETH_ALEN];
-       int err;
-
-       sscanf(buf, "%u", &num_vfs);
-
-       if (num_vfs > 7)
-               num_vfs = 7;
-
-       /* value unchanged do nothing */
-       if (num_vfs == adapter->vfs_allocated_count)
-               return count;
-
-       if (netdev->flags & IFF_UP)
-               igb_close(netdev);
-
-       igb_reset_interrupt_capability(adapter);
-       igb_free_queues(adapter);
-       adapter->tx_ring = NULL;
-       adapter->rx_ring = NULL;
-       adapter->vfs_allocated_count = 0;
-
-       /* reclaim resources allocated to VFs since we are changing count */
-       if (adapter->vf_data) {
-               /* disable iov and allow time for transactions to clear */
-               pci_disable_sriov(pdev);
-               msleep(500);
-
-               kfree(adapter->vf_data);
-               adapter->vf_data = NULL;
-               wr32(E1000_IOVCTL, E1000_IOVCTL_REUSE_VFQ);
-               msleep(100);
-               dev_info(&pdev->dev, "IOV Disabled\n");
-       }
-
-       if (num_vfs) {
-               adapter->vf_data = kcalloc(num_vfs,
-                                          sizeof(struct vf_data_storage),
-                                          GFP_KERNEL);
-               if (!adapter->vf_data) {
-                       dev_err(&pdev->dev, "Could not allocate VF private "
-                               "data - IOV enable failed\n");
-               } else {
-                       err = pci_enable_sriov(pdev, num_vfs);
-                       if (!err) {
-                               adapter->vfs_allocated_count = num_vfs;
-                               dev_info(&pdev->dev, "%d vfs allocated\n", num_vfs);
-                               for (i = 0; i < adapter->vfs_allocated_count; i++) {
-                                       random_ether_addr(mac_addr);
-                                       igb_set_vf_mac(adapter, i, mac_addr);
-                               }
-                       } else {
-                               kfree(adapter->vf_data);
-                               adapter->vf_data = NULL;
-                       }
-               }
-       }
-
-       igb_set_interrupt_capability(adapter);
-       igb_alloc_queues(adapter);
-       igb_reset(adapter);
-
-       if (netdev->flags & IFF_UP)
-               igb_open(netdev);
-
-       return count;
-}
-#endif /* CONFIG_PCI_IOV */
 /* igb_main.c */
diff --git a/drivers/net/igbvf/Makefile b/drivers/net/igbvf/Makefile
new file mode 100644 (file)
index 0000000..c2f150d
--- /dev/null
@@ -0,0 +1,38 @@
+################################################################################
+#
+# Intel(R) 82576 Virtual Function Linux driver
+# Copyright(c) 2009 Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# The full GNU General Public License is included in this distribution in
+# the file called "COPYING".
+#
+# Contact Information:
+# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+#
+################################################################################
+
+#
+# Makefile for the Intel(R) 82576 VF ethernet driver
+#
+
+obj-$(CONFIG_IGBVF) += igbvf.o
+
+igbvf-objs := vf.o \
+              mbx.o \
+              ethtool.o \
+              netdev.o
+
diff --git a/drivers/net/igbvf/defines.h b/drivers/net/igbvf/defines.h
new file mode 100644 (file)
index 0000000..88a4753
--- /dev/null
@@ -0,0 +1,125 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 1999 - 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+#ifndef _E1000_DEFINES_H_
+#define _E1000_DEFINES_H_
+
+/* Number of Transmit and Receive Descriptors must be a multiple of 8 */
+#define REQ_TX_DESCRIPTOR_MULTIPLE  8
+#define REQ_RX_DESCRIPTOR_MULTIPLE  8
+
+/* IVAR valid bit */
+#define E1000_IVAR_VALID        0x80
+
+/* Receive Descriptor bit definitions */
+#define E1000_RXD_STAT_DD       0x01    /* Descriptor Done */
+#define E1000_RXD_STAT_EOP      0x02    /* End of Packet */
+#define E1000_RXD_STAT_IXSM     0x04    /* Ignore checksum */
+#define E1000_RXD_STAT_VP       0x08    /* IEEE VLAN Packet */
+#define E1000_RXD_STAT_UDPCS    0x10    /* UDP xsum calculated */
+#define E1000_RXD_STAT_TCPCS    0x20    /* TCP xsum calculated */
+#define E1000_RXD_STAT_IPCS     0x40    /* IP xsum calculated */
+#define E1000_RXD_ERR_SE        0x02    /* Symbol Error */
+#define E1000_RXD_SPC_VLAN_MASK 0x0FFF  /* VLAN ID is in lower 12 bits */
+
+#define E1000_RXDEXT_STATERR_CE    0x01000000
+#define E1000_RXDEXT_STATERR_SE    0x02000000
+#define E1000_RXDEXT_STATERR_SEQ   0x04000000
+#define E1000_RXDEXT_STATERR_CXE   0x10000000
+#define E1000_RXDEXT_STATERR_TCPE  0x20000000
+#define E1000_RXDEXT_STATERR_IPE   0x40000000
+#define E1000_RXDEXT_STATERR_RXE   0x80000000
+
+
+/* Same mask, but for extended and packet split descriptors */
+#define E1000_RXDEXT_ERR_FRAME_ERR_MASK ( \
+    E1000_RXDEXT_STATERR_CE  |            \
+    E1000_RXDEXT_STATERR_SE  |            \
+    E1000_RXDEXT_STATERR_SEQ |            \
+    E1000_RXDEXT_STATERR_CXE |            \
+    E1000_RXDEXT_STATERR_RXE)
+
+/* Device Control */
+#define E1000_CTRL_RST      0x04000000  /* Global reset */
+
+/* Device Status */
+#define E1000_STATUS_FD         0x00000001      /* Full duplex.0=half,1=full */
+#define E1000_STATUS_LU         0x00000002      /* Link up.0=no,1=link */
+#define E1000_STATUS_TXOFF      0x00000010      /* transmission paused */
+#define E1000_STATUS_SPEED_10   0x00000000      /* Speed 10Mb/s */
+#define E1000_STATUS_SPEED_100  0x00000040      /* Speed 100Mb/s */
+#define E1000_STATUS_SPEED_1000 0x00000080      /* Speed 1000Mb/s */
+
+#define SPEED_10    10
+#define SPEED_100   100
+#define SPEED_1000  1000
+#define HALF_DUPLEX 1
+#define FULL_DUPLEX 2
+
+/* Transmit Descriptor bit definitions */
+#define E1000_TXD_POPTS_IXSM 0x01       /* Insert IP checksum */
+#define E1000_TXD_POPTS_TXSM 0x02       /* Insert TCP/UDP checksum */
+#define E1000_TXD_CMD_DEXT   0x20000000 /* Descriptor extension (0 = legacy) */
+#define E1000_TXD_STAT_DD    0x00000001 /* Descriptor Done */
+
+#define MAX_JUMBO_FRAME_SIZE    0x3F00
+
+/* 802.1q VLAN Packet Size */
+#define VLAN_TAG_SIZE              4    /* 802.3ac tag (not DMA'd) */
+
+/* Error Codes */
+#define E1000_SUCCESS      0
+#define E1000_ERR_CONFIG   3
+#define E1000_ERR_MAC_INIT 5
+#define E1000_ERR_MBX      15
+
+#ifndef ETH_ADDR_LEN
+#define ETH_ADDR_LEN                 6
+#endif
+
+/* SRRCTL bit definitions */
+#define E1000_SRRCTL_BSIZEPKT_SHIFT                     10 /* Shift _right_ */
+#define E1000_SRRCTL_BSIZEHDRSIZE_MASK                  0x00000F00
+#define E1000_SRRCTL_BSIZEHDRSIZE_SHIFT                 2  /* Shift _left_ */
+#define E1000_SRRCTL_DESCTYPE_ADV_ONEBUF                0x02000000
+#define E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS          0x0A000000
+#define E1000_SRRCTL_DESCTYPE_MASK                      0x0E000000
+#define E1000_SRRCTL_DROP_EN                            0x80000000
+
+#define E1000_SRRCTL_BSIZEPKT_MASK      0x0000007F
+#define E1000_SRRCTL_BSIZEHDR_MASK      0x00003F00
+
+/* Additional Descriptor Control definitions */
+#define E1000_TXDCTL_QUEUE_ENABLE  0x02000000 /* Enable specific Tx Queue */
+#define E1000_RXDCTL_QUEUE_ENABLE  0x02000000 /* Enable specific Rx Queue */
+
+/* Direct Cache Access (DCA) definitions */
+#define E1000_DCA_TXCTRL_TX_WB_RO_EN (1 << 11) /* Tx Desc writeback RO bit */
+
+#define E1000_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */
+
+#endif /* _E1000_DEFINES_H_ */
diff --git a/drivers/net/igbvf/ethtool.c b/drivers/net/igbvf/ethtool.c
new file mode 100644 (file)
index 0000000..1dcaa69
--- /dev/null
@@ -0,0 +1,540 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+/* ethtool support for igbvf */
+
+#include <linux/netdevice.h>
+#include <linux/ethtool.h>
+#include <linux/pci.h>
+#include <linux/vmalloc.h>
+#include <linux/delay.h>
+
+#include "igbvf.h"
+#include <linux/if_vlan.h>
+
+
+struct igbvf_stats {
+       char stat_string[ETH_GSTRING_LEN];
+       int sizeof_stat;
+       int stat_offset;
+       int base_stat_offset;
+};
+
+#define IGBVF_STAT(current, base) \
+               sizeof(((struct igbvf_adapter *)0)->current), \
+               offsetof(struct igbvf_adapter, current), \
+               offsetof(struct igbvf_adapter, base)
+
+static const struct igbvf_stats igbvf_gstrings_stats[] = {
+       { "rx_packets", IGBVF_STAT(stats.gprc, stats.base_gprc) },
+       { "tx_packets", IGBVF_STAT(stats.gptc, stats.base_gptc) },
+       { "rx_bytes", IGBVF_STAT(stats.gorc, stats.base_gorc) },
+       { "tx_bytes", IGBVF_STAT(stats.gotc, stats.base_gotc) },
+       { "multicast", IGBVF_STAT(stats.mprc, stats.base_mprc) },
+       { "lbrx_bytes", IGBVF_STAT(stats.gorlbc, stats.base_gorlbc) },
+       { "lbrx_packets", IGBVF_STAT(stats.gprlbc, stats.base_gprlbc) },
+       { "tx_restart_queue", IGBVF_STAT(restart_queue, zero_base) },
+       { "rx_long_byte_count", IGBVF_STAT(stats.gorc, stats.base_gorc) },
+       { "rx_csum_offload_good", IGBVF_STAT(hw_csum_good, zero_base) },
+       { "rx_csum_offload_errors", IGBVF_STAT(hw_csum_err, zero_base) },
+       { "rx_header_split", IGBVF_STAT(rx_hdr_split, zero_base) },
+       { "alloc_rx_buff_failed", IGBVF_STAT(alloc_rx_buff_failed, zero_base) },
+};
+
+#define IGBVF_GLOBAL_STATS_LEN ARRAY_SIZE(igbvf_gstrings_stats)
+
+static const char igbvf_gstrings_test[][ETH_GSTRING_LEN] = {
+       "Link test   (on/offline)"
+};
+
+#define IGBVF_TEST_LEN ARRAY_SIZE(igbvf_gstrings_test)
+
+static int igbvf_get_settings(struct net_device *netdev,
+                              struct ethtool_cmd *ecmd)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+       u32 status;
+
+       ecmd->supported   = SUPPORTED_1000baseT_Full;
+
+       ecmd->advertising = ADVERTISED_1000baseT_Full;
+
+       ecmd->port = -1;
+       ecmd->transceiver = XCVR_DUMMY1;
+
+       status = er32(STATUS);
+       if (status & E1000_STATUS_LU) {
+               if (status & E1000_STATUS_SPEED_1000)
+                       ecmd->speed = 1000;
+               else if (status & E1000_STATUS_SPEED_100)
+                       ecmd->speed = 100;
+               else
+                       ecmd->speed = 10;
+
+               if (status & E1000_STATUS_FD)
+                       ecmd->duplex = DUPLEX_FULL;
+               else
+                       ecmd->duplex = DUPLEX_HALF;
+       } else {
+               ecmd->speed = -1;
+               ecmd->duplex = -1;
+       }
+
+       ecmd->autoneg = AUTONEG_DISABLE;
+
+       return 0;
+}
+
+static u32 igbvf_get_link(struct net_device *netdev)
+{
+       return netif_carrier_ok(netdev);
+}
+
+static int igbvf_set_settings(struct net_device *netdev,
+                              struct ethtool_cmd *ecmd)
+{
+       return -EOPNOTSUPP;
+}
+
+static void igbvf_get_pauseparam(struct net_device *netdev,
+                                 struct ethtool_pauseparam *pause)
+{
+       return;
+}
+
+static int igbvf_set_pauseparam(struct net_device *netdev,
+                                struct ethtool_pauseparam *pause)
+{
+       return -EOPNOTSUPP;
+}
+
+static u32 igbvf_get_tx_csum(struct net_device *netdev)
+{
+       return ((netdev->features & NETIF_F_IP_CSUM) != 0);
+}
+
+static int igbvf_set_tx_csum(struct net_device *netdev, u32 data)
+{
+       if (data)
+               netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
+       else
+               netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
+       return 0;
+}
+
+static int igbvf_set_tso(struct net_device *netdev, u32 data)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       int i;
+       struct net_device *v_netdev;
+
+       if (data) {
+               netdev->features |= NETIF_F_TSO;
+               netdev->features |= NETIF_F_TSO6;
+       } else {
+               netdev->features &= ~NETIF_F_TSO;
+               netdev->features &= ~NETIF_F_TSO6;
+               /* disable TSO on all VLANs if they're present */
+               if (!adapter->vlgrp)
+                       goto tso_out;
+               for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
+                       v_netdev = vlan_group_get_device(adapter->vlgrp, i);
+                       if (!v_netdev)
+                               continue;
+
+                       v_netdev->features &= ~NETIF_F_TSO;
+                       v_netdev->features &= ~NETIF_F_TSO6;
+                       vlan_group_set_device(adapter->vlgrp, i, v_netdev);
+               }
+       }
+
+tso_out:
+       dev_info(&adapter->pdev->dev, "TSO is %s\n",
+                data ? "Enabled" : "Disabled");
+       adapter->flags |= FLAG_TSO_FORCE;
+       return 0;
+}
+
+static u32 igbvf_get_msglevel(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       return adapter->msg_enable;
+}
+
+static void igbvf_set_msglevel(struct net_device *netdev, u32 data)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       adapter->msg_enable = data;
+}
+
+static int igbvf_get_regs_len(struct net_device *netdev)
+{
+#define IGBVF_REGS_LEN 8
+       return IGBVF_REGS_LEN * sizeof(u32);
+}
+
+static void igbvf_get_regs(struct net_device *netdev,
+                           struct ethtool_regs *regs, void *p)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+       u32 *regs_buff = p;
+       u8 revision_id;
+
+       memset(p, 0, IGBVF_REGS_LEN * sizeof(u32));
+
+       pci_read_config_byte(adapter->pdev, PCI_REVISION_ID, &revision_id);
+
+       regs->version = (1 << 24) | (revision_id << 16) | adapter->pdev->device;
+
+       regs_buff[0] = er32(CTRL);
+       regs_buff[1] = er32(STATUS);
+
+       regs_buff[2] = er32(RDLEN(0));
+       regs_buff[3] = er32(RDH(0));
+       regs_buff[4] = er32(RDT(0));
+
+       regs_buff[5] = er32(TDLEN(0));
+       regs_buff[6] = er32(TDH(0));
+       regs_buff[7] = er32(TDT(0));
+}
+
+static int igbvf_get_eeprom_len(struct net_device *netdev)
+{
+       return 0;
+}
+
+static int igbvf_get_eeprom(struct net_device *netdev,
+                            struct ethtool_eeprom *eeprom, u8 *bytes)
+{
+       return -EOPNOTSUPP;
+}
+
+static int igbvf_set_eeprom(struct net_device *netdev,
+                            struct ethtool_eeprom *eeprom, u8 *bytes)
+{
+       return -EOPNOTSUPP;
+}
+
+static void igbvf_get_drvinfo(struct net_device *netdev,
+                              struct ethtool_drvinfo *drvinfo)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       char firmware_version[32] = "N/A";
+
+       strncpy(drvinfo->driver,  igbvf_driver_name, 32);
+       strncpy(drvinfo->version, igbvf_driver_version, 32);
+       strncpy(drvinfo->fw_version, firmware_version, 32);
+       strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
+       drvinfo->regdump_len = igbvf_get_regs_len(netdev);
+       drvinfo->eedump_len = igbvf_get_eeprom_len(netdev);
+}
+
+static void igbvf_get_ringparam(struct net_device *netdev,
+                                struct ethtool_ringparam *ring)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct igbvf_ring *tx_ring = adapter->tx_ring;
+       struct igbvf_ring *rx_ring = adapter->rx_ring;
+
+       ring->rx_max_pending = IGBVF_MAX_RXD;
+       ring->tx_max_pending = IGBVF_MAX_TXD;
+       ring->rx_mini_max_pending = 0;
+       ring->rx_jumbo_max_pending = 0;
+       ring->rx_pending = rx_ring->count;
+       ring->tx_pending = tx_ring->count;
+       ring->rx_mini_pending = 0;
+       ring->rx_jumbo_pending = 0;
+}
+
+static int igbvf_set_ringparam(struct net_device *netdev,
+                               struct ethtool_ringparam *ring)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct igbvf_ring *temp_ring;
+       int err;
+       u32 new_rx_count, new_tx_count;
+
+       if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
+               return -EINVAL;
+
+       new_rx_count = max(ring->rx_pending, (u32)IGBVF_MIN_RXD);
+       new_rx_count = min(new_rx_count, (u32)IGBVF_MAX_RXD);
+       new_rx_count = ALIGN(new_rx_count, REQ_RX_DESCRIPTOR_MULTIPLE);
+
+       new_tx_count = max(ring->tx_pending, (u32)IGBVF_MIN_TXD);
+       new_tx_count = min(new_tx_count, (u32)IGBVF_MAX_TXD);
+       new_tx_count = ALIGN(new_tx_count, REQ_TX_DESCRIPTOR_MULTIPLE);
+
+       if ((new_tx_count == adapter->tx_ring->count) &&
+           (new_rx_count == adapter->rx_ring->count)) {
+               /* nothing to do */
+               return 0;
+       }
+
+       temp_ring = vmalloc(sizeof(struct igbvf_ring));
+       if (!temp_ring)
+               return -ENOMEM;
+
+       while (test_and_set_bit(__IGBVF_RESETTING, &adapter->state))
+               msleep(1);
+
+       if (netif_running(adapter->netdev))
+               igbvf_down(adapter);
+
+       /*
+        * We can't just free everything and then setup again,
+        * because the ISRs in MSI-X mode get passed pointers
+        * to the tx and rx ring structs.
+        */
+       if (new_tx_count != adapter->tx_ring->count) {
+               memcpy(temp_ring, adapter->tx_ring, sizeof(struct igbvf_ring));
+
+               temp_ring->count = new_tx_count;
+               err = igbvf_setup_tx_resources(adapter, temp_ring);
+               if (err)
+                       goto err_setup;
+
+               igbvf_free_tx_resources(adapter->tx_ring);
+
+               memcpy(adapter->tx_ring, temp_ring, sizeof(struct igbvf_ring));
+       }
+
+       if (new_rx_count != adapter->rx_ring->count) {
+               memcpy(temp_ring, adapter->rx_ring, sizeof(struct igbvf_ring));
+
+               temp_ring->count = new_rx_count;
+               err = igbvf_setup_rx_resources(adapter, temp_ring);
+               if (err)
+                       goto err_setup;
+
+               igbvf_free_rx_resources(adapter->rx_ring);
+
+               memcpy(adapter->rx_ring, temp_ring,sizeof(struct igbvf_ring));
+       }
+
+       err = 0;
+err_setup:
+       if (netif_running(adapter->netdev))
+               igbvf_up(adapter);
+
+       clear_bit(__IGBVF_RESETTING, &adapter->state);
+       vfree(temp_ring);
+       return err;
+}
+
+static int igbvf_link_test(struct igbvf_adapter *adapter, u64 *data)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       *data = 0;
+
+       hw->mac.ops.check_for_link(hw);
+
+       if (!(er32(STATUS) & E1000_STATUS_LU))
+               *data = 1;
+
+       return *data;
+}
+
+static int igbvf_get_self_test_count(struct net_device *netdev)
+{
+       return IGBVF_TEST_LEN;
+}
+
+static int igbvf_get_stats_count(struct net_device *netdev)
+{
+       return IGBVF_GLOBAL_STATS_LEN;
+}
+
+static void igbvf_diag_test(struct net_device *netdev,
+                            struct ethtool_test *eth_test, u64 *data)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       set_bit(__IGBVF_TESTING, &adapter->state);
+
+       /*
+        * Link test performed before hardware reset so autoneg doesn't
+        * interfere with test result
+        */
+       if (igbvf_link_test(adapter, &data[0]))
+               eth_test->flags |= ETH_TEST_FL_FAILED;
+
+       clear_bit(__IGBVF_TESTING, &adapter->state);
+       msleep_interruptible(4 * 1000);
+}
+
+static void igbvf_get_wol(struct net_device *netdev,
+                          struct ethtool_wolinfo *wol)
+{
+       wol->supported = 0;
+       wol->wolopts = 0;
+
+       return;
+}
+
+static int igbvf_set_wol(struct net_device *netdev,
+                         struct ethtool_wolinfo *wol)
+{
+       return -EOPNOTSUPP;
+}
+
+static int igbvf_phys_id(struct net_device *netdev, u32 data)
+{
+       return 0;
+}
+
+static int igbvf_get_coalesce(struct net_device *netdev,
+                              struct ethtool_coalesce *ec)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       if (adapter->itr_setting <= 3)
+               ec->rx_coalesce_usecs = adapter->itr_setting;
+       else
+               ec->rx_coalesce_usecs = adapter->itr_setting >> 2;
+
+       return 0;
+}
+
+static int igbvf_set_coalesce(struct net_device *netdev,
+                              struct ethtool_coalesce *ec)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+
+       if ((ec->rx_coalesce_usecs > IGBVF_MAX_ITR_USECS) ||
+           ((ec->rx_coalesce_usecs > 3) &&
+            (ec->rx_coalesce_usecs < IGBVF_MIN_ITR_USECS)) ||
+           (ec->rx_coalesce_usecs == 2))
+               return -EINVAL;
+
+       /* convert to rate of irq's per second */
+       if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <= 3) {
+               adapter->itr = IGBVF_START_ITR;
+               adapter->itr_setting = ec->rx_coalesce_usecs;
+       } else {
+               adapter->itr = ec->rx_coalesce_usecs << 2;
+               adapter->itr_setting = adapter->itr;
+       }
+
+       writel(adapter->itr,
+              hw->hw_addr + adapter->rx_ring[0].itr_register);
+
+       return 0;
+}
+
+static int igbvf_nway_reset(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       if (netif_running(netdev))
+               igbvf_reinit_locked(adapter);
+       return 0;
+}
+
+
+static void igbvf_get_ethtool_stats(struct net_device *netdev,
+                                    struct ethtool_stats *stats,
+                                    u64 *data)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       int i;
+
+       igbvf_update_stats(adapter);
+       for (i = 0; i < IGBVF_GLOBAL_STATS_LEN; i++) {
+               char *p = (char *)adapter +
+                         igbvf_gstrings_stats[i].stat_offset;
+               char *b = (char *)adapter +
+                         igbvf_gstrings_stats[i].base_stat_offset;
+               data[i] = ((igbvf_gstrings_stats[i].sizeof_stat ==
+                           sizeof(u64)) ? (*(u64 *)p - *(u64 *)b) :
+                           (*(u32 *)p - *(u32 *)b));
+       }
+
+}
+
+static void igbvf_get_strings(struct net_device *netdev, u32 stringset,
+                              u8 *data)
+{
+       u8 *p = data;
+       int i;
+
+       switch (stringset) {
+       case ETH_SS_TEST:
+               memcpy(data, *igbvf_gstrings_test, sizeof(igbvf_gstrings_test));
+               break;
+       case ETH_SS_STATS:
+               for (i = 0; i < IGBVF_GLOBAL_STATS_LEN; i++) {
+                       memcpy(p, igbvf_gstrings_stats[i].stat_string,
+                              ETH_GSTRING_LEN);
+                       p += ETH_GSTRING_LEN;
+               }
+               break;
+       }
+}
+
+static const struct ethtool_ops igbvf_ethtool_ops = {
+       .get_settings           = igbvf_get_settings,
+       .set_settings           = igbvf_set_settings,
+       .get_drvinfo            = igbvf_get_drvinfo,
+       .get_regs_len           = igbvf_get_regs_len,
+       .get_regs               = igbvf_get_regs,
+       .get_wol                = igbvf_get_wol,
+       .set_wol                = igbvf_set_wol,
+       .get_msglevel           = igbvf_get_msglevel,
+       .set_msglevel           = igbvf_set_msglevel,
+       .nway_reset             = igbvf_nway_reset,
+       .get_link               = igbvf_get_link,
+       .get_eeprom_len         = igbvf_get_eeprom_len,
+       .get_eeprom             = igbvf_get_eeprom,
+       .set_eeprom             = igbvf_set_eeprom,
+       .get_ringparam          = igbvf_get_ringparam,
+       .set_ringparam          = igbvf_set_ringparam,
+       .get_pauseparam         = igbvf_get_pauseparam,
+       .set_pauseparam         = igbvf_set_pauseparam,
+       .get_tx_csum            = igbvf_get_tx_csum,
+       .set_tx_csum            = igbvf_set_tx_csum,
+       .get_sg                 = ethtool_op_get_sg,
+       .set_sg                 = ethtool_op_set_sg,
+       .get_tso                = ethtool_op_get_tso,
+       .set_tso                = igbvf_set_tso,
+       .self_test              = igbvf_diag_test,
+       .get_strings            = igbvf_get_strings,
+       .phys_id                = igbvf_phys_id,
+       .get_ethtool_stats      = igbvf_get_ethtool_stats,
+       .self_test_count        = igbvf_get_self_test_count,
+       .get_stats_count        = igbvf_get_stats_count,
+       .get_coalesce           = igbvf_get_coalesce,
+       .set_coalesce           = igbvf_set_coalesce,
+};
+
+void igbvf_set_ethtool_ops(struct net_device *netdev)
+{
+       /* have to "undeclare" const on this struct to remove warnings */
+       SET_ETHTOOL_OPS(netdev, (struct ethtool_ops *)&igbvf_ethtool_ops);
+}
diff --git a/drivers/net/igbvf/igbvf.h b/drivers/net/igbvf/igbvf.h
new file mode 100644 (file)
index 0000000..936ed2a
--- /dev/null
@@ -0,0 +1,335 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+/* Linux PRO/1000 Ethernet Driver main header file */
+
+#ifndef _IGBVF_H_
+#define _IGBVF_H_
+
+#include <linux/types.h>
+#include <linux/timer.h>
+#include <linux/io.h>
+#include <linux/netdevice.h>
+
+
+#include "vf.h"
+
+/* Forward declarations */
+struct igbvf_info;
+struct igbvf_adapter;
+
+/* Interrupt defines */
+#define IGBVF_START_ITR                 648 /* ~6000 ints/sec */
+
+/* Interrupt modes, as used by the IntMode paramter */
+#define IGBVF_INT_MODE_LEGACY           0
+#define IGBVF_INT_MODE_MSI              1
+#define IGBVF_INT_MODE_MSIX             2
+
+/* Tx/Rx descriptor defines */
+#define IGBVF_DEFAULT_TXD               256
+#define IGBVF_MAX_TXD                   4096
+#define IGBVF_MIN_TXD                   80
+
+#define IGBVF_DEFAULT_RXD               256
+#define IGBVF_MAX_RXD                   4096
+#define IGBVF_MIN_RXD                   80
+
+#define IGBVF_MIN_ITR_USECS             10 /* 100000 irq/sec */
+#define IGBVF_MAX_ITR_USECS             10000 /* 100    irq/sec */
+
+/* RX descriptor control thresholds.
+ * PTHRESH - MAC will consider prefetch if it has fewer than this number of
+ *           descriptors available in its onboard memory.
+ *           Setting this to 0 disables RX descriptor prefetch.
+ * HTHRESH - MAC will only prefetch if there are at least this many descriptors
+ *           available in host memory.
+ *           If PTHRESH is 0, this should also be 0.
+ * WTHRESH - RX descriptor writeback threshold - MAC will delay writing back
+ *           descriptors until either it has this many to write back, or the
+ *           ITR timer expires.
+ */
+#define IGBVF_RX_PTHRESH                16
+#define IGBVF_RX_HTHRESH                8
+#define IGBVF_RX_WTHRESH                1
+
+/* this is the size past which hardware will drop packets when setting LPE=0 */
+#define MAXIMUM_ETHERNET_VLAN_SIZE      1522
+
+#define IGBVF_FC_PAUSE_TIME             0x0680 /* 858 usec */
+
+/* How many Tx Descriptors do we need to call netif_wake_queue ? */
+#define IGBVF_TX_QUEUE_WAKE             32
+/* How many Rx Buffers do we bundle into one write to the hardware ? */
+#define IGBVF_RX_BUFFER_WRITE           16 /* Must be power of 2 */
+
+#define AUTO_ALL_MODES                  0
+#define IGBVF_EEPROM_APME               0x0400
+
+#define IGBVF_MNG_VLAN_NONE             (-1)
+
+/* Number of packet split data buffers (not including the header buffer) */
+#define PS_PAGE_BUFFERS                 (MAX_PS_BUFFERS - 1)
+
+enum igbvf_boards {
+       board_vf,
+};
+
+struct igbvf_queue_stats {
+       u64 packets;
+       u64 bytes;
+};
+
+/*
+ * wrappers around a pointer to a socket buffer,
+ * so a DMA handle can be stored along with the buffer
+ */
+struct igbvf_buffer {
+       dma_addr_t dma;
+       struct sk_buff *skb;
+       union {
+               /* Tx */
+               struct {
+                       unsigned long time_stamp;
+                       u16 length;
+                       u16 next_to_watch;
+               };
+               /* Rx */
+               struct {
+                       struct page *page;
+                       u64 page_dma;
+                       unsigned int page_offset;
+               };
+       };
+       struct page *page;
+};
+
+union igbvf_desc {
+       union e1000_adv_rx_desc rx_desc;
+       union e1000_adv_tx_desc tx_desc;
+       struct e1000_adv_tx_context_desc tx_context_desc;
+};
+
+struct igbvf_ring {
+       struct igbvf_adapter *adapter;  /* backlink */
+       union igbvf_desc *desc;         /* pointer to ring memory  */
+       dma_addr_t dma;                 /* phys address of ring    */
+       unsigned int size;              /* length of ring in bytes */
+       unsigned int count;             /* number of desc. in ring */
+
+       u16 next_to_use;
+       u16 next_to_clean;
+
+       u16 head;
+       u16 tail;
+
+       /* array of buffer information structs */
+       struct igbvf_buffer *buffer_info;
+       struct napi_struct napi;
+
+       char name[IFNAMSIZ + 5];
+       u32 eims_value;
+       u32 itr_val;
+       u16 itr_register;
+       int set_itr;
+
+       struct sk_buff *rx_skb_top;
+
+       struct igbvf_queue_stats stats;
+};
+
+/* board specific private data structure */
+struct igbvf_adapter {
+       struct timer_list watchdog_timer;
+       struct timer_list blink_timer;
+
+       struct work_struct reset_task;
+       struct work_struct watchdog_task;
+
+       const struct igbvf_info *ei;
+
+       struct vlan_group *vlgrp;
+       u32 bd_number;
+       u32 rx_buffer_len;
+       u32 polling_interval;
+       u16 mng_vlan_id;
+       u16 link_speed;
+       u16 link_duplex;
+
+       spinlock_t tx_queue_lock; /* prevent concurrent tail updates */
+
+       /* track device up/down/testing state */
+       unsigned long state;
+
+       /* Interrupt Throttle Rate */
+       u32 itr;
+       u32 itr_setting;
+       u16 tx_itr;
+       u16 rx_itr;
+
+       /*
+        * Tx
+        */
+       struct igbvf_ring *tx_ring /* One per active queue */
+       ____cacheline_aligned_in_smp;
+
+       unsigned long tx_queue_len;
+       unsigned int restart_queue;
+       u32 txd_cmd;
+
+       bool detect_tx_hung;
+       u8 tx_timeout_factor;
+
+       u32 tx_int_delay;
+       u32 tx_abs_int_delay;
+
+       unsigned int total_tx_bytes;
+       unsigned int total_tx_packets;
+       unsigned int total_rx_bytes;
+       unsigned int total_rx_packets;
+
+       /* Tx stats */
+       u32 tx_timeout_count;
+       u32 tx_fifo_head;
+       u32 tx_head_addr;
+       u32 tx_fifo_size;
+       u32 tx_dma_failed;
+
+       /*
+        * Rx
+        */
+       struct igbvf_ring *rx_ring;
+
+       u32 rx_int_delay;
+       u32 rx_abs_int_delay;
+
+       /* Rx stats */
+       u64 hw_csum_err;
+       u64 hw_csum_good;
+       u64 rx_hdr_split;
+       u32 alloc_rx_buff_failed;
+       u32 rx_dma_failed;
+
+       unsigned int rx_ps_hdr_size;
+       u32 max_frame_size;
+       u32 min_frame_size;
+
+       /* OS defined structs */
+       struct net_device *netdev;
+       struct pci_dev *pdev;
+       struct net_device_stats net_stats;
+       spinlock_t stats_lock;      /* prevent concurrent stats updates */
+
+       /* structs defined in e1000_hw.h */
+       struct e1000_hw hw;
+
+       /* The VF counters don't clear on read so we have to get a base
+        * count on driver start up and always subtract that base on
+        * on the first update, thus the flag..
+        */
+       struct e1000_vf_stats stats;
+       u64 zero_base;
+
+       struct igbvf_ring test_tx_ring;
+       struct igbvf_ring test_rx_ring;
+       u32 test_icr;
+
+       u32 msg_enable;
+       struct msix_entry *msix_entries;
+       int int_mode;
+       u32 eims_enable_mask;
+       u32 eims_other;
+       u32 int_counter0;
+       u32 int_counter1;
+
+       u32 eeprom_wol;
+       u32 wol;
+       u32 pba;
+
+       bool fc_autoneg;
+
+       unsigned long led_status;
+
+       unsigned int flags;
+};
+
+struct igbvf_info {
+       enum e1000_mac_type     mac;
+       unsigned int            flags;
+       u32                     pba;
+       void                    (*init_ops)(struct e1000_hw *);
+       s32                     (*get_variants)(struct igbvf_adapter *);
+};
+
+/* hardware capability, feature, and workaround flags */
+#define FLAG_HAS_HW_VLAN_FILTER           (1 << 0)
+#define FLAG_HAS_JUMBO_FRAMES             (1 << 1)
+#define FLAG_MSI_ENABLED                  (1 << 2)
+#define FLAG_RX_CSUM_ENABLED              (1 << 3)
+#define FLAG_TSO_FORCE                    (1 << 4)
+
+#define IGBVF_RX_DESC_ADV(R, i)     \
+       (&((((R).desc))[i].rx_desc))
+#define IGBVF_TX_DESC_ADV(R, i)     \
+       (&((((R).desc))[i].tx_desc))
+#define IGBVF_TX_CTXTDESC_ADV(R, i) \
+       (&((((R).desc))[i].tx_context_desc))
+
+enum igbvf_state_t {
+       __IGBVF_TESTING,
+       __IGBVF_RESETTING,
+       __IGBVF_DOWN
+};
+
+enum latency_range {
+       lowest_latency = 0,
+       low_latency = 1,
+       bulk_latency = 2,
+       latency_invalid = 255
+};
+
+extern char igbvf_driver_name[];
+extern const char igbvf_driver_version[];
+
+extern void igbvf_check_options(struct igbvf_adapter *);
+extern void igbvf_set_ethtool_ops(struct net_device *);
+
+extern int igbvf_up(struct igbvf_adapter *);
+extern void igbvf_down(struct igbvf_adapter *);
+extern void igbvf_reinit_locked(struct igbvf_adapter *);
+extern void igbvf_reset(struct igbvf_adapter *);
+extern int igbvf_setup_rx_resources(struct igbvf_adapter *, struct igbvf_ring *);
+extern int igbvf_setup_tx_resources(struct igbvf_adapter *, struct igbvf_ring *);
+extern void igbvf_free_rx_resources(struct igbvf_ring *);
+extern void igbvf_free_tx_resources(struct igbvf_ring *);
+extern void igbvf_update_stats(struct igbvf_adapter *);
+extern void igbvf_set_interrupt_capability(struct igbvf_adapter *);
+extern void igbvf_reset_interrupt_capability(struct igbvf_adapter *);
+
+extern unsigned int copybreak;
+
+#endif /* _IGBVF_H_ */
diff --git a/drivers/net/igbvf/mbx.c b/drivers/net/igbvf/mbx.c
new file mode 100644 (file)
index 0000000..819a8ec
--- /dev/null
@@ -0,0 +1,350 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+#include "mbx.h"
+
+/**
+ *  e1000_poll_for_msg - Wait for message notification
+ *  @hw: pointer to the HW structure
+ *
+ *  returns SUCCESS if it successfully received a message notification
+ **/
+static s32 e1000_poll_for_msg(struct e1000_hw *hw)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       int countdown = mbx->timeout;
+
+       if (!mbx->ops.check_for_msg)
+               goto out;
+
+       while (countdown && mbx->ops.check_for_msg(hw)) {
+               countdown--;
+               udelay(mbx->usec_delay);
+       }
+
+       /* if we failed, all future posted messages fail until reset */
+       if (!countdown)
+               mbx->timeout = 0;
+out:
+       return countdown ? E1000_SUCCESS : -E1000_ERR_MBX;
+}
+
+/**
+ *  e1000_poll_for_ack - Wait for message acknowledgement
+ *  @hw: pointer to the HW structure
+ *
+ *  returns SUCCESS if it successfully received a message acknowledgement
+ **/
+static s32 e1000_poll_for_ack(struct e1000_hw *hw)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       int countdown = mbx->timeout;
+
+       if (!mbx->ops.check_for_ack)
+               goto out;
+
+       while (countdown && mbx->ops.check_for_ack(hw)) {
+               countdown--;
+               udelay(mbx->usec_delay);
+       }
+
+       /* if we failed, all future posted messages fail until reset */
+       if (!countdown)
+               mbx->timeout = 0;
+out:
+       return countdown ? E1000_SUCCESS : -E1000_ERR_MBX;
+}
+
+/**
+ *  e1000_read_posted_mbx - Wait for message notification and receive message
+ *  @hw: pointer to the HW structure
+ *  @msg: The message buffer
+ *  @size: Length of buffer
+ *
+ *  returns SUCCESS if it successfully received a message notification and
+ *  copied it into the receive buffer.
+ **/
+static s32 e1000_read_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       s32 ret_val = -E1000_ERR_MBX;
+
+       if (!mbx->ops.read)
+               goto out;
+
+       ret_val = e1000_poll_for_msg(hw);
+
+       /* if ack received read message, otherwise we timed out */
+       if (!ret_val)
+               ret_val = mbx->ops.read(hw, msg, size);
+out:
+       return ret_val;
+}
+
+/**
+ *  e1000_write_posted_mbx - Write a message to the mailbox, wait for ack
+ *  @hw: pointer to the HW structure
+ *  @msg: The message buffer
+ *  @size: Length of buffer
+ *
+ *  returns SUCCESS if it successfully copied message into the buffer and
+ *  received an ack to that message within delay * timeout period
+ **/
+static s32 e1000_write_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       s32 ret_val = -E1000_ERR_MBX;
+
+       /* exit if we either can't write or there isn't a defined timeout */
+       if (!mbx->ops.write || !mbx->timeout)
+               goto out;
+
+       /* send msg*/
+       ret_val = mbx->ops.write(hw, msg, size);
+
+       /* if msg sent wait until we receive an ack */
+       if (!ret_val)
+               ret_val = e1000_poll_for_ack(hw);
+out:
+       return ret_val;
+}
+
+/**
+ *  e1000_read_v2p_mailbox - read v2p mailbox
+ *  @hw: pointer to the HW structure
+ *
+ *  This function is used to read the v2p mailbox without losing the read to
+ *  clear status bits.
+ **/
+static u32 e1000_read_v2p_mailbox(struct e1000_hw *hw)
+{
+       u32 v2p_mailbox = er32(V2PMAILBOX(0));
+
+       v2p_mailbox |= hw->dev_spec.vf.v2p_mailbox;
+       hw->dev_spec.vf.v2p_mailbox |= v2p_mailbox & E1000_V2PMAILBOX_R2C_BITS;
+
+       return v2p_mailbox;
+}
+
+/**
+ *  e1000_check_for_bit_vf - Determine if a status bit was set
+ *  @hw: pointer to the HW structure
+ *  @mask: bitmask for bits to be tested and cleared
+ *
+ *  This function is used to check for the read to clear bits within
+ *  the V2P mailbox.
+ **/
+static s32 e1000_check_for_bit_vf(struct e1000_hw *hw, u32 mask)
+{
+       u32 v2p_mailbox = e1000_read_v2p_mailbox(hw);
+       s32 ret_val = -E1000_ERR_MBX;
+
+       if (v2p_mailbox & mask)
+               ret_val = E1000_SUCCESS;
+
+       hw->dev_spec.vf.v2p_mailbox &= ~mask;
+
+       return ret_val;
+}
+
+/**
+ *  e1000_check_for_msg_vf - checks to see if the PF has sent mail
+ *  @hw: pointer to the HW structure
+ *
+ *  returns SUCCESS if the PF has set the Status bit or else ERR_MBX
+ **/
+static s32 e1000_check_for_msg_vf(struct e1000_hw *hw)
+{
+       s32 ret_val = -E1000_ERR_MBX;
+
+       if (!e1000_check_for_bit_vf(hw, E1000_V2PMAILBOX_PFSTS)) {
+               ret_val = E1000_SUCCESS;
+               hw->mbx.stats.reqs++;
+       }
+
+       return ret_val;
+}
+
+/**
+ *  e1000_check_for_ack_vf - checks to see if the PF has ACK'd
+ *  @hw: pointer to the HW structure
+ *
+ *  returns SUCCESS if the PF has set the ACK bit or else ERR_MBX
+ **/
+static s32 e1000_check_for_ack_vf(struct e1000_hw *hw)
+{
+       s32 ret_val = -E1000_ERR_MBX;
+
+       if (!e1000_check_for_bit_vf(hw, E1000_V2PMAILBOX_PFACK)) {
+               ret_val = E1000_SUCCESS;
+               hw->mbx.stats.acks++;
+       }
+
+       return ret_val;
+}
+
+/**
+ *  e1000_check_for_rst_vf - checks to see if the PF has reset
+ *  @hw: pointer to the HW structure
+ *
+ *  returns true if the PF has set the reset done bit or else false
+ **/
+static s32 e1000_check_for_rst_vf(struct e1000_hw *hw)
+{
+       s32 ret_val = -E1000_ERR_MBX;
+
+       if (!e1000_check_for_bit_vf(hw, (E1000_V2PMAILBOX_RSTD |
+                                        E1000_V2PMAILBOX_RSTI))) {
+               ret_val = E1000_SUCCESS;
+               hw->mbx.stats.rsts++;
+       }
+
+       return ret_val;
+}
+
+/**
+ *  e1000_obtain_mbx_lock_vf - obtain mailbox lock
+ *  @hw: pointer to the HW structure
+ *
+ *  return SUCCESS if we obtained the mailbox lock
+ **/
+static s32 e1000_obtain_mbx_lock_vf(struct e1000_hw *hw)
+{
+       s32 ret_val = -E1000_ERR_MBX;
+
+       /* Take ownership of the buffer */
+       ew32(V2PMAILBOX(0), E1000_V2PMAILBOX_VFU);
+
+       /* reserve mailbox for vf use */
+       if (e1000_read_v2p_mailbox(hw) & E1000_V2PMAILBOX_VFU)
+               ret_val = E1000_SUCCESS;
+
+       return ret_val;
+}
+
+/**
+ *  e1000_write_mbx_vf - Write a message to the mailbox
+ *  @hw: pointer to the HW structure
+ *  @msg: The message buffer
+ *  @size: Length of buffer
+ *
+ *  returns SUCCESS if it successfully copied message into the buffer
+ **/
+static s32 e1000_write_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size)
+{
+       s32 err;
+       u16 i;
+
+       /* lock the mailbox to prevent pf/vf race condition */
+       err = e1000_obtain_mbx_lock_vf(hw);
+       if (err)
+               goto out_no_write;
+
+       /* flush any ack or msg as we are going to overwrite mailbox */
+       e1000_check_for_ack_vf(hw);
+       e1000_check_for_msg_vf(hw);
+
+       /* copy the caller specified message to the mailbox memory buffer */
+       for (i = 0; i < size; i++)
+               array_ew32(VMBMEM(0), i, msg[i]);
+
+       /* update stats */
+       hw->mbx.stats.msgs_tx++;
+
+       /* Drop VFU and interrupt the PF to tell it a message has been sent */
+       ew32(V2PMAILBOX(0), E1000_V2PMAILBOX_REQ);
+
+out_no_write:
+       return err;
+}
+
+/**
+ *  e1000_read_mbx_vf - Reads a message from the inbox intended for vf
+ *  @hw: pointer to the HW structure
+ *  @msg: The message buffer
+ *  @size: Length of buffer
+ *
+ *  returns SUCCESS if it successfuly read message from buffer
+ **/
+static s32 e1000_read_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size)
+{
+       s32 err;
+       u16 i;
+
+       /* lock the mailbox to prevent pf/vf race condition */
+       err = e1000_obtain_mbx_lock_vf(hw);
+       if (err)
+               goto out_no_read;
+
+       /* copy the message from the mailbox memory buffer */
+       for (i = 0; i < size; i++)
+               msg[i] = array_er32(VMBMEM(0), i);
+
+       /* Acknowledge receipt and release mailbox, then we're done */
+       ew32(V2PMAILBOX(0), E1000_V2PMAILBOX_ACK);
+
+       /* update stats */
+       hw->mbx.stats.msgs_rx++;
+
+out_no_read:
+       return err;
+}
+
+/**
+ *  e1000_init_mbx_params_vf - set initial values for vf mailbox
+ *  @hw: pointer to the HW structure
+ *
+ *  Initializes the hw->mbx struct to correct values for vf mailbox
+ */
+s32 e1000_init_mbx_params_vf(struct e1000_hw *hw)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+
+       /* start mailbox as timed out and let the reset_hw call set the timeout
+        * value to being communications */
+       mbx->timeout = 0;
+       mbx->usec_delay = E1000_VF_MBX_INIT_DELAY;
+
+       mbx->size = E1000_VFMAILBOX_SIZE;
+
+       mbx->ops.read = e1000_read_mbx_vf;
+       mbx->ops.write = e1000_write_mbx_vf;
+       mbx->ops.read_posted = e1000_read_posted_mbx;
+       mbx->ops.write_posted = e1000_write_posted_mbx;
+       mbx->ops.check_for_msg = e1000_check_for_msg_vf;
+       mbx->ops.check_for_ack = e1000_check_for_ack_vf;
+       mbx->ops.check_for_rst = e1000_check_for_rst_vf;
+
+       mbx->stats.msgs_tx = 0;
+       mbx->stats.msgs_rx = 0;
+       mbx->stats.reqs = 0;
+       mbx->stats.acks = 0;
+       mbx->stats.rsts = 0;
+
+       return E1000_SUCCESS;
+}
+
diff --git a/drivers/net/igbvf/mbx.h b/drivers/net/igbvf/mbx.h
new file mode 100644 (file)
index 0000000..4938609
--- /dev/null
@@ -0,0 +1,75 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 1999 - 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+#ifndef _E1000_MBX_H_
+#define _E1000_MBX_H_
+
+#include "vf.h"
+
+#define E1000_V2PMAILBOX_REQ   0x00000001 /* Request for PF Ready bit */
+#define E1000_V2PMAILBOX_ACK   0x00000002 /* Ack PF message received */
+#define E1000_V2PMAILBOX_VFU   0x00000004 /* VF owns the mailbox buffer */
+#define E1000_V2PMAILBOX_PFU   0x00000008 /* PF owns the mailbox buffer */
+#define E1000_V2PMAILBOX_PFSTS 0x00000010 /* PF wrote a message in the MB */
+#define E1000_V2PMAILBOX_PFACK 0x00000020 /* PF ack the previous VF msg */
+#define E1000_V2PMAILBOX_RSTI  0x00000040 /* PF has reset indication */
+#define E1000_V2PMAILBOX_RSTD  0x00000080 /* PF has indicated reset done */
+#define E1000_V2PMAILBOX_R2C_BITS 0x000000B0 /* All read to clear bits */
+
+#define E1000_VFMAILBOX_SIZE   16 /* 16 32 bit words - 64 bytes */
+
+/* If it's a E1000_VF_* msg then it originates in the VF and is sent to the
+ * PF.  The reverse is true if it is E1000_PF_*.
+ * Message ACK's are the value or'd with 0xF0000000
+ */
+#define E1000_VT_MSGTYPE_ACK      0x80000000  /* Messages below or'd with
+                                               * this are the ACK */
+#define E1000_VT_MSGTYPE_NACK     0x40000000  /* Messages below or'd with
+                                               * this are the NACK */
+#define E1000_VT_MSGTYPE_CTS      0x20000000  /* Indicates that VF is still
+                                                 clear to send requests */
+
+/* We have a total wait time of 1s for vf mailbox posted messages */
+#define E1000_VF_MBX_INIT_TIMEOUT 2000 /* retry count for mailbox timeout */
+#define E1000_VF_MBX_INIT_DELAY   500  /* usec delay between retries */
+
+#define E1000_VT_MSGINFO_SHIFT    16
+/* bits 23:16 are used for exra info for certain messages */
+#define E1000_VT_MSGINFO_MASK     (0xFF << E1000_VT_MSGINFO_SHIFT)
+
+#define E1000_VF_RESET            0x01 /* VF requests reset */
+#define E1000_VF_SET_MAC_ADDR     0x02 /* VF requests PF to set MAC addr */
+#define E1000_VF_SET_MULTICAST    0x03 /* VF requests PF to set MC addr */
+#define E1000_VF_SET_VLAN         0x04 /* VF requests PF to set VLAN */
+#define E1000_VF_SET_LPE          0x05 /* VF requests PF to set VMOLR.LPE */
+
+#define E1000_PF_CONTROL_MSG      0x0100 /* PF control message */
+
+void e1000_init_mbx_ops_generic(struct e1000_hw *hw);
+s32 e1000_init_mbx_params_vf(struct e1000_hw *);
+
+#endif /* _E1000_MBX_H_ */
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
new file mode 100644 (file)
index 0000000..c564842
--- /dev/null
@@ -0,0 +1,2919 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/vmalloc.h>
+#include <linux/pagemap.h>
+#include <linux/delay.h>
+#include <linux/netdevice.h>
+#include <linux/tcp.h>
+#include <linux/ipv6.h>
+#include <net/checksum.h>
+#include <net/ip6_checksum.h>
+#include <linux/mii.h>
+#include <linux/ethtool.h>
+#include <linux/if_vlan.h>
+#include <linux/pm_qos_params.h>
+
+#include "igbvf.h"
+
+#define DRV_VERSION "1.0.0-k0"
+char igbvf_driver_name[] = "igbvf";
+const char igbvf_driver_version[] = DRV_VERSION;
+static const char igbvf_driver_string[] =
+                               "Intel(R) Virtual Function Network Driver";
+static const char igbvf_copyright[] = "Copyright (c) 2009 Intel Corporation.";
+
+static int igbvf_poll(struct napi_struct *napi, int budget);
+
+static struct igbvf_info igbvf_vf_info = {
+       .mac                    = e1000_vfadapt,
+       .flags                  = FLAG_HAS_JUMBO_FRAMES
+                                 | FLAG_RX_CSUM_ENABLED,
+       .pba                    = 10,
+       .init_ops               = e1000_init_function_pointers_vf,
+};
+
+static const struct igbvf_info *igbvf_info_tbl[] = {
+       [board_vf]              = &igbvf_vf_info,
+};
+
+/**
+ * igbvf_desc_unused - calculate if we have unused descriptors
+ **/
+static int igbvf_desc_unused(struct igbvf_ring *ring)
+{
+       if (ring->next_to_clean > ring->next_to_use)
+               return ring->next_to_clean - ring->next_to_use - 1;
+
+       return ring->count + ring->next_to_clean - ring->next_to_use - 1;
+}
+
+/**
+ * igbvf_receive_skb - helper function to handle Rx indications
+ * @adapter: board private structure
+ * @status: descriptor status field as written by hardware
+ * @vlan: descriptor vlan field as written by hardware (no le/be conversion)
+ * @skb: pointer to sk_buff to be indicated to stack
+ **/
+static void igbvf_receive_skb(struct igbvf_adapter *adapter,
+                              struct net_device *netdev,
+                              struct sk_buff *skb,
+                              u32 status, u16 vlan)
+{
+       if (adapter->vlgrp && (status & E1000_RXD_STAT_VP))
+               vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
+                                        le16_to_cpu(vlan) &
+                                        E1000_RXD_SPC_VLAN_MASK);
+       else
+               netif_receive_skb(skb);
+
+       netdev->last_rx = jiffies;
+}
+
+static inline void igbvf_rx_checksum_adv(struct igbvf_adapter *adapter,
+                                         u32 status_err, struct sk_buff *skb)
+{
+       skb->ip_summed = CHECKSUM_NONE;
+
+       /* Ignore Checksum bit is set or checksum is disabled through ethtool */
+       if ((status_err & E1000_RXD_STAT_IXSM))
+               return;
+       /* TCP/UDP checksum error bit is set */
+       if (status_err &
+           (E1000_RXDEXT_STATERR_TCPE | E1000_RXDEXT_STATERR_IPE)) {
+               /* let the stack verify checksum errors */
+               adapter->hw_csum_err++;
+               return;
+       }
+       /* It must be a TCP or UDP packet with a valid checksum */
+       if (status_err & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))
+               skb->ip_summed = CHECKSUM_UNNECESSARY;
+
+       adapter->hw_csum_good++;
+}
+
+/**
+ * igbvf_alloc_rx_buffers - Replace used receive buffers; packet split
+ * @rx_ring: address of ring structure to repopulate
+ * @cleaned_count: number of buffers to repopulate
+ **/
+static void igbvf_alloc_rx_buffers(struct igbvf_ring *rx_ring,
+                                   int cleaned_count)
+{
+       struct igbvf_adapter *adapter = rx_ring->adapter;
+       struct net_device *netdev = adapter->netdev;
+       struct pci_dev *pdev = adapter->pdev;
+       union e1000_adv_rx_desc *rx_desc;
+       struct igbvf_buffer *buffer_info;
+       struct sk_buff *skb;
+       unsigned int i;
+       int bufsz;
+
+       i = rx_ring->next_to_use;
+       buffer_info = &rx_ring->buffer_info[i];
+
+       if (adapter->rx_ps_hdr_size)
+               bufsz = adapter->rx_ps_hdr_size;
+       else
+               bufsz = adapter->rx_buffer_len;
+       bufsz += NET_IP_ALIGN;
+
+       while (cleaned_count--) {
+               rx_desc = IGBVF_RX_DESC_ADV(*rx_ring, i);
+
+               if (adapter->rx_ps_hdr_size && !buffer_info->page_dma) {
+                       if (!buffer_info->page) {
+                               buffer_info->page = alloc_page(GFP_ATOMIC);
+                               if (!buffer_info->page) {
+                                       adapter->alloc_rx_buff_failed++;
+                                       goto no_buffers;
+                               }
+                               buffer_info->page_offset = 0;
+                       } else {
+                               buffer_info->page_offset ^= PAGE_SIZE / 2;
+                       }
+                       buffer_info->page_dma =
+                               pci_map_page(pdev, buffer_info->page,
+                                            buffer_info->page_offset,
+                                            PAGE_SIZE / 2,
+                                            PCI_DMA_FROMDEVICE);
+               }
+
+               if (!buffer_info->skb) {
+                       skb = netdev_alloc_skb(netdev, bufsz);
+                       if (!skb) {
+                               adapter->alloc_rx_buff_failed++;
+                               goto no_buffers;
+                       }
+
+                       /* Make buffer alignment 2 beyond a 16 byte boundary
+                        * this will result in a 16 byte aligned IP header after
+                        * the 14 byte MAC header is removed
+                        */
+                       skb_reserve(skb, NET_IP_ALIGN);
+
+                       buffer_info->skb = skb;
+                       buffer_info->dma = pci_map_single(pdev, skb->data,
+                                                         bufsz,
+                                                         PCI_DMA_FROMDEVICE);
+               }
+               /* Refresh the desc even if buffer_addrs didn't change because
+                * each write-back erases this info. */
+               if (adapter->rx_ps_hdr_size) {
+                       rx_desc->read.pkt_addr =
+                            cpu_to_le64(buffer_info->page_dma);
+                       rx_desc->read.hdr_addr = cpu_to_le64(buffer_info->dma);
+               } else {
+                       rx_desc->read.pkt_addr =
+                            cpu_to_le64(buffer_info->dma);
+                       rx_desc->read.hdr_addr = 0;
+               }
+
+               i++;
+               if (i == rx_ring->count)
+                       i = 0;
+               buffer_info = &rx_ring->buffer_info[i];
+       }
+
+no_buffers:
+       if (rx_ring->next_to_use != i) {
+               rx_ring->next_to_use = i;
+               if (i == 0)
+                       i = (rx_ring->count - 1);
+               else
+                       i--;
+
+               /* Force memory writes to complete before letting h/w
+                * know there are new descriptors to fetch.  (Only
+                * applicable for weak-ordered memory model archs,
+                * such as IA-64). */
+               wmb();
+               writel(i, adapter->hw.hw_addr + rx_ring->tail);
+       }
+}
+
+/**
+ * igbvf_clean_rx_irq - Send received data up the network stack; legacy
+ * @adapter: board private structure
+ *
+ * the return value indicates whether actual cleaning was done, there
+ * is no guarantee that everything was cleaned
+ **/
+static bool igbvf_clean_rx_irq(struct igbvf_adapter *adapter,
+                               int *work_done, int work_to_do)
+{
+       struct igbvf_ring *rx_ring = adapter->rx_ring;
+       struct net_device *netdev = adapter->netdev;
+       struct pci_dev *pdev = adapter->pdev;
+       union e1000_adv_rx_desc *rx_desc, *next_rxd;
+       struct igbvf_buffer *buffer_info, *next_buffer;
+       struct sk_buff *skb;
+       bool cleaned = false;
+       int cleaned_count = 0;
+       unsigned int total_bytes = 0, total_packets = 0;
+       unsigned int i;
+       u32 length, hlen, staterr;
+
+       i = rx_ring->next_to_clean;
+       rx_desc = IGBVF_RX_DESC_ADV(*rx_ring, i);
+       staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
+
+       while (staterr & E1000_RXD_STAT_DD) {
+               if (*work_done >= work_to_do)
+                       break;
+               (*work_done)++;
+
+               buffer_info = &rx_ring->buffer_info[i];
+
+               /* HW will not DMA in data larger than the given buffer, even
+                * if it parses the (NFS, of course) header to be larger.  In
+                * that case, it fills the header buffer and spills the rest
+                * into the page.
+                */
+               hlen = (le16_to_cpu(rx_desc->wb.lower.lo_dword.hs_rss.hdr_info) &
+                 E1000_RXDADV_HDRBUFLEN_MASK) >> E1000_RXDADV_HDRBUFLEN_SHIFT;
+               if (hlen > adapter->rx_ps_hdr_size)
+                       hlen = adapter->rx_ps_hdr_size;
+
+               length = le16_to_cpu(rx_desc->wb.upper.length);
+               cleaned = true;
+               cleaned_count++;
+
+               skb = buffer_info->skb;
+               prefetch(skb->data - NET_IP_ALIGN);
+               buffer_info->skb = NULL;
+               if (!adapter->rx_ps_hdr_size) {
+                       pci_unmap_single(pdev, buffer_info->dma,
+                                        adapter->rx_buffer_len,
+                                        PCI_DMA_FROMDEVICE);
+                       buffer_info->dma = 0;
+                       skb_put(skb, length);
+                       goto send_up;
+               }
+
+               if (!skb_shinfo(skb)->nr_frags) {
+                       pci_unmap_single(pdev, buffer_info->dma,
+                                        adapter->rx_ps_hdr_size + NET_IP_ALIGN,
+                                        PCI_DMA_FROMDEVICE);
+                       skb_put(skb, hlen);
+               }
+
+               if (length) {
+                       pci_unmap_page(pdev, buffer_info->page_dma,
+                                      PAGE_SIZE / 2,
+                                      PCI_DMA_FROMDEVICE);
+                       buffer_info->page_dma = 0;
+
+                       skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags++,
+                                          buffer_info->page,
+                                          buffer_info->page_offset,
+                                          length);
+
+                       if ((adapter->rx_buffer_len > (PAGE_SIZE / 2)) ||
+                           (page_count(buffer_info->page) != 1))
+                               buffer_info->page = NULL;
+                       else
+                               get_page(buffer_info->page);
+
+                       skb->len += length;
+                       skb->data_len += length;
+                       skb->truesize += length;
+               }
+send_up:
+               i++;
+               if (i == rx_ring->count)
+                       i = 0;
+               next_rxd = IGBVF_RX_DESC_ADV(*rx_ring, i);
+               prefetch(next_rxd);
+               next_buffer = &rx_ring->buffer_info[i];
+
+               if (!(staterr & E1000_RXD_STAT_EOP)) {
+                       buffer_info->skb = next_buffer->skb;
+                       buffer_info->dma = next_buffer->dma;
+                       next_buffer->skb = skb;
+                       next_buffer->dma = 0;
+                       goto next_desc;
+               }
+
+               if (staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) {
+                       dev_kfree_skb_irq(skb);
+                       goto next_desc;
+               }
+
+               total_bytes += skb->len;
+               total_packets++;
+
+               igbvf_rx_checksum_adv(adapter, staterr, skb);
+
+               skb->protocol = eth_type_trans(skb, netdev);
+
+               igbvf_receive_skb(adapter, netdev, skb, staterr,
+                                 rx_desc->wb.upper.vlan);
+
+               netdev->last_rx = jiffies;
+
+next_desc:
+               rx_desc->wb.upper.status_error = 0;
+
+               /* return some buffers to hardware, one at a time is too slow */
+               if (cleaned_count >= IGBVF_RX_BUFFER_WRITE) {
+                       igbvf_alloc_rx_buffers(rx_ring, cleaned_count);
+                       cleaned_count = 0;
+               }
+
+               /* use prefetched values */
+               rx_desc = next_rxd;
+               buffer_info = next_buffer;
+
+               staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
+       }
+
+       rx_ring->next_to_clean = i;
+       cleaned_count = igbvf_desc_unused(rx_ring);
+
+       if (cleaned_count)
+               igbvf_alloc_rx_buffers(rx_ring, cleaned_count);
+
+       adapter->total_rx_packets += total_packets;
+       adapter->total_rx_bytes += total_bytes;
+       adapter->net_stats.rx_bytes += total_bytes;
+       adapter->net_stats.rx_packets += total_packets;
+       return cleaned;
+}
+
+static void igbvf_put_txbuf(struct igbvf_adapter *adapter,
+                            struct igbvf_buffer *buffer_info)
+{
+       buffer_info->dma = 0;
+       if (buffer_info->skb) {
+               skb_dma_unmap(&adapter->pdev->dev, buffer_info->skb,
+                             DMA_TO_DEVICE);
+               dev_kfree_skb_any(buffer_info->skb);
+               buffer_info->skb = NULL;
+       }
+       buffer_info->time_stamp = 0;
+}
+
+static void igbvf_print_tx_hang(struct igbvf_adapter *adapter)
+{
+       struct igbvf_ring *tx_ring = adapter->tx_ring;
+       unsigned int i = tx_ring->next_to_clean;
+       unsigned int eop = tx_ring->buffer_info[i].next_to_watch;
+       union e1000_adv_tx_desc *eop_desc = IGBVF_TX_DESC_ADV(*tx_ring, eop);
+
+       /* detected Tx unit hang */
+       dev_err(&adapter->pdev->dev,
+               "Detected Tx Unit Hang:\n"
+               "  TDH                  <%x>\n"
+               "  TDT                  <%x>\n"
+               "  next_to_use          <%x>\n"
+               "  next_to_clean        <%x>\n"
+               "buffer_info[next_to_clean]:\n"
+               "  time_stamp           <%lx>\n"
+               "  next_to_watch        <%x>\n"
+               "  jiffies              <%lx>\n"
+               "  next_to_watch.status <%x>\n",
+               readl(adapter->hw.hw_addr + tx_ring->head),
+               readl(adapter->hw.hw_addr + tx_ring->tail),
+               tx_ring->next_to_use,
+               tx_ring->next_to_clean,
+               tx_ring->buffer_info[eop].time_stamp,
+               eop,
+               jiffies,
+               eop_desc->wb.status);
+}
+
+/**
+ * igbvf_setup_tx_resources - allocate Tx resources (Descriptors)
+ * @adapter: board private structure
+ *
+ * Return 0 on success, negative on failure
+ **/
+int igbvf_setup_tx_resources(struct igbvf_adapter *adapter,
+                             struct igbvf_ring *tx_ring)
+{
+       struct pci_dev *pdev = adapter->pdev;
+       int size;
+
+       size = sizeof(struct igbvf_buffer) * tx_ring->count;
+       tx_ring->buffer_info = vmalloc(size);
+       if (!tx_ring->buffer_info)
+               goto err;
+       memset(tx_ring->buffer_info, 0, size);
+
+       /* round up to nearest 4K */
+       tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
+       tx_ring->size = ALIGN(tx_ring->size, 4096);
+
+       tx_ring->desc = pci_alloc_consistent(pdev, tx_ring->size,
+                                            &tx_ring->dma);
+
+       if (!tx_ring->desc)
+               goto err;
+
+       tx_ring->adapter = adapter;
+       tx_ring->next_to_use = 0;
+       tx_ring->next_to_clean = 0;
+
+       return 0;
+err:
+       vfree(tx_ring->buffer_info);
+       dev_err(&adapter->pdev->dev,
+               "Unable to allocate memory for the transmit descriptor ring\n");
+       return -ENOMEM;
+}
+
+/**
+ * igbvf_setup_rx_resources - allocate Rx resources (Descriptors)
+ * @adapter: board private structure
+ *
+ * Returns 0 on success, negative on failure
+ **/
+int igbvf_setup_rx_resources(struct igbvf_adapter *adapter,
+                            struct igbvf_ring *rx_ring)
+{
+       struct pci_dev *pdev = adapter->pdev;
+       int size, desc_len;
+
+       size = sizeof(struct igbvf_buffer) * rx_ring->count;
+       rx_ring->buffer_info = vmalloc(size);
+       if (!rx_ring->buffer_info)
+               goto err;
+       memset(rx_ring->buffer_info, 0, size);
+
+       desc_len = sizeof(union e1000_adv_rx_desc);
+
+       /* Round up to nearest 4K */
+       rx_ring->size = rx_ring->count * desc_len;
+       rx_ring->size = ALIGN(rx_ring->size, 4096);
+
+       rx_ring->desc = pci_alloc_consistent(pdev, rx_ring->size,
+                                            &rx_ring->dma);
+
+       if (!rx_ring->desc)
+               goto err;
+
+       rx_ring->next_to_clean = 0;
+       rx_ring->next_to_use = 0;
+
+       rx_ring->adapter = adapter;
+
+       return 0;
+
+err:
+       vfree(rx_ring->buffer_info);
+       rx_ring->buffer_info = NULL;
+       dev_err(&adapter->pdev->dev,
+               "Unable to allocate memory for the receive descriptor ring\n");
+       return -ENOMEM;
+}
+
+/**
+ * igbvf_clean_tx_ring - Free Tx Buffers
+ * @tx_ring: ring to be cleaned
+ **/
+static void igbvf_clean_tx_ring(struct igbvf_ring *tx_ring)
+{
+       struct igbvf_adapter *adapter = tx_ring->adapter;
+       struct igbvf_buffer *buffer_info;
+       unsigned long size;
+       unsigned int i;
+
+       if (!tx_ring->buffer_info)
+               return;
+
+       /* Free all the Tx ring sk_buffs */
+       for (i = 0; i < tx_ring->count; i++) {
+               buffer_info = &tx_ring->buffer_info[i];
+               igbvf_put_txbuf(adapter, buffer_info);
+       }
+
+       size = sizeof(struct igbvf_buffer) * tx_ring->count;
+       memset(tx_ring->buffer_info, 0, size);
+
+       /* Zero out the descriptor ring */
+       memset(tx_ring->desc, 0, tx_ring->size);
+
+       tx_ring->next_to_use = 0;
+       tx_ring->next_to_clean = 0;
+
+       writel(0, adapter->hw.hw_addr + tx_ring->head);
+       writel(0, adapter->hw.hw_addr + tx_ring->tail);
+}
+
+/**
+ * igbvf_free_tx_resources - Free Tx Resources per Queue
+ * @tx_ring: ring to free resources from
+ *
+ * Free all transmit software resources
+ **/
+void igbvf_free_tx_resources(struct igbvf_ring *tx_ring)
+{
+       struct pci_dev *pdev = tx_ring->adapter->pdev;
+
+       igbvf_clean_tx_ring(tx_ring);
+
+       vfree(tx_ring->buffer_info);
+       tx_ring->buffer_info = NULL;
+
+       pci_free_consistent(pdev, tx_ring->size, tx_ring->desc, tx_ring->dma);
+
+       tx_ring->desc = NULL;
+}
+
+/**
+ * igbvf_clean_rx_ring - Free Rx Buffers per Queue
+ * @adapter: board private structure
+ **/
+static void igbvf_clean_rx_ring(struct igbvf_ring *rx_ring)
+{
+       struct igbvf_adapter *adapter = rx_ring->adapter;
+       struct igbvf_buffer *buffer_info;
+       struct pci_dev *pdev = adapter->pdev;
+       unsigned long size;
+       unsigned int i;
+
+       if (!rx_ring->buffer_info)
+               return;
+
+       /* Free all the Rx ring sk_buffs */
+       for (i = 0; i < rx_ring->count; i++) {
+               buffer_info = &rx_ring->buffer_info[i];
+               if (buffer_info->dma) {
+                       if (adapter->rx_ps_hdr_size){
+                               pci_unmap_single(pdev, buffer_info->dma,
+                                                adapter->rx_ps_hdr_size,
+                                                PCI_DMA_FROMDEVICE);
+                       } else {
+                               pci_unmap_single(pdev, buffer_info->dma,
+                                                adapter->rx_buffer_len,
+                                                PCI_DMA_FROMDEVICE);
+                       }
+                       buffer_info->dma = 0;
+               }
+
+               if (buffer_info->skb) {
+                       dev_kfree_skb(buffer_info->skb);
+                       buffer_info->skb = NULL;
+               }
+
+               if (buffer_info->page) {
+                       if (buffer_info->page_dma)
+                               pci_unmap_page(pdev, buffer_info->page_dma,
+                                              PAGE_SIZE / 2,
+                                              PCI_DMA_FROMDEVICE);
+                       put_page(buffer_info->page);
+                       buffer_info->page = NULL;
+                       buffer_info->page_dma = 0;
+                       buffer_info->page_offset = 0;
+               }
+       }
+
+       size = sizeof(struct igbvf_buffer) * rx_ring->count;
+       memset(rx_ring->buffer_info, 0, size);
+
+       /* Zero out the descriptor ring */
+       memset(rx_ring->desc, 0, rx_ring->size);
+
+       rx_ring->next_to_clean = 0;
+       rx_ring->next_to_use = 0;
+
+       writel(0, adapter->hw.hw_addr + rx_ring->head);
+       writel(0, adapter->hw.hw_addr + rx_ring->tail);
+}
+
+/**
+ * igbvf_free_rx_resources - Free Rx Resources
+ * @rx_ring: ring to clean the resources from
+ *
+ * Free all receive software resources
+ **/
+
+void igbvf_free_rx_resources(struct igbvf_ring *rx_ring)
+{
+       struct pci_dev *pdev = rx_ring->adapter->pdev;
+
+       igbvf_clean_rx_ring(rx_ring);
+
+       vfree(rx_ring->buffer_info);
+       rx_ring->buffer_info = NULL;
+
+       dma_free_coherent(&pdev->dev, rx_ring->size, rx_ring->desc,
+                         rx_ring->dma);
+       rx_ring->desc = NULL;
+}
+
+/**
+ * igbvf_update_itr - update the dynamic ITR value based on statistics
+ * @adapter: pointer to adapter
+ * @itr_setting: current adapter->itr
+ * @packets: the number of packets during this measurement interval
+ * @bytes: the number of bytes during this measurement interval
+ *
+ *      Stores a new ITR value based on packets and byte
+ *      counts during the last interrupt.  The advantage of per interrupt
+ *      computation is faster updates and more accurate ITR for the current
+ *      traffic pattern.  Constants in this function were computed
+ *      based on theoretical maximum wire speed and thresholds were set based
+ *      on testing data as well as attempting to minimize response time
+ *      while increasing bulk throughput.  This functionality is controlled
+ *      by the InterruptThrottleRate module parameter.
+ **/
+static unsigned int igbvf_update_itr(struct igbvf_adapter *adapter,
+                                     u16 itr_setting, int packets,
+                                     int bytes)
+{
+       unsigned int retval = itr_setting;
+
+       if (packets == 0)
+               goto update_itr_done;
+
+       switch (itr_setting) {
+       case lowest_latency:
+               /* handle TSO and jumbo frames */
+               if (bytes/packets > 8000)
+                       retval = bulk_latency;
+               else if ((packets < 5) && (bytes > 512))
+                       retval = low_latency;
+               break;
+       case low_latency:  /* 50 usec aka 20000 ints/s */
+               if (bytes > 10000) {
+                       /* this if handles the TSO accounting */
+                       if (bytes/packets > 8000)
+                               retval = bulk_latency;
+                       else if ((packets < 10) || ((bytes/packets) > 1200))
+                               retval = bulk_latency;
+                       else if ((packets > 35))
+                               retval = lowest_latency;
+               } else if (bytes/packets > 2000) {
+                       retval = bulk_latency;
+               } else if (packets <= 2 && bytes < 512) {
+                       retval = lowest_latency;
+               }
+               break;
+       case bulk_latency: /* 250 usec aka 4000 ints/s */
+               if (bytes > 25000) {
+                       if (packets > 35)
+                               retval = low_latency;
+               } else if (bytes < 6000) {
+                       retval = low_latency;
+               }
+               break;
+       }
+
+update_itr_done:
+       return retval;
+}
+
+static void igbvf_set_itr(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       u16 current_itr;
+       u32 new_itr = adapter->itr;
+
+       adapter->tx_itr = igbvf_update_itr(adapter, adapter->tx_itr,
+                                          adapter->total_tx_packets,
+                                          adapter->total_tx_bytes);
+       /* conservative mode (itr 3) eliminates the lowest_latency setting */
+       if (adapter->itr_setting == 3 && adapter->tx_itr == lowest_latency)
+               adapter->tx_itr = low_latency;
+
+       adapter->rx_itr = igbvf_update_itr(adapter, adapter->rx_itr,
+                                          adapter->total_rx_packets,
+                                          adapter->total_rx_bytes);
+       /* conservative mode (itr 3) eliminates the lowest_latency setting */
+       if (adapter->itr_setting == 3 && adapter->rx_itr == lowest_latency)
+               adapter->rx_itr = low_latency;
+
+       current_itr = max(adapter->rx_itr, adapter->tx_itr);
+
+       switch (current_itr) {
+       /* counts and packets in update_itr are dependent on these numbers */
+       case lowest_latency:
+               new_itr = 70000;
+               break;
+       case low_latency:
+               new_itr = 20000; /* aka hwitr = ~200 */
+               break;
+       case bulk_latency:
+               new_itr = 4000;
+               break;
+       default:
+               break;
+       }
+
+       if (new_itr != adapter->itr) {
+               /*
+                * this attempts to bias the interrupt rate towards Bulk
+                * by adding intermediate steps when interrupt rate is
+                * increasing
+                */
+               new_itr = new_itr > adapter->itr ?
+                            min(adapter->itr + (new_itr >> 2), new_itr) :
+                            new_itr;
+               adapter->itr = new_itr;
+               adapter->rx_ring->itr_val = 1952;
+
+               if (adapter->msix_entries)
+                       adapter->rx_ring->set_itr = 1;
+               else
+                       ew32(ITR, 1952);
+       }
+}
+
+/**
+ * igbvf_clean_tx_irq - Reclaim resources after transmit completes
+ * @adapter: board private structure
+ * returns true if ring is completely cleaned
+ **/
+static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
+{
+       struct igbvf_adapter *adapter = tx_ring->adapter;
+       struct e1000_hw *hw = &adapter->hw;
+       struct net_device *netdev = adapter->netdev;
+       struct igbvf_buffer *buffer_info;
+       struct sk_buff *skb;
+       union e1000_adv_tx_desc *tx_desc, *eop_desc;
+       unsigned int total_bytes = 0, total_packets = 0;
+       unsigned int i, eop, count = 0;
+       bool cleaned = false;
+
+       i = tx_ring->next_to_clean;
+       eop = tx_ring->buffer_info[i].next_to_watch;
+       eop_desc = IGBVF_TX_DESC_ADV(*tx_ring, eop);
+
+       while ((eop_desc->wb.status & cpu_to_le32(E1000_TXD_STAT_DD)) &&
+              (count < tx_ring->count)) {
+               for (cleaned = false; !cleaned; count++) {
+                       tx_desc = IGBVF_TX_DESC_ADV(*tx_ring, i);
+                       buffer_info = &tx_ring->buffer_info[i];
+                       cleaned = (i == eop);
+                       skb = buffer_info->skb;
+
+                       if (skb) {
+                               unsigned int segs, bytecount;
+
+                               /* gso_segs is currently only valid for tcp */
+                               segs = skb_shinfo(skb)->gso_segs ?: 1;
+                               /* multiply data chunks by size of headers */
+                               bytecount = ((segs - 1) * skb_headlen(skb)) +
+                                           skb->len;
+                               total_packets += segs;
+                               total_bytes += bytecount;
+                       }
+
+                       igbvf_put_txbuf(adapter, buffer_info);
+                       tx_desc->wb.status = 0;
+
+                       i++;
+                       if (i == tx_ring->count)
+                               i = 0;
+               }
+               eop = tx_ring->buffer_info[i].next_to_watch;
+               eop_desc = IGBVF_TX_DESC_ADV(*tx_ring, eop);
+       }
+
+       tx_ring->next_to_clean = i;
+
+       if (unlikely(count &&
+                    netif_carrier_ok(netdev) &&
+                    igbvf_desc_unused(tx_ring) >= IGBVF_TX_QUEUE_WAKE)) {
+               /* Make sure that anybody stopping the queue after this
+                * sees the new next_to_clean.
+                */
+               smp_mb();
+               if (netif_queue_stopped(netdev) &&
+                   !(test_bit(__IGBVF_DOWN, &adapter->state))) {
+                       netif_wake_queue(netdev);
+                       ++adapter->restart_queue;
+               }
+       }
+
+       if (adapter->detect_tx_hung) {
+               /* Detect a transmit hang in hardware, this serializes the
+                * check with the clearing of time_stamp and movement of i */
+               adapter->detect_tx_hung = false;
+               if (tx_ring->buffer_info[i].time_stamp &&
+                   time_after(jiffies, tx_ring->buffer_info[i].time_stamp +
+                              (adapter->tx_timeout_factor * HZ))
+                   && !(er32(STATUS) & E1000_STATUS_TXOFF)) {
+
+                       tx_desc = IGBVF_TX_DESC_ADV(*tx_ring, i);
+                       /* detected Tx unit hang */
+                       igbvf_print_tx_hang(adapter);
+
+                       netif_stop_queue(netdev);
+               }
+       }
+       adapter->net_stats.tx_bytes += total_bytes;
+       adapter->net_stats.tx_packets += total_packets;
+       return (count < tx_ring->count);
+}
+
+static irqreturn_t igbvf_msix_other(int irq, void *data)
+{
+       struct net_device *netdev = data;
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+
+       adapter->int_counter1++;
+
+       netif_carrier_off(netdev);
+       hw->mac.get_link_status = 1;
+       if (!test_bit(__IGBVF_DOWN, &adapter->state))
+               mod_timer(&adapter->watchdog_timer, jiffies + 1);
+
+       ew32(EIMS, adapter->eims_other);
+
+       return IRQ_HANDLED;
+}
+
+static irqreturn_t igbvf_intr_msix_tx(int irq, void *data)
+{
+       struct net_device *netdev = data;
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+       struct igbvf_ring *tx_ring = adapter->tx_ring;
+
+
+       adapter->total_tx_bytes = 0;
+       adapter->total_tx_packets = 0;
+
+       /* auto mask will automatically reenable the interrupt when we write
+        * EICS */
+       if (!igbvf_clean_tx_irq(tx_ring))
+               /* Ring was not completely cleaned, so fire another interrupt */
+               ew32(EICS, tx_ring->eims_value);
+       else
+               ew32(EIMS, tx_ring->eims_value);
+
+       return IRQ_HANDLED;
+}
+
+static irqreturn_t igbvf_intr_msix_rx(int irq, void *data)
+{
+       struct net_device *netdev = data;
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       adapter->int_counter0++;
+
+       /* Write the ITR value calculated at the end of the
+        * previous interrupt.
+        */
+       if (adapter->rx_ring->set_itr) {
+               writel(adapter->rx_ring->itr_val,
+                      adapter->hw.hw_addr + adapter->rx_ring->itr_register);
+               adapter->rx_ring->set_itr = 0;
+       }
+
+       if (napi_schedule_prep(&adapter->rx_ring->napi)) {
+               adapter->total_rx_bytes = 0;
+               adapter->total_rx_packets = 0;
+               __napi_schedule(&adapter->rx_ring->napi);
+       }
+
+       return IRQ_HANDLED;
+}
+
+#define IGBVF_NO_QUEUE -1
+
+static void igbvf_assign_vector(struct igbvf_adapter *adapter, int rx_queue,
+                                int tx_queue, int msix_vector)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       u32 ivar, index;
+
+       /* 82576 uses a table-based method for assigning vectors.
+          Each queue has a single entry in the table to which we write
+          a vector number along with a "valid" bit.  Sadly, the layout
+          of the table is somewhat counterintuitive. */
+       if (rx_queue > IGBVF_NO_QUEUE) {
+               index = (rx_queue >> 1);
+               ivar = array_er32(IVAR0, index);
+               if (rx_queue & 0x1) {
+                       /* vector goes into third byte of register */
+                       ivar = ivar & 0xFF00FFFF;
+                       ivar |= (msix_vector | E1000_IVAR_VALID) << 16;
+               } else {
+                       /* vector goes into low byte of register */
+                       ivar = ivar & 0xFFFFFF00;
+                       ivar |= msix_vector | E1000_IVAR_VALID;
+               }
+               adapter->rx_ring[rx_queue].eims_value = 1 << msix_vector;
+               array_ew32(IVAR0, index, ivar);
+       }
+       if (tx_queue > IGBVF_NO_QUEUE) {
+               index = (tx_queue >> 1);
+               ivar = array_er32(IVAR0, index);
+               if (tx_queue & 0x1) {
+                       /* vector goes into high byte of register */
+                       ivar = ivar & 0x00FFFFFF;
+                       ivar |= (msix_vector | E1000_IVAR_VALID) << 24;
+               } else {
+                       /* vector goes into second byte of register */
+                       ivar = ivar & 0xFFFF00FF;
+                       ivar |= (msix_vector | E1000_IVAR_VALID) << 8;
+               }
+               adapter->tx_ring[tx_queue].eims_value = 1 << msix_vector;
+               array_ew32(IVAR0, index, ivar);
+       }
+}
+
+/**
+ * igbvf_configure_msix - Configure MSI-X hardware
+ *
+ * igbvf_configure_msix sets up the hardware to properly
+ * generate MSI-X interrupts.
+ **/
+static void igbvf_configure_msix(struct igbvf_adapter *adapter)
+{
+       u32 tmp;
+       struct e1000_hw *hw = &adapter->hw;
+       struct igbvf_ring *tx_ring = adapter->tx_ring;
+       struct igbvf_ring *rx_ring = adapter->rx_ring;
+       int vector = 0;
+
+       adapter->eims_enable_mask = 0;
+
+       igbvf_assign_vector(adapter, IGBVF_NO_QUEUE, 0, vector++);
+       adapter->eims_enable_mask |= tx_ring->eims_value;
+       if (tx_ring->itr_val)
+               writel(tx_ring->itr_val,
+                      hw->hw_addr + tx_ring->itr_register);
+       else
+               writel(1952, hw->hw_addr + tx_ring->itr_register);
+
+       igbvf_assign_vector(adapter, 0, IGBVF_NO_QUEUE, vector++);
+       adapter->eims_enable_mask |= rx_ring->eims_value;
+       if (rx_ring->itr_val)
+               writel(rx_ring->itr_val,
+                      hw->hw_addr + rx_ring->itr_register);
+       else
+               writel(1952, hw->hw_addr + rx_ring->itr_register);
+
+       /* set vector for other causes, i.e. link changes */
+
+       tmp = (vector++ | E1000_IVAR_VALID);
+
+       ew32(IVAR_MISC, tmp);
+
+       adapter->eims_enable_mask = (1 << (vector)) - 1;
+       adapter->eims_other = 1 << (vector - 1);
+       e1e_flush();
+}
+
+void igbvf_reset_interrupt_capability(struct igbvf_adapter *adapter)
+{
+       if (adapter->msix_entries) {
+               pci_disable_msix(adapter->pdev);
+               kfree(adapter->msix_entries);
+               adapter->msix_entries = NULL;
+       }
+}
+
+/**
+ * igbvf_set_interrupt_capability - set MSI or MSI-X if supported
+ *
+ * Attempt to configure interrupts using the best available
+ * capabilities of the hardware and kernel.
+ **/
+void igbvf_set_interrupt_capability(struct igbvf_adapter *adapter)
+{
+       int err = -ENOMEM;
+       int i;
+
+       /* we allocate 3 vectors, 1 for tx, 1 for rx, one for pf messages */
+       adapter->msix_entries = kcalloc(3, sizeof(struct msix_entry),
+                                       GFP_KERNEL);
+       if (adapter->msix_entries) {
+               for (i = 0; i < 3; i++)
+                       adapter->msix_entries[i].entry = i;
+
+               err = pci_enable_msix(adapter->pdev,
+                                     adapter->msix_entries, 3);
+       }
+
+       if (err) {
+               /* MSI-X failed */
+               dev_err(&adapter->pdev->dev,
+                       "Failed to initialize MSI-X interrupts.\n");
+               igbvf_reset_interrupt_capability(adapter);
+       }
+}
+
+/**
+ * igbvf_request_msix - Initialize MSI-X interrupts
+ *
+ * igbvf_request_msix allocates MSI-X vectors and requests interrupts from the
+ * kernel.
+ **/
+static int igbvf_request_msix(struct igbvf_adapter *adapter)
+{
+       struct net_device *netdev = adapter->netdev;
+       int err = 0, vector = 0;
+
+       if (strlen(netdev->name) < (IFNAMSIZ - 5)) {
+               sprintf(adapter->tx_ring->name, "%s-tx-0", netdev->name);
+               sprintf(adapter->rx_ring->name, "%s-rx-0", netdev->name);
+       } else {
+               memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ);
+               memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ);
+       }
+
+       err = request_irq(adapter->msix_entries[vector].vector,
+                         &igbvf_intr_msix_tx, 0, adapter->tx_ring->name,
+                         netdev);
+       if (err)
+               goto out;
+
+       adapter->tx_ring->itr_register = E1000_EITR(vector);
+       adapter->tx_ring->itr_val = 1952;
+       vector++;
+
+       err = request_irq(adapter->msix_entries[vector].vector,
+                         &igbvf_intr_msix_rx, 0, adapter->rx_ring->name,
+                         netdev);
+       if (err)
+               goto out;
+
+       adapter->rx_ring->itr_register = E1000_EITR(vector);
+       adapter->rx_ring->itr_val = 1952;
+       vector++;
+
+       err = request_irq(adapter->msix_entries[vector].vector,
+                         &igbvf_msix_other, 0, netdev->name, netdev);
+       if (err)
+               goto out;
+
+       igbvf_configure_msix(adapter);
+       return 0;
+out:
+       return err;
+}
+
+/**
+ * igbvf_alloc_queues - Allocate memory for all rings
+ * @adapter: board private structure to initialize
+ **/
+static int __devinit igbvf_alloc_queues(struct igbvf_adapter *adapter)
+{
+       struct net_device *netdev = adapter->netdev;
+
+       adapter->tx_ring = kzalloc(sizeof(struct igbvf_ring), GFP_KERNEL);
+       if (!adapter->tx_ring)
+               return -ENOMEM;
+
+       adapter->rx_ring = kzalloc(sizeof(struct igbvf_ring), GFP_KERNEL);
+       if (!adapter->rx_ring) {
+               kfree(adapter->tx_ring);
+               return -ENOMEM;
+       }
+
+       netif_napi_add(netdev, &adapter->rx_ring->napi, igbvf_poll, 64);
+
+       return 0;
+}
+
+/**
+ * igbvf_request_irq - initialize interrupts
+ *
+ * Attempts to configure interrupts using the best available
+ * capabilities of the hardware and kernel.
+ **/
+static int igbvf_request_irq(struct igbvf_adapter *adapter)
+{
+       int err = -1;
+
+       /* igbvf supports msi-x only */
+       if (adapter->msix_entries)
+               err = igbvf_request_msix(adapter);
+
+       if (!err)
+               return err;
+
+       dev_err(&adapter->pdev->dev,
+               "Unable to allocate interrupt, Error: %d\n", err);
+
+       return err;
+}
+
+static void igbvf_free_irq(struct igbvf_adapter *adapter)
+{
+       struct net_device *netdev = adapter->netdev;
+       int vector;
+
+       if (adapter->msix_entries) {
+               for (vector = 0; vector < 3; vector++)
+                       free_irq(adapter->msix_entries[vector].vector, netdev);
+       }
+}
+
+/**
+ * igbvf_irq_disable - Mask off interrupt generation on the NIC
+ **/
+static void igbvf_irq_disable(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+
+       ew32(EIMC, ~0);
+
+       if (adapter->msix_entries)
+               ew32(EIAC, 0);
+}
+
+/**
+ * igbvf_irq_enable - Enable default interrupt generation settings
+ **/
+static void igbvf_irq_enable(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+
+       ew32(EIAC, adapter->eims_enable_mask);
+       ew32(EIAM, adapter->eims_enable_mask);
+       ew32(EIMS, adapter->eims_enable_mask);
+}
+
+/**
+ * igbvf_poll - NAPI Rx polling callback
+ * @napi: struct associated with this polling callback
+ * @budget: amount of packets driver is allowed to process this poll
+ **/
+static int igbvf_poll(struct napi_struct *napi, int budget)
+{
+       struct igbvf_ring *rx_ring = container_of(napi, struct igbvf_ring, napi);
+       struct igbvf_adapter *adapter = rx_ring->adapter;
+       struct e1000_hw *hw = &adapter->hw;
+       int work_done = 0;
+
+       igbvf_clean_rx_irq(adapter, &work_done, budget);
+
+       /* If not enough Rx work done, exit the polling mode */
+       if (work_done < budget) {
+               napi_complete(napi);
+
+               if (adapter->itr_setting & 3)
+                       igbvf_set_itr(adapter);
+
+               if (!test_bit(__IGBVF_DOWN, &adapter->state))
+                       ew32(EIMS, adapter->rx_ring->eims_value);
+       }
+
+       return work_done;
+}
+
+/**
+ * igbvf_set_rlpml - set receive large packet maximum length
+ * @adapter: board private structure
+ *
+ * Configure the maximum size of packets that will be received
+ */
+static void igbvf_set_rlpml(struct igbvf_adapter *adapter)
+{
+       int max_frame_size = adapter->max_frame_size;
+       struct e1000_hw *hw = &adapter->hw;
+
+       if (adapter->vlgrp)
+               max_frame_size += VLAN_TAG_SIZE;
+
+       e1000_rlpml_set_vf(hw, max_frame_size);
+}
+
+static void igbvf_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+
+       if (hw->mac.ops.set_vfta(hw, vid, true))
+               dev_err(&adapter->pdev->dev, "Failed to add vlan id %d\n", vid);
+}
+
+static void igbvf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+
+       igbvf_irq_disable(adapter);
+       vlan_group_set_device(adapter->vlgrp, vid, NULL);
+
+       if (!test_bit(__IGBVF_DOWN, &adapter->state))
+               igbvf_irq_enable(adapter);
+
+       if (hw->mac.ops.set_vfta(hw, vid, false))
+               dev_err(&adapter->pdev->dev,
+                       "Failed to remove vlan id %d\n", vid);
+}
+
+static void igbvf_vlan_rx_register(struct net_device *netdev,
+                                   struct vlan_group *grp)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       adapter->vlgrp = grp;
+}
+
+static void igbvf_restore_vlan(struct igbvf_adapter *adapter)
+{
+       u16 vid;
+
+       if (!adapter->vlgrp)
+               return;
+
+       for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) {
+               if (!vlan_group_get_device(adapter->vlgrp, vid))
+                       continue;
+               igbvf_vlan_rx_add_vid(adapter->netdev, vid);
+       }
+
+       igbvf_set_rlpml(adapter);
+}
+
+/**
+ * igbvf_configure_tx - Configure Transmit Unit after Reset
+ * @adapter: board private structure
+ *
+ * Configure the Tx unit of the MAC after a reset.
+ **/
+static void igbvf_configure_tx(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       struct igbvf_ring *tx_ring = adapter->tx_ring;
+       u64 tdba;
+       u32 txdctl, dca_txctrl;
+
+       /* disable transmits */
+       txdctl = er32(TXDCTL(0));
+       ew32(TXDCTL(0), txdctl & ~E1000_TXDCTL_QUEUE_ENABLE);
+       msleep(10);
+
+       /* Setup the HW Tx Head and Tail descriptor pointers */
+       ew32(TDLEN(0), tx_ring->count * sizeof(union e1000_adv_tx_desc));
+       tdba = tx_ring->dma;
+       ew32(TDBAL(0), (tdba & DMA_32BIT_MASK));
+       ew32(TDBAH(0), (tdba >> 32));
+       ew32(TDH(0), 0);
+       ew32(TDT(0), 0);
+       tx_ring->head = E1000_TDH(0);
+       tx_ring->tail = E1000_TDT(0);
+
+       /* Turn off Relaxed Ordering on head write-backs.  The writebacks
+        * MUST be delivered in order or it will completely screw up
+        * our bookeeping.
+        */
+       dca_txctrl = er32(DCA_TXCTRL(0));
+       dca_txctrl &= ~E1000_DCA_TXCTRL_TX_WB_RO_EN;
+       ew32(DCA_TXCTRL(0), dca_txctrl);
+
+       /* enable transmits */
+       txdctl |= E1000_TXDCTL_QUEUE_ENABLE;
+       ew32(TXDCTL(0), txdctl);
+
+       /* Setup Transmit Descriptor Settings for eop descriptor */
+       adapter->txd_cmd = E1000_ADVTXD_DCMD_EOP | E1000_ADVTXD_DCMD_IFCS;
+
+       /* enable Report Status bit */
+       adapter->txd_cmd |= E1000_ADVTXD_DCMD_RS;
+
+       adapter->tx_queue_len = adapter->netdev->tx_queue_len;
+}
+
+/**
+ * igbvf_setup_srrctl - configure the receive control registers
+ * @adapter: Board private structure
+ **/
+static void igbvf_setup_srrctl(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       u32 srrctl = 0;
+
+       srrctl &= ~(E1000_SRRCTL_DESCTYPE_MASK |
+                   E1000_SRRCTL_BSIZEHDR_MASK |
+                   E1000_SRRCTL_BSIZEPKT_MASK);
+
+       /* Enable queue drop to avoid head of line blocking */
+       srrctl |= E1000_SRRCTL_DROP_EN;
+
+       /* Setup buffer sizes */
+       srrctl |= ALIGN(adapter->rx_buffer_len, 1024) >>
+                 E1000_SRRCTL_BSIZEPKT_SHIFT;
+
+       if (adapter->rx_buffer_len < 2048) {
+               adapter->rx_ps_hdr_size = 0;
+               srrctl |= E1000_SRRCTL_DESCTYPE_ADV_ONEBUF;
+       } else {
+               adapter->rx_ps_hdr_size = 128;
+               srrctl |= adapter->rx_ps_hdr_size <<
+                         E1000_SRRCTL_BSIZEHDRSIZE_SHIFT;
+               srrctl |= E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS;
+       }
+
+       ew32(SRRCTL(0), srrctl);
+}
+
+/**
+ * igbvf_configure_rx - Configure Receive Unit after Reset
+ * @adapter: board private structure
+ *
+ * Configure the Rx unit of the MAC after a reset.
+ **/
+static void igbvf_configure_rx(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       struct igbvf_ring *rx_ring = adapter->rx_ring;
+       u64 rdba;
+       u32 rdlen, rxdctl;
+
+       /* disable receives */
+       rxdctl = er32(RXDCTL(0));
+       ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);
+       msleep(10);
+
+       rdlen = rx_ring->count * sizeof(union e1000_adv_rx_desc);
+
+       /*
+        * Setup the HW Rx Head and Tail Descriptor Pointers and
+        * the Base and Length of the Rx Descriptor Ring
+        */
+       rdba = rx_ring->dma;
+       ew32(RDBAL(0), (rdba & DMA_32BIT_MASK));
+       ew32(RDBAH(0), (rdba >> 32));
+       ew32(RDLEN(0), rx_ring->count * sizeof(union e1000_adv_rx_desc));
+       rx_ring->head = E1000_RDH(0);
+       rx_ring->tail = E1000_RDT(0);
+       ew32(RDH(0), 0);
+       ew32(RDT(0), 0);
+
+       rxdctl |= E1000_RXDCTL_QUEUE_ENABLE;
+       rxdctl &= 0xFFF00000;
+       rxdctl |= IGBVF_RX_PTHRESH;
+       rxdctl |= IGBVF_RX_HTHRESH << 8;
+       rxdctl |= IGBVF_RX_WTHRESH << 16;
+
+       igbvf_set_rlpml(adapter);
+
+       /* enable receives */
+       ew32(RXDCTL(0), rxdctl);
+}
+
+/**
+ * igbvf_set_multi - Multicast and Promiscuous mode set
+ * @netdev: network interface device structure
+ *
+ * The set_multi entry point is called whenever the multicast address
+ * list or the network interface flags are updated.  This routine is
+ * responsible for configuring the hardware for proper multicast,
+ * promiscuous mode, and all-multi behavior.
+ **/
+static void igbvf_set_multi(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+       struct dev_mc_list *mc_ptr;
+       u8  *mta_list = NULL;
+       int i;
+
+       if (netdev->mc_count) {
+               mta_list = kmalloc(netdev->mc_count * 6, GFP_ATOMIC);
+               if (!mta_list) {
+                       dev_err(&adapter->pdev->dev,
+                               "failed to allocate multicast filter list\n");
+                       return;
+               }
+       }
+
+       /* prepare a packed array of only addresses. */
+       mc_ptr = netdev->mc_list;
+
+       for (i = 0; i < netdev->mc_count; i++) {
+               if (!mc_ptr)
+                       break;
+               memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
+                      ETH_ALEN);
+               mc_ptr = mc_ptr->next;
+       }
+
+       hw->mac.ops.update_mc_addr_list(hw, mta_list, i, 0, 0);
+       kfree(mta_list);
+}
+
+/**
+ * igbvf_configure - configure the hardware for Rx and Tx
+ * @adapter: private board structure
+ **/
+static void igbvf_configure(struct igbvf_adapter *adapter)
+{
+       igbvf_set_multi(adapter->netdev);
+
+       igbvf_restore_vlan(adapter);
+
+       igbvf_configure_tx(adapter);
+       igbvf_setup_srrctl(adapter);
+       igbvf_configure_rx(adapter);
+       igbvf_alloc_rx_buffers(adapter->rx_ring,
+                              igbvf_desc_unused(adapter->rx_ring));
+}
+
+/* igbvf_reset - bring the hardware into a known good state
+ *
+ * This function boots the hardware and enables some settings that
+ * require a configuration cycle of the hardware - those cannot be
+ * set/changed during runtime. After reset the device needs to be
+ * properly configured for Rx, Tx etc.
+ */
+void igbvf_reset(struct igbvf_adapter *adapter)
+{
+       struct e1000_mac_info *mac = &adapter->hw.mac;
+       struct net_device *netdev = adapter->netdev;
+       struct e1000_hw *hw = &adapter->hw;
+
+       /* Allow time for pending master requests to run */
+       if (mac->ops.reset_hw(hw))
+               dev_err(&adapter->pdev->dev, "PF still resetting\n");
+
+       mac->ops.init_hw(hw);
+
+       if (is_valid_ether_addr(adapter->hw.mac.addr)) {
+               memcpy(netdev->dev_addr, adapter->hw.mac.addr,
+                      netdev->addr_len);
+               memcpy(netdev->perm_addr, adapter->hw.mac.addr,
+                      netdev->addr_len);
+       }
+}
+
+int igbvf_up(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+
+       /* hardware has been reset, we need to reload some things */
+       igbvf_configure(adapter);
+
+       clear_bit(__IGBVF_DOWN, &adapter->state);
+
+       napi_enable(&adapter->rx_ring->napi);
+       if (adapter->msix_entries)
+               igbvf_configure_msix(adapter);
+
+       /* Clear any pending interrupts. */
+       er32(EICR);
+       igbvf_irq_enable(adapter);
+
+       /* start the watchdog */
+       hw->mac.get_link_status = 1;
+       mod_timer(&adapter->watchdog_timer, jiffies + 1);
+
+
+       return 0;
+}
+
+void igbvf_down(struct igbvf_adapter *adapter)
+{
+       struct net_device *netdev = adapter->netdev;
+       struct e1000_hw *hw = &adapter->hw;
+       u32 rxdctl, txdctl;
+
+       /*
+        * signal that we're down so the interrupt handler does not
+        * reschedule our watchdog timer
+        */
+       set_bit(__IGBVF_DOWN, &adapter->state);
+
+       /* disable receives in the hardware */
+       rxdctl = er32(RXDCTL(0));
+       ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);
+
+       netif_stop_queue(netdev);
+
+       /* disable transmits in the hardware */
+       txdctl = er32(TXDCTL(0));
+       ew32(TXDCTL(0), txdctl & ~E1000_TXDCTL_QUEUE_ENABLE);
+
+       /* flush both disables and wait for them to finish */
+       e1e_flush();
+       msleep(10);
+
+       napi_disable(&adapter->rx_ring->napi);
+
+       igbvf_irq_disable(adapter);
+
+       del_timer_sync(&adapter->watchdog_timer);
+
+       netdev->tx_queue_len = adapter->tx_queue_len;
+       netif_carrier_off(netdev);
+
+       /* record the stats before reset*/
+       igbvf_update_stats(adapter);
+
+       adapter->link_speed = 0;
+       adapter->link_duplex = 0;
+
+       igbvf_reset(adapter);
+       igbvf_clean_tx_ring(adapter->tx_ring);
+       igbvf_clean_rx_ring(adapter->rx_ring);
+}
+
+void igbvf_reinit_locked(struct igbvf_adapter *adapter)
+{
+       might_sleep();
+       while (test_and_set_bit(__IGBVF_RESETTING, &adapter->state))
+               msleep(1);
+       igbvf_down(adapter);
+       igbvf_up(adapter);
+       clear_bit(__IGBVF_RESETTING, &adapter->state);
+}
+
+/**
+ * igbvf_sw_init - Initialize general software structures (struct igbvf_adapter)
+ * @adapter: board private structure to initialize
+ *
+ * igbvf_sw_init initializes the Adapter private data structure.
+ * Fields are initialized based on PCI device information and
+ * OS network device settings (MTU size).
+ **/
+static int __devinit igbvf_sw_init(struct igbvf_adapter *adapter)
+{
+       struct net_device *netdev = adapter->netdev;
+       s32 rc;
+
+       adapter->rx_buffer_len = ETH_FRAME_LEN + VLAN_HLEN + ETH_FCS_LEN;
+       adapter->rx_ps_hdr_size = 0;
+       adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
+       adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN;
+
+       adapter->tx_int_delay = 8;
+       adapter->tx_abs_int_delay = 32;
+       adapter->rx_int_delay = 0;
+       adapter->rx_abs_int_delay = 8;
+       adapter->itr_setting = 3;
+       adapter->itr = 20000;
+
+       /* Set various function pointers */
+       adapter->ei->init_ops(&adapter->hw);
+
+       rc = adapter->hw.mac.ops.init_params(&adapter->hw);
+       if (rc)
+               return rc;
+
+       rc = adapter->hw.mbx.ops.init_params(&adapter->hw);
+       if (rc)
+               return rc;
+
+       igbvf_set_interrupt_capability(adapter);
+
+       if (igbvf_alloc_queues(adapter))
+               return -ENOMEM;
+
+       spin_lock_init(&adapter->tx_queue_lock);
+
+       /* Explicitly disable IRQ since the NIC can be in any state. */
+       igbvf_irq_disable(adapter);
+
+       spin_lock_init(&adapter->stats_lock);
+
+       set_bit(__IGBVF_DOWN, &adapter->state);
+       return 0;
+}
+
+static void igbvf_initialize_last_counter_stats(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+
+       adapter->stats.last_gprc = er32(VFGPRC);
+       adapter->stats.last_gorc = er32(VFGORC);
+       adapter->stats.last_gptc = er32(VFGPTC);
+       adapter->stats.last_gotc = er32(VFGOTC);
+       adapter->stats.last_mprc = er32(VFMPRC);
+       adapter->stats.last_gotlbc = er32(VFGOTLBC);
+       adapter->stats.last_gptlbc = er32(VFGPTLBC);
+       adapter->stats.last_gorlbc = er32(VFGORLBC);
+       adapter->stats.last_gprlbc = er32(VFGPRLBC);
+
+       adapter->stats.base_gprc = er32(VFGPRC);
+       adapter->stats.base_gorc = er32(VFGORC);
+       adapter->stats.base_gptc = er32(VFGPTC);
+       adapter->stats.base_gotc = er32(VFGOTC);
+       adapter->stats.base_mprc = er32(VFMPRC);
+       adapter->stats.base_gotlbc = er32(VFGOTLBC);
+       adapter->stats.base_gptlbc = er32(VFGPTLBC);
+       adapter->stats.base_gorlbc = er32(VFGORLBC);
+       adapter->stats.base_gprlbc = er32(VFGPRLBC);
+}
+
+/**
+ * igbvf_open - Called when a network interface is made active
+ * @netdev: network interface device structure
+ *
+ * Returns 0 on success, negative value on failure
+ *
+ * The open entry point is called when a network interface is made
+ * active by the system (IFF_UP).  At this point all resources needed
+ * for transmit and receive operations are allocated, the interrupt
+ * handler is registered with the OS, the watchdog timer is started,
+ * and the stack is notified that the interface is ready.
+ **/
+static int igbvf_open(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+       int err;
+
+       /* disallow open during test */
+       if (test_bit(__IGBVF_TESTING, &adapter->state))
+               return -EBUSY;
+
+       /* allocate transmit descriptors */
+       err = igbvf_setup_tx_resources(adapter, adapter->tx_ring);
+       if (err)
+               goto err_setup_tx;
+
+       /* allocate receive descriptors */
+       err = igbvf_setup_rx_resources(adapter, adapter->rx_ring);
+       if (err)
+               goto err_setup_rx;
+
+       /*
+        * before we allocate an interrupt, we must be ready to handle it.
+        * Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
+        * as soon as we call pci_request_irq, so we have to setup our
+        * clean_rx handler before we do so.
+        */
+       igbvf_configure(adapter);
+
+       err = igbvf_request_irq(adapter);
+       if (err)
+               goto err_req_irq;
+
+       /* From here on the code is the same as igbvf_up() */
+       clear_bit(__IGBVF_DOWN, &adapter->state);
+
+       napi_enable(&adapter->rx_ring->napi);
+
+       /* clear any pending interrupts */
+       er32(EICR);
+
+       igbvf_irq_enable(adapter);
+
+       /* start the watchdog */
+       hw->mac.get_link_status = 1;
+       mod_timer(&adapter->watchdog_timer, jiffies + 1);
+
+       return 0;
+
+err_req_irq:
+       igbvf_free_rx_resources(adapter->rx_ring);
+err_setup_rx:
+       igbvf_free_tx_resources(adapter->tx_ring);
+err_setup_tx:
+       igbvf_reset(adapter);
+
+       return err;
+}
+
+/**
+ * igbvf_close - Disables a network interface
+ * @netdev: network interface device structure
+ *
+ * Returns 0, this is not allowed to fail
+ *
+ * The close entry point is called when an interface is de-activated
+ * by the OS.  The hardware is still under the drivers control, but
+ * needs to be disabled.  A global MAC reset is issued to stop the
+ * hardware, and all transmit and receive resources are freed.
+ **/
+static int igbvf_close(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       WARN_ON(test_bit(__IGBVF_RESETTING, &adapter->state));
+       igbvf_down(adapter);
+
+       igbvf_free_irq(adapter);
+
+       igbvf_free_tx_resources(adapter->tx_ring);
+       igbvf_free_rx_resources(adapter->rx_ring);
+
+       return 0;
+}
+/**
+ * igbvf_set_mac - Change the Ethernet Address of the NIC
+ * @netdev: network interface device structure
+ * @p: pointer to an address structure
+ *
+ * Returns 0 on success, negative on failure
+ **/
+static int igbvf_set_mac(struct net_device *netdev, void *p)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+       struct sockaddr *addr = p;
+
+       if (!is_valid_ether_addr(addr->sa_data))
+               return -EADDRNOTAVAIL;
+
+       memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len);
+
+       hw->mac.ops.rar_set(hw, hw->mac.addr, 0);
+
+       if (memcmp(addr->sa_data, hw->mac.addr, 6))
+               return -EADDRNOTAVAIL;
+
+       memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+
+       return 0;
+}
+
+#define UPDATE_VF_COUNTER(reg, name)                                    \
+       {                                                               \
+               u32 current_counter = er32(reg);                        \
+               if (current_counter < adapter->stats.last_##name)       \
+                       adapter->stats.name += 0x100000000LL;           \
+               adapter->stats.last_##name = current_counter;           \
+               adapter->stats.name &= 0xFFFFFFFF00000000LL;            \
+               adapter->stats.name |= current_counter;                 \
+       }
+
+/**
+ * igbvf_update_stats - Update the board statistics counters
+ * @adapter: board private structure
+**/
+void igbvf_update_stats(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       struct pci_dev *pdev = adapter->pdev;
+
+       /*
+        * Prevent stats update while adapter is being reset, link is down
+        * or if the pci connection is down.
+        */
+       if (adapter->link_speed == 0)
+               return;
+
+       if (test_bit(__IGBVF_RESETTING, &adapter->state))
+               return;
+
+       if (pci_channel_offline(pdev))
+               return;
+
+       UPDATE_VF_COUNTER(VFGPRC, gprc);
+       UPDATE_VF_COUNTER(VFGORC, gorc);
+       UPDATE_VF_COUNTER(VFGPTC, gptc);
+       UPDATE_VF_COUNTER(VFGOTC, gotc);
+       UPDATE_VF_COUNTER(VFMPRC, mprc);
+       UPDATE_VF_COUNTER(VFGOTLBC, gotlbc);
+       UPDATE_VF_COUNTER(VFGPTLBC, gptlbc);
+       UPDATE_VF_COUNTER(VFGORLBC, gorlbc);
+       UPDATE_VF_COUNTER(VFGPRLBC, gprlbc);
+
+       /* Fill out the OS statistics structure */
+       adapter->net_stats.multicast = adapter->stats.mprc;
+}
+
+static void igbvf_print_link_info(struct igbvf_adapter *adapter)
+{
+       dev_info(&adapter->pdev->dev, "Link is Up %d Mbps %s\n",
+                adapter->link_speed,
+                ((adapter->link_duplex == FULL_DUPLEX) ?
+                 "Full Duplex" : "Half Duplex"));
+}
+
+static bool igbvf_has_link(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       s32 ret_val = E1000_SUCCESS;
+       bool link_active;
+
+       ret_val = hw->mac.ops.check_for_link(hw);
+       link_active = !hw->mac.get_link_status;
+
+       /* if check for link returns error we will need to reset */
+       if (ret_val)
+               schedule_work(&adapter->reset_task);
+
+       return link_active;
+}
+
+/**
+ * igbvf_watchdog - Timer Call-back
+ * @data: pointer to adapter cast into an unsigned long
+ **/
+static void igbvf_watchdog(unsigned long data)
+{
+       struct igbvf_adapter *adapter = (struct igbvf_adapter *) data;
+
+       /* Do the rest outside of interrupt context */
+       schedule_work(&adapter->watchdog_task);
+}
+
+static void igbvf_watchdog_task(struct work_struct *work)
+{
+       struct igbvf_adapter *adapter = container_of(work,
+                                                    struct igbvf_adapter,
+                                                    watchdog_task);
+       struct net_device *netdev = adapter->netdev;
+       struct e1000_mac_info *mac = &adapter->hw.mac;
+       struct igbvf_ring *tx_ring = adapter->tx_ring;
+       struct e1000_hw *hw = &adapter->hw;
+       u32 link;
+       int tx_pending = 0;
+
+       link = igbvf_has_link(adapter);
+
+       if (link) {
+               if (!netif_carrier_ok(netdev)) {
+                       bool txb2b = 1;
+
+                       mac->ops.get_link_up_info(&adapter->hw,
+                                                 &adapter->link_speed,
+                                                 &adapter->link_duplex);
+                       igbvf_print_link_info(adapter);
+
+                       /*
+                        * tweak tx_queue_len according to speed/duplex
+                        * and adjust the timeout factor
+                        */
+                       netdev->tx_queue_len = adapter->tx_queue_len;
+                       adapter->tx_timeout_factor = 1;
+                       switch (adapter->link_speed) {
+                       case SPEED_10:
+                               txb2b = 0;
+                               netdev->tx_queue_len = 10;
+                               adapter->tx_timeout_factor = 16;
+                               break;
+                       case SPEED_100:
+                               txb2b = 0;
+                               netdev->tx_queue_len = 100;
+                               /* maybe add some timeout factor ? */
+                               break;
+                       }
+
+                       netif_carrier_on(netdev);
+                       netif_wake_queue(netdev);
+               }
+       } else {
+               if (netif_carrier_ok(netdev)) {
+                       adapter->link_speed = 0;
+                       adapter->link_duplex = 0;
+                       dev_info(&adapter->pdev->dev, "Link is Down\n");
+                       netif_carrier_off(netdev);
+                       netif_stop_queue(netdev);
+               }
+       }
+
+       if (netif_carrier_ok(netdev)) {
+               igbvf_update_stats(adapter);
+       } else {
+               tx_pending = (igbvf_desc_unused(tx_ring) + 1 <
+                             tx_ring->count);
+               if (tx_pending) {
+                       /*
+                        * We've lost link, so the controller stops DMA,
+                        * but we've got queued Tx work that's never going
+                        * to get done, so reset controller to flush Tx.
+                        * (Do the reset outside of interrupt context).
+                        */
+                       adapter->tx_timeout_count++;
+                       schedule_work(&adapter->reset_task);
+               }
+       }
+
+       /* Cause software interrupt to ensure Rx ring is cleaned */
+       ew32(EICS, adapter->rx_ring->eims_value);
+
+       /* Force detection of hung controller every watchdog period */
+       adapter->detect_tx_hung = 1;
+
+       /* Reset the timer */
+       if (!test_bit(__IGBVF_DOWN, &adapter->state))
+               mod_timer(&adapter->watchdog_timer,
+                         round_jiffies(jiffies + (2 * HZ)));
+}
+
+#define IGBVF_TX_FLAGS_CSUM             0x00000001
+#define IGBVF_TX_FLAGS_VLAN             0x00000002
+#define IGBVF_TX_FLAGS_TSO              0x00000004
+#define IGBVF_TX_FLAGS_IPV4             0x00000008
+#define IGBVF_TX_FLAGS_VLAN_MASK        0xffff0000
+#define IGBVF_TX_FLAGS_VLAN_SHIFT       16
+
+static int igbvf_tso(struct igbvf_adapter *adapter,
+                     struct igbvf_ring *tx_ring,
+                     struct sk_buff *skb, u32 tx_flags, u8 *hdr_len)
+{
+       struct e1000_adv_tx_context_desc *context_desc;
+       unsigned int i;
+       int err;
+       struct igbvf_buffer *buffer_info;
+       u32 info = 0, tu_cmd = 0;
+       u32 mss_l4len_idx, l4len;
+       *hdr_len = 0;
+
+       if (skb_header_cloned(skb)) {
+               err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
+               if (err) {
+                       dev_err(&adapter->pdev->dev,
+                               "igbvf_tso returning an error\n");
+                       return err;
+               }
+       }
+
+       l4len = tcp_hdrlen(skb);
+       *hdr_len += l4len;
+
+       if (skb->protocol == htons(ETH_P_IP)) {
+               struct iphdr *iph = ip_hdr(skb);
+               iph->tot_len = 0;
+               iph->check = 0;
+               tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr,
+                                                        iph->daddr, 0,
+                                                        IPPROTO_TCP,
+                                                        0);
+       } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
+               ipv6_hdr(skb)->payload_len = 0;
+               tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
+                                                      &ipv6_hdr(skb)->daddr,
+                                                      0, IPPROTO_TCP, 0);
+       }
+
+       i = tx_ring->next_to_use;
+
+       buffer_info = &tx_ring->buffer_info[i];
+       context_desc = IGBVF_TX_CTXTDESC_ADV(*tx_ring, i);
+       /* VLAN MACLEN IPLEN */
+       if (tx_flags & IGBVF_TX_FLAGS_VLAN)
+               info |= (tx_flags & IGBVF_TX_FLAGS_VLAN_MASK);
+       info |= (skb_network_offset(skb) << E1000_ADVTXD_MACLEN_SHIFT);
+       *hdr_len += skb_network_offset(skb);
+       info |= (skb_transport_header(skb) - skb_network_header(skb));
+       *hdr_len += (skb_transport_header(skb) - skb_network_header(skb));
+       context_desc->vlan_macip_lens = cpu_to_le32(info);
+
+       /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
+       tu_cmd |= (E1000_TXD_CMD_DEXT | E1000_ADVTXD_DTYP_CTXT);
+
+       if (skb->protocol == htons(ETH_P_IP))
+               tu_cmd |= E1000_ADVTXD_TUCMD_IPV4;
+       tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
+
+       context_desc->type_tucmd_mlhl = cpu_to_le32(tu_cmd);
+
+       /* MSS L4LEN IDX */
+       mss_l4len_idx = (skb_shinfo(skb)->gso_size << E1000_ADVTXD_MSS_SHIFT);
+       mss_l4len_idx |= (l4len << E1000_ADVTXD_L4LEN_SHIFT);
+
+       context_desc->mss_l4len_idx = cpu_to_le32(mss_l4len_idx);
+       context_desc->seqnum_seed = 0;
+
+       buffer_info->time_stamp = jiffies;
+       buffer_info->next_to_watch = i;
+       buffer_info->dma = 0;
+       i++;
+       if (i == tx_ring->count)
+               i = 0;
+
+       tx_ring->next_to_use = i;
+
+       return true;
+}
+
+static inline bool igbvf_tx_csum(struct igbvf_adapter *adapter,
+                                 struct igbvf_ring *tx_ring,
+                                 struct sk_buff *skb, u32 tx_flags)
+{
+       struct e1000_adv_tx_context_desc *context_desc;
+       unsigned int i;
+       struct igbvf_buffer *buffer_info;
+       u32 info = 0, tu_cmd = 0;
+
+       if ((skb->ip_summed == CHECKSUM_PARTIAL) ||
+           (tx_flags & IGBVF_TX_FLAGS_VLAN)) {
+               i = tx_ring->next_to_use;
+               buffer_info = &tx_ring->buffer_info[i];
+               context_desc = IGBVF_TX_CTXTDESC_ADV(*tx_ring, i);
+
+               if (tx_flags & IGBVF_TX_FLAGS_VLAN)
+                       info |= (tx_flags & IGBVF_TX_FLAGS_VLAN_MASK);
+
+               info |= (skb_network_offset(skb) << E1000_ADVTXD_MACLEN_SHIFT);
+               if (skb->ip_summed == CHECKSUM_PARTIAL)
+                       info |= (skb_transport_header(skb) -
+                                skb_network_header(skb));
+
+
+               context_desc->vlan_macip_lens = cpu_to_le32(info);
+
+               tu_cmd |= (E1000_TXD_CMD_DEXT | E1000_ADVTXD_DTYP_CTXT);
+
+               if (skb->ip_summed == CHECKSUM_PARTIAL) {
+                       switch (skb->protocol) {
+                       case __constant_htons(ETH_P_IP):
+                               tu_cmd |= E1000_ADVTXD_TUCMD_IPV4;
+                               if (ip_hdr(skb)->protocol == IPPROTO_TCP)
+                                       tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
+                               break;
+                       case __constant_htons(ETH_P_IPV6):
+                               if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
+                                       tu_cmd |= E1000_ADVTXD_TUCMD_L4T_TCP;
+                               break;
+                       default:
+                               break;
+                       }
+               }
+
+               context_desc->type_tucmd_mlhl = cpu_to_le32(tu_cmd);
+               context_desc->seqnum_seed = 0;
+               context_desc->mss_l4len_idx = 0;
+
+               buffer_info->time_stamp = jiffies;
+               buffer_info->next_to_watch = i;
+               buffer_info->dma = 0;
+               i++;
+               if (i == tx_ring->count)
+                       i = 0;
+               tx_ring->next_to_use = i;
+
+               return true;
+       }
+
+       return false;
+}
+
+static int igbvf_maybe_stop_tx(struct net_device *netdev, int size)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       /* there is enough descriptors then we don't need to worry  */
+       if (igbvf_desc_unused(adapter->tx_ring) >= size)
+               return 0;
+
+       netif_stop_queue(netdev);
+
+       smp_mb();
+
+       /* We need to check again just in case room has been made available */
+       if (igbvf_desc_unused(adapter->tx_ring) < size)
+               return -EBUSY;
+
+       netif_wake_queue(netdev);
+
+       ++adapter->restart_queue;
+       return 0;
+}
+
+#define IGBVF_MAX_TXD_PWR       16
+#define IGBVF_MAX_DATA_PER_TXD  (1 << IGBVF_MAX_TXD_PWR)
+
+static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter,
+                                   struct igbvf_ring *tx_ring,
+                                   struct sk_buff *skb,
+                                   unsigned int first)
+{
+       struct igbvf_buffer *buffer_info;
+       unsigned int len = skb_headlen(skb);
+       unsigned int count = 0, i;
+       unsigned int f;
+       dma_addr_t *map;
+
+       i = tx_ring->next_to_use;
+
+       if (skb_dma_map(&adapter->pdev->dev, skb, DMA_TO_DEVICE)) {
+               dev_err(&adapter->pdev->dev, "TX DMA map failed\n");
+               return 0;
+       }
+
+       map = skb_shinfo(skb)->dma_maps;
+
+       buffer_info = &tx_ring->buffer_info[i];
+       BUG_ON(len >= IGBVF_MAX_DATA_PER_TXD);
+       buffer_info->length = len;
+       /* set time_stamp *before* dma to help avoid a possible race */
+       buffer_info->time_stamp = jiffies;
+       buffer_info->next_to_watch = i;
+       buffer_info->dma = map[count];
+       count++;
+
+       for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) {
+               struct skb_frag_struct *frag;
+
+               i++;
+               if (i == tx_ring->count)
+                       i = 0;
+
+               frag = &skb_shinfo(skb)->frags[f];
+               len = frag->size;
+
+               buffer_info = &tx_ring->buffer_info[i];
+               BUG_ON(len >= IGBVF_MAX_DATA_PER_TXD);
+               buffer_info->length = len;
+               buffer_info->time_stamp = jiffies;
+               buffer_info->next_to_watch = i;
+               buffer_info->dma = map[count];
+               count++;
+       }
+
+       tx_ring->buffer_info[i].skb = skb;
+       tx_ring->buffer_info[first].next_to_watch = i;
+
+       return count;
+}
+
+static inline void igbvf_tx_queue_adv(struct igbvf_adapter *adapter,
+                                      struct igbvf_ring *tx_ring,
+                                      int tx_flags, int count, u32 paylen,
+                                      u8 hdr_len)
+{
+       union e1000_adv_tx_desc *tx_desc = NULL;
+       struct igbvf_buffer *buffer_info;
+       u32 olinfo_status = 0, cmd_type_len;
+       unsigned int i;
+
+       cmd_type_len = (E1000_ADVTXD_DTYP_DATA | E1000_ADVTXD_DCMD_IFCS |
+                       E1000_ADVTXD_DCMD_DEXT);
+
+       if (tx_flags & IGBVF_TX_FLAGS_VLAN)
+               cmd_type_len |= E1000_ADVTXD_DCMD_VLE;
+
+       if (tx_flags & IGBVF_TX_FLAGS_TSO) {
+               cmd_type_len |= E1000_ADVTXD_DCMD_TSE;
+
+               /* insert tcp checksum */
+               olinfo_status |= E1000_TXD_POPTS_TXSM << 8;
+
+               /* insert ip checksum */
+               if (tx_flags & IGBVF_TX_FLAGS_IPV4)
+                       olinfo_status |= E1000_TXD_POPTS_IXSM << 8;
+
+       } else if (tx_flags & IGBVF_TX_FLAGS_CSUM) {
+               olinfo_status |= E1000_TXD_POPTS_TXSM << 8;
+       }
+
+       olinfo_status |= ((paylen - hdr_len) << E1000_ADVTXD_PAYLEN_SHIFT);
+
+       i = tx_ring->next_to_use;
+       while (count--) {
+               buffer_info = &tx_ring->buffer_info[i];
+               tx_desc = IGBVF_TX_DESC_ADV(*tx_ring, i);
+               tx_desc->read.buffer_addr = cpu_to_le64(buffer_info->dma);
+               tx_desc->read.cmd_type_len =
+                        cpu_to_le32(cmd_type_len | buffer_info->length);
+               tx_desc->read.olinfo_status = cpu_to_le32(olinfo_status);
+               i++;
+               if (i == tx_ring->count)
+                       i = 0;
+       }
+
+       tx_desc->read.cmd_type_len |= cpu_to_le32(adapter->txd_cmd);
+       /* Force memory writes to complete before letting h/w
+        * know there are new descriptors to fetch.  (Only
+        * applicable for weak-ordered memory model archs,
+        * such as IA-64). */
+       wmb();
+
+       tx_ring->next_to_use = i;
+       writel(i, adapter->hw.hw_addr + tx_ring->tail);
+       /* we need this if more than one processor can write to our tail
+        * at a time, it syncronizes IO on IA64/Altix systems */
+       mmiowb();
+}
+
+static int igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
+                                   struct net_device *netdev,
+                                   struct igbvf_ring *tx_ring)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       unsigned int first, tx_flags = 0;
+       u8 hdr_len = 0;
+       int count = 0;
+       int tso = 0;
+
+       if (test_bit(__IGBVF_DOWN, &adapter->state)) {
+               dev_kfree_skb_any(skb);
+               return NETDEV_TX_OK;
+       }
+
+       if (skb->len <= 0) {
+               dev_kfree_skb_any(skb);
+               return NETDEV_TX_OK;
+       }
+
+       /*
+        * need: count + 4 desc gap to keep tail from touching
+         *       + 2 desc gap to keep tail from touching head,
+         *       + 1 desc for skb->data,
+         *       + 1 desc for context descriptor,
+        * head, otherwise try next time
+        */
+       if (igbvf_maybe_stop_tx(netdev, skb_shinfo(skb)->nr_frags + 4)) {
+               /* this is a hard error */
+               return NETDEV_TX_BUSY;
+       }
+
+       if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
+               tx_flags |= IGBVF_TX_FLAGS_VLAN;
+               tx_flags |= (vlan_tx_tag_get(skb) << IGBVF_TX_FLAGS_VLAN_SHIFT);
+       }
+
+       if (skb->protocol == htons(ETH_P_IP))
+               tx_flags |= IGBVF_TX_FLAGS_IPV4;
+
+       first = tx_ring->next_to_use;
+
+       tso = skb_is_gso(skb) ?
+               igbvf_tso(adapter, tx_ring, skb, tx_flags, &hdr_len) : 0;
+       if (unlikely(tso < 0)) {
+               dev_kfree_skb_any(skb);
+               return NETDEV_TX_OK;
+       }
+
+       if (tso)
+               tx_flags |= IGBVF_TX_FLAGS_TSO;
+       else if (igbvf_tx_csum(adapter, tx_ring, skb, tx_flags) &&
+                (skb->ip_summed == CHECKSUM_PARTIAL))
+               tx_flags |= IGBVF_TX_FLAGS_CSUM;
+
+       /*
+        * count reflects descriptors mapped, if 0 then mapping error
+        * has occured and we need to rewind the descriptor queue
+        */
+       count = igbvf_tx_map_adv(adapter, tx_ring, skb, first);
+
+       if (count) {
+               igbvf_tx_queue_adv(adapter, tx_ring, tx_flags, count,
+                                  skb->len, hdr_len);
+               netdev->trans_start = jiffies;
+               /* Make sure there is space in the ring for the next send. */
+               igbvf_maybe_stop_tx(netdev, MAX_SKB_FRAGS + 4);
+       } else {
+               dev_kfree_skb_any(skb);
+               tx_ring->buffer_info[first].time_stamp = 0;
+               tx_ring->next_to_use = first;
+       }
+
+       return NETDEV_TX_OK;
+}
+
+static int igbvf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct igbvf_ring *tx_ring;
+       int retval;
+
+       if (test_bit(__IGBVF_DOWN, &adapter->state)) {
+               dev_kfree_skb_any(skb);
+               return NETDEV_TX_OK;
+       }
+
+       tx_ring = &adapter->tx_ring[0];
+
+       retval = igbvf_xmit_frame_ring_adv(skb, netdev, tx_ring);
+
+       return retval;
+}
+
+/**
+ * igbvf_tx_timeout - Respond to a Tx Hang
+ * @netdev: network interface device structure
+ **/
+static void igbvf_tx_timeout(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       /* Do the reset outside of interrupt context */
+       adapter->tx_timeout_count++;
+       schedule_work(&adapter->reset_task);
+}
+
+static void igbvf_reset_task(struct work_struct *work)
+{
+       struct igbvf_adapter *adapter;
+       adapter = container_of(work, struct igbvf_adapter, reset_task);
+
+       igbvf_reinit_locked(adapter);
+}
+
+/**
+ * igbvf_get_stats - Get System Network Statistics
+ * @netdev: network interface device structure
+ *
+ * Returns the address of the device statistics structure.
+ * The statistics are actually updated from the timer callback.
+ **/
+static struct net_device_stats *igbvf_get_stats(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       /* only return the current stats */
+       return &adapter->net_stats;
+}
+
+/**
+ * igbvf_change_mtu - Change the Maximum Transfer Unit
+ * @netdev: network interface device structure
+ * @new_mtu: new value for maximum frame size
+ *
+ * Returns 0 on success, negative on failure
+ **/
+static int igbvf_change_mtu(struct net_device *netdev, int new_mtu)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
+
+       if ((new_mtu < 68) || (max_frame > MAX_JUMBO_FRAME_SIZE)) {
+               dev_err(&adapter->pdev->dev, "Invalid MTU setting\n");
+               return -EINVAL;
+       }
+
+       /* Jumbo frame size limits */
+       if (max_frame > ETH_FRAME_LEN + ETH_FCS_LEN) {
+               if (!(adapter->flags & FLAG_HAS_JUMBO_FRAMES)) {
+                       dev_err(&adapter->pdev->dev,
+                               "Jumbo Frames not supported.\n");
+                       return -EINVAL;
+               }
+       }
+
+#define MAX_STD_JUMBO_FRAME_SIZE 9234
+       if (max_frame > MAX_STD_JUMBO_FRAME_SIZE) {
+               dev_err(&adapter->pdev->dev, "MTU > 9216 not supported.\n");
+               return -EINVAL;
+       }
+
+       while (test_and_set_bit(__IGBVF_RESETTING, &adapter->state))
+               msleep(1);
+       /* igbvf_down has a dependency on max_frame_size */
+       adapter->max_frame_size = max_frame;
+       if (netif_running(netdev))
+               igbvf_down(adapter);
+
+       /*
+        * NOTE: netdev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
+        * means we reserve 2 more, this pushes us to allocate from the next
+        * larger slab size.
+        * i.e. RXBUFFER_2048 --> size-4096 slab
+        * However with the new *_jumbo_rx* routines, jumbo receives will use
+        * fragmented skbs
+        */
+
+       if (max_frame <= 1024)
+               adapter->rx_buffer_len = 1024;
+       else if (max_frame <= 2048)
+               adapter->rx_buffer_len = 2048;
+       else
+#if (PAGE_SIZE / 2) > 16384
+               adapter->rx_buffer_len = 16384;
+#else
+               adapter->rx_buffer_len = PAGE_SIZE / 2;
+#endif
+
+
+       /* adjust allocation if LPE protects us, and we aren't using SBP */
+       if ((max_frame == ETH_FRAME_LEN + ETH_FCS_LEN) ||
+            (max_frame == ETH_FRAME_LEN + VLAN_HLEN + ETH_FCS_LEN))
+               adapter->rx_buffer_len = ETH_FRAME_LEN + VLAN_HLEN +
+                                        ETH_FCS_LEN;
+
+       dev_info(&adapter->pdev->dev, "changing MTU from %d to %d\n",
+                netdev->mtu, new_mtu);
+       netdev->mtu = new_mtu;
+
+       if (netif_running(netdev))
+               igbvf_up(adapter);
+       else
+               igbvf_reset(adapter);
+
+       clear_bit(__IGBVF_RESETTING, &adapter->state);
+
+       return 0;
+}
+
+static int igbvf_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
+{
+       switch (cmd) {
+       default:
+               return -EOPNOTSUPP;
+       }
+}
+
+static int igbvf_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+       struct net_device *netdev = pci_get_drvdata(pdev);
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+#ifdef CONFIG_PM
+       int retval = 0;
+#endif
+
+       netif_device_detach(netdev);
+
+       if (netif_running(netdev)) {
+               WARN_ON(test_bit(__IGBVF_RESETTING, &adapter->state));
+               igbvf_down(adapter);
+               igbvf_free_irq(adapter);
+       }
+
+#ifdef CONFIG_PM
+       retval = pci_save_state(pdev);
+       if (retval)
+               return retval;
+#endif
+
+       pci_disable_device(pdev);
+
+       return 0;
+}
+
+#ifdef CONFIG_PM
+static int igbvf_resume(struct pci_dev *pdev)
+{
+       struct net_device *netdev = pci_get_drvdata(pdev);
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       u32 err;
+
+       pci_restore_state(pdev);
+       err = pci_enable_device_mem(pdev);
+       if (err) {
+               dev_err(&pdev->dev, "Cannot enable PCI device from suspend\n");
+               return err;
+       }
+
+       pci_set_master(pdev);
+
+       if (netif_running(netdev)) {
+               err = igbvf_request_irq(adapter);
+               if (err)
+                       return err;
+       }
+
+       igbvf_reset(adapter);
+
+       if (netif_running(netdev))
+               igbvf_up(adapter);
+
+       netif_device_attach(netdev);
+
+       return 0;
+}
+#endif
+
+static void igbvf_shutdown(struct pci_dev *pdev)
+{
+       igbvf_suspend(pdev, PMSG_SUSPEND);
+}
+
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+static void igbvf_netpoll(struct net_device *netdev)
+{
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       disable_irq(adapter->pdev->irq);
+
+       igbvf_clean_tx_irq(adapter->tx_ring);
+
+       enable_irq(adapter->pdev->irq);
+}
+#endif
+
+/**
+ * igbvf_io_error_detected - called when PCI error is detected
+ * @pdev: Pointer to PCI device
+ * @state: The current pci connection state
+ *
+ * This function is called after a PCI bus error affecting
+ * this device has been detected.
+ */
+static pci_ers_result_t igbvf_io_error_detected(struct pci_dev *pdev,
+                                                pci_channel_state_t state)
+{
+       struct net_device *netdev = pci_get_drvdata(pdev);
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       netif_device_detach(netdev);
+
+       if (netif_running(netdev))
+               igbvf_down(adapter);
+       pci_disable_device(pdev);
+
+       /* Request a slot slot reset. */
+       return PCI_ERS_RESULT_NEED_RESET;
+}
+
+/**
+ * igbvf_io_slot_reset - called after the pci bus has been reset.
+ * @pdev: Pointer to PCI device
+ *
+ * Restart the card from scratch, as if from a cold-boot. Implementation
+ * resembles the first-half of the igbvf_resume routine.
+ */
+static pci_ers_result_t igbvf_io_slot_reset(struct pci_dev *pdev)
+{
+       struct net_device *netdev = pci_get_drvdata(pdev);
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       if (pci_enable_device_mem(pdev)) {
+               dev_err(&pdev->dev,
+                       "Cannot re-enable PCI device after reset.\n");
+               return PCI_ERS_RESULT_DISCONNECT;
+       }
+       pci_set_master(pdev);
+
+       igbvf_reset(adapter);
+
+       return PCI_ERS_RESULT_RECOVERED;
+}
+
+/**
+ * igbvf_io_resume - called when traffic can start flowing again.
+ * @pdev: Pointer to PCI device
+ *
+ * This callback is called when the error recovery driver tells us that
+ * its OK to resume normal operation. Implementation resembles the
+ * second-half of the igbvf_resume routine.
+ */
+static void igbvf_io_resume(struct pci_dev *pdev)
+{
+       struct net_device *netdev = pci_get_drvdata(pdev);
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+
+       if (netif_running(netdev)) {
+               if (igbvf_up(adapter)) {
+                       dev_err(&pdev->dev,
+                               "can't bring device back up after reset\n");
+                       return;
+               }
+       }
+
+       netif_device_attach(netdev);
+}
+
+static void igbvf_print_device_info(struct igbvf_adapter *adapter)
+{
+       struct e1000_hw *hw = &adapter->hw;
+       struct net_device *netdev = adapter->netdev;
+       struct pci_dev *pdev = adapter->pdev;
+
+       dev_info(&pdev->dev, "Intel(R) 82576 Virtual Function\n");
+       dev_info(&pdev->dev, "Address: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                /* MAC address */
+                netdev->dev_addr[0], netdev->dev_addr[1],
+                netdev->dev_addr[2], netdev->dev_addr[3],
+                netdev->dev_addr[4], netdev->dev_addr[5]);
+       dev_info(&pdev->dev, "MAC: %d\n", hw->mac.type);
+}
+
+static const struct net_device_ops igbvf_netdev_ops = {
+       .ndo_open                       = igbvf_open,
+       .ndo_stop                       = igbvf_close,
+       .ndo_start_xmit                 = igbvf_xmit_frame,
+       .ndo_get_stats                  = igbvf_get_stats,
+       .ndo_set_multicast_list         = igbvf_set_multi,
+       .ndo_set_mac_address            = igbvf_set_mac,
+       .ndo_change_mtu                 = igbvf_change_mtu,
+       .ndo_do_ioctl                   = igbvf_ioctl,
+       .ndo_tx_timeout                 = igbvf_tx_timeout,
+       .ndo_vlan_rx_register           = igbvf_vlan_rx_register,
+       .ndo_vlan_rx_add_vid            = igbvf_vlan_rx_add_vid,
+       .ndo_vlan_rx_kill_vid           = igbvf_vlan_rx_kill_vid,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       .ndo_poll_controller            = igbvf_netpoll,
+#endif
+};
+
+/**
+ * igbvf_probe - Device Initialization Routine
+ * @pdev: PCI device information struct
+ * @ent: entry in igbvf_pci_tbl
+ *
+ * Returns 0 on success, negative on failure
+ *
+ * igbvf_probe initializes an adapter identified by a pci_dev structure.
+ * The OS initialization, configuring of the adapter private structure,
+ * and a hardware reset occur.
+ **/
+static int __devinit igbvf_probe(struct pci_dev *pdev,
+                                 const struct pci_device_id *ent)
+{
+       struct net_device *netdev;
+       struct igbvf_adapter *adapter;
+       struct e1000_hw *hw;
+       const struct igbvf_info *ei = igbvf_info_tbl[ent->driver_data];
+
+       static int cards_found;
+       int err, pci_using_dac;
+
+       err = pci_enable_device_mem(pdev);
+       if (err)
+               return err;
+
+       pci_using_dac = 0;
+       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       if (!err) {
+               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               if (!err)
+                       pci_using_dac = 1;
+       } else {
+               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               if (err) {
+                       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       if (err) {
+                               dev_err(&pdev->dev, "No usable DMA "
+                                       "configuration, aborting\n");
+                               goto err_dma;
+                       }
+               }
+       }
+
+       err = pci_request_regions(pdev, igbvf_driver_name);
+       if (err)
+               goto err_pci_reg;
+
+       pci_set_master(pdev);
+
+       err = -ENOMEM;
+       netdev = alloc_etherdev(sizeof(struct igbvf_adapter));
+       if (!netdev)
+               goto err_alloc_etherdev;
+
+       SET_NETDEV_DEV(netdev, &pdev->dev);
+
+       pci_set_drvdata(pdev, netdev);
+       adapter = netdev_priv(netdev);
+       hw = &adapter->hw;
+       adapter->netdev = netdev;
+       adapter->pdev = pdev;
+       adapter->ei = ei;
+       adapter->pba = ei->pba;
+       adapter->flags = ei->flags;
+       adapter->hw.back = adapter;
+       adapter->hw.mac.type = ei->mac;
+       adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1;
+
+       /* PCI config space info */
+
+       hw->vendor_id = pdev->vendor;
+       hw->device_id = pdev->device;
+       hw->subsystem_vendor_id = pdev->subsystem_vendor;
+       hw->subsystem_device_id = pdev->subsystem_device;
+
+       pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id);
+
+       err = -EIO;
+       adapter->hw.hw_addr = ioremap(pci_resource_start(pdev, 0),
+                                     pci_resource_len(pdev, 0));
+
+       if (!adapter->hw.hw_addr)
+               goto err_ioremap;
+
+       if (ei->get_variants) {
+               err = ei->get_variants(adapter);
+               if (err)
+                       goto err_ioremap;
+       }
+
+       /* setup adapter struct */
+       err = igbvf_sw_init(adapter);
+       if (err)
+               goto err_sw_init;
+
+       /* construct the net_device struct */
+       netdev->netdev_ops = &igbvf_netdev_ops;
+
+       igbvf_set_ethtool_ops(netdev);
+       netdev->watchdog_timeo = 5 * HZ;
+       strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
+
+       adapter->bd_number = cards_found++;
+
+       netdev->features = NETIF_F_SG |
+                          NETIF_F_IP_CSUM |
+                          NETIF_F_HW_VLAN_TX |
+                          NETIF_F_HW_VLAN_RX |
+                          NETIF_F_HW_VLAN_FILTER;
+
+       netdev->features |= NETIF_F_IPV6_CSUM;
+       netdev->features |= NETIF_F_TSO;
+       netdev->features |= NETIF_F_TSO6;
+
+       if (pci_using_dac)
+               netdev->features |= NETIF_F_HIGHDMA;
+
+       netdev->vlan_features |= NETIF_F_TSO;
+       netdev->vlan_features |= NETIF_F_TSO6;
+       netdev->vlan_features |= NETIF_F_IP_CSUM;
+       netdev->vlan_features |= NETIF_F_IPV6_CSUM;
+       netdev->vlan_features |= NETIF_F_SG;
+
+       /*reset the controller to put the device in a known good state */
+       err = hw->mac.ops.reset_hw(hw);
+       if (err) {
+               dev_info(&pdev->dev,
+                        "PF still in reset state, assigning new address\n");
+               random_ether_addr(hw->mac.addr);
+       } else {
+               err = hw->mac.ops.read_mac_addr(hw);
+               if (err) {
+                       dev_err(&pdev->dev, "Error reading MAC address\n");
+                       goto err_hw_init;
+               }
+       }
+
+       memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
+       memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
+
+       if (!is_valid_ether_addr(netdev->perm_addr)) {
+               dev_err(&pdev->dev, "Invalid MAC Address: "
+                       "%02x:%02x:%02x:%02x:%02x:%02x\n",
+                       netdev->dev_addr[0], netdev->dev_addr[1],
+                       netdev->dev_addr[2], netdev->dev_addr[3],
+                       netdev->dev_addr[4], netdev->dev_addr[5]);
+               err = -EIO;
+               goto err_hw_init;
+       }
+
+       setup_timer(&adapter->watchdog_timer, &igbvf_watchdog,
+                   (unsigned long) adapter);
+
+       INIT_WORK(&adapter->reset_task, igbvf_reset_task);
+       INIT_WORK(&adapter->watchdog_task, igbvf_watchdog_task);
+
+       /* ring size defaults */
+       adapter->rx_ring->count = 1024;
+       adapter->tx_ring->count = 1024;
+
+       /* reset the hardware with the new settings */
+       igbvf_reset(adapter);
+
+       /* tell the stack to leave us alone until igbvf_open() is called */
+       netif_carrier_off(netdev);
+       netif_stop_queue(netdev);
+
+       strcpy(netdev->name, "eth%d");
+       err = register_netdev(netdev);
+       if (err)
+               goto err_hw_init;
+
+       igbvf_print_device_info(adapter);
+
+       igbvf_initialize_last_counter_stats(adapter);
+
+       return 0;
+
+err_hw_init:
+       kfree(adapter->tx_ring);
+       kfree(adapter->rx_ring);
+err_sw_init:
+       igbvf_reset_interrupt_capability(adapter);
+       iounmap(adapter->hw.hw_addr);
+err_ioremap:
+       free_netdev(netdev);
+err_alloc_etherdev:
+       pci_release_regions(pdev);
+err_pci_reg:
+err_dma:
+       pci_disable_device(pdev);
+       return err;
+}
+
+/**
+ * igbvf_remove - Device Removal Routine
+ * @pdev: PCI device information struct
+ *
+ * igbvf_remove is called by the PCI subsystem to alert the driver
+ * that it should release a PCI device.  The could be caused by a
+ * Hot-Plug event, or because the driver is going to be removed from
+ * memory.
+ **/
+static void __devexit igbvf_remove(struct pci_dev *pdev)
+{
+       struct net_device *netdev = pci_get_drvdata(pdev);
+       struct igbvf_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+
+       /*
+        * flush_scheduled work may reschedule our watchdog task, so
+        * explicitly disable watchdog tasks from being rescheduled
+        */
+       set_bit(__IGBVF_DOWN, &adapter->state);
+       del_timer_sync(&adapter->watchdog_timer);
+
+       flush_scheduled_work();
+
+       unregister_netdev(netdev);
+
+       igbvf_reset_interrupt_capability(adapter);
+
+       /*
+        * it is important to delete the napi struct prior to freeing the
+        * rx ring so that you do not end up with null pointer refs
+        */
+       netif_napi_del(&adapter->rx_ring->napi);
+       kfree(adapter->tx_ring);
+       kfree(adapter->rx_ring);
+
+       iounmap(hw->hw_addr);
+       if (hw->flash_address)
+               iounmap(hw->flash_address);
+       pci_release_regions(pdev);
+
+       free_netdev(netdev);
+
+       pci_disable_device(pdev);
+}
+
+/* PCI Error Recovery (ERS) */
+static struct pci_error_handlers igbvf_err_handler = {
+       .error_detected = igbvf_io_error_detected,
+       .slot_reset = igbvf_io_slot_reset,
+       .resume = igbvf_io_resume,
+};
+
+static struct pci_device_id igbvf_pci_tbl[] = {
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_VF), board_vf },
+       { } /* terminate list */
+};
+MODULE_DEVICE_TABLE(pci, igbvf_pci_tbl);
+
+/* PCI Device API Driver */
+static struct pci_driver igbvf_driver = {
+       .name     = igbvf_driver_name,
+       .id_table = igbvf_pci_tbl,
+       .probe    = igbvf_probe,
+       .remove   = __devexit_p(igbvf_remove),
+#ifdef CONFIG_PM
+       /* Power Management Hooks */
+       .suspend  = igbvf_suspend,
+       .resume   = igbvf_resume,
+#endif
+       .shutdown = igbvf_shutdown,
+       .err_handler = &igbvf_err_handler
+};
+
+/**
+ * igbvf_init_module - Driver Registration Routine
+ *
+ * igbvf_init_module is the first routine called when the driver is
+ * loaded. All it does is register with the PCI subsystem.
+ **/
+static int __init igbvf_init_module(void)
+{
+       int ret;
+       printk(KERN_INFO "%s - version %s\n",
+              igbvf_driver_string, igbvf_driver_version);
+       printk(KERN_INFO "%s\n", igbvf_copyright);
+
+       ret = pci_register_driver(&igbvf_driver);
+       pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY, igbvf_driver_name,
+                              PM_QOS_DEFAULT_VALUE);
+
+       return ret;
+}
+module_init(igbvf_init_module);
+
+/**
+ * igbvf_exit_module - Driver Exit Cleanup Routine
+ *
+ * igbvf_exit_module is called just before the driver is removed
+ * from memory.
+ **/
+static void __exit igbvf_exit_module(void)
+{
+       pci_unregister_driver(&igbvf_driver);
+       pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, igbvf_driver_name);
+}
+module_exit(igbvf_exit_module);
+
+
+MODULE_AUTHOR("Intel Corporation, <e1000-devel@lists.sourceforge.net>");
+MODULE_DESCRIPTION("Intel(R) 82576 Virtual Function Network Driver");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
+
+/* netdev.c */
diff --git a/drivers/net/igbvf/regs.h b/drivers/net/igbvf/regs.h
new file mode 100644 (file)
index 0000000..b9e24ed
--- /dev/null
@@ -0,0 +1,108 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+#ifndef _E1000_REGS_H_
+#define _E1000_REGS_H_
+
+#define E1000_CTRL      0x00000 /* Device Control - RW */
+#define E1000_STATUS    0x00008 /* Device Status - RO */
+#define E1000_ITR       0x000C4 /* Interrupt Throttling Rate - RW */
+#define E1000_EICR      0x01580 /* Ext. Interrupt Cause Read - R/clr */
+#define E1000_EITR(_n)  (0x01680 + (0x4 * (_n)))
+#define E1000_EICS      0x01520 /* Ext. Interrupt Cause Set - W0 */
+#define E1000_EIMS      0x01524 /* Ext. Interrupt Mask Set/Read - RW */
+#define E1000_EIMC      0x01528 /* Ext. Interrupt Mask Clear - WO */
+#define E1000_EIAC      0x0152C /* Ext. Interrupt Auto Clear - RW */
+#define E1000_EIAM      0x01530 /* Ext. Interrupt Ack Auto Clear Mask - RW */
+#define E1000_IVAR0     0x01700 /* Interrupt Vector Allocation (array) - RW */
+#define E1000_IVAR_MISC 0x01740 /* IVAR for "other" causes - RW */
+/*
+ * Convenience macros
+ *
+ * Note: "_n" is the queue number of the register to be written to.
+ *
+ * Example usage:
+ * E1000_RDBAL_REG(current_rx_queue)
+ */
+#define E1000_RDBAL(_n)      ((_n) < 4 ? (0x02800 + ((_n) * 0x100)) : \
+                                         (0x0C000 + ((_n) * 0x40)))
+#define E1000_RDBAH(_n)      ((_n) < 4 ? (0x02804 + ((_n) * 0x100)) : \
+                                         (0x0C004 + ((_n) * 0x40)))
+#define E1000_RDLEN(_n)      ((_n) < 4 ? (0x02808 + ((_n) * 0x100)) : \
+                                         (0x0C008 + ((_n) * 0x40)))
+#define E1000_SRRCTL(_n)     ((_n) < 4 ? (0x0280C + ((_n) * 0x100)) : \
+                                         (0x0C00C + ((_n) * 0x40)))
+#define E1000_RDH(_n)        ((_n) < 4 ? (0x02810 + ((_n) * 0x100)) : \
+                                         (0x0C010 + ((_n) * 0x40)))
+#define E1000_RDT(_n)        ((_n) < 4 ? (0x02818 + ((_n) * 0x100)) : \
+                                         (0x0C018 + ((_n) * 0x40)))
+#define E1000_RXDCTL(_n)     ((_n) < 4 ? (0x02828 + ((_n) * 0x100)) : \
+                                         (0x0C028 + ((_n) * 0x40)))
+#define E1000_TDBAL(_n)      ((_n) < 4 ? (0x03800 + ((_n) * 0x100)) : \
+                                         (0x0E000 + ((_n) * 0x40)))
+#define E1000_TDBAH(_n)      ((_n) < 4 ? (0x03804 + ((_n) * 0x100)) : \
+                                         (0x0E004 + ((_n) * 0x40)))
+#define E1000_TDLEN(_n)      ((_n) < 4 ? (0x03808 + ((_n) * 0x100)) : \
+                                         (0x0E008 + ((_n) * 0x40)))
+#define E1000_TDH(_n)        ((_n) < 4 ? (0x03810 + ((_n) * 0x100)) : \
+                                         (0x0E010 + ((_n) * 0x40)))
+#define E1000_TDT(_n)        ((_n) < 4 ? (0x03818 + ((_n) * 0x100)) : \
+                                         (0x0E018 + ((_n) * 0x40)))
+#define E1000_TXDCTL(_n)     ((_n) < 4 ? (0x03828 + ((_n) * 0x100)) : \
+                                         (0x0E028 + ((_n) * 0x40)))
+#define E1000_DCA_TXCTRL(_n) (0x03814 + (_n << 8))
+#define E1000_DCA_RXCTRL(_n) (0x02814 + (_n << 8))
+#define E1000_RAL(_i)  (((_i) <= 15) ? (0x05400 + ((_i) * 8)) : \
+                                       (0x054E0 + ((_i - 16) * 8)))
+#define E1000_RAH(_i)  (((_i) <= 15) ? (0x05404 + ((_i) * 8)) : \
+                                       (0x054E4 + ((_i - 16) * 8)))
+
+/* Statistics registers */
+#define E1000_VFGPRC    0x00F10
+#define E1000_VFGORC    0x00F18
+#define E1000_VFMPRC    0x00F3C
+#define E1000_VFGPTC    0x00F14
+#define E1000_VFGOTC    0x00F34
+#define E1000_VFGOTLBC  0x00F50
+#define E1000_VFGPTLBC  0x00F44
+#define E1000_VFGORLBC  0x00F48
+#define E1000_VFGPRLBC  0x00F40
+
+/* These act per VF so an array friendly macro is used */
+#define E1000_V2PMAILBOX(_n)   (0x00C40 + (4 * (_n)))
+#define E1000_VMBMEM(_n)       (0x00800 + (64 * (_n)))
+
+/* Define macros for handling registers */
+#define er32(reg) readl(hw->hw_addr + E1000_##reg)
+#define ew32(reg, val) writel((val), hw->hw_addr +  E1000_##reg)
+#define array_er32(reg, offset) \
+       readl(hw->hw_addr + E1000_##reg + (offset << 2))
+#define array_ew32(reg, offset, val) \
+       writel((val), hw->hw_addr +  E1000_##reg + (offset << 2))
+#define e1e_flush() er32(STATUS)
+
+#endif
diff --git a/drivers/net/igbvf/vf.c b/drivers/net/igbvf/vf.c
new file mode 100644 (file)
index 0000000..aa246c9
--- /dev/null
@@ -0,0 +1,398 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+
+#include "vf.h"
+
+static s32 e1000_check_for_link_vf(struct e1000_hw *hw);
+static s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
+                                     u16 *duplex);
+static s32 e1000_init_hw_vf(struct e1000_hw *hw);
+static s32 e1000_reset_hw_vf(struct e1000_hw *hw);
+
+static void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *,
+                                         u32, u32, u32);
+static void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
+static s32 e1000_read_mac_addr_vf(struct e1000_hw *);
+static s32 e1000_set_vfta_vf(struct e1000_hw *, u16, bool);
+
+/**
+ *  e1000_init_mac_params_vf - Inits MAC params
+ *  @hw: pointer to the HW structure
+ **/
+s32 e1000_init_mac_params_vf(struct e1000_hw *hw)
+{
+       struct e1000_mac_info *mac = &hw->mac;
+
+       /* VF's have no MTA Registers - PF feature only */
+       mac->mta_reg_count = 128;
+       /* VF's have no access to RAR entries  */
+       mac->rar_entry_count = 1;
+
+       /* Function pointers */
+       /* reset */
+       mac->ops.reset_hw = e1000_reset_hw_vf;
+       /* hw initialization */
+       mac->ops.init_hw = e1000_init_hw_vf;
+       /* check for link */
+       mac->ops.check_for_link = e1000_check_for_link_vf;
+       /* link info */
+       mac->ops.get_link_up_info = e1000_get_link_up_info_vf;
+       /* multicast address update */
+       mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_vf;
+       /* set mac address */
+       mac->ops.rar_set = e1000_rar_set_vf;
+       /* read mac address */
+       mac->ops.read_mac_addr = e1000_read_mac_addr_vf;
+       /* set vlan filter table array */
+       mac->ops.set_vfta = e1000_set_vfta_vf;
+
+       return E1000_SUCCESS;
+}
+
+/**
+ *  e1000_init_function_pointers_vf - Inits function pointers
+ *  @hw: pointer to the HW structure
+ **/
+void e1000_init_function_pointers_vf(struct e1000_hw *hw)
+{
+       hw->mac.ops.init_params = e1000_init_mac_params_vf;
+       hw->mbx.ops.init_params = e1000_init_mbx_params_vf;
+}
+
+/**
+ *  e1000_get_link_up_info_vf - Gets link info.
+ *  @hw: pointer to the HW structure
+ *  @speed: pointer to 16 bit value to store link speed.
+ *  @duplex: pointer to 16 bit value to store duplex.
+ *
+ *  Since we cannot read the PHY and get accurate link info, we must rely upon
+ *  the status register's data which is often stale and inaccurate.
+ **/
+static s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
+                                     u16 *duplex)
+{
+       s32 status;
+
+       status = er32(STATUS);
+       if (status & E1000_STATUS_SPEED_1000)
+               *speed = SPEED_1000;
+       else if (status & E1000_STATUS_SPEED_100)
+               *speed = SPEED_100;
+       else
+               *speed = SPEED_10;
+
+       if (status & E1000_STATUS_FD)
+               *duplex = FULL_DUPLEX;
+       else
+               *duplex = HALF_DUPLEX;
+
+       return E1000_SUCCESS;
+}
+
+/**
+ *  e1000_reset_hw_vf - Resets the HW
+ *  @hw: pointer to the HW structure
+ *
+ *  VF's provide a function level reset. This is done using bit 26 of ctrl_reg.
+ *  This is all the reset we can perform on a VF.
+ **/
+static s32 e1000_reset_hw_vf(struct e1000_hw *hw)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       u32 timeout = E1000_VF_INIT_TIMEOUT;
+       u32 ret_val = -E1000_ERR_MAC_INIT;
+       u32 msgbuf[3];
+       u8 *addr = (u8 *)(&msgbuf[1]);
+       u32 ctrl;
+
+       /* assert vf queue/interrupt reset */
+       ctrl = er32(CTRL);
+       ew32(CTRL, ctrl | E1000_CTRL_RST);
+
+       /* we cannot initialize while the RSTI / RSTD bits are asserted */
+       while (!mbx->ops.check_for_rst(hw) && timeout) {
+               timeout--;
+               udelay(5);
+       }
+
+       if (timeout) {
+               /* mailbox timeout can now become active */
+               mbx->timeout = E1000_VF_MBX_INIT_TIMEOUT;
+
+               /* notify pf of vf reset completion */
+               msgbuf[0] = E1000_VF_RESET;
+               mbx->ops.write_posted(hw, msgbuf, 1);
+
+               msleep(10);
+
+               /* set our "perm_addr" based on info provided by PF */
+               ret_val = mbx->ops.read_posted(hw, msgbuf, 3);
+               if (!ret_val) {
+                       if (msgbuf[0] == (E1000_VF_RESET | E1000_VT_MSGTYPE_ACK))
+                               memcpy(hw->mac.perm_addr, addr, 6);
+                       else
+                               ret_val = -E1000_ERR_MAC_INIT;
+               }
+       }
+
+       return ret_val;
+}
+
+/**
+ *  e1000_init_hw_vf - Inits the HW
+ *  @hw: pointer to the HW structure
+ *
+ *  Not much to do here except clear the PF Reset indication if there is one.
+ **/
+static s32 e1000_init_hw_vf(struct e1000_hw *hw)
+{
+       /* attempt to set and restore our mac address */
+       e1000_rar_set_vf(hw, hw->mac.addr, 0);
+
+       return E1000_SUCCESS;
+}
+
+/**
+ *  e1000_hash_mc_addr_vf - Generate a multicast hash value
+ *  @hw: pointer to the HW structure
+ *  @mc_addr: pointer to a multicast address
+ *
+ *  Generates a multicast address hash value which is used to determine
+ *  the multicast filter table array address and new table value.  See
+ *  e1000_mta_set_generic()
+ **/
+static u32 e1000_hash_mc_addr_vf(struct e1000_hw *hw, u8 *mc_addr)
+{
+       u32 hash_value, hash_mask;
+       u8 bit_shift = 0;
+
+       /* Register count multiplied by bits per register */
+       hash_mask = (hw->mac.mta_reg_count * 32) - 1;
+
+       /*
+        * The bit_shift is the number of left-shifts
+        * where 0xFF would still fall within the hash mask.
+        */
+       while (hash_mask >> bit_shift != 0xFF)
+               bit_shift++;
+
+       hash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) |
+                                 (((u16) mc_addr[5]) << bit_shift)));
+
+       return hash_value;
+}
+
+/**
+ *  e1000_update_mc_addr_list_vf - Update Multicast addresses
+ *  @hw: pointer to the HW structure
+ *  @mc_addr_list: array of multicast addresses to program
+ *  @mc_addr_count: number of multicast addresses to program
+ *  @rar_used_count: the first RAR register free to program
+ *  @rar_count: total number of supported Receive Address Registers
+ *
+ *  Updates the Receive Address Registers and Multicast Table Array.
+ *  The caller must have a packed mc_addr_list of multicast addresses.
+ *  The parameter rar_count will usually be hw->mac.rar_entry_count
+ *  unless there are workarounds that change this.
+ **/
+void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
+                                  u8 *mc_addr_list, u32 mc_addr_count,
+                                  u32 rar_used_count, u32 rar_count)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       u32 msgbuf[E1000_VFMAILBOX_SIZE];
+       u16 *hash_list = (u16 *)&msgbuf[1];
+       u32 hash_value;
+       u32 cnt, i;
+
+       /* Each entry in the list uses 1 16 bit word.  We have 30
+        * 16 bit words available in our HW msg buffer (minus 1 for the
+        * msg type).  That's 30 hash values if we pack 'em right.  If
+        * there are more than 30 MC addresses to add then punt the
+        * extras for now and then add code to handle more than 30 later.
+        * It would be unusual for a server to request that many multi-cast
+        * addresses except for in large enterprise network environments.
+        */
+
+       cnt = (mc_addr_count > 30) ? 30 : mc_addr_count;
+       msgbuf[0] = E1000_VF_SET_MULTICAST;
+       msgbuf[0] |= cnt << E1000_VT_MSGINFO_SHIFT;
+
+       for (i = 0; i < cnt; i++) {
+               hash_value = e1000_hash_mc_addr_vf(hw, mc_addr_list);
+               hash_list[i] = hash_value & 0x0FFFF;
+               mc_addr_list += ETH_ADDR_LEN;
+       }
+
+       mbx->ops.write_posted(hw, msgbuf, E1000_VFMAILBOX_SIZE);
+}
+
+/**
+ *  e1000_set_vfta_vf - Set/Unset vlan filter table address
+ *  @hw: pointer to the HW structure
+ *  @vid: determines the vfta register and bit to set/unset
+ *  @set: if true then set bit, else clear bit
+ **/
+static s32 e1000_set_vfta_vf(struct e1000_hw *hw, u16 vid, bool set)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       u32 msgbuf[2];
+       s32 err;
+
+       msgbuf[0] = E1000_VF_SET_VLAN;
+       msgbuf[1] = vid;
+       /* Setting the 8 bit field MSG INFO to true indicates "add" */
+       if (set)
+               msgbuf[0] |= 1 << E1000_VT_MSGINFO_SHIFT;
+
+       mbx->ops.write_posted(hw, msgbuf, 2);
+
+       err = mbx->ops.read_posted(hw, msgbuf, 2);
+
+       /* if nacked the vlan was rejected */
+       if (!err && (msgbuf[0] == (E1000_VF_SET_VLAN | E1000_VT_MSGTYPE_NACK)))
+               err = -E1000_ERR_MAC_INIT;
+
+       return err;
+}
+
+/** e1000_rlpml_set_vf - Set the maximum receive packet length
+ *  @hw: pointer to the HW structure
+ *  @max_size: value to assign to max frame size
+ **/
+void e1000_rlpml_set_vf(struct e1000_hw *hw, u16 max_size)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       u32 msgbuf[2];
+
+       msgbuf[0] = E1000_VF_SET_LPE;
+       msgbuf[1] = max_size;
+
+       mbx->ops.write_posted(hw, msgbuf, 2);
+}
+
+/**
+ *  e1000_rar_set_vf - set device MAC address
+ *  @hw: pointer to the HW structure
+ *  @addr: pointer to the receive address
+ *  @index receive address array register
+ **/
+static void e1000_rar_set_vf(struct e1000_hw *hw, u8 * addr, u32 index)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       u32 msgbuf[3];
+       u8 *msg_addr = (u8 *)(&msgbuf[1]);
+       s32 ret_val;
+
+       memset(msgbuf, 0, 12);
+       msgbuf[0] = E1000_VF_SET_MAC_ADDR;
+       memcpy(msg_addr, addr, 6);
+       ret_val = mbx->ops.write_posted(hw, msgbuf, 3);
+
+       if (!ret_val)
+               ret_val = mbx->ops.read_posted(hw, msgbuf, 3);
+
+       /* if nacked the address was rejected, use "perm_addr" */
+       if (!ret_val &&
+           (msgbuf[0] == (E1000_VF_SET_MAC_ADDR | E1000_VT_MSGTYPE_NACK)))
+               e1000_read_mac_addr_vf(hw);
+}
+
+/**
+ *  e1000_read_mac_addr_vf - Read device MAC address
+ *  @hw: pointer to the HW structure
+ **/
+static s32 e1000_read_mac_addr_vf(struct e1000_hw *hw)
+{
+       int i;
+
+       for (i = 0; i < ETH_ADDR_LEN; i++)
+               hw->mac.addr[i] = hw->mac.perm_addr[i];
+
+       return E1000_SUCCESS;
+}
+
+/**
+ *  e1000_check_for_link_vf - Check for link for a virtual interface
+ *  @hw: pointer to the HW structure
+ *
+ *  Checks to see if the underlying PF is still talking to the VF and
+ *  if it is then it reports the link state to the hardware, otherwise
+ *  it reports link down and returns an error.
+ **/
+static s32 e1000_check_for_link_vf(struct e1000_hw *hw)
+{
+       struct e1000_mbx_info *mbx = &hw->mbx;
+       struct e1000_mac_info *mac = &hw->mac;
+       s32 ret_val = E1000_SUCCESS;
+       u32 in_msg = 0;
+
+       /*
+        * We only want to run this if there has been a rst asserted.
+        * in this case that could mean a link change, device reset,
+        * or a virtual function reset
+        */
+
+       /* If we were hit with a reset drop the link */
+       if (!mbx->ops.check_for_rst(hw))
+               mac->get_link_status = true;
+
+       if (!mac->get_link_status)
+               goto out;
+
+       /* if link status is down no point in checking to see if pf is up */
+       if (!(er32(STATUS) & E1000_STATUS_LU))
+               goto out;
+
+       /* if the read failed it could just be a mailbox collision, best wait
+        * until we are called again and don't report an error */
+       if (mbx->ops.read(hw, &in_msg, 1))
+               goto out;
+
+       /* if incoming message isn't clear to send we are waiting on response */
+       if (!(in_msg & E1000_VT_MSGTYPE_CTS)) {
+               /* message is not CTS and is NACK we must have lost CTS status */
+               if (in_msg & E1000_VT_MSGTYPE_NACK)
+                       ret_val = -E1000_ERR_MAC_INIT;
+               goto out;
+       }
+
+       /* the pf is talking, if we timed out in the past we reinit */
+       if (!mbx->timeout) {
+               ret_val = -E1000_ERR_MAC_INIT;
+               goto out;
+       }
+
+       /* if we passed all the tests above then the link is up and we no
+        * longer need to check for link */
+       mac->get_link_status = false;
+
+out:
+       return ret_val;
+}
+
diff --git a/drivers/net/igbvf/vf.h b/drivers/net/igbvf/vf.h
new file mode 100644 (file)
index 0000000..ec07228
--- /dev/null
@@ -0,0 +1,265 @@
+/*******************************************************************************
+
+  Intel(R) 82576 Virtual Function Linux driver
+  Copyright(c) 2009 Intel Corporation.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms and conditions of the GNU General Public License,
+  version 2, as published by the Free Software Foundation.
+
+  This program is distributed in the hope it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+  The full GNU General Public License is included in this distribution in
+  the file called "COPYING".
+
+  Contact Information:
+  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+
+#ifndef _E1000_VF_H_
+#define _E1000_VF_H_
+
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/if_ether.h>
+
+#include "regs.h"
+#include "defines.h"
+
+struct e1000_hw;
+
+#define E1000_DEV_ID_82576_VF                 0x10CA
+#define E1000_REVISION_0 0
+#define E1000_REVISION_1 1
+#define E1000_REVISION_2 2
+#define E1000_REVISION_3 3
+#define E1000_REVISION_4 4
+
+#define E1000_FUNC_0     0
+#define E1000_FUNC_1     1
+
+/*
+ * Receive Address Register Count
+ * Number of high/low register pairs in the RAR.  The RAR (Receive Address
+ * Registers) holds the directed and multicast addresses that we monitor.
+ * These entries are also used for MAC-based filtering.
+ */
+#define E1000_RAR_ENTRIES_VF      1
+
+/* Receive Descriptor - Advanced */
+union e1000_adv_rx_desc {
+       struct {
+               u64 pkt_addr;             /* Packet buffer address */
+               u64 hdr_addr;             /* Header buffer address */
+       } read;
+       struct {
+               struct {
+                       union {
+                               u32 data;
+                               struct {
+                                       u16 pkt_info; /* RSS/Packet type */
+                                       u16 hdr_info; /* Split Header,
+                                                      * hdr buffer length */
+                               } hs_rss;
+                       } lo_dword;
+                       union {
+                               u32 rss;          /* RSS Hash */
+                               struct {
+                                       u16 ip_id;    /* IP id */
+                                       u16 csum;     /* Packet Checksum */
+                               } csum_ip;
+                       } hi_dword;
+               } lower;
+               struct {
+                       u32 status_error;     /* ext status/error */
+                       u16 length;           /* Packet length */
+                       u16 vlan;             /* VLAN tag */
+               } upper;
+       } wb;  /* writeback */
+};
+
+#define E1000_RXDADV_HDRBUFLEN_MASK      0x7FE0
+#define E1000_RXDADV_HDRBUFLEN_SHIFT     5
+
+/* Transmit Descriptor - Advanced */
+union e1000_adv_tx_desc {
+       struct {
+               u64 buffer_addr;    /* Address of descriptor's data buf */
+               u32 cmd_type_len;
+               u32 olinfo_status;
+       } read;
+       struct {
+               u64 rsvd;       /* Reserved */
+               u32 nxtseq_seed;
+               u32 status;
+       } wb;
+};
+
+/* Adv Transmit Descriptor Config Masks */
+#define E1000_ADVTXD_DTYP_CTXT    0x00200000 /* Advanced Context Descriptor */
+#define E1000_ADVTXD_DTYP_DATA    0x00300000 /* Advanced Data Descriptor */
+#define E1000_ADVTXD_DCMD_EOP     0x01000000 /* End of Packet */
+#define E1000_ADVTXD_DCMD_IFCS    0x02000000 /* Insert FCS (Ethernet CRC) */
+#define E1000_ADVTXD_DCMD_RS      0x08000000 /* Report Status */
+#define E1000_ADVTXD_DCMD_DEXT    0x20000000 /* Descriptor extension (1=Adv) */
+#define E1000_ADVTXD_DCMD_VLE     0x40000000 /* VLAN pkt enable */
+#define E1000_ADVTXD_DCMD_TSE     0x80000000 /* TCP Seg enable */
+#define E1000_ADVTXD_PAYLEN_SHIFT    14 /* Adv desc PAYLEN shift */
+
+/* Context descriptors */
+struct e1000_adv_tx_context_desc {
+       u32 vlan_macip_lens;
+       u32 seqnum_seed;
+       u32 type_tucmd_mlhl;
+       u32 mss_l4len_idx;
+};
+
+#define E1000_ADVTXD_MACLEN_SHIFT    9  /* Adv ctxt desc mac len shift */
+#define E1000_ADVTXD_TUCMD_IPV4    0x00000400  /* IP Packet Type: 1=IPv4 */
+#define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800  /* L4 Packet TYPE of TCP */
+#define E1000_ADVTXD_L4LEN_SHIFT     8  /* Adv ctxt L4LEN shift */
+#define E1000_ADVTXD_MSS_SHIFT      16  /* Adv ctxt MSS shift */
+
+enum e1000_mac_type {
+       e1000_undefined = 0,
+       e1000_vfadapt,
+       e1000_num_macs  /* List is 1-based, so subtract 1 for true count. */
+};
+
+struct e1000_vf_stats {
+       u64 base_gprc;
+       u64 base_gptc;
+       u64 base_gorc;
+       u64 base_gotc;
+       u64 base_mprc;
+       u64 base_gotlbc;
+       u64 base_gptlbc;
+       u64 base_gorlbc;
+       u64 base_gprlbc;
+
+       u32 last_gprc;
+       u32 last_gptc;
+       u32 last_gorc;
+       u32 last_gotc;
+       u32 last_mprc;
+       u32 last_gotlbc;
+       u32 last_gptlbc;
+       u32 last_gorlbc;
+       u32 last_gprlbc;
+
+       u64 gprc;
+       u64 gptc;
+       u64 gorc;
+       u64 gotc;
+       u64 mprc;
+       u64 gotlbc;
+       u64 gptlbc;
+       u64 gorlbc;
+       u64 gprlbc;
+};
+
+#include "mbx.h"
+
+struct e1000_mac_operations {
+       /* Function pointers for the MAC. */
+       s32  (*init_params)(struct e1000_hw *);
+       s32  (*check_for_link)(struct e1000_hw *);
+       void (*clear_vfta)(struct e1000_hw *);
+       s32  (*get_bus_info)(struct e1000_hw *);
+       s32  (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *);
+       void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32, u32, u32);
+       s32  (*reset_hw)(struct e1000_hw *);
+       s32  (*init_hw)(struct e1000_hw *);
+       s32  (*setup_link)(struct e1000_hw *);
+       void (*write_vfta)(struct e1000_hw *, u32, u32);
+       void (*mta_set)(struct e1000_hw *, u32);
+       void (*rar_set)(struct e1000_hw *, u8*, u32);
+       s32  (*read_mac_addr)(struct e1000_hw *);
+       s32  (*set_vfta)(struct e1000_hw *, u16, bool);
+};
+
+struct e1000_mac_info {
+       struct e1000_mac_operations ops;
+       u8 addr[6];
+       u8 perm_addr[6];
+
+       enum e1000_mac_type type;
+
+       u16 mta_reg_count;
+       u16 rar_entry_count;
+
+       bool get_link_status;
+};
+
+struct e1000_mbx_operations {
+       s32 (*init_params)(struct e1000_hw *hw);
+       s32 (*read)(struct e1000_hw *, u32 *, u16);
+       s32 (*write)(struct e1000_hw *, u32 *, u16);
+       s32 (*read_posted)(struct e1000_hw *, u32 *, u16);
+       s32 (*write_posted)(struct e1000_hw *, u32 *, u16);
+       s32 (*check_for_msg)(struct e1000_hw *);
+       s32 (*check_for_ack)(struct e1000_hw *);
+       s32 (*check_for_rst)(struct e1000_hw *);
+};
+
+struct e1000_mbx_stats {
+       u32 msgs_tx;
+       u32 msgs_rx;
+
+       u32 acks;
+       u32 reqs;
+       u32 rsts;
+};
+
+struct e1000_mbx_info {
+       struct e1000_mbx_operations ops;
+       struct e1000_mbx_stats stats;
+       u32 timeout;
+       u32 usec_delay;
+       u16 size;
+};
+
+struct e1000_dev_spec_vf {
+       u32 vf_number;
+       u32 v2p_mailbox;
+};
+
+struct e1000_hw {
+       void *back;
+
+       u8 __iomem *hw_addr;
+       u8 __iomem *flash_address;
+       unsigned long io_base;
+
+       struct e1000_mac_info  mac;
+       struct e1000_mbx_info mbx;
+
+       union {
+               struct e1000_dev_spec_vf vf;
+       } dev_spec;
+
+       u16 device_id;
+       u16 subsystem_vendor_id;
+       u16 subsystem_device_id;
+       u16 vendor_id;
+
+       u8  revision_id;
+};
+
+/* These functions must be implemented by drivers */
+void e1000_rlpml_set_vf(struct e1000_hw *, u16);
+void e1000_init_function_pointers_vf(struct e1000_hw *hw);
+s32  e1000_init_mac_params_vf(struct e1000_hw *hw);
+
+
+#endif /* _E1000_VF_H_ */
index 170b12d..cbc63ff 100644 (file)
@@ -1226,17 +1226,17 @@ static int __devinit ioc3_probe(struct pci_dev *pdev,
        int err, pci_using_dac;
 
        /* Configure DMA attributes. */
-       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (!err) {
                pci_using_dac = 1;
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (err < 0) {
                        printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
                               "for consistent allocations\n", pci_name(pdev));
                        goto out;
                }
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        printk(KERN_ERR "%s: No usable DMA configuration, "
                               "aborting.\n", pci_name(pdev));
index 360aa5e..4301946 100644 (file)
@@ -2240,9 +2240,9 @@ static int __devinit ipg_probe(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       rc = pci_set_dma_mask(pdev, DMA_40BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(40));
        if (rc < 0) {
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc < 0) {
                        printk(KERN_ERR "%s: DMA config failed.\n",
                               pci_name(pdev));
index 4b0ea66..4a0826b 100644 (file)
@@ -365,12 +365,12 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (err)
                return err;
 
-       if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) &&
-           !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
+       if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) &&
+           !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) {
                pci_using_dac = 1;
        } else {
-               if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
-                   (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
+               if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) ||
+                   (err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))) {
                        printk(KERN_ERR
                         "ixgb: No usable DMA configuration, aborting\n");
                        goto err_dma_mask;
index 286ecc0..9ef128a 100644 (file)
@@ -1643,7 +1643,7 @@ static void ixgbe_configure_tx(struct ixgbe_adapter *adapter)
                tdba = ring->dma;
                tdlen = ring->count * sizeof(union ixgbe_adv_tx_desc);
                IXGBE_WRITE_REG(hw, IXGBE_TDBAL(j),
-                               (tdba & DMA_32BIT_MASK));
+                               (tdba & DMA_BIT_MASK(32)));
                IXGBE_WRITE_REG(hw, IXGBE_TDBAH(j), (tdba >> 32));
                IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), tdlen);
                IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0);
@@ -1782,7 +1782,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
        for (i = 0; i < adapter->num_rx_queues; i++) {
                rdba = adapter->rx_ring[i].dma;
                j = adapter->rx_ring[i].reg_idx;
-               IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j), (rdba & DMA_32BIT_MASK));
+               IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j), (rdba & DMA_BIT_MASK(32)));
                IXGBE_WRITE_REG(hw, IXGBE_RDBAH(j), (rdba >> 32));
                IXGBE_WRITE_REG(hw, IXGBE_RDLEN(j), rdlen);
                IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0);
@@ -4509,13 +4509,13 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
        if (err)
                return err;
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
-           !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
+           !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
-                       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (err) {
                                dev_err(&pdev->dev, "No usable DMA "
                                        "configuration, aborting\n");
index 860dcd9..ece3504 100644 (file)
@@ -2600,8 +2600,8 @@ jme_pci_dma64(struct pci_dev *pdev)
                if (!pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK))
                        return 1;
 
-       if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK))
-               if (!pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
+               if (!pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
                        return 0;
 
        return -1;
index a66f5b2..102bac9 100644 (file)
@@ -1076,20 +1076,20 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err) {
                dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n");
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting.\n");
                        goto err_release_bar2;
                }
        }
-       err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err) {
                dev_warn(&pdev->dev, "Warning: couldn't set 64-bit "
                         "consistent PCI DMA mask.\n");
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, "
                                "aborting.\n");
index 7cce334..606aa58 100644 (file)
@@ -299,13 +299,14 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
        struct mlx4_cmd_mailbox *mailbox;
        int err;
 
+       if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
+               return 0;
+
        mailbox = mlx4_alloc_cmd_mailbox(dev);
        if (IS_ERR(mailbox))
                return PTR_ERR(mailbox);
 
        memset(mailbox->buf, 0, 256);
-       if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
-               return 0;
 
        ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port];
        err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_PORT,
index a56d9d2..b3185bf 100644 (file)
@@ -2274,8 +2274,6 @@ static void port_start(struct mv643xx_eth_private *mp)
                pscr |= FORCE_LINK_PASS;
        wrlp(mp, PORT_SERIAL_CONTROL, pscr);
 
-       wrlp(mp, SDMA_CONFIG, PORT_SDMA_CONFIG_DEFAULT_VALUE);
-
        /*
         * Configure TX path and queues.
         */
@@ -2957,6 +2955,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
 
        netif_carrier_off(dev);
 
+       wrlp(mp, SDMA_CONFIG, PORT_SDMA_CONFIG_DEFAULT_VALUE);
+
        set_rx_coal(mp, 250);
        set_tx_coal(mp, 0);
 
index aea9fda..9eed126 100644 (file)
@@ -1130,7 +1130,7 @@ myri10ge_submit_8rx(struct mcp_kreq_ether_recv __iomem * dst,
        __be32 low;
 
        low = src->addr_low;
-       src->addr_low = htonl(DMA_32BIT_MASK);
+       src->addr_low = htonl(DMA_BIT_MASK(32));
        myri10ge_pio_copy(dst, src, 4 * sizeof(*src));
        mb();
        myri10ge_pio_copy(dst + 4, src + 4, 4 * sizeof(*src));
@@ -3792,19 +3792,19 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        pci_set_master(pdev);
        dac_enabled = 1;
-       status = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       status = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (status != 0) {
                dac_enabled = 0;
                dev_err(&pdev->dev,
                        "64-bit pci address mask was refused, "
                        "trying 32-bit\n");
-               status = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               status = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        }
        if (status != 0) {
                dev_err(&pdev->dev, "Error %d setting DMA mask\n", status);
                goto abort_with_enabled;
        }
-       (void)pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       (void)pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
        mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd),
                                      &mgp->cmd_bus, GFP_KERNEL);
        if (mgp->cmd == NULL)
diff --git a/drivers/net/myri_code.h b/drivers/net/myri_code.h
deleted file mode 100644 (file)
index ba7b865..0000000
+++ /dev/null
@@ -1,5006 +0,0 @@
-/* This is the Myrinet MCP code for LANai4.x */
-/* Generated by  cat $MYRI_HOME/lib/lanai/mcp4.dat > myri_code4.h */
-
-static unsigned int __devinitdata lanai4_code_off = 0x0000; /* half-word offset */
-static unsigned char __devinitdata lanai4_code[76256] = {
-0xF2,0x0E,
-0xFE,0x00, 0xC2,0x90, 0x00,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x01,0x4C, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x2A,0x6C, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x2C,0x10, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x02, 0x05,0x3C, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02, 0x00,0x03, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x29,0xE0, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x2B,0x84, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x2C,0x1C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x02, 0x0A,0xBC, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02, 0x00,0x02, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x2A,0xF8, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF7,0x04, 0x4A,0x9C, 0x85,0x16, 0x00,0x00, 0x20,0x3A, 0x00,0x01, 0xEE,0x00,
-0x01,0x01, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x01,0x00, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x01,0x2D, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0xF4,0x82, 0x00,0x12, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x01,0xE0, 0xB4,0xBA,
-0x68,0x02, 0xE0,0x00, 0x01,0xE0, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x3B,0x64, 0xF5,0x84,
-0x4F,0x54, 0xF7,0x05, 0x7A,0x10, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x01,0x99, 0x97,0x2A,
-0x00,0x20, 0x95,0xAA, 0x00,0x1C, 0xF6,0x06, 0x4A,0x98, 0x26,0xAC, 0x00,0x01, 0x77,0x35,
-0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0x07,0x38, 0x00,0x0C, 0xA4,0xBA,
-0x60,0x02, 0x00,0x00, 0x00,0x01, 0x94,0xAA, 0x00,0x10, 0xC7,0x38, 0x60,0x00, 0x87,0x3A,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x97,0x2A, 0x00,0x14, 0xF7,0x04, 0x4A,0x9C, 0x00,0x00,
-0x00,0x01, 0x27,0x38, 0x00,0x01, 0xC0,0x2E, 0x72,0x00, 0xD7,0x00, 0x0A,0x01, 0xE0,0x00,
-0x01,0xD0, 0xF7,0x05, 0x7A,0x18, 0x95,0xAA, 0x00,0x1C, 0xF6,0x06, 0x4A,0x98, 0x06,0xAC,
-0x00,0x01, 0x77,0x35, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0x07,0x38,
-0x00,0x0C, 0xA4,0xBA, 0x60,0x02, 0x00,0x00, 0x00,0x01, 0x94,0xAA, 0x00,0x10, 0xC7,0x38,
-0x60,0x00, 0x87,0x3A, 0x00,0x04, 0xF0,0x05, 0x7A,0x18, 0x97,0x2A, 0x00,0x14, 0xF5,0x05,
-0x79,0xD8, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x01,0xF4, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x38, 0xF7,0x04,
-0x7A,0x10, 0xF6,0x84, 0x3B,0x64, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x02,0x4C, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x02,0x4C, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x02,0x85, 0xF4,0x82, 0x00,0x00, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86,
-0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02,
-0x00,0x12, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x02,0x74, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF3,0x06, 0x2A,0x6C, 0xF3,0x05, 0x2C,0x10, 0xE0,0x00, 0x05,0x28, 0xF0,0x05,
-0x7A,0x18, 0xF3,0x84, 0x79,0xD8, 0xF6,0x84, 0x4A,0xA0, 0x23,0x14, 0x00,0x20, 0x93,0x16,
-0xFF,0xC4, 0x84,0x1E, 0x00,0x10, 0x96,0x96, 0xFF,0xD4, 0xF7,0x04, 0x4A,0x9C, 0x94,0x16,
-0xFF,0xE0, 0x85,0x1E, 0x00,0x14, 0xC0,0x36, 0x72,0x00, 0xEC,0x00, 0x03,0x6C, 0x95,0x16,
-0xFF,0xE4, 0x77,0x35, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF3,0x06,
-0x4A,0x98, 0xC6,0xB8, 0x30,0x00, 0x06,0xB4, 0x00,0x0C, 0xC5,0x84, 0x00,0x00, 0x87,0x36,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x42,0x00, 0xE6,0x00, 0x02,0xFC, 0xC6,0x24,
-0x00,0x00, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x52,0x00, 0xE6,0x00,
-0x03,0x00, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x03,0x0D, 0x00,0x00, 0x00,0x01, 0xF5,0x82, 0x00,0x00, 0x86,0x36, 0x00,0x00, 0x87,0x16,
-0xFF,0xE0, 0x00,0x00, 0x00,0x01, 0xC0,0x32, 0x72,0x00, 0xE2,0x00, 0x03,0x48, 0xF5,0x02,
-0x00,0x00, 0xC0,0x32, 0x72,0x00, 0xE6,0x00, 0x03,0x50, 0x20,0x2A, 0x00,0x00, 0x86,0xB6,
-0x00,0x04, 0x87,0x16, 0xFF,0xE4, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0x03,0x51, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00,
-0x03,0x61, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00,
-0x03,0x70, 0x20,0x26, 0x00,0x00, 0xF4,0x82, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00,
-0x03,0xA5, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xD4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9,
-0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4,
-0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xD8, 0xE0,0x00, 0x04,0x18, 0x96,0x96,
-0xFF,0xDC, 0x27,0x14, 0x00,0x2C, 0x97,0x13, 0xFF,0xFC, 0x83,0x16, 0xFF,0xC4, 0x00,0x00,
-0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0xF3,0x06, 0x4A,0x98, 0x93,0x13, 0xFF,0xFC, 0x93,0x96,
-0xFF,0xCC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96,
-0xFF,0xCC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x04,0x15, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xD4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xD8, 0x96,0x96, 0xFF,0xDC, 0xF7,0x05, 0x4A,0xA0, 0xE0,0x00, 0x04,0x1C, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x04,0x2C, 0xF4,0x82,
-0x00,0x01, 0xE0,0x00, 0x04,0x84, 0xF4,0x82, 0x00,0x00, 0x86,0x96, 0xFF,0xD8, 0x00,0x00,
-0x00,0x01, 0x77,0x35, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF6,0x86,
-0x42,0xC8, 0xA6,0x3A, 0x68,0x02, 0xC7,0x38, 0x68,0x00, 0x75,0x39, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0x05,0xB8, 0x00,0x02, 0x86,0xAE, 0x00,0x00, 0x07,0x38, 0x00,0x04, 0x97,0x16,
-0xFF,0xEC, 0xC6,0x30, 0x57,0xC0, 0x76,0x30, 0xFF,0xF0, 0x96,0x16, 0xFF,0xF4, 0x75,0xAD,
-0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0xC6,0xB4, 0x5F,0xC0, 0x76,0xB4, 0xFF,0xF0, 0x96,0x96,
-0xFF,0xF0, 0x20,0x26, 0x00,0x00, 0xE6,0x00, 0x05,0x25, 0xF3,0x06, 0x29,0xE0, 0x86,0x96,
-0xFF,0xF0, 0xF5,0x82, 0x00,0x00, 0xC7,0x34, 0x68,0x00, 0xC4,0x9C, 0x72,0x00, 0xC0,0x2E,
-0x6A,0x00, 0xEC,0x00, 0x04,0xF0, 0xC5,0x24, 0x00,0x00, 0xC6,0x2C, 0x00,0x00, 0x87,0x16,
-0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0xA6,0xB2, 0x70,0x02, 0x05,0xAC, 0x00,0x01, 0xC7,0x30,
-0x70,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB4,
-0xFF,0xF0, 0xF6,0xAB, 0x28,0x00, 0x05,0x28, 0x00,0x02, 0x87,0x16, 0xFF,0xF0, 0x00,0x00,
-0x00,0x01, 0xC0,0x2E, 0x72,0x00, 0xEC,0x00, 0x04,0xB1, 0x06,0x30, 0x00,0x02, 0xF3,0x02,
-0x00,0x03, 0xF3,0x05, 0x76,0xF4, 0x87,0x16, 0xFF,0xF0, 0x86,0x9E, 0x00,0x04, 0xC7,0x38,
-0x70,0x00, 0xC7,0x38, 0x48,0x00, 0xC6,0xB4, 0x70,0x00, 0x87,0x16, 0xFF,0xF4, 0x06,0xB4,
-0x00,0x20, 0x97,0x02, 0xFF,0x6C, 0x94,0x82, 0xFF,0x50, 0x96,0x82, 0xFF,0x58, 0xF3,0x06,
-0x29,0xE0, 0xF3,0x05, 0x2C,0x10, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF7,0x04, 0x7A,0x18, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x05,0xCD, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x7A,0x10, 0xF6,0x84, 0x3B,0x64, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x05,0xCD, 0xF5,0x86, 0x4A,0x98, 0xF6,0x04, 0x79,0xD8, 0xF6,0x84, 0x4F,0x54, 0x00,0x00,
-0x00,0x01, 0x96,0xB2, 0x00,0x1C, 0x06,0xB4, 0x00,0x01, 0x77,0x35, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x77,0x39, 0x00,0x02, 0x07,0x38, 0x00,0x0C, 0xA5,0x3A, 0x58,0x02, 0x00,0x00,
-0x00,0x01, 0x95,0x32, 0x00,0x10, 0xC7,0x38, 0x58,0x00, 0x87,0x3A, 0x00,0x04, 0xF0,0x05,
-0x7A,0x18, 0x97,0x32, 0x00,0x14, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x01,0xF4, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0x05,0xFC, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86,
-0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02,
-0x00,0x12, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x05,0xF4, 0xB5,0x3A, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF5,0x06, 0x2A,0x6C, 0xF5,0x05, 0x2C,0x10, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x96, 0x00,0x00, 0xF7,0x04, 0x75,0xEC, 0x85,0x2E,
-0x00,0x20, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x06,0xCC, 0xF5,0x05, 0x7A,0x08, 0xF7,0x04,
-0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x06,0xCC, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x7A,0x08, 0xF6,0x84, 0x3B,0x64, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0x47,0x0C, 0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x06,0xCC, 0x00,0x00, 0x00,0x01, 0x87,0x2E, 0x00,0x1C, 0xF6,0x84, 0x4F,0x54, 0xF7,0x05,
-0x7A,0x00, 0xC7,0x34, 0x72,0x00, 0x20,0x3A, 0x00,0x00, 0xEE,0x00, 0x06,0x8D, 0xF5,0x02,
-0x00,0x01, 0xE0,0x00, 0x06,0x90, 0xF5,0x05, 0x79,0xF8, 0xF0,0x85, 0x79,0xF8, 0xF6,0x84,
-0x7A,0x00, 0xC7,0x38, 0x70,0x00, 0xC6,0xB4, 0x70,0x00, 0xF7,0x04, 0x79,0xF8, 0xF6,0x85,
-0x79,0xE8, 0xC7,0x38, 0x70,0x00, 0xC6,0x34, 0x70,0x00, 0xF7,0x04, 0x4A,0x9C, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x00, 0x06,0xCC, 0xF6,0x05, 0x79,0xF0, 0x20,0x36,
-0x00,0x00, 0xEC,0x00, 0x06,0xF8, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86,
-0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02,
-0x00,0x13, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x07,0x38, 0xB5,0x3A, 0x68,0x02, 0xE0,0x00,
-0x07,0x38, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x4A,0x9C, 0x00,0x00, 0x00,0x01, 0xC0,0x32,
-0x72,0x00, 0xEE,0x00, 0x07,0x19, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x4A,0x9C, 0xE0,0x00,
-0x07,0x28, 0xF7,0x05, 0x79,0xF0, 0x20,0x32, 0x00,0x00, 0xEC,0x00, 0x07,0x28, 0x00,0x00,
-0x00,0x01, 0xF0,0x85, 0x79,0xF0, 0xF5,0x85, 0x79,0xE0, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x07,0x4C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x38, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x07,0xA4, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x07,0xA4, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x7A,0x08, 0xF6,0x84, 0x3B,0x64, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x07,0xD5, 0xF4,0x02,
-0x00,0x00, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x13, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x07,0xCC, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xE0,0x00, 0x0A,0xA4, 0xF3,0x06,
-0x2B,0x84, 0xF6,0x84, 0x79,0xE8, 0xF6,0x06, 0x4A,0x98, 0x77,0x35, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF6,0x84, 0x79,0xE0, 0x07,0x38, 0x00,0x0C, 0xA3,0x3A,
-0x60,0x02, 0xC3,0xB4, 0x00,0x00, 0x93,0x36, 0x00,0x10, 0xC7,0x38, 0x60,0x00, 0x87,0x3A,
-0x00,0x04, 0x23,0x14, 0x00,0x20, 0x93,0x16, 0xFF,0xC4, 0x97,0x36, 0x00,0x14, 0x84,0x9E,
-0x00,0x10, 0xF6,0x84, 0x4A,0xA0, 0x94,0x96, 0xFF,0xE0, 0x96,0x96, 0xFF,0xD4, 0x85,0x1E,
-0x00,0x14, 0xF7,0x04, 0x4A,0x9C, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x00,
-0x08,0xEC, 0x95,0x16, 0xFF,0xE4, 0x77,0x35, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39,
-0x00,0x02, 0xC6,0xB8, 0x60,0x00, 0x06,0xB4, 0x00,0x0C, 0xC5,0x84, 0x00,0x00, 0x87,0x36,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00, 0x08,0x7C, 0xC6,0x20,
-0x00,0x00, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x52,0x00, 0xE6,0x00,
-0x08,0x80, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x08,0x8D, 0x00,0x00, 0x00,0x01, 0xF5,0x82, 0x00,0x00, 0x86,0x36, 0x00,0x00, 0x87,0x16,
-0xFF,0xE0, 0x00,0x00, 0x00,0x01, 0xC0,0x32, 0x72,0x00, 0xE2,0x00, 0x08,0xC8, 0xF5,0x02,
-0x00,0x00, 0xC0,0x32, 0x72,0x00, 0xE6,0x00, 0x08,0xD0, 0x20,0x2A, 0x00,0x00, 0x86,0xB6,
-0x00,0x04, 0x87,0x16, 0xFF,0xE4, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0x08,0xD1, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00,
-0x08,0xE1, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00,
-0x08,0xF0, 0x20,0x22, 0x00,0x00, 0xF4,0x02, 0x00,0x01, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x09,0x25, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xD4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9,
-0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4,
-0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xD8, 0xE0,0x00, 0x09,0x98, 0x96,0x96,
-0xFF,0xDC, 0x27,0x14, 0x00,0x2C, 0x97,0x13, 0xFF,0xFC, 0x83,0x16, 0xFF,0xC4, 0x00,0x00,
-0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0xF3,0x06, 0x4A,0x98, 0x93,0x13, 0xFF,0xFC, 0x93,0x96,
-0xFF,0xCC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96,
-0xFF,0xCC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x09,0x95, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xD4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xD8, 0x96,0x96, 0xFF,0xDC, 0xF7,0x05, 0x4A,0xA0, 0xE0,0x00, 0x09,0x9C, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x09,0xAC, 0xF4,0x82,
-0x00,0x01, 0xE0,0x00, 0x0A,0x04, 0xF4,0x82, 0x00,0x00, 0x86,0x96, 0xFF,0xD8, 0x00,0x00,
-0x00,0x01, 0x77,0x35, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF6,0x86,
-0x42,0xC8, 0xA6,0x3A, 0x68,0x02, 0xC7,0x38, 0x68,0x00, 0x75,0x39, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0x05,0xB8, 0x00,0x02, 0x86,0xAE, 0x00,0x00, 0x07,0x38, 0x00,0x04, 0x97,0x16,
-0xFF,0xEC, 0xC6,0x30, 0x57,0xC0, 0x76,0x30, 0xFF,0xF0, 0x96,0x16, 0xFF,0xF4, 0x75,0xAD,
-0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0xC6,0xB4, 0x5F,0xC0, 0x76,0xB4, 0xFF,0xF0, 0x96,0x96,
-0xFF,0xF0, 0x20,0x26, 0x00,0x00, 0xE6,0x00, 0x0A,0xA5, 0xF3,0x06, 0x2A,0xF8, 0x86,0x96,
-0xFF,0xF0, 0xF5,0x82, 0x00,0x00, 0xC7,0x34, 0x68,0x00, 0xC4,0x9C, 0x72,0x00, 0xC0,0x2E,
-0x6A,0x00, 0xEC,0x00, 0x0A,0x70, 0xC5,0x24, 0x00,0x00, 0xC6,0x2C, 0x00,0x00, 0x87,0x16,
-0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0xA6,0xB2, 0x70,0x02, 0x05,0xAC, 0x00,0x01, 0xC7,0x30,
-0x70,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB4,
-0xFF,0xF0, 0xF6,0xAB, 0x28,0x00, 0x05,0x28, 0x00,0x02, 0x87,0x16, 0xFF,0xF0, 0x00,0x00,
-0x00,0x01, 0xC0,0x2E, 0x72,0x00, 0xEC,0x00, 0x0A,0x31, 0x06,0x30, 0x00,0x02, 0xF3,0x02,
-0x00,0x02, 0xF3,0x05, 0x76,0xF4, 0x87,0x16, 0xFF,0xF0, 0x86,0x9E, 0x00,0x04, 0xC7,0x38,
-0x70,0x00, 0xC7,0x38, 0x48,0x00, 0xC6,0xB4, 0x70,0x00, 0x87,0x16, 0xFF,0xF4, 0x06,0xB4,
-0x00,0x20, 0x97,0x02, 0xFF,0x6C, 0x94,0x82, 0xFF,0x50, 0x96,0x82, 0xFF,0x58, 0xF3,0x06,
-0x2A,0xF8, 0xF3,0x05, 0x2C,0x1C, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF6,0x84, 0x79,0xE8, 0xF7,0x04, 0x79,0xF8, 0x00,0x00, 0x00,0x01, 0xC6,0xB4,
-0x70,0x00, 0xF7,0x04, 0x7A,0x20, 0xF6,0x85, 0x79,0xE8, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x7A,0x20, 0xF7,0x04, 0x79,0xF0, 0xF6,0x04, 0x7A,0x20, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x0B,0x2C, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x82, 0x00,0x13, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x0B,0x20, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x86,
-0x2B,0x84, 0xE0,0x00, 0x0B,0x38, 0xF5,0x85, 0x2C,0x1C, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x07,0x4C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF7,0x06, 0x2C,0x10, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x29,0xE0, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x2C,0x10, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x2A,0x6C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x2C,0x1C, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x2A,0xF8, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x2C,0x1C, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x2B,0x84, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF0,0x05,
-0x2D,0x38, 0xF0,0x05, 0x2D,0x3C, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x18, 0xFF,0x85, 0x2E,0xDC, 0xF7,0x06, 0x0C,0x3E, 0xC7,0x7C,
-0x74,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x14,0x29, 0x97,0x16, 0xFF,0xF4, 0x47,0x38,
-0xFF,0xFB, 0xF6,0x84, 0x6F,0x50, 0xCF,0xB8, 0x00,0x00, 0x83,0x96, 0xFF,0xF4, 0xF7,0x02,
-0x00,0x3F, 0xC3,0x9C, 0x6D,0x80, 0xC7,0x1C, 0x74,0x00, 0x20,0x3A, 0x00,0x3F, 0xE2,0x00,
-0x12,0x60, 0x93,0x96, 0xFF,0xF4, 0x77,0x39, 0x00,0x02, 0xF6,0x82, 0x0C,0x5C, 0xA6,0xB6,
-0x70,0x02, 0x00,0x00, 0x00,0x01, 0xC1,0x34, 0x00,0x00, 0x00,0x00, 0x12,0x60, 0x00,0x00,
-0x12,0x60, 0x00,0x00, 0x0D,0x68, 0x00,0x00, 0x0D,0x68, 0x00,0x00, 0x0D,0x5C, 0x00,0x00,
-0x0D,0x5C, 0x00,0x00, 0x0D,0x68, 0x00,0x00, 0x0D,0x68, 0x00,0x00, 0x12,0x50, 0x00,0x00,
-0x12,0x50, 0x00,0x00, 0x12,0x3C, 0x00,0x00, 0x12,0x3C, 0x00,0x00, 0x0D,0xE0, 0x00,0x00,
-0x0D,0xE0, 0x00,0x00, 0x12,0x3C, 0x00,0x00, 0x12,0x3C, 0x00,0x00, 0x0D,0xE8, 0x00,0x00,
-0x0D,0xF4, 0x00,0x00, 0x0E,0x00, 0x00,0x00, 0x0E,0x20, 0x00,0x00, 0x0E,0x40, 0x00,0x00,
-0x0E,0x60, 0x00,0x00, 0x0E,0x80, 0x00,0x00, 0x0E,0xA0, 0x00,0x00, 0x0E,0xC0, 0x00,0x00,
-0x0E,0xC8, 0x00,0x00, 0x0E,0xD0, 0x00,0x00, 0x12,0x28, 0x00,0x00, 0x0E,0xD8, 0x00,0x00,
-0x0E,0xF4, 0x00,0x00, 0x0F,0x10, 0x00,0x00, 0x12,0x28, 0x00,0x00, 0x0F,0x18, 0x00,0x00,
-0x0F,0x18, 0x00,0x00, 0x0F,0x24, 0x00,0x00, 0x0F,0x24, 0x00,0x00, 0x0F,0x44, 0x00,0x00,
-0x0F,0x44, 0x00,0x00, 0x0F,0x64, 0x00,0x00, 0x0F,0x64, 0x00,0x00, 0x0F,0x84, 0x00,0x00,
-0x0F,0x84, 0x00,0x00, 0x0F,0x8C, 0x00,0x00, 0x0F,0x8C, 0x00,0x00, 0x0F,0x94, 0x00,0x00,
-0x0F,0x94, 0x00,0x00, 0x0F,0xB0, 0x00,0x00, 0x0F,0xB0, 0x00,0x00, 0x0F,0xB8, 0x00,0x00,
-0x0F,0xD8, 0x00,0x00, 0x0F,0xF8, 0x00,0x00, 0x10,0x2C, 0x00,0x00, 0x10,0x60, 0x00,0x00,
-0x10,0x94, 0x00,0x00, 0x10,0xC8, 0x00,0x00, 0x10,0xFC, 0x00,0x00, 0x11,0x30, 0x00,0x00,
-0x11,0x4C, 0x00,0x00, 0x11,0x68, 0x00,0x00, 0x12,0x14, 0x00,0x00, 0x11,0x84, 0x00,0x00,
-0x11,0xB4, 0x00,0x00, 0x11,0xE4, 0x00,0x00, 0x12,0x14, 0xF3,0x82, 0x00,0x06, 0xE0,0x00,
-0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF6,0x02, 0x00,0x05, 0x20,0x32, 0x00,0x14, 0xE6,0x00,
-0x0D,0xB5, 0x27,0x00, 0x00,0x10, 0x20,0x3A, 0x00,0x01, 0xE2,0x00, 0x0D,0xB5, 0xF7,0x06,
-0x2D,0xCC, 0xF6,0x84, 0x2E,0xCC, 0x00,0x00, 0x00,0x01, 0x75,0xB5, 0x00,0x02, 0xB6,0x2E,
-0x70,0x02, 0x06,0xB4, 0x00,0x01, 0xF6,0x85, 0x2E,0xCC, 0x86,0x02, 0xFF,0x34, 0xF7,0x06,
-0x2E,0x4C, 0x20,0x36, 0x00,0x1F, 0xE2,0x00, 0x0D,0xB5, 0xB6,0x2E, 0x70,0x02, 0xF0,0x05,
-0x2E,0xCC, 0xF7,0x04, 0x2D,0x58, 0x00,0x00, 0x00,0x01, 0x87,0x3A, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x87,0x3A, 0x00,0x18, 0x00,0x00, 0x00,0x01, 0x07,0x88, 0x00,0x08, 0xC1,0x38,
-0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x60, 0x00,0x00, 0x00,0x01, 0xE0,0x00,
-0x12,0x40, 0xF3,0x82, 0x00,0x06, 0xF3,0x82, 0x00,0x0B, 0xE0,0x00, 0x12,0x54, 0x93,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x07, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x0B, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x0B, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x06, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x06, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x0B, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xE0,0x00,
-0x12,0x40, 0xF3,0x82, 0x00,0x0B, 0xE0,0x00, 0x12,0x40, 0xF3,0x82, 0x00,0x07, 0xE0,0x00,
-0x12,0x2C, 0xF3,0x82, 0x00,0x0B, 0xF3,0x82, 0x00,0x0B, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x40, 0xF3,0x82,
-0x00,0x06, 0xF3,0x82, 0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x40, 0xF3,0x82, 0x00,0x06, 0xE0,0x00,
-0x12,0x2C, 0xF3,0x82, 0x00,0x0B, 0xF3,0x82, 0x00,0x14, 0xE0,0x00, 0x12,0x54, 0x93,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x06, 0xE0,0x00, 0x12,0x54, 0x93,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93,
-0xFF,0xFC, 0xE0,0x00, 0x12,0x40, 0xF3,0x82, 0x00,0x14, 0xE0,0x00, 0x12,0x2C, 0xF3,0x82,
-0x00,0x14, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x40, 0xF3,0x82, 0x00,0x06, 0xE0,0x00,
-0x12,0x2C, 0xF3,0x82, 0x00,0x14, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x0B, 0xE0,0x00,
-0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x07, 0xE0,0x00,
-0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x0B, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x0B, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x06, 0xE0,0x00, 0x12,0x54, 0x93,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x06, 0xE0,0x00,
-0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x0B, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x14, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0xE0,0x00, 0x12,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0x12,0x40, 0xF3,0x82, 0x00,0x0B, 0xF3,0x82, 0x00,0x14, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00,
-0x12,0x40, 0xF3,0x82, 0x00,0x07, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x2C, 0xF3,0x82,
-0x00,0x0B, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x0B, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x40, 0xF3,0x82,
-0x00,0x06, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x40, 0xF3,0x82,
-0x00,0x06, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x12,0x2C, 0xF3,0x82, 0x00,0x0B, 0xF7,0x04,
-0x35,0x28, 0xF6,0x82, 0x00,0x01, 0x07,0x38, 0x00,0x08, 0xE0,0x00, 0x13,0xCC, 0xF7,0x05,
-0x35,0x44, 0xF3,0x82, 0x00,0x14, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x07, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x05, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0x90,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0x83,0x96,
-0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x77,0x9C, 0x00,0x14, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00,
-0x12,0x9D, 0xF7,0x06, 0x04,0x00, 0xF7,0x04, 0x6F,0x5C, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x6F,0x5C, 0xF7,0x04, 0x6F,0x5C, 0xE0,0x00, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x83,0x96, 0xFF,0xF4, 0xF7,0x06, 0x04,0x00, 0xC0,0x1E, 0x74,0x00, 0xE6,0x00,
-0x14,0x29, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x2E,0xD0, 0xF6,0x84, 0x35,0x24, 0x07,0x38,
-0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x14,0x05, 0xF7,0x05, 0x2E,0xD0, 0xF7,0x04,
-0xE0,0x14, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x14,0x05, 0xF6,0x82,
-0x00,0x00, 0xF6,0x85, 0xE0,0x14, 0xF7,0x04, 0x2E,0xD8, 0xC5,0x34, 0x00,0x00, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x2E,0xD8, 0x20,0x2A, 0x00,0x02, 0xEE,0x00, 0x13,0xCC, 0xF6,0x82,
-0x00,0x00, 0xF6,0x84, 0x35,0x28, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00, 0x13,0xA0, 0x05,0xB4, 0x00,0x08, 0x95,0x93,
-0xFF,0xFC, 0x95,0x16, 0xFF,0xE8, 0x95,0x96, 0xFF,0xE4, 0x96,0x96, 0xFF,0xE0, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x64, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xE8, 0x85,0x96,
-0xFF,0xE4, 0x86,0x96, 0xFF,0xE0, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x13,0x90, 0xF7,0x02,
-0x00,0x00, 0x86,0x36, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x0F, 0xE2,0x00,
-0x13,0x75, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0x97,0x36, 0x00,0x14, 0x87,0x36, 0x00,0x14, 0xE0,0x00, 0x13,0x90, 0xF7,0x02,
-0x00,0x00, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x05, 0xC7,0x38,
-0x6A,0x00, 0xC7,0x38, 0x60,0x00, 0x07,0x38, 0x00,0x10, 0xC7,0x2C, 0x70,0x00, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x12,0x00, 0xF7,0x05, 0x35,0x2C, 0xF6,0x84, 0x35,0x28, 0xF7,0x04,
-0x6F,0x4C, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x13,0xC0, 0x07,0x34,
-0x14,0x94, 0xF3,0x84, 0x6F,0x44, 0xE0,0x00, 0x13,0xC4, 0xF3,0x85, 0x35,0x28, 0xF7,0x05,
-0x35,0x28, 0xE0,0x00, 0x12,0xE8, 0x05,0x28, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00,
-0x14,0x29, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0xF0,0x05, 0x35,0x24, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x82, 0x00,0x0D, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x14,0x28, 0xB3,0xBA, 0x68,0x02, 0xE0,0x00, 0x14,0x28, 0xF0,0x05,
-0x2D,0x38, 0xF7,0x04, 0xE0,0x10, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x14,0x29, 0xF7,0x02, 0x00,0x00, 0xF7,0x05, 0xE0,0x10, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x02,0x98, 0x97,0x93, 0xFF,0xFC, 0xF4,0x84, 0x2D,0x38, 0xF7,0x04, 0x2D,0x3C, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00, 0x0C,0x09, 0xF6,0x86, 0x2C,0x28, 0x77,0x39,
-0x00,0x02, 0xA5,0x3A, 0x68,0x02, 0x00,0x00, 0x00,0x01, 0x20,0x2A, 0x00,0x14, 0xE6,0x00,
-0x14,0x91, 0x27,0x28, 0x00,0x15, 0x20,0x3A, 0x00,0x01, 0xE2,0x00, 0x14,0x91, 0xF7,0x06,
-0x2D,0xCC, 0xF6,0x84, 0x2E,0xCC, 0x86,0x02, 0xFF,0x34, 0x75,0xB5, 0x00,0x02, 0xB5,0x2E,
-0x70,0x02, 0x06,0xB4, 0x00,0x01, 0xF6,0x85, 0x2E,0xCC, 0xF7,0x06, 0x2E,0x4C, 0x20,0x36,
-0x00,0x1F, 0xE2,0x00, 0x14,0x91, 0xB6,0x2E, 0x70,0x02, 0xF0,0x05, 0x2E,0xCC, 0xF7,0x06,
-0x2D,0x44, 0x76,0xA9, 0x00,0x02, 0xA7,0x36, 0x70,0x02, 0x00,0x00, 0x00,0x01, 0x87,0x3A,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x87,0x36, 0x00,0x04, 0x94,0x96,
-0xFF,0xEC, 0x07,0x88, 0x00,0x08, 0xC1,0x38, 0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04,
-0x2D,0x3C, 0x84,0x96, 0xFF,0xEC, 0x07,0x38, 0x00,0x01, 0x20,0x3A, 0x00,0x44, 0xE6,0x00,
-0x14,0x2C, 0xF7,0x05, 0x2D,0x3C, 0xE0,0x00, 0x14,0x2C, 0xF0,0x05, 0x2D,0x3C, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x84,0x16, 0x00,0x00, 0xF7,0x02,
-0x00,0x00, 0x85,0x96, 0x00,0x04, 0x20,0x3A, 0x00,0x21, 0xEE,0x00, 0x15,0x34, 0x95,0xA2,
-0x00,0x00, 0xF6,0x06, 0x23,0x38, 0x07,0x20, 0x00,0x84, 0xC6,0xA0, 0x00,0x00, 0x96,0x3A,
-0x00,0x04, 0x27,0x38, 0x00,0x04, 0xC0,0x3A, 0x6A,0x00, 0xEC,0x00, 0x15,0x20, 0x00,0x00,
-0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x96,
-0x00,0x00, 0x87,0x16, 0x00,0x04, 0xF6,0x04, 0x2D,0x40, 0x97,0x36, 0x00,0x00, 0x97,0x36,
-0x00,0x04, 0x07,0x30, 0x00,0x01, 0xF7,0x05, 0x2D,0x40, 0x96,0x36, 0x00,0x08, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x16, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x20,0x2A, 0x00,0x14, 0xE6,0x00, 0x15,0xD9, 0x27,0x28, 0x00,0x15, 0x20,0x3A,
-0x00,0x01, 0xE2,0x00, 0x15,0xD9, 0xF7,0x06, 0x2D,0xCC, 0xF6,0x84, 0x2E,0xCC, 0x86,0x02,
-0xFF,0x34, 0x75,0xB5, 0x00,0x02, 0xB5,0x2E, 0x70,0x02, 0x06,0xB4, 0x00,0x01, 0xF6,0x85,
-0x2E,0xCC, 0xF7,0x06, 0x2E,0x4C, 0x20,0x36, 0x00,0x1F, 0xE2,0x00, 0x15,0xD9, 0xB6,0x2E,
-0x70,0x02, 0xF0,0x05, 0x2E,0xCC, 0xF6,0x86, 0x2D,0x44, 0x77,0x29, 0x00,0x02, 0xA6,0xBA,
-0x68,0x02, 0x00,0x00, 0x00,0x01, 0x86,0xB6, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x87,0x3A, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x07,0x88, 0x00,0x08, 0xC1,0x38,
-0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x87,0x16, 0x00,0x00, 0x86,0x96, 0x00,0x04, 0xF6,0x06, 0x2D,0x44, 0x76,0xB5,
-0x00,0x02, 0x85,0xBA, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xB5,0xB6, 0x60,0x02, 0xC6,0xB4,
-0x70,0x00, 0x85,0x96, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0x95,0xB6, 0x00,0x04, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x16, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x87,0x32, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x0F, 0x86,0xB2,
-0x00,0x00, 0xC5,0x38, 0x00,0x00, 0xEE,0x00, 0x16,0xB4, 0xC5,0xB4, 0x00,0x00, 0x20,0x36,
-0x00,0x0F, 0xEE,0x00, 0x16,0xB4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEC,0x00,
-0x16,0xB5, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xEC,0x00, 0x16,0xD0, 0x00,0x00,
-0x00,0x01, 0x87,0x32, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x32,
-0x00,0x0C, 0x87,0x32, 0x00,0x0C, 0xE0,0x00, 0x16,0xD8, 0xF4,0x02, 0x00,0x00, 0xC0,0x2A,
-0x5A,0x00, 0x44,0x0C, 0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x2E,0xE0, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x32,0xD4, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x02, 0x18,0x2C, 0x97,0x13, 0xFF,0xFC, 0xF7,0x82, 0x00,0x09, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x2E,0xE0, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02, 0x34,0x58, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02,
-0x00,0x0C, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x2F,0x6C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02, 0x3F,0x94, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x0B, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x2F,0xF8, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02,
-0x3B,0x84, 0x97,0x13, 0xFF,0xFC, 0xF7,0x82, 0x00,0x0B, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x32,0x28, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x02, 0x26,0xE4, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02, 0x00,0x13, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x30,0x84, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02, 0x26,0xA0, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02,
-0x00,0x11, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x31,0x10, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02, 0x18,0x2C, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x09, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x31,0x9C, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF0,0x05,
-0x7A,0x78, 0xF0,0x05, 0x32,0xE8, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x50, 0xF7,0x04, 0x71,0xC8, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x18,0x55, 0xF6,0x86, 0x71,0xC4, 0xE0,0x00, 0x18,0x6C, 0xF6,0x02,
-0x00,0x00, 0xF7,0x04, 0x71,0xD4, 0x00,0x00, 0x00,0x01, 0x77,0x39, 0x00,0x02, 0xC7,0x38,
-0x68,0x00, 0x86,0x3A, 0x00,0x18, 0x00,0x00, 0x00,0x01, 0xF6,0x05, 0x32,0xC4, 0x86,0xB2,
-0x00,0x08, 0x07,0x01, 0x80,0x00, 0xC5,0xB4, 0x74,0x00, 0xF5,0x85, 0x32,0xD0, 0x87,0x32,
-0x00,0x18, 0xF6,0x86, 0x6F,0x44, 0x77,0x39, 0x00,0x02, 0xA7,0x3A, 0x68,0x02, 0x20,0x2E,
-0x00,0x00, 0xF7,0x05, 0x32,0xC0, 0x07,0x38, 0x09,0xD8, 0x86,0xB2, 0x00,0x04, 0xF7,0x05,
-0x32,0xCC, 0xE6,0x00, 0x19,0x41, 0xF6,0x85, 0x32,0xC8, 0xF7,0x04, 0x71,0x98, 0xF6,0x84,
-0x7A,0x78, 0x27,0x38, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x19,0x10, 0xF7,0x05,
-0x71,0x98, 0xF7,0x04, 0x76,0xFC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x18,0xE8, 0xF3,0x02, 0x00,0x11, 0xF3,0x06, 0x32,0xD4, 0xF3,0x05, 0x76,0xFC, 0xE0,0x00,
-0x18,0xF8, 0xF7,0x02, 0x00,0x01, 0xF3,0x05, 0x76,0xF8, 0xF3,0x06, 0x32,0xD4, 0xF3,0x05,
-0x77,0x00, 0xF7,0x02, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x19,0x14, 0xF3,0x02,
-0x00,0x01, 0xF3,0x06, 0x31,0x10, 0xE0,0x00, 0x26,0x8C, 0xF3,0x05, 0x32,0xD4, 0xF3,0x02,
-0x00,0x01, 0xF3,0x05, 0x7A,0x78, 0xF3,0x06, 0x30,0x84, 0xF3,0x05, 0x32,0xD4, 0xF3,0x04,
-0x32,0xC4, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x06,0x10, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x26,0x8C, 0x00,0x00, 0x00,0x01, 0xF3,0x02,
-0x00,0x00, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x1C,0xB9, 0x93,0x16, 0xFF,0xE4, 0x87,0x32,
-0x00,0x08, 0x86,0x96, 0xFF,0xE4, 0xC3,0x04, 0x00,0x00, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00,
-0x19,0x84, 0x20,0x36, 0x00,0x00, 0x87,0x32, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x32,0x00, 0xE6,0x00, 0x19,0x84, 0x20,0x36, 0x00,0x00, 0xF6,0x82, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xE6,0x00, 0x1C,0xB8, 0xF3,0x02, 0x00,0x00, 0xF7,0x04, 0x32,0xC0, 0x93,0x16,
-0xFF,0xAC, 0xF5,0x84, 0x32,0xC4, 0x86,0x3A, 0x14,0x28, 0x03,0xB8, 0x14,0x20, 0x04,0x2C,
-0x00,0x08, 0x86,0xBA, 0x14,0x24, 0x00,0x00, 0x00,0x01, 0xC0,0x32, 0x6A,0x00, 0xEC,0x00,
-0x1A,0x70, 0x96,0x16, 0xFF,0xEC, 0x77,0x31, 0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x77,0x39,
-0x00,0x02, 0xC6,0x38, 0x38,0x00, 0x06,0x30, 0x00,0x0C, 0x86,0xB2, 0x00,0x00, 0x87,0x2E,
-0x00,0x08, 0x85,0x16, 0xFF,0xAC, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x1A,0x00, 0xC4,0x84,
-0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x2E, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x1A,0x04, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A,
-0x00,0x00, 0xE6,0x00, 0x1A,0x11, 0x00,0x00, 0x00,0x01, 0xF4,0x82, 0x00,0x00, 0x86,0xB2,
-0x00,0x00, 0x87,0x22, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0x1A,0x4C, 0xF5,0x82, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x1A,0x54, 0x20,0x2E,
-0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x22, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0x1A,0x55, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0x1A,0x65, 0x20,0x26, 0x00,0x00, 0xF4,0x82, 0x00,0x01, 0x20,0x26,
-0x00,0x00, 0xE6,0x00, 0x1A,0x70, 0xF3,0x02, 0x00,0x01, 0x93,0x16, 0xFF,0xAC, 0x83,0x16,
-0xFF,0xAC, 0x00,0x00, 0x00,0x01, 0x20,0x1A, 0x00,0x00, 0xE6,0x00, 0x1A,0xB1, 0xF6,0x02,
-0x00,0x01, 0x87,0x16, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4,
-0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x38,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6,
-0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xE0,0x00, 0x1B,0x18, 0x96,0x96, 0xFF,0xF4, 0x27,0x14,
-0x00,0x14, 0x97,0x13, 0xFF,0xFC, 0x94,0x13, 0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0x93,0x96,
-0xFF,0xBC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96,
-0xFF,0xBC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x1B,0x15, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x38,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xF0, 0x96,0x96, 0xFF,0xF4, 0x97,0x1E, 0x00,0x08, 0xE0,0x00, 0x1B,0x1C, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x1C,0xB8, 0xF3,0x02,
-0x00,0x00, 0xF6,0x04, 0x32,0xC0, 0x93,0x16, 0xFF,0xAC, 0x86,0xB2, 0x14,0x28, 0x03,0xB0,
-0x14,0x20, 0x04,0x30, 0x14,0x8C, 0x87,0x32, 0x14,0x24, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xEC,0x00, 0x1C,0x04, 0x96,0x96, 0xFF,0xEC, 0x77,0x35, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x77,0x39, 0x00,0x02, 0xC5,0xB8, 0x38,0x00, 0x05,0xAC, 0x00,0x0C, 0x86,0xAE,
-0x00,0x00, 0x87,0x32, 0x14,0x8C, 0x85,0x16, 0xFF,0xAC, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x1B,0x94, 0xC4,0x84, 0x00,0x00, 0x86,0xAE, 0x00,0x04, 0x87,0x32, 0x14,0x90, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x1B,0x98, 0x20,0x2A, 0x00,0x00, 0xF5,0x02,
-0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0x1B,0xA5, 0x00,0x00, 0x00,0x01, 0xF4,0x82,
-0x00,0x00, 0x86,0xAE, 0x00,0x00, 0x87,0x22, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0x1B,0xE0, 0xF6,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x1B,0xE8, 0x20,0x32, 0x00,0x00, 0x86,0xAE, 0x00,0x04, 0x87,0x22, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x1B,0xE9, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x1B,0xF9, 0x20,0x26, 0x00,0x00, 0xF4,0x82,
-0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00, 0x1C,0x04, 0xF3,0x02, 0x00,0x01, 0x93,0x16,
-0xFF,0xAC, 0x83,0x16, 0xFF,0xAC, 0x00,0x00, 0x00,0x01, 0x20,0x1A, 0x00,0x00, 0xE6,0x00,
-0x1C,0x45, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x76,0xB9,
-0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x38,0x00, 0x06,0xB4,
-0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xE0,0x00, 0x1C,0xAC, 0x96,0x96,
-0xFF,0xF4, 0x27,0x14, 0x00,0x14, 0x97,0x13, 0xFF,0xFC, 0x94,0x13, 0xFF,0xFC, 0x93,0x93,
-0xFF,0xFC, 0x93,0x96, 0xFF,0xBC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93,
-0xFF,0xFC, 0x83,0x96, 0xFF,0xBC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x1C,0xA9, 0xF6,0x02,
-0x00,0x01, 0x87,0x16, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4,
-0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x38,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6,
-0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0x96,0x96, 0xFF,0xF4, 0x97,0x1E, 0x00,0x08, 0xE0,0x00,
-0x1C,0xB0, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x1E,0x15, 0xF3,0x02, 0x00,0x01, 0xF6,0x84, 0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x85,0xB6,
-0x0E,0xF4, 0x86,0x36, 0x0E,0xF8, 0x20,0x2E, 0x00,0x10, 0xE2,0x00, 0x1C,0xDC, 0x20,0x32,
-0x00,0x10, 0xE2,0x00, 0x1C,0xF9, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x0F,0x00, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x0F,0x00, 0x87,0x36, 0x0F,0x00, 0xE0,0x00,
-0x1D,0x24, 0xF7,0x02, 0x00,0x00, 0x07,0x30, 0x00,0x01, 0xC0,0x3A, 0x5A,0x00, 0xE6,0x00,
-0x1D,0x1D, 0xF6,0x82, 0x00,0x00, 0x20,0x32, 0x00,0x10, 0xE6,0x00, 0x1D,0x20, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0x1D,0x24, 0xC7,0x34, 0x00,0x00, 0xF6,0x82, 0x00,0x01, 0xC7,0x34,
-0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x1E,0x14, 0xF3,0x02, 0x00,0x01, 0xF3,0x04,
-0x32,0xCC, 0x00,0x00, 0x00,0x01, 0x93,0x16, 0xFF,0xDC, 0x93,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x43,0x68, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x1D,0xFC, 0xF3,0x02, 0x00,0x00, 0x83,0x16, 0xFF,0xDC, 0x00,0x00, 0x00,0x01, 0x86,0x1A,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x1D,0x91, 0x76,0xB1,
-0x00,0x02, 0x87,0x1A, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x1A,
-0x00,0x0C, 0x87,0x1A, 0x00,0x0C, 0xE0,0x00, 0x1D,0xFC, 0xF3,0x02, 0x00,0x00, 0xF3,0x02,
-0x00,0x4C, 0x93,0x13, 0xFF,0xFC, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x04, 0xC7,0x38,
-0x6A,0x00, 0x83,0x16, 0xFF,0xDC, 0xC7,0x38, 0x60,0x00, 0xC7,0x38, 0x30,0x00, 0x07,0x38,
-0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0xF3,0x06, 0x7A,0x28, 0x93,0x13, 0xFF,0xFC, 0x96,0x16,
-0xFF,0xB4, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16,
-0xFF,0xB4, 0x00,0x00, 0x00,0x01, 0x06,0x30, 0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00,
-0x1D,0xEC, 0x00,0x00, 0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x83,0x16, 0xFF,0xDC, 0x00,0x00,
-0x00,0x01, 0x96,0x1A, 0x00,0x00, 0xF3,0x02, 0x00,0x01, 0x93,0x16, 0xFF,0xD4, 0x83,0x16,
-0xFF,0xD4, 0x00,0x00, 0x00,0x01, 0x20,0x1A, 0x00,0x00, 0xE6,0x00, 0x1E,0x18, 0xF3,0x02,
-0x00,0x01, 0x93,0x16, 0xFF,0xE4, 0x83,0x16, 0xFF,0xE4, 0x00,0x00, 0x00,0x01, 0x20,0x1A,
-0x00,0x00, 0xE6,0x00, 0x1F,0x35, 0xF6,0x82, 0x0C,0xAB, 0xF7,0x04, 0x32,0xB4, 0x83,0x16,
-0xFF,0xD4, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x32,0xB4, 0xF7,0x04, 0x32,0xB4, 0x20,0x1A,
-0x00,0x00, 0xE6,0x00, 0x1E,0x70, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x32,0xC0, 0xF3,0x06,
-0xE0,0x30, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00, 0x1E,0x70, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x32,0xE8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x32,0xE8, 0xF7,0x04,
-0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x1E,0xAD, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0A, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x1E,0xAC, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x71,0xD4, 0xF6,0x84,
-0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00, 0x1E,0xC8, 0xF7,0x05,
-0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84, 0x71,0xD4, 0xF7,0x04, 0x71,0xD0, 0xF0,0x05,
-0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xF6,0x84, 0x32,0xD0, 0x00,0x00,
-0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x25,0xD9, 0xF7,0x05, 0x71,0xC8, 0xF7,0x04,
-0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x25,0x79, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x25,0x78, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x25,0x78, 0x00,0x00, 0x00,0x01, 0xE0,0x00, 0x25,0xDC, 0xF3,0x06,
-0x31,0x9C, 0xF0,0x05, 0x32,0xE8, 0xF7,0x04, 0x32,0xC0, 0xF6,0x04, 0x6F,0x54, 0x96,0xBA,
-0x00,0x04, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x1F,0x60, 0xF3,0x02, 0x00,0x0C, 0xF3,0x02,
-0x00,0x01, 0xF3,0x05, 0x6F,0x54, 0xE0,0x00, 0x1F,0x68, 0xF7,0x02, 0x00,0x01, 0xF3,0x05,
-0x6F,0x58, 0xF7,0x02, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x1F,0x7C, 0xF3,0x06,
-0x2F,0x6C, 0xE0,0x00, 0x26,0x8C, 0xF3,0x05, 0x32,0xD4, 0xF5,0x84, 0x7A,0x70, 0x24,0x94,
-0x00,0x10, 0x20,0x2E, 0x00,0x01, 0xE6,0x00, 0x22,0x84, 0xF5,0x85, 0x7A,0xA0, 0xF7,0x02,
-0x00,0x01, 0xF6,0x04, 0x32,0xC8, 0xF7,0x05, 0x7A,0x70, 0xF7,0x04, 0x32,0xC4, 0xF6,0x84,
-0x32,0xC0, 0xF6,0x05, 0x7A,0x2C, 0x90,0x02, 0xFF,0x80, 0x90,0x02, 0xFF,0x38, 0xF5,0x84,
-0x7A,0x28, 0x07,0x38, 0x00,0x24, 0x95,0x82, 0xFF,0x3C, 0x97,0x02, 0xFF,0x40, 0x96,0x02,
-0xFF,0x44, 0x87,0x36, 0x14,0x10, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x97,0x36,
-0x14,0x10, 0x87,0x36, 0x14,0x18, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x18, 0x87,0x36, 0x14,0x18, 0xF0,0x05, 0x6F,0x50, 0xF7,0x04, 0x32,0xB8, 0x95,0x96,
-0xFF,0xEC, 0xC7,0x38, 0x60,0x00, 0xF7,0x05, 0x32,0xB8, 0xF7,0x04, 0x32,0xBC, 0xF3,0x06,
-0x2F,0xF8, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x32,0xBC, 0xF7,0x04, 0x32,0xBC, 0xF3,0x05,
-0x32,0xD4, 0xF7,0x06, 0x0C,0x3E, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x20,0x34, 0x00,0x00,
-0x00,0x01, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x20,0x25, 0x00,0x00, 0x00,0x01, 0xF7,0x06,
-0x0C,0x3E, 0xC7,0x7C, 0x74,0x00, 0x20,0x3A, 0x00,0x10, 0xE6,0x00, 0x26,0x8C, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x32,0xE4, 0xFF,0x82, 0x00,0x10, 0xF5,0x84, 0x6F,0x58, 0x07,0x38,
-0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x20,0x90, 0xF7,0x05, 0x32,0xE4, 0xF7,0x04,
-0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x20,0x84, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xE0,0x00, 0x20,0x94, 0xF3,0x05, 0x6F,0x58, 0xF0,0x05,
-0x6F,0x54, 0xF5,0x84, 0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x90,0x2E, 0x00,0x04, 0x87,0x2E,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00, 0x21,0xC0, 0x00,0x00,
-0x00,0x01, 0x87,0x02, 0xFF,0x38, 0x03,0x2C, 0x0E,0xF4, 0x93,0x16, 0xFF,0xCC, 0xF7,0x05,
-0x7A,0x68, 0x93,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xB8, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x43,0xA0, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xB8, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x21,0x7C, 0x00,0x00, 0x00,0x01, 0x86,0x2E, 0x0E,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x32,
-0x00,0x10, 0xE2,0x00, 0x21,0x19, 0xF3,0x02, 0x00,0x4C, 0x87,0x2E, 0x0F,0x00, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E, 0x0F,0x00, 0x87,0x2E, 0x0F,0x00, 0xE0,0x00,
-0x21,0x7C, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0xF3,0x06, 0x7A,0x28, 0x93,0x13,
-0xFF,0xFC, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x04, 0xC7,0x38,
-0x6A,0x00, 0x83,0x16, 0xFF,0xCC, 0xC7,0x38, 0x60,0x00, 0xC7,0x38, 0x30,0x00, 0x07,0x38,
-0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xB8, 0x96,0x16, 0xFF,0xB4, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16, 0xFF,0xB4, 0x85,0x96,
-0xFF,0xB8, 0x06,0x30, 0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00, 0x21,0x78, 0x00,0x00,
-0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x96,0x2E, 0x0E,0xF8, 0xF7,0x04, 0x32,0xC0, 0xF3,0x06,
-0xE0,0x30, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00, 0x21,0xC0, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8, 0x00,0x1E, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00,
-0x21,0xC1, 0x00,0x00, 0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0xF7,0x04,
-0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x21,0xFD, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0A, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x21,0xFC, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x71,0xD4, 0xF6,0x84,
-0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00, 0x22,0x18, 0xF7,0x05,
-0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84, 0x71,0xD4, 0xF7,0x04, 0x71,0xD0, 0xF0,0x05,
-0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xF6,0x84, 0x32,0xD0, 0x00,0x00,
-0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x25,0xD9, 0xF7,0x05, 0x71,0xC8, 0xF7,0x04,
-0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x25,0x79, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x25,0x78, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x25,0x78, 0x00,0x00, 0x00,0x01, 0xE0,0x00, 0x25,0xDC, 0xF3,0x06,
-0x31,0x9C, 0xF0,0x05, 0x7A,0x88, 0x90,0x02, 0xFF,0x38, 0xF0,0x05, 0x6F,0x50, 0x90,0x02,
-0xFF,0x80, 0xF7,0x04, 0x32,0xC4, 0xF3,0x06, 0x32,0x28, 0xF3,0x05, 0x32,0xD4, 0xF6,0x04,
-0x32,0xC8, 0xF6,0x84, 0x7A,0x2C, 0xF5,0x02, 0x00,0x00, 0x07,0x38, 0x00,0x24, 0xF7,0x05,
-0x7A,0x98, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x22,0xD5, 0xF6,0x05, 0x7A,0x90, 0xC0,0x2A,
-0x5A,0x00, 0xE6,0x00, 0x26,0x20, 0xC0,0x32, 0x6A,0x00, 0xEE,0x00, 0x26,0x21, 0x00,0x00,
-0x00,0x01, 0xF6,0x84, 0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x14,0x10, 0x00,0x00,
-0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x97,0x36, 0x14,0x10, 0x87,0x36, 0x14,0x18, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x14,0x18, 0x87,0x36, 0x14,0x18, 0xF7,0x04,
-0x32,0xB8, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x60,0x00, 0xF7,0x05, 0x32,0xB8, 0xF7,0x04,
-0x32,0xBC, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x32,0xBC, 0xF7,0x04,
-0x32,0xBC, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x23,0x45, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x32,0xE0, 0xF5,0x05, 0x7A,0x70, 0x07,0x38, 0x00,0x01, 0xE0,0x00, 0x23,0x48, 0xF7,0x05,
-0x32,0xE0, 0xF5,0x05, 0x7A,0x70, 0xF5,0x84, 0x6F,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x2E,
-0x00,0x21, 0xE2,0x00, 0x23,0x8C, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x23,0x80, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02,
-0x00,0x22, 0xE0,0x00, 0x23,0x90, 0xF3,0x05, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF5,0x84,
-0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x90,0x2E, 0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00, 0x24,0xBC, 0x00,0x00, 0x00,0x01, 0x87,0x02,
-0xFF,0x38, 0x03,0x2C, 0x0E,0xF4, 0x93,0x16, 0xFF,0xC4, 0xF7,0x05, 0x7A,0x68, 0x93,0x13,
-0xFF,0xFC, 0x95,0x96, 0xFF,0xB8, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x43,0xA0, 0x97,0x93,
-0xFF,0xFC, 0x85,0x96, 0xFF,0xB8, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x24,0x78, 0x00,0x00,
-0x00,0x01, 0x86,0x2E, 0x0E,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00,
-0x24,0x15, 0xF3,0x02, 0x00,0x4C, 0x87,0x2E, 0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0x97,0x2E, 0x0F,0x00, 0x87,0x2E, 0x0F,0x00, 0xE0,0x00, 0x24,0x78, 0x00,0x00,
-0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0xF3,0x06, 0x7A,0x28, 0x93,0x13, 0xFF,0xFC, 0x76,0xB1,
-0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x83,0x16,
-0xFF,0xC4, 0xC7,0x38, 0x60,0x00, 0xC7,0x38, 0x30,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13,
-0xFF,0xFC, 0x95,0x96, 0xFF,0xB8, 0x96,0x16, 0xFF,0xB4, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16, 0xFF,0xB4, 0x85,0x96, 0xFF,0xB8, 0x06,0x30,
-0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00, 0x24,0x74, 0x00,0x00, 0x00,0x01, 0xF6,0x02,
-0x00,0x00, 0x96,0x2E, 0x0E,0xF8, 0xF7,0x04, 0x32,0xC0, 0xF3,0x06, 0xE0,0x30, 0xC0,0x3A,
-0x32,0x00, 0xE6,0x00, 0x24,0xBC, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0xE0,0x18, 0x00,0x00,
-0x00,0x01, 0x77,0xB8, 0x00,0x1E, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00, 0x24,0xBD, 0x00,0x00,
-0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x24,0xF9, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04,
-0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0xF3,0x02, 0x00,0x0A, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x24,0xF8, 0xB3,0x3A,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38,
-0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00, 0x25,0x14, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05,
-0x71,0xD4, 0xF6,0x84, 0x71,0xD4, 0xF7,0x04, 0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36,
-0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xF6,0x84, 0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xE6,0x00, 0x25,0xD9, 0xF7,0x05, 0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x25,0x79, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x25,0x78, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x25,0xD1, 0x00,0x00, 0x00,0x01, 0xF5,0x84, 0x76,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x2E,
-0x00,0x21, 0xE2,0x00, 0x25,0xC4, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x25,0xB0, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02,
-0x00,0x22, 0xF3,0x05, 0x76,0xF8, 0xF3,0x04, 0x77,0x00, 0xE0,0x00, 0x25,0xC8, 0xF3,0x05,
-0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0xE0,0x00, 0x25,0xD8, 0xF0,0x05, 0x7A,0x78, 0xE0,0x00,
-0x25,0xDC, 0xF3,0x06, 0x31,0x9C, 0xF3,0x06, 0x2E,0xE0, 0xF3,0x05, 0x32,0xD4, 0xF7,0x04,
-0x71,0xC8, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x26,0x8C, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x09, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x26,0x8C, 0xB3,0x3A, 0x68,0x02, 0xE0,0x00, 0x26,0x8C, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04,
-0x7A,0x90, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xEE,0x00, 0x26,0x41, 0xC5,0xB4,
-0x00,0x00, 0xC7,0x38, 0x5A,0x00, 0xE0,0x00, 0x26,0x48, 0xF7,0x05, 0x7A,0x90, 0xC5,0xB8,
-0x00,0x00, 0xF0,0x05, 0x7A,0x90, 0xF6,0x84, 0x7A,0x88, 0xF7,0x06, 0x7A,0x28, 0x76,0x35,
-0x00,0x03, 0xA7,0x32, 0x70,0x02, 0x06,0xB4, 0x00,0x01, 0x97,0x16, 0xFF,0xEC, 0x84,0xA6,
-0xFF,0xFC, 0xF7,0x06, 0x7A,0x2C, 0xF3,0x04, 0x7A,0x98, 0x94,0x82, 0xFF,0x3C, 0x93,0x02,
-0xFF,0x40, 0x95,0x82, 0xFF,0x44, 0xB5,0xB2, 0x70,0x02, 0xF7,0x04, 0x7A,0x98, 0xF6,0x85,
-0x7A,0x88, 0xC7,0x38, 0x58,0x00, 0xF7,0x05, 0x7A,0x98, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x02, 0x00,0x01, 0xF7,0x05, 0x7A,0x78, 0xF7,0x06,
-0x30,0x84, 0xF7,0x05, 0x32,0xD4, 0xF7,0x04, 0x32,0xC4, 0x00,0x00, 0x00,0x01, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x06,0x10, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x50, 0xF7,0x04,
-0x32,0xD0, 0xF3,0x02, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x2A,0x71, 0x93,0x16,
-0xFF,0xE4, 0xF6,0x84, 0x32,0xC4, 0x86,0x16, 0xFF,0xE4, 0x87,0x36, 0x00,0x08, 0xC3,0x04,
-0x00,0x00, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00, 0x27,0x3C, 0x20,0x32, 0x00,0x00, 0x87,0x36,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00, 0x27,0x3C, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x2A,0x70, 0xF3,0x02,
-0x00,0x00, 0xF7,0x04, 0x32,0xC0, 0x93,0x16, 0xFF,0xAC, 0xF5,0x84, 0x32,0xC4, 0x86,0x3A,
-0x14,0x28, 0x03,0xB8, 0x14,0x20, 0x04,0x2C, 0x00,0x08, 0x86,0xBA, 0x14,0x24, 0x00,0x00,
-0x00,0x01, 0xC0,0x32, 0x6A,0x00, 0xEC,0x00, 0x28,0x28, 0x96,0x16, 0xFF,0xEC, 0x77,0x31,
-0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x77,0x39, 0x00,0x02, 0xC6,0x38, 0x38,0x00, 0x06,0x30,
-0x00,0x0C, 0x86,0xB2, 0x00,0x00, 0x87,0x2E, 0x00,0x08, 0x85,0x16, 0xFF,0xAC, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x27,0xB8, 0xC4,0x84, 0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x2E,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x27,0xBC, 0x20,0x2A,
-0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0x27,0xC9, 0x00,0x00,
-0x00,0x01, 0xF4,0x82, 0x00,0x00, 0x86,0xB2, 0x00,0x00, 0x87,0x22, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x28,0x04, 0xF5,0x82, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x28,0x0C, 0x20,0x2E, 0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x22,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x28,0x0D, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x28,0x1D, 0x20,0x26,
-0x00,0x00, 0xF4,0x82, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00, 0x28,0x28, 0xF3,0x02,
-0x00,0x01, 0x93,0x16, 0xFF,0xAC, 0x83,0x16, 0xFF,0xAC, 0x00,0x00, 0x00,0x01, 0x20,0x1A,
-0x00,0x00, 0xE6,0x00, 0x28,0x69, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xEC, 0x00,0x00,
-0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4,
-0x38,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xE0,0x00,
-0x28,0xD0, 0x96,0x96, 0xFF,0xF4, 0x27,0x14, 0x00,0x14, 0x97,0x13, 0xFF,0xFC, 0x94,0x13,
-0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0x93,0x96, 0xFF,0xBC, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0xBC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x28,0xCD, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x76,0xB9,
-0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x38,0x00, 0x06,0xB4,
-0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0x96,0x96, 0xFF,0xF4, 0x97,0x1E,
-0x00,0x08, 0xE0,0x00, 0x28,0xD4, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0x2A,0x70, 0xF3,0x02, 0x00,0x00, 0xF6,0x04, 0x32,0xC0, 0x93,0x16,
-0xFF,0xAC, 0x86,0xB2, 0x14,0x28, 0x03,0xB0, 0x14,0x20, 0x04,0x30, 0x14,0x8C, 0x87,0x32,
-0x14,0x24, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x00, 0x29,0xBC, 0x96,0x96,
-0xFF,0xEC, 0x77,0x35, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xC5,0xB8,
-0x38,0x00, 0x05,0xAC, 0x00,0x0C, 0x86,0xAE, 0x00,0x00, 0x87,0x32, 0x14,0x8C, 0x85,0x16,
-0xFF,0xAC, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x29,0x4C, 0xC4,0x84, 0x00,0x00, 0x86,0xAE,
-0x00,0x04, 0x87,0x32, 0x14,0x90, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x29,0x50, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00,
-0x29,0x5D, 0x00,0x00, 0x00,0x01, 0xF4,0x82, 0x00,0x00, 0x86,0xAE, 0x00,0x00, 0x87,0x22,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x29,0x98, 0xF6,0x02,
-0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x29,0xA0, 0x20,0x32, 0x00,0x00, 0x86,0xAE,
-0x00,0x04, 0x87,0x22, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0x29,0xA1, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x29,0xB1, 0x20,0x26, 0x00,0x00, 0xF4,0x82, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00,
-0x29,0xBC, 0xF3,0x02, 0x00,0x01, 0x93,0x16, 0xFF,0xAC, 0x83,0x16, 0xFF,0xAC, 0x00,0x00,
-0x00,0x01, 0x20,0x1A, 0x00,0x00, 0xE6,0x00, 0x29,0xFD, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x38,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xF0, 0xE0,0x00, 0x2A,0x64, 0x96,0x96, 0xFF,0xF4, 0x27,0x14, 0x00,0x14, 0x97,0x13,
-0xFF,0xFC, 0x94,0x13, 0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0x93,0x96, 0xFF,0xBC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0xBC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x2A,0x61, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xEC, 0x00,0x00,
-0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4,
-0x38,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0x96,0x96,
-0xFF,0xF4, 0x97,0x1E, 0x00,0x08, 0xE0,0x00, 0x2A,0x68, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x2B,0xCD, 0xF3,0x02, 0x00,0x01, 0xF6,0x84,
-0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x85,0xB6, 0x0E,0xF4, 0x86,0x36, 0x0E,0xF8, 0x20,0x2E,
-0x00,0x10, 0xE2,0x00, 0x2A,0x94, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x2A,0xB1, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x0F,0x00, 0x87,0x36, 0x0F,0x00, 0xE0,0x00, 0x2A,0xDC, 0xF7,0x02, 0x00,0x00, 0x07,0x30,
-0x00,0x01, 0xC0,0x3A, 0x5A,0x00, 0xE6,0x00, 0x2A,0xD5, 0xF6,0x82, 0x00,0x00, 0x20,0x32,
-0x00,0x10, 0xE6,0x00, 0x2A,0xD8, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x2A,0xDC, 0xC7,0x34,
-0x00,0x00, 0xF6,0x82, 0x00,0x01, 0xC7,0x34, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x2B,0xCC, 0xF3,0x02, 0x00,0x01, 0xF3,0x04, 0x32,0xCC, 0x00,0x00, 0x00,0x01, 0x93,0x16,
-0xFF,0xDC, 0x93,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x43,0x68, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x2B,0xB4, 0xF3,0x02, 0x00,0x00, 0x83,0x16,
-0xFF,0xDC, 0x00,0x00, 0x00,0x01, 0x86,0x1A, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x32,
-0x00,0x10, 0xE2,0x00, 0x2B,0x49, 0x76,0xB1, 0x00,0x02, 0x87,0x1A, 0x00,0x0C, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x1A, 0x00,0x0C, 0x87,0x1A, 0x00,0x0C, 0xE0,0x00,
-0x2B,0xB4, 0xF3,0x02, 0x00,0x00, 0xF3,0x02, 0x00,0x4C, 0x93,0x13, 0xFF,0xFC, 0xC6,0xB4,
-0x60,0x00, 0x77,0x35, 0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x83,0x16, 0xFF,0xDC, 0xC7,0x38,
-0x60,0x00, 0xC7,0x38, 0x30,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0xF3,0x06,
-0x7A,0x28, 0x93,0x13, 0xFF,0xFC, 0x96,0x16, 0xFF,0xB4, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16, 0xFF,0xB4, 0x00,0x00, 0x00,0x01, 0x06,0x30,
-0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00, 0x2B,0xA4, 0x00,0x00, 0x00,0x01, 0xF6,0x02,
-0x00,0x00, 0x83,0x16, 0xFF,0xDC, 0x00,0x00, 0x00,0x01, 0x96,0x1A, 0x00,0x00, 0xF3,0x02,
-0x00,0x01, 0x93,0x16, 0xFF,0xD4, 0x83,0x16, 0xFF,0xD4, 0x00,0x00, 0x00,0x01, 0x20,0x1A,
-0x00,0x00, 0xE6,0x00, 0x2B,0xD0, 0xF3,0x02, 0x00,0x01, 0x93,0x16, 0xFF,0xE4, 0x83,0x16,
-0xFF,0xE4, 0x00,0x00, 0x00,0x01, 0x20,0x1A, 0x00,0x00, 0xE6,0x00, 0x2C,0xED, 0xF6,0x82,
-0x0C,0xAB, 0xF7,0x04, 0x32,0xB4, 0x83,0x16, 0xFF,0xD4, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x32,0xB4, 0xF7,0x04, 0x32,0xB4, 0x20,0x1A, 0x00,0x00, 0xE6,0x00, 0x2C,0x28, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x32,0xC0, 0xF3,0x06, 0xE0,0x30, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00,
-0x2C,0x28, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x32,0xE8, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x32,0xE8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x2C,0x65, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02,
-0x00,0x0A, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x2C,0x64, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF7,0x04, 0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0xE6,0x00, 0x2C,0x80, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84,
-0x71,0xD4, 0xF7,0x04, 0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C,
-0x00,0x01, 0xF6,0x84, 0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00,
-0x33,0x91, 0xF7,0x05, 0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x33,0x31, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x33,0x30, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x33,0x30, 0x00,0x00,
-0x00,0x01, 0xE0,0x00, 0x33,0x94, 0xF3,0x06, 0x31,0x9C, 0xF0,0x05, 0x32,0xE8, 0xF7,0x04,
-0x32,0xC0, 0xF6,0x04, 0x6F,0x54, 0x96,0xBA, 0x00,0x04, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x2D,0x18, 0xF3,0x02, 0x00,0x0C, 0xF3,0x02, 0x00,0x01, 0xF3,0x05, 0x6F,0x54, 0xE0,0x00,
-0x2D,0x20, 0xF7,0x02, 0x00,0x01, 0xF3,0x05, 0x6F,0x58, 0xF7,0x02, 0x00,0x00, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x2D,0x34, 0xF3,0x06, 0x2F,0x6C, 0xE0,0x00, 0x34,0x44, 0xF3,0x05,
-0x32,0xD4, 0xF5,0x84, 0x7A,0x70, 0x24,0x94, 0x00,0x10, 0x20,0x2E, 0x00,0x01, 0xE6,0x00,
-0x30,0x3C, 0xF5,0x85, 0x7A,0xA0, 0xF7,0x02, 0x00,0x01, 0xF6,0x04, 0x32,0xC8, 0xF7,0x05,
-0x7A,0x70, 0xF7,0x04, 0x32,0xC4, 0xF6,0x84, 0x32,0xC0, 0xF6,0x05, 0x7A,0x2C, 0x90,0x02,
-0xFF,0x80, 0x90,0x02, 0xFF,0x38, 0xF5,0x84, 0x7A,0x28, 0x07,0x38, 0x00,0x24, 0x95,0x82,
-0xFF,0x3C, 0x97,0x02, 0xFF,0x40, 0x96,0x02, 0xFF,0x44, 0x87,0x36, 0x14,0x10, 0x00,0x00,
-0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x97,0x36, 0x14,0x10, 0x87,0x36, 0x14,0x18, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x14,0x18, 0x87,0x36, 0x14,0x18, 0xF0,0x05,
-0x6F,0x50, 0xF7,0x04, 0x32,0xB8, 0x95,0x96, 0xFF,0xEC, 0xC7,0x38, 0x60,0x00, 0xF7,0x05,
-0x32,0xB8, 0xF7,0x04, 0x32,0xBC, 0xF3,0x06, 0x2F,0xF8, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x32,0xBC, 0xF7,0x04, 0x32,0xBC, 0xF3,0x05, 0x32,0xD4, 0xF7,0x06, 0x0C,0x3E, 0xC0,0x7E,
-0x74,0x00, 0xE6,0x00, 0x2D,0xEC, 0x00,0x00, 0x00,0x01, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00,
-0x2D,0xDD, 0x00,0x00, 0x00,0x01, 0xF7,0x06, 0x0C,0x3E, 0xC7,0x7C, 0x74,0x00, 0x20,0x3A,
-0x00,0x10, 0xE6,0x00, 0x34,0x44, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x32,0xE4, 0xFF,0x82,
-0x00,0x10, 0xF5,0x84, 0x6F,0x58, 0x07,0x38, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00,
-0x2E,0x48, 0xF7,0x05, 0x32,0xE4, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x2E,0x3C, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xE0,0x00,
-0x2E,0x4C, 0xF3,0x05, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF5,0x84, 0x32,0xC0, 0x00,0x00,
-0x00,0x01, 0x90,0x2E, 0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x02, 0xE6,0x00, 0x2F,0x78, 0x00,0x00, 0x00,0x01, 0x87,0x02, 0xFF,0x38, 0x03,0x2C,
-0x0E,0xF4, 0x93,0x16, 0xFF,0xCC, 0xF7,0x05, 0x7A,0x68, 0x93,0x13, 0xFF,0xFC, 0x95,0x96,
-0xFF,0xB8, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x43,0xA0, 0x97,0x93, 0xFF,0xFC, 0x85,0x96,
-0xFF,0xB8, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x2F,0x34, 0x00,0x00, 0x00,0x01, 0x86,0x2E,
-0x0E,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x2E,0xD1, 0xF3,0x02,
-0x00,0x4C, 0x87,0x2E, 0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E,
-0x0F,0x00, 0x87,0x2E, 0x0F,0x00, 0xE0,0x00, 0x2F,0x34, 0x00,0x00, 0x00,0x01, 0x93,0x13,
-0xFF,0xFC, 0xF3,0x06, 0x7A,0x28, 0x93,0x13, 0xFF,0xFC, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4,
-0x60,0x00, 0x77,0x35, 0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x83,0x16, 0xFF,0xCC, 0xC7,0x38,
-0x60,0x00, 0xC7,0x38, 0x30,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0x95,0x96,
-0xFF,0xB8, 0x96,0x16, 0xFF,0xB4, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93,
-0xFF,0xFC, 0x86,0x16, 0xFF,0xB4, 0x85,0x96, 0xFF,0xB8, 0x06,0x30, 0x00,0x01, 0x20,0x32,
-0x00,0x11, 0xE6,0x00, 0x2F,0x30, 0x00,0x00, 0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x96,0x2E,
-0x0E,0xF8, 0xF7,0x04, 0x32,0xC0, 0xF3,0x06, 0xE0,0x30, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00,
-0x2F,0x78, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8,
-0x00,0x1E, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00, 0x2F,0x79, 0x00,0x00, 0x00,0x01, 0x0F,0x81,
-0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x2F,0xB5, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02,
-0x00,0x0A, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x2F,0xB4, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF7,0x04, 0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0xE6,0x00, 0x2F,0xD0, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84,
-0x71,0xD4, 0xF7,0x04, 0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C,
-0x00,0x01, 0xF6,0x84, 0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00,
-0x33,0x91, 0xF7,0x05, 0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x33,0x31, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x33,0x30, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x33,0x30, 0x00,0x00,
-0x00,0x01, 0xE0,0x00, 0x33,0x94, 0xF3,0x06, 0x31,0x9C, 0xF0,0x05, 0x7A,0x88, 0x90,0x02,
-0xFF,0x38, 0xF0,0x05, 0x6F,0x50, 0x90,0x02, 0xFF,0x80, 0xF7,0x04, 0x32,0xC4, 0xF3,0x06,
-0x32,0x28, 0xF3,0x05, 0x32,0xD4, 0xF6,0x04, 0x32,0xC8, 0xF6,0x84, 0x7A,0x2C, 0xF5,0x02,
-0x00,0x00, 0x07,0x38, 0x00,0x24, 0xF7,0x05, 0x7A,0x98, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x30,0x8D, 0xF6,0x05, 0x7A,0x90, 0xC0,0x2A, 0x5A,0x00, 0xE6,0x00, 0x33,0xD8, 0xC0,0x32,
-0x6A,0x00, 0xEE,0x00, 0x33,0xD9, 0x00,0x00, 0x00,0x01, 0xF6,0x84, 0x32,0xC0, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x14,0x10, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x97,0x36,
-0x14,0x10, 0x87,0x36, 0x14,0x18, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x18, 0x87,0x36, 0x14,0x18, 0xF7,0x04, 0x32,0xB8, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x60,0x00, 0xF7,0x05, 0x32,0xB8, 0xF7,0x04, 0x32,0xBC, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x32,0xBC, 0xF7,0x04, 0x32,0xBC, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x30,0xFD, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x32,0xE0, 0xF5,0x05, 0x7A,0x70, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0x31,0x00, 0xF7,0x05, 0x32,0xE0, 0xF5,0x05, 0x7A,0x70, 0xF5,0x84,
-0x6F,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x31,0x44, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x31,0x38, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xE0,0x00, 0x31,0x48, 0xF3,0x05,
-0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF5,0x84, 0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x90,0x2E,
-0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00,
-0x32,0x74, 0x00,0x00, 0x00,0x01, 0x87,0x02, 0xFF,0x38, 0x03,0x2C, 0x0E,0xF4, 0x93,0x16,
-0xFF,0xC4, 0xF7,0x05, 0x7A,0x68, 0x93,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xB8, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x43,0xA0, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xB8, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x32,0x30, 0x00,0x00, 0x00,0x01, 0x86,0x2E, 0x0E,0xF8, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x31,0xCD, 0xF3,0x02, 0x00,0x4C, 0x87,0x2E,
-0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E, 0x0F,0x00, 0x87,0x2E,
-0x0F,0x00, 0xE0,0x00, 0x32,0x30, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0xF3,0x06,
-0x7A,0x28, 0x93,0x13, 0xFF,0xFC, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35,
-0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x83,0x16, 0xFF,0xC4, 0xC7,0x38, 0x60,0x00, 0xC7,0x38,
-0x30,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xB8, 0x96,0x16,
-0xFF,0xB4, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16,
-0xFF,0xB4, 0x85,0x96, 0xFF,0xB8, 0x06,0x30, 0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00,
-0x32,0x2C, 0x00,0x00, 0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x96,0x2E, 0x0E,0xF8, 0xF7,0x04,
-0x32,0xC0, 0xF3,0x06, 0xE0,0x30, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00, 0x32,0x74, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8, 0x00,0x1E, 0x70,0x3E,
-0xFF,0xE1, 0xE6,0x00, 0x32,0x75, 0x00,0x00, 0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04,
-0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04,
-0x79,0xC8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x32,0xB1, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0A, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x32,0xB0, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04,
-0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x32,0xCC, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84, 0x71,0xD4, 0xF7,0x04,
-0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xF6,0x84,
-0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x33,0x91, 0xF7,0x05,
-0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x33,0x31, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x33,0x30, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x33,0x89, 0x00,0x00, 0x00,0x01, 0xF5,0x84,
-0x76,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x33,0x7C, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x33,0x68, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xF3,0x05, 0x76,0xF8, 0xF3,0x04,
-0x77,0x00, 0xE0,0x00, 0x33,0x80, 0xF3,0x05, 0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0xE0,0x00,
-0x33,0x90, 0xF0,0x05, 0x7A,0x78, 0xE0,0x00, 0x33,0x94, 0xF3,0x06, 0x31,0x9C, 0xF3,0x06,
-0x2E,0xE0, 0xF3,0x05, 0x32,0xD4, 0xF7,0x04, 0x71,0xC8, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x34,0x44, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02,
-0x00,0x09, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x34,0x44, 0xB3,0x3A, 0x68,0x02, 0xE0,0x00,
-0x34,0x44, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x7A,0x90, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0xEE,0x00, 0x33,0xF9, 0xC5,0xB4, 0x00,0x00, 0xC7,0x38, 0x5A,0x00, 0xE0,0x00,
-0x34,0x00, 0xF7,0x05, 0x7A,0x90, 0xC5,0xB8, 0x00,0x00, 0xF0,0x05, 0x7A,0x90, 0xF6,0x84,
-0x7A,0x88, 0xF7,0x06, 0x7A,0x28, 0x76,0x35, 0x00,0x03, 0xA7,0x32, 0x70,0x02, 0x06,0xB4,
-0x00,0x01, 0x97,0x16, 0xFF,0xEC, 0x84,0xA6, 0xFF,0xFC, 0xF7,0x06, 0x7A,0x2C, 0xF3,0x04,
-0x7A,0x98, 0x94,0x82, 0xFF,0x3C, 0x93,0x02, 0xFF,0x40, 0x95,0x82, 0xFF,0x44, 0xB5,0xB2,
-0x70,0x02, 0xF7,0x04, 0x7A,0x98, 0xF6,0x85, 0x7A,0x88, 0xC7,0x38, 0x58,0x00, 0xF7,0x05,
-0x7A,0x98, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x20, 0xF5,0x84, 0x7A,0x70, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x01, 0xE6,0x00,
-0x37,0x6C, 0xF5,0x85, 0x7A,0xA0, 0xF7,0x02, 0x00,0x01, 0xF6,0x04, 0x32,0xC8, 0xF7,0x05,
-0x7A,0x70, 0xF7,0x04, 0x32,0xC4, 0xF6,0x84, 0x32,0xC0, 0xF6,0x05, 0x7A,0x2C, 0x90,0x02,
-0xFF,0x80, 0x90,0x02, 0xFF,0x38, 0xF5,0x84, 0x7A,0x28, 0x07,0x38, 0x00,0x24, 0x95,0x82,
-0xFF,0x3C, 0x97,0x02, 0xFF,0x40, 0x96,0x02, 0xFF,0x44, 0x87,0x36, 0x14,0x10, 0x00,0x00,
-0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x97,0x36, 0x14,0x10, 0x87,0x36, 0x14,0x18, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x14,0x18, 0x87,0x36, 0x14,0x18, 0xF0,0x05,
-0x6F,0x50, 0xF7,0x04, 0x32,0xB8, 0x95,0x96, 0xFF,0xF4, 0xC7,0x38, 0x60,0x00, 0xF7,0x05,
-0x32,0xB8, 0xF7,0x04, 0x32,0xBC, 0xF4,0x86, 0x2F,0xF8, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x32,0xBC, 0xF7,0x04, 0x32,0xBC, 0xF4,0x85, 0x32,0xD4, 0xF7,0x06, 0x0C,0x3E, 0xC0,0x7E,
-0x74,0x00, 0xE6,0x00, 0x35,0x1C, 0x00,0x00, 0x00,0x01, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00,
-0x35,0x0D, 0x00,0x00, 0x00,0x01, 0xF7,0x06, 0x0C,0x3E, 0xC7,0x7C, 0x74,0x00, 0x20,0x3A,
-0x00,0x10, 0xE6,0x00, 0x3B,0x70, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x32,0xE4, 0xFF,0x82,
-0x00,0x10, 0xF5,0x84, 0x6F,0x58, 0x07,0x38, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00,
-0x35,0x78, 0xF7,0x05, 0x32,0xE4, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x35,0x6C, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xE0,0x00,
-0x35,0x7C, 0xF4,0x85, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF5,0x84, 0x32,0xC0, 0x00,0x00,
-0x00,0x01, 0x90,0x2E, 0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x02, 0xE6,0x00, 0x36,0xA8, 0x00,0x00, 0x00,0x01, 0x87,0x02, 0xFF,0x38, 0x04,0xAC,
-0x0E,0xF4, 0x94,0x96, 0xFF,0xEC, 0xF7,0x05, 0x7A,0x68, 0x94,0x93, 0xFF,0xFC, 0x95,0x96,
-0xFF,0xDC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x43,0xA0, 0x97,0x93, 0xFF,0xFC, 0x85,0x96,
-0xFF,0xDC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x36,0x64, 0x00,0x00, 0x00,0x01, 0x86,0x2E,
-0x0E,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x36,0x01, 0xF4,0x82,
-0x00,0x4C, 0x87,0x2E, 0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E,
-0x0F,0x00, 0x87,0x2E, 0x0F,0x00, 0xE0,0x00, 0x36,0x64, 0x00,0x00, 0x00,0x01, 0x94,0x93,
-0xFF,0xFC, 0xF4,0x86, 0x7A,0x28, 0x94,0x93, 0xFF,0xFC, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4,
-0x60,0x00, 0x77,0x35, 0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x84,0x96, 0xFF,0xEC, 0xC7,0x38,
-0x60,0x00, 0xC7,0x38, 0x48,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0x95,0x96,
-0xFF,0xDC, 0x96,0x16, 0xFF,0xD8, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93,
-0xFF,0xFC, 0x86,0x16, 0xFF,0xD8, 0x85,0x96, 0xFF,0xDC, 0x06,0x30, 0x00,0x01, 0x20,0x32,
-0x00,0x11, 0xE6,0x00, 0x36,0x60, 0x00,0x00, 0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x96,0x2E,
-0x0E,0xF8, 0xF7,0x04, 0x32,0xC0, 0xF4,0x86, 0xE0,0x30, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00,
-0x36,0xA8, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8,
-0x00,0x1E, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00, 0x36,0xA9, 0x00,0x00, 0x00,0x01, 0x0F,0x81,
-0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x36,0xE5, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82,
-0x00,0x0A, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x36,0xE4, 0xB4,0xBA, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF7,0x04, 0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0xE6,0x00, 0x37,0x00, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84,
-0x71,0xD4, 0xF7,0x04, 0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C,
-0x00,0x01, 0xF6,0x84, 0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00,
-0x3A,0xC1, 0xF7,0x05, 0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x3A,0x61, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x3A,0x60, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x3A,0x60, 0x00,0x00,
-0x00,0x01, 0xE0,0x00, 0x3A,0xC4, 0xF4,0x86, 0x31,0x9C, 0xF0,0x05, 0x7A,0x88, 0x90,0x02,
-0xFF,0x38, 0xF0,0x05, 0x6F,0x50, 0x90,0x02, 0xFF,0x80, 0xF7,0x04, 0x32,0xC4, 0xF4,0x86,
-0x32,0x28, 0xF4,0x85, 0x32,0xD4, 0xF6,0x04, 0x32,0xC8, 0xF6,0x84, 0x7A,0x2C, 0xF5,0x02,
-0x00,0x00, 0x07,0x38, 0x00,0x24, 0xF7,0x05, 0x7A,0x98, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x37,0xBD, 0xF6,0x05, 0x7A,0x90, 0xC0,0x2A, 0x5A,0x00, 0xE6,0x00, 0x3B,0x08, 0xC0,0x32,
-0x6A,0x00, 0xEE,0x00, 0x3B,0x09, 0x00,0x00, 0x00,0x01, 0xF6,0x84, 0x32,0xC0, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x14,0x10, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x97,0x36,
-0x14,0x10, 0x87,0x36, 0x14,0x18, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x18, 0x87,0x36, 0x14,0x18, 0xF7,0x04, 0x32,0xB8, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x60,0x00, 0xF7,0x05, 0x32,0xB8, 0xF7,0x04, 0x32,0xBC, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x32,0xBC, 0xF7,0x04, 0x32,0xBC, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x38,0x2D, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x32,0xE0, 0xF5,0x05, 0x7A,0x70, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0x38,0x30, 0xF7,0x05, 0x32,0xE0, 0xF5,0x05, 0x7A,0x70, 0xF5,0x84,
-0x6F,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x38,0x74, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x38,0x68, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xE0,0x00, 0x38,0x78, 0xF4,0x85,
-0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF5,0x84, 0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x90,0x2E,
-0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00,
-0x39,0xA4, 0x00,0x00, 0x00,0x01, 0x87,0x02, 0xFF,0x38, 0x04,0xAC, 0x0E,0xF4, 0x94,0x96,
-0xFF,0xE4, 0xF7,0x05, 0x7A,0x68, 0x94,0x93, 0xFF,0xFC, 0x95,0x96, 0xFF,0xDC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x43,0xA0, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xDC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x39,0x60, 0x00,0x00, 0x00,0x01, 0x86,0x2E, 0x0E,0xF8, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x38,0xFD, 0xF4,0x82, 0x00,0x4C, 0x87,0x2E,
-0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E, 0x0F,0x00, 0x87,0x2E,
-0x0F,0x00, 0xE0,0x00, 0x39,0x60, 0x00,0x00, 0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0xF4,0x86,
-0x7A,0x28, 0x94,0x93, 0xFF,0xFC, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35,
-0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x84,0x96, 0xFF,0xE4, 0xC7,0x38, 0x60,0x00, 0xC7,0x38,
-0x48,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xDC, 0x96,0x16,
-0xFF,0xD8, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16,
-0xFF,0xD8, 0x85,0x96, 0xFF,0xDC, 0x06,0x30, 0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00,
-0x39,0x5C, 0x00,0x00, 0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x96,0x2E, 0x0E,0xF8, 0xF7,0x04,
-0x32,0xC0, 0xF4,0x86, 0xE0,0x30, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00, 0x39,0xA4, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8, 0x00,0x1E, 0x70,0x3E,
-0xFF,0xE1, 0xE6,0x00, 0x39,0xA5, 0x00,0x00, 0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04,
-0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04,
-0x79,0xC8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x39,0xE1, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82, 0x00,0x0A, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x39,0xE0, 0xB4,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04,
-0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x39,0xFC, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84, 0x71,0xD4, 0xF7,0x04,
-0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xF6,0x84,
-0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x3A,0xC1, 0xF7,0x05,
-0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x3A,0x61, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x3A,0x60, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x3A,0xB9, 0x00,0x00, 0x00,0x01, 0xF5,0x84,
-0x76,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x3A,0xAC, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x3A,0x98, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xF4,0x85, 0x76,0xF8, 0xF4,0x84,
-0x77,0x00, 0xE0,0x00, 0x3A,0xB0, 0xF4,0x85, 0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0xE0,0x00,
-0x3A,0xC0, 0xF0,0x05, 0x7A,0x78, 0xE0,0x00, 0x3A,0xC4, 0xF4,0x86, 0x31,0x9C, 0xF4,0x86,
-0x2E,0xE0, 0xF4,0x85, 0x32,0xD4, 0xF7,0x04, 0x71,0xC8, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x3B,0x70, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82,
-0x00,0x09, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x3B,0x70, 0xB4,0xBA, 0x68,0x02, 0xE0,0x00,
-0x3B,0x70, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x7A,0x90, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0xEE,0x00, 0x3B,0x29, 0xC5,0xB4, 0x00,0x00, 0xC7,0x38, 0x5A,0x00, 0xE0,0x00,
-0x3B,0x30, 0xF7,0x05, 0x7A,0x90, 0xC5,0xB8, 0x00,0x00, 0xF0,0x05, 0x7A,0x90, 0xF7,0x04,
-0x7A,0x88, 0xF6,0x86, 0x7A,0x28, 0x76,0x39, 0x00,0x03, 0xA6,0xB2, 0x68,0x02, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x7A,0x88, 0xF7,0x04, 0x7A,0x98, 0x96,0x96, 0xFF,0xF4, 0x96,0x82,
-0xFF,0x3C, 0xF4,0x84, 0x7A,0x98, 0xF6,0x86, 0x7A,0x2C, 0xC7,0x38, 0x58,0x00, 0x94,0x82,
-0xFF,0x40, 0x95,0x82, 0xFF,0x44, 0xB5,0xB2, 0x68,0x02, 0xF7,0x05, 0x7A,0x98, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x18, 0xF5,0x04,
-0x7A,0x88, 0xF7,0x06, 0x7A,0x2C, 0xF5,0x84, 0x7A,0x90, 0x76,0xA9, 0x00,0x03, 0xA6,0xB6,
-0x70,0x02, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x3B,0xCD, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x7A,0xA0, 0x00,0x00, 0x00,0x01, 0xC0,0x2A, 0x72,0x00, 0xE6,0x00, 0x3F,0x18, 0xC0,0x2E,
-0x6A,0x00, 0xEE,0x00, 0x3F,0x19, 0x00,0x00, 0x00,0x01, 0xF6,0x84, 0x32,0xC0, 0xF6,0x04,
-0x32,0xC8, 0x87,0x36, 0x14,0x10, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x97,0x36,
-0x14,0x10, 0x87,0x36, 0x14,0x18, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x18, 0x87,0x36, 0x14,0x18, 0xF7,0x04, 0x32,0xB8, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x60,0x00, 0xF7,0x05, 0x32,0xB8, 0xF7,0x04, 0x32,0xBC, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x32,0xBC, 0xF7,0x04, 0x32,0xBC, 0x20,0x2E, 0x00,0x00, 0xE6,0x00,
-0x3C,0x3D, 0xF6,0x82, 0x00,0x00, 0xF7,0x04, 0x32,0xE0, 0xF6,0x85, 0x7A,0x70, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0x3C,0x40, 0xF7,0x05, 0x32,0xE0, 0xF5,0x05, 0x7A,0x70, 0xF5,0x84,
-0x6F,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x3C,0x84, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x3C,0x78, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xE0,0x00, 0x3C,0x88, 0xF4,0x85,
-0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF5,0x84, 0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x90,0x2E,
-0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00,
-0x3D,0xB4, 0x00,0x00, 0x00,0x01, 0x87,0x02, 0xFF,0x38, 0x04,0xAC, 0x0E,0xF4, 0x94,0x96,
-0xFF,0xEC, 0xF7,0x05, 0x7A,0x68, 0x94,0x93, 0xFF,0xFC, 0x95,0x96, 0xFF,0xE4, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x43,0xA0, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xE4, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x3D,0x70, 0x00,0x00, 0x00,0x01, 0x86,0x2E, 0x0E,0xF8, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x3D,0x0D, 0xF4,0x82, 0x00,0x4C, 0x87,0x2E,
-0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E, 0x0F,0x00, 0x87,0x2E,
-0x0F,0x00, 0xE0,0x00, 0x3D,0x70, 0x00,0x00, 0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0xF4,0x86,
-0x7A,0x28, 0x94,0x93, 0xFF,0xFC, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35,
-0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x84,0x96, 0xFF,0xEC, 0xC7,0x38, 0x60,0x00, 0xC7,0x38,
-0x48,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xE4, 0x96,0x16,
-0xFF,0xE0, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16,
-0xFF,0xE0, 0x85,0x96, 0xFF,0xE4, 0x06,0x30, 0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00,
-0x3D,0x6C, 0x00,0x00, 0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x96,0x2E, 0x0E,0xF8, 0xF7,0x04,
-0x32,0xC0, 0xF4,0x86, 0xE0,0x30, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00, 0x3D,0xB4, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8, 0x00,0x1E, 0x70,0x3E,
-0xFF,0xE1, 0xE6,0x00, 0x3D,0xB5, 0x00,0x00, 0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04,
-0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04,
-0x79,0xC8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x3D,0xF1, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82, 0x00,0x0A, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x3D,0xF0, 0xB4,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04,
-0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x3E,0x0C, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84, 0x71,0xD4, 0xF7,0x04,
-0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xF6,0x84,
-0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x3E,0xD1, 0xF7,0x05,
-0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x3E,0x71, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x3E,0x70, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x3E,0xC9, 0x00,0x00, 0x00,0x01, 0xF5,0x84,
-0x76,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x3E,0xBC, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x3E,0xA8, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xF4,0x85, 0x76,0xF8, 0xF4,0x84,
-0x77,0x00, 0xE0,0x00, 0x3E,0xC0, 0xF4,0x85, 0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0xE0,0x00,
-0x3E,0xD0, 0xF0,0x05, 0x7A,0x78, 0xE0,0x00, 0x3E,0xD4, 0xF4,0x86, 0x31,0x9C, 0xF4,0x86,
-0x2E,0xE0, 0xF4,0x85, 0x32,0xD4, 0xF7,0x04, 0x71,0xC8, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x3F,0x80, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82,
-0x00,0x09, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x3F,0x80, 0xB4,0xBA, 0x68,0x02, 0xE0,0x00,
-0x3F,0x80, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x7A,0x90, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0xEE,0x00, 0x3F,0x39, 0xC5,0xB4, 0x00,0x00, 0xC7,0x38, 0x5A,0x00, 0xE0,0x00,
-0x3F,0x40, 0xF7,0x05, 0x7A,0x90, 0xC5,0xB8, 0x00,0x00, 0xF0,0x05, 0x7A,0x90, 0xF7,0x04,
-0x7A,0x88, 0xF6,0x86, 0x7A,0x28, 0x76,0x39, 0x00,0x03, 0xA6,0xB2, 0x68,0x02, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x7A,0x88, 0xF7,0x04, 0x7A,0x98, 0x96,0x96, 0xFF,0xF4, 0x96,0x82,
-0xFF,0x3C, 0xF4,0x84, 0x7A,0x98, 0xF6,0x86, 0x7A,0x2C, 0xC7,0x38, 0x58,0x00, 0x94,0x82,
-0xFF,0x40, 0x95,0x82, 0xFF,0x44, 0xB5,0xB2, 0x68,0x02, 0xF7,0x05, 0x7A,0x98, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x10, 0xF5,0x84,
-0x6F,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x3F,0xE4, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x3F,0xD8, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02, 0x00,0x22, 0xE0,0x00, 0x3F,0xE8, 0xF5,0x05,
-0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF5,0x84, 0x32,0xC0, 0x00,0x00, 0x00,0x01, 0x90,0x2E,
-0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00,
-0x41,0x14, 0x00,0x00, 0x00,0x01, 0x87,0x02, 0xFF,0x38, 0x05,0x2C, 0x0E,0xF4, 0x95,0x16,
-0xFF,0xF4, 0xF7,0x05, 0x7A,0x68, 0x95,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xEC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x43,0xA0, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xEC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x40,0xD0, 0x00,0x00, 0x00,0x01, 0x86,0x2E, 0x0E,0xF8, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x40,0x6D, 0xF5,0x02, 0x00,0x4C, 0x87,0x2E,
-0x0F,0x00, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E, 0x0F,0x00, 0x87,0x2E,
-0x0F,0x00, 0xE0,0x00, 0x40,0xD0, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0xF5,0x06,
-0x7A,0x28, 0x95,0x13, 0xFF,0xFC, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35,
-0x00,0x04, 0xC7,0x38, 0x6A,0x00, 0x85,0x16, 0xFF,0xF4, 0xC7,0x38, 0x60,0x00, 0xC7,0x38,
-0x50,0x00, 0x07,0x38, 0x00,0x10, 0x97,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xEC, 0x96,0x16,
-0xFF,0xE8, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0x86,0x16,
-0xFF,0xE8, 0x85,0x96, 0xFF,0xEC, 0x06,0x30, 0x00,0x01, 0x20,0x32, 0x00,0x11, 0xE6,0x00,
-0x40,0xCC, 0x00,0x00, 0x00,0x01, 0xF6,0x02, 0x00,0x00, 0x96,0x2E, 0x0E,0xF8, 0xF7,0x04,
-0x32,0xC0, 0xF5,0x06, 0xE0,0x30, 0xC0,0x3A, 0x52,0x00, 0xE6,0x00, 0x41,0x14, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8, 0x00,0x1E, 0x70,0x3E,
-0xFF,0xE1, 0xE6,0x00, 0x41,0x15, 0x00,0x00, 0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04,
-0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04,
-0x79,0xC8, 0xF7,0x04, 0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x41,0x51, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02, 0x00,0x0A, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x41,0x50, 0xB5,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04,
-0x71,0xD4, 0xF6,0x84, 0x71,0xCC, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x41,0x6C, 0xF7,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD4, 0xF6,0x84, 0x71,0xD4, 0xF7,0x04,
-0x71,0xD0, 0xF0,0x05, 0x71,0xC4, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xF6,0x84,
-0x32,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x42,0x31, 0xF7,0x05,
-0x71,0xC8, 0xF7,0x04, 0x71,0x98, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x41,0xD1, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x41,0xD0, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x42,0x29, 0x00,0x00, 0x00,0x01, 0xF5,0x84,
-0x76,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x42,0x1C, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x42,0x08, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02, 0x00,0x22, 0xF5,0x05, 0x76,0xF8, 0xF5,0x04,
-0x77,0x00, 0xE0,0x00, 0x42,0x20, 0xF5,0x05, 0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0xE0,0x00,
-0x42,0x30, 0xF0,0x05, 0x7A,0x78, 0xE0,0x00, 0x42,0x34, 0xF5,0x06, 0x31,0x9C, 0xF5,0x06,
-0x2E,0xE0, 0xF5,0x05, 0x32,0xD4, 0xF7,0x04, 0x71,0xC8, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x42,0x74, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02,
-0x00,0x09, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x42,0x74, 0xB5,0x3A, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06,
-0x32,0xD4, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x2E,0xE0, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x32,0xD4, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x2F,0x6C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x32,0xD4, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x2F,0xF8, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x32,0xD4, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x30,0x84, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x32,0xD4, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x31,0x10, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x32,0xD4, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x31,0x9C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x32,0xD4, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x32,0x28, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x87,0x16,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x86,0xBA, 0x00,0x00, 0x87,0x3A, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0x44,0x0C, 0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x96, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x86,0x2E,
-0x00,0x00, 0x86,0xAE, 0x00,0x04, 0x20,0x32, 0x00,0x10, 0xE2,0x00, 0x43,0xD0, 0x00,0x00,
-0x00,0x01, 0x20,0x36, 0x00,0x10, 0xE2,0x00, 0x43,0xED, 0x07,0x34, 0x00,0x01, 0x87,0x2E,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E, 0x00,0x0C, 0x87,0x2E,
-0x00,0x0C, 0xE0,0x00, 0x44,0x14, 0xF4,0x02, 0x00,0x00, 0xC0,0x3A, 0x62,0x00, 0xE6,0x00,
-0x44,0x11, 0xF4,0x02, 0x00,0x00, 0x20,0x36, 0x00,0x10, 0xE6,0x00, 0x44,0x14, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x44,0x14, 0x00,0x00, 0x00,0x01, 0xF4,0x02,
-0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x02,
-0x00,0x01, 0xF7,0x05, 0x35,0x24, 0xF7,0x04, 0x6F,0x44, 0x00,0x00, 0x00,0x01, 0xF7,0x05,
-0x35,0x28, 0xF7,0x06, 0x32,0xF4, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x35,0x30, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02,
-0x45,0x04, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02, 0x00,0x0D, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x32,0xF4, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x02, 0x4A,0x04, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02, 0x00,0x0F, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x33,0x80, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02, 0x4E,0xEC, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02,
-0x00,0x08, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x34,0x0C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02, 0x57,0x64, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x02, 0x00,0x07, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x34,0x98, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x14, 0xF7,0x04,
-0x75,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x45,0x2D, 0xF6,0x86,
-0x75,0xF8, 0xE0,0x00, 0x45,0x44, 0xF7,0x02, 0x00,0x00, 0xF7,0x04, 0x76,0x04, 0x00,0x00,
-0x00,0x01, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x87,0x3A, 0x00,0x18, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x45,0x5C, 0xF7,0x05, 0x35,0x48, 0xF4,0x86,
-0x33,0x80, 0xE0,0x00, 0x49,0xF0, 0xF4,0x85, 0x35,0x30, 0xF7,0x04, 0x6F,0x54, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x45,0x80, 0xF4,0x82, 0x00,0x08, 0xF4,0x82,
-0x00,0x01, 0xF4,0x85, 0x6F,0x54, 0xE0,0x00, 0x45,0x88, 0xF7,0x02, 0x00,0x01, 0xF4,0x85,
-0x6F,0x58, 0xF7,0x02, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x45,0xA0, 0xF4,0x82,
-0x00,0x04, 0xF4,0x86, 0x34,0x0C, 0xE0,0x00, 0x49,0xF0, 0xF4,0x85, 0x35,0x30, 0xF6,0x84,
-0x35,0x48, 0xF6,0x04, 0x35,0x2C, 0xF4,0xB7, 0x28,0x00, 0x07,0x34, 0x00,0x02, 0xF4,0x82,
-0x00,0x01, 0xF4,0xBB, 0x28,0x00, 0x87,0x32, 0x00,0x8C, 0xF4,0x82, 0x00,0x01, 0x97,0x36,
-0x00,0x18, 0x87,0x32, 0x00,0x90, 0xF4,0x85, 0x6F,0x50, 0x97,0x36, 0x00,0x04, 0x84,0xB2,
-0x00,0x84, 0x00,0x00, 0x00,0x01, 0x94,0xB6, 0x00,0x10, 0x84,0xB2, 0x00,0x88, 0x00,0x00,
-0x00,0x01, 0x94,0xB6, 0x00,0x14, 0x84,0xB6, 0x00,0x10, 0x00,0x00, 0x00,0x01, 0x94,0xB6,
-0x00,0x08, 0x84,0xB6, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x94,0xB6, 0x00,0x0C, 0x84,0xB2,
-0x00,0x98, 0x00,0x00, 0x00,0x01, 0xF4,0x85, 0x35,0x54, 0xF4,0x82, 0x00,0x01, 0x94,0x82,
-0xFF,0x80, 0xF5,0x04, 0x35,0x54, 0xF4,0x86, 0x34,0x98, 0xF4,0x85, 0x35,0x30, 0x95,0x02,
-0xFF,0x38, 0x85,0xB2, 0x00,0x00, 0x06,0xB4, 0x00,0x24, 0x95,0x82, 0xFF,0x3C, 0x96,0x82,
-0xFF,0x40, 0x87,0x32, 0x00,0x04, 0xF6,0x85, 0x35,0x50, 0x97,0x02, 0xFF,0x44, 0x86,0xB2,
-0x00,0x04, 0xF0,0x05, 0x35,0x4C, 0xF7,0x04, 0x35,0x40, 0x95,0x16, 0xFF,0xF4, 0x95,0x96,
-0xFF,0xF4, 0xC7,0x38, 0x68,0x00, 0xF7,0x05, 0x35,0x40, 0xF5,0x84, 0x35,0x28, 0x86,0xB2,
-0x00,0x04, 0x87,0x2E, 0x14,0x14, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x97,0x2E,
-0x14,0x14, 0x87,0x32, 0x00,0x80, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x01, 0xEE,0x00,
-0x49,0xF0, 0xF7,0x06, 0x0C,0x3E, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x46,0xA4, 0x00,0x00,
-0x00,0x01, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x46,0x95, 0x00,0x00, 0x00,0x01, 0xF7,0x06,
-0x0C,0x3E, 0xC7,0x7C, 0x74,0x00, 0x20,0x3A, 0x00,0x10, 0xE6,0x00, 0x49,0xF0, 0x00,0x00,
-0x00,0x01, 0xFF,0x82, 0x00,0x10, 0x86,0x82, 0xFF,0x38, 0xF7,0x04, 0x35,0x58, 0xF5,0x84,
-0x6F,0x58, 0xF6,0x85, 0x35,0x54, 0x07,0x38, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00,
-0x47,0x08, 0xF7,0x05, 0x35,0x58, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x46,0xFC, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xE0,0x00,
-0x47,0x0C, 0xF4,0x85, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF6,0x84, 0x35,0x2C, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x94, 0xC4,0x84, 0x00,0x00, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00,
-0x47,0x71, 0x00,0x00, 0x00,0x01, 0x86,0x36, 0x00,0x94, 0xF6,0x84, 0x35,0x54, 0x00,0x00,
-0x00,0x01, 0x76,0xB4, 0xFF,0xF0, 0xF7,0x04, 0x35,0x54, 0x96,0x96, 0xFF,0xF4, 0x47,0x39,
-0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xC6,0xB4, 0x70,0x00, 0xF7,0x04, 0x35,0x48, 0x77,0xB4,
-0x00,0x0F, 0x70,0x3E, 0xFF,0xE1, 0x07,0x38, 0x00,0x24, 0xE6,0x00, 0x47,0x69, 0xC6,0x38,
-0x60,0x00, 0x06,0xB4, 0x00,0x01, 0xC7,0x04, 0x6E,0x00, 0xF7,0x33, 0x28,0x00, 0xF6,0x84,
-0x35,0x44, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x0F, 0xE2,0x00, 0x47,0xBD, 0x07,0x38, 0x00,0x01, 0x87,0x36, 0x00,0x0C, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x00,0x0C, 0x87,0x36, 0x00,0x0C, 0xE0,0x00,
-0x47,0xD0, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x35,0x28, 0xF6,0x82, 0x00,0x01, 0x07,0x38,
-0x00,0x08, 0xE0,0x00, 0x49,0x68, 0xF7,0x05, 0x35,0x44, 0x20,0x3A, 0x00,0x10, 0xE6,0x00,
-0x47,0xCC, 0x00,0x00, 0x00,0x01, 0xF7,0x02, 0x00,0x00, 0x97,0x36, 0x00,0x04, 0xF7,0x04,
-0x35,0x3C, 0xF6,0x84, 0x35,0x28, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x35,0x3C, 0xF7,0x04,
-0x35,0x3C, 0x87,0x36, 0x14,0x1C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x1C, 0xF7,0x04, 0x76,0x04, 0x86,0xB6, 0x14,0x1C, 0xF6,0x04, 0x75,0xFC, 0x07,0x38,
-0x00,0x01, 0xF6,0x84, 0x76,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x48,0x1C, 0xF7,0x05, 0x76,0x04, 0xF0,0x05, 0x76,0x04, 0xF6,0x84, 0x76,0x04, 0xF7,0x04,
-0x76,0x08, 0xF0,0x05, 0x75,0xFC, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0x48,0x81, 0xF7,0x05, 0x75,0xF8, 0xF7,0x04, 0x76,0x48, 0xF4,0x86,
-0x72,0x18, 0xC0,0x3A, 0x4A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x48,0x81, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82, 0x00,0x0E, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x48,0x80, 0xB4,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02,
-0x00,0x00, 0x20,0x2A, 0x00,0x02, 0xEE,0x00, 0x49,0x68, 0xF6,0x82, 0x00,0x00, 0xF6,0x84,
-0x35,0x28, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x02, 0xE6,0x00, 0x49,0x3C, 0x05,0xB4, 0x00,0x08, 0x95,0x93, 0xFF,0xFC, 0x95,0x16,
-0xFF,0xEC, 0x95,0x96, 0xFF,0xE8, 0x96,0x96, 0xFF,0xE4, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x5E,0xDC, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xEC, 0x85,0x96, 0xFF,0xE8, 0x86,0x96,
-0xFF,0xE4, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x49,0x2C, 0xF7,0x02, 0x00,0x00, 0x86,0x36,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x0F, 0xE2,0x00, 0x49,0x11, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x00,0x14, 0x87,0x36, 0x00,0x14, 0xE0,0x00, 0x49,0x2C, 0xF7,0x02, 0x00,0x00, 0x76,0xB1,
-0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x05, 0xC7,0x38, 0x6A,0x00, 0xC7,0x38,
-0x60,0x00, 0x07,0x38, 0x00,0x10, 0xC7,0x2C, 0x70,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x47,0xA8, 0xF7,0x05, 0x35,0x2C, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x4C, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x49,0x5C, 0x07,0x34, 0x14,0x94, 0xF4,0x84,
-0x6F,0x44, 0xE0,0x00, 0x49,0x60, 0xF4,0x85, 0x35,0x28, 0xF7,0x05, 0x35,0x28, 0xE0,0x00,
-0x48,0x84, 0x05,0x28, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x49,0xA1, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82, 0x00,0x0D, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x49,0xA8, 0xB4,0xBA, 0x68,0x02, 0xE0,0x00, 0x49,0xA8, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82,
-0x00,0x01, 0xF4,0x85, 0x35,0x24, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x44, 0xF4,0x86,
-0x32,0xF4, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x49,0xF0, 0xF4,0x85, 0x35,0x30, 0xF7,0x04,
-0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8, 0x00,0x1F, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00,
-0x49,0xF1, 0x00,0x00, 0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x14, 0xF7,0x04,
-0x75,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x4A,0x2D, 0xF6,0x86,
-0x75,0xF8, 0xE0,0x00, 0x4A,0x40, 0xF6,0x82, 0x00,0x00, 0xF7,0x04, 0x76,0x04, 0x00,0x00,
-0x00,0x01, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x86,0xBA, 0x00,0x18, 0xF7,0x04,
-0x6F,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x4A,0x64, 0xF6,0x85,
-0x35,0x48, 0xF4,0x82, 0x00,0x01, 0xF4,0x85, 0x6F,0x54, 0xE0,0x00, 0x4A,0x70, 0xF7,0x02,
-0x00,0x01, 0xF4,0x82, 0x00,0x08, 0xF4,0x85, 0x6F,0x58, 0xF7,0x02, 0x00,0x00, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x4A,0x88, 0xF4,0x82, 0x00,0x04, 0xF4,0x86, 0x34,0x0C, 0xE0,0x00,
-0x4E,0xD8, 0xF4,0x85, 0x35,0x30, 0xF6,0x84, 0x35,0x48, 0xF6,0x04, 0x35,0x2C, 0xF4,0xB7,
-0x28,0x00, 0x07,0x34, 0x00,0x02, 0xF4,0x82, 0x00,0x01, 0xF4,0xBB, 0x28,0x00, 0x87,0x32,
-0x00,0x8C, 0xF4,0x82, 0x00,0x01, 0x97,0x36, 0x00,0x18, 0x87,0x32, 0x00,0x90, 0xF4,0x85,
-0x6F,0x50, 0x97,0x36, 0x00,0x04, 0x84,0xB2, 0x00,0x84, 0x00,0x00, 0x00,0x01, 0x94,0xB6,
-0x00,0x10, 0x84,0xB2, 0x00,0x88, 0x00,0x00, 0x00,0x01, 0x94,0xB6, 0x00,0x14, 0x84,0xB6,
-0x00,0x10, 0x00,0x00, 0x00,0x01, 0x94,0xB6, 0x00,0x08, 0x84,0xB6, 0x00,0x14, 0x00,0x00,
-0x00,0x01, 0x94,0xB6, 0x00,0x0C, 0x84,0xB2, 0x00,0x98, 0x00,0x00, 0x00,0x01, 0xF4,0x85,
-0x35,0x54, 0xF4,0x82, 0x00,0x01, 0x94,0x82, 0xFF,0x80, 0xF5,0x04, 0x35,0x54, 0xF4,0x86,
-0x34,0x98, 0xF4,0x85, 0x35,0x30, 0x95,0x02, 0xFF,0x38, 0x85,0xB2, 0x00,0x00, 0x06,0xB4,
-0x00,0x24, 0x95,0x82, 0xFF,0x3C, 0x96,0x82, 0xFF,0x40, 0x87,0x32, 0x00,0x04, 0xF6,0x85,
-0x35,0x50, 0x97,0x02, 0xFF,0x44, 0x86,0xB2, 0x00,0x04, 0xF0,0x05, 0x35,0x4C, 0xF7,0x04,
-0x35,0x40, 0x95,0x16, 0xFF,0xF4, 0x95,0x96, 0xFF,0xF4, 0xC7,0x38, 0x68,0x00, 0xF7,0x05,
-0x35,0x40, 0xF5,0x84, 0x35,0x28, 0x86,0xB2, 0x00,0x04, 0x87,0x2E, 0x14,0x14, 0x00,0x00,
-0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x97,0x2E, 0x14,0x14, 0x87,0x32, 0x00,0x80, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x01, 0xEE,0x00, 0x4E,0xD8, 0xF7,0x06, 0x0C,0x3E, 0xC0,0x7E,
-0x74,0x00, 0xE6,0x00, 0x4B,0x8C, 0x00,0x00, 0x00,0x01, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00,
-0x4B,0x7D, 0x00,0x00, 0x00,0x01, 0xF7,0x06, 0x0C,0x3E, 0xC7,0x7C, 0x74,0x00, 0x20,0x3A,
-0x00,0x10, 0xE6,0x00, 0x4E,0xD8, 0x00,0x00, 0x00,0x01, 0xFF,0x82, 0x00,0x10, 0x86,0x82,
-0xFF,0x38, 0xF7,0x04, 0x35,0x58, 0xF5,0x84, 0x6F,0x58, 0xF6,0x85, 0x35,0x54, 0x07,0x38,
-0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x4B,0xF0, 0xF7,0x05, 0x35,0x58, 0xF7,0x04,
-0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x4B,0xE4, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xE0,0x00, 0x4B,0xF4, 0xF4,0x85, 0x6F,0x58, 0xF0,0x05,
-0x6F,0x54, 0xF6,0x84, 0x35,0x2C, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x94, 0xC4,0x84,
-0x00,0x00, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00, 0x4C,0x59, 0x00,0x00, 0x00,0x01, 0x86,0x36,
-0x00,0x94, 0xF6,0x84, 0x35,0x54, 0x00,0x00, 0x00,0x01, 0x76,0xB4, 0xFF,0xF0, 0xF7,0x04,
-0x35,0x54, 0x96,0x96, 0xFF,0xF4, 0x47,0x39, 0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xC6,0xB4,
-0x70,0x00, 0xF7,0x04, 0x35,0x48, 0x77,0xB4, 0x00,0x0F, 0x70,0x3E, 0xFF,0xE1, 0x07,0x38,
-0x00,0x24, 0xE6,0x00, 0x4C,0x51, 0xC6,0x38, 0x60,0x00, 0x06,0xB4, 0x00,0x01, 0xC7,0x04,
-0x6E,0x00, 0xF7,0x33, 0x28,0x00, 0xF6,0x84, 0x35,0x44, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x0F, 0xE2,0x00, 0x4C,0xA5, 0x07,0x38,
-0x00,0x01, 0x87,0x36, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x00,0x0C, 0x87,0x36, 0x00,0x0C, 0xE0,0x00, 0x4C,0xB8, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x35,0x28, 0xF6,0x82, 0x00,0x01, 0x07,0x38, 0x00,0x08, 0xE0,0x00, 0x4E,0x50, 0xF7,0x05,
-0x35,0x44, 0x20,0x3A, 0x00,0x10, 0xE6,0x00, 0x4C,0xB4, 0x00,0x00, 0x00,0x01, 0xF7,0x02,
-0x00,0x00, 0x97,0x36, 0x00,0x04, 0xF7,0x04, 0x35,0x3C, 0xF6,0x84, 0x35,0x28, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x35,0x3C, 0xF7,0x04, 0x35,0x3C, 0x87,0x36, 0x14,0x1C, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x14,0x1C, 0xF7,0x04, 0x76,0x04, 0x86,0xB6,
-0x14,0x1C, 0xF6,0x04, 0x75,0xFC, 0x07,0x38, 0x00,0x01, 0xF6,0x84, 0x76,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00, 0x4D,0x04, 0xF7,0x05, 0x76,0x04, 0xF0,0x05,
-0x76,0x04, 0xF6,0x84, 0x76,0x04, 0xF7,0x04, 0x76,0x08, 0xF0,0x05, 0x75,0xFC, 0xC0,0x36,
-0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x4D,0x69, 0xF7,0x05,
-0x75,0xF8, 0xF7,0x04, 0x76,0x48, 0xF4,0x86, 0x72,0x18, 0xC0,0x3A, 0x4A,0x00, 0x47,0x0C,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x4D,0x69, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04,
-0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0xF4,0x82, 0x00,0x0E, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x4D,0x68, 0xB4,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02, 0x00,0x00, 0x20,0x2A, 0x00,0x02, 0xEE,0x00,
-0x4E,0x50, 0xF6,0x82, 0x00,0x00, 0xF6,0x84, 0x35,0x28, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00, 0x4E,0x24, 0x05,0xB4,
-0x00,0x08, 0x95,0x93, 0xFF,0xFC, 0x95,0x16, 0xFF,0xEC, 0x95,0x96, 0xFF,0xE8, 0x96,0x96,
-0xFF,0xE4, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x5E,0xDC, 0x97,0x93, 0xFF,0xFC, 0x85,0x16,
-0xFF,0xEC, 0x85,0x96, 0xFF,0xE8, 0x86,0x96, 0xFF,0xE4, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x4E,0x14, 0xF7,0x02, 0x00,0x00, 0x86,0x36, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x20,0x32,
-0x00,0x0F, 0xE2,0x00, 0x4D,0xF9, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x14, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x00,0x14, 0x87,0x36, 0x00,0x14, 0xE0,0x00,
-0x4E,0x14, 0xF7,0x02, 0x00,0x00, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35,
-0x00,0x05, 0xC7,0x38, 0x6A,0x00, 0xC7,0x38, 0x60,0x00, 0x07,0x38, 0x00,0x10, 0xC7,0x2C,
-0x70,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x4C,0x90, 0xF7,0x05, 0x35,0x2C, 0xF6,0x84,
-0x35,0x28, 0xF7,0x04, 0x6F,0x4C, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x4E,0x44, 0x07,0x34, 0x14,0x94, 0xF4,0x84, 0x6F,0x44, 0xE0,0x00, 0x4E,0x48, 0xF4,0x85,
-0x35,0x28, 0xF7,0x05, 0x35,0x28, 0xE0,0x00, 0x4D,0x6C, 0x05,0x28, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xE6,0x00, 0x4E,0x89, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00,
-0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82,
-0x00,0x0D, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x4E,0x90, 0xB4,0xBA, 0x68,0x02, 0xE0,0x00,
-0x4E,0x90, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x01, 0xF4,0x85, 0x35,0x24, 0xF6,0x84,
-0x35,0x28, 0xF7,0x04, 0x6F,0x44, 0xF4,0x86, 0x32,0xF4, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x4E,0xD8, 0xF4,0x85, 0x35,0x30, 0xF7,0x04, 0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8,
-0x00,0x1F, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00, 0x4E,0xD9, 0x00,0x00, 0x00,0x01, 0x0F,0x81,
-0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x14, 0xF6,0x84, 0x35,0x48, 0xF6,0x04, 0x35,0x2C, 0xF4,0x82,
-0x00,0x04, 0xF4,0xB7, 0x28,0x00, 0x07,0x34, 0x00,0x02, 0xF4,0x82, 0x00,0x01, 0xF4,0xBB,
-0x28,0x00, 0x87,0x32, 0x00,0x8C, 0xF4,0x82, 0x00,0x01, 0x97,0x36, 0x00,0x18, 0x87,0x32,
-0x00,0x90, 0xF4,0x85, 0x6F,0x50, 0x97,0x36, 0x00,0x04, 0x84,0xB2, 0x00,0x84, 0x00,0x00,
-0x00,0x01, 0x94,0xB6, 0x00,0x10, 0x84,0xB2, 0x00,0x88, 0x00,0x00, 0x00,0x01, 0x94,0xB6,
-0x00,0x14, 0x84,0xB6, 0x00,0x10, 0x00,0x00, 0x00,0x01, 0x94,0xB6, 0x00,0x08, 0x84,0xB6,
-0x00,0x14, 0x00,0x00, 0x00,0x01, 0x94,0xB6, 0x00,0x0C, 0x84,0xB2, 0x00,0x98, 0x00,0x00,
-0x00,0x01, 0xF4,0x85, 0x35,0x54, 0xF4,0x82, 0x00,0x01, 0x94,0x82, 0xFF,0x80, 0xF5,0x04,
-0x35,0x54, 0xF4,0x86, 0x34,0x98, 0xF4,0x85, 0x35,0x30, 0x95,0x02, 0xFF,0x38, 0x85,0xB2,
-0x00,0x00, 0x06,0xB4, 0x00,0x24, 0x95,0x82, 0xFF,0x3C, 0x96,0x82, 0xFF,0x40, 0x87,0x32,
-0x00,0x04, 0xF6,0x85, 0x35,0x50, 0x97,0x02, 0xFF,0x44, 0x86,0xB2, 0x00,0x04, 0xF0,0x05,
-0x35,0x4C, 0xF7,0x04, 0x35,0x40, 0x95,0x16, 0xFF,0xF4, 0x95,0x96, 0xFF,0xF4, 0xC7,0x38,
-0x68,0x00, 0xF7,0x05, 0x35,0x40, 0xF5,0x84, 0x35,0x28, 0x86,0xB2, 0x00,0x04, 0x87,0x2E,
-0x14,0x14, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x97,0x2E, 0x14,0x14, 0x87,0x32,
-0x00,0x80, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x01, 0xEE,0x00, 0x53,0x4C, 0xF7,0x06,
-0x0C,0x3E, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x50,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x7E,
-0x74,0x00, 0xE6,0x00, 0x4F,0xF1, 0x00,0x00, 0x00,0x01, 0xF7,0x06, 0x0C,0x3E, 0xC7,0x7C,
-0x74,0x00, 0x20,0x3A, 0x00,0x10, 0xE6,0x00, 0x53,0x4C, 0x00,0x00, 0x00,0x01, 0xFF,0x82,
-0x00,0x10, 0x86,0x82, 0xFF,0x38, 0xF7,0x04, 0x35,0x58, 0xF5,0x84, 0x6F,0x58, 0xF6,0x85,
-0x35,0x54, 0x07,0x38, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00, 0x50,0x64, 0xF7,0x05,
-0x35,0x58, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x50,0x58, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x22, 0xE0,0x00, 0x50,0x68, 0xF4,0x85,
-0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF6,0x84, 0x35,0x2C, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x00,0x94, 0xC4,0x84, 0x00,0x00, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x00, 0x50,0xCD, 0x00,0x00,
-0x00,0x01, 0x86,0x36, 0x00,0x94, 0xF6,0x84, 0x35,0x54, 0x00,0x00, 0x00,0x01, 0x76,0xB4,
-0xFF,0xF0, 0xF7,0x04, 0x35,0x54, 0x96,0x96, 0xFF,0xF4, 0x47,0x39, 0x00,0x00, 0x97,0x16,
-0xFF,0xF0, 0xC6,0xB4, 0x70,0x00, 0xF7,0x04, 0x35,0x48, 0x77,0xB4, 0x00,0x0F, 0x70,0x3E,
-0xFF,0xE1, 0x07,0x38, 0x00,0x24, 0xE6,0x00, 0x50,0xC5, 0xC6,0x38, 0x60,0x00, 0x06,0xB4,
-0x00,0x01, 0xC7,0x04, 0x6E,0x00, 0xF7,0x33, 0x28,0x00, 0xF6,0x84, 0x35,0x44, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x0F, 0xE2,0x00,
-0x51,0x19, 0x07,0x38, 0x00,0x01, 0x87,0x36, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0x97,0x36, 0x00,0x0C, 0x87,0x36, 0x00,0x0C, 0xE0,0x00, 0x51,0x2C, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x35,0x28, 0xF6,0x82, 0x00,0x01, 0x07,0x38, 0x00,0x08, 0xE0,0x00,
-0x52,0xC4, 0xF7,0x05, 0x35,0x44, 0x20,0x3A, 0x00,0x10, 0xE6,0x00, 0x51,0x28, 0x00,0x00,
-0x00,0x01, 0xF7,0x02, 0x00,0x00, 0x97,0x36, 0x00,0x04, 0xF7,0x04, 0x35,0x3C, 0xF6,0x84,
-0x35,0x28, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x35,0x3C, 0xF7,0x04, 0x35,0x3C, 0x87,0x36,
-0x14,0x1C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x14,0x1C, 0xF7,0x04,
-0x76,0x04, 0x86,0xB6, 0x14,0x1C, 0xF6,0x04, 0x75,0xFC, 0x07,0x38, 0x00,0x01, 0xF6,0x84,
-0x76,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00, 0x51,0x78, 0xF7,0x05,
-0x76,0x04, 0xF0,0x05, 0x76,0x04, 0xF6,0x84, 0x76,0x04, 0xF7,0x04, 0x76,0x08, 0xF0,0x05,
-0x75,0xFC, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0x51,0xDD, 0xF7,0x05, 0x75,0xF8, 0xF7,0x04, 0x76,0x48, 0xF4,0x86, 0x72,0x18, 0xC0,0x3A,
-0x4A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x51,0xDD, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82, 0x00,0x0E, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x51,0xDC, 0xB4,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02, 0x00,0x00, 0x20,0x2A,
-0x00,0x02, 0xEE,0x00, 0x52,0xC4, 0xF6,0x82, 0x00,0x00, 0xF6,0x84, 0x35,0x28, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x00,
-0x52,0x98, 0x05,0xB4, 0x00,0x08, 0x95,0x93, 0xFF,0xFC, 0x95,0x16, 0xFF,0xEC, 0x95,0x96,
-0xFF,0xE8, 0x96,0x96, 0xFF,0xE4, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x5E,0xDC, 0x97,0x93,
-0xFF,0xFC, 0x85,0x16, 0xFF,0xEC, 0x85,0x96, 0xFF,0xE8, 0x86,0x96, 0xFF,0xE4, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x52,0x88, 0xF7,0x02, 0x00,0x00, 0x86,0x36, 0x00,0x0C, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x0F, 0xE2,0x00, 0x52,0x6D, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x00,0x14, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x00,0x14, 0x87,0x36,
-0x00,0x14, 0xE0,0x00, 0x52,0x88, 0xF7,0x02, 0x00,0x00, 0x76,0xB1, 0x00,0x02, 0xC6,0xB4,
-0x60,0x00, 0x77,0x35, 0x00,0x05, 0xC7,0x38, 0x6A,0x00, 0xC7,0x38, 0x60,0x00, 0x07,0x38,
-0x00,0x10, 0xC7,0x2C, 0x70,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x51,0x04, 0xF7,0x05,
-0x35,0x2C, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x4C, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x52,0xB8, 0x07,0x34, 0x14,0x94, 0xF4,0x84, 0x6F,0x44, 0xE0,0x00,
-0x52,0xBC, 0xF4,0x85, 0x35,0x28, 0xF7,0x05, 0x35,0x28, 0xE0,0x00, 0x51,0xE0, 0x05,0x28,
-0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x52,0xFD, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04,
-0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0xF4,0x82, 0x00,0x0D, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x53,0x04, 0xB4,0xBA,
-0x68,0x02, 0xE0,0x00, 0x53,0x04, 0xF0,0x05, 0x2D,0x38, 0xF4,0x82, 0x00,0x01, 0xF4,0x85,
-0x35,0x24, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x44, 0xF4,0x86, 0x32,0xF4, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x53,0x4C, 0xF4,0x85, 0x35,0x30, 0xF7,0x04, 0xE0,0x18, 0x00,0x00,
-0x00,0x01, 0x77,0xB8, 0x00,0x1F, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00, 0x53,0x4D, 0x00,0x00,
-0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x14, 0xF4,0x84, 0x35,0x54, 0xF6,0x84,
-0x35,0x4C, 0xF5,0x84, 0x35,0x2C, 0x94,0x82, 0xFF,0x38, 0x76,0xB5, 0x00,0x03, 0xA5,0x2E,
-0x68,0x02, 0x00,0x00, 0x00,0x01, 0x95,0x02, 0xFF,0x3C, 0xF3,0x84, 0x35,0x50, 0xC6,0xAC,
-0x68,0x00, 0x93,0x82, 0xFF,0x40, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x97,0x02,
-0xFF,0x44, 0x86,0x36, 0x00,0x04, 0xF7,0x04, 0x35,0x40, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x60,0x00, 0xF7,0x05, 0x35,0x40, 0xF6,0x04, 0x35,0x28, 0x86,0xB6, 0x00,0x04, 0x87,0x32,
-0x14,0x14, 0x94,0x96, 0xFF,0xF4, 0xC7,0x38, 0x68,0x00, 0x97,0x32, 0x14,0x14, 0x87,0x2E,
-0x00,0x80, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x01, 0xEE,0x00, 0x57,0x50, 0x95,0x16,
-0xFF,0xF4, 0xF7,0x06, 0x0C,0x3E, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x54,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x53,0xF5, 0x00,0x00, 0x00,0x01, 0xF7,0x06,
-0x0C,0x3E, 0xC7,0x7C, 0x74,0x00, 0x20,0x3A, 0x00,0x10, 0xE6,0x00, 0x57,0x50, 0x00,0x00,
-0x00,0x01, 0xFF,0x82, 0x00,0x10, 0x86,0x82, 0xFF,0x38, 0xF7,0x04, 0x35,0x58, 0xF5,0x84,
-0x6F,0x58, 0xF6,0x85, 0x35,0x54, 0x07,0x38, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00,
-0x54,0x68, 0xF7,0x05, 0x35,0x58, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x54,0x5C, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x82, 0x00,0x22, 0xE0,0x00,
-0x54,0x6C, 0xF3,0x85, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF6,0x84, 0x35,0x2C, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x94, 0xC3,0x84, 0x00,0x00, 0xC0,0x3A, 0x3A,0x00, 0xE6,0x00,
-0x54,0xD1, 0x00,0x00, 0x00,0x01, 0x86,0x36, 0x00,0x94, 0xF6,0x84, 0x35,0x54, 0x00,0x00,
-0x00,0x01, 0x76,0xB4, 0xFF,0xF0, 0xF7,0x04, 0x35,0x54, 0x96,0x96, 0xFF,0xF4, 0x47,0x39,
-0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xC6,0xB4, 0x70,0x00, 0xF7,0x04, 0x35,0x48, 0x77,0xB4,
-0x00,0x0F, 0x70,0x3E, 0xFF,0xE1, 0x07,0x38, 0x00,0x24, 0xE6,0x00, 0x54,0xC9, 0xC6,0x38,
-0x60,0x00, 0x06,0xB4, 0x00,0x01, 0xC7,0x04, 0x6E,0x00, 0xF7,0x33, 0x28,0x00, 0xF6,0x84,
-0x35,0x44, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x0F, 0xE2,0x00, 0x55,0x1D, 0x07,0x38, 0x00,0x01, 0x87,0x36, 0x00,0x0C, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x00,0x0C, 0x87,0x36, 0x00,0x0C, 0xE0,0x00,
-0x55,0x30, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x35,0x28, 0xF6,0x82, 0x00,0x01, 0x07,0x38,
-0x00,0x08, 0xE0,0x00, 0x56,0xC8, 0xF7,0x05, 0x35,0x44, 0x20,0x3A, 0x00,0x10, 0xE6,0x00,
-0x55,0x2C, 0x00,0x00, 0x00,0x01, 0xF7,0x02, 0x00,0x00, 0x97,0x36, 0x00,0x04, 0xF7,0x04,
-0x35,0x3C, 0xF6,0x84, 0x35,0x28, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x35,0x3C, 0xF7,0x04,
-0x35,0x3C, 0x87,0x36, 0x14,0x1C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x1C, 0xF7,0x04, 0x76,0x04, 0x86,0xB6, 0x14,0x1C, 0xF6,0x04, 0x75,0xFC, 0x07,0x38,
-0x00,0x01, 0xF6,0x84, 0x76,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x55,0x7C, 0xF7,0x05, 0x76,0x04, 0xF0,0x05, 0x76,0x04, 0xF6,0x84, 0x76,0x04, 0xF7,0x04,
-0x76,0x08, 0xF0,0x05, 0x75,0xFC, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0x55,0xE1, 0xF7,0x05, 0x75,0xF8, 0xF7,0x04, 0x76,0x48, 0xF3,0x86,
-0x72,0x18, 0xC0,0x3A, 0x3A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x55,0xE1, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x82, 0x00,0x0E, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x55,0xE0, 0xB3,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02,
-0x00,0x00, 0x20,0x2A, 0x00,0x02, 0xEE,0x00, 0x56,0xC8, 0xF6,0x82, 0x00,0x00, 0xF6,0x84,
-0x35,0x28, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x02, 0xE6,0x00, 0x56,0x9C, 0x05,0xB4, 0x00,0x08, 0x95,0x93, 0xFF,0xFC, 0x95,0x16,
-0xFF,0xEC, 0x95,0x96, 0xFF,0xE8, 0x96,0x96, 0xFF,0xE4, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x5E,0xDC, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xEC, 0x85,0x96, 0xFF,0xE8, 0x86,0x96,
-0xFF,0xE4, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x56,0x8C, 0xF7,0x02, 0x00,0x00, 0x86,0x36,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x0F, 0xE2,0x00, 0x56,0x71, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x00,0x14, 0x87,0x36, 0x00,0x14, 0xE0,0x00, 0x56,0x8C, 0xF7,0x02, 0x00,0x00, 0x76,0xB1,
-0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x05, 0xC7,0x38, 0x6A,0x00, 0xC7,0x38,
-0x60,0x00, 0x07,0x38, 0x00,0x10, 0xC7,0x2C, 0x70,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x55,0x08, 0xF7,0x05, 0x35,0x2C, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x4C, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x56,0xBC, 0x07,0x34, 0x14,0x94, 0xF3,0x84,
-0x6F,0x44, 0xE0,0x00, 0x56,0xC0, 0xF3,0x85, 0x35,0x28, 0xF7,0x05, 0x35,0x28, 0xE0,0x00,
-0x55,0xE4, 0x05,0x28, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x57,0x01, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x82, 0x00,0x0D, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x57,0x08, 0xB3,0xBA, 0x68,0x02, 0xE0,0x00, 0x57,0x08, 0xF0,0x05, 0x2D,0x38, 0xF3,0x82,
-0x00,0x01, 0xF3,0x85, 0x35,0x24, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x44, 0xF3,0x86,
-0x32,0xF4, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x57,0x50, 0xF3,0x85, 0x35,0x30, 0xF7,0x04,
-0xE0,0x18, 0x00,0x00, 0x00,0x01, 0x77,0xB8, 0x00,0x1F, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00,
-0x57,0x51, 0x00,0x00, 0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x14, 0x87,0x02,
-0xFF,0x38, 0xF3,0x84, 0x35,0x2C, 0xF7,0x05, 0x35,0x54, 0x87,0x1E, 0x00,0x80, 0xF5,0x04,
-0x35,0x4C, 0x27,0x38, 0x00,0x01, 0xC0,0x2A, 0x72,0x00, 0xE6,0x00, 0x5A,0x4C, 0x00,0x00,
-0x00,0x01, 0xF5,0x84, 0x6F,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00,
-0x57,0xD8, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x57,0xCC, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xE0,0x00,
-0x57,0xDC, 0xF3,0x05, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF6,0x84, 0x35,0x2C, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x94, 0xC3,0x04, 0x00,0x00, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00,
-0x58,0x41, 0x00,0x00, 0x00,0x01, 0x86,0x36, 0x00,0x94, 0xF6,0x84, 0x35,0x54, 0x00,0x00,
-0x00,0x01, 0x76,0xB4, 0xFF,0xF0, 0xF7,0x04, 0x35,0x54, 0x96,0x96, 0xFF,0xF4, 0x47,0x39,
-0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xC6,0xB4, 0x70,0x00, 0xF7,0x04, 0x35,0x48, 0x77,0xB4,
-0x00,0x0F, 0x70,0x3E, 0xFF,0xE1, 0x07,0x38, 0x00,0x24, 0xE6,0x00, 0x58,0x39, 0xC6,0x38,
-0x60,0x00, 0x06,0xB4, 0x00,0x01, 0xC7,0x04, 0x6E,0x00, 0xF7,0x33, 0x28,0x00, 0xF6,0x84,
-0x35,0x44, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x0F, 0xE2,0x00, 0x58,0x8D, 0x07,0x38, 0x00,0x01, 0x87,0x36, 0x00,0x0C, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x00,0x0C, 0x87,0x36, 0x00,0x0C, 0xE0,0x00,
-0x58,0xA0, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x35,0x28, 0xF6,0x82, 0x00,0x01, 0x07,0x38,
-0x00,0x08, 0xE0,0x00, 0x5A,0x38, 0xF7,0x05, 0x35,0x44, 0x20,0x3A, 0x00,0x10, 0xE6,0x00,
-0x58,0x9C, 0x00,0x00, 0x00,0x01, 0xF7,0x02, 0x00,0x00, 0x97,0x36, 0x00,0x04, 0xF7,0x04,
-0x35,0x3C, 0xF6,0x84, 0x35,0x28, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x35,0x3C, 0xF7,0x04,
-0x35,0x3C, 0x87,0x36, 0x14,0x1C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x1C, 0xF7,0x04, 0x76,0x04, 0x86,0xB6, 0x14,0x1C, 0xF6,0x04, 0x75,0xFC, 0x07,0x38,
-0x00,0x01, 0xF6,0x84, 0x76,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x58,0xEC, 0xF7,0x05, 0x76,0x04, 0xF0,0x05, 0x76,0x04, 0xF6,0x84, 0x76,0x04, 0xF7,0x04,
-0x76,0x08, 0xF0,0x05, 0x75,0xFC, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0x59,0x51, 0xF7,0x05, 0x75,0xF8, 0xF7,0x04, 0x76,0x48, 0xF3,0x06,
-0x72,0x18, 0xC0,0x3A, 0x32,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x59,0x51, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0E, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x59,0x50, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02,
-0x00,0x00, 0x20,0x2A, 0x00,0x02, 0xEE,0x00, 0x5A,0x38, 0xF6,0x82, 0x00,0x00, 0xF6,0x84,
-0x35,0x28, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x02, 0xE6,0x00, 0x5A,0x0C, 0x05,0xB4, 0x00,0x08, 0x95,0x93, 0xFF,0xFC, 0x95,0x16,
-0xFF,0xEC, 0x95,0x96, 0xFF,0xE8, 0x96,0x96, 0xFF,0xE4, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x5E,0xDC, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xEC, 0x85,0x96, 0xFF,0xE8, 0x86,0x96,
-0xFF,0xE4, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x59,0xFC, 0xF7,0x02, 0x00,0x00, 0x86,0x36,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x0F, 0xE2,0x00, 0x59,0xE1, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x00,0x14, 0x87,0x36, 0x00,0x14, 0xE0,0x00, 0x59,0xFC, 0xF7,0x02, 0x00,0x00, 0x76,0xB1,
-0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x05, 0xC7,0x38, 0x6A,0x00, 0xC7,0x38,
-0x60,0x00, 0x07,0x38, 0x00,0x10, 0xC7,0x2C, 0x70,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x58,0x78, 0xF7,0x05, 0x35,0x2C, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x4C, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x5A,0x2C, 0x07,0x34, 0x14,0x94, 0xF3,0x04,
-0x6F,0x44, 0xE0,0x00, 0x5A,0x30, 0xF3,0x05, 0x35,0x28, 0xF7,0x05, 0x35,0x28, 0xE0,0x00,
-0x59,0x54, 0x05,0x28, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x5D,0xC4, 0xF3,0x02,
-0x00,0x01, 0xE0,0x00, 0x5D,0xF0, 0x00,0x00, 0x00,0x01, 0x77,0x29, 0x00,0x03, 0xC7,0x1C,
-0x70,0x00, 0x87,0x3A, 0x00,0x04, 0x05,0x28, 0x00,0x01, 0x76,0xA9, 0x00,0x03, 0xF4,0x84,
-0x35,0x54, 0xF6,0x04, 0x35,0x50, 0x94,0x82, 0xFF,0x38, 0xA4,0x1E, 0x68,0x02, 0xC6,0x30,
-0x70,0x00, 0x94,0x02, 0xFF,0x3C, 0x96,0x02, 0xFF,0x40, 0xC6,0x9C, 0x68,0x00, 0x87,0x36,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x97,0x02, 0xFF,0x44, 0x85,0xB6, 0x00,0x04, 0xF7,0x04,
-0x35,0x40, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x58,0x00, 0xF7,0x05, 0x35,0x40, 0x85,0xB6,
-0x00,0x04, 0xF5,0x05, 0x35,0x4C, 0xF6,0x84, 0x35,0x28, 0xF6,0x05, 0x35,0x50, 0x87,0x36,
-0x14,0x14, 0x94,0x96, 0xFF,0xF4, 0xC7,0x38, 0x58,0x00, 0x97,0x36, 0x14,0x14, 0x87,0x1E,
-0x00,0x80, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x01, 0xEE,0x00, 0x5E,0x3C, 0x94,0x16,
-0xFF,0xF4, 0xF7,0x06, 0x0C,0x3E, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x5A,0xF4, 0x00,0x00,
-0x00,0x01, 0xC0,0x7E, 0x74,0x00, 0xE6,0x00, 0x5A,0xE5, 0x00,0x00, 0x00,0x01, 0xF7,0x06,
-0x0C,0x3E, 0xC7,0x7C, 0x74,0x00, 0x20,0x3A, 0x00,0x10, 0xE6,0x00, 0x5E,0x3C, 0x00,0x00,
-0x00,0x01, 0xFF,0x82, 0x00,0x10, 0x86,0x82, 0xFF,0x38, 0xF7,0x04, 0x35,0x58, 0xF5,0x84,
-0x6F,0x58, 0xF6,0x85, 0x35,0x54, 0x07,0x38, 0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x00,
-0x5B,0x58, 0xF7,0x05, 0x35,0x58, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x5B,0x4C, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xE0,0x00,
-0x5B,0x5C, 0xF3,0x05, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF6,0x84, 0x35,0x2C, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x94, 0xC3,0x04, 0x00,0x00, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00,
-0x5B,0xC1, 0x00,0x00, 0x00,0x01, 0x86,0x36, 0x00,0x94, 0xF6,0x84, 0x35,0x54, 0x00,0x00,
-0x00,0x01, 0x76,0xB4, 0xFF,0xF0, 0xF7,0x04, 0x35,0x54, 0x96,0x96, 0xFF,0xF4, 0x47,0x39,
-0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xC6,0xB4, 0x70,0x00, 0xF7,0x04, 0x35,0x48, 0x77,0xB4,
-0x00,0x0F, 0x70,0x3E, 0xFF,0xE1, 0x07,0x38, 0x00,0x24, 0xE6,0x00, 0x5B,0xB9, 0xC6,0x38,
-0x60,0x00, 0x06,0xB4, 0x00,0x01, 0xC7,0x04, 0x6E,0x00, 0xF7,0x33, 0x28,0x00, 0xF6,0x84,
-0x35,0x44, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x0F, 0xE2,0x00, 0x5C,0x0D, 0x07,0x38, 0x00,0x01, 0x87,0x36, 0x00,0x0C, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x00,0x0C, 0x87,0x36, 0x00,0x0C, 0xE0,0x00,
-0x5C,0x20, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x35,0x28, 0xF6,0x82, 0x00,0x01, 0x07,0x38,
-0x00,0x08, 0xE0,0x00, 0x5D,0xB8, 0xF7,0x05, 0x35,0x44, 0x20,0x3A, 0x00,0x10, 0xE6,0x00,
-0x5C,0x1C, 0x00,0x00, 0x00,0x01, 0xF7,0x02, 0x00,0x00, 0x97,0x36, 0x00,0x04, 0xF7,0x04,
-0x35,0x3C, 0xF6,0x84, 0x35,0x28, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x35,0x3C, 0xF7,0x04,
-0x35,0x3C, 0x87,0x36, 0x14,0x1C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x14,0x1C, 0xF7,0x04, 0x76,0x04, 0x86,0xB6, 0x14,0x1C, 0xF6,0x04, 0x75,0xFC, 0x07,0x38,
-0x00,0x01, 0xF6,0x84, 0x76,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00,
-0x5C,0x6C, 0xF7,0x05, 0x76,0x04, 0xF0,0x05, 0x76,0x04, 0xF6,0x84, 0x76,0x04, 0xF7,0x04,
-0x76,0x08, 0xF0,0x05, 0x75,0xFC, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0x5C,0xD1, 0xF7,0x05, 0x75,0xF8, 0xF7,0x04, 0x76,0x48, 0xF3,0x06,
-0x72,0x18, 0xC0,0x3A, 0x32,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x5C,0xD1, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0E, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x5C,0xD0, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02,
-0x00,0x00, 0x20,0x2A, 0x00,0x02, 0xEE,0x00, 0x5D,0xB8, 0xF6,0x82, 0x00,0x00, 0xF6,0x84,
-0x35,0x28, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x02, 0xE6,0x00, 0x5D,0x8C, 0x05,0xB4, 0x00,0x08, 0x95,0x93, 0xFF,0xFC, 0x95,0x16,
-0xFF,0xEC, 0x95,0x96, 0xFF,0xE8, 0x96,0x96, 0xFF,0xE4, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x5E,0xDC, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xEC, 0x85,0x96, 0xFF,0xE8, 0x86,0x96,
-0xFF,0xE4, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x5D,0x7C, 0xF7,0x02, 0x00,0x00, 0x86,0x36,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x0F, 0xE2,0x00, 0x5D,0x61, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36,
-0x00,0x14, 0x87,0x36, 0x00,0x14, 0xE0,0x00, 0x5D,0x7C, 0xF7,0x02, 0x00,0x00, 0x76,0xB1,
-0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0x77,0x35, 0x00,0x05, 0xC7,0x38, 0x6A,0x00, 0xC7,0x38,
-0x60,0x00, 0x07,0x38, 0x00,0x10, 0xC7,0x2C, 0x70,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x5B,0xF8, 0xF7,0x05, 0x35,0x2C, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x4C, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x5D,0xAC, 0x07,0x34, 0x14,0x94, 0xF3,0x04,
-0x6F,0x44, 0xE0,0x00, 0x5D,0xB0, 0xF3,0x05, 0x35,0x28, 0xF7,0x05, 0x35,0x28, 0xE0,0x00,
-0x5C,0xD4, 0x05,0x28, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x5D,0xF1, 0xF3,0x02,
-0x00,0x01, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0D, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x5D,0xF4, 0xB3,0x3A, 0x68,0x02, 0xE0,0x00, 0x5D,0xF4, 0xF0,0x05, 0x2D,0x38, 0xF3,0x05,
-0x35,0x24, 0xF6,0x84, 0x35,0x28, 0xF7,0x04, 0x6F,0x44, 0xF3,0x06, 0x32,0xF4, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x5E,0x3C, 0xF3,0x05, 0x35,0x30, 0xF7,0x04, 0xE0,0x18, 0x00,0x00,
-0x00,0x01, 0x77,0xB8, 0x00,0x1F, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00, 0x5E,0x3D, 0x00,0x00,
-0x00,0x01, 0x0F,0x81, 0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x35,0x30, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x32,0xF4, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x35,0x30, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x33,0x80, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x35,0x30, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x34,0x0C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x35,0x30, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x34,0x98, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x86,0x16, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x32, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x0F, 0x86,0xB2, 0x00,0x00, 0xC5,0x38, 0x00,0x00, 0xEE,0x00,
-0x5F,0x2C, 0xC5,0xB4, 0x00,0x00, 0x20,0x36, 0x00,0x0F, 0xEE,0x00, 0x5F,0x2C, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEC,0x00, 0x5F,0x2D, 0x00,0x00, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xEC,0x00, 0x5F,0x48, 0x00,0x00, 0x00,0x01, 0x87,0x32, 0x00,0x0C, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x32, 0x00,0x0C, 0x87,0x32, 0x00,0x0C, 0xE0,0x00,
-0x5F,0x50, 0xF4,0x02, 0x00,0x00, 0xC0,0x2A, 0x5A,0x00, 0x44,0x0C, 0x00,0x01, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF6,0x86,
-0x35,0x60, 0x96,0x93, 0xFF,0xFC, 0xF6,0x86, 0x42,0x30, 0x96,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82, 0x66,0xF8, 0x96,0x93,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x17, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86, 0x35,0x60, 0x96,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82,
-0x69,0x80, 0x96,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x18, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86,
-0x35,0x60, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x82, 0x6B,0x50, 0x96,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x16, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x86, 0x35,0x60, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82, 0x61,0x78, 0x96,0x93, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x1F, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86, 0x35,0x60, 0x96,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82, 0x62,0x7C, 0x96,0x93,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x20, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86, 0x35,0x60, 0x96,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82,
-0x66,0xF8, 0x96,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x17, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86,
-0x35,0xEC, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x82, 0x69,0x80, 0x96,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x18, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x86, 0x35,0xEC, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82, 0x6B,0x50, 0x96,0x93, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x16, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86, 0x35,0xEC, 0x96,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82, 0x61,0x78, 0x96,0x93,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x1F, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86, 0x35,0xEC, 0x96,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF6,0x82,
-0x62,0x7C, 0x96,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x20, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86,
-0x35,0xEC, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x04, 0xE0,0x28, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x61,0x15, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0xE0,0x28, 0xE0,0x00, 0x61,0x18, 0x77,0x39,
-0x00,0x02, 0xF7,0x02, 0x00,0xF0, 0xF7,0x05, 0x42,0x28, 0xF7,0x06, 0x40,0x8A, 0xF0,0x3B,
-0x28,0x00, 0xF7,0x06, 0x40,0x8C, 0xF0,0x3B, 0x28,0x00, 0xF7,0x02, 0x00,0x00, 0xF7,0x05,
-0x7A,0xC0, 0xF7,0x05, 0x7A,0xB8, 0xF7,0x05, 0x7A,0xB0, 0xF7,0x05, 0x7A,0xC8, 0xF6,0x82,
-0xC3,0x50, 0x96,0x93, 0xFF,0xFC, 0xF6,0x82, 0x00,0x16, 0x96,0x93, 0xFF,0xFC, 0xF6,0x86,
-0x42,0x30, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF6,0x04,
-0x6F,0x34, 0x00,0x00, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x61,0xED, 0x76,0xB1,
-0x00,0x1E, 0x87,0x32, 0x00,0x00, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x20,0x3A, 0x00,0x07, 0xE6,0x00, 0x61,0xEC, 0x06,0xB0, 0x00,0x02, 0x87,0x36,
-0x00,0x00, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x20,0x3A, 0x00,0x01, 0xE6,0x00, 0x61,0xEC, 0xF5,0x06, 0x35,0xEC, 0xF7,0x04,
-0x42,0x30, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x52,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x62,0x11, 0xF5,0x82, 0x00,0x00, 0xF7,0x04, 0x42,0xA0, 0xF6,0x06,
-0x42,0xA2, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xE0,0x00, 0x62,0x68, 0xF7,0x33, 0x28,0x00, 0x87,0x32,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0xF7,0x05, 0xE0,0x00, 0x86,0xB2, 0x00,0x08, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x62,0x3C, 0xF6,0x85, 0xE0,0x04, 0x20,0x36, 0x00,0x00, 0xE6,0x00,
-0x62,0x40, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00,
-0x62,0x65, 0xF6,0x06, 0x42,0xA2, 0xF7,0x04, 0x42,0xA0, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0xF0,0x05, 0x42,0x28, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF7,0x04, 0x42,0x3C, 0xF6,0x84, 0x6F,0x34, 0x07,0x38, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xE6,0x00, 0x62,0xB1, 0xF7,0x05, 0x42,0x3C, 0x87,0x36, 0x00,0x00, 0xF5,0x9E,
-0x00,0x02, 0xC0,0x3A, 0x5A,0x00, 0xE6,0x00, 0x62,0xBD, 0xF5,0x86, 0x35,0xEC, 0xF7,0x04,
-0x42,0xA0, 0xE0,0x00, 0x62,0xDC, 0xF6,0x06, 0x42,0xA2, 0xF7,0x04, 0x42,0x30, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x5A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x62,0xF9, 0xF6,0x06, 0x42,0xA4, 0xF7,0x04, 0x42,0xA4, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xE0,0x00,
-0x63,0x0C, 0xF7,0x33, 0x28,0x00, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x63,0x20, 0x97,0x93, 0xFF,0xFC, 0xF0,0x05, 0x42,0x28, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x20, 0x83,0x16, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x87,0x1A, 0x00,0x18, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x63,0x6C, 0xF7,0x02, 0x00,0x00, 0x83,0x9A, 0x00,0x1C, 0x00,0x00, 0x00,0x01, 0xF3,0x85,
-0x7A,0xC0, 0x84,0x9A, 0x00,0x14, 0xF7,0x05, 0x7A,0xC8, 0xF4,0x85, 0x7A,0xB0, 0xF7,0x05,
-0x7A,0xB8, 0x83,0x16, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x86,0x9A, 0x00,0x14, 0xF7,0x04,
-0x7A,0xB0, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x63,0xD0, 0xF6,0x02,
-0x00,0x00, 0x86,0x9A, 0x00,0x1C, 0xF7,0x04, 0x7A,0xC0, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x63,0xD0, 0x00,0x00, 0x00,0x01, 0x86,0x9A, 0x00,0x18, 0xF7,0x04,
-0x7A,0xB8, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x63,0xD0, 0x00,0x00,
-0x00,0x01, 0x86,0x9A, 0x00,0x20, 0xF7,0x04, 0x7A,0xC8, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x20,0x3A, 0x00,0x64, 0xEE,0x00, 0x63,0xD9, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x64,0x58, 0x00,0x00, 0x00,0x01, 0x83,0x96,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x1E, 0x00,0x18, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x64,0x3C, 0xF7,0x02, 0x00,0x00, 0xF7,0x05, 0x40,0x80, 0xF7,0x05,
-0x40,0x84, 0xF6,0x84, 0x6E,0x50, 0xF4,0x82, 0xFF,0xFF, 0x83,0x1E, 0x00,0x0C, 0xF4,0x85,
-0x4F,0x54, 0x93,0x36, 0x00,0x10, 0x83,0x9E, 0x00,0x10, 0x84,0x96, 0x00,0x00, 0x93,0xB6,
-0x00,0x14, 0x84,0xA6, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0x94,0xB6, 0x1D,0xDC, 0xF6,0x82,
-0x00,0x64, 0xF6,0x85, 0x4A,0x98, 0xF7,0x05, 0x4A,0x9C, 0x83,0x16, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x87,0x1A, 0x00,0x20, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEE,0x00,
-0x64,0x7C, 0xF3,0x82, 0x00,0x00, 0xF7,0x04, 0x42,0xA4, 0xF6,0x06, 0x42,0xA6, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0x66,0xE4, 0xF7,0x33, 0x28,0x00, 0x93,0x96, 0xFF,0xF4, 0x84,0x16,
-0x00,0x00, 0xF4,0x86, 0x42,0xC8, 0x94,0x96, 0xFF,0xEC, 0xF3,0x02, 0x00,0x0C, 0x93,0x16,
-0xFF,0xE4, 0x83,0x96, 0x00,0x00, 0x84,0x96, 0xFF,0xF4, 0x87,0x1E, 0x00,0x20, 0x00,0x00,
-0x00,0x01, 0xC0,0x26, 0x72,0x00, 0xEC,0x00, 0x66,0x48, 0xF3,0x86, 0x4A,0x98, 0x84,0xA2,
-0x00,0x24, 0x83,0x16, 0xFF,0xE4, 0xC5,0x04, 0x00,0x00, 0xB4,0x9A, 0x38,0x02, 0xC7,0x18,
-0x38,0x00, 0x83,0x22, 0x00,0x28, 0x83,0x96, 0xFF,0xF4, 0x84,0x96, 0xFF,0xE4, 0x93,0x3A,
-0x00,0x04, 0x93,0xBA, 0x00,0x08, 0xF6,0x04, 0xE0,0x00, 0xF3,0x06, 0x4A,0x98, 0xA6,0xA6,
-0x30,0x02, 0xF5,0x82, 0x00,0x00, 0xC0,0x32, 0x6A,0x00, 0xE6,0x00, 0x65,0x10, 0xC6,0x38,
-0x00,0x00, 0xF6,0x84, 0xE0,0x04, 0x87,0x32, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x65,0x14, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0x65,0x21, 0x00,0x00, 0x00,0x01, 0xF5,0x02, 0x00,0x00, 0xF6,0x84,
-0xE0,0x00, 0x87,0x32, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0x65,0x5C, 0xF5,0x82, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x65,0x64, 0x20,0x2E,
-0x00,0x00, 0xF6,0x84, 0xE0,0x04, 0x87,0x32, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0x65,0x65, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0x65,0x75, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A,
-0x00,0x00, 0xE6,0x00, 0x65,0x88, 0x00,0x00, 0x00,0x01, 0x83,0x96, 0xFF,0xF4, 0x00,0x00,
-0x00,0x01, 0xF3,0x85, 0x4F,0x54, 0x87,0x22, 0x00,0x2C, 0x76,0xA1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x05,0xA0, 0x00,0x2E, 0x76,0x2D, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xF4,0x82,
-0x00,0x00, 0x94,0x96, 0xFF,0xDC, 0x83,0x16, 0xFF,0xEC, 0x20,0x26, 0x00,0x07, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x87,0x2E, 0x00,0x00, 0x06,0x98,
-0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xE2,0x00, 0x66,0x1C, 0xF7,0x37,
-0x28,0x00, 0x85,0x16, 0xFF,0xEC, 0x85,0x96, 0xFF,0xDC, 0x00,0x00, 0x00,0x01, 0xC7,0x2C,
-0x40,0x00, 0x86,0xBA, 0x00,0x30, 0x06,0x28, 0x00,0x04, 0x05,0x28, 0x00,0x02, 0x05,0xAC,
-0x00,0x02, 0x83,0x96, 0xFF,0xDC, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0x03,0x9C,
-0x00,0x01, 0x93,0x96, 0xFF,0xDC, 0x20,0x1E, 0x00,0x07, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB4,
-0xFF,0xF0, 0xE2,0x00, 0x65,0xE1, 0xF6,0xB3, 0x28,0x00, 0x04,0x20, 0x00,0x1C, 0x84,0x96,
-0xFF,0xEC, 0x83,0x16, 0xFF,0xE4, 0x83,0x96, 0xFF,0xF4, 0x04,0xA4, 0x00,0x14, 0x94,0x96,
-0xFF,0xEC, 0x03,0x18, 0x00,0x0C, 0x93,0x16, 0xFF,0xE4, 0x03,0x9C, 0x00,0x01, 0xE0,0x00,
-0x64,0x94, 0x93,0x96, 0xFF,0xF4, 0x84,0x96, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x26,
-0x00,0x20, 0x00,0x00, 0x00,0x01, 0xF7,0x05, 0x4A,0x9C, 0x85,0xA6, 0x00,0x20, 0xF7,0x04,
-0x7A,0xB8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x7A,0xB8, 0xF7,0x04,
-0x7A,0xB8, 0xF6,0x84, 0x7A,0xC8, 0x86,0x26, 0x00,0x18, 0xC6,0xB4, 0x58,0x00, 0x87,0x26,
-0x00,0x1C, 0x00,0x00, 0x00,0x01, 0x27,0x38, 0x00,0x01, 0xC0,0x32, 0x72,0x00, 0x47,0x0C,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x66,0xE5, 0xF6,0x85, 0x7A,0xC8, 0x83,0x26,
-0x00,0x08, 0xF7,0x04, 0x6E,0x50, 0xF3,0x05, 0x3B,0x64, 0x83,0xA6, 0x00,0x08, 0xF6,0x82,
-0x00,0x00, 0x93,0xBA, 0x1D,0xDC, 0x84,0xA6, 0x00,0x0C, 0x83,0x16, 0x00,0x00, 0x94,0xBA,
-0x00,0x10, 0x83,0x1A, 0x00,0x10, 0xF6,0x85, 0x7A,0xC8, 0x93,0x3A, 0x00,0x14, 0xF7,0x02,
-0x00,0x01, 0xF7,0x05, 0x40,0x84, 0xF6,0x85, 0x7A,0xC0, 0xF6,0x85, 0x7A,0xB8, 0xF6,0x85,
-0x7A,0xB0, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x08, 0xF3,0x84, 0x6F,0x34, 0x00,0x00, 0x00,0x01, 0x87,0x1E, 0x00,0x18, 0xF6,0x84,
-0xE0,0x1C, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x00, 0x67,0x29, 0xF7,0x02,
-0x00,0x01, 0xF7,0x02, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x67,0xE8, 0xF5,0x82,
-0x00,0x01, 0xF7,0x04, 0xE0,0x1C, 0x86,0x9E, 0x00,0x18, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x67,0xE9, 0xC5,0x84,
-0x00,0x00, 0x86,0x9E, 0x00,0x10, 0xF7,0x04, 0xE0,0x00, 0xF6,0x02, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x67,0x88, 0x05,0x1C, 0x00,0x10, 0x86,0x9E, 0x00,0x14, 0xF7,0x04,
-0xE0,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x67,0x8C, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x67,0x99, 0x00,0x00,
-0x00,0x01, 0xF5,0x82, 0x00,0x00, 0x86,0xAA, 0x00,0x00, 0xF7,0x04, 0xE0,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x67,0xD4, 0xF6,0x02, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x67,0xDC, 0x20,0x32, 0x00,0x00, 0x86,0xAA, 0x00,0x04, 0xF7,0x04,
-0xE0,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x67,0xDD, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x67,0xED, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x68,0x10, 0xF6,0x06,
-0x42,0x9C, 0xF7,0x04, 0x42,0x9C, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33, 0x28,0x00, 0xF7,0x04,
-0x75,0xF4, 0x75,0xAC, 0xFF,0xE1, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x68,0x45, 0x95,0x96,
-0xFF,0xF4, 0xF7,0x04, 0x42,0x98, 0xF6,0x06, 0x42,0x98, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0x87,0x1E, 0x00,0x20, 0x04,0x1C, 0x00,0x20, 0x76,0xA1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x20,0x3A, 0x00,0x08, 0xEE,0x00,
-0x68,0xC4, 0xF3,0x06, 0x15,0x54, 0xF5,0x02, 0x00,0x00, 0x05,0x9C, 0x00,0x22, 0xC4,0xAC,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x87,0x22, 0x00,0x00, 0x76,0xA1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC0,0x2A, 0x72,0x00, 0xEC,0x00,
-0x68,0xC0, 0xC6,0xA4, 0x60,0x00, 0xA7,0x26, 0x60,0x02, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x05,0x28, 0x00,0x01, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xE8, 0xF7,0x2F,
-0x68,0x00, 0x05,0xAC, 0x00,0x01, 0xE0,0x00, 0x68,0x78, 0x06,0x30, 0x00,0x02, 0xF3,0x06,
-0x15,0x54, 0x93,0x13, 0xFF,0xFC, 0xF7,0x04, 0xE0,0x24, 0x00,0x00, 0x00,0x01, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x04, 0xE0,0x1C, 0x00,0x00, 0x00,0x01, 0x97,0x13, 0xFF,0xFC, 0xF3,0x06,
-0xE0,0x00, 0x93,0x13, 0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0xF3,0x02, 0x00,0x01, 0x93,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xEE,0x64, 0x97,0x93, 0xFF,0xFC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x69,0x28, 0xF6,0x06, 0x42,0x9E, 0xF7,0x04, 0x42,0x9C, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x83,0x16, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x20,0x1A,
-0x00,0x00, 0xE6,0x00, 0x69,0x6C, 0xF3,0x06, 0x35,0xEC, 0xF7,0x04, 0x42,0x30, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x32,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x69,0x6D, 0xF0,0x05, 0x42,0x28, 0xF3,0x06, 0x35,0x60, 0xF3,0x05, 0x42,0x30, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x04, 0xF5,0x04, 0x6F,0x34, 0xF7,0x04,
-0x42,0x40, 0x86,0x2A, 0x00,0x18, 0x07,0x38, 0x00,0x01, 0xF6,0x84, 0xE0,0x1C, 0xF7,0x05,
-0x42,0x40, 0xC0,0x36, 0x62,0x00, 0xEC,0x00, 0x69,0xB5, 0xF7,0x02, 0x00,0x01, 0xF7,0x02,
-0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x6A,0x80, 0xF7,0x02, 0x00,0x01, 0xF7,0x04,
-0xE0,0x1C, 0x86,0xAA, 0x00,0x18, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x6A,0x7D, 0xC5,0x84, 0x00,0x00, 0x86,0xAA,
-0x00,0x10, 0xF7,0x04, 0xE0,0x00, 0xF6,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x6A,0x14, 0x04,0xA8, 0x00,0x10, 0x86,0xAA, 0x00,0x14, 0xF7,0x04, 0xE0,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x6A,0x18, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x6A,0x25, 0x00,0x00, 0x00,0x01, 0xF5,0x82,
-0x00,0x00, 0x86,0xA6, 0x00,0x00, 0xF7,0x04, 0xE0,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0x6A,0x60, 0xF6,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x6A,0x68, 0x20,0x32, 0x00,0x00, 0x86,0xA6, 0x00,0x04, 0xF7,0x04, 0xE0,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x6A,0x69, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x6A,0x81, 0xC7,0x2C, 0x00,0x00, 0xF5,0x82,
-0x00,0x01, 0xE0,0x00, 0x6A,0x80, 0xC7,0x2C, 0x00,0x00, 0xC7,0x04, 0x00,0x00, 0x20,0x3A,
-0x00,0x00, 0xEE,0x00, 0x6B,0x3D, 0xF6,0x86, 0x40,0x8A, 0xF7,0x04, 0x40,0x88, 0x76,0xB5,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x6B,0x3C, 0xF6,0x82, 0x00,0x00, 0xF6,0x85, 0x40,0x80, 0xF6,0x85,
-0x40,0x84, 0x96,0x93, 0xFF,0xFC, 0x96,0x93, 0xFF,0xFC, 0xF7,0x04, 0xE0,0x1C, 0x00,0x00,
-0x00,0x01, 0x97,0x13, 0xFF,0xFC, 0xF3,0x86, 0xE0,0x00, 0x93,0x93, 0xFF,0xFC, 0x95,0x13,
-0xFF,0xFC, 0xF3,0x82, 0x00,0x02, 0x93,0x93, 0xFF,0xFC, 0x96,0x96, 0xFF,0xF4, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xEE,0x64, 0x97,0x93, 0xFF,0xFC, 0xF4,0x05, 0x40,0x84, 0x86,0x96,
-0xFF,0xF4, 0xF7,0x04, 0x6E,0x50, 0xF3,0x86, 0x35,0xEC, 0xF6,0x85, 0x40,0x90, 0xF6,0x85,
-0x40,0x94, 0x87,0x3A, 0x1D,0xDC, 0xF6,0x85, 0x42,0x28, 0xF7,0x05, 0x3B,0x64, 0xF7,0x04,
-0x42,0x30, 0xF4,0x05, 0x40,0x80, 0xC0,0x3A, 0x3A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x6B,0x3D, 0xF3,0x86, 0x35,0x60, 0xF3,0x85, 0x42,0x30, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF4,0x86, 0x42,0x30, 0x94,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x6D,0xD9, 0xF5,0x82, 0x00,0x00, 0xF7,0x04, 0x40,0x8C, 0xF6,0x06, 0x40,0x8C, 0x76,0x31,
-0x00,0x1E, 0xF6,0x84, 0x42,0x28, 0x76,0x30, 0xFF,0xE5, 0x06,0xB4, 0x00,0x01, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x6B,0xC8, 0xF6,0x85,
-0x42,0x28, 0xF7,0x04, 0x40,0x88, 0xF6,0x86, 0x40,0x8A, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x6D,0x0D, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x40,0x8C, 0xF6,0x86, 0x40,0x8C, 0x76,0xB5,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x6C,0x35, 0xF6,0x06, 0x40,0x8A, 0xF7,0x04, 0x40,0x88, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x6C,0x34, 0xF4,0x86, 0x36,0x78, 0xF7,0x04, 0x42,0x44, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x4A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x6C,0x35, 0xF4,0x82, 0x00,0x01, 0xF4,0xB3, 0x28,0x00, 0xE0,0x00, 0x6D,0x10, 0xF0,0x05,
-0x42,0x2C, 0xF7,0x04, 0x40,0x8C, 0xF5,0x06, 0x40,0x8C, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x6C,0xC1, 0xF6,0x06, 0x40,0x8A, 0xF7,0x04, 0x40,0x88, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x6C,0xC1, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x2C, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0x20,0x3A, 0x00,0x09, 0xEE,0x00, 0x6D,0x11, 0xF7,0x05, 0x42,0x2C, 0xF0,0x2B,
-0x28,0x00, 0xF0,0x33, 0x28,0x00, 0xF5,0x82, 0x00,0x01, 0xF7,0x04, 0x42,0x94, 0xF6,0x06,
-0x42,0x94, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xE0,0x00, 0x6D,0x10, 0xF7,0x33, 0x28,0x00, 0xF7,0x04,
-0x40,0x8C, 0xF6,0x86, 0x40,0x8C, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x6D,0x14, 0x20,0x2E,
-0x00,0x00, 0xF7,0x04, 0x40,0x88, 0xF6,0x06, 0x40,0x8A, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x6D,0x15, 0x20,0x2E, 0x00,0x00, 0xF0,0x33, 0x28,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0x6D,0xB5, 0xF4,0x86, 0x35,0xEC, 0xF7,0x04, 0x42,0x30, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x4A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x6D,0x59, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0xE0,0x28, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x6D,0x79, 0xF6,0x82, 0x00,0x3C, 0xF6,0x84, 0xE0,0x28, 0xE0,0x00,
-0x6D,0x78, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0xE0,0x28, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x6D,0x79, 0xF6,0x82, 0x00,0xF0, 0xF7,0x04, 0xE0,0x28, 0x00,0x00,
-0x00,0x01, 0x76,0xB9, 0x00,0x02, 0xF7,0x04, 0x42,0x28, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x6A,0x00, 0xEC,0x00, 0x6D,0xB5, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0xF0,0x05,
-0x42,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82,
-0x00,0x19, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x6D,0xB4, 0xB4,0xBA, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF4,0x82, 0xC3,0x50, 0x94,0x93, 0xFF,0xFC, 0xF4,0x82, 0x00,0x16, 0x94,0x93,
-0xFF,0xFC, 0xF4,0x86, 0x42,0x30, 0x94,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x1E,0xC0, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x04, 0xF5,0x86, 0x36,0x78, 0x95,0x93, 0xFF,0xFC, 0xF5,0x86,
-0x42,0x44, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x82, 0x74,0x18, 0x95,0x93, 0xFF,0xFC, 0xF5,0x82, 0x00,0x19, 0x95,0x93,
-0xFF,0xFC, 0xF5,0x86, 0x36,0x78, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0x74,0xAC, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x1D, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x37,0x04, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0x78,0x00, 0x95,0x93,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x1B, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x37,0x04, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82,
-0x78,0xFC, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1A, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86,
-0x37,0x90, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x82, 0x80,0xD8, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1B, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x86, 0x37,0x90, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0x81,0x74, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x1D, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x38,0x1C, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0x87,0x74, 0x95,0x93,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x1B, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x38,0x1C, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82,
-0x94,0xF8, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1B, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86,
-0x39,0x34, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x82, 0x8A,0x00, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x86, 0x39,0x34, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0x8E,0x08, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x1A, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x39,0x34, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0x96,0x9C, 0x95,0x93,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x1E, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x38,0xA8, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82,
-0x9B,0x2C, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1B, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86,
-0x38,0xA8, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x82, 0xA2,0xDC, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1E, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x86, 0x3A,0xD8, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0x9E,0x54, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x1B, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x3A,0xD8, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0xA3,0xC0, 0x95,0x93,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x39,0xC0, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82,
-0xA7,0x64, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1E, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86,
-0x39,0xC0, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x82, 0xAA,0x04, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82, 0x00,0x1B, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x86, 0x39,0xC0, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x82, 0xAE,0xF8, 0x95,0x93, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x3A,0x4C, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x42,0x50, 0xF0,0x3B,
-0x28,0x00, 0xF7,0x06, 0x40,0x88, 0xF0,0x3B, 0x28,0x00, 0xF6,0x02, 0x00,0x00, 0xF6,0x05,
-0x40,0x80, 0xF6,0x05, 0x40,0x84, 0xF7,0x06, 0x3B,0x70, 0xF6,0x3B, 0x28,0x00, 0xF7,0x06,
-0x3B,0x72, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82, 0xCA,0x20, 0xF5,0x85, 0x3B,0x74, 0xF7,0x06,
-0x3B,0x78, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06, 0x3B,0x7A, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82,
-0xB1,0x94, 0xF5,0x85, 0x3B,0x7C, 0xF7,0x06, 0x3B,0x80, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06,
-0x3B,0x82, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82, 0xC7,0x54, 0xF5,0x85, 0x3B,0x84, 0xF7,0x06,
-0x3B,0x88, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06, 0x3B,0x8A, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82,
-0xBE,0xF8, 0xF5,0x85, 0x3B,0x8C, 0xF7,0x06, 0x3B,0x90, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06,
-0x3B,0x92, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82, 0xC8,0xF8, 0xF5,0x85, 0x3B,0x94, 0xF7,0x06,
-0x3B,0x98, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06, 0x3B,0x9A, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82,
-0xC5,0xD8, 0xF5,0x85, 0x3B,0x9C, 0xF7,0x06, 0x3B,0xA0, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06,
-0x3B,0xA2, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82, 0xC7,0x70, 0xF5,0x85, 0x3B,0xA4, 0xF7,0x06,
-0x3B,0xA8, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06, 0x3B,0xAA, 0xF0,0xBB, 0x28,0x00, 0xF5,0x82,
-0xC1,0xB4, 0xF5,0x85, 0x3B,0xAC, 0x96,0x16, 0xFF,0xF4, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD5,0x40, 0x97,0x93, 0xFF,0xFC, 0xF6,0x84, 0x6E,0x50, 0x86,0x16, 0xFF,0xF4, 0x00,0x00,
-0x00,0x01, 0x96,0x36, 0x1D,0xDC, 0xF6,0x05, 0x3B,0x64, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x30, 0x25,0x94, 0x00,0x20, 0xF0,0x2F,
-0x28,0x00, 0x26,0x14, 0x00,0x38, 0xF0,0x33, 0x28,0x00, 0x90,0x13, 0xFF,0xFC, 0xF7,0x04,
-0x42,0x50, 0xF6,0x86, 0x42,0x50, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x97,0x13, 0xFF,0xFC, 0x96,0x13, 0xFF,0xFC, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xF5,0xF4, 0x97,0x93, 0xFF,0xFC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x72,0x1D, 0xF5,0x02, 0x17,0x70, 0xF7,0x04, 0x42,0x54, 0x00,0x00,
-0x00,0x01, 0x27,0x38, 0x00,0x01, 0xF7,0x05, 0x42,0x54, 0x95,0x13, 0xFF,0xFC, 0xF5,0x02,
-0x00,0x1B, 0x95,0x13, 0xFF,0xFC, 0xF5,0x06, 0x42,0x44, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04, 0xE0,0x04, 0x86,0x16, 0x00,0x00, 0xF6,0x82,
-0x00,0xFF, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38, 0x6C,0x00, 0xF7,0x33, 0x28,0x00, 0xF7,0x06,
-0xE0,0x06, 0x87,0x3A, 0x00,0x00, 0x06,0xB0, 0x00,0x02, 0xF7,0x37, 0x28,0x00, 0xF6,0x84,
-0x3B,0x64, 0x07,0x30, 0x00,0x04, 0xF6,0xBB, 0x28,0x00, 0x87,0x02, 0xFF,0x34, 0x06,0x30,
-0x00,0x06, 0xF7,0x33, 0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x30, 0x26,0x14, 0x00,0x20, 0xF0,0x33, 0x28,0x00, 0x27,0x14,
-0x00,0x38, 0xF0,0x3B, 0x28,0x00, 0x97,0x13, 0xFF,0xFC, 0x90,0x93, 0xFF,0xFC, 0xF7,0x04,
-0x42,0x50, 0xF6,0x86, 0x42,0x50, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x97,0x13, 0xFF,0xFC, 0x96,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xF3,0x38, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x73,0x19, 0xF5,0x82, 0x17,0x70, 0xF7,0x04, 0x42,0x54, 0x00,0x00, 0x00,0x01, 0x27,0x38,
-0x00,0x01, 0xF7,0x05, 0x42,0x54, 0x95,0x93, 0xFF,0xFC, 0xF5,0x82, 0x00,0x1B, 0x95,0x93,
-0xFF,0xFC, 0xF5,0x86, 0x42,0x44, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x1E,0xC0, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x40, 0x26,0x14, 0x00,0x20, 0x96,0x16, 0xFF,0xC4, 0xF0,0x33,
-0x28,0x00, 0x90,0x13, 0xFF,0xFC, 0x96,0x13, 0xFF,0xFC, 0x26,0x14, 0x00,0x38, 0x96,0x16,
-0xFF,0xBC, 0x96,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93,
-0xFF,0xFC, 0x90,0x13, 0xFF,0xFC, 0xF7,0x04, 0x42,0x50, 0xF6,0x86, 0x42,0x50, 0x76,0xB5,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x97,0x13,
-0xFF,0xFC, 0x86,0x16, 0xFF,0xBC, 0x00,0x00, 0x00,0x01, 0x96,0x13, 0xFF,0xFC, 0x86,0x16,
-0xFF,0xC4, 0x00,0x00, 0x00,0x01, 0x96,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xF5,0xF4, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x73,0xE5, 0xF6,0x02,
-0x17,0x70, 0xF7,0x04, 0x42,0x54, 0x00,0x00, 0x00,0x01, 0x27,0x38, 0x00,0x01, 0xF7,0x05,
-0x42,0x54, 0x96,0x13, 0xFF,0xFC, 0xF6,0x02, 0x00,0x1B, 0x96,0x13, 0xFF,0xFC, 0xF6,0x06,
-0x42,0x44, 0x96,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x04, 0xF5,0x82, 0x00,0x00, 0xF5,0x85, 0x40,0x80, 0x95,0x96, 0xFF,0xF4, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCB,0x50, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xF4, 0xF5,0x02,
-0x00,0x64, 0xF5,0x05, 0x3B,0xB4, 0xF7,0x04, 0x42,0x50, 0xF4,0x86, 0x42,0x50, 0x76,0xA5,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF6,0x04, 0x4F,0x5C, 0xF4,0x02, 0x00,0x06, 0xF4,0x05,
-0x42,0x54, 0xF5,0x85, 0x3B,0x6C, 0xF5,0x85, 0x3B,0xB8, 0x95,0x32, 0x00,0x00, 0x95,0xB2,
-0x00,0x04, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x27,
-0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x71,0xB0, 0x97,0x93, 0xFF,0xFC, 0xF4,0x06,
-0x37,0x04, 0xF4,0x05, 0x42,0x44, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x50, 0xF7,0x04, 0x42,0x50, 0xF6,0x86, 0x42,0x50, 0x76,0xB5,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF6,0x04, 0x6F,0x34, 0xC7,0x38, 0x6F,0xC0, 0x86,0xB2,
-0x00,0x0C, 0x77,0x39, 0xFF,0xF0, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x77,0xEC, 0xC5,0x04,
-0x00,0x00, 0x86,0xB2, 0x00,0x10, 0xF7,0x04, 0xE0,0x00, 0xF3,0x02, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x75,0x18, 0x04,0xB0, 0x00,0x10, 0x86,0xB2, 0x00,0x14, 0xF7,0x04,
-0xE0,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x75,0x1C, 0x20,0x1A,
-0x00,0x00, 0xF3,0x02, 0x00,0x01, 0x20,0x1A, 0x00,0x00, 0xE6,0x00, 0x75,0x29, 0x00,0x00,
-0x00,0x01, 0xF5,0x02, 0x00,0x00, 0x86,0xA6, 0x00,0x00, 0xF7,0x04, 0xE0,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x75,0x64, 0xF6,0x02, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x75,0x6C, 0x20,0x32, 0x00,0x00, 0x86,0xA6, 0x00,0x04, 0xF7,0x04,
-0xE0,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x75,0x6D, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x75,0x7D, 0x20,0x2A,
-0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0x77,0xEC, 0x00,0x00,
-0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0x26,0x14,
-0x00,0x20, 0xF0,0x33, 0x28,0x00, 0x04,0xA0, 0x00,0x02, 0xF0,0x27, 0x28,0x00, 0xF5,0x82,
-0x00,0x00, 0x23,0x94, 0x00,0x22, 0xF5,0x9F, 0x28,0x00, 0x03,0xA0, 0x00,0x1A, 0x93,0x96,
-0xFF,0xD4, 0x25,0x94, 0x00,0x22, 0x85,0xAE, 0x00,0x00, 0x77,0xAD, 0x00,0x1E, 0x77,0xBC,
-0xFF,0xE5, 0xC5,0xAC, 0x7F,0xC0, 0x75,0xAD, 0xFF,0xF0, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x06,0xA4, 0x00,0x02, 0x23,0x14, 0x00,0x1E, 0x75,0x15, 0x00,0x1E, 0xF5,0x9F,
-0x28,0x00, 0xF3,0x84, 0xE0,0x00, 0x75,0x28, 0xFF,0xE5, 0x93,0xA2, 0x00,0x1C, 0xF5,0x84,
-0xE0,0x04, 0x73,0x99, 0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96, 0xFF,0xAC, 0x73,0x95,
-0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96, 0xFF,0xCC, 0x23,0x94, 0x00,0x42, 0x95,0xA2,
-0x00,0x20, 0x87,0x16, 0xFF,0xE0, 0x75,0x95, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x95,0x96,
-0xFF,0xB4, 0x75,0x95, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x95,0x96, 0xFF,0xC4, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0xF4,0x84, 0x4F,0x58, 0x87,0x1A,
-0x00,0x00, 0xC4,0xA0, 0x4A,0x00, 0x74,0xA4, 0xFF,0xFA, 0xC5,0xA4, 0x00,0x00, 0xF5,0x9F,
-0x28,0x00, 0x83,0x96, 0xFF,0xAC, 0x23,0x14, 0x00,0x1A, 0x76,0x19, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x85,0x96, 0xFF,0xB4, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xE4, 0x83,0x96, 0xFF,0xCC, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xE8, 0x23,0x14, 0x00,0x16, 0x76,0x19, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xEC, 0x23,0x14, 0x00,0x12, 0x76,0x19,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x85,0x96, 0xFF,0xC4, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x16, 0xFF,0xF0, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0xF3,0x82,
-0x00,0x02, 0xF3,0xA3, 0x28,0x00, 0x04,0x20, 0x00,0x18, 0x25,0x94, 0x00,0x22, 0x85,0xAE,
-0x00,0x00, 0x77,0xAD, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC5,0xAC, 0x7F,0xC0, 0x75,0xAD,
-0xFF,0xF0, 0x83,0x96, 0xFF,0xD4, 0xF5,0xA3, 0x28,0x00, 0xF4,0x9F, 0x28,0x00, 0x25,0x94,
-0x00,0x42, 0x85,0xAE, 0x00,0x00, 0x77,0xAD, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC5,0xAC,
-0x7F,0xC0, 0x75,0xAD, 0xFF,0xF0, 0x44,0xAD, 0x00,0x00, 0x94,0x93, 0xFF,0xFC, 0xF7,0x86,
-0xE0,0x00, 0x97,0x93, 0xFF,0xFC, 0xF3,0x84, 0x4F,0x5C, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x23,0x40, 0x97,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x78,0xD8, 0x97,0x93, 0xFF,0xFC, 0xF0,0x05, 0x40,0x84, 0xF7,0x86,
-0xE0,0x00, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD5,0xA0, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x04, 0x6E,0x50, 0xF4,0x05, 0x40,0x84, 0x87,0x3A, 0x1D,0xDC, 0x00,0x00,
-0x00,0x01, 0xF7,0x05, 0x3B,0x64, 0xF5,0x86, 0x36,0x78, 0xF5,0x85, 0x42,0x44, 0xF3,0x86,
-0x35,0x60, 0xF3,0x85, 0x42,0x30, 0xF5,0x86, 0x42,0x44, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x1F,0x48, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF5,0x86, 0x42,0x44, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x78,0x89, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xEE,0x00, 0x78,0x51, 0xF6,0x06, 0x42,0x50, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x71,0xB0, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x78,0x88, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x42,0x50, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF5,0x82, 0x00,0x06, 0xF5,0x85,
-0x42,0x54, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x72,0xAC, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86,
-0x37,0x90, 0xF5,0x85, 0x42,0x44, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF6,0x06, 0x36,0x78, 0xF6,0x05, 0x42,0x44, 0xF7,0x02, 0x00,0x00, 0xF7,0x05,
-0x40,0x80, 0xF7,0x05, 0x40,0x94, 0xF6,0x84, 0x6E,0x50, 0xF7,0x05, 0x40,0x90, 0x97,0x36,
-0x1D,0xDC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x02,
-0x00,0x01, 0xF7,0x05, 0x40,0x80, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0xA8, 0xF7,0x04, 0x42,0x50, 0xF5,0x86, 0x42,0x50, 0x76,0xAD,
-0x00,0x1E, 0xF4,0x84, 0x6F,0x34, 0x76,0xB4, 0xFF,0xE5, 0x94,0x96, 0xFF,0xC4, 0xC7,0x38,
-0x6F,0xC0, 0x86,0xA6, 0x00,0x0C, 0x77,0x39, 0xFF,0xF0, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x79,0x55, 0xF6,0x06, 0x42,0x9A, 0xF7,0x04, 0x42,0x98, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0xF7,0x04, 0x42,0x50, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x85,0x16,
-0xFF,0xC4, 0xC7,0x38, 0x6F,0xC0, 0x86,0xAA, 0x00,0x0C, 0x77,0x39, 0xFF,0xF0, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x80,0xA8, 0xF6,0x06, 0x42,0x9A, 0x87,0x2A, 0x00,0x10, 0x86,0x2A,
-0x00,0x1C, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x79,0xA8, 0xF6,0x82, 0x00,0x00, 0x87,0x2A,
-0x00,0x14, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x79,0xAC, 0x20,0x36,
-0x00,0x00, 0xF6,0x82, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0x7A,0x05, 0x24,0x94,
-0x00,0x20, 0x94,0x96, 0xFF,0xBC, 0x85,0x16, 0xFF,0xC4, 0xF0,0x27, 0x28,0x00, 0x05,0x28,
-0x00,0x10, 0x95,0x16, 0xFF,0xB4, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x72,0x50, 0x97,0x93, 0xFF,0xFC, 0x84,0x96, 0xFF,0xB4, 0x00,0x00, 0x00,0x01, 0x94,0x93,
-0xFF,0xFC, 0x85,0x16, 0xFF,0xBC, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xF9,0x34, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x80,0xC4, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x80,0x6C, 0x00,0x00, 0x00,0x01, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0x25,0x94, 0x00,0x20, 0xF0,0x2F,
-0x28,0x00, 0x04,0xA0, 0x00,0x02, 0x94,0x96, 0xFF,0x5C, 0xF0,0x27, 0x28,0x00, 0xF4,0x82,
-0x00,0x00, 0x25,0x14, 0x00,0x5A, 0xF4,0xAB, 0x28,0x00, 0x07,0x20, 0x00,0x1A, 0x25,0x14,
-0x00,0x5A, 0x85,0x2A, 0x00,0x00, 0x77,0xA9, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC5,0x28,
-0x7F,0xC0, 0x75,0x29, 0xFF,0xF0, 0x75,0xAD, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x23,0x14,
-0x00,0x1E, 0x76,0x19, 0x00,0x1E, 0xF5,0x3B, 0x28,0x00, 0xF4,0x84, 0xE0,0x00, 0x76,0x30,
-0xFF,0xE5, 0x94,0xA2, 0x00,0x1C, 0xF5,0x04, 0xE0,0x04, 0x84,0x96, 0xFF,0x5C, 0x95,0x22,
-0x00,0x20, 0x87,0x16, 0xFF,0xE0, 0x06,0xA4, 0x00,0x02, 0x75,0x15, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0x95,0x16, 0xFF,0x54, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96,
-0xFF,0x9C, 0x75,0x15, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x95,0x16, 0xFF,0x94, 0x74,0x95,
-0x00,0x1E, 0x85,0x16, 0xFF,0x5C, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFF,0x8C, 0x84,0x96,
-0xFF,0x54, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x85,0x16, 0xFF,0x9C, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xE4, 0x23,0x14, 0x00,0x1A, 0x76,0x19,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x84,0x96, 0xFF,0x94, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16,
-0xFF,0xE8, 0x23,0x14, 0x00,0x16, 0x76,0x19, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xEC, 0x23,0x14, 0x00,0x12, 0x76,0x19, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x85,0x16, 0xFF,0x8C, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x16, 0xFF,0xF0, 0x06,0xB4, 0x00,0x02, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0xF4,0x82, 0x00,0x02, 0xF4,0xA3,
-0x28,0x00, 0x25,0x14, 0x00,0x5A, 0x85,0x2A, 0x00,0x00, 0x77,0xA9, 0x00,0x1E, 0x77,0xBC,
-0xFF,0xE5, 0xC5,0x28, 0x7F,0xC0, 0x75,0x29, 0xFF,0xF0, 0x07,0x20, 0x00,0x18, 0xF5,0x3B,
-0x28,0x00, 0x94,0x16, 0xFF,0xAC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93,
-0xFF,0xFC, 0x26,0x14, 0x00,0x38, 0x24,0x94, 0x00,0x5A, 0x84,0xA6, 0x00,0x00, 0x77,0xA5,
-0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC4,0xA4, 0x7F,0xC0, 0x74,0xA5, 0xFF,0xF0, 0x05,0xA0,
-0x00,0x02, 0x06,0xAC, 0x00,0x02, 0x23,0x94, 0x00,0x36, 0x75,0x1D, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0x07,0x20, 0x00,0x1A, 0xF4,0xB3, 0x28,0x00, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x95,0x16, 0xFF,0x54, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96,
-0xFF,0x5C, 0x75,0x15, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x95,0x16, 0xFF,0x7C, 0x74,0x95,
-0x00,0x1E, 0x85,0x16, 0xFF,0xC4, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFF,0x74, 0x85,0x2A,
-0x00,0x34, 0x24,0x94, 0x00,0x5A, 0x95,0x16, 0xFF,0x84, 0x84,0xA6, 0x00,0x00, 0x77,0xA5,
-0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC4,0xA4, 0x7F,0xC0, 0x74,0xA5, 0xFF,0xF0, 0x25,0x14,
-0x00,0x5A, 0xF4,0xAF, 0x28,0x00, 0x85,0x2A, 0x00,0x00, 0x77,0xA9, 0x00,0x1E, 0x77,0xBC,
-0xFF,0xE5, 0xC5,0x28, 0x7F,0xC0, 0x75,0x29, 0xFF,0xF0, 0x84,0x96, 0xFF,0xC4, 0xF5,0x3B,
-0x28,0x00, 0x84,0xA6, 0x00,0x10, 0x85,0x16, 0xFF,0xC4, 0x94,0xA2, 0x00,0x1C, 0x85,0x2A,
-0x00,0x14, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFF,0x6C, 0x95,0x22,
-0x00,0x20, 0x87,0x16, 0xFF,0xC8, 0x85,0x16, 0xFF,0x54, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x87,0x1E, 0x00,0x00, 0x84,0x96, 0xFF,0x5C, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16,
-0xFF,0xCC, 0x23,0x94, 0x00,0x32, 0x76,0x1D, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x85,0x16,
-0xFF,0x7C, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1E,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xD0, 0x23,0x94, 0x00,0x2E, 0x76,0x1D,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1E, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x84,0x96, 0xFF,0x74, 0x85,0x16,
-0xFF,0x6C, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xD4, 0x23,0x94, 0x00,0x2A, 0x76,0x1D, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1E,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x16, 0xFF,0xD8, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x57,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0xF4,0x82, 0x00,0x02, 0xF4,0xA3, 0x28,0x00, 0x07,0x20,
-0x00,0x18, 0x25,0x14, 0x00,0x7A, 0x85,0x2A, 0x00,0x00, 0x77,0xA9, 0x00,0x1E, 0x77,0xBC,
-0xFF,0xE5, 0xC5,0x28, 0x7F,0xC0, 0x75,0x29, 0xFF,0xF0, 0x84,0x96, 0xFF,0xC4, 0xF5,0x3B,
-0x28,0x00, 0x87,0x26, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x24, 0xF7,0x04,
-0x4F,0x58, 0xE6,0x00, 0x7E,0xF9, 0x94,0x16, 0xFF,0x54, 0xC7,0x20, 0x72,0x00, 0xF6,0x84,
-0x6E,0x50, 0x86,0x26, 0x00,0x2C, 0x77,0x38, 0xFF,0xFA, 0x25,0x14, 0x00,0x5A, 0x84,0x2A,
-0x00,0x00, 0x77,0xA9, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC4,0x20, 0x7F,0xC0, 0x74,0x21,
-0xFF,0xF0, 0x47,0x39, 0x00,0x00, 0x86,0xB6, 0x1D,0xDC, 0x77,0x39, 0x00,0x02, 0xC0,0x32,
-0x6A,0x00, 0x46,0x8C, 0x00,0x01, 0xD6,0x80, 0x0A,0x68, 0x20,0x36, 0x00,0x00, 0xF6,0x86,
-0x40,0x98, 0xE6,0x00, 0x7E,0xC0, 0xC3,0xB8, 0x68,0x00, 0xC5,0x84, 0x00,0x00, 0x86,0xA6,
-0x00,0x24, 0xF7,0x04, 0xE0,0x00, 0xF6,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x7E,0x54, 0x03,0x24, 0x00,0x24, 0x86,0xA6, 0x00,0x28, 0xF7,0x04, 0xE0,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x7E,0x58, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x7E,0x65, 0x00,0x00, 0x00,0x01, 0xF5,0x82,
-0x00,0x00, 0x86,0x9A, 0x00,0x00, 0xF7,0x04, 0xE0,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0x7E,0xA0, 0xF6,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x7E,0xA8, 0x20,0x32, 0x00,0x00, 0x86,0x9A, 0x00,0x04, 0xF7,0x04, 0xE0,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x7E,0xA9, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x7E,0xB9, 0x20,0x2E, 0x00,0x00, 0xF5,0x82,
-0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x7E,0xC5, 0x00,0x00, 0x00,0x01, 0xF4,0x02,
-0x00,0x01, 0xF7,0x04, 0x4F,0x58, 0xF4,0x1F, 0x28,0x00, 0x84,0x96, 0xFF,0x54, 0x85,0x16,
-0xFF,0xC4, 0xF6,0x86, 0x40,0x9A, 0xC7,0x24, 0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0x86,0x2A,
-0x00,0x30, 0x47,0x39, 0x00,0x00, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0xE0,0x00,
-0x7F,0x4C, 0xF6,0x3B, 0x28,0x00, 0x84,0x96, 0xFF,0x54, 0xF6,0x06, 0x40,0x98, 0xC7,0x24,
-0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0xC6,0xB8, 0x00,0x00, 0x46,0xB5, 0x00,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x60,0x00, 0xF5,0x02, 0x00,0x01, 0xF5,0x37, 0x28,0x00, 0x47,0x39,
-0x00,0x00, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x60,0x00, 0x24,0x94, 0x00,0x5A, 0x84,0xA6,
-0x00,0x00, 0x77,0xA5, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC4,0xA4, 0x7F,0xC0, 0x74,0xA5,
-0xFF,0xF0, 0x07,0x38, 0x00,0x02, 0xF4,0xBB, 0x28,0x00, 0xF7,0x04, 0x4F,0x58, 0x85,0x16,
-0xFF,0x54, 0x84,0x96, 0xFF,0xAC, 0xC6,0xA8, 0x72,0x00, 0x76,0xB4, 0xFF,0xFA, 0x06,0x24,
-0x00,0x1A, 0xF6,0xB3, 0x28,0x00, 0xC7,0x24, 0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0x06,0xA8,
-0x00,0x1A, 0xF7,0x37, 0x28,0x00, 0x47,0x39, 0x00,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x24,
-0x00,0x1C, 0x97,0x13, 0xFF,0xFC, 0xF5,0x04, 0x4F,0x5C, 0x00,0x00, 0x00,0x01, 0x95,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x23,0x40, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04,
-0x4F,0x58, 0x84,0x96, 0xFF,0x54, 0x00,0x00, 0x00,0x01, 0xC7,0x24, 0x72,0x00, 0x77,0x38,
-0xFF,0xFA, 0x47,0x39, 0x00,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x24, 0x00,0x1C, 0x97,0x13,
-0xFF,0xFC, 0xF5,0x04, 0x4F,0x5C, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x23,0x40, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x78,0xD8, 0x97,0x93, 0xFF,0xFC, 0xF6,0x84, 0x6E,0x50, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x1D,0xDC, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x36, 0x1D,0xDC, 0x87,0x36,
-0x1D,0xDC, 0xF0,0x05, 0x40,0x84, 0xF4,0x86, 0xE0,0x00, 0x94,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xD5,0xA0, 0x97,0x93, 0xFF,0xFC, 0xF4,0x05, 0x40,0x84, 0xF7,0x04,
-0x6E,0x50, 0xF0,0x05, 0x42,0x5C, 0x87,0x3A, 0x1D,0xDC, 0xF6,0x86, 0x2C,0x28, 0xF7,0x05,
-0x3B,0x64, 0xF7,0x04, 0x2D,0x38, 0xF5,0x06, 0x3A,0x4C, 0xF5,0x05, 0x42,0x44, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82, 0x00,0x1C, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x80,0x60, 0xB4,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x06,
-0x35,0xEC, 0xE0,0x00, 0x80,0x8C, 0xF5,0x05, 0x42,0x30, 0x20,0x32, 0x00,0x01, 0xE6,0x00,
-0x80,0xC4, 0x00,0x00, 0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93,
-0xFF,0xFC, 0xF4,0x86, 0x35,0x60, 0xF4,0x85, 0x42,0x30, 0xF5,0x06, 0x42,0x44, 0x95,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1F,0x48, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00,
-0x80,0xC4, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x98, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF5,0x86,
-0x42,0x44, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x81,0x61, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x42,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEE,0x00, 0x81,0x29, 0xF6,0x06,
-0x42,0x50, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x72,0xAC, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00,
-0x81,0x60, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x50, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xF5,0x82, 0x00,0x06, 0xF5,0x85, 0x42,0x54, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x73,0x4C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x86, 0x38,0x1C, 0xF5,0x85, 0x42,0x44, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x58, 0xF7,0x04,
-0x42,0x50, 0xF6,0x86, 0x42,0x50, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF6,0x04,
-0x6F,0x34, 0xC7,0x38, 0x6F,0xC0, 0x86,0xB2, 0x00,0x0C, 0x77,0x39, 0xFF,0xF0, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x82,0x50, 0xF4,0x82, 0x00,0x00, 0xC5,0x04, 0x00,0x00, 0x86,0xB2,
-0x00,0x10, 0xF7,0x04, 0xE0,0x00, 0xC5,0xA4, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x81,0xE4, 0x04,0x30, 0x00,0x10, 0x86,0xB2, 0x00,0x14, 0xF7,0x04, 0xE0,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x81,0xE8, 0x20,0x2E, 0x00,0x00, 0xF5,0x82,
-0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x81,0xF5, 0x00,0x00, 0x00,0x01, 0xF5,0x02,
-0x00,0x00, 0x86,0xA2, 0x00,0x00, 0xF7,0x04, 0xE0,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0x82,0x30, 0xF6,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0x82,0x38, 0x20,0x32, 0x00,0x00, 0x86,0xA2, 0x00,0x04, 0xF7,0x04, 0xE0,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x82,0x39, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x82,0x49, 0x20,0x2A, 0x00,0x00, 0xF5,0x02,
-0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0x82,0x59, 0x20,0x26, 0x00,0x00, 0xF4,0x82,
-0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00, 0x87,0x60, 0x00,0x00, 0x00,0x01, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0x07,0x20, 0x00,0x02, 0xF0,0x3B,
-0x28,0x00, 0xF7,0x04, 0x4F,0x58, 0xF4,0x05, 0x3B,0xB0, 0x06,0xA0, 0x00,0x14, 0xC7,0x20,
-0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0xF7,0x37, 0x28,0x00, 0x06,0xA0, 0x00,0x16, 0xF7,0x37,
-0x28,0x00, 0xF3,0x02, 0x00,0x01, 0xF3,0x23, 0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0x26,0x14, 0x00,0x20, 0xF0,0x33, 0x28,0x00, 0x04,0xA0,
-0x00,0x02, 0xF0,0x27, 0x28,0x00, 0xF3,0x02, 0x00,0x00, 0x23,0x94, 0x00,0x2A, 0xF3,0x1F,
-0x28,0x00, 0x07,0x20, 0x00,0x1A, 0x23,0x94, 0x00,0x2A, 0x83,0x9E, 0x00,0x00, 0x77,0x9D,
-0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC3,0x9C, 0x7F,0xC0, 0x73,0x9D, 0xFF,0xF0, 0x76,0x31,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x06,0xA4, 0x00,0x02, 0x75,0x15, 0x00,0x1E, 0xF3,0xBB,
-0x28,0x00, 0xF3,0x04, 0xE0,0x00, 0x75,0x28, 0xFF,0xE5, 0x93,0x22, 0x00,0x1C, 0xF3,0x84,
-0xE0,0x04, 0x23,0x14, 0x00,0x1E, 0x93,0x16, 0xFF,0xA4, 0x75,0x99, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0x73,0x15, 0x00,0x1E, 0x73,0x18, 0xFF,0xE5, 0x93,0x16, 0xFF,0xCC, 0x83,0x16,
-0xFF,0xA4, 0x93,0xA2, 0x00,0x20, 0x87,0x16, 0xFF,0xE0, 0x73,0x95, 0x00,0x1E, 0x73,0x9C,
-0xFF,0xE5, 0x93,0x96, 0xFF,0xAC, 0x73,0x95, 0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x93,0x96,
-0xFF,0xC4, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xE4, 0x23,0x94, 0x00,0x1A, 0x93,0x96, 0xFF,0xA4, 0x76,0x1D,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1E, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xE8, 0x23,0x14,
-0x00,0x16, 0x93,0x16, 0xFF,0xA4, 0x76,0x19, 0x00,0x1E, 0x83,0x96, 0xFF,0xAC, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xEC, 0x23,0x14, 0x00,0x12, 0x93,0x16,
-0xFF,0xA4, 0x76,0x19, 0x00,0x1E, 0x83,0x96, 0xFF,0xCC, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x16,
-0xFF,0xF0, 0x83,0x16, 0xFF,0xC4, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x37,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0xF3,0x82, 0x00,0x02, 0xF3,0xA3, 0x28,0x00, 0x23,0x14,
-0x00,0x2A, 0x83,0x1A, 0x00,0x00, 0x77,0x99, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC3,0x18,
-0x7F,0xC0, 0x73,0x19, 0xFF,0xF0, 0x07,0x20, 0x00,0x18, 0xF3,0x3B, 0x28,0x00, 0x94,0x16,
-0xFF,0xDC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0x07,0x20,
-0x00,0x02, 0x23,0x94, 0x00,0x2A, 0x83,0x9E, 0x00,0x00, 0x77,0x9D, 0x00,0x1E, 0x77,0xBC,
-0xFF,0xE5, 0xC3,0x9C, 0x7F,0xC0, 0x73,0x9D, 0xFF,0xF0, 0x24,0x80, 0x00,0x07, 0x05,0x20,
-0x00,0x0A, 0xF3,0xBB, 0x28,0x00, 0x20,0x26, 0x00,0x07, 0xEE,0x00, 0x84,0xE0, 0x06,0x28,
-0x00,0x0E, 0x86,0xB2, 0x00,0x00, 0x77,0x31, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0x75,0xB1,
-0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x05,0x28, 0x00,0x02, 0x04,0xA4, 0x00,0x01, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0xFF,0x00, 0xC6,0xB4, 0x74,0x00, 0xF6,0xB3,
-0x28,0x00, 0x87,0x32, 0x00,0x00, 0xF3,0x02, 0x00,0xFF, 0xC7,0x38, 0x5F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0xC7,0x38, 0x34,0x00, 0xE0,0x00, 0x84,0x88, 0xF7,0x33, 0x28,0x00, 0x05,0x20,
-0x00,0x26, 0x86,0x2A, 0x00,0x00, 0x76,0xA9, 0x00,0x1E, 0xF5,0x84, 0x4F,0x58, 0x76,0xB4,
-0xFF,0xE5, 0x83,0x96, 0xFF,0xDC, 0xF3,0x02, 0x00,0xFF, 0x94,0x16, 0xFF,0xBC, 0xC7,0x1C,
-0x5A,0x00, 0x77,0x38, 0xFF,0xFA, 0xC6,0x30, 0x6F,0xC0, 0x76,0x31, 0xFF,0xF0, 0x47,0x39,
-0x00,0x00, 0xC7,0x38, 0x34,0x00, 0xF6,0x82, 0xFF,0x00, 0xC6,0x30, 0x6C,0x00, 0xC7,0x38,
-0x60,0x00, 0xF6,0x84, 0x3B,0x6C, 0xF7,0x2B, 0x28,0x00, 0xC5,0xA0, 0x5A,0x00, 0x75,0xAC,
-0xFF,0xFA, 0x83,0x16, 0xFF,0xDC, 0x07,0x34, 0x00,0x01, 0xF7,0x05, 0x3B,0x6C, 0x07,0x20,
-0x00,0x3A, 0xF6,0xBB, 0x28,0x00, 0x07,0x20, 0x00,0x36, 0xF0,0x3B, 0x28,0x00, 0xF3,0x82,
-0x00,0x03, 0xF3,0xA3, 0x28,0x00, 0x07,0x18, 0x00,0x1A, 0xF5,0xBB, 0x28,0x00, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0x07,0x20, 0x00,0x02, 0xF0,0x3B,
-0x28,0x00, 0x24,0x80, 0x00,0x07, 0x05,0x20, 0x00,0x0A, 0x20,0x26, 0x00,0x07, 0xEE,0x00,
-0x85,0xD4, 0x06,0x28, 0x00,0x0E, 0x86,0xB2, 0x00,0x00, 0x77,0x31, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0x75,0xB1, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x05,0x28, 0x00,0x02, 0x04,0xA4,
-0x00,0x01, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0xFF,0x00, 0xC6,0xB4,
-0x74,0x00, 0xF6,0xB3, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0xF3,0x82, 0x00,0xFF, 0xC7,0x38,
-0x5F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38, 0x3C,0x00, 0xE0,0x00, 0x85,0x7C, 0xF7,0x33,
-0x28,0x00, 0x05,0xA0, 0x00,0x26, 0x86,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC5,0x20, 0x00,0x00, 0x24,0x00, 0x00,0x07, 0xF3,0x02, 0x00,0x01, 0x93,0x16,
-0xFF,0xA4, 0xF7,0x04, 0x4F,0x58, 0x83,0x96, 0xFF,0xBC, 0x24,0x80, 0x00,0x0E, 0xC7,0x1C,
-0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0xC6,0x30, 0x6F,0xC0, 0x76,0x31, 0xFF,0xF0, 0x47,0x39,
-0x00,0x00, 0xF6,0x82, 0x00,0xFF, 0xC7,0x38, 0x6C,0x00, 0xF6,0x82, 0xFF,0x00, 0xC6,0x30,
-0x6C,0x00, 0xC7,0x38, 0x60,0x00, 0xF6,0x84, 0x3B,0x6C, 0xF7,0x2F, 0x28,0x00, 0x07,0x34,
-0x00,0x01, 0xF7,0x05, 0x3B,0x6C, 0x07,0x28, 0x00,0x3A, 0xF6,0xBB, 0x28,0x00, 0x07,0x28,
-0x00,0x36, 0xF0,0x3B, 0x28,0x00, 0xF3,0x02, 0x00,0x03, 0xF3,0x2B, 0x28,0x00, 0x20,0x22,
-0x00,0x07, 0xEE,0x00, 0x86,0x94, 0xC6,0x28, 0x48,0x00, 0x06,0x30, 0x00,0x26, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x04,0xA4, 0x00,0x02, 0x04,0x20,
-0x00,0x01, 0x83,0x96, 0xFF,0xA4, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xF6,0x82,
-0xFF,0x00, 0xC7,0x38, 0x6C,0x00, 0xC7,0x1C, 0x70,0x00, 0xE0,0x00, 0x86,0x50, 0xF7,0x33,
-0x28,0x00, 0x06,0x28, 0x00,0x26, 0x86,0xB2, 0x00,0x00, 0x77,0x31, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0xFF,0x00, 0xC6,0xB4,
-0x74,0x00, 0xF6,0xB3, 0x28,0x00, 0x95,0x13, 0xFF,0xFC, 0xF3,0x04, 0x3B,0xB0, 0x00,0x00,
-0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x95,0x16, 0xFF,0xB4, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD4,0x2C, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xB4, 0xF0,0x05, 0x40,0x7C, 0x83,0x96,
-0xFF,0xBC, 0x23,0x00, 0x00,0x07, 0xF3,0x05, 0x42,0x58, 0xF7,0x04, 0x42,0x50, 0xF6,0x06,
-0x42,0x50, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF3,0x06, 0x39,0x34, 0xF3,0x05,
-0x42,0x44, 0xF5,0x05, 0x40,0x74, 0xF3,0x85, 0x42,0x60, 0xF3,0x82, 0x00,0x06, 0xF3,0x85,
-0x42,0x54, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xF6,0x84, 0x2D,0x38, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x06,0x34, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0xF7,0x06,
-0x2C,0x28, 0x76,0xB5, 0x00,0x02, 0xF3,0x82, 0x00,0x1C, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0x87,0x4C, 0xB3,0xB6, 0x70,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x06, 0x42,0x44, 0x93,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1F,0x48, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x48, 0xF3,0x86,
-0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x89,0xED, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x42,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEE,0x00, 0x87,0xC9, 0x00,0x00,
-0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x73,0x4C, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00,
-0x89,0xEC, 0x00,0x00, 0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93,
-0xFF,0xFC, 0x26,0x14, 0x00,0x20, 0xF0,0x33, 0x28,0x00, 0x05,0xA0, 0x00,0x02, 0xF0,0x2F,
-0x28,0x00, 0xF3,0x82, 0x00,0x00, 0x24,0x94, 0x00,0x22, 0xF3,0xA7, 0x28,0x00, 0x04,0xA0,
-0x00,0x1A, 0x94,0x96, 0xFF,0xD4, 0x23,0x94, 0x00,0x22, 0x83,0x9E, 0x00,0x00, 0x77,0x9D,
-0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC3,0x9C, 0x7F,0xC0, 0x73,0x9D, 0xFF,0xF0, 0x76,0x31,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x06,0xAC, 0x00,0x02, 0x23,0x14, 0x00,0x1E, 0x75,0x19,
-0x00,0x1E, 0xF3,0xA7, 0x28,0x00, 0xF4,0x84, 0xE0,0x00, 0x75,0x28, 0xFF,0xE5, 0x94,0xA2,
-0x00,0x1C, 0xF3,0x84, 0xE0,0x04, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96,
-0xFF,0xB4, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFF,0xCC, 0x84,0x96,
-0xFF,0xB4, 0x93,0xA2, 0x00,0x20, 0x87,0x16, 0xFF,0xE0, 0x73,0x95, 0x00,0x1E, 0x73,0x9C,
-0xFF,0xE5, 0x93,0x96, 0xFF,0xBC, 0x73,0x95, 0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96,
-0xFF,0xC4, 0x83,0x96, 0xFF,0xBC, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F,
-0x28,0x00, 0xF5,0x84, 0x4F,0x58, 0x87,0x1A, 0x00,0x00, 0xC5,0xA0, 0x5A,0x00, 0x75,0xAC,
-0xFF,0xFA, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xE4, 0x23,0x14, 0x00,0x1A, 0x76,0x19, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x45,0xAD, 0x00,0x00, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x84,0x96, 0xFF,0xCC, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16,
-0xFF,0xE8, 0x23,0x14, 0x00,0x16, 0x76,0x19, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xEC, 0x23,0x14, 0x00,0x12, 0x76,0x19, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x83,0x96, 0xFF,0xC4, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x16, 0xFF,0xF0, 0x06,0xB4, 0x00,0x02, 0xC7,0x38,
-0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0xF4,0x82, 0x00,0x02, 0xF4,0xA3,
-0x28,0x00, 0x04,0x20, 0x00,0x18, 0x23,0x94, 0x00,0x22, 0x83,0x9E, 0x00,0x00, 0x77,0x9D,
-0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC3,0x9C, 0x7F,0xC0, 0x73,0x9D, 0xFF,0xF0, 0x84,0x96,
-0xFF,0xD4, 0xF3,0xA3, 0x28,0x00, 0xF3,0x82, 0x00,0x01, 0xF3,0xA7, 0x28,0x00, 0x95,0x93,
-0xFF,0xFC, 0xF4,0x86, 0xE0,0x00, 0x94,0x93, 0xFF,0xFC, 0xF3,0x84, 0x4F,0x5C, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x23,0x40, 0x97,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x78,0xD8, 0x97,0x93, 0xFF,0xFC, 0xF4,0x86,
-0x36,0x78, 0xF4,0x85, 0x42,0x44, 0xF0,0x05, 0x40,0x84, 0xF6,0x84, 0x4F,0x5C, 0xF7,0x02,
-0x00,0x64, 0x97,0x36, 0x00,0x00, 0x90,0x36, 0x00,0x04, 0xF7,0x02, 0x00,0x01, 0xF7,0x05,
-0x40,0x84, 0xF3,0x86, 0x35,0xEC, 0xF3,0x85, 0x42,0x30, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x90, 0xF7,0x04, 0x42,0x60, 0xF5,0x02,
-0x00,0x00, 0x05,0xB8, 0x00,0x18, 0xF6,0x04, 0x42,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x32,
-0x00,0x07, 0xEE,0x00, 0x8A,0x70, 0xC7,0x30, 0x60,0x00, 0xC7,0x38, 0x58,0x00, 0x07,0x38,
-0x00,0x0E, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB4, 0x74,0x00, 0xC0,0x36,
-0x52,0x00, 0x47,0x0C, 0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x8A,0x71, 0x07,0x30, 0x00,0x01, 0xE0,0x00, 0x8A,0x18, 0xF7,0x05, 0x42,0x58, 0xF4,0x04,
-0x42,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x22, 0x00,0x07, 0xEE,0x00, 0x8D,0x94, 0x24,0x94,
-0x00,0x36, 0xF6,0x04, 0x42,0x60, 0x25,0x14, 0x00,0x38, 0x23,0x94, 0x00,0x20, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x06,0x30,
-0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B,
-0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x34, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x32, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x30, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2E, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2C, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2A, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x94,
-0x00,0x28, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x94,0x13, 0xFF,0xFC, 0x95,0x13, 0xFF,0xFC, 0x93,0x96,
-0xFF,0x7C, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x04, 0x42,0x60, 0x24,0x94, 0x00,0x7E, 0x25,0x14, 0x00,0x80, 0x23,0x94,
-0x00,0x68, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x06,0x30, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38,
-0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x7C, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x7A, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x78, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x76, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x74, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x72, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x24,0x94, 0x00,0x70, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x95,0x13, 0xFF,0xFC, 0x93,0x96,
-0xFF,0x74, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD2,0x58, 0x97,0x93,
-0xFF,0xFC, 0x83,0x96, 0xFF,0x74, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0xF7,0x04,
-0x42,0x58, 0x23,0x94, 0x00,0x50, 0xC7,0x00, 0x72,0x00, 0x97,0x13, 0xFF,0xFC, 0x93,0x96,
-0xFF,0x6C, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCF,0x24, 0x97,0x93,
-0xFF,0xFC, 0x83,0x96, 0xFF,0x6C, 0xF6,0x86, 0x42,0x50, 0x93,0x93, 0xFF,0xFC, 0xF3,0x84,
-0x42,0x58, 0x76,0xB5, 0x00,0x1E, 0x93,0x93, 0xFF,0xFC, 0xF7,0x04, 0x42,0x50, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x97,0x13, 0xFF,0xFC, 0x83,0x96,
-0xFF,0x7C, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xF3,0x38, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x8D,0x95, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x42,0x58, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x42,0x58, 0xF7,0x04, 0x42,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x07, 0xEE,0x00,
-0x8D,0xD4, 0xF3,0x82, 0x17,0x70, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x82, 0x00,0x1C, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0x8D,0xF4, 0xB3,0xBA, 0x68,0x02, 0xE0,0x00, 0x8D,0xF4, 0xF0,0x05,
-0x2D,0x38, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x1B, 0x93,0x93, 0xFF,0xFC, 0xF3,0x86,
-0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x88, 0xF7,0x04, 0x42,0x50, 0xF6,0x86, 0x42,0x50, 0x76,0xB5, 0x00,0x1E, 0xF3,0x84,
-0x6F,0x34, 0x76,0xB4, 0xFF,0xE5, 0x93,0x96, 0xFF,0xC4, 0xC7,0x38, 0x6F,0xC0, 0x86,0x9E,
-0x00,0x0C, 0x77,0x39, 0xFF,0xF0, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x8E,0x65, 0xF6,0x06,
-0x42,0xA0, 0xF7,0x04, 0x42,0xA0, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xE0,0x00, 0x94,0xE4, 0xF7,0x33,
-0x28,0x00, 0xF6,0x04, 0x42,0x60, 0x24,0x94, 0x00,0x36, 0x85,0x16, 0xFF,0xC4, 0x23,0x94,
-0x00,0x38, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x85,0x2A, 0x00,0x1C, 0x06,0x30, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x95,0x16, 0xFF,0xBC, 0xF7,0x1F, 0x28,0x00, 0x87,0x32,
-0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0x85,0x16, 0xFF,0xC4, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x34, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x32, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x30, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2E, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2C, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2A, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x94,
-0x00,0x28, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x87,0x2A, 0x00,0x20, 0x00,0x00, 0x00,0x01, 0x97,0x13,
-0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0x27,0x14, 0x00,0x20, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0xC4, 0x00,0x00,
-0x00,0x01, 0x87,0x1E, 0x00,0x10, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0x8F,0xF0, 0xF6,0x82, 0x00,0x00, 0x87,0x1E, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0x8F,0xF4, 0x20,0x36, 0x00,0x00, 0xF6,0x82, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xE6,0x00, 0x90,0x41, 0x00,0x00, 0x00,0x01, 0x85,0x16, 0xFF,0xC4, 0x00,0x00,
-0x00,0x01, 0x05,0x28, 0x00,0x10, 0x95,0x16, 0xFF,0xB4, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x72,0x50, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0xB4, 0x27,0x14,
-0x00,0x20, 0x93,0x93, 0xFF,0xFC, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xF9,0x34, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x94,0xE4, 0x00,0x00, 0x00,0x01, 0x85,0x16,
-0xFF,0xBC, 0x00,0x00, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0x94,0xBC, 0x00,0x00,
-0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0xF5,0x02,
-0x00,0x00, 0x23,0x94, 0x00,0x62, 0xF5,0x1F, 0x28,0x00, 0x75,0x95, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0x06,0x20, 0x00,0x02, 0x06,0xB0, 0x00,0x02, 0x23,0x14, 0x00,0x1E, 0x73,0x99,
-0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96, 0xFF,0x74, 0x75,0x15, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0x95,0x16, 0xFF,0x7C, 0x73,0x95, 0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96,
-0xFF,0x8C, 0x85,0x16, 0xFF,0xC4, 0x73,0x95, 0x00,0x1E, 0x93,0x96, 0xFF,0x84, 0x85,0x2A,
-0x00,0x34, 0x23,0x94, 0x00,0x62, 0x95,0x16, 0xFF,0xAC, 0xF0,0x33, 0x28,0x00, 0x05,0x20,
-0x00,0x1A, 0x95,0x16, 0xFF,0x94, 0x83,0x9E, 0x00,0x00, 0x77,0x9D, 0x00,0x1E, 0x77,0xBC,
-0xFF,0xE5, 0xC3,0x9C, 0x7F,0xC0, 0x73,0x9D, 0xFF,0xF0, 0x74,0x95, 0x00,0x1E, 0xF3,0xAB,
-0x28,0x00, 0x85,0x16, 0xFF,0xC4, 0x74,0xA4, 0xFF,0xE5, 0x85,0x2A, 0x00,0x10, 0x83,0x96,
-0xFF,0xC4, 0x95,0x22, 0x00,0x1C, 0x83,0x9E, 0x00,0x14, 0x85,0x16, 0xFF,0x84, 0x93,0xA2,
-0x00,0x20, 0x87,0x16, 0xFF,0xE0, 0x75,0x28, 0xFF,0xE5, 0x95,0x16, 0xFF,0x84, 0xF3,0x84,
-0x4F,0x58, 0x85,0x16, 0xFF,0x74, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x93,0x96, 0xFF,0xA4, 0xC0,0x22, 0x3A,0x00, 0x83,0x96,
-0xFF,0x7C, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xE4, 0x23,0x14, 0x00,0x1A, 0x76,0x19, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xE8, 0x23,0x14, 0x00,0x16, 0x76,0x19,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x85,0x16, 0xFF,0x8C, 0x83,0x96,
-0xFF,0x84, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xEC, 0x23,0x14, 0x00,0x12, 0x76,0x19, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x16, 0xFF,0xF0, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0xF5,0x02, 0x00,0x02, 0xF5,0x23, 0x28,0x00, 0x23,0x94,
-0x00,0x52, 0x83,0x9E, 0x00,0x00, 0x77,0x9D, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC3,0x9C,
-0x7F,0xC0, 0x73,0x9D, 0xFF,0xF0, 0x03,0x20, 0x00,0x18, 0xE6,0x00, 0x92,0x30, 0xF3,0x9B,
-0x28,0x00, 0xF7,0x04, 0x42,0x70, 0xE0,0x00, 0x92,0x9C, 0xF6,0x06, 0x42,0x72, 0x85,0x16,
-0xFF,0xC4, 0x00,0x00, 0x00,0x01, 0x86,0xAA, 0x00,0x20, 0x00,0x00, 0x00,0x01, 0x07,0x34,
-0x00,0x07, 0x20,0x3A, 0x00,0x0E, 0xE2,0x00, 0x92,0x94, 0xC7,0x34, 0x68,0x00, 0xF5,0x84,
-0x42,0x60, 0xF3,0x82, 0x00,0xFF, 0xC7,0x2C, 0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA,
-0x00,0x00, 0x97,0x16, 0xFF,0x74, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xC6,0xB4, 0x3C,0x00, 0x20,0x36, 0x00,0x00, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0x92,0xC9, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x42,0x74, 0xF6,0x06, 0x42,0x74, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00,
-0x94,0xE4, 0x00,0x00, 0x00,0x01, 0x85,0x16, 0xFF,0xA4, 0x83,0x96, 0xFF,0x74, 0xC7,0x20,
-0x52,0x00, 0x74,0xB8, 0xFF,0xFA, 0xC6,0x24, 0x00,0x00, 0x87,0x1E, 0x00,0x00, 0x76,0x9D,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC5,0xAC, 0x52,0x00, 0x75,0xAC, 0xFF,0xFA, 0x46,0x31,
-0x00,0x00, 0xF5,0x02, 0x00,0xFF, 0xC6,0x30, 0x54,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0xF6,0x82, 0xFF,0x00, 0xC7,0x38, 0x6C,0x00, 0xC6,0x30, 0x70,0x00, 0xF6,0x1F,
-0x28,0x00, 0x83,0x96, 0xFF,0x94, 0x85,0x16, 0xFF,0xC4, 0xF5,0x9F, 0x28,0x00, 0x87,0x2A,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x24, 0xE6,0x00, 0x94,0x69, 0xF6,0x86,
-0x40,0x98, 0xF7,0x04, 0x6E,0x50, 0x86,0x2A, 0x00,0x2C, 0xC6,0xA4, 0x00,0x00, 0x23,0x94,
-0x00,0x62, 0x84,0x9E, 0x00,0x00, 0x77,0x9D, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC4,0xA4,
-0x7F,0xC0, 0x74,0xA5, 0xFF,0xF0, 0x46,0xB5, 0x00,0x00, 0x87,0x3A, 0x1D,0xDC, 0x76,0xB5,
-0x00,0x02, 0xC0,0x32, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A,
-0x00,0x00, 0xF7,0x06, 0x40,0x98, 0xE6,0x00, 0x94,0x34, 0xC3,0x34, 0x70,0x00, 0xC5,0x84,
-0x00,0x00, 0x86,0xAA, 0x00,0x24, 0xF7,0x04, 0xE0,0x00, 0xF6,0x02, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0x05,0x28, 0x00,0x24, 0xE6,0x00, 0x93,0xC4, 0x95,0x16, 0xFF,0x74, 0x83,0x96,
-0xFF,0xC4, 0x00,0x00, 0x00,0x01, 0x86,0x9E, 0x00,0x28, 0xF7,0x04, 0xE0,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x93,0xC8, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x93,0xD5, 0x00,0x00, 0x00,0x01, 0xF5,0x82,
-0x00,0x00, 0x85,0x16, 0xFF,0x74, 0xF7,0x04, 0xE0,0x00, 0x86,0xAA, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x94,0x14, 0xF6,0x02, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0x94,0x1C, 0x20,0x32, 0x00,0x00, 0x86,0xAA, 0x00,0x04, 0xF7,0x04,
-0xE0,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0x94,0x1D, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0x94,0x2D, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0x94,0x39, 0x00,0x00,
-0x00,0x01, 0xF4,0x82, 0x00,0x01, 0xF7,0x04, 0x4F,0x58, 0xF4,0x9B, 0x28,0x00, 0x83,0x96,
-0xFF,0xC4, 0xF6,0x86, 0x40,0x9A, 0xC7,0x20, 0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0x86,0x1E,
-0x00,0x30, 0x47,0x39, 0x00,0x00, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0xE0,0x00,
-0x94,0xE4, 0xF6,0x3B, 0x28,0x00, 0x47,0x25, 0x00,0x00, 0x77,0x39, 0x00,0x02, 0xC7,0x38,
-0x68,0x00, 0xF5,0x02, 0x00,0x01, 0xF5,0x3B, 0x28,0x00, 0x07,0x38, 0x00,0x02, 0x23,0x94,
-0x00,0x62, 0x83,0x9E, 0x00,0x00, 0x77,0x9D, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC3,0x9C,
-0x7F,0xC0, 0x73,0x9D, 0xFF,0xF0, 0x25,0x14, 0x00,0x62, 0xF3,0xBB, 0x28,0x00, 0x85,0x2A,
-0x00,0x00, 0x77,0xA9, 0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC5,0x28, 0x7F,0xC0, 0x75,0x29,
-0xFF,0xF0, 0xE0,0x00, 0x94,0xE4, 0xF5,0x1B, 0x28,0x00, 0x83,0x96, 0xFF,0xBC, 0x00,0x00,
-0x00,0x01, 0x20,0x1E, 0x00,0x01, 0xE6,0x00, 0x94,0xE4, 0x00,0x00, 0x00,0x01, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x35,0x60, 0xF5,0x05,
-0x42,0x30, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF5,0x06,
-0x42,0x44, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0x96,0x89, 0x00,0x00, 0x00,0x01, 0xF6,0x84,
-0x42,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xEE,0x00, 0x95,0x8D, 0xF5,0x86,
-0x42,0x50, 0xF7,0x04, 0x42,0x50, 0x76,0x2D, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x26,0xB4,
-0x00,0x01, 0xF6,0x85, 0x42,0x54, 0x25,0x00, 0x00,0x07, 0xF5,0x05, 0x42,0x58, 0xF6,0x84,
-0x2D,0x38, 0xC7,0x38, 0x67,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x2F,
-0x28,0x00, 0x06,0x34, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0xF7,0x06, 0x2C,0x28, 0x76,0xB5,
-0x00,0x02, 0xF5,0x02, 0x00,0x1C, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x96,0x88, 0xB5,0x36,
-0x70,0x02, 0xE0,0x00, 0x96,0x88, 0xF0,0x05, 0x2D,0x38, 0xF5,0x04, 0x42,0x60, 0x00,0x00,
-0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xB2,0x84, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x84, 0x4F,0x58, 0x00,0x00, 0x00,0x01, 0x07,0x34, 0x00,0x40, 0xC0,0x22,
-0x72,0x00, 0xE6,0x00, 0x95,0xEC, 0xF6,0x06, 0x42,0x76, 0xF7,0x04, 0x42,0x74, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0x96,0x88, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x60, 0x00,0x00,
-0x00,0x01, 0xC0,0x22, 0x72,0x00, 0xE6,0x00, 0x96,0x24, 0x00,0x00, 0x00,0x01, 0x97,0x13,
-0xFF,0xFC, 0xF5,0x04, 0x3B,0xB0, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xD4,0x2C, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x96,0x40, 0x00,0x00,
-0x00,0x01, 0xC0,0x22, 0x6A,0x00, 0xE6,0x00, 0x96,0x71, 0x00,0x00, 0x00,0x01, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCC,0x60, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04,
-0x40,0x7C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x13, 0xFF,0xFC, 0xF5,0x04,
-0x40,0x74, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xBE,0xF8, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x96,0x88, 0x00,0x00, 0x00,0x01, 0xF5,0x04,
-0x40,0x74, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xC1,0xB4, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x70, 0xF6,0x04, 0x6F,0x34, 0xF7,0x04, 0x42,0x64, 0x86,0xB2,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0x9B,0x18, 0x06,0xB0,
-0x00,0x02, 0x87,0x36, 0x00,0x00, 0xF4,0x04, 0x40,0x7C, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC0,0x3A, 0x42,0x00, 0xE6,0x00,
-0x9B,0x18, 0x24,0x94, 0x00,0x36, 0xF6,0x04, 0x40,0x74, 0x23,0x94, 0x00,0x38, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x06,0x30,
-0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x34, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x32, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x30, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2E, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2C, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2A, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x94,
-0x00,0x28, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x94,0x13, 0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0x27,0x14,
-0x00,0x20, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0xF5,0x04,
-0x40,0x74, 0x94,0x16, 0xFF,0xC4, 0x07,0x20, 0x00,0x02, 0xF0,0x3B, 0x28,0x00, 0x24,0x80,
-0x00,0x07, 0xF4,0x02, 0x00,0xFF, 0x83,0x96, 0xFF,0xC4, 0x95,0x16, 0xFF,0xBC, 0x03,0x1C,
-0x00,0x0A, 0x20,0x26, 0x00,0x07, 0xEE,0x00, 0x98,0xA8, 0x06,0x18, 0x00,0x0E, 0x86,0xB2,
-0x00,0x00, 0x77,0x31, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0x75,0xB1, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0x03,0x18, 0x00,0x02, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02,
-0xFF,0x00, 0xC6,0xB4, 0x74,0x00, 0xF6,0xB3, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x04,0xA4,
-0x00,0x01, 0xC7,0x38, 0x5F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38, 0x44,0x00, 0xE0,0x00,
-0x98,0x54, 0xF7,0x33, 0x28,0x00, 0x85,0x16, 0xFF,0xC4, 0x74,0x95, 0x00,0x1E, 0x74,0xA4,
-0xFF,0xE5, 0x83,0x96, 0xFF,0xC4, 0x23,0x14, 0x00,0x1E, 0x74,0x19, 0x00,0x1E, 0x74,0x20,
-0xFF,0xE5, 0x05,0x28, 0x00,0x26, 0x95,0x16, 0xFF,0x8C, 0x85,0xAA, 0x00,0x00, 0x76,0xA9,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x03,0x9C, 0x00,0x02, 0x93,0x96, 0xFF,0xB4, 0x06,0x1C,
-0x00,0x02, 0x73,0x95, 0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96, 0xFF,0xAC, 0x73,0x95,
-0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96, 0xFF,0x9C, 0x83,0x96, 0xFF,0xBC, 0x75,0x15,
-0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x95,0x16, 0xFF,0x94, 0x75,0x15, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0x95,0x16, 0xFF,0xA4, 0x85,0x16, 0xFF,0xC4, 0xC5,0xAC, 0x6F,0xC0, 0x75,0xAD,
-0xFF,0xF0, 0xF5,0x05, 0x42,0x60, 0xF5,0x04, 0x4F,0x58, 0xF6,0x82, 0x00,0xFF, 0xC7,0x1C,
-0x52,0x00, 0x77,0x38, 0xFF,0xFA, 0x47,0x39, 0x00,0x00, 0xC7,0x38, 0x6C,0x00, 0xF6,0x82,
-0xFF,0x00, 0xC5,0xAC, 0x6C,0x00, 0xC7,0x38, 0x58,0x00, 0x83,0x96, 0xFF,0x8C, 0xF5,0x84,
-0x3B,0x6C, 0x85,0x16, 0xFF,0xB4, 0xF7,0x1F, 0x28,0x00, 0x87,0x16, 0xFF,0xE0, 0x06,0xAC,
-0x00,0x01, 0xF6,0x85, 0x3B,0x6C, 0x83,0x96, 0xFF,0xC4, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0xF5,0x04, 0x4F,0x58, 0x87,0x1A, 0x00,0x00, 0xC0,0x1E,
-0x52,0x00, 0xC7,0x38, 0x47,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30,
-0x00,0x02, 0x87,0x16, 0xFF,0xE4, 0x23,0x14, 0x00,0x1A, 0x76,0x99, 0x00,0x1E, 0x83,0x96,
-0xFF,0x94, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0x30, 0x00,0x02, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x16, 0xFF,0xE8, 0x23,0x14,
-0x00,0x16, 0x76,0x99, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x85,0x16, 0xFF,0xAC, 0x83,0x96,
-0xFF,0xA4, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x06,0x30, 0x00,0x02, 0x85,0x16, 0xFF,0x9C, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x16, 0xFF,0xEC, 0x23,0x14,
-0x00,0x12, 0x76,0x99, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0x30, 0x00,0x02, 0x83,0x96,
-0xFF,0xC4, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x16,
-0xFF,0xF0, 0x06,0x30, 0x00,0x02, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33,
-0x28,0x00, 0x07,0x1C, 0x00,0x3A, 0xF5,0xBB, 0x28,0x00, 0x07,0x1C, 0x00,0x36, 0xF0,0x3B,
-0x28,0x00, 0xF5,0x02, 0x00,0x03, 0xE6,0x00, 0x9A,0xA4, 0xF5,0x1F, 0x28,0x00, 0xF7,0x04,
-0x42,0x78, 0xF6,0x06, 0x42,0x78, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x9B,0x18, 0x00,0x00,
-0x00,0x01, 0xF3,0x86, 0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x1F,0x48, 0x97,0x93, 0xFF,0xFC, 0x25,0x00, 0x00,0x07, 0xF5,0x05, 0x42,0x58, 0xF7,0x04,
-0x42,0x50, 0xF6,0x06, 0x42,0x50, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF3,0x82,
-0x00,0x06, 0xF3,0x85, 0x42,0x54, 0xF5,0x06, 0x39,0x34, 0xF5,0x05, 0x42,0x44, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xF6,0x84, 0x2D,0x38, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0x06,0x34, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0xF7,0x06, 0x2C,0x28, 0x76,0xB5,
-0x00,0x02, 0xF3,0x82, 0x00,0x1C, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0x9B,0x18, 0xB3,0xB6,
-0x70,0x02, 0xF0,0x05, 0x2D,0x38, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x78, 0xF3,0x86, 0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0x9E,0x41, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xEE,0x00, 0x9D,0x85, 0x24,0x94, 0x00,0x36, 0xF6,0x04, 0x40,0x74, 0x25,0x14,
-0x00,0x38, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x06,0x30, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38,
-0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x34, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x32, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x30, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2E, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2C, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94, 0x00,0x2A, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x24,0x94, 0x00,0x28, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0xF3,0x84, 0x40,0x7C, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x95,0x13, 0xFF,0xFC, 0x23,0x94, 0x00,0x20, 0x93,0x96,
-0xFF,0x94, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93,
-0xFF,0xFC, 0x83,0x96, 0xFF,0x94, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x23,0x94,
-0x00,0x68, 0x93,0x96, 0xFF,0x8C, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD2,0x58, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x8C, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x90,0x13, 0xFF,0xFC, 0x23,0x94, 0x00,0x50, 0x93,0x96, 0xFF,0x84, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCF,0x24, 0x97,0x93, 0xFF,0xFC, 0x87,0x02,
-0xFF,0x34, 0x00,0x00, 0x00,0x01, 0xF7,0x05, 0x42,0x64, 0xF3,0x84, 0x40,0x7C, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x97,0x13, 0xFF,0xFC, 0x83,0x96, 0xFF,0x84, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x94, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xF7,0xC8, 0x97,0x93, 0xFF,0xFC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0x9D,0x5D, 0xF3,0x82, 0x17,0x70, 0xF7,0x04, 0x42,0x54, 0x00,0x00,
-0x00,0x01, 0x27,0x38, 0x00,0x01, 0xF7,0x05, 0x42,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x1B, 0x93,0x93, 0xFF,0xFC, 0xF3,0x86, 0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0x9E,0x40, 0x00,0x00,
-0x00,0x01, 0xF5,0x04, 0x40,0x7C, 0xF4,0x84, 0x40,0x74, 0xC7,0x28, 0x50,0x00, 0xC7,0x24,
-0x70,0x00, 0x05,0xB8, 0x00,0x26, 0x86,0xAE, 0x00,0x00, 0x77,0x2D, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x77,0xB4, 0x00,0x08, 0x70,0x3E, 0xFF,0xE8, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xF7,0x04, 0x4F,0x58, 0xE6,0x00,
-0x9D,0xFD, 0xF6,0x02, 0x00,0xFF, 0xF7,0x04, 0x42,0x78, 0xF6,0x06, 0x42,0x7A, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0x9E,0x40, 0x00,0x00, 0x00,0x01, 0x86,0xAE, 0x00,0x00, 0x77,0x2D,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02,
-0x00,0x01, 0xC7,0x38, 0x64,0x00, 0xF6,0x02, 0xFF,0x00, 0xC6,0xB4, 0x64,0x00, 0xC7,0x38,
-0x68,0x00, 0xF7,0x2F, 0x28,0x00, 0x07,0x28, 0x00,0x01, 0x97,0x13, 0xFF,0xFC, 0x94,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xBE,0xF8, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0xD8, 0xF3,0x86,
-0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xA2,0xC9, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x42,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEE,0x00, 0xA0,0x35, 0x24,0x94,
-0x00,0x36, 0xF6,0x04, 0x40,0x74, 0x25,0x14, 0x00,0x38, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x06,0x30, 0x00,0x02, 0x75,0xB1,
-0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x87,0x32,
-0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x34, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x32, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x30, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x2E, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x2C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x2A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x94, 0x00,0x28, 0x76,0x31,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0xF3,0x84, 0x40,0x7C, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x95,0x13,
-0xFF,0xFC, 0x23,0x94, 0x00,0x20, 0x93,0x96, 0xFF,0x4C, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x4C, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x23,0x94, 0x00,0x50, 0x93,0x96, 0xFF,0x44, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD2,0x58, 0x97,0x93, 0xFF,0xFC, 0x87,0x02,
-0xFF,0x34, 0x00,0x00, 0x00,0x01, 0xF7,0x05, 0x42,0x64, 0xF3,0x84, 0x40,0x7C, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x97,0x13, 0xFF,0xFC, 0x83,0x96, 0xFF,0x44, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x4C, 0xE0,0x00, 0xA2,0x80, 0x93,0x93,
-0xFF,0xFC, 0xF4,0x04, 0x40,0x7C, 0xF6,0x04, 0x40,0x74, 0xF3,0x82, 0x00,0x00, 0xC7,0x20,
-0x40,0x00, 0xC7,0x30, 0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA, 0x00,0x00, 0x77,0x39,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x77,0xB4, 0x00,0x08, 0x70,0x3E,
-0xFF,0xE8, 0x47,0x0C, 0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xA0,0xAD, 0x93,0x96, 0xFF,0x3C, 0xF7,0x04, 0x42,0xA0, 0xF6,0x06, 0x42,0xA0, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0xA2,0xC8, 0x00,0x00, 0x00,0x01, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x24,0x94, 0x00,0x7E, 0x25,0x14,
-0x00,0x80, 0x23,0x94, 0x00,0x68, 0x06,0x30, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC,
-0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94,
-0x00,0x7C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94,
-0x00,0x7A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94,
-0x00,0x78, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94,
-0x00,0x76, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94,
-0x00,0x74, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x24,0x94,
-0x00,0x72, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x94, 0x00,0x70, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x94,0x13,
-0xFF,0xFC, 0x95,0x13, 0xFF,0xFC, 0x93,0x96, 0xFF,0x34, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x34, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x23,0x94, 0x00,0xB0, 0x93,0x96, 0xFF,0x2C, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD2,0x58, 0x97,0x93, 0xFF,0xFC, 0x83,0x96,
-0xFF,0x2C, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x3C, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x23,0x94, 0x00,0x98, 0x93,0x96, 0xFF,0x24, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCF,0x24, 0x97,0x93, 0xFF,0xFC, 0xF3,0x82,
-0x00,0x06, 0xF3,0x85, 0x42,0x54, 0x87,0x02, 0xFF,0x34, 0xF3,0x86, 0x38,0xA8, 0xF3,0x85,
-0x42,0x44, 0xF7,0x05, 0x42,0x64, 0xF3,0x84, 0x40,0x7C, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x97,0x13, 0xFF,0xFC, 0x83,0x96, 0xFF,0x24, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x83,0x96, 0xFF,0x34, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xF7,0xC8, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0xA2,0xA9, 0xF3,0x82, 0x17,0x70, 0xF7,0x04, 0x42,0x54, 0x00,0x00, 0x00,0x01, 0x27,0x38,
-0x00,0x01, 0xF7,0x05, 0x42,0x54, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0x1B, 0x93,0x93,
-0xFF,0xFC, 0xF3,0x86, 0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x1E,0xC0, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF6,0x04, 0x6F,0x34, 0xF7,0x04, 0x42,0x64, 0x86,0xB2, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xA3,0xAC, 0x06,0xB0, 0x00,0x02, 0x87,0x36,
-0x00,0x00, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0xF6,0x84,
-0x40,0x7C, 0x77,0x39, 0xFF,0xF0, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x00, 0xA3,0xAC, 0xC7,0x34,
-0x68,0x00, 0xF5,0x84, 0x40,0x74, 0xF6,0x04, 0x4F,0x58, 0x00,0x00, 0x00,0x01, 0xC6,0x2C,
-0x62,0x00, 0x76,0x30, 0xFF,0xFA, 0xC5,0xAC, 0x70,0x00, 0x05,0xAC, 0x00,0x26, 0x86,0xAE,
-0x00,0x00, 0x77,0x2D, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0x46,0x31, 0x00,0x00, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0x30, 0x74,0x00, 0xF7,0x02,
-0xFF,0x00, 0xC6,0xB4, 0x74,0x00, 0xC6,0x30, 0x68,0x00, 0xF6,0x2F, 0x28,0x00, 0xF5,0x06,
-0x42,0x44, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1F,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x04, 0x40,0x7C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x13,
-0xFF,0xFC, 0xF5,0x04, 0x40,0x74, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xBE,0xF8, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x80, 0xF7,0x04, 0x42,0x58, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0xA3,0xF4, 0x20,0x3A, 0x00,0x07, 0xF5,0x02,
-0x00,0x01, 0xF5,0x05, 0x42,0x58, 0xF7,0x04, 0x42,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x07, 0xEE,0x00, 0xA6,0xF0, 0x23,0x94, 0x00,0x1E, 0xF6,0x04, 0x42,0x60, 0x23,0x14,
-0x00,0x66, 0xF4,0x84, 0x40,0x78, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x04,0xA4, 0x00,0x02, 0x74,0x25, 0x00,0x1E, 0x74,0x20,
-0xFF,0xE5, 0x06,0x30, 0x00,0x02, 0x75,0x31, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x95,0x16,
-0xFF,0x7C, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x25,0x14, 0x00,0x20, 0x95,0x16,
-0xFF,0x94, 0xF7,0x2B, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x85,0x16, 0xFF,0x7C, 0x05,0xA4,
-0x00,0x02, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x23,0x94,
-0x00,0x1C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x25,0x14, 0x00,0x50, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x1A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x18, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x16, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x14, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x12, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x10, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x87,0x26, 0x00,0x00, 0x26,0x14, 0x00,0x68, 0xC7,0x38,
-0x47,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x2E, 0x00,0x00, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x23,0x14,
-0x00,0x64, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x23,0x14,
-0x00,0x62, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x23,0x14,
-0x00,0x60, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x23,0x14,
-0x00,0x5E, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x23,0x14,
-0x00,0x5C, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x23,0x14,
-0x00,0x5A, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x05,0xAC,
-0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x23,0x14, 0x00,0x58, 0x75,0xAD, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x96,0x13,
-0xFF,0xFC, 0x95,0x16, 0xFF,0x8C, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD2,0x58, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0x8C, 0x00,0x00, 0x00,0x01, 0x95,0x13,
-0xFF,0xFC, 0xF5,0x04, 0x42,0x58, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x25,0x14,
-0x00,0x38, 0x95,0x16, 0xFF,0x84, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xCF,0x24, 0x97,0x93, 0xFF,0xFC, 0xF5,0x04, 0x42,0x58, 0x00,0x00, 0x00,0x01, 0x95,0x13,
-0xFF,0xFC, 0xF5,0x04, 0x42,0x64, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x85,0x16,
-0xFF,0x84, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x85,0x16, 0xFF,0x94, 0x00,0x00,
-0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xF7,0xC8, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xA6,0xF1, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x42,0x58, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x42,0x58, 0xF7,0x04,
-0x42,0x58, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x07, 0xEE,0x00, 0xA7,0x30, 0xF5,0x02,
-0x17,0x70, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02, 0x00,0x1C, 0x20,0x32, 0x00,0x44, 0xE6,0x00,
-0xA7,0x50, 0xB5,0x3A, 0x68,0x02, 0xE0,0x00, 0xA7,0x50, 0xF0,0x05, 0x2D,0x38, 0x95,0x13,
-0xFF,0xFC, 0xF5,0x02, 0x00,0x1B, 0x95,0x13, 0xFF,0xFC, 0xF5,0x06, 0x42,0x44, 0x95,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x30, 0xF6,0x04,
-0x6F,0x34, 0xF7,0x04, 0x42,0x64, 0x86,0xB2, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0xA9,0xF0, 0x07,0x30, 0x00,0x02, 0x86,0x3A, 0x00,0x00, 0xF5,0x82,
-0x00,0x00, 0xF6,0x84, 0x40,0x7C, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0x30,
-0x77,0xC0, 0xF7,0x04, 0x40,0x74, 0xC6,0xB4, 0x68,0x00, 0x76,0x31, 0xFF,0xF0, 0xC6,0x00,
-0x62,0x00, 0x96,0x16, 0xFF,0xF4, 0xC7,0x38, 0x68,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA,
-0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x77,0xB4,
-0x00,0x08, 0x70,0x3E, 0xFF,0xE8, 0x47,0x0C, 0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0xA8,0x34, 0xF6,0x02, 0x00,0xFF, 0x83,0x16, 0xFF,0xF4, 0x83,0x96,
-0xFF,0xF4, 0xF7,0x04, 0x40,0x78, 0xC6,0x98, 0x38,0x00, 0xC7,0x38, 0x68,0x00, 0x07,0x38,
-0x00,0x26, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xC6,0xB4, 0x64,0x00, 0xC0,0x36, 0x5A,0x00, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0xA8,0x3D, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0xA8,0x75, 0xF6,0x06,
-0x42,0x7C, 0xF7,0x04, 0x42,0x7C, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x78,0x9C, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0xA9,0xF0, 0x00,0x00,
-0x00,0x01, 0xF3,0x04, 0x42,0x60, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCC,0x60, 0x97,0x93, 0xFF,0xFC, 0xF4,0x04, 0x40,0x78, 0xF7,0x04,
-0x4F,0x58, 0xF5,0x04, 0x40,0x74, 0xF3,0x84, 0x40,0x7C, 0xF3,0x04, 0x40,0x7C, 0xC6,0x20,
-0x72,0x00, 0x76,0x30, 0xFF,0xFA, 0xC5,0x9C, 0x30,0x00, 0xC5,0xA8, 0x58,0x00, 0x05,0xAC,
-0x00,0x26, 0x86,0xAE, 0x00,0x00, 0x74,0xAD, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x73,0xAD,
-0x00,0x1E, 0x73,0x9C, 0xFF,0xE5, 0x93,0x96, 0xFF,0xD4, 0xC5,0x28, 0x72,0x00, 0x75,0x28,
-0xFF,0xFA, 0x83,0x16, 0xFF,0xF4, 0x83,0x96, 0xFF,0xF4, 0x46,0x31, 0x00,0x00, 0x45,0x29,
-0x00,0x00, 0xC7,0x18, 0x38,0x00, 0xC4,0x20, 0x70,0x00, 0x04,0x20, 0x00,0x26, 0x73,0x21,
-0x00,0x1E, 0xC6,0xB4, 0x4F,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF4,0x82, 0x00,0xFF, 0xC6,0x30,
-0x4C,0x00, 0xF3,0x82, 0xFF,0x00, 0xC6,0xB4, 0x3C,0x00, 0xC6,0x30, 0x68,0x00, 0xF6,0x2F,
-0x28,0x00, 0x87,0x2E, 0x00,0x00, 0x73,0x18, 0xFF,0xE5, 0x93,0x16, 0xFF,0xCC, 0x83,0x16,
-0xFF,0xD4, 0x83,0x96, 0xFF,0xF4, 0xC5,0x28, 0x4C,0x00, 0xC7,0x38, 0x37,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x76,0x9D, 0x00,0x10, 0x76,0xB5, 0xFF,0xF8, 0xC7,0x38, 0x4C,0x00, 0xC6,0xB4,
-0x70,0x00, 0xF6,0xAF, 0x28,0x00, 0x87,0x22, 0x00,0x00, 0x76,0xA1, 0x00,0x1E, 0x83,0x16,
-0xFF,0xCC, 0xF3,0x82, 0xFF,0x00, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x37,0xC0, 0x77,0x39,
-0xFF,0xF0, 0xC7,0x38, 0x3C,0x00, 0xC5,0x28, 0x70,0x00, 0xF5,0x23, 0x28,0x00, 0x87,0x22,
-0x00,0x00, 0xF3,0x04, 0x40,0x7C, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x73,0x19,
-0x00,0x10, 0x93,0x16, 0xFF,0xEC, 0x73,0x99, 0xFF,0xF8, 0xC7,0x38, 0x4C,0x00, 0xC7,0x1C,
-0x70,0x00, 0x97,0x16, 0xFF,0xDC, 0x23,0x14, 0x00,0x22, 0x83,0x1A, 0x00,0x00, 0x77,0x99,
-0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC3,0x18, 0x7F,0xC0, 0x73,0x19, 0xFF,0xF0, 0xF3,0x23,
-0x28,0x00, 0xF3,0x86, 0x42,0x44, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x1F,0x48, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04, 0x40,0x7C, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0x97,0x13, 0xFF,0xFC, 0xF3,0x04, 0x40,0x74, 0x00,0x00, 0x00,0x01, 0x93,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xBE,0xF8, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x98, 0xF3,0x06,
-0x42,0x44, 0x93,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x20,0xE4, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xAE,0xE5, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x42,0x54, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEE,0x00, 0xAD,0x89, 0x27,0x38,
-0x00,0x01, 0xF7,0x05, 0x42,0x54, 0x23,0x94, 0x00,0x1E, 0xF6,0x04, 0x42,0x60, 0x24,0x94,
-0x00,0x66, 0x94,0x96, 0xFF,0x64, 0xF3,0x04, 0x40,0x78, 0x24,0x94, 0x00,0x20, 0x94,0x96,
-0xFF,0x94, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x03,0x18, 0x00,0x02, 0x93,0x16, 0xFF,0x74, 0x74,0x19, 0x00,0x1E, 0x74,0x20,
-0xFF,0xE5, 0x05,0x98, 0x00,0x02, 0x06,0x30, 0x00,0x02, 0x75,0x31, 0x00,0x1E, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0x28,
-0xFF,0xE5, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x23,0x94,
-0x00,0x1C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x85,0x16, 0xFF,0x64, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x1A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x18, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x16, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x14, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x12, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F,
-0x28,0x00, 0x23,0x94, 0x00,0x10, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x26,0x14, 0x00,0x68, 0xC7,0x38,
-0x47,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x2E, 0x00,0x00, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x23,0x14,
-0x00,0x64, 0x93,0x16, 0xFF,0x64, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x24,0x94, 0x00,0x62, 0x94,0x96, 0xFF,0x64, 0x05,0xAC, 0x00,0x02, 0x87,0x2E,
-0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x25,0x14, 0x00,0x60, 0x95,0x16, 0xFF,0x64, 0x05,0xAC,
-0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x23,0x14, 0x00,0x5E, 0x93,0x16,
-0xFF,0x64, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x24,0x94,
-0x00,0x5C, 0x94,0x96, 0xFF,0x64, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x25,0x14, 0x00,0x5A, 0x95,0x16, 0xFF,0x64, 0x05,0xAC, 0x00,0x02, 0x87,0x2E,
-0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x24,0x94, 0x00,0x50, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x23,0x14, 0x00,0x58, 0x05,0xAC,
-0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x93,0x16, 0xFF,0x64, 0x75,0xAD, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x96,0x13,
-0xFF,0xFC, 0x94,0x96, 0xFF,0x8C, 0x94,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD2,0x58, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0x8C, 0x23,0x14, 0x00,0x38, 0x95,0x13,
-0xFF,0xFC, 0x27,0x80, 0x00,0x07, 0x97,0x93, 0xFF,0xFC, 0x93,0x16, 0xFF,0x84, 0x93,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCF,0x24, 0x97,0x93, 0xFF,0xFC, 0x27,0x80,
-0x00,0x07, 0xF7,0x85, 0x42,0x58, 0x27,0x80, 0x00,0x07, 0x97,0x93, 0xFF,0xFC, 0xF4,0x84,
-0x42,0x64, 0x00,0x00, 0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0x84, 0x00,0x00,
-0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x83,0x16, 0xFF,0x94, 0x00,0x00, 0x00,0x01, 0x93,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xF7,0xC8, 0x97,0x93, 0xFF,0xFC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0xAD,0x5D, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x58, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x42,0x58, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86,
-0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF4,0x82,
-0x00,0x1C, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0xAE,0xE4, 0xB4,0xBA, 0x68,0x02, 0xE0,0x00,
-0xAE,0xE4, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x40,0x78, 0xF5,0x84, 0x4F,0x58, 0x07,0x38,
-0x00,0x16, 0x86,0xBA, 0x00,0x00, 0xF4,0x06, 0x3B,0x90, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB4, 0xFF,0xF0, 0x76,0x35, 0x00,0x06, 0xA7,0x2E,
-0x60,0x02, 0xC5,0x2C, 0x60,0x00, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x40,0x00, 0x07,0x38,
-0x00,0x02, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x73,0xB7, 0xFF,0xF0, 0xEE,0x00, 0xAE,0x55, 0x95,0x16, 0xFF,0x64, 0xA7,0x2E,
-0x60,0x02, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x40,0x00, 0x86,0xBA, 0x00,0x04, 0x23,0x14,
-0x00,0x88, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0xA6,0xAA, 0x68,0x02, 0x77,0x1D, 0x00,0x03, 0xC7,0x38, 0x68,0x00, 0x27,0x38,
-0x00,0x08, 0x85,0x3A, 0x00,0x04, 0x84,0xBA, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x95,0x1A,
-0x00,0x04, 0x94,0x9A, 0x00,0x00, 0x85,0x96, 0xFF,0x7C, 0xE0,0x00, 0xAE,0x78, 0x00,0x00,
-0x00,0x01, 0x84,0x96, 0xFF,0x64, 0xA7,0x2E, 0x60,0x02, 0x76,0xA5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38,
-0x40,0x00, 0x85,0xBA, 0x00,0x04, 0x85,0x16, 0xFF,0x64, 0xF6,0x06, 0x3B,0x90, 0x87,0x2A,
-0x00,0x00, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xA6,0xBA, 0x60,0x02, 0x20,0x1E, 0x00,0x00, 0xC7,0x38,
-0x60,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0xEE,0x00,
-0xAE,0xC9, 0x76,0xB5, 0xFF,0xF0, 0x83,0x16, 0xFF,0x78, 0x00,0x00, 0x00,0x01, 0x77,0x19,
-0xFF,0xF0, 0xC6,0xB8, 0x68,0x00, 0x84,0x96, 0xFF,0x64, 0x00,0x00, 0x00,0x01, 0xC7,0x24,
-0x68,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xC1,0x2C, 0x00,0x00, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x10, 0xF7,0x04, 0x40,0x84, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xAF,0x3C, 0xF6,0x06, 0x42,0xB8, 0xF7,0x04, 0x42,0xB8, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xF3,0x06, 0x36,0x78, 0xF3,0x05, 0x42,0x44, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33, 0x28,0x00, 0xF7,0x04, 0x4F,0x5C, 0xF3,0x84,
-0x42,0x5C, 0x83,0x3A, 0x00,0x04, 0xC4,0x38, 0x00,0x00, 0x93,0x16, 0xFF,0xEC, 0x77,0x1D,
-0x00,0x01, 0xC7,0x38, 0x38,0x00, 0x77,0x39, 0x00,0x02, 0x04,0xB8, 0x00,0x0C, 0x83,0x16,
-0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0xC0,0x1E, 0x32,0x00, 0xEC,0x00, 0xB0,0x70, 0xC5,0x04,
-0x00,0x00, 0xA6,0xA2, 0x48,0x02, 0xF7,0x04, 0xE0,0x00, 0xF5,0x82, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0xAF,0xA8, 0xC6,0x20, 0x48,0x00, 0x86,0xB2, 0x00,0x04, 0xF7,0x04,
-0xE0,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xAF,0xAC, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0xAF,0xB9, 0x00,0x00,
-0x00,0x01, 0xF5,0x02, 0x00,0x00, 0x86,0xB2, 0x00,0x00, 0xF7,0x04, 0xE0,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0xAF,0xF4, 0xF5,0x82, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0xAF,0xFC, 0x20,0x2E, 0x00,0x00, 0x86,0xB2, 0x00,0x04, 0xF7,0x04,
-0xE0,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0xAF,0xFD, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0xB0,0x0D, 0x20,0x2A,
-0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0xB0,0x59, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x7A,0xD0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xB0,0x64, 0xC7,0x20, 0x48,0x00, 0x87,0x3A, 0x00,0x08, 0xF6,0x06, 0x40,0x98, 0x77,0x39,
-0x00,0x02, 0xA6,0xBA, 0x60,0x02, 0xC7,0x38, 0x60,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0x20,0x36, 0x00,0x00, 0xE6,0x00,
-0xB0,0x64, 0x00,0x00, 0x00,0x01, 0x04,0xA4, 0x00,0x0C, 0xE0,0x00, 0xAF,0x60, 0x03,0x9C,
-0x00,0x01, 0x83,0x16, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0xC0,0x1E, 0x32,0x00, 0xEC,0x00,
-0xB1,0x04, 0xF3,0x06, 0x36,0x78, 0xF6,0x84, 0x4F,0x5C, 0x77,0x1D, 0x00,0x01, 0xC7,0x38,
-0x38,0x00, 0x77,0x39, 0x00,0x02, 0x07,0x38, 0x00,0x0C, 0xC6,0xB4, 0x70,0x00, 0x87,0x36,
-0x00,0x08, 0xF6,0x84, 0x4F,0x58, 0x77,0x39, 0x00,0x06, 0xC6,0xB4, 0x70,0x00, 0x96,0x93,
-0xFF,0xFC, 0x93,0x96, 0xFF,0xF4, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xFA,0x98, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xF6,0x84, 0x42,0x6C, 0x83,0x96, 0xFF,0xF4, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0xC7,0x1C, 0x70,0x00, 0xF7,0x05, 0x42,0x5C, 0x06,0xB4,
-0x00,0x01, 0xF7,0x04, 0x2D,0x38, 0xF6,0x85, 0x42,0x6C, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x1C, 0x20,0x32,
-0x00,0x44, 0xE6,0x00, 0xB1,0x08, 0xB3,0x3A, 0x68,0x02, 0xE0,0x00, 0xB1,0x08, 0xF0,0x05,
-0x2D,0x38, 0xF3,0x05, 0x42,0x44, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF4,0x02, 0x00,0x00, 0xC5,0xA0, 0x00,0x00, 0xF6,0x82, 0x07,0x70, 0xF7,0x04,
-0x6E,0x50, 0x20,0x36, 0x00,0x00, 0xE6,0x00, 0xB1,0x6D, 0x06,0x38, 0x00,0x1C, 0x87,0x32,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC4,0x20, 0x70,0x00, 0xC0,0x22, 0x72,0x00, 0xE4,0x00,
-0xB1,0x5D, 0x00,0x00, 0x00,0x01, 0x05,0xAC, 0x00,0x01, 0x26,0xB4, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xE6,0x00, 0xB1,0x40, 0x06,0x30, 0x00,0x04, 0xC4,0x20, 0x58,0x00, 0xC0,0x22,
-0x5A,0x00, 0xE4,0x00, 0xB1,0x81, 0x00,0x00, 0x00,0x01, 0x04,0x20, 0x00,0x01, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x78,0xD8, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xB1,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x04, 0x40,0x94, 0x00,0x00, 0x00,0x01, 0xC0,0x22, 0x72,0x00, 0xE6,0x00,
-0xB1,0xED, 0xF4,0x05, 0x40,0x90, 0xF7,0x04, 0x6E,0x50, 0x00,0x00, 0x00,0x01, 0x86,0xBA,
-0x1D,0xDC, 0xF5,0x82, 0x00,0x01, 0x06,0xB4, 0x00,0x01, 0x96,0xBA, 0x1D,0xDC, 0x87,0x3A,
-0x1D,0xDC, 0xE0,0x00, 0xB1,0xF0, 0xF5,0x85, 0x7A,0xD0, 0xF0,0x05, 0x7A,0xD0, 0xF5,0x84,
-0x40,0x90, 0xF0,0x05, 0x40,0x84, 0xF5,0x85, 0x40,0x94, 0xF5,0x86, 0xE0,0x00, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD5,0xA0, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04,
-0x6E,0x50, 0xF4,0x05, 0x40,0x84, 0x85,0xBA, 0x1D,0xDC, 0x00,0x00, 0x00,0x01, 0xF5,0x85,
-0x3B,0x64, 0xF5,0x84, 0xE0,0x00, 0xF0,0x05, 0x42,0x5C, 0x95,0xBA, 0x00,0x10, 0xF5,0x84,
-0xE0,0x04, 0xF6,0x86, 0x2C,0x28, 0x95,0xBA, 0x00,0x14, 0xF7,0x04, 0x2D,0x38, 0xF5,0x86,
-0x3A,0x4C, 0xF5,0x85, 0x42,0x44, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0xF5,0x82, 0x00,0x1C, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0xB2,0x68, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x86, 0x35,0xEC, 0xF5,0x85, 0x42,0x30, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0xC8, 0xF3,0x02,
-0x00,0x00, 0x93,0x16, 0xFF,0x94, 0x24,0x80, 0x00,0x08, 0x94,0x96, 0xFF,0x84, 0x23,0x80,
-0x00,0x07, 0x83,0x16, 0xFF,0x94, 0x00,0x00, 0x00,0x01, 0x93,0x16, 0xFF,0x54, 0x20,0x1E,
-0x00,0x07, 0xEE,0x00, 0xB5,0x64, 0xC7,0x1C, 0x38,0x00, 0x84,0x96, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0xC7,0x24, 0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA, 0x00,0x00, 0xF5,0x84,
-0x4F,0x58, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB6, 0x74,0x00, 0xE6,0x00, 0xB3,0x2D, 0x20,0x36,
-0x00,0x01, 0xE6,0x00, 0xB3,0x2D, 0x77,0x35, 0x00,0x06, 0xA6,0xBA, 0x58,0x02, 0xC7,0x38,
-0x58,0x00, 0x76,0x39, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC6,0xB4, 0x67,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0x20,0x36, 0x00,0x02, 0xE6,0x00, 0xB3,0x31, 0xC6,0xB8, 0x00,0x00, 0xC7,0x2C,
-0x00,0x00, 0xE0,0x00, 0xB3,0x30, 0xC6,0xB8, 0x00,0x00, 0xF6,0x84, 0x4F,0x58, 0xF7,0x04,
-0x4F,0x58, 0xC5,0x34, 0x00,0x00, 0xC0,0x2A, 0x72,0x00, 0xE6,0x00, 0xB5,0x5D, 0x00,0x00,
-0x00,0x01, 0xF6,0x84, 0x3B,0xBC, 0xF3,0x02, 0x00,0x00, 0x93,0x16, 0xFF,0x3C, 0x04,0x28,
-0x00,0x1C, 0xF7,0x04, 0x3B,0xB8, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x00,
-0xB4,0x40, 0x96,0x96, 0xFF,0xAC, 0x77,0x35, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39,
-0x00,0x02, 0xF4,0x86, 0x3B,0xB4, 0xC6,0x38, 0x48,0x00, 0x06,0x30, 0x00,0x0C, 0xC3,0x04,
-0x00,0x00, 0x93,0x16, 0xFF,0x34, 0x86,0xB2, 0x00,0x00, 0x87,0x2A, 0x00,0x1C, 0x85,0x96,
-0xFF,0x3C, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xB3,0xC0, 0x20,0x2E, 0x00,0x00, 0x86,0xB2,
-0x00,0x04, 0x87,0x2A, 0x00,0x20, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0xB3,0xC0, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00,
-0xB3,0xD1, 0x00,0x00, 0x00,0x01, 0xF4,0x82, 0x00,0x00, 0x94,0x96, 0xFF,0x34, 0x86,0xB2,
-0x00,0x00, 0x87,0x22, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0xB4,0x0C, 0xF5,0x82, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xB4,0x14, 0x20,0x2E,
-0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x22, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0xB4,0x15, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0xB4,0x25, 0x00,0x00, 0x00,0x01, 0xF3,0x02, 0x00,0x01, 0x93,0x16,
-0xFF,0x34, 0x84,0x96, 0xFF,0x34, 0x00,0x00, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00,
-0xB4,0x40, 0x00,0x00, 0x00,0x01, 0xF3,0x02, 0x00,0x01, 0x93,0x16, 0xFF,0x3C, 0x84,0x96,
-0xFF,0x3C, 0x00,0x00, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00, 0xB4,0x81, 0xF6,0x02,
-0x00,0x01, 0x87,0x16, 0xFF,0xAC, 0xF3,0x06, 0x3B,0xB4, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4,
-0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6,
-0x00,0x00, 0x97,0x16, 0xFF,0xB0, 0xE0,0x00, 0xB4,0xF4, 0x96,0x96, 0xFF,0xB4, 0x27,0x14,
-0x00,0x54, 0x97,0x13, 0xFF,0xFC, 0x94,0x13, 0xFF,0xFC, 0xF4,0x86, 0x3B,0xB4, 0x94,0x93,
-0xFF,0xFC, 0x93,0x96, 0xFF,0x4C, 0x95,0x16, 0xFF,0x44, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x4C, 0x85,0x16, 0xFF,0x44, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0xB4,0xF1, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xAC, 0xF3,0x06,
-0x3B,0xB4, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4,
-0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xB0, 0x96,0x96,
-0xFF,0xB4, 0xF7,0x05, 0x3B,0xBC, 0xE0,0x00, 0xB4,0xF8, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0xB5,0x2D, 0x27,0x14, 0x00,0x08, 0x84,0x96,
-0xFF,0x54, 0x00,0x00, 0x00,0x01, 0xC7,0x24, 0x70,0x00, 0x83,0x16, 0xFF,0xB4, 0x04,0xA4,
-0x00,0x04, 0x94,0x96, 0xFF,0x54, 0x84,0x96, 0xFF,0x94, 0x93,0x3A, 0xFF,0xC0, 0x04,0xA4,
-0x00,0x01, 0xE0,0x00, 0xB5,0x54, 0x94,0x96, 0xFF,0x94, 0x83,0x16, 0xFF,0x54, 0x00,0x00,
-0x00,0x01, 0xC7,0x18, 0x70,0x00, 0xF4,0x84, 0x4F,0x58, 0x03,0x18, 0x00,0x04, 0x93,0x16,
-0xFF,0x54, 0x83,0x16, 0xFF,0x94, 0x94,0xBA, 0xFF,0xC0, 0x03,0x18, 0x00,0x01, 0x93,0x16,
-0xFF,0x94, 0x95,0x16, 0xFF,0x3C, 0x93,0x96, 0xFF,0x8C, 0xE0,0x00, 0xB2,0xB0, 0x03,0x9C,
-0x00,0x01, 0x84,0x96, 0xFF,0x94, 0x00,0x00, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00,
-0xB5,0x84, 0xF3,0x82, 0x00,0x01, 0xF4,0x04, 0x4F,0x58, 0xE0,0x00, 0xBE,0xE4, 0x00,0x00,
-0x00,0x01, 0x83,0x16, 0xFF,0xB8, 0x84,0x96, 0xFF,0x94, 0x00,0x00, 0x00,0x01, 0xC0,0x1E,
-0x4A,0x00, 0xEC,0x00, 0xB5,0xCC, 0x93,0x16, 0xFF,0x7C, 0x26,0x94, 0x00,0x04, 0x87,0x36,
-0xFF,0xC0, 0x83,0x16, 0xFF,0x7C, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00,
-0xBB,0x98, 0x03,0x9C, 0x00,0x01, 0x84,0x96, 0xFF,0x94, 0x00,0x00, 0x00,0x01, 0xC0,0x1E,
-0x4A,0x00, 0xEC,0x00, 0xB5,0xA1, 0x06,0xB4, 0x00,0x04, 0xF4,0x04, 0x4F,0x58, 0x83,0x16,
-0xFF,0x7C, 0x00,0x00, 0x00,0x01, 0xC0,0x1A, 0x42,0x00, 0xE6,0x00, 0xBA,0x2D, 0xF4,0x82,
-0x00,0x00, 0x94,0x96, 0xFF,0x74, 0x23,0x80, 0x00,0x07, 0x20,0x1E, 0x00,0x07, 0xEE,0x00,
-0xB7,0x48, 0xC7,0x1C, 0x38,0x00, 0x83,0x16, 0xFF,0x7C, 0x00,0x00, 0x00,0x01, 0xC7,0x18,
-0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA, 0x00,0x00, 0xF5,0x84, 0x4F,0x58, 0x77,0x39,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02,
-0x00,0xFF, 0xC6,0xB6, 0x74,0x00, 0xE6,0x00, 0xB6,0x69, 0x20,0x36, 0x00,0x01, 0xE6,0x00,
-0xB6,0x69, 0x77,0x35, 0x00,0x06, 0xA6,0xBA, 0x58,0x02, 0xC7,0x38, 0x58,0x00, 0x76,0x39,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC6,0xB4, 0x67,0xC0, 0x76,0xB5, 0xFF,0xF0, 0x20,0x36,
-0x00,0x02, 0xE6,0x00, 0xB6,0x6D, 0xC6,0xB8, 0x00,0x00, 0xC7,0x2C, 0x00,0x00, 0xE0,0x00,
-0xB6,0x6C, 0xC6,0xB8, 0x00,0x00, 0xF6,0x84, 0x4F,0x58, 0xF7,0x04, 0x4F,0x58, 0xC5,0x34,
-0x00,0x00, 0xC0,0x2A, 0x72,0x00, 0xE6,0x00, 0xB7,0x41, 0xC5,0x84, 0x00,0x00, 0x84,0x96,
-0xFF,0x74, 0x86,0xAA, 0x00,0x1C, 0x83,0x16, 0xFF,0x3C, 0xF6,0x02, 0x00,0x00, 0x04,0xA4,
-0x00,0x01, 0x94,0x96, 0xFF,0x74, 0x87,0x1A, 0x00,0x1C, 0x04,0xA8, 0x00,0x1C, 0x94,0x96,
-0xFF,0x34, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xB6,0xCC, 0x04,0x18, 0x00,0x1C, 0x86,0xAA,
-0x00,0x20, 0x87,0x1A, 0x00,0x20, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0xB6,0xD0, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0xB6,0xDD, 0x00,0x00, 0x00,0x01, 0xF5,0x82, 0x00,0x00, 0x83,0x16, 0xFF,0x34, 0x87,0x22,
-0x00,0x00, 0x86,0x9A, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0xB7,0x1C, 0xF6,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xB7,0x24, 0x20,0x32,
-0x00,0x00, 0x86,0x9A, 0x00,0x04, 0x87,0x22, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0xB7,0x25, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0xB7,0x35, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0xB7,0x40, 0x00,0x00, 0x00,0x01, 0x93,0x96, 0xFF,0x84, 0xE0,0x00,
-0xB5,0xEC, 0x03,0x9C, 0x00,0x01, 0x84,0x96, 0xFF,0x74, 0x83,0x16, 0xFF,0x94, 0x00,0x00,
-0x00,0x01, 0xC0,0x26, 0x32,0x00, 0xE6,0x00, 0xBB,0x98, 0x23,0x00, 0x00,0x08, 0x84,0x96,
-0xFF,0x84, 0x00,0x00, 0x00,0x01, 0xC0,0x26, 0x32,0x00, 0xE6,0x00, 0xBB,0x99, 0xF6,0x02,
-0x00,0x00, 0xF6,0x84, 0x40,0x7C, 0xF7,0x04, 0x40,0x74, 0xC6,0xB4, 0x68,0x00, 0xC7,0x38,
-0x68,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x77,0xB4, 0x00,0x08, 0x70,0x3E, 0xFF,0xE8, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0xB8,0x04, 0xF5,0x82,
-0x00,0xFF, 0x84,0x96, 0xFF,0x84, 0x83,0x16, 0xFF,0x8C, 0x00,0x00, 0x00,0x01, 0xC7,0x24,
-0x32,0x00, 0x84,0x96, 0xFF,0x7C, 0xC7,0x38, 0x70,0x00, 0xC7,0x24, 0x70,0x00, 0x07,0x38,
-0x00,0x26, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xC6,0xB4, 0x5C,0x00, 0xC0,0x36, 0x62,0x00, 0x47,0x0C,
-0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0xB8,0x0D, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0xBB,0x98, 0x23,0x80,
-0x00,0x07, 0x20,0x1E, 0x00,0x07, 0xEE,0x00, 0xB8,0xC8, 0xC7,0x1C, 0x38,0x00, 0x83,0x16,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC7,0x18, 0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA,
-0x00,0x00, 0xF5,0x84, 0x4F,0x58, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB6, 0x74,0x00, 0xE6,0x00,
-0xB8,0x91, 0x20,0x36, 0x00,0x01, 0xE6,0x00, 0xB8,0x91, 0x77,0x35, 0x00,0x06, 0xA6,0xBA,
-0x58,0x02, 0xC7,0x38, 0x58,0x00, 0x76,0x39, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC6,0xB4,
-0x67,0xC0, 0x76,0xB5, 0xFF,0xF0, 0x20,0x36, 0x00,0x02, 0xE6,0x00, 0xB8,0x95, 0xC6,0xB8,
-0x00,0x00, 0xC7,0x2C, 0x00,0x00, 0xE0,0x00, 0xB8,0x94, 0xC6,0xB8, 0x00,0x00, 0xF6,0x84,
-0x4F,0x58, 0xF7,0x04, 0x4F,0x58, 0xC5,0x34, 0x00,0x00, 0xC0,0x2A, 0x72,0x00, 0xE6,0x00,
-0xB8,0xC1, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x93,0x96, 0xFF,0x4C, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCC,0x60, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x4C, 0xE0,0x00,
-0xB8,0x14, 0x03,0x9C, 0x00,0x01, 0x84,0x96, 0xFF,0x84, 0x83,0x16, 0xFF,0x8C, 0xF3,0x84,
-0x40,0x7C, 0xF5,0x04, 0x40,0x74, 0xC4,0xA4, 0x32,0x00, 0x94,0x96, 0xFF,0x34, 0x83,0x16,
-0xFF,0x34, 0xC5,0x9C, 0x38,0x00, 0xC5,0xA8, 0x58,0x00, 0x05,0xAC, 0x00,0x26, 0x86,0xAE,
-0x00,0x00, 0x77,0x2D, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0x74,0x2D, 0x00,0x1E, 0x74,0x20,
-0xFF,0xE5, 0x73,0x9D, 0x00,0x10, 0x73,0x9D, 0xFF,0xF8, 0xC4,0xA4, 0x30,0x00, 0x94,0x96,
-0xFF,0x3C, 0x83,0x16, 0xFF,0x7C, 0xC6,0xB4, 0x77,0xC0, 0xC4,0x98, 0x48,0x00, 0x94,0x96,
-0xFF,0x3C, 0x04,0xA4, 0x00,0x26, 0x94,0x96, 0xFF,0x3C, 0x73,0x25, 0x00,0x1E, 0x73,0x18,
-0xFF,0xE5, 0x93,0x16, 0xFF,0x6C, 0x74,0xA5, 0x00,0x1E, 0x94,0x96, 0xFF,0x64, 0x74,0xA4,
-0xFF,0xE5, 0x94,0x96, 0xFF,0x64, 0x83,0x16, 0xFF,0x7C, 0xF4,0x84, 0x4F,0x58, 0x76,0xB5,
-0xFF,0xF0, 0xC6,0x18, 0x4A,0x00, 0x76,0x30, 0xFF,0xFA, 0x46,0x31, 0x00,0x00, 0xF3,0x02,
-0x00,0xFF, 0xC6,0x30, 0x34,0x00, 0xF4,0x82, 0xFF,0x00, 0xC6,0xB4, 0x4C,0x00, 0xC6,0x30,
-0x68,0x00, 0xF6,0x2F, 0x28,0x00, 0x87,0x2E, 0x00,0x00, 0x83,0x16, 0xFF,0x34, 0xC7,0x38,
-0x47,0xC0, 0x77,0x39, 0xFF,0xF0, 0x73,0x19, 0x00,0x10, 0x93,0x16, 0xFF,0x34, 0x74,0x99,
-0xFF,0xF8, 0xF3,0x02, 0x00,0xFF, 0xC7,0x38, 0x34,0x00, 0xC7,0x24, 0x70,0x00, 0x97,0x16,
-0xFF,0x34, 0x24,0x94, 0x00,0xCA, 0x84,0xA6, 0x00,0x00, 0x77,0xA5, 0x00,0x1E, 0x77,0xBC,
-0xFF,0xE5, 0xC4,0xA4, 0x7F,0xC0, 0x74,0xA5, 0xFF,0xF0, 0x83,0x16, 0xFF,0x3C, 0xF4,0xAF,
-0x28,0x00, 0xF4,0x84, 0x4F,0x58, 0x87,0x1A, 0x00,0x00, 0xC5,0x28, 0x4A,0x00, 0x75,0x28,
-0xFF,0xFA, 0x83,0x16, 0xFF,0x6C, 0x45,0x29, 0x00,0x00, 0xF4,0x82, 0x00,0xFF, 0xC5,0x28,
-0x4C,0x00, 0x84,0x96, 0xFF,0x3C, 0xC7,0x38, 0x37,0xC0, 0x77,0x39, 0xFF,0xF0, 0xF3,0x02,
-0xFF,0x00, 0xC7,0x38, 0x34,0x00, 0xC5,0x28, 0x70,0x00, 0xF5,0x27, 0x28,0x00, 0x87,0x26,
-0x00,0x00, 0x83,0x16, 0xFF,0x64, 0x84,0x16, 0xFF,0x7C, 0xC7,0x38, 0x37,0xC0, 0x77,0x39,
-0xFF,0xF0, 0xF4,0x82, 0x00,0xFF, 0xC7,0x38, 0x4C,0x00, 0x83,0x16, 0xFF,0x3C, 0xC3,0x9C,
-0x70,0x00, 0xE0,0x00, 0xBE,0xE4, 0xF3,0x9B, 0x28,0x00, 0xF7,0x04, 0x40,0x7C, 0xF6,0x04,
-0x40,0x74, 0xC7,0x38, 0x70,0x00, 0xC7,0x30, 0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA,
-0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x77,0xB4,
-0x00,0x08, 0x70,0x3E, 0xFF,0xE8, 0x47,0x0C, 0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0xBA,0x7D, 0x25,0x80, 0x00,0x07, 0xE0,0x00, 0xBE,0xE4, 0x04,0x20,
-0x00,0x40, 0xE0,0x00, 0xBA,0xD8, 0xC4,0x2C, 0x00,0x00, 0xC7,0x30, 0x42,0x00, 0x84,0x96,
-0x00,0x00, 0x75,0x38, 0xFF,0xFA, 0x06,0x24, 0x00,0x0A, 0x20,0x2E, 0x00,0x07, 0xEE,0x00,
-0xBA,0xD4, 0x07,0x30, 0x00,0x0E, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB4,
-0x74,0x00, 0x47,0x29, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0xBA,0x74, 0x06,0x30, 0x00,0x02, 0xE0,0x00, 0xBA,0x8C, 0x05,0xAC,
-0x00,0x01, 0xF4,0x02, 0x00,0x08, 0x07,0x20, 0x00,0x07, 0x20,0x3A, 0x00,0x0E, 0xE2,0x00,
-0xBB,0xA4, 0xC5,0xA0, 0x40,0x00, 0x83,0x16, 0x00,0x00, 0xF5,0x04, 0x40,0x7C, 0xF4,0x82,
-0x00,0xFF, 0xF6,0x04, 0x4F,0x58, 0xC5,0x98, 0x58,0x00, 0x05,0xAC, 0x00,0x26, 0x86,0xAE,
-0x00,0x00, 0x77,0x2D, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0x18, 0x62,0x00, 0x76,0x30,
-0xFF,0xFA, 0x46,0x31, 0x00,0x00, 0xC6,0x30, 0x4C,0x00, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0x77,0x29, 0x00,0x10, 0x77,0x39, 0xFF,0xF8, 0xC6,0xB4, 0x4C,0x00, 0xC7,0x38,
-0x68,0x00, 0xF7,0x2F, 0x28,0x00, 0xF5,0x84, 0x40,0x74, 0xC5,0x28, 0x50,0x00, 0xC5,0xAC,
-0x50,0x00, 0x05,0xAC, 0x00,0x26, 0x86,0xAE, 0x00,0x00, 0x77,0x2D, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0x75,0x2D, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0xF7,0x02, 0xFF,0x00, 0xC6,0xB4, 0x74,0x00, 0xC6,0x30, 0x68,0x00, 0xF6,0x2F,
-0x28,0x00, 0x87,0x2E, 0x00,0x00, 0x76,0xA1, 0x00,0x10, 0x76,0xB5, 0xFF,0xF8, 0xC7,0x38,
-0x57,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38, 0x4C,0x00, 0xC6,0xB4, 0x70,0x00, 0xE0,0x00,
-0xBB,0xF8, 0xF6,0xAF, 0x28,0x00, 0xF4,0x04, 0x4F,0x58, 0xE0,0x00, 0xBE,0xE4, 0x04,0x20,
-0x00,0x40, 0xF6,0x04, 0x4F,0x58, 0x83,0x16, 0x00,0x00, 0xF7,0x04, 0x40,0x7C, 0xF5,0x84,
-0x40,0x74, 0xC6,0x18, 0x62,0x00, 0x76,0x30, 0xFF,0xFA, 0xC7,0x38, 0x70,0x00, 0xC5,0xAC,
-0x70,0x00, 0x05,0xAC, 0x00,0x26, 0x86,0xAE, 0x00,0x00, 0x77,0x2D, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0x46,0x31, 0x00,0x00, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02,
-0x00,0xFF, 0xC6,0x30, 0x74,0x00, 0xF7,0x02, 0xFF,0x00, 0xC6,0xB4, 0x74,0x00, 0xC6,0x30,
-0x68,0x00, 0xF6,0x2F, 0x28,0x00, 0x23,0x80, 0x00,0x07, 0x20,0x1E, 0x00,0x07, 0xEE,0x00,
-0xBE,0xE0, 0xC7,0x1C, 0x38,0x00, 0x84,0x96, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC7,0x24,
-0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA, 0x00,0x00, 0xF5,0x84, 0x4F,0x58, 0x77,0x39,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02,
-0x00,0xFF, 0xC6,0xB6, 0x74,0x00, 0xE6,0x00, 0xBC,0x79, 0x20,0x36, 0x00,0x01, 0xE6,0x00,
-0xBC,0x79, 0x77,0x35, 0x00,0x06, 0xA6,0xBA, 0x58,0x02, 0xC7,0x38, 0x58,0x00, 0x76,0x39,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC6,0xB4, 0x67,0xC0, 0x76,0xB5, 0xFF,0xF0, 0x20,0x36,
-0x00,0x02, 0xE6,0x00, 0xBC,0x7D, 0xC6,0xB8, 0x00,0x00, 0xC7,0x2C, 0x00,0x00, 0xE0,0x00,
-0xBC,0x7C, 0xC6,0xB8, 0x00,0x00, 0xF6,0x84, 0x4F,0x58, 0xF7,0x04, 0x4F,0x58, 0xC5,0x34,
-0x00,0x00, 0xC0,0x2A, 0x72,0x00, 0xE6,0x00, 0xBE,0xD9, 0x06,0xA8, 0x00,0x1C, 0x83,0x16,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x96,0x93, 0xFF,0xFC, 0xF4,0x86,
-0x3B,0xB4, 0x94,0x93, 0xFF,0xFC, 0x93,0x96, 0xFF,0x4C, 0x95,0x16, 0xFF,0x44, 0x96,0x96,
-0xFF,0x40, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x23,0x40, 0x97,0x93, 0xFF,0xFC, 0xF3,0x04,
-0x4F,0x5C, 0xF4,0x82, 0x00,0x00, 0x94,0x96, 0xFF,0x5C, 0x86,0x96, 0xFF,0x40, 0x83,0x96,
-0xFF,0x4C, 0x85,0x16, 0xFF,0x44, 0x93,0x16, 0xFF,0x34, 0x86,0x1A, 0x00,0x08, 0x96,0x96,
-0xFF,0x3C, 0x87,0x1A, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x32, 0x72,0x00, 0xEC,0x00,
-0xBD,0xB8, 0x96,0x16, 0xFF,0x9C, 0x77,0x31, 0x00,0x01, 0xC7,0x38, 0x60,0x00, 0x77,0x39,
-0x00,0x02, 0xC6,0x38, 0x30,0x00, 0x06,0x30, 0x00,0x0C, 0x86,0xB2, 0x00,0x00, 0x87,0x2A,
-0x00,0x1C, 0x85,0x96, 0xFF,0x5C, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xBD,0x40, 0xC4,0x04,
-0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x2A, 0x00,0x20, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0xBD,0x44, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E,
-0x00,0x00, 0xE6,0x00, 0xBD,0x51, 0x00,0x00, 0x00,0x01, 0xF4,0x02, 0x00,0x00, 0x83,0x16,
-0xFF,0x3C, 0x86,0xB2, 0x00,0x00, 0x87,0x1A, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0xBD,0x90, 0xF5,0x82, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0xBD,0x98, 0x20,0x2E, 0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x1A, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0xBD,0x99, 0x20,0x2E, 0x00,0x00, 0xF5,0x82,
-0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0xBD,0xA9, 0x20,0x22, 0x00,0x00, 0xF4,0x02,
-0x00,0x01, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xBD,0xB8, 0x00,0x00, 0x00,0x01, 0xF4,0x82,
-0x00,0x01, 0x94,0x96, 0xFF,0x5C, 0x83,0x16, 0xFF,0x5C, 0x00,0x00, 0x00,0x01, 0x20,0x1A,
-0x00,0x00, 0xE6,0x00, 0xBD,0xF9, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0x9C, 0x84,0x96,
-0xFF,0x34, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4,
-0x48,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xA0, 0xE0,0x00,
-0xBE,0x70, 0x96,0x96, 0xFF,0xA4, 0x27,0x14, 0x00,0x64, 0x97,0x13, 0xFF,0xFC, 0x83,0x16,
-0xFF,0x3C, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x84,0x96, 0xFF,0x34, 0x00,0x00,
-0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0x93,0x96, 0xFF,0x4C, 0x95,0x16, 0xFF,0x44, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0x4C, 0x85,0x16,
-0xFF,0x44, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xBE,0x71, 0xF6,0x02, 0x00,0x00, 0x87,0x16,
-0xFF,0x9C, 0x83,0x16, 0xFF,0x34, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xA0, 0x96,0x96, 0xFF,0xA4, 0x97,0x1A, 0x00,0x08, 0xF6,0x02, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0xBE,0x99, 0xF6,0x06, 0x42,0x9C, 0xF7,0x04, 0x42,0x9C, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0xF7,0x04, 0x4F,0x58, 0x00,0x00, 0x00,0x01, 0xC7,0x28,
-0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0x47,0x39, 0x00,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x28,
-0x00,0x1C, 0x97,0x13, 0xFF,0xFC, 0xF4,0x84, 0x4F,0x5C, 0x00,0x00, 0x00,0x01, 0x94,0x93,
-0xFF,0xFC, 0x93,0x96, 0xFF,0x4C, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x23,0x40, 0x97,0x93,
-0xFF,0xFC, 0x83,0x96, 0xFF,0x4C, 0xE0,0x00, 0xBB,0xFC, 0x03,0x9C, 0x00,0x01, 0x84,0x16,
-0x00,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x60, 0x85,0x16, 0x00,0x00, 0x86,0x16, 0x00,0x04, 0x06,0xA8, 0x00,0x18, 0xC7,0x30,
-0x60,0x00, 0xC5,0xB8, 0x68,0x00, 0x20,0x32, 0x00,0x07, 0xEE,0x00, 0xBF,0x64, 0x07,0x2C,
-0x00,0x0E, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB4, 0x74,0x00, 0x20,0x36,
-0x00,0x00, 0x47,0x0C, 0x00,0x01, 0xD7,0x00, 0x0A,0x70, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xBF,0x61, 0x05,0xAC, 0x00,0x02, 0xE0,0x00, 0xBF,0x18, 0x06,0x30, 0x00,0x01, 0x20,0x32,
-0x00,0x07, 0xEE,0x00, 0xC0,0x4C, 0x06,0xA8, 0x00,0x16, 0xF5,0x05, 0x40,0x74, 0xF6,0x05,
-0x40,0x7C, 0xF3,0x02, 0x00,0x06, 0xF3,0x05, 0x42,0x54, 0x96,0x13, 0xFF,0xFC, 0x05,0x28,
-0x00,0x02, 0x95,0x16, 0xFF,0xC4, 0x95,0x13, 0xFF,0xFC, 0x23,0x94, 0x00,0x20, 0x93,0x96,
-0xFF,0xBC, 0x93,0x93, 0xFF,0xFC, 0x96,0x16, 0xFF,0xAC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD0,0xDC, 0x97,0x93, 0xFF,0xFC, 0x84,0x96, 0xFF,0xC4, 0x23,0x14, 0x00,0x38, 0x94,0x93,
-0xFF,0xFC, 0x93,0x16, 0xFF,0xB4, 0x93,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD2,0x58, 0x97,0x93, 0xFF,0xFC, 0x87,0x02, 0xFF,0x34, 0x86,0x16, 0xFF,0xAC, 0xF7,0x05,
-0x42,0x64, 0x96,0x13, 0xFF,0xFC, 0x97,0x13, 0xFF,0xFC, 0x83,0x96, 0xFF,0xB4, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x84,0x96, 0xFF,0xBC, 0x00,0x00, 0x00,0x01, 0x94,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xF7,0xC8, 0x97,0x93, 0xFF,0xFC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0xC0,0x1D, 0xF3,0x06, 0x3A,0xD8, 0xF7,0x04, 0x42,0x54, 0x00,0x00,
-0x00,0x01, 0x27,0x38, 0x00,0x01, 0xF7,0x05, 0x42,0x54, 0xF3,0x05, 0x42,0x44, 0xF3,0x82,
-0x17,0x70, 0x93,0x93, 0xFF,0xFC, 0xF4,0x82, 0x00,0x1B, 0x94,0x93, 0xFF,0xFC, 0xF3,0x06,
-0x42,0x44, 0x93,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0xC1,0xA0, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0xF5,0x84,
-0x4F,0x58, 0xF4,0x06, 0x3B,0x70, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x76,0x39, 0x00,0x06, 0xA7,0x2E, 0x60,0x02, 0xC5,0x2C,
-0x60,0x00, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x40,0x00, 0x07,0x38, 0x00,0x02, 0x86,0xBA,
-0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB7,
-0xFF,0xF0, 0xEE,0x00, 0xC1,0x15, 0x96,0x96, 0xFF,0x9C, 0xA7,0x2E, 0x60,0x02, 0x76,0xA9,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x83,0x96, 0xFF,0x9C, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x40,0x00, 0x86,0xBA, 0x00,0x04, 0x24,0x94,
-0x00,0x60, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0xA6,0xAA, 0x68,0x02, 0x77,0x1D, 0x00,0x03, 0xC7,0x38, 0x68,0x00, 0x27,0x38,
-0x00,0x08, 0x83,0xBA, 0x00,0x04, 0x83,0x3A, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x93,0xA6,
-0x00,0x04, 0x93,0x26, 0x00,0x00, 0x85,0x96, 0xFF,0xA4, 0xE0,0x00, 0xC1,0x38, 0x23,0x00,
-0x00,0x07, 0xA7,0x2E, 0x60,0x02, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x40,0x00, 0x85,0xBA,
-0x00,0x04, 0x23,0x00, 0x00,0x07, 0x93,0x13, 0xFF,0xFC, 0x87,0x2A, 0x00,0x00, 0x76,0xA9,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x83,0x96, 0xFF,0x9C, 0xF6,0x06, 0x3B,0x70, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xA6,0xBA, 0x60,0x02, 0x20,0x1E,
-0x00,0x00, 0xC7,0x38, 0x60,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0xEE,0x00, 0xC1,0x8D, 0x76,0xB5, 0xFF,0xF0, 0x84,0x96, 0xFF,0xA0, 0x00,0x00,
-0x00,0x01, 0x77,0x25, 0xFF,0xF0, 0xC6,0xB8, 0x68,0x00, 0xC7,0x28, 0x68,0x00, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xC1,0x2C, 0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x70, 0x25,0x00,
-0x00,0x07, 0x20,0x2A, 0x00,0x07, 0xEE,0x00, 0xC3,0xB8, 0xC7,0x28, 0x50,0x00, 0x83,0x16,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC7,0x18, 0x70,0x00, 0x07,0x38, 0x00,0x26, 0x86,0xBA,
-0x00,0x00, 0xF5,0x84, 0x4F,0x58, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB6, 0x74,0x00, 0xE6,0x00,
-0xC2,0x3D, 0x20,0x36, 0x00,0x01, 0xE6,0x00, 0xC2,0x3D, 0x77,0x35, 0x00,0x06, 0xA6,0xBA,
-0x58,0x02, 0xC7,0x38, 0x58,0x00, 0x76,0x39, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC6,0xB4,
-0x67,0xC0, 0x76,0xB5, 0xFF,0xF0, 0x20,0x36, 0x00,0x02, 0xE6,0x00, 0xC2,0x4D, 0xC0,0x3A,
-0x5A,0x00, 0xE0,0x00, 0xC2,0x48, 0xC7,0x2C, 0x00,0x00, 0xF7,0x04, 0x4F,0x58, 0xF5,0x84,
-0x4F,0x58, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x5A,0x00, 0xE6,0x00, 0xC3,0xB1, 0xF4,0x86,
-0x3B,0x90, 0x83,0x96, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x06,0x9C, 0x00,0x16, 0x87,0x36,
-0x00,0x00, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0x76,0x39, 0x00,0x06, 0xA7,0x2E, 0x60,0x02, 0xC5,0x2C, 0x60,0x00, 0x76,0xA9,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39,
-0x00,0x03, 0xC7,0x38, 0x48,0x00, 0x07,0x38, 0x00,0x02, 0x86,0xBA, 0x00,0x00, 0x77,0x39,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB7, 0xFF,0xF0, 0xEE,0x00,
-0xC3,0x21, 0x96,0x96, 0xFF,0x8C, 0xA7,0x2E, 0x60,0x02, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x83,0x16, 0xFF,0x8C, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39,
-0x00,0x03, 0xC7,0x38, 0x48,0x00, 0x86,0xBA, 0x00,0x04, 0x24,0x94, 0x00,0x70, 0x77,0x39,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xA6,0xAA,
-0x68,0x02, 0x77,0x19, 0x00,0x03, 0xC7,0x38, 0x68,0x00, 0x27,0x38, 0x00,0x08, 0x83,0xBA,
-0x00,0x04, 0x83,0x3A, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x93,0xA6, 0x00,0x04, 0x93,0x26,
-0x00,0x00, 0x86,0x16, 0xFF,0x94, 0xE0,0x00, 0xC3,0x44, 0x00,0x00, 0x00,0x01, 0xA7,0x2E,
-0x60,0x02, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF3,0x06, 0x3B,0x90, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x30,0x00, 0x86,0x3A,
-0x00,0x04, 0x87,0x2A, 0x00,0x00, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x83,0x96,
-0xFF,0x8C, 0xF4,0x86, 0x3B,0x90, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39,
-0x00,0x03, 0xA6,0xBA, 0x48,0x02, 0x20,0x1E, 0x00,0x00, 0xC7,0x38, 0x48,0x00, 0x77,0x39,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0xEE,0x00, 0xC3,0x95, 0x76,0xB5,
-0xFF,0xF0, 0x83,0x16, 0xFF,0x90, 0x00,0x00, 0x00,0x01, 0x77,0x19, 0xFF,0xF0, 0xC6,0xB8,
-0x68,0x00, 0xC7,0x28, 0x68,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xC1,0x30,
-0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0xC5,0xC4, 0x00,0x00, 0x00,0x01, 0xE0,0x00,
-0xC1,0xC4, 0x05,0x28, 0x00,0x01, 0x83,0x96, 0x00,0x00, 0xF4,0x82, 0x00,0x06, 0xF4,0x85,
-0x42,0x54, 0xF6,0x04, 0x42,0x60, 0x25,0x14, 0x00,0x1E, 0x23,0x14, 0x00,0x20, 0x93,0x16,
-0xFF,0xAC, 0xF3,0x85, 0x40,0x78, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x06,0x30, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC,
-0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14,
-0x00,0x1C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14,
-0x00,0x1A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14,
-0x00,0x18, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14,
-0x00,0x16, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14,
-0x00,0x14, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14,
-0x00,0x12, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x25,0x14, 0x00,0x10, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x07,0x1C,
-0x00,0x02, 0x97,0x13, 0xFF,0xFC, 0x23,0x94, 0x00,0x50, 0x93,0x96, 0xFF,0xA4, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD2,0x58, 0x97,0x93, 0xFF,0xFC, 0x84,0x96,
-0xFF,0xA4, 0x23,0x14, 0x00,0x38, 0x94,0x93, 0xFF,0xFC, 0x27,0x80, 0x00,0x07, 0x97,0x93,
-0xFF,0xFC, 0x93,0x16, 0xFF,0x9C, 0x93,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xCF,0x24, 0x97,0x93, 0xFF,0xFC, 0x87,0x02, 0xFF,0x34, 0x27,0x80, 0x00,0x07, 0xF7,0x85,
-0x42,0x58, 0xF7,0x05, 0x42,0x64, 0x27,0x80, 0x00,0x07, 0x97,0x93, 0xFF,0xFC, 0x97,0x13,
-0xFF,0xFC, 0x83,0x96, 0xFF,0x9C, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x84,0x96,
-0xFF,0xAC, 0x00,0x00, 0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xF5,0xF4, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xC5,0x95, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x42,0x58, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x42,0x58, 0xF7,0x04, 0x2D,0x38, 0xF3,0x06, 0x39,0xC0, 0xF3,0x05, 0x42,0x44, 0xF6,0x86,
-0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x82,
-0x00,0x1C, 0x20,0x32, 0x00,0x44, 0xE6,0x00, 0xC5,0xC4, 0xB3,0xBA, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x25,0x00,
-0x00,0x07, 0xF7,0x04, 0x40,0x74, 0xF6,0x84, 0x4F,0x58, 0xF6,0x04, 0x42,0x60, 0xC7,0x38,
-0x6A,0x00, 0x75,0xB8, 0xFF,0xFA, 0x06,0x30, 0x00,0x0A, 0x20,0x2A, 0x00,0x07, 0xEE,0x00,
-0xC6,0x48, 0x07,0x30, 0x00,0x0E, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB4,
-0x74,0x00, 0x47,0x2D, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0xC6,0x4C, 0xC3,0x28, 0x00,0x00, 0x06,0x30, 0x00,0x02, 0xE0,0x00,
-0xC5,0xFC, 0x05,0x28, 0x00,0x01, 0xF3,0x02, 0x00,0x08, 0xC5,0x18, 0x30,0x00, 0xF3,0x84,
-0x42,0x60, 0xF6,0x04, 0x4F,0x58, 0xF7,0x04, 0x40,0x7C, 0xF4,0x84, 0x40,0x74, 0xC5,0x1C,
-0x50,0x00, 0x05,0x28, 0x00,0x26, 0x85,0xAA, 0x00,0x00, 0x74,0x29, 0x00,0x1E, 0x74,0x20,
-0xFF,0xE5, 0xC6,0x1C, 0x62,0x00, 0x76,0x30, 0xFF,0xFA, 0xC6,0xB8, 0x70,0x00, 0xC4,0xA4,
-0x68,0x00, 0x04,0xA4, 0x00,0x26, 0x76,0xA5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x77,0x39,
-0x00,0x10, 0x77,0x39, 0xFF,0xF8, 0x46,0x31, 0x00,0x00, 0xC5,0xAC, 0x47,0xC0, 0x75,0xAD,
-0xFF,0xF0, 0xF4,0x02, 0x00,0xFF, 0xC5,0xAC, 0x44,0x00, 0xC7,0x38, 0x58,0x00, 0xF7,0x2B,
-0x28,0x00, 0x87,0x26, 0x00,0x00, 0x75,0xA5, 0x00,0x1E, 0xC6,0x30, 0x44,0x00, 0x75,0xAC,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xF6,0x82, 0xFF,0x00, 0xC7,0x38,
-0x6C,0x00, 0xC6,0x30, 0x70,0x00, 0xF6,0x27, 0x28,0x00, 0x87,0x26, 0x00,0x00, 0x76,0x99,
-0x00,0x10, 0x76,0xB5, 0xFF,0xF8, 0xC7,0x38, 0x5F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38,
-0x44,0x00, 0xC6,0xB4, 0x70,0x00, 0xF6,0xA7, 0x28,0x00, 0x93,0x93, 0xFF,0xFC, 0xF3,0x84,
-0x3B,0xB0, 0x00,0x00, 0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD4,0x2C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04, 0x40,0x7C, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0x97,0x13, 0xFF,0xFC, 0xF3,0x84, 0x40,0x74, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xBE,0xF8, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06,
-0x42,0x30, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x35,0x60, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x42,0x30, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x35,0xEC, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x42,0x44, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x36,0x78, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x42,0x44, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x37,0x04, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x42,0x44, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x37,0x90, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x42,0x44, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x38,0x1C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x42,0x44, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x38,0xA8, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x42,0x44, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x39,0x34, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x42,0x44, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x39,0xC0, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x42,0x44, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x3A,0x4C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x42,0x44, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x3A,0xD8, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x96,
-0x00,0x00, 0xF5,0x06, 0x3B,0x90, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38,
-0x50,0x00, 0x07,0x38, 0x00,0x02, 0x86,0xBA, 0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0x37, 0xFF,0xF0, 0xEE,0x00, 0xC9,0x95, 0x00,0x00,
-0x00,0x01, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x50,0x00, 0x86,0xBA,
-0x00,0x04, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0xA6,0xAE, 0x68,0x02, 0x77,0x31, 0x00,0x03, 0xC7,0x38, 0x68,0x00, 0x27,0x38,
-0x00,0x08, 0x84,0xBA, 0x00,0x04, 0x84,0x3A, 0x00,0x00, 0xE0,0x00, 0xC9,0xB4, 0xC5,0x24,
-0x00,0x00, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x50,0x00, 0x85,0x3A,
-0x00,0x04, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x20,0x32,
-0x00,0x00, 0xF6,0x06, 0x3B,0x90, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39,
-0x00,0x03, 0xA6,0xBA, 0x60,0x02, 0xC7,0x38, 0x60,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0xEE,0x00, 0xC9,0xF9, 0x76,0xB5, 0xFF,0xF0, 0x77,0x21,
-0xFF,0xF0, 0xC6,0xB8, 0x68,0x00, 0xC7,0x2C, 0x68,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xC1,0x28, 0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x96, 0x00,0x00, 0xF5,0x06, 0x3B,0x70, 0x87,0x2E,
-0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x77,0x39, 0x00,0x03, 0xC7,0x38, 0x50,0x00, 0x07,0x38, 0x00,0x02, 0x86,0xBA,
-0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0x37,
-0xFF,0xF0, 0xEE,0x00, 0xCA,0xBD, 0x00,0x00, 0x00,0x01, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39,
-0x00,0x03, 0xC7,0x38, 0x50,0x00, 0x86,0xBA, 0x00,0x04, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xA6,0xAE, 0x68,0x02, 0x77,0x31,
-0x00,0x03, 0xC7,0x38, 0x68,0x00, 0x27,0x38, 0x00,0x08, 0x84,0xBA, 0x00,0x04, 0x84,0x3A,
-0x00,0x00, 0xE0,0x00, 0xCA,0xDC, 0xC5,0x24, 0x00,0x00, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39,
-0x00,0x03, 0xC7,0x38, 0x50,0x00, 0x85,0x3A, 0x00,0x04, 0x83,0x96, 0x00,0x04, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x20,0x32, 0x00,0x00, 0x93,0x93, 0xFF,0xFC, 0x87,0x2E,
-0x00,0x00, 0xF6,0x06, 0x3B,0x70, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0x39,
-0x00,0x03, 0xA6,0xBA, 0x60,0x02, 0xC7,0x38, 0x60,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0xEE,0x00, 0xCB,0x29, 0x76,0xB5, 0xFF,0xF0, 0x77,0x21,
-0xFF,0xF0, 0xC6,0xB8, 0x68,0x00, 0xC7,0x2C, 0x68,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xC1,0x28, 0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF5,0x04, 0x4F,0x58, 0xF5,0x82, 0x00,0x02, 0x06,0x28,
-0x00,0x80, 0x20,0x2E, 0x00,0x62, 0xEE,0x00, 0xCB,0x90, 0x07,0x30, 0x00,0x40, 0xF0,0x33,
-0x28,0x00, 0xC6,0xB8, 0x52,0x00, 0x76,0xB4, 0xFF,0xFA, 0x06,0x30, 0x00,0x14, 0xF6,0xB3,
-0x28,0x00, 0xC6,0x38, 0x00,0x00, 0xE0,0x00, 0xCB,0x64, 0x05,0xAC, 0x00,0x01, 0xF7,0x04,
-0x4F,0x58, 0x00,0x00, 0x00,0x01, 0x06,0xB8, 0x18,0xD4, 0xF4,0x82, 0x00,0x01, 0xF4,0xB7,
-0x28,0x00, 0x07,0x38, 0x18,0xC0, 0xF0,0x3B, 0x28,0x00, 0xF7,0x06, 0x42,0xC0, 0xF4,0x82,
-0x00,0x02, 0xF4,0xBB, 0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF6,0x84, 0x42,0xC0, 0xF6,0x06, 0x42,0xC0, 0x77,0x31, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0x75,0xB1, 0x00,0x1E, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB4, 0xFF,0xF0, 0xF7,0x04,
-0x4F,0x58, 0x76,0xB5, 0x00,0x06, 0xC4,0x38, 0x68,0x00, 0x87,0x22, 0x00,0x14, 0x76,0xA1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33,
-0x28,0x00, 0xF7,0x04, 0x42,0xC0, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0x20,0x3A, 0x00,0x01, 0xE6,0x00, 0xCC,0x4C, 0xF6,0x06, 0x42,0x90, 0xF7,0x04,
-0x42,0x90, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x04, 0x85,0x16, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x95,0x16, 0xFF,0xF4, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xCD,0x00, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xF4, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0xCC,0xBC, 0xF5,0x86, 0x42,0xC0, 0xF7,0x04, 0x42,0x90, 0xF6,0x06, 0x42,0x92, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0xCC,0xEC, 0xF7,0x33, 0x28,0x00, 0xF0,0x2B, 0x28,0x00, 0xF6,0x84,
-0x42,0xC0, 0x77,0x2D, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0x06,0x28, 0x00,0x14, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB4, 0xFF,0xF0, 0xF7,0x04, 0x4F,0x58, 0xF6,0xB3, 0x28,0x00, 0xC7,0x28,
-0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0xF7,0x2F, 0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x96, 0x00,0x00, 0xF7,0x04, 0x4F,0x58, 0xF4,0x02,
-0x00,0x00, 0xC6,0xB4, 0x72,0x00, 0x77,0x34, 0xFF,0xFA, 0x27,0x38, 0x00,0x02, 0x20,0x3A,
-0x00,0x61, 0xF7,0x02, 0x00,0x3F, 0xE2,0x00, 0xCD,0x40, 0xC6,0xB4, 0x74,0x00, 0x20,0x36,
-0x00,0x00, 0xE6,0x00, 0xCD,0x40, 0x00,0x00, 0x00,0x01, 0xF4,0x02, 0x00,0x01, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x16, 0x00,0x00, 0x87,0x16,
-0x00,0x08, 0x85,0x96, 0x00,0x04, 0xC5,0x30, 0x70,0x00, 0xC0,0x32, 0x52,0x00, 0xE6,0x00,
-0xCD,0xA1, 0x00,0x00, 0x00,0x01, 0x86,0xB2, 0x00,0x00, 0x77,0x31, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xE8, 0xF6,0xAF, 0x68,0x00, 0x06,0x30,
-0x00,0x01, 0xC0,0x32, 0x52,0x00, 0xE6,0x00, 0xCD,0x78, 0x05,0xAC, 0x00,0x01, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x84,0x96,
-0x00,0x00, 0x84,0x16, 0x00,0x04, 0x85,0x96, 0x00,0x08, 0x86,0xA6, 0x00,0x00, 0x77,0x25,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x75,0x35, 0xFF,0xF0, 0x20,0x2A,
-0x00,0x10, 0xE2,0x00, 0xCE,0x0D, 0xF6,0x06, 0x42,0x8E, 0xF5,0x02, 0x00,0x10, 0xF7,0x04,
-0x42,0x8C, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x20,0x2E, 0x00,0x01, 0xE6,0x00,
-0xCE,0x70, 0x20,0x2A, 0x00,0x00, 0xEE,0x00, 0xCE,0x71, 0x07,0x24, 0x00,0x02, 0x25,0x28,
-0x00,0x01, 0xA5,0xBA, 0x50,0x02, 0x86,0x22, 0x00,0x00, 0x76,0xA1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x50,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC5,0xAC,
-0x77,0xC0, 0xC6,0x30, 0x6F,0xC0, 0x76,0x31, 0xFF,0xF0, 0x75,0xAD, 0xFF,0xE8, 0xF6,0x82,
-0x00,0xFF, 0xF7,0x02, 0xF1,0x54, 0x75,0xAD, 0x00,0x02, 0xA7,0x2E, 0x70,0x02, 0xC6,0x30,
-0x6C,0x00, 0xC6,0x30, 0x75,0x80, 0xF6,0x23, 0x28,0x00, 0x24,0x20, 0x00,0x02, 0x25,0xA8,
-0x00,0x01, 0xF3,0x02, 0xF2,0x46, 0x03,0xA4, 0x00,0x02, 0xC4,0xAC, 0x38,0x00, 0x25,0x2C,
-0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xEC,0x00, 0xCF,0x11, 0x00,0x00, 0x00,0x01, 0xE6,0x00,
-0xCE,0xA0, 0xC7,0x1C, 0x50,0x00, 0xE0,0x00, 0xCE,0xB4, 0xF6,0x02, 0x00,0x00, 0xA6,0x9E,
-0x50,0x02, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0x35,
-0xFF,0xE8, 0x86,0xA6, 0x00,0x00, 0x77,0x25, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0x25,0x28,
-0x00,0x02, 0x25,0xAC, 0x00,0x02, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xE8, 0x77,0x31,
-0x00,0x04, 0xC7,0x38, 0x62,0x00, 0x77,0x39, 0x00,0x01, 0xC7,0x38, 0x30,0x00, 0xC6,0xB4,
-0x68,0x00, 0xC6,0xB4, 0x70,0x00, 0x06,0xB4, 0x00,0x0E, 0x87,0x36, 0x00,0x00, 0x24,0xA4,
-0x00,0x02, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0xE0,0x00, 0xCE,0x84, 0x24,0x20, 0x00,0x02, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x16, 0x00,0x08, 0x83,0x16,
-0x00,0x04, 0x83,0x96, 0x00,0x00, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x05,0x9C, 0x00,0x02, 0x74,0x9D, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x74,0x1D,
-0x00,0x1E, 0x06,0x30, 0x00,0x02, 0x75,0x31, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0x28, 0xFF,0xE5, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x05,0xAC, 0x00,0x02, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x87,0x1E, 0x00,0x00, 0x74,0x20,
-0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x1F,
-0x28,0x00, 0x87,0x1E, 0x00,0x00, 0x04,0x9C, 0x00,0x02, 0xC7,0x38, 0x47,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x25,0x38, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xEE,0x00, 0xD0,0xBD, 0x26,0x28,
-0x00,0x01, 0xA7,0x26, 0x60,0x02, 0xC6,0xA4, 0x60,0x00, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC5,0xA4, 0x50,0x00, 0xC5,0x30, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xE8, 0xE0,0x00, 0xD0,0x88, 0xF7,0x2F, 0x68,0x00, 0x07,0x1C, 0x00,0x02, 0xF3,0x3B,
-0x68,0x00, 0xC4,0x1C, 0x00,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x86,0x16, 0x00,0x04, 0x84,0x16, 0x00,0x00, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x05,0xA0, 0x00,0x02, 0x74,0xA1, 0x00,0x1E, 0x74,0xA4,
-0xFF,0xE5, 0x06,0x30, 0x00,0x02, 0x75,0x31, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0x28, 0xFF,0xE5, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x06,0xA0, 0x00,0x02, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2F, 0x28,0x00, 0x87,0x22,
-0x00,0x00, 0x76,0x21, 0x00,0x1E, 0x85,0x96, 0x00,0x08, 0xC7,0x38, 0x4F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0xC6,0xB4, 0x70,0x00, 0xF5,0xB7, 0x68,0x00, 0x87,0x22, 0x00,0x00, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x23,
-0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x20, 0x27,0x14, 0x00,0x20, 0xF0,0x3B, 0x28,0x00, 0x84,0x96, 0x00,0x04, 0xF5,0x02,
-0x00,0x00, 0x86,0xA6, 0x00,0x00, 0x76,0x25, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x04,0x24,
-0x00,0x02, 0xC6,0xB4, 0x67,0xC0, 0x76,0xB4, 0xFF,0xF0, 0xF6,0xBB, 0x28,0x00, 0x87,0x26,
-0x00,0x00, 0x76,0xA5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0xC0,0x2A, 0x72,0x00, 0xEC,0x00, 0xD2,0xF8, 0x76,0xA5, 0x00,0x1E, 0x87,0x26,
-0x00,0x00, 0x76,0xB4, 0xFF,0xE5, 0x06,0x28, 0x00,0x01, 0x25,0x94, 0x00,0x1E, 0xC5,0xAC,
-0x50,0x00, 0xC5,0x30, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38,
-0x52,0x00, 0xA6,0xA2, 0x70,0x02, 0xC7,0x20, 0x70,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xE8, 0xC6,0x80, 0x6A,0x00, 0xE0,0x00,
-0xD2,0x90, 0xF6,0xAF, 0x68,0x00, 0x87,0x16, 0xFF,0xE0, 0x76,0x15, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x83,0x96, 0x00,0x00, 0x23,0x14, 0x00,0x1E, 0x75,0x99, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0x75,0x15, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x74,0x95, 0x00,0x1E, 0x74,0xA4,
-0xFF,0xE5, 0x74,0x15, 0x00,0x1E, 0x74,0x20, 0xFF,0xE5, 0x06,0x9C, 0x00,0x02, 0x73,0x95,
-0x00,0x1E, 0x93,0x96, 0xFF,0xDC, 0xC7,0x38, 0x67,0xC0, 0x83,0x96, 0x00,0x00, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x83,0x96, 0xFF,0xDC, 0x87,0x1A, 0x00,0x00, 0x73,0x9C,
-0xFF,0xE5, 0x93,0x96, 0xFF,0xDC, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xE4, 0x23,0x14, 0x00,0x1A, 0x76,0x19,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xE8, 0x23,0x14,
-0x00,0x16, 0x76,0x19, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16,
-0xFF,0xEC, 0x23,0x14, 0x00,0x12, 0x76,0x19, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x47,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4,
-0x00,0x02, 0x84,0x16, 0x00,0x00, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x16, 0xFF,0xF0, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x3F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x86,0x16, 0x00,0x00, 0x84,0x16, 0x00,0x04, 0xF6,0x84, 0x4F,0x58, 0x87,0x32,
-0x00,0x14, 0x03,0x30, 0x00,0x14, 0x75,0x19, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0xC3,0xA0,
-0x6A,0x00, 0x73,0x9C, 0xFF,0xFA, 0x04,0xA0, 0x00,0x14, 0x75,0xA5, 0x00,0x1E, 0xC6,0x30,
-0x6A,0x00, 0x76,0x30, 0xFF,0xFA, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0xF3,0x9B, 0x28,0x00, 0x07,0x20, 0x00,0x16, 0xF6,0x3B, 0x28,0x00, 0x87,0x22,
-0x00,0x14, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x77,0x39,
-0x00,0x06, 0xC6,0xB4, 0x70,0x00, 0x06,0xB4, 0x00,0x16, 0xF3,0xB7, 0x28,0x00, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x16, 0x00,0x00, 0xF5,0x84,
-0x4F,0x58, 0x05,0x30, 0x00,0x16, 0x87,0x2A, 0x00,0x00, 0x76,0xA9, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x77,0x39, 0x00,0x06, 0xC4,0x2C,
-0x70,0x00, 0xC0,0x22, 0x62,0x00, 0xE6,0x00, 0xD5,0x29, 0x06,0xA0, 0x00,0x16, 0x87,0x36,
-0x00,0x00, 0xC6,0x30, 0x5A,0x00, 0x76,0x30, 0xFF,0xFA, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x77,0x39, 0x00,0x06, 0x76,0xB8,
-0xFF,0xFA, 0xF6,0xAB, 0x28,0x00, 0xC7,0x2C, 0x70,0x00, 0x07,0x38, 0x00,0x14, 0xE0,0x00,
-0xD5,0x2C, 0xF6,0x3B, 0x28,0x00, 0xC4,0x2C, 0x00,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x4F,0x84, 0x47,0x38, 0xFF,0xFC, 0xF7,0x05,
-0x6F,0x30, 0xF6,0x86, 0x50,0x5C, 0x46,0xB4, 0xFF,0xFC, 0xF6,0x85, 0x6E,0x50, 0xF7,0x06,
-0x6E,0x7C, 0x47,0x38, 0xFF,0xFC, 0xF7,0x05, 0x6E,0x54, 0x07,0x34, 0x19,0x1C, 0xF7,0x05,
-0x4F,0x5C, 0xF7,0x02, 0x00,0x64, 0x97,0x36, 0x19,0x1C, 0xF7,0x02, 0x00,0x00, 0x97,0x36,
-0x19,0x20, 0x06,0xB4, 0x00,0x1C, 0xF6,0x85, 0x4F,0x58, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x90, 0xF3,0x02, 0xFF,0xFF, 0xF3,0x05,
-0x4F,0x54, 0xF3,0x82, 0x00,0x00, 0x93,0x96, 0xFF,0xAC, 0x23,0x14, 0x00,0x20, 0x93,0x16,
-0xFF,0x9C, 0x23,0x94, 0x00,0x38, 0x93,0x96, 0xFF,0x94, 0x83,0x16, 0xFF,0xAC, 0xF7,0x04,
-0x4F,0x5C, 0xF3,0x82, 0x00,0x0C, 0x93,0x96, 0xFF,0x74, 0x93,0x16, 0xFF,0x8C, 0x87,0x3A,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x97,0x16, 0xFF,0xA4, 0x83,0x16, 0xFF,0xAC, 0x83,0x96,
-0xFF,0xA4, 0x00,0x00, 0x00,0x01, 0xC0,0x1A, 0x3A,0x00, 0xEC,0x00, 0xDB,0x78, 0xF3,0x02,
-0x04,0xBC, 0xF7,0x04, 0x4F,0x5C, 0x83,0x16, 0xFF,0x74, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x30,0x00, 0x87,0x3A, 0x00,0x08, 0xF6,0x84, 0x4F,0x58, 0x77,0x39, 0x00,0x06, 0xC4,0xB4,
-0x70,0x00, 0x94,0x93, 0xFF,0xFC, 0x94,0x96, 0xFF,0x7C, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xCD,0x00, 0x97,0x93, 0xFF,0xFC, 0x84,0x96, 0xFF,0x7C, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0xD6,0x54, 0xC5,0x04, 0x00,0x00, 0xF7,0x04, 0x42,0x88, 0xE0,0x00, 0xD8,0x7C, 0xF6,0x06,
-0x42,0x88, 0xF6,0x04, 0x4F,0x5C, 0x83,0x96, 0x00,0x00, 0x83,0x16, 0xFF,0x74, 0x86,0x9E,
-0x00,0x00, 0xA7,0x32, 0x30,0x02, 0xF5,0x82, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0xD6,0x94, 0xC6,0x30, 0x30,0x00, 0x86,0x9E, 0x00,0x04, 0x87,0x32, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xD6,0x98, 0x20,0x2E, 0x00,0x00, 0xF5,0x82,
-0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0xD6,0xA5, 0x00,0x00, 0x00,0x01, 0xF5,0x02,
-0x00,0x00, 0x83,0x96, 0x00,0x00, 0x87,0x32, 0x00,0x00, 0x86,0x9E, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0xD6,0xE4, 0xF5,0x82, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0xE6,0x00, 0xD6,0xEC, 0x20,0x2E, 0x00,0x00, 0x86,0x9E, 0x00,0x04, 0x87,0x32,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0xD6,0xED, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0xD6,0xFD, 0x20,0x2A,
-0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0xD7,0x28, 0x04,0xA4,
-0x00,0x02, 0x83,0x16, 0xFF,0xAC, 0xF7,0x06, 0x42,0xC8, 0x83,0x96, 0xFF,0x8C, 0xF3,0x05,
-0x4F,0x54, 0xC7,0x1C, 0x70,0x00, 0xF0,0x3B, 0x28,0x00, 0x07,0x38, 0x00,0x02, 0xE0,0x00,
-0xDB,0x50, 0xF0,0x3B, 0x28,0x00, 0x94,0x96, 0xFF,0x6C, 0x87,0x26, 0x00,0x00, 0x76,0xA5,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x83,0x16, 0xFF,0x6C, 0x83,0x96, 0xFF,0x9C, 0x24,0x94,
-0x00,0x1E, 0x06,0x18, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0x1D,
-0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x1C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x1A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x18, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x16, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x14, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x24,0x94, 0x00,0x12, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x94, 0x00,0x10, 0x76,0x31,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x87,0x16, 0xFF,0xE0, 0xF6,0x82, 0xFF,0xFC, 0xC7,0x38, 0x57,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x03, 0xC4,0xB8, 0x6C,0x00, 0x20,0x26, 0x00,0x10, 0xE2,0x00,
-0xD8,0x9D, 0xF6,0x06, 0x42,0x8A, 0xF7,0x04, 0x42,0x88, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xF4,0x02, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0xDB,0xA0, 0xF7,0x33, 0x28,0x00, 0x83,0x16, 0xFF,0x6C, 0x25,0x14,
-0x00,0x36, 0x83,0x96, 0xFF,0x94, 0x87,0x1A, 0x00,0x00, 0x76,0x99, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x06,0x18, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x1F, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38,
-0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x34, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x32, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x30, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x2E, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x2C, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x2A, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x28, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x26,0xA4, 0x00,0x02, 0x74,0xA4, 0xFF,0xFF, 0x76,0x31,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B,
-0x28,0x00, 0x90,0x13, 0xFF,0xFC, 0x83,0x16, 0xFF,0x8C, 0xF7,0x06, 0x42,0xCC, 0xC7,0x18,
-0x70,0x00, 0xC7,0x38, 0x68,0x00, 0x97,0x13, 0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0x94,0x96,
-0xFF,0x7C, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0xB8, 0x97,0x93, 0xFF,0xFC, 0x83,0x96,
-0xFF,0x6C, 0x24,0x14, 0x00,0x4E, 0x25,0x14, 0x00,0x50, 0x83,0x16, 0xFF,0x8C, 0x84,0x96,
-0xFF,0x7C, 0x87,0x1E, 0x00,0x00, 0x76,0x9D, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x06,0x1C,
-0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0x29, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x4C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x4A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x48, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x46, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x44, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x42, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x14, 0x00,0x40, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x86,0x96,
-0xFF,0xB0, 0xF6,0x06, 0x42,0xC8, 0xC6,0x18, 0x60,0x00, 0xF7,0x02, 0x00,0x03, 0xC6,0xB4,
-0x57,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xC6,0xB4, 0x74,0x00, 0xF7,0x02, 0x00,0x04, 0xC7,0x38,
-0x6A,0x00, 0xF7,0x33, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0xF4,0xB3, 0x28,0x00, 0x83,0x96,
-0xFF,0x8C, 0x83,0x16, 0xFF,0x74, 0x03,0x9C, 0x00,0x14, 0x93,0x96, 0xFF,0x8C, 0x03,0x18,
-0x00,0x0C, 0x83,0x96, 0xFF,0xAC, 0x93,0x16, 0xFF,0x74, 0x03,0x9C, 0x00,0x01, 0xE0,0x00,
-0xD5,0xEC, 0x93,0x96, 0xFF,0xAC, 0x93,0x13, 0xFF,0xFC, 0xF3,0x84, 0x4F,0x5C, 0x00,0x00,
-0x00,0x01, 0x93,0x93, 0xFF,0xFC, 0xF3,0x06, 0x4A,0x98, 0x93,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93, 0xFF,0xFC, 0xF4,0x02, 0x00,0x01, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x01,0xA0, 0xF5,0x02,
-0x00,0x00, 0xF3,0x84, 0x6E,0x50, 0xF6,0x02, 0x00,0x1C, 0x20,0x2A, 0x00,0x63, 0xEE,0x00,
-0xDC,0x08, 0xC5,0x9C, 0x60,0x00, 0xA6,0x9E, 0x60,0x02, 0x77,0x2D, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0x20,0x36, 0x00,0x03, 0xE6,0x00,
-0xDB,0xFC, 0x07,0x2C, 0x00,0x36, 0xF0,0x3B, 0x28,0x00, 0x06,0x30, 0x00,0x40, 0xE0,0x00,
-0xDB,0xCC, 0x05,0x28, 0x00,0x01, 0xF5,0x84, 0x4F,0x5C, 0x00,0x00, 0x00,0x01, 0x86,0xAE,
-0x00,0x08, 0xF4,0x02, 0x00,0x00, 0x87,0x2E, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xEC,0x00, 0xDC,0xF0, 0x96,0x96, 0xFF,0xEC, 0x77,0x35, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x77,0x39, 0x00,0x02, 0xC6,0x38, 0x58,0x00, 0x06,0x30, 0x00,0x0C, 0xC3,0x84,
-0x00,0x00, 0x83,0x16, 0x00,0x00, 0x86,0xB2, 0x00,0x00, 0x87,0x1A, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xDC,0x7C, 0xC5,0x20, 0x00,0x00, 0x86,0xB2,
-0x00,0x04, 0x87,0x1A, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0xDC,0x80, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00,
-0xDC,0x8D, 0x00,0x00, 0x00,0x01, 0xF3,0x82, 0x00,0x00, 0x84,0x96, 0x00,0x00, 0x86,0xB2,
-0x00,0x00, 0x87,0x26, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0xDC,0xCC, 0xF5,0x02, 0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xDC,0xD4, 0x20,0x2A,
-0x00,0x00, 0x86,0xB2, 0x00,0x04, 0x87,0x26, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x00, 0xDC,0xD5, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A,
-0x00,0x00, 0xE6,0x00, 0xDC,0xE5, 0x20,0x1E, 0x00,0x00, 0xF3,0x82, 0x00,0x01, 0x20,0x1E,
-0x00,0x00, 0xE6,0x00, 0xDC,0xF4, 0x20,0x22, 0x00,0x00, 0xF4,0x02, 0x00,0x01, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0xDD,0x29, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xEC, 0x00,0x00,
-0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4,
-0x58,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xF0, 0xE0,0x00,
-0xDD,0x98, 0x96,0x96, 0xFF,0xF4, 0x27,0x14, 0x00,0x14, 0x97,0x13, 0xFF,0xFC, 0x83,0x16,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x95,0x93, 0xFF,0xFC, 0x95,0x96,
-0xFE,0x70, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x85,0x96,
-0xFE,0x70, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xDD,0x95, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x58,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xF0, 0x96,0x96, 0xFF,0xF4, 0x97,0x2E, 0x00,0x08, 0xE0,0x00, 0xDD,0x9C, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0xDD,0xB0, 0xF4,0x82,
-0x00,0x00, 0xF7,0x04, 0x42,0x7C, 0xE0,0x00, 0xE0,0x9C, 0xF6,0x06, 0x42,0x7E, 0x94,0x96,
-0xFF,0x44, 0x87,0x16, 0xFF,0xF4, 0xF6,0x04, 0x4F,0x58, 0x77,0x39, 0x00,0x06, 0xC7,0x30,
-0x70,0x00, 0x97,0x16, 0xFF,0x54, 0x06,0xB8, 0x00,0x1A, 0x87,0x36, 0x00,0x00, 0x83,0x16,
-0xFF,0x54, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x93,0x13,
-0xFF,0xFC, 0x77,0x38, 0xFF,0xF0, 0x77,0x39, 0x00,0x06, 0xC6,0x30, 0x70,0x00, 0x96,0x16,
-0xFF,0x4C, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0x00, 0x97,0x93, 0xFF,0xFC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0xDE,0x35, 0xF3,0x02, 0x00,0x01, 0x84,0x96, 0xFF,0x4C, 0x00,0x00,
-0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0x00, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xDE,0x38, 0x00,0x00, 0x00,0x01, 0xF3,0x02,
-0x00,0x01, 0x93,0x16, 0xFF,0x44, 0x84,0x96, 0xFF,0x44, 0x00,0x00, 0x00,0x01, 0x20,0x26,
-0x00,0x00, 0xE6,0x00, 0xDE,0x59, 0xF6,0x06, 0x42,0xA4, 0xF7,0x04, 0x42,0xA4, 0xE0,0x00,
-0xE0,0xA0, 0x76,0xB1, 0x00,0x1E, 0x83,0x16, 0xFF,0x4C, 0x86,0x16, 0xFF,0x4C, 0x87,0x1A,
-0x00,0x00, 0x76,0x99, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x20,0x3A, 0x00,0x02, 0xE6,0x00, 0xDE,0x85, 0x00,0x00, 0x00,0x01, 0xF6,0x04,
-0x4F,0x58, 0xF5,0x84, 0x4F,0x58, 0x00,0x00, 0x00,0x01, 0xC0,0x32, 0x5A,0x00, 0xE6,0x00,
-0xE0,0x25, 0x00,0x00, 0x00,0x01, 0x84,0x96, 0xFF,0x4C, 0x00,0x00, 0x00,0x01, 0x06,0xA4,
-0x00,0x1A, 0x87,0x36, 0x00,0x00, 0x83,0x16, 0xFF,0x54, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x77,0x39, 0x00,0x06, 0xC7,0x2C,
-0x70,0x00, 0xC0,0x3A, 0x32,0x00, 0xE6,0x00, 0xDE,0xDD, 0xF6,0x06, 0x42,0x80, 0xF7,0x04,
-0x42,0x80, 0xE0,0x00, 0xE0,0xA0, 0x76,0xB1, 0x00,0x1E, 0x26,0x14, 0x00,0x30, 0xF0,0x33,
-0x28,0x00, 0x87,0x16, 0xFF,0xD0, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x84,0x96,
-0xFF,0x4C, 0x23,0x14, 0x00,0x2E, 0x93,0x16, 0xFE,0x64, 0x75,0x99, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0x75,0x15, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x73,0x15, 0x00,0x1E, 0x73,0x18,
-0xFF,0xE5, 0x93,0x16, 0xFF,0x34, 0x83,0x16, 0xFE,0x64, 0x04,0x24, 0x00,0x02, 0x06,0xA0,
-0x00,0x02, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFF,0x3C, 0x74,0x95,
-0x00,0x1E, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFF,0x2C, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xD4, 0x24,0x94,
-0x00,0x2A, 0x94,0x96, 0xFE,0x64, 0x76,0x25, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x26, 0x00,0x00, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xD8, 0x23,0x14, 0x00,0x26, 0x93,0x16, 0xFE,0x64, 0x76,0x19,
-0x00,0x1E, 0x84,0x96, 0xFF,0x3C, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x84,0x96,
-0xFF,0x34, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0xDC, 0x23,0x14, 0x00,0x22, 0x93,0x16, 0xFE,0x64, 0x76,0x19,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x16, 0xFF,0xE0, 0x83,0x16, 0xFF,0x2C, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x37,0xC0, 0x77,0x38, 0xFF,0xF0, 0xE0,0x00, 0xEA,0xA0, 0xF7,0x37,
-0x28,0x00, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCB,0xCC, 0x97,0x93, 0xFF,0xFC, 0x06,0xA0,
-0x00,0x02, 0xF7,0x04, 0x4F,0x58, 0xF0,0x37, 0x28,0x00, 0x06,0xA0, 0x00,0x14, 0x94,0x16,
-0xFF,0x24, 0xC7,0x20, 0x72,0x00, 0x77,0x38, 0xFF,0xFA, 0xF7,0x37, 0x28,0x00, 0x06,0xA0,
-0x00,0x16, 0xF7,0x37, 0x28,0x00, 0xF4,0x82, 0x00,0x01, 0xF4,0xA3, 0x28,0x00, 0x94,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0x00, 0x97,0x93, 0xFF,0xFC, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0xE0,0xBC, 0x26,0x94, 0x00,0x48, 0xF7,0x04, 0x42,0x80, 0xE0,0x00,
-0xE0,0x9C, 0xF6,0x06, 0x42,0x82, 0x86,0x96, 0xFE,0xF4, 0xE0,0x00, 0xE2,0x94, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x42,0x84, 0xF6,0x06, 0x42,0x84, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xF4,0x02, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0xEA,0xA4, 0xF7,0x33, 0x28,0x00, 0x83,0x16, 0xFF,0x4C, 0x75,0x15,
-0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x93,0x16, 0xFF,0x1C, 0x07,0x18, 0x00,0x36, 0xF4,0x82,
-0x00,0x01, 0xF4,0xBB, 0x28,0x00, 0xF0,0x37, 0x28,0x00, 0x87,0x16, 0xFF,0xB8, 0x76,0xB5,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x04,0x18, 0x00,0x02, 0x06,0x20, 0x00,0x02, 0x23,0x14,
-0x00,0x46, 0x93,0x16, 0xFF,0x14, 0x75,0x99, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x74,0x95,
-0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFF,0x0C, 0x73,0x15, 0x00,0x1E, 0x73,0x18,
-0xFF,0xE5, 0x93,0x16, 0xFF,0x04, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96,
-0xFE,0xFC, 0x23,0x00, 0x00,0x07, 0x93,0x16, 0xFE,0xF4, 0x84,0x96, 0xFF,0x1C, 0x83,0x16,
-0xFF,0x14, 0x04,0xA4, 0x00,0x0A, 0x94,0x96, 0xFE,0x7C, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0xF6,0x84, 0x4F,0x58, 0x84,0x96, 0xFF,0x54, 0x87,0x1A,
-0x00,0x00, 0xC6,0xA4, 0x6A,0x00, 0x74,0x34, 0xFF,0xFA, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x16, 0xFF,0xBC, 0x23,0x14,
-0x00,0x42, 0x93,0x16, 0xFF,0x14, 0x76,0x99, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0x30,
-0x00,0x02, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30,
-0x00,0x02, 0x87,0x16, 0xFF,0xC0, 0x24,0x94, 0x00,0x3E, 0x94,0x96, 0xFF,0x14, 0x76,0xA5,
-0x00,0x1E, 0x83,0x16, 0xFF,0x0C, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x37,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x26, 0x00,0x00, 0x06,0x30, 0x00,0x02, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x16,
-0xFF,0xC4, 0x24,0x94, 0x00,0x3A, 0x94,0x96, 0xFF,0x14, 0x76,0xA5, 0x00,0x1E, 0x83,0x16,
-0xFF,0x04, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x37,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33,
-0x28,0x00, 0x87,0x26, 0x00,0x00, 0x06,0x30, 0x00,0x02, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x87,0x16, 0xFF,0xC8, 0x84,0x96, 0xFE,0xFC, 0x06,0x30,
-0x00,0x02, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x83,0x16,
-0xFE,0xF4, 0x00,0x00, 0x00,0x01, 0x20,0x1A, 0x00,0x07, 0xEE,0x00, 0xE2,0x94, 0xF6,0x82,
-0x00,0x08, 0x84,0x96, 0xFE,0x7C, 0x00,0x00, 0x00,0x01, 0x07,0x24, 0x00,0x0E, 0x86,0xBA,
-0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0xF7,0x02, 0x00,0xFF, 0xC6,0xB4, 0x74,0x00, 0x47,0x21, 0x00,0x00, 0xC0,0x36,
-0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0xE0,0x88, 0x04,0xA4,
-0x00,0x02, 0x94,0x96, 0xFE,0x7C, 0x03,0x18, 0x00,0x01, 0xE0,0x00, 0xE2,0x30, 0x93,0x16,
-0xFE,0xF4, 0x83,0x16, 0xFF,0x1C, 0x00,0x00, 0x00,0x01, 0x07,0x18, 0x00,0x38, 0xF6,0xBB,
-0x28,0x00, 0x93,0x13, 0xFF,0xFC, 0x84,0x96, 0xFF,0x24, 0x00,0x00, 0x00,0x01, 0x94,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD4,0x2C, 0x97,0x93, 0xFF,0xFC, 0x23,0x14,
-0x00,0x78, 0x93,0x16, 0xFE,0xBC, 0x84,0x96, 0x00,0x00, 0x23,0x14, 0x00,0xA8, 0x86,0xA6,
-0x00,0x04, 0x87,0x26, 0x00,0x00, 0x93,0x16, 0xFE,0x9C, 0xC6,0xB4, 0x70,0x00, 0x96,0x96,
-0xFE,0xEC, 0xF7,0x02, 0x00,0x01, 0xC7,0x34, 0x74,0x00, 0x97,0x16, 0xFE,0xE4, 0x84,0x96,
-0xFF,0x24, 0x00,0x00, 0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD4,0xB4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04, 0x4F,0x58, 0x00,0x00, 0x00,0x01, 0xC0,0x22,
-0x72,0x00, 0xE6,0x00, 0xEA,0xA1, 0x94,0x16, 0xFF,0x1C, 0x86,0xA2, 0x00,0x38, 0x77,0x21,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xF3,0x02, 0x00,0x00, 0x93,0x16, 0xFE,0xD4, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0x96,0x96, 0xFE,0xDC, 0x84,0x96, 0xFE,0xD4, 0x00,0x00,
-0x00,0x01, 0x20,0x26, 0x00,0x0E, 0xEE,0x00, 0xE2,0xF0, 0xF3,0x02, 0x00,0x0F, 0x93,0x13,
-0xFF,0xFC, 0x83,0x16, 0xFE,0xEC, 0x00,0x00, 0x00,0x01, 0xC7,0x18, 0x48,0x00, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x27,0xE8, 0x97,0x93, 0xFF,0xFC, 0xC3,0xA0,
-0x00,0x00, 0x84,0x96, 0xFE,0xE4, 0x00,0x00, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00,
-0xE3,0x8D, 0x23,0x9C, 0x00,0x07, 0xC3,0x80, 0x3A,0x00, 0xC7,0x1C, 0x38,0x00, 0x83,0x16,
-0xFF,0x1C, 0xF4,0x82, 0x00,0xFF, 0xF6,0x04, 0x4F,0x58, 0xC7,0x18, 0x70,0x00, 0x07,0x38,
-0x00,0x26, 0x86,0xBA, 0x00,0x00, 0x97,0x16, 0xFE,0xC4, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xC6,0xB4, 0x4C,0x00, 0x76,0xB5,
-0x00,0x06, 0xC3,0x30, 0x68,0x00, 0x07,0x30, 0x00,0x40, 0xC0,0x1A, 0x72,0x00, 0xE6,0x00,
-0xE4,0x0D, 0x93,0x16, 0xFE,0xCC, 0x93,0x13, 0xFF,0xFC, 0x93,0x96, 0xFE,0x74, 0x96,0x16,
-0xFE,0x6C, 0x96,0x96, 0xFE,0x68, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0x00, 0x97,0x93,
-0xFF,0xFC, 0x83,0x96, 0xFE,0x74, 0x86,0x16, 0xFE,0x6C, 0x86,0x96, 0xFE,0x68, 0x20,0x22,
-0x00,0x00, 0xE6,0x00, 0xE0,0x95, 0x00,0x00, 0x00,0x01, 0xF5,0x84, 0x4F,0x58, 0x84,0x96,
-0xFE,0xCC, 0x07,0x2C, 0x00,0x40, 0xC0,0x26, 0x72,0x00, 0xE6,0x00, 0xEA,0x8D, 0x00,0x00,
-0x00,0x01, 0xA7,0x32, 0x68,0x02, 0x76,0xA5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x86,0x16,
-0xFE,0xCC, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x20,0x3A, 0x00,0x02, 0xE6,0x00,
-0xE4,0x51, 0xC0,0x32, 0x5A,0x00, 0xC6,0x2C, 0x00,0x00, 0xC0,0x32, 0x5A,0x00, 0xE6,0x00,
-0xE6,0xE5, 0x25,0x14, 0x00,0x76, 0x83,0x16, 0xFF,0x1C, 0x84,0x96, 0xFE,0xBC, 0x06,0x18,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x83,0x16,
-0xFE,0xDC, 0x06,0x30, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38,
-0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x74, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x72, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x70, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x6E, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x6C, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x6A, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x25,0x14, 0x00,0x68, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0xC7,0x1C, 0x32,0x00, 0x97,0x13,
-0xFF,0xFC, 0x94,0x93, 0xFF,0xFC, 0x26,0x14, 0x00,0x60, 0x96,0x13, 0xFF,0xFC, 0x96,0x16,
-0xFE,0x6C, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93, 0xFF,0xFC, 0x87,0x16,
-0xFF,0xA0, 0x86,0x16, 0xFE,0x6C, 0x84,0x96, 0xFE,0xCC, 0x23,0x14, 0x00,0x5E, 0x93,0x16,
-0xFE,0x5C, 0x75,0x99, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x74,0x15, 0x00,0x1E, 0x74,0x20,
-0xFF,0xE5, 0x73,0x15, 0x00,0x1E, 0x73,0x18, 0xFF,0xE5, 0x93,0x16, 0xFE,0xAC, 0x83,0x16,
-0xFE,0x5C, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x05,0x24, 0x00,0x02, 0x06,0xA8,
-0x00,0x02, 0x74,0x95, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFE,0xB4, 0x74,0x95,
-0x00,0x1E, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x87,0x1A,
-0x00,0x00, 0x74,0xA4, 0xFF,0xE5, 0x94,0x96, 0xFE,0xA4, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xA4, 0x24,0x94,
-0x00,0x5A, 0x94,0x96, 0xFE,0x5C, 0x76,0x25, 0x00,0x1E, 0x83,0x16, 0xFE,0xB4, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x37,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x26,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16, 0xFF,0xA8, 0x24,0x94, 0x00,0x56, 0x94,0x96,
-0xFE,0x5C, 0x76,0x25, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x47,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x26, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16,
-0xFF,0xAC, 0x23,0x14, 0x00,0x52, 0x93,0x16, 0xFE,0x5C, 0x76,0x19, 0x00,0x1E, 0x84,0x96,
-0xFE,0xAC, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1A, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x16, 0xFF,0xB0, 0x83,0x16, 0xFE,0xA4, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x37,0xC0, 0x77,0x38, 0xFF,0xF0, 0xE0,0x00, 0xEA,0x8C, 0xF7,0x37,
-0x28,0x00, 0x84,0x96, 0xFE,0xCC, 0x00,0x00, 0x00,0x01, 0x04,0xA4, 0x00,0x36, 0x94,0x96,
-0xFE,0x5C, 0x87,0x26, 0x00,0x00, 0x76,0xA5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x20,0x3A, 0x00,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0xEA,0x8D, 0x00,0x00, 0x00,0x01, 0x83,0x16, 0xFE,0xCC, 0x84,0x96,
-0xFF,0x1C, 0x06,0x18, 0x00,0x3A, 0x85,0xB2, 0x00,0x00, 0x07,0x24, 0x00,0x3A, 0x86,0xBA,
-0x00,0x00, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC5,0xAC, 0x67,0xC0, 0xC6,0xB4, 0x77,0xC0, 0x75,0xAD, 0xFF,0xF0, 0x76,0xB5,
-0xFF,0xF0, 0xC0,0x2E, 0x6A,0x00, 0xEC,0x00, 0xE7,0x64, 0xF5,0x02, 0x00,0x02, 0xF5,0x02,
-0x00,0x01, 0x83,0x16, 0xFF,0x1C, 0x00,0x00, 0x00,0x01, 0x07,0x18, 0x00,0x36, 0x86,0xBA,
-0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0x20,0x36, 0x00,0x02, 0xE6,0x00, 0xE7,0x9C, 0x00,0x00, 0x00,0x01, 0x20,0x2A,
-0x00,0x01, 0xE6,0x00, 0xEA,0x8D, 0x00,0x00, 0x00,0x01, 0x84,0x96, 0xFE,0x5C, 0x83,0x16,
-0xFF,0x1C, 0xF5,0x27, 0x28,0x00, 0x06,0x18, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x25,0x14, 0x00,0xA6, 0x84,0x96, 0xFE,0x9C, 0x83,0x16,
-0xFE,0xDC, 0x06,0x30, 0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38,
-0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0xA4, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0xA2, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0xA0, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x9E, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x9C, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x25,0x14, 0x00,0x9A, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32,
-0x00,0x00, 0x25,0x14, 0x00,0x98, 0x76,0x31, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B, 0x28,0x00, 0xC7,0x1C, 0x32,0x00, 0x97,0x13,
-0xFF,0xFC, 0x94,0x93, 0xFF,0xFC, 0x26,0x14, 0x00,0x90, 0x96,0x13, 0xFF,0xFC, 0x96,0x16,
-0xFE,0x6C, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xD0,0xDC, 0x97,0x93, 0xFF,0xFC, 0x87,0x16,
-0xFF,0x70, 0x86,0x16, 0xFE,0x6C, 0x84,0x96, 0xFE,0xCC, 0x23,0x94, 0x00,0x8E, 0x75,0x9D,
-0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0x73,0x15, 0x00,0x1E, 0x73,0x18, 0xFF,0xE5, 0x93,0x16,
-0xFE,0x94, 0x74,0x15, 0x00,0x1E, 0x74,0x20, 0xFF,0xE5, 0x73,0x15, 0x00,0x1E, 0x73,0x18,
-0xFF,0xE5, 0x93,0x16, 0xFE,0x84, 0x83,0x16, 0xFE,0x94, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x05,0x24, 0x00,0x02, 0x06,0xA8, 0x00,0x02, 0x74,0x95, 0x00,0x1E, 0x74,0xA4,
-0xFF,0xE5, 0x94,0x96, 0xFE,0x8C, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x2B,
-0x28,0x00, 0x84,0x96, 0xFE,0xC4, 0x87,0x1E, 0x00,0x00, 0x75,0x25, 0x00,0x1E, 0xC7,0x38,
-0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16,
-0xFF,0x74, 0x23,0x94, 0x00,0x8A, 0x76,0x1D, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x84,0x96,
-0xFE,0x8C, 0x75,0x28, 0xFF,0xE5, 0xC7,0x38, 0x37,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37,
-0x28,0x00, 0x87,0x1E, 0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x83,0x16, 0xFE,0x84, 0xC7,0x38,
-0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4, 0x00,0x02, 0x87,0x16,
-0xFF,0x78, 0x23,0x94, 0x00,0x86, 0x76,0x1D, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x47,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1E, 0x00,0x00, 0x06,0xB4,
-0x00,0x02, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x06,0xB4,
-0x00,0x02, 0x87,0x16, 0xFF,0x7C, 0x23,0x94, 0x00,0x82, 0x76,0x1D, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1E,
-0x00,0x00, 0x06,0xB4, 0x00,0x02, 0x84,0x96, 0xFE,0xC4, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x16, 0xFF,0x80, 0x06,0xB4, 0x00,0x02, 0xC7,0x38,
-0x37,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x26, 0x00,0x00, 0xF3,0x02,
-0x00,0xFF, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xE8, 0xC6,0xB8, 0x34,0x00, 0xF7,0x02,
-0x00,0x80, 0xC7,0x34, 0x74,0x00, 0x77,0x39, 0x00,0x10, 0x77,0x39, 0xFF,0xF0, 0x20,0x3A,
-0x00,0x00, 0xE6,0x00, 0xEA,0x61, 0x27,0x00, 0x01,0x00, 0xC6,0xB4, 0x75,0x80, 0x84,0x96,
-0xFE,0xCC, 0x00,0x00, 0x00,0x01, 0x07,0x24, 0x00,0x38, 0xF6,0xBB, 0x28,0x00, 0x94,0x93,
-0xFF,0xFC, 0x83,0x16, 0xFF,0x24, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xD4,0x2C, 0x97,0x93, 0xFF,0xFC, 0x84,0x96, 0xFE,0xD4, 0x00,0x00,
-0x00,0x01, 0x04,0xA4, 0x00,0x01, 0xE0,0x00, 0xE3,0x3C, 0x94,0x96, 0xFE,0xD4, 0xF4,0x02,
-0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x16,
-0x00,0x08, 0x86,0x96, 0x00,0x0C, 0xF5,0x02, 0xFF,0xFC, 0x85,0x96, 0x00,0x04, 0x84,0x16,
-0x00,0x10, 0xF4,0x84, 0xE0,0x00, 0x07,0x30, 0x00,0x02, 0x94,0xB2, 0x00,0x10, 0xF4,0x84,
-0xE0,0x04, 0x06,0xB4, 0x00,0x03, 0x94,0xB2, 0x00,0x14, 0xF4,0x84, 0xE0,0x1C, 0xC6,0xB4,
-0x54,0x00, 0x94,0xB2, 0x00,0x18, 0xF4,0x82, 0x00,0x05, 0xF4,0xB3, 0x28,0x00, 0xF4,0x82,
-0x00,0x01, 0xF4,0xBB, 0x28,0x00, 0x27,0x34, 0x00,0x08, 0x97,0x32, 0x00,0x04, 0x86,0x16,
-0x00,0x00, 0x07,0x2C, 0x00,0x03, 0xC7,0x38, 0x54,0x00, 0xC6,0xB8, 0x68,0x00, 0x96,0x93,
-0xFF,0xFC, 0xC6,0x30, 0x72,0x00, 0x96,0x13, 0xFF,0xFC, 0xF7,0x02, 0x00,0x03, 0xC5,0xAC,
-0x74,0x00, 0xF7,0x02, 0x00,0x04, 0xC7,0x38, 0x5A,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xC1,0x20, 0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x14, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x18, 0x87,0x16, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0x83,0xBA, 0x00,0x00, 0x84,0x96, 0x00,0x00, 0x93,0x96, 0xFF,0xF0, 0xF3,0x84,
-0x6E,0x54, 0x87,0x3A, 0x00,0x04, 0x93,0x96, 0xFF,0xEC, 0x97,0x16, 0xFF,0xF4, 0x90,0x13,
-0xFF,0xFC, 0x27,0x1C, 0x00,0x02, 0x97,0x13, 0xFF,0xFC, 0x07,0x24, 0x00,0x20, 0x97,0x13,
-0xFF,0xFC, 0x94,0x96, 0xFF,0xE4, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0xB8, 0x97,0x93,
-0xFF,0xFC, 0x84,0x96, 0xFF,0xE4, 0x83,0x96, 0x00,0x08, 0x87,0x26, 0x00,0x18, 0x85,0x16,
-0xFF,0xEC, 0xC0,0x3A, 0x3A,0x00, 0xEE,0x00, 0xEC,0x7C, 0xF5,0x82, 0x00,0x01, 0x87,0x26,
-0x00,0x18, 0x83,0x96, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0xC0,0x1E, 0x72,0x00, 0xE6,0x00,
-0xEC,0x7C, 0xC5,0x84, 0x00,0x00, 0x86,0xA6, 0x00,0x10, 0x87,0x16, 0xFF,0xF0, 0xF6,0x02,
-0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xEC,0x1C, 0x04,0x24, 0x00,0x10, 0x86,0xA6,
-0x00,0x14, 0x87,0x16, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x00,
-0xEC,0x20, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0xEC,0x2D, 0x00,0x00, 0x00,0x01, 0xF5,0x82, 0x00,0x00, 0x86,0xA2, 0x00,0x00, 0x87,0x16,
-0xFF,0xF0, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0xEC,0x68, 0xF6,0x02,
-0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x00, 0xEC,0x70, 0x20,0x32, 0x00,0x00, 0x86,0xA2,
-0x00,0x04, 0x87,0x16, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00,
-0xEC,0x71, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0xEC,0x81, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00,
-0xEC,0xAC, 0xF7,0x02, 0x00,0x01, 0xF7,0x04, 0x42,0x9C, 0xF6,0x06, 0x42,0x9C, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0xF7,0x02, 0x00,0x01, 0x97,0x2A, 0x00,0x08, 0x83,0xA6,
-0x00,0x0C, 0x77,0x2C, 0xFF,0xE1, 0x93,0xAA, 0x00,0x0C, 0x97,0x2A, 0x00,0x1C, 0x83,0xA6,
-0x00,0x1C, 0xF7,0x04, 0x6E,0x50, 0x93,0xAA, 0x00,0x20, 0x83,0xBA, 0x1D,0xDC, 0xF6,0x82,
-0x00,0x00, 0x93,0xAA, 0x00,0x2C, 0x83,0x96, 0x00,0x0C, 0xC5,0xB4, 0x00,0x00, 0x93,0xAA,
-0x00,0x30, 0x83,0xBA, 0x00,0x10, 0xC6,0x34, 0x00,0x00, 0x93,0xAA, 0x00,0x24, 0x87,0x3A,
-0x00,0x14, 0x00,0x00, 0x00,0x01, 0x97,0x2A, 0x00,0x28, 0x20,0x36, 0x00,0x1F, 0xEE,0x00,
-0xED,0x1C, 0xC7,0x30, 0x50,0x00, 0x07,0x38, 0x00,0x34, 0x95,0xBA, 0x00,0x00, 0x06,0x30,
-0x00,0x04, 0xE0,0x00, 0xEC,0xFC, 0x06,0xB4, 0x00,0x01, 0x83,0x96, 0x00,0x10, 0x76,0xA5,
-0x00,0x1E, 0x93,0x93, 0xFF,0xFC, 0xF3,0x82, 0x00,0xB4, 0x93,0x93, 0xFF,0xFC, 0x95,0x13,
-0xFF,0xFC, 0x87,0x26, 0x00,0x20, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x97,0x13, 0xFF,0xFC, 0x83,0x96, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xEA,0xB8, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x14, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x18, 0x87,0x16,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x86,0x3A, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x96,0x16,
-0xFF,0xF0, 0x87,0x3A, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x97,0x16, 0xFF,0xF4, 0xF6,0x02,
-0x1D,0xE0, 0x96,0x13, 0xFF,0xFC, 0x86,0x16, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x96,0x13,
-0xFF,0xFC, 0xF6,0x04, 0x6E,0x50, 0x00,0x00, 0x00,0x01, 0x96,0x13, 0xFF,0xFC, 0x26,0x14,
-0x00,0x10, 0x96,0x16, 0xFF,0xEC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x26,0xF8, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x84, 0x6E,0x50, 0xF6,0x02, 0x00,0x00, 0x87,0x36, 0x1D,0xD8, 0x96,0x16,
-0xFF,0xE4, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF6,0x86, 0x42,0xC0, 0xF7,0x37, 0x28,0x00, 0x86,0x16, 0xFF,0xEC, 0x00,0x00,
-0x00,0x01, 0x96,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xDB,0xB4, 0x97,0x93,
-0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xEE,0x4D, 0x00,0x00, 0x00,0x01, 0x86,0x16,
-0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0x96,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xD5,0xA0, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00, 0xEE,0x4D, 0x00,0x00,
-0x00,0x01, 0xF6,0x02, 0x00,0x01, 0x96,0x16, 0xFF,0xE4, 0x84,0x16, 0xFF,0xE4, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x96, 0x00,0x04, 0x86,0x16,
-0x00,0x00, 0x87,0x36, 0x00,0x08, 0x85,0x96, 0x00,0x08, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xEE,0x99, 0x20,0x3A, 0x00,0x03, 0xE6,0x00, 0xEE,0xE9, 0xF4,0x02, 0x00,0x00, 0xE0,0x00,
-0xEF,0x0C, 0x00,0x00, 0x00,0x01, 0x77,0xB0, 0x00,0x1F, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00,
-0xEF,0x0D, 0xF4,0x02, 0x00,0x00, 0x85,0x16, 0x00,0x14, 0x00,0x00, 0x00,0x01, 0x95,0x13,
-0xFF,0xFC, 0x85,0x16, 0x00,0x10, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x85,0x16,
-0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x95,0x93, 0xFF,0xFC, 0x96,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xEB,0x60, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00,
-0xEF,0x0C, 0x00,0x00, 0x00,0x01, 0x77,0xB0, 0x00,0x1E, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00,
-0xEF,0x0D, 0x00,0x00, 0x00,0x01, 0x95,0x93, 0xFF,0xFC, 0x96,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xED,0x74, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x18, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x18, 0xF4,0x82, 0x00,0x00, 0x86,0x96,
-0x00,0x00, 0xF6,0x04, 0x4A,0xA0, 0x23,0x94, 0x00,0x10, 0x84,0x36, 0x00,0x00, 0x96,0x16,
-0xFF,0xE4, 0xF7,0x04, 0x4A,0x9C, 0x94,0x16, 0xFF,0xF0, 0x85,0x36, 0x00,0x04, 0xC0,0x32,
-0x72,0x00, 0xEC,0x00, 0xF0,0x14, 0x95,0x16, 0xFF,0xF4, 0x77,0x31, 0x00,0x01, 0xC7,0x38,
-0x60,0x00, 0x77,0x39, 0x00,0x02, 0xF3,0x06, 0x4A,0x98, 0xC6,0xB8, 0x30,0x00, 0x06,0xB4,
-0x00,0x0C, 0xC5,0x84, 0x00,0x00, 0x87,0x36, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x42,0x00, 0xE6,0x00, 0xEF,0xA4, 0xC6,0x24, 0x00,0x00, 0x87,0x36, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x52,0x00, 0xE6,0x00, 0xEF,0xA8, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00, 0xEF,0xB5, 0x00,0x00, 0x00,0x01, 0xF5,0x82,
-0x00,0x00, 0x86,0x36, 0x00,0x00, 0x87,0x16, 0xFF,0xF0, 0x00,0x00, 0x00,0x01, 0xC0,0x32,
-0x72,0x00, 0xE2,0x00, 0xEF,0xF0, 0xF5,0x02, 0x00,0x00, 0xC0,0x32, 0x72,0x00, 0xE6,0x00,
-0xEF,0xF8, 0x20,0x2A, 0x00,0x00, 0x86,0xB6, 0x00,0x04, 0x87,0x16, 0xFF,0xF4, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x00, 0xEF,0xF9, 0x20,0x2A, 0x00,0x00, 0xF5,0x02,
-0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x00, 0xF0,0x09, 0x20,0x2E, 0x00,0x00, 0xF5,0x82,
-0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x00, 0xF0,0x18, 0x20,0x26, 0x00,0x00, 0xF4,0x82,
-0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x00, 0xF0,0x4D, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xE4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xE8, 0xE0,0x00, 0xF0,0xB0, 0x96,0x96, 0xFF,0xEC, 0x27,0x14, 0x00,0x1C, 0x97,0x13,
-0xFF,0xFC, 0x93,0x93, 0xFF,0xFC, 0xF3,0x06, 0x4A,0x98, 0x93,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x20,0x22, 0x00,0x00, 0xE6,0x00,
-0xF0,0xAD, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xE4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9,
-0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4,
-0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xE8, 0x96,0x96, 0xFF,0xEC, 0xF7,0x05,
-0x4A,0xA0, 0xE0,0x00, 0xF0,0xB4, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32,
-0x00,0x00, 0xE6,0x00, 0xF1,0x21, 0xF4,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xE8, 0xF6,0x06,
-0x42,0xC8, 0x76,0xB9, 0x00,0x02, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xA7,0x36,
-0x60,0x02, 0x83,0x16, 0x00,0x04, 0xC6,0xB4, 0x60,0x00, 0x76,0x35, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x05,0x34, 0x00,0x02, 0x75,0xA9, 0x00,0x1E, 0xC7,0x38, 0x67,0xC0, 0x77,0x38,
-0xFF,0xF0, 0x97,0x1A, 0x00,0x00, 0x87,0x2A, 0x00,0x00, 0x75,0xAC, 0xFF,0xE5, 0x83,0x16,
-0x00,0x08, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x97,0x1A, 0x00,0x00, 0x83,0x16,
-0x00,0x0C, 0x06,0xB4, 0x00,0x04, 0xE0,0x00, 0xF1,0x24, 0x96,0x9A, 0x00,0x00, 0xF4,0x02,
-0x00,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x10, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0xB9,0x00, 0x00,0x00, 0xBA,0x00, 0x00,0x00,
-0xBB,0x00, 0x00,0x00, 0xBC,0x00, 0x00,0x00, 0xBD,0x00, 0x00,0x00, 0xBE,0x00, 0x00,0x00,
-0xBF,0x00, 0x00,0x00, 0x80,0x00, 0x00,0x00, 0x81,0x00, 0x00,0x00, 0x82,0x00, 0x00,0x00,
-0x83,0x00, 0x00,0x00, 0x84,0x00, 0x00,0x00, 0x85,0x00, 0x00,0x00, 0x86,0x00, 0x00,0x00,
-0x87,0x00, 0xB9,0xB9, 0xB9,0xBA, 0xB9,0xBB, 0xB9,0xBC, 0xB9,0xBD, 0xB9,0xBE, 0xB9,0xBF,
-0xB9,0x80, 0xB9,0x81, 0xB9,0x82, 0xB9,0x83, 0xB9,0x84, 0xB9,0x85, 0xB9,0x86, 0xB9,0x87,
-0xBA,0xB9, 0xBA,0xBA, 0xBA,0xBB, 0xBA,0xBC, 0xBA,0xBD, 0xBA,0xBE, 0xBA,0xBF, 0xBA,0x80,
-0xBA,0x81, 0xBA,0x82, 0xBA,0x83, 0xBA,0x84, 0xBA,0x85, 0xBA,0x86, 0xBA,0x87, 0xBB,0xB9,
-0xBB,0xBA, 0xBB,0xBB, 0xBB,0xBC, 0xBB,0xBD, 0xBB,0xBE, 0xBB,0xBF, 0xBB,0x80, 0xBB,0x81,
-0xBB,0x82, 0xBB,0x83, 0xBB,0x84, 0xBB,0x85, 0xBB,0x86, 0xBB,0x87, 0xBC,0xB9, 0xBC,0xBA,
-0xBC,0xBB, 0xBC,0xBC, 0xBC,0xBD, 0xBC,0xBE, 0xBC,0xBF, 0xBC,0x80, 0xBC,0x81, 0xBC,0x82,
-0xBC,0x83, 0xBC,0x84, 0xBC,0x85, 0xBC,0x86, 0xBC,0x87, 0xBD,0xB9, 0xBD,0xBA, 0xBD,0xBB,
-0xBD,0xBC, 0xBD,0xBD, 0xBD,0xBE, 0xBD,0xBF, 0xBD,0x80, 0xBD,0x81, 0xBD,0x82, 0xBD,0x83,
-0xBD,0x84, 0xBD,0x85, 0xBD,0x86, 0xBD,0x87, 0xBE,0xB9, 0xBE,0xBA, 0xBE,0xBB, 0xBE,0xBC,
-0xBE,0xBD, 0xBE,0xBE, 0xBE,0xBF, 0xBE,0x80, 0xBE,0x81, 0xBE,0x82, 0xBE,0x83, 0xBE,0x84,
-0xBE,0x85, 0xBE,0x86, 0xBE,0x87, 0xBF,0xB9, 0xBF,0xBA, 0xBF,0xBB, 0xBF,0xBC, 0xBF,0xBD,
-0xBF,0xBE, 0xBF,0xBF, 0xBF,0x80, 0xBF,0x81, 0xBF,0x82, 0xBF,0x83, 0xBF,0x84, 0xBF,0x85,
-0xBF,0x86, 0xBF,0x87, 0x80,0xB9, 0x80,0xBA, 0x80,0xBB, 0x80,0xBC, 0x80,0xBD, 0x80,0xBE,
-0x80,0xBF, 0x80,0x80, 0x80,0x81, 0x80,0x82, 0x80,0x83, 0x80,0x84, 0x80,0x85, 0x80,0x86,
-0x80,0x87, 0x81,0xB9, 0x81,0xBA, 0x81,0xBB, 0x81,0xBC, 0x81,0xBD, 0x81,0xBE, 0x81,0xBF,
-0x81,0x80, 0x81,0x81, 0x81,0x82, 0x81,0x83, 0x81,0x84, 0x81,0x85, 0x81,0x86, 0x81,0x87,
-0x82,0xB9, 0x82,0xBA, 0x82,0xBB, 0x82,0xBC, 0x82,0xBD, 0x82,0xBE, 0x82,0xBF, 0x82,0x80,
-0x82,0x81, 0x82,0x82, 0x82,0x83, 0x82,0x84, 0x82,0x85, 0x82,0x86, 0x82,0x87, 0x83,0xB9,
-0x83,0xBA, 0x83,0xBB, 0x83,0xBC, 0x83,0xBD, 0x83,0xBE, 0x83,0xBF, 0x83,0x80, 0x83,0x81,
-0x83,0x82, 0x83,0x83, 0x83,0x84, 0x83,0x85, 0x83,0x86, 0x83,0x87, 0x84,0xB9, 0x84,0xBA,
-0x84,0xBB, 0x84,0xBC, 0x84,0xBD, 0x84,0xBE, 0x84,0xBF, 0x84,0x80, 0x84,0x81, 0x84,0x82,
-0x84,0x83, 0x84,0x84, 0x84,0x85, 0x84,0x86, 0x84,0x87, 0x85,0xB9, 0x85,0xBA, 0x85,0xBB,
-0x85,0xBC, 0x85,0xBD, 0x85,0xBE, 0x85,0xBF, 0x85,0x80, 0x85,0x81, 0x85,0x82, 0x85,0x83,
-0x85,0x84, 0x85,0x85, 0x85,0x86, 0x85,0x87, 0x86,0xB9, 0x86,0xBA, 0x86,0xBB, 0x86,0xBC,
-0x86,0xBD, 0x86,0xBE, 0x86,0xBF, 0x86,0x80, 0x86,0x81, 0x86,0x82, 0x86,0x83, 0x86,0x84,
-0x86,0x85, 0x86,0x86, 0x86,0x87, 0x87,0xB9, 0x87,0xBA, 0x87,0xBB, 0x87,0xBC, 0x87,0xBD,
-0x87,0xBE, 0x87,0xBF, 0x87,0x80, 0x87,0x81, 0x87,0x82, 0x87,0x83, 0x87,0x84, 0x87,0x85,
-0x87,0x86, 0x87,0x87, 0x00,0x00, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x18, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xF3,0x7D, 0xF6,0x06, 0x42,0x96, 0xF7,0x04, 0x42,0x94, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xF4,0x02, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0xF5,0xE0, 0xF7,0x33, 0x28,0x00, 0xF3,0x84, 0x6F,0x30, 0x90,0x13,
-0xFF,0xFC, 0x27,0x1C, 0x00,0x02, 0x97,0x13, 0xFF,0xFC, 0x83,0x16, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x93,0x96, 0xFF,0xEC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xCD,0xB8, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0xEC, 0xF7,0x02, 0x00,0x00, 0x97,0x1E,
-0x00,0x08, 0x83,0x16, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x93,0x1E, 0x00,0x0C, 0x83,0x16,
-0x00,0x08, 0x04,0x9C, 0x00,0x22, 0x93,0x1E, 0x00,0x1C, 0x83,0x16, 0x00,0x0C, 0x93,0x96,
-0xFF,0xF4, 0x87,0x1A, 0x00,0x00, 0x76,0x99, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x06,0x18,
-0x00,0x02, 0x75,0xB1, 0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0x06,0x9C, 0x00,0x20, 0xF7,0x37, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x96,0x96,
-0xFF,0xE4, 0x75,0x35, 0x00,0x1E, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x04,0x9C, 0x00,0x24, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x04,0x9C, 0x00,0x26, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x04,0x9C, 0x00,0x28, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x04,0x9C, 0x00,0x2A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x04,0x9C, 0x00,0x2C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x04,0x9C, 0x00,0x2E, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x04,0x9C, 0x00,0x30, 0x76,0x31,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27,
-0x28,0x00, 0x87,0x1E, 0x00,0x20, 0x75,0x28, 0xFF,0xE5, 0xC7,0x38, 0x57,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x20,0x3A, 0x00,0x08, 0xEE,0x00, 0xF5,0x98, 0xF3,0x06, 0x14,0xD8, 0x83,0x16,
-0xFF,0xE4, 0x87,0x1E, 0x00,0x20, 0x76,0x99, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x25,0xB8, 0x00,0x01, 0xC4,0xAC, 0x58,0x00, 0x04,0x24,
-0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xEC,0x00, 0xF5,0x95, 0xF5,0x02, 0x00,0x00, 0x83,0x16,
-0xFF,0xE4, 0x00,0x00, 0x00,0x01, 0x06,0x18, 0x00,0x02, 0xA7,0x32, 0x58,0x02, 0xC6,0xB0,
-0x58,0x00, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xE8, 0xC6,0xB0, 0x40,0x00, 0x77,0xB8, 0x00,0x18, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x00,
-0xF5,0x7D, 0xF7,0x37, 0x68,0x00, 0xF5,0x02, 0xFF,0xFF, 0xC7,0x30, 0x48,0x00, 0xF5,0x3B,
-0x68,0x00, 0x24,0xA4, 0x00,0x02, 0x24,0x20, 0x00,0x02, 0xE0,0x00, 0xF5,0x34, 0x25,0xAC,
-0x00,0x01, 0xF3,0x06, 0x14,0xD8, 0x93,0x13, 0xFF,0xFC, 0xF3,0x02, 0x00,0x34, 0x93,0x13,
-0xFF,0xFC, 0x83,0x16, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x83,0x16,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x1A, 0x00,0x00, 0x76,0x99, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x97,0x13, 0xFF,0xFC, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xEA,0xB8, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x10, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x10, 0xF7,0x04,
-0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0xF6,0x39, 0xF6,0x06,
-0x42,0x96, 0xF7,0x04, 0x42,0x94, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF4,0x02,
-0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xE0,0x00,
-0xF7,0x48, 0xF7,0x33, 0x28,0x00, 0xF5,0x04, 0x6F,0x30, 0x00,0x00, 0x00,0x01, 0x95,0x16,
-0xFF,0xF4, 0x90,0x13, 0xFF,0xFC, 0x27,0x28, 0x00,0x02, 0x97,0x13, 0xFF,0xFC, 0x85,0x96,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xCD,0xB8, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0x00,0x04, 0xF6,0x02, 0x00,0x00, 0x86,0xAA,
-0x00,0x00, 0x77,0x29, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0xF7,0x02, 0x00,0x01, 0xC0,0x36, 0x74,0x00, 0xE6,0x00, 0xF6,0x99, 0x96,0x96,
-0xFF,0xEC, 0xC6,0x38, 0x00,0x00, 0x96,0x13, 0xFF,0xFC, 0x85,0x96, 0xFF,0xEC, 0x85,0x16,
-0xFF,0xF4, 0x47,0x2C, 0xFF,0xFE, 0x07,0x38, 0x00,0x02, 0xC7,0x28, 0x72,0x00, 0x97,0x13,
-0xFF,0xFC, 0x85,0x96, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCD,0xB8, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0xFF,0xF4, 0xF7,0x02,
-0x00,0x02, 0x97,0x2A, 0x00,0x08, 0x85,0x96, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0x95,0xAA,
-0x00,0x0C, 0x85,0x96, 0x00,0x0C, 0x00,0x00, 0x00,0x01, 0x95,0xAA, 0x00,0x1C, 0xF5,0x06,
-0x14,0xD8, 0x95,0x13, 0xFF,0xFC, 0xF5,0x82, 0x00,0x20, 0x95,0x93, 0xFF,0xFC, 0x85,0x16,
-0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x85,0x96, 0x00,0x00, 0x85,0x16,
-0xFF,0xEC, 0x87,0x2E, 0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38, 0x50,0x00, 0x97,0x13, 0xFF,0xFC, 0x85,0x96,
-0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xEA,0xB8, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x10, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x85,0x96, 0x00,0x00, 0x85,0x16, 0x00,0x04, 0x87,0x16, 0x00,0x08, 0xF6,0x02,
-0xFF,0xFC, 0x06,0xA8, 0x00,0x03, 0xC6,0xB4, 0x64,0x00, 0x07,0x38, 0x00,0x03, 0xC7,0x38,
-0x64,0x00, 0xC7,0x34, 0x70,0x00, 0x97,0x13, 0xFF,0xFC, 0xC5,0xAC, 0x6A,0x00, 0x95,0x93,
-0xFF,0xFC, 0xF7,0x02, 0x00,0x03, 0xC5,0x28, 0x74,0x00, 0xF7,0x02, 0x00,0x04, 0xC7,0x38,
-0x52,0x00, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x14,0xD8, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x10, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x10, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xF8,0x0D, 0xF6,0x06, 0x42,0x96, 0xF7,0x04, 0x42,0x94, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xF4,0x02, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0xF9,0x20, 0xF7,0x33, 0x28,0x00, 0xF5,0x04, 0x6F,0x30, 0x00,0x00,
-0x00,0x01, 0x95,0x16, 0xFF,0xF4, 0x90,0x13, 0xFF,0xFC, 0x27,0x28, 0x00,0x02, 0x97,0x13,
-0xFF,0xFC, 0x85,0x96, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x95,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xCD,0xB8, 0x97,0x93, 0xFF,0xFC, 0x85,0x16, 0x00,0x04, 0xF6,0x02,
-0x00,0x00, 0x86,0xAA, 0x00,0x00, 0x77,0x29, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB5, 0xFF,0xF0, 0xF7,0x02, 0x00,0x01, 0xC0,0x36, 0x74,0x00, 0xE6,0x00,
-0xF8,0x6D, 0x96,0x96, 0xFF,0xEC, 0xC6,0x38, 0x00,0x00, 0x96,0x13, 0xFF,0xFC, 0x85,0x96,
-0xFF,0xEC, 0x85,0x16, 0xFF,0xF4, 0x47,0x2C, 0xFF,0xFE, 0x07,0x38, 0x00,0x02, 0xC7,0x28,
-0x72,0x00, 0x97,0x13, 0xFF,0xFC, 0x85,0x96, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0xB8, 0x97,0x93, 0xFF,0xFC, 0x85,0x16,
-0xFF,0xF4, 0xF5,0x82, 0x00,0x06, 0xF5,0xAB, 0x28,0x00, 0x85,0x96, 0x00,0x08, 0x07,0x28,
-0x00,0x02, 0x95,0xAA, 0x00,0x04, 0x05,0x14, 0x00,0x0E, 0x85,0x2A, 0x00,0x00, 0x77,0xA9,
-0x00,0x1E, 0x77,0xBC, 0xFF,0xE5, 0xC5,0x28, 0x7F,0xC0, 0x75,0x29, 0xFF,0xF0, 0xF5,0x3B,
-0x28,0x00, 0xF5,0x86, 0x14,0xD8, 0x95,0x93, 0xFF,0xFC, 0xF5,0x02, 0x00,0x08, 0x95,0x13,
-0xFF,0xFC, 0x85,0x96, 0x00,0x00, 0x85,0x16, 0xFF,0xEC, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0xC7,0x38,
-0x50,0x00, 0x97,0x13, 0xFF,0xFC, 0x85,0x96, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xF7,0x5C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x10, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x08, 0xF7,0x04,
-0x75,0xEC, 0x83,0x96, 0x00,0x04, 0x20,0x3A, 0x00,0x00, 0xE6,0x00, 0xFA,0x64, 0xF6,0x06,
-0x42,0x96, 0xF5,0x04, 0x6F,0x30, 0x90,0x13, 0xFF,0xFC, 0x27,0x28, 0x00,0x02, 0x97,0x13,
-0xFF,0xFC, 0x83,0x16, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0x93,0x96,
-0xFF,0xF4, 0x95,0x16, 0xFF,0xF0, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0xB8, 0x97,0x93,
-0xFF,0xFC, 0x85,0x16, 0xFF,0xF0, 0xF3,0x02, 0x00,0x07, 0x83,0x96, 0xFF,0xF4, 0xF3,0x2B,
-0x28,0x00, 0x07,0x28, 0x00,0x02, 0xF3,0x02, 0x00,0x01, 0xF3,0x3B, 0x28,0x00, 0x87,0x1E,
-0x00,0x00, 0x76,0x9D, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x05,0x9C, 0x00,0x02, 0x76,0x2D,
-0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0x74,0x9D, 0x00,0x1E, 0x74,0xA4, 0xFF,0xE5, 0x04,0x1C,
-0x00,0x06, 0x83,0x16, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0x06,0xA8,
-0x00,0x04, 0xF7,0x37, 0x28,0x00, 0x87,0x2E, 0x00,0x00, 0x06,0xA8, 0x00,0x06, 0x75,0xA1,
-0x00,0x1E, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x1E,
-0x00,0x04, 0x75,0xAC, 0xFF,0xE5, 0x06,0xA8, 0x00,0x08, 0x76,0x19, 0x00,0x1E, 0xC7,0x38,
-0x4F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0x87,0x22, 0x00,0x00, 0x06,0xA8,
-0x00,0x0A, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x37, 0x28,0x00, 0xF3,0x06,
-0x14,0xD8, 0x93,0x13, 0xFF,0xFC, 0xF3,0x02, 0x00,0x0C, 0x93,0x13, 0xFF,0xFC, 0x83,0x16,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x1A, 0x00,0x00, 0x76,0x30, 0xFF,0xE5, 0xC7,0x38,
-0x67,0xC0, 0x77,0x39, 0xFF,0xF0, 0x97,0x13, 0xFF,0xFC, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xF7,0x5C, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00, 0xFA,0x84, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x42,0x94, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xF4,0x02,
-0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xF7,0x33,
-0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x48, 0xF7,0x04, 0x75,0xEC, 0x85,0x96, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x00,
-0xFD,0x98, 0xF6,0x06, 0x42,0x96, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0x24,0x14, 0x00,0x1E, 0x06,0x2C, 0x00,0x02, 0x75,0x31,
-0x00,0x1E, 0x24,0x94, 0x00,0x20, 0x75,0x28, 0xFF,0xE5, 0xF3,0x84, 0x6E,0x50, 0xC7,0x38,
-0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x87,0x32, 0x00,0x00, 0x93,0x96,
-0xFF,0xC4, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x1C, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x1A, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x18, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x16, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x14, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x24,0x14,
-0x00,0x12, 0x06,0x30, 0x00,0x02, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x06,0x30,
-0x00,0x02, 0x87,0x32, 0x00,0x00, 0x24,0x14, 0x00,0x10, 0x76,0x31, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x23, 0x28,0x00, 0x90,0x13,
-0xFF,0xFC, 0x27,0x1C, 0x00,0x02, 0x97,0x13, 0xFF,0xFC, 0x94,0x93, 0xFF,0xFC, 0x95,0x96,
-0xFF,0xBC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xCD,0xB8, 0x97,0x93, 0xFF,0xFC, 0x85,0x96,
-0xFF,0xBC, 0x23,0x14, 0x00,0x36, 0x24,0x94, 0x00,0x38, 0x73,0xA5, 0x00,0x1E, 0x73,0x9C,
-0xFF,0xE5, 0xF4,0x04, 0x42,0xC0, 0xF6,0x86, 0x42,0xC0, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0x87,0x2E, 0x00,0x00, 0x76,0x2D, 0x00,0x1E, 0x76,0x30, 0xFF,0xE5, 0xC4,0x20,
-0x6F,0xC0, 0x74,0x20, 0xFF,0xF0, 0x05,0xAC, 0x00,0x02, 0x75,0x2D, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0xC7,0x38, 0x67,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x27, 0x28,0x00, 0x87,0x2E,
-0x00,0x00, 0xF6,0x04, 0x6E,0x50, 0xC7,0x38, 0x57,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x23,0x14, 0x00,0x34, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x23,0x14, 0x00,0x32, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x23,0x14, 0x00,0x30, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x23,0x14, 0x00,0x2E, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x23,0x14, 0x00,0x2C, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x23,0x14, 0x00,0x2A, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x76,0xAD,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x05,0xAC, 0x00,0x02, 0x87,0x2E, 0x00,0x00, 0x23,0x14, 0x00,0x28, 0x75,0xAD,
-0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0xC7,0x38, 0x5F,0xC0, 0x77,0x38, 0xFF,0xF0, 0xF7,0x1B,
-0x28,0x00, 0x87,0x16, 0xFF,0xC8, 0xF6,0x82, 0x00,0x03, 0xC7,0x38, 0x3F,0xC0, 0x96,0xB2,
-0x00,0x08, 0x06,0xB0, 0x1D,0xD8, 0xF4,0x37, 0x28,0x00, 0xF3,0x86, 0x14,0xD8, 0x93,0x93,
-0xFF,0xFC, 0xF3,0x82, 0x1D,0xE0, 0x93,0x93, 0xFF,0xFC, 0x96,0x13, 0xFF,0xFC, 0x77,0x39,
-0xFF,0xF0, 0x97,0x13, 0xFF,0xFC, 0x83,0x96, 0xFF,0xC4, 0x00,0x00, 0x00,0x01, 0x93,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xEA,0xB8, 0x97,0x93, 0xFF,0xFC, 0xE0,0x00,
-0xFD,0xB8, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0x94, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xF4,0x02, 0x00,0x00, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x86,0x16, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x32, 0x00,0x00, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x20,0x3A,
-0x00,0x06, 0xE6,0x00, 0xFE,0x21, 0xF5,0x82, 0x00,0x1E, 0xF7,0x04, 0x42,0xA8, 0xF6,0x06,
-0x42,0xA8, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39,
-0xFF,0xF0, 0x07,0x38, 0x00,0x01, 0xE0,0x00, 0xFE,0x34, 0xF7,0x33, 0x28,0x00, 0xF6,0x05,
-0x6F,0x34, 0x95,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x04, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x16,
-0x00,0x00, 0x85,0x96, 0x00,0x04, 0x87,0x32, 0x00,0x00, 0x76,0xB1, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x20,0x3A, 0x00,0x07, 0xE6,0x00,
-0xFE,0x9D, 0xF4,0x02, 0x00,0x00, 0xF7,0x04, 0x42,0xA8, 0xF6,0x06, 0x42,0xAA, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xE0,0x00, 0xFF,0x1C, 0xF7,0x33, 0x28,0x00, 0x07,0x30, 0x00,0x02, 0x86,0xBA,
-0x00,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5,
-0xFF,0xF0, 0x20,0x36, 0x00,0x01, 0xE6,0x00, 0xFE,0xD5, 0xF6,0x05, 0x6F,0x34, 0x20,0x36,
-0x00,0x02, 0xE6,0x00, 0xFE,0xE5, 0xF5,0x02, 0x00,0x20, 0xE0,0x00, 0xFE,0xFC, 0xF6,0x06,
-0x42,0xAC, 0x20,0x2E, 0x00,0x0C, 0xE6,0x00, 0xFF,0x1C, 0xF4,0x02, 0x00,0x00, 0xF5,0x02,
-0x00,0x1F, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0xFF,0x1C, 0xF4,0x02, 0x00,0x01, 0xF7,0x04, 0x42,0xAC, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0xF4,0x02, 0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x86,0x96, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x00,0x04, 0xF6,0x02, 0x00,0x00, 0x07,0x38, 0x00,0x08, 0x97,0x36, 0x00,0x04, 0x87,0x36,
-0x00,0x08, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xEC,0x00, 0xFF,0x7D, 0xF6,0x85,
-0x6F,0x34, 0x87,0x36, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x03, 0xEE,0x00,
-0xFF,0x80, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x00,
-0xFF,0xBD, 0xF6,0x06, 0x42,0xAE, 0xF7,0x04, 0x6F,0x34, 0x00,0x00, 0x00,0x01, 0x87,0x3A,
-0x00,0x08, 0xF6,0x82, 0xFF,0xEC, 0x77,0x39, 0x00,0x02, 0xA7,0x3A, 0x68,0x02, 0x00,0x00,
-0x00,0x01, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x00, 0xFF,0xD8, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x42,0xAC, 0x76,0xB1,
-0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x07,0x38,
-0x00,0x01, 0xF7,0x33, 0x28,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0x00,0x17, 0x00,0x00,
-0x00,0x1A, 0x00,0x00, 0x00,0x1D, 0x00,0x00, 0x00,0x18, 0x00,0x00, 0x00,0x00, 0x56,0x65,
-0x72,0x73, 0x69,0x6F, 0x6E,0x53, 0x74,0x72, 0x69,0x6E, 0x67,0x3A, 0x20,0x6D, 0x63,0x70,
-0x2D,0x6C, 0x34,0x76, 0x33,0x20, 0x33,0x2E, 0x30,0x38, 0x63,0x20, 0x44,0x65, 0x63,0x20,
-0x31,0x31, 0x20,0x31, 0x39,0x39, 0x36,0x20, 0x31,0x33, 0x3A,0x30, 0x36,0x3A, 0x31,0x36,
-0x00,0x00, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04, 0xE0,0x0C, 0xFF,0x02,
-0x00,0x00, 0x97,0x02, 0xFF,0x84, 0xF7,0x06, 0x0C,0x3E, 0xCF,0xFC, 0x75,0x80, 0xF6,0x02,
-0x00,0x02, 0x96,0x02, 0xFF,0x8C, 0x90,0x02, 0xFF,0x88, 0xF7,0x04, 0xE0,0x20, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x00,0x74, 0xF6,0x82, 0x00,0x00, 0xF6,0x82,
-0x00,0x03, 0x96,0x82, 0xFF,0x98, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x0C, 0xF5,0x02, 0x14,0x94, 0xF5,0x05, 0x7B,0x00, 0xF5,0x0E,
-0xF0,0x14, 0xF5,0x05, 0x7B,0x08, 0xF7,0x06, 0xE0,0x00, 0xF6,0x86, 0x7B,0x68, 0xC7,0x38,
-0x6A,0x00, 0xF7,0x05, 0x7A,0xF0, 0xF5,0x02, 0x00,0x4C, 0xF6,0x82, 0x00,0x00, 0x20,0x36,
-0x00,0x02, 0xEE,0x01, 0x01,0x24, 0xF5,0x05, 0x7A,0xF8, 0xC5,0xB4, 0x00,0x00, 0xC6,0x34,
-0x00,0x00, 0xF7,0x06, 0xE0,0x30, 0xC7,0x2C, 0x70,0x00, 0xF5,0x06, 0x6F,0x44, 0xB7,0x32,
-0x50,0x02, 0x90,0x13, 0xFF,0xFC, 0x97,0x13, 0xFF,0xFC, 0x95,0x96, 0xFF,0xF4, 0x96,0x16,
-0xFF,0xF0, 0x96,0x96, 0xFF,0xEC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x03,0x1C, 0x97,0x93,
-0xFF,0xFC, 0x85,0x96, 0xFF,0xF4, 0x86,0x16, 0xFF,0xF0, 0x86,0x96, 0xFF,0xEC, 0x05,0xAC,
-0x14,0x94, 0x06,0xB4, 0x00,0x01, 0x20,0x36, 0x00,0x02, 0xEE,0x01, 0x00,0xD5, 0x06,0x30,
-0x00,0x04, 0xF5,0x02, 0x00,0x22, 0xF5,0x05, 0x6F,0x58, 0xF0,0x05, 0x6F,0x54, 0xF0,0x05,
-0x6F,0x50, 0xF0,0x05, 0x2D,0x40, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x29,0x58, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02,
-0x00,0x03, 0xF7,0x05, 0xE0,0x08, 0xF7,0x04, 0x7A,0xD8, 0xF6,0x02, 0x00,0x01, 0x96,0x02,
-0xFF,0x94, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x01,0x91, 0xF7,0x06, 0x7A,0xE8, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x03,0xDC, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x7A,0xE8, 0xF6,0x02,
-0x00,0x05, 0xF6,0x3B, 0x28,0x00, 0xF7,0x06, 0x7A,0xE0, 0x86,0x82, 0xFF,0x44, 0xF6,0x02,
-0x00,0x03, 0x20,0x36, 0x00,0x00, 0xE6,0x01, 0x01,0xC9, 0xF6,0x3B, 0x28,0x00, 0xF7,0x04,
-0x6F,0x64, 0x86,0x82, 0xFF,0x44, 0x07,0x38, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x01,
-0x01,0xB0, 0xF7,0x05, 0x6F,0x64, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x00,0x34, 0x97,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x00,0x8C, 0x97,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x44,0x28, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0xF0, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x0C,0x60, 0x97,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x04,0x08, 0x97,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x00,0x20, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x0B,0xD8, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1D,0x68, 0x97,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1E,0x50, 0x97,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x5F,0x68, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x6D,0xEC, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x21,0xD0, 0x97,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x22,0x2C, 0x97,0x93, 0xFF,0xFC, 0x90,0x02,
-0xFF,0x94, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x0B,0xFC, 0x97,0x93, 0xFF,0xFC, 0xF4,0x02,
-0x00,0x00, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x08, 0xF6,0x02, 0x00,0x00, 0xC5,0xB0, 0x00,0x00, 0x20,0x32, 0x00,0x02, 0xEE,0x01,
-0x03,0x08, 0xF5,0x06, 0x6F,0x44, 0xA6,0xAE, 0x50,0x02, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x01, 0xE6,0x01, 0x02,0xFC, 0xF5,0x02,
-0x00,0x02, 0x95,0x13, 0xFF,0xFC, 0x96,0x93, 0xFF,0xFC, 0x95,0x96, 0xFF,0xF4, 0x96,0x16,
-0xFF,0xF0, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x03,0x1C, 0x97,0x93, 0xFF,0xFC, 0x86,0x16,
-0xFF,0xF0, 0x85,0x96, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x05,0xAC, 0x00,0x04, 0xE0,0x01,
-0x02,0xAC, 0x06,0x30, 0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x87,0x16, 0x00,0x00, 0xF6,0x02, 0x00,0x00, 0xF6,0x82, 0x00,0x08, 0x96,0x3A,
-0x00,0x08, 0x96,0x3A, 0x00,0x0C, 0x96,0x3A, 0x09,0xD8, 0x96,0x3A, 0x09,0xDC, 0x96,0x3A,
-0x0E,0xF4, 0x96,0x3A, 0x0E,0xF8, 0x96,0xBA, 0x14,0x20, 0x96,0x3A, 0x14,0x24, 0x90,0xBA,
-0x14,0x8C, 0x86,0x96, 0x00,0x04, 0x90,0xBA, 0x14,0x90, 0x96,0xBA, 0x00,0x00, 0x96,0x3A,
-0x00,0x04, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x96,
-0x00,0x00, 0x87,0x16, 0x00,0x08, 0x86,0x16, 0x00,0x04, 0x77,0x38, 0xFF,0xFF, 0xC5,0x30,
-0x70,0x00, 0xC0,0x32, 0x52,0x00, 0xE4,0x01, 0x03,0xC9, 0x00,0x00, 0x00,0x01, 0x87,0x2E,
-0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0xC0,0x32, 0x52,0x00, 0xE4,0x01,
-0x03,0xA0, 0x05,0xAC, 0x00,0x02, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF7,0x02, 0x00,0x01, 0xE0,0x01, 0x03,0xE8, 0xF7,0x05, 0x7A,0xD8, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF5,0x02,
-0x00,0x0A, 0xF5,0x05, 0x71,0xCC, 0xF0,0x05, 0x71,0xD4, 0xF0,0x05, 0x71,0xD0, 0xF0,0x05,
-0x71,0xC4, 0xF5,0x02, 0x00,0x01, 0xF6,0x82, 0x00,0x00, 0x20,0x36, 0x00,0x0A, 0xEC,0x01,
-0x04,0x64, 0xF5,0x05, 0x71,0xC8, 0xF5,0x8A, 0x1E,0x00, 0xF6,0x06, 0x71,0xC4, 0x47,0x2C,
-0xFF,0xFC, 0x97,0x32, 0x00,0x18, 0x06,0x30, 0x00,0x04, 0x06,0xB4, 0x00,0x01, 0xF7,0x04,
-0x71,0xCC, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x01, 0x04,0x41, 0x05,0xAC,
-0x21,0x4C, 0xF0,0x05, 0x71,0x98, 0xF5,0x06, 0x6F,0x68, 0x95,0x13, 0xFF,0xFC, 0xF5,0x06,
-0x7B,0x18, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x06, 0x05,0xD4, 0x95,0x13, 0xFF,0xFC, 0xF7,0x82, 0x00,0x05, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x06, 0x6F,0x68, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x0B,0x70, 0x95,0x13, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x06, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x6F,0x68, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x0B,0xA0, 0x95,0x13,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x05, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x70,0x80, 0x95,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06,
-0x0B,0x70, 0x95,0x13, 0xFF,0xFC, 0xF7,0x82, 0x00,0x06, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06,
-0x70,0x80, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x06, 0x05,0x58, 0x95,0x13, 0xFF,0xFC, 0xF5,0x02, 0x00,0x0A, 0x95,0x13,
-0xFF,0xFC, 0xF5,0x06, 0x71,0x0C, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x05,0x58, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04,
-0x71,0xC4, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x05,0x7D, 0xF6,0x86,
-0x71,0xC4, 0xE0,0x01, 0x05,0x94, 0xF7,0x02, 0x00,0x00, 0xF7,0x04, 0x71,0xD0, 0x00,0x00,
-0x00,0x01, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x87,0x3A, 0x00,0x18, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x05,0xAC, 0xF7,0x05, 0x7B,0x10, 0xF6,0x06,
-0x71,0x0C, 0xE0,0x01, 0x05,0xC0, 0xF6,0x05, 0x7B,0x18, 0xF6,0x06, 0x6F,0x68, 0xF6,0x05,
-0x7B,0x18, 0x97,0x02, 0xFF,0x48, 0x07,0x38, 0x21,0x28, 0x97,0x02, 0xFF,0x4C, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x10, 0x86,0x82,
-0xFF,0x48, 0xF4,0x86, 0x6F,0x68, 0xF4,0x85, 0x7B,0x18, 0xF5,0x04, 0x7B,0x10, 0x26,0xB4,
-0x00,0x02, 0x85,0xB6, 0x00,0x00, 0x87,0x2A, 0x00,0x00, 0x76,0x29, 0x00,0x1E, 0x76,0x30,
-0xFF,0xE5, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC5,0xAC, 0x6F,0xC0, 0xC7,0x38,
-0x67,0xC0, 0x77,0x39, 0xFF,0xF0, 0x77,0xB8, 0x00,0x10, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01,
-0x06,0x45, 0x75,0xAC, 0xFF,0xF0, 0xF7,0x04, 0x71,0xAC, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x71,0xAC, 0xF7,0x04, 0x71,0xAC, 0xE0,0x01, 0x08,0xC4, 0xF7,0x02,
-0x00,0x01, 0x77,0x2C, 0xFF,0xF8, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x06,0x71, 0x76,0xA9,
-0x00,0x1E, 0xF7,0x04, 0x71,0xA8, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x71,0xA8, 0xF7,0x04, 0x71,0xA8, 0xE0,0x01, 0x08,0xC4, 0xF7,0x02, 0x00,0x01, 0x87,0x2A,
-0x00,0x00, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x27,0x38,
-0x00,0x04, 0x20,0x3A, 0x00,0x03, 0xE2,0x01, 0x08,0xA4, 0x00,0x00, 0x00,0x01, 0x77,0x39,
-0x00,0x02, 0xF6,0x86, 0x06,0xA4, 0xA6,0xB6, 0x70,0x02, 0x00,0x00, 0x00,0x01, 0xC1,0x34,
-0x00,0x00, 0x00,0x01, 0x06,0xB4, 0x00,0x01, 0x07,0x7C, 0x00,0x01, 0x07,0xEC, 0x00,0x01,
-0x08,0x44, 0x87,0x2A, 0x00,0x04, 0xC4,0x84, 0x00,0x00, 0xC0,0x3A, 0x4A,0x00, 0xE6,0x01,
-0x06,0xD8, 0x00,0x00, 0x00,0x01, 0x87,0x02, 0xFF,0x48, 0x00,0x00, 0x00,0x01, 0xC7,0x38,
-0x52,0x00, 0x97,0x2A, 0x00,0x04, 0x87,0x2A, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x21,0x00, 0xEE,0x01, 0x07,0x3C, 0xF6,0x02, 0x00,0x00, 0x86,0xAA, 0x00,0x04, 0x87,0x02,
-0xFF,0x48, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x52,0x00, 0x27,0x38, 0x00,0x28, 0xC0,0x36,
-0x72,0x00, 0xE6,0x01, 0x07,0x3C, 0x00,0x00, 0x00,0x01, 0x77,0xFC, 0x00,0x1D, 0x70,0x3E,
-0xFF,0xE1, 0xE6,0x01, 0x07,0x3C, 0x00,0x00, 0x00,0x01, 0x77,0xFC, 0x00,0x17, 0x70,0x3E,
-0xFF,0xE1, 0xE6,0x01, 0x07,0x3D, 0x00,0x00, 0x00,0x01, 0x77,0xFC, 0x00,0x16, 0x70,0x3E,
-0xFF,0xE1, 0xE6,0x01, 0x07,0x44, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x01, 0x08,0x88, 0x00,0x00, 0x00,0x01, 0x87,0x2A, 0x00,0x18, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xEE,0x01, 0x08,0xC1, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x71,0xA4, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x71,0xA4, 0xF7,0x04,
-0x71,0xA4, 0xE0,0x01, 0x08,0xC4, 0xF7,0x02, 0x00,0x01, 0x87,0x2A, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x21,0x00, 0xEE,0x01, 0x07,0xE0, 0xF6,0x02, 0x00,0x00, 0x86,0xAA,
-0x00,0x04, 0x87,0x02, 0xFF,0x48, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x52,0x00, 0x27,0x38,
-0x00,0x0C, 0xC0,0x36, 0x72,0x00, 0xE6,0x01, 0x07,0xE0, 0x00,0x00, 0x00,0x01, 0x77,0xFC,
-0x00,0x1D, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01, 0x07,0xE0, 0x00,0x00, 0x00,0x01, 0x77,0xFC,
-0x00,0x17, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01, 0x07,0xE1, 0x00,0x00, 0x00,0x01, 0x77,0xFC,
-0x00,0x16, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01, 0x08,0x80, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0xE0,0x01, 0x08,0x80, 0x20,0x32, 0x00,0x00, 0x87,0x02, 0xFF,0x48, 0x00,0x00,
-0x00,0x01, 0xC7,0x38, 0x52,0x00, 0x27,0x38, 0x00,0x04, 0x20,0x3A, 0x00,0x08, 0xE6,0x01,
-0x08,0x38, 0xF6,0x82, 0x00,0x00, 0x77,0xFC, 0x00,0x1D, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01,
-0x08,0x38, 0x00,0x00, 0x00,0x01, 0x77,0xFC, 0x00,0x17, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01,
-0x08,0x39, 0x00,0x00, 0x00,0x01, 0x77,0xFC, 0x00,0x16, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01,
-0x08,0x80, 0x20,0x36, 0x00,0x00, 0xF6,0x82, 0x00,0x01, 0xE0,0x01, 0x08,0x80, 0x20,0x36,
-0x00,0x00, 0xF7,0x02, 0x00,0x00, 0x77,0xFC, 0x00,0x1D, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01,
-0x08,0x78, 0x00,0x00, 0x00,0x01, 0x77,0xFC, 0x00,0x17, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01,
-0x08,0x79, 0x00,0x00, 0x00,0x01, 0x77,0xFC, 0x00,0x16, 0x70,0x3E, 0xFF,0xE1, 0xE6,0x01,
-0x08,0x80, 0x20,0x3A, 0x00,0x00, 0xF7,0x02, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01,
-0x08,0xC1, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x71,0xA0, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x71,0xA0, 0xF7,0x04, 0x71,0xA0, 0xE0,0x01, 0x08,0xC4, 0xF7,0x02,
-0x00,0x01, 0xF7,0x04, 0x71,0x9C, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x71,0x9C, 0xF7,0x04, 0x71,0x9C, 0xE0,0x01, 0x08,0xC4, 0xF7,0x02, 0x00,0x01, 0xF7,0x02,
-0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x09,0x68, 0x00,0x00, 0x00,0x01, 0xF6,0x84,
-0x7B,0x10, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0x76,0xB5, 0x00,0x1E, 0x76,0xB4,
-0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x39, 0xFF,0xF0, 0x27,0x38, 0x00,0x04, 0x20,0x3A,
-0x00,0x03, 0xE2,0x01, 0x0B,0x50, 0x77,0x39, 0x00,0x02, 0xF6,0x86, 0x09,0x0C, 0xA6,0xB6,
-0x70,0x02, 0x00,0x00, 0x00,0x01, 0xC1,0x34, 0x00,0x00, 0x00,0x01, 0x09,0x1C, 0x00,0x01,
-0x0A,0xE0, 0x00,0x01, 0x0A,0xAC, 0x00,0x01, 0x0B,0x14, 0xF7,0x04, 0x71,0xD0, 0xF6,0x04,
-0x71,0xCC, 0x06,0xB8, 0x00,0x01, 0xC0,0x36, 0x62,0x00, 0xE6,0x01, 0x09,0x38, 0xC7,0x34,
-0x00,0x00, 0xF7,0x02, 0x00,0x00, 0xF5,0x84, 0x71,0xD4, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x5A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x09,0x85, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x71,0xB0, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x71,0xB0, 0xF7,0x04, 0x71,0xB0, 0xF7,0x04, 0x71,0xB4, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x71,0xB4, 0xF7,0x04, 0x71,0xB4, 0xE0,0x01, 0x0B,0x50, 0x00,0x00,
-0x00,0x01, 0xF4,0x84, 0x71,0xC8, 0xF6,0x85, 0x71,0xD0, 0x94,0x96, 0xFF,0xF4, 0xF4,0x84,
-0x7B,0x10, 0xC0,0x36, 0x62,0x00, 0xE6,0x01, 0x09,0xA4, 0x94,0x96, 0xFF,0xEC, 0xF0,0x05,
-0x71,0xD0, 0xF7,0x04, 0x71,0xD0, 0xF0,0x05, 0x71,0xC8, 0x84,0x96, 0xFF,0xEC, 0xC0,0x3A,
-0x5A,0x00, 0x47,0x0C, 0x00,0x01, 0xF7,0x05, 0x71,0xC4, 0x87,0x26, 0x00,0x08, 0x00,0x00,
-0x00,0x01, 0x70,0x3A, 0xFF,0xE1, 0xE6,0x01, 0x09,0xE1, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x71,0x98, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x71,0x98, 0x84,0x96,
-0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x01, 0x0A,0x71, 0x00,0x00,
-0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x05,0x58, 0x97,0x93, 0xFF,0xFC, 0xF6,0x02,
-0x00,0x09, 0x20,0x32, 0x00,0x14, 0xE6,0x01, 0x0A,0x4D, 0x27,0x00, 0x00,0x0C, 0x20,0x3A,
-0x00,0x01, 0xE2,0x01, 0x0A,0x4D, 0xF7,0x06, 0x2D,0xCC, 0xF6,0x84, 0x2E,0xCC, 0x00,0x00,
-0x00,0x01, 0x75,0xB5, 0x00,0x02, 0xB6,0x2E, 0x70,0x02, 0x06,0xB4, 0x00,0x01, 0xF6,0x85,
-0x2E,0xCC, 0x86,0x02, 0xFF,0x34, 0xF7,0x06, 0x2E,0x4C, 0x20,0x36, 0x00,0x1F, 0xE2,0x01,
-0x0A,0x4D, 0xB6,0x2E, 0x70,0x02, 0xF0,0x05, 0x2E,0xCC, 0xF7,0x04, 0x2D,0x68, 0x00,0x00,
-0x00,0x01, 0x87,0x3A, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x3A, 0x00,0x28, 0x00,0x00,
-0x00,0x01, 0x07,0x88, 0x00,0x08, 0xC1,0x38, 0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0xF7,0x04,
-0x71,0xBC, 0x84,0x96, 0xFF,0xEC, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x71,0xBC, 0xF7,0x04,
-0x71,0xBC, 0x86,0xA6, 0x00,0x04, 0x84,0x96, 0xFF,0xF4, 0xF7,0x04, 0x71,0xB8, 0x20,0x26,
-0x00,0x00, 0xC7,0x38, 0x68,0x00, 0xF7,0x05, 0x71,0xB8, 0xE6,0x01, 0x0B,0x51, 0x00,0x00,
-0x00,0x01, 0xE0,0x01, 0x0B,0x5C, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x71,0xC0, 0x00,0x00,
-0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x71,0xC0, 0xF7,0x04, 0x71,0xC0, 0xF4,0x84,
-0x7B,0x10, 0x00,0x00, 0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0xFD,0xCC, 0x97,0x93, 0xFF,0xFC, 0xE0,0x01, 0x0B,0x50, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x71,0xC0, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x71,0xC0, 0xF7,0x04,
-0x71,0xC0, 0xF4,0x84, 0x7B,0x10, 0x00,0x00, 0x00,0x01, 0x94,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0xFF,0x30, 0x97,0x93, 0xFF,0xFC, 0xE0,0x01, 0x0B,0x50, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x71,0xC0, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x71,0xC0, 0xF7,0x04, 0x71,0xC0, 0xF6,0x84, 0x7B,0x10, 0x87,0x02, 0xFF,0x48, 0x00,0x00,
-0x00,0x01, 0xC7,0x38, 0x6A,0x00, 0x27,0x38, 0x00,0x04, 0x97,0x13, 0xFF,0xFC, 0x96,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0xFE,0x48, 0x97,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x05,0x58, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x70,0x80, 0xF7,0x05, 0x7B,0x18, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x05,0x58, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x6F,0x68, 0xF7,0x05, 0x7B,0x18, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x05,0x58, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x7B,0x18, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x6F,0x68, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x7B,0x18, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x6F,0xF4, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x7B,0x18, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x70,0x80, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x7B,0x18, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x71,0x0C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF5,0x02, 0x00,0x04, 0xF5,0x05, 0x76,0x00, 0xF0,0x05,
-0x76,0x08, 0xF0,0x05, 0x76,0x04, 0xF0,0x05, 0x75,0xF8, 0xF5,0x02, 0x00,0x01, 0xF6,0x82,
-0x00,0x00, 0x20,0x36, 0x00,0x04, 0xEC,0x01, 0x0C,0xBC, 0xF5,0x05, 0x75,0xFC, 0xF5,0x8E,
-0x6A,0xF8, 0xF6,0x06, 0x75,0xF8, 0x47,0x2C, 0xFF,0xFC, 0x97,0x32, 0x00,0x18, 0x06,0x30,
-0x00,0x04, 0x06,0xB4, 0x00,0x01, 0xF7,0x04, 0x76,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xEC,0x01, 0x0C,0x99, 0x05,0xAC, 0x21,0x4C, 0xF5,0x06, 0x72,0x18, 0x95,0x13,
-0xFF,0xFC, 0xF5,0x06, 0x76,0x48, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x15,0x48, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x0D,0xF4, 0x95,0x13, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x0E, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x72,0x18, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x0D,0xF4, 0x95,0x13,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x0E, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x72,0xA4, 0x95,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06,
-0x13,0x2C, 0x95,0x13, 0xFF,0xFC, 0xF7,0x82, 0x00,0x01, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06,
-0x73,0x30, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x06, 0x16,0xC8, 0x95,0x13, 0xFF,0xFC, 0xF7,0x82, 0x00,0x01, 0x97,0x93,
-0xFF,0xFC, 0xF5,0x06, 0x73,0xBC, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x18,0x00, 0x95,0x13, 0xFF,0xFC, 0xF7,0x82,
-0x00,0x10, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x74,0x48, 0x95,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x16,0x40, 0x95,0x13,
-0xFF,0xFC, 0xF7,0x82, 0x00,0x10, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06, 0x74,0xD4, 0x95,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF5,0x06,
-0x13,0x2C, 0x95,0x13, 0xFF,0xFC, 0xF5,0x02, 0x00,0x12, 0x95,0x13, 0xFF,0xFC, 0xF5,0x06,
-0x75,0x60, 0x95,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93,
-0xFF,0xFC, 0xF0,0x05, 0x75,0xF0, 0xF0,0x05, 0x75,0xEC, 0xF0,0x05, 0x75,0xF4, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x38, 0xF7,0x04,
-0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x0E,0x28, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01,
-0x0E,0x3D, 0x00,0x00, 0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x15,0xD0, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x01, 0x13,0x18, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x75,0xFC, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x0E,0x59, 0xF6,0x86, 0x75,0xF8, 0xE0,0x01,
-0x0E,0x6C, 0xF6,0x82, 0x00,0x00, 0xF7,0x04, 0x76,0x08, 0x00,0x00, 0x00,0x01, 0x77,0x39,
-0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x86,0xBA, 0x00,0x18, 0xF7,0x04, 0x76,0xFC, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x0E,0x90, 0xF6,0x85, 0x76,0x60, 0xF3,0x06,
-0x76,0x48, 0xF3,0x05, 0x76,0xFC, 0xE0,0x01, 0x0E,0xA4, 0xF7,0x02, 0x00,0x01, 0xF3,0x02,
-0x00,0x10, 0xF3,0x05, 0x76,0xF8, 0xF3,0x06, 0x76,0x48, 0xF3,0x05, 0x77,0x00, 0xF7,0x02,
-0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x13,0x15, 0xF3,0x06, 0x74,0x48, 0xF7,0x04,
-0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x0E,0xD8, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01,
-0x0E,0xED, 0x00,0x00, 0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x16,0x40, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x01, 0x13,0x18, 0x00,0x00, 0x00,0x01, 0xF6,0x84, 0x76,0x60, 0x00,0x00,
-0x00,0x01, 0x87,0x36, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0x70,0x3A, 0xFF,0xE1, 0xE6,0x01,
-0x0F,0x21, 0xF4,0x82, 0x00,0x00, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x00,0xBC, 0x97,0x93, 0xFF,0xFC, 0xE0,0x01, 0x13,0x14, 0xF3,0x06, 0x75,0x60, 0xC3,0xB4,
-0x00,0x00, 0x84,0x1E, 0x00,0x10, 0xF6,0x84, 0x4A,0xA0, 0x23,0x14, 0x00,0x20, 0x93,0x16,
-0xFF,0xC4, 0x94,0x16, 0xFF,0xE0, 0x96,0x96, 0xFF,0xD4, 0x85,0x1E, 0x00,0x14, 0xF7,0x04,
-0x4A,0x9C, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x01, 0x10,0x0C, 0x95,0x16,
-0xFF,0xE4, 0x77,0x35, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF3,0x06,
-0x4A,0x98, 0xC6,0xB8, 0x30,0x00, 0x06,0xB4, 0x00,0x0C, 0xC5,0x84, 0x00,0x00, 0x87,0x36,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x42,0x00, 0xE6,0x01, 0x0F,0x9C, 0xC6,0x24,
-0x00,0x00, 0x87,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x52,0x00, 0xE6,0x01,
-0x0F,0xA0, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x01,
-0x0F,0xAD, 0x00,0x00, 0x00,0x01, 0xF5,0x82, 0x00,0x00, 0x86,0x36, 0x00,0x00, 0x87,0x16,
-0xFF,0xE0, 0x00,0x00, 0x00,0x01, 0xC0,0x32, 0x72,0x00, 0xE2,0x01, 0x0F,0xE8, 0xF5,0x02,
-0x00,0x00, 0xC0,0x32, 0x72,0x00, 0xE6,0x01, 0x0F,0xF0, 0x20,0x2A, 0x00,0x00, 0x86,0xB6,
-0x00,0x04, 0x87,0x16, 0xFF,0xE4, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x01,
-0x0F,0xF1, 0x20,0x2A, 0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x01,
-0x10,0x01, 0x20,0x2E, 0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x01,
-0x10,0x10, 0x20,0x26, 0x00,0x00, 0xF4,0x82, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x01,
-0x10,0x45, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xD4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9,
-0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4,
-0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xD8, 0xE0,0x01, 0x10,0xB8, 0x96,0x96,
-0xFF,0xDC, 0x27,0x14, 0x00,0x2C, 0x97,0x13, 0xFF,0xFC, 0x83,0x16, 0xFF,0xC4, 0x00,0x00,
-0x00,0x01, 0x93,0x13, 0xFF,0xFC, 0xF3,0x06, 0x4A,0x98, 0x93,0x13, 0xFF,0xFC, 0x93,0x96,
-0xFF,0xCC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96,
-0xFF,0xCC, 0x20,0x22, 0x00,0x00, 0xE6,0x01, 0x10,0xB5, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xD4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5,
-0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16,
-0xFF,0xD8, 0x96,0x96, 0xFF,0xDC, 0xF7,0x05, 0x4A,0xA0, 0xE0,0x01, 0x10,0xBC, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x01, 0x10,0xCC, 0xF4,0x82,
-0x00,0x01, 0xE0,0x01, 0x11,0x24, 0xF4,0x82, 0x00,0x00, 0x86,0x96, 0xFF,0xD8, 0x00,0x00,
-0x00,0x01, 0x77,0x35, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF6,0x86,
-0x42,0xC8, 0xA6,0x3A, 0x68,0x02, 0xC7,0x38, 0x68,0x00, 0x75,0x39, 0x00,0x1E, 0x75,0x28,
-0xFF,0xE5, 0x05,0xB8, 0x00,0x02, 0x86,0xAE, 0x00,0x00, 0x07,0x38, 0x00,0x04, 0x97,0x16,
-0xFF,0xEC, 0xC6,0x30, 0x57,0xC0, 0x76,0x30, 0xFF,0xF0, 0x96,0x16, 0xFF,0xF4, 0x75,0xAD,
-0x00,0x1E, 0x75,0xAC, 0xFF,0xE5, 0xC6,0xB4, 0x5F,0xC0, 0x76,0xB4, 0xFF,0xF0, 0x96,0x96,
-0xFF,0xF0, 0x20,0x26, 0x00,0x00, 0xE6,0x01, 0x11,0x38, 0xF5,0x82, 0x00,0x00, 0xE0,0x01,
-0x11,0xCC, 0xF6,0x02, 0x00,0x00, 0x86,0x96, 0xFF,0xF0, 0x00,0x00, 0x00,0x01, 0xC7,0x34,
-0x68,0x00, 0xC4,0x9C, 0x72,0x00, 0xC0,0x2E, 0x6A,0x00, 0xEC,0x01, 0x11,0x98, 0xC5,0x24,
-0x00,0x00, 0xC6,0x2C, 0x00,0x00, 0x87,0x16, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0xA6,0xB2,
-0x70,0x02, 0x05,0xAC, 0x00,0x01, 0xC7,0x30, 0x70,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38,
-0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB4, 0xFF,0xF0, 0xF6,0xAB, 0x28,0x00, 0x05,0x28,
-0x00,0x02, 0x87,0x16, 0xFF,0xF0, 0x00,0x00, 0x00,0x01, 0xC0,0x2E, 0x72,0x00, 0xEC,0x01,
-0x11,0x59, 0x06,0x30, 0x00,0x02, 0xF3,0x02, 0x00,0x01, 0xF3,0x05, 0x76,0xF4, 0xF6,0x02,
-0x00,0x01, 0x87,0x16, 0xFF,0xF0, 0x86,0x9E, 0x00,0x04, 0xC7,0x38, 0x70,0x00, 0xC7,0x38,
-0x48,0x00, 0xC6,0xB4, 0x70,0x00, 0x87,0x16, 0xFF,0xF4, 0x06,0xB4, 0x00,0x20, 0x97,0x02,
-0xFF,0x6C, 0x94,0x82, 0xFF,0x50, 0x96,0x82, 0xFF,0x58, 0x20,0x32, 0x00,0x00, 0xE6,0x01,
-0x13,0x10, 0x00,0x00, 0x00,0x01, 0xF7,0x04, 0x76,0x5C, 0xF5,0x84, 0x76,0xF8, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x76,0x5C, 0xF7,0x04, 0x76,0x5C, 0x20,0x2E, 0x00,0x21, 0xE2,0x01,
-0x12,0x30, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x01,
-0x12,0x1C, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xF3,0x05,
-0x76,0xF8, 0xF3,0x04, 0x77,0x00, 0xE0,0x01, 0x12,0x34, 0xF3,0x05, 0x76,0xFC, 0xF0,0x05,
-0x76,0xFC, 0xF7,0x04, 0x75,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01,
-0x12,0x71, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0F, 0x20,0x32,
-0x00,0x44, 0xE6,0x01, 0x12,0x70, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04,
-0x76,0x08, 0xF6,0x84, 0x76,0x00, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x01,
-0x12,0x8C, 0xF7,0x05, 0x76,0x08, 0xF0,0x05, 0x76,0x08, 0xF6,0x84, 0x76,0x08, 0xF7,0x04,
-0x76,0x04, 0xF0,0x05, 0x75,0xF8, 0xF6,0x06, 0x75,0xF8, 0xC0,0x36, 0x72,0x00, 0x47,0x0C,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x12,0xB9, 0xF7,0x05, 0x75,0xFC, 0xE0,0x01,
-0x12,0xC8, 0xF7,0x02, 0x00,0x00, 0x77,0x35, 0x00,0x02, 0xC7,0x38, 0x60,0x00, 0x87,0x3A,
-0x00,0x18, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x13,0x09, 0xF7,0x05,
-0x76,0x60, 0xF7,0x04, 0x2D,0x38, 0xF3,0x06, 0x72,0xA4, 0xF3,0x05, 0x76,0x48, 0xF6,0x86,
-0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02,
-0x00,0x0E, 0x20,0x32, 0x00,0x44, 0xE6,0x01, 0x13,0x18, 0xB3,0x3A, 0x68,0x02, 0xE0,0x01,
-0x13,0x18, 0xF0,0x05, 0x2D,0x38, 0xE0,0x01, 0x13,0x14, 0xF3,0x06, 0x72,0x18, 0xF3,0x06,
-0x73,0x30, 0xF3,0x05, 0x76,0x48, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF7,0x04, 0x76,0x60, 0x00,0x00, 0x00,0x01, 0x86,0xBA, 0x00,0x04, 0xF7,0x04,
-0x76,0x54, 0x00,0x00, 0x00,0x01, 0xC7,0x38, 0x68,0x00, 0xF7,0x05, 0x76,0x54, 0xF7,0x04,
-0x76,0x58, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x76,0x58, 0xF7,0x04,
-0x75,0xF8, 0xF6,0x84, 0x76,0x58, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x13,0x9D, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02, 0x00,0x0F, 0x20,0x32, 0x00,0x44, 0xE6,0x01,
-0x13,0x9C, 0xB5,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x76,0x08, 0xF6,0x84,
-0x76,0x00, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x01, 0x13,0xB8, 0xF7,0x05,
-0x76,0x08, 0xF0,0x05, 0x76,0x08, 0xF7,0x04, 0x76,0x08, 0xF6,0x84, 0x76,0x04, 0xF0,0x05,
-0x75,0xF8, 0xF5,0x84, 0x76,0xF8, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x2E,
-0x00,0x21, 0xE2,0x01, 0x14,0x14, 0xF7,0x05, 0x75,0xFC, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86,
-0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32,
-0x00,0x44, 0xE6,0x01, 0x14,0x00, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x02,
-0x00,0x22, 0xF5,0x05, 0x76,0xF8, 0xF5,0x04, 0x77,0x00, 0xE0,0x01, 0x14,0x18, 0xF5,0x05,
-0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0xF7,0x04, 0x75,0xEC, 0xF5,0x06, 0x72,0x18, 0x20,0x3A,
-0x00,0x00, 0xE6,0x01, 0x14,0x40, 0xF5,0x05, 0x76,0x48, 0xF7,0x04, 0x75,0xF0, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x14,0x55, 0x00,0x00, 0x00,0x01, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x15,0xD0, 0x97,0x93, 0xFF,0xFC, 0xE0,0x01, 0x14,0xC4, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xFC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01,
-0x14,0x71, 0xF6,0x86, 0x75,0xF8, 0xE0,0x01, 0x14,0x88, 0xF7,0x02, 0x00,0x00, 0xF7,0x04,
-0x76,0x08, 0x00,0x00, 0x00,0x01, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x87,0x3A,
-0x00,0x18, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x14,0xC5, 0xF7,0x05,
-0x76,0x60, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02, 0x00,0x0E, 0x20,0x32, 0x00,0x44, 0xE6,0x01,
-0x14,0xBC, 0xB5,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF5,0x06, 0x72,0xA4, 0xF5,0x05,
-0x76,0x48, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04,
-0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x15,0x40, 0xF4,0x02,
-0x00,0x00, 0x86,0x96, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xF6,0x85, 0x75,0xEC, 0x86,0x96,
-0x00,0x08, 0x00,0x00, 0x00,0x01, 0xF6,0x85, 0x7B,0x38, 0x86,0x96, 0x00,0x00, 0xF7,0x04,
-0x76,0x48, 0xF6,0x85, 0x7B,0x30, 0xF6,0x86, 0x72,0x18, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x15,0x41, 0xF4,0x02, 0x00,0x01, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x15,0xD0, 0x97,0x93, 0xFF,0xFC, 0xF4,0x02, 0x00,0x01, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04, 0x75,0xF4, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x15,0xBC, 0xF4,0x02, 0x00,0x00, 0x86,0x96,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0xF6,0x85, 0x75,0xF0, 0x86,0x96, 0x00,0x08, 0x00,0x00,
-0x00,0x01, 0xF6,0x85, 0x7B,0x48, 0x86,0x96, 0x00,0x00, 0xF7,0x04, 0x76,0x48, 0xF6,0x85,
-0x7B,0x40, 0xF6,0x86, 0x72,0x18, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x01, 0x15,0xBD, 0xF4,0x02, 0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x15,0xD0, 0x97,0x93, 0xFF,0xFC, 0xF4,0x02, 0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04, 0x76,0xFC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x01, 0x15,0xFC, 0xF6,0x82, 0x00,0x10, 0xF6,0x86, 0x76,0x48, 0xF6,0x85,
-0x76,0xFC, 0xE0,0x01, 0x16,0x0C, 0xF7,0x02, 0x00,0x01, 0xF6,0x85, 0x76,0xF8, 0xF6,0x86,
-0x76,0x48, 0xF6,0x85, 0x77,0x00, 0xF7,0x02, 0x00,0x00, 0x20,0x3A, 0x00,0x00, 0xE6,0x01,
-0x16,0x20, 0xF6,0x86, 0x74,0xD4, 0xE0,0x01, 0x16,0x2C, 0xF6,0x85, 0x76,0x48, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x16,0x40, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF6,0x04, 0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0xE6,0x01, 0x16,0x85, 0xF7,0x02, 0x00,0x01, 0xF7,0x05, 0x75,0xF4, 0xF6,0x84,
-0x7B,0x48, 0xF7,0x05, 0x76,0xF4, 0xF7,0x04, 0x7B,0x40, 0xC6,0xB0, 0x68,0x00, 0x26,0xB4,
-0x00,0x04, 0x97,0x02, 0xFF,0x6C, 0x96,0x02, 0xFF,0x50, 0xE0,0x01, 0x16,0xA8, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x75,0xEC, 0xF6,0x84, 0x7B,0x38, 0xF5,0x82, 0x00,0x01, 0xF5,0x85,
-0x76,0xF4, 0xF6,0x04, 0x7B,0x30, 0xC6,0xB8, 0x68,0x00, 0x26,0xB4, 0x00,0x04, 0x96,0x02,
-0xFF,0x6C, 0x97,0x02, 0xFF,0x50, 0x96,0x82, 0xFF,0x58, 0xF5,0x86, 0x73,0xBC, 0xF5,0x85,
-0x76,0x48, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04,
-0x7B,0x28, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0xF7,0x05, 0x7B,0x28, 0xF7,0x04,
-0x75,0xF4, 0xF6,0x84, 0x7B,0x28, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x17,0x21, 0x00,0x00,
-0x00,0x01, 0xF0,0x05, 0x75,0xF4, 0xF7,0x04, 0x75,0xEC, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x01, 0x17,0x25, 0xF0,0x05, 0x75,0xF0, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x16,0x40, 0x97,0x93, 0xFF,0xFC, 0xE0,0x01, 0x17,0xEC, 0x00,0x00, 0x00,0x01, 0xF0,0x05,
-0x75,0xEC, 0xF7,0x04, 0x75,0xFC, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01,
-0x17,0x41, 0xF6,0x86, 0x75,0xF8, 0xE0,0x01, 0x17,0x58, 0xF7,0x02, 0x00,0x00, 0xF7,0x04,
-0x76,0x08, 0x00,0x00, 0x00,0x01, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x87,0x3A,
-0x00,0x18, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x17,0x95, 0xF7,0x05,
-0x76,0x60, 0xF7,0x04, 0x2D,0x38, 0xF6,0x86, 0x2C,0x28, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF5,0x02, 0x00,0x0E, 0x20,0x32, 0x00,0x44, 0xE6,0x01,
-0x17,0x8C, 0xB5,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xE0,0x01, 0x17,0x98, 0xF5,0x06,
-0x72,0xA4, 0xF5,0x06, 0x72,0x18, 0xF5,0x05, 0x76,0x48, 0xF5,0x84, 0x76,0xF8, 0x00,0x00,
-0x00,0x01, 0x20,0x2E, 0x00,0x21, 0xE2,0x01, 0x17,0xE8, 0xF6,0x86, 0x2C,0x28, 0xF7,0x04,
-0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39,
-0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x01, 0x17,0xD4, 0xB5,0xBA, 0x68,0x02, 0xF0,0x05,
-0x2D,0x38, 0xF5,0x02, 0x00,0x22, 0xF5,0x05, 0x76,0xF8, 0xF5,0x04, 0x77,0x00, 0xE0,0x01,
-0x17,0xEC, 0xF5,0x05, 0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x38, 0xF7,0x04, 0x75,0xEC, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x18,0x34, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x75,0xF0, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x18,0x49, 0x00,0x00,
-0x00,0x01, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x16,0x40, 0x97,0x93, 0xFF,0xFC, 0xE0,0x01,
-0x1C,0x74, 0x00,0x00, 0x00,0x01, 0xF6,0x84, 0x76,0x60, 0x00,0x00, 0x00,0x01, 0x87,0x36,
-0x00,0x08, 0x00,0x00, 0x00,0x01, 0x70,0x3A, 0xFF,0xE1, 0xE6,0x01, 0x18,0x7D, 0xF4,0x82,
-0x00,0x00, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x00,0xBC, 0x97,0x93,
-0xFF,0xFC, 0xE0,0x01, 0x1C,0x70, 0xF3,0x06, 0x75,0x60, 0xC3,0xB4, 0x00,0x00, 0x84,0x1E,
-0x00,0x10, 0xF6,0x84, 0x4A,0xA0, 0x23,0x14, 0x00,0x20, 0x93,0x16, 0xFF,0xC4, 0x94,0x16,
-0xFF,0xE0, 0x96,0x96, 0xFF,0xD4, 0x85,0x1E, 0x00,0x14, 0xF7,0x04, 0x4A,0x9C, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xEC,0x01, 0x19,0x68, 0x95,0x16, 0xFF,0xE4, 0x77,0x35,
-0x00,0x01, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF3,0x06, 0x4A,0x98, 0xC6,0xB8,
-0x30,0x00, 0x06,0xB4, 0x00,0x0C, 0xC5,0x84, 0x00,0x00, 0x87,0x36, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0xC0,0x3A, 0x42,0x00, 0xE6,0x01, 0x18,0xF8, 0xC6,0x24, 0x00,0x00, 0x87,0x36,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x52,0x00, 0xE6,0x01, 0x18,0xFC, 0x20,0x32,
-0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x01, 0x19,0x09, 0x00,0x00,
-0x00,0x01, 0xF5,0x82, 0x00,0x00, 0x86,0x36, 0x00,0x00, 0x87,0x16, 0xFF,0xE0, 0x00,0x00,
-0x00,0x01, 0xC0,0x32, 0x72,0x00, 0xE2,0x01, 0x19,0x44, 0xF5,0x02, 0x00,0x00, 0xC0,0x32,
-0x72,0x00, 0xE6,0x01, 0x19,0x4C, 0x20,0x2A, 0x00,0x00, 0x86,0xB6, 0x00,0x04, 0x87,0x16,
-0xFF,0xE4, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE2,0x01, 0x19,0x4D, 0x20,0x2A,
-0x00,0x00, 0xF5,0x02, 0x00,0x01, 0x20,0x2A, 0x00,0x00, 0xE6,0x01, 0x19,0x5D, 0x20,0x2E,
-0x00,0x00, 0xF5,0x82, 0x00,0x01, 0x20,0x2E, 0x00,0x00, 0xE6,0x01, 0x19,0x6C, 0x20,0x26,
-0x00,0x00, 0xF4,0x82, 0x00,0x01, 0x20,0x26, 0x00,0x00, 0xE6,0x01, 0x19,0xA1, 0xF6,0x02,
-0x00,0x01, 0x87,0x16, 0xFF,0xD4, 0xF3,0x06, 0x4A,0x98, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4,
-0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4, 0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6,
-0x00,0x00, 0x97,0x16, 0xFF,0xD8, 0xE0,0x01, 0x1A,0x14, 0x96,0x96, 0xFF,0xDC, 0x27,0x14,
-0x00,0x2C, 0x97,0x13, 0xFF,0xFC, 0x83,0x16, 0xFF,0xC4, 0x00,0x00, 0x00,0x01, 0x93,0x13,
-0xFF,0xFC, 0xF3,0x06, 0x4A,0x98, 0x93,0x13, 0xFF,0xFC, 0x93,0x96, 0xFF,0xCC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x83,0x96, 0xFF,0xCC, 0x20,0x22,
-0x00,0x00, 0xE6,0x01, 0x1A,0x11, 0xF6,0x02, 0x00,0x01, 0x87,0x16, 0xFF,0xD4, 0xF3,0x06,
-0x4A,0x98, 0x76,0xB9, 0x00,0x01, 0xC6,0xB4, 0x70,0x00, 0x76,0xB5, 0x00,0x02, 0xC6,0xB4,
-0x30,0x00, 0x06,0xB4, 0x00,0x14, 0x86,0xB6, 0x00,0x00, 0x97,0x16, 0xFF,0xD8, 0x96,0x96,
-0xFF,0xDC, 0xF7,0x05, 0x4A,0xA0, 0xE0,0x01, 0x1A,0x18, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x00, 0x20,0x32, 0x00,0x00, 0xE6,0x01, 0x1A,0x28, 0xF4,0x82, 0x00,0x01, 0xE0,0x01,
-0x1A,0x80, 0xF4,0x82, 0x00,0x00, 0x86,0x96, 0xFF,0xD8, 0x00,0x00, 0x00,0x01, 0x77,0x35,
-0x00,0x02, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0x00,0x02, 0xF6,0x86, 0x42,0xC8, 0xA6,0x3A,
-0x68,0x02, 0xC7,0x38, 0x68,0x00, 0x75,0x39, 0x00,0x1E, 0x75,0x28, 0xFF,0xE5, 0x05,0xB8,
-0x00,0x02, 0x86,0xAE, 0x00,0x00, 0x07,0x38, 0x00,0x04, 0x97,0x16, 0xFF,0xEC, 0xC6,0x30,
-0x57,0xC0, 0x76,0x30, 0xFF,0xF0, 0x96,0x16, 0xFF,0xF4, 0x75,0xAD, 0x00,0x1E, 0x75,0xAC,
-0xFF,0xE5, 0xC6,0xB4, 0x5F,0xC0, 0x76,0xB4, 0xFF,0xF0, 0x96,0x96, 0xFF,0xF0, 0x20,0x26,
-0x00,0x00, 0xE6,0x01, 0x1A,0x94, 0xF5,0x82, 0x00,0x00, 0xE0,0x01, 0x1B,0x28, 0xF6,0x02,
-0x00,0x00, 0x86,0x96, 0xFF,0xF0, 0x00,0x00, 0x00,0x01, 0xC7,0x34, 0x68,0x00, 0xC4,0x9C,
-0x72,0x00, 0xC0,0x2E, 0x6A,0x00, 0xEC,0x01, 0x1A,0xF4, 0xC5,0x24, 0x00,0x00, 0xC6,0x2C,
-0x00,0x00, 0x87,0x16, 0xFF,0xEC, 0x00,0x00, 0x00,0x01, 0xA6,0xB2, 0x70,0x02, 0x05,0xAC,
-0x00,0x01, 0xC7,0x30, 0x70,0x00, 0x77,0x39, 0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4,
-0x77,0xC0, 0x76,0xB4, 0xFF,0xF0, 0xF6,0xAB, 0x28,0x00, 0x05,0x28, 0x00,0x02, 0x87,0x16,
-0xFF,0xF0, 0x00,0x00, 0x00,0x01, 0xC0,0x2E, 0x72,0x00, 0xEC,0x01, 0x1A,0xB5, 0x06,0x30,
-0x00,0x02, 0xF3,0x02, 0x00,0x01, 0xF3,0x05, 0x76,0xF4, 0xF6,0x02, 0x00,0x01, 0x87,0x16,
-0xFF,0xF0, 0x86,0x9E, 0x00,0x04, 0xC7,0x38, 0x70,0x00, 0xC7,0x38, 0x48,0x00, 0xC6,0xB4,
-0x70,0x00, 0x87,0x16, 0xFF,0xF4, 0x06,0xB4, 0x00,0x20, 0x97,0x02, 0xFF,0x6C, 0x94,0x82,
-0xFF,0x50, 0x96,0x82, 0xFF,0x58, 0x20,0x32, 0x00,0x00, 0xE6,0x01, 0x1C,0x6C, 0x00,0x00,
-0x00,0x01, 0xF7,0x04, 0x76,0x5C, 0xF5,0x84, 0x76,0xF8, 0x07,0x38, 0x00,0x01, 0xF7,0x05,
-0x76,0x5C, 0xF7,0x04, 0x76,0x5C, 0x20,0x2E, 0x00,0x21, 0xE2,0x01, 0x1B,0x8C, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x32, 0x00,0x44, 0xE6,0x01, 0x1B,0x78, 0xB5,0xBA,
-0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF3,0x02, 0x00,0x22, 0xF3,0x05, 0x76,0xF8, 0xF3,0x04,
-0x77,0x00, 0xE0,0x01, 0x1B,0x90, 0xF3,0x05, 0x76,0xFC, 0xF0,0x05, 0x76,0xFC, 0xF7,0x04,
-0x75,0xF8, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x1B,0xCD, 0xF6,0x86,
-0x2C,0x28, 0xF7,0x04, 0x2D,0x38, 0x00,0x00, 0x00,0x01, 0x06,0x38, 0x00,0x01, 0xF6,0x05,
-0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0F, 0x20,0x32, 0x00,0x44, 0xE6,0x01,
-0x1B,0xCC, 0xB3,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0xF7,0x04, 0x76,0x08, 0xF6,0x84,
-0x76,0x00, 0x07,0x38, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0xE6,0x01, 0x1B,0xE8, 0xF7,0x05,
-0x76,0x08, 0xF0,0x05, 0x76,0x08, 0xF6,0x84, 0x76,0x08, 0xF7,0x04, 0x76,0x04, 0xF0,0x05,
-0x75,0xF8, 0xF6,0x06, 0x75,0xF8, 0xC0,0x36, 0x72,0x00, 0x47,0x0C, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x01, 0x1C,0x15, 0xF7,0x05, 0x75,0xFC, 0xE0,0x01, 0x1C,0x24, 0xF7,0x02,
-0x00,0x00, 0x77,0x35, 0x00,0x02, 0xC7,0x38, 0x60,0x00, 0x87,0x3A, 0x00,0x18, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x1C,0x65, 0xF7,0x05, 0x76,0x60, 0xF7,0x04,
-0x2D,0x38, 0xF3,0x06, 0x72,0xA4, 0xF3,0x05, 0x76,0x48, 0xF6,0x86, 0x2C,0x28, 0x06,0x38,
-0x00,0x01, 0xF6,0x05, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0xF3,0x02, 0x00,0x0E, 0x20,0x32,
-0x00,0x44, 0xE6,0x01, 0x1C,0x74, 0xB3,0x3A, 0x68,0x02, 0xE0,0x01, 0x1C,0x74, 0xF0,0x05,
-0x2D,0x38, 0xE0,0x01, 0x1C,0x70, 0xF3,0x06, 0x72,0x18, 0xF3,0x06, 0x73,0x30, 0xF3,0x05,
-0x76,0x48, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06,
-0x76,0x48, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x72,0x18, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x76,0x48, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x72,0xA4, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x76,0x48, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x73,0x30, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x76,0x48, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x73,0xBC, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06,
-0x76,0x48, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06, 0x74,0x48, 0x97,0x13, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x76,0x48, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x74,0xD4, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x76,0x48, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x75,0x60, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF6,0x86,
-0x76,0x68, 0x96,0x93, 0xFF,0xFC, 0xF6,0x86, 0x77,0x04, 0x96,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93, 0xFF,0xFC, 0xF6,0x86, 0x1D,0xD4, 0x96,0x93,
-0xFF,0xFC, 0x90,0x13, 0xFF,0xFC, 0xF6,0x86, 0x76,0x68, 0x96,0x93, 0xFF,0xFC, 0x07,0x88,
-0x00,0x08, 0xE0,0x00, 0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF7,0x02, 0x00,0x22, 0xF7,0x05,
-0x76,0xF4, 0xF7,0x05, 0x76,0xF8, 0xF0,0x05, 0x76,0xFC, 0xF0,0x05, 0x77,0x00, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04, 0x76,0xF4, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x22, 0xE6,0x01, 0x1E,0x01, 0x00,0x00, 0x00,0x01, 0x97,0x13,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x84, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x77,0x04, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x76,0x68, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF6,0x86, 0x78,0x10, 0x96,0x93, 0xFF,0xFC, 0xF6,0x86,
-0x78,0xA4, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF6,0x86, 0x1F,0xBC, 0x96,0x93, 0xFF,0xFC, 0xF6,0x82, 0x00,0x14, 0x96,0x93,
-0xFF,0xFC, 0xF6,0x86, 0x78,0x10, 0x96,0x93, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0xF0,0x05, 0x78,0x9C, 0x90,0x02, 0xFF,0x34, 0xF7,0x02,
-0x7F,0xFF, 0xF7,0x05, 0x78,0xA0, 0x97,0x02, 0xFF,0x30, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF6,0x04, 0x78,0x9C, 0x87,0x16, 0x00,0x00, 0x84,0x96,
-0x00,0x08, 0xF5,0x86, 0x77,0x10, 0x87,0x3A, 0x00,0x08, 0xF6,0x86, 0x21,0x8C, 0x75,0x39,
-0x00,0x04, 0x77,0x39, 0x00,0x02, 0xA7,0x3A, 0x68,0x02, 0x20,0x32, 0x00,0x00, 0xC6,0xA8,
-0x58,0x00, 0x84,0x16, 0x00,0x04, 0xC6,0x30, 0x75,0x80, 0x94,0x36, 0x00,0x04, 0xB4,0xAA,
-0x58,0x02, 0x87,0x36, 0x00,0x08, 0xF6,0x05, 0x78,0x9C, 0x07,0x38, 0x00,0x01, 0xE6,0x01,
-0x1F,0x2D, 0x97,0x36, 0x00,0x08, 0x87,0x02, 0xFF,0x30, 0x00,0x00, 0x00,0x01, 0xC0,0x3A,
-0x4A,0x00, 0xEE,0x01, 0x1F,0x35, 0x00,0x00, 0x00,0x01, 0xF4,0x85, 0x78,0xA0, 0x94,0x82,
-0xFF,0x30, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x96,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x87,0x2E, 0x00,0x08, 0xF6,0x86, 0x21,0x8C, 0x77,0x39,
-0x00,0x02, 0xA7,0x3A, 0x68,0x02, 0xF6,0x04, 0x78,0x9C, 0xC7,0x04, 0x76,0x00, 0x86,0xAE,
-0x00,0x08, 0xC6,0x30, 0x74,0x00, 0xF7,0x06, 0x77,0x10, 0xF6,0x05, 0x78,0x9C, 0x76,0xB5,
-0x00,0x04, 0xC6,0xB4, 0x70,0x00, 0x87,0x36, 0x00,0x08, 0x20,0x32, 0x00,0x00, 0x07,0x38,
-0x00,0x01, 0xE6,0x01, 0x1F,0xA8, 0x97,0x36, 0x00,0x08, 0xF7,0x02, 0x7F,0xFF, 0xF7,0x05,
-0x78,0xA0, 0x97,0x02, 0xFF,0x30, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0x22,0x10, 0x00,0x08, 0xF7,0x04, 0x78,0x9C, 0x00,0x00, 0x00,0x01, 0x20,0x3A,
-0x00,0x00, 0xE6,0x01, 0x20,0xD1, 0xF6,0x02, 0x7F,0xFF, 0x96,0x16, 0xFF,0xF4, 0xF6,0x84,
-0x2D,0x40, 0xF6,0x06, 0x77,0x10, 0x26,0xB4, 0x00,0x01, 0x77,0x35, 0x00,0x04, 0xC4,0xB8,
-0x60,0x00, 0xC3,0x38, 0x00,0x00, 0x74,0x35, 0x00,0x02, 0xF6,0x06, 0x77,0x10, 0xC0,0x26,
-0x62,0x00, 0xEC,0x01, 0x20,0xC1, 0xF6,0x06, 0x21,0x8C, 0xF3,0x84, 0x78,0x9C, 0xA7,0x22,
-0x60,0x02, 0x00,0x00, 0x00,0x01, 0xC0,0x1E, 0x74,0x00, 0xE6,0x01, 0x20,0xB1, 0x00,0x00,
-0x00,0x01, 0x86,0xA6, 0x00,0x00, 0xF7,0x04, 0x78,0xA0, 0x00,0x00, 0x00,0x01, 0xC6,0xB4,
-0x72,0x00, 0x20,0x36, 0x00,0x00, 0xEE,0x01, 0x20,0x98, 0x96,0xA6, 0x00,0x00, 0xF7,0x04,
-0x2D,0x38, 0xF6,0x06, 0x77,0x10, 0xC5,0x18, 0x60,0x00, 0xF6,0x86, 0x2C,0x28, 0x86,0x2A,
-0x00,0x04, 0x05,0xB8, 0x00,0x01, 0xF5,0x85, 0x2D,0x38, 0x77,0x39, 0x00,0x02, 0x20,0x2E,
-0x00,0x44, 0xE6,0x01, 0x20,0x70, 0xB6,0x3A, 0x68,0x02, 0xF0,0x05, 0x2D,0x38, 0x86,0x2A,
-0x00,0x08, 0x00,0x00, 0x00,0x01, 0x96,0x2A, 0x00,0x0C, 0xF6,0x06, 0x21,0x8C, 0xA7,0x22,
-0x60,0x02, 0x00,0x00, 0x00,0x01, 0xC7,0x04, 0x76,0x00, 0xC7,0x1C, 0x74,0x00, 0xE0,0x01,
-0x20,0xB0, 0xF7,0x05, 0x78,0x9C, 0x86,0x16, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x62,0x00, 0xEC,0x01, 0x20,0xB0, 0x00,0x00, 0x00,0x01, 0x96,0x96, 0xFF,0xF4, 0x24,0xA4,
-0x00,0x10, 0x23,0x18, 0x00,0x10, 0xE0,0x01, 0x1F,0xFC, 0x24,0x20, 0x00,0x04, 0x86,0x16,
-0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0xF6,0x05, 0x78,0xA0, 0x96,0x02, 0xFF,0x30, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x87,0x16, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x87,0x3A, 0x00,0x08, 0xF6,0x86, 0x77,0x10, 0x77,0x39, 0x00,0x04, 0xC7,0x38,
-0x68,0x00, 0x86,0xBA, 0x00,0x0C, 0x87,0x3A, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0x44,0x0C, 0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x04, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF7,0x02, 0x00,0x0F, 0x20,0x3A, 0x00,0x00, 0xEC,0x01, 0x21,0x5D, 0xF6,0x86,
-0x77,0x18, 0x90,0x36, 0x00,0x00, 0x27,0x38, 0x00,0x01, 0xC6,0x04, 0x00,0x00, 0xC0,0x3A,
-0x62,0x00, 0xE6,0x01, 0x21,0x44, 0x06,0xB4, 0x00,0x10, 0xF6,0x06, 0x78,0xA4, 0x96,0x13,
-0xFF,0xFC, 0xF6,0x06, 0x78,0x10, 0x96,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0x00,0x01, 0x00,0x00,
-0x00,0x02, 0x00,0x00, 0x00,0x04, 0x00,0x00, 0x00,0x08, 0x00,0x00, 0x00,0x10, 0x00,0x00,
-0x00,0x20, 0x00,0x00, 0x00,0x40, 0x00,0x00, 0x00,0x80, 0x00,0x00, 0x01,0x00, 0x00,0x00,
-0x02,0x00, 0x00,0x00, 0x04,0x00, 0x00,0x00, 0x08,0x00, 0x00,0x00, 0x10,0x00, 0x00,0x00,
-0x20,0x00, 0x00,0x00, 0x40,0x00, 0x00,0x00, 0x80,0x00, 0x00,0x00, 0x00,0x00, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x78,0xB0, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x79,0xCC, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x15,0x48, 0x97,0x93,
-0xFF,0xFC, 0xF7,0x06, 0x22,0x2C, 0x97,0x13, 0xFF,0xFC, 0xF7,0x02, 0x00,0x15, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x78,0xB0, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x16,0x1C, 0x97,0x93, 0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14,
-0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90,
-0x00,0x08, 0xF6,0x84, 0x6F,0x44, 0x00,0x00, 0x00,0x01, 0x87,0x36, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x20,0x3A, 0x00,0x02, 0xE6,0x01, 0x22,0x70, 0xF6,0x02, 0x00,0x00, 0x87,0x36,
-0x0E,0xF4, 0x86,0xB6, 0x0E,0xF8, 0x00,0x00, 0x00,0x01, 0xC0,0x3A, 0x6A,0x00, 0x47,0x0C,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x22,0x78, 0x20,0x32, 0x00,0x00, 0xF6,0x02,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x01, 0x22,0x94, 0x00,0x00, 0x00,0x01, 0xF7,0x04,
-0x32,0xE8, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x22,0xB1, 0xF5,0x82,
-0x03,0xE8, 0x0F,0x81, 0x40,0x00, 0xF7,0x04, 0x79,0xC8, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0xF7,0x05, 0x79,0xC8, 0xF7,0x04, 0x79,0xC8, 0xF5,0x82, 0x03,0xE8, 0x95,0x93,
-0xFF,0xFC, 0xF5,0x82, 0x00,0x15, 0x95,0x93, 0xFF,0xFC, 0xF5,0x86, 0x79,0xCC, 0x95,0x93,
-0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x1E,0xC0, 0x97,0x93, 0xFF,0xFC, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x06, 0x79,0xCC, 0x97,0x13,
-0xFF,0xFC, 0xF7,0x06, 0x78,0xB0, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00,
-0x14,0xF4, 0x97,0x93, 0xFF,0xFC, 0xF7,0x06, 0x79,0xCC, 0x97,0x13, 0xFF,0xFC, 0xF7,0x06,
-0x79,0x3C, 0x97,0x13, 0xFF,0xFC, 0x07,0x88, 0x00,0x08, 0xE0,0x00, 0x14,0xF4, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC1,0x3C, 0x00,0x00, 0x02,0x10, 0x00,0x04, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x0C, 0x85,0x96, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x86,0xAE, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x01,
-0x23,0x84, 0x27,0x14, 0x00,0x0C, 0x87,0x2E, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x01, 0x97,0x2E, 0x00,0x04, 0x87,0x2E, 0x00,0x04, 0xE0,0x01, 0x24,0x34, 0x96,0x96,
-0xFF,0xF4, 0x97,0x13, 0xFF,0xFC, 0x85,0x16, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x95,0x13,
-0xFF,0xFC, 0x95,0x93, 0xFF,0xFC, 0x95,0x96, 0xFF,0xEC, 0x07,0x88, 0x00,0x08, 0xE0,0x01,
-0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xEC, 0x20,0x22, 0x00,0x00, 0xE6,0x01,
-0x24,0x34, 0x00,0x00, 0x00,0x01, 0x86,0xAE, 0x00,0x04, 0x86,0x16, 0xFF,0xF4, 0x00,0x00,
-0x00,0x01, 0xC0,0x36, 0x62,0x00, 0xEE,0x01, 0x24,0x21, 0x77,0x35, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x77,0x39, 0x00,0x02, 0xC6,0xB8, 0x58,0x00, 0x77,0x31, 0x00,0x01, 0xC7,0x38,
-0x60,0x00, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x58,0x00, 0x85,0x36, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x95,0x36, 0x00,0x0C, 0x85,0x36, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x95,0x36,
-0x00,0x10, 0x85,0x36, 0x00,0x08, 0x00,0x00, 0x00,0x01, 0x95,0x36, 0x00,0x14, 0x26,0xB4,
-0x00,0x0C, 0xC0,0x36, 0x72,0x00, 0xEE,0x01, 0x23,0xEC, 0x00,0x00, 0x00,0x01, 0x87,0x2E,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x07,0x38, 0x00,0x01, 0x97,0x2E, 0x00,0x04, 0x87,0x2E,
-0x00,0x04, 0x86,0x96, 0xFF,0xF4, 0x85,0x16, 0x00,0x04, 0x77,0x35, 0x00,0x01, 0xC7,0x38,
-0x68,0x00, 0x77,0x39, 0x00,0x02, 0xC7,0x2C, 0x70,0x00, 0x85,0x2A, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x95,0x3A, 0x00,0x0C, 0x85,0x16, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x85,0x2A,
-0x00,0x04, 0x00,0x00, 0x00,0x01, 0x95,0x3A, 0x00,0x10, 0x85,0x16, 0x00,0x08, 0xF4,0x02,
-0x00,0x01, 0x95,0x3A, 0x00,0x14, 0x96,0xAE, 0x00,0x08, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x0C, 0x85,0x96, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x84,0x2E, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x20,0x22, 0x00,0x00, 0xE6,0x01,
-0x25,0x55, 0x27,0x14, 0x00,0x0C, 0x97,0x13, 0xFF,0xFC, 0x85,0x16, 0x00,0x04, 0x00,0x00,
-0x00,0x01, 0x95,0x13, 0xFF,0xFC, 0x95,0x93, 0xFF,0xFC, 0x95,0x96, 0xFF,0xEC, 0x07,0x88,
-0x00,0x08, 0xE0,0x01, 0x25,0x68, 0x97,0x93, 0xFF,0xFC, 0x85,0x96, 0xFF,0xEC, 0x20,0x22,
-0x00,0x00, 0xE6,0x01, 0x25,0x55, 0x00,0x00, 0x00,0x01, 0x86,0x16, 0xFF,0xF4, 0x00,0x00,
-0x00,0x01, 0x20,0x32, 0x00,0x00, 0xEE,0x01, 0x25,0x45, 0x77,0x31, 0x00,0x01, 0xC6,0xAC,
-0x00,0x00, 0xC7,0x38, 0x60,0x00, 0x77,0x39, 0x00,0x02, 0xC7,0x38, 0x58,0x00, 0x85,0x36,
-0x00,0x18, 0x00,0x00, 0x00,0x01, 0x95,0x36, 0x00,0x0C, 0x85,0x36, 0x00,0x1C, 0x00,0x00,
-0x00,0x01, 0x95,0x36, 0x00,0x10, 0x85,0x36, 0x00,0x20, 0x00,0x00, 0x00,0x01, 0x95,0x36,
-0x00,0x14, 0x06,0xB4, 0x00,0x0C, 0xC0,0x36, 0x72,0x00, 0xEC,0x01, 0x25,0x11, 0x00,0x00,
-0x00,0x01, 0x87,0x2E, 0x00,0x04, 0xF4,0x02, 0x00,0x01, 0x27,0x38, 0x00,0x01, 0x97,0x2E,
-0x00,0x04, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x08, 0x83,0x96, 0x00,0x04, 0x83,0x16, 0x00,0x00, 0xC5,0x00, 0x00,0x00, 0x84,0x1A,
-0x00,0x04, 0xC4,0xA8, 0x00,0x00, 0x94,0x16, 0xFF,0xF4, 0xC0,0x26, 0x42,0x00, 0xE6,0x01,
-0x26,0xD1, 0x00,0x00, 0x00,0x01, 0x83,0x16, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0xC0,0x2A,
-0x32,0x00, 0xE6,0x01, 0x26,0xD1, 0xC7,0x20, 0x4A,0x00, 0x95,0x16, 0xFF,0xF4, 0x76,0xB8,
-0xFF,0xE1, 0xC7,0x38, 0x68,0x00, 0x77,0x39, 0xFF,0xFF, 0xC5,0x24, 0x70,0x00, 0x77,0x29,
-0x00,0x01, 0xC7,0x38, 0x50,0x00, 0x77,0x39, 0x00,0x02, 0x83,0x16, 0x00,0x00, 0x86,0x9E,
-0x00,0x00, 0xC5,0xB8, 0x30,0x00, 0x05,0xAC, 0x00,0x0C, 0x87,0x2E, 0x00,0x00, 0xC6,0x00,
-0x00,0x00, 0xC0,0x36, 0x72,0x00, 0xE6,0x01, 0x26,0x10, 0x20,0x32, 0x00,0x00, 0x86,0x9E,
-0x00,0x04, 0x87,0x2E, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36, 0x72,0x00, 0xE6,0x01,
-0x26,0x10, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32, 0x00,0x00, 0xE6,0x01,
-0x26,0x25, 0x00,0x00, 0x00,0x01, 0xC7,0x00, 0x00,0x00, 0xE0,0x01, 0x26,0x78, 0x20,0x3A,
-0x00,0x00, 0x86,0x9E, 0x00,0x00, 0x87,0x2E, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x01, 0x26,0x5C, 0x00,0x00, 0x00,0x01, 0xE6,0x01, 0x26,0x64, 0x20,0x32,
-0x00,0x00, 0x86,0x9E, 0x00,0x04, 0x87,0x2E, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC0,0x36,
-0x72,0x00, 0xE2,0x01, 0x26,0x65, 0x20,0x32, 0x00,0x00, 0xF6,0x02, 0x00,0x01, 0x20,0x32,
-0x00,0x00, 0x47,0x04, 0xFF,0xFF, 0xE6,0x01, 0x26,0x79, 0x20,0x3A, 0x00,0x00, 0xF7,0x02,
-0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x26,0xB1, 0x20,0x3A, 0x00,0x00, 0xEE,0x01,
-0x26,0xA0, 0x20,0x3A, 0x00,0x01, 0x43,0x04, 0xFF,0xFF, 0xC0,0x3A, 0x32,0x00, 0xE6,0x01,
-0x26,0xC9, 0xC0,0x26, 0x42,0x00, 0xE0,0x01, 0x25,0x90, 0x00,0x00, 0x00,0x01, 0xE6,0x01,
-0x26,0xC1, 0xC0,0x26, 0x42,0x00, 0xE0,0x01, 0x25,0x90, 0x00,0x00, 0x00,0x01, 0x83,0x16,
-0x00,0x08, 0xF4,0x02, 0x00,0x01, 0xE0,0x01, 0x26,0xE0, 0x95,0x1A, 0x00,0x00, 0xE0,0x01,
-0x25,0x8C, 0xC4,0xA8, 0x00,0x00, 0xE0,0x01, 0x25,0x8C, 0xC4,0x28, 0x00,0x00, 0x83,0x16,
-0x00,0x08, 0x00,0x00, 0x00,0x01, 0x94,0x1A, 0x00,0x00, 0xC4,0x00, 0x00,0x00, 0x87,0x96,
-0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x00,0x00, 0x00,0x00, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x85,0x96,
-0x00,0x04, 0x84,0x16, 0x00,0x00, 0x84,0x96, 0x00,0x08, 0xF7,0x02, 0x00,0x03, 0xC6,0xA0,
-0x4D,0x80, 0xC6,0xB6, 0x74,0x00, 0xE6,0x01, 0x27,0x71, 0xC6,0x20, 0x00,0x00, 0x20,0x36,
-0x00,0x02, 0xE6,0x01, 0x27,0xA0, 0xC5,0x20, 0x48,0x00, 0xC7,0x20, 0x48,0x00, 0x27,0x38,
-0x00,0x02, 0xC0,0x22, 0x72,0x00, 0xE2,0x01, 0x27,0x9C, 0xC5,0x38, 0x00,0x00, 0x87,0x2E,
-0x00,0x00, 0x76,0xAD, 0x00,0x1E, 0x76,0xB4, 0xFF,0xE5, 0xC7,0x38, 0x6F,0xC0, 0x77,0x38,
-0xFF,0xF0, 0xF7,0x33, 0x28,0x00, 0x06,0x30, 0x00,0x02, 0xC0,0x32, 0x52,0x00, 0xE2,0x01,
-0x27,0x41, 0x05,0xAC, 0x00,0x02, 0xE0,0x01, 0x27,0xA0, 0xC5,0x20, 0x48,0x00, 0xC7,0x20,
-0x48,0x00, 0x27,0x38, 0x00,0x04, 0xC0,0x22, 0x72,0x00, 0xE2,0x01, 0x27,0xA0, 0xC5,0x20,
-0x48,0x00, 0x83,0xAD, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0x93,0xB1, 0x00,0x04, 0xC0,0x32,
-0x72,0x00, 0xE2,0x01, 0x27,0x85, 0x00,0x00, 0x00,0x01, 0xC5,0x20, 0x48,0x00, 0xC0,0x32,
-0x52,0x00, 0xE4,0x01, 0x27,0xD5, 0x00,0x00, 0x00,0x01, 0x86,0xAE, 0x00,0x00, 0x77,0x2D,
-0x00,0x1E, 0x77,0x38, 0xFF,0xE5, 0xC6,0xB4, 0x77,0xC0, 0x76,0xB5, 0xFF,0xE8, 0xF6,0xB3,
-0x68,0x00, 0x06,0x30, 0x00,0x01, 0xC0,0x32, 0x52,0x00, 0xE4,0x01, 0x27,0xAC, 0x05,0xAC,
-0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x0C, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x84,0x16,
-0x00,0x00, 0x86,0x96, 0x00,0x04, 0x00,0x00, 0x00,0x01, 0xC7,0x22, 0x6D,0x80, 0xE6,0x01,
-0x28,0x10, 0x20,0x36, 0x00,0x00, 0xE0,0x01, 0x28,0x74, 0xC4,0x38, 0x00,0x00, 0xF7,0x02,
-0x00,0x01, 0xEE,0x01, 0x28,0x41, 0xF6,0x02, 0x00,0x00, 0x76,0xB5, 0x00,0x01, 0x20,0x36,
-0x00,0x00, 0xEE,0x01, 0x28,0x1C, 0x77,0x39, 0x00,0x01, 0xE0,0x01, 0x28,0x44, 0x20,0x22,
-0x00,0x00, 0x74,0x21, 0x00,0x01, 0x77,0x38, 0xFF,0xFF, 0x06,0x30, 0x00,0x01, 0x20,0x22,
-0x00,0x00, 0xEE,0x01, 0x28,0x34, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x28,0x71, 0x00,0x00,
-0x00,0x01, 0xC0,0x22, 0x6A,0x00, 0xE4,0x01, 0x28,0x64, 0x00,0x00, 0x00,0x01, 0xC4,0x20,
-0x6A,0x00, 0x77,0x3A, 0xFF,0xFF, 0xE6,0x01, 0x28,0x54, 0x76,0xB4, 0xFF,0xFF, 0xD4,0x20,
-0x07,0x62, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x08, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10,
-0x00,0x04, 0xE0,0x01, 0x28,0xCC, 0xF7,0x06, 0x29,0xDC, 0x86,0xBA, 0x00,0x00, 0x00,0x00,
-0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x01, 0x28,0xC9, 0x00,0x00, 0x00,0x01, 0x97,0x16,
-0xFF,0xF4, 0x07,0x88, 0x00,0x08, 0xC1,0x34, 0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0x87,0x16,
-0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x27,0x38, 0x00,0x04, 0xF6,0x06, 0x29,0xE0, 0xC0,0x3A,
-0x62,0x00, 0xE4,0x01, 0x28,0x9D, 0x00,0x00, 0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96,
-0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93,
-0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0x22,0x10, 0x00,0x04, 0xE0,0x01, 0x29,0x34, 0xF7,0x06,
-0x29,0x98, 0x86,0xBA, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x20,0x36, 0x00,0x00, 0xE6,0x01,
-0x29,0x31, 0x00,0x00, 0x00,0x01, 0x97,0x16, 0xFF,0xF4, 0x07,0x88, 0x00,0x08, 0xC1,0x34,
-0x00,0x00, 0x97,0x93, 0xFF,0xFC, 0x87,0x16, 0xFF,0xF4, 0x00,0x00, 0x00,0x01, 0x07,0x38,
-0x00,0x04, 0xF6,0x06, 0x29,0xE0, 0xC0,0x3A, 0x62,0x00, 0xE4,0x01, 0x29,0x04, 0x00,0x00,
-0x00,0x01, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x92,0x93, 0xFF,0xFC, 0x02,0x90, 0x00,0x08, 0xF7,0x04,
-0x7B,0x50, 0x00,0x00, 0x00,0x01, 0x20,0x3A, 0x00,0x00, 0xE6,0x01, 0x29,0x84, 0xF6,0x82,
-0x00,0x01, 0xF6,0x85, 0x7B,0x50, 0x07,0x88, 0x00,0x08, 0xE0,0x01, 0x28,0xF0, 0x97,0x93,
-0xFF,0xFC, 0x87,0x96, 0xFF,0xFC, 0x82,0x96, 0xFF,0xF8, 0x02,0x14, 0x00,0x00, 0x01,0x3C,
-0x00,0x00, 0x00,0x00, 0x00,0x01, 0x00,0x00, 0x0B,0x4C, 0x00,0x00, 0x00,0x00, 0x00,0x00,
-0x42,0x88, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x5E,0x50, 0x00,0x00, 0x00,0x00, 0x00,0x00,
-0xC7,0xA8, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x0B,0xD0, 0x00,0x00, 0x00,0x00, 0x00,0x01,
-0x1C,0x88, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x1E,0x14, 0x00,0x00, 0x00,0x00, 0x00,0x01,
-0x21,0x2C, 0x00,0x00, 0x00,0x00, 0x00,0x01, 0x22,0xE4, 0x00,0x00, 0x00,0x00, } ;
-
-
-/* This is the LANai data */
-
-static unsigned int __devinitdata lanai4_data_off = 0x94F0; /* half-word offset */
-static unsigned char __devinitdata lanai4_data[20472];
-
-
-#ifdef SYMBOL_DEFINES_COMPILED
-/* These are half-word addresses - NOT byte offsets */
-#define MYRI_GenerateMapVersion      0xBD08
-#define MYRI_MoreToGenerate          0xBD0C
-#define MYRI_GenerateMessage         0xBCEC
-#define MYRI_RelayMapVersion         0xBD04
-#define MYRI_RelayStart              0xBD00
-#define MYRI_RelayDirection          0xBCFC
-#define MYRI_RelayIndex              0xBCF4
-#define MYRI_RelayStop               0xBCF8
-#define MYRI_RelayMessage            0xBCF0
-#define MYRI_BroadcastRelayMessagesSent 0xBD10
-#define MYRI_SendMultiplexGrabbed    0xBD3C
-#define MYRI_HostReceiveItem         0xBD14
-#define MYRI_HostReceiveNumScatters  0xBD50
-#define MYRI_HostReceiveScatterIndex 0xBD44
-#define MYRI_HostReceiveScatterPointer 0xBD4C
-#define MYRI_HostReceiveScatterLength 0xBD48
-#define MYRI_HostReceiveChecksum     0xBD40
-#define MYRI_RouteNumFragments       0xBD60
-#define MYRI_RouteFragment           0xBD5C
-#define MYRI_RouteStamp              0xBD58
-#define MYRI_RoutesSoFar             0xBD64
-#define MYRI_MapVersionChanged       0xBD68
-#define MYRI_map_c                   0xBD54
-#define MYRI_pack_list               0x789C
-#define MYRI_pack_table              0x78BA
-#define MYRI_msg2event               0x7FF6
-#define MYRI_VersionString           0xB7A0
-#define MYRI_SizeofChannel           0xBD80
-#define MYRI_EndOfQueueSpace         0xBD84
-#define MYRI_FreeCode                0xBD78
-#define MYRI_FreeData                0xBD7C
-#define MYRI_Asserting               0xBD6C
-#define MYRI_Version                 0xBD74
-#define MYRI_Processor               0xBD70
-#define MYRI_NetReceive              0xBD8C
-#define MYRI_NetReceiveBuffer        0xBD88
-#define MYRI_MapLength               0xBD9C
-#define MYRI_MapSendAlignment        0xBD98
-#define MYRI_HostReplyLength         0xBDA4
-#define MYRI_HostReplySendAlignment  0xBDA0
-#define MYRI_MapSendMessages         0xBD94
-#define MYRI_bitmask                 0x90C6
-#define MYRI_HostSendFull            0x99C0
-#define MYRI_HostReplies             0xA04C
-#define MYRI_Interrupts              0xBCE4
-#define MYRI_NetReceiveDrops         0xB8DA
-#define MYRI_SendMultiplexDoneEvent  0xBB7A
-#define MYRI_bEvents                 0x96E6
-#define MYRI_bHostReceiveShortcuts   0x9972
-#define MYRI_the_map                 0xB728
-#define MYRI_Channels                0xB7A2
-#define MYRI_bEventIndex             0x9766
-#define MYRI_NoBuffersChannel0       0x9974
-#define MYRI_bShakes                 0x976A
-#define MYRI_MAPPER                  0xA122
-#define MYRI_CORE_timeout_counter    0xA114
-#define MYRI_the_map_is_valid        0xA040
-#define MYRI_bBadScatters            0x9970
-#define MYRI_HostReceiveChannel      0x9960
-#define MYRI_send_space              0xA7B0
-#define MYRI_MapReceiveMessages      0xB8E0
-#define MYRI_wakeup_mask             0xBC4E
-#define MYRI_NetSendBuffer           0xBB30
-#define MYRI_HostReceiveMulticast    0x9968
-#define MYRI_HostSendChannel         0x9A94
-#define MYRI_NetReceiveDmaDone       0xB7FA
-#define MYRI_HostSendChecksum        0x9AAA
-#define MYRI_HostReceiveScatter      0x9914
-#define MYRI_compares                0x9DC8
-#define MYRI_NetSendQueue            0xBAFC
-#define MYRI_HostTable               0xA54C
-#define MYRI_map_h                   0x9DB4
-#define MYRI_HostSendBytes           0x9AA0
-#define MYRI_L3_end_loaded_memory    0xBDB4
-#define MYRI_NetSendBytes            0xBB2A
-#define MYRI_map_space               0xA81C
-#define MYRI_MAP_ACK                 0xA045
-#define MYRI_NetReceiveMisroutes     0xB8D6
-#define MYRI_HostReceiveBytes        0x995C
-#define MYRI_BroadcastRelayIdle      0x95C2
-#define MYRI_HostReceiveIdle         0x9770
-#define MYRI_timing                  0xBC08
-#define MYRI_HostReceive             0x996A
-#define MYRI_routeHandleMessage      0x7732
-#define MYRI_Freses                  0xB7AE
-#define MYRI_NextToPut               0x969C
-#define MYRI_HostSendIdle            0x997A
-#define MYRIedata                    0xBCEC
-#define MYRI_SendingHostReply        0xBAFA
-#define MYRI_timing_period           0xBC50
-#define MYRI_debug                   0xA138
-#define MYRI_NetSendBusy             0xB998
-#define MYRI_routeInitialize         0x6AA0
-#define MYRI_HostReceiveQueue        0x9966
-#define MYRI_bWakes                  0x9768
-#define MYRI_NetReceiveBadLengths    0xB8D0
-#define MYRI_NetReceiveQueue         0xB8E2
-#define MYRI_MapBuffer               0xBAF6
-#define MYRI_MapChecksum             0xA048
-#define MYRI_the_routes_are_valid    0xA042
-#define MYRI_MAPPER_probe_stamp      0xA132
-#define MYRI_memory                  0xA7AC
-#define MYRI_Events                  0x9614
-#define MYRI_switches                0x9DB6
-#define MYRI_Hosts                   0xA7AE
-#define MYRI_HostReceiveGoingToBroadcast 0x98CE
-#define MYRI_NetSendIdle             0xB90C
-#define MYRI_host_reply_space        0xB72C
-#define MYRI_HostReceiveWaitingToBroadcast 0x9888
-#define MYRI_bSetRoutes              0xA11E
-#define MYRI_bSends                  0x976C
-#define MYRI_BroadcastGenerateIdle   0x9536
-#define MYRI_WatchdogOff             0xBC9E
-#define MYRI_TIMER                   0xBC52
-#define MYRI_SendMultiplex           0xBB82
-#define MYRI_HostReplyBuffer         0xBAF8
-#define MYRI_the_new_switch          0xA130
-#define MYRI_current_switch          0xA03A
-#define MYRI_memcpy                  0x937C
-#define MYRI_server                  0x9AF6
-#define MYRI_WatchdogOn              0xBC58
-#define MYRI_NetSendContinuing       0xB952
-#define MYRI_NetReceiveBadChannels   0xB8D2
-#define MYRI_SendMultiplexFreeMachine 0xBB80
-#define MYRI_NetReceiveFlush         0xB840
-#define MYRI_NetSendBroadcasting     0xBAB0
-#define MYRI_looking_for_a_loopback  0x9D6C
-#define MYRI_HostSendGatherPointer   0x9AA8
-#define MYRI_HostSendItem            0x9A96
-#define MYRI_MAP_REQ                 0xA046
-#define MYRI_memory_free_list        0xA160
-#define MYRIend                      0xBDB4
-#define MYRI_MapVersion              0x9DB2
-#define MYRI_client                  0x9AB0
-#define MYRI_HostReceiveBroadcasting 0x9842
-#define MYRIetext                    0x94F0
-#define MYRI_NetSendMapBusy          0xB9DE
-#define MYRI_bRouteMessages          0xA134
-#define MYRI_DmaDirection            0xB7A8
-#define MYRI_SendMultiplexFreeEvent  0xBB7C
-#define MYRI_idle_mapper             0x9B3C
-#define MYRI_NetSend                 0xBB24
-#define MYRI_current_port            0xA03E
-#define MYRI_HostConnectedSwitches   0x9DDA
-#define MYRI_try_loopback            0x9B82
-#define MYRI_the_host_reply_message  0xB72A
-#define MYRI_MAPPER_queue            0x9DD8
-#define MYRI_bHostSendShortcuts      0x9AAC
-#define MYRI_BroadcastGenerate       0x9608
-#define MYRI_DmaFreeEvent            0xB7AC
-#define MYRI_host_timeout_counter    0xA116
-#define MYRI_NetReceiveDma           0xB7B4
-#define MYRI_MAPPER_try_port         0xA12C
-#define MYRI_bcopy                   0x66AA
-#define MYRI_queue_h                 0xBB32
-#define MYRI_bUpdates                0xA120
-#define MYRI_SendMultiplexMachine    0xBB7E
-#define MYRI_MAPPER_repeat           0xA12A
-#define MYRI_the_return_port         0xA038
-#define MYRI_NetReceiveFull          0xB886
-#define MYRI_MyHostTableIndex        0xA7AA
-#define MYRI_CORE                    0xA118
-#define MYRI_I_have_a_map            0xA044
-#define MYRI_bWaiting                0xB7B0
-#define MYRI_NetReceiveOverflows     0xB8D8
-#define MYRI_NumMachines             0x96A0
-#define MYRI_MapMessagesSentCounter  0xB79C
-#define MYRI_HostReceiveBuffer       0x9962
-#define MYRI_HostSendDma             0x9A4C
-#define MYRI_NextToGet               0x969E
-#define MYRI_HostReceiveDmaBusy      0x97B6
-#define MYRI_bUpdateMessages         0xA136
-#define MYRI_try_the_switch          0x9C0E
-#define MYRI_BroadcastRelay          0x960E
-#define MYRI_the_msg                 0xB798
-#define MYRI_bEventsRTC              0x9726
-#define MYRI_HostReceiveMessages     0x995E
-#define MYRI_CURRENT_MSG             0xB79A
-#define MYRI_MAPPER_phase            0xA128
-#define MYRI_HostReceiveDma          0x97FC
-#define MYRI_Watchdog                0xBCE6
-#define MYRI_HostSendEmpty           0x9A92
-#define MYRI_abort                   0x63C6
-#define MYRI_SendMultiplexIdle       0xBB34
-#define MYRI_looking_for_a_switch    0x9C54
-#define MYRI_NetSendMessages         0xBB2C
-#define MYRI_updating                0x9D26
-#define MYRI_BroadcastGenerateSending 0x94F0
-#define MYRI_HostSendBuffer          0x9AA4
-#define MYRI_HostSendMessages        0x9A9E
-#define MYRI_BroadcastRelaySending   0x957C
-#define MYRI_HostSendDmaBusy         0x9A06
-#define MYRI_BroadcastsPending       0xB8CC
-#define MYRI_NetSendMapWaiting       0xBA6A
-#define MYRI_NetReceiveBadTypes      0xB8CE
-#define MYRI_looking_for_hosts       0x9C9A
-#define MYRI_bBadHeader              0x9978
-#define MYRI_HostSendGatherIndex     0x9AA6
-#define MYRI_routeLookup             0x7790
-#define MYRI_NetReceiveMessages      0xB8DE
-#define MYRI_DmaInUse                0xB7AA
-#define MYRI_explores                0x9DB8
-#define MYRI_HostSend                0x9A98
-#define MYRI_DmaResetSpin            0xB7B2
-#define MYRIstart                    0x0000
-#define MYRI_RouteTable              0xA164
-#define MYRI_Machines                0x96A2
-#define MYRI_try_the_host            0x9BC8
-#define MYRI_isr_record              0x976E
-#define MYRI_HostReceiveDrops        0x995A
-#define MYRI_HostReceiveLength       0x9964
-#define MYRI_timers                  0xBB88
-#define MYRI_NetSendWaiting          0xBA24
-#define MYRI_NetSendDrops            0xBB2E
-#define MYRI_comparing_a_switch      0x9CE0
-#define MYRI_OldMapChecksum          0xA04A
-#define MYRI_HostSendQueue           0x9AA2
-#define MYRI_MAPPER_host             0xA12E
-#define MYRI_compare_switch          0xA03C
-#define MYRI_main                    0x80A6
-#define MYRI_NetReceiveBadCrcs       0xB8D4
-#define MYRI_NetReceiveBytes         0xB8DC
-
-#endif /* SYMBOL_DEFINES_COMPILED */
index 08534c0..9a802ad 100644 (file)
@@ -25,6 +25,7 @@ static char version[] =
 #include <linux/dma-mapping.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/firmware.h>
 
 #include <net/dst.h>
 #include <net/arp.h>
@@ -43,7 +44,6 @@ static char version[] =
 #include <asm/irq.h>
 
 #include "myri_sbus.h"
-#include "myri_code.h"
 
 /* #define DEBUG_DETECT */
 /* #define DEBUG_IRQ */
@@ -81,6 +81,9 @@ static char version[] =
 #define DHDR(x)
 #endif
 
+/* Firmware name */
+#define FWNAME         "myricom/lanai.bin"
+
 static void myri_reset_off(void __iomem *lp, void __iomem *cregs)
 {
        /* Clear IRQ mask. */
@@ -171,10 +174,11 @@ static int myri_do_handshake(struct myri_eth *mp)
 
 static int __devinit myri_load_lanai(struct myri_eth *mp)
 {
+       const struct firmware   *fw;
        struct net_device       *dev = mp->dev;
        struct myri_shmem __iomem *shmem = mp->shmem;
        void __iomem            *rptr;
-       int                     i;
+       int                     i, lanai4_data_size;
 
        myri_disable_irq(mp->lregs, mp->cregs);
        myri_reset_on(mp->cregs);
@@ -186,13 +190,27 @@ static int __devinit myri_load_lanai(struct myri_eth *mp)
        if (mp->eeprom.cpuvers >= CPUVERS_3_0)
                sbus_writel(mp->eeprom.cval, mp->lregs + LANAI_CVAL);
 
+       i = request_firmware(&fw, FWNAME, &mp->myri_op->dev);
+       if (i) {
+               printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
+                      FWNAME, i);
+               return i;
+       }
+       if (fw->size < 2) {
+               printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
+                      fw->size, FWNAME);
+               release_firmware(fw);
+               return -EINVAL;
+       }
+       lanai4_data_size = fw->data[0] << 8 | fw->data[1];
+
        /* Load executable code. */
-       for (i = 0; i < sizeof(lanai4_code); i++)
-               sbus_writeb(lanai4_code[i], rptr + (lanai4_code_off * 2) + i);
+       for (i = 2; i < fw->size; i++)
+               sbus_writeb(fw->data[i], rptr++);
 
        /* Load data segment. */
-       for (i = 0; i < sizeof(lanai4_data); i++)
-               sbus_writeb(lanai4_data[i], rptr + (lanai4_data_off * 2) + i);
+       for (i = 0; i < lanai4_data_size; i++)
+               sbus_writeb(0, rptr++);
 
        /* Set device address. */
        sbus_writeb(0, &shmem->addr[0]);
@@ -228,6 +246,7 @@ static int __devinit myri_load_lanai(struct myri_eth *mp)
        if (mp->eeprom.cpuvers == CPUVERS_4_0)
                sbus_writel(0, mp->lregs + LANAI_VERS);
 
+       release_firmware(fw);
        return i;
 }
 
@@ -1078,7 +1097,10 @@ static int __devinit myri_sbus_probe(struct of_device *op, const struct of_devic
 
        /* Load code onto the LANai. */
        DET(("Loading LANAI firmware\n"));
-       myri_load_lanai(mp);
+       if (myri_load_lanai(mp)) {
+               printk(KERN_ERR "MyriCOM: Cannot Load LANAI firmware.\n");
+               goto err_free_irq;
+       }
 
        if (register_netdev(dev)) {
                printk("MyriCOM: Cannot register device.\n");
@@ -1159,3 +1181,4 @@ module_init(myri_sbus_init);
 module_exit(myri_sbus_exit);
 
 MODULE_LICENSE("GPL");
+MODULE_FIRMWARE(FWNAME);
index 1af4725..aef7728 100644 (file)
@@ -207,19 +207,19 @@ static int nx_set_dma_mask(struct netxen_adapter *adapter, uint8_t revision_id)
 
        adapter->pci_using_dac = 0;
 
-       mask = DMA_32BIT_MASK;
+       mask = DMA_BIT_MASK(32);
        /*
         * Consistent DMA mask is set to 32 bit because it cannot be set to
         * 35 bits. For P3 also leave it at 32 bits for now. Only the rings
         * come off this pool.
         */
-       cmask = DMA_32BIT_MASK;
+       cmask = DMA_BIT_MASK(32);
 
 #ifndef CONFIG_IA64
        if (revision_id >= NX_P3_B0)
-               mask = DMA_39BIT_MASK;
+               mask = DMA_BIT_MASK(39);
        else if (revision_id == NX_P2_C1)
-               mask = DMA_35BIT_MASK;
+               mask = DMA_BIT_MASK(35);
 #endif
        if (pci_set_dma_mask(pdev, mask) == 0 &&
                pci_set_consistent_dma_mask(pdev, cmask) == 0) {
index 02c37e2..2b17453 100644 (file)
@@ -4834,6 +4834,7 @@ static int niu_compute_rbr_cfig_b(struct rx_ring_info *rp, u64 *ret)
 {
        u64 val = 0;
 
+       *ret = 0;
        switch (rp->rbr_block_size) {
        case 4 * 1024:
                val |= (RBR_BLKSIZE_4K << RBR_CFIG_B_BLKSIZE_SHIFT);
@@ -9542,7 +9543,7 @@ static struct niu_parent * __devinit niu_new_parent(struct niu *np,
 
        plat_dev = platform_device_register_simple("niu", niu_parent_index,
                                                   NULL, 0);
-       if (!plat_dev)
+       if (IS_ERR(plat_dev))
                return NULL;
 
        for (i = 0; attr_name(niu_parent_attributes[i]); i++) {
@@ -9889,8 +9890,8 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
                        goto err_out_release_parent;
                }
        }
-       if (err || dma_mask == DMA_32BIT_MASK) {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       if (err || dma_mask == DMA_BIT_MASK(32)) {
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        dev_err(&pdev->dev, PFX "No usable DMA configuration, "
                                "aborting.\n");
index 221b0c4..d531614 100644 (file)
@@ -1973,9 +1973,9 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev,
 
        /* See if we can set the dma mask early on; failure is fatal. */
        if (sizeof(dma_addr_t) == 8 &&
-               !pci_set_dma_mask(pci_dev, DMA_64BIT_MASK)) {
+               !pci_set_dma_mask(pci_dev, DMA_BIT_MASK(64))) {
                using_dac = 1;
-       } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
+       } else if (!pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32))) {
                using_dac = 0;
        } else {
                dev_warn(&pci_dev->dev, "pci_set_dma_mask failed!\n");
index 501a8d7..15b8fe6 100644 (file)
@@ -339,7 +339,7 @@ static int axnet_config(struct pcmcia_device *link)
 {
     struct net_device *dev = link->priv;
     axnet_dev_t *info = PRIV(dev);
-    int i, j, last_ret, last_fn;
+    int i, j, j2, last_ret, last_fn;
 
     DEBUG(0, "axnet_config(0x%p)\n", link);
 
@@ -388,6 +388,8 @@ static int axnet_config(struct pcmcia_device *link)
 
     for (i = 0; i < 32; i++) {
        j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
+       j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
+       if (j == j2) continue;
        if ((j != 0) && (j != 0xffff)) break;
     }
 
@@ -398,6 +400,8 @@ static int axnet_config(struct pcmcia_device *link)
        pcmcia_access_configuration_register(link, &reg);
        for (i = 0; i < 32; i++) {
            j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
+           j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
+           if (j == j2) continue;
            if ((j != 0) && (j != 0xffff)) break;
        }
     }
@@ -1767,6 +1771,9 @@ static void AX88190_init(struct net_device *dev, int startp)
        ei_local->tx1 = ei_local->tx2 = 0;
        ei_local->txing = 0;
 
+       if (info->flags & IS_AX88790)   /* select Internal PHY */
+               outb(0x10, e8390_base + AXNET_GPIO);
+
        if (startp) 
        {
                outb_p(0xff,  e8390_base + EN0_ISR);
index 8b2823c..cadc32c 100644 (file)
@@ -3934,12 +3934,12 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
-       } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+       } else if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
                pci_using_dac = 0;
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        }
 
        if (err) {
index 170d354..c92ced2 100644 (file)
@@ -3726,13 +3726,13 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
        }
 
        pci_set_master(pdev);
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                set_bit(QL_DMA64, &qdev->flags);
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (!err)
-                      err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                      err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        }
 
        if (err) {
index 0a37f99..6f97b47 100644 (file)
@@ -160,6 +160,7 @@ MODULE_AUTHOR("Sten Wang <sten.wang@rdc.com.tw>,"
        "Florian Fainelli <florian@openwrt.org>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("RDC R6040 NAPI PCI FastEthernet driver");
+MODULE_VERSION(DRV_VERSION " " DRV_RELDATE);
 
 /* RX and TX interrupts that we handle */
 #define RX_INTS                        (RX_FIFO_FULL | RX_NO_DESC | RX_FINISH)
@@ -1085,13 +1086,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
                goto err_out;
 
        /* this should always be supported */
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses"
                                "not supported by the card\n");
                goto err_out;
        }
-       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses"
                                "not supported by the card\n");
index e1a638a..0b6e8c8 100644 (file)
@@ -1148,7 +1148,7 @@ static void rtl8169_update_counters(struct net_device *dev)
                return;
 
        RTL_W32(CounterAddrHigh, (u64)paddr >> 32);
-       cmd = (u64)paddr & DMA_32BIT_MASK;
+       cmd = (u64)paddr & DMA_BIT_MASK(32);
        RTL_W32(CounterAddrLow, cmd);
        RTL_W32(CounterAddrLow, cmd | CounterDump);
 
@@ -2046,11 +2046,11 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        tp->cp_cmd = PCIMulRW | RxChkSum;
 
        if ((sizeof(dma_addr_t) > 4) &&
-           !pci_set_dma_mask(pdev, DMA_64BIT_MASK) && use_dac) {
+           !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) && use_dac) {
                tp->cp_cmd |= PCIDAC;
                dev->features |= NETIF_F_HIGHDMA;
        } else {
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc < 0) {
                        if (netif_msg_probe(tp)) {
                                dev_err(&pdev->dev,
@@ -2343,9 +2343,9 @@ static void rtl_set_rx_tx_desc_registers(struct rtl8169_private *tp,
         * Switching from MMIO to I/O access fixes the issue as well.
         */
        RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr) >> 32);
-       RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr) & DMA_32BIT_MASK);
+       RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr) & DMA_BIT_MASK(32));
        RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr) >> 32);
-       RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr) & DMA_32BIT_MASK);
+       RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr) & DMA_BIT_MASK(32));
 }
 
 static u16 rtl_rw_cpluscmd(void __iomem *ioaddr)
index 16868b7..1a4979f 100644 (file)
@@ -7775,18 +7775,18 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
                return ret;
        }
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n");
                dma_flag = TRUE;
                if (pci_set_consistent_dma_mask
-                   (pdev, DMA_64BIT_MASK)) {
+                   (pdev, DMA_BIT_MASK(64))) {
                        DBG_PRINT(ERR_DBG,
                                  "Unable to obtain 64bit DMA for \
                                        consistent allocations\n");
                        pci_disable_device(pdev);
                        return -ENOMEM;
                }
-       } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 32bit DMA\n");
        } else {
                pci_disable_device(pdev);
index c13cbf0..18821f2 100644 (file)
@@ -1427,11 +1427,11 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (unlikely(err < 0))
                goto out_set_dma_mask;
 
-       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (unlikely(err < 0))
                goto out_set_dma_mask;
 
index a973268..55ccd51 100644 (file)
@@ -1467,7 +1467,7 @@ static struct net_device * __devinit sis190_init_board(struct pci_dev *pdev)
                goto err_pci_disable_2;
        }
 
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc < 0) {
                net_probe(tp, KERN_ERR "%s: DMA configuration failed.\n",
                          pci_name(pdev));
index 8a70de7..2d4617b 100644 (file)
@@ -432,7 +432,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
        ret = pci_enable_device(pci_dev);
        if(ret) return ret;
 
-       i = pci_set_dma_mask(pci_dev, DMA_32BIT_MASK);
+       i = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
        if(i){
                printk(KERN_ERR "sis900.c: architecture does not support "
                        "32bit PCI busmaster DMA\n");
index 952d37f..b8978d4 100644 (file)
@@ -3912,12 +3912,12 @@ static int __devinit skge_probe(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                using_dac = 1;
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
-       } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+       } else if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
                using_dac = 0;
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        }
 
        if (err) {
index d01c56e..a2ff9cb 100644 (file)
@@ -4374,16 +4374,16 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
        pci_set_master(pdev);
 
        if (sizeof(dma_addr_t) > sizeof(u32) &&
-           !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
+           !(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))) {
                using_dac = 1;
-               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (err < 0) {
                        dev_err(&pdev->dev, "unable to obtain 64 bit DMA "
                                "for consistent allocations\n");
                        goto err_out_free_regions;
                }
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        dev_err(&pdev->dev, "no usable DMA configuration\n");
                        goto err_out_free_regions;
index 912308e..329f890 100644 (file)
@@ -369,7 +369,7 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
  * MN10300/AM33 configuration
  */
 
-#include <asm/unit/smc91111.h>
+#include <unit/smc91111.h>
 
 #else
 
index af8f60c..eb7db03 100644 (file)
@@ -43,7 +43,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/timer.h>
-#include <linux/version.h>
 #include <linux/bug.h>
 #include <linux/bitops.h>
 #include <linux/irq.h>
@@ -318,7 +317,7 @@ static int smsc911x_mii_read(struct mii_bus *bus, int phyaddr, int regidx)
                        goto out;
                }
 
-       SMSC_WARNING(HW, "Timed out waiting for MII write to finish");
+       SMSC_WARNING(HW, "Timed out waiting for MII read to finish");
        reg = -EIO;
 
 out:
index 5959ae8..60abdb1 100644 (file)
@@ -1598,7 +1598,7 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                goto out_free_netdev_2;
        }
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR "No usable DMA configuration, aborting.\n");
                goto out_free_regions_3;
        }
index c024352..d2dfe0a 100644 (file)
@@ -3042,10 +3042,10 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
         */
        if (pdev->vendor == PCI_VENDOR_ID_SUN &&
            pdev->device == PCI_DEVICE_ID_SUN_GEM &&
-           !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+           !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                pci_using_dac = 1;
        } else {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        printk(KERN_ERR PFX "No usable DMA configuration, "
                               "aborting.\n");
index 7debd1e..7f4a968 100644 (file)
@@ -1941,12 +1941,12 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if ((err = pci_enable_device(pdev)))    /* it trigers interrupt, dunno why. */
                goto err_pci;                   /* it's not a problem though */
 
-       if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) &&
-           !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
+       if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) &&
+           !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) {
                pci_using_dac = 1;
        } else {
-               if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
-                   (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
+               if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) ||
+                   (err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))) {
                        printk(KERN_ERR "tehuti: No usable DMA configuration"
                                        ", aborting\n");
                        goto err_dma;
index dec67e0..4fc875e 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/vmalloc.h>
 #include <linux/firmware.h>
 #include <asm/byteorder.h>
+#include <linux/dma-mapping.h>
 
 /* Compile Time Switches */
 /* start */
 #define READ_REG(pp, reg)         readl(pp->pBdxRegs + reg)
 #define WRITE_REG(pp, reg, val)   writel(val, pp->pBdxRegs + reg)
 
-#ifndef DMA_64BIT_MASK
-#   define DMA_64BIT_MASK  0xffffffffffffffffULL
-#endif
-
-#ifndef DMA_32BIT_MASK
-#   define DMA_32BIT_MASK  0x00000000ffffffffULL
-#endif
-
 #ifndef NET_IP_ALIGN
 #   define NET_IP_ALIGN 2
 #endif
index 437683a..6a736dd 100644 (file)
@@ -4975,7 +4975,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping,
 {
 #if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64)
        if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG)
-               return (((u64) mapping + len) > DMA_40BIT_MASK);
+               return (((u64) mapping + len) > DMA_BIT_MASK(40));
        return 0;
 #else
        return 0;
@@ -13228,17 +13228,17 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
         * do DMA address check in tg3_start_xmit().
         */
        if (tp->tg3_flags2 & TG3_FLG2_IS_5788)
-               persist_dma_mask = dma_mask = DMA_32BIT_MASK;
+               persist_dma_mask = dma_mask = DMA_BIT_MASK(32);
        else if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) {
-               persist_dma_mask = dma_mask = DMA_40BIT_MASK;
+               persist_dma_mask = dma_mask = DMA_BIT_MASK(40);
 #ifdef CONFIG_HIGHMEM
-               dma_mask = DMA_64BIT_MASK;
+               dma_mask = DMA_BIT_MASK(64);
 #endif
        } else
-               persist_dma_mask = dma_mask = DMA_64BIT_MASK;
+               persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
 
        /* Configure DMA attributes. */
-       if (dma_mask > DMA_32BIT_MASK) {
+       if (dma_mask > DMA_BIT_MASK(32)) {
                err = pci_set_dma_mask(pdev, dma_mask);
                if (!err) {
                        dev->features |= NETIF_F_HIGHDMA;
@@ -13251,8 +13251,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
                        }
                }
        }
-       if (err || dma_mask == DMA_32BIT_MASK) {
-               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       if (err || dma_mask == DMA_BIT_MASK(32)) {
+               err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
                        printk(KERN_ERR PFX "No usable DMA configuration, "
                               "aborting.\n");
@@ -13393,8 +13393,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
               (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) != 0);
        printk(KERN_INFO "%s: dma_rwctrl[%08x] dma_mask[%d-bit]\n",
               dev->name, tp->dma_rwctrl,
-              (pdev->dma_mask == DMA_32BIT_MASK) ? 32 :
-               (((u64) pdev->dma_mask == DMA_40BIT_MASK) ? 40 : 64));
+              (pdev->dma_mask == DMA_BIT_MASK(32)) ? 32 :
+               (((u64) pdev->dma_mask == DMA_BIT_MASK(40)) ? 40 : 64));
 
        return 0;
 
index 68b967b..aa69649 100644 (file)
@@ -570,7 +570,7 @@ static int __devinit TLan_probe1(struct pci_dev *pdev,
 
                priv->adapter = &board_info[ent->driver_data];
 
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        printk(KERN_ERR "TLAN: No suitable PCI mapping available.\n");
                        goto err_out_free_dev;
index f309b8f..2e70ee8 100644 (file)
@@ -267,7 +267,7 @@ static int __devinit streamer_init_one(struct pci_dev *pdev,
 #endif
 #endif
 
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                printk(KERN_ERR "%s: No suitable PCI mapping available.\n",
                                dev->name);
index e2c9d0f..f2e6699 100644 (file)
@@ -383,7 +383,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
                return -ENOMEM;
        SET_NETDEV_DEV(dev, &pdev->dev);
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING DRV_NAME
                        ": 32-bit PCI DMA not available.\n");
                err = -ENODEV;
index c227db0..8761a5a 100644 (file)
@@ -282,7 +282,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev,
                return -ENOMEM;
        SET_NETDEV_DEV(dev, &pdev->dev);
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING DRV_NAME ": 32-bit PCI DMA not available.\n");
                err = -ENODEV;
                goto err_out_free;
index c61a01b..264e614 100644 (file)
@@ -375,7 +375,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
 
        irq = pdev->irq;
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING "Winbond-840: Device %s disabled due to DMA limitations.\n",
                       pci_name(pdev));
                return -EIO;
index 9dd4f76..cf25eb4 100644 (file)
@@ -2406,7 +2406,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                goto error_out_disable;
        }
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if(err < 0) {
                printk(ERR_PFX "%s: No usable DMA configuration\n",
                       pci_name(pdev));
index 659654f..f3a2fce 100644 (file)
@@ -1180,7 +1180,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 #if 0
 // dma_supported() is deeply broken on almost all architectures
        // possible with some EHCI controllers
-       if (dma_supported (&udev->dev, DMA_64BIT_MASK))
+       if (dma_supported (&udev->dev, DMA_BIT_MASK(64)))
                net->features |= NETIF_F_HIGHDMA;
 #endif
 
index 880eaf0..45daba7 100644 (file)
@@ -686,7 +686,7 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
                goto err_out;
 
        /* this should always be supported */
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc) {
                printk(KERN_ERR "32-bit PCI DMA addresses not supported by "
                       "the card!?\n");
index a6f1e19..9c82a39 100644 (file)
@@ -575,8 +575,9 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p)
        if (ret)
                return ret;
 
-       vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
-                         dev->dev_addr, dev->addr_len);
+       if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC))
+               vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
+                                 dev->dev_addr, dev->addr_len);
 
        return 0;
 }
@@ -876,11 +877,8 @@ static int virtnet_probe(struct virtio_device *vdev)
                vdev->config->get(vdev,
                                  offsetof(struct virtio_net_config, mac),
                                  dev->dev_addr, dev->addr_len);
-       } else {
+       } else
                random_ether_addr(dev->dev_addr);
-               vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
-                                 dev->dev_addr, dev->addr_len);
-       }
 
        /* Set up our device-specific information */
        vi = netdev_priv(dev);
index 61ef161..b7f08f3 100644 (file)
@@ -43,6 +43,7 @@
 
 #include <linux/if_vlan.h>
 #include <linux/pci.h>
+#include <linux/tcp.h>
 #include <net/ip.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
index 887acb0..8130b79 100644 (file)
@@ -586,8 +586,8 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
           We set both dma_mask and consistent_dma_mask to 28 bits
           and pray pci_alloc_consistent() will use this info. It should
           work on most platforms */
-       if (pci_set_consistent_dma_mask(pdev, DMA_28BIT_MASK) ||
-           pci_set_dma_mask(pdev, DMA_28BIT_MASK)) {
+       if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(28)) ||
+           pci_set_dma_mask(pdev, DMA_BIT_MASK(28))) {
                printk(KERN_ERR "wanXL: No usable DMA configuration\n");
                return -EIO;
        }
@@ -633,8 +633,8 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
        /* FIXME when PCI/DMA subsystems are fixed.
           We set both dma_mask and consistent_dma_mask back to 32 bits
           to indicate the card can do 32-bit DMA addressing */
-       if (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK) ||
-           pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) ||
+           pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR "wanXL: No usable DMA configuration\n");
                wanxl_pci_remove_one(pdev);
                return -EIO;
index fc0897f..f718217 100644 (file)
@@ -1804,8 +1804,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
                return err; /* someone else grabbed it? don't disable it */
        }
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) ||
-           pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
+           pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR "%s (adm8211): No suitable DMA available\n",
                       pci_name(pdev));
                goto err_free_reg;
index 5d57d77..a08bc8a 100644 (file)
@@ -445,7 +445,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
        }
 
        /* XXX 32-bit addressing only */
-       ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (ret) {
                dev_err(&pdev->dev, "32-bit DMA not available\n");
                goto err_dis;
index 0cc804d..e228c1d 100644 (file)
@@ -772,23 +772,23 @@ static u64 supported_dma_mask(struct b43_wldev *dev)
 
        tmp = b43_read32(dev, SSB_TMSHIGH);
        if (tmp & SSB_TMSHIGH_DMA64)
-               return DMA_64BIT_MASK;
+               return DMA_BIT_MASK(64);
        mmio_base = b43_dmacontroller_base(0, 0);
        b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK);
        tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL);
        if (tmp & B43_DMA32_TXADDREXT_MASK)
-               return DMA_32BIT_MASK;
+               return DMA_BIT_MASK(32);
 
-       return DMA_30BIT_MASK;
+       return DMA_BIT_MASK(30);
 }
 
 static enum b43_dmatype dma_mask_to_engine_type(u64 dmamask)
 {
-       if (dmamask == DMA_30BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(30))
                return B43_DMA_30BIT;
-       if (dmamask == DMA_32BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(32))
                return B43_DMA_32BIT;
-       if (dmamask == DMA_64BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(64))
                return B43_DMA_64BIT;
        B43_WARN_ON(1);
        return B43_DMA_30BIT;
@@ -999,13 +999,13 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
                err = ssb_dma_set_mask(dev->dev, mask);
                if (!err)
                        break;
-               if (mask == DMA_64BIT_MASK) {
-                       mask = DMA_32BIT_MASK;
+               if (mask == DMA_BIT_MASK(64)) {
+                       mask = DMA_BIT_MASK(32);
                        fallback = 1;
                        continue;
                }
-               if (mask == DMA_32BIT_MASK) {
-                       mask = DMA_30BIT_MASK;
+               if (mask == DMA_BIT_MASK(32)) {
+                       mask = DMA_BIT_MASK(30);
                        fallback = 1;
                        continue;
                }
index 3649fc3..2f90fb9 100644 (file)
@@ -846,7 +846,7 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
 
        tmp = b43legacy_read32(dev, SSB_TMSHIGH);
        if (tmp & SSB_TMSHIGH_DMA64)
-               return DMA_64BIT_MASK;
+               return DMA_BIT_MASK(64);
        mmio_base = b43legacy_dmacontroller_base(0, 0);
        b43legacy_write32(dev,
                        mmio_base + B43legacy_DMA32_TXCTL,
@@ -854,18 +854,18 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
        tmp = b43legacy_read32(dev, mmio_base +
                               B43legacy_DMA32_TXCTL);
        if (tmp & B43legacy_DMA32_TXADDREXT_MASK)
-               return DMA_32BIT_MASK;
+               return DMA_BIT_MASK(32);
 
-       return DMA_30BIT_MASK;
+       return DMA_BIT_MASK(30);
 }
 
 static enum b43legacy_dmatype dma_mask_to_engine_type(u64 dmamask)
 {
-       if (dmamask == DMA_30BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(30))
                return B43legacy_DMA_30BIT;
-       if (dmamask == DMA_32BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(32))
                return B43legacy_DMA_32BIT;
-       if (dmamask == DMA_64BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(64))
                return B43legacy_DMA_64BIT;
        B43legacy_WARN_ON(1);
        return B43legacy_DMA_30BIT;
@@ -1042,13 +1042,13 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask)
                err = ssb_dma_set_mask(dev->dev, mask);
                if (!err)
                        break;
-               if (mask == DMA_64BIT_MASK) {
-                       mask = DMA_32BIT_MASK;
+               if (mask == DMA_BIT_MASK(64)) {
+                       mask = DMA_BIT_MASK(32);
                        fallback = 1;
                        continue;
                }
-               if (mask == DMA_32BIT_MASK) {
-                       mask = DMA_30BIT_MASK;
+               if (mask == DMA_BIT_MASK(32)) {
+                       mask = DMA_BIT_MASK(30);
                        fallback = 1;
                        continue;
                }
index f4e963b..97e5647 100644 (file)
@@ -6207,7 +6207,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
        pci_set_master(pci_dev);
        pci_set_drvdata(pci_dev, priv);
 
-       err = pci_set_dma_mask(pci_dev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
        if (err) {
                printk(KERN_WARNING DRV_NAME
                       "Error calling pci_set_dma_mask.\n");
index e17a459..bd4dbcf 100644 (file)
@@ -11631,9 +11631,9 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (!err)
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n");
                goto out_pci_disable_device;
index 9d5f97d..ce72928 100644 (file)
@@ -4998,9 +4998,9 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (!err)
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                IWL_WARN(priv, "No suitable DMA available.\n");
                goto out_pci_disable_device;
index 9a72b1e..3087672 100644 (file)
@@ -120,7 +120,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        }
 
        /* enable PCI DMA */
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME);
                goto do_pci_disable_device;
         }
index e616c20..43fa0f8 100644 (file)
@@ -288,7 +288,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
        if (pci_set_mwi(pci_dev))
                ERROR_PROBE("MWI not available.\n");
 
-       if (dma_set_mask(&pci_dev->dev, DMA_32BIT_MASK)) {
+       if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) {
                ERROR_PROBE("PCI DMA not supported.\n");
                retval = -EIO;
                goto exit_disable_device;
index 0cd5fbc..8fdfa4f 100644 (file)
@@ -43,6 +43,7 @@
 #include <linux/timer.h>
 #include <linux/ioport.h>
 #include <linux/major.h>
+#include <linux/interrupt.h>
 
 #include <linux/parport.h>
 #include <linux/parport_pc.h>
@@ -192,7 +193,7 @@ static int parport_config(struct pcmcia_device *link)
 
     p = parport_pc_probe_port(link->io.BasePort1, link->io.BasePort2,
                              link->irq.AssignedIRQ, PARPORT_DMA_NONE,
-                             &link->dev);
+                             &link->dev, IRQF_SHARED);
     if (p == NULL) {
        printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at "
               "0x%3x, irq %u failed\n", link->io.BasePort1,
index 96f3bdf..4e63cc9 100644 (file)
@@ -2170,10 +2170,11 @@ static int parport_dma_probe (struct parport *p)
 static LIST_HEAD(ports_list);
 static DEFINE_SPINLOCK(ports_lock);
 
-struct parport *parport_pc_probe_port (unsigned long int base,
-                                      unsigned long int base_hi,
-                                      int irq, int dma,
-                                      struct device *dev)
+struct parport *parport_pc_probe_port(unsigned long int base,
+                                     unsigned long int base_hi,
+                                     int irq, int dma,
+                                     struct device *dev,
+                                     int irqflags)
 {
        struct parport_pc_private *priv;
        struct parport_operations *ops;
@@ -2194,11 +2195,11 @@ struct parport *parport_pc_probe_port (unsigned long int base,
                dev = &pdev->dev;
        }
 
-       ops = kmalloc(sizeof (struct parport_operations), GFP_KERNEL);
+       ops = kmalloc(sizeof(struct parport_operations), GFP_KERNEL);
        if (!ops)
                goto out1;
 
-       priv = kmalloc (sizeof (struct parport_pc_private), GFP_KERNEL);
+       priv = kmalloc(sizeof(struct parport_pc_private), GFP_KERNEL);
        if (!priv)
                goto out2;
 
@@ -2325,8 +2326,8 @@ struct parport *parport_pc_probe_port (unsigned long int base,
                EPP_res = NULL;
        }
        if (p->irq != PARPORT_IRQ_NONE) {
-               if (request_irq (p->irq, parport_irq_handler,
-                                0, p->name, p)) {
+               if (request_irq(p->irq, parport_irq_handler,
+                                irqflags, p->name, p)) {
                        printk (KERN_WARNING "%s: irq %d in use, "
                                "resorting to polled operation\n",
                                p->name, p->irq);
@@ -2530,7 +2531,7 @@ static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq,
         */
        release_resource(base_res);
        if (parport_pc_probe_port (ite8872_lpt, ite8872_lpthi,
-                                  irq, PARPORT_DMA_NONE, &pdev->dev)) {
+                                  irq, PARPORT_DMA_NONE, &pdev->dev, 0)) {
                printk (KERN_INFO
                        "parport_pc: ITE 8872 parallel port: io=0x%X",
                        ite8872_lpt);
@@ -2713,7 +2714,7 @@ static int __devinit sio_via_probe (struct pci_dev *pdev, int autoirq,
        }
 
        /* finally, do the probe with values obtained */
-       if (parport_pc_probe_port (port1, port2, irq, dma, &pdev->dev)) {
+       if (parport_pc_probe_port (port1, port2, irq, dma, &pdev->dev, 0)) {
                printk (KERN_INFO
                        "parport_pc: VIA parallel port: io=0x%X", port1);
                if (irq != PARPORT_IRQ_NONE)
@@ -3018,6 +3019,7 @@ static int parport_pc_pci_probe (struct pci_dev *dev,
        for (n = 0; n < cards[i].numports; n++) {
                int lo = cards[i].addr[n].lo;
                int hi = cards[i].addr[n].hi;
+               int irq;
                unsigned long io_lo, io_hi;
                io_lo = pci_resource_start (dev, lo);
                io_hi = 0;
@@ -3028,13 +3030,25 @@ static int parport_pc_pci_probe (struct pci_dev *dev,
                                         "hi" as an offset (see SYBA
                                         def.) */
                /* TODO: test if sharing interrupts works */
-               printk (KERN_DEBUG "PCI parallel port detected: %04x:%04x, "
-                       "I/O at %#lx(%#lx)\n",
-                       parport_pc_pci_tbl[i + last_sio].vendor,
-                       parport_pc_pci_tbl[i + last_sio].device, io_lo, io_hi);
+               irq = dev->irq;
+               if (irq == IRQ_NONE) {
+                       printk (KERN_DEBUG
+       "PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx)\n",
+                               parport_pc_pci_tbl[i + last_sio].vendor,
+                               parport_pc_pci_tbl[i + last_sio].device,
+                               io_lo, io_hi);
+                       irq = PARPORT_IRQ_NONE;
+               } else {
+                       printk (KERN_DEBUG
+       "PCI parallel port detected: %04x:%04x, I/O at %#lx(%#lx), IRQ %d\n",
+                               parport_pc_pci_tbl[i + last_sio].vendor,
+                               parport_pc_pci_tbl[i + last_sio].device,
+                               io_lo, io_hi, irq);
+               }
                data->ports[count] =
-                       parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE,
-                                              PARPORT_DMA_NONE, &dev->dev);
+                       parport_pc_probe_port(io_lo, io_hi, irq,
+                                              PARPORT_DMA_NONE, &dev->dev,
+                                              IRQF_SHARED);
                if (data->ports[count])
                        count++;
        }
@@ -3143,7 +3157,8 @@ static int parport_pc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id
                dma = PARPORT_DMA_NONE;
 
        dev_info(&dev->dev, "reported by %s\n", dev->protocol->name);
-       if (!(pdata = parport_pc_probe_port (io_lo, io_hi, irq, dma, &dev->dev)))
+       if (!(pdata = parport_pc_probe_port(io_lo, io_hi,
+                                       irq, dma, &dev->dev, 0)))
                return -ENODEV;
 
        pnp_set_drvdata(dev,pdata);
@@ -3192,11 +3207,11 @@ parport_pc_find_isa_ports (int autoirq, int autodma)
 {
        int count = 0;
 
-       if (parport_pc_probe_port(0x3bc, 0x7bc, autoirq, autodma, NULL))
+       if (parport_pc_probe_port(0x3bc, 0x7bc, autoirq, autodma, NULL, 0))
                count++;
-       if (parport_pc_probe_port(0x378, 0x778, autoirq, autodma, NULL))
+       if (parport_pc_probe_port(0x378, 0x778, autoirq, autodma, NULL, 0))
                count++;
-       if (parport_pc_probe_port(0x278, 0x678, autoirq, autodma, NULL))
+       if (parport_pc_probe_port(0x278, 0x678, autoirq, autodma, NULL, 0))
                count++;
 
        return count;
@@ -3481,7 +3496,7 @@ static int __init parport_pc_init(void)
                        if ((io_hi[i]) == PARPORT_IOHI_AUTO)
                               io_hi[i] = 0x400 + io[i];
                        parport_pc_probe_port(io[i], io_hi[i],
-                                                 irqval[i], dmaval[i], NULL);
+                                         irqval[i], dmaval[i], NULL, 0);
                }
        } else
                parport_pc_find_ports (irqval[0], dmaval[0]);
index f349211..c3bb84a 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/pci.h>
+#include <linux/interrupt.h>
 #include <linux/parport.h>
 #include <linux/parport_pc.h>
 #include <linux/8250_pci.h>
@@ -311,6 +312,7 @@ static int __devinit parport_register (struct pci_dev *dev,
                int lo = card->addr[n].lo;
                int hi = card->addr[n].hi;
                unsigned long io_lo, io_hi;
+               int irq;
 
                if (priv->num_par == ARRAY_SIZE (priv->port)) {
                        printk (KERN_WARNING
@@ -329,10 +331,20 @@ static int __devinit parport_register (struct pci_dev *dev,
                                         "hi" as an offset (see SYBA
                                         def.) */
                /* TODO: test if sharing interrupts works */
-               dev_dbg(&dev->dev, "PCI parallel port detected: I/O at "
-                       "%#lx(%#lx)\n", io_lo, io_hi);
-               port = parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE,
-                                             PARPORT_DMA_NONE, &dev->dev);
+               irq = dev->irq;
+               if (irq == IRQ_NONE) {
+                       dev_dbg(&dev->dev,
+                       "PCI parallel port detected: I/O at %#lx(%#lx)\n",
+                               io_lo, io_hi);
+                       irq = PARPORT_IRQ_NONE;
+               } else {
+                       dev_dbg(&dev->dev,
+               "PCI parallel port detected: I/O at %#lx(%#lx), IRQ %d\n",
+                               io_lo, io_hi, irq);
+                       irq = PARPORT_IRQ_NONE;
+               }
+               port = parport_pc_probe_port (io_lo, io_hi, irq,
+                             PARPORT_DMA_NONE, &dev->dev, IRQF_SHARED);
                if (port) {
                        priv->port[priv->num_par++] = port;
                        success = 1;
index 3814447..64dd7df 100644 (file)
@@ -356,7 +356,8 @@ int pci_vpd_truncate(struct pci_dev *dev, size_t size)
                return -EINVAL;
 
        dev->vpd->len = size;
-       dev->vpd->attr->size = size;
+       if (dev->vpd->attr)
+               dev->vpd->attr->size = size;
 
        return 0;
 }
index 68f91a2..97a8194 100644 (file)
@@ -184,7 +184,7 @@ void pci_enable_bridges(struct pci_bus *bus)
 
        list_for_each_entry(dev, &bus->devices, bus_list) {
                if (dev->subordinate) {
-                       if (atomic_read(&dev->enable_cnt) == 0) {
+                       if (!pci_is_enabled(dev)) {
                                retval = pci_enable_device(dev);
                                pci_set_master(dev);
                        }
index d313039..25a00ce 100644 (file)
@@ -180,6 +180,7 @@ dmar_parse_one_drhd(struct acpi_dmar_header *header)
        dmaru->hdr = header;
        drhd = (struct acpi_dmar_hardware_unit *)header;
        dmaru->reg_base_addr = drhd->address;
+       dmaru->segment = drhd->segment;
        dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */
 
        ret = alloc_iommu(dmaru);
@@ -790,14 +791,41 @@ end:
 }
 
 /*
+ * Enable queued invalidation.
+ */
+static void __dmar_enable_qi(struct intel_iommu *iommu)
+{
+       u32 cmd, sts;
+       unsigned long flags;
+       struct q_inval *qi = iommu->qi;
+
+       qi->free_head = qi->free_tail = 0;
+       qi->free_cnt = QI_LENGTH;
+
+       spin_lock_irqsave(&iommu->register_lock, flags);
+
+       /* write zero to the tail reg */
+       writel(0, iommu->reg + DMAR_IQT_REG);
+
+       dmar_writeq(iommu->reg + DMAR_IQA_REG, virt_to_phys(qi->desc));
+
+       cmd = iommu->gcmd | DMA_GCMD_QIE;
+       iommu->gcmd |= DMA_GCMD_QIE;
+       writel(cmd, iommu->reg + DMAR_GCMD_REG);
+
+       /* Make sure hardware complete it */
+       IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, readl, (sts & DMA_GSTS_QIES), sts);
+
+       spin_unlock_irqrestore(&iommu->register_lock, flags);
+}
+
+/*
  * Enable Queued Invalidation interface. This is a must to support
  * interrupt-remapping. Also used by DMA-remapping, which replaces
  * register based IOTLB invalidation.
  */
 int dmar_enable_qi(struct intel_iommu *iommu)
 {
-       u32 cmd, sts;
-       unsigned long flags;
        struct q_inval *qi;
 
        if (!ecap_qis(iommu->ecap))
@@ -835,19 +863,7 @@ int dmar_enable_qi(struct intel_iommu *iommu)
 
        spin_lock_init(&qi->q_lock);
 
-       spin_lock_irqsave(&iommu->register_lock, flags);
-       /* write zero to the tail reg */
-       writel(0, iommu->reg + DMAR_IQT_REG);
-
-       dmar_writeq(iommu->reg + DMAR_IQA_REG, virt_to_phys(qi->desc));
-
-       cmd = iommu->gcmd | DMA_GCMD_QIE;
-       iommu->gcmd |= DMA_GCMD_QIE;
-       writel(cmd, iommu->reg + DMAR_GCMD_REG);
-
-       /* Make sure hardware complete it */
-       IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, readl, (sts & DMA_GSTS_QIES), sts);
-       spin_unlock_irqrestore(&iommu->register_lock, flags);
+       __dmar_enable_qi(iommu);
 
        return 0;
 }
@@ -1102,3 +1118,28 @@ int __init enable_drhd_fault_handling(void)
 
        return 0;
 }
+
+/*
+ * Re-enable Queued Invalidation interface.
+ */
+int dmar_reenable_qi(struct intel_iommu *iommu)
+{
+       if (!ecap_qis(iommu->ecap))
+               return -ENOENT;
+
+       if (!iommu->qi)
+               return -ENOENT;
+
+       /*
+        * First disable queued invalidation.
+        */
+       dmar_disable_qi(iommu);
+       /*
+        * Then enable queued invalidation again. Since there is no pending
+        * invalidation requests now, it's safe to re-enable queued
+        * invalidation.
+        */
+       __dmar_enable_qi(iommu);
+
+       return 0;
+}
index 803d9dd..a33794d 100644 (file)
@@ -38,6 +38,8 @@
  *  - The one in acpiphp_bridge has its refcount elevated by pci_get_slot()
  *    when the bridge is scanned and it loses a refcount when the bridge
  *    is removed.
+ *  - When a P2P bridge is present, we elevate the refcount on the subordinate
+ *    bus. It loses the refcount when the the driver unloads.
  */
 
 #include <linux/init.h>
@@ -440,6 +442,12 @@ static void add_p2p_bridge(acpi_handle *handle, struct pci_dev *pci_dev)
                goto err;
        }
 
+       /*
+        * Grab a ref to the subordinate PCI bus in case the bus is
+        * removed via PCI core logical hotplug. The ref pins the bus
+        * (which we access during module unload).
+        */
+       get_device(&bridge->pci_bus->dev);
        spin_lock_init(&bridge->res_lock);
 
        init_bridge_misc(bridge);
@@ -619,6 +627,12 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
                slot = next;
        }
 
+       /*
+        * Only P2P bridges have a pci_dev
+        */
+       if (bridge->pci_dev)
+               put_device(&bridge->pci_bus->dev);
+
        pci_dev_put(bridge->pci_dev);
        list_del(&bridge->list);
        kfree(bridge);
index 23e56a5..fb3a3f3 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/iova.h>
 #include <linux/iommu.h>
 #include <linux/intel-iommu.h>
+#include <linux/sysdev.h>
 #include <asm/cacheflush.h>
 #include <asm/iommu.h>
 #include "pci.h"
@@ -55,8 +56,8 @@
 #define DOMAIN_MAX_ADDR(gaw) ((((u64)1) << gaw) - 1)
 
 #define IOVA_PFN(addr)         ((addr) >> PAGE_SHIFT)
-#define DMA_32BIT_PFN          IOVA_PFN(DMA_32BIT_MASK)
-#define DMA_64BIT_PFN          IOVA_PFN(DMA_64BIT_MASK)
+#define DMA_32BIT_PFN          IOVA_PFN(DMA_BIT_MASK(32))
+#define DMA_64BIT_PFN          IOVA_PFN(DMA_BIT_MASK(64))
 
 /* global iommu list, set NULL for ignored DMAR units */
 static struct intel_iommu **g_iommus;
@@ -247,7 +248,8 @@ struct dmar_domain {
 struct device_domain_info {
        struct list_head link;  /* link to domain siblings */
        struct list_head global; /* link to global list */
-       u8 bus;                 /* PCI bus numer */
+       int segment;            /* PCI domain */
+       u8 bus;                 /* PCI bus number */
        u8 devfn;               /* PCI devfn number */
        struct pci_dev *dev; /* it's NULL for PCIE-to-PCI bridge */
        struct dmar_domain *domain; /* pointer to domain */
@@ -467,7 +469,7 @@ static void domain_update_iommu_cap(struct dmar_domain *domain)
        domain_update_iommu_snooping(domain);
 }
 
-static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn)
+static struct intel_iommu *device_to_iommu(int segment, u8 bus, u8 devfn)
 {
        struct dmar_drhd_unit *drhd = NULL;
        int i;
@@ -475,12 +477,20 @@ static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn)
        for_each_drhd_unit(drhd) {
                if (drhd->ignored)
                        continue;
+               if (segment != drhd->segment)
+                       continue;
 
-               for (i = 0; i < drhd->devices_cnt; i++)
+               for (i = 0; i < drhd->devices_cnt; i++) {
                        if (drhd->devices[i] &&
                            drhd->devices[i]->bus->number == bus &&
                            drhd->devices[i]->devfn == devfn)
                                return drhd->iommu;
+                       if (drhd->devices[i] &&
+                           drhd->devices[i]->subordinate &&
+                           drhd->devices[i]->subordinate->number <= bus &&
+                           drhd->devices[i]->subordinate->subordinate >= bus)
+                               return drhd->iommu;
+               }
 
                if (drhd->include_all)
                        return drhd->iommu;
@@ -1312,7 +1322,7 @@ static void domain_exit(struct dmar_domain *domain)
 }
 
 static int domain_context_mapping_one(struct dmar_domain *domain,
-               u8 bus, u8 devfn)
+                                     int segment, u8 bus, u8 devfn)
 {
        struct context_entry *context;
        unsigned long flags;
@@ -1327,7 +1337,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
                bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
        BUG_ON(!domain->pgd);
 
-       iommu = device_to_iommu(bus, devfn);
+       iommu = device_to_iommu(segment, bus, devfn);
        if (!iommu)
                return -ENODEV;
 
@@ -1417,8 +1427,8 @@ domain_context_mapping(struct dmar_domain *domain, struct pci_dev *pdev)
        int ret;
        struct pci_dev *tmp, *parent;
 
-       ret = domain_context_mapping_one(domain, pdev->bus->number,
-               pdev->devfn);
+       ret = domain_context_mapping_one(domain, pci_domain_nr(pdev->bus),
+                                        pdev->bus->number, pdev->devfn);
        if (ret)
                return ret;
 
@@ -1429,18 +1439,23 @@ domain_context_mapping(struct dmar_domain *domain, struct pci_dev *pdev)
        /* Secondary interface's bus number and devfn 0 */
        parent = pdev->bus->self;
        while (parent != tmp) {
-               ret = domain_context_mapping_one(domain, parent->bus->number,
-                       parent->devfn);
+               ret = domain_context_mapping_one(domain,
+                                                pci_domain_nr(parent->bus),
+                                                parent->bus->number,
+                                                parent->devfn);
                if (ret)
                        return ret;
                parent = parent->bus->self;
        }
        if (tmp->is_pcie) /* this is a PCIE-to-PCI bridge */
                return domain_context_mapping_one(domain,
-                       tmp->subordinate->number, 0);
+                                       pci_domain_nr(tmp->subordinate),
+                                       tmp->subordinate->number, 0);
        else /* this is a legacy PCI bridge */
                return domain_context_mapping_one(domain,
-                       tmp->bus->number, tmp->devfn);
+                                                 pci_domain_nr(tmp->bus),
+                                                 tmp->bus->number,
+                                                 tmp->devfn);
 }
 
 static int domain_context_mapped(struct pci_dev *pdev)
@@ -1449,12 +1464,12 @@ static int domain_context_mapped(struct pci_dev *pdev)
        struct pci_dev *tmp, *parent;
        struct intel_iommu *iommu;
 
-       iommu = device_to_iommu(pdev->bus->number, pdev->devfn);
+       iommu = device_to_iommu(pci_domain_nr(pdev->bus), pdev->bus->number,
+                               pdev->devfn);
        if (!iommu)
                return -ENODEV;
 
-       ret = device_context_mapped(iommu,
-               pdev->bus->number, pdev->devfn);
+       ret = device_context_mapped(iommu, pdev->bus->number, pdev->devfn);
        if (!ret)
                return ret;
        /* dependent device mapping */
@@ -1465,17 +1480,17 @@ static int domain_context_mapped(struct pci_dev *pdev)
        parent = pdev->bus->self;
        while (parent != tmp) {
                ret = device_context_mapped(iommu, parent->bus->number,
-                       parent->devfn);
+                                           parent->devfn);
                if (!ret)
                        return ret;
                parent = parent->bus->self;
        }
        if (tmp->is_pcie)
-               return device_context_mapped(iommu,
-                       tmp->subordinate->number, 0);
+               return device_context_mapped(iommu, tmp->subordinate->number,
+                                            0);
        else
-               return device_context_mapped(iommu,
-                       tmp->bus->number, tmp->devfn);
+               return device_context_mapped(iommu, tmp->bus->number,
+                                            tmp->devfn);
 }
 
 static int
@@ -1542,7 +1557,7 @@ static void domain_remove_dev_info(struct dmar_domain *domain)
                        info->dev->dev.archdata.iommu = NULL;
                spin_unlock_irqrestore(&device_domain_lock, flags);
 
-               iommu = device_to_iommu(info->bus, info->devfn);
+               iommu = device_to_iommu(info->segment, info->bus, info->devfn);
                iommu_detach_dev(iommu, info->bus, info->devfn);
                free_devinfo_mem(info);
 
@@ -1577,11 +1592,14 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
        struct pci_dev *dev_tmp;
        unsigned long flags;
        int bus = 0, devfn = 0;
+       int segment;
 
        domain = find_domain(pdev);
        if (domain)
                return domain;
 
+       segment = pci_domain_nr(pdev->bus);
+
        dev_tmp = pci_find_upstream_pcie_bridge(pdev);
        if (dev_tmp) {
                if (dev_tmp->is_pcie) {
@@ -1593,7 +1611,8 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
                }
                spin_lock_irqsave(&device_domain_lock, flags);
                list_for_each_entry(info, &device_domain_list, global) {
-                       if (info->bus == bus && info->devfn == devfn) {
+                       if (info->segment == segment &&
+                           info->bus == bus && info->devfn == devfn) {
                                found = info->domain;
                                break;
                        }
@@ -1631,6 +1650,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
                        domain_exit(domain);
                        goto error;
                }
+               info->segment = segment;
                info->bus = bus;
                info->devfn = devfn;
                info->dev = NULL;
@@ -1642,7 +1662,8 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
                found = NULL;
                spin_lock_irqsave(&device_domain_lock, flags);
                list_for_each_entry(tmp, &device_domain_list, global) {
-                       if (tmp->bus == bus && tmp->devfn == devfn) {
+                       if (tmp->segment == segment &&
+                           tmp->bus == bus && tmp->devfn == devfn) {
                                found = tmp->domain;
                                break;
                        }
@@ -1662,6 +1683,7 @@ found_domain:
        info = alloc_devinfo_mem();
        if (!info)
                goto error;
+       info->segment = segment;
        info->bus = pdev->bus->number;
        info->devfn = pdev->devfn;
        info->dev = pdev;
@@ -1946,6 +1968,15 @@ static int __init init_dmars(void)
                }
        }
 
+#ifdef CONFIG_INTR_REMAP
+       if (!intr_remapping_enabled) {
+               ret = enable_intr_remapping(0);
+               if (ret)
+                       printk(KERN_ERR
+                              "IOMMU: enable interrupt remapping failed\n");
+       }
+#endif
+
        /*
         * For each rmrr
         *   for each dev attached to rmrr
@@ -2049,15 +2080,15 @@ __intel_alloc_iova(struct device *dev, struct dmar_domain *domain,
        struct pci_dev *pdev = to_pci_dev(dev);
        struct iova *iova = NULL;
 
-       if (dma_mask <= DMA_32BIT_MASK || dmar_forcedac)
+       if (dma_mask <= DMA_BIT_MASK(32) || dmar_forcedac)
                iova = iommu_alloc_iova(domain, size, dma_mask);
        else {
                /*
                 * First try to allocate an io virtual address in
-                * DMA_32BIT_MASK and if that fails then try allocating
+                * DMA_BIT_MASK(32) and if that fails then try allocating
                 * from higher range
                 */
-               iova = iommu_alloc_iova(domain, size, DMA_32BIT_MASK);
+               iova = iommu_alloc_iova(domain, size, DMA_BIT_MASK(32));
                if (!iova)
                        iova = iommu_alloc_iova(domain, size, dma_mask);
        }
@@ -2597,6 +2628,150 @@ static void __init init_no_remapping_devices(void)
        }
 }
 
+#ifdef CONFIG_SUSPEND
+static int init_iommu_hw(void)
+{
+       struct dmar_drhd_unit *drhd;
+       struct intel_iommu *iommu = NULL;
+
+       for_each_active_iommu(iommu, drhd)
+               if (iommu->qi)
+                       dmar_reenable_qi(iommu);
+
+       for_each_active_iommu(iommu, drhd) {
+               iommu_flush_write_buffer(iommu);
+
+               iommu_set_root_entry(iommu);
+
+               iommu->flush.flush_context(iommu, 0, 0, 0,
+                                               DMA_CCMD_GLOBAL_INVL, 0);
+               iommu->flush.flush_iotlb(iommu, 0, 0, 0,
+                                               DMA_TLB_GLOBAL_FLUSH, 0);
+               iommu_disable_protect_mem_regions(iommu);
+               iommu_enable_translation(iommu);
+       }
+
+       return 0;
+}
+
+static void iommu_flush_all(void)
+{
+       struct dmar_drhd_unit *drhd;
+       struct intel_iommu *iommu;
+
+       for_each_active_iommu(iommu, drhd) {
+               iommu->flush.flush_context(iommu, 0, 0, 0,
+                                               DMA_CCMD_GLOBAL_INVL, 0);
+               iommu->flush.flush_iotlb(iommu, 0, 0, 0,
+                                               DMA_TLB_GLOBAL_FLUSH, 0);
+       }
+}
+
+static int iommu_suspend(struct sys_device *dev, pm_message_t state)
+{
+       struct dmar_drhd_unit *drhd;
+       struct intel_iommu *iommu = NULL;
+       unsigned long flag;
+
+       for_each_active_iommu(iommu, drhd) {
+               iommu->iommu_state = kzalloc(sizeof(u32) * MAX_SR_DMAR_REGS,
+                                                GFP_ATOMIC);
+               if (!iommu->iommu_state)
+                       goto nomem;
+       }
+
+       iommu_flush_all();
+
+       for_each_active_iommu(iommu, drhd) {
+               iommu_disable_translation(iommu);
+
+               spin_lock_irqsave(&iommu->register_lock, flag);
+
+               iommu->iommu_state[SR_DMAR_FECTL_REG] =
+                       readl(iommu->reg + DMAR_FECTL_REG);
+               iommu->iommu_state[SR_DMAR_FEDATA_REG] =
+                       readl(iommu->reg + DMAR_FEDATA_REG);
+               iommu->iommu_state[SR_DMAR_FEADDR_REG] =
+                       readl(iommu->reg + DMAR_FEADDR_REG);
+               iommu->iommu_state[SR_DMAR_FEUADDR_REG] =
+                       readl(iommu->reg + DMAR_FEUADDR_REG);
+
+               spin_unlock_irqrestore(&iommu->register_lock, flag);
+       }
+       return 0;
+
+nomem:
+       for_each_active_iommu(iommu, drhd)
+               kfree(iommu->iommu_state);
+
+       return -ENOMEM;
+}
+
+static int iommu_resume(struct sys_device *dev)
+{
+       struct dmar_drhd_unit *drhd;
+       struct intel_iommu *iommu = NULL;
+       unsigned long flag;
+
+       if (init_iommu_hw()) {
+               WARN(1, "IOMMU setup failed, DMAR can not resume!\n");
+               return -EIO;
+       }
+
+       for_each_active_iommu(iommu, drhd) {
+
+               spin_lock_irqsave(&iommu->register_lock, flag);
+
+               writel(iommu->iommu_state[SR_DMAR_FECTL_REG],
+                       iommu->reg + DMAR_FECTL_REG);
+               writel(iommu->iommu_state[SR_DMAR_FEDATA_REG],
+                       iommu->reg + DMAR_FEDATA_REG);
+               writel(iommu->iommu_state[SR_DMAR_FEADDR_REG],
+                       iommu->reg + DMAR_FEADDR_REG);
+               writel(iommu->iommu_state[SR_DMAR_FEUADDR_REG],
+                       iommu->reg + DMAR_FEUADDR_REG);
+
+               spin_unlock_irqrestore(&iommu->register_lock, flag);
+       }
+
+       for_each_active_iommu(iommu, drhd)
+               kfree(iommu->iommu_state);
+
+       return 0;
+}
+
+static struct sysdev_class iommu_sysclass = {
+       .name           = "iommu",
+       .resume         = iommu_resume,
+       .suspend        = iommu_suspend,
+};
+
+static struct sys_device device_iommu = {
+       .cls    = &iommu_sysclass,
+};
+
+static int __init init_iommu_sysfs(void)
+{
+       int error;
+
+       error = sysdev_class_register(&iommu_sysclass);
+       if (error)
+               return error;
+
+       error = sysdev_register(&device_iommu);
+       if (error)
+               sysdev_class_unregister(&iommu_sysclass);
+
+       return error;
+}
+
+#else
+static int __init init_iommu_sysfs(void)
+{
+       return 0;
+}
+#endif /* CONFIG_PM */
+
 int __init intel_iommu_init(void)
 {
        int ret = 0;
@@ -2632,6 +2807,7 @@ int __init intel_iommu_init(void)
        init_timer(&unmap_timer);
        force_iommu = 1;
        dma_ops = &intel_dma_ops;
+       init_iommu_sysfs();
 
        register_iommu(&intel_iommu_ops);
 
@@ -2648,6 +2824,7 @@ static int vm_domain_add_dev_info(struct dmar_domain *domain,
        if (!info)
                return -ENOMEM;
 
+       info->segment = pci_domain_nr(pdev->bus);
        info->bus = pdev->bus->number;
        info->devfn = pdev->devfn;
        info->dev = pdev;
@@ -2677,15 +2854,15 @@ static void iommu_detach_dependent_devices(struct intel_iommu *iommu,
                parent = pdev->bus->self;
                while (parent != tmp) {
                        iommu_detach_dev(iommu, parent->bus->number,
-                               parent->devfn);
+                                        parent->devfn);
                        parent = parent->bus->self;
                }
                if (tmp->is_pcie) /* this is a PCIE-to-PCI bridge */
                        iommu_detach_dev(iommu,
                                tmp->subordinate->number, 0);
                else /* this is a legacy PCI bridge */
-                       iommu_detach_dev(iommu,
-                               tmp->bus->number, tmp->devfn);
+                       iommu_detach_dev(iommu, tmp->bus->number,
+                                        tmp->devfn);
        }
 }
 
@@ -2698,13 +2875,15 @@ static void vm_domain_remove_one_dev_info(struct dmar_domain *domain,
        int found = 0;
        struct list_head *entry, *tmp;
 
-       iommu = device_to_iommu(pdev->bus->number, pdev->devfn);
+       iommu = device_to_iommu(pci_domain_nr(pdev->bus), pdev->bus->number,
+                               pdev->devfn);
        if (!iommu)
                return;
 
        spin_lock_irqsave(&device_domain_lock, flags);
        list_for_each_safe(entry, tmp, &domain->devices) {
                info = list_entry(entry, struct device_domain_info, link);
+               /* No need to compare PCI domain; it has to be the same */
                if (info->bus == pdev->bus->number &&
                    info->devfn == pdev->devfn) {
                        list_del(&info->link);
@@ -2729,7 +2908,8 @@ static void vm_domain_remove_one_dev_info(struct dmar_domain *domain,
                 * owned by this domain, clear this iommu in iommu_bmp
                 * update iommu count and coherency
                 */
-               if (device_to_iommu(info->bus, info->devfn) == iommu)
+               if (iommu == device_to_iommu(info->segment, info->bus,
+                                           info->devfn))
                        found = 1;
        }
 
@@ -2762,7 +2942,7 @@ static void vm_domain_remove_all_dev_info(struct dmar_domain *domain)
 
                spin_unlock_irqrestore(&device_domain_lock, flags1);
 
-               iommu = device_to_iommu(info->bus, info->devfn);
+               iommu = device_to_iommu(info->segment, info->bus, info->devfn);
                iommu_detach_dev(iommu, info->bus, info->devfn);
                iommu_detach_dependent_devices(iommu, info->dev);
 
@@ -2950,7 +3130,8 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
                }
        }
 
-       iommu = device_to_iommu(pdev->bus->number, pdev->devfn);
+       iommu = device_to_iommu(pci_domain_nr(pdev->bus), pdev->bus->number,
+                               pdev->devfn);
        if (!iommu)
                return -ENODEV;
 
index b041a40..f5e0ea7 100644 (file)
@@ -9,6 +9,7 @@
 #include <asm/cpu.h>
 #include <linux/intel-iommu.h>
 #include "intr_remapping.h"
+#include <acpi/acpi.h>
 
 static struct ioapic_scope ir_ioapic[MAX_IO_APICS];
 static int ir_ioapic_num;
@@ -415,12 +416,27 @@ static void iommu_set_intr_remapping(struct intel_iommu *iommu, int mode)
 
        /* Set interrupt-remapping table pointer */
        cmd = iommu->gcmd | DMA_GCMD_SIRTP;
+       iommu->gcmd |= DMA_GCMD_SIRTP;
        writel(cmd, iommu->reg + DMAR_GCMD_REG);
 
        IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG,
                      readl, (sts & DMA_GSTS_IRTPS), sts);
        spin_unlock_irqrestore(&iommu->register_lock, flags);
 
+       if (mode == 0) {
+               spin_lock_irqsave(&iommu->register_lock, flags);
+
+               /* enable comaptiblity format interrupt pass through */
+               cmd = iommu->gcmd | DMA_GCMD_CFI;
+               iommu->gcmd |= DMA_GCMD_CFI;
+               writel(cmd, iommu->reg + DMAR_GCMD_REG);
+
+               IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG,
+                             readl, (sts & DMA_GSTS_CFIS), sts);
+
+               spin_unlock_irqrestore(&iommu->register_lock, flags);
+       }
+
        /*
         * global invalidation of interrupt entry cache before enabling
         * interrupt-remapping.
@@ -470,7 +486,7 @@ static int setup_intr_remapping(struct intel_iommu *iommu, int mode)
 /*
  * Disable Interrupt Remapping.
  */
-static void disable_intr_remapping(struct intel_iommu *iommu)
+static void iommu_disable_intr_remapping(struct intel_iommu *iommu)
 {
        unsigned long flags;
        u32 sts;
@@ -478,6 +494,12 @@ static void disable_intr_remapping(struct intel_iommu *iommu)
        if (!ecap_ir_support(iommu->ecap))
                return;
 
+       /*
+        * global invalidation of interrupt entry cache before disabling
+        * interrupt-remapping.
+        */
+       qi_global_iec(iommu);
+
        spin_lock_irqsave(&iommu->register_lock, flags);
 
        sts = dmar_readq(iommu->reg + DMAR_GSTS_REG);
@@ -503,6 +525,13 @@ int __init enable_intr_remapping(int eim)
                struct intel_iommu *iommu = drhd->iommu;
 
                /*
+                * If the queued invalidation is already initialized,
+                * shouldn't disable it.
+                */
+               if (iommu->qi)
+                       continue;
+
+               /*
                 * Clear previous faults.
                 */
                dmar_fault(-1, iommu);
@@ -511,7 +540,7 @@ int __init enable_intr_remapping(int eim)
                 * Disable intr remapping and queued invalidation, if already
                 * enabled prior to OS handover.
                 */
-               disable_intr_remapping(iommu);
+               iommu_disable_intr_remapping(iommu);
 
                dmar_disable_qi(iommu);
        }
@@ -639,3 +668,54 @@ int __init parse_ioapics_under_ir(void)
 
        return ir_supported;
 }
+
+void disable_intr_remapping(void)
+{
+       struct dmar_drhd_unit *drhd;
+       struct intel_iommu *iommu = NULL;
+
+       /*
+        * Disable Interrupt-remapping for all the DRHD's now.
+        */
+       for_each_iommu(iommu, drhd) {
+               if (!ecap_ir_support(iommu->ecap))
+                       continue;
+
+               iommu_disable_intr_remapping(iommu);
+       }
+}
+
+int reenable_intr_remapping(int eim)
+{
+       struct dmar_drhd_unit *drhd;
+       int setup = 0;
+       struct intel_iommu *iommu = NULL;
+
+       for_each_iommu(iommu, drhd)
+               if (iommu->qi)
+                       dmar_reenable_qi(iommu);
+
+       /*
+        * Setup Interrupt-remapping for all the DRHD's now.
+        */
+       for_each_iommu(iommu, drhd) {
+               if (!ecap_ir_support(iommu->ecap))
+                       continue;
+
+               /* Set up interrupt remapping for iommu.*/
+               iommu_set_intr_remapping(iommu, eim);
+               setup = 1;
+       }
+
+       if (!setup)
+               goto error;
+
+       return 0;
+
+error:
+       /*
+        * handle error condition gracefully here!
+        */
+       return -1;
+}
+
index 7227efc..b497daa 100644 (file)
@@ -631,6 +631,7 @@ int pci_iov_bus_range(struct pci_bus *bus)
 /**
  * pci_enable_sriov - enable the SR-IOV capability
  * @dev: the PCI device
+ * @nr_virtfn: number of virtual functions to enable
  *
  * Returns 0 on success, or negative on failure.
  */
index e9a8706..a7eb1b4 100644 (file)
@@ -148,7 +148,7 @@ static ssize_t is_enabled_store(struct device *dev,
                return -EPERM;
 
        if (!val) {
-               if (atomic_read(&pdev->enable_cnt) != 0)
+               if (pci_is_enabled(pdev))
                        pci_disable_device(pdev);
                else
                        result = -EIO;
@@ -277,14 +277,10 @@ remove_store(struct device *dev, struct device_attribute *dummy,
 {
        int ret = 0;
        unsigned long val;
-       struct pci_dev *pdev = to_pci_dev(dev);
 
        if (strict_strtoul(buf, 0, &val) < 0)
                return -EINVAL;
 
-       if (pci_is_root_bus(pdev->bus))
-               return -EBUSY;
-
        /* An attribute cannot be unregistered by one of its own methods,
         * so we have to use this roundabout approach.
         */
index 445fb6f..16fd0d4 100644 (file)
@@ -844,7 +844,7 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)
  */
 int pci_reenable_device(struct pci_dev *dev)
 {
-       if (atomic_read(&dev->enable_cnt))
+       if (pci_is_enabled(dev))
                return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1);
        return 0;
 }
@@ -1042,7 +1042,7 @@ static void do_pci_disable_device(struct pci_dev *dev)
  */
 void pci_disable_enabled_device(struct pci_dev *dev)
 {
-       if (atomic_read(&dev->enable_cnt))
+       if (pci_is_enabled(dev))
                do_pci_disable_device(dev);
 }
 
index e2f3dd0..8eb50df 100644 (file)
@@ -1220,7 +1220,7 @@ EXPORT_SYMBOL(pci_scan_bus_parented);
  *
  * Returns the max number of subordinate bus discovered.
  */
-unsigned int __devinit pci_rescan_bus(struct pci_bus *bus)
+unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
 {
        unsigned int max;
        struct pci_dev *dev;
index 9b2f0d9..0254741 100644 (file)
@@ -36,17 +36,18 @@ EXPORT_SYMBOL(pcie_mch_quirk);
 
 #ifdef CONFIG_PCI_QUIRKS
 /*
- * This quirk function disables the device and releases resources
- * which is specified by kernel's boot parameter 'pci=resource_alignment='.
+ * This quirk function disables memory decoding and releases memory resources
+ * of the device specified by kernel's boot parameter 'pci=resource_alignment='.
  * It also rounds up size to specified alignment.
  * Later on, the kernel will assign page-aligned memory resource back
- * to that device.
+ * to the device.
  */
 static void __devinit quirk_resource_alignment(struct pci_dev *dev)
 {
        int i;
        struct resource *r;
        resource_size_t align, size;
+       u16 command;
 
        if (!pci_is_reassigndev(dev))
                return;
@@ -58,8 +59,11 @@ static void __devinit quirk_resource_alignment(struct pci_dev *dev)
                return;
        }
 
-       dev_info(&dev->dev, "Disabling device and release resources.\n");
-       pci_disable_device(dev);
+       dev_info(&dev->dev,
+               "Disabling memory decoding and releasing memory resources.\n");
+       pci_read_config_word(dev, PCI_COMMAND, &command);
+       command &= ~PCI_COMMAND_MEMORY;
+       pci_write_config_word(dev, PCI_COMMAND, command);
 
        align = pci_specified_resource_alignment(dev);
        for (i=0; i < PCI_BRIDGE_RESOURCES; i++) {
@@ -2411,6 +2415,54 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375,
 
 #endif /* CONFIG_PCI_MSI */
 
+#ifdef CONFIG_PCI_IOV
+
+/*
+ * For Intel 82576 SR-IOV NIC, if BIOS doesn't allocate resources for the
+ * SR-IOV BARs, zero the Flash BAR and program the SR-IOV BARs to use the
+ * old Flash Memory Space.
+ */
+static void __devinit quirk_i82576_sriov(struct pci_dev *dev)
+{
+       int pos, flags;
+       u32 bar, start, size;
+
+       if (PAGE_SIZE > 0x10000)
+               return;
+
+       flags = pci_resource_flags(dev, 0);
+       if ((flags & PCI_BASE_ADDRESS_SPACE) !=
+                       PCI_BASE_ADDRESS_SPACE_MEMORY ||
+           (flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) !=
+                       PCI_BASE_ADDRESS_MEM_TYPE_32)
+               return;
+
+       pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV);
+       if (!pos)
+               return;
+
+       pci_read_config_dword(dev, pos + PCI_SRIOV_BAR, &bar);
+       if (bar & PCI_BASE_ADDRESS_MEM_MASK)
+               return;
+
+       start = pci_resource_start(dev, 1);
+       size = pci_resource_len(dev, 1);
+       if (!start || size != 0x400000 || start & (size - 1))
+               return;
+
+       pci_resource_flags(dev, 1) = 0;
+       pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, 0);
+       pci_write_config_dword(dev, pos + PCI_SRIOV_BAR, start);
+       pci_write_config_dword(dev, pos + PCI_SRIOV_BAR + 12, start + size / 2);
+
+       dev_info(&dev->dev, "use Flash Memory Space for SR-IOV BARs\n");
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10c9, quirk_i82576_sriov);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e6, quirk_i82576_sriov);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e7, quirk_i82576_sriov);
+
+#endif /* CONFIG_PCI_IOV */
+
 static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
                          struct pci_fixup *end)
 {
index 334285a..8d9da9d 100644 (file)
@@ -144,7 +144,7 @@ static void pci_setup_bridge(struct pci_bus *bus)
        struct pci_bus_region region;
        u32 l, bu, lu, io_upper16;
 
-       if (!pci_is_root_bus(bus) && bus->is_added)
+       if (pci_is_enabled(bridge))
                return;
 
        dev_info(&bridge->dev, "PCI bridge, secondary bus %04x:%02x\n",
index 45940f3..218b9a1 100644 (file)
@@ -174,8 +174,7 @@ struct fujitsu_hotkey_t {
 
 static struct fujitsu_hotkey_t *fujitsu_hotkey;
 
-static void acpi_fujitsu_hotkey_notify(acpi_handle handle, u32 event,
-                                      void *data);
+static void acpi_fujitsu_hotkey_notify(struct acpi_device *device, u32 event);
 
 #ifdef CONFIG_LEDS_CLASS
 static enum led_brightness logolamp_get(struct led_classdev *cdev);
@@ -203,7 +202,7 @@ struct led_classdev kblamps_led = {
 static u32 dbg_level = 0x03;
 #endif
 
-static void acpi_fujitsu_notify(acpi_handle handle, u32 event, void *data);
+static void acpi_fujitsu_notify(struct acpi_device *device, u32 event);
 
 /* Fujitsu ACPI interface function */
 
@@ -658,7 +657,6 @@ static struct dmi_system_id fujitsu_dmi_table[] = {
 
 static int acpi_fujitsu_add(struct acpi_device *device)
 {
-       acpi_status status;
        acpi_handle handle;
        int result = 0;
        int state = 0;
@@ -673,20 +671,10 @@ static int acpi_fujitsu_add(struct acpi_device *device)
        sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS);
        device->driver_data = fujitsu;
 
-       status = acpi_install_notify_handler(device->handle,
-                                            ACPI_DEVICE_NOTIFY,
-                                            acpi_fujitsu_notify, fujitsu);
-
-       if (ACPI_FAILURE(status)) {
-               printk(KERN_ERR "Error installing notify handler\n");
-               error = -ENODEV;
-               goto err_stop;
-       }
-
        fujitsu->input = input = input_allocate_device();
        if (!input) {
                error = -ENOMEM;
-               goto err_uninstall_notify;
+               goto err_stop;
        }
 
        snprintf(fujitsu->phys, sizeof(fujitsu->phys),
@@ -743,9 +731,6 @@ static int acpi_fujitsu_add(struct acpi_device *device)
 end:
 err_free_input_dev:
        input_free_device(input);
-err_uninstall_notify:
-       acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
-                                  acpi_fujitsu_notify);
 err_stop:
 
        return result;
@@ -753,7 +738,6 @@ err_stop:
 
 static int acpi_fujitsu_remove(struct acpi_device *device, int type)
 {
-       acpi_status status;
        struct fujitsu_t *fujitsu = NULL;
 
        if (!device || !acpi_driver_data(device))
@@ -761,10 +745,6 @@ static int acpi_fujitsu_remove(struct acpi_device *device, int type)
 
        fujitsu = acpi_driver_data(device);
 
-       status = acpi_remove_notify_handler(fujitsu->acpi_handle,
-                                           ACPI_DEVICE_NOTIFY,
-                                           acpi_fujitsu_notify);
-
        if (!device || !acpi_driver_data(device))
                return -EINVAL;
 
@@ -775,7 +755,7 @@ static int acpi_fujitsu_remove(struct acpi_device *device, int type)
 
 /* Brightness notify */
 
-static void acpi_fujitsu_notify(acpi_handle handle, u32 event, void *data)
+static void acpi_fujitsu_notify(struct acpi_device *device, u32 event)
 {
        struct input_dev *input;
        int keycode;
@@ -829,15 +809,12 @@ static void acpi_fujitsu_notify(acpi_handle handle, u32 event, void *data)
                input_report_key(input, keycode, 0);
                input_sync(input);
        }
-
-       return;
 }
 
 /* ACPI device for hotkey handling */
 
 static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
 {
-       acpi_status status;
        acpi_handle handle;
        int result = 0;
        int state = 0;
@@ -854,17 +831,6 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
        sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS);
        device->driver_data = fujitsu_hotkey;
 
-       status = acpi_install_notify_handler(device->handle,
-                                            ACPI_DEVICE_NOTIFY,
-                                            acpi_fujitsu_hotkey_notify,
-                                            fujitsu_hotkey);
-
-       if (ACPI_FAILURE(status)) {
-               printk(KERN_ERR "Error installing notify handler\n");
-               error = -ENODEV;
-               goto err_stop;
-       }
-
        /* kfifo */
        spin_lock_init(&fujitsu_hotkey->fifo_lock);
        fujitsu_hotkey->fifo =
@@ -879,7 +845,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
        fujitsu_hotkey->input = input = input_allocate_device();
        if (!input) {
                error = -ENOMEM;
-               goto err_uninstall_notify;
+               goto err_free_fifo;
        }
 
        snprintf(fujitsu_hotkey->phys, sizeof(fujitsu_hotkey->phys),
@@ -975,9 +941,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
 end:
 err_free_input_dev:
        input_free_device(input);
-err_uninstall_notify:
-       acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
-                                  acpi_fujitsu_hotkey_notify);
+err_free_fifo:
        kfifo_free(fujitsu_hotkey->fifo);
 err_stop:
 
@@ -986,7 +950,6 @@ err_stop:
 
 static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
 {
-       acpi_status status;
        struct fujitsu_hotkey_t *fujitsu_hotkey = NULL;
 
        if (!device || !acpi_driver_data(device))
@@ -994,10 +957,6 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
 
        fujitsu_hotkey = acpi_driver_data(device);
 
-       status = acpi_remove_notify_handler(fujitsu_hotkey->acpi_handle,
-                                           ACPI_DEVICE_NOTIFY,
-                                           acpi_fujitsu_hotkey_notify);
-
        fujitsu_hotkey->acpi_handle = NULL;
 
        kfifo_free(fujitsu_hotkey->fifo);
@@ -1005,8 +964,7 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
        return 0;
 }
 
-static void acpi_fujitsu_hotkey_notify(acpi_handle handle, u32 event,
-                                      void *data)
+static void acpi_fujitsu_hotkey_notify(struct acpi_device *device, u32 event)
 {
        struct input_dev *input;
        int keycode, keycode_r;
@@ -1089,8 +1047,6 @@ static void acpi_fujitsu_hotkey_notify(acpi_handle handle, u32 event,
                input_sync(input);
                break;
        }
-
-       return;
 }
 
 /* Initialization */
@@ -1107,6 +1063,7 @@ static struct acpi_driver acpi_fujitsu_driver = {
        .ops = {
                .add = acpi_fujitsu_add,
                .remove = acpi_fujitsu_remove,
+               .notify = acpi_fujitsu_notify,
                },
 };
 
@@ -1122,6 +1079,7 @@ static struct acpi_driver acpi_fujitsu_hotkey_driver = {
        .ops = {
                .add = acpi_fujitsu_hotkey_add,
                .remove = acpi_fujitsu_hotkey_remove,
+               .notify = acpi_fujitsu_hotkey_notify,
                },
 };
 
index a5ce4bc..fe7cf01 100644 (file)
@@ -176,6 +176,7 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,
 static int acpi_pcc_hotkey_add(struct acpi_device *device);
 static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type);
 static int acpi_pcc_hotkey_resume(struct acpi_device *device);
+static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event);
 
 static const struct acpi_device_id pcc_device_ids[] = {
        { "MAT0012", 0},
@@ -194,6 +195,7 @@ static struct acpi_driver acpi_pcc_driver = {
                                .add =          acpi_pcc_hotkey_add,
                                .remove =       acpi_pcc_hotkey_remove,
                                .resume =       acpi_pcc_hotkey_resume,
+                               .notify =       acpi_pcc_hotkey_notify,
                        },
 };
 
@@ -271,7 +273,7 @@ static int acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc, u32 *sinf)
        union acpi_object *hkey = NULL;
        int i;
 
-       status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, 0,
+       status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, NULL,
                                      &buffer);
        if (ACPI_FAILURE(status)) {
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
@@ -527,9 +529,9 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
        return;
 }
 
-static void acpi_pcc_hotkey_notify(acpi_handle handle, u32 event, void *data)
+static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event)
 {
-       struct pcc_acpi *pcc = (struct pcc_acpi *) data;
+       struct pcc_acpi *pcc = acpi_driver_data(device);
 
        switch (event) {
        case HKEY_NOTIFY:
@@ -599,7 +601,6 @@ static int acpi_pcc_hotkey_resume(struct acpi_device *device)
 
 static int acpi_pcc_hotkey_add(struct acpi_device *device)
 {
-       acpi_status status;
        struct pcc_acpi *pcc;
        int num_sifr, result;
 
@@ -640,22 +641,11 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
                goto out_sinf;
        }
 
-       /* initialize hotkey input device */
-       status = acpi_install_notify_handler(pcc->handle, ACPI_DEVICE_NOTIFY,
-                                            acpi_pcc_hotkey_notify, pcc);
-
-       if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Error installing notify handler\n"));
-               result = -ENODEV;
-               goto out_input;
-       }
-
        /* initialize backlight */
        pcc->backlight = backlight_device_register("panasonic", NULL, pcc,
                                                   &pcc_backlight_ops);
        if (IS_ERR(pcc->backlight))
-               goto out_notify;
+               goto out_input;
 
        if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) {
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
@@ -680,9 +670,6 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
 
 out_backlight:
        backlight_device_unregister(pcc->backlight);
-out_notify:
-       acpi_remove_notify_handler(pcc->handle, ACPI_DEVICE_NOTIFY,
-                                  acpi_pcc_hotkey_notify);
 out_input:
        input_unregister_device(pcc->input_dev);
        /* no need to input_free_device() since core input API refcount and
@@ -723,9 +710,6 @@ static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type)
 
        backlight_device_unregister(pcc->backlight);
 
-       acpi_remove_notify_handler(pcc->handle, ACPI_DEVICE_NOTIFY,
-                                  acpi_pcc_hotkey_notify);
-
        input_unregister_device(pcc->input_dev);
        /* no need to input_free_device() since core input API refcount and
         * free()s the device */
index a90ec5c..d3c92d7 100644 (file)
@@ -914,7 +914,7 @@ static struct sony_nc_event sony_127_events[] = {
 /*
  * ACPI callbacks
  */
-static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
+static void sony_nc_notify(struct acpi_device *device, u32 event)
 {
        u32 ev = event;
 
@@ -933,7 +933,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
                        struct sony_nc_event *key_event;
 
                        if (sony_call_snc_handle(key_handle, 0x200, &result)) {
-                               dprintk("sony_acpi_notify, unable to decode"
+                               dprintk("sony_nc_notify, unable to decode"
                                        " event 0x%.2x 0x%.2x\n", key_handle,
                                        ev);
                                /* restore the original event */
@@ -968,7 +968,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
        } else
                sony_laptop_report_input_event(ev);
 
-       dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
+       dprintk("sony_nc_notify, event: 0x%.2x\n", ev);
        acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
 }
 
@@ -1276,15 +1276,6 @@ static int sony_nc_add(struct acpi_device *device)
                goto outwalk;
        }
 
-       status = acpi_install_notify_handler(sony_nc_acpi_handle,
-                                            ACPI_DEVICE_NOTIFY,
-                                            sony_acpi_notify, NULL);
-       if (ACPI_FAILURE(status)) {
-               printk(KERN_WARNING DRV_PFX "unable to install notify handler (%u)\n", status);
-               result = -ENODEV;
-               goto outinput;
-       }
-
        if (acpi_video_backlight_support()) {
                printk(KERN_INFO DRV_PFX "brightness ignored, must be "
                       "controlled by ACPI video driver\n");
@@ -1362,13 +1353,6 @@ static int sony_nc_add(struct acpi_device *device)
        if (sony_backlight_device)
                backlight_device_unregister(sony_backlight_device);
 
-       status = acpi_remove_notify_handler(sony_nc_acpi_handle,
-                                           ACPI_DEVICE_NOTIFY,
-                                           sony_acpi_notify);
-       if (ACPI_FAILURE(status))
-               printk(KERN_WARNING DRV_PFX "unable to remove notify handler\n");
-
-      outinput:
        sony_laptop_remove_input();
 
       outwalk:
@@ -1378,7 +1362,6 @@ static int sony_nc_add(struct acpi_device *device)
 
 static int sony_nc_remove(struct acpi_device *device, int type)
 {
-       acpi_status status;
        struct sony_nc_value *item;
 
        if (sony_backlight_device)
@@ -1386,12 +1369,6 @@ static int sony_nc_remove(struct acpi_device *device, int type)
 
        sony_nc_acpi_device = NULL;
 
-       status = acpi_remove_notify_handler(sony_nc_acpi_handle,
-                                           ACPI_DEVICE_NOTIFY,
-                                           sony_acpi_notify);
-       if (ACPI_FAILURE(status))
-               printk(KERN_WARNING DRV_PFX "unable to remove notify handler\n");
-
        for (item = sony_nc_values; item->name; ++item) {
                device_remove_file(&sony_pf_device->dev, &item->devattr);
        }
@@ -1425,6 +1402,7 @@ static struct acpi_driver sony_nc_driver = {
                .add = sony_nc_add,
                .remove = sony_nc_remove,
                .resume = sony_nc_resume,
+               .notify = sony_nc_notify,
                },
 };
 
index 2f269e1..043b208 100644 (file)
@@ -81,6 +81,7 @@ static struct wmi_block wmi_blocks;
 
 static int acpi_wmi_remove(struct acpi_device *device, int type);
 static int acpi_wmi_add(struct acpi_device *device);
+static void acpi_wmi_notify(struct acpi_device *device, u32 event);
 
 static const struct acpi_device_id wmi_device_ids[] = {
        {"PNP0C14", 0},
@@ -96,6 +97,7 @@ static struct acpi_driver acpi_wmi_driver = {
        .ops = {
                .add = acpi_wmi_add,
                .remove = acpi_wmi_remove,
+               .notify = acpi_wmi_notify,
                },
 };
 
@@ -643,12 +645,11 @@ acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address,
        }
 }
 
-static void acpi_wmi_notify(acpi_handle handle, u32 event, void *data)
+static void acpi_wmi_notify(struct acpi_device *device, u32 event)
 {
        struct guid_block *block;
        struct wmi_block *wblock;
        struct list_head *p;
-       struct acpi_device *device = data;
 
        list_for_each(p, &wmi_blocks.list) {
                wblock = list_entry(p, struct wmi_block, list);
@@ -669,9 +670,6 @@ static void acpi_wmi_notify(acpi_handle handle, u32 event, void *data)
 
 static int acpi_wmi_remove(struct acpi_device *device, int type)
 {
-       acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
-               acpi_wmi_notify);
-
        acpi_remove_address_space_handler(device->handle,
                                ACPI_ADR_SPACE_EC, &acpi_wmi_ec_space_handler);
 
@@ -683,13 +681,6 @@ static int __init acpi_wmi_add(struct acpi_device *device)
        acpi_status status;
        int result = 0;
 
-       status = acpi_install_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
-               acpi_wmi_notify, device);
-       if (ACPI_FAILURE(status)) {
-               printk(KERN_ERR PREFIX "Error installing notify handler\n");
-               return -ENODEV;
-       }
-
        status = acpi_install_address_space_handler(device->handle,
                                                    ACPI_ADR_SPACE_EC,
                                                    &acpi_wmi_ec_space_handler,
index efea128..4a651f6 100644 (file)
@@ -167,7 +167,7 @@ struct pnp_card *pnp_alloc_card(struct pnp_protocol *protocol, int id, char *pnp
        card->dev.parent = &card->protocol->dev;
        dev_set_name(&card->dev, "%02x:%02x", card->protocol->number, card->number);
 
-       card->dev.coherent_dma_mask = DMA_24BIT_MASK;
+       card->dev.coherent_dma_mask = DMA_BIT_MASK(24);
        card->dev.dma_mask = &card->dev.coherent_dma_mask;
 
        dev_id = pnp_add_card_id(card, pnpid);
index 14814f2..5dba909 100644 (file)
@@ -137,7 +137,7 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid
        INIT_LIST_HEAD(&dev->options);
        dev->protocol = protocol;
        dev->number = id;
-       dev->dma_mask = DMA_24BIT_MASK;
+       dev->dma_mask = DMA_BIT_MASK(24);
 
        dev->dev.parent = &dev->protocol->dev;
        dev->dev.bus = &pnp_bus_type;
index 41aec2a..e8b278f 100644 (file)
@@ -36,6 +36,8 @@ struct pcf50633_mbc {
 
        struct power_supply usb;
        struct power_supply adapter;
+
+       struct delayed_work charging_restart_work;
 };
 
 int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma)
@@ -43,6 +45,8 @@ int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma)
        struct pcf50633_mbc *mbc = platform_get_drvdata(pcf->mbc_pdev);
        int ret = 0;
        u8 bits;
+       int charging_start = 1;
+       u8 mbcs2, chgmod;
 
        if (ma >= 1000)
                bits = PCF50633_MBCC7_USB_1000mA;
@@ -50,8 +54,10 @@ int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma)
                bits = PCF50633_MBCC7_USB_500mA;
        else if (ma >= 100)
                bits = PCF50633_MBCC7_USB_100mA;
-       else
+       else {
                bits = PCF50633_MBCC7_USB_SUSPEND;
+               charging_start = 0;
+       }
 
        ret = pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC7,
                                        PCF50633_MBCC7_USB_MASK, bits);
@@ -60,6 +66,22 @@ int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma)
        else
                dev_info(pcf->dev, "usb curlim to %d mA\n", ma);
 
+       /* Manual charging start */
+       mbcs2 = pcf50633_reg_read(pcf, PCF50633_REG_MBCS2);
+       chgmod = (mbcs2 & PCF50633_MBCS2_MBC_MASK);
+
+       /* If chgmod == BATFULL, setting chgena has no effect.
+        * We need to set resume instead.
+        */
+       if (chgmod != PCF50633_MBCS2_MBC_BAT_FULL)
+               pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC1,
+                               PCF50633_MBCC1_CHGENA, PCF50633_MBCC1_CHGENA);
+       else
+               pcf50633_reg_set_bit_mask(pcf, PCF50633_REG_MBCC1,
+                               PCF50633_MBCC1_RESUME, PCF50633_MBCC1_RESUME);
+
+       mbc->usb_active = charging_start;
+
        power_supply_changed(&mbc->usb);
 
        return ret;
@@ -84,21 +106,6 @@ int pcf50633_mbc_get_status(struct pcf50633 *pcf)
 }
 EXPORT_SYMBOL_GPL(pcf50633_mbc_get_status);
 
-void pcf50633_mbc_set_status(struct pcf50633 *pcf, int what, int status)
-{
-       struct pcf50633_mbc *mbc = platform_get_drvdata(pcf->mbc_pdev);
-
-       if (what & PCF50633_MBC_USB_ONLINE)
-               mbc->usb_online = !!status;
-       if (what & PCF50633_MBC_USB_ACTIVE)
-               mbc->usb_active = !!status;
-       if (what & PCF50633_MBC_ADAPTER_ONLINE)
-               mbc->adapter_online = !!status;
-       if (what & PCF50633_MBC_ADAPTER_ACTIVE)
-               mbc->adapter_active = !!status;
-}
-EXPORT_SYMBOL_GPL(pcf50633_mbc_set_status);
-
 static ssize_t
 show_chgmode(struct device *dev, struct device_attribute *attr, char *buf)
 {
@@ -160,10 +167,44 @@ static struct attribute_group mbc_attr_group = {
        .attrs  = pcf50633_mbc_sysfs_entries,
 };
 
+/* MBC state machine switches into charging mode when the battery voltage
+ * falls below 96% of a battery float voltage. But the voltage drop in Li-ion
+ * batteries is marginal(1~2 %) till about 80% of its capacity - which means,
+ * after a BATFULL, charging won't be restarted until 80%.
+ *
+ * This work_struct function restarts charging at regular intervals to make
+ * sure we don't discharge too much
+ */
+
+static void pcf50633_mbc_charging_restart(struct work_struct *work)
+{
+       struct pcf50633_mbc *mbc;
+       u8 mbcs2, chgmod;
+
+       mbc = container_of(work, struct pcf50633_mbc,
+                               charging_restart_work.work);
+
+       mbcs2 = pcf50633_reg_read(mbc->pcf, PCF50633_REG_MBCS2);
+       chgmod = (mbcs2 & PCF50633_MBCS2_MBC_MASK);
+
+       if (chgmod != PCF50633_MBCS2_MBC_BAT_FULL)
+               return;
+
+       /* Restart charging */
+       pcf50633_reg_set_bit_mask(mbc->pcf, PCF50633_REG_MBCC1,
+                               PCF50633_MBCC1_RESUME, PCF50633_MBCC1_RESUME);
+       mbc->usb_active = 1;
+       power_supply_changed(&mbc->usb);
+
+       dev_info(mbc->pcf->dev, "Charging restarted\n");
+}
+
 static void
 pcf50633_mbc_irq_handler(int irq, void *data)
 {
        struct pcf50633_mbc *mbc = data;
+       int chg_restart_interval =
+                       mbc->pcf->pdata->charging_restart_interval;
 
        /* USB */
        if (irq == PCF50633_IRQ_USBINS) {
@@ -172,6 +213,7 @@ pcf50633_mbc_irq_handler(int irq, void *data)
                mbc->usb_online = 0;
                mbc->usb_active = 0;
                pcf50633_mbc_usb_curlim_set(mbc->pcf, 0);
+               cancel_delayed_work_sync(&mbc->charging_restart_work);
        }
 
        /* Adapter */
@@ -186,7 +228,14 @@ pcf50633_mbc_irq_handler(int irq, void *data)
        if (irq == PCF50633_IRQ_BATFULL) {
                mbc->usb_active = 0;
                mbc->adapter_active = 0;
-       }
+
+               if (chg_restart_interval > 0)
+                       schedule_delayed_work(&mbc->charging_restart_work,
+                                                       chg_restart_interval);
+       } else if (irq == PCF50633_IRQ_USBLIMON)
+               mbc->usb_active = 0;
+       else if (irq == PCF50633_IRQ_USBLIMOFF)
+               mbc->usb_active = 1;
 
        power_supply_changed(&mbc->usb);
        power_supply_changed(&mbc->adapter);
@@ -303,6 +352,9 @@ static int __devinit pcf50633_mbc_probe(struct platform_device *pdev)
                return ret;
        }
 
+       INIT_DELAYED_WORK(&mbc->charging_restart_work,
+                               pcf50633_mbc_charging_restart);
+
        ret = sysfs_create_group(&pdev->dev.kobj, &mbc_attr_group);
        if (ret)
                dev_err(mbc->pcf->dev, "failed to create sysfs entries\n");
@@ -328,6 +380,8 @@ static int __devexit pcf50633_mbc_remove(struct platform_device *pdev)
        power_supply_unregister(&mbc->usb);
        power_supply_unregister(&mbc->adapter);
 
+       cancel_delayed_work_sync(&mbc->charging_restart_work);
+
        kfree(mbc);
 
        return 0;
index b56a704..a232de6 100644 (file)
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/err.h>
 #include <linux/interrupt.h>
 #include <linux/power_supply.h>
 #include <linux/pda_power.h>
+#include <linux/regulator/consumer.h>
 #include <linux/timer.h>
 #include <linux/jiffies.h>
+#include <linux/usb/otg.h>
 
 static inline unsigned int get_irq_flags(struct resource *res)
 {
@@ -35,6 +38,11 @@ static struct timer_list supply_timer;
 static struct timer_list polling_timer;
 static int polling;
 
+#ifdef CONFIG_USB_OTG_UTILS
+static struct otg_transceiver *transceiver;
+#endif
+static struct regulator *ac_draw;
+
 enum {
        PDA_PSY_OFFLINE = 0,
        PDA_PSY_ONLINE = 1,
@@ -104,18 +112,35 @@ static void update_status(void)
 
 static void update_charger(void)
 {
-       if (!pdata->set_charge)
-               return;
-
-       if (new_ac_status > 0) {
-               dev_dbg(dev, "charger on (AC)\n");
-               pdata->set_charge(PDA_POWER_CHARGE_AC);
-       } else if (new_usb_status > 0) {
-               dev_dbg(dev, "charger on (USB)\n");
-               pdata->set_charge(PDA_POWER_CHARGE_USB);
-       } else {
-               dev_dbg(dev, "charger off\n");
-               pdata->set_charge(0);
+       static int regulator_enabled;
+       int max_uA = pdata->ac_max_uA;
+
+       if (pdata->set_charge) {
+               if (new_ac_status > 0) {
+                       dev_dbg(dev, "charger on (AC)\n");
+                       pdata->set_charge(PDA_POWER_CHARGE_AC);
+               } else if (new_usb_status > 0) {
+                       dev_dbg(dev, "charger on (USB)\n");
+                       pdata->set_charge(PDA_POWER_CHARGE_USB);
+               } else {
+                       dev_dbg(dev, "charger off\n");
+                       pdata->set_charge(0);
+               }
+       } else if (ac_draw) {
+               if (new_ac_status > 0) {
+                       regulator_set_current_limit(ac_draw, max_uA, max_uA);
+                       if (!regulator_enabled) {
+                               dev_dbg(dev, "charger on (AC)\n");
+                               regulator_enable(ac_draw);
+                               regulator_enabled = 1;
+                       }
+               } else {
+                       if (regulator_enabled) {
+                               dev_dbg(dev, "charger off\n");
+                               regulator_disable(ac_draw);
+                               regulator_enabled = 0;
+                       }
+               }
        }
 }
 
@@ -194,6 +219,13 @@ static void polling_timer_func(unsigned long unused)
                  jiffies + msecs_to_jiffies(pdata->polling_interval));
 }
 
+#ifdef CONFIG_USB_OTG_UTILS
+static int otg_is_usb_online(void)
+{
+       return (transceiver->state == OTG_STATE_B_PERIPHERAL);
+}
+#endif
+
 static int pda_power_probe(struct platform_device *pdev)
 {
        int ret = 0;
@@ -227,6 +259,9 @@ static int pda_power_probe(struct platform_device *pdev)
        if (!pdata->polling_interval)
                pdata->polling_interval = 2000;
 
+       if (!pdata->ac_max_uA)
+               pdata->ac_max_uA = 500000;
+
        setup_timer(&charger_timer, charger_timer_func, 0);
        setup_timer(&supply_timer, supply_timer_func, 0);
 
@@ -240,6 +275,13 @@ static int pda_power_probe(struct platform_device *pdev)
                pda_psy_usb.num_supplicants = pdata->num_supplicants;
        }
 
+       ac_draw = regulator_get(dev, "ac_draw");
+       if (IS_ERR(ac_draw)) {
+               dev_dbg(dev, "couldn't get ac_draw regulator\n");
+               ac_draw = NULL;
+               ret = PTR_ERR(ac_draw);
+       }
+
        if (pdata->is_ac_online) {
                ret = power_supply_register(&pdev->dev, &pda_psy_ac);
                if (ret) {
@@ -261,6 +303,13 @@ static int pda_power_probe(struct platform_device *pdev)
                }
        }
 
+#ifdef CONFIG_USB_OTG_UTILS
+       transceiver = otg_get_transceiver();
+       if (transceiver && !pdata->is_usb_online) {
+               pdata->is_usb_online = otg_is_usb_online;
+       }
+#endif
+
        if (pdata->is_usb_online) {
                ret = power_supply_register(&pdev->dev, &pda_psy_usb);
                if (ret) {
@@ -300,10 +349,18 @@ usb_irq_failed:
 usb_supply_failed:
        if (pdata->is_ac_online && ac_irq)
                free_irq(ac_irq->start, &pda_psy_ac);
+#ifdef CONFIG_USB_OTG_UTILS
+       if (transceiver)
+               otg_put_transceiver(transceiver);
+#endif
 ac_irq_failed:
        if (pdata->is_ac_online)
                power_supply_unregister(&pda_psy_ac);
 ac_supply_failed:
+       if (ac_draw) {
+               regulator_put(ac_draw);
+               ac_draw = NULL;
+       }
        if (pdata->exit)
                pdata->exit(dev);
 init_failed:
@@ -327,6 +384,14 @@ static int pda_power_remove(struct platform_device *pdev)
                power_supply_unregister(&pda_psy_usb);
        if (pdata->is_ac_online)
                power_supply_unregister(&pda_psy_ac);
+#ifdef CONFIG_USB_OTG_UTILS
+       if (transceiver)
+               otg_put_transceiver(transceiver);
+#endif
+       if (ac_draw) {
+               regulator_put(ac_draw);
+               ac_draw = NULL;
+       }
        if (pdata->exit)
                pdata->exit(dev);
 
index 5c13f61..74d0bfa 100644 (file)
@@ -381,9 +381,9 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
        rdev->dev.release = rio_release_dev;
        rio_dev_get(rdev);
 
-       rdev->dma_mask = DMA_32BIT_MASK;
+       rdev->dma_mask = DMA_BIT_MASK(32);
        rdev->dev.dma_mask = &rdev->dma_mask;
-       rdev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+       rdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
        if ((rdev->pef & RIO_PEF_INB_DOORBELL) &&
            (rdev->dst_ops & RIO_DST_OPS_DOORBELL))
index a12783e..fdb14ec 100644 (file)
@@ -2016,10 +2016,10 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
        pci_set_master(pdev);
        pci_try_set_mwi(pdev);
 
-       if (pci_set_dma_mask(pdev, DMA_64BIT_MASK)
-           || pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))
-               if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)
-                   || pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
+           || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
+                   || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
                        TW_PRINTK(host, TW_DRIVER, 0x23, "Failed to set dma mask");
                        retval = -ENODEV;
                        goto out_disable_device;
index 0742e68..8e71e5e 100644 (file)
@@ -234,7 +234,7 @@ static unsigned char tw_sense_table[][4] =
 #define TW_IOCTL_TIMEOUT                      25 /* 25 seconds */
 #define TW_IOCTL_CHRDEV_TIMEOUT               60 /* 60 seconds */
 #define TW_IOCTL_CHRDEV_FREE                  -1
-#define TW_DMA_MASK                          DMA_32BIT_MASK
+#define TW_DMA_MASK                          DMA_BIT_MASK(32)
 #define TW_MAX_CDB_LEN                       16
 
 /* Bitmask macros to eliminate bitfields */
index 2d689af..1ddcf40 100644 (file)
@@ -667,7 +667,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
                if (pci_enable_device(PCI_Device))
                        continue;
 
-               if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK ))
+               if (pci_set_dma_mask(PCI_Device, DMA_BIT_MASK(32) ))
                        continue;
 
                Bus = PCI_Device->bus->number;
@@ -834,7 +834,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
                if (pci_enable_device(PCI_Device))
                        continue;
 
-               if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK))
+               if (pci_set_dma_mask(PCI_Device, DMA_BIT_MASK(32)))
                        continue;
 
                Bus = PCI_Device->bus->number;
@@ -888,7 +888,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda
                if (pci_enable_device(PCI_Device))
                        continue;
 
-               if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK))
+               if (pci_set_dma_mask(PCI_Device, DMA_BIT_MASK(32)))
                        continue;
 
                Bus = PCI_Device->bus->number;
index 964769f..208d6df 100644 (file)
@@ -1094,7 +1094,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
 
        if (pci_enable_device(pdev))
                goto out;
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING "Unable to set 32bit DMA "
                                    "on inia100 adapter, ignoring.\n");
                goto out_disable_device;
index 21964aa..280261c 100644 (file)
@@ -1402,13 +1402,13 @@ int aac_get_adapter_info(struct aac_dev* dev)
        }
 
        if(dev->dac_support != 0) {
-               if (!pci_set_dma_mask(dev->pdev, DMA_64BIT_MASK) &&
-                       !pci_set_consistent_dma_mask(dev->pdev, DMA_64BIT_MASK)) {
+               if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(64)) &&
+                       !pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(64))) {
                        if (!dev->in_reset)
                                printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n",
                                        dev->name, dev->id);
-               } else if (!pci_set_dma_mask(dev->pdev, DMA_32BIT_MASK) &&
-                       !pci_set_consistent_dma_mask(dev->pdev, DMA_32BIT_MASK)) {
+               } else if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(32)) &&
+                       !pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(32))) {
                        printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n",
                                dev->name, dev->id);
                        dev->dac_support = 0;
index d24c267..956261f 100644 (file)
@@ -1206,18 +1206,18 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced)
        aac->fsa_dev = NULL;
        quirks = aac_get_driver_ident(index)->quirks;
        if (quirks & AAC_QUIRK_31BIT) {
-               if (((retval = pci_set_dma_mask(aac->pdev, DMA_31BIT_MASK))) ||
-                 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_31BIT_MASK))))
+               if (((retval = pci_set_dma_mask(aac->pdev, DMA_BIT_MASK(31)))) ||
+                 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_BIT_MASK(31)))))
                        goto out;
        } else {
-               if (((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK))) ||
-                 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_32BIT_MASK))))
+               if (((retval = pci_set_dma_mask(aac->pdev, DMA_BIT_MASK(32)))) ||
+                 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_BIT_MASK(32)))))
                        goto out;
        }
        if ((retval = (*(aac_get_driver_ident(index)->init))(aac)))
                goto out;
        if (quirks & AAC_QUIRK_31BIT)
-               if ((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK)))
+               if ((retval = pci_set_dma_mask(aac->pdev, DMA_BIT_MASK(32))))
                        goto out;
        if (jafo) {
                aac->thread = kthread_run(aac_command_thread, aac, aac->name);
index c507719..9b97c3e 100644 (file)
@@ -1095,16 +1095,16 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
                goto out;
        error = -ENODEV;
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) ||
-                       pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
+                       pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
                goto out_disable_pdev;
        /*
         * If the quirk31 bit is set, the adapter needs adapter
         * to driver communication memory to be allocated below 2gig
         */
        if (aac_drivers[index].quirks & AAC_QUIRK_31BIT)
-               if (pci_set_dma_mask(pdev, DMA_31BIT_MASK) ||
-                               pci_set_consistent_dma_mask(pdev, DMA_31BIT_MASK))
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(31)) ||
+                               pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(31)))
                        goto out_disable_pdev;
 
        pci_set_master(pdev);
@@ -1154,7 +1154,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
         * address space.
         */
        if (aac_drivers[index].quirks & AAC_QUIRK_31BIT)
-               if (pci_set_dma_mask(pdev, DMA_32BIT_MASK))
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
                        goto out_deinit;
 
        aac->maximum_num_channels = aac_drivers[index].channels;
index 6593056..8f68612 100644 (file)
@@ -194,16 +194,16 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (sizeof(dma_addr_t) > 4) {
                const u64 required_mask = dma_get_required_mask(dev);
 
-               if (required_mask > DMA_39BIT_MASK &&
-                   dma_set_mask(dev, DMA_64BIT_MASK) == 0)
+               if (required_mask > DMA_BIT_MASK(39) &&
+                   dma_set_mask(dev, DMA_BIT_MASK(64)) == 0)
                        ahd->flags |= AHD_64BIT_ADDRESSING;
-               else if (required_mask > DMA_32BIT_MASK &&
-                        dma_set_mask(dev, DMA_39BIT_MASK) == 0)
+               else if (required_mask > DMA_BIT_MASK(32) &&
+                        dma_set_mask(dev, DMA_BIT_MASK(39)) == 0)
                        ahd->flags |= AHD_39BIT_ADDRESSING;
                else
-                       dma_set_mask(dev, DMA_32BIT_MASK);
+                       dma_set_mask(dev, DMA_BIT_MASK(32));
        } else {
-               dma_set_mask(dev, DMA_32BIT_MASK);
+               dma_set_mask(dev, DMA_BIT_MASK(32));
        }
        ahd->dev_softc = pci;
        error = ahd_pci_config(ahd, entry);
index 00f5b98..78fc70c 100644 (file)
@@ -241,10 +241,10 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (sizeof(dma_addr_t) > 4
            && ahc->features & AHC_LARGE_SCBS
            && dma_set_mask(dev, mask_39bit) == 0
-           && dma_get_required_mask(dev) > DMA_32BIT_MASK) {
+           && dma_get_required_mask(dev) > DMA_BIT_MASK(32)) {
                ahc->flags |= AHC_39BIT_ADDRESSING;
        } else {
-               if (dma_set_mask(dev, DMA_32BIT_MASK)) {
+               if (dma_set_mask(dev, DMA_BIT_MASK(32))) {
                        ahc_free(ahc);
                        printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
                        return (-ENODEV);
index 2a730c4..996f722 100644 (file)
@@ -790,11 +790,11 @@ static int __devinit asd_pci_probe(struct pci_dev *dev,
                goto Err_remove;
 
        err = -ENODEV;
-       if (!pci_set_dma_mask(dev, DMA_64BIT_MASK)
-           && !pci_set_consistent_dma_mask(dev, DMA_64BIT_MASK))
+       if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64))
+           && !pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)))
                ;
-       else if (!pci_set_dma_mask(dev, DMA_32BIT_MASK)
-                && !pci_set_consistent_dma_mask(dev, DMA_32BIT_MASK))
+       else if (!pci_set_dma_mask(dev, DMA_BIT_MASK(32))
+                && !pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(32)))
                ;
        else {
                asd_printk("no suitable DMA mask for %s\n", pci_name(dev));
index 106c04d..80aac01 100644 (file)
@@ -393,9 +393,9 @@ static int arcmsr_probe(struct pci_dev *pdev,
        acb = (struct AdapterControlBlock *)host->hostdata;
        memset(acb, 0, sizeof (struct AdapterControlBlock));
 
-       error = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+       error = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (error) {
-               error = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               error = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (error) {
                        printk(KERN_WARNING
                               "scsi%d: No suitable DMA mask available\n",
index 20ca0a6..b137e56 100644 (file)
@@ -2568,7 +2568,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (pci_enable_device(pdev))
                goto err_eio;
 
-        if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+        if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                 printk(KERN_INFO "atp870u: use 32bit DMA mask.\n");
         } else {
                 printk(KERN_ERR "atp870u: DMA mask required but not available.\n");
index 6194ed5..b6af63c 100644 (file)
@@ -1014,15 +1014,15 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
         *      See if we should enable dma64 mode.
         */
        if (sizeof(dma_addr_t) > 4 &&
-           pci_set_dma_mask(pDev, DMA_64BIT_MASK) == 0) {
-               if (dma_get_required_mask(&pDev->dev) > DMA_32BIT_MASK)
+           pci_set_dma_mask(pDev, DMA_BIT_MASK(64)) == 0) {
+               if (dma_get_required_mask(&pDev->dev) > DMA_BIT_MASK(32))
                        dma64 = 1;
        }
-       if (!dma64 && pci_set_dma_mask(pDev, DMA_32BIT_MASK) != 0)
+       if (!dma64 && pci_set_dma_mask(pDev, DMA_BIT_MASK(32)) != 0)
                return -EINVAL;
 
        /* adapter only supports message blocks below 4GB */
-       pci_set_consistent_dma_mask(pDev, DMA_32BIT_MASK);
+       pci_set_consistent_dma_mask(pDev, DMA_BIT_MASK(32));
 
        base_addr0_phys = pci_resource_start(pDev,0);
        hba_map0_area_size = pci_resource_len(pDev,0);
index 976cdd5..be5099d 100644 (file)
@@ -1426,7 +1426,7 @@ static int port_detect(unsigned long port_base, unsigned int j,
 
        if (ha->pdev) {
                pci_set_master(ha->pdev);
-               if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK))
+               if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32)))
                        printk("%s: warning, pci_set_dma_mask failed.\n",
                               ha->board_name);
        }
index fb247fd..185e6bc 100644 (file)
@@ -5023,16 +5023,16 @@ static int __devinit gdth_pci_probe_one(gdth_pci_str *pcistr,
        /* 64-bit DMA only supported from FW >= x.43 */
        if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT) ||
            !ha->dma64_support) {
-               if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                        printk(KERN_WARNING "GDT-PCI %d: "
                                "Unable to set 32-bit DMA\n", ha->hanum);
                                goto out_free_coal_stat;
                }
        } else {
                shp->max_cmd_len = 16;
-               if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+               if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
                        printk("GDT-PCI %d: 64-bit DMA enabled\n", ha->hanum);
-               } else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+               } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                        printk(KERN_WARNING "GDT-PCI %d: "
                                "Unable to set 64/32-bit DMA\n", ha->hanum);
                        goto out_free_coal_stat;
index af1f0af..c596ab5 100644 (file)
@@ -958,8 +958,8 @@ static int __devinit hptiop_probe(struct pci_dev *pcidev,
        pci_set_master(pcidev);
 
        /* Enable 64bit DMA if possible */
-       if (pci_set_dma_mask(pcidev, DMA_64BIT_MASK)) {
-               if (pci_set_dma_mask(pcidev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
+               if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
                        printk(KERN_ERR "hptiop: fail to set dma_mask\n");
                        goto disable_pci_device;
                }
index 5529518..89a5948 100644 (file)
@@ -2856,7 +2856,7 @@ static int initio_probe_one(struct pci_dev *pdev,
                reg = 0;
        bios_seg = (bios_seg << 8) + ((u16) ((reg & 0xFF00) >> 8));
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING  "i91u: Could not set 32 bit DMA mask\n");
                error = -ENODEV;
                goto out_disable_device;
index def473f..c09d775 100644 (file)
@@ -7498,7 +7498,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (rc < 0) {
                dev_err(&pdev->dev, "Failed to set PCI DMA mask\n");
                goto cleanup_nomem;
index 457d76a..f83a116 100644 (file)
@@ -7048,10 +7048,10 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
         * are guaranteed to be < 4G.
         */
        if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) &&
-           !pci_set_dma_mask(ha->pcidev, DMA_64BIT_MASK)) {
+           !pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(64))) {
                (ha)->flags |= IPS_HA_ENH_SG;
        } else {
-               if (pci_set_dma_mask(ha->pcidev, DMA_32BIT_MASK) != 0) {
+               if (pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(32)) != 0) {
                        printk(KERN_WARNING "Unable to set DMA Mask\n");
                        return ips_abort_init(ha, index);
                }
index f23c4ca..b3d3131 100644 (file)
@@ -108,7 +108,7 @@ lasi700_probe(struct parisc_device *dev)
        }
 
        hostdata->dev = &dev->dev;
-       dma_set_mask(&dev->dev, DMA_32BIT_MASK);
+       dma_set_mask(&dev->dev, DMA_BIT_MASK(32));
        hostdata->base = ioremap_nocache(base, 0x100);
        hostdata->differential = 0;
 
index 6c86731..06874e6 100644 (file)
@@ -2660,8 +2660,8 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
        pci_save_state(pdev);
        pci_try_set_mwi(pdev);
 
-       if (pci_set_dma_mask(phba->pcidev, DMA_64BIT_MASK) != 0)
-               if (pci_set_dma_mask(phba->pcidev, DMA_32BIT_MASK) != 0)
+       if (pci_set_dma_mask(phba->pcidev, DMA_BIT_MASK(64)) != 0)
+               if (pci_set_dma_mask(phba->pcidev, DMA_BIT_MASK(32)) != 0)
                        goto out_idr_remove;
 
        /*
index 9fdcd60..49eb061 100644 (file)
@@ -2021,7 +2021,7 @@ make_local_pdev(adapter_t *adapter, struct pci_dev **pdev)
 
        memcpy(*pdev, adapter->dev, sizeof(struct pci_dev));
 
-       if( pci_set_dma_mask(*pdev, DMA_32BIT_MASK) != 0 ) {
+       if( pci_set_dma_mask(*pdev, DMA_BIT_MASK(32)) != 0 ) {
                kfree(*pdev);
                return -1;
        }
@@ -4793,10 +4793,10 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
        /* Set the Mode of addressing to 64 bit if we can */
        if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) {
-               pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+               pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
                adapter->has_64bit_addr = 1;
        } else  {
-               pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                adapter->has_64bit_addr = 0;
        }
                
index 805bb61..234f0b7 100644 (file)
@@ -473,7 +473,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
        // Setup the default DMA mask. This would be changed later on
        // depending on hardware capabilities
-       if (pci_set_dma_mask(adapter->pdev, DMA_32BIT_MASK) != 0) {
+       if (pci_set_dma_mask(adapter->pdev, DMA_BIT_MASK(32)) != 0) {
 
                con_log(CL_ANN, (KERN_WARNING
                        "megaraid: pci_set_dma_mask failed:%d\n", __LINE__));
@@ -900,11 +900,11 @@ megaraid_init_mbox(adapter_t *adapter)
                adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) ||
                (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
                adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) {
-               if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK)) {
+               if (pci_set_dma_mask(adapter->pdev, DMA_BIT_MASK(64))) {
                        con_log(CL_ANN, (KERN_WARNING
                                "megaraid: DMA mask for 64-bit failed\n"));
 
-                       if (pci_set_dma_mask (adapter->pdev, DMA_32BIT_MASK)) {
+                       if (pci_set_dma_mask (adapter->pdev, DMA_BIT_MASK(32))) {
                                con_log(CL_ANN, (KERN_WARNING
                                        "megaraid: 32-bit DMA mask failed\n"));
                                goto out_free_sysfs_res;
index 17ce7ab..7dc3d18 100644 (file)
@@ -2497,13 +2497,13 @@ megasas_set_dma_mask(struct pci_dev *pdev)
         * All our contollers are capable of performing 64-bit DMA
         */
        if (IS_DMA64) {
-               if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) != 0) {
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) {
 
-                       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0)
+                       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
                                goto fail_set_dma_mask;
                }
        } else {
-               if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0)
+               if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
                        goto fail_set_dma_mask;
        }
        return 0;
index 23e5a87..e4acebd 100644 (file)
@@ -875,10 +875,10 @@ static int pci_go_64(struct pci_dev *pdev)
 {
        int rc;
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
-               rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                if (rc) {
-                       rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+                       rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                        if (rc) {
                                dev_printk(KERN_ERR, &pdev->dev,
                                           "64-bit DMA enable failed\n");
@@ -886,13 +886,13 @@ static int pci_go_64(struct pci_dev *pdev)
                        }
                }
        } else {
-               rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit DMA enable failed\n");
                        return rc;
                }
-               rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (rc) {
                        dev_printk(KERN_ERR, &pdev->dev,
                                   "32-bit consistent DMA enable failed\n");
index d06ec5a..2be7d5b 100644 (file)
@@ -2672,7 +2672,7 @@ static int nsp32_detect(struct pci_dev *pdev)
        /*
         * setup DMA 
         */
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) {
                nsp32_msg (KERN_ERR, "failed to set PCI DMA mask");
                goto scsi_unregister;
        }
index d030db9..5defe5e 100644 (file)
@@ -4275,8 +4275,8 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
        ha->devnum = devnum;    /* specifies microcode load address */
 
 #ifdef QLA_64BIT_PTR
-       if (pci_set_dma_mask(ha->pdev, DMA_64BIT_MASK)) {
-               if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
+               if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32))) {
                        printk(KERN_WARNING "scsi(%li): Unable to set a "
                               "suitable DMA mask - aborting\n", ha->host_no);
                        error = -ENODEV;
@@ -4286,7 +4286,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
                dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n",
                        ha->host_no);
 #else
-       if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32))) {
                printk(KERN_WARNING "scsi(%li): Unable to set a "
                       "suitable DMA mask - aborting\n", ha->host_no);
                error = -ENODEV;
index efe2992..e4fdcda 100644 (file)
@@ -1176,10 +1176,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
        /* Assume a 32bit DMA mask. */
        ha->flags.enable_64bit_addressing = 0;
 
-       if (!dma_set_mask(&ha->pdev->dev, DMA_64BIT_MASK)) {
+       if (!dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(64))) {
                /* Any upper-dword bits set? */
                if (MSD(dma_get_required_mask(&ha->pdev->dev)) &&
-                   !pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) {
+                   !pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
                        /* Ok, a 64bit DMA mask is applicable. */
                        ha->flags.enable_64bit_addressing = 1;
                        ha->isp_ops->calc_req_entries = qla2x00_calc_iocbs_64;
@@ -1188,8 +1188,8 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
                }
        }
 
-       dma_set_mask(&ha->pdev->dev, DMA_32BIT_MASK);
-       pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK);
+       dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(32));
+       pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(32));
 }
 
 static void
index eb3a414..ec9da6c 100644 (file)
@@ -1369,16 +1369,16 @@ static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha)
        int retval;
 
        /* Update our PCI device dma_mask for full 64 bit mask */
-       if (pci_set_dma_mask(ha->pdev, DMA_64BIT_MASK) == 0) {
-               if (pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) {
+       if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(64)) == 0) {
+               if (pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
                        dev_dbg(&ha->pdev->dev,
                                  "Failed to set 64 bit PCI consistent mask; "
                                   "using 32 bit.\n");
                        retval = pci_set_consistent_dma_mask(ha->pdev,
-                                                            DMA_32BIT_MASK);
+                                                            DMA_BIT_MASK(32));
                }
        } else
-               retval = pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK);
+               retval = pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32));
 }
 
 static int qla4xxx_slave_alloc(struct scsi_device *sdev)
index 77f0b2c..37b3359 100644 (file)
@@ -83,7 +83,7 @@ static int __init snirm710_probe(struct platform_device *dev)
        }
 
        hostdata->dev = &dev->dev;
-       dma_set_mask(&dev->dev, DMA_32BIT_MASK);
+       dma_set_mask(&dev->dev, DMA_BIT_MASK(32));
        hostdata->base = ioremap_nocache(base, 0x100);
        hostdata->differential = 0;
 
index df7f96c..8d2a95c 100644 (file)
@@ -1395,12 +1395,12 @@ static int stex_set_dma_mask(struct pci_dev * pdev)
 {
        int ret;
 
-       if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)
-               && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))
+       if (!pci_set_dma_mask(pdev,  DMA_BIT_MASK(64))
+               && !pci_set_consistent_dma_mask(pdev,  DMA_BIT_MASK(64)))
                return 0;
-       ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (!ret)
-               ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        return ret;
 }
 
index 23e7820..583966e 100644 (file)
@@ -1349,7 +1349,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
        if ((SYM_CONF_DMA_ADDRESSING_MODE > 0) && (np->features & FE_DAC) &&
                        !pci_set_dma_mask(pdev, DMA_DAC_MASK)) {
                set_dac(np);
-       } else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+       } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printf_warning("%s: No suitable DMA available\n", sym_name(np));
                goto attach_failed;
        }
index 1588c90..9ebc870 100644 (file)
@@ -1080,21 +1080,21 @@ int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram
  */
 
 #if   SYM_CONF_DMA_ADDRESSING_MODE == 0
-#define DMA_DAC_MASK   DMA_32BIT_MASK
+#define DMA_DAC_MASK   DMA_BIT_MASK(32)
 #define sym_build_sge(np, data, badd, len)     \
 do {                                           \
        (data)->addr = cpu_to_scr(badd);        \
        (data)->size = cpu_to_scr(len);         \
 } while (0)
 #elif SYM_CONF_DMA_ADDRESSING_MODE == 1
-#define DMA_DAC_MASK   DMA_40BIT_MASK
+#define DMA_DAC_MASK   DMA_BIT_MASK(40)
 #define sym_build_sge(np, data, badd, len)                             \
 do {                                                                   \
        (data)->addr = cpu_to_scr(badd);                                \
        (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len);  \
 } while (0)
 #elif SYM_CONF_DMA_ADDRESSING_MODE == 2
-#define DMA_DAC_MASK   DMA_64BIT_MASK
+#define DMA_DAC_MASK   DMA_BIT_MASK(64)
 int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s);
 static inline void
 sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len)
index 533f820..7ddff3f 100644 (file)
@@ -306,6 +306,63 @@ static void __devexit pci_plx9050_exit(struct pci_dev *dev)
        }
 }
 
+#define NI8420_INT_ENABLE_REG  0x38
+#define NI8420_INT_ENABLE_BIT  0x2000
+
+static void __devexit pci_ni8420_exit(struct pci_dev *dev)
+{
+       void __iomem *p;
+       unsigned long base, len;
+       unsigned int bar = 0;
+
+       if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
+               moan_device("no memory in bar", dev);
+               return;
+       }
+
+       base = pci_resource_start(dev, bar);
+       len =  pci_resource_len(dev, bar);
+       p = ioremap_nocache(base, len);
+       if (p == NULL)
+               return;
+
+       /* Disable the CPU Interrupt */
+       writel(readl(p + NI8420_INT_ENABLE_REG) & ~(NI8420_INT_ENABLE_BIT),
+              p + NI8420_INT_ENABLE_REG);
+       iounmap(p);
+}
+
+
+/* MITE registers */
+#define MITE_IOWBSR1   0xc4
+#define MITE_IOWCR1    0xf4
+#define MITE_LCIMR1    0x08
+#define MITE_LCIMR2    0x10
+
+#define MITE_LCIMR2_CLR_CPU_IE (1 << 30)
+
+static void __devexit pci_ni8430_exit(struct pci_dev *dev)
+{
+       void __iomem *p;
+       unsigned long base, len;
+       unsigned int bar = 0;
+
+       if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
+               moan_device("no memory in bar", dev);
+               return;
+       }
+
+       base = pci_resource_start(dev, bar);
+       len =  pci_resource_len(dev, bar);
+       p = ioremap_nocache(base, len);
+       if (p == NULL)
+               return;
+
+       /* Disable the CPU Interrupt */
+       writel(MITE_LCIMR2_CLR_CPU_IE, p + MITE_LCIMR2);
+       iounmap(p);
+}
+
 /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
 static int
 sbs_setup(struct serial_private *priv, const struct pciserial_board *board,
@@ -597,6 +654,108 @@ static int pci_xircom_init(struct pci_dev *dev)
        return 0;
 }
 
+static int pci_ni8420_init(struct pci_dev *dev)
+{
+       void __iomem *p;
+       unsigned long base, len;
+       unsigned int bar = 0;
+
+       if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
+               moan_device("no memory in bar", dev);
+               return 0;
+       }
+
+       base = pci_resource_start(dev, bar);
+       len =  pci_resource_len(dev, bar);
+       p = ioremap_nocache(base, len);
+       if (p == NULL)
+               return -ENOMEM;
+
+       /* Enable CPU Interrupt */
+       writel(readl(p + NI8420_INT_ENABLE_REG) | NI8420_INT_ENABLE_BIT,
+              p + NI8420_INT_ENABLE_REG);
+
+       iounmap(p);
+       return 0;
+}
+
+#define MITE_IOWBSR1_WSIZE     0xa
+#define MITE_IOWBSR1_WIN_OFFSET        0x800
+#define MITE_IOWBSR1_WENAB     (1 << 7)
+#define MITE_LCIMR1_IO_IE_0    (1 << 24)
+#define MITE_LCIMR2_SET_CPU_IE (1 << 31)
+#define MITE_IOWCR1_RAMSEL_MASK        0xfffffffe
+
+static int pci_ni8430_init(struct pci_dev *dev)
+{
+       void __iomem *p;
+       unsigned long base, len;
+       u32 device_window;
+       unsigned int bar = 0;
+
+       if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
+               moan_device("no memory in bar", dev);
+               return 0;
+       }
+
+       base = pci_resource_start(dev, bar);
+       len =  pci_resource_len(dev, bar);
+       p = ioremap_nocache(base, len);
+       if (p == NULL)
+               return -ENOMEM;
+
+       /* Set device window address and size in BAR0 */
+       device_window = ((base + MITE_IOWBSR1_WIN_OFFSET) & 0xffffff00)
+                       | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE;
+       writel(device_window, p + MITE_IOWBSR1);
+
+       /* Set window access to go to RAMSEL IO address space */
+       writel((readl(p + MITE_IOWCR1) & MITE_IOWCR1_RAMSEL_MASK),
+              p + MITE_IOWCR1);
+
+       /* Enable IO Bus Interrupt 0 */
+       writel(MITE_LCIMR1_IO_IE_0, p + MITE_LCIMR1);
+
+       /* Enable CPU Interrupt */
+       writel(MITE_LCIMR2_SET_CPU_IE, p + MITE_LCIMR2);
+
+       iounmap(p);
+       return 0;
+}
+
+/* UART Port Control Register */
+#define NI8430_PORTCON 0x0f
+#define NI8430_PORTCON_TXVR_ENABLE     (1 << 3)
+
+static int
+pci_ni8430_setup(struct serial_private *priv,
+                const struct pciserial_board *board,
+                struct uart_port *port, int idx)
+{
+       void __iomem *p;
+       unsigned long base, len;
+       unsigned int bar, offset = board->first_offset;
+
+       if (idx >= board->num_ports)
+               return 1;
+
+       bar = FL_GET_BASE(board->flags);
+       offset += idx * board->uart_offset;
+
+       base = pci_resource_start(priv->dev, bar);
+       len =  pci_resource_len(priv->dev, bar);
+       p = ioremap_nocache(base, len);
+
+       /* enable the transciever */
+       writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,
+              p + offset + NI8430_PORTCON);
+
+       iounmap(p);
+
+       return setup_port(priv, port, bar, offset, board->reg_shift);
+}
+
+
 static int pci_netmos_init(struct pci_dev *dev)
 {
        /* subdevice 0x00PS means <P> parallel, <S> serial */
@@ -913,6 +1072,126 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
                .exit           = __devexit_p(pci_ite887x_exit),
        },
        /*
+        * National Instruments
+        */
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PCI23216,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PCI2328,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PCI2324,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PCI2322,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PCI2324I,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PCI2322I,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PXI8420_23216,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PXI8420_2328,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PXI8420_2324,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PXI8420_2322,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PXI8422_2324,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_DEVICE_ID_NI_PXI8422_2322,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8420_init,
+               .setup          = pci_default_setup,
+               .exit           = __devexit_p(pci_ni8420_exit),
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_NI,
+               .device         = PCI_ANY_ID,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .init           = pci_ni8430_init,
+               .setup          = pci_ni8430_setup,
+               .exit           = __devexit_p(pci_ni8430_exit),
+       },
+       /*
         * Panacom
         */
        {
@@ -1216,6 +1495,7 @@ enum pci_board_num_t {
        pbn_b1_2_115200,
        pbn_b1_4_115200,
        pbn_b1_8_115200,
+       pbn_b1_16_115200,
 
        pbn_b1_1_921600,
        pbn_b1_2_921600,
@@ -1225,6 +1505,9 @@ enum pci_board_num_t {
        pbn_b1_2_1250000,
 
        pbn_b1_bt_1_115200,
+       pbn_b1_bt_2_115200,
+       pbn_b1_bt_4_115200,
+
        pbn_b1_bt_2_921600,
 
        pbn_b1_1_1382400,
@@ -1280,6 +1563,10 @@ enum pci_board_num_t {
        pbn_exar_XR17C154,
        pbn_exar_XR17C158,
        pbn_pasemi_1682M,
+       pbn_ni8430_2,
+       pbn_ni8430_4,
+       pbn_ni8430_8,
+       pbn_ni8430_16,
 };
 
 /*
@@ -1487,6 +1774,12 @@ static struct pciserial_board pci_boards[] __devinitdata = {
                .base_baud      = 115200,
                .uart_offset    = 8,
        },
+       [pbn_b1_16_115200] = {
+               .flags          = FL_BASE1,
+               .num_ports      = 16,
+               .base_baud      = 115200,
+               .uart_offset    = 8,
+       },
 
        [pbn_b1_1_921600] = {
                .flags          = FL_BASE1,
@@ -1525,6 +1818,18 @@ static struct pciserial_board pci_boards[] __devinitdata = {
                .base_baud      = 115200,
                .uart_offset    = 8,
        },
+       [pbn_b1_bt_2_115200] = {
+               .flags          = FL_BASE1|FL_BASE_BARS,
+               .num_ports      = 2,
+               .base_baud      = 115200,
+               .uart_offset    = 8,
+       },
+       [pbn_b1_bt_4_115200] = {
+               .flags          = FL_BASE1|FL_BASE_BARS,
+               .num_ports      = 4,
+               .base_baud      = 115200,
+               .uart_offset    = 8,
+       },
 
        [pbn_b1_bt_2_921600] = {
                .flags          = FL_BASE1|FL_BASE_BARS,
@@ -1850,6 +2155,37 @@ static struct pciserial_board pci_boards[] __devinitdata = {
                .num_ports      = 1,
                .base_baud      = 8333333,
        },
+       /*
+        * National Instruments 843x
+        */
+       [pbn_ni8430_16] = {
+               .flags          = FL_BASE0,
+               .num_ports      = 16,
+               .base_baud      = 3686400,
+               .uart_offset    = 0x10,
+               .first_offset   = 0x800,
+       },
+       [pbn_ni8430_8] = {
+               .flags          = FL_BASE0,
+               .num_ports      = 8,
+               .base_baud      = 3686400,
+               .uart_offset    = 0x10,
+               .first_offset   = 0x800,
+       },
+       [pbn_ni8430_4] = {
+               .flags          = FL_BASE0,
+               .num_ports      = 4,
+               .base_baud      = 3686400,
+               .uart_offset    = 0x10,
+               .first_offset   = 0x800,
+       },
+       [pbn_ni8430_2] = {
+               .flags          = FL_BASE0,
+               .num_ports      = 2,
+               .base_baud      = 3686400,
+               .uart_offset    = 0x10,
+               .first_offset   = 0x800,
+       },
 };
 
 static const struct pci_device_id softmodem_blacklist[] = {
@@ -3052,6 +3388,82 @@ static struct pci_device_id serial_pci_tbl[] = {
                pbn_pasemi_1682M },
 
        /*
+        * National Instruments
+        */
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI23216,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_16_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2328,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_8_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_4_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_2_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324I,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_4_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322I,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_2_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_23216,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_16_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2328,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_8_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2324,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_4_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2322,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_2_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2324,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_4_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2322,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b1_bt_2_115200 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2322,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_2 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2322,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_2 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2324,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_4 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2324,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_4 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2328,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_8 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2328,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_8 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_23216,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_16 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_23216,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_16 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2322,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_2 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2322,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_2 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2324,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_4 },
+       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2324,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_ni8430_4 },
+
+       /*
        * ADDI-DATA GmbH communication cards <info@addi-data.com>
        */
        {       PCI_VENDOR_ID_ADDIDATA,
index bbcfc26..d71dfe3 100644 (file)
@@ -333,6 +333,10 @@ static const struct pnp_device_id pnp_dev_table[] = {
        {       "WACF006",              0       },
        {       "WACF007",              0       },
        {       "WACF008",              0       },
+       {       "WACF009",              0       },
+       {       "WACF00A",              0       },
+       {       "WACF00B",              0       },
+       {       "WACF00C",              0       },
        /* Compaq touchscreen */
        {       "FPI2002",              0 },
        /* Fujitsu Stylistic touchscreens */
@@ -346,8 +350,9 @@ static const struct pnp_device_id pnp_dev_table[] = {
        {       "FUJ02B8",              0 },
        {       "FUJ02B9",              0 },
        {       "FUJ02BC",              0 },
-       /* Fujitsu Wacom Tablet PC devices */
+       /* Fujitsu Wacom Tablet PC device */
        {       "FUJ02E5",              0       },
+       /* Fujitsu P-series tablet PC device */
        {       "FUJ02E6",              0       },
        /*
         * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
index aa9d3a4..0328fd4 100644 (file)
@@ -533,6 +533,13 @@ config SERIAL_S3C6400
          Serial port support for the Samsung S3C6400 and S3C6410
          SoCs
 
+config SERIAL_MAX3100
+       tristate "MAX3100 support"
+       depends on SPI
+       select SERIAL_CORE
+       help
+         MAX3100 chip support
+
 config SERIAL_DZ
        bool "DECstation DZ serial driver"
        depends on MACH_DECSTATION && 32BIT
@@ -700,7 +707,7 @@ choice
 
 config SERIAL_BFIN_DMA
        bool "DMA mode"
-       depends on !DMA_UNCACHED_NONE && !KGDB_UART
+       depends on !DMA_UNCACHED_NONE && KGDB_SERIAL_CONSOLE=n
        help
          This driver works under DMA mode. If this option is selected, the
          blackfin simple dma driver is also enabled.
@@ -727,19 +734,19 @@ config BFIN_UART0_CTSRTS
 
 config UART0_CTS_PIN
        int "UART0 CTS pin"
-       depends on BFIN_UART0_CTSRTS
+       depends on BFIN_UART0_CTSRTS && !BF548
        default 23
        help
          The default pin is GPIO_GP7.
-         Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config UART0_RTS_PIN
        int "UART0 RTS pin"
-       depends on BFIN_UART0_CTSRTS
+       depends on BFIN_UART0_CTSRTS && !BF548
        default 22
        help
          The default pin is GPIO_GP6.
-         Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config SERIAL_BFIN_UART1
        bool "Enable UART1"
@@ -756,21 +763,21 @@ config BFIN_UART1_CTSRTS
 
 config UART1_CTS_PIN
        int "UART1 CTS pin"
-       depends on BFIN_UART1_CTSRTS && !BF54x
+       depends on BFIN_UART1_CTSRTS && !BF548
        default -1
        help
-         Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config UART1_RTS_PIN
        int "UART1 RTS pin"
-       depends on BFIN_UART1_CTSRTS && !BF54x
+       depends on BFIN_UART1_CTSRTS && !BF548
        default -1
        help
-         Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config SERIAL_BFIN_UART2
        bool "Enable UART2"
-       depends on SERIAL_BFIN && (BF54x)
+       depends on SERIAL_BFIN && (BF54x || BF538 || BF539)
        help
          Enable UART2
 
@@ -783,17 +790,17 @@ config BFIN_UART2_CTSRTS
 
 config UART2_CTS_PIN
        int "UART2 CTS pin"
-       depends on BFIN_UART2_CTSRTS
+       depends on BFIN_UART2_CTSRTS && !BF548
        default -1
        help
-         Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config UART2_RTS_PIN
        int "UART2 RTS pin"
-       depends on BFIN_UART2_CTSRTS
+       depends on BFIN_UART2_CTSRTS && !BF548
        default -1
        help
-         Refer to ./include/asm-blackfin/gpio.h to see the GPIO map.
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
 
 config SERIAL_BFIN_UART3
        bool "Enable UART3"
@@ -808,6 +815,20 @@ config BFIN_UART3_CTSRTS
          Enable hardware flow control in the driver. Using GPIO emulate the CTS/RTS
          signal.
 
+config UART3_CTS_PIN
+       int "UART3 CTS pin"
+       depends on BFIN_UART3_CTSRTS && !BF548
+       default -1
+       help
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
+
+config UART3_RTS_PIN
+       int "UART3 RTS pin"
+       depends on BFIN_UART3_CTSRTS && !BF548
+       default -1
+       help
+         Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
+
 config SERIAL_IMX
        bool "IMX serial port support"
        depends on ARM && (ARCH_IMX || ARCH_MXC)
index 8844c0a..d438eb2 100644 (file)
@@ -43,6 +43,7 @@ obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o
 obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o
 obj-$(CONFIG_SERIAL_S3C24A0) += s3c24a0.o
 obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o
+obj-$(CONFIG_SERIAL_MAX3100) += max3100.o
 obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
 obj-$(CONFIG_SERIAL_MUX) += mux.o
 obj-$(CONFIG_SERIAL_68328) += 68328serial.o
index 318d69d..18ba812 100644 (file)
@@ -63,7 +63,6 @@ static int kgdboc_break_enabled;
 #define DMA_RX_YCOUNT          (PAGE_SIZE / DMA_RX_XCOUNT)
 
 #define DMA_RX_FLUSH_JIFFIES   (HZ / 50)
-#define CTS_CHECK_JIFFIES      (HZ / 50)
 
 #ifdef CONFIG_SERIAL_BFIN_DMA
 static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart);
@@ -71,10 +70,65 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart);
 static void bfin_serial_tx_chars(struct bfin_serial_port *uart);
 #endif
 
-static void bfin_serial_mctrl_check(struct bfin_serial_port *uart);
-
 static void bfin_serial_reset_irda(struct uart_port *port);
 
+#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
+       defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
+static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
+{
+       struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
+       if (uart->cts_pin < 0)
+               return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
+
+       /* CTS PIN is negative assertive. */
+       if (UART_GET_CTS(uart))
+               return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
+       else
+               return TIOCM_DSR | TIOCM_CAR;
+}
+
+static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
+{
+       struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
+       if (uart->rts_pin < 0)
+               return;
+
+       /* RTS PIN is negative assertive. */
+       if (mctrl & TIOCM_RTS)
+               UART_ENABLE_RTS(uart);
+       else
+               UART_DISABLE_RTS(uart);
+}
+
+/*
+ * Handle any change of modem status signal.
+ */
+static irqreturn_t bfin_serial_mctrl_cts_int(int irq, void *dev_id)
+{
+       struct bfin_serial_port *uart = dev_id;
+       unsigned int status;
+
+       status = bfin_serial_get_mctrl(&uart->port);
+       uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       uart->scts = 1;
+       UART_CLEAR_SCTS(uart);
+       UART_CLEAR_IER(uart, EDSSI);
+#endif
+
+       return IRQ_HANDLED;
+}
+#else
+static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
+{
+       return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
+}
+
+static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
+{
+}
+#endif
+
 /*
  * interrupts are disabled on entry
  */
@@ -111,6 +165,13 @@ static void bfin_serial_start_tx(struct uart_port *port)
        struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
        struct tty_struct *tty = uart->port.info->port.tty;
 
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+               uart->scts = 0;
+               uart_handle_cts_change(&uart->port, uart->scts);
+       }
+#endif
+
        /*
         * To avoid losting RX interrupt, we reset IR function
         * before sending data.
@@ -174,10 +235,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
                        return;
                }
 
-       if (!uart->port.info || !uart->port.info->tty)
+       if (!uart->port.info || !uart->port.info->port.tty)
                return;
 #endif
-       tty = uart->port.info->tty;
+       tty = uart->port.info->port.tty;
 
        if (ANOMALY_05000363) {
                /* The BF533 (and BF561) family of processors have a nice anomaly
@@ -264,12 +325,6 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart)
 {
        struct circ_buf *xmit = &uart->port.info->xmit;
 
-       /*
-        * Check the modem control lines before
-        * transmitting anything.
-        */
-       bfin_serial_mctrl_check(uart);
-
        if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
 #ifdef CONFIG_BF54x
                /* Clear TFI bit */
@@ -312,6 +367,12 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
 {
        struct bfin_serial_port *uart = dev_id;
 
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+               uart->scts = 0;
+               uart_handle_cts_change(&uart->port, uart->scts);
+       }
+#endif
        spin_lock(&uart->port.lock);
        if (UART_GET_LSR(uart) & THRE)
                bfin_serial_tx_chars(uart);
@@ -328,12 +389,6 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
 
        uart->tx_done = 0;
 
-       /*
-        * Check the modem control lines before
-        * transmitting anything.
-        */
-       bfin_serial_mctrl_check(uart);
-
        if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
                uart->tx_count = 0;
                uart->tx_done = 1;
@@ -401,9 +456,11 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
        else
                flg = TTY_NORMAL;
 
-       for (i = uart->rx_dma_buf.tail; i != uart->rx_dma_buf.head; i++) {
+       for (i = uart->rx_dma_buf.tail; ; i++) {
                if (i >= UART_XMIT_SIZE)
                        i = 0;
+               if (i == uart->rx_dma_buf.head)
+                       break;
                if (!uart_handle_sysrq_char(&uart->port, uart->rx_dma_buf.buf[i]))
                        uart_insert_char(&uart->port, status, OE,
                                uart->rx_dma_buf.buf[i], flg);
@@ -415,7 +472,8 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
 
 void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 {
-       int x_pos, pos, flags;
+       int x_pos, pos;
+       unsigned long flags;
 
        spin_lock_irqsave(&uart->port.lock, flags);
 
@@ -445,6 +503,13 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
        struct bfin_serial_port *uart = dev_id;
        struct circ_buf *xmit = &uart->port.info->xmit;
 
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+               uart->scts = 0;
+               uart_handle_cts_change(&uart->port, uart->scts);
+       }
+#endif
+
        spin_lock(&uart->port.lock);
        if (!(get_dma_curr_irqstat(uart->tx_dma_channel)&DMA_RUN)) {
                disable_dma(uart->tx_dma_channel);
@@ -493,61 +558,6 @@ static unsigned int bfin_serial_tx_empty(struct uart_port *port)
                return 0;
 }
 
-static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
-{
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
-       if (uart->cts_pin < 0)
-               return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
-
-       if (UART_GET_CTS(uart))
-               return TIOCM_DSR | TIOCM_CAR;
-       else
-#endif
-               return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
-}
-
-static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
-{
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
-       if (uart->rts_pin < 0)
-               return;
-
-       if (mctrl & TIOCM_RTS)
-               UART_CLEAR_RTS(uart);
-       else
-               UART_SET_RTS(uart);
-#endif
-}
-
-/*
- * Handle any change of modem status signal since we were last called.
- */
-static void bfin_serial_mctrl_check(struct bfin_serial_port *uart)
-{
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-       unsigned int status;
-       struct uart_info *info = uart->port.info;
-       struct tty_struct *tty = info->port.tty;
-
-       status = bfin_serial_get_mctrl(&uart->port);
-       uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
-       if (!(status & TIOCM_CTS)) {
-               tty->hw_stopped = 1;
-               uart->cts_timer.data = (unsigned long)(uart);
-               uart->cts_timer.function = (void *)bfin_serial_mctrl_check;
-               uart->cts_timer.expires = jiffies + CTS_CHECK_JIFFIES;
-               add_timer(&(uart->cts_timer));
-       } else {
-               tty->hw_stopped = 0;
-       }
-#endif
-}
-
-/*
- * Interrupts are always disabled.
- */
 static void bfin_serial_break_ctl(struct uart_port *port, int break_state)
 {
        struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
@@ -603,7 +613,7 @@ static int bfin_serial_startup(struct uart_port *port)
        uart->rx_dma_timer.expires = jiffies + DMA_RX_FLUSH_JIFFIES;
        add_timer(&(uart->rx_dma_timer));
 #else
-#if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
+# if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
        defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
        if (kgdboc_port_line == uart->port.line && kgdboc_break_enabled)
                kgdboc_break_enabled = 0;
@@ -658,11 +668,50 @@ static int bfin_serial_startup(struct uart_port *port)
                }
        }
 # endif
-#if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
+# if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
        defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
        }
 # endif
 #endif
+
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+       if (uart->cts_pin >= 0) {
+               if (request_irq(gpio_to_irq(uart->cts_pin),
+                       bfin_serial_mctrl_cts_int,
+                       IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
+                       IRQF_DISABLED, "BFIN_UART_CTS", uart)) {
+                       uart->cts_pin = -1;
+                       pr_info("Unable to attach BlackFin UART CTS interrupt.\
+                                So, disable it.\n");
+               }
+       }
+       if (uart->rts_pin >= 0) {
+               gpio_request(uart->rts_pin, DRIVER_NAME);
+               gpio_direction_output(uart->rts_pin, 0);
+       }
+#endif
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       if (request_irq(uart->status_irq,
+               bfin_serial_mctrl_cts_int,
+               IRQF_DISABLED, "BFIN_UART_MODEM_STATUS", uart)) {
+               pr_info("Unable to attach BlackFin UART Modem \
+                       Status interrupt.\n");
+       }
+
+       if (uart->cts_pin >= 0) {
+               gpio_request(uart->cts_pin, DRIVER_NAME);
+               gpio_direction_output(uart->cts_pin, 1);
+       }
+       if (uart->rts_pin >= 0) {
+               gpio_request(uart->rts_pin, DRIVER_NAME);
+               gpio_direction_output(uart->rts_pin, 0);
+       }
+
+       /* CTS RTS PINs are negative assertive. */
+       UART_PUT_MCR(uart, ACTS);
+       UART_SET_IER(uart, EDSSI);
+#endif
+
        UART_SET_IER(uart, ERBFI);
        return 0;
 }
@@ -696,6 +745,21 @@ static void bfin_serial_shutdown(struct uart_port *port)
        free_irq(uart->port.irq, uart);
        free_irq(uart->port.irq+1, uart);
 #endif
+
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+       if (uart->cts_pin >= 0)
+               free_irq(gpio_to_irq(uart->cts_pin), uart);
+       if (uart->rts_pin >= 0)
+               gpio_free(uart->rts_pin);
+#endif
+#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
+       if (uart->cts_pin >= 0)
+               gpio_free(uart->cts_pin);
+       if (uart->rts_pin >= 0)
+               gpio_free(uart->rts_pin);
+       if (UART_GET_IER(uart) && EDSSI)
+               free_irq(uart->status_irq, uart);
+#endif
 }
 
 static void
@@ -757,7 +821,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
        }
 
        baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-       quot = uart_get_divisor(port, baud);
+       quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
        spin_lock_irqsave(&uart->port.lock, flags);
 
        UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
@@ -861,6 +925,20 @@ static void bfin_serial_set_ldisc(struct uart_port *port)
        }
 }
 
+static void bfin_serial_reset_irda(struct uart_port *port)
+{
+       int line = port->line;
+       unsigned short val;
+
+       val = UART_GET_GCTL(&bfin_serial_ports[line]);
+       val &= ~(IREN | RPOLC);
+       UART_PUT_GCTL(&bfin_serial_ports[line], val);
+       SSYNC();
+       val |= (IREN | RPOLC);
+       UART_PUT_GCTL(&bfin_serial_ports[line], val);
+       SSYNC();
+}
+
 #ifdef CONFIG_CONSOLE_POLL
 static void bfin_serial_poll_put_char(struct uart_port *port, unsigned char chr)
 {
@@ -906,20 +984,6 @@ static int bfin_kgdboc_port_startup(struct uart_port *port)
 }
 #endif
 
-static void bfin_serial_reset_irda(struct uart_port *port)
-{
-       int line = port->line;
-       unsigned short val;
-
-       val = UART_GET_GCTL(&bfin_serial_ports[line]);
-       val &= ~(IREN | RPOLC);
-       UART_PUT_GCTL(&bfin_serial_ports[line], val);
-       SSYNC();
-       val |= (IREN | RPOLC);
-       UART_PUT_GCTL(&bfin_serial_ports[line], val);
-       SSYNC();
-}
-
 static struct uart_ops bfin_serial_pops = {
        .tx_empty       = bfin_serial_tx_empty,
        .set_mctrl      = bfin_serial_set_mctrl,
@@ -949,6 +1013,39 @@ static struct uart_ops bfin_serial_pops = {
 #endif
 };
 
+static void __init bfin_serial_hw_init(void)
+{
+#ifdef CONFIG_SERIAL_BFIN_UART0
+       peripheral_request(P_UART0_TX, DRIVER_NAME);
+       peripheral_request(P_UART0_RX, DRIVER_NAME);
+#endif
+
+#ifdef CONFIG_SERIAL_BFIN_UART1
+       peripheral_request(P_UART1_TX, DRIVER_NAME);
+       peripheral_request(P_UART1_RX, DRIVER_NAME);
+
+# if defined(CONFIG_BFIN_UART1_CTSRTS) && defined(CONFIG_BF54x)
+       peripheral_request(P_UART1_RTS, DRIVER_NAME);
+       peripheral_request(P_UART1_CTS, DRIVER_NAME);
+# endif
+#endif
+
+#ifdef CONFIG_SERIAL_BFIN_UART2
+       peripheral_request(P_UART2_TX, DRIVER_NAME);
+       peripheral_request(P_UART2_RX, DRIVER_NAME);
+#endif
+
+#ifdef CONFIG_SERIAL_BFIN_UART3
+       peripheral_request(P_UART3_TX, DRIVER_NAME);
+       peripheral_request(P_UART3_RX, DRIVER_NAME);
+
+# if defined(CONFIG_BFIN_UART3_CTSRTS) && defined(CONFIG_BF54x)
+       peripheral_request(P_UART3_RTS, DRIVER_NAME);
+       peripheral_request(P_UART3_CTS, DRIVER_NAME);
+# endif
+#endif
+}
+
 static void __init bfin_serial_init_ports(void)
 {
        static int first = 1;
@@ -958,6 +1055,8 @@ static void __init bfin_serial_init_ports(void)
                return;
        first = 0;
 
+       bfin_serial_hw_init();
+
        for (i = 0; i < nr_active_ports; i++) {
                bfin_serial_ports[i].port.uartclk   = get_sclk();
                bfin_serial_ports[i].port.fifosize  = BFIN_UART_TX_FIFO_SIZE;
@@ -970,6 +1069,8 @@ static void __init bfin_serial_init_ports(void)
                        bfin_serial_resource[i].uart_base_addr;
                bfin_serial_ports[i].port.irq       =
                        bfin_serial_resource[i].uart_irq;
+               bfin_serial_ports[i].status_irq     =
+                       bfin_serial_resource[i].uart_status_irq;
                bfin_serial_ports[i].port.flags     = UPF_BOOT_AUTOCONF;
 #ifdef CONFIG_SERIAL_BFIN_DMA
                bfin_serial_ports[i].tx_done        = 1;
@@ -980,16 +1081,14 @@ static void __init bfin_serial_init_ports(void)
                        bfin_serial_resource[i].uart_rx_dma_channel;
                init_timer(&(bfin_serial_ports[i].rx_dma_timer));
 #endif
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-               init_timer(&(bfin_serial_ports[i].cts_timer));
+#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
+       defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
                bfin_serial_ports[i].cts_pin        =
                        bfin_serial_resource[i].uart_cts_pin;
                bfin_serial_ports[i].rts_pin        =
                        bfin_serial_resource[i].uart_rts_pin;
 #endif
-               bfin_serial_hw_init(&bfin_serial_ports[i]);
        }
-
 }
 
 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
@@ -1046,7 +1145,8 @@ bfin_serial_console_setup(struct console *co, char *options)
        int baud = 57600;
        int bits = 8;
        int parity = 'n';
-# ifdef CONFIG_SERIAL_BFIN_CTSRTS
+# if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
+       defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
        int flow = 'r';
 # else
        int flow = 'n';
@@ -1088,7 +1188,7 @@ static void
 bfin_serial_console_write(struct console *co, const char *s, unsigned int count)
 {
        struct bfin_serial_port *uart = &bfin_serial_ports[co->index];
-       int flags = 0;
+       unsigned long flags;
 
        spin_lock_irqsave(&uart->port.lock, flags);
        uart_console_write(&uart->port, s, count, bfin_serial_console_putchar);
@@ -1243,7 +1343,8 @@ static int bfin_serial_remove(struct platform_device *dev)
                        continue;
                uart_remove_one_port(&bfin_serial_reg, &bfin_serial_ports[i].port);
                bfin_serial_ports[i].port.dev = NULL;
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
+       defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
                gpio_free(bfin_serial_ports[i].cts_pin);
                gpio_free(bfin_serial_ports[i].rts_pin);
 #endif
index 5c6ef51..f8df068 100644 (file)
@@ -1106,6 +1106,10 @@ static int cpm_uart_init_port(struct device_node *np,
        for (i = 0; i < NUM_GPIOS; i++)
                pinfo->gpios[i] = of_get_gpio(np, i);
 
+#ifdef CONFIG_PPC_EARLY_DEBUG_CPM
+       udbg_putc = NULL;
+#endif
+
        return cpm_uart_request_port(&pinfo->port);
 
 out_pram:
@@ -1255,10 +1259,6 @@ static int __init cpm_uart_console_setup(struct console *co, char *options)
                        baud = 9600;
        }
 
-#ifdef CONFIG_PPC_EARLY_DEBUG_CPM
-       udbg_putc = NULL;
-#endif
-
        if (IS_SMC(pinfo)) {
                out_be16(&pinfo->smcup->smc_brkcr, 0);
                cpm_line_cr_cmd(pinfo, CPM_CR_STOP_TX);
@@ -1339,13 +1339,13 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev,
 
        dev_set_drvdata(&ofdev->dev, pinfo);
 
+       /* initialize the device pointer for the port */
+       pinfo->port.dev = &ofdev->dev;
+
        ret = cpm_uart_init_port(ofdev->node, pinfo);
        if (ret)
                return ret;
 
-       /* initialize the device pointer for the port */
-       pinfo->port.dev = &ofdev->dev;
-
        return uart_add_one_port(&cpm_reg, &pinfo->port);
 }
 
index e642c22..7ba7d70 100644 (file)
@@ -1391,7 +1391,7 @@ static inline void e100_disable_rx_irq(struct e100_serial *info)
 #if defined(CONFIG_ETRAX_RS485)
 /* Enable RS-485 mode on selected port. This is UGLY. */
 static int
-e100_enable_rs485(struct tty_struct *tty,struct rs485_control *r)
+e100_enable_rs485(struct tty_struct *tty, struct serial_rs485 *r)
 {
        struct e100_serial * info = (struct e100_serial *)tty->driver_data;
 
@@ -1409,13 +1409,11 @@ e100_enable_rs485(struct tty_struct *tty,struct rs485_control *r)
                       CONFIG_ETRAX_RS485_LTC1387_RXEN_PORT_G_BIT, 1);
 #endif
 
-       info->rs485.rts_on_send = 0x01 & r->rts_on_send;
-       info->rs485.rts_after_sent = 0x01 & r->rts_after_sent;
+       info->rs485.flags = r->flags;
        if (r->delay_rts_before_send >= 1000)
                info->rs485.delay_rts_before_send = 1000;
        else
                info->rs485.delay_rts_before_send = r->delay_rts_before_send;
-       info->rs485.enabled = r->enabled;
 /*     printk("rts: on send = %i, after = %i, enabled = %i",
                    info->rs485.rts_on_send,
                    info->rs485.rts_after_sent,
@@ -1430,17 +1428,18 @@ e100_write_rs485(struct tty_struct *tty,
                  const unsigned char *buf, int count)
 {
        struct e100_serial * info = (struct e100_serial *)tty->driver_data;
-       int old_enabled = info->rs485.enabled;
+       int old_value = (info->rs485.flags) & SER_RS485_ENABLED;
 
        /* rs485 is always implicitly enabled if we're using the ioctl()
-        * but it doesn't have to be set in the rs485_control
+        * but it doesn't have to be set in the serial_rs485
         * (to be backward compatible with old apps)
         * So we store, set and restore it.
         */
-       info->rs485.enabled = 1;
+       info->rs485.flags |= SER_RS485_ENABLED;
        /* rs_write now deals with RS485 if enabled */
        count = rs_write(tty, buf, count);
-       info->rs485.enabled = old_enabled;
+       if (!old_value)
+               info->rs485.flags &= ~(SER_RS485_ENABLED);
        return count;
 }
 
@@ -1451,7 +1450,7 @@ static void rs485_toggle_rts_timer_function(unsigned long data)
        struct e100_serial *info = (struct e100_serial *)data;
 
        fast_timers_rs485[info->line].function = NULL;
-       e100_rts(info, info->rs485.rts_after_sent);
+       e100_rts(info, (info->rs485.flags & SER_RS485_RTS_AFTER_SEND));
 #if defined(CONFIG_ETRAX_RS485_DISABLE_RECEIVER)
        e100_enable_rx(info);
        e100_enable_rx_irq(info);
@@ -1647,7 +1646,7 @@ transmit_chars_dma(struct e100_serial *info)
                info->tr_running = 0;
 
 #if defined(CONFIG_ETRAX_RS485) && defined(CONFIG_ETRAX_FAST_TIMER)
-               if (info->rs485.enabled) {
+               if (info->rs485.flags & SER_RS485_ENABLED) {
                        /* Set a short timer to toggle RTS */
                        start_one_shot_timer(&fast_timers_rs485[info->line],
                                             rs485_toggle_rts_timer_function,
@@ -2577,7 +2576,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info)
        info->icount.tx++;
        if (info->xmit.head == info->xmit.tail) {
 #if defined(CONFIG_ETRAX_RS485) && defined(CONFIG_ETRAX_FAST_TIMER)
-               if (info->rs485.enabled) {
+               if (info->rs485.flags & SER_RS485_ENABLED) {
                        /* Set a short timer to toggle RTS */
                        start_one_shot_timer(&fast_timers_rs485[info->line],
                                             rs485_toggle_rts_timer_function,
@@ -3218,7 +3217,7 @@ rs_write(struct tty_struct *tty,
 #if defined(CONFIG_ETRAX_RS485)
        struct e100_serial *info = (struct e100_serial *)tty->driver_data;
 
-       if (info->rs485.enabled)
+       if (info->rs485.flags & SER_RS485_ENABLED)
        {
                /* If we are in RS-485 mode, we need to toggle RTS and disable
                 * the receiver before initiating a DMA transfer
@@ -3228,7 +3227,7 @@ rs_write(struct tty_struct *tty,
                fast_timers_rs485[info->line].function = NULL;
                del_fast_timer(&fast_timers_rs485[info->line]);
 #endif
-               e100_rts(info, info->rs485.rts_on_send);
+               e100_rts(info, (info->rs485.flags & SER_RS485_RTS_ON_SEND));
 #if defined(CONFIG_ETRAX_RS485_DISABLE_RECEIVER)
                e100_disable_rx(info);
                e100_enable_rx_irq(info);
@@ -3242,7 +3241,7 @@ rs_write(struct tty_struct *tty,
        count = rs_raw_write(tty, buf, count);
 
 #if defined(CONFIG_ETRAX_RS485)
-       if (info->rs485.enabled)
+       if (info->rs485.flags & SER_RS485_ENABLED)
        {
                unsigned int val;
                /* If we are in RS-485 mode the following has to be done:
@@ -3263,7 +3262,7 @@ rs_write(struct tty_struct *tty,
                        get_lsr_info(info, &val);
                }while (!(val & TIOCSER_TEMT));
 
-               e100_rts(info, info->rs485.rts_after_sent);
+               e100_rts(info, (info->rs485.flags & SER_RS485_RTS_AFTER_SEND));
 
 #if defined(CONFIG_ETRAX_RS485_DISABLE_RECEIVER)
                e100_enable_rx(info);
@@ -3678,14 +3677,52 @@ rs_ioctl(struct tty_struct *tty, struct file * file,
 #if defined(CONFIG_ETRAX_RS485)
        case TIOCSERSETRS485:
        {
+               /* In this ioctl we still use the old structure
+                * rs485_control for backward compatibility
+                * (if we use serial_rs485, then old user-level code
+                * wouldn't work anymore...).
+                * The use of this ioctl is deprecated: use TIOCSRS485
+                * instead.*/
                struct rs485_control rs485ctrl;
+               struct serial_rs485 rs485data;
+               printk(KERN_DEBUG "The use of this ioctl is deprecated. Use TIOCSRS485 instead\n");
                if (copy_from_user(&rs485ctrl, (struct rs485_control *)arg,
                                sizeof(rs485ctrl)))
                        return -EFAULT;
 
-               return e100_enable_rs485(tty, &rs485ctrl);
+               rs485data.delay_rts_before_send = rs485ctrl.delay_rts_before_send;
+               rs485data.flags = 0;
+               if (rs485ctrl.enabled)
+                       rs485data.flags |= SER_RS485_ENABLED;
+               else
+                       rs485data.flags &= ~(SER_RS485_ENABLED);
+
+               if (rs485ctrl.rts_on_send)
+                       rs485data.flags |= SER_RS485_RTS_ON_SEND;
+               else
+                       rs485data.flags &= ~(SER_RS485_RTS_ON_SEND);
+
+               if (rs485ctrl.rts_after_sent)
+                       rs485data.flags |= SER_RS485_RTS_AFTER_SEND;
+               else
+                       rs485data.flags &= ~(SER_RS485_RTS_AFTER_SEND);
+
+               return e100_enable_rs485(tty, &rs485data);
        }
 
+       case TIOCSRS485:
+       {
+               /* This is the new version of TIOCSRS485, with new
+                * data structure serial_rs485 */
+               struct serial_rs485 rs485data;
+               if (copy_from_user(&rs485data, (struct rs485_control *)arg,
+                               sizeof(rs485data)))
+                       return -EFAULT;
+
+               return e100_enable_rs485(tty, &rs485data);
+       }
+
+
        case TIOCSERWRRS485:
        {
                struct rs485_write rs485wr;
@@ -3827,8 +3864,8 @@ rs_close(struct tty_struct *tty, struct file * filp)
        /* port closed */
 
 #if defined(CONFIG_ETRAX_RS485)
-       if (info->rs485.enabled) {
-               info->rs485.enabled = 0;
+       if (info->rs485.flags & SER_RS485_ENABLED) {
+               info->rs485.flags &= ~(SER_RS485_ENABLED);
 #if defined(CONFIG_ETRAX_RS485_ON_PA)
                *R_PORT_PA_DATA = port_pa_data_shadow &= ~(1 << rs485_pa_bit);
 #endif
@@ -4493,10 +4530,10 @@ rs_init(void)
 
 #if defined(CONFIG_ETRAX_RS485)
                /* Set sane defaults */
-               info->rs485.rts_on_send = 0;
-               info->rs485.rts_after_sent = 1;
+               info->rs485.flags &= ~(SER_RS485_RTS_ON_SEND);
+               info->rs485.flags |= SER_RS485_RTS_AFTER_SEND;
                info->rs485.delay_rts_before_send = 0;
-               info->rs485.enabled = 0;
+               info->rs485.flags &= ~(SER_RS485_ENABLED);
 #endif
                INIT_WORK(&info->work, do_softint);
 
index f36a729..ea0beb4 100644 (file)
@@ -125,7 +125,7 @@ struct e100_serial {
        int errorcode;
 
 #ifdef CONFIG_ETRAX_RS485
-       struct rs485_control    rs485;  /* RS-485 support */
+       struct serial_rs485     rs485;  /* RS-485 support */
 #endif
 };
 
index 2b7531d..6579e2b 100644 (file)
@@ -1098,7 +1098,6 @@ static void icom_set_termios(struct uart_port *port,
 {
        int baud;
        unsigned cflag, iflag;
-       int bits;
        char new_config2;
        char new_config3 = 0;
        char tmp_byte;
@@ -1119,34 +1118,27 @@ static void icom_set_termios(struct uart_port *port,
        switch (cflag & CSIZE) {
        case CS5:               /* 5 bits/char */
                new_config2 |= ICOM_ACFG_5BPC;
-               bits = 7;
                break;
        case CS6:               /* 6 bits/char */
                new_config2 |= ICOM_ACFG_6BPC;
-               bits = 8;
                break;
        case CS7:               /* 7 bits/char */
                new_config2 |= ICOM_ACFG_7BPC;
-               bits = 9;
                break;
        case CS8:               /* 8 bits/char */
                new_config2 |= ICOM_ACFG_8BPC;
-               bits = 10;
                break;
        default:
-               bits = 10;
                break;
        }
        if (cflag & CSTOPB) {
                /* 2 stop bits */
                new_config2 |= ICOM_ACFG_2STOP_BIT;
-               bits++;
        }
        if (cflag & PARENB) {
                /* parity bit enabled */
                new_config2 |= ICOM_ACFG_PARITY_ENAB;
                trace(ICOM_PORT, "PARENB", 0);
-               bits++;
        }
        if (cflag & PARODD) {
                /* odd parity */
@@ -1322,7 +1314,6 @@ static struct uart_driver icom_uart_driver = {
 static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
 {
        u32 subsystem_id = icom_adapter->subsystem_id;
-       int retval = 0;
        int i;
        struct icom_port *icom_port;
 
@@ -1368,7 +1359,7 @@ static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
                }
        }
 
-       return retval;
+       return 0;
 }
 
 static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *icom_adapter, int port_num)
@@ -1391,7 +1382,6 @@ static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
 {
        struct icom_port *icom_port;
        int port_num;
-       int retval;
 
        for (port_num = 0; port_num < icom_adapter->numb_ports; port_num++) {
 
@@ -1405,7 +1395,7 @@ static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
                        icom_port->adapter = icom_adapter;
 
                        /* get port memory */
-                       if ((retval = get_port_memory(icom_port)) != 0) {
+                       if (get_port_memory(icom_port) != 0) {
                                dev_err(&icom_port->adapter->pci_dev->dev,
                                        "Memory allocation for port FAILED\n");
                        }
index ac79cbe..d2d32a1 100644 (file)
@@ -52,12 +52,11 @@ int jsm_debug;
 module_param(jsm_debug, int, 0);
 MODULE_PARM_DESC(jsm_debug, "Driver debugging level");
 
-static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
+static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        int rc = 0;
        struct jsm_board *brd;
        static int adapter_count = 0;
-       int retval;
 
        rc = pci_enable_device(pdev);
        if (rc) {
@@ -134,7 +133,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        rc = jsm_tty_init(brd);
        if (rc < 0) {
                dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc);
-               retval = -ENXIO;
+               rc = -ENXIO;
                goto out_free_irq;
        }
 
@@ -142,7 +141,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (rc < 0) {
                /* XXX: leaking all resources from jsm_tty_init here! */
                dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc);
-               retval = -ENXIO;
+               rc = -ENXIO;
                goto out_free_irq;
        }
 
@@ -161,7 +160,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                /* XXX: leaking all resources from jsm_tty_init and
                        jsm_uart_port_init here! */
                dev_err(&pdev->dev, "memory allocation for flipbuf failed\n");
-               retval = -ENOMEM;
+               rc = -ENOMEM;
                goto out_free_irq;
        }
 
index e6390d0..9dadaa1 100644 (file)
@@ -533,7 +533,6 @@ static void neo_copy_data_from_queue_to_uart(struct jsm_channel *ch)
        if (!(ch->ch_flags & (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM)))
                return;
 
-       len_written = 0;
        n = UART_17158_TX_FIFOSIZE - ch->ch_t_tlevel;
 
        /* cache head and tail of queue */
@@ -619,14 +618,10 @@ static void neo_parse_modem(struct jsm_channel *ch, u8 signals)
 /* Make the UART raise any of the output signals we want up */
 static void neo_assert_modem_signals(struct jsm_channel *ch)
 {
-       u8 out;
-
        if (!ch)
                return;
 
-       out = ch->ch_mostat;
-
-       writeb(out, &ch->ch_neo_uart->mcr);
+       writeb(ch->ch_mostat, &ch->ch_neo_uart->mcr);
 
        /* flush write operation */
        neo_pci_posting_flush(ch->ch_bd);
@@ -936,10 +931,9 @@ static inline void neo_parse_lsr(struct jsm_board *brd, u32 port)
 static void neo_param(struct jsm_channel *ch)
 {
        u8 lcr = 0;
-       u8 uart_lcr = 0;
-       u8 ier = 0;
-       u32 baud = 9600;
-       int quot = 0;
+       u8 uart_lcr, ier;
+       u32 baud;
+       int quot;
        struct jsm_board *bd;
 
        bd = ch->ch_bd;
index 324c74d..31496dc 100644 (file)
@@ -183,7 +183,6 @@ static void jsm_tty_break(struct uart_port *port, int break_state)
 static int jsm_tty_open(struct uart_port *port)
 {
        struct jsm_board *brd;
-       int rc = 0;
        struct jsm_channel *channel = (struct jsm_channel *)port;
        struct ktermios *termios;
 
@@ -265,7 +264,7 @@ static int jsm_tty_open(struct uart_port *port)
        channel->ch_open_count++;
 
        jsm_printk(OPEN, INFO, &channel->ch_bd->pci_dev, "finish\n");
-       return rc;
+       return 0;
 }
 
 static void jsm_tty_close(struct uart_port *port)
@@ -367,7 +366,7 @@ static struct uart_ops jsm_ops = {
  * Init the tty subsystem.  Called once per board after board has been
  * downloaded and init'ed.
  */
-int jsm_tty_init(struct jsm_board *brd)
+int __devinit jsm_tty_init(struct jsm_board *brd)
 {
        int i;
        void __iomem *vaddr;
@@ -431,7 +430,7 @@ int jsm_tty_init(struct jsm_board *brd)
        return 0;
 }
 
-int jsm_uart_port_init(struct jsm_board *brd)
+int __devinit jsm_uart_port_init(struct jsm_board *brd)
 {
        int i;
        struct jsm_channel *ch;
@@ -748,7 +747,7 @@ static void jsm_carrier(struct jsm_channel *ch)
 void jsm_check_queue_flow_control(struct jsm_channel *ch)
 {
        struct board_ops *bd_ops = ch->ch_bd->bd_ops;
-       int qleft = 0;
+       int qleft;
 
        /* Store how much space we have left in the queue */
        if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0)
@@ -834,7 +833,7 @@ void jsm_check_queue_flow_control(struct jsm_channel *ch)
  */
 int jsm_tty_write(struct uart_port *port)
 {
-       int bufcount = 0, n = 0;
+       int bufcount;
        int data_count = 0,data_count1 =0;
        u16 head;
        u16 tail;
@@ -850,14 +849,12 @@ int jsm_tty_write(struct uart_port *port)
        if ((bufcount = tail - head - 1) < 0)
                bufcount += WQUEUESIZE;
 
-       n = bufcount;
-
-       n = min(n, 56);
+       bufcount = min(bufcount, 56);
        remain = WQUEUESIZE - head;
 
        data_count = 0;
-       if (n >= remain) {
-               n -= remain;
+       if (bufcount >= remain) {
+               bufcount -= remain;
                while ((port->info->xmit.head != temp_tail) &&
                (data_count < remain)) {
                        channel->ch_wqueue[head++] =
@@ -871,8 +868,8 @@ int jsm_tty_write(struct uart_port *port)
        }
 
        data_count1 = 0;
-       if (n > 0) {
-               remain = n;
+       if (bufcount > 0) {
+               remain = bufcount;
                while ((port->info->xmit.head != temp_tail) &&
                        (data_count1 < remain)) {
                        channel->ch_wqueue[head++] =
diff --git a/drivers/serial/max3100.c b/drivers/serial/max3100.c
new file mode 100644 (file)
index 0000000..9fd33e5
--- /dev/null
@@ -0,0 +1,927 @@
+/*
+ *
+ *  Copyright (C) 2008 Christian Pellegrin <chripell@evolware.org>
+ *
+ * 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.
+ *
+ *
+ * Notes: the MAX3100 doesn't provide an interrupt on CTS so we have
+ * to use polling for flow control. TX empty IRQ is unusable, since
+ * writing conf clears FIFO buffer and we cannot have this interrupt
+ * always asking us for attention.
+ *
+ * Example platform data:
+
+ static struct plat_max3100 max3100_plat_data = {
+ .loopback = 0,
+ .crystal = 0,
+ .poll_time = 100,
+ };
+
+ static struct spi_board_info spi_board_info[] = {
+ {
+ .modalias     = "max3100",
+ .platform_data        = &max3100_plat_data,
+ .irq          = IRQ_EINT12,
+ .max_speed_hz = 5*1000*1000,
+ .chip_select  = 0,
+ },
+ };
+
+ * The initial minor number is 209 in the low-density serial port:
+ * mknod /dev/ttyMAX0 c 204 209
+ */
+
+#define MAX3100_MAJOR 204
+#define MAX3100_MINOR 209
+/* 4 MAX3100s should be enough for everyone */
+#define MAX_MAX3100 4
+
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/serial_core.h>
+#include <linux/serial.h>
+#include <linux/spi/spi.h>
+#include <linux/freezer.h>
+
+#include <linux/serial_max3100.h>
+
+#define MAX3100_C    (1<<14)
+#define MAX3100_D    (0<<14)
+#define MAX3100_W    (1<<15)
+#define MAX3100_RX   (0<<15)
+
+#define MAX3100_WC   (MAX3100_W  | MAX3100_C)
+#define MAX3100_RC   (MAX3100_RX | MAX3100_C)
+#define MAX3100_WD   (MAX3100_W  | MAX3100_D)
+#define MAX3100_RD   (MAX3100_RX | MAX3100_D)
+#define MAX3100_CMD  (3 << 14)
+
+#define MAX3100_T    (1<<14)
+#define MAX3100_R    (1<<15)
+
+#define MAX3100_FEN  (1<<13)
+#define MAX3100_SHDN (1<<12)
+#define MAX3100_TM   (1<<11)
+#define MAX3100_RM   (1<<10)
+#define MAX3100_PM   (1<<9)
+#define MAX3100_RAM  (1<<8)
+#define MAX3100_IR   (1<<7)
+#define MAX3100_ST   (1<<6)
+#define MAX3100_PE   (1<<5)
+#define MAX3100_L    (1<<4)
+#define MAX3100_BAUD (0xf)
+
+#define MAX3100_TE   (1<<10)
+#define MAX3100_RAFE (1<<10)
+#define MAX3100_RTS  (1<<9)
+#define MAX3100_CTS  (1<<9)
+#define MAX3100_PT   (1<<8)
+#define MAX3100_DATA (0xff)
+
+#define MAX3100_RT   (MAX3100_R | MAX3100_T)
+#define MAX3100_RTC  (MAX3100_RT | MAX3100_CTS | MAX3100_RAFE)
+
+/* the following simulate a status reg for ignore_status_mask */
+#define MAX3100_STATUS_PE 1
+#define MAX3100_STATUS_FE 2
+#define MAX3100_STATUS_OE 4
+
+struct max3100_port {
+       struct uart_port port;
+       struct spi_device *spi;
+
+       int cts;                /* last CTS received for flow ctrl */
+       int tx_empty;           /* last TX empty bit */
+
+       spinlock_t conf_lock;   /* shared data */
+       int conf_commit;        /* need to make changes */
+       int conf;               /* configuration for the MAX31000
+                                * (bits 0-7, bits 8-11 are irqs) */
+       int rts_commit;         /* need to change rts */
+       int rts;                /* rts status */
+       int baud;               /* current baud rate */
+
+       int parity;             /* keeps track if we should send parity */
+#define MAX3100_PARITY_ON 1
+#define MAX3100_PARITY_ODD 2
+#define MAX3100_7BIT 4
+       int rx_enabled;         /* if we should rx chars */
+
+       int irq;                /* irq assigned to the max3100 */
+
+       int minor;              /* minor number */
+       int crystal;            /* 1 if 3.6864Mhz crystal 0 for 1.8432 */
+       int loopback;           /* 1 if we are in loopback mode */
+
+       /* for handling irqs: need workqueue since we do spi_sync */
+       struct workqueue_struct *workqueue;
+       struct work_struct work;
+       /* set to 1 to make the workhandler exit as soon as possible */
+       int  force_end_work;
+       /* need to know we are suspending to avoid deadlock on workqueue */
+       int suspending;
+
+       /* hook for suspending MAX3100 via dedicated pin */
+       void (*max3100_hw_suspend) (int suspend);
+
+       /* poll time (in ms) for ctrl lines */
+       int poll_time;
+       /* and its timer */
+       struct timer_list       timer;
+};
+
+static struct max3100_port *max3100s[MAX_MAX3100]; /* the chips */
+static DEFINE_MUTEX(max3100s_lock);               /* race on probe */
+
+static int max3100_do_parity(struct max3100_port *s, u16 c)
+{
+       int parity;
+
+       if (s->parity & MAX3100_PARITY_ODD)
+               parity = 1;
+       else
+               parity = 0;
+
+       if (s->parity & MAX3100_7BIT)
+               c &= 0x7f;
+       else
+               c &= 0xff;
+
+       parity = parity ^ (hweight8(c) & 1);
+       return parity;
+}
+
+static int max3100_check_parity(struct max3100_port *s, u16 c)
+{
+       return max3100_do_parity(s, c) == ((c >> 8) & 1);
+}
+
+static void max3100_calc_parity(struct max3100_port *s, u16 *c)
+{
+       if (s->parity & MAX3100_7BIT)
+               *c &= 0x7f;
+       else
+               *c &= 0xff;
+
+       if (s->parity & MAX3100_PARITY_ON)
+               *c |= max3100_do_parity(s, *c) << 8;
+}
+
+static void max3100_work(struct work_struct *w);
+
+static void max3100_dowork(struct max3100_port *s)
+{
+       if (!s->force_end_work && !work_pending(&s->work) &&
+           !freezing(current) && !s->suspending)
+               queue_work(s->workqueue, &s->work);
+}
+
+static void max3100_timeout(unsigned long data)
+{
+       struct max3100_port *s = (struct max3100_port *)data;
+
+       if (s->port.info) {
+               max3100_dowork(s);
+               mod_timer(&s->timer, jiffies + s->poll_time);
+       }
+}
+
+static int max3100_sr(struct max3100_port *s, u16 tx, u16 *rx)
+{
+       struct spi_message message;
+       u16 etx, erx;
+       int status;
+       struct spi_transfer tran = {
+               .tx_buf = &etx,
+               .rx_buf = &erx,
+               .len = 2,
+       };
+
+       etx = cpu_to_be16(tx);
+       spi_message_init(&message);
+       spi_message_add_tail(&tran, &message);
+       status = spi_sync(s->spi, &message);
+       if (status) {
+               dev_warn(&s->spi->dev, "error while calling spi_sync\n");
+               return -EIO;
+       }
+       *rx = be16_to_cpu(erx);
+       s->tx_empty = (*rx & MAX3100_T) > 0;
+       dev_dbg(&s->spi->dev, "%04x - %04x\n", tx, *rx);
+       return 0;
+}
+
+static int max3100_handlerx(struct max3100_port *s, u16 rx)
+{
+       unsigned int ch, flg, status = 0;
+       int ret = 0, cts;
+
+       if (rx & MAX3100_R && s->rx_enabled) {
+               dev_dbg(&s->spi->dev, "%s\n", __func__);
+               ch = rx & (s->parity & MAX3100_7BIT ? 0x7f : 0xff);
+               if (rx & MAX3100_RAFE) {
+                       s->port.icount.frame++;
+                       flg = TTY_FRAME;
+                       status |= MAX3100_STATUS_FE;
+               } else {
+                       if (s->parity & MAX3100_PARITY_ON) {
+                               if (max3100_check_parity(s, rx)) {
+                                       s->port.icount.rx++;
+                                       flg = TTY_NORMAL;
+                               } else {
+                                       s->port.icount.parity++;
+                                       flg = TTY_PARITY;
+                                       status |= MAX3100_STATUS_PE;
+                               }
+                       } else {
+                               s->port.icount.rx++;
+                               flg = TTY_NORMAL;
+                       }
+               }
+               uart_insert_char(&s->port, status, MAX3100_STATUS_OE, ch, flg);
+               ret = 1;
+       }
+
+       cts = (rx & MAX3100_CTS) > 0;
+       if (s->cts != cts) {
+               s->cts = cts;
+               uart_handle_cts_change(&s->port, cts ? TIOCM_CTS : 0);
+       }
+
+       return ret;
+}
+
+static void max3100_work(struct work_struct *w)
+{
+       struct max3100_port *s = container_of(w, struct max3100_port, work);
+       int rxchars;
+       u16 tx, rx;
+       int conf, cconf, rts, crts;
+       struct circ_buf *xmit = &s->port.info->xmit;
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       rxchars = 0;
+       do {
+               spin_lock(&s->conf_lock);
+               conf = s->conf;
+               cconf = s->conf_commit;
+               s->conf_commit = 0;
+               rts = s->rts;
+               crts = s->rts_commit;
+               s->rts_commit = 0;
+               spin_unlock(&s->conf_lock);
+               if (cconf)
+                       max3100_sr(s, MAX3100_WC | conf, &rx);
+               if (crts) {
+                       max3100_sr(s, MAX3100_WD | MAX3100_TE |
+                                  (s->rts ? MAX3100_RTS : 0), &rx);
+                       rxchars += max3100_handlerx(s, rx);
+               }
+
+               max3100_sr(s, MAX3100_RD, &rx);
+               rxchars += max3100_handlerx(s, rx);
+
+               if (rx & MAX3100_T) {
+                       tx = 0xffff;
+                       if (s->port.x_char) {
+                               tx = s->port.x_char;
+                               s->port.icount.tx++;
+                               s->port.x_char = 0;
+                       } else if (!uart_circ_empty(xmit) &&
+                                  !uart_tx_stopped(&s->port)) {
+                               tx = xmit->buf[xmit->tail];
+                               xmit->tail = (xmit->tail + 1) &
+                                       (UART_XMIT_SIZE - 1);
+                               s->port.icount.tx++;
+                       }
+                       if (tx != 0xffff) {
+                               max3100_calc_parity(s, &tx);
+                               tx |= MAX3100_WD | (s->rts ? MAX3100_RTS : 0);
+                               max3100_sr(s, tx, &rx);
+                               rxchars += max3100_handlerx(s, rx);
+                       }
+               }
+
+               if (rxchars > 16 && s->port.info->port.tty != NULL) {
+                       tty_flip_buffer_push(s->port.info->port.tty);
+                       rxchars = 0;
+               }
+               if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+                       uart_write_wakeup(&s->port);
+
+       } while (!s->force_end_work &&
+                !freezing(current) &&
+                ((rx & MAX3100_R) ||
+                 (!uart_circ_empty(xmit) &&
+                  !uart_tx_stopped(&s->port))));
+
+       if (rxchars > 0 && s->port.info->port.tty != NULL)
+               tty_flip_buffer_push(s->port.info->port.tty);
+}
+
+static irqreturn_t max3100_irq(int irqno, void *dev_id)
+{
+       struct max3100_port *s = dev_id;
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       max3100_dowork(s);
+       return IRQ_HANDLED;
+}
+
+static void max3100_enable_ms(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       if (s->poll_time > 0)
+               mod_timer(&s->timer, jiffies);
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+}
+
+static void max3100_start_tx(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       max3100_dowork(s);
+}
+
+static void max3100_stop_rx(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       s->rx_enabled = 0;
+       spin_lock(&s->conf_lock);
+       s->conf &= ~MAX3100_RM;
+       s->conf_commit = 1;
+       spin_unlock(&s->conf_lock);
+       max3100_dowork(s);
+}
+
+static unsigned int max3100_tx_empty(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       /* may not be truly up-to-date */
+       max3100_dowork(s);
+       return s->tx_empty;
+}
+
+static unsigned int max3100_get_mctrl(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       /* may not be truly up-to-date */
+       max3100_dowork(s);
+       /* always assert DCD and DSR since these lines are not wired */
+       return (s->cts ? TIOCM_CTS : 0) | TIOCM_DSR | TIOCM_CAR;
+}
+
+static void max3100_set_mctrl(struct uart_port *port, unsigned int mctrl)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+       int rts;
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       rts = (mctrl & TIOCM_RTS) > 0;
+
+       spin_lock(&s->conf_lock);
+       if (s->rts != rts) {
+               s->rts = rts;
+               s->rts_commit = 1;
+               max3100_dowork(s);
+       }
+       spin_unlock(&s->conf_lock);
+}
+
+static void
+max3100_set_termios(struct uart_port *port, struct ktermios *termios,
+                   struct ktermios *old)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+       int baud = 0;
+       unsigned cflag;
+       u32 param_new, param_mask, parity = 0;
+       struct tty_struct *tty = s->port.info->port.tty;
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+       if (!tty)
+               return;
+
+       cflag = termios->c_cflag;
+       param_new = 0;
+       param_mask = 0;
+
+       baud = tty_get_baud_rate(tty);
+       param_new = s->conf & MAX3100_BAUD;
+       switch (baud) {
+       case 300:
+               if (s->crystal)
+                       baud = s->baud;
+               else
+                       param_new = 15;
+               break;
+       case 600:
+               param_new = 14 + s->crystal;
+               break;
+       case 1200:
+               param_new = 13 + s->crystal;
+               break;
+       case 2400:
+               param_new = 12 + s->crystal;
+               break;
+       case 4800:
+               param_new = 11 + s->crystal;
+               break;
+       case 9600:
+               param_new = 10 + s->crystal;
+               break;
+       case 19200:
+               param_new = 9 + s->crystal;
+               break;
+       case 38400:
+               param_new = 8 + s->crystal;
+               break;
+       case 57600:
+               param_new = 1 + s->crystal;
+               break;
+       case 115200:
+               param_new = 0 + s->crystal;
+               break;
+       case 230400:
+               if (s->crystal)
+                       param_new = 0;
+               else
+                       baud = s->baud;
+               break;
+       default:
+               baud = s->baud;
+       }
+       tty_encode_baud_rate(tty, baud, baud);
+       s->baud = baud;
+       param_mask |= MAX3100_BAUD;
+
+       if ((cflag & CSIZE) == CS8) {
+               param_new &= ~MAX3100_L;
+               parity &= ~MAX3100_7BIT;
+       } else {
+               param_new |= MAX3100_L;
+               parity |= MAX3100_7BIT;
+               cflag = (cflag & ~CSIZE) | CS7;
+       }
+       param_mask |= MAX3100_L;
+
+       if (cflag & CSTOPB)
+               param_new |= MAX3100_ST;
+       else
+               param_new &= ~MAX3100_ST;
+       param_mask |= MAX3100_ST;
+
+       if (cflag & PARENB) {
+               param_new |= MAX3100_PE;
+               parity |= MAX3100_PARITY_ON;
+       } else {
+               param_new &= ~MAX3100_PE;
+               parity &= ~MAX3100_PARITY_ON;
+       }
+       param_mask |= MAX3100_PE;
+
+       if (cflag & PARODD)
+               parity |= MAX3100_PARITY_ODD;
+       else
+               parity &= ~MAX3100_PARITY_ODD;
+
+       /* mask termios capabilities we don't support */
+       cflag &= ~CMSPAR;
+       termios->c_cflag = cflag;
+
+       s->port.ignore_status_mask = 0;
+       if (termios->c_iflag & IGNPAR)
+               s->port.ignore_status_mask |=
+                       MAX3100_STATUS_PE | MAX3100_STATUS_FE |
+                       MAX3100_STATUS_OE;
+
+       /* we are sending char from a workqueue so enable */
+       s->port.info->port.tty->low_latency = 1;
+
+       if (s->poll_time > 0)
+               del_timer_sync(&s->timer);
+
+       uart_update_timeout(port, termios->c_cflag, baud);
+
+       spin_lock(&s->conf_lock);
+       s->conf = (s->conf & ~param_mask) | (param_new & param_mask);
+       s->conf_commit = 1;
+       s->parity = parity;
+       spin_unlock(&s->conf_lock);
+       max3100_dowork(s);
+
+       if (UART_ENABLE_MS(&s->port, termios->c_cflag))
+               max3100_enable_ms(&s->port);
+}
+
+static void max3100_shutdown(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       if (s->suspending)
+               return;
+
+       s->force_end_work = 1;
+
+       if (s->poll_time > 0)
+               del_timer_sync(&s->timer);
+
+       if (s->workqueue) {
+               flush_workqueue(s->workqueue);
+               destroy_workqueue(s->workqueue);
+               s->workqueue = NULL;
+       }
+       if (s->irq)
+               free_irq(s->irq, s);
+
+       /* set shutdown mode to save power */
+       if (s->max3100_hw_suspend)
+               s->max3100_hw_suspend(1);
+       else  {
+               u16 tx, rx;
+
+               tx = MAX3100_WC | MAX3100_SHDN;
+               max3100_sr(s, tx, &rx);
+       }
+}
+
+static int max3100_startup(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+       char b[12];
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       s->conf = MAX3100_RM;
+       s->baud = s->crystal ? 230400 : 115200;
+       s->rx_enabled = 1;
+
+       if (s->suspending)
+               return 0;
+
+       s->force_end_work = 0;
+       s->parity = 0;
+       s->rts = 0;
+
+       sprintf(b, "max3100-%d", s->minor);
+       s->workqueue = create_freezeable_workqueue(b);
+       if (!s->workqueue) {
+               dev_warn(&s->spi->dev, "cannot create workqueue\n");
+               return -EBUSY;
+       }
+       INIT_WORK(&s->work, max3100_work);
+
+       if (request_irq(s->irq, max3100_irq,
+                       IRQF_TRIGGER_FALLING, "max3100", s) < 0) {
+               dev_warn(&s->spi->dev, "cannot allocate irq %d\n", s->irq);
+               s->irq = 0;
+               destroy_workqueue(s->workqueue);
+               s->workqueue = NULL;
+               return -EBUSY;
+       }
+
+       if (s->loopback) {
+               u16 tx, rx;
+               tx = 0x4001;
+               max3100_sr(s, tx, &rx);
+       }
+
+       if (s->max3100_hw_suspend)
+               s->max3100_hw_suspend(0);
+       s->conf_commit = 1;
+       max3100_dowork(s);
+       /* wait for clock to settle */
+       msleep(50);
+
+       max3100_enable_ms(&s->port);
+
+       return 0;
+}
+
+static const char *max3100_type(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       return s->port.type == PORT_MAX3100 ? "MAX3100" : NULL;
+}
+
+static void max3100_release_port(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+}
+
+static void max3100_config_port(struct uart_port *port, int flags)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       if (flags & UART_CONFIG_TYPE)
+               s->port.type = PORT_MAX3100;
+}
+
+static int max3100_verify_port(struct uart_port *port,
+                              struct serial_struct *ser)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+       int ret = -EINVAL;
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       if (ser->type == PORT_UNKNOWN || ser->type == PORT_MAX3100)
+               ret = 0;
+       return ret;
+}
+
+static void max3100_stop_tx(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+}
+
+static int max3100_request_port(struct uart_port *port)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+       return 0;
+}
+
+static void max3100_break_ctl(struct uart_port *port, int break_state)
+{
+       struct max3100_port *s = container_of(port,
+                                             struct max3100_port,
+                                             port);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+}
+
+static struct uart_ops max3100_ops = {
+       .tx_empty       = max3100_tx_empty,
+       .set_mctrl      = max3100_set_mctrl,
+       .get_mctrl      = max3100_get_mctrl,
+       .stop_tx        = max3100_stop_tx,
+       .start_tx       = max3100_start_tx,
+       .stop_rx        = max3100_stop_rx,
+       .enable_ms      = max3100_enable_ms,
+       .break_ctl      = max3100_break_ctl,
+       .startup        = max3100_startup,
+       .shutdown       = max3100_shutdown,
+       .set_termios    = max3100_set_termios,
+       .type           = max3100_type,
+       .release_port   = max3100_release_port,
+       .request_port   = max3100_request_port,
+       .config_port    = max3100_config_port,
+       .verify_port    = max3100_verify_port,
+};
+
+static struct uart_driver max3100_uart_driver = {
+       .owner          = THIS_MODULE,
+       .driver_name    = "ttyMAX",
+       .dev_name       = "ttyMAX",
+       .major          = MAX3100_MAJOR,
+       .minor          = MAX3100_MINOR,
+       .nr             = MAX_MAX3100,
+};
+static int uart_driver_registered;
+
+static int __devinit max3100_probe(struct spi_device *spi)
+{
+       int i, retval;
+       struct plat_max3100 *pdata;
+       u16 tx, rx;
+
+       mutex_lock(&max3100s_lock);
+
+       if (!uart_driver_registered) {
+               uart_driver_registered = 1;
+               retval = uart_register_driver(&max3100_uart_driver);
+               if (retval) {
+                       printk(KERN_ERR "Couldn't register max3100 uart driver\n");
+                       mutex_unlock(&max3100s_lock);
+                       return retval;
+               }
+       }
+
+       for (i = 0; i < MAX_MAX3100; i++)
+               if (!max3100s[i])
+                       break;
+       if (i == MAX_MAX3100) {
+               dev_warn(&spi->dev, "too many MAX3100 chips\n");
+               mutex_unlock(&max3100s_lock);
+               return -ENOMEM;
+       }
+
+       max3100s[i] = kzalloc(sizeof(struct max3100_port), GFP_KERNEL);
+       if (!max3100s[i]) {
+               dev_warn(&spi->dev,
+                        "kmalloc for max3100 structure %d failed!\n", i);
+               mutex_unlock(&max3100s_lock);
+               return -ENOMEM;
+       }
+       max3100s[i]->spi = spi;
+       max3100s[i]->irq = spi->irq;
+       spin_lock_init(&max3100s[i]->conf_lock);
+       dev_set_drvdata(&spi->dev, max3100s[i]);
+       pdata = spi->dev.platform_data;
+       max3100s[i]->crystal = pdata->crystal;
+       max3100s[i]->loopback = pdata->loopback;
+       max3100s[i]->poll_time = pdata->poll_time * HZ / 1000;
+       if (pdata->poll_time > 0 && max3100s[i]->poll_time == 0)
+               max3100s[i]->poll_time = 1;
+       max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend;
+       max3100s[i]->minor = i;
+       init_timer(&max3100s[i]->timer);
+       max3100s[i]->timer.function = max3100_timeout;
+       max3100s[i]->timer.data = (unsigned long) max3100s[i];
+
+       dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i);
+       max3100s[i]->port.irq = max3100s[i]->irq;
+       max3100s[i]->port.uartclk = max3100s[i]->crystal ? 3686400 : 1843200;
+       max3100s[i]->port.fifosize = 16;
+       max3100s[i]->port.ops = &max3100_ops;
+       max3100s[i]->port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
+       max3100s[i]->port.line = i;
+       max3100s[i]->port.type = PORT_MAX3100;
+       max3100s[i]->port.dev = &spi->dev;
+       retval = uart_add_one_port(&max3100_uart_driver, &max3100s[i]->port);
+       if (retval < 0)
+               dev_warn(&spi->dev,
+                        "uart_add_one_port failed for line %d with error %d\n",
+                        i, retval);
+
+       /* set shutdown mode to save power. Will be woken-up on open */
+       if (max3100s[i]->max3100_hw_suspend)
+               max3100s[i]->max3100_hw_suspend(1);
+       else {
+               tx = MAX3100_WC | MAX3100_SHDN;
+               max3100_sr(max3100s[i], tx, &rx);
+       }
+       mutex_unlock(&max3100s_lock);
+       return 0;
+}
+
+static int __devexit max3100_remove(struct spi_device *spi)
+{
+       struct max3100_port *s = dev_get_drvdata(&spi->dev);
+       int i;
+
+       mutex_lock(&max3100s_lock);
+
+       /* find out the index for the chip we are removing */
+       for (i = 0; i < MAX_MAX3100; i++)
+               if (max3100s[i] == s)
+                       break;
+
+       dev_dbg(&spi->dev, "%s: removing port %d\n", __func__, i);
+       uart_remove_one_port(&max3100_uart_driver, &max3100s[i]->port);
+       kfree(max3100s[i]);
+       max3100s[i] = NULL;
+
+       /* check if this is the last chip we have */
+       for (i = 0; i < MAX_MAX3100; i++)
+               if (max3100s[i]) {
+                       mutex_unlock(&max3100s_lock);
+                       return 0;
+               }
+       pr_debug("removing max3100 driver\n");
+       uart_unregister_driver(&max3100_uart_driver);
+
+       mutex_unlock(&max3100s_lock);
+       return 0;
+}
+
+#ifdef CONFIG_PM
+
+static int max3100_suspend(struct spi_device *spi, pm_message_t state)
+{
+       struct max3100_port *s = dev_get_drvdata(&spi->dev);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       disable_irq(s->irq);
+
+       s->suspending = 1;
+       uart_suspend_port(&max3100_uart_driver, &s->port);
+
+       if (s->max3100_hw_suspend)
+               s->max3100_hw_suspend(1);
+       else {
+               /* no HW suspend, so do SW one */
+               u16 tx, rx;
+
+               tx = MAX3100_WC | MAX3100_SHDN;
+               max3100_sr(s, tx, &rx);
+       }
+       return 0;
+}
+
+static int max3100_resume(struct spi_device *spi)
+{
+       struct max3100_port *s = dev_get_drvdata(&spi->dev);
+
+       dev_dbg(&s->spi->dev, "%s\n", __func__);
+
+       if (s->max3100_hw_suspend)
+               s->max3100_hw_suspend(0);
+       uart_resume_port(&max3100_uart_driver, &s->port);
+       s->suspending = 0;
+
+       enable_irq(s->irq);
+
+       s->conf_commit = 1;
+       if (s->workqueue)
+               max3100_dowork(s);
+
+       return 0;
+}
+
+#else
+#define max3100_suspend NULL
+#define max3100_resume  NULL
+#endif
+
+static struct spi_driver max3100_driver = {
+       .driver = {
+               .name           = "max3100",
+               .bus            = &spi_bus_type,
+               .owner          = THIS_MODULE,
+       },
+
+       .probe          = max3100_probe,
+       .remove         = __devexit_p(max3100_remove),
+       .suspend        = max3100_suspend,
+       .resume         = max3100_resume,
+};
+
+static int __init max3100_init(void)
+{
+       return spi_register_driver(&max3100_driver);
+}
+module_init(max3100_init);
+
+static void __exit max3100_exit(void)
+{
+       spi_unregister_driver(&max3100_driver);
+}
+module_exit(max3100_exit);
+
+MODULE_DESCRIPTION("MAX3100 driver");
+MODULE_AUTHOR("Christian Pellegrin <chripell@evolware.org>");
+MODULE_LICENSE("GPL");
index ad34885..9c1243f 100644 (file)
@@ -1538,6 +1538,21 @@ no_dma:
        uap->port.type = PORT_PMAC_ZILOG;
        uap->port.flags = 0;
 
+       /*
+        * Fixup for the port on Gatwick for which the device-tree has
+        * missing interrupts. Normally, the macio_dev would contain
+        * fixed up interrupt info, but we use the device-tree directly
+        * here due to early probing so we need the fixup too.
+        */
+       if (uap->port.irq == NO_IRQ &&
+           np->parent && np->parent->parent &&
+           of_device_is_compatible(np->parent->parent, "gatwick")) {
+               /* IRQs on gatwick are offset by 64 */
+               uap->port.irq = irq_create_mapping(NULL, 64 + 15);
+               uap->tx_dma_irq = irq_create_mapping(NULL, 64 + 4);
+               uap->rx_dma_irq = irq_create_mapping(NULL, 64 + 5);
+       }
+
        /* Setup some valid baud rate information in the register
         * shadows so we don't write crap there before baud rate is
         * first initialized.
index a4dc79b..47c6837 100644 (file)
@@ -1178,7 +1178,7 @@ static struct uart_driver sunsu_reg = {
        .major                  = TTY_MAJOR,
 };
 
-static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up)
+static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up)
 {
        int quot, baud;
 #ifdef CONFIG_SERIO
index 315a933..7de66c0 100644 (file)
@@ -1274,6 +1274,7 @@ static int ucc_uart_probe(struct of_device *ofdev,
        if (!iprop) {
                iprop = of_get_property(np, "device-id", NULL);
                if (!iprop) {
+                       kfree(qe_port);
                        dev_err(&ofdev->dev, "UCC is unspecified in "
                                "device tree\n");
                        return -EINVAL;
index a0aa33d..816d4c5 100644 (file)
@@ -617,9 +617,9 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
        pci_set_master(pdev);
 
 #ifdef USE_64BIT_DMA
-        ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+        ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
         if (!ret) {
-                ret = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+                ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
                 if (ret < 0) {
                         printk(KERN_WARNING "%s: Unable to obtain 64 bit DMA "
                                "for consistent allocations\n",
index 33fcef3..c1688c7 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/workqueue.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/gpio.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -53,6 +54,7 @@ MODULE_ALIAS("platform:pxa2xx-spi");
 #define RESET_DMA_CHANNEL      (DCSR_NODESC | DMA_INT_MASK)
 #define IS_DMA_ALIGNED(x)      ((((u32)(x)) & 0x07) == 0)
 #define MAX_DMA_LEN            8191
+#define DMA_ALIGNMENT          8
 
 /*
  * for testing SSCR1 changes that require SSP restart, basically
@@ -166,6 +168,8 @@ struct chip_data {
        u8 enable_dma;
        u8 bits_per_word;
        u32 speed_hz;
+       int gpio_cs;
+       int gpio_cs_inverted;
        int (*write)(struct driver_data *drv_data);
        int (*read)(struct driver_data *drv_data);
        void (*cs_control)(u32 command);
@@ -173,6 +177,32 @@ struct chip_data {
 
 static void pump_messages(struct work_struct *work);
 
+static void cs_assert(struct driver_data *drv_data)
+{
+       struct chip_data *chip = drv_data->cur_chip;
+
+       if (chip->cs_control) {
+               chip->cs_control(PXA2XX_CS_ASSERT);
+               return;
+       }
+
+       if (gpio_is_valid(chip->gpio_cs))
+               gpio_set_value(chip->gpio_cs, chip->gpio_cs_inverted);
+}
+
+static void cs_deassert(struct driver_data *drv_data)
+{
+       struct chip_data *chip = drv_data->cur_chip;
+
+       if (chip->cs_control) {
+               chip->cs_control(PXA2XX_CS_ASSERT);
+               return;
+       }
+
+       if (gpio_is_valid(chip->gpio_cs))
+               gpio_set_value(chip->gpio_cs, !chip->gpio_cs_inverted);
+}
+
 static int flush(struct driver_data *drv_data)
 {
        unsigned long limit = loops_per_jiffy << 1;
@@ -189,10 +219,6 @@ static int flush(struct driver_data *drv_data)
        return limit;
 }
 
-static void null_cs_control(u32 command)
-{
-}
-
 static int null_writer(struct driver_data *drv_data)
 {
        void __iomem *reg = drv_data->ioaddr;
@@ -400,7 +426,6 @@ static void giveback(struct driver_data *drv_data)
        msg = drv_data->cur_msg;
        drv_data->cur_msg = NULL;
        drv_data->cur_transfer = NULL;
-       drv_data->cur_chip = NULL;
        queue_work(drv_data->workqueue, &drv_data->pump_messages);
        spin_unlock_irqrestore(&drv_data->lock, flags);
 
@@ -416,7 +441,7 @@ static void giveback(struct driver_data *drv_data)
         * a message with an error, or next message is for another chip
         */
        if (!last_transfer->cs_change)
-               drv_data->cs_control(PXA2XX_CS_DEASSERT);
+               cs_deassert(drv_data);
        else {
                struct spi_message *next_msg;
 
@@ -445,12 +470,14 @@ static void giveback(struct driver_data *drv_data)
                if (next_msg && next_msg->spi != msg->spi)
                        next_msg = NULL;
                if (!next_msg || msg->state == ERROR_STATE)
-                       drv_data->cs_control(PXA2XX_CS_DEASSERT);
+                       cs_deassert(drv_data);
        }
 
        msg->state = NULL;
        if (msg->complete)
                msg->complete(msg->context);
+
+       drv_data->cur_chip = NULL;
 }
 
 static int wait_ssp_rx_stall(void const __iomem *ioaddr)
@@ -887,7 +914,7 @@ static void pump_transfers(unsigned long data)
 
                /* Drop chip select only if cs_change is requested */
                if (previous->cs_change)
-                       drv_data->cs_control(PXA2XX_CS_DEASSERT);
+                       cs_deassert(drv_data);
        }
 
        /* Check for transfers that need multiple DMA segments */
@@ -922,7 +949,6 @@ static void pump_transfers(unsigned long data)
        }
        drv_data->n_bytes = chip->n_bytes;
        drv_data->dma_width = chip->dma_width;
-       drv_data->cs_control = chip->cs_control;
        drv_data->tx = (void *)transfer->tx_buf;
        drv_data->tx_end = drv_data->tx + transfer->len;
        drv_data->rx = transfer->rx_buf;
@@ -1084,11 +1110,7 @@ static void pump_transfers(unsigned long data)
                        write_SSTO(chip->timeout, reg);
        }
 
-       /* FIXME, need to handle cs polarity,
-        * this driver uses struct pxa2xx_spi_chip.cs_control to
-        * specify a CS handling function, and it ignores most
-        * struct spi_device.mode[s], including SPI_CS_HIGH */
-       drv_data->cs_control(PXA2XX_CS_ASSERT);
+       cs_assert(drv_data);
 
        /* after chip select, release the data by enabling service
         * requests and interrupts, without changing any mode bits */
@@ -1166,6 +1188,44 @@ static int transfer(struct spi_device *spi, struct spi_message *msg)
 /* the spi->mode bits understood by this driver: */
 #define MODEBITS (SPI_CPOL | SPI_CPHA)
 
+static int setup_cs(struct spi_device *spi, struct chip_data *chip,
+                   struct pxa2xx_spi_chip *chip_info)
+{
+       int err = 0;
+
+       if (chip == NULL || chip_info == NULL)
+               return 0;
+
+       /* NOTE: setup() can be called multiple times, possibly with
+        * different chip_info, release previously requested GPIO
+        */
+       if (gpio_is_valid(chip->gpio_cs))
+               gpio_free(chip->gpio_cs);
+
+       /* If (*cs_control) is provided, ignore GPIO chip select */
+       if (chip_info->cs_control) {
+               chip->cs_control = chip_info->cs_control;
+               return 0;
+       }
+
+       if (gpio_is_valid(chip_info->gpio_cs)) {
+               err = gpio_request(chip_info->gpio_cs, "SPI_CS");
+               if (err) {
+                       dev_err(&spi->dev, "failed to request chip select "
+                                       "GPIO%d\n", chip_info->gpio_cs);
+                       return err;
+               }
+
+               chip->gpio_cs = chip_info->gpio_cs;
+               chip->gpio_cs_inverted = spi->mode & SPI_CS_HIGH;
+
+               err = gpio_direction_output(chip->gpio_cs,
+                                       !chip->gpio_cs_inverted);
+       }
+
+       return err;
+}
+
 static int setup(struct spi_device *spi)
 {
        struct pxa2xx_spi_chip *chip_info = NULL;
@@ -1211,7 +1271,7 @@ static int setup(struct spi_device *spi)
                        return -ENOMEM;
                }
 
-               chip->cs_control = null_cs_control;
+               chip->gpio_cs = -1;
                chip->enable_dma = 0;
                chip->timeout = TIMOUT_DFLT;
                chip->dma_burst_size = drv_data->master_info->enable_dma ?
@@ -1225,8 +1285,6 @@ static int setup(struct spi_device *spi)
        /* chip_info isn't always needed */
        chip->cr1 = 0;
        if (chip_info) {
-               if (chip_info->cs_control)
-                       chip->cs_control = chip_info->cs_control;
                if (chip_info->timeout)
                        chip->timeout = chip_info->timeout;
                if (chip_info->tx_threshold)
@@ -1308,13 +1366,16 @@ static int setup(struct spi_device *spi)
 
        spi_set_ctldata(spi, chip);
 
-       return 0;
+       return setup_cs(spi, chip, chip_info);
 }
 
 static void cleanup(struct spi_device *spi)
 {
        struct chip_data *chip = spi_get_ctldata(spi);
 
+       if (gpio_is_valid(chip->gpio_cs))
+               gpio_free(chip->gpio_cs);
+
        kfree(chip);
 }
 
@@ -1438,6 +1499,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
 
        master->bus_num = pdev->id;
        master->num_chipselect = platform_info->num_chipselect;
+       master->dma_alignment = DMA_ALIGNMENT;
        master->cleanup = cleanup;
        master->setup = setup;
        master->transfer = transfer;
index 3410b0c..f014cc2 100644 (file)
 #include <asm/dma.h>
 #include <asm/portmux.h>
 #include <asm/bfin5xx_spi.h>
+#include <asm/cacheflush.h>
 
 #define DRV_NAME       "bfin-spi"
 #define DRV_AUTHOR     "Bryan Wu, Luke Yang"
-#define DRV_DESC       "Blackfin BF5xx on-chip SPI Controller Driver"
+#define DRV_DESC       "Blackfin on-chip SPI Controller Driver"
 #define DRV_VERSION    "1.0"
 
 MODULE_AUTHOR(DRV_AUTHOR);
 MODULE_DESCRIPTION(DRV_DESC);
 MODULE_LICENSE("GPL");
 
-#define IS_DMA_ALIGNED(x) (((u32)(x)&0x07) == 0)
-
 #define START_STATE    ((void *)0)
 #define RUNNING_STATE  ((void *)1)
 #define DONE_STATE     ((void *)2)
@@ -44,6 +43,9 @@ MODULE_LICENSE("GPL");
 #define QUEUE_RUNNING  0
 #define QUEUE_STOPPED  1
 
+/* Value to send if no TX value is supplied */
+#define SPI_IDLE_TXVAL 0x0000
+
 struct driver_data {
        /* Driver model hookup */
        struct platform_device *pdev;
@@ -110,6 +112,8 @@ struct chip_data {
        u8 bits_per_word;       /* 8 or 16 */
        u8 cs_change_per_word;
        u16 cs_chg_udelay;      /* Some devices require > 255usec delay */
+       u32 cs_gpio;
+       u16 idle_tx_val;
        void (*write) (struct driver_data *);
        void (*read) (struct driver_data *);
        void (*duplex) (struct driver_data *);
@@ -154,10 +158,13 @@ static u16 hz_to_spi_baud(u32 speed_hz)
        if ((sclk % (2 * speed_hz)) > 0)
                spi_baud++;
 
+       if (spi_baud < MIN_SPI_BAUD_VAL)
+               spi_baud = MIN_SPI_BAUD_VAL;
+
        return spi_baud;
 }
 
-static int flush(struct driver_data *drv_data)
+static int bfin_spi_flush(struct driver_data *drv_data)
 {
        unsigned long limit = loops_per_jiffy << 1;
 
@@ -171,33 +178,40 @@ static int flush(struct driver_data *drv_data)
 }
 
 /* Chip select operation functions for cs_change flag */
-static void cs_active(struct driver_data *drv_data, struct chip_data *chip)
+static void bfin_spi_cs_active(struct driver_data *drv_data, struct chip_data *chip)
 {
-       u16 flag = read_FLAG(drv_data);
+       if (likely(chip->chip_select_num)) {
+               u16 flag = read_FLAG(drv_data);
 
-       flag |= chip->flag;
-       flag &= ~(chip->flag << 8);
+               flag |= chip->flag;
+               flag &= ~(chip->flag << 8);
 
-       write_FLAG(drv_data, flag);
+               write_FLAG(drv_data, flag);
+       } else {
+               gpio_set_value(chip->cs_gpio, 0);
+       }
 }
 
-static void cs_deactive(struct driver_data *drv_data, struct chip_data *chip)
+static void bfin_spi_cs_deactive(struct driver_data *drv_data, struct chip_data *chip)
 {
-       u16 flag = read_FLAG(drv_data);
+       if (likely(chip->chip_select_num)) {
+               u16 flag = read_FLAG(drv_data);
 
-       flag |= (chip->flag << 8);
+               flag &= ~chip->flag;
+               flag |= (chip->flag << 8);
 
-       write_FLAG(drv_data, flag);
+               write_FLAG(drv_data, flag);
+       } else {
+               gpio_set_value(chip->cs_gpio, 1);
+       }
 
        /* Move delay here for consistency */
        if (chip->cs_chg_udelay)
                udelay(chip->cs_chg_udelay);
 }
 
-#define MAX_SPI_SSEL   7
-
 /* stop controller and re-config current chip*/
-static void restore_state(struct driver_data *drv_data)
+static void bfin_spi_restore_state(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
 
@@ -211,294 +225,256 @@ static void restore_state(struct driver_data *drv_data)
        write_BAUD(drv_data, chip->baud);
 
        bfin_spi_enable(drv_data);
-       cs_active(drv_data, chip);
+       bfin_spi_cs_active(drv_data, chip);
 }
 
-/* used to kick off transfer in rx mode */
-static unsigned short dummy_read(struct driver_data *drv_data)
+/* used to kick off transfer in rx mode and read unwanted RX data */
+static inline void bfin_spi_dummy_read(struct driver_data *drv_data)
 {
-       unsigned short tmp;
-       tmp = read_RDBR(drv_data);
-       return tmp;
+       (void) read_RDBR(drv_data);
 }
 
-static void null_writer(struct driver_data *drv_data)
+static void bfin_spi_null_writer(struct driver_data *drv_data)
 {
        u8 n_bytes = drv_data->n_bytes;
+       u16 tx_val = drv_data->cur_chip->idle_tx_val;
+
+       /* clear RXS (we check for RXS inside the loop) */
+       bfin_spi_dummy_read(drv_data);
 
        while (drv_data->tx < drv_data->tx_end) {
-               write_TDBR(drv_data, 0);
-               while ((read_STAT(drv_data) & BIT_STAT_TXS))
-                       cpu_relax();
+               write_TDBR(drv_data, tx_val);
                drv_data->tx += n_bytes;
+               /* wait until transfer finished.
+                  checking SPIF or TXS may not guarantee transfer completion */
+               while (!(read_STAT(drv_data) & BIT_STAT_RXS))
+                       cpu_relax();
+               /* discard RX data and clear RXS */
+               bfin_spi_dummy_read(drv_data);
        }
 }
 
-static void null_reader(struct driver_data *drv_data)
+static void bfin_spi_null_reader(struct driver_data *drv_data)
 {
        u8 n_bytes = drv_data->n_bytes;
-       dummy_read(drv_data);
+       u16 tx_val = drv_data->cur_chip->idle_tx_val;
+
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
 
        while (drv_data->rx < drv_data->rx_end) {
+               write_TDBR(drv_data, tx_val);
+               drv_data->rx += n_bytes;
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-               dummy_read(drv_data);
-               drv_data->rx += n_bytes;
+               bfin_spi_dummy_read(drv_data);
        }
 }
 
-static void u8_writer(struct driver_data *drv_data)
+static void bfin_spi_u8_writer(struct driver_data *drv_data)
 {
-       dev_dbg(&drv_data->pdev->dev,
-               "cr8-s is 0x%x\n", read_STAT(drv_data));
+       /* clear RXS (we check for RXS inside the loop) */
+       bfin_spi_dummy_read(drv_data);
 
        while (drv_data->tx < drv_data->tx_end) {
-               write_TDBR(drv_data, (*(u8 *) (drv_data->tx)));
-               while (read_STAT(drv_data) & BIT_STAT_TXS)
+               write_TDBR(drv_data, (*(u8 *) (drv_data->tx++)));
+               /* wait until transfer finished.
+                  checking SPIF or TXS may not guarantee transfer completion */
+               while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-               ++drv_data->tx;
+               /* discard RX data and clear RXS */
+               bfin_spi_dummy_read(drv_data);
        }
-
-       /* poll for SPI completion before return */
-       while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-               cpu_relax();
 }
 
-static void u8_cs_chg_writer(struct driver_data *drv_data)
+static void bfin_spi_u8_cs_chg_writer(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
 
-       while (drv_data->tx < drv_data->tx_end) {
-               cs_active(drv_data, chip);
+       /* clear RXS (we check for RXS inside the loop) */
+       bfin_spi_dummy_read(drv_data);
 
-               write_TDBR(drv_data, (*(u8 *) (drv_data->tx)));
-               while (read_STAT(drv_data) & BIT_STAT_TXS)
-                       cpu_relax();
-               while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
+       while (drv_data->tx < drv_data->tx_end) {
+               bfin_spi_cs_active(drv_data, chip);
+               write_TDBR(drv_data, (*(u8 *) (drv_data->tx++)));
+               /* make sure transfer finished before deactiving CS */
+               while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-
-               cs_deactive(drv_data, chip);
-
-               ++drv_data->tx;
+               bfin_spi_dummy_read(drv_data);
+               bfin_spi_cs_deactive(drv_data, chip);
        }
 }
 
-static void u8_reader(struct driver_data *drv_data)
+static void bfin_spi_u8_reader(struct driver_data *drv_data)
 {
-       dev_dbg(&drv_data->pdev->dev,
-               "cr-8 is 0x%x\n", read_STAT(drv_data));
-
-       /* poll for SPI completion before start */
-       while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-               cpu_relax();
+       u16 tx_val = drv_data->cur_chip->idle_tx_val;
 
-       /* clear TDBR buffer before read(else it will be shifted out) */
-       write_TDBR(drv_data, 0xFFFF);
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
 
-       dummy_read(drv_data);
-
-       while (drv_data->rx < drv_data->rx_end - 1) {
+       while (drv_data->rx < drv_data->rx_end) {
+               write_TDBR(drv_data, tx_val);
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-               *(u8 *) (drv_data->rx) = read_RDBR(drv_data);
-               ++drv_data->rx;
+               *(u8 *) (drv_data->rx++) = read_RDBR(drv_data);
        }
-
-       while (!(read_STAT(drv_data) & BIT_STAT_RXS))
-               cpu_relax();
-       *(u8 *) (drv_data->rx) = read_SHAW(drv_data);
-       ++drv_data->rx;
 }
 
-static void u8_cs_chg_reader(struct driver_data *drv_data)
+static void bfin_spi_u8_cs_chg_reader(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
+       u16 tx_val = chip->idle_tx_val;
 
-       while (drv_data->rx < drv_data->rx_end) {
-               cs_active(drv_data, chip);
-               read_RDBR(drv_data);    /* kick off */
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
 
+       while (drv_data->rx < drv_data->rx_end) {
+               bfin_spi_cs_active(drv_data, chip);
+               write_TDBR(drv_data, tx_val);
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-               while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-                       cpu_relax();
-
-               *(u8 *) (drv_data->rx) = read_SHAW(drv_data);
-               cs_deactive(drv_data, chip);
-
-               ++drv_data->rx;
+               *(u8 *) (drv_data->rx++) = read_RDBR(drv_data);
+               bfin_spi_cs_deactive(drv_data, chip);
        }
 }
 
-static void u8_duplex(struct driver_data *drv_data)
+static void bfin_spi_u8_duplex(struct driver_data *drv_data)
 {
-       /* in duplex mode, clk is triggered by writing of TDBR */
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
+
        while (drv_data->rx < drv_data->rx_end) {
-               write_TDBR(drv_data, (*(u8 *) (drv_data->tx)));
-               while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-                       cpu_relax();
+               write_TDBR(drv_data, (*(u8 *) (drv_data->tx++)));
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-               *(u8 *) (drv_data->rx) = read_RDBR(drv_data);
-               ++drv_data->rx;
-               ++drv_data->tx;
+               *(u8 *) (drv_data->rx++) = read_RDBR(drv_data);
        }
 }
 
-static void u8_cs_chg_duplex(struct driver_data *drv_data)
+static void bfin_spi_u8_cs_chg_duplex(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
 
-       while (drv_data->rx < drv_data->rx_end) {
-               cs_active(drv_data, chip);
-
-               write_TDBR(drv_data, (*(u8 *) (drv_data->tx)));
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
 
-               while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-                       cpu_relax();
+       while (drv_data->rx < drv_data->rx_end) {
+               bfin_spi_cs_active(drv_data, chip);
+               write_TDBR(drv_data, (*(u8 *) (drv_data->tx++)));
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-               *(u8 *) (drv_data->rx) = read_RDBR(drv_data);
-
-               cs_deactive(drv_data, chip);
-
-               ++drv_data->rx;
-               ++drv_data->tx;
+               *(u8 *) (drv_data->rx++) = read_RDBR(drv_data);
+               bfin_spi_cs_deactive(drv_data, chip);
        }
 }
 
-static void u16_writer(struct driver_data *drv_data)
+static void bfin_spi_u16_writer(struct driver_data *drv_data)
 {
-       dev_dbg(&drv_data->pdev->dev,
-               "cr16 is 0x%x\n", read_STAT(drv_data));
+       /* clear RXS (we check for RXS inside the loop) */
+       bfin_spi_dummy_read(drv_data);
 
        while (drv_data->tx < drv_data->tx_end) {
                write_TDBR(drv_data, (*(u16 *) (drv_data->tx)));
-               while ((read_STAT(drv_data) & BIT_STAT_TXS))
-                       cpu_relax();
                drv_data->tx += 2;
+               /* wait until transfer finished.
+                  checking SPIF or TXS may not guarantee transfer completion */
+               while (!(read_STAT(drv_data) & BIT_STAT_RXS))
+                       cpu_relax();
+               /* discard RX data and clear RXS */
+               bfin_spi_dummy_read(drv_data);
        }
-
-       /* poll for SPI completion before return */
-       while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-               cpu_relax();
 }
 
-static void u16_cs_chg_writer(struct driver_data *drv_data)
+static void bfin_spi_u16_cs_chg_writer(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
 
-       while (drv_data->tx < drv_data->tx_end) {
-               cs_active(drv_data, chip);
+       /* clear RXS (we check for RXS inside the loop) */
+       bfin_spi_dummy_read(drv_data);
 
+       while (drv_data->tx < drv_data->tx_end) {
+               bfin_spi_cs_active(drv_data, chip);
                write_TDBR(drv_data, (*(u16 *) (drv_data->tx)));
-               while ((read_STAT(drv_data) & BIT_STAT_TXS))
-                       cpu_relax();
-               while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-                       cpu_relax();
-
-               cs_deactive(drv_data, chip);
-
                drv_data->tx += 2;
+               /* make sure transfer finished before deactiving CS */
+               while (!(read_STAT(drv_data) & BIT_STAT_RXS))
+                       cpu_relax();
+               bfin_spi_dummy_read(drv_data);
+               bfin_spi_cs_deactive(drv_data, chip);
        }
 }
 
-static void u16_reader(struct driver_data *drv_data)
+static void bfin_spi_u16_reader(struct driver_data *drv_data)
 {
-       dev_dbg(&drv_data->pdev->dev,
-               "cr-16 is 0x%x\n", read_STAT(drv_data));
-
-       /* poll for SPI completion before start */
-       while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-               cpu_relax();
-
-       /* clear TDBR buffer before read(else it will be shifted out) */
-       write_TDBR(drv_data, 0xFFFF);
+       u16 tx_val = drv_data->cur_chip->idle_tx_val;
 
-       dummy_read(drv_data);
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
 
-       while (drv_data->rx < (drv_data->rx_end - 2)) {
+       while (drv_data->rx < drv_data->rx_end) {
+               write_TDBR(drv_data, tx_val);
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
                *(u16 *) (drv_data->rx) = read_RDBR(drv_data);
                drv_data->rx += 2;
        }
-
-       while (!(read_STAT(drv_data) & BIT_STAT_RXS))
-               cpu_relax();
-       *(u16 *) (drv_data->rx) = read_SHAW(drv_data);
-       drv_data->rx += 2;
 }
 
-static void u16_cs_chg_reader(struct driver_data *drv_data)
+static void bfin_spi_u16_cs_chg_reader(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
+       u16 tx_val = chip->idle_tx_val;
 
-       /* poll for SPI completion before start */
-       while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-               cpu_relax();
-
-       /* clear TDBR buffer before read(else it will be shifted out) */
-       write_TDBR(drv_data, 0xFFFF);
-
-       cs_active(drv_data, chip);
-       dummy_read(drv_data);
-
-       while (drv_data->rx < drv_data->rx_end - 2) {
-               cs_deactive(drv_data, chip);
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
 
+       while (drv_data->rx < drv_data->rx_end) {
+               bfin_spi_cs_active(drv_data, chip);
+               write_TDBR(drv_data, tx_val);
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
-               cs_active(drv_data, chip);
                *(u16 *) (drv_data->rx) = read_RDBR(drv_data);
                drv_data->rx += 2;
+               bfin_spi_cs_deactive(drv_data, chip);
        }
-       cs_deactive(drv_data, chip);
-
-       while (!(read_STAT(drv_data) & BIT_STAT_RXS))
-               cpu_relax();
-       *(u16 *) (drv_data->rx) = read_SHAW(drv_data);
-       drv_data->rx += 2;
 }
 
-static void u16_duplex(struct driver_data *drv_data)
+static void bfin_spi_u16_duplex(struct driver_data *drv_data)
 {
-       /* in duplex mode, clk is triggered by writing of TDBR */
-       while (drv_data->tx < drv_data->tx_end) {
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
+
+       while (drv_data->rx < drv_data->rx_end) {
                write_TDBR(drv_data, (*(u16 *) (drv_data->tx)));
-               while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-                       cpu_relax();
+               drv_data->tx += 2;
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
                *(u16 *) (drv_data->rx) = read_RDBR(drv_data);
                drv_data->rx += 2;
-               drv_data->tx += 2;
        }
 }
 
-static void u16_cs_chg_duplex(struct driver_data *drv_data)
+static void bfin_spi_u16_cs_chg_duplex(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
 
-       while (drv_data->tx < drv_data->tx_end) {
-               cs_active(drv_data, chip);
+       /* discard old RX data and clear RXS */
+       bfin_spi_dummy_read(drv_data);
 
+       while (drv_data->rx < drv_data->rx_end) {
+               bfin_spi_cs_active(drv_data, chip);
                write_TDBR(drv_data, (*(u16 *) (drv_data->tx)));
-               while (!(read_STAT(drv_data) & BIT_STAT_SPIF))
-                       cpu_relax();
+               drv_data->tx += 2;
                while (!(read_STAT(drv_data) & BIT_STAT_RXS))
                        cpu_relax();
                *(u16 *) (drv_data->rx) = read_RDBR(drv_data);
-
-               cs_deactive(drv_data, chip);
-
                drv_data->rx += 2;
-               drv_data->tx += 2;
+               bfin_spi_cs_deactive(drv_data, chip);
        }
 }
 
 /* test if ther is more transfer to be done */
-static void *next_transfer(struct driver_data *drv_data)
+static void *bfin_spi_next_transfer(struct driver_data *drv_data)
 {
        struct spi_message *msg = drv_data->cur_msg;
        struct spi_transfer *trans = drv_data->cur_transfer;
@@ -517,7 +493,7 @@ static void *next_transfer(struct driver_data *drv_data)
  * caller already set message->status;
  * dma and pio irqs are blocked give finished message back
  */
-static void giveback(struct driver_data *drv_data)
+static void bfin_spi_giveback(struct driver_data *drv_data)
 {
        struct chip_data *chip = drv_data->cur_chip;
        struct spi_transfer *last_transfer;
@@ -537,26 +513,30 @@ static void giveback(struct driver_data *drv_data)
 
        msg->state = NULL;
 
-       /* disable chip select signal. And not stop spi in autobuffer mode */
-       if (drv_data->tx_dma != 0xFFFF) {
-               cs_deactive(drv_data, chip);
-               bfin_spi_disable(drv_data);
-       }
-
        if (!drv_data->cs_change)
-               cs_deactive(drv_data, chip);
+               bfin_spi_cs_deactive(drv_data, chip);
+
+       /* Not stop spi in autobuffer mode */
+       if (drv_data->tx_dma != 0xFFFF)
+               bfin_spi_disable(drv_data);
 
        if (msg->complete)
                msg->complete(msg->context);
 }
 
-static irqreturn_t dma_irq_handler(int irq, void *dev_id)
+static irqreturn_t bfin_spi_dma_irq_handler(int irq, void *dev_id)
 {
        struct driver_data *drv_data = dev_id;
        struct chip_data *chip = drv_data->cur_chip;
        struct spi_message *msg = drv_data->cur_msg;
+       unsigned long timeout;
+       unsigned short dmastat = get_dma_curr_irqstat(drv_data->dma_channel);
+       u16 spistat = read_STAT(drv_data);
+
+       dev_dbg(&drv_data->pdev->dev,
+               "in dma_irq_handler dmastat:0x%x spistat:0x%x\n",
+               dmastat, spistat);
 
-       dev_dbg(&drv_data->pdev->dev, "in dma_irq_handler\n");
        clear_dma_irqstat(drv_data->dma_channel);
 
        /* Wait for DMA to complete */
@@ -575,16 +555,30 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
                        cpu_relax();
        }
 
+       dev_dbg(&drv_data->pdev->dev,
+               "in dma_irq_handler dmastat:0x%x spistat:0x%x\n",
+               dmastat, read_STAT(drv_data));
+
+       timeout = jiffies + HZ;
        while (!(read_STAT(drv_data) & SPIF))
-               cpu_relax();
+               if (!time_before(jiffies, timeout)) {
+                       dev_warn(&drv_data->pdev->dev, "timeout waiting for SPIF");
+                       break;
+               } else
+                       cpu_relax();
 
-       msg->actual_length += drv_data->len_in_bytes;
+       if ((dmastat & DMA_ERR) && (spistat & RBSY)) {
+               msg->state = ERROR_STATE;
+               dev_err(&drv_data->pdev->dev, "dma receive: fifo/buffer overflow\n");
+       } else {
+               msg->actual_length += drv_data->len_in_bytes;
 
-       if (drv_data->cs_change)
-               cs_deactive(drv_data, chip);
+               if (drv_data->cs_change)
+                       bfin_spi_cs_deactive(drv_data, chip);
 
-       /* Move to next transfer */
-       msg->state = next_transfer(drv_data);
+               /* Move to next transfer */
+               msg->state = bfin_spi_next_transfer(drv_data);
+       }
 
        /* Schedule transfer tasklet */
        tasklet_schedule(&drv_data->pump_transfers);
@@ -598,7 +592,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static void pump_transfers(unsigned long data)
+static void bfin_spi_pump_transfers(unsigned long data)
 {
        struct driver_data *drv_data = (struct driver_data *)data;
        struct spi_message *message = NULL;
@@ -621,20 +615,23 @@ static void pump_transfers(unsigned long data)
 
         /* Handle for abort */
        if (message->state == ERROR_STATE) {
+               dev_dbg(&drv_data->pdev->dev, "transfer: we've hit an error\n");
                message->status = -EIO;
-               giveback(drv_data);
+               bfin_spi_giveback(drv_data);
                return;
        }
 
        /* Handle end of message */
        if (message->state == DONE_STATE) {
+               dev_dbg(&drv_data->pdev->dev, "transfer: all done!\n");
                message->status = 0;
-               giveback(drv_data);
+               bfin_spi_giveback(drv_data);
                return;
        }
 
        /* Delay if requested at end of transfer */
        if (message->state == RUNNING_STATE) {
+               dev_dbg(&drv_data->pdev->dev, "transfer: still running ...\n");
                previous = list_entry(transfer->transfer_list.prev,
                                      struct spi_transfer, transfer_list);
                if (previous->delay_usecs)
@@ -642,13 +639,20 @@ static void pump_transfers(unsigned long data)
        }
 
        /* Setup the transfer state based on the type of transfer */
-       if (flush(drv_data) == 0) {
+       if (bfin_spi_flush(drv_data) == 0) {
                dev_err(&drv_data->pdev->dev, "pump_transfers: flush failed\n");
                message->status = -EIO;
-               giveback(drv_data);
+               bfin_spi_giveback(drv_data);
                return;
        }
 
+       if (transfer->len == 0) {
+               /* Move to next transfer of this msg */
+               message->state = bfin_spi_next_transfer(drv_data);
+               /* Schedule next transfer tasklet */
+               tasklet_schedule(&drv_data->pump_transfers);
+       }
+
        if (transfer->tx_buf != NULL) {
                drv_data->tx = (void *)transfer->tx_buf;
                drv_data->tx_end = drv_data->tx + transfer->len;
@@ -679,31 +683,31 @@ static void pump_transfers(unsigned long data)
                drv_data->n_bytes = 1;
                width = CFG_SPI_WORDSIZE8;
                drv_data->read = chip->cs_change_per_word ?
-                       u8_cs_chg_reader : u8_reader;
+                       bfin_spi_u8_cs_chg_reader : bfin_spi_u8_reader;
                drv_data->write = chip->cs_change_per_word ?
-                       u8_cs_chg_writer : u8_writer;
+                       bfin_spi_u8_cs_chg_writer : bfin_spi_u8_writer;
                drv_data->duplex = chip->cs_change_per_word ?
-                       u8_cs_chg_duplex : u8_duplex;
+                       bfin_spi_u8_cs_chg_duplex : bfin_spi_u8_duplex;
                break;
 
        case 16:
                drv_data->n_bytes = 2;
                width = CFG_SPI_WORDSIZE16;
                drv_data->read = chip->cs_change_per_word ?
-                       u16_cs_chg_reader : u16_reader;
+                       bfin_spi_u16_cs_chg_reader : bfin_spi_u16_reader;
                drv_data->write = chip->cs_change_per_word ?
-                       u16_cs_chg_writer : u16_writer;
+                       bfin_spi_u16_cs_chg_writer : bfin_spi_u16_writer;
                drv_data->duplex = chip->cs_change_per_word ?
-                       u16_cs_chg_duplex : u16_duplex;
+                       bfin_spi_u16_cs_chg_duplex : bfin_spi_u16_duplex;
                break;
 
        default:
                /* No change, the same as default setting */
                drv_data->n_bytes = chip->n_bytes;
                width = chip->width;
-               drv_data->write = drv_data->tx ? chip->write : null_writer;
-               drv_data->read = drv_data->rx ? chip->read : null_reader;
-               drv_data->duplex = chip->duplex ? chip->duplex : null_writer;
+               drv_data->write = drv_data->tx ? chip->write : bfin_spi_null_writer;
+               drv_data->read = drv_data->rx ? chip->read : bfin_spi_null_reader;
+               drv_data->duplex = chip->duplex ? chip->duplex : bfin_spi_null_writer;
                break;
        }
        cr = (read_CTRL(drv_data) & (~BIT_CTL_TIMOD));
@@ -717,7 +721,7 @@ static void pump_transfers(unsigned long data)
        }
        dev_dbg(&drv_data->pdev->dev,
                "transfer: drv_data->write is %p, chip->write is %p, null_wr is %p\n",
-               drv_data->write, chip->write, null_writer);
+               drv_data->write, chip->write, bfin_spi_null_writer);
 
        /* speed and width has been set on per message */
        message->state = RUNNING_STATE;
@@ -731,32 +735,34 @@ static void pump_transfers(unsigned long data)
 
        write_STAT(drv_data, BIT_STAT_CLR);
        cr = (read_CTRL(drv_data) & (~BIT_CTL_TIMOD));
-       cs_active(drv_data, chip);
+       if (drv_data->cs_change)
+               bfin_spi_cs_active(drv_data, chip);
 
        dev_dbg(&drv_data->pdev->dev,
                "now pumping a transfer: width is %d, len is %d\n",
                width, transfer->len);
 
        /*
-        * Try to map dma buffer and do a dma transfer if
-        * successful use different way to r/w according to
-        * drv_data->cur_chip->enable_dma
+        * Try to map dma buffer and do a dma transfer.  If successful use,
+        * different way to r/w according to the enable_dma settings and if
+        * we are not doing a full duplex transfer (since the hardware does
+        * not support full duplex DMA transfers).
         */
        if (!full_duplex && drv_data->cur_chip->enable_dma
                                && drv_data->len > 6) {
 
+               unsigned long dma_start_addr, flags;
+
                disable_dma(drv_data->dma_channel);
                clear_dma_irqstat(drv_data->dma_channel);
-               bfin_spi_disable(drv_data);
 
                /* config dma channel */
                dev_dbg(&drv_data->pdev->dev, "doing dma transfer\n");
+               set_dma_x_count(drv_data->dma_channel, drv_data->len);
                if (width == CFG_SPI_WORDSIZE16) {
-                       set_dma_x_count(drv_data->dma_channel, drv_data->len);
                        set_dma_x_modify(drv_data->dma_channel, 2);
                        dma_width = WDSIZE_16;
                } else {
-                       set_dma_x_count(drv_data->dma_channel, drv_data->len);
                        set_dma_x_modify(drv_data->dma_channel, 1);
                        dma_width = WDSIZE_8;
                }
@@ -779,58 +785,75 @@ static void pump_transfers(unsigned long data)
                        enable_dma(drv_data->dma_channel);
 
                        /* start SPI transfer */
-                       write_CTRL(drv_data,
-                               (cr | CFG_SPI_DMAWRITE | BIT_CTL_ENABLE));
+                       write_CTRL(drv_data, cr | BIT_CTL_TIMOD_DMA_TX);
 
                        /* just return here, there can only be one transfer
                         * in this mode
                         */
                        message->status = 0;
-                       giveback(drv_data);
+                       bfin_spi_giveback(drv_data);
                        return;
                }
 
                /* In dma mode, rx or tx must be NULL in one transfer */
+               dma_config = (RESTART | dma_width | DI_EN);
                if (drv_data->rx != NULL) {
                        /* set transfer mode, and enable SPI */
-                       dev_dbg(&drv_data->pdev->dev, "doing DMA in.\n");
+                       dev_dbg(&drv_data->pdev->dev, "doing DMA in to %p (size %zx)\n",
+                               drv_data->rx, drv_data->len_in_bytes);
 
-                       /* clear tx reg soformer data is not shifted out */
-                       write_TDBR(drv_data, 0xFFFF);
+                       /* invalidate caches, if needed */
+                       if (bfin_addr_dcachable((unsigned long) drv_data->rx))
+                               invalidate_dcache_range((unsigned long) drv_data->rx,
+                                                       (unsigned long) (drv_data->rx +
+                                                       drv_data->len_in_bytes));
 
-                       set_dma_x_count(drv_data->dma_channel, drv_data->len);
-
-                       /* start dma */
-                       dma_enable_irq(drv_data->dma_channel);
-                       dma_config = (WNR | RESTART | dma_width | DI_EN);
-                       set_dma_config(drv_data->dma_channel, dma_config);
-                       set_dma_start_addr(drv_data->dma_channel,
-                                       (unsigned long)drv_data->rx);
-                       enable_dma(drv_data->dma_channel);
-
-                       /* start SPI transfer */
-                       write_CTRL(drv_data,
-                               (cr | CFG_SPI_DMAREAD | BIT_CTL_ENABLE));
+                       dma_config |= WNR;
+                       dma_start_addr = (unsigned long)drv_data->rx;
+                       cr |= BIT_CTL_TIMOD_DMA_RX | BIT_CTL_SENDOPT;
 
                } else if (drv_data->tx != NULL) {
                        dev_dbg(&drv_data->pdev->dev, "doing DMA out.\n");
 
-                       /* start dma */
-                       dma_enable_irq(drv_data->dma_channel);
-                       dma_config = (RESTART | dma_width | DI_EN);
-                       set_dma_config(drv_data->dma_channel, dma_config);
-                       set_dma_start_addr(drv_data->dma_channel,
-                                       (unsigned long)drv_data->tx);
-                       enable_dma(drv_data->dma_channel);
+                       /* flush caches, if needed */
+                       if (bfin_addr_dcachable((unsigned long) drv_data->tx))
+                               flush_dcache_range((unsigned long) drv_data->tx,
+                                               (unsigned long) (drv_data->tx +
+                                               drv_data->len_in_bytes));
+
+                       dma_start_addr = (unsigned long)drv_data->tx;
+                       cr |= BIT_CTL_TIMOD_DMA_TX;
+
+               } else
+                       BUG();
+
+               /* oh man, here there be monsters ... and i dont mean the
+                * fluffy cute ones from pixar, i mean the kind that'll eat
+                * your data, kick your dog, and love it all.  do *not* try
+                * and change these lines unless you (1) heavily test DMA
+                * with SPI flashes on a loaded system (e.g. ping floods),
+                * (2) know just how broken the DMA engine interaction with
+                * the SPI peripheral is, and (3) have someone else to blame
+                * when you screw it all up anyways.
+                */
+               set_dma_start_addr(drv_data->dma_channel, dma_start_addr);
+               set_dma_config(drv_data->dma_channel, dma_config);
+               local_irq_save(flags);
+               SSYNC();
+               write_CTRL(drv_data, cr);
+               enable_dma(drv_data->dma_channel);
+               dma_enable_irq(drv_data->dma_channel);
+               local_irq_restore(flags);
 
-                       /* start SPI transfer */
-                       write_CTRL(drv_data,
-                               (cr | CFG_SPI_DMAWRITE | BIT_CTL_ENABLE));
-               }
        } else {
                /* IO mode write then read */
                dev_dbg(&drv_data->pdev->dev, "doing IO transfer\n");
 
+               /* we always use SPI_WRITE mode. SPI_READ mode
+                  seems to have problems with setting up the
+                  output value in TDBR prior to the transfer. */
+               write_CTRL(drv_data, (cr | CFG_SPI_WRITE));
+
                if (full_duplex) {
                        /* full duplex mode */
                        BUG_ON((drv_data->tx_end - drv_data->tx) !=
@@ -838,9 +861,6 @@ static void pump_transfers(unsigned long data)
                        dev_dbg(&drv_data->pdev->dev,
                                "IO duplex: cr is 0x%x\n", cr);
 
-                       /* set SPI transfer mode */
-                       write_CTRL(drv_data, (cr | CFG_SPI_WRITE));
-
                        drv_data->duplex(drv_data);
 
                        if (drv_data->tx != drv_data->tx_end)
@@ -850,9 +870,6 @@ static void pump_transfers(unsigned long data)
                        dev_dbg(&drv_data->pdev->dev,
                                "IO write: cr is 0x%x\n", cr);
 
-                       /* set SPI transfer mode */
-                       write_CTRL(drv_data, (cr | CFG_SPI_WRITE));
-
                        drv_data->write(drv_data);
 
                        if (drv_data->tx != drv_data->tx_end)
@@ -862,9 +879,6 @@ static void pump_transfers(unsigned long data)
                        dev_dbg(&drv_data->pdev->dev,
                                "IO read: cr is 0x%x\n", cr);
 
-                       /* set SPI transfer mode */
-                       write_CTRL(drv_data, (cr | CFG_SPI_READ));
-
                        drv_data->read(drv_data);
                        if (drv_data->rx != drv_data->rx_end)
                                tranf_success = 0;
@@ -876,20 +890,19 @@ static void pump_transfers(unsigned long data)
                        message->state = ERROR_STATE;
                } else {
                        /* Update total byte transfered */
-                       message->actual_length += drv_data->len;
-
+                       message->actual_length += drv_data->len_in_bytes;
                        /* Move to next transfer of this msg */
-                       message->state = next_transfer(drv_data);
+                       message->state = bfin_spi_next_transfer(drv_data);
+                       if (drv_data->cs_change)
+                               bfin_spi_cs_deactive(drv_data, chip);
                }
-
                /* Schedule next transfer tasklet */
                tasklet_schedule(&drv_data->pump_transfers);
-
        }
 }
 
 /* pop a msg from queue and kick off real transfer */
-static void pump_messages(struct work_struct *work)
+static void bfin_spi_pump_messages(struct work_struct *work)
 {
        struct driver_data *drv_data;
        unsigned long flags;
@@ -917,7 +930,7 @@ static void pump_messages(struct work_struct *work)
 
        /* Setup the SSP using the per chip configuration */
        drv_data->cur_chip = spi_get_ctldata(drv_data->cur_msg->spi);
-       restore_state(drv_data);
+       bfin_spi_restore_state(drv_data);
 
        list_del_init(&drv_data->cur_msg->queue);
 
@@ -946,7 +959,7 @@ static void pump_messages(struct work_struct *work)
  * got a msg to transfer, queue it in drv_data->queue.
  * And kick off message pumper
  */
-static int transfer(struct spi_device *spi, struct spi_message *msg)
+static int bfin_spi_transfer(struct spi_device *spi, struct spi_message *msg)
 {
        struct driver_data *drv_data = spi_master_get_devdata(spi->master);
        unsigned long flags;
@@ -975,7 +988,7 @@ static int transfer(struct spi_device *spi, struct spi_message *msg)
 
 #define MAX_SPI_SSEL   7
 
-static u16 ssel[3][MAX_SPI_SSEL] = {
+static u16 ssel[][MAX_SPI_SSEL] = {
        {P_SPI0_SSEL1, P_SPI0_SSEL2, P_SPI0_SSEL3,
        P_SPI0_SSEL4, P_SPI0_SSEL5,
        P_SPI0_SSEL6, P_SPI0_SSEL7},
@@ -990,12 +1003,12 @@ static u16 ssel[3][MAX_SPI_SSEL] = {
 };
 
 /* first setup for new devices */
-static int setup(struct spi_device *spi)
+static int bfin_spi_setup(struct spi_device *spi)
 {
        struct bfin5xx_spi_chip *chip_info = NULL;
        struct chip_data *chip;
        struct driver_data *drv_data = spi_master_get_devdata(spi->master);
-       u8 spi_flg;
+       int ret;
 
        /* Abort device setup if requested features are not supported */
        if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) {
@@ -1041,6 +1054,8 @@ static int setup(struct spi_device *spi)
                chip->bits_per_word = chip_info->bits_per_word;
                chip->cs_change_per_word = chip_info->cs_change_per_word;
                chip->cs_chg_udelay = chip_info->cs_chg_udelay;
+               chip->cs_gpio = chip_info->cs_gpio;
+               chip->idle_tx_val = chip_info->idle_tx_val;
        }
 
        /* translate common spi framework into our register */
@@ -1059,13 +1074,13 @@ static int setup(struct spi_device *spi)
         */
        if (chip->enable_dma && !drv_data->dma_requested) {
                /* register dma irq handler */
-               if (request_dma(drv_data->dma_channel, "BF53x_SPI_DMA") < 0) {
+               if (request_dma(drv_data->dma_channel, "BFIN_SPI_DMA") < 0) {
                        dev_dbg(&spi->dev,
                                "Unable to request BlackFin SPI DMA channel\n");
                        return -ENODEV;
                }
                if (set_dma_callback(drv_data->dma_channel,
-                       (void *)dma_irq_handler, drv_data) < 0) {
+                   bfin_spi_dma_irq_handler, drv_data) < 0) {
                        dev_dbg(&spi->dev, "Unable to set dma callback\n");
                        return -EPERM;
                }
@@ -1078,37 +1093,47 @@ static int setup(struct spi_device *spi)
         * SPI_BAUD, not the real baudrate
         */
        chip->baud = hz_to_spi_baud(spi->max_speed_hz);
-       spi_flg = ~(1 << (spi->chip_select));
-       chip->flag = ((u16) spi_flg << 8) | (1 << (spi->chip_select));
+       chip->flag = 1 << (spi->chip_select);
        chip->chip_select_num = spi->chip_select;
 
+       if (chip->chip_select_num == 0) {
+               ret = gpio_request(chip->cs_gpio, spi->modalias);
+               if (ret) {
+                       if (drv_data->dma_requested)
+                               free_dma(drv_data->dma_channel);
+                       return ret;
+               }
+               gpio_direction_output(chip->cs_gpio, 1);
+       }
+
        switch (chip->bits_per_word) {
        case 8:
                chip->n_bytes = 1;
                chip->width = CFG_SPI_WORDSIZE8;
                chip->read = chip->cs_change_per_word ?
-                       u8_cs_chg_reader : u8_reader;
+                       bfin_spi_u8_cs_chg_reader : bfin_spi_u8_reader;
                chip->write = chip->cs_change_per_word ?
-                       u8_cs_chg_writer : u8_writer;
+                       bfin_spi_u8_cs_chg_writer : bfin_spi_u8_writer;
                chip->duplex = chip->cs_change_per_word ?
-                       u8_cs_chg_duplex : u8_duplex;
+                       bfin_spi_u8_cs_chg_duplex : bfin_spi_u8_duplex;
                break;
 
        case 16:
                chip->n_bytes = 2;
                chip->width = CFG_SPI_WORDSIZE16;
                chip->read = chip->cs_change_per_word ?
-                       u16_cs_chg_reader : u16_reader;
+                       bfin_spi_u16_cs_chg_reader : bfin_spi_u16_reader;
                chip->write = chip->cs_change_per_word ?
-                       u16_cs_chg_writer : u16_writer;
+                       bfin_spi_u16_cs_chg_writer : bfin_spi_u16_writer;
                chip->duplex = chip->cs_change_per_word ?
-                       u16_cs_chg_duplex : u16_duplex;
+                       bfin_spi_u16_cs_chg_duplex : bfin_spi_u16_duplex;
                break;
 
        default:
                dev_err(&spi->dev, "%d bits_per_word is not supported\n",
                                chip->bits_per_word);
-               kfree(chip);
+               if (chip_info)
+                       kfree(chip);
                return -ENODEV;
        }
 
@@ -1125,7 +1150,7 @@ static int setup(struct spi_device *spi)
                peripheral_request(ssel[spi->master->bus_num]
                        [chip->chip_select_num-1], spi->modalias);
 
-       cs_deactive(drv_data, chip);
+       bfin_spi_cs_deactive(drv_data, chip);
 
        return 0;
 }
@@ -1134,19 +1159,25 @@ static int setup(struct spi_device *spi)
  * callback for spi framework.
  * clean driver specific data
  */
-static void cleanup(struct spi_device *spi)
+static void bfin_spi_cleanup(struct spi_device *spi)
 {
        struct chip_data *chip = spi_get_ctldata(spi);
 
+       if (!chip)
+               return;
+
        if ((chip->chip_select_num > 0)
                && (chip->chip_select_num <= spi->master->num_chipselect))
                peripheral_free(ssel[spi->master->bus_num]
                                        [chip->chip_select_num-1]);
 
+       if (chip->chip_select_num == 0)
+               gpio_free(chip->cs_gpio);
+
        kfree(chip);
 }
 
-static inline int init_queue(struct driver_data *drv_data)
+static inline int bfin_spi_init_queue(struct driver_data *drv_data)
 {
        INIT_LIST_HEAD(&drv_data->queue);
        spin_lock_init(&drv_data->lock);
@@ -1156,10 +1187,10 @@ static inline int init_queue(struct driver_data *drv_data)
 
        /* init transfer tasklet */
        tasklet_init(&drv_data->pump_transfers,
-                    pump_transfers, (unsigned long)drv_data);
+                    bfin_spi_pump_transfers, (unsigned long)drv_data);
 
        /* init messages workqueue */
-       INIT_WORK(&drv_data->pump_messages, pump_messages);
+       INIT_WORK(&drv_data->pump_messages, bfin_spi_pump_messages);
        drv_data->workqueue = create_singlethread_workqueue(
                                dev_name(drv_data->master->dev.parent));
        if (drv_data->workqueue == NULL)
@@ -1168,7 +1199,7 @@ static inline int init_queue(struct driver_data *drv_data)
        return 0;
 }
 
-static inline int start_queue(struct driver_data *drv_data)
+static inline int bfin_spi_start_queue(struct driver_data *drv_data)
 {
        unsigned long flags;
 
@@ -1190,7 +1221,7 @@ static inline int start_queue(struct driver_data *drv_data)
        return 0;
 }
 
-static inline int stop_queue(struct driver_data *drv_data)
+static inline int bfin_spi_stop_queue(struct driver_data *drv_data)
 {
        unsigned long flags;
        unsigned limit = 500;
@@ -1219,11 +1250,11 @@ static inline int stop_queue(struct driver_data *drv_data)
        return status;
 }
 
-static inline int destroy_queue(struct driver_data *drv_data)
+static inline int bfin_spi_destroy_queue(struct driver_data *drv_data)
 {
        int status;
 
-       status = stop_queue(drv_data);
+       status = bfin_spi_stop_queue(drv_data);
        if (status != 0)
                return status;
 
@@ -1232,7 +1263,7 @@ static inline int destroy_queue(struct driver_data *drv_data)
        return 0;
 }
 
-static int __init bfin5xx_spi_probe(struct platform_device *pdev)
+static int __init bfin_spi_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct bfin5xx_spi_master *platform_info;
@@ -1258,9 +1289,9 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
 
        master->bus_num = pdev->id;
        master->num_chipselect = platform_info->num_chipselect;
-       master->cleanup = cleanup;
-       master->setup = setup;
-       master->transfer = transfer;
+       master->cleanup = bfin_spi_cleanup;
+       master->setup = bfin_spi_setup;
+       master->transfer = bfin_spi_transfer;
 
        /* Find and map our resources */
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -1285,13 +1316,13 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
        }
 
        /* Initial and start queue */
-       status = init_queue(drv_data);
+       status = bfin_spi_init_queue(drv_data);
        if (status != 0) {
                dev_err(dev, "problem initializing queue\n");
                goto out_error_queue_alloc;
        }
 
-       status = start_queue(drv_data);
+       status = bfin_spi_start_queue(drv_data);
        if (status != 0) {
                dev_err(dev, "problem starting queue\n");
                goto out_error_queue_alloc;
@@ -1317,7 +1348,7 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
        return status;
 
 out_error_queue_alloc:
-       destroy_queue(drv_data);
+       bfin_spi_destroy_queue(drv_data);
 out_error_no_dma_ch:
        iounmap((void *) drv_data->regs_base);
 out_error_ioremap:
@@ -1328,7 +1359,7 @@ out_error_get_res:
 }
 
 /* stop hardware and remove the driver */
-static int __devexit bfin5xx_spi_remove(struct platform_device *pdev)
+static int __devexit bfin_spi_remove(struct platform_device *pdev)
 {
        struct driver_data *drv_data = platform_get_drvdata(pdev);
        int status = 0;
@@ -1337,7 +1368,7 @@ static int __devexit bfin5xx_spi_remove(struct platform_device *pdev)
                return 0;
 
        /* Remove the queue */
-       status = destroy_queue(drv_data);
+       status = bfin_spi_destroy_queue(drv_data);
        if (status != 0)
                return status;
 
@@ -1362,12 +1393,12 @@ static int __devexit bfin5xx_spi_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int bfin5xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
+static int bfin_spi_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct driver_data *drv_data = platform_get_drvdata(pdev);
        int status = 0;
 
-       status = stop_queue(drv_data);
+       status = bfin_spi_stop_queue(drv_data);
        if (status != 0)
                return status;
 
@@ -1377,7 +1408,7 @@ static int bfin5xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
        return 0;
 }
 
-static int bfin5xx_spi_resume(struct platform_device *pdev)
+static int bfin_spi_resume(struct platform_device *pdev)
 {
        struct driver_data *drv_data = platform_get_drvdata(pdev);
        int status = 0;
@@ -1386,7 +1417,7 @@ static int bfin5xx_spi_resume(struct platform_device *pdev)
        bfin_spi_enable(drv_data);
 
        /* Start the queue running */
-       status = start_queue(drv_data);
+       status = bfin_spi_start_queue(drv_data);
        if (status != 0) {
                dev_err(&pdev->dev, "problem starting queue (%d)\n", status);
                return status;
@@ -1395,29 +1426,29 @@ static int bfin5xx_spi_resume(struct platform_device *pdev)
        return 0;
 }
 #else
-#define bfin5xx_spi_suspend NULL
-#define bfin5xx_spi_resume NULL
+#define bfin_spi_suspend NULL
+#define bfin_spi_resume NULL
 #endif                         /* CONFIG_PM */
 
 MODULE_ALIAS("platform:bfin-spi");
-static struct platform_driver bfin5xx_spi_driver = {
+static struct platform_driver bfin_spi_driver = {
        .driver = {
                .name   = DRV_NAME,
                .owner  = THIS_MODULE,
        },
-       .suspend        = bfin5xx_spi_suspend,
-       .resume         = bfin5xx_spi_resume,
-       .remove         = __devexit_p(bfin5xx_spi_remove),
+       .suspend        = bfin_spi_suspend,
+       .resume         = bfin_spi_resume,
+       .remove         = __devexit_p(bfin_spi_remove),
 };
 
-static int __init bfin5xx_spi_init(void)
+static int __init bfin_spi_init(void)
 {
-       return platform_driver_probe(&bfin5xx_spi_driver, bfin5xx_spi_probe);
+       return platform_driver_probe(&bfin_spi_driver, bfin_spi_probe);
 }
-module_init(bfin5xx_spi_init);
+module_init(bfin_spi_init);
 
-static void __exit bfin5xx_spi_exit(void)
+static void __exit bfin_spi_exit(void)
 {
-       platform_driver_unregister(&bfin5xx_spi_driver);
+       platform_driver_unregister(&bfin_spi_driver);
 }
-module_exit(bfin5xx_spi_exit);
+module_exit(bfin_spi_exit);
index 0480d8b..0671aee 100644 (file)
 #define QUEUE_STOPPED                  (1)
 
 #define IS_DMA_ALIGNED(x)              (((u32)(x) & 0x03) == 0)
+#define DMA_ALIGNMENT                  4
 /*-------------------------------------------------------------------------*/
 
 
@@ -779,7 +780,8 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data)
 
                        /* Read trailing bytes */
                        limit = loops_per_jiffy << 1;
-                       while ((read(drv_data) == 0) && limit--);
+                       while ((read(drv_data) == 0) && --limit)
+                               cpu_relax();
 
                        if (limit == 0)
                                dev_err(&drv_data->pdev->dev,
@@ -1481,6 +1483,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
 
        master->bus_num = pdev->id;
        master->num_chipselect = platform_info->num_chipselect;
+       master->dma_alignment = DMA_ALIGNMENT;
        master->cleanup = cleanup;
        master->setup = setup;
        master->transfer = transfer;
index 4ff4c16..25c0ffd 100644 (file)
@@ -477,8 +477,8 @@ static int __devinit agnx_pci_probe(struct pci_dev *pdev,
                return err;
        }
 
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) ||
-           pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
+           pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
                printk(KERN_ERR PFX "No suitable DMA available\n");
                goto err_free_reg;
        }
index 3e41e08..5869e14 100644 (file)
@@ -849,15 +849,15 @@ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id)
 #if 1   /* @todo For now, disable 64-bit, because I do not understand the implications (DAC!) */
        /* query for DMA transfer */
        /* @see Documentation/PCI/PCI-DMA-mapping.txt */
-       if (!pci_set_dma_mask(dev, DMA_64BIT_MASK)) {
-               pci_set_consistent_dma_mask(dev, DMA_64BIT_MASK);
+       if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64))) {
+               pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64));
                /* use 64-bit DMA */
                printk(KERN_DEBUG "Using a 64-bit DMA mask.\n");
        } else
 #endif
-       if (!pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
+       if (!pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
                printk(KERN_DEBUG "Could not set 64-bit DMA mask.\n");
-               pci_set_consistent_dma_mask(dev, DMA_32BIT_MASK);
+               pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(32));
                /* use 32-bit DMA */
                printk(KERN_DEBUG "Using a 32-bit DMA mask.\n");
        } else {
index 1781510..234f332 100644 (file)
@@ -289,7 +289,8 @@ static void serial_unthrottle(struct tty_struct *tty);
 static int serial_break(struct tty_struct *tty, int break_state);
 static int serial_chars_in_buffer(struct tty_struct *tty);
 
-static int qt_open(struct usb_serial_port *port, struct file *filp);
+static int qt_open(struct tty_struct *tty, struct usb_serial_port *port,
+                               struct file *filp);
 static int BoxSetPrebufferLevel(struct usb_serial *serial);
 
 static int BoxSetATC(struct usb_serial *serial, __u16 n_Mode);
@@ -300,24 +301,26 @@ static int BoxSetUart(struct usb_serial *serial, unsigned short Uart_Number,
 static int BoxOPenCloseChannel(struct usb_serial *serial, __u16 Uart_Number,
                               __u16 OpenClose,
                               struct qt_open_channel_data *pDeviceData);
-static void qt_close(struct usb_serial_port *port, struct file *filp);
+static void qt_close(struct tty_struct *tty, struct usb_serial_port *port,
+                                       struct file *filp);
 static int BoxGetRegister(struct usb_serial *serial, unsigned short Uart_Number,
                          unsigned short Register_Num, __u8 *pValue);
 static int BoxSetRegister(struct usb_serial *serial, unsigned short Uart_Number,
                          unsigned short Register_Num, unsigned short Value);
 static void qt_write_bulk_callback(struct urb *urb);
-static int qt_write(struct usb_serial_port *port, int from_user,
+static int qt_write(struct tty_struct *tty, struct usb_serial_port *port,
                    const unsigned char *buf, int count);
 static void port_softint(struct work_struct *work);
 static int qt_write_room(struct usb_serial_port *port);
 static int qt_chars_in_buffer(struct usb_serial_port *port);
-static int qt_ioctl(struct usb_serial_port *port, struct file *file,
-                   unsigned int cmd, unsigned long arg);
-static void qt_set_termios(struct usb_serial_port *port,
+static int qt_ioctl(struct tty_struct *tty, struct usb_serial_port *port,
+               struct file *file, unsigned int cmd, unsigned long arg);
+static void qt_set_termios(struct tty_struct *tty,
+                          struct usb_serial_port *port,
                           struct ktermios *old_termios);
-static int BoxSetHW_FlowCtrl(struct usb_serial *serial, unsigned int UartNumber,
+static int BoxSetHW_FlowCtrl(struct usb_serial *serial, unsigned int index,
                             int bSet);
-static int BoxDisable_SW_FlowCtrl(struct usb_serial *serial, __u16 UartNumber);
+static int BoxDisable_SW_FlowCtrl(struct usb_serial *serial, __u16 index);
 static int EmulateWriteQMCR_Reg(int index, unsigned uc_value);
 static int EmulateReadQMCR_Reg(int index, unsigned *uc_value);
 static struct usb_serial *find_the_box(unsigned int index);
@@ -336,10 +339,11 @@ static int serial_tiocmset(struct tty_struct *tty, struct file *file,
                           unsigned int set, unsigned int clear);
 static int serial_tiocmget(struct tty_struct *tty, struct file *file);
 
-static int qt_tiocmset(struct usb_serial_port *port, struct file *file,
-                      unsigned int value);
+static int qt_tiocmset(struct tty_struct *tty, struct usb_serial_port *port,
+                      struct file *file, unsigned int value);
 
-static int qt_tiocmget(struct usb_serial_port *port, struct file *file);
+static int qt_tiocmget(struct tty_struct *tty, struct usb_serial_port *port,
+                                                       struct file *file);
 
 /* Version Information */
 #define DRIVER_VERSION "v2.14"
@@ -818,7 +822,7 @@ static struct usb_serial *get_free_serial(int num_ports, int *minor)
        return NULL;
 }
 
-static int flip_that(struct tty_struct *tty, __u16 UartNumber,
+static int flip_that(struct tty_struct *tty, __u16 index,
                     struct usb_serial *serial)
 {
        tty_flip_buffer_push(tty);
@@ -829,18 +833,18 @@ static int flip_that(struct tty_struct *tty, __u16 UartNumber,
 /* Handles processing and moving data to the tty layer */
 static void port_sofrint(void *private)
 {
-       struct usb_serial_port *port = (struct usb_serial_port *)private;
+       struct usb_serial_port *port = private;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        struct tty_struct *tty = port->tty;
        unsigned char *data = port->read_urb->transfer_buffer;
-       unsigned int UartNumber;
+       unsigned int index;
        struct urb *urb = port->read_urb;
        unsigned int RxCount = urb->actual_length;
        int i, result;
        int flag, flag_data;
 
-       /* UartNumber = MINOR(port->tty->device) - serial->minor; */
-       UartNumber = tty->index - serial->minor;
+       /* index = MINOR(port->tty->device) - serial->minor; */
+       index = tty->index - serial->minor;
 
        mydbg("%s - port %d\n", __func__, port->number);
        mydbg("%s - port->RxHolding = %d\n", __func__, port->RxHolding);
@@ -948,7 +952,7 @@ static void port_sofrint(void *private)
                      __func__, result);
        else {
                if (tty && RxCount)
-                       flip_that(tty, UartNumber, serial);
+                       flip_that(tty, index, serial);
        }
 
        return;
@@ -1097,7 +1101,7 @@ static int serial_open(struct tty_struct *tty, struct file *filp)
                port->RxHolding = 0;
                mydbg("%s port->RxHolding = 0\n", __func__);
 
-               retval = qt_open(port, filp);
+               retval = qt_open(tty, port, filp);
        }
 
        if (retval)
@@ -1112,11 +1116,12 @@ static int serial_open(struct tty_struct *tty, struct file *filp)
 /*****************************************************************************
  *device's specific driver functions
  *****************************************************************************/
-static int qt_open(struct usb_serial_port *port, struct file *filp)
+static int qt_open(struct tty_struct *tty, struct usb_serial_port *port,
+                                       struct file *filp)
 {
        struct usb_serial *serial = port->serial;
        int result = 0;
-       unsigned int UartNumber;
+       unsigned int index;
        struct qt_get_device_data DeviceData;
        struct qt_open_channel_data ChannelData;
        unsigned short default_divisor = 0x30;          /* gives 9600 baud rate */
@@ -1128,13 +1133,7 @@ static int qt_open(struct usb_serial_port *port, struct file *filp)
 
        mydbg("%s - port %d\n", __func__, port->number);
 
-       /* force low_latency on so that our tty_push actually forces the data through,
-          otherwise it is scheduled, and with high data rates (like with OHCI) data
-          can get lost. */
-       if (port->tty)
-               port->tty->low_latency = 0;
-
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
 
        status = box_get_device(serial, &DeviceData);
        if (status < 0) {
@@ -1147,7 +1146,7 @@ static int qt_open(struct usb_serial_port *port, struct file *filp)
        /* Open uart channel */
 
        /* Port specific setups */
-       status = BoxOPenCloseChannel(serial, UartNumber, 1, &ChannelData);
+       status = BoxOPenCloseChannel(serial, index, 1, &ChannelData);
        if (status < 0) {
                mydbg(__FILE__ "BoxOPenCloseChannel failed\n");
                return status;
@@ -1161,7 +1160,7 @@ static int qt_open(struct usb_serial_port *port, struct file *filp)
            (SERIAL_MSR_CTS | SERIAL_MSR_DSR | SERIAL_MSR_RI | SERIAL_MSR_CD);
 
        /* Set Baud rate to default and turn off (default)flow control here */
-       status = BoxSetUart(serial, UartNumber, default_divisor, default_LCR);
+       status = BoxSetUart(serial, index, default_divisor, default_LCR);
        if (status < 0) {
                mydbg(__FILE__ "BoxSetUart failed\n");
                return status;
@@ -1169,7 +1168,7 @@ static int qt_open(struct usb_serial_port *port, struct file *filp)
        mydbg(__FILE__ "BoxSetUart completed.\n");
 
        /* Put this here to make it responsive to stty and defauls set by the tty layer */
-       qt_set_termios(port, NULL);
+       qt_set_termios(tty, port, NULL);
 
        /* Initialize the wait que head */
        init_waitqueue_head(&(port->wait));
@@ -1203,7 +1202,7 @@ static int qt_open(struct usb_serial_port *port, struct file *filp)
 static void serial_close(struct tty_struct *tty, struct file *filp)
 {
        struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+           tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
 
        if (!serial)
@@ -1226,7 +1225,7 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
                        mydbg("%s - port->closePending = 1\n", __func__);
 
                        if (serial->dev) {
-                               qt_close(port, filp);
+                               qt_close(tty, port, filp);
                                port->open_count = 0;
                        }
                }
@@ -1240,20 +1239,21 @@ exit:
 
 }
 
-static void qt_close(struct usb_serial_port *port, struct file *filp)
+static void qt_close(struct tty_struct *tty, struct usb_serial_port *port,
+                                                       struct file *filp)
 {
        unsigned long jift = jiffies + 10 * HZ;
-       __u8 LSR_Value, MCR_Value;
+       u8 lsr, mcr;
        struct usb_serial *serial = port->serial;
        int status;
-       unsigned int UartNumber;
+       unsigned int index;
 
        struct qt_open_channel_data ChannelData;
        status = 0;
-       LSR_Value = 0;
+       lsr = 0;
 
        mydbg("%s - port %d\n", __func__, port->number);
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
 
        /* shutdown any bulk reads that might be going on */
        if (serial->num_bulk_out)
@@ -1263,20 +1263,19 @@ static void qt_close(struct usb_serial_port *port, struct file *filp)
 
        /* wait up to 30 seconds for transmitter to empty */
        do {
-               status = BoxGetRegister(serial, UartNumber, LINE_STATUS_REGISTER, &LSR_Value);
+               status = BoxGetRegister(serial, index, LINE_STATUS_REGISTER, &lsr);
                if (status < 0) {
                        mydbg(__FILE__ "box_get_device failed\n");
                        break;
                }
 
-               if ((LSR_Value & SERIAL_LSR_TEMT)
+               if ((lsr & SERIAL_LSR_TEMT)
                    && (port->ReadBulkStopped == 1))
                        break;
                schedule();
 
        }
-       while (jiffies <= jift)
-               ;
+       while (jiffies <= jift);
 
        if (jiffies > jift)
                mydbg("%s - port %d timout of checking transmitter empty\n",
@@ -1286,17 +1285,17 @@ static void qt_close(struct usb_serial_port *port, struct file *filp)
                      __func__, port->number);
 
        status =
-           BoxGetRegister(serial, UartNumber, MODEM_CONTROL_REGISTER,
-                          &MCR_Value);
-       mydbg(__FILE__ "BoxGetRegister MCR = 0x%x.\n", MCR_Value);
+           BoxGetRegister(serial, index, MODEM_CONTROL_REGISTER,
+                          &mcr);
+       mydbg(__FILE__ "BoxGetRegister MCR = 0x%x.\n", mcr);
 
        if (status >= 0) {
-               MCR_Value &= ~(SERIAL_MCR_DTR | SERIAL_MCR_RTS);
-               /* status = BoxSetRegister(serial, UartNumber, MODEM_CONTROL_REGISTER, MCR_Value); */
+               mcr &= ~(SERIAL_MCR_DTR | SERIAL_MCR_RTS);
+               /* status = BoxSetRegister(serial, index, MODEM_CONTROL_REGISTER, mcr); */
        }
 
        /* Close uart channel */
-       status = BoxOPenCloseChannel(serial, UartNumber, 0, &ChannelData);
+       status = BoxOPenCloseChannel(serial, index, 0, &ChannelData);
        if (status < 0)
                mydbg("%s - port %d BoxOPenCloseChannel failed.\n",
                      __func__, port->number);
@@ -1308,12 +1307,10 @@ static void qt_close(struct usb_serial_port *port, struct file *filp)
 static int serial_write(struct tty_struct *tty, const unsigned char *buf,
                        int count)
 {
-       struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial;
        int retval = -EINVAL;
-       unsigned int UartNumber;
-       int from_user = 0;
+       unsigned int index;
 
        serial = get_usb_serial(port, __func__);
        if (serial == NULL)
@@ -1321,7 +1318,7 @@ static int serial_write(struct tty_struct *tty, const unsigned char *buf,
        /* This can happen if we get disconnected a */
        if (port->open_count == 0)
                return -ENODEV;
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
 
        mydbg("%s - port %d, %d byte(s)\n", __func__, port->number, count);
        mydbg("%s - port->RxHolding =  %d\n", __func__, port->RxHolding);
@@ -1331,19 +1328,19 @@ static int serial_write(struct tty_struct *tty, const unsigned char *buf,
                goto exit;
        }
 
-       retval = qt_write(port, from_user, buf, count);
+       retval = qt_write(tty, port, buf, count);
 
 exit:
        return retval;
 }
 
-static int qt_write(struct usb_serial_port *port, int from_user,
-                   const unsigned char *buf, int count)
+static int qt_write(struct tty_struct *tty, struct usb_serial_port *port,
+                               const unsigned char *buf, int count)
 {
        int result;
-       unsigned int UartNumber;
-
+       unsigned int index;
        struct usb_serial *serial = get_usb_serial(port, __func__);
+
        if (serial == NULL)
                return -ENODEV;
 
@@ -1354,7 +1351,7 @@ static int qt_write(struct usb_serial_port *port, int from_user,
                return 0;
        }
 
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
        /* only do something if we have a bulk out endpoint */
        if (serial->num_bulk_out) {
                if (port->write_urb->status == -EINPROGRESS) {
@@ -1364,14 +1361,7 @@ static int qt_write(struct usb_serial_port *port, int from_user,
 
                count =
                    (count > port->bulk_out_size) ? port->bulk_out_size : count;
-
-               if (from_user) {
-                       if (copy_from_user
-                           (port->write_urb->transfer_buffer, buf, count))
-                               return -EFAULT;
-               } else {
-                       memcpy(port->write_urb->transfer_buffer, buf, count);
-               }
+               memcpy(port->write_urb->transfer_buffer, buf, count);
 
                /* usb_serial_debug_data(__FILE__, __func__, count, port->write_urb->transfer_buffer); */
 
@@ -1449,8 +1439,7 @@ static void port_softint(struct work_struct *work)
 }
 static int serial_write_room(struct tty_struct *tty)
 {
-       struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        int retval = -EINVAL;
 
@@ -1493,8 +1482,7 @@ static int qt_write_room(struct usb_serial_port *port)
 }
 static int serial_chars_in_buffer(struct tty_struct *tty)
 {
-       struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        int retval = -EINVAL;
 
@@ -1537,17 +1525,16 @@ static int serial_tiocmset(struct tty_struct *tty, struct file *file,
                           unsigned int set, unsigned int clear)
 {
 
-       struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        int retval = -ENODEV;
-       unsigned int UartNumber;
+       unsigned int index;
        mydbg("In %s \n", __func__);
 
        if (!serial)
                return -ENODEV;
 
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
 
        down(&port->sem);
 
@@ -1559,22 +1546,22 @@ static int serial_tiocmset(struct tty_struct *tty, struct file *file,
                goto exit;
        }
 
-       retval = qt_tiocmset(port, file, set);
+       retval = qt_tiocmset(tty, port, file, set);
 
 exit:
        up(&port->sem);
        return retval;
 }
 
-static int qt_tiocmset(struct usb_serial_port *port, struct file *file,
-                      unsigned int value)
+static int qt_tiocmset(struct tty_struct *tty, struct usb_serial_port *port,
+                      struct file *file, unsigned int value)
 {
 
-       __u8 MCR_Value;
+       u8 mcr;
        int status;
-       unsigned int UartNumber;
-
+       unsigned int index;
        struct usb_serial *serial = get_usb_serial(port, __func__);
+
        if (serial == NULL)
                return -ENODEV;
 
@@ -1583,10 +1570,10 @@ static int qt_tiocmset(struct usb_serial_port *port, struct file *file,
     /**************************************************************************************/
     /**  TIOCMGET
      */
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
        status =
-           BoxGetRegister(port->serial, UartNumber, MODEM_CONTROL_REGISTER,
-                          &MCR_Value);
+           BoxGetRegister(port->serial, index, MODEM_CONTROL_REGISTER,
+                          &mcr);
        if (status < 0)
                return -ESPIPE;
 
@@ -1594,17 +1581,17 @@ static int qt_tiocmset(struct usb_serial_port *port, struct file *file,
         * Turn off the RTS and DTR and loopbcck and then only turn on what was
         * asked for
         */
-       MCR_Value &= ~(SERIAL_MCR_RTS | SERIAL_MCR_DTR | SERIAL_MCR_LOOP);
+       mcr &= ~(SERIAL_MCR_RTS | SERIAL_MCR_DTR | SERIAL_MCR_LOOP);
        if (value & TIOCM_RTS)
-               MCR_Value |= SERIAL_MCR_RTS;
+               mcr |= SERIAL_MCR_RTS;
        if (value & TIOCM_DTR)
-               MCR_Value |= SERIAL_MCR_DTR;
+               mcr |= SERIAL_MCR_DTR;
        if (value & TIOCM_LOOP)
-               MCR_Value |= SERIAL_MCR_LOOP;
+               mcr |= SERIAL_MCR_LOOP;
 
        status =
-           BoxSetRegister(port->serial, UartNumber, MODEM_CONTROL_REGISTER,
-                          MCR_Value);
+           BoxSetRegister(port->serial, index, MODEM_CONTROL_REGISTER,
+                          mcr);
        if (status < 0)
                return -ESPIPE;
        else
@@ -1614,18 +1601,16 @@ static int qt_tiocmset(struct usb_serial_port *port, struct file *file,
 static int serial_tiocmget(struct tty_struct *tty, struct file *file)
 {
 
-       struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
-
+       struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        int retval = -ENODEV;
-       unsigned int UartNumber;
+       unsigned int index;
        mydbg("In %s \n", __func__);
 
        if (!serial)
                return -ENODEV;
 
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
 
        down(&port->sem);
 
@@ -1637,56 +1622,55 @@ static int serial_tiocmget(struct tty_struct *tty, struct file *file)
                goto exit;
        }
 
-       retval = qt_tiocmget(port, file);
+       retval = qt_tiocmget(tty, port, file);
 
 exit:
        up(&port->sem);
        return retval;
 }
 
-static int qt_tiocmget(struct usb_serial_port *port, struct file *file)
+static int qt_tiocmget(struct tty_struct *tty,
+                       struct usb_serial_port *port, struct file *file)
 {
 
-       __u8 MCR_Value;
-       __u8 MSR_Value;
+       u8 mcr;
+       u8 msr;
        unsigned int result = 0;
        int status;
-       unsigned int UartNumber;
-       struct tty_struct *tty;
+       unsigned int index;
 
        struct usb_serial *serial = get_usb_serial(port, __func__);
        if (serial == NULL)
                return -ENODEV;
-       tty = port->tty;
 
        mydbg("%s - port %d, tty =0x%p\n", __func__, port->number, tty);
 
     /**************************************************************************************/
     /**  TIOCMGET
      */
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
        status =
-           BoxGetRegister(port->serial, UartNumber, MODEM_CONTROL_REGISTER,
-                          &MCR_Value);
+           BoxGetRegister(port->serial, index, MODEM_CONTROL_REGISTER,
+                          &mcr);
        if (status >= 0) {
                status =
-                   BoxGetRegister(port->serial, UartNumber,
-                                  MODEM_STATUS_REGISTER, &MSR_Value);
+                   BoxGetRegister(port->serial, index,
+                                  MODEM_STATUS_REGISTER, &msr);
 
        }
 
        if (status >= 0) {
-               result = ((MCR_Value & SERIAL_MCR_DTR) ? TIOCM_DTR : 0)
+               result = ((mcr & SERIAL_MCR_DTR) ? TIOCM_DTR : 0)
                    /* DTR IS SET */
-                   | ((MCR_Value & SERIAL_MCR_RTS) ? TIOCM_RTS : 0)
+                   | ((mcr & SERIAL_MCR_RTS) ? TIOCM_RTS : 0)
                    /* RTS IS SET */
-                   | ((MSR_Value & SERIAL_MSR_CTS) ? TIOCM_CTS : 0)
+                   | ((msr & SERIAL_MSR_CTS) ? TIOCM_CTS : 0)
                    /* CTS is set */
-                   | ((MSR_Value & SERIAL_MSR_CD) ? TIOCM_CAR : 0)
+                   | ((msr & SERIAL_MSR_CD) ? TIOCM_CAR : 0)
                    /* Carrier detect is set */
-                   | ((MSR_Value & SERIAL_MSR_RI) ? TIOCM_RI : 0)
+                   | ((msr & SERIAL_MSR_RI) ? TIOCM_RI : 0)
                    /* Ring indicator set */
-                   | ((MSR_Value & SERIAL_MSR_DSR) ? TIOCM_DSR : 0);
+                   | ((msr & SERIAL_MSR_DSR) ? TIOCM_DSR : 0);
                /* DSR is set */
                return result;
 
@@ -1698,17 +1682,16 @@ static int serial_ioctl(struct tty_struct *tty, struct file *file,
                        unsigned int cmd, unsigned long arg)
 {
 
-       struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        int retval = -ENODEV;
-       unsigned int UartNumber;
+       unsigned int index;
        mydbg("In %s \n", __func__);
 
        if (!serial)
                return -ENODEV;
 
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
 
        down(&port->sem);
 
@@ -1720,125 +1703,34 @@ static int serial_ioctl(struct tty_struct *tty, struct file *file,
                goto exit;
        }
 
-       retval = qt_ioctl(port, file, cmd, arg);
+       retval = qt_ioctl(tty, port, file, cmd, arg);
 
 exit:
        up(&port->sem);
        return retval;
 }
-static int qt_ioctl(struct usb_serial_port *port, struct file *file,
-                   unsigned int cmd, unsigned long arg)
+static int qt_ioctl(struct tty_struct *tty, struct usb_serial_port *port,
+                       struct file *file, unsigned int cmd, unsigned long arg)
 {
-       __u8 MCR_Value;
-       __u8 MSR_Value;
-       unsigned short Prev_MSR_Value;
+       __u8 mcr;
+       __u8 msr;
+       unsigned short prev_msr;
        unsigned int value, result = 0;
        int status;
-       unsigned int UartNumber;
-       struct tty_struct *tty;
+       unsigned int index;
 
        struct usb_serial *serial = get_usb_serial(port, __func__);
        if (serial == NULL)
                return -ENODEV;
-       tty = port->tty;
 
        mydbg("%s - port %d, tty =0x%p\n", __func__, port->number, tty);
 
        /* TIOCMGET */
-       UartNumber = port->tty->index - serial->minor;
-
-       if (cmd == TIOCMGET) {
-               MCR_Value = port->shadowMCR;
-               MSR_Value = port->shadowMSR;
-
-               {
-                       result = ((MCR_Value & SERIAL_MCR_DTR) ? TIOCM_DTR : 0)
-                           /* DTR IS SET */
-                           | ((MCR_Value & SERIAL_MCR_RTS) ? TIOCM_RTS : 0)
-                           /* RTS IS SET */
-                           | ((MSR_Value & SERIAL_MSR_CTS) ? TIOCM_CTS : 0)
-                           /* CTS is set */
-                           | ((MSR_Value & SERIAL_MSR_CD) ? TIOCM_CAR : 0)
-                           /* Carrier detect is set */
-                           | ((MSR_Value & SERIAL_MSR_RI) ? TIOCM_RI : 0)
-                           /* Ring indicator set */
-                           | ((MSR_Value & SERIAL_MSR_DSR) ? TIOCM_DSR : 0);
-                       /* DSR is set */
-                       if (copy_to_user
-                           ((unsigned int *)arg, &result,
-                            sizeof(unsigned int)))
-                               return -EFAULT;
-                       return 0;
-
-               }
-       }
-
-       /* TIOCMBIS, TIOCMBIC, AND TIOCMSET */
-       if (cmd == TIOCMBIS || cmd == TIOCMBIC || cmd == TIOCMSET) {
-               status =
-                   BoxGetRegister(port->serial, UartNumber,
-                                  MODEM_CONTROL_REGISTER, &MCR_Value);
-               if (status < 0)
-                       return -ESPIPE;
-               if (copy_from_user
-                   (&value, (unsigned int *)arg, sizeof(unsigned int)))
-                       return -EFAULT;
-
-               switch (cmd) {
-               case TIOCMBIS:
-                       if (value & TIOCM_RTS)
-                               MCR_Value |= SERIAL_MCR_RTS;
-                       if (value & TIOCM_DTR)
-                               MCR_Value |= SERIAL_MCR_DTR;
-                       if (value & TIOCM_LOOP)
-                               MCR_Value |= SERIAL_MCR_LOOP;
-                       break;
-               case TIOCMBIC:
-                       if (value & TIOCM_RTS)
-                               MCR_Value &= ~SERIAL_MCR_RTS;
-                       if (value & TIOCM_DTR)
-                               MCR_Value &= ~SERIAL_MCR_DTR;
-                       if (value & TIOCM_LOOP)
-                               MCR_Value &= ~SERIAL_MCR_LOOP;
-                       break;
-               case TIOCMSET:
-                       /*
-                        * Turn off the RTS and DTR and loopbcck and then only
-                        * turn on what was asked for
-                        */
-                       MCR_Value &=
-                           ~(SERIAL_MCR_RTS | SERIAL_MCR_DTR |
-                             SERIAL_MCR_LOOP);
-                       if (value & TIOCM_RTS)
-                               MCR_Value |= SERIAL_MCR_RTS;
-                       if (value & TIOCM_DTR)
-                               MCR_Value |= SERIAL_MCR_DTR;
-                       if (value & TIOCM_LOOP)
-                               MCR_Value |= SERIAL_MCR_LOOP;
-                       break;
-               default:
-                       break;
-
-               }
-               status =
-                   BoxSetRegister(port->serial, UartNumber,
-                                  MODEM_CONTROL_REGISTER, MCR_Value);
-               if (status < 0)
-                       return -ESPIPE;
-               else {
-                       port->shadowMCR = MCR_Value;
-                       return 0;
-               }
-
-       }
-    /**************************************************************************************/
-   /**   TIOCMBIS, TIOCMBIC, AND TIOCMSET    end
-   */
-    /**************************************************************************************/
+       index = tty->index - serial->minor;
 
        if (cmd == TIOCMIWAIT) {
                DECLARE_WAITQUEUE(wait, current);
-               Prev_MSR_Value = port->shadowMSR & SERIAL_MSR_MASK;
+               prev_msr = port->shadowMSR & SERIAL_MSR_MASK;
                while (1) {
                        add_wait_queue(&port->wait, &wait);
                        set_current_state(TASK_INTERRUPTIBLE);
@@ -1847,22 +1739,22 @@ static int qt_ioctl(struct usb_serial_port *port, struct file *file,
                        /* see if a signal woke us up */
                        if (signal_pending(current))
                                return -ERESTARTSYS;
-                       MSR_Value = port->shadowMSR & SERIAL_MSR_MASK;
-                       if (MSR_Value == Prev_MSR_Value)
+                       msr = port->shadowMSR & SERIAL_MSR_MASK;
+                       if (msr == prev_msr)
                                return -EIO;    /* no change error */
 
                        if ((arg & TIOCM_RNG
-                            && ((Prev_MSR_Value & SERIAL_MSR_RI) ==
-                                (MSR_Value & SERIAL_MSR_RI)))
+                            && ((prev_msr & SERIAL_MSR_RI) ==
+                                (msr & SERIAL_MSR_RI)))
                            || (arg & TIOCM_DSR
-                               && ((Prev_MSR_Value & SERIAL_MSR_DSR) ==
-                                   (MSR_Value & SERIAL_MSR_DSR)))
+                               && ((prev_msr & SERIAL_MSR_DSR) ==
+                                   (msr & SERIAL_MSR_DSR)))
                            || (arg & TIOCM_CD
-                               && ((Prev_MSR_Value & SERIAL_MSR_CD) ==
-                                   (MSR_Value & SERIAL_MSR_CD)))
+                               && ((prev_msr & SERIAL_MSR_CD) ==
+                                   (msr & SERIAL_MSR_CD)))
                            || (arg & TIOCM_CTS
-                               && ((Prev_MSR_Value & SERIAL_MSR_CTS) ==
-                                   (MSR_Value & SERIAL_MSR_CTS)))) {
+                               && ((prev_msr & SERIAL_MSR_CTS) ==
+                                   (msr & SERIAL_MSR_CTS)))) {
                                return 0;
                        }
 
@@ -1878,7 +1770,7 @@ static int qt_ioctl(struct usb_serial_port *port, struct file *file,
 static void serial_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
        struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+           tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
 
        if (!serial)
@@ -1894,22 +1786,22 @@ static void serial_set_termios(struct tty_struct *tty, struct ktermios *old)
        }
 
        /* pass on to the driver specific version of this function if it is available */
-       qt_set_termios(port, old);
+       qt_set_termios(tty, port, old);
 
 exit:
        up(&port->sem);
 }
 
-static void qt_set_termios(struct usb_serial_port *port,
+static void qt_set_termios(struct tty_struct *tty,
+                          struct usb_serial_port *port,
                           struct ktermios *old_termios)
 {
        unsigned int cflag;
        int baud, divisor, remainder;
-       unsigned char LCR_change_to = 0;
-       struct tty_struct *tty;
+       unsigned char new_LCR = 0;
        int status;
        struct usb_serial *serial;
-       __u16 UartNumber;
+       __u16 index;
        __u16 tmp, tmp2;
 
        mydbg("%s - port %d\n", __func__, port->number);
@@ -1921,59 +1813,46 @@ static void qt_set_termios(struct usb_serial_port *port,
        tmp2 = serial->minor;
        mydbg("%s - serial->minor =  %d\n", __func__, tmp2);
 
-       UartNumber = port->tty->index - serial->minor;
-
-       tty = port->tty;
+       index = port->tty->index - serial->minor;
 
        cflag = tty->termios->c_cflag;
 
-       if (old_termios) {
-               if ((cflag == old_termios->c_cflag)
-                   && (RELEVANT_IFLAG(tty->termios->c_iflag) ==
-                       RELEVANT_IFLAG(old_termios->c_iflag))) {
-                       mydbg("%s - Nothing to change\n", __func__);
-                       return;
-               }
-
-       }
-
        mydbg("%s - 3\n", __func__);
 
        switch (cflag) {
        case CS5:
-               LCR_change_to |= SERIAL_5_DATA;
+               new_LCR |= SERIAL_5_DATA;
                break;
        case CS6:
-               LCR_change_to |= SERIAL_6_DATA;
+               new_LCR |= SERIAL_6_DATA;
                break;
        case CS7:
-               LCR_change_to |= SERIAL_7_DATA;
+               new_LCR |= SERIAL_7_DATA;
                break;
        default:
        case CS8:
-               LCR_change_to |= SERIAL_8_DATA;
+               new_LCR |= SERIAL_8_DATA;
                break;
        }
 
        /* Parity stuff */
        if (cflag & PARENB) {
                if (cflag & PARODD)
-                       LCR_change_to |= SERIAL_ODD_PARITY;
+                       new_LCR |= SERIAL_ODD_PARITY;
                else
-                       LCR_change_to |= SERIAL_EVEN_PARITY;
+                       new_LCR |= SERIAL_EVEN_PARITY;
        }
        if (cflag & CSTOPB)
-               LCR_change_to |= SERIAL_TWO_STOPB;
+               new_LCR |= SERIAL_TWO_STOPB;
        else
-               LCR_change_to |= SERIAL_TWO_STOPB;
+               new_LCR |= SERIAL_TWO_STOPB;
 
        mydbg("%s - 4\n", __func__);
        /* Thats the LCR stuff, go ahead and set it */
        baud = tty_get_baud_rate(tty);
-       if (!baud) {
+       if (!baud)
                /* pick a default, any default... */
                baud = 9600;
-       }
 
        mydbg("%s - got baud = %d\n", __func__, baud);
 
@@ -1986,9 +1865,7 @@ static void qt_set_termios(struct usb_serial_port *port,
        /*
         * Set Baud rate to default and turn off (default)flow control here
         */
-       status =
-           BoxSetUart(serial, UartNumber, (unsigned short)divisor,
-                      LCR_change_to);
+       status = BoxSetUart(serial, index, (unsigned short)divisor, new_LCR);
        if (status < 0) {
                mydbg(__FILE__ "BoxSetUart failed\n");
                return;
@@ -2000,7 +1877,7 @@ static void qt_set_termios(struct usb_serial_port *port,
                      port->number);
 
                /* Enable RTS/CTS flow control */
-               status = BoxSetHW_FlowCtrl(serial, UartNumber, 1);
+               status = BoxSetHW_FlowCtrl(serial, index, 1);
 
                if (status < 0) {
                        mydbg(__FILE__ "BoxSetHW_FlowCtrl failed\n");
@@ -2011,7 +1888,7 @@ static void qt_set_termios(struct usb_serial_port *port,
                mydbg("%s - disabling HW flow control port %d\n", __func__,
                      port->number);
 
-               status = BoxSetHW_FlowCtrl(serial, UartNumber, 0);
+               status = BoxSetHW_FlowCtrl(serial, index, 0);
                if (status < 0) {
                        mydbg(__FILE__ "BoxSetHW_FlowCtrl failed\n");
                        return;
@@ -2025,19 +1902,20 @@ static void qt_set_termios(struct usb_serial_port *port,
                unsigned char stop_char = STOP_CHAR(tty);
                unsigned char start_char = START_CHAR(tty);
                status =
-                   BoxSetSW_FlowCtrl(serial, UartNumber, stop_char,
+                   BoxSetSW_FlowCtrl(serial, index, stop_char,
                                      start_char);
                if (status < 0)
                        mydbg(__FILE__ "BoxSetSW_FlowCtrl (enabled) failed\n");
 
        } else {
                /* disable SW flow control */
-               status = BoxDisable_SW_FlowCtrl(serial, UartNumber);
+               status = BoxDisable_SW_FlowCtrl(serial, index);
                if (status < 0)
                        mydbg(__FILE__ "BoxSetSW_FlowCtrl (diabling) failed\n");
 
        }
-
+       tty->termios->c_cflag &= ~CMSPAR;
+       /* FIXME: Error cases should be returning the actual bits changed only */
 }
 
 /****************************************************************************
@@ -2237,11 +2115,11 @@ static int BoxSetUart(struct usb_serial *serial, unsigned short Uart_Number,
        return result;
 }
 
-static int BoxSetHW_FlowCtrl(struct usb_serial *serial, unsigned int UartNumber,
+static int BoxSetHW_FlowCtrl(struct usb_serial *serial, unsigned int index,
                             int bSet)
 {
-       __u8 MCR_Value = 0;
-       __u8 MSR_Value = 0, MOUT_Value = 0;
+       __u8 mcr = 0;
+       __u8 msr = 0, MOUT_Value = 0;
        struct usb_serial_port *port;
        unsigned int status;
 
@@ -2249,34 +2127,34 @@ static int BoxSetHW_FlowCtrl(struct usb_serial *serial, unsigned int UartNumber,
 
        if (bSet == 1) {
                /* flow control, box will clear RTS line to prevent remote */
-               MCR_Value = SERIAL_MCR_RTS;
+               mcr = SERIAL_MCR_RTS;
        }                       /* device from xmitting more chars */
        else {
                /* no flow control to remote device */
-               MCR_Value = 0;
+               mcr = 0;
 
        }
-       MOUT_Value = MCR_Value << 8;
+       MOUT_Value = mcr << 8;
 
        if (bSet == 1) {
                /* flow control, box will inhibit xmit data if CTS line is
                 * asserted */
-               MSR_Value = SERIAL_MSR_CTS;
+               msr = SERIAL_MSR_CTS;
        } else {
                /* Box will not inhimbe xmit data due to CTS line */
-               MSR_Value = 0;
+               msr = 0;
        }
-       MOUT_Value |= MSR_Value;
+       MOUT_Value |= msr;
 
        status =
            usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
                            QT_HW_FLOW_CONTROL_MASK, 0x40, MOUT_Value,
-                           UartNumber, NULL, 0, 300);
+                           index, NULL, 0, 300);
        return status;
 
 }
 
-static int BoxSetSW_FlowCtrl(struct usb_serial *serial, __u16 UartNumber,
+static int BoxSetSW_FlowCtrl(struct usb_serial *serial, __u16 index,
                             unsigned char stop_char, unsigned char start_char)
 {
        __u16 nSWflowout;
@@ -2288,17 +2166,17 @@ static int BoxSetSW_FlowCtrl(struct usb_serial *serial, __u16 UartNumber,
        result =
            usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
                            QT_SW_FLOW_CONTROL_MASK, 0x40, nSWflowout,
-                           UartNumber, NULL, 0, 300);
+                           index, NULL, 0, 300);
        return result;
 
 }
-static int BoxDisable_SW_FlowCtrl(struct usb_serial *serial, __u16 UartNumber)
+static int BoxDisable_SW_FlowCtrl(struct usb_serial *serial, __u16 index)
 {
        int result;
 
        result =
            usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_SW_FLOW_CONTROL_DISABLE, 0x40, 0, UartNumber,
+                           QT_SW_FLOW_CONTROL_DISABLE, 0x40, 0, index,
                            NULL, 0, 300);
        return result;
 
@@ -2307,7 +2185,7 @@ static int BoxDisable_SW_FlowCtrl(struct usb_serial *serial, __u16 UartNumber)
 static void serial_throttle(struct tty_struct *tty)
 {
        struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+           tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        mydbg("%s - port %d\n", __func__, port->number);
 
@@ -2334,7 +2212,7 @@ exit:
 static void serial_unthrottle(struct tty_struct *tty)
 {
        struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+           tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        unsigned int result;
 
@@ -2380,20 +2258,19 @@ exit:
 
 static int serial_break(struct tty_struct *tty, int break_state)
 {
-       struct usb_serial_port *port =
-           (struct usb_serial_port *)tty->driver_data;
+       struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
-       __u16 UartNumber, Break_Value;
+       u16 index, onoff;
        unsigned int result;
 
-       UartNumber = port->tty->index - serial->minor;
+       index = tty->index - serial->minor;
        if (!serial)
                return -ENODEV;
 
        if (break_state == -1)
-               Break_Value = 1;
+               onoff = 1;
        else
-               Break_Value = 0;
+               onoff = 0;
 
        down(&port->sem);
 
@@ -2406,7 +2283,7 @@ static int serial_break(struct tty_struct *tty, int break_state)
 
        result =
            usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_BREAK_CONTROL, 0x40, Break_Value, UartNumber,
+                           QT_BREAK_CONTROL, 0x40, onoff, index,
                            NULL, 0, 300);
 
 exit:
index 953684f..9481563 100644 (file)
@@ -371,9 +371,9 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
                printk(KERN_DEBUG "%s\n", slic_proc_version);
        }
 
-       err = pci_set_dma_mask(pcidev, DMA_64BIT_MASK);
+       err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
        if (err) {
-               err = pci_set_dma_mask(pcidev, DMA_32BIT_MASK);
+               err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
                if (err)
                        goto err_out_disable_pci;
        }
index 0050a02..891f6e3 100644 (file)
@@ -934,16 +934,16 @@ static int sxg_entry_probe(struct pci_dev *pcidev,
 
        pci_read_config_byte(pcidev, PCI_REVISION_ID, &revision_id);
 
-       if (!(err = pci_set_dma_mask(pcidev, DMA_64BIT_MASK))) {
-               DBG_ERROR("pci_set_dma_mask(DMA_64BIT_MASK) successful\n");
+       if (!(err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64)))) {
+               DBG_ERROR("pci_set_dma_mask(DMA_BIT_MASK(64)) successful\n");
        } else {
-               if ((err = pci_set_dma_mask(pcidev, DMA_32BIT_MASK))) {
+               if ((err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32)))) {
                        DBG_ERROR
                            ("No usable DMA configuration, aborting  err[%x]\n",
                             err);
                        return err;
                }
-               DBG_ERROR("pci_set_dma_mask(DMA_32BIT_MASK) successful\n");
+               DBG_ERROR("pci_set_dma_mask(DMA_BIT_MASK(32)) successful\n");
        }
 
        DBG_ERROR("Call pci_request_regions\n");
index b3d5a23..869d47c 100644 (file)
@@ -1358,6 +1358,9 @@ static struct usb_device_id acm_ids[] = {
        { USB_DEVICE(0x079b, 0x000f), /* BT On-Air USB MODEM */
        .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
        },
+       { USB_DEVICE(0x0ace, 0x1602), /* ZyDAS 56K USB MODEM */
+       .driver_info = SINGLE_RX_URB,
+       },
        { USB_DEVICE(0x0ace, 0x1608), /* ZyDAS 56K USB MODEM */
        .driver_info = SINGLE_RX_URB, /* firmware bug */
        },
@@ -1493,4 +1496,4 @@ module_exit(acm_exit);
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
 MODULE_LICENSE("GPL");
-
+MODULE_ALIAS_CHARDEV_MAJOR(ACM_TTY_MAJOR);
index f2618d1..c637207 100644 (file)
@@ -622,7 +622,7 @@ static int ehci_run (struct usb_hcd *hcd)
                ehci_writel(ehci, 0, &ehci->regs->segment);
 #if 0
 // this is deeply broken on almost all architectures
-               if (!dma_set_mask(hcd->self.controller, DMA_64BIT_MASK))
+               if (!dma_set_mask(hcd->self.controller, DMA_BIT_MASK(64)))
                        ehci_info(ehci, "enabled 64bit DMA\n");
 #endif
        }
index abb9a77..5aa8bce 100644 (file)
@@ -108,7 +108,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                case 0x00d8:    /* CK8 */
                case 0x00e8:    /* CK8S */
                        if (pci_set_consistent_dma_mask(pdev,
-                                               DMA_31BIT_MASK) < 0)
+                                               DMA_BIT_MASK(31)) < 0)
                                ehci_warn(ehci, "can't enable NVidia "
                                        "workaround for >2GB RAM\n");
                        break;
index 9c9da35..1ba9f9a 100644 (file)
@@ -81,7 +81,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
        int result;
        struct usb_hcd *hcd;
        unsigned int virq;
-       static u64 dummy_mask = DMA_32BIT_MASK;
+       static u64 dummy_mask = DMA_BIT_MASK(32);
 
        if (usb_disabled()) {
                result = -ENODEV;
index 4ed228a..bb5e6f6 100644 (file)
@@ -280,7 +280,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
                 * are always powered while this driver is active, and use
                 * active-low power switches.
                 */
-               for (i = 0; i < pdata->ports; i++) {
+               for (i = 0; i < ARRAY_SIZE(pdata->vbus_pin); i++) {
                        if (pdata->vbus_pin[i] <= 0)
                                continue;
                        gpio_request(pdata->vbus_pin[i], "ohci_vbus");
@@ -298,7 +298,7 @@ static int ohci_hcd_at91_drv_remove(struct platform_device *pdev)
        int                     i;
 
        if (pdata) {
-               for (i = 0; i < pdata->ports; i++) {
+               for (i = 0; i < ARRAY_SIZE(pdata->vbus_pin); i++) {
                        if (pdata->vbus_pin[i] <= 0)
                                continue;
                        gpio_direction_output(pdata->vbus_pin[i], 1);
index 3c1a3b5..3d19103 100644 (file)
@@ -80,7 +80,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
        int result;
        struct usb_hcd *hcd;
        unsigned int virq;
-       static u64 dummy_mask = DMA_32BIT_MASK;
+       static u64 dummy_mask = DMA_BIT_MASK(32);
 
        if (usb_disabled()) {
                result = -ENODEV;
index 1aed584..751a533 100644 (file)
@@ -79,6 +79,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65) },
        { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X75) },
        { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_EF81) },
+       { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_ID_S81) }, /* Benq/Siemens S81 */
        { USB_DEVICE(SYNTECH_VENDOR_ID, SYNTECH_PRODUCT_ID) },
        { USB_DEVICE(NOKIA_CA42_VENDOR_ID, NOKIA_CA42_PRODUCT_ID) },
        { USB_DEVICE(CA_42_CA42_VENDOR_ID, CA_42_CA42_PRODUCT_ID) },
index 54974f4..1d7a22e 100644 (file)
@@ -7,6 +7,10 @@
  *     (at your option) any later version.
  * 
  */
+
+#define BENQ_VENDOR_ID                 0x04a5
+#define BENQ_PRODUCT_ID_S81            0x4027
+
 #define PL2303_VENDOR_ID       0x067b
 #define PL2303_PRODUCT_ID      0x2303
 #define PL2303_PRODUCT_ID_RSAQ2                0x04bb
index 8b3cbc8..69879e4 100644 (file)
@@ -139,14 +139,6 @@ static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port,
        priv->port = port;
        spin_unlock_irqrestore(&priv->lock, flags);
 
-       /*
-        * Force low_latency on so that our tty_push actually forces the data
-        * through, otherwise it is scheduled, and with high data rates (like
-        * with OHCI) data can get lost.
-        */
-       if (tty)
-               tty->low_latency = 1;
-
        /* Start reading from the device */
        usb_fill_int_urb(priv->int_urb, priv->udev,
                         usb_rcvintpipe(priv->udev, priv->int_address),
@@ -205,62 +197,6 @@ static void symbol_unthrottle(struct tty_struct *tty)
                                                        __func__, result);
 }
 
-static int symbol_ioctl(struct tty_struct *tty, struct file *file,
-                       unsigned int cmd, unsigned long arg)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct device *dev = &port->dev;
-
-       /*
-        * Right now we need to figure out what commands
-        * most userspace tools want to see for this driver,
-        * so just log the things.
-        */
-       switch (cmd) {
-       case TIOCSERGETLSR:
-               dev_info(dev, "%s: TIOCSERGETLSR\n", __func__);
-               break;
-
-       case TIOCGSERIAL:
-               dev_info(dev, "%s: TIOCGSERIAL\n", __func__);
-               break;
-
-       case TIOCMIWAIT:
-               dev_info(dev, "%s: TIOCMIWAIT\n", __func__);
-               break;
-
-       case TIOCGICOUNT:
-               dev_info(dev, "%s: TIOCGICOUNT\n", __func__);
-               break;
-       default:
-               dev_info(dev, "%s: unknown (%d)\n", __func__, cmd);
-       }
-       return -ENOIOCTLCMD;
-}
-
-static int symbol_tiocmget(struct tty_struct *tty, struct file *file)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct device *dev = &port->dev;
-
-       /* TODO */
-       /* probably just need to shadow whatever was sent to us here */
-       dev_info(dev, "%s\n", __func__);
-       return 0;
-}
-
-static int symbol_tiocmset(struct tty_struct *tty, struct file *file,
-                          unsigned int set, unsigned int clear)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct device *dev = &port->dev;
-
-       /* TODO */
-       /* probably just need to shadow whatever was sent to us here */
-       dev_info(dev, "%s\n", __func__);
-       return 0;
-}
-
 static int symbol_startup(struct usb_serial *serial)
 {
        struct symbol_private *priv;
@@ -367,9 +303,6 @@ static struct usb_serial_driver symbol_device = {
        .shutdown =             symbol_shutdown,
        .throttle =             symbol_throttle,
        .unthrottle =           symbol_unthrottle,
-       .ioctl =                symbol_ioctl,
-       .tiocmget =             symbol_tiocmget,
-       .tiocmset =             symbol_tiocmset,
 };
 
 static int __init symbol_init(void)
index 1f8964e..2e27846 100644 (file)
@@ -160,10 +160,10 @@ static int whci_probe(struct pci_dev *pci, const struct pci_device_id *id)
        pci_enable_msi(pci);
        pci_set_master(pci);
        err = -ENXIO;
-       if (!pci_set_dma_mask(pci, DMA_64BIT_MASK))
-               pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK);
-       else if (!pci_set_dma_mask(pci, DMA_32BIT_MASK))
-               pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK);
+       if (!pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
+               pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
+       else if (!pci_set_dma_mask(pci, DMA_BIT_MASK(32)))
+               pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
        else
                goto error_dma;
 
index ffe2f27..7826bdc 100644 (file)
@@ -1550,6 +1550,7 @@ config FB_3DFX
        select FB_CFB_IMAGEBLIT
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
+       select FB_MODE_HELPERS
        help
          This driver supports graphics boards with the 3Dfx Banshee,
          Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have
@@ -1565,6 +1566,14 @@ config FB_3DFX_ACCEL
        This will compile the 3Dfx Banshee/Voodoo3/VSA-100 frame buffer
        device driver with acceleration functions.
 
+config FB_3DFX_I2C
+       bool "Enable DDC/I2C support"
+       depends on FB_3DFX && EXPERIMENTAL
+       select FB_DDC
+       default y
+       help
+         Say Y here if you want DDC/I2C support for your 3dfx Voodoo3.
+
 config FB_VOODOO1
        tristate "3Dfx Voodoo Graphics (sst1) support"
        depends on FB && PCI
index fb51197..f153c58 100644 (file)
@@ -1352,14 +1352,15 @@ static int fsl_diu_resume(struct of_device *ofdev)
 #endif                         /* CONFIG_PM */
 
 /* Align to 64-bit(8-byte), 32-byte, etc. */
-static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align)
+static int allocate_buf(struct device *dev, struct diu_addr *buf, u32 size,
+                       u32 bytes_align)
 {
        u32 offset, ssize;
        u32 mask;
        dma_addr_t paddr = 0;
 
        ssize = size + bytes_align;
-       buf->vaddr = dma_alloc_coherent(NULL, ssize, &paddr, GFP_DMA |
+       buf->vaddr = dma_alloc_coherent(dev, ssize, &paddr, GFP_DMA |
                                                             __GFP_ZERO);
        if (!buf->vaddr)
                return -ENOMEM;
@@ -1376,9 +1377,10 @@ static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align)
        return 0;
 }
 
-static void free_buf(struct diu_addr *buf, u32 size, u32 bytes_align)
+static void free_buf(struct device *dev, struct diu_addr *buf, u32 size,
+                    u32 bytes_align)
 {
-       dma_free_coherent(NULL, size + bytes_align,
+       dma_free_coherent(dev, size + bytes_align,
                                buf->vaddr, (buf->paddr - buf->offset));
        return;
 }
@@ -1476,17 +1478,19 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,
        machine_data->monitor_port = monitor_port;
 
        /* Area descriptor memory pool aligns to 64-bit boundary */
-       if (allocate_buf(&pool.ad, sizeof(struct diu_ad) * FSL_AOI_NUM, 8))
+       if (allocate_buf(&ofdev->dev, &pool.ad,
+                        sizeof(struct diu_ad) * FSL_AOI_NUM, 8))
                return -ENOMEM;
 
        /* Get memory for Gamma Table  - 32-byte aligned memory */
-       if (allocate_buf(&pool.gamma, 768, 32)) {
+       if (allocate_buf(&ofdev->dev, &pool.gamma, 768, 32)) {
                ret = -ENOMEM;
                goto error;
        }
 
        /* For performance, cursor bitmap buffer aligns to 32-byte boundary */
-       if (allocate_buf(&pool.cursor, MAX_CURS * MAX_CURS * 2, 32)) {
+       if (allocate_buf(&ofdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
+                        32)) {
                ret = -ENOMEM;
                goto error;
        }
@@ -1554,11 +1558,13 @@ error:
                i > 0; i--)
                uninstall_fb(machine_data->fsl_diu_info[i - 1]);
        if (pool.ad.vaddr)
-               free_buf(&pool.ad, sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
+               free_buf(&ofdev->dev, &pool.ad,
+                        sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
        if (pool.gamma.vaddr)
-               free_buf(&pool.gamma, 768, 32);
+               free_buf(&ofdev->dev, &pool.gamma, 768, 32);
        if (pool.cursor.vaddr)
-               free_buf(&pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
+               free_buf(&ofdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
+                        32);
        if (machine_data->dummy_aoi_virt)
                fsl_diu_free(machine_data->dummy_aoi_virt, 64);
        iounmap(dr.diu_reg);
@@ -1584,11 +1590,13 @@ static int fsl_diu_remove(struct of_device *ofdev)
        for (i = ARRAY_SIZE(machine_data->fsl_diu_info); i > 0; i--)
                uninstall_fb(machine_data->fsl_diu_info[i - 1]);
        if (pool.ad.vaddr)
-               free_buf(&pool.ad, sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
+               free_buf(&ofdev->dev, &pool.ad,
+                        sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
        if (pool.gamma.vaddr)
-               free_buf(&pool.gamma, 768, 32);
+               free_buf(&ofdev->dev, &pool.gamma, 768, 32);
        if (pool.cursor.vaddr)
-               free_buf(&pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
+               free_buf(&ofdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
+                        32);
        if (machine_data->dummy_aoi_virt)
                fsl_diu_free(machine_data->dummy_aoi_virt, 64);
        iounmap(dr.diu_reg);
index fa1a512..21b3692 100644 (file)
@@ -400,12 +400,12 @@ static void sdc_disable_channel(struct mx3fb_info *mx3_fbi)
 static int sdc_set_window_pos(struct mx3fb_data *mx3fb, enum ipu_channel channel,
                              int16_t x_pos, int16_t y_pos)
 {
-       x_pos += mx3fb->h_start_width;
-       y_pos += mx3fb->v_start_width;
-
        if (channel != IDMAC_SDC_0)
                return -EINVAL;
 
+       x_pos += mx3fb->h_start_width;
+       y_pos += mx3fb->v_start_width;
+
        mx3fb_write_reg(mx3fb, (x_pos << 16) | y_pos, SDC_BG_POS);
        return 0;
 }
@@ -491,11 +491,13 @@ static int sdc_init_panel(struct mx3fb_data *mx3fb, enum ipu_panel panel,
         * 2^4 to get fractional part, as long as we stay under ~250MHz and on
         * i.MX31 it (HSP_CLK) is <= 178MHz. Currently 128.267MHz
         */
-       dev_dbg(mx3fb->dev, "pixel clk = %d\n", pixel_clk);
-
        ipu_clk = clk_get(mx3fb->dev, NULL);
-       div = clk_get_rate(ipu_clk) * 16 / pixel_clk;
-       clk_put(ipu_clk);
+       if (!IS_ERR(ipu_clk)) {
+               div = clk_get_rate(ipu_clk) * 16 / pixel_clk;
+               clk_put(ipu_clk);
+       } else {
+               div = 0;
+       }
 
        if (div < 0x40) {       /* Divider less than 4 */
                dev_dbg(mx3fb->dev,
@@ -503,6 +505,9 @@ static int sdc_init_panel(struct mx3fb_data *mx3fb, enum ipu_panel panel,
                div = 0x40;
        }
 
+       dev_dbg(mx3fb->dev, "pixel clk = %u, divider %u.%u\n",
+               pixel_clk, div >> 4, (div & 7) * 125);
+
        spin_lock_irqsave(&mx3fb->lock, lock_flags);
 
        /*
@@ -515,16 +520,16 @@ static int sdc_init_panel(struct mx3fb_data *mx3fb, enum ipu_panel panel,
        /* DI settings */
        old_conf = mx3fb_read_reg(mx3fb, DI_DISP_IF_CONF) & 0x78FFFFFF;
        old_conf |= sig.datamask_en << DI_D3_DATAMSK_SHIFT |
-           sig.clksel_en << DI_D3_CLK_SEL_SHIFT |
-           sig.clkidle_en << DI_D3_CLK_IDLE_SHIFT;
+               sig.clksel_en << DI_D3_CLK_SEL_SHIFT |
+               sig.clkidle_en << DI_D3_CLK_IDLE_SHIFT;
        mx3fb_write_reg(mx3fb, old_conf, DI_DISP_IF_CONF);
 
        old_conf = mx3fb_read_reg(mx3fb, DI_DISP_SIG_POL) & 0xE0FFFFFF;
        old_conf |= sig.data_pol << DI_D3_DATA_POL_SHIFT |
-           sig.clk_pol << DI_D3_CLK_POL_SHIFT |
-           sig.enable_pol << DI_D3_DRDY_SHARP_POL_SHIFT |
-           sig.Hsync_pol << DI_D3_HSYNC_POL_SHIFT |
-           sig.Vsync_pol << DI_D3_VSYNC_POL_SHIFT;
+               sig.clk_pol << DI_D3_CLK_POL_SHIFT |
+               sig.enable_pol << DI_D3_DRDY_SHARP_POL_SHIFT |
+               sig.Hsync_pol << DI_D3_HSYNC_POL_SHIFT |
+               sig.Vsync_pol << DI_D3_VSYNC_POL_SHIFT;
        mx3fb_write_reg(mx3fb, old_conf, DI_DISP_SIG_POL);
 
        switch (pixel_fmt) {
@@ -721,7 +726,6 @@ static int mx3fb_set_par(struct fb_info *fbi)
        struct idmac_channel *ichan = mx3_fbi->idmac_channel;
        struct idmac_video_param *video = &ichan->params.video;
        struct scatterlist *sg = mx3_fbi->sg;
-       size_t screen_size;
 
        dev_dbg(mx3fb->dev, "%s [%c]\n", __func__, list_empty(&ichan->queue) ? '-' : '+');
 
@@ -745,12 +749,10 @@ static int mx3fb_set_par(struct fb_info *fbi)
                }
        }
 
-       screen_size = fbi->fix.line_length * fbi->var.yres;
-
        sg_init_table(&sg[0], 1);
        sg_init_table(&sg[1], 1);
 
-       sg_dma_address(&sg[0])  = fbi->fix.smem_start;
+       sg_dma_address(&sg[0]) = fbi->fix.smem_start;
        sg_set_page(&sg[0], virt_to_page(fbi->screen_base),
                    fbi->fix.smem_len,
                    offset_in_page(fbi->screen_base));
@@ -927,7 +929,7 @@ static int mx3fb_setcolreg(unsigned int regno, unsigned int red,
        u32 val;
        int ret = 1;
 
-       dev_dbg(fbi->device, "%s\n", __func__);
+       dev_dbg(fbi->device, "%s, regno = %u\n", __func__, regno);
 
        mutex_lock(&mx3_fbi->mutex);
        /*
@@ -973,9 +975,8 @@ static int mx3fb_blank(int blank, struct fb_info *fbi)
        struct mx3fb_info *mx3_fbi = fbi->par;
        struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
 
-       dev_dbg(fbi->device, "%s\n", __func__);
-
-       dev_dbg(fbi->device, "blank = %d\n", blank);
+       dev_dbg(fbi->device, "%s, blank = %d, base %p, len %u\n", __func__,
+               blank, fbi->screen_base, fbi->fix.smem_len);
 
        if (mx3_fbi->blank == blank)
                return 0;
@@ -988,8 +989,11 @@ static int mx3fb_blank(int blank, struct fb_info *fbi)
        case FB_BLANK_VSYNC_SUSPEND:
        case FB_BLANK_HSYNC_SUSPEND:
        case FB_BLANK_NORMAL:
-               sdc_disable_channel(mx3_fbi);
                sdc_set_brightness(mx3fb, 0);
+               memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
+               /* Give LCD time to update - enough for 50 and 60 Hz */
+               msleep(25);
+               sdc_disable_channel(mx3_fbi);
                break;
        case FB_BLANK_UNBLANK:
                sdc_enable_channel(mx3_fbi);
@@ -1063,6 +1067,7 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
                mutex_unlock(&mx3_fbi->mutex);
                dev_info(fbi->device, "Panning failed due to %s\n", ret < 0 ?
                         "user interrupt" : "timeout");
+               disable_irq(mx3_fbi->idmac_channel->eof_irq);
                return ret ? : -ETIMEDOUT;
        }
 
@@ -1073,6 +1078,9 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
                    virt_to_page(fbi->screen_base + offset), fbi->fix.smem_len,
                    offset_in_page(fbi->screen_base + offset));
 
+       if (mx3_fbi->txd)
+               async_tx_ack(mx3_fbi->txd);
+
        txd = dma_chan->device->device_prep_slave_sg(dma_chan, sg +
                mx3_fbi->cur_ipu_buf, 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT);
        if (!txd) {
@@ -1099,8 +1107,6 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
                return -EIO;
        }
 
-       if (mx3_fbi->txd)
-               async_tx_ack(mx3_fbi->txd);
        mx3_fbi->txd = txd;
 
        fbi->var.xoffset = var->xoffset;
@@ -1506,7 +1512,7 @@ static struct platform_driver mx3fb_driver = {
  * example:
  *     video=mx3fb:bpp=16
  */
-static int mx3fb_setup(void)
+static int __init mx3fb_setup(void)
 {
 #ifndef MODULE
        char *opt, *options = NULL;
index ee64771..89f231d 100644 (file)
  * Created      : Thu Sep 23 18:17:43 1999, hmallat
  * Last modified: Tue Nov  2 21:19:47 1999, hmallat
  *
+ * I2C part copied from the i2c-voodoo3.c driver by:
+ * Frodo Looijaard <frodol@dds.nl>,
+ * Philip Edelbrock <phil@netroedge.com>,
+ * Ralph Metzler <rjkm@thp.uni-koeln.de>, and
+ * Mark D. Studebaker <mdsxyz123@yahoo.com>
+ *
  * Lots of the information here comes from the Daryll Strauss' Banshee
  * patches to the XF86 server, and the rest comes from the 3dfx
  * Banshee specification. I'm very much indebted to Daryll for his
@@ -481,6 +487,12 @@ static int tdfxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
                return -EINVAL;
        }
 
+       if (info->monspecs.hfmax && info->monspecs.vfmax &&
+           info->monspecs.dclkmax && fb_validate_mode(var, info) < 0) {
+               DPRINTK("mode outside monitor's specs\n");
+               return -EINVAL;
+       }
+
        var->xres = (var->xres + 15) & ~15; /* could sometimes be 8 */
        lpitch = var->xres * ((var->bits_per_pixel + 7) >> 3);
 
@@ -1167,6 +1179,207 @@ static struct fb_ops tdfxfb_ops = {
 #endif
 };
 
+#ifdef CONFIG_FB_3DFX_I2C
+/* The voo GPIO registers don't have individual masks for each bit
+   so we always have to read before writing. */
+
+static void tdfxfb_i2c_setscl(void *data, int val)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+       unsigned int r;
+
+       r = tdfx_inl(par, VIDSERPARPORT);
+       if (val)
+               r |= I2C_SCL_OUT;
+       else
+               r &= ~I2C_SCL_OUT;
+       tdfx_outl(par, VIDSERPARPORT, r);
+       tdfx_inl(par, VIDSERPARPORT);   /* flush posted write */
+}
+
+static void tdfxfb_i2c_setsda(void *data, int val)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+       unsigned int r;
+
+       r = tdfx_inl(par, VIDSERPARPORT);
+       if (val)
+               r |= I2C_SDA_OUT;
+       else
+               r &= ~I2C_SDA_OUT;
+       tdfx_outl(par, VIDSERPARPORT, r);
+       tdfx_inl(par, VIDSERPARPORT);   /* flush posted write */
+}
+
+/* The GPIO pins are open drain, so the pins always remain outputs.
+   We rely on the i2c-algo-bit routines to set the pins high before
+   reading the input from other chips. */
+
+static int tdfxfb_i2c_getscl(void *data)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+
+       return (0 != (tdfx_inl(par, VIDSERPARPORT) & I2C_SCL_IN));
+}
+
+static int tdfxfb_i2c_getsda(void *data)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+
+       return (0 != (tdfx_inl(par, VIDSERPARPORT) & I2C_SDA_IN));
+}
+
+static void tdfxfb_ddc_setscl(void *data, int val)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+       unsigned int r;
+
+       r = tdfx_inl(par, VIDSERPARPORT);
+       if (val)
+               r |= DDC_SCL_OUT;
+       else
+               r &= ~DDC_SCL_OUT;
+       tdfx_outl(par, VIDSERPARPORT, r);
+       tdfx_inl(par, VIDSERPARPORT);   /* flush posted write */
+}
+
+static void tdfxfb_ddc_setsda(void *data, int val)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+       unsigned int r;
+
+       r = tdfx_inl(par, VIDSERPARPORT);
+       if (val)
+               r |= DDC_SDA_OUT;
+       else
+               r &= ~DDC_SDA_OUT;
+       tdfx_outl(par, VIDSERPARPORT, r);
+       tdfx_inl(par, VIDSERPARPORT);   /* flush posted write */
+}
+
+static int tdfxfb_ddc_getscl(void *data)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+
+       return (0 != (tdfx_inl(par, VIDSERPARPORT) & DDC_SCL_IN));
+}
+
+static int tdfxfb_ddc_getsda(void *data)
+{
+       struct tdfxfb_i2c_chan  *chan = data;
+       struct tdfx_par         *par = chan->par;
+
+       return (0 != (tdfx_inl(par, VIDSERPARPORT) & DDC_SDA_IN));
+}
+
+static int __devinit tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan,
+                                         const char *name, struct device *dev)
+{
+       int rc;
+
+       strlcpy(chan->adapter.name, name, sizeof(chan->adapter.name));
+       chan->adapter.owner             = THIS_MODULE;
+       chan->adapter.class             = I2C_CLASS_DDC;
+       chan->adapter.algo_data         = &chan->algo;
+       chan->adapter.dev.parent        = dev;
+       chan->algo.setsda               = tdfxfb_ddc_setsda;
+       chan->algo.setscl               = tdfxfb_ddc_setscl;
+       chan->algo.getsda               = tdfxfb_ddc_getsda;
+       chan->algo.getscl               = tdfxfb_ddc_getscl;
+       chan->algo.udelay               = 10;
+       chan->algo.timeout              = msecs_to_jiffies(500);
+       chan->algo.data                 = chan;
+
+       i2c_set_adapdata(&chan->adapter, chan);
+
+       rc = i2c_bit_add_bus(&chan->adapter);
+       if (rc == 0)
+               DPRINTK("I2C bus %s registered.\n", name);
+       else
+               chan->par = NULL;
+
+       return rc;
+}
+
+static int __devinit tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan,
+                                         const char *name, struct device *dev)
+{
+       int rc;
+
+       strlcpy(chan->adapter.name, name, sizeof(chan->adapter.name));
+       chan->adapter.owner             = THIS_MODULE;
+       chan->adapter.class             = I2C_CLASS_TV_ANALOG;
+       chan->adapter.algo_data         = &chan->algo;
+       chan->adapter.dev.parent        = dev;
+       chan->algo.setsda               = tdfxfb_i2c_setsda;
+       chan->algo.setscl               = tdfxfb_i2c_setscl;
+       chan->algo.getsda               = tdfxfb_i2c_getsda;
+       chan->algo.getscl               = tdfxfb_i2c_getscl;
+       chan->algo.udelay               = 10;
+       chan->algo.timeout              = msecs_to_jiffies(500);
+       chan->algo.data                 = chan;
+
+       i2c_set_adapdata(&chan->adapter, chan);
+
+       rc = i2c_bit_add_bus(&chan->adapter);
+       if (rc == 0)
+               DPRINTK("I2C bus %s registered.\n", name);
+       else
+               chan->par = NULL;
+
+       return rc;
+}
+
+static void __devinit tdfxfb_create_i2c_busses(struct fb_info *info)
+{
+       struct tdfx_par *par = info->par;
+
+       tdfx_outl(par, VIDINFORMAT, 0x8160);
+       tdfx_outl(par, VIDSERPARPORT, 0xcffc0020);
+
+       par->chan[0].par = par;
+       par->chan[1].par = par;
+
+       tdfxfb_setup_ddc_bus(&par->chan[0], "Voodoo3-DDC", info->dev);
+       tdfxfb_setup_i2c_bus(&par->chan[1], "Voodoo3-I2C", info->dev);
+}
+
+static void tdfxfb_delete_i2c_busses(struct tdfx_par *par)
+{
+       if (par->chan[0].par)
+               i2c_del_adapter(&par->chan[0].adapter);
+       par->chan[0].par = NULL;
+
+       if (par->chan[1].par)
+               i2c_del_adapter(&par->chan[1].adapter);
+       par->chan[1].par = NULL;
+}
+
+static int tdfxfb_probe_i2c_connector(struct tdfx_par *par,
+                                     struct fb_monspecs *specs)
+{
+       u8 *edid = NULL;
+
+       DPRINTK("Probe DDC Bus\n");
+       if (par->chan[0].par)
+               edid = fb_ddc_read(&par->chan[0].adapter);
+
+       if (edid) {
+               fb_edid_to_monspecs(edid, specs);
+               kfree(edid);
+               return 0;
+       }
+       return 1;
+}
+#endif /* CONFIG_FB_3DFX_I2C */
+
 /**
  *      tdfxfb_probe - Device Initializiation
  *
@@ -1182,6 +1395,8 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
        struct tdfx_par *default_par;
        struct fb_info *info;
        int err, lpitch;
+       struct fb_monspecs *specs;
+       bool found;
 
        err = pci_enable_device(pdev);
        if (err) {
@@ -1284,13 +1499,49 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
        if (hwcursor)
                info->fix.smem_len = (info->fix.smem_len - 1024) &
                                        (PAGE_MASK << 1);
-
-       if (!mode_option)
+       specs = &info->monspecs;
+       found = false;
+       info->var.bits_per_pixel = 8;
+#ifdef CONFIG_FB_3DFX_I2C
+       tdfxfb_create_i2c_busses(info);
+       err = tdfxfb_probe_i2c_connector(default_par, specs);
+
+       if (!err) {
+               if (specs->modedb == NULL)
+                       DPRINTK("Unable to get Mode Database\n");
+               else {
+                       const struct fb_videomode *m;
+
+                       fb_videomode_to_modelist(specs->modedb,
+                                                specs->modedb_len,
+                                                &info->modelist);
+                       m = fb_find_best_display(specs, &info->modelist);
+                       if (m) {
+                               fb_videomode_to_var(&info->var, m);
+                               /* fill all other info->var's fields */
+                               if (tdfxfb_check_var(&info->var, info) < 0)
+                                       info->var = tdfx_var;
+                               else
+                                       found = true;
+                       }
+               }
+       }
+#endif
+       if (!mode_option && !found)
                mode_option = "640x480@60";
 
-       err = fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 8);
-       if (!err || err == 4)
-               info->var = tdfx_var;
+       if (mode_option) {
+               err = fb_find_mode(&info->var, info, mode_option,
+                                  specs->modedb, specs->modedb_len,
+                                  NULL, info->var.bits_per_pixel);
+               if (!err || err == 4)
+                       info->var = tdfx_var;
+       }
+
+       if (found) {
+               fb_destroy_modedb(specs->modedb);
+               specs->modedb = NULL;
+       }
 
        /* maximize virtual vertical length */
        lpitch = info->var.xres_virtual * ((info->var.bits_per_pixel + 7) >> 3);
@@ -1315,6 +1566,9 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
        return 0;
 
 out_err_iobase:
+#ifdef CONFIG_FB_3DFX_I2C
+       tdfxfb_delete_i2c_busses(default_par);
+#endif
        if (default_par->mtrr_handle >= 0)
                mtrr_del(default_par->mtrr_handle, info->fix.smem_start,
                         info->fix.smem_len);
@@ -1379,6 +1633,9 @@ static void __devexit tdfxfb_remove(struct pci_dev *pdev)
        struct tdfx_par *par = info->par;
 
        unregister_framebuffer(info);
+#ifdef CONFIG_FB_3DFX_I2C
+       tdfxfb_delete_i2c_busses(par);
+#endif
        if (par->mtrr_handle >= 0)
                mtrr_del(par->mtrr_handle, info->fix.smem_start,
                         info->fix.smem_len);
index 5d3b1a8..a38fa49 100644 (file)
@@ -106,6 +106,8 @@ static int wdrtas_set_interval(int interval)
        return result;
 }
 
+#define WDRTAS_SP_SPI_LEN 4
+
 /**
  * wdrtas_get_interval - returns the current watchdog interval
  * @fallback_value: value (in seconds) to use, if the RTAS call fails
@@ -119,10 +121,17 @@ static int wdrtas_set_interval(int interval)
 static int wdrtas_get_interval(int fallback_value)
 {
        long result;
-       char value[4];
+       char value[WDRTAS_SP_SPI_LEN];
 
+       spin_lock(&rtas_data_buf_lock);
+       memset(rtas_data_buf, 0, WDRTAS_SP_SPI_LEN);
        result = rtas_call(wdrtas_token_get_sp, 3, 1, NULL,
-                          WDRTAS_SP_SPI, (void *)__pa(&value), 4);
+                          WDRTAS_SP_SPI, __pa(rtas_data_buf),
+                          WDRTAS_SP_SPI_LEN);
+
+       memcpy(value, rtas_data_buf, WDRTAS_SP_SPI_LEN);
+       spin_unlock(&rtas_data_buf_lock);
+
        if (value[0] != 0 || value[1] != 2 || value[3] != 0 || result < 0) {
                printk(KERN_WARNING "wdrtas: could not get sp_spi watchdog "
                       "timeout (%li). Continuing\n", result);
index 5aadbad..142c17a 100644 (file)
@@ -32,6 +32,10 @@ fw-shipped-$(CONFIG_ADAPTEC_STARFIRE) += adaptec/starfire_rx.bin \
                                         adaptec/starfire_tx.bin
 fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin
 fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw
+fw-shipped-$(CONFIG_BNX2) += bnx2/bnx2-mips-09-4.6.17.fw \
+                            bnx2/bnx2-rv2p-09-4.6.15.fw \
+                            bnx2/bnx2-mips-06-4.6.16.fw \
+                            bnx2/bnx2-rv2p-06-4.6.16.fw
 fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin
 fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin
 fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \
@@ -41,6 +45,7 @@ fw-shipped-$(CONFIG_DVB_AV7110) += av7110/bootcode.bin
 fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin
 fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \
                             e100/d102e_ucode.bin
+fw-shipped-$(CONFIG_MYRI_SBUS) += myricom/lanai.bin
 fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin
 fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \
                                      advansys/3550.bin advansys/38C0800.bin
index 929f9ed..10f61c9 100644 (file)
@@ -598,6 +598,36 @@ Found in hex form in kernel source.
 
 --------------------------------------------------------------------------
 
+Driver: MYRI_SBUS - MyriCOM Gigabit Ethernet
+
+File: myricom/lanai.bin
+
+Licence: Unknown
+
+Found in hex form in kernel source.
+
+--------------------------------------------------------------------------
+
+Driver: BNX2 - Broadcom NetXtremeII
+
+File: bnx2/bnx2-mips-06-4.6.16.fw
+File: bnx2/bnx2-rv2p-06-4.6.16.fw
+File: bnx2/bnx2-mips-09-4.6.17.fw
+File: bnx2/bnx2-rv2p-09-4.6.15.fw
+
+Licence:
+
+ This file contains firmware data derived from proprietary unpublished
+ source code, Copyright (c) 2004 - 2009 Broadcom Corporation.
+
+ Permission is hereby granted for the distribution of this firmware data
+ in hexadecimal or equivalent format, provided this copyright notice is
+ accompanying it.
+
+Found in hex form in kernel source.
+
+--------------------------------------------------------------------------
+
 Driver: DVB AV7110 -- AV7110 cards
 
 File: av7110/bootcode.bin
@@ -617,5 +647,4 @@ Licence: Allegedly GPLv2+, but no source visible.
 Found in hex form in kernel source, with the following comment:
    Copyright (c) 1998-2002 by Paul Davis <pbd@op.net>
 
-
 --------------------------------------------------------------------------
diff --git a/firmware/bnx2/bnx2-mips-06-4.6.16.fw.ihex b/firmware/bnx2/bnx2-mips-06-4.6.16.fw.ihex
new file mode 100644 (file)
index 0000000..0df10b5
--- /dev/null
@@ -0,0 +1,5805 @@
+:10000000080000F80800000000004DA4000000C82F
+:1000100000000000000000000000000008004DA4E7
+:100020000000001400004E6C080000800800000072
+:10003000000056CC00004E800800582000000084CC
+:100040000000A54C080056CC000001340000A5D0EB
+:10005000080031D808000000000070DC0000A70490
+:10006000000000000000000000000000080070DC3C
+:1000700000000024000117E00800048808000400C4
+:100080000000175C000118040000000000000000E0
+:100090000000000000000000000000000000000060
+:1000A000080000980800000000003A7400012F606A
+:1000B0000000000000000000000000000000000040
+:0800C000000000000000000038
+:0800C8000A00003E00000000E8
+:1000D000000000000000000D636F6D342E362E31DD
+:1000E00036000000040610020000000000000003BB
+:1000F00000000014000000320000000300000000B7
+:1001000000000000000000000000000000000000EF
+:1001100000000010000001360000EA60000000014D
+:1001200000000000000000000000000000000008C7
+:1001300000000000000000000000000000000000BF
+:1001400000000000000000000000000000000000AF
+:10015000000000000000000000000000000000009F
+:10016000000000020000000000000000000000008D
+:10017000000000000000000000000000000000007F
+:10018000000000000000000000000010000000005F
+:10019000000000000000000000000000000000005F
+:1001A000000000000000000000000000000000004F
+:1001B000000000000000000000000000000000003F
+:1001C0000000000010000003000000000000000D0F
+:1001D0000000000D3C02080024424DE03C030800F2
+:1001E00024634ED4AC4000000043202B1480FFFD5C
+:1001F000244200043C1D080037BD7FFC03A0F02111
+:100200003C100800261000F83C1C0800279C4DE01C
+:100210000E0002AA000000000000000D3C03601068
+:100220008C6450002402FF7F3C1A8000008220244E
+:100230003484380C24020037AC645000AF4200080C
+:1002400024020C80AF4200243C1B80083C060800BE
+:1002500024C6079C3C02080024424E182404001BBC
+:100260002484FFFFAC4600000481FFFD244200040B
+:100270003C020800244203803C010800AC224E20CE
+:100280003C020800244206803C010800AC224E24B7
+:100290003C02080024420D803C010800AC224E6064
+:1002A0003C02080024420A103C03080024630908A9
+:1002B0003C040800248409443C05080024A53C248F
+:1002C0003C010800AC224E683C0208002442057044
+:1002D0003C010800AC264E643C010800AC254E747D
+:1002E0003C010800AC234E7C3C010800AC224E804F
+:1002F0003C010800AC244E843C010800AC234E1C99
+:100300003C010800AC204E283C010800AC204E2CDB
+:100310003C010800AC204E303C010800AC204E34BB
+:100320003C010800AC204E383C010800AC204E3C9B
+:100330003C010800AC204E403C010800AC244E4477
+:100340003C010800AC204E483C010800AC204E4C5B
+:100350003C010800AC204E503C010800AC204E543B
+:100360003C010800AC204E583C010800AC264E5C15
+:100370003C010800AC204E6C3C010800AC254E70DE
+:100380003C010800AC234E780A0006F4000000008F
+:100390003C0308008C6300208F8200081043000398
+:1003A000000000000A00052CAF83000803E00008ED
+:1003B0000000000027BDFFE8AFB00010AFBF001481
+:1003C00027500100920200091040001A2403000186
+:1003D0003C0208008C42002010400016000018214A
+:1003E0000E00056400000000960300083C060800AB
+:1003F00094C64E968E0400188F8200209605000C3D
+:1004000000031C0000661825AC440000AC45000445
+:1004100024040001AC400008AC40000CAC400010CB
+:10042000AC400014AC4000180E000589AC43001C21
+:10043000000018218FBF00148FB000100060102141
+:1004400003E0000827BD001827BDFFE8AFBF00107C
+:100450009742010830437000240220001062000A15
+:1004600028642001548000128FBF00102402400035
+:1004700010620008240260001062000A8FBF0010A2
+:100480000A0000FB000010218FBF00100A0000BB13
+:1004900027BD00180E0003F6000000000A0000FA55
+:1004A0008FBF00100E000FB6000000008FBF0010BD
+:1004B0000000102103E0000827BD00183C020800DE
+:1004C0008C42002027BDFFE810400027AFBF00107E
+:1004D0000E00056400000000974201089743010CDC
+:1004E0008F8500203042003E3063FFFF0002140081
+:1004F00000431025ACA200008F4201003C0608001A
+:1005000094C64E968FBF0010ACA20004974301160C
+:100510009744010E3C02200000031C003084FFFFC2
+:1005200000641825ACA3000800C2302597420110D2
+:100530009743011224040001000214003063FFFFFE
+:1005400000431025ACA2000C9742011427BD0018EF
+:100550003042FFFFACA20010ACA00014ACA0001809
+:100560000A000589ACA6001C8FBF001003E000083C
+:1005700027BD00183C0208008C42002027BDFFE880
+:100580001040002AAFBF00100E00056400000000FC
+:10059000974201089743010C8F8500203042003EAE
+:1005A0003063FFFF0002140000431025ACA20000DE
+:1005B0008F4201003C06080094C64E968FBF001083
+:1005C000ACA20004974301169744010E3C022000A0
+:1005D00000031C003084FFFF00641825ACA3000852
+:1005E00000C23025974201109743011224040001F4
+:1005F000000214003063FFFF00431025ACA2000C82
+:100600009742011427BD00183042FFFFACA2001032
+:100610008F420118ACA200149342010B304200FF3C
+:10062000ACA200180A000589ACA6001C8FBF001000
+:1006300003E0000827BD001827BDFFE0AFB00010A1
+:10064000AFBF0018AFB10014275001009203000B98
+:100650002402001A961100081462003500002021BF
+:100660003222000110400009000000008E0200004C
+:1006700096030014000211C200021040005A10211B
+:10068000A44300800A000179322200020E00012BEF
+:10069000000000003C0208008C420040244200019F
+:1006A0003C010800AC220040322200020002202B54
+:1006B0003C0208008C420044322300042442000122
+:1006C0003C010800AC2200441060001A8FBF0018E3
+:1006D0008F4202B804410008240400013C020800D3
+:1006E0008C420060244200013C010800AC22006002
+:1006F0000A00019C8FB100148E02002096030016A0
+:1007000000002021AF4202808E020004A743028431
+:10071000AF4202883C021000AF4202B83C0208001F
+:100720008C42005C244200013C010800AC22005CC9
+:100730008FBF00188FB100148FB0001000801021FF
+:1007400003E0000827BD002027BDFFE0AFB0001088
+:10075000AFBF0018AFB10014275001009203000B87
+:1007600024020003961100081462003500002021C5
+:100770003222000110400009000000008E0200003B
+:1007800096030014000211C200021040005A10210A
+:10079000A44300800A0001BD322200020E0000FDC9
+:1007A000000000003C0208008C420040244200018E
+:1007B0003C010800AC220040322200020002202B43
+:1007C0003C0208008C420044322300042442000111
+:1007D0003C010800AC2200441060001A8FBF0018D2
+:1007E0008F4202B804410008240400013C020800C2
+:1007F0008C420060244200013C010800AC220060F1
+:100800000A0001E08FB100148E020020960300164A
+:1008100000002021AF4202808E020004A743028420
+:10082000AF4202883C021000AF4202B83C0208000E
+:100830008C42005C244200013C010800AC22005CB8
+:100840008FBF00188FB100148FB0001000801021EE
+:1008500003E0000827BD00209362000003E00008C9
+:10086000AF80000403E000080000102127BDFFE86E
+:10087000AFBF0014AFB000108F420100AF420020A4
+:100880008F420104AF4200A89350010B0E0001E417
+:10089000321000FF3C02080024424E18001018805D
+:1008A0002E10001C16000004006210210E0001E74B
+:1008B0000A0001FF000000008C4200000040F8091F
+:1008C00000000000104000053C0240008F4301047E
+:1008D0003C026020AC4300143C024000AF420138AF
+:1008E0003C0208008C4200348FBF00148FB000100F
+:1008F000244200013C010800AC22003403E000085F
+:1009000027BD001827BDFFE8AFBF00108F42014090
+:100910000E0001E4AF4200200E0003800000000042
+:100920003C024000AF4201783C03080024630038D9
+:100930008C6200008FBF001027BD00182442000108
+:1009400003E00008AC62000027BDFFE8AFBF001065
+:100950008F4201800E0001E4AF4200208F430180EE
+:1009600024020F0014620005000000008F4201887D
+:10097000A742009C0A0002393C024000936200003A
+:1009800024030050304200FF144300083C024000A2
+:100990000E00036400000000144000043C0240000C
+:1009A0000E000E42000000003C024000AF4201B8C1
+:1009B0003C0208008C42003C8FBF00102442000122
+:1009C0003C010800AC22003C03E0000827BD0018F1
+:1009D00003E00008000010218F4301048F82001003
+:1009E00010430008000000003C0208008C42008414
+:1009F000244200013C010800AC2200848F42010423
+:100A0000AF82001003E000080000000027BDFFE8EF
+:100A1000AFBF001027440100948200083043000259
+:100A2000304200041040001B000000008F4202B85A
+:100A300004410008240500013C0208008C420060CB
+:100A4000244200013C010800AC2200600A0002813F
+:100A50008FBF00108C820020948300160000282194
+:100A6000AF4202808C820004A7430284AF42028816
+:100A70003C021000AF4202B83C0208008C42005C0D
+:100A8000244200013C010800AC22005C0A00028103
+:100A90008FBF001010600008240500013C02080010
+:100AA0008C420084244200013C010800AC220084F6
+:100AB0000A0002818FBF00108F4401000E00024423
+:100AC00000000000000028218FBF001000A01021AE
+:100AD00003E0000827BD00183C0208008C42008893
+:100AE000274301009465000C244200013C010800EA
+:100AF000AC2200888C64001803451021904540000A
+:100B0000AF4400388C62001C2403FFF800052E005F
+:100B10000043102434420004AF42003C3C02000574
+:100B2000AF420030000000000000000000000000A4
+:100B3000AF450404000000000000000000000000B9
+:100B40003C02000634420001AF42003000000000C9
+:100B500000000000000000008F4200003042001042
+:100B60001040FFFD0000102103E00008000000001D
+:100B700027BDFFE0AFBF0018AFB100140E00005555
+:100B8000AFB000103C028000344200708C42000084
+:100B9000AF8200140E0000B2000000003C02800092
+:100BA000344600703C0308008C6300A03C0208003F
+:100BB0008C4200A4104300048F8400143C01080000
+:100BC000AC2300A4A743009E8CCA00003C0308008D
+:100BD0008C6300BC3C0208008C4200B80144202316
+:100BE00000641821000040210064202B00481021DF
+:100BF000004410213C010800AC2300BC3C0108006B
+:100C0000AC2200B88F510000322200071040FFE1F3
+:100C1000AF8A00148CC600003C0508008CA500BCFF
+:100C20003C0408008C8400B800CA302300A62821A8
+:100C30000000102100A6302B0082202100862021F8
+:100C4000322700013C010800AC2500BC3C01080033
+:100C5000AC2400B810E00021322200028F420100D3
+:100C6000AF4200208F420104AF4200A89342010B23
+:100C70000E0001E4305000FF2E02001C544000041E
+:100C8000001010800E0001E70A0002F800000000CA
+:100C90003C03080024634E18004310218C420000DE
+:100CA0000040F80900000000104000053C02400030
+:100CB0008F4301043C026020AC4300143C0240001E
+:100CC000AF4201383C0208008C420034244200014B
+:100CD0003C010800AC220034322200021040000E19
+:100CE000322200048F4201400E0001E4AF42002096
+:100CF0000E000380000000003C024000AF4201787B
+:100D00003C0208008C420038244200013C010800EB
+:100D1000AC220038322200041040FF9B3C028000CD
+:100D20008F4201800E0001E4AF4200208F4301801A
+:100D300024020F0014620005000000008F420188A9
+:100D4000A742009C0A00032D3C0240009362000071
+:100D500024030050304200FF144300083C024000CE
+:100D60000E00036400000000544000043C024000F8
+:100D70000E000E42000000003C024000AF4201B8ED
+:100D80003C0208008C42003C244200013C01080067
+:100D9000AC22003C0A0002B03C0280003C02900001
+:100DA0003442000100822025AF4400208F42002001
+:100DB0000440FFFE0000000003E000080000000007
+:100DC0003C028000344200010082202503E000083C
+:100DD000AF44002027BDFFE0AFB10014AFB000105A
+:100DE00000808821AFBF00180E00033530B000FF2F
+:100DF0009362007D0220202102028025A370007DE5
+:100E00008F7000743C0280000E00033E02028024BA
+:100E1000160000098FBF00188F4201F80440FFFE42
+:100E200024020002AF5101C0A34201C43C021000E1
+:100E3000AF4201F88FBF00188FB100148FB00010BF
+:100E400003E0000827BD002027BDFFD000001021CF
+:100E500003E0000827BD003027BDFFE8AFBF00104A
+:100E6000974201843042020010400005000020211A
+:100E70000E001079000000000A000378240400012D
+:100E80008F420188044000098FBF00108F42018803
+:100E90003C03FF00004310243C0304001443000300
+:100EA000240400019362003E8FBF001000801021D7
+:100EB00003E0000827BD0018A36000228F44014012
+:100EC0000A0003432405000127BDFFE8AFBF00145B
+:100ED000AFB000109362000024030020304200FFF6
+:100EE0001043000B00000000936200002403003058
+:100EF000304200FF10430006000000009362000033
+:100F000024030050304200FF144300628FBF0014DE
+:100F100093420148304200FF2443FFFF2C6200054A
+:100F20001040005C8FBF0014000310803C030800D9
+:100F300024634DA4004310218C42000000400008AF
+:100F4000000000000E0003358F4401408F70000C3C
+:100F50008F4201441602000224020001AF62000C1D
+:100F60000E00033E8F4401408F42014414500004A0
+:100F70008FBF00148FB000100A000FED27BD0018BE
+:100F80008F62000C0A0003EC000000009762001062
+:100F90008F4301443042FFFF14620009000000004B
+:100FA00024020001A76200108F420140AF420200FC
+:100FB0003C021000AF4202380A0003F38FBF001456
+:100FC000976200100A0003EC000000000E000335D9
+:100FD0008F440140976200128F4301443050FFFF5D
+:100FE0001603000224020001A76200120E00033E55
+:100FF0008F4401408F420144160200048FBF001449
+:101000008FB000100A00037C27BD00189762001201
+:101010000A0003EC00000000976200148F430144B3
+:101020003042FFFF146200068FBF0014240200014B
+:101030008FB00010A76200140A00131927BD001812
+:10104000976200140A0003EC00000000976200168B
+:101050008F4301443042FFFF146200062402000166
+:101060008FBF00148FB00010A76200160A000BE0BB
+:1010700027BD001897620016144000068FBF0014A9
+:101080003C0208008C420070244200013C01080030
+:10109000AC2200708FB0001003E0000827BD0018DC
+:1010A00027BDFFE8AFBF0014AFB0001093430109A4
+:1010B0002402001F8F500100106200A5286200204A
+:1010C00010400018240200382862000A1040000C6A
+:1010D0002402000B286200081040002C00000000D1
+:1010E000046000E728620002144000282402000681
+:1010F000106200268FBF00140A0004F08FB00010A9
+:101100001062005E2862000B144000DE8FBF0014E6
+:101110002402000E106200738FB000100A0004F069
+:1011200000000000106200C2286200391040000A6E
+:101130002402008024020036106200CC28620037AE
+:10114000104000B624020035106200C38FBF0014A7
+:101150000A0004F08FB000101062002B286200819A
+:1011600010400006240200C824020039106200B6B4
+:101170008FBF00140A0004F08FB0001010620099B5
+:101180008FBF00140A0004F08FB000103C0208006A
+:101190008C420020104000BB8FBF00140E0005647D
+:1011A000000000008F4201008F8300209745010C52
+:1011B00097460108AC6200008F4201043C0408001D
+:1011C00094844E9600052C00AC6200048F420118F6
+:1011D0000006340000C43025AC6200088F42011CB8
+:1011E00024040001AC62000C9342010A00A22825ED
+:1011F000AC650010AC600014AC600018AC66001C5C
+:101200000A0004C48FBF00143C0208008C42002076
+:101210001040009C8FBF00140E0005640000000009
+:10122000974401083C03080094634E969745010CCF
+:10123000000422029746010E8F820020000426003F
+:101240000083202500052C003C03008000A62825F3
+:1012500000832025AC400000AC400004AC400008F6
+:10126000AC40000CAC450010AC400014AC40001881
+:10127000AC44001C0A0004C3240400019742010C82
+:101280001440001500000000936200053042001079
+:1012900014400011000000000E0003350200202160
+:1012A0009362000502002021344200100E00033E2C
+:1012B000A36200059362000024030020304200FF77
+:1012C0001043006F020020218FBF00148FB0001068
+:1012D0000A00108F27BD00180000000D0A0004EF5F
+:1012E0008FBF00143C0208008C42002010400065B3
+:1012F0008FBF00140E000564000000008F4201043F
+:101300008F8300209744010C3C05080094A54E965D
+:10131000AC6200009762002C000424003042FFFF02
+:10132000008220253C02400E00A22825AC64000467
+:10133000AC600008AC60000CAC600010AC60001445
+:10134000AC600018AC65001C0A0004C32404000152
+:101350000E00033502002021A76000080E00033EA6
+:1013600002002021020020210E0003432405000179
+:101370003C0208008C420020104000428FBF001445
+:101380000E000564000000009742010C8F830020CE
+:101390003C05080094A54E9600021400AC700000B5
+:1013A000AC620004AC6000088F64004C3C02401F3B
+:1013B00000A22825AC64000C8F62005024040001B8
+:1013C000AC6200108F620054AC620014AC60001874
+:1013D000AC65001C8FBF00148FB000100A00058997
+:1013E00027BD00189362000024030020304200FF54
+:1013F000104300248FBF00140E000FD702002021DD
+:10140000104000208FBF0014020020218FB0001078
+:10141000000028210A00034327BD001802002021F4
+:101420008FBF00148FB000100A00065127BD0018AE
+:101430009745010C020020218FBF00148FB00010CF
+:101440000A00067127BD0018020020218FB000108D
+:101450000A00069627BD00189345010D02002021C1
+:101460008FB000100A0006E027BD001802002021FE
+:101470008FBF00148FB000100A0006BC27BD0018F3
+:101480008FBF00148FB0001003E0000827BD0018C4
+:101490008F4202780440FFFE34820080AF42024057
+:1014A00024020002A34202443C02100003E00008B0
+:1014B000AF4202783C04080094844EA23C0208002B
+:1014C0008C424EAC3083FFFF000318C00043102154
+:1014D000AF42003C3C0208008C424EA8AF420038AC
+:1014E0003C02005034420008AF42003000000000CF
+:1014F00000000000000000008F4200003042002089
+:101500001040FFFD000000008F4204003C01080075
+:10151000AC224E988F4204043C010800AC224E9C41
+:101520003C020020AF420030000000003C020800F6
+:1015300094424EA03C03080094634EA43C0508006E
+:1015400094A54EA624840001004310213083FFFFA0
+:101550003C010800A4224EA03C010800A4244EA295
+:1015600014650003000000003C010800A4204EA206
+:1015700003E00008000000003C05000A27BDFFE86A
+:10158000034528213C04080024844E88AFBF001086
+:101590000E0005EE2406000A3C02080094424E8A22
+:1015A0003C03080094634EA63042000F244200031F
+:1015B0000043180424027FFF0043102B1040000258
+:1015C000AF83001C0000000D0E0004FB00000000B3
+:1015D0003C02080094424E928FBF001027BD0018B5
+:1015E00003E00008A74200A23C02000A03421021C7
+:1015F000944300063C02080094424E923C010800CD
+:10160000A4234E8E004310238F83001C000214007D
+:10161000000214030043102B03E0000838420001CD
+:1016200027BDFFE8AFBF00103C02000A03421021B3
+:10163000944200063C010800A4224E8E0E0005488C
+:10164000000000005440FFF93C02000A8FBF001068
+:1016500003E0000827BD001827BDFFE8AFBF00105A
+:101660000E000548000000001040000300000000CC
+:101670000E000556000000003C0208008C424E9807
+:101680008FBF001027430400AF4200383C0208001F
+:101690008C424E9C27BD0018AF830020AF42003C17
+:1016A0003C020005AF42003003E00008AF800018A4
+:1016B0008F8200183C0300060002114000431025F1
+:1016C000AF420030000000000000000000000000F9
+:1016D0008F420000304200101040FFFD27420400FE
+:1016E000AF82002003E00008AF8000183C0608002D
+:1016F0008CC64E9C8F8500188F8300203C0208000A
+:1017000094424E9227BDFFE024A5000124630020EF
+:101710002442000124C70020AFB10014AFB0001074
+:10172000AFBF0018AF850018AF8300203C01080050
+:10173000A4224E92309000FF3C010800AC274E9C42
+:1017400004C100080000882104E000060000000039
+:101750003C0208008C424E98244200013C010800E3
+:10176000AC224E983C02080094424E923C03080082
+:1017700094634EA00010202B004310262C42000141
+:1017800000441025144000048F8300182402001028
+:101790001462000F000000000E00057A2411000101
+:1017A0003C03080094634E923C02080094424EA011
+:1017B00014620003000000000E0004FB00000000A3
+:1017C00016000003000000000E0005640000000089
+:1017D0003C03080094634E963C02080094424E94E9
+:1017E000246300013064FFFF3C010800A4234E96EF
+:1017F00014820003000000003C010800A4204E9663
+:1018000012000006000000003C02080094424E92C4
+:10181000A74200A20A0005DC022010210E000548A4
+:101820000000000010400004022010210E000556A8
+:1018300000000000022010218FBF00188FB100149B
+:101840008FB0001003E0000827BD00203084FFFFA8
+:1018500030A5FFFF000018211080000700000000E5
+:10186000308200011040000200042042006518216F
+:101870000A0005E40005284003E00008006010218C
+:1018800010C0000624C6FFFF8CA2000024A500049F
+:10189000AC8200000A0005EE2484000403E0000886
+:1018A0000000000010A0000824A3FFFFAC86000089
+:1018B00000000000000000002402FFFF2463FFFF7F
+:1018C0001462FFFA2484000403E000080000000012
+:1018D00024020001AF62000CA7620010A762001290
+:1018E000A762001403E00008A76200163082007FA0
+:1018F000034210213C08000E004818213C02080059
+:101900008C42002027BDFFD82407FF80AFB3001C06
+:10191000AFB20018AFB10014AFB00010AFBF0020DD
+:101920000080802130B100FF0087202430D200FFEA
+:101930001040002F00009821AF44002C906200005E
+:1019400024030050304200FF1443000E000000004A
+:101950003C0208008C4200E00202102100471024E3
+:10196000AF42002C3C0208008C4200E00202102131
+:101970003042007F0342102100481021944200D4DD
+:101980003053FFFF0E000564000000003C02080019
+:1019900094424E968F8300200011340000C23025FF
+:1019A00000122C003C02400000C2302534A500018A
+:1019B000AC7000008FBF0020AC6000048FB2001834
+:1019C000AC7300088FB10014AC60000C8FB3001C26
+:1019D000AC6500108FB00010AC600014240400014E
+:1019E000AC60001827BD00280A000589AC66001C01
+:1019F0008FBF00208FB3001C8FB200188FB100146E
+:101A00008FB0001003E0000827BD00289343010FAA
+:101A1000240200101062000E2865001110A00007BB
+:101A200024020012240200082405003A1062000675
+:101A30000000302103E0000800000000240500350C
+:101A40001462FFFC000030210A00060900000000BB
+:101A50008F42007424420FA003E00008AF62000C24
+:101A600027BDFFE8AFBF00100E00034324050001AF
+:101A70008FBF001024020001A762001227BD0018CA
+:101A80002402000103E00008A360002227BDFFE05C
+:101A9000AFB10014AFB00010AFBF001830B1FFFFFE
+:101AA0000E000335008080219362003F2403000470
+:101AB000304200FF1443000C0200202112200008D5
+:101AC0002402000A0E0006020000000093620005D6
+:101AD0002403FFFE00431024A36200052402001229
+:101AE000A362003F020020210E00033EA36000819C
+:101AF00016200003020020210E00066600000000F0
+:101B000002002021322600FF8FBF00188FB1001481
+:101B10008FB00010240500380A00060927BD0020F8
+:101B200027BDFFE0AFBF001CAFB20018AFB100147B
+:101B3000AFB000100E000335008080210E000602B9
+:101B4000000000009362003F24120018305100FF93
+:101B5000123200030200202124020012A362003F7F
+:101B6000936200052403FFFE004310240E00033E91
+:101B7000A362000502002021240500201632000780
+:101B8000000030218FBF001C8FB200188FB10014ED
+:101B90008FB000100A00034327BD00208FBF001C38
+:101BA0008FB200188FB100148FB0001024050039D7
+:101BB0000A00060927BD002027BDFFE8AFB00010CE
+:101BC000AFBF00149742010C24050036008080212D
+:101BD00014400010304600FF0E00033500000000E6
+:101BE00024020012A362003F9362000534420010F9
+:101BF0000E000602A36200050E00033E0200202133
+:101C0000020020210E000343240500200A0006D50F
+:101C1000000000000E000609000000000E00033561
+:101C200002002021936200232403FF9F0200202151
+:101C3000004310248FBF00148FB00010A362002354
+:101C40000A00033E27BD001827BDFFE0AFBF001804
+:101C5000AFB10014AFB0001030B100FF0E0003357B
+:101C600000808021240200120E000602A362003FC1
+:101C70000E00033E0200202102002021022030211C
+:101C80008FBF00188FB100148FB0001024050035ED
+:101C90000A00060927BD0020A380002C03E00008ED
+:101CA000A380002D8F4202780440FFFE8F82003413
+:101CB000AF42024024020002A34202443C02100050
+:101CC00003E00008AF4202783C0360008C625400DD
+:101CD000304200081440FFFD000000008C625408F0
+:101CE000AF82000024020052AC605408AC6454304F
+:101CF000AC6254342402000803E00008AC625400D3
+:101D00003C0260008C425400304200081040000544
+:101D10003C0360008C625400304200081440FFFD18
+:101D2000000000008F8300003C02600003E0000818
+:101D3000AC43540890A30000240200050080402119
+:101D40003063003F0000482114620005000050216C
+:101D500090A2001C94A3001E304900FF306AFFFFD0
+:101D6000AD00000CAD000010AD0000249502001481
+:101D70008D05001C8D0400183042FFFF0049102320
+:101D800000021100000237C30040382100862023E2
+:101D900000A2102B0082202300A72823AD05001CE1
+:101DA000AD040018A5090014A5090020A50A001615
+:101DB00003E00008A50A00228F4201F80440FFFE5C
+:101DC00024020002AF4401C0A34201C43C0210003F
+:101DD00003E00008AF4201F83C0208008C4200B466
+:101DE00027BDFFE8AFBF001424420001AFB00010D0
+:101DF0003C010800AC2200B48F4300243C02001FC9
+:101E000030AA00FF3442FF8030D800FF00628024F7
+:101E10000080F82130EF00FF1158003B01405821AD
+:101E2000240CFF803C19000A3163007F000310C0BE
+:101E300000031940006218213C0208008C4200DCBB
+:101E400025680001310D007F03E2102100431021BD
+:101E50003043007F03431821004C102400794821AF
+:101E6000AF4200248D220024016C1824006C7026DF
+:101E7000AD22000C8D220024310800FFAD2200109D
+:101E800095220014952300208D27001C3042FFFF6F
+:101E90003063FFFF8D26001800431023000211005D
+:101EA000000227C30040282100C4302300E2102B89
+:101EB00000C2302300E53823AD27001CAD260018F2
+:101EC00095220020A522001495220022154B000A1D
+:101ED000A52200168D2300248D220008254600012E
+:101EE000314500801462000430C4007F108F00026E
+:101EF00038AA008000C0502151AF000131C800FF56
+:101F00001518FFC9010058218F8400343082007FEA
+:101F1000034218213C02000A006218212402FF80BB
+:101F200000822024AF440024A06A0079A06A0083C4
+:101F30008C6200508F840034AC6200708C65007439
+:101F40003C027FFF3442FFFF00A228240E00073C22
+:101F5000AC650074AF5000248FBF00148FB0001028
+:101F600003E0000827BD001827BDFFC0AFBE003842
+:101F7000AFB70034AFB5002CAFB20020AFB1001C3A
+:101F8000AFB00018AFBF003CAFB60030AFB4002810
+:101F9000AFB300248F4500248F4600288F43002CC8
+:101FA0003C02001F3442FF800062182400C230242B
+:101FB0000080A821AFA3001400A2F0240E000700A7
+:101FC000AFA600103C0208008C4200E02410FF8005
+:101FD0000360882102A2102100501024AF42002487
+:101FE0003C0208008C4200E002A210213042007F37
+:101FF000034218213C02000A00629021924200D262
+:1020000093630084305700FF306300FF2402000117
+:1020100010620034036020212402000214620036A2
+:10202000000000000E0012E50240282192230083E8
+:10203000922200833063007F3042007F000210C094
+:1020400000031940006218213C0208008C4200DCA9
+:1020500002A210210043382100F01024AF420028D2
+:10206000922500789224008330E2007F03421821F9
+:102070003C02000C14850007006280212402FFFF4F
+:10208000A24200F12402FFFFA64200F20A0007F874
+:102090002402FFFF96020020A24200F196020022D5
+:1020A000A64200F28E020024AE4200F49222008387
+:1020B000A24200F08E4200C8AE4200FC8E4200C434
+:1020C000AE4200F88E220050AE4201008E4200CC9B
+:1020D000AE420104922200853042003F0A000853BC
+:1020E000344200400E00130802402821922200854D
+:1020F0000A0008533042003F936200852403FFDF4B
+:102100003042003FA36200859362008500431024A3
+:10211000A36200859363008393620078307400FFAC
+:10212000304200FF10540036240AFF803C0C000CA3
+:102130003283007F000310C00003194000621821A1
+:102140003C0208008C4200DC268800013109007F37
+:1021500002A210210043382130E2007F03421821FF
+:1021600000EA1024AF420028006C80218E02002477
+:10217000028A1824006A5826AE02000C8E0200243F
+:10218000310800FFAE0200109602001496030020F2
+:102190008E07001C3042FFFF3063FFFF8E060018E1
+:1021A0000043102300021100000227C30040282131
+:1021B00000C4302300E2102B00C2302300E5382396
+:1021C000AE07001CAE06001896020020A6020014FE
+:1021D00096020022A602001692220079304200FFE9
+:1021E000105400070000000051370001316800FF63
+:1021F00092220078304200FF1448FFCD0100A02158
+:1022000092220083A22200798E2200500A0008B395
+:10221000AE220070A22200858E22004C2405FF8091
+:10222000AE42010C9222008534420020A222008599
+:10223000924200D13C0308008C6300DC305400FF64
+:102240003C0208008C4200E400143140001420C01D
+:1022500002A3182100C4202102A210210064382109
+:10226000004610210045182400E52824AF45002829
+:10227000AF43002C3042007F924400D030E3007F17
+:1022800003422821034318213C02000C00628021F4
+:102290003C02000E309600FF00A298211296002A00
+:1022A000000000008E02000C0200202102602821A4
+:1022B00010400025261000280E00071B000000001B
+:1022C0009262000D26830001307400FF3042007FCF
+:1022D000A262000D2404FF801697FFF026730020F1
+:1022E0003C0208008C4200DC0000A02102A2102168
+:1022F00000441024AF4200283C0208008C4200E455
+:102300003C0308008C6300DC02A21021004410246E
+:10231000AF42002C3C0208008C4200E402A31821CA
+:102320003063007F02A210213042007F034220214F
+:10233000034318213C02000C006280213C02000E85
+:102340000A000875008298218E4200D8AE22005003
+:102350008E4200D8AE22007092250083924600D1B2
+:1023600092230083924400D12402FF8000A22824FB
+:102370003063007F308400FF00A628250064182AFF
+:102380001060000230A500FF38A50080A225008360
+:10239000A22500790E00070E000000009222007EA8
+:1023A00002A02021A222007A8E2300743C027FFF2B
+:1023B0003442FFFF006218240E00073CAE23007475
+:1023C0008FA20010AF5E00248FBF003CAF420028F8
+:1023D0008FBE00388FA200148FB700348FB6003044
+:1023E0008FB5002C8FB400288FB300248FB200204B
+:1023F0008FB1001C8FB0001827BD004003E000081B
+:10240000AF42002C90A2000024420001A0A20000D4
+:102410003C0308008C6300F4304200FF1443000FBB
+:1024200000803021A0A000003C0208008C4200E4A3
+:102430008F840034008220213082007F03421821E3
+:102440003C02000C006218212402FF80008220243C
+:10245000ACC3000003E00008AF4400288C820000F9
+:102460002442002003E00008AC82000094C2000077
+:102470003C080800950800CA30E7FFFF00804821AB
+:1024800001021021A4C2000094C200003042FFFFEC
+:1024900000E2102B54400001A4C7000094A20000E9
+:1024A0003C0308008C6300CC24420001A4A200007D
+:1024B00094A200003042FFFF544300078F8600289B
+:1024C0000107102BA4A00000544000010100382196
+:1024D000A4C700008F8600288CC4001CAF44003CB9
+:1024E00094A200008F43003C3042FFFF000210C066
+:1024F00000621821AF43003C8F42003C0082202341
+:1025000018800004000000008CC200180A000914A2
+:10251000244200018CC20018AF4200383C02005037
+:1025200034420010AF420030000000000000000004
+:10253000000000008F420000304200201040FFFDEC
+:10254000000000008F420404AD2200048F4204000A
+:10255000AD2200003C020020AF42003003E0000842
+:102560000000000027BDFFE0AFB20018AFB10014BB
+:10257000AFB00010AFBF001C94C2000000C08021AB
+:102580003C120800965200C624420001A602000038
+:102590009603000094E2000000E03021144300059F
+:1025A0008FB100300E0008E9024038210A000946C8
+:1025B000000000008C8300048C8200042442004050
+:1025C00004610007AC8200048C8200040440000413
+:1025D000000000008C82000024420001AC82000058
+:1025E000960200003042FFFF50520001A60000009A
+:1025F0009622000024420001A62200008F820028BB
+:102600009623000094420016144300048FBF001C60
+:1026100024020001A62200008FBF001C8FB2001808
+:102620008FB100148FB0001003E0000827BD002018
+:102630008F89002827BDFFE0AFBF00188D2200283A
+:102640002748040030E700FFAF4200388D22002CFD
+:10265000AF880030AF42003C3C020005AF42003082
+:10266000000000000000000000000000000000006A
+:1026700000000000000000008C82000C8C82000C26
+:10268000AD0200008C820010AD0200048C820018A4
+:10269000AD0200088C82001CAD02000C8CA200145C
+:1026A000AD0200108C820020AD0200149082000563
+:1026B000304200FF00021200AD0200188CA2001888
+:1026C000AD02001C8CA2000CAD0200208CA20010F8
+:1026D000AD0200248CA2001CAD0200288CA20020B8
+:1026E000AD02002CAD060030AD000034978300260B
+:1026F0003402FFFF14620002006020213404FFFF57
+:1027000010E00011AD040038952300369524003602
+:10271000240200013063FFFF000318C20069182182
+:1027200090650040308400070082100400451025A9
+:10273000A06200408F820028944200563042FFFF82
+:102740000A0009ADAD02003C952300369524003601
+:10275000240200013063FFFF000318C20069182142
+:1027600090650040308400070082100400021027AA
+:1027700000451024A0620040AD00003C00000000B5
+:1027800000000000000000003C020006344200404F
+:10279000AF42003000000000000000000000000018
+:1027A0008F420000304200101040FFFD8F8600284D
+:1027B000AF88003024C2005624C7003C24C400283F
+:1027C00024C5003224C600360E000927AFA200102F
+:1027D0008FBF001803E0000827BD00208F8300246E
+:1027E0003C0508008CA500E88F82003430633FFF71
+:1027F0000003198000451021004310212403FF80AD
+:102800003045007F00431024AF42002803451821C3
+:102810003C02000C0062302190C2000D0000382103
+:1028200034420010A0C2000D8F8900288F8A002436
+:1028300095230036000A1382304800032402000169
+:10284000A4C3000E1102000B290200021040000573
+:10285000240200021100000C240300010A0009F008
+:102860000000182111020006000000000A0009F013
+:10287000000018218CC2002C0A0009F0244300013A
+:102880008CC20014244300018CC200180043102B9A
+:1028900014400003000000000A0009F924070001A9
+:1028A0009522003E24420001A522003E000A138228
+:1028B000304300032C6200021040000900802821F0
+:1028C000146000040000000094C200360A000A09E7
+:1028D0003046FFFF8CC600380A000A090080282114
+:1028E000000030213C04080024844EB00A00095A3C
+:1028F00000000000274901008D22000C95230006EE
+:1029000001202021000216023045003F3063FFFF06
+:102910002402002728A6002810A2000EAF8300245E
+:1029200010C00008240200312402002110A2000976
+:102930002402002510A200079382002D0A000A2716
+:102940000000000010A200059382002D0A000A2753
+:10295000000000000A0009C5000000000A0006F798
+:102960000000000095230006912400058D25000C31
+:102970008D2600108D2700188D28001C8D29002021
+:10298000244200013C010800A4234EB63C0108008B
+:10299000A0244EB53C010800AC254EBC3C0108000B
+:1029A000AC264EC03C010800AC274EC83C010800D4
+:1029B000AC284ECC3C010800AC294ED003E0000806
+:1029C000A382002D8F87002827BDFFC0AFB300343E
+:1029D000AFB20030AFB1002CAFB00028AFBF0038AD
+:1029E0003C0208008C4200D094E3003030B0FFFF7E
+:1029F000005010073045FFFF3063FFFF00C09821F3
+:102A0000A7A200103C110800963100C614A30006CE
+:102A10003092FFFF8CE2002424420030AF42003CA1
+:102A20000A000A608CE2002094E200323042FFFF8C
+:102A300054A2000827A400188CE2002C2442003085
+:102A4000AF42003C8CE20028AF4200380A000A6E18
+:102A50008F84002827A5001027A6002002203821F7
+:102A60000E0008E9A7A000208FA200182442003021
+:102A7000AF4200388FA2001CAF42003C8F84002878
+:102A80003C020005AF42003094820034274304002A
+:102A90003042FFFF0202102B14400007AF830030CA
+:102AA00094820054948300340202102100431023C6
+:102AB0000A000A823043FFFF94830054948200345A
+:102AC0000223182100501023006218233063FFFFF7
+:102AD000948200163042FFFF144300030000000000
+:102AE0000A000A9024030001948200163042FFFF7E
+:102AF0000043102B104000058F8200309482001696
+:102B0000006210233043FFFF8F820030AC5300007F
+:102B1000AC400004AC520008AC43000C3C02000680
+:102B200034420010AF4200300000000000000000FE
+:102B3000000000008F420000304200101040FFFDF6
+:102B4000001018C20064182190650040320400078C
+:102B5000240200018FBF00388FB300348FB20030E1
+:102B60008FB1002C8FB00028008210040045102582
+:102B700027BD004003E00008A062004027BDFFA879
+:102B8000AFB60050AFB5004CAFB40048AFB300448F
+:102B9000AFB1003CAFBF0054AFB20040AFB000389F
+:102BA0008C9000003C0208008C4200E88F860034C4
+:102BB000960300022413FF8000C2302130633FFFE0
+:102BC0000003198000C3382100F3102490B20000E4
+:102BD000AF42002C9203000230E2007F034230211A
+:102BE0003C02000E00C28821306300C02402004075
+:102BF0000080A82100A0B021146200260000A021BE
+:102C00008E3400388E220018144000022402000185
+:102C1000AE2200189202000D304200201440001530
+:102C20008F8200343C0308008C6300DC001238C043
+:102C3000001231400043102100C7302100463821E6
+:102C400030E300073C02008030E6007800C2302507
+:102C50000343182100F31024AF4208002463090045
+:102C6000AF4608108E2200188C6300080043102124
+:102C7000AE2200188E22002C8E2300182442000160
+:102C80000062182B1060003D000000000A000B4499
+:102C900000000000920300022402FFC00043102441
+:102CA000304200FF1440000524020001AE2200184B
+:102CB000962200360A000B2D3054FFFF8E2200149E
+:102CC00024420001AE220018920200000002160009
+:102CD00000021603044100290000000096020002D1
+:102CE00027A4001000802821A7A200169602000247
+:102CF00024070001000030213042FFFFAF82002492
+:102D00000E00095AAFA0001C960300023C04080004
+:102D10008C8400E88F82003430633FFF0003198009
+:102D200000441021004310213043007F3C05000C7B
+:102D30000053102403431821AF42002800651821D6
+:102D40009062000D001221403042007FA062000D11
+:102D50003C0308008C6300E48F82003400431021A0
+:102D60000044382130E2007F034210210045102149
+:102D700000F31824AF430028AEA200009222000DF9
+:102D8000304200101040001302A020218F83002841
+:102D90008EA40000028030219462003E2442FFFF96
+:102DA000A462003E948400029625000E3084FFFF4A
+:102DB0000E000A3F30A5FFFF8F82002894430034A5
+:102DC0009622000E1443000302A0202124020001D9
+:102DD000A382002C02C028210E0008CF00000000B2
+:102DE0008FBF00548FB600508FB5004C8FB4004891
+:102DF0008FB300448FB200408FB1003C8FB00038D9
+:102E000003E0000827BD00588F85002827BDFFD0AC
+:102E1000AFB40028AFB20020AFBF002CAFB3002486
+:102E2000AFB1001CAFB0001890A800D090A600D1A0
+:102E30003C0208008C4200E48F83003430C700FF5E
+:102E4000A3A600100062182100071140006218219B
+:102E50003062007F034220213C02000C00822021CE
+:102E60002402FF8000621824311200FF8CB100D8C8
+:102E7000AFA400148CB300DC0000A021AF430028F5
+:102E800010F2001F240200018FA6001427A40014D2
+:102E900027A500108CC2000402228021027010239A
+:102EA000044000172402000190C3000D2402FF809B
+:102EB00000431024304200FF144000070200882124
+:102EC00090C2000D344200400E0008CFA0C2000D99
+:102ED0000A000B8B93A200100E000AAD241400010F
+:102EE0008F830028AC7000D893A20010A06200D19C
+:102EF00093A200101452FFE58FA6001424020001D3
+:102F0000168200048FBF002C0E0006F700000000A0
+:102F10008FBF002C8FB400288FB300248FB2002005
+:102F20008FB1001C8FB0001803E0000827BD0030EF
+:102F300027BDFFD8AFB3001CAFB20018AFB100146B
+:102F4000AFB00010AFBF00200080982100E08021CA
+:102F500030B1FFFF0E00056430D200FF000000001A
+:102F600000000000000000008F820020AC51000033
+:102F7000AC520004AC530008AC40000CAC40001054
+:102F8000AC400014AC4000183C03080094634E961B
+:102F900002038025AC50001C00000000000000006F
+:102FA00000000000240400018FBF00208FB3001C2C
+:102FB0008FB200188FB100148FB000100A0005897D
+:102FC00027BD002827BDFFE8AFB00010AFBF001439
+:102FD00030A5FFFF30C600FF0080802124020C8056
+:102FE000AF420024000000000000000000000000CC
+:102FF00000000000000000000E000B9A000000001E
+:103000003C040800248400E08C8200002403FF803C
+:103010008FBF00140202102100431024AF4200248D
+:103020008C8200003C03000A020280213210007FE3
+:10303000035010218FB000100043102127BD00184D
+:1030400003E00008AF82002827BDFFE8AFBF0010F3
+:103050008F4401403C0308008C6300E02402FF80A1
+:10306000AF8400340083182100621024AF42002492
+:103070003C02000803424021950500023063007FB6
+:103080003C02000A034318210062182130A5FFFF0B
+:103090003402FFFF000030213C07602010A2000630
+:1030A000AF8300282402FFFFA5020002946500D42C
+:1030B0000E000BBF30A5FFFF8FBF001024020C8055
+:1030C00027BD001803E00008AF4200243C020008BE
+:1030D00003424021950200023C0A0800954A00C6BE
+:1030E0003046FFFF14C000073402FFFF8F82002824
+:1030F0008F8400343C076020944500D40A000C28DB
+:1031000030A5FFFF10C200248F87002894E20054EE
+:1031100094E400163045FFFF00A6102300A6182BEC
+:103120003089FFFF106000043044FFFF00C510230A
+:10313000012210233044FFFF008A102B1040000CA6
+:10314000012A102324020001A50200162402FFFF19
+:10315000A502000294E500D48F84003400003021E1
+:1031600030A5FFFF3C0760200A000BBF00000000F5
+:103170000044102A104000080000000095020016CC
+:103180003042000110400004000000009742007E21
+:1031900024420014A502001603E00008000000000D
+:1031A0008F84002827BDFFE0AFBF00189482003451
+:1031B0009483003E1060001A3048FFFF9383002C78
+:1031C00024020001146200278FBF00188F8200289C
+:1031D000000818C231080007006218212447003A8D
+:1031E000244900542444002024450030244600345F
+:1031F00090620040304200FF01021007304200019F
+:10320000104000168FBF00180E000927AFA900104C
+:103210008F820028944200340A000C413048FFFF9E
+:1032200094830036948200341043000E8FBF001840
+:1032300094820036A482003494820056A482005402
+:103240008C82002CAC82002494820032A482003054
+:103250009482003CA482003A8FBF00180A000C013F
+:1032600027BD002003E0000827BD002027BDFFE8A0
+:10327000AFBF00108F4A01003C0508008CA500E09C
+:103280003C02080090424EBC3C0C0800958C4EB6A7
+:1032900001452821304B003F30A2007F03424021EE
+:1032A000396900323C02000A3963003F2C63000197
+:1032B000010240212D2900012402FF8000A22824C0
+:1032C00001234825AF8A003400801821AF4500242F
+:1032D000000030210080282124070001AF88002849
+:1032E0003C04080024844EB0AF8C00241520000656
+:1032F000A380002D240200201562000E3402FFFF7F
+:103300001582000C00000000240200201562000558
+:10331000000000008C6300142402FFFF106200070D
+:10332000000000000E00095A000000000A000C9D79
+:10333000000000000E0009C5006020210E000C36C0
+:10334000000000008FBF001024020C8027BD001871
+:1033500003E00008AF4200243C0208008C4200E079
+:1033600027BDFFA0AFB1003C008210212411FF80D7
+:10337000AFBE0058AFB70054AFB20040AFB0003896
+:10338000AFBF005CAFB60050AFB5004CAFB4004863
+:10339000AFB30044005110248F4800248F49002807
+:1033A0008F470028AF4200243C0208008C4200E016
+:1033B0000080902124060006008210213042007F08
+:1033C000034218213C02000A006280213C02001FD7
+:1033D0003442FF8000E2382427A40010260500F0C4
+:1033E0000122F0240102B8240E0005EEAFA7003040
+:1033F0008FA20018AE0200C48FA2001CAE0200C84B
+:103400008FA20024AE0200CC93A40010920300D13E
+:103410002402FF800082102400431025304900FF61
+:103420003083007F3122007F0062102A10400004A8
+:10343000000310C001311026304900FF000310C006
+:1034400000031940006218213C0208008C4200DC95
+:10345000920400D202421021004310210051102496
+:10346000AF42002893A300103063007F000310C018
+:1034700000031940006218213C0208008C4200DC65
+:1034800002421021004310213042007F03421821E4
+:103490003C02000C006240218FA300142402FFFFB5
+:1034A00010620030309500FF93A2001195030014C4
+:1034B000304400FF3063FFFF0064182B1060000DE4
+:1034C00000000000950400148D07001C8D060018F4
+:1034D0003084FFFF0044202300042100000010215D
+:1034E00000E4382100E4202B00C230210A000D172F
+:1034F00000C43021950400148D07001C8D060018AF
+:103500003084FFFF008220230004210000001021EE
+:103510000080182100C2302300E4202B00C4302397
+:1035200000E33823AD07001CAD06001893A200117C
+:10353000A502001497A20012A50200168FA2001483
+:10354000AD0200108FA20014AD02000C93A2001176
+:10355000A502002097A20012A50200228FA200144B
+:10356000AD0200242406FF80024610243256007F5C
+:10357000AF420024035618213C02000A0062802159
+:103580008E02004C8FA200203124007F000428C04E
+:10359000AE0200508FA200200004214000852821A7
+:1035A000AE02007093A2001001208821A2020083C5
+:1035B00093A20010A2020079920200853042003FDF
+:1035C000A20200853C0208008C4200DC024210216D
+:1035D0000045102100461024AF42002C3C02080098
+:1035E0008C4200E43C0308008C6300DC02421021A2
+:1035F0000044102100461024AF4200283C0208007D
+:103600008C4200E402431821006518210242102177
+:10361000004410213042007F3063007F93A50010EA
+:1036200003422021034318213C02000E0062402186
+:103630003C02000C10B1008C008248213233007F24
+:10364000166000192404FF803C0208008C4200DC54
+:103650000242102100441024AF42002C3C0208001A
+:103660008C4200E43C0308008C6300DC0242102121
+:1036700000441024AF4200283C0208008C4200E4C1
+:10368000024318213063007F024210213042007F44
+:1036900003422021034318213C02000E0062402116
+:1036A0003C02000C008248219124000D2414FF806C
+:1036B0000000102100942025A124000D9504000293
+:1036C000950500148D07001C3084FFFF30A5FFFF17
+:1036D0008D060018008520230004210000E4382115
+:1036E00000C2302100E4202B00C43021AD07001CB3
+:1036F000AD06001895020002A5020014A5000016F0
+:103700008D020008AD0200108D020008AD02000C11
+:1037100095020002A5020020A50000228D020008EB
+:10372000AD0200249122000D3042004010400042C2
+:10373000262200013C0208008C4200E0A3B30028CE
+:103740003C10000A0242102100541024AF42002411
+:103750003C0208008C4200E0A380002C27A4002C2F
+:10376000024210213042007F0342182100701821CC
+:103770008C6200D88D26000427A50028AFA9002C54
+:1037800000461021AC6200D80E000AADAF830028BD
+:1037900093A300288F8200280E0006F7A04300D1D3
+:1037A0000E000C360000000002541024AF4200242A
+:1037B0003C0208008C4200DC00132940001320C0AA
+:1037C00000A42021024210210044102100541024A2
+:1037D000AF42002C3C0208008C4200E43C0308008D
+:1037E0008C6300DC03563021024210210045102179
+:1037F00000541024AF4200283C0208008C4200E430
+:1038000002431821006418210242102100451021B2
+:103810003042007F3063007F0342202103431821A0
+:103820003C02000E006240213C02000C00D08021CE
+:1038300000824821262200013043007F14750005D4
+:10384000304400FF2403FF8002231024004310268D
+:10385000304400FF93A20010008088212508002832
+:103860001444FF762529002093A400108FA3001490
+:103870002402FFFF1062000A308900FF2482000149
+:10388000248300013042007F14550005306900FF99
+:103890002403FF800083102400431026304900FFDA
+:1038A00092020078305300FF11330032012088214A
+:1038B0003C0208008C4200DC3225007F000520C05D
+:1038C0000005294000A42021024210212406FF8087
+:1038D0000044102100461024AF42002C3C03080095
+:1038E0008C6300DC3C0208008C4200E40243182197
+:1038F00002421021004510210064182100461024C6
+:103900003063007FAF420028034318213C02000EC1
+:10391000006240213C0208008C4200E48D06000C4D
+:103920000100202102421021004510213042007F79
+:10393000034218213C02000C0062482110C0000D17
+:10394000012028210E00071B000000002402FF8038
+:103950000222182426240001006228263082007FDB
+:1039600014550002308300FF30A300FF1473FFD012
+:10397000006088218E0300743C027FFF3442FFFF09
+:1039800000621824AE0300740E00073C02402021A0
+:10399000AF5700248FA20030AF5E00288FBF005CBD
+:1039A0008FBE00588FB700548FB600508FB5004CB3
+:1039B0008FB400488FB300448FB200408FB1003CF9
+:1039C0008FB0003827BD006003E00008AF42002C34
+:1039D00027BDFFD8AFB1001CAFBF0020AFB00018AB
+:1039E00027510188922200032408FF803C03000A2B
+:1039F0003047007FA3A700108F4601803C020800DB
+:103A00008C4200E0AF86003400C2282100A81024B8
+:103A1000AF4200249224000030A2007F0342102114
+:103A200000431021AF8200283084007F240200026E
+:103A300014820025000719403C0208008C4200E473
+:103A400000C210210043282130A2007F0342182128
+:103A500000A81024AF4200283C02000C006218218C
+:103A60009062000DAFA3001400481025A062000D65
+:103A70008FA300149062000D304200405040006A55
+:103A80008FBF00208F860028A380002C27A400145D
+:103A90008CC200D88C63000427A5001000431021BD
+:103AA0000E000AADACC200D893A300108F8200288C
+:103AB0000E0006F7A04300D10E000C3600000000F7
+:103AC0000A000ED88FBF00200E00070000C0202182
+:103AD0000E00070E000000003C0200080342802197
+:103AE000922300019202007B1443004F8FBF0020FD
+:103AF000922200003044007F24020004108200174C
+:103B0000288200051040000624020005240200035C
+:103B1000108200078FB1001C0A000ED900000000BF
+:103B2000108200128FBF00200A000ED98FB1001C36
+:103B300092050083920600788E0700748F8400340B
+:103B400030A500FF00073E0230C600FF0E0007440C
+:103B500030E7007F0A000ED88FBF00200E000CA4B3
+:103B60008F8400340A000ED88FBF002024020C80FE
+:103B7000AF4200249202003E30420040104000203C
+:103B8000000000009202003E000216000002160330
+:103B900004410006000000008F8400340E0006710E
+:103BA000240500930A000ED88FBF00209202003F28
+:103BB00024030018304200FF1443000C8F840034AB
+:103BC000240500390E000609000030210E000335DF
+:103BD0008F84003424020012A202003F0E00033E34
+:103BE0008F8400340A000ED88FBF002024050036D1
+:103BF0000E000609000030210A000ED88FBF0020F9
+:103C00000E0003358F8400349202000534420020F8
+:103C1000A20200050E00033E8F8400340E00108FB8
+:103C20008F8400348FBF00208FB1001C8FB000182C
+:103C300024020C8027BD002803E00008AF420024C6
+:103C400027BDFFE8AFB00010AFBF0014274301004D
+:103C500094620008000214000002140304410002F0
+:103C6000000080212410000194620008304200808E
+:103C70001040001A02001021946200083042200017
+:103C800010400016020010218C6300183C021C2D0D
+:103C9000344219ED240600061062000F3C07602133
+:103CA0003C0208008C4200D4104000078F8200289C
+:103CB0008F830028906200623042000F344200403F
+:103CC000A06200628F8200288F840034944500D463
+:103CD0000E000BBF30A5FFFF020010218FBF0014A4
+:103CE0008FB0001003E0000827BD001827BDFFE0DB
+:103CF000AFB10014AFB00010A380002CAFBF00180C
+:103D00008F4501003C0308008C6300E02402FF8023
+:103D1000AF85003400A318213064007F03442021C4
+:103D2000006218243C02000A00822021AF430024D4
+:103D3000275001008E0200148C8300DCAF84002821
+:103D40000043102318400004000088218E02001454
+:103D50000E000B50AC8200DC9202000B2403000228
+:103D6000304200FF1443002F0000000096020008BC
+:103D7000304300FF24020082146200052402008404
+:103D80000E000A0B000000000A000F640000000093
+:103D900014620009240200818F8200288F8400347D
+:103DA0003C076021944500D49206000530A5FFFF32
+:103DB0000A000F5330C600FF146200270000000005
+:103DC0009202000A304300FF3062002010400004DD
+:103DD000306200408F8400340A000F4F24060040F8
+:103DE00010400004000316008F8400340A000F4FB7
+:103DF0002406004100021603044100178F8400349A
+:103E0000240600428F8200283C076019944500D4A4
+:103E100030A5FFFF0E000BBF000000000A000F647A
+:103E2000000000009202000B24030016304200FF45
+:103E300010430006000000009202000B240300174C
+:103E4000304200FF14430004000000000E000EDEAC
+:103E500000000000004088210E000C360000000029
+:103E60009202000A304200081040000624020C8032
+:103E70008F8500283C0400080E0012BD0344202159
+:103E800024020C80AF4200248FBF001802201021B2
+:103E90008FB000108FB1001403E0000827BD002090
+:103EA00027BDFFE8AFBF0014AFB000108F50002453
+:103EB0003C0308008C6300E08F4501002402FF8072
+:103EC00000A318213064007F0344202100621824DD
+:103ED0003C02000A00822021AF850034AF43002459
+:103EE00090820062AF8400283042000F34420050BC
+:103EF000A08200623C02001F3442FF800E0006F7E1
+:103F000002028024AF5000248FBF00148FB0001035
+:103F100003E0000827BD00183C0208008C42002086
+:103F20001040001D2745010090A300093C02000835
+:103F30000342202124020018546200033C020008BE
+:103F40000A000FA5240200080342202124020016C3
+:103F5000146200052402001724020012A082003F10
+:103F60000A000FAF94A700085462000694A7000847
+:103F7000936200052403FFFE00431024A3620005A2
+:103F800094A7000890A6001B8CA4000094A500062E
+:103F90000A000B9A00073C0003E000080000000044
+:103FA0002744010094820008304500FF38A30082B6
+:103FB00038A200842C6300012C4200010062182505
+:103FC00010600006240200839382002D1040000D33
+:103FD000000000000A000C690000000014A20005A7
+:103FE00024A2FF808F4301043C02602003E000080C
+:103FF000AC430014304200FF2C420002104000038A
+:10400000240200220A000F090000000014A200038D
+:10401000000000000A000F76000000000A000F9464
+:10402000000000009363007E9362007A144300094D
+:10403000000020219362000024030050304200FF62
+:1040400014430004240400019362007E2442000112
+:10405000A362007E03E00008008010218F4201F877
+:104060000440FFFE24020002AF4401C0A34201C489
+:104070003C02100003E00008AF4201F827BDFFE852
+:10408000AFBF00109362003F2403000A304200FFDC
+:1040900014430046000000008F6300548F62004C00
+:1040A0001062007F036030219362000024030050FF
+:1040B000304200FF1443002F000000008F440140F5
+:1040C0003C0208008C4200E02403FF8000821021A3
+:1040D00000431024AF4200243C0208008C4200E060
+:1040E0008F6500543C03000A008220213084007F49
+:1040F0000344102100431021AC4501089762003CA5
+:104100008F63004C3042FFFF000210400062182114
+:10411000AF63005C8F6300548F64004C9762003C77
+:10412000006418233042FFFF0003184300021040D0
+:104130000043102A10400006000000008F62005467
+:104140008F63004C004310230A0010250002104327
+:104150009762003C3042FFFF00021040ACC2006496
+:1041600024020001A0C0007CA0C2008424020C80B4
+:10417000AF4200240E000FD78F4401401040004989
+:104180008FBF00108F4301408F4201F80440FFFEB3
+:1041900024020002AF4301C0A34201C43C0210004C
+:1041A000AF4201F80A0010778FBF00109362003F02
+:1041B00024030010304200FF1443000400000000FC
+:1041C0008F4401400A001063000028219362003FE1
+:1041D00024030016304200FF14430004240200149C
+:1041E000A362003F0A001071000000008F62004CC3
+:1041F0008F630050004310230441002A8FBF00103A
+:104200009362008124420001A362008193620081D5
+:104210003C0308008C6300C0304200FF14430010D0
+:10422000000000009362003F24030004304200FFBE
+:1042300014430006000000008F4401408FBF0010AF
+:10424000240500930A00067127BD00188F44014021
+:10425000240500938FBF00100A0006E027BD001858
+:104260008F4401400E000335000000008F620054AF
+:104270002442FFFFAF6200548F6200502442FFFFD0
+:10428000AF6200500E00033E8F4401408F44014056
+:104290008FBF0010240500040A00034327BD001847
+:1042A0008FBF001003E0000827BD00188F4201886F
+:1042B0009363007E00021402304400FF306300FF6D
+:1042C0001464000D0000000093620080304200FF83
+:1042D0001044000900000000A36400809362000005
+:1042E00024030050304200FF14430004000000008B
+:1042F0000A0007A88F440180A364008003E000083F
+:104300000000000027BDFFE8AFB00010AFBF0014F1
+:1043100093620005240300303042003014430089CA
+:10432000008080213C0208008C4200201040008068
+:10433000020020210E000564000000008F8500208F
+:10434000ACB000009362003E9363003F304200FF38
+:1043500000021200306300FF00431025ACA20004ED
+:104360009362008200021600000216030441000559
+:10437000000000003C0308008C6300480A0010B5F0
+:10438000000000009362003E3042004014400003F1
+:104390000000182193620081304300FF9362008285
+:1043A00000031E00304200FF0002140000621825C6
+:1043B000ACA300088F620040ACA2000C8F620048E2
+:1043C000ACA200108F62004CACA200148F620050AF
+:1043D0008F63004C004310230441000300000000E1
+:1043E0000A0010C98F62004C8F620050ACA2001806
+:1043F0003C02080094424E963C03C00B0000202172
+:10440000004310250E000589ACA2001C8F620054E9
+:104410008F840020AC8200008F620058AC820004C0
+:104420008F62005CAC8200088F6200608F43007472
+:1044300000431021AC82000C8F620064AC8200103B
+:10444000976300689762006A00031C003042FFFF18
+:1044500000621825AC83001493620082240300805C
+:10446000304200FF14430003000000000A0010FD6A
+:10447000AC8000188F63000C240200011062000E53
+:104480002402FFFF9362003E304200401440000AC5
+:104490002402FFFF8F63000C8F4200740062182318
+:1044A0003C02080000621024144000020000282191
+:1044B0000060282100051043AC8200183C0208006F
+:1044C00094424E963C03C00C00002021004310256E
+:1044D0008F8300200E000589AC62001C8F620018DB
+:1044E0008F8300203C05080094A54E96240400010B
+:1044F000AC620000AC6000048F66006C3C02400DB2
+:1045000000A22825AC6600088F6200DCAC62000CBB
+:10451000AC6000109362000500021600AC6200144B
+:10452000AC6000180E000589AC65001C020020215B
+:104530008FBF00148FB00010A36000050A0004F2C2
+:1045400027BD00188FBF00148FB0001003E00008D3
+:1045500027BD00189742007C30C600FFA08600846B
+:104560003047FFFF2402000514C2000B24E346502D
+:1045700090A201122C4200071040000724E30A0019
+:1045800090A30112240200140062100400E2102122
+:104590000A0011353047FFFF3067FFFF03E00008D6
+:1045A000A4870014AC87004C8CA201080080402135
+:1045B00000A0482100E2102330C600FF184000038D
+:1045C00093AA001324E2FFFCACA2010830C2000150
+:1045D00010400008000000008D02005000E210238F
+:1045E00004410013240600058D02005410E200105F
+:1045F000000000008D02005414E2001A00000000C8
+:104600003C0208008C4200D8304200201040000AD2
+:1046100024020001910300789102008314430006F4
+:104620002402000101002021012028212406000489
+:104630000A00112300000000A100008411400009BD
+:10464000A50200148F4301008F4201F80440FFFED1
+:1046500024020002AF4301C0A34201C43C02100087
+:10466000AF4201F803E000080000000027BDFFE8AA
+:104670008FA90028AFBF00100080402100E9182357
+:104680001860007330C600FFA080007CA08000810D
+:104690008CA2010800E210230440004D000000003D
+:1046A0008C8200509483003C8C8400640047482333
+:1046B0003063FFFF012318210083202B10800004AA
+:1046C000000000008D0200640A00118600E2102143
+:1046D0009502003C3042FFFF0122102100E2102130
+:1046E000AD02005C9502003C8D03005C3042FFFF90
+:1046F0000002104000E210210043102B1040000384
+:10470000000000000A0011958D02005C9502003C3B
+:104710003042FFFF0002104000E21021AD02005CB9
+:10472000A1000084AD07004C8CA2010800E2102318
+:104730001840000224E2FFFCACA2010830C20001D4
+:104740001040000A000000008D02005000E210231B
+:1047500004410004010020218D02005414E20003F2
+:10476000000000000A0011B7240600058D02005465
+:1047700014E200478FBF00103C0208008C4200D8B2
+:10478000304200201040000A24020001910300780A
+:10479000910200831443000624020001010020213D
+:1047A000240600048FBF00100A00112327BD001843
+:1047B000A1000084A50200148F4301008F4201F87C
+:1047C0000440FFFE240200020A0011DC0000000089
+:1047D0008C82005C004910230043102B54400001E0
+:1047E000AC87005C9502003C3042FFFF0062102B5A
+:1047F00014400007240200029502003C8D03005C77
+:104800003042FFFF00621821AD03005C2402000269
+:10481000AD07004CA10200840E000FD78F440100A9
+:104820001040001B8FBF00108F4301008F4201F822
+:104830000440FFFE24020002AF4301C0A34201C4B2
+:104840003C021000AF4201F80A0011F28FBF0010C5
+:1048500030C200101040000E8FBF00108C83005C2F
+:104860009482003C006918233042FFFF0062182147
+:104870003C023FFF3444FFFF0083102B54400001F3
+:104880000080182101231021AD02005C8FBF0010B1
+:1048900003E0000827BD001827BDFFE88FAA002805
+:1048A000AFBF00100080402100EA482319200021FA
+:1048B00030C600FF8C83005C8C820064006A182381
+:1048C0000043102B504000100069182194A20110E1
+:1048D00001221021A4A2011094A201103042FFFF76
+:1048E0000043102B1440000A3C023FFF94A2011029
+:1048F00000431023A4A201109482003C3042FFFF29
+:104900000A00121100621821A4A001103C023FFF0E
+:104910003444FFFF0083102B544000010080182115
+:1049200000671021AD02005CA100007C0A00125952
+:10493000A100008130C200101040003C00000000C7
+:104940008C820050004A10231840003800000000FC
+:104950009082007C24420001A082007C9082007C36
+:104960003C0308008C630024304200FF0043102BFE
+:104970001440005C8FBF00108CA2010800E21023DD
+:1049800018400058000000008C8300549482003CC2
+:10499000006A18233042FFFF000318430002104052
+:1049A0000043102A10400005000000008C820054D3
+:1049B000004A10230A001240000210439482003C77
+:1049C0003042FFFF00021040AD0200649502003C3F
+:1049D0008D0400649503003C3042FFFF000210404C
+:1049E000008220213063FFFF008318210143102142
+:1049F000AD02005C8D020054ACA20108240200024A
+:104A0000A10200840E000FD78F4401001040003532
+:104A10008FBF00108F4301008F4201F80440FFFE5A
+:104A2000240200020A00128200000000AD07004CC0
+:104A30008CA2010800E210231840000224E2FFFCCF
+:104A4000ACA2010830C200011040000A00000000C2
+:104A50008D02005000E210230441000401002021D7
+:104A60008D02005414E20003000000000A001279D5
+:104A7000240600058D02005414E2001A8FBF0010B6
+:104A80003C0208008C4200D8304200201040000A4E
+:104A90002402000191030078910200831443000670
+:104AA0002402000101002021240600048FBF001011
+:104AB0000A00112327BD0018A1000084A5020014DC
+:104AC0008F4301008F4201F80440FFFE24020002E0
+:104AD000AF4301C0A34201C43C021000AF4201F841
+:104AE0008FBF001003E0000827BD00188FAA001038
+:104AF0008C8200500080402130C600FF004A102305
+:104B000000A048211840000700E0182124020001FD
+:104B1000A0800084A0A00112A48200140A0011F455
+:104B2000AFAA0010A0800081AD07004C8CA2010844
+:104B300000E210231840000224E2FFFCACA20108AE
+:104B400030C2000110400008000000008D0200503B
+:104B50000062102304410013240600058D02005456
+:104B600010620010000000008D0200541462001159
+:104B7000000000003C0208008C4200D830420020B7
+:104B80001040000A24020001910300789102008382
+:104B900014430006240200010100202101202821E5
+:104BA000240600040A00112300000000A100008474
+:104BB000A502001403E000080000000027BDFFE08C
+:104BC000AFBF0018274201009046000A8C4800142D
+:104BD0008C8B004C9082008430C900FF0168182340
+:104BE000304A00FF1C60001A2D4600062402000116
+:104BF0000142100410C00016304300030120302190
+:104C00000100382114600007304C000C15800009A9
+:104C1000304200301440000B8FBF00180A0012E32E
+:104C2000000000000E0011F4AFAB00100A0012E308
+:104C30008FBF00180E001169AFAB00100A0012E31D
+:104C40008FBF0018AFAB00100E001289AFAA00147E
+:104C50008FBF001803E0000827BD002024020003D6
+:104C6000A08200848C82005403E00008ACA20108FA
+:104C70003C02000803421821906200812406004390
+:104C80003C07601924420001A0620081906300810A
+:104C90003C0208008C4200C0306300FF1462001028
+:104CA0002403FF803C0208008C4200E000821021B7
+:104CB00000431024AF4200243C0208008C4200E074
+:104CC0003C03000A008210213042007F0342102181
+:104CD00000431021944500D40A000BBF30A5FFFF0C
+:104CE00003E000080000000027BDFFE0AFBF001890
+:104CF000AFB10014AFB000108F420180008080215E
+:104D000000A088210E0012EA00402021A2000084A9
+:104D10008E0200548FBF00188FB00010AE22010821
+:104D20008FB1001403E0000827BD002027BDFFE07D
+:104D30003C020008AFB00010AFBF0018AFB10014C4
+:104D4000034280218F510140920300848E04005061
+:104D50008E02004C14820040306600FF3C020800C6
+:104D60008C4200E02403FF80022210210043102423
+:104D7000AF4200243C0208008C4200E09744007CD3
+:104D800092050081022210213042007F0342182147
+:104D90003C02000A0062182114A0000B3084FFFFBF
+:104DA0002402000554C20014248205DC9062011222
+:104DB00024420001A062011224020C80AF420024B0
+:104DC0000A00134224020005A0600112240200051B
+:104DD00014C20009248205DC920200812C420007E3
+:104DE0005040000524820A0092030081240200142E
+:104DF00000621004008210213044FFFFA60400145A
+:104E00000E0012EA022020219602003C8E03004C84
+:104E1000022020213042FFFF0002104000621821D2
+:104E20000E000335AE03005C9202007D02202021BB
+:104E3000344200400E00033EA202007D8F4201F882
+:104E40000440FFFE24020002AF5101C0A34201C48E
+:104E50003C021000AF4201F88FBF00188FB1001460
+:0C4E60008FB0001003E0000827BD002008
+:044E6C0008000E7CB0
+:104E700008000EC408000F0408000F5008000F843B
+:104E80000A00002000000000000000000000000DEB
+:104E90006370342E362E31360000000004061004F4
+:104EA0000000000000000000000000000000000002
+:104EB00000000000000000000000000000000000F2
+:104EC00000000000000000000000002000000000C2
+:104ED00000000000000000000000000000000000D2
+:104EE00000000000000000000000000000000000C2
+:104EF0000000000000000000000000010000002B86
+:104F00000000000010000003000000000000000D81
+:104F10000000000D3C020800244258A43C03080095
+:104F200024635F70AC4000000043202B1480FFFD21
+:104F3000244200043C1D080037BD7FFC03A0F02183
+:104F40003C100800261000803C1C0800279C58A438
+:104F50000E00019C000000000000000D27BDFFE8CE
+:104F60003C096018AFBF00108D2C5000240DFF7F4E
+:104F700024080031018D5824356A380C24070C00B0
+:104F80003C1A8000AD2A50003C04800AAF4800085B
+:104F90003C1B8008AF4700240E000924AF8400109A
+:104FA0000E0008E7000000000E00083400000000BA
+:104FB0000E00125E000000003C0460168C850000AC
+:104FC0003C06FFFF3C02535300A618241062003F2A
+:104FD00034867C0094C201F2A780002C10400003AC
+:104FE000A78000CC38581E1EA798002C94C201F848
+:104FF00010400004978300CC38591E1EA79900CC9E
+:10500000978300CC2C7F006753E0000124030066E7
+:105010009784002C2C820401144000020060282197
+:10502000240404003C0760008CE904382403103C8D
+:105030003128FFFF1103001730B9FFFF5720000C84
+:10504000A38000CE24020050A38200CE939F00CE06
+:1050500013E0000A8FBF001027BD0018A78000CC06
+:10506000A780002CA780003403E00008A78000E69A
+:10507000939F00CE17E0FFF88FBF001027BD0018E8
+:10508000A78500CCA784002CA780003403E000088B
+:10509000A78000E6A38000CE8CCB003C316A0001E3
+:1050A0001140000E0000000030A7FFFF10E0FFE6F7
+:1050B000240200508CCC00C83186000114C0FFE4EB
+:1050C000939F00CE0A000072240200518C8F0004CE
+:1050D0003C0E60000A00005501EE30218CEF0808FC
+:1050E000240D5708000F740211CD000430B8FFFFE3
+:1050F000240500660A000073240404001700FFD48E
+:10510000939F00CE0A000072240200508F86001088
+:105110003089FFFF000939408CC300103C08005063
+:1051200000E82025AF4300388CC500142742040056
+:10513000AF82001CAF45003CAF44003000000000CF
+:10514000000000000000000000000000000000005F
+:105150000000000000000000000000008F4B000075
+:10516000316A00201140FFFD0000000003E000084C
+:10517000000000008F840010948A001A8C8700249D
+:105180003149FFFF000940C000E83021AF46003C34
+:105190008C8500248F43003C00A310231840002975
+:1051A000000000008C8B0020256200013C0D0050A7
+:1051B00035AC0008AF420038AF4C003000000000B2
+:1051C00000000000000000000000000000000000DF
+:1051D0000000000000000000000000008F4F0000F1
+:1051E00031EE002011C0FFFD000000008F4A0400D6
+:1051F0003C080020AC8A00108F490404AC890014DC
+:10520000AF48003000000000948600189487001C0E
+:1052100000C71821A48300189485001A24A2000155
+:10522000A482001A9498001A9499001E133800035F
+:105230000000000003E000080000000003E0000898
+:10524000A480001A8C8200200A0000CC3C0D005083
+:105250000A0000BD000000003C0308008C63002031
+:105260008F82001827BDFFE810620008AFBF001052
+:105270000E0000F4AF8300183C0308008C6300208C
+:1052800024040001106400048F8900108FBF0010F7
+:1052900003E0000827BD00188FBF00103C07601214
+:1052A000A520000A9528000A34E5001027BD001843
+:1052B0003106FFFF03E00008ACA600903C020800A6
+:1052C0008C42002027BDFFC8AFBF0034AFBE003006
+:1052D000AFB7002CAFB60028AFB50024AFB40020A4
+:1052E000AFB3001CAFB20018AFB1001410400050B3
+:1052F000AFB000108F840010948600069483000ADB
+:1053000000C3282330B6FFFF12C0004A8FBF00340D
+:1053100094890018948A000A012A40233102FFFF71
+:1053200002C2382B14E0000202C0202100402021DC
+:105330002C8C0005158000020080A021241400049C
+:105340000E0000A3028020218F8700100280982188
+:10535000AF80001494ED000A028088211280004E74
+:1053600031B2FFFF3C1770003C1540003C1E60004E
+:105370008F8F001C8DEE000001D71824507500504F
+:105380000220202102A3802B160000353C182000AB
+:105390005078004702202021241000018F83001440
+:1053A00014600039029158230230F8230250C821BA
+:1053B00033F1FFFF1620FFEE3332FFFF8F8700101F
+:1053C0003C110020AF5100300000000094E6000ABC
+:1053D0003C1E601237D5001002662821A4E5000AA1
+:1053E00094E2000A94F2000A94F400183057FFFF88
+:1053F0001292003BAEB700908CED00148CE40010CC
+:105400000013714001AE4021000E5FC3010E502B0E
+:10541000008B4821012A1821ACE80014ACE30010ED
+:1054200002D3382330F6FFFF16C0FFB98F84001077
+:105430008FBF00348FBE00308FB7002C8FB600288E
+:105440008FB500248FB400208FB3001C8FB20018DA
+:105450008FB100148FB0001003E0000827BD0038A2
+:10546000107E001B000000001477FFCC2410000108
+:105470000E0015A9000000008F8300141060FFCB00
+:105480000230F823029158238F87001001702021E9
+:105490000A0001873093FFFF8F8300141460FFCB55
+:1054A0003C110020AF5100300A0001530000000001
+:1054B0000E00079B024028210A000147004080217E
+:1054C0000E000341024028210A00014700408021CC
+:1054D0000E001471022020210A00014700408021A3
+:1054E0000E0000BD000000000A00016902D338234D
+:1054F00027BDFFE8AFB00010AFBF00140E000037AB
+:10550000000000003C028000345000700A0001AA34
+:105510008E0600008F4F000039EE000131C20001FD
+:10552000104000248F8600A88E0700003C0C080065
+:105530008D8C003C3C0908008D29003800E668236A
+:10554000018D28210000502100AD302B012A40217F
+:10555000010620213C010800AC25003CAF8700A8D3
+:105560003C010800AC2400380E0000F600000000EA
+:105570003C0308008C6300701060FFE6006020218F
+:105580003C0508008CA500683C0608008CC6006C31
+:105590000E001538000000003C010800AC2000702F
+:1055A0008F4F000039EE000131C200011440FFDED0
+:1055B0008F8600A88E0A00008F8B00A83C0508008B
+:1055C0008CA5003C3C0408008C840038014B482327
+:1055D00000A938210082182100E9402B0068102121
+:1055E0003C010800AC27003C3C010800AC2200381C
+:1055F0008F5F01002419FF0024180C0003F92024F8
+:1056000010980012AF840000AF440020936D00009A
+:10561000240C002031A600FF10CC0012240E0050F4
+:1056200010CE00043C194000AF5901380A0001A314
+:10563000000000000E0011D4000000003C194000E2
+:10564000AF5901380A0001A3000000000E00010F4D
+:10565000000000003C194000AF5901380A0001A3C6
+:10566000000000008F58010000802821330F00FF48
+:1056700001E020210E0002EEAF8F00043C19400033
+:10568000AF5901380A0001A30000000000A4102B4C
+:1056900024030001104000090000302100052840CB
+:1056A00000A4102B04A00003000318405440FFFC8A
+:1056B000000528405060000A0004182B0085382B94
+:1056C00054E000040003184200C330250085202365
+:1056D000000318421460FFF9000528420004182B4B
+:1056E00003E0000800C310213084FFFF30A5FFFF56
+:1056F0008F4201B80440FFFE3C0740800087302500
+:105700003C031000AF400180AF450184AF460188E3
+:1057100003E00008AF4301B83084FFFF8F4201B8B7
+:105720000440FFFE3C0740388CA600000087282577
+:105730003C031000AF460180AF45018803E000083C
+:10574000AF4301B88F8300388F8600301066000B9E
+:10575000008040213C07080024E75A18000328C0B5
+:1057600000A710218C44000024630001108800056C
+:105770003063000F5466FFFA000328C003E00008FE
+:10578000000010213C07080024E75A1C00A7302124
+:1057900003E000088CC200003C039000346200016A
+:1057A00000822025AF4400208F45002004A0FFFE8A
+:1057B0000000000003E00008000000003C0380003F
+:1057C000346200010082202503E00008AF4400207D
+:1057D00027BDFFE0AFB100143091FFFFAFB0001064
+:1057E000AFBF00181220001500A080218CA500007A
+:1057F00010A00013240400020E000C6B24060140CC
+:10580000AE0000008F4201B80440000D00002821C6
+:105810003C064000022620258FBF00188FB10014DF
+:105820008FB000103C03100027BD0020AF45018061
+:10583000AF44018803E00008AF4301B88CA5000025
+:105840008F4201B80440FFFE3C064000022620259E
+:105850008FBF00188FB100148FB000103C031000F0
+:1058600027BD0020AF450180AF44018803E0000858
+:10587000AF4301B83086FFFF8F4201B80440FFFEFE
+:105880003C0940068CA8000000C93825AF480180BB
+:105890008CA400043C031000AF440184AF4701888E
+:1058A00003E00008AF4301B827BDFFE0AFB0001030
+:1058B000AFBF0018AFB100149363003E0080802199
+:1058C0000080282130620040000020211040000F9D
+:1058D0008E1100000E000860022020219367000056
+:1058E0002404005030E500FF50A400128E0F000089
+:1058F000022020218FBF00188FB100148FB000103C
+:10590000A762013C0A00092027BD00200E00027D8D
+:10591000000000000E0008600220202193670000B4
+:105920002404005030E500FF14A4FFF202202021DF
+:105930008E0F00003C1008008E1000503C0D000C33
+:10594000240BFF8001F05021314E007F01DA6021ED
+:10595000018D4021014B4824AF490028022020211D
+:105960008FBF00188FB100148FB00010A50200D6B1
+:1059700027BD00200A000920AF8800D027BDFFE026
+:10598000AFBF0018AFB10014AFB0001093660001B4
+:10599000008080210E00024630D10004936400058F
+:1059A000001029C2A765000034830040A3630005EE
+:1059B0000E00024F020020210E00092202002021C9
+:1059C00024020001AF62000C02002821A76200102F
+:1059D00024040002A762001224060140A7620014FA
+:1059E0000E000C6BA76200161620000F8FBF001868
+:1059F000978C00343C0B08008D6B00782588FFFFE6
+:105A00003109FFFF256A0001012A382B10E000064A
+:105A1000A78800343C0F6006240E001635ED0010F8
+:105A2000ADAE00508FBF00188FB100148FB00010C2
+:105A300003E0000827BD002027BDFFE0AFB1001440
+:105A4000AFBF0018AFB0001000A088211080000A7E
+:105A50003C0360002402008010820012000000005D
+:105A60000000000D8FBF00188FB100148FB0001020
+:105A700003E0000827BD00208C682BF80500FFFE1E
+:105A800000000000AC712BC08FBF00188FB1001454
+:105A90008FB000103C09100027BD002003E0000873
+:105AA000AC692BF80E00024600A02021936500058A
+:105AB000022020210E00024F30B000FF2403003EE0
+:105AC0001603FFE7000000008F4401780480FFFE0A
+:105AD000240700073C061000AF510140022020219E
+:105AE000A34701448FBF00188FB100148FB000107E
+:105AF000AF4601780A0002BF27BD002027BDFFE89E
+:105B0000AFBF0014AFB000108F50002000000000A5
+:105B10000E000922AF440020AF5000208FBF0014B8
+:105B20008FB0001003E0000827BD00183084FFFF8D
+:105B30008F4201B80440FFFE3C0740350087302506
+:105B40003C031000AF450180AF400184AF4601889F
+:105B500003E00008AF4301B83084FFFF8F4201B873
+:105B60000440FFFE3C074036008730253C03100010
+:105B7000AF450180AF400184AF46018803E00008D3
+:105B8000AF4301B827BDFFD0AFB3001C3093FFFF78
+:105B9000AFB50024AFB20018AFBF0028AFB40020EB
+:105BA000AFB10014AFB0001030B5FFFF1260002796
+:105BB000000090218F90001C8E0300003C068000A6
+:105BC0002402004000033E0200032C0230E4007F68
+:105BD000006688241482001D30A500FF8F830028F2
+:105BE0002C68000A510000108F91001400035880A7
+:105BF0003C0C0800258C56CC016C50218D490000CE
+:105C0000012000080000000002B218213065FFFFEB
+:105C10000E00021A24040084162000028F90001C3B
+:105C2000AF8000288F910014260C0020264B000125
+:105C3000018080213172FFFF16200004AF8C001C10
+:105C40000253402B1500FFDC000000000240102131
+:105C50008FBF00288FB500248FB400208FB3001CA5
+:105C60008FB200188FB100148FB0001003E000084D
+:105C700027BD0030240D003414AD00F600000000F4
+:105C8000920B000E240A16803C07000CA36B002127
+:105C90009203000D0347F8213C066000A363002037
+:105CA000961100123C087FFF350CFFFFA771003CE6
+:105CB00096020010240B00053054FFFFAF740084DF
+:105CC0008E19001CAF4A00288FF800008CCF444882
+:105CD0000319702601EE3021AF66004C8F69004C2D
+:105CE00024CD00013C197F00AF6900508F64005043
+:105CF000AF640054AF660070AF6D00588F650058F8
+:105D000024040050AF65005CA3600023AF6C006406
+:105D1000A36B00378E030014AF6300488F710048F7
+:105D2000AF7100248E020018AF62006C9214000C58
+:105D3000A3740036936A003E355F0020A37F003EC7
+:105D40008F7800740319782435EE4000AF6E00742C
+:105D500093700000320900FF112402332418FF80E1
+:105D60003C04080024845A980E00028A00000000B7
+:105D700024060004240700013C0408008C845A987F
+:105D8000A366007DA36700058F4A01780540FFFEEA
+:105D900024020002AF440140A34201448F90001C42
+:105DA0003C141000AF5401780A000369AF8000284A
+:105DB0002CAD003751A0FF9C8F9100140005A080EE
+:105DC0003C180800271856F4029878218DEE000040
+:105DD00001C00008000000002406000614A60011FF
+:105DE000000000003C1F08008FFF5A9824040005A3
+:105DF000AF5F00208E190018AF7900188F78004C23
+:105E0000AF78001C8F6F0050122000C2AF6F00707F
+:105E10000A000369AF840028240A000710AA00843E
+:105E2000240300063C05080024A55A980E000254DD
+:105E3000240400818F90001C0011102B0A000369BC
+:105E4000AF820028240A000414AAFFF6240300509D
+:105E50003C0E08008DCE5A98AF4E00208E090008E7
+:105E6000AF6900408E060008AF6600448E07000C44
+:105E7000AF6700488E040010AF64004C8E0D001018
+:105E8000AF6D00848E080014AF6800508E050018B6
+:105E9000AF6500548E0C001CAF6C0058936B000073
+:105EA000317400FF128301F5000000008F64004888
+:105EB0008F6600400086382304E000042404008C30
+:105EC0001620FFDE24020003240400823C050800A3
+:105ED00024A55A980E00027D000000008F90001C3F
+:105EE000000010210A000369AF8200282409000580
+:105EF00014A9FFCC240520003C0A08008D4A5A98BA
+:105F0000AF4A00208E1F0004AF7F005C921900088A
+:105F100024100008A37900218F98001C930F00091A
+:105F2000A36F00208F86001C90CE000A31C400FFB2
+:105F300010900010288300091460006C24020002F5
+:105F4000240800201088000B3405800028850021DB
+:105F500014A0000824054000240D0040108D000509
+:105F60003C05000124070080108700023C05000268
+:105F7000240540008F6E00743C0FFF0001CF802489
+:105F800002054825AF69007490C4000BA36400812A
+:105F90008F84001C9486000C10C0019B0000000040
+:105FA000948E000C241FFFBF24060004A76E003C43
+:105FB0009090000EA370003E8F89001C9124000F6A
+:105FC000A364003F8F94001C8E8D00108F470074D7
+:105FD00001A72823AF6500608E880014AF680064B5
+:105FE000968C0018A76C0068968B001AA76B006A45
+:105FF0008E82001CAF62006C96830002A763013E94
+:10600000928A000EA36A003E9379003E033FC024AB
+:106010001220016AA378003E8F90001C0A000369D9
+:10602000AF8600282414002214B4FF7E2403000746
+:106030003C0208008C425A981220000CAF4200200B
+:106040000A000369AF830028240C003310AC00144D
+:10605000240800283C05080024A55A980E000226B2
+:10606000240400810A0003EE8F90001C3C04080009
+:1060700024845A980E00028A00000000936B0000EE
+:1060800024110050316300FF107101540000000022
+:106090008F90001C000018210A000369AF830028BC
+:1060A0003C0508008CA55A9824040081AF450020C7
+:1060B000A36800343C05080024A55A980E00022667
+:1060C000000000008F90001C240200090A000369F0
+:1060D000AF82002802B288213225FFFF0E00021A8B
+:1060E000240400840A0003698F90001C1082FFA121
+:1060F000240504002894000312800176240C000477
+:10610000240B0001548BFF9B240540000A00043D32
+:10611000240501003C04080024845A988F62004C36
+:106120000E00028A8F6300508F90001C0000202117
+:106130000A000369AF8400288E1000042404008A3A
+:10614000AF500020936E000531C900021520016593
+:10615000020028219378002302002821330F002019
+:1061600015E001602404008D9362003F24190012A1
+:10617000305F00FF13F9015B240400810E0002462A
+:106180000200202193740023240A0004020020212D
+:1061900036830042A36300230E00024FA36A007DF2
+:1061A0008F4B01780560FFFE24050002AF500140CF
+:1061B000A34501448F90001C3C0C1000AF4C0178AB
+:1061C0000A0003EF0011102B8E1000042404008A33
+:1061D000AF500020936D000531A800021500001992
+:1061E000020028219367003F2414001230E400FFCE
+:1061F0001094010100000000936E003F240600048B
+:1062000031C900FF112600FC000000000E0002460C
+:1062100002002021936200232419FFFE02002021A6
+:10622000345F0020A37F0023A374003F9378000510
+:10623000031978240E00024FA36F000502002821E5
+:10624000000020210E000336000000000A0003EECB
+:106250008F90001C8E0500043C0F0008034F402166
+:10626000AF450020910E00002406005031C900FF08
+:106270001126017A240400888F5901B80720FFFEF7
+:106280003C0C400E008C58253C031000AF450180AB
+:10629000AF400184AF4B0188AF4301B891020000C9
+:1062A000240AFF8024040004004AF825A11F0000EE
+:1062B0000E000C6B240600300A0003EE8F90001CC9
+:1062C0008E04001C0E000231000000001040014C42
+:1062D000004048218F90001C240500898F4D01B893
+:1062E00005A0FFFE00000000AF4901808E0F001CDA
+:1062F0003C1440010011702B00B448253C111000E3
+:10630000AF4F0184AF8E0028AF490188AF5101B86B
+:106310000A00036A8F910014961900023C140800C9
+:1063200026945A9833380004130000F23C026000AF
+:106330008E1F001C3C010800AC3F5A98AF5F002044
+:10634000920C0010240B0014318400FF148B011CEC
+:106350000000000096090002312D000115A001B2D5
+:10636000000000008E020004AE8200083C0E08000F
+:106370008DCE5AA011C001A8000000008F690074E2
+:106380003C0E800024040001012E6825AF6D0074CE
+:10639000A3600005AF64000C3C0C08008D8C5AA073
+:1063A0008F88001CA7640010000C59C2A76400125B
+:1063B000A7640014A7640016A76B00088D030008EB
+:1063C00024040002AF63002C8D0A000CAF6A003079
+:1063D00091070010A36700348F82001C90450011C4
+:1063E000A36500358F86001C90D00012A370003684
+:1063F0008F9F001C93F90013A37900378F90001C26
+:1064000096180014A778003896140016A774003A5E
+:106410008E0F0018AF6F00245620FE02AF840028B4
+:106420003C05080024A55A980E00025400002021C3
+:106430008F90001C0A0004AC000020218E0F000485
+:106440003C14080026945A983C010800AC2F5A9836
+:10645000AF4F0020920E000331C90004112000024A
+:106460002402001224020006A362003F9203001BD4
+:10647000240AFFC03062003F004AF825A37F003E97
+:106480009219000333380001170000C1000000001A
+:106490008E020008AE8200083C0208008C425AA01E
+:1064A000104000C000000000000221C2A7640008E4
+:1064B0008E0D000C240B000124140014AF6D002C71
+:1064C0008E080010AF68003096050016A7650038EA
+:1064D000960C0014A76C003AAF6B000CA76B001071
+:1064E000A76B0012A76B0014A76B0016122000EB1D
+:1064F000A37400349206000330C700022CF00001A0
+:10650000260200088F90001C0A000369AF82002851
+:106510008E14000424030081AF54002093680023EC
+:106520003105001010A000AC000000008F4401B83D
+:106530000480FFFE3C06401F0011382B006610252A
+:106540003C111000AF540180AF870028AF40018498
+:10655000AF420188AF5101B80A00036A8F9100145D
+:106560008E0600043C19000803592021AF46002084
+:106570008E07000890980000240F0050331400FF8D
+:10658000128F00A7240500888F4401B80480FFFE05
+:106590003C0D40090011602B00AD10253C1110008E
+:1065A000AF460180AF8C0028AF470184AF4201881D
+:1065B000AF5101B80A00036A8F9100143C0508002E
+:1065C00024A55A980E00027D240400828F90001C9E
+:1065D000000030210A000369AF8600283C0408004F
+:1065E0008C845A980E0014F6000000008F90001C56
+:1065F0000A000486000018210E00033624040081DE
+:106600000A0003EE8F90001C3C05080024A55A9850
+:106610000E00027D2404008B8F90001C0011302B93
+:106620000A000369AF8600283C1908008F395A9880
+:106630003C1F08008FFF005024CCFFFE033F782151
+:1066400001F87024AF4E00283C0408008C845A984E
+:106650003C0908008D2900500089682131A5007F80
+:1066600000BA402101078021AE0600D8AF9000D0CB
+:10667000AE0000DC0A0003B8AE0C0108AF60008475
+:106680003C0808008D085A983C0D08008DAD00505C
+:106690002405FF803C02000C010D58210165602497
+:1066A000AF4C00288E0A00143174007F029A182122
+:1066B00000627821ADEA00D88E1F0014AF8F00D0A1
+:1066C000ADFF00DC8E1900102738FFFE0A00040B16
+:1066D000ADF80108548CFE27240540000A00043D53
+:1066E000240510000E00032B000000000A0003EE3A
+:1066F0008F90001C8C46442C3C056C6234B0797041
+:106700003C010800AC205A9814D000082404000270
+:1067100097880034978A002C02802821010A382BA0
+:1067200010E0001124040092240400020E000C89E1
+:10673000240501403C010800AC225A98AF420020D9
+:106740003C0308008C635A98106000052404008301
+:106750000E000854000000001040000924040083CB
+:106760003C05080024A55A980E00025400000000C1
+:106770008F90001C0011202B0A000369AF840028B1
+:106780000E000858000000000A0005308F90001C21
+:106790008E0400080E000231000000000A00058689
+:1067A000AE8200083C05080024A55A980E00022677
+:1067B000240400878F90001C0A0005A20011102BF2
+:1067C0000E00085C000000003C05080024A55A9853
+:1067D0000A00063A2404008B0E00024602802021A3
+:1067E0009370002302802021360D00100E00024F0E
+:1067F000A36D00238F90001C0A0005AB0000182138
+:10680000240400040E000C89240500301440002AE2
+:10681000004048218F90001C0A00051724050083C2
+:106820009205000C30BF000113E0000300000000DF
+:106830009602000EA482002C920A000C314800023D
+:106840001100FF5100002821960B00128E03001446
+:10685000A48B001A0A0005C2AC83001C8F83003889
+:106860008F8700301067FE84000020213C0908005B
+:1068700025295A1C000320C0008930218CD4000037
+:106880001285005E247800013303000F5467FFFA7D
+:10689000000320C00A0004FE000020213C0508007F
+:1068A00024A55A980E00027D240400828F90001CBB
+:1068B0000A0005A2000010213C0B0008034B202118
+:1068C00024030050240A0001AF420020A0830000EE
+:1068D000A08A00018F88001C91070004A08700187F
+:1068E0008F82001C90450005A08500198F86001C32
+:1068F00090DF0006A09F001A8F99001C93380007B4
+:10690000A098001B8F94001C928F0008A08F001C81
+:106910008F90001C920E0009A08E001D8F8D001C10
+:1069200091AC000AA08C001E8F8B001C3C0C080050
+:10693000258C5A1C9163000B3C0B0800256B5A18E0
+:10694000A083001F8F8A001C9148000CA0880020A3
+:106950008F87001C90E5000DA08500218F82001C10
+:10696000240546469046000EA08600228F9F001CFC
+:1069700093F9000FA09900238F98001C9314001026
+:10698000A09400248F8F001C91F00011A09000258E
+:106990008F90001C8F8E00308F990038960D001458
+:1069A000000E18C025C80001A48D0028960A001604
+:1069B000006C3021006BF821A48A002A9607001889
+:1069C0003108000FA487002CA485002E8E02001C25
+:1069D000ACC90000AF88003011190003AFE200001D
+:1069E0000A00051700002821250C00013184000F42
+:1069F000000028210A000517AF8400383C07080072
+:106A000024E75A180087802100002021ACC0000034
+:106A10000A0004FEAE0000003C05080024A55A98B8
+:106A20000A00063A240400878E0400040E00023196
+:106A3000000000000A00053BAE8200083084FFFF22
+:106A400030C600FF8F4201B80440FFFE000644003C
+:106A5000010430253C07200000C720253C0310001E
+:106A6000AF400180AF450184AF44018803E00008D6
+:106A7000AF4301B827BDFFE8AFB00010AFBF0014AF
+:106A80003C076000240600021080000600A0802160
+:106A90000010102B8FBF00148FB0001003E000080F
+:106AA00027BD00183C09600EAD2000348CE5201C89
+:106AB0008F82001C2408FFFC00A81824ACE3201CD3
+:106AC0000E0006EF8C45000C0010102B8FBF001439
+:106AD0008FB0001003E0000827BD00183C02600ED4
+:106AE0003447010024090018274A04000000000070
+:106AF00000000000000000003C06005034C302000B
+:106B0000AF440038AF45003CAF430030014018218E
+:106B10008F4B0000316800201100FFFD2406007F2C
+:106B20002408FFFF8C6C000024C6FFFF24630004D0
+:106B3000ACEC000014C8FFFB24E7000400000000D8
+:106B400000000000000000003C0F0020AF4F0030AC
+:106B50000000000024AD020001A5702B2529FFFFD5
+:106B6000008E20211520FFE101A0282103E000086C
+:106B70000000000027BDFFE0AFB10014AFBF001858
+:106B8000AFB000103C05600E8CA20034008088215C
+:106B9000144000063C0460008C87201C2408FFFC85
+:106BA00000E8302434C30001AC83201C8F8B001C10
+:106BB00024090001ACA90034956900028D65001418
+:106BC0008D70000C2D2400818D6700048D660008F7
+:106BD000108000078D6A00102D2C00041580000E17
+:106BE00030CE0007312D000311A0000B0000000083
+:106BF0002404008B020028210E0006EF2406000367
+:106C00000011102B8FBF00188FB100148FB000102F
+:106C100003E0000827BD002015C0FFF62404008B08
+:106C20003C030020AF4300300000000024020001BC
+:106C3000AF8200140000000000000000000000000F
+:106C40003C1F0150013FC825253800033C0F600E52
+:106C5000AF47003800181882AF46003C35E8003CCA
+:106C6000AF590030274704008F44000030860020D1
+:106C700010C0FFFD00000000106000082466FFFF48
+:106C80002403FFFF8CEB000024C6FFFF24E7000471
+:106C9000AD0B000014C3FFFB250800043C08600E88
+:106CA000AD090038000000000000000000000000F6
+:106CB0003C070020AF470030000000000E0007171F
+:106CC0000140202102002821000020210E0006EFB3
+:106CD000240600030011102B8FBF00188FB1001481
+:106CE0008FB0001003E0000827BD002027BDFFD8AB
+:106CF000AFB200183092FFFFAFB10014AFBF002059
+:106D0000AFB3001CAFB000101240002C000088216F
+:106D10000A0007AF2413000150B3003C8CE5000CBF
+:106D20000000000D262D000131B1FFFF24EC0020F2
+:106D30000232382B10E00021AF8C001C8F8200142F
+:106D40001440001E8F87001C3C0670003C0320008E
+:106D50008CE400000086282414A300188F85003CD2
+:106D6000000444023C0980000089802414A0FFEA4A
+:106D7000310600FF2404000210C4001F28CA0003CB
+:106D800011400016240B000314D3FFE7262D000149
+:106D9000020028210E0006FD240400018F87001C3C
+:106DA000AF82003C262D000131B1FFFF24EC002012
+:106DB0000232382B14E0FFE1AF8C001C02201021BE
+:106DC0008FBF00208FB3001C8FB200188FB100144A
+:106DD0008FB0001003E0000827BD002814CBFFD2BD
+:106DE000262D00010E00073D020020218F87001C88
+:106DF0000A0007C9AF82003C020028210E0006FDF0
+:106E0000000020210A0007C88F87001C0E0006EF33
+:106E1000240400841600FFC38F87001C0A0007A902
+:106E2000AF80003C3082FFFF1440000300001821B7
+:106E30000004240224030010308500FF14A0000584
+:106E40003087000F246600080004220230C300FFD0
+:106E50003087000F14E00005308900032468000427
+:106E600000042102310300FF3089000315200005D2
+:106E7000388B0001246A000200042082314300FFA5
+:106E8000388B00013164000110800002246C000185
+:106E9000318300FF03E0000800601021308BFFFF0A
+:106EA000000B394230E600FF3C09080025295998BB
+:106EB00000064080010960218D8700003164001FB9
+:106EC000240A0001008A180430A500FF00E32025F1
+:106ED00014A000020003102700E22024240F000168
+:106EE00000CF700401096821000E282714800005D6
+:106EF000ADA400008F86000C00A6102403E000085B
+:106F0000AF82000C8F88000C01C8102503E0000838
+:106F1000AF82000C3C06001F3C0360003084FFFF82
+:106F200034C5FF8024020020AC602008AC60200C37
+:106F3000AC602010AC652014AC642018AC6220005A
+:106F4000000000000000000003E000080000000056
+:106F500027BDFFE82402FFFFAFBF0010AF82000C87
+:106F6000000020213C06080024C659982405FFFF94
+:106F700024890001000440803124FFFF010618210C
+:106F80002C87002014E0FFFAAC6500000E000825F5
+:106F900000002021240200013C04600024050020A0
+:106FA000AC822018AC85200000000000000000002A
+:106FB00000000000244A00013142FFFF2C4604007B
+:106FC00014C0FFF78FBF001003E0000827BD0018B2
+:106FD0008F8300082C62040003E00008384200019F
+:106FE0008F8300082462000103E00008AF820008DC
+:106FF0008F8300082462FFFF03E00008AF820008CF
+:1070000027BDFFE0AFB10014AFBF0018AFB0001054
+:107010008F6B00303C06600000808821ACCB2008DC
+:107020008F6A002C3C02800024030008ACCA200CAC
+:107030009769003A9768003800092C003107FFFF74
+:1070400000A72025ACC42010ACC22014ACC3200083
+:107050000000000000000000000000003C03600091
+:107060008C6D200031AC00081580FFF90000000095
+:107070008C6E201405C00020000000000E0007E9FF
+:107080008F84000C000240803C0908002529599893
+:10709000010938218CE400000E0007E9000281405C
+:1070A000020220213090FFFF020020210E0008077D
+:1070B000000028213C0C8000022C58253210FFFFD4
+:1070C0003C116000240A0020AE2B2014AE302018A2
+:1070D000AE2A2000000000000000000000000000B8
+:1070E000020010218FBF00188FB100148FB0001064
+:1070F00003E0000827BD00208C6620143C02001F1E
+:107100003443FF803C1FFFE800C3C02437F9080068
+:1071100003198021001079C23C0C8000022C5825F4
+:1071200031F0FFFF3C116000240A0020AE2B201438
+:10713000AE302018AE2A2000000000000000000041
+:1071400000000000020010218FBF00188FB1001452
+:107150008FB0001003E0000827BD002027BDFFE826
+:10716000AFB000103402FFFF3090FFFFAFBF00143C
+:1071700012020006020020210E0008250000000077
+:10718000020020210E000807240500018F8400085A
+:107190008FBF00148FB000102483FFFF27BD00189D
+:1071A00003E00008AF830008000439C230E6003F66
+:1071B00000043B4200071840240210002CC40020A9
+:1071C00024C8FFE0AF42002C2463000114800003B8
+:1071D00030A900FF00071840310600FF000360805F
+:1071E00024080001019A58213C0A000E00C8280416
+:1071F000016A382111200005000530278CE90000C4
+:107200000125302503E00008ACE600008CEE00000C
+:1072100001C6682403E00008ACED000027BDFFE8CC
+:10722000AFBF0014AFB000103C0460008C850808AC
+:107230003403F00030A2F0005043000624020001A5
+:107240008C8708083404E00030E6F00010C4001E0B
+:1072500024020002AF8200403C1060003C0A0200A1
+:10726000AE0A0814240910003C08000E8E034400E6
+:1072700003482021AF49002C240501200E000CCF2B
+:10728000000030218F830040106000043C02169102
+:10729000240B0001106B000E3C023D6C344F00903B
+:1072A000AE0F44088FBF00148FB000103C0C60007C
+:1072B000240E10003C0D020027BD0018AD8E4420A6
+:1072C00003E00008AD8D08100A0008F6AF8000400A
+:1072D0003C0218DA344F0090AE0F44088FBF001400
+:1072E0008FB000103C0C6000240E10003C0D02001A
+:1072F00027BD0018AD8E442003E00008AD8D0810B6
+:107300000A0008CA240500010A0008CA0000282152
+:107310003C08080025085DA42404FFFF0100182193
+:107320002402001E2442FFFFAC6400000441FFFD64
+:10733000246300043C07080024E75E208CE5FFFC82
+:107340002404001C24060001308A001F0146480462
+:1073500024840001000910272C8300201460FFFA08
+:1073600000A22824ACE5FFFC3C05666634A4616EEF
+:107370003C06080024C65EE0AF840058AF88009C3D
+:107380002404FFFF00C018212402001F2442FFFF35
+:10739000AC6400000441FFFD246300043C07666602
+:1073A0003C05080024A55EA0AF86004834E6616E67
+:1073B000AF8600982404FFFF00A018212402000FCC
+:1073C0002442FFFFAC6400000441FFFD246300047D
+:1073D0003C0B66663C06080024C65E203568616E7C
+:1073E000AF8500A4AF8800702404FFFF00C01821FF
+:1073F0002402001F2442FFFFAC6400000441FFFD93
+:10740000246300043C0D66663C0A0800254A5F6060
+:1074100035AC616EAF860090AF8C005C2404FFFF3A
+:1074200001401821240200032442FFFFAC64000045
+:107430000441FFFD246300043C09080025295F7016
+:107440008D27FFFC24040006240500013099001F4D
+:107450000325C00424840001001878272C8E002006
+:1074600015C0FFFA00EF3824AD27FFFC3C09666623
+:1074700024030400240403DC24050200240600661F
+:107480003522616E3C08080025085AA4AF820074BA
+:10749000AF830044AF83006CAF830050AF830084A0
+:1074A000AF8A008CAF840064AF85004CAF86005477
+:1074B000AF840078AF850060AF860080010018219E
+:1074C000240200022442FFFFAC6000000441FFFDE3
+:1074D00024630004240400032403000C3C0A080075
+:1074E000254A5AB0AF8A00680A00099D2405FFFFAB
+:1074F0000004188024840001006858212C8700C0F3
+:1075000014E0FFFBAD6500003C0E666635CD616E94
+:10751000240C17A024081800AF8D0088AF8C0094AD
+:1075200003E00008AF88007C2484007F000421C2AF
+:1075300000004021000030210000382100002821F7
+:107540000A0009B4AF8400A01060000624E700011F
+:1075500000C4302124A500012CC20BF51440FFFA11
+:107560002CA300663C09080025295F600120182132
+:10757000240200032442FFFFAC6000000441FFFD31
+:107580002463000410E0001A24E3FFFF00032942F3
+:1075900010A0000A000020212406FFFF3C03080081
+:1075A00024635F60248400010085502BAC660000DA
+:1075B000250800011540FFFB2463000430E2001F92
+:1075C0001040000800086880240C0001004C3804BA
+:1075D000000858800169282124E6FFFF03E0000825
+:1075E000ACA6000001A940212409FFFFAD0900005D
+:1075F00003E0000800000000AF4400283C04000C39
+:1076000003442021000528820A000CCF000030210D
+:10761000000421803C036000AC64100800000000FE
+:1076200000052980AC65100C0000000003E0000894
+:107630008C62100C27BDFFE800802821240400384C
+:10764000AFBF00140E0009E4AFB0001024040E0018
+:10765000AF4400283C10000C0350202124050010EA
+:107660000E000CCF0000302103501021AC40000070
+:10767000AC400004240400388FBF00148FB0001009
+:1076800024053FFF27BD00180A0009E48C430000D1
+:10769000000421803C036000AC641008000000007E
+:1076A0008C62100C03E000080002118227BDFFC8A5
+:1076B000AFB400208F940068AFBE0030AFB7002C8D
+:1076C000AFB600280000B8210080B021241E00C001
+:1076D000AFBF0034AFB50024AFB3001CAFB2001889
+:1076E000AFB10014AFB000100A000A21AFA5003CF2
+:1076F000504000018F94006827DEFFFF13C0002870
+:10770000269400048E9200003C03080024635DA0D0
+:107710001240FFF70283102B3C04080024845AA473
+:10772000028410230002A8C0000098210A000A3039
+:1077300024110001001188401220002600000000E2
+:1077400002B38021025128240200202110A0FFF959
+:10775000267300010E0009ED0000000000166840CD
+:1077600032EC000101AC20210E0009E402002821C6
+:107770008F89009426F700018FA6003C3AEB0001A8
+:10778000316A00012528FFFF0011382702CAB02105
+:10779000AF88009416E6FFE702479024AE920000FF
+:1077A00002E010218FBF00348FBE00308FB7002C55
+:1077B0008FB600288FB500248FB400208FB3001C33
+:1077C0008FB200188FB100148FB0001003E00008D2
+:1077D00027BD00383C0E080025CE5DA0028E102B80
+:1077E0000A000A1CAE92000027BDFFD8AFB10014FA
+:1077F000AFB00010AFBF0020AFB3001CAFB2001895
+:1078000000A0882110A0001F000480403C13080045
+:1078100026735AA40A000A692412000112200019D2
+:10782000261000010E000A0402002021000231424D
+:107830002444FFA0000618803045001F2C8217A1A9
+:10784000007318212631FFFF1040FFF400B230040E
+:107850008C6900000200202124053FFF01264024FE
+:107860001500FFEE012638250E0009E4AC67000084
+:107870008F8A009426100001254700011620FFE999
+:10788000AF8700948FBF00208FB3001C8FB2001809
+:107890008FB100148FB0001003E0000827BD00284E
+:1078A0008F85009C00805821000040210000482165
+:1078B000240A001F3C0C0800258C5E1C3C0D0800AF
+:1078C00025AD5DA48CA6000050C00014000040212E
+:1078D00000AD1023000238C0240300010A000AA2F0
+:1078E000000020211500000300E41021244820247A
+:1078F0000000482125290001512B00132506DFDC5B
+:10790000106000062484000100C3702415C0FFF538
+:10791000000318400A000AA00000402110AC002615
+:1079200024A3000400602821254AFFFF1540FFE53D
+:10793000AF85009C512B00042506DFDC00004021B0
+:1079400003E00008010010210006614230C5001F5D
+:10795000000C50803C07080024E75DA424040001CB
+:10796000014730211120000F00A420043C0508002D
+:1079700024A55E20148000052529FFFF24C60004ED
+:1079800010C5001100000000240400018CCF00008D
+:107990000004C0270004204001F868241520FFF5EA
+:1079A000ACCD00008F99007801001021032B4823F3
+:1079B00003E00008AF8900783C05080024A55DA419
+:1079C0000A000AAA000040213C06080024C65DA463
+:1079D0000A000AC324040001308800FF24020002C8
+:1079E0001102000A240300031103005C8F8900A424
+:1079F000240400041104005F24050005110500673C
+:107A00000000182103E00008006010218F89004861
+:107A10003C0C0800258C5EE03C04080024845F6078
+:107A2000240300201060000F00005821240D0002E4
+:107A3000240E00033C0F080025EF5EE08D270000B8
+:107A400014E0000B30F9FFFF252900040124C02BAE
+:107A500053000001018048212463FFFF5460FFF8B8
+:107A60008D2700000160182103E00008006010214C
+:107A7000132000323C0500FF30E200FF00403021BF
+:107A80001040004200005021240500010000202188
+:107A90000005C84000A6C02417000003332500FFDE
+:107AA00014A0FFFB24840001012CC023001828C06F
+:107AB00000AA6021008C50213144001F240C0001D9
+:107AC000008C18040003102700E23024110D00413F
+:107AD000AD260000110E004C000A1840110D0036B2
+:107AE0008F87006C510E00568F8C0060240D0004AF
+:107AF000110D005A8F8E0084240E0005150EFFDA3A
+:107B000001601821240B14301140000600001821D8
+:107B10008F8400A024630001006A402B1500FFFD44
+:107B2000016458218F8A0080AF89008C0160182180
+:107B30002549FFFF0A000AFAAF89008000E52024EA
+:107B4000000736021080FFD0240A001800075402F4
+:107B5000314600FF0A000B02240A00103C0C08000A
+:107B6000258C5EA03C04080024845EE00A000AE93B
+:107B7000240300103C0C0800258C5E203C04080007
+:107B800024845EA00A000AE88F89009000071A0288
+:107B9000306600FF0A000B02240A00088F89008C5F
+:107BA0003C0C0800258C5F603C04080024845F7056
+:107BB0000A000AE924030004000A4080250B003073
+:107BC00024E6FFFF01601821AF8900480A000AFA85
+:107BD000AF86006C000AC982001978803C07080053
+:107BE00024E75EA001E72021000A18428C8F0000E4
+:107BF0003079001F032C38040007C02701F86024E7
+:107C00000A000B17AC8C00000003314200062880EC
+:107C100000AF28213062001F8CB8000024630001EF
+:107C2000004CC804000321420019382700041080CA
+:107C300003073024004F20210A000B5BACA6000094
+:107C4000000A68C025AB0032258AFFFF01601821B9
+:107C5000AF8900A40A000AFAAF8A0060254B1030F1
+:107C6000AF8900900160182125C9FFFF0A000AFAB8
+:107C7000AF890084308600072CC200061040001433
+:107C800000000000000640803C030800246357D039
+:107C9000010338218CE4000000800008000000008F
+:107CA0002409000310A9000E00000000240A0005AA
+:107CB00010AA000B00000000240B000110AB00080C
+:107CC000000000008F8C00A010AC00050000000038
+:107CD00003E00008000010210A000A8800A020210B
+:107CE0000A000AD600C0202127BDFFE8308400FF2B
+:107CF000240300021083000BAFBF00102406000312
+:107D00001086003A2408000410880068240E00053C
+:107D1000108E007F2CAF14308FBF001003E00008DE
+:107D200027BD00182CA200301440FFFC8FBF0010AC
+:107D300024A5FFD0000531C2000668803C0708007A
+:107D400024E75EE001A730218CC9000000052882ED
+:107D500030AC001F240B0001018B50048F840048BD
+:107D6000012A4025ACC800008C830000506000014F
+:107D7000AF8600488F98006C30AE000124A6FFFF4C
+:107D8000270F000115C00002AF8F006C24A6000170
+:107D90000006414200082080008718218C790000ED
+:107DA00030C2001F240600010046F804033F3824B7
+:107DB00010E0FFDA8FBF00100005C182001870804C
+:107DC0003C0F080025EF5EA001CF48218D2B00005D
+:107DD0000005684231A5001F00A66004016C502513
+:107DE00027BD001803E00008AD2A00002CA70030D2
+:107DF00014E0FFCA8FBF001030B900071723FFC778
+:107E000024A8FFCE00086A02000D60803C0B080029
+:107E1000256B5EA0018B30218CC40000000828C2B5
+:107E200030AA001F24080001014848048F8200A4E2
+:107E300000891825ACC300008C5F000053E00001EE
+:107E4000AF8600A400057040000E7942000F288024
+:107E50003C04080024845EE000A418218C6B000020
+:107E600025DF000131CD001F001F514201A8600431
+:107E7000016C4825000A1080AC69000000442821EC
+:107E80008CA600008F98006033F9001F8FBF001090
+:107E90000328380400C77825270E000127BD0018E5
+:107EA000ACAF000003E00008AF8E006024A5EFD067
+:107EB0002CB804001300FF998FBF00100005314259
+:107EC000000658803C0A0800254A5E20016A3021DD
+:107ED0008CC4000030A3001F2409000100691004B5
+:107EE0008F9900900082F825ACDF00008F270000FA
+:107EF00050E00001AF8600908F8D00848FBF00108E
+:107F000027BD001825AC000103E00008AF8C0084F9
+:107F100015E0FF828FBF00108F8600A00006104082
+:107F20000046F821001F210003E4C8210019384051
+:107F300024F8143000B8402B1100FF788FBF0010D8
+:107F400024A4EBD00E00020300C0282100027942D5
+:107F5000000F70803C0D080025AD5F6001CD202131
+:107F60008C8B0000304C001F240600010186180491
+:107F70008F89008C01635025AC8A00008D2500009C
+:107F800050A00001AF84008C8F9800808FBF00103C
+:107F900027BD00182708000103E00008AF88008013
+:107FA00030A500072403000310A3001028A200043A
+:107FB00014400008240700022403000410A3001545
+:107FC0002408000510A8000F8F8500A003E000081A
+:107FD0000000000014A7FFFD0080282114C3FFFB50
+:107FE000240400020A000B9A000000002409000586
+:107FF0000080282110C9FFFB2404000303E00008CF
+:108000000000000014C5FFF1008028210A000B9A2F
+:1080100024040005240A00010080282110CAFFF171
+:108020002404000403E000080000000027BDFFE076
+:10803000AFB00010000581C22603FFD024C5003F69
+:108040002C6223D024C6007FAFB20018AFB1001459
+:10805000AFBF001C309100FF000691C200052982CD
+:1080600002002021104000082403FFFF0E000A5ADE
+:108070000000000002002021022028210E000C48F0
+:1080800002403021000018218FBF001C8FB2001861
+:108090008FB100148FB000100060102103E00008C1
+:1080A00027BD002027BDFFD824A2007FAFB3001C4E
+:1080B000AFB20018000299C2309200FF24A3003F23
+:1080C0000240202102602821AFB10014AFB000109F
+:1080D000AFBF00200E000B7D00038982004080218D
+:1080E000004020210220282114400009000018210E
+:1080F0008FBF00208FB3001C8FB200188FB1001407
+:108100008FB000100060102103E0000827BD002898
+:108110000E000A0B00000000004028210200202170
+:108120001051FFF3001019C00E000A5A00000000A1
+:1081300002002021024028210E000C48026030215C
+:108140008FBF00208FB3001C8FB200188FB10014B6
+:108150008FB00010000018210060102103E000081B
+:1081600027BD00283084FFFF30A5FFFF10800007E7
+:10817000000018213082000110400002000420425B
+:10818000006518211480FFFB0005284003E000086B
+:108190000060102110C00007000000008CA2000049
+:1081A00024C6FFFF24A50004AC82000014C0FFFB1E
+:1081B0002484000403E000080000000010A0000870
+:1081C00024A3FFFFAC8600000000000000000000B8
+:1081D0002402FFFF2463FFFF1462FFFA24840004DB
+:1081E00003E000080000000030A5FFFF8F4201B847
+:1081F0000440FFFE3C07601500A730253C0310003B
+:10820000AF440180AF400184AF46018803E000081D
+:10821000AF4301B88F8500D02C8640000080182124
+:108220008CA700840087102B144000100000000071
+:108230008CA800842D06400050C0000F240340008D
+:108240008CAA0084008A482B512000018CA3008452
+:1082500000035A42000B20803C05080024A558204A
+:108260000085182103E000088C62000014C0FFF4B0
+:10827000000000002403400000035A42000B20804D
+:108280003C05080024A558200085182103E00008BB
+:108290008C6200008F8300D0906600D024C500015E
+:1082A000A06500D08F8500D0906400D090A200D24D
+:1082B0001044001700000000936C00788F8B00BC06
+:1082C000318A00FFA16A000C25490001938700C490
+:1082D000312200FF3048007F1107000B00026827A1
+:1082E000A36200788F4E017805C0FFFE8F9900B021
+:1082F000241800023C0F1000AF590140A35801445C
+:1083000003E00008AF4F01780A000D1831A2008089
+:10831000A0A000D00A000D0E000000008F8700D042
+:1083200027BDFFC8AFBF0030AFB7002CAFB60028E5
+:10833000AFB50024AFB40020AFB3001CAFB200183B
+:10834000AFB10014AFB0001094E300E094E200E29B
+:10835000104300D72405FFFF3C047FFF3497FFFF45
+:108360002415FF800A000DFF3C16000E108A00D174
+:108370008FBF00308F9100B03C1808008F18005C50
+:10838000001230C0001291400311702101D57824F1
+:10839000AF4F002C94EC00E231CD007F01BA5821A0
+:1083A000318A7FFF01764821000A804002091021AE
+:1083B000945300003C0808008D0800580246C02174
+:1083C00032733FFF0013198001032021022428216A
+:1083D00030BF007F03FAC82100B5A024AF54002CA1
+:1083E0000336A0218E8700108E8F0030037858212D
+:1083F000256D008800EF7023240C0002AE8E001063
+:10840000AF8D00ACA16C0088976A003C8E84003070
+:108410008F9100AC0E000CE53150FFFF00024B8045
+:10842000020940253C02420001022025AE2400043E
+:108430008E8300048F8D00AC8E860000240E000811
+:10844000ADA3001CADA60018ADA0000CADA000109F
+:10845000929F000A33F900FFA5B900149685000821
+:108460003C1F000CA5A500169298000A331100FFCE
+:10847000A5B100209690000824180005A5B00022A0
+:10848000ADA00024928F000B2410C00031E700FF44
+:10849000A5A70002A1AE00018E8C00308F8B00AC2E
+:1084A0008F8400B0AD6C00083C0A08008D4A00546F
+:1084B0000144482101354024AF4800283C0208000F
+:1084C0008C4200540044302130C3007F007AC82120
+:1084D000033F282102458821AF9100BCAF8500C031
+:1084E000A23800008F8A00BC2403FFBF2418FFDFDE
+:1084F000954F000201F0382400F37025A54E0002CC
+:10850000914D000231AC003F358B0040A14B000281
+:108510008F8600BC8F8900D0ACC000048D28007C01
+:108520003C098000ACC8000890C4000D3082007F78
+:10853000A0C2000D8F8500BC90BF000D03E3C824CE
+:10854000A0B9000D8F9100BC9233000D02789024E9
+:10855000A232000D8E9000348F8B00BCAD700010E5
+:108560008E87002C8E8F003000EF7023AD6E0014CC
+:10857000916D001831AC007FA16C00188F9F00BC7A
+:108580008E8A00308FE8001801572024010930241A
+:1085900000C41025AFE200189283000AA3E3001C78
+:1085A000969900088F8500BC8F9800D0A4B9001E52
+:1085B0008E9000308E8400300E0002038F05008400
+:1085C0008F8500D0000291400002990090AF00BC5E
+:1085D000025388210040302131E7000210E00003FF
+:1085E00002118021000290800212802190B900BC0B
+:1085F0003327000410E000020006F880021F8021EB
+:108600008E9800308F8B00BC24068000330F00034F
+:10861000000F702331CD0003020D6021AD6C00040A
+:1086200094A400E294AA00E294B000E231497FFFF2
+:108630002522000130537FFF0206182400734025D5
+:10864000A4A800E294A400E23C1408008E94006008
+:1086500030917FFF12340022000000000E000D0553
+:10866000000000008F8700D00000282194F300E074
+:1086700094F000E21213000F8FBF003090E900D099
+:1086800090E800D1313200FF310400FF0244302B6A
+:1086900014C0FF36264A000190EE00D2264B00019E
+:1086A00031CD00FF008D6021158BFF338F9100B01D
+:1086B0008FBF00308FB7002C8FB600288FB50024F5
+:1086C0008FB400208FB3001C8FB200188FB100143C
+:1086D0008FB0001000A0102103E0000827BD003873
+:1086E00094A300E200664024A4A800E290A400E263
+:1086F00090B900E2309100FF0011A1C20014F827E8
+:10870000001F39C03332007F024730250A000DF7C1
+:10871000A0A600E23084FFFF30A5FFFFAF440018A1
+:10872000AF45001C03E000088F42001427BDFFB8CE
+:10873000AFB000208F9000D03084FFFFAFA40010B6
+:10874000AFBF0044AFBE0040AFB7003CAFB600388B
+:10875000AFB50034AFB40030AFB3002CAFB20028D7
+:10876000AFB10024A7A00018920600D1920500D056
+:1087700030C400FF30A300FF0064102B1040012222
+:10878000AFA00014920900D08FB50010312800FF6F
+:108790000088382324F4FFFF0014882B0015982B41
+:1087A00002339024524001268FB40014961E00120A
+:1087B000961F00108FB7001003DFC82300171400A6
+:1087C0000019C400000224030018140302E2B02AB6
+:1087D00052C00001004020210284282B10A000027A
+:1087E000008018210280182100033C0000071C03B0
+:1087F0003064FFFF2C86000914C000020060B8211D
+:10880000241700088E0A0008001769808E09000CE2
+:1088100031ABFFFF3C0C0010016C402527520400D7
+:10882000AF4A0038AF9200B8AF49003CAF480030C3
+:108830000000000000000000000000000000000038
+:108840000000000000000000000000000000000028
+:108850008F4F000031EE002011C0FFFD0017982A55
+:10886000027110240A000E920000B02155E00101AF
+:108870009258000131130080126001CF01202021A5
+:108880009655001232A5FFFF0E000CDAA7B50018AE
+:108890008F9000D00291A02326C800018F9100B8CC
+:1088A0000008B4000016B403262C004002D7782A32
+:1088B0000014882B240B00010180902101F1102469
+:1088C000AF8C00B8AFAB0014104001BC8F8900B072
+:1088D0003C0C08008D8C0054240BFF80921E00D0AD
+:1088E00001895021014B2824921900D0AF4500285E
+:1088F0008E4700103C0808008D0800583C180800FE
+:108900008F18005430E33FFF000321800104302121
+:10891000012658212402FF800162F824920C00D025
+:10892000AF5F002C9248000033D100FF333500FFC9
+:108930000309982100117140001578C0326D007F45
+:1089400001CF382101BA2821318300FF3164007F33
+:108950003C0A000C00AA88210367F0210003314083
+:10896000009A10213108003F3C1F000E00D1C021A9
+:10897000005F982127D900882D150008AF9100C00D
+:10898000AF9900ACAF9800BCAF9300B412A0018ABD
+:1089900000008821240E0001010E4004310D005D0D
+:1089A00011A0FFB2310F00028E4A00283C03008064
+:1089B0003C04FFEFAE6A00008E450024A260000A6E
+:1089C0003488FFFFAE6500049247002C3C1FFF9FD8
+:1089D00037FEFFFFA267000C8E62000C3C180040BF
+:1089E000A267000B0043302500C8C824033E88243A
+:1089F0000238A825AE75000C8E490004AE60001840
+:108A00003C0F00FFAE6900148E4D002C35EEFFFFC9
+:108A10008F8B00B001AE6024AE6C00108E47000852
+:108A2000A660000896450012AE6700208E42000C3A
+:108A300030B03FFF00105180AE6200248E5E001403
+:108A4000014B182130A40001AE7E00288E59001879
+:108A5000000331C200044380AE79002C8E51001C0B
+:108A600000C8F821A67F001CAE71003096580002A5
+:108A70008E550020A678001EAE7500349249003352
+:108A80003130000456000005925000008F8C00D059
+:108A90008D8B007CAE6B0030925000008F8F00BC3D
+:108AA000A1F00000924E003331CD000251A000072A
+:108AB000925E00018F8900BC2418FF809131000074
+:108AC0000311A825A1350000925E00018F9900BC1A
+:108AD0002409FFBF240BFFDFA33E00018F9500BCDC
+:108AE00092B8000D3311007FA2B1000D8F8E00BC33
+:108AF00091D0000D02097824A1CF000D8F8800BC11
+:108B00008E6D0014910A000D2DAC0001000C29405F
+:108B1000014B382400E51825A103000D96420012F0
+:108B20008F8800BC8F8700D0A50200028E4500040C
+:108B300090FF00BC30A400030004302330DE0003AB
+:108B400000BE102133F90002172000022444003433
+:108B50002444003090E200BC00A2302430DF000446
+:108B600017E0000224830004008018218F8F00ACDE
+:108B700024090002AD030004A1E90000924E003F69
+:108B80008F8D00ACA1AE00018F9500AC924C003FE0
+:108B90008E440004A6AC0002976B003C0E000CE56E
+:108BA0003170FFFF00025380020A38253C05420065
+:108BB00000E51825AEA300048F8600AC8E4800386F
+:108BC000ACC800188E440034ACC4001CACC0000C0F
+:108BD000ACC00010A4C00014A4C00016A4C00020A3
+:108BE000A4C00022ACC000248E6400145080000198
+:108BF00024040001ACC400080E000D05241100017E
+:108C00000A000E858F9000D0920F00D2920E00D0F5
+:108C10008FB5001031EB00FF31CD00FF008D6023D8
+:108C2000016C50212554FFFF0014882B0015982B50
+:108C3000023390241640FEDD000000008FB40014C3
+:108C40008FBF00448FBE00403A8200018FB7003CC6
+:108C50008FB600388FB500348FB400308FB3002C3E
+:108C60008FB200288FB100248FB0002003E00008ED
+:108C700027BD004833110020122000EE241500010A
+:108C8000921E00BC241F00010000A82133D900015E
+:108C90001320000DAFBF001C8E4400148E0800840A
+:108CA0000088102B14400002008030218E060084C2
+:108CB0008E03006400C3A82B16A0000200C0202170
+:108CC0008E0400640080A8218E4700148E05006485
+:108CD00000E5302B14C0000200E020218E04006467
+:108CE0000095F02313C000048FAC001C240A00027E
+:108CF000AFAA001C8FAC001C028C582B156000A87A
+:108D0000000018218E4F00388E6D000C3C0E008044
+:108D1000AE6F00008E4A00343C10FF9F01AE582514
+:108D2000AE6A00049246003F360CFFFF016C382407
+:108D30003C0500203C03FFEFA266000B00E5102578
+:108D40003468FFFF8F8700B80048F8243C0400080F
+:108D500003E4C825AE79000C8CF80014AE6000184E
+:108D600002BE7821AE7800148CF10018AE71001CA0
+:108D70008CE90008AE6900248CEE000CAE6F002C6C
+:108D8000AE600028AE6E0020A6600038A660003AF3
+:108D90008CED001401B58023021E902312400011B7
+:108DA000AE72001090EA003D8E6500048E640000F3
+:108DB000000A310000A6C821000010210326402B24
+:108DC0000082F82103E8C021AE790004AE780000EB
+:108DD00090F1003DA271000A8F8900B8953200061B
+:108DE000A67200088F9800AC2419000202A020216E
+:108DF000A31900009769003C8F9200AC0E000CE5AF
+:108E00003131FFFF00027B808F8500B8022F68257B
+:108E10003C0E420001AE8025AE5000048F8400ACB1
+:108E20008CAC0038AC8C00188CAB0034AC8B001CC4
+:108E3000AC80000CAC800010A4800014A48000164C
+:108E4000A4800020A4800022AC80002490A7003FD2
+:108E5000A487000212A001342403000153C00002C1
+:108E600090A2003D90A2003E24480001A08800018D
+:108E70008F9F00ACAFF500088F8300D0240700342B
+:108E8000906600BC30C5000250A0000124070030ED
+:108E90008F9200B88F8A00BC906D00BC924B00008E
+:108EA0002412C00032A50003A14B00008F8600B839
+:108EB0008F8800BC2402000490C4000100451823E0
+:108EC00030790003A10400018F8A00BC8F9F00B895
+:108ED00000F538219558000297E9001200F9382171
+:108EE00003128824312F3FFF022F7025A54E000268
+:108EF0009150000231A80004320C003F358B004035
+:108F0000A14B000212A000028F8500BC00E83821AE
+:108F10008F8E00D0ACA70004240BFFBF8DCD007C4A
+:108F20002EA400012403FFDFACAD000890B0000DBB
+:108F300000044140320C007FA0AC000D8F8600BCC5
+:108F400090CA000D014B1024A0C2000D8F8700BCF9
+:108F500090E5000D00A3F82403E8C825A0F9000D52
+:108F60008F9100B88F8D00BC8E380020ADB80010F6
+:108F70008E290024ADA900148E2F0028ADAF001853
+:108F80008E2E002C0E000D05ADAE001C8FB0001C07
+:108F9000240C0002120C00ED8F9000D08FA3001C57
+:108FA00000608821146000020060A8210000A02158
+:108FB00056A0FE390291A0230014882B8FAE00101A
+:108FC000960700103C0A002001D6F02302C7C021FA
+:108FD00033D2FFFFA6180010AFB20010AF4A003026
+:108FE0000000000096170010961300121277008EF2
+:108FF000001641808E16000C8E0F0008000817C363
+:1090000002C8282100A8582B01E2A82102AB182190
+:10901000AE05000CAE0300088FB300100013B82B90
+:10902000023780241200FF058F9000D00A000E4BFB
+:10903000000000008E480038A6600008240F0003DE
+:10904000AE6800008E4C0034A260000A8F9000B819
+:10905000AE6C00043C050080920B003FA26F000C38
+:109060008E62000C3C11FF9FA26B000B004568252F
+:109070003623FFFF3C04FFEF8F8C00B801A33024A0
+:10908000349FFFFF00DFC824AE79000C8D890014E7
+:10909000959E00128F9800B0AE6900108D8E00145E
+:1090A000AE600018AE600020AE6E0014AE6000240A
+:1090B0008D87001833CE3FFF000E5180AE67002829
+:1090C0008D8800080158902133D00001AE6800302F
+:1090D0008D91000C8F8D00AC001259C200107B8066
+:1090E000016F282124020002A665001CA66000363C
+:1090F000AE71002CA1A200009763003C8F9800ACD9
+:109100003C044200307FFFFF03E43025AF0600043B
+:109110008F9900B824070001240BC0008F3300385A
+:1091200024060034AF1300188F290034AF09001C47
+:10913000AF00000CAF000010A7000014A70000163D
+:10914000A7000020A7000022AF000024A7150002FE
+:10915000A30700018F8A00AC8F9E00B88F8C00BCE3
+:10916000AD55000893C80000A18800008F9200B898
+:109170008F8F00BC92500001A1F000018F8400BCD1
+:1091800094910002022B282400AE1025A482000234
+:10919000908D000231A3003FA08300028F8300D096
+:1091A0008F8400BC907F00BC33F30002526000014A
+:1091B00024060030AC8600048C65007C240DFFBFC3
+:1091C00002A08821AC8500089082000D3043007F0A
+:1091D000A083000D8F8600BC90C4000D008DF82484
+:1091E000A0DF000D8F8E00BC91D9000D3729002023
+:1091F000A1C9000D8F9E00B88F9300BC8FC70020BF
+:10920000AE6700108FD80024AE7800148FCA0028F3
+:10921000AE6A00188FD2002C0E000D05AE72001C35
+:109220000A00104C8F9000D0960200148E040004A7
+:109230003043FFFF000368C0008DF821AF5F003CA2
+:109240008E1900048F46003C032648231920003C59
+:10925000000000008E05000024A200013C0B00105D
+:1092600035750008AF420038AF55003000000000EF
+:1092700000000000000000000000000000000000EE
+:109280000000000000000000000000008F4C000003
+:10929000318F002011E0FFFD000000008F5304001B
+:1092A0003C080020AE1300088F570404AE17000CD2
+:1092B000AF480030000000003C0608008CC60044A7
+:1092C0002416000110D600BB000000009619001201
+:1092D0003C0508008CA5004000B94821A6090012F1
+:1092E000960E001425C70001A60700149618001456
+:1092F0003304FFFF5486FF498FB30010A60000140B
+:109300000E000E2530A5FFFF3C0408008C840024CD
+:10931000961F00120044682303ED3023A6060012B6
+:109320000A0010678FB30010A08300018F8200AC89
+:1093300024040001AC4400080A000FFF8F8300D012
+:109340008E0200000A0010F83C0B00108F9F00C036
+:109350008FB8001C920F00D0920B00D0920D00D05D
+:1093600031F100FF316E00FF000E28C000111140E6
+:109370000045182131A600FF036350210006C940B3
+:10938000033F382125490088AF8900ACAF8700BC76
+:10939000A15800889768003C03C020218F9100AC41
+:1093A0000E000CE53110FFFF00026380020C7825EF
+:1093B0003C0442008F8C00B801E45825AE2B000419
+:1093C0008D9100388F8B00AC00006821000D1100DA
+:1093D000AD7100188D8E00343C087FFF3504FFFF0F
+:1093E000AD6E001C9183003E8D65001C8D790018C8
+:1093F000000331000003870200A6C0210050F825B9
+:109400000306482B033F382100E95021AD78001CAA
+:10941000AD6A0018AD60000CAD600010918F003E89
+:109420002405000503C45024A56F00149591000481
+:1094300003C02021A5710016918E003EA56E00206C
+:10944000958D0004A56D0022AD6000249190003F31
+:10945000A57000029182003D24430001A163000138
+:109460008F8600AC8F9F00BCACDE0008A3E5000037
+:109470008F9000BC8F9900B82405FFBF96070002AB
+:10948000973800120247782433093FFF01E9882505
+:10949000A6110002921200022418FFDF324E003F94
+:1094A00035CD0040A20D00028F8600BC8F8C00D00D
+:1094B0002412FFFFACC000048D8B007C3C0C8000AC
+:1094C000ACCB000890C2000D3043007FA0C3000D5C
+:1094D0008F8700BC90FF000D03E5C824A0F9000DA4
+:1094E0008F9100BC9229000D01387824A22F000D25
+:1094F0008F9000BCAE120010AE150014920E001832
+:109500002415FF8002AE6825A20D00188F8500BCCF
+:109510008F8300B88CAB0018016C1024004A3025F2
+:10952000ACA600189068003EA0A8001C8F9F00B851
+:109530008F8700BC8F9800D097F90004A4F9001E13
+:109540000E0002038F0500848F8600D00002794050
+:109550000002490090D200BC01E988210040282186
+:109560003255000212A0000303D120210002A8807E
+:109570000095202190CC00BC3192000412400003E1
+:1095800033C900030005408000882021241900040D
+:109590008F9E00BC0329382330F800030098502127
+:1095A000AFCA00040E000D05A66500380A0010477A
+:1095B0008F9000D0960A00123C1E08008FDE002417
+:1095C00003CA9021A61200120A0010678FB3001080
+:1095D00027BDFFE03C1808008F180050AFB0001006
+:1095E000AFBF0018AFB10014AF8400B09371007426
+:1095F000030478212410FF8031EE007F3225007FA4
+:1096000001F0582401DA68213C0C000AA38500C44B
+:1096100001AC2821AF4B002494A9001097680006E4
+:1096200090A6006200803821240200300109202326
+:1096300030C300F0AF8500D0106200193090FFFFFA
+:1096400090AE0062240DFFF0240A005001AE6024A9
+:10965000318B00FF116A002F000000001600000788
+:10966000241F0C00AF5F00248FB100148FBF0018BF
+:109670008FB0001003E0000827BD00200E000E2B65
+:1096800002002021241F0C00AF5F00248FB10014C2
+:109690008FBF00188FB0001003E0000827BD002026
+:1096A00094A200E094A400E290BF01130082182667
+:1096B0003079FFFF33E700C014E000092F310001CB
+:1096C00016000038000000005620FFE6241F0C00A2
+:1096D0000E000D27000000000A0011F9241F0C00E5
+:1096E0001620FFDE000000000E000D270000000025
+:1096F0001440FFDC241F0C00160000228F8300D0D2
+:10970000906901133122003FA06201130A0011F990
+:10971000241F0C0094AF00D48F8600D400E02821D1
+:10972000240400050E000C6B31F0FFFF144000050F
+:1097300024030003979100E6000018212625FFFF6F
+:10974000A78500E68F5801B80700FFFE3C1960139B
+:10975000AF400180241F0C00AF50018400793825F0
+:109760003C101000AF4701888FB10014AF5001B812
+:10977000AF5F00248FB000108FBF001803E0000817
+:1097800027BD00200E000E2B020020215040FFB507
+:10979000241F0C008F8300D0906901130A0012224D
+:1097A0003122003F0E000E2B020020211440FFAD9D
+:1097B000241F0C00122000078F8300D09068011333
+:1097C0003106003F34C20040A06201130A0011F9C3
+:1097D000241F0C000E000D27000000005040FFA1C8
+:1097E000241F0C008F8300D0906801133106003FC6
+:1097F0000A00125234C20040AF9B00C803E00008C8
+:10980000AF8000EC3089FFFF000940422D0200418B
+:10981000000929801440000200095040240800403B
+:10982000000879400008C0C001F85821256701A848
+:1098300000EF702125CC007F240DFF80018D1824BE
+:109840000065302100CA282125640088240A008888
+:109850003C010800AC2A004C3C010800AC2400503C
+:10986000AF8500D43C010800AC2900603C01080031
+:10987000AC2800643C010800AC2700543C010800FF
+:10988000AC2300583C010800AC26005C03E0000853
+:1098900000000000308300FF30C6FFFF30E400FF0F
+:1098A0008F4201B80440FFFE00034C00012438251C
+:1098B0003C08600000E820253C031000AF45018013
+:1098C000AF460184AF44018803E00008AF4301B80C
+:1098D0008F86001C3C096012352700108CCB0004D9
+:1098E0003C0C600E35850010316A00062D480001E1
+:1098F000ACE800C48CC40004ACA431808CC2000865
+:1099000094C30002ACA2318403E00008A78300E402
+:109910003C0308008C6300508F8400E88F86001C95
+:109920002402FF800064C0210302C824AF5900282C
+:109930008CCD00043305007F00BA78213C0E000C6A
+:1099400001EE2821ACAD00588CC80008AF8500D0CE
+:109950003C076012ACA8005C8CCC001034E800100E
+:10996000ACAC000C8CCB000CACAB000894AA00147F
+:109970003C0208008C42004425490001A4A90014BF
+:1099800094A400143083FFFF106200178F8400D06E
+:109990003C0A08008D4A0040A4AA00128CCE001890
+:1099A000AC8E00248CCD0014AC8D00208CC7001828
+:1099B000AC87002C8CCC001424060001AC8C002851
+:1099C0008D0B00BC5166001A8D0200B48D0200B8E8
+:1099D000A482003A948F003AA48F003C948800D46B
+:1099E00003E000083102FFFF3C0908008D29002434
+:1099F000A4A000148F8400D0A4A900128CCE00185B
+:109A0000AC8E00248CCD0014AC8D00208CC70018C7
+:109A1000AC87002C8CCC001424060001AC8C0028F0
+:109A20008D0B00BC5566FFEA8D0200B88D0200B4B4
+:109A3000A482003A948F003AA48F003C948800D40A
+:109A400003E000083102FFFF8F86001C3C0C080079
+:109A50008D8C0050240BFF808CCD00083C03000C43
+:109A6000000D51C0018A4021010B4824AF8A00E853
+:109A7000AF49002890C700073105007F00BA1021C8
+:109A80000043282130E400041080002FAF8500D06F
+:109A900090CF000731EE000811C0003C000000002C
+:109AA0008CD9000C8CC400140324C02B1300002696
+:109AB000000000008CC2000CACA200648CCD001829
+:109AC0002402FFF8ACAD00688CCC0010ACAC008078
+:109AD0008CCB000CACAB00848CCA001CACAA007C04
+:109AE00090A900BC01224024A0A800BC90C300079C
+:109AF0003067000810E000048F8500D090AF00BCF4
+:109B000035EE0001A0AE00BC90D90007333800014B
+:109B10001300000F8F8400D024070020908200BC27
+:109B200034490002A08900BC8F8400D09088006274
+:109B3000310300F014670006240A0034AC8A00C028
+:109B40000A001334000000000A00130E8CC2001437
+:109B500090CB00073166000210C000050000000035
+:109B6000908D00BC35AC0004A08C00BC8F8400D06C
+:109B700090980113330F003FA08F01138F8E00D0F8
+:109B800095C500D403E0000830A2FFFFACA000643C
+:109B90000A00130F0000000027BDFFD8AFB000106F
+:109BA0008F90001CAFBF0024AFB40020AFB20018EC
+:109BB000AFB10014AFB3001C9613000E3C07600A4F
+:109BC0003C1460063264FFFF369300100E001261F1
+:109BD00034F404108F8400D43C11600E0E0009AAE6
+:109BE00036310010920E00153C0708008CE700602B
+:109BF0003C12601231CD000FA38D00F08E0E0004D8
+:109C00008E0D000896080012961F00109619001A73
+:109C10009618001E960F001C310CFFFF33EBFFFF60
+:109C2000332AFFFF3309FFFF31E6FFFF3C01080045
+:109C3000AC2B00403C010800AC2C00243C01080087
+:109C4000AC2A0044AE293178AE26317C9202001550
+:109C50009603001636520010304400FF3065FFFFB7
+:109C60003C0608008CC60064AE243188AE4500B4C2
+:109C70009208001496190018241F0001011FC00447
+:109C8000332FFFFF3C0508008CA50058AE5800B8E4
+:109C9000AE4F00BC920C0014AF8E00D8AF8D00DC2C
+:109CA000318B00FFAE4B00C0920A0015AE67004832
+:109CB000AE66004C314900FFAE4900C8AE65007C7D
+:109CC0003C0308008C6300503C0408008C84004C6A
+:109CD0003C0808008D0800543C0208008C42005CDF
+:109CE0008FBF0024AE6300808FB00010AE8300747D
+:109CF0008FB3001CAE22319CAE4200DCAE2731A0F7
+:109D0000AE2631A4AE24318CAE233190AE283194EE
+:109D1000AE253198AE870050AE860054AE850070F7
+:109D20008FB10014AE4700E0AE4600E4AE4400CC74
+:109D3000AE4300D0AE4800D4AE4500D88FB400206A
+:109D40008FB2001803E0000827BD002827BDFFE000
+:109D5000AFB10014AFBF0018241100010E00085469
+:109D6000AFB0001010510005978400E6978300CC37
+:109D70000083102B144000088F8500D424070002B4
+:109D80008FBF00188FB100148FB0001000E01021B9
+:109D900003E0000827BD00200E000C892404000504
+:109DA000AF8200E81040FFF6240700020E000858BA
+:109DB0008F90001C979F00E68F9900E88F8D00C858
+:109DC00027EF0001240E0050AF590020A78F00E6B6
+:109DD000A1AE00003C0C08008D8C00648F8600C88A
+:109DE000240A8000000C5E00ACCB0074A4C0000606
+:109DF00094C9000A241FFF803C0D000C012AC024D6
+:109E0000A4D8000A90C8000A24182000011F1825B1
+:109E1000A0C3000A8F8700C8A0E000788F8500C823
+:109E200000003821A0A000833C0208008C420050B2
+:109E30008F8400E80044782101FFC824AF5900282E
+:109E4000960B000231EE007F01DA6021018D302196
+:109E5000A4CB00D4960A0002AF8600D03C0E0004CA
+:109E600025492401A4C900E68E080004ACC80004FA
+:109E70008E030008ACC30000A4C00010A4C00014EE
+:109E8000A0C000D08F8500D02403FFBFA0A000D1C8
+:109E90003C0408008C8400648F8200D0A04400D26F
+:109EA0008E1F000C8F8A00D0978F00E4AD5F001CDE
+:109EB0008E19001024100030AD590018A540003054
+:109EC000A5510054A5510056A54F0016AD4E00688F
+:109ED000AD580080AD580084914D006231AC000F48
+:109EE000358B0010A14B00628F8600D090C90063B3
+:109EF0003128007FA0C800638F8400D02406FFFFB4
+:109F00009085006300A31024A08200638F9100D08D
+:109F100000E01021923F00BC37F90001A23900BCDB
+:109F20008F8A00D0938F00F0AD580064AD5000C010
+:109F3000914E00D3000F690031CC000F018D5825E0
+:109F4000A14B00D38F8500D08F8900DCACA900E83D
+:109F50008F8800D88FBF00188FB100148FB0001009
+:109F600027BD0020ACA800ECA4A600D6A4A000E069
+:109F7000A4A000E203E000080000000027BDFFE00D
+:109F8000AFB000108F90001CAFB10014AFBF00182D
+:109F90008E1900043C1808008F180050240FFF8011
+:109FA000001989C00238702131CD007F01CF6024B3
+:109FB00001BA50213C0B000CAF4C0028014B402152
+:109FC000950900D4950400D68E0700043131FFFFB7
+:109FD000AF8800D00E000922000721C08E060004C1
+:109FE0008F8300C8000629C0AF4500209064003E62
+:109FF00030820040144000068F8400D0341FFFFFE1
+:10A00000948300D63062FFFF145F0004000000005C
+:10A01000948400D60E0008B73084FFFF8E0500043C
+:10A02000022030218FBF00188FB100148FB00010B4
+:10A030002404002200003821000529C00A001285EE
+:10A0400027BD002027BDFFE0AFB100143091FFFF16
+:10A05000AFB00010AFBF00181220001D000080211B
+:10A060008F86001C8CC500002403000600053F02FB
+:10A070000005140230E4000714830015304500FF8A
+:10A080002CA800061100004D000558803C0C08006B
+:10A09000258C57E8016C50218D49000001200008F3
+:10A0A000000000008F8E00EC240D000111CD00593E
+:10A0B00000000000260B00013170FFFF24CA0020C1
+:10A0C0000211202B014030211480FFE6AF8A001CD2
+:10A0D000020010218FBF00188FB100148FB0001044
+:10A0E00003E0000827BD0020938700CE14E000386D
+:10A0F000240400140E001346000000008F86001C8C
+:10A10000240200010A00148DAF8200EC8F8900EC5C
+:10A11000240800021128003B240400130000282119
+:10A1200000003021240700010E001285000000000D
+:10A130000A00148D8F86001C8F8700EC2405000216
+:10A1400014E5FFF6240400120E0012F200000000D5
+:10A150008F8500E800403021240400120E00128593
+:10A16000000038210A00148D8F86001C8F8300ECBC
+:10A17000241F0003147FFFD0260B00010E0012A441
+:10A18000000000008F8500E800403021240200021A
+:10A190002404001000003821AF8200EC0E0012856C
+:10A1A000000000000A00148D8F86001C8F8F00ECC9
+:10A1B0002406000211E6000B000000002404001039
+:10A1C00000002821000030210A0014AA2407000101
+:10A1D000000028210E001285000030210A00148D95
+:10A1E0008F86001C0E0013B3000000001440001204
+:10A1F0008F99001C8F86001C240200030A00148D16
+:10A20000AF8200EC0E00143F000000000A00148D25
+:10A210008F86001C0E001294000000002402000231
+:10A2200024040014000028210000302100003821FF
+:10A230000A0014C7AF8200EC00403821240400104B
+:10A2400097380002000028210E0012853306FFFF18
+:10A250000A00148D8F86001C8F8400C83C077FFF86
+:10A2600034E6FFFF8C8500742402000100A6182448
+:10A27000AC83007403E00008A082000510A0003643
+:10A280002CA20080274A04003C0B00052409008012
+:10A29000104000072408008030A6000F00C54021B0
+:10A2A0002D0300811460000200A0482124080080D2
+:10A2B000AF4B003000000000000000000000000074
+:10A2C0001100000900003821014030218C8D000070
+:10A2D00024E7000400E8602BACCD000024840004D7
+:10A2E0001580FFFA24C600040000000000000000F2
+:10A2F000000000003C0E0006010E3825AF4700307C
+:10A300000000000000000000000000008F4F00006F
+:10A3100031E800101100FFFD000000008F42003CFA
+:10A320008F43003C0049C8210323C02B13000004C5
+:10A33000000000008F4C003825860001AF46003831
+:10A340008F47003C00A9282300E96821AF4D003C5D
+:10A3500014A0FFCE2CA2008003E000080000000043
+:10A3600027BDFFD03C020002AFB100143C11000C2D
+:10A37000AF450038AFB3001CAF46003C00809821C9
+:10A38000AF42003024050088AF440028035120214B
+:10A39000AFBF0028AFB50024AFB40020AFB20018A3
+:10A3A0000E0014FFAFB000103C1F08008FFF004CE0
+:10A3B0003C1808008F1800642410FF8003F3A821C4
+:10A3C00032B9007F02B078240018A0C0033A70218F
+:10A3D0000018914001D12021AF4F00280E0014FF3A
+:10A3E000025428213C0D08008DAD005024050120A9
+:10A3F00001B35821316C007F01705024019A48212B
+:10A40000013120210E0014FFAF4A00283C0808004B
+:10A410008D0800543C0508008CA500640113382108
+:10A4200030E6007F00F0182400DA2021009120217E
+:10A43000AF4300280E0014FF000529403C0208002D
+:10A440008C4200583C1008008E1000601200001C66
+:10A45000005388212415FF800A0015823C14000C4B
+:10A460003226007F0235182400DA202102402821FC
+:10A47000AF430028009420210E0014FF2610FFC0D7
+:10A480001200000F023288212E05004110A0FFF4B7
+:10A49000241210003226007F00109180023518240B
+:10A4A00000DA202102402821AF4300280094202117
+:10A4B0000E0014FF000080211600FFF302328821F5
+:10A4C0003C0B08008D6B005C240AFF802405000211
+:10A4D00001734021010A4824AF4900283C040800C8
+:10A4E000948400623110007F021A88213C07000C1E
+:10A4F0000E000CB90227982100402821026020217B
+:10A500008FBF00288FB500248FB400208FB3001CAC
+:10A510008FB200188FB100148FB000100A0014FF22
+:10A5200027BD00308F83001C8C62000410400003A4
+:10A530000000000003E00008000000008C64001030
+:0CA540008C6500080A0015388C66000CC1
+:04A54C00000000000B
+:10A550000000001B0000000F0000000A00000008BF
+:10A5600000000006000000050000000500000004D7
+:10A5700000000004000000030000000300000003CE
+:10A5800000000003000000030000000200000002C1
+:10A5900000000002000000020000000200000002B3
+:10A5A00000000002000000020000000200000002A3
+:10A5B0000000000200000002000000020000000293
+:10A5C0000000000200000001000000010000000186
+:10A5D00008000F3008000D8808000FC40800106C38
+:10A5E00008000F5808000F98080011A408000DA4D7
+:10A5F000080011C808000DF4080014980800144061
+:10A6000008000DA408000DA408000DA408001254B1
+:10A610000800125408000DA408000DA4080016E05C
+:10A6200008000DA408000DA408000DA408000DA446
+:10A63000080013D408000DA408000DA408000DA400
+:10A6400008000DA408000DA408000DA408000DA426
+:10A6500008000DA408000DA408000DA408000DA416
+:10A6600008000DA408000DA408000DA408000FB8F0
+:10A6700008000DA408000DA40800169008000DA401
+:10A6800008000DA408000DA408000DA408000DA4E6
+:10A6900008000DA408000DA408000DA408000DA4D6
+:10A6A00008000DA408000DA408000DA408000DA4C6
+:10A6B00008000DA408000DA408000DA408000DA4B6
+:10A6C000080015BC08000DA408000DA408001348DC
+:10A6D000080012B808002E5008002E5808002E203E
+:10A6E00008002E2C08002E3808002E440800532C99
+:10A6F000080052EC080052B80800528C080052685A
+:04A7000008005224D7
+:0CA704000A000C760000000000000000BD
+:10A710000000000D727870342E362E3136000000A5
+:10A72000040610030000000000000001000000000B
+:10A730000000000000000000000000000000000019
+:10A740000000000000000000000000000000000009
+:10A7500000000000000000000000000000000000F9
+:10A7600000000000000000000000000000000000E9
+:10A7700000000000000000000000000000000000D9
+:10A7800000000000000000000000000000000000C9
+:10A7900000000000000000000000000000000000B9
+:10A7A00000000000000000000000000000000000A9
+:10A7B0000000000000000000000000000000000099
+:10A7C0000000000000000000000000000000000089
+:10A7D0000000000000000000000000000000000079
+:10A7E0000000000000000000000000000000000069
+:10A7F0000000000000000000000000000000000059
+:10A800000000000000000000000000000000000048
+:10A810000000000000000000000000000000000038
+:10A820000000000000000000000000000000000028
+:10A830000000000000000000000000000000000018
+:10A840000000000000000000000000000000000008
+:10A8500000000000000000000000000000000000F8
+:10A8600000000000000000000000000000000000E8
+:10A8700000000000000000000000000000000000D8
+:10A8800000000000000000000000000000000000C8
+:10A8900000000000000000000000000000000000B8
+:10A8A00000000000000000000000000000000000A8
+:10A8B0000000000000000000000000000000000098
+:10A8C0000000000000000000000000000000000088
+:10A8D0000000000000000000000000000000000078
+:10A8E0000000000000000000000000000000000068
+:10A8F0000000000000000000000000000000000058
+:10A900000000000000000000000000000000000047
+:10A910000000000000000000000000000000000037
+:10A920000000000000000000000000000000000027
+:10A930000000000000000000000000000000000017
+:10A940000000000000000000000000000000000007
+:10A9500000000000000000000000000000000000F7
+:10A9600000000000000000000000000000000000E7
+:10A9700000000000000000000000000000000000D7
+:10A9800000000000000000000000000000000000C7
+:10A9900000000000000000000000000000000000B7
+:10A9A00000000000000000000000000000000000A7
+:10A9B0000000000000000000000000000000000097
+:10A9C0000000000000000000000000000000000087
+:10A9D0000000000000000000000000000000000077
+:10A9E0000000000000000000000000000000000067
+:10A9F0000000000000000000000000000000000057
+:10AA00000000000000000000000000000000000046
+:10AA10000000000000000000000000000000000036
+:10AA20000000000000000000000000000000000026
+:10AA30000000000000000000000000000000000016
+:10AA40000000000000000000000000000000000006
+:10AA500000000000000000000000000000000000F6
+:10AA600000000000000000000000000000000000E6
+:10AA700000000000000000000000000000000000D6
+:10AA800000000000000000000000000000000000C6
+:10AA900000000000000000000000000000000000B6
+:10AAA00000000000000000000000000000000000A6
+:10AAB0000000000000000000000000000000000096
+:10AAC0000000000000000000000000000000000086
+:10AAD0000000000000000000000000000000000076
+:10AAE0000000000000000000000000000000000066
+:10AAF0000000000000000000000000000000000056
+:10AB00000000000000000000000000000000000045
+:10AB10000000000000000000000000000000000035
+:10AB20000000000000000000000000000000000025
+:10AB30000000000000000000000000000000000015
+:10AB40000000000000000000000000000000000005
+:10AB500000000000000000000000000000000000F5
+:10AB600000000000000000000000000000000000E5
+:10AB700000000000000000000000000000000000D5
+:10AB800000000000000000000000000000000000C5
+:10AB900000000000000000000000000000000000B5
+:10ABA00000000000000000000000000000000000A5
+:10ABB0000000000000000000000000000000000095
+:10ABC0000000000000000000000000000000000085
+:10ABD0000000000000000000000000000000000075
+:10ABE0000000000000000000000000000000000065
+:10ABF0000000000000000000000000000000000055
+:10AC00000000000000000000000000000000000044
+:10AC10000000000000000000000000000000000034
+:10AC20000000000000000000000000000000000024
+:10AC30000000000000000000000000000000000014
+:10AC40000000000000000000000000000000000004
+:10AC500000000000000000000000000000000000F4
+:10AC600000000000000000000000000000000000E4
+:10AC700000000000000000000000000000000000D4
+:10AC800000000000000000000000000000000000C4
+:10AC900000000000000000000000000000000000B4
+:10ACA00000000000000000000000000000000000A4
+:10ACB0000000000000000000000000000000000094
+:10ACC0000000000000000000000000000000000084
+:10ACD0000000000000000000000000000000000074
+:10ACE0000000000000000000000000000000000064
+:10ACF0000000000000000000000000000000000054
+:10AD00000000000000000000000000000000000043
+:10AD10000000000000000000000000000000000033
+:10AD20000000000000000000000000000000000023
+:10AD30000000000000000000000000000000000013
+:10AD40000000000000000000000000000000000003
+:10AD500000000000000000000000000000000000F3
+:10AD600000000000000000000000000000000000E3
+:10AD700000000000000000000000000000000000D3
+:10AD800000000000000000000000000000000000C3
+:10AD900000000000000000000000000000000000B3
+:10ADA00000000000000000000000000000000000A3
+:10ADB0000000000000000000000000000000000093
+:10ADC0000000000000000000000000000000000083
+:10ADD0000000000000000000000000000000000073
+:10ADE0000000000000000000000000000000000063
+:10ADF0000000000000000000000000000000000053
+:10AE00000000000000000000000000000000000042
+:10AE10000000000000000000000000000000000032
+:10AE20000000000000000000000000000000000022
+:10AE30000000000000000000000000000000000012
+:10AE40000000000000000000000000000000000002
+:10AE500000000000000000000000000000000000F2
+:10AE600000000000000000000000000000000000E2
+:10AE700000000000000000000000000000000000D2
+:10AE800000000000000000000000000000000000C2
+:10AE900000000000000000000000000000000000B2
+:10AEA00000000000000000000000000000000000A2
+:10AEB0000000000000000000000000000000000092
+:10AEC0000000000000000000000000000000000082
+:10AED0000000000000000000000000000000000072
+:10AEE0000000000000000000000000000000000062
+:10AEF0000000000000000000000000000000000052
+:10AF00000000000000000000000000000000000041
+:10AF10000000000000000000000000000000000031
+:10AF20000000000000000000000000000000000021
+:10AF30000000000000000000000000000000000011
+:10AF40000000000000000000000000000000000001
+:10AF500000000000000000000000000000000000F1
+:10AF600000000000000000000000000000000000E1
+:10AF700000000000000000000000000000000000D1
+:10AF800000000000000000000000000000000000C1
+:10AF900000000000000000000000000000000000B1
+:10AFA00000000000000000000000000000000000A1
+:10AFB0000000000000000000000000000000000091
+:10AFC0000000000000000000000000000000000081
+:10AFD0000000000000000000000000000000000071
+:10AFE0000000000000000000000000000000000061
+:10AFF0000000000000000000000000000000000051
+:10B000000000000000000000000000000000000040
+:10B010000000000000000000000000000000000030
+:10B020000000000000000000000000000000000020
+:10B030000000000000000000000000000000000010
+:10B040000000000000000000000000000000000000
+:10B0500000000000000000000000000000000000F0
+:10B0600000000000000000000000000000000000E0
+:10B0700000000000000000000000000000000000D0
+:10B0800000000000000000000000000000000000C0
+:10B0900000000000000000000000000000000000B0
+:10B0A00000000000000000000000000000000000A0
+:10B0B0000000000000000000000000000000000090
+:10B0C0000000000000000000000000000000000080
+:10B0D0000000000000000000000000000000000070
+:10B0E0000000000000000000000000000000000060
+:10B0F0000000000000000000000000000000000050
+:10B10000000000000000000000000000000000003F
+:10B11000000000000000000000000000000000002F
+:10B12000000000000000000000000000000000001F
+:10B13000000000000000000000000000000000000F
+:10B1400000000000000000000000000000000000FF
+:10B1500000000000000000000000000000000000EF
+:10B1600000000000000000000000000000000000DF
+:10B1700000000000000000000000000000000000CF
+:10B1800000000000000000000000000000000000BF
+:10B1900000000000000000000000000000000000AF
+:10B1A000000000000000000000000000000000009F
+:10B1B000000000000000000000000000000000008F
+:10B1C000000000000000000000000000000000007F
+:10B1D000000000000000000000000000000000006F
+:10B1E000000000000000000000000000000000005F
+:10B1F000000000000000000000000000000000004F
+:10B20000000000000000000000000000000000003E
+:10B21000000000000000000000000000000000002E
+:10B22000000000000000000000000000000000001E
+:10B23000000000000000000000000000000000000E
+:10B2400000000000000000000000000000000000FE
+:10B2500000000000000000000000000000000000EE
+:10B2600000000000000000000000000000000000DE
+:10B2700000000000000000000000000000000000CE
+:10B2800000000000000000000000000000000000BE
+:10B2900000000000000000000000000000000000AE
+:10B2A000000000000000000000000000000000009E
+:10B2B000000000000000000000000000000000008E
+:10B2C000000000000000000000000000000000007E
+:10B2D000000000000000000000000000000000006E
+:10B2E000000000000000000000000000000000005E
+:10B2F000000000000000000000000000000000004E
+:10B30000000000000000000000000000000000003D
+:10B31000000000000000000000000000000000002D
+:10B32000000000000000000000000000000000001D
+:10B33000000000000000000000000000000000000D
+:10B3400000000000000000000000000000000000FD
+:10B3500000000000000000000000000000000000ED
+:10B3600000000000000000000000000000000000DD
+:10B3700000000000000000000000000000000000CD
+:10B3800000000000000000000000000000000000BD
+:10B3900000000000000000000000000000000000AD
+:10B3A000000000000000000000000000000000009D
+:10B3B000000000000000000000000000000000008D
+:10B3C000000000000000000000000000000000007D
+:10B3D000000000000000000000000000000000006D
+:10B3E000000000000000000000000000000000005D
+:10B3F000000000000000000000000000000000004D
+:10B40000000000000000000000000000000000003C
+:10B41000000000000000000000000000000000002C
+:10B42000000000000000000000000000000000001C
+:10B43000000000000000000000000000000000000C
+:10B4400000000000000000000000000000000000FC
+:10B4500000000000000000000000000000000000EC
+:10B4600000000000000000000000000000000000DC
+:10B4700000000000000000000000000000000000CC
+:10B4800000000000000000000000000000000000BC
+:10B4900000000000000000000000000000000000AC
+:10B4A000000000000000000000000000000000009C
+:10B4B000000000000000000000000000000000008C
+:10B4C000000000000000000000000000000000007C
+:10B4D000000000000000000000000000000000006C
+:10B4E000000000000000000000000000000000005C
+:10B4F000000000000000000000000000000000004C
+:10B50000000000000000000000000000000000003B
+:10B51000000000000000000000000000000000002B
+:10B52000000000000000000000000000000000001B
+:10B53000000000000000000000000000000000000B
+:10B5400000000000000000000000000000000000FB
+:10B5500000000000000000000000000000000000EB
+:10B5600000000000000000000000000000000000DB
+:10B5700000000000000000000000000000000000CB
+:10B5800000000000000000000000000000000000BB
+:10B5900000000000000000000000000000000000AB
+:10B5A000000000000000000000000000000000009B
+:10B5B000000000000000000000000000000000008B
+:10B5C000000000000000000000000000000000007B
+:10B5D000000000000000000000000000000000006B
+:10B5E000000000000000000000000000000000005B
+:10B5F000000000000000000000000000000000004B
+:10B60000000000000000000000000000000000003A
+:10B61000000000000000000000000000000000002A
+:10B62000000000000000000000000000000000001A
+:10B63000000000000000000000000000000000000A
+:10B6400000000000000000000000000000000000FA
+:10B6500000000000000000000000000000000000EA
+:10B6600000000000000000000000000000000000DA
+:10B6700000000000000000000000000000000000CA
+:10B6800000000000000000000000000000000000BA
+:10B6900000000000000000000000000000000000AA
+:10B6A000000000000000000000000000000000009A
+:10B6B000000000000000000000000000000000008A
+:10B6C000000000000000000000000000000000007A
+:10B6D000000000000000000000000000000000006A
+:10B6E000000000000000000000000000000000005A
+:10B6F000000000000000000000000000000000004A
+:10B700000000000000000000000000000000000039
+:10B710000000000000000000000000000000000029
+:10B720000000000000000000000000000000000019
+:10B730000000000000000000000000000000000009
+:10B7400000000000000000000000000000000000F9
+:10B7500000000000000000000000000000000000E9
+:10B7600000000000000000000000000000000000D9
+:10B7700000000000000000000000000000000000C9
+:10B7800000000000000000000000000000000000B9
+:10B7900000000000000000000000000000000000A9
+:10B7A0000000000000000000000000000000000099
+:10B7B0000000000000000000000000000000000089
+:10B7C0000000000000000000000000000000000079
+:10B7D0000000000000000000000000000000000069
+:10B7E0000000000000000000000000000000000059
+:10B7F0000000000000000000000000000000000049
+:10B800000000000000000000000000000000000038
+:10B810000000000000000000000000000000000028
+:10B820000000000000000000000000000000000018
+:10B830000000000000000000000000000000000008
+:10B8400000000000000000000000000000000000F8
+:10B8500000000000000000000000000000000000E8
+:10B8600000000000000000000000000000000000D8
+:10B8700000000000000000000000000000000000C8
+:10B8800000000000000000000000000000000000B8
+:10B8900000000000000000000000000000000000A8
+:10B8A0000000000000000000000000000000000098
+:10B8B0000000000000000000000000000000000088
+:10B8C0000000000000000000000000000000000078
+:10B8D0000000000000000000000000000000000068
+:10B8E0000000000000000000000000000000000058
+:10B8F0000000000000000000000000000000000048
+:10B900000000000000000000000000000000000037
+:10B910000000000000000000000000000000000027
+:10B920000000000000000000000000000000000017
+:10B930000000000000000000000000000000000007
+:10B9400000000000000000000000000000000000F7
+:10B9500000000000000000000000000000000000E7
+:10B9600000000000000000000000000000000000D7
+:10B9700000000000000000000000000000000000C7
+:10B9800000000000000000000000000000000000B7
+:10B9900000000000000000000000000000000000A7
+:10B9A0000000000000000000000000000000000097
+:10B9B0000000000000000000000000000000000087
+:10B9C0000000000000000000000000000000000077
+:10B9D0000000000000000000000000000000000067
+:10B9E0000000000000000000000000000000000057
+:10B9F0000000000000000000000000000000000047
+:10BA00000000000000000000000000000000000036
+:10BA10000000000000000000000000000000000026
+:10BA20000000000000000000000000000000000016
+:10BA30000000000000000000000000000000000006
+:10BA400000000000000000000000000000000000F6
+:10BA500000000000000000000000000000000000E6
+:10BA600000000000000000000000000000000000D6
+:10BA700000000000000000000000000000000000C6
+:10BA800000000000000000000000000000000000B6
+:10BA900000000000000000000000000000000000A6
+:10BAA0000000000000000000000000000000000096
+:10BAB0000000000000000000000000000000000086
+:10BAC0000000000000000000000000000000000076
+:10BAD0000000000000000000000000000000000066
+:10BAE0000000000000000000000000000000000056
+:10BAF0000000000000000000000000000000000046
+:10BB00000000000000000000000000000000000035
+:10BB10000000000000000000000000000000000025
+:10BB20000000000000000000000000000000000015
+:10BB30000000000000000000000000000000000005
+:10BB400000000000000000000000000000000000F5
+:10BB500000000000000000000000000000000000E5
+:10BB600000000000000000000000000000000000D5
+:10BB700000000000000000000000000000000000C5
+:10BB800000000000000000000000000000000000B5
+:10BB900000000000000000000000000000000000A5
+:10BBA0000000000000000000000000000000000095
+:10BBB0000000000000000000000000000000000085
+:10BBC0000000000000000000000000000000000075
+:10BBD0000000000000000000000000000000000065
+:10BBE0000000000000000000000000000000000055
+:10BBF0000000000000000000000000000000000045
+:10BC00000000000000000000000000000000000034
+:10BC10000000000000000000000000000000000024
+:10BC20000000000000000000000000000000000014
+:10BC30000000000000000000000000000000000004
+:10BC400000000000000000000000000000000000F4
+:10BC500000000000000000000000000000000000E4
+:10BC600000000000000000000000000000000000D4
+:10BC700000000000000000000000000000000000C4
+:10BC800000000000000000000000000000000000B4
+:10BC900000000000000000000000000000000000A4
+:10BCA0000000000000000000000000000000000094
+:10BCB0000000000000000000000000000000000084
+:10BCC0000000000000000000000000000000000074
+:10BCD0000000000000000000000000000000000064
+:10BCE0000000000000000000000000000000000054
+:10BCF0000000000000000000000000000000000044
+:10BD00000000000000000000000000000000000033
+:10BD10000000000000000000000000000000000023
+:10BD20000000000000000000000000000000000013
+:10BD30000000000000000000000000000000000003
+:10BD400000000000000000000000000000000000F3
+:10BD500000000000000000000000000000000000E3
+:10BD600000000000000000000000000000000000D3
+:10BD700000000000000000000000000000000000C3
+:10BD800000000000000000000000000000000000B3
+:10BD900000000000000000000000000000000000A3
+:10BDA0000000000000000000000000000000000093
+:10BDB0000000000000000000000000000000000083
+:10BDC0000000000000000000000000000000000073
+:10BDD0000000000000000000000000000000000063
+:10BDE0000000000000000000000000000000000053
+:10BDF0000000000000000000000000000000000043
+:10BE00000000000000000000000000000000000032
+:10BE10000000000000000000000000000000000022
+:10BE20000000000000000000000000000000000012
+:10BE30000000000000000000000000000000000002
+:10BE400000000000000000000000000000000000F2
+:10BE500000000000000000000000000000000000E2
+:10BE600000000000000000000000000000000000D2
+:10BE700000000000000000000000000000000000C2
+:10BE800000000000000000000000000000000000B2
+:10BE900000000000000000000000000000000000A2
+:10BEA0000000000000000000000000000000000092
+:10BEB0000000000000000000000000000000000082
+:10BEC0000000000000000000000000000000000072
+:10BED0000000000000000000000000000000000062
+:10BEE0000000000000000000000000000000000052
+:10BEF0000000000000000000000000000000000042
+:10BF00000000000000000000000000000000000031
+:10BF10000000000000000000000000000000000021
+:10BF20000000000000000000000000000000000011
+:10BF30000000000000000000000000000000000001
+:10BF400000000000000000000000000000000000F1
+:10BF500000000000000000000000000000000000E1
+:10BF600000000000000000000000000000000000D1
+:10BF700000000000000000000000000000000000C1
+:10BF800000000000000000000000000000000000B1
+:10BF900000000000000000000000000000000000A1
+:10BFA0000000000000000000000000000000000091
+:10BFB0000000000000000000000000000000000081
+:10BFC0000000000000000000000000000000000071
+:10BFD0000000000000000000000000000000000061
+:10BFE0000000000000000000000000000000000051
+:10BFF0000000000000000000000000000000000041
+:10C000000000000000000000000000000000000030
+:10C010000000000000000000000000000000000020
+:10C020000000000000000000000000000000000010
+:10C030000000000000000000000000000000000000
+:10C0400000000000000000000000000000000000F0
+:10C0500000000000000000000000000000000000E0
+:10C0600000000000000000000000000000000000D0
+:10C0700000000000000000000000000000000000C0
+:10C0800000000000000000000000000000000000B0
+:10C0900000000000000000000000000000000000A0
+:10C0A0000000000000000000000000000000000090
+:10C0B0000000000000000000000000000000000080
+:10C0C0000000000000000000000000000000000070
+:10C0D0000000000000000000000000000000000060
+:10C0E0000000000000000000000000000000000050
+:10C0F0000000000000000000000000000000000040
+:10C10000000000000000000000000000000000002F
+:10C11000000000000000000000000000000000001F
+:10C12000000000000000000000000000000000000F
+:10C1300000000000000000000000000000000000FF
+:10C1400000000000000000000000000000000000EF
+:10C1500000000000000000000000000000000000DF
+:10C1600000000000000000000000000000000000CF
+:10C1700000000000000000000000000000000000BF
+:10C1800000000000000000000000000000000000AF
+:10C19000000000000000000000000000000000009F
+:10C1A000000000000000000000000000000000008F
+:10C1B000000000000000000000000000000000007F
+:10C1C000000000000000000000000000000000006F
+:10C1D000000000000000000000000000000000005F
+:10C1E000000000000000000000000000000000004F
+:10C1F000000000000000000000000000000000003F
+:10C20000000000000000000000000000000000002E
+:10C21000000000000000000000000000000000001E
+:10C22000000000000000000000000000000000000E
+:10C2300000000000000000000000000000000000FE
+:10C2400000000000000000000000000000000000EE
+:10C2500000000000000000000000000000000000DE
+:10C2600000000000000000000000000000000000CE
+:10C2700000000000000000000000000000000000BE
+:10C2800000000000000000000000000000000000AE
+:10C29000000000000000000000000000000000009E
+:10C2A000000000000000000000000000000000008E
+:10C2B000000000000000000000000000000000007E
+:10C2C000000000000000000000000000000000006E
+:10C2D000000000000000000000000000000000005E
+:10C2E000000000000000000000000000000000004E
+:10C2F000000000000000000000000000000000003E
+:10C30000000000000000000000000000000000002D
+:10C31000000000000000000000000000000000001D
+:10C32000000000000000000000000000000000000D
+:10C3300000000000000000000000000000000000FD
+:10C3400000000000000000000000000000000000ED
+:10C3500000000000000000000000000000000000DD
+:10C3600000000000000000000000000000000000CD
+:10C3700000000000000000000000000000000000BD
+:10C3800000000000000000000000000000000000AD
+:10C39000000000000000000000000000000000009D
+:10C3A000000000000000000000000000000000008D
+:10C3B000000000000000000000000000000000007D
+:10C3C000000000000000000000000000000000006D
+:10C3D000000000000000000000000000000000005D
+:10C3E000000000000000000000000000000000004D
+:10C3F000000000000000000000000000000000003D
+:10C40000000000000000000000000000000000002C
+:10C41000000000000000000000000000000000001C
+:10C42000000000000000000000000000000000000C
+:10C4300000000000000000000000000000000000FC
+:10C4400000000000000000000000000000000000EC
+:10C4500000000000000000000000000000000000DC
+:10C4600000000000000000000000000000000000CC
+:10C4700000000000000000000000000000000000BC
+:10C4800000000000000000000000000000000000AC
+:10C49000000000000000000000000000000000009C
+:10C4A000000000000000000000000000000000008C
+:10C4B000000000000000000000000000000000007C
+:10C4C000000000000000000000000000000000006C
+:10C4D000000000000000000000000000000000005C
+:10C4E000000000000000000000000000000000004C
+:10C4F000000000000000000000000000000000003C
+:10C50000000000000000000000000000000000002B
+:10C51000000000000000000000000000000000001B
+:10C52000000000000000000000000000000000000B
+:10C5300000000000000000000000000000000000FB
+:10C5400000000000000000000000000000000000EB
+:10C5500000000000000000000000000000000000DB
+:10C5600000000000000000000000000000000000CB
+:10C5700000000000000000000000000000000000BB
+:10C5800000000000000000000000000000000000AB
+:10C59000000000000000000000000000000000009B
+:10C5A000000000000000000000000000000000008B
+:10C5B000000000000000000000000000000000007B
+:10C5C000000000000000000000000000000000006B
+:10C5D000000000000000000000000000000000005B
+:10C5E000000000000000000000000000000000004B
+:10C5F000000000000000000000000000000000003B
+:10C60000000000000000000000000000000000002A
+:10C61000000000000000000000000000000000001A
+:10C62000000000000000000000000000000000000A
+:10C6300000000000000000000000000000000000FA
+:10C6400000000000000000000000000000000000EA
+:10C6500000000000000000000000000000000000DA
+:10C6600000000000000000000000000000000000CA
+:10C6700000000000000000000000000000000000BA
+:10C6800000000000000000000000000000000000AA
+:10C69000000000000000000000000000000000009A
+:10C6A000000000000000000000000000000000008A
+:10C6B000000000000000000000000000000000007A
+:10C6C000000000000000000000000000000000006A
+:10C6D000000000000000000000000000000000005A
+:10C6E000000000000000000000000000000000004A
+:10C6F000000000000000000000000000000000003A
+:10C700000000000000000000000000000000000029
+:10C710000000000000000000000000000000000019
+:10C720000000000000000000000000000000000009
+:10C7300000000000000000000000000000000000F9
+:10C7400000000000000000000000000000000000E9
+:10C7500000000000000000000000000000000000D9
+:10C7600000000000000000000000000000000000C9
+:10C7700000000000000000000000000000000000B9
+:10C7800000000000000000000000000000000000A9
+:10C790000000000000000000000000000000000099
+:10C7A0000000000000000000000000000000000089
+:10C7B0000000000000000000000000000000000079
+:10C7C0000000000000000000000000000000000069
+:10C7D0000000000000000000000000000000000059
+:10C7E0000000000000000000000000000000000049
+:10C7F0000000000000000000000000000000000039
+:10C800000000000000000000000000000000000028
+:10C810000000000000000000000000000000000018
+:10C820000000000000000000000000000000000008
+:10C8300000000000000000000000000000000000F8
+:10C8400000000000000000000000000000000000E8
+:10C8500000000000000000000000000000000000D8
+:10C8600000000000000000000000000000000000C8
+:10C8700000000000000000000000000000000000B8
+:10C8800000000000000000000000000000000000A8
+:10C890000000000000000000000000000000000098
+:10C8A0000000000000000000000000000000000088
+:10C8B0000000000000000000000000000000000078
+:10C8C0000000000000000000000000000000000068
+:10C8D0000000000000000000000000000000000058
+:10C8E0000000000000000000000000000000000048
+:10C8F0000000000000000000000000000000000038
+:10C900000000000000000000000000000000000027
+:10C910000000000000000000000000000000000017
+:10C920000000000000000000000000000000000007
+:10C9300000000000000000000000000000000000F7
+:10C9400000000000000000000000000000000000E7
+:10C9500000000000000000000000000000000000D7
+:10C9600000000000000000000000000000000000C7
+:10C9700000000000000000000000000000000000B7
+:10C9800000000000000000000000000000000000A7
+:10C990000000000000000000000000000000000097
+:10C9A0000000000000000000000000000000000087
+:10C9B0000000000000000000000000000000000077
+:10C9C0000000000000000000000000000000000067
+:10C9D0000000000000000000000000000000000057
+:10C9E0000000000000000000000000000000000047
+:10C9F0000000000000000000000000000000000037
+:10CA00000000000000000000000000000000000026
+:10CA10000000000000000000000000000000000016
+:10CA20000000000000000000000000000000000006
+:10CA300000000000000000000000000000000000F6
+:10CA400000000000000000000000000000000000E6
+:10CA500000000000000000000000000000000000D6
+:10CA600000000000000000000000000000000000C6
+:10CA700000000000000000000000000000000000B6
+:10CA800000000000000000000000000000000000A6
+:10CA90000000000000000000000000000000000096
+:10CAA0000000000000000000000000000000000086
+:10CAB0000000000000000000000000000000000076
+:10CAC0000000000000000000000000000000000066
+:10CAD0000000000000000000000000000000000056
+:10CAE0000000000000000000000000000000000046
+:10CAF0000000000000000000000000000000000036
+:10CB00000000000000000000000000000000000025
+:10CB10000000000000000000000000000000000015
+:10CB20000000000000000000000000000000000005
+:10CB300000000000000000000000000000000000F5
+:10CB400000000000000000000000000000000000E5
+:10CB500000000000000000000000000000000000D5
+:10CB600000000000000000000000000000000000C5
+:10CB700000000000000000000000000000000000B5
+:10CB800000000000000000000000000000000000A5
+:10CB90000000000000000000000000000000000095
+:10CBA0000000000000000000000000000000000085
+:10CBB0000000000000000000000000000000000075
+:10CBC0000000000000000000000000000000000065
+:10CBD0000000000000000000000000000000000055
+:10CBE0000000000000000000000000000000000045
+:10CBF0000000000000000000000000000000000035
+:10CC00000000000000000000000000000000000024
+:10CC10000000000000000000000000000000000014
+:10CC20000000000000000000000000000000000004
+:10CC300000000000000000000000000000000000F4
+:10CC400000000000000000000000000000000000E4
+:10CC500000000000000000000000000000000000D4
+:10CC600000000000000000000000000000000000C4
+:10CC700000000000000000000000000000000000B4
+:10CC800000000000000000000000000000000000A4
+:10CC90000000000000000000000000000000000094
+:10CCA0000000000000000000000000000000000084
+:10CCB0000000000000000000000000000000000074
+:10CCC0000000000000000000000000000000000064
+:10CCD0000000000000000000000000000000000054
+:10CCE0000000000000000000000000000000000044
+:10CCF0000000000000000000000000000000000034
+:10CD00000000000000000000000000000000000023
+:10CD10000000000000000000000000000000000013
+:10CD20000000000000000000000000000000000003
+:10CD300000000000000000000000000000000000F3
+:10CD400000000000000000000000000000000000E3
+:10CD500000000000000000000000000000000000D3
+:10CD600000000000000000000000000000000000C3
+:10CD700000000000000000000000000000000000B3
+:10CD800000000000000000000000000000000000A3
+:10CD90000000000000000000000000000000000093
+:10CDA0000000000000000000000000000000000083
+:10CDB0000000000000000000000000000000000073
+:10CDC0000000000000000000000000000000000063
+:10CDD0000000000000000000000000000000000053
+:10CDE0000000000000000000000000000000000043
+:10CDF0000000000000000000000000000000000033
+:10CE00000000000000000000000000000000000022
+:10CE10000000000000000000000000000000000012
+:10CE20000000000000000000000000000000000002
+:10CE300000000000000000000000000000000000F2
+:10CE400000000000000000000000000000000000E2
+:10CE500000000000000000000000000000000000D2
+:10CE600000000000000000000000000000000000C2
+:10CE700000000000000000000000000000000000B2
+:10CE800000000000000000000000000000000000A2
+:10CE90000000000000000000000000000000000092
+:10CEA0000000000000000000000000000000000082
+:10CEB0000000000000000000000000000000000072
+:10CEC0000000000000000000000000000000000062
+:10CED0000000000000000000000000000000000052
+:10CEE0000000000000000000000000000000000042
+:10CEF0000000000000000000000000000000000032
+:10CF00000000000000000000000000000000000021
+:10CF10000000000000000000000000000000000011
+:10CF20000000000000000000000000000000000001
+:10CF300000000000000000000000000000000000F1
+:10CF400000000000000000000000000000000000E1
+:10CF500000000000000000000000000000000000D1
+:10CF600000000000000000000000000000000000C1
+:10CF700000000000000000000000000000000000B1
+:10CF800000000000000000000000000000000000A1
+:10CF90000000000000000000000000000000000091
+:10CFA0000000000000000000000000000000000081
+:10CFB0000000000000000000000000000000000071
+:10CFC0000000000000000000000000000000000061
+:10CFD0000000000000000000000000000000000051
+:10CFE0000000000000000000000000000000000041
+:10CFF0000000000000000000000000000000000031
+:10D000000000000000000000000000000000000020
+:10D010000000000000000000000000000000000010
+:10D020000000000000000000000000000000000000
+:10D0300000000000000000000000000000000000F0
+:10D0400000000000000000000000000000000000E0
+:10D0500000000000000000000000000000000000D0
+:10D0600000000000000000000000000000000000C0
+:10D0700000000000000000000000000000000000B0
+:10D0800000000000000000000000000000000000A0
+:10D090000000000000000000000000000000000090
+:10D0A0000000000000000000000000000000000080
+:10D0B0000000000000000000000000000000000070
+:10D0C0000000000000000000000000000000000060
+:10D0D0000000000000000000000000000000000050
+:10D0E0000000000000000000000000000000000040
+:10D0F0000000000000000000000000000000000030
+:10D10000000000000000000000000000000000001F
+:10D11000000000000000000000000000000000000F
+:10D1200000000000000000000000000000000000FF
+:10D1300000000000000000000000000000000000EF
+:10D1400000000000000000000000000000000000DF
+:10D1500000000000000000000000000000000000CF
+:10D1600000000000000000000000000000000000BF
+:10D1700000000000000000000000000000000000AF
+:10D18000000000000000000000000000000000009F
+:10D19000000000000000000000000000000000008F
+:10D1A000000000000000000000000000000000007F
+:10D1B000000000000000000000000000000000006F
+:10D1C000000000000000000000000000000000005F
+:10D1D000000000000000000000000000000000004F
+:10D1E000000000000000000000000000000000003F
+:10D1F000000000000000000000000000000000002F
+:10D20000000000000000000000000000000000001E
+:10D21000000000000000000000000000000000000E
+:10D2200000000000000000000000000000000000FE
+:10D2300000000000000000000000000000000000EE
+:10D2400000000000000000000000000000000000DE
+:10D2500000000000000000000000000000000000CE
+:10D2600000000000000000000000000000000000BE
+:10D2700000000000000000000000000000000000AE
+:10D28000000000000000000000000000000000009E
+:10D29000000000000000000000000000000000008E
+:10D2A000000000000000000000000000000000007E
+:10D2B000000000000000000000000000000000006E
+:10D2C000000000000000000000000000000000005E
+:10D2D000000000000000000000000000000000004E
+:10D2E000000000000000000000000000000000003E
+:10D2F000000000000000000000000000000000002E
+:10D30000000000000000000000000000000000001D
+:10D31000000000000000000000000000000000000D
+:10D3200000000000000000000000000000000000FD
+:10D3300000000000000000000000000000000000ED
+:10D3400000000000000000000000000000000000DD
+:10D3500000000000000000000000000000000000CD
+:10D3600000000000000000000000000000000000BD
+:10D3700000000000000000000000000000000000AD
+:10D38000000000000000000000000000000000009D
+:10D39000000000000000000000000000000000008D
+:10D3A000000000000000000000000000000000007D
+:10D3B000000000000000000000000000000000006D
+:10D3C000000000000000000000000000000000005D
+:10D3D000000000000000000000000000000000004D
+:10D3E000000000000000000000000000000000003D
+:10D3F000000000000000000000000000000000002D
+:10D40000000000000000000000000000000000001C
+:10D41000000000000000000000000000000000000C
+:10D4200000000000000000000000000000000000FC
+:10D4300000000000000000000000000000000000EC
+:10D4400000000000000000000000000000000000DC
+:10D4500000000000000000000000000000000000CC
+:10D4600000000000000000000000000000000000BC
+:10D4700000000000000000000000000000000000AC
+:10D48000000000000000000000000000000000009C
+:10D49000000000000000000000000000000000008C
+:10D4A000000000000000000000000000000000007C
+:10D4B000000000000000000000000000000000006C
+:10D4C000000000000000000000000000000000005C
+:10D4D000000000000000000000000000000000004C
+:10D4E000000000000000000000000000000000003C
+:10D4F000000000000000000000000000000000002C
+:10D50000000000000000000000000000000000001B
+:10D51000000000000000000000000000000000000B
+:10D5200000000000000000000000000000000000FB
+:10D5300000000000000000000000000000000000EB
+:10D5400000000000000000000000000000000000DB
+:10D5500000000000000000000000000000000000CB
+:10D5600000000000000000000000000000000000BB
+:10D5700000000000000000000000000000000000AB
+:10D58000000000000000000000000000000000009B
+:10D59000000000000000000000000000000000008B
+:10D5A000000000000000000000000000000000007B
+:10D5B000000000000000000000000000000000006B
+:10D5C000000000000000000000000000000000005B
+:10D5D000000000000000000000000000000000004B
+:10D5E000000000000000000000000000000000003B
+:10D5F000000000000000000000000000000000002B
+:10D60000000000000000000000000000000000001A
+:10D61000000000000000000000000000000000000A
+:10D6200000000000000000000000000000000000FA
+:10D6300000000000000000000000000000000000EA
+:10D6400000000000000000000000000000000000DA
+:10D6500000000000000000000000000000000000CA
+:10D6600000000000000000000000000000000000BA
+:10D6700000000000000000000000000000000000AA
+:10D68000000000000000000000000000000000009A
+:10D69000000000000000000000000000000000008A
+:10D6A000000000000000000000000000000000007A
+:10D6B000000000000000000000000000000000006A
+:10D6C000000000000000000000000000000000005A
+:10D6D000000000000000000000000000000000004A
+:10D6E000000000000000000000000000000000003A
+:10D6F000000000000000000000000000000000002A
+:10D700000000000000000000000000000000000019
+:10D710000000000000000000000000000000000009
+:10D7200000000000000000000000000000000000F9
+:10D7300000000000000000000000000000000000E9
+:10D7400000000000000000000000000000000000D9
+:10D7500000000000000000000000000000000000C9
+:10D7600000000000000000000000000000000000B9
+:10D7700000000000000000000000000000000000A9
+:10D780000000000000000000000000000000000099
+:10D790000000000000000000000000000000000089
+:10D7A0000000000000000000000000000000000079
+:10D7B0000000000000000000000000000000000069
+:10D7C0000000000000000000000000000000000059
+:10D7D0000000000000000000000000000000000049
+:10D7E0000000000000000000000000000000000039
+:10D7F0000000000000000000000000000000000029
+:10D800000000000000000000000000000000000018
+:10D810000000000000000000000000000000000008
+:10D8200000000000000000000000000000000000F8
+:10D8300000000000000000000000000000000000E8
+:10D8400000000000000000000000000000000000D8
+:10D8500000000000000000000000000000000000C8
+:10D8600000000000000000000000000000000000B8
+:10D8700000000000000000000000000000000000A8
+:10D880000000000000000000000000000000000098
+:10D890000000000000000000000000000000000088
+:10D8A0000000000000000000000000000000000078
+:10D8B0000000000000000000000000000000000068
+:10D8C0000000000000000000000000000000000058
+:10D8D0000000000000000000000000000000000048
+:10D8E00010000003000000000000000D0000000D0B
+:10D8F0003C020800244271203C030800246375C8E0
+:10D90000AC4000000043202B1480FFFD24420004A3
+:10D910003C1D080037BD7FFC03A0F0213C1008002F
+:10D92000261031D83C1C0800279C71200E00116481
+:10D93000000000000000000D30A5FFFF30C600FF12
+:10D94000274301808F4201B80440FFFE24020002F9
+:10D95000AC640000A4650008A066000AA062000B89
+:10D960003C021000AC67001803E00008AF4201B8A9
+:10D970003C0360008C624FF80440FFFE3C02020052
+:10D98000AC644FC0AC624FC43C02100003E000081E
+:10D99000AC624FF827BDFFE8AFBF0014AFB0001076
+:10D9A0000E0011B300808021936200052403FFFE66
+:10D9B00002002021004310248FBF00148FB00010FC
+:10D9C000A36200050A0011BC27BD001827BDFFE8AF
+:10D9D000AFB00010AFBF00140E000EA40080802175
+:10D9E0009362000024030050304200FF14430004FF
+:10D9F00024020100AF4201800A000CC10200202174
+:10DA0000AF400180020020218FBF00148FB00010B2
+:10DA10000A000F7D27BD001827BDFF98AFBE00602C
+:10DA2000AFB7005CAFB20048AFBF0064AFB60058FC
+:10DA3000AFB50054AFB40050AFB3004CAFB1004429
+:10DA4000AFB000408F5001289363003F9362000500
+:10DA50000000F021307200FF000210273042000168
+:10DA60000000B82114400066AFA0003893420116B0
+:10DA700093430112304200FF306300FF0342202134
+:10DA800003431021244540008F82000010400018FD
+:10DA9000248840008F4201043C030001004310240D
+:10DAA00010400013000000008CA3000C8F620030B7
+:10DAB000146201A2240200018CA300108F62002CCA
+:10DAC0001462019E240200019762003A9483400090
+:10DAD0003042FFFF1462019924020001976200386E
+:10DAE000950300023042FFFF1462019424020001FA
+:10DAF00093620000304300FF240200201062000502
+:10DB00002402005010620006000000000A000D0B05
+:10DB1000000000000000000D0A000D14AFA000304E
+:10DB20003C1E080027DE71880A000D14AFA00030EB
+:10DB30003C0208008C4200DC244200013C01080049
+:10DB4000AC2200DC0E00127D000000000A000E8FE7
+:10DB50008FBF00648F4201043C0300209113000D2D
+:10DB6000004310240002202B00042140AFA4003009
+:10DB70008F4301043C02004000621824146000023C
+:10DB8000348700400080382132620020AFA7003087
+:10DB90001440000234E6008000E0302110C0000B89
+:10DBA000AFA6003093C500088F67004C020020210B
+:10DBB00000052B0034A5008130A5F0810E000C8DEE
+:10DBC00030C600FF0A000E8C000000009362003E89
+:10DBD000304200401040000E24020004564200066D
+:10DBE00024020012020020210E0013DA010030216D
+:10DBF0000A000E8F8FBF006416420005000000006F
+:10DC00000E000CB2000020210A000E8F8FBF0064AE
+:10DC10009742011A9504000E9363003532650004A3
+:10DC20003055FFFF00642004AFA4003C8D110004B8
+:10DC300010A000158D1400089362003E3042004091
+:10DC400010400007000000000E00133B02202021BE
+:10DC50001040000D000000000A000E8C00000000C3
+:10DC60008F620044022210230440013200000000B1
+:10DC70008F620048022210230441012E2404001662
+:10DC80000A000DA28FC200048F62004802221023F6
+:10DC900004400008000000003C0208008C423100F3
+:10DCA000244200013C010800AC2231000A000E8130
+:10DCB000000000008F62004002221023184000097B
+:10DCC0002402000C3C0208008C423100327300FC3C
+:10DCD0000000A821244200013C010800AC223100D0
+:10DCE0002402000CAFA200308F62004000511823C4
+:10DCF0001860000D02A3102A144001030000000068
+:10DD00001475000602A310233A620001304200019C
+:10DD1000144000FD0000000002A31023022388210C
+:10DD20000A000D8A3055FFFF000018213262000200
+:10DD30001040001A326200109362003E30420040F0
+:10DD4000504000118FC200040E0011B302002021C8
+:10DD500024020018A362003F936200052403FFFE23
+:10DD600002002021004310240E0011BCA362000514
+:10DD700024040039000028210E0013242406001872
+:10DD80000A000E8E24020001240400170040F80946
+:10DD9000000000000A000E8E24020001104000E581
+:10DDA000000000008F64004C8F6200540282102338
+:10DDB0001C4000E002841023044200010080A021E6
+:10DDC000AFA30018AFB10010AFB50014934201200B
+:10DDD0008F6600409764003C304200FF03422821D8
+:10DDE0008FA2003C00A328218FA300303084FFFFC6
+:10DDF0000044202B8FC200000064182524A5400099
+:10DE0000AFA50020AFA60028AFA30030AFA6002426
+:10DE1000AFA0002CAFB400340040F80927A40010D4
+:10DE20008FA200303042000254400001327300FEE5
+:10DE30009362003E30420040104000378FA3001430
+:10DE40008F6200541682001A32620001240200140C
+:10DE5000124200102A42001510400006240200164B
+:10DE60002402000C12420007326200010A000DEB8E
+:10DE70000000000012420005326200010A000DEBB2
+:10DE8000000000000A000DE62417000E0A000DE64F
+:10DE9000241700100A000DEA2417001293620023D1
+:10DEA0002403FFBD00431024A3620023326200015B
+:10DEB000104000198FA300142402000C1242000E1F
+:10DEC0002A42000D104000062402000E2402000A1F
+:10DED000124200078FA200240A000E032442000110
+:10DEE000124200088FA200240A000E0324420001FF
+:10DEF0000A000E01241700082402000E16E2000298
+:10DF000024170016241700108FA2002424420001B9
+:10DF1000AFA200248FA300148FA200248F760040AC
+:10DF200000431021AF6200408FA2003C9364003692
+:10DF30008F630040028290213402FFFF00821004B0
+:10DF400000621821AF6300488FA6003030C200087D
+:10DF50001040000E000000008F62005816420004BE
+:10DF600030C600FF9742011A5040000134C600102D
+:10DF700093C500088FA700340200202100052B0064
+:10DF800034A500800E000C8D30A5F0808F6200401B
+:10DF900000561023184000178FA200183C020800FA
+:10DFA0008C423198304200101040000924020001D8
+:10DFB000976200681440000624020001A76200680E
+:10DFC0009742007A2442000A0A000E47A762001214
+:10DFD000A76200120E0011B3020020219362007D9F
+:10DFE0002403000102002021344200010A000E45F2
+:10DFF000AFA300381840000A000000000E0011B363
+:10E00000020020219362007D2403000102002021F0
+:10E01000AFA30038344200040E0011BCA362007D9F
+:10E020009362003E304200401440000C3262000116
+:10E030001040000A000000008F6300408FC20004FF
+:10E0400024040018246300010040F809AF63004075
+:10E050008FA200300A000E8E304200048F620058FA
+:10E0600010520010000000008F62001802221023DE
+:10E070001C400008240200018F62001816220009CB
+:10E08000000000008F62001C028210230440000583
+:10E0900024020001AF720058AFA20038AF7100181F
+:10E0A000AF74001C12E0000B8FA300380E0011B3F8
+:10E0B00002002021A377003F0E0011BC02002021A6
+:10E0C00002E03021240400370E0013240000282130
+:10E0D0008FA3003810600003000000000E000C9BAE
+:10E0E0000200202112A00005000018218FA200309C
+:10E0F0003042000450400011006010212403000150
+:10E100000A000E8E006010210E0011B302002021C3
+:10E110009362007D02002021344200040E0011BCF5
+:10E12000A362007D0E000C9B020020210A000E8ECF
+:10E1300024020001AF400044240200018FBF0064AC
+:10E140008FBE00608FB7005C8FB600588FB500544B
+:10E150008FB400508FB3004C8FB200488FB1004491
+:10E160008FB0004003E0000827BD00688C870004E2
+:10E170008C8600000000102100E5382100E5282BE6
+:10E1800000C2302100C53021AC87000403E0000844
+:10E19000AC8600008F4201B80440FFFE2402080054
+:10E1A000AF4201B803E00008000000003C02000894
+:10E1B0000342282194A200483084FFFF1040001B36
+:10E1C0002484001294A200483042FFFF0044102A29
+:10E1D00010400017240200032402001A9343012078
+:10E1E000A342018B8F820008306300FF3042400061
+:10E1F000104000092463FFFE94A200483042FFFF54
+:10E200000043102B144000058F820014A743019493
+:10E210000A000EC8344200018F8200142403FFFE5E
+:10E220000043102403E00008AF820014240200031E
+:10E2300003E00008A342018B27BDFFE0AFB2001846
+:10E24000AFB10014AFB00010AFBF001C30B1FFFF82
+:10E2500030D0FFFF30F2FFFF8F4201B80440FFFED5
+:10E2600000000000AF440180AF4400200E000EAA61
+:10E27000020020218F8300088F840014A751018C95
+:10E28000A750018EA74301908F8300043082800045
+:10E29000AF4301A8A75201881040000E8F820014DE
+:10E2A00093420116304200FC24420004005A10211F
+:10E2B0008C4240003042FFFF144000068F82001461
+:10E2C0003C02FFFF34427FFF00821024AF82001423
+:10E2D0008F8200142403BFFF00431024A74201A62D
+:10E2E0009743010C8F42010400031C003042FFFFE2
+:10E2F00000621825AF4301AC3C021000AF4201B8E8
+:10E300008FBF001C8FB200188FB100148FB00010A7
+:10E3100003E0000827BD002027BDFFE0AFB20018D2
+:10E3200030D2FFFFAF440180AF44002002402021E3
+:10E33000AFB10014AFB0001030F1FFFFAFBF001C51
+:10E340000E000EAA30B0FFFF8F8300142402BFFF1F
+:10E35000A750018C006218248F820008A752018EFA
+:10E36000A7510188A74301A6A74201903C021000D3
+:10E37000AF4201B88FBF001C8FB200188FB10014DC
+:10E380008FB0001003E0000827BD00202743018064
+:10E390008F4201B80440FFFE24022000A46200085E
+:10E3A00024020002A062000BA46000103C021000D6
+:10E3B000AF4201B803E00008000000008F47007082
+:10E3C000934201128F83000827BDFFF0304200FF07
+:10E3D000000228823062010000003021104000431A
+:10E3E00024A400033062400010400010306220007E
+:10E3F00000041080005A10218C43400024A4000423
+:10E4000000041080AFA30000005A10218C4240008D
+:10E41000AFA2000493420116304200FC005A1021C2
+:10E420008C4240000A000F56AFA200081040002F97
+:10E430000000302100041080005A10218C4340005D
+:10E4400024A4000400041080AFA30000005A10218F
+:10E450008C424000AFA00008AFA200048FA80008C3
+:10E460000000302100002021240A00083C09080097
+:10E470002529010003A41021148A000300042A00A6
+:10E480001100000A000000009042000024840001F6
+:10E490002C83000C00A210210002108000491021E2
+:10E4A0008C4200001460FFF300C230263C040800D8
+:10E4B0008C8431048F4200702C830020106000098E
+:10E4C000004738233C03080024633108000410800F
+:10E4D0000043102124830001AC4700003C010800E8
+:10E4E000AC233104AF8600042406000100C01021D3
+:10E4F00003E0000827BD00103C0208008C420038F1
+:10E5000027BDFFD0AFB50024AFB3001CAFBF0028BC
+:10E51000AFB40020AFB20018AFB10014AFB000101C
+:10E520003C15080026B50038144000022453FFFFB4
+:10E53000000098218F840008308240001040000ABB
+:10E54000308280003C0200200082102450400006EF
+:10E55000308280008F8200142403BFFF00831824C0
+:10E560000A000FA2344210001040000A3C020020B2
+:10E5700000821024104000078F8200143C03FFFF2C
+:10E5800034637FFF0083182434428000AF8200147C
+:10E59000AF8300080E000F2E00000000144000089A
+:10E5A0008F8400089743011E9742011C3063FFFFD0
+:10E5B0000002140000621825AF8300048F84000855
+:10E5C0009742010C30831000106000113046FFFFAD
+:10E5D000308200201440000F241200053C0210007D
+:10E5E000008210241040000B241200013C030E0096
+:10E5F0003C020DFF008318243442FFFF0043102B20
+:10E6000010400004000000000A000FC4241200059E
+:10E61000241200013C0508008CA5003454A0001908
+:10E620008F8400088F82001C544000168F840008DD
+:10E630008F82001430424000544000128F84000842
+:10E640003C021F01008210243C0310001443000D03
+:10E650008F84000830C202001440000B3C0200010D
+:10E660009746010E364700020000202124C6000410
+:10E6700030C6FFFF0E000F05240500020A00108DB2
+:10E680008FBF00283C020001008210241040000CC3
+:10E690008F8300143C0208008C4200D89746010E7C
+:10E6A000240400802442000130C6FFFF240500023C
+:10E6B0003C010800AC2200D80A00108A240700039D
+:10E6C00030624000104000063C0210003C020F0087
+:10E6D0000082102450400001934201163C021000B9
+:10E6E0000082102410400044000000003C0208009A
+:10E6F0008C4200301040000C306240001040000A94
+:10E700003C030F00008318243C0201000043102B3F
+:10E7100014400005000000009746010E3647000235
+:10E720000A0010872404008010A0000D3082010030
+:10E730001040000B3C020F00008210243C0302003A
+:10E74000104300078F82000400531024005510214D
+:10E7500090420004244200040A00103A000221C042
+:10E76000000000008F8600083C0508008CA500D042
+:10E77000000616023050000F38A200012C420001A2
+:10E780002E03000C0043102414400018001021C078
+:10E790002602FFFC2C4200045440001400002021FB
+:10E7A00038A200022C420001004310241040000354
+:10E7B000000612420A00103A000020210010182B17
+:10E7C0000043102450400009001021C09746010E5C
+:10E7D000000020212405000224C6000430C6FFFFEB
+:10E7E0000E000ECD3247FFFB001021C09746010EF0
+:10E7F0000A001087364700028F4240003C11080093
+:10E800008E310024304201001040004032220001CD
+:10E810000220802110A00017325400043082010031
+:10E8200010400015240200013C020F000082102459
+:10E830003C0302001043000F8F8200049746010E34
+:10E840000240382100531024005510219044000448
+:10E8500024C6000430C6FFFF24840004000421C045
+:10E860000E000ECD240500022402FFFE02228024A9
+:10E870003252FFFB2402000116020007320200019F
+:10E880003242000450400001365200029746010E09
+:10E890000A001086024038211040000A32020004AB
+:10E8A0009746010E024038210000202124C60004B2
+:10E8B00030C6FFFF0E000ECD240500023252FFFBD2
+:10E8C000320200041040000B8F8200083042080022
+:10E8D00010400008000000009746010E0240382159
+:10E8E0002404010024C6000430C6FFFF0E000ECD34
+:10E8F00024050002568000108FBF00280E000F2252
+:10E90000000000000A00108D8FBF00281040000A90
+:10E910008FBF00289746010E3647000200002021D5
+:10E9200024C6000430C6FFFF240500020E000ECDF1
+:10E93000000000008FBF00288FB500248FB4002096
+:10E940008FB3001C8FB200188FB100148FB000106D
+:10E950000000102103E0000827BD0030274301809C
+:10E960008F4201B80440FFFE000000008F420148C2
+:10E9700000021402A462000824020002A062000B3C
+:10E980008F420148A46200108F420144AC6200240F
+:10E990003C02100003E00008AF4201B827BDFFE8C9
+:10E9A000AFB000103C04600CAFBF00148C8250006C
+:10E9B0002403FF7F3C1A8000004310243442380CAB
+:10E9C000AC825000240200033C106000AF420008FB
+:10E9D0008E0208083C1B80083C010800AC20002087
+:10E9E0003042FFF0384200102C4200010E001B396B
+:10E9F000AF8200003C04FFFF3C02040034830806A1
+:10EA00003442000CAE021948AE03194C3C056016A6
+:10EA10008E0219808CA30000344202000064182486
+:10EA2000AE0219803C0253531462000334A47C00EC
+:10EA30008CA20004005020218C82007C8C83007802
+:10EA40008FBF00148FB0001027BD0018AF820018D0
+:10EA500003E00008AF83001027BDFFE8AFBF001040
+:10EA60008F4340003402FFFF3C040800248400F080
+:10EA700010620007000000008F4240003C040800C4
+:10EA8000248400E83042010010400009000000002A
+:10EA90009745010E0E000E9A30A5FFFF9745010E17
+:10EAA0003C040800248431C80A0010FC8FBF001009
+:10EAB0008F4340008F8200103C040800248400E053
+:10EAC0001462000A000000008F4340048F82001887
+:10EAD00014620006000000009745010E3C04080087
+:10EAE000248431B80A0010FC8FBF00109745010E36
+:10EAF0008FBF001030A5FFFF0A000E9A27BD001837
+:10EB000027BDFFE8AFBF00108F420128AF420020B1
+:10EB10008F4201048F430100AF8200080E000EA453
+:10EB2000AF8300140E0010D5000000003C02080066
+:10EB30008C4200C0104000088F8400083C0208008E
+:10EB40008C4200C4244200013C010800AC2200C4F5
+:10EB50000A001135000000003C0200100082102461
+:10EB60001440000A8F8300143C0208008C420020ED
+:10EB7000244200013C010800AC2200200E000F7D61
+:10EB8000000020210A001133000000002402BFFF12
+:10EB9000006210241040000800000000240287FFDB
+:10EBA00000621024144000083C020060008210241F
+:10EBB00010400005000000000E000CC50000000021
+:10EBC0000A001133000000000E00119D000000003B
+:10EBD000104000063C0240008F4301243C026020AC
+:10EBE000AC430014000000003C024000AF4201387A
+:10EBF000000000008FBF001003E0000827BD0018D0
+:10EC000027BDFFE8AFBF00108F4201403C04400029
+:10EC1000AF4200208F4301483C027000006218247C
+:10EC2000106400100083102B144000063C026000AA
+:10EC30003C02200010620007000000000A00115F83
+:10EC40003C0240001062000B3C0240000A00115FD1
+:10EC5000000000000E001096000000000A00115F86
+:10EC60003C0240000E0011C1000000000A00115FCC
+:10EC70003C0240000E001B46000000003C02400029
+:10EC8000AF420178000000008FBF001003E00008D1
+:10EC900027BD001827BDFFE8AFBF00140E0010A667
+:10ECA000AFB000103C028000344200708C43000082
+:10ECB00000403821AF830020006030218CE8000044
+:10ECC0003C0508008CA500FC3C0408008C8400F87E
+:10ECD000010630230000102100A6282100A6302BB9
+:10ECE00000822021008620213C010800AC2500FC88
+:10ECF0003C010800AC2400F88F50000032020003F1
+:10ED00001040FFEE010030218CE600003C050800B9
+:10ED10008CA500FC3C0408008C8400F800C830235B
+:10ED200000A628210000102100A6302B00822021FF
+:10ED300000862021320700013C010800AC2500FCC0
+:10ED4000AF8800203C010800AC2400F810E000046B
+:10ED5000320200020E0010FF00000000320200022A
+:10ED60005040FFD13C0280000E00113F0000000027
+:10ED70000A0011693C0280008F4201003042003ECF
+:10ED80001440001124020001AF4000488F420100EE
+:10ED9000304207C01040000500000000AF40004CAA
+:10EDA000AF40005003E0000824020001AF400054CF
+:10EDB000AF4000408F420100304238005440000113
+:10EDC000AF4000442402000103E0000800000000FE
+:10EDD0003C0290003442000100822025AF44002014
+:10EDE0008F4200200440FFFE0000000003E0000806
+:10EDF000000000003C028000344200010082202517
+:10EE000003E00008AF44002027BDFFE0AFB20018C8
+:10EE1000AFBF001CAFB10014AFB000108F50014065
+:10EE20008F5101483C0280000011940202222024EC
+:10EE3000324300FF2402000E1062008A2862000F95
+:10EE40001040001228620037240200061062003BC6
+:10EE50002862000710400007240200091060001A11
+:10EE60002402000110620025000000000A00127652
+:10EE7000000000001062007B2402000B1062005BA7
+:10EE80003222FFFF0A001276000000001040000846
+:10EE90002402003828620035104000802402001F40
+:10EEA0001062007E000000000A00127600000000E0
+:10EEB0001062007A2402008010620042000000000C
+:10EEC0000A001276000000008F4201B80440FFFEE5
+:10EED00024020001AF500180AF400184A752018895
+:10EEE000A342018A24020002A342018BA751019090
+:10EEF0008F4201440A001271AF4201A41080000A3F
+:10EF0000240200023C010800A02271783C010800A4
+:10EF1000AC3071808F4201443C010800AC22717C0E
+:10EF20000A0012788FBF001C8F4201B80440FFFE18
+:10EF3000240200020A00125B000000008F4201B8A8
+:10EF40000440FFFE00000000AF5001803C020800BA
+:10EF50009042717810400003000018213C03080023
+:10EF60008C637180AF430184A75201883C02080082
+:10EF7000904271780000182134420001A342018AB6
+:10EF800024020002A342018BA75101908F42014449
+:10EF9000AF4201A43C020800904271781040000387
+:10EFA0003C0210003C0308008C63717CAF4301A855
+:10EFB000AF4201B83C010800A02071780A00127825
+:10EFC0008FBF001C8F4201B80440FFFE24020002E4
+:10EFD000A342018BA7520188A75101908F4201449F
+:10EFE000A74201920A0012733C0210001440001D57
+:10EFF0000000000093620005304200041440003716
+:10F00000000000000E0011B30200202193620005F1
+:10F0100002002021344200040E0011BCA36200054E
+:10F02000936200053042000414400002000000001A
+:10F030000000000D9362000024030020304200FF16
+:10F0400014430008000000008F4201B80440FFFE96
+:10F0500024020005AF500180A342018B3C02100046
+:10F06000AF4201B88F4201B80440FFFE2402000203
+:10F07000AF400180AF500184A7520188A342018AAA
+:10F08000A342018BA7510190AF4001A48F420144DC
+:10F09000AF4201A80A0012733C0210008F4201B86F
+:10F0A0000440FFFE24020001AF500180AF40018404
+:10F0B000A7520188A342018A24020002A342018BC5
+:10F0C000A7510190AF4001A4AF4001A83C0210003D
+:10F0D000AF4201B80A0012788FBF001C0000000D7B
+:10F0E0008FBF001C8FB200188FB100148FB00010BA
+:10F0F00003E0000827BD002027BDFFE8AFBF0010D8
+:10F100000E000EA400000000AF4001808FBF001071
+:10F11000000020210A000F7D27BD00183084FFFF6A
+:10F1200030A5FFFF0000182110800007000000003C
+:10F1300030820001104000020004204200651821C6
+:10F140000A0012890005284003E000080060102131
+:10F1500010C0000624C6FFFF8CA2000024A50004F6
+:10F16000AC8200000A0012932484000403E000082B
+:10F170000000000010A0000824A3FFFFAC860000E0
+:10F1800000000000000000002402FFFF2463FFFFD6
+:10F190001462FFFA2484000403E000080000000069
+:10F1A00027BDFFE0AFB20018AFB10014AFB0001040
+:10F1B000AFBF001C9482000C00A088212490001492
+:10F1C0000002130200021080008290210000302112
+:10F1D00000A020210E00129C240500050212102B15
+:10F1E0001040005700001021920300002C6200091B
+:10F1F0005040005192020001000310803C030800BF
+:10F20000246370DC004310218C42000000400008A1
+:10F2100000000000920300012402000C1462004868
+:10F2200024020001025010232C42000A1440003630
+:10F23000261000028E22000034420100AE2200009F
+:10F240009202000092030001920400029205000362
+:10F2500000031C00000216000043102500042200D9
+:10F26000004410250045102526100004AE2200049D
+:10F270009202000092030001920400029205000332
+:10F280000002160000031C000043102500042200A9
+:10F290000044102500451025261000040A0012B66F
+:10F2A000AE2200089203000124020004146200163A
+:10F2B0002610000292020000920400018E2300003A
+:10F2C00000021200004410253463000426100002DE
+:10F2D000AE22000C0A0012B6AE2300009203000119
+:10F2E0002402000314620008261000028E2200008F
+:10F2F000920300002610000134420008A2230010EF
+:10F300000A0012B6AE2200000A00130F2402000108
+:10F31000920300012402000210620002260400028F
+:10F32000024020210A0012B6008080210A0012B695
+:10F3300026100001920200010A0012B6020280218A
+:10F340008FBF001C8FB200188FB100148FB0001057
+:10F3500003E0000827BD002027BDFFE8AFBF001471
+:10F36000AFB000100E0011B3008080219362007DC9
+:10F3700002002021344200200E0011BCA362007D57
+:10F38000020020218FBF00148FB000100A000C9BD8
+:10F3900027BD0018308300FF30A500FF30C600FFF6
+:10F3A000274701808F4201B80440FFFE00000000A3
+:10F3B0008F42012834634000ACE2000024020001C7
+:10F3C000ACE00004A4E30008A0E2000A240200026A
+:10F3D000A0E2000B3C021000A4E50010ACE0002409
+:10F3E000ACE00028A4E6001203E00008AF4201B838
+:10F3F00027BDFFE8AFBF00109362003F2403001257
+:10F40000304200FF1043000D008030218F62004425
+:10F41000008210230440000A8FBF00108F62004852
+:10F42000240400390000282100C2102304410004F4
+:10F43000240600120E001324000000008FBF0010ED
+:10F440002402000103E0000827BD001827BDFFC803
+:10F45000AFB1002C00A08821AFB2003027A500106A
+:10F460000080902102202021AFBF00340E0012A79F
+:10F47000AFB0002810400009024020218E22000871
+:10F48000AF6200840E001315AF6000402404003802
+:10F490002405008D0A0013D1240600129362003463
+:10F4A000936300378F640084304200FF306300FFB5
+:10F4B0000043282100A4202B1080000B0000000036
+:10F4C0009763003C8F6200843063FFFF0045102388
+:10F4D0000062182B14600004000000008F6200849A
+:10F4E0000A00137B004580239762003C3050FFFFE9
+:10F4F0008FA3001030620004504000032E02021857
+:10F500008FA2001C0202102B1440000502002021D3
+:10F510003062000410400002240402188FA4001C72
+:10F520002C82008010400002008080212410008086
+:10F530000E0011B30240202124020001AF62000C32
+:10F540009362003E001020403042007FA362003EE4
+:10F550008E22000424420001AF620040A770003CEC
+:10F560008F6200509623000E00431021AF620058B6
+:10F570008F62005000441021AF62005C8E220004B4
+:10F58000AF6200188E220008AF62001C8FA200102C
+:10F59000304200085440000A93A20020A3600036C5
+:10F5A000936200362403FFDFA36200359362003EBE
+:10F5B00000431024A362003E0A0013B18E2200080B
+:10F5C000A36200358E220008AF62004C8F620024D7
+:10F5D0008F63004000431021AF6200489362000037
+:10F5E00024030050304200FF144300122403FF8024
+:10F5F0003C0208008C4231A002421021004310243A
+:10F60000AF4200283C0208008C4231A08E24000842
+:10F610003C03000C024210213042007F03421021C3
+:10F6200000431021AC4400D88E230008AF8200288C
+:10F63000AC4300DC0E0011BC024020212404003841
+:10F64000000028212406000A0E00132400000000F8
+:10F650008FBF00348FB200308FB1002C8FB00028E4
+:10F660002402000103E0000827BD003827BDFFE8A1
+:10F67000AFBF001090C7000D00C0282130E6001079
+:10F6800010C0000A30E200048CA300088F6200540E
+:10F690001062000630E20004144000178FBF001013
+:10F6A000000020210A000CB227BD00181040000DF8
+:10F6B00030E3001210C000108FBF00108CA30008B0
+:10F6C0008F6200541462000D2402000124040038EB
+:10F6D0002405008D0E001324240600120A0013FDD9
+:10F6E0008FBF001024020012146200038FBF0010AD
+:10F6F0000A00135227BD00182402000103E000088D
+:10F7000027BD001827BDFFF827420180AFA20000E7
+:10F71000308A00FF8F4201B80440FFFE0000000065
+:10F720008F4601283C0208008C4231A02403FF8050
+:10F73000AF86005000C2102100431024AF420024C5
+:10F740003C0208008C4231A08FA900008FA8000065
+:10F7500000C210213042007F034218213C02000AFF
+:10F7600000621821946400D48FA700008FA50000C8
+:10F7700024020002AF830028A0A2000B8FA3000088
+:10F78000354260003084FFFFA4E200083C02100014
+:10F79000AD260000AD040004AC60002427BD0008C5
+:10F7A000AF4201B803E00008240200018C8200048B
+:10F7B0008F83002800451023AC8200049062006310
+:10F7C0003042007FA06200638C820020938300306F
+:10F7D0008F85002834420002AF830044A780004296
+:10F7E000AC820020A4A000E490A200632403FFBF29
+:10F7F0000043102403E00008A0A200632743018017
+:10F800008F4201B80440FFFE8F820050AC620000BE
+:10F810008F420124AC62000424026083A4620008C9
+:10F8200024020002A062000B3C02100003E000086A
+:10F83000AF4201B88F880044938200308F83002844
+:10F840003C07080024E7759400481023304200FF6D
+:10F85000304900FC246500888F860048304A000348
+:10F860001120000900002021248200048CA3000044
+:10F87000304400FF0089102AACE3000024A50004F6
+:10F880001440FFF924E70004114000090000202182
+:10F890002482000190A30000304400FF008A102B56
+:10F8A000A0E3000024A500011440FFF924E70001B3
+:10F8B00030C20003144000048F850044310200036D
+:10F8C0001040000D0000000010A0000900002021E1
+:10F8D0002482000190C30000304400FF0085102BFB
+:10F8E000A0E3000024C600011440FFF924E7000152
+:10F8F00003E00008000000001100FFFD00002021CF
+:10F90000248200048CC30000304400FF0088102BC8
+:10F91000ACE3000024C600041440FFF924E700040F
+:10F9200003E00008000000008F8300449382003051
+:10F9300030C600FF30A500FF00431023304300FF16
+:10F940008F820028008038210043102114C000025B
+:10F95000244800880083382130E200031440000569
+:10F9600030A2000314400003306200031040000D79
+:10F970000000000010A000090000202124820001E6
+:10F9800090E30000304400FF0085102BA10300002D
+:10F9900024E700011440FFF92508000103E00008F6
+:10F9A0000000000010A0FFFD0000202124820004C0
+:10F9B0008CE30000304400FF0085102BAD030000F5
+:10F9C00024E700041440FFF92508000403E00008C0
+:10F9D0000000000027BDFFF82402FFFFAFA20000D7
+:10F9E000008038212405002F3C0908002529719446
+:10F9F000240800FF2406FFFF90E2000024A3FFFF7D
+:10FA00000006220200C21026304200FF00021080D1
+:10FA1000004910218C420000306500FF24E70001FE
+:10FA200014A8FFF50082302600061027AFA20004BC
+:10FA3000AFA200000000282127A6000400C5102363
+:10FA40009044000324A2000100BD1821304500FFAE
+:10FA50002CA200041440FFF9A06400008FA2000053
+:10FA600003E0000827BD00080080482130AAFFFFFE
+:10FA700030C600FF30E7FFFF274801808F4201B802
+:10FA80000440FFFE8F820050AD0200008F4201242F
+:10FA9000AD0200048D220020A5070008A102000A83
+:10FAA00024020016A102000B934301208D220008BE
+:10FAB0008D240004306300FF00431021978300422F
+:10FAC000004410218D250024004310233C0308002E
+:10FAD0008C6331A08F840028A502000C246300E809
+:10FAE0002402FFFFA50A000EA5030010A5060012C0
+:10FAF000AD050018AD020024948201142403FFF721
+:10FB00003042FFFFAD0200288C820118AD02002CAC
+:10FB10003C021000AD000030AF4201B88D22002041
+:10FB20000043102403E00008AD2200208F8200284B
+:10FB300030E7FFFF00804821904200D330A5FFFF4F
+:10FB400030C600FF0002110030420F0000E23825ED
+:10FB5000274801808F4201B80440FFFE8F82005089
+:10FB6000AD0200008F420124AD0200048D2200206E
+:10FB7000A5070008A102000A24020017A102000B39
+:10FB8000934301208D2200088D240004306300FF80
+:10FB90000043102197830042004410218F840028E5
+:10FBA000004310233C0308008C6331A0A502000C25
+:10FBB000A505000E246300E8A5030010A5060012A9
+:10FBC000AD0000148D220024AD0200188C82005C70
+:10FBD000AD02001C8C820058AD0200202402FFFF01
+:10FBE000AD020024948200E63042FFFFAD020028FF
+:10FBF00094820060948300BE30427FFF3063FFFF39
+:10FC00000002120000431021AD02002C3C02100043
+:10FC1000AD000030AF4201B8948200BE2403FFF76C
+:10FC200000A21021A48200BE8D22002000431024D7
+:10FC300003E00008AD220020274301808F4201B875
+:10FC40000440FFFE24020018AC640000A062000B18
+:10FC50008F820028944200E6A46200103C0210004B
+:10FC6000AC60003003E00008AF4201B827430180D8
+:10FC70008F4201B80440FFFE8F82002C9442001C8A
+:10FC80003042FFFF000211C0AC62000024020019E4
+:10FC9000A062000B3C021000AC60003003E00008E2
+:10FCA000AF4201B88F87003430C300FF8F4201B8E4
+:10FCB0000440FFFE8F82005034636000ACA200005D
+:10FCC0009382004CA0A200058CE20010A4A20006C2
+:10FCD000A4A300088C8200202403FFF7A0A2000A3E
+:10FCE00024020002A0A2000B8CE20000ACA20010D3
+:10FCF0008CE20004ACA200148CE2001CACA2002434
+:10FD00008CE20020ACA200288CE2002CACA2002CDB
+:10FD10008C820024ACA200183C021000AF4201B853
+:10FD20008C8200200043102403E00008AC820020F5
+:10FD30009382004C2403000127BDFFE800433004F8
+:10FD40002C420020AFB00010AFBF00142410FFFE03
+:10FD500010400005274501803C0208008C4231908C
+:10FD60000A00159C004610243C0208008C42319485
+:10FD70000046102414400007240600848F830028C6
+:10FD80002410FFFF906200623042000F34420040B6
+:10FD9000A06200620E001568000000000200102141
+:10FDA0008FBF00148FB0001003E0000827BD0018BB
+:10FDB0008F83002C27BDFFE0AFB20018AFB1001455
+:10FDC000AFB00010AFBF001C9062000D00A09021EA
+:10FDD00030D100FF3042007FA062000D8F850028E7
+:10FDE0008E430018008080218CA2007C14620005E4
+:10FDF0002402000E90A20063344200200A0015C5C0
+:10FE0000A0A200630E00158BA382004C2403FFFF09
+:10FE1000104300472404FFFF52200045000020212A
+:10FE20008E4300003C020010006210245040000489
+:10FE30003C020008020020210A0015D4240200150B
+:10FE400000621024504000098E450000020020216D
+:10FE5000240200140E00158BA382004C2403FFFF24
+:10FE6000104300332404FFFF8E4500003C020002D3
+:10FE700000A21024104000163C0200048F86002CC3
+:10FE80008CC200148CC300108CC4001400431023D7
+:10FE90000044102B50400005020020218E43002C0E
+:10FEA0008CC2001010620003020020210A00160517
+:10FEB000240200123C02000400A210245040001C46
+:10FEC00000002021020020210A0016052402001350
+:10FED00000A21024104000068F83002C8C620010BA
+:10FEE00050400013000020210A0015FF02002021CD
+:10FEF0008C620010504000048E42002C0200202131
+:10FF00000A001605240200115040000900002021BB
+:10FF100002002021240200170E00158BA382004C42
+:10FF20002403FFFF104300022404FFFF00002021F0
+:10FF30008FBF001C8FB200188FB100148FB000105B
+:10FF40000080102103E0000827BD002093830030CB
+:10FF500027BDFFE024020034AFB20018AFB1001497
+:10FF6000AFBF001CAFB00010008088211462000CED
+:10FF700000A090218F8400340E0014B48C900030C7
+:10FF80001202000724020005022020210E00158B1A
+:10FF9000A382004C2403FFFF1043005F2404FFFFF3
+:10FFA00092420004104000098F8200280220202184
+:10FFB0002402000C0E00158BA382004C2403FFFFCB
+:10FFC000104300552404FFFF8F820028A3800024E3
+:10FFD0008E4300048C4400803C0200FF3442FFFF4B
+:10FFE000006218240083202B10800008AF83003C9F
+:10FFF00002202021240200190E00158BA382004C40
+:020000040001F9
+:100000002403FFFF104300442404FFFF97820042B3
+:100010008F8700448F88003C00471023110000396F
+:10002000A78200428F8600283045FFFF8F84005052
+:1000300090C300BC3C0208008C4231A0000318822F
+:100040003070000100822021001010800102102178
+:1000500000A2282B10A00010248200888F84003476
+:100060001082000D3C033F018E420000004310242B
+:100070003C0325001443000630E500FF8C8200009D
+:10008000ACC200888C8200100A001665ACC20098D1
+:100090000E001489000030218F85003C93830024DA
+:1000A0008F86002830A20003000210233042000394
+:1000B00000433821A387002494C400E400A228212F
+:1000C0008F8300448F82004834841000A4C400E46D
+:1000D00000431021AF8200481200000EAF8500449B
+:1000E00024E20004A382002494C200E424A30004B8
+:1000F000AF83004434422000A4C200E40A00168505
+:10010000000020218F820048AF800044004710216A
+:10011000AF820048000020218FBF001C8FB2001862
+:100120008FB100148FB000100080102103E0000890
+:1001300027BD00208F86002827BDFFE8AFBF001431
+:10014000AFB0001090C200633042002010400008A1
+:1001500030A500FF8CC2007C2403FFDF2442000195
+:10016000ACC2007C90C2006300431024A0C20063B4
+:1001700010A000238F83002827500180020028212F
+:100180000E001568240600828F82002890420063CA
+:100190003042004050400019A380004C8F8300344F
+:1001A0008F4201B80440FFFE8F820050AE02000073
+:1001B00024026082A602000824020002A202000BB0
+:1001C0008C620008AE0200108C62000CAE020014BB
+:1001D0008C620014AE0200188C620018AE0200247B
+:1001E0008C620024AE0200288C620028AE02002C33
+:1001F0003C021000AF4201B8A380004C8F8300285E
+:100200008FBF00148FB000109062006327BD0018EC
+:100210003042007FA0620063978200428F860044D4
+:100220008F8500289383003000461023A782004268
+:10023000A4A000E490A400638F820048AF83004430
+:100240002403FFBF0046102100832024AF82004812
+:10025000A0A400638F820028A04000BD8F820028E8
+:1002600003E00008A44000BE8F8A002827BDFFE0FD
+:10027000AFB10014AFB000108F880044AFBF0018BA
+:1002800093890024954200E430D100FF0109182B26
+:100290000080802130AC00FF3047FFFF0000582174
+:1002A00014600003310600FF0120302101095823AA
+:1002B000978300420068102B1440003200000000B9
+:1002C00014680007240200018E0200202403FFFBB3
+:1002D00034E7800000431024AE0200202402000115
+:1002E00034E70880158200053165FFFF0E0014D940
+:1002F000020020210A00171A020020210E00150A10
+:10030000020020210E00154D8F8400508F8400289C
+:100310009482006024420001A48200609482006004
+:100320003C0308008C63318830427FFF5443000F48
+:1003300002002021948200602403800000431024E6
+:10034000A48200609082006090830060304200FFD1
+:10035000000211C200021027000211C03063007FAA
+:1003600000621825A08300600200202102202821BD
+:100370008FBF00188FB100148FB000100A00168CC8
+:1003800027BD0020914200632403FF800043102515
+:10039000A1420063978200423048FFFF1100002015
+:1003A000938300248F840028004B1023304600FFE5
+:1003B000948300E42402EFFF0168282B00621824D4
+:1003C000A48300E414A000038E0200200100582141
+:1003D000000030212403FFFB34E780000043102499
+:1003E000AE02002024020001158200053165FFFFE6
+:1003F0000E0014D9020020210A0017429783004200
+:100400000E00150A02002021978300428F820044CB
+:10041000A780004200431023AF820044938300244E
+:100420008F8200288FBF00188FB100148FB000108A
+:1004300027BD002003E00008A04300BD8F820028F4
+:1004400090430088904500BD244900883063003FF8
+:100450002463FFE024020001006238042C630020C2
+:1004600030E80019A385002410600010AF89003423
+:100470003C028000344200022405000124060001F1
+:100480001500000800E2182400002821146000056F
+:1004900030E20020104000052405000191260001F3
+:1004A00030C600010A0016D90000000003E0000871
+:1004B0000000000027BDFFD8AFB000108F900034BF
+:1004C000AFB40020AFB10014AFBF0024AFB3001C25
+:1004D000AFB200188E0500103C0208008C4231B00B
+:1004E0008F86003830A33FFF0062182B8CD3001496
+:1004F000008088218CD20020106000780000A021AC
+:1005000090C3000D2402FF8000431024304200FFFE
+:100510005040007302202021000513823042000366
+:100520005440006F0220202194C3001C8F820028B9
+:100530008E050028A44301148CC200100262182307
+:10054000146500072402001F8F82003C0062102106
+:100550000262102B104000088F83002C2402001828
+:100560000E00158BA382004C2403FFFF1043006F85
+:100570002404FFFF8F83002C8F84003C8C620010CA
+:100580000244902100441023AC6200108F820028A6
+:10059000AC7200208C4200680052102B1040000901
+:1005A0008F830038022020212402001D0E00158BAD
+:1005B000A382004C2403FFFF1043005C2404FFFFD0
+:1005C0008F8300388E0200248C63002410430007C0
+:1005D000022020212402001C0E00158BA382004C57
+:1005E0002403FFFF104300512404FFFF8F84002CDD
+:1005F0008C82002424420001AC82002412530004A7
+:100600008F8200288C4200685642000E8E02000045
+:100610008E0200003C030080004310241440000DB3
+:100620002402001A022020210E00158BA382004C08
+:100630002403FFFF1043003D2404FFFF0A0017D6E8
+:100640008E0200143C03008000431024504000033D
+:100650008E020014AC8000208E0200142412FFFFD2
+:10066000105200062402001B022020210E00158BD0
+:10067000A382004C1052002D2404FFFF8E030000C3
+:100680003C020001006210241040001F3C02008068
+:100690000062102414400008022020212402001AC5
+:1006A0000E00158BA382004C2403FFFF1043001F94
+:1006B0002404FFFF02202021020028210E0015AB98
+:1006C000240600012403FFFF2404FFFF1443000E4F
+:1006D000241400010A00180B8FBF002402202021DF
+:1006E0002402000D8FBF00248FB400208FB3001CA4
+:1006F0008FB200188FB100148FB0001027BD0028F2
+:100700000A00158BA382004C8F83002C022020212D
+:100710000280302194620036240500012442000149
+:100720000E0016D9A4620036000020218FBF0024DD
+:100730008FB400208FB3001C8FB200188FB100144B
+:100740008FB000100080102103E0000827BD0028B2
+:100750008F83002827BDFFD8AFB40020AFB3001CA3
+:10076000AFB20018AFB10014AFB00010AFBF00249B
+:10077000906200638F9100342412FFFF34420040E6
+:1007800092250000A06200638E2200100080982154
+:1007900030B0003F105200060360A0212402000D7B
+:1007A0000E00158BA382004C105200522404FFFF50
+:1007B0008F8300288E2200188C63007C1043000772
+:1007C000026020212402000E0E00158BA382004C33
+:1007D0002403FFFF104300472404FFFF24040020EC
+:1007E000120400048F8300289062006334420020CA
+:1007F000A06200638F85003C10A0001E0000000076
+:10080000560400048F820028026020210A00185537
+:100810002402000A9683000A2404FFFD944200602B
+:100820003042FFFF104300348FBF00243C02080019
+:100830008C42318C0045102B1440000602602021B0
+:10084000000028210E0016D9240600010A00187C99
+:10085000000020212402002D0E00158BA382004CE5
+:100860002403FFFF104300232404FFFF0A00187C29
+:1008700000002021160400058F8400288E23001418
+:100880002402FFFF50620018026020219482006061
+:1008900024420001A4820060948200603C030800AE
+:1008A0008C63318830427FFF5443000F0260202167
+:1008B000948200602403800000431024A48200601E
+:1008C0009082006090830060304200FF000211C2FD
+:1008D00000021027000211C03063007F006218255B
+:1008E000A0830060026020210E00168C2405000108
+:1008F000000020218FBF00248FB400208FB3001C84
+:100900008FB200188FB100148FB00010008010213A
+:1009100003E0000827BD00288F83002827BDFFE8DB
+:10092000AFB00010AFBF0014906200638F87003437
+:1009300000808021344200408CE60010A0620063F9
+:100940003C0308008C6331B030C23FFF0043102BE2
+:100950001040004E8F8500382402FF8090A3000DC8
+:1009600000431024304200FF504000490200202183
+:10097000000613823048000324020002550200449E
+:100980000200202194A2001C8F850028240300234C
+:10099000A4A201148CE60000000616023042003FBB
+:1009A000104300103C0300838CE300188CA2007CF1
+:1009B000106200062402000E0E00158BA382004C6C
+:1009C0002403FFFF104300382404FFFF8F83002817
+:1009D0009062006334420020A06200630A0018C1E4
+:1009E0008F83002C00C31024144300078F83002C36
+:1009F00090A200623042000F34420020A0A20062A8
+:100A0000A38800408F83002C9062000D3042007F4D
+:100A1000A062000D8F83003C1060001802002021AE
+:100A20008F8400388C8200100043102B1040000986
+:100A300024020018020020210E00158BA382004C16
+:100A40002403FFFF104300182404FFFF0A0018E9E5
+:100A5000000020218C8200102405000102002021CA
+:100A6000004310238F83002C240600010E0016D9AA
+:100A7000AC6200100A0018E9000020210E00168C5C
+:100A8000240500010A0018E90000202102002021AD
+:100A90002402000D8FBF00148FB0001027BD001876
+:100AA0000A00158BA382004C8FBF00148FB000107A
+:100AB0000080102103E0000827BD001827BDFFD8E3
+:100AC000AFB000108F900034AFB3001CAFBF002058
+:100AD000AFB20018AFB100148E1200103C03080032
+:100AE0008C6331B032423FFF0043102B1040007C3A
+:100AF000008098218F8500382402FF8090A3000D8C
+:100B000000431024304200FF504000760260202154
+:100B10000012138230420003240300015443007189
+:100B20000260202190A2000D3042000854400003D2
+:100B30008F82003C0A00191924020024504000034F
+:100B40008E03000C0A001919240200278CA2002031
+:100B500014620005240200208E0300088CA20024E9
+:100B600010620008240200200E00158BA382004CA6
+:100B70002403FFFF1043006A2404FFFF0A00194406
+:100B80008F84002C8E0200142411FFFF14510003E7
+:100B90008F8700280A00193F240200258E030018C1
+:100BA0008CE2007C146200162402000E8E030024E6
+:100BB0008CA2002814620012240200218E06002854
+:100BC0008CA2002C14C2000E2402001F8E03002CE5
+:100BD0001060000B240200238CE200680043102BFD
+:100BE00014400007240200268CA20014006618217D
+:100BF0000043102B504000078F84002C2402002259
+:100C00000E00158BA382004C105100452404FFFFF9
+:100C10008F84002C2403FFF79082000D00431024E2
+:100C2000A082000D8F8600283C0308008C6331AC45
+:100C30008F82005094C400E08F85002C0043102167
+:100C400030847FFF00042040004410213043007FA7
+:100C5000034320213C03000E008320212403FF8056
+:100C600000431024AF42002CA49200008CA2002864
+:100C700024420001ACA200288CA2002C8E03002C80
+:100C800000431021ACA2002C8E02002CACA200303C
+:100C90008E020014ACA2003494A2003A2442000157
+:100CA000A4A2003A94C600E03C0208008C4231B095
+:100CB00024C4000130837FFF1462001300803021C0
+:100CC000240280000082302430C2FFFF000213C2E1
+:100CD000304200FF000210270A001981000233C0D1
+:100CE000026020212402000D8FBF00208FB3001C62
+:100CF0008FB200188FB100148FB0001027BD0028EC
+:100D00000A00158BA382004C8F82002802602021EC
+:100D1000240500010E00168CA44600E000002021EE
+:100D20008FBF00208FB3001C8FB200188FB100144A
+:100D30008FB000100080102103E0000827BD0028BC
+:100D400027BDFFE0AFB100148F910034AFB00010A9
+:100D5000AFBF00188E2600103C0308008C6331B032
+:100D600030C23FFF0043102B1040005E0080802106
+:100D70008F8500382402FF8090A3000D00431024CB
+:100D8000304200FF50400058020020218F82003C7A
+:100D900010400008000613828F8200289763000A23
+:100DA0002404FFFD944200603042FFFF10430055D1
+:100DB00000061382304200031440000E00000000C1
+:100DC00092220002104000058E230024506000157E
+:100DD000922300030A0019BA020020218CA20024E9
+:100DE0005062001092230003020020210A0019C261
+:100DF0002402000F90A2000D304200085440000968
+:100E00009223000302002021240200100E00158B03
+:100E1000A382004C2403FFFF1043003A2404FFFF89
+:100E200092230003240200025462000C9222000369
+:100E30008F82003C544000099222000302002021CE
+:100E40002402002C0E00158BA382004C2403FFFF0C
+:100E50001043002C2404FFFF9222000302202821CB
+:100E600002002021384600102CC600012C4200014F
+:100E70000E0015AB004630252411FFFF1051002154
+:100E80002404FFFF8F83003C106000120200202129
+:100E90003C0208008C42318C0043102B14400006A9
+:100EA00000000000000028210E0016D924060001D1
+:100EB0000A001A00000020212402002D0E00158BCC
+:100EC000A382004C1051000F2404FFFF0A001A00F7
+:100ED000000020210E00168C240500010A001A00D3
+:100EE00000002021020020212402000D8FBF0018E5
+:100EF0008FB100148FB0001027BD00200A00158BA1
+:100F0000A382004C8FBF00188FB100148FB0001067
+:100F10000080102103E0000827BD002093830040DB
+:100F200027BDFFE024020002AFB10014AFB00010F3
+:100F300000808821AFBF0018000080211062008C63
+:100F40002404FFFD978500428F83004430A2FFFFF9
+:100F50000043102B5440007D8F8400480E00144C39
+:100F6000000000003C020800244275940220202169
+:100F7000004028210E001612AF8200342409FFFF22
+:100F80001049007B2404FFFF3C0808008D0875A46D
+:100F90003C0208008C4231B03C0308009063759419
+:100FA00031043FFF0082102B1040001B3067003FD0
+:100FB0003C0208008C4231A88F830050000421803D
+:100FC00000621821006418213062007F034228214A
+:100FD0003C02000C00A228213C02008034420001A7
+:100FE0003066007800C230252402FF8000621024A1
+:100FF000AF42002830640007AF4208048F82002807
+:101000000344202124840940AF460814AF85002CF6
+:10101000AF840038AC4301189383004024020003DE
+:101020001462003B240200012402002610E2003D6D
+:1010300028E200271040001324020032240200227C
+:1010400010E2003828E200231040000824020024A7
+:101050002402002010E200242402002110E2001EDD
+:10106000022020210A001A7F2402000B10E2002D2A
+:101070002402002510E20010022020210A001A7F1D
+:101080002402000B10E2001A28E200331040000690
+:101090002402003F2402003110E2000B0220202134
+:1010A0000A001A7F2402000B10E200110220202106
+:1010B0000A001A7F2402000B0E00176C0220202168
+:1010C0000A001A9A004080210E0018EE022020210A
+:1010D0000A001A9A004080210E00198F0220202158
+:1010E0000A001A9A004080211509000E0000000035
+:1010F0000E001813022020210A001A9A00408021B5
+:101100000E00158BA382004C0A001A9A0040802121
+:1011100014620017020020212402002314E20005BB
+:101120002402000B0E001885022020210A001A9AC2
+:101130000040802102202021A382004C0E00158B4C
+:101140002410FFFF0A001A9B0200202130A500FF97
+:101150000E00148924060001978300428F82004408
+:10116000A780004200431023AF82004402002021E8
+:101170008FBF00188FB100148FB0001000801021B5
+:1011800003E0000827BD002027BDFFE0AFB1001439
+:10119000AFBF0018AFB000108F4601283C03080015
+:1011A0008C6331A02402FF80AF86005000C3182159
+:1011B0003065007F03452821006218243C02000AA4
+:1011C000AF43002400A2282190A200620080882161
+:1011D000AF850028304200FF00021102A3820040C8
+:1011E00090A200BC304200021440000224030034EC
+:1011F000240300308F820028A383003093830040B3
+:101200008C4200C0A380004CAF8200442402000442
+:10121000106200308F8400448E2400045080002D22
+:101220008F8400448E2200103083FFFFA784004289
+:101230001060001FAF8200488F8300282405FF80C4
+:10124000022020219062006300A21024304200FF9F
+:101250001440000D000000000E001A069790004296
+:1012600010400010004018212402FFFD54620011BC
+:101270008E230020020028210E00142A02202021A3
+:101280000A001AEC8E2300209062006300A2102452
+:10129000304200FF10400003022020210E00174EB4
+:1012A00000000000978200421440FFE48F83002872
+:1012B0008E23002030620004104000068F8400441A
+:1012C0002402FFFB006210240E00143EAE22002018
+:1012D0008F8400448F8300288FBF00188FB10014C3
+:1012E0008FB000102402000127BD002003E0000899
+:1012F000AC6400C030A500FF2403000124A9000154
+:101300000069102B1040000C00004021240A00014D
+:1013100000A31023004A3804246300013082000136
+:101320000069302B104000020004204201074025D4
+:1013300054C0FFF800A3102303E0000801001021AF
+:1013400027BDFFE03C021EDCAFB20018AFB10014B5
+:10135000AFBF001CAFB0001034526F4100008821B5
+:10136000240500080E001AFC0220202100118080B4
+:101370003C07080024E771940002160002071821B8
+:10138000AC6200000000282124A200013045FFFFCC
+:101390008C6200002CA600080441000200022040DC
+:1013A0000092202614C0FFF8AC64000002078021E0
+:1013B0008E0400000E001AFC2405002026230001E4
+:1013C0003071FFFF2E2301001460FFE5AE02000024
+:1013D0008FBF001C8FB200188FB100148FB00010A7
+:1013E00003E0000827BD00203C02080024426A8474
+:1013F0003C010800AC2271883C02080024425000E5
+:101400003C010800AC22718C240200063C0108005B
+:10141000A02271900A001B0F0000000027BDFFD81A
+:10142000AFB3001CAFB20018AFBF0020AFB10014C3
+:10143000AFB000108F5101408F480148000894025E
+:10144000324300FF311300FF8F4201B80440FFFE1A
+:1014500027500180AE1100008F420144AE0200040B
+:1014600024020002A6120008A202000B24020014AB
+:10147000AE130024106200252862001510400008F9
+:101480002402001524020010106200302402001211
+:10149000106200098FBF00200A001C308FB3001CAF
+:1014A0001062006724020022106200378FBF002004
+:1014B0000A001C308FB3001C3C0208008C4231A093
+:1014C0002403FF800222102100431024AF42002495
+:1014D0003C0208008C4231A0022210213042007FE1
+:1014E000034218213C02000A00621821166000B372
+:1014F000AF830028906200623042000F3442003017
+:10150000A06200620A001C2F8FBF00203C04600014
+:101510008C832C083C02F0033442FFFF0062182445
+:10152000AC832C083C0208008C4231A08C832C0830
+:101530002442007400021082000214800062182508
+:10154000AC832C080A001C2F8FBF00203C0208002F
+:101550008C4231A02403FF8002221021004310247A
+:10156000AF4200243C0208008C4231A03C03000A38
+:10157000022210213042007F03421021004310213B
+:101580000A001C2EAF8200283C0208008C4231A0C9
+:101590002404FF800222102100441024AF420024C2
+:1015A0003C0208008C4231A0022210213042007F10
+:1015B000034218213C02000A006218219062006375
+:1015C00000821024304200FF1040007CAF830028CE
+:1015D00024620088944300123C0208008C4231A827
+:1015E00030633FFF000319800222102100431021C5
+:1015F0003043007F03431821004410243C04000CB6
+:1016000000641821AF4200280E00155AAF83002C49
+:101610008F4201B80440FFFE00000000AE11000040
+:101620008F420144AE02000424020002A612000808
+:10163000A202000BAE1300240A001C2F8FBF002053
+:101640002406FF8002261024AF4200203C0208003E
+:101650008C4231A031043FFF00042180022210217E
+:1016600000461024AF4200243C0308008C6331A8DC
+:101670003C0208008C4231A03227007F022318214F
+:1016800002221021006418213042007F3064007F64
+:10169000034228213C02000A0066182400A22821E7
+:1016A000034420213C02000C00822021AF4300288B
+:1016B0003C0200080347182100629021AF850028F2
+:1016C000AF84002C0E00155A010080218F4201B812
+:1016D0000440FFFE8F82002C8F8400282745018064
+:1016E0009042000DACB10000A4B00006000216004C
+:1016F0000002160300021027000237C214C00016B1
+:10170000248200889442001232033FFF30423FFFA0
+:101710001443001224026082908300632402FF803D
+:1017200000431024304200FF5040000C240260822D
+:10173000908200623042000F34420040A08200627A
+:1017400024026084A4A200082402000DA0A20005C7
+:101750000A001C193C02270024026082A4A200088F
+:10176000A0A000053C02270000061C00006218250E
+:1017700024020002A0A2000BACA30010ACA0001435
+:10178000ACA00024ACA00028ACA0002C8E42004CE1
+:101790008F84002CACA200189083000D2402FF80DF
+:1017A00000431024304200FF104000058FBF00208E
+:1017B0009082000D3042007FA082000D8FBF00207C
+:1017C0008FB3001C8FB200188FB100148FB00010BF
+:1017D0003C02100027BD002803E00008AF4201B81A
+:1017E00008004C2808004C2808004BA008004BD8E3
+:1017F00008004C0C08004C3008004C3008004C30FD
+:0418000008004B1081
+:0C1804000A0001220000000000000000AB
+:101810000000000D747061342E362E313600000049
+:10182000040610010000000000000000000000009D
+:1018300000000000000000000000000000000000A8
+:101840000000000000000000000000000000000098
+:101850000000000000000000000000000000000088
+:101860000000000000000000000000000000000078
+:101870000000000000000000000000000000000068
+:101880000000000000000000000000000000000058
+:1018900010000003000000000000000D0000000D1B
+:1018A0003C02080024421B803C03080024632014EF
+:1018B000AC4000000043202B1480FFFD24420004B4
+:1018C0003C1D080037BD2FFC03A0F0213C10080090
+:1018D000261004883C1C0800279C1B800E00015A1F
+:1018E000000000000000000D3084FFFF3082000780
+:1018F0008F85001810400002248300073064FFF831
+:101900000085302130C41FFF03441821247B400090
+:10191000AF85001CAF84001803E00008AF440084CA
+:101920003084FFFF308200078F8500208F860028DB
+:1019300010400002248300073064FFF80085202156
+:101940000086182B14600002AF8500240086202337
+:101950000344282134068000AF840020AF44008077
+:1019600000A6202103E00008AF84003827BDFFD87F
+:10197000AFB3001CAFB20018AFB00010AFBF00246F
+:10198000AFB40020AFB100143C0860088D145000C3
+:101990002418FF7F3C1A8000029898243672380C75
+:1019A000AD1250008F5100083C07601C3C086000DD
+:1019B00036300001AF500008AF800018AF40008003
+:1019C000AF4000848CE600088D0F08083C076016C5
+:1019D0008CEC000031EEFFF039CA00103C0DFFFF27
+:1019E000340B80003C030080034B48212D44000150
+:1019F000018D28243C0253533C010800AC230420F1
+:101A0000AF890038AF860028AF840010275B400004
+:101A100014A2000334E37C008CF90004032818218D
+:101A20008C7F007C8C6500783C0280003452007012
+:101A3000AF85003CAF9F00403C13080026731BC4D9
+:101A40000240A0218E4800008F46000038C30001EC
+:101A50003064000110800017AF88003402804821F4
+:101A60008D2D00003C1908008F39045C3C110800E2
+:101A70008E31045801A8F823033F7821000040214B
+:101A80000228382101FF802B00F070213C01080062
+:101A9000AC2F045C3C010800AC2E04588F4C0000B5
+:101AA000398B0001316A00011540FFED01A0402192
+:101AB000AF8D00348E4E00003C0C08008D8C045C11
+:101AC0003C0A08008D4A045801C86823018D28216A
+:101AD0000000582100AD302B014B20210086102141
+:101AE0003C010800AC25045C3C010800AC22045811
+:101AF0008F4501088F44010030A92000AF85000008
+:101B0000AF84000C1120000A00A030213C0708001F
+:101B10008CE7042C24EF00013C010800AC2F042CBE
+:101B20003C104000AF5001380A0001900000000056
+:101B300030B002001600001424110F0010910012A2
+:101B400024070D001087023330B000065200FFF565
+:101B50003C104000936D0000240C001031A600F0F2
+:101B600010CC0269240E007010CE02DD8F8B0014A1
+:101B700025670001AF8700143C104000AF500138CA
+:101B80000A00019000000000974801041100FFE5E1
+:101B90003C10400030B84000170000A200000000D8
+:101BA0008F5901780720FFFE8F870038240900082D
+:101BB000240508008CE30008AF450178A7490140DF
+:101BC000A7400142974201048F8600003049FFFF81
+:101BD00030DF000113E002D5012040212524FFFE63
+:101BE000240A0002A74A01463088FFFFA7440148A3
+:101BF0003C0B08008D6B043C156002C48F8F000CF9
+:101C000030C30020146000022404000924040001F1
+:101C100030CD0C00240C040051AC000134840004CD
+:101C2000A744014A3C0508008CA504203C0200485A
+:101C30003C19000100A2F82530D8000203F928253C
+:101C400013000004000018213C04010000A4282512
+:101C50002403000130CA000451400005AF8300088E
+:101C60003C06001000A6282524030001AF830008CD
+:101C7000AF45100000000000000000000000000060
+:101C8000000000008F8300081060002300000000A7
+:101C90008F4B10000561FFFE000000001060001E69
+:101CA000000000008F4D10003C03002001A36024C1
+:101CB000118000198F8F000031EE000211C0001654
+:101CC00000000000975010141600001300000000E0
+:101CD0009745100830BFFFFF27F800060018C8829C
+:101CE0000019308000C7282133110001330300039D
+:101CF000122003208CA200000000000D00C7F82174
+:101D0000AFE200003C1908008F390430272600019B
+:101D10003C010800AC2604308F6A00003405FFFF48
+:101D2000AF8A00048CE200001045029A00002021D6
+:101D30008CE5000030BF010013E0027E010020218D
+:101D40003C0708008CE704743C1008008E10044C1B
+:101D500000E858213C1808008F1804700168882B8F
+:101D60003C0808008D080448000078210204602126
+:101D7000030F18210184702B010F6821007150217D
+:101D800001AE10213C010800AC2C044C3C010800C1
+:101D9000AC2204483C010800AC2B04743C01080050
+:101DA000AC2A04708F8D00180120302131290007E2
+:101DB00025AE000831C21FFF03426021AF8D001C19
+:101DC000AF820018259B4000AF4200841120000321
+:101DD0008F90002024C800073106FFF88F84002868
+:101DE00000D0282100A4782B15E00002AF90002439
+:101DF00000A4282303452021340380000083102100
+:101E00003C061000AF850020AF820038AF4500804F
+:101E1000AF4601788F8B0014256700010A0001DDB1
+:101E2000AF8700148F6200088F6700002411003014
+:101E30000007C602330300F0107100A2241900400D
+:101E40001479FF4B8F8B00148F4A01780540FFFEF9
+:101E500030A7020014E00003000512820000000D0C
+:101E6000000512823050000300104900013070213B
+:101E7000000E688001B06021000C58800173802141
+:101E80008E08000015000002000000000000000D98
+:101E90008F6F000405E202B192030006920700056D
+:101EA000920F00043C0200010007288000B060216E
+:101EB0008D8900182771000825EE00050122682190
+:101EC000000E3082AD8D0018022020210E0005800A
+:101ED00026050014920B00068F7F00043C087FFF4C
+:101EE000000B2080009130218CC30004350AFFFFD5
+:101EF00003EAC8240079C021ACD800049207000589
+:101F000092090004960D00080007288000B1F8210E
+:101F10008FEF0000974201043C07FFFF01E75024C8
+:101F2000304EFFFF01C96021018D58233168FFFF4A
+:101F300001482025AFE400009203000724190001A6
+:101F4000107902692406000310660279000000007F
+:101F50008E190010241F000AA75F0140A7590142F3
+:101F6000920300048F86000024070001A743014468
+:101F7000A74001469758010430D100023C050041BA
+:101F8000A758014800001821A747014A1220000362
+:101F900030CA00043C050141240300015140000502
+:101FA000AF8300083C08001000A828252403000186
+:101FB000AF830008AF4510000000000000000000E3
+:101FC00000000000000000008F8B0008116000047A
+:101FD000000000008F4410000481FFFE000000009C
+:101FE0008F6A0000920700043C0508008CA5044499
+:101FF000AF8A0004975F01043C0F08008DEF044096
+:1020000030E300FF33F9FFFF0079C02100B86821F9
+:102010000000102124E6000A30C8FFFF01B8482B59
+:1020200001E2702101C96021311000073C01080064
+:10203000AC2D04443C010800AC2C04401200000309
+:102040008F8D0018250B00073168FFF8010D7021F6
+:1020500031CC1FFFAF8D001CAF8C0018AF4C00843B
+:1020600097440104034C80213084FFFF308800072F
+:1020700011000003261B4000248900073124FFF8CB
+:102080008F8200208F850028008220210085782BF8
+:1020900015E00002AF82002400852023034488213C
+:1020A00034058000022510213C061000AF8400207A
+:1020B000AF820038AF440080AF4601780A00028545
+:1020C0008F8B00148F5F017807E0FFFE30AA0200BB
+:1020D00015400003000542820000000D0005428209
+:1020E000310200030002710001C26821000D60800E
+:1020F000018248210009288000B380218E0B000056
+:1021000011600002000000000000000D8F6F000C45
+:1021100005E001F38F87003824190001AE19000093
+:102120008CE30008A20000078F78000400181C024E
+:10213000306600FF24D10005001130832CC400411B
+:1021400014800002A20300040000000D8F6B000445
+:102150003C0EFFFF00E028213164FFFF248F000BBD
+:10216000000F408200081080004748218D2D00009C
+:1021700026040014A60B000801AE60240E000580A2
+:10218000AD2C00008F5F01083C0A100003EA3824E0
+:1021900010E001A30000000097460104920300072D
+:1021A00024D1FFEC346500023224FFFFA2050007B2
+:1021B000960600082CC7001354E0000592030007A0
+:1021C000920A0007355F0001A21F00079203000773
+:1021D000240B0001106B01BA24090003106901CD22
+:1021E0008F88003830CFFFFF25E400020004C88349
+:1021F000333F00FF001F2880A219000500A85821C6
+:102200008D780000975101043C03FFFF0303602415
+:102210003222FFFF004F702325CDFFFE018D4825A0
+:10222000AD690000920600053C02FFF6344EFFFF48
+:1022300030CA00FF000A388000F020219099001475
+:102240003C1FFF7F37E7FFFF3323000F0066782135
+:1022500031F800FF0018288000B088218E2D002062
+:1022600000A86021A20F000601AE4824AE0D000CAC
+:10227000AD89000C920B00068E04000C0127F82497
+:10228000000B50800150C821972600260148C0212C
+:1022900000874024AF260024AE08000CAF3F00208A
+:1022A000AF0600108F860000240C001024090002E5
+:1022B000A74C0140A7400142A7400144A74901465D
+:1022C000974B01042407000130C80002256AFFFE75
+:1022D000A74A01483C050009A747014A110000032D
+:1022E000000018213C0501092403000130CD000441
+:1022F00051A00005AF8300083C06001000A6282569
+:1023000024030001AF830008AF4510000000000067
+:10231000000000000000000000000000921800040F
+:1023200027110002322F0007000F1023304E000744
+:10233000AE0E00108F900008120000040000000094
+:102340008F4310000461FFFE000000008F78000042
+:102350008F8F00183C1008008E100444AF980004C2
+:102360009751010425E6001030CA1FFF3222FFFFFB
+:10237000AF8F001CAF8A0018AF4A00842449FFFECB
+:102380003C0B08008D6B0440974E0104012068212E
+:10239000000967C3020D282131C9FFFF00AD402BA2
+:1023A000016C382100E82021034AF8213139000767
+:1023B0003C010800AC2504443C010800AC24044066
+:1023C0001320000327FB4000252300073069FFF896
+:1023D0008F9F00208F840028013F382100E4C82B04
+:1023E00017200002AF9F002400E438230347202178
+:1023F00034058000008510213C061000AF870020C6
+:10240000AF820038AF470080AF4601780A000285EE
+:102410008F8B0014975801041300FDC23C1040003C
+:102420008F4301780460FFFE30B9400013200003A1
+:102430003C0400080000000D3C040008AF440140CB
+:1024400024080800AF4801788F8B0000974A0104E8
+:10245000317F000113E000E93146FFFF24D0FFFE89
+:10246000240C0002A74C0146A75001488F8F00188A
+:102470002405000DA745014A8F71000025E20008E0
+:1024800030491FFF0349702130CD0007AF91000490
+:10249000AF8F001CAF89001800C03821AF490084FD
+:1024A00011A0000325DB400024C6000730C7FFF859
+:1024B0008F9800208F84002800F8302100C4382B2A
+:1024C00014E00002AF98002400C430238F8A001467
+:1024D00003465821340880000168F821255900017D
+:1024E0003C0310003C104000AF860020AF9F003836
+:1024F000AF460080AF430178AF990014AF50013868
+:102500000A000190000000008F6900009744010458
+:102510003127FFFF3088FFFF8F4F017805E0FFFE76
+:1025200030FF0007001F18233078000724E6FFFE65
+:102530002419000AA7590140A7580142A74601449F
+:10254000A7400146A74801488F42010830510020AA
+:1025500016200002240300092403000130AA00020F
+:10256000A743014A3C040041114000030000182128
+:102570003C0401412403000130AB0004516000051C
+:10258000AF8300083C0500100085202524030001CE
+:10259000AF830008AF4410000000000000000000FE
+:1025A00000000000000000008F90000812000004EE
+:1025B000000000008F4C10000581FFFE00000000AD
+:1025C0008F780000276200088F8D003CAF980004D0
+:1025D000944600089451000A944F000C30CEFFFF3F
+:1025E0000011240031E9FFFF11CD00A20089202550
+:1025F0003C0308008C6304443C1808008F18044016
+:1026000000E85021255FFFFE007F782100001021A7
+:1026100001FF302B03028821022648213C010800DB
+:10262000AC2F04443C010800AC29044024EB000812
+:102630003162FFFF3047000710E000038F8500186C
+:10264000245000073202FFF83106FFFF30C80007B0
+:102650000045702131CD1FFF034D6021AF85001C67
+:10266000AF8D0018259B4000AF4D00841100000382
+:102670008F8F002024C400073086FFF88F84002845
+:1026800000CF282100A4482B15200002AF8F002482
+:1026900000A42823AF850020AF4500803C1108002E
+:1026A0008E3104340345C0213402800003023021FE
+:1026B00012200005AF860038938300172419000EFE
+:1026C0001079000D241F043F3C0A1000AF4A017826
+:1026D0008F8B0014256700010A0001DDAF8700140D
+:1026E0000E0005A63C1040008F8B001425670001EA
+:1026F0000A0001DEAF8700143C0A1000A75F014802
+:10270000AF4A01780A0004B48F8B0014240E0F0026
+:1027100011EE003D30D100201620000224030009F4
+:10272000240300010A000208A743014A0A0001FB32
+:10273000A740014694E5000894E2000A94EB000CDF
+:102740008F86003C0002FC00316AFFFF30B9FFFFBA
+:102750001326003703EA20253C0508008CA5044415
+:102760003C1F08008FFF04400000502100A83821C2
+:1027700000E8302B03EAC8210326C0213C010800F1
+:10278000AC2704443C010800AC3804400A0002694C
+:102790008F8D00183C1908008F39047C3C03080019
+:1027A0008C6304543C0608008CC604783C0F080077
+:1027B0008DEF0450032838210068682100E8C02B01
+:1027C00000C4882101A8402B01E47021023858215F
+:1027D00001C860213C010800AC2D04543C010800F4
+:1027E000AC2C04503C010800AC27047C3C010800E0
+:1027F000AC2B04780A0002698F8D0018A7400146AF
+:102800000A00041B8F8F001830D000201600FFC56F
+:102810002403000D240300050A000208A743014A0F
+:10282000975901042738FFF00A00036B3304FFFFB8
+:102830008F8C0040148CFFC8000080213C110800E0
+:102840008E31046C3C0408008C84046802287021DA
+:1028500001C8782B00904021010F68213C0108003D
+:10286000AC2E046C3C010800AC2D04680A0002691F
+:102870008F8D00188F9900401499FF5D0000602132
+:102880003C0508008CA5046C3C1008008E10046800
+:1028900000E82021248EFFFE00AEF82103EE582B25
+:1028A000020C5021014B18213C010800AC3F046C84
+:1028B0003C010800AC2304680A00048B24EB0008E8
+:1028C0008F8800383C02FFFF8D0E000C01C2682487
+:1028D00001A46025AD0C000C0A00037930CFFFFF86
+:1028E0000A0003A9AE000000974B01049204000403
+:1028F0008E2A000C01644021251FFFF20147182495
+:1029000033F9FFFF0079C025AE38000C0A0002D46D
+:102910008E1900103C03FFFF8D11001002232824A4
+:1029200000A47825AD0F00100A00037930CFFFFF17
+:1029300097450104920600048E2F001000A6102176
+:102940002449FFEE01E76824312EFFFF01AE602528
+:10295000AE2C00100A0002D48E1900108E06000C56
+:10296000AE0000000003C080031088210A0002A608
+:10297000AE2600201460000D3050FFFF3C04FFFF26
+:102980000044602401846826000D582B000C502B55
+:10299000014B102410400002000000000000000D58
+:1029A0008CA300000A00023E006410253A11FFFFCC
+:1029B0000011782B0010702B01CF20241080000212
+:1029C000000000000000000D8CB800000A00023E6C
+:1029D0003702FFFF3084FFFF30A5FFFF10800007A4
+:1029E0000000182130820001104000020004204243
+:1029F000006518211480FFFB0005284003E0000853
+:102A00000060102110C00007000000008CA2000030
+:102A100024C6FFFF24A50004AC82000014C0FFFB05
+:102A20002484000403E000080000000010A0000857
+:102A300024A3FFFFAC86000000000000000000009F
+:102A40002402FFFF2463FFFF1462FFFA24840004C2
+:102A500003E0000800000000308EFFFF30D8FFFFC9
+:102A600000057C0001F8602539CDFFFF01AC502145
+:102A7000014C582B014B4821000944023127FFFF2C
+:102A800000E830210006240230C5FFFF00A4182111
+:102A90003862FFFF03E000083042FFFF3C0C0800F3
+:102AA0008D8C0484240BFF8027BDFFD0018450212E
+:102AB000014B4824AF4900203C0808008D080484DD
+:102AC000AFB20020AFB00018AFBF0028AFB30024F2
+:102AD000AFB1001C936600040104382130E4007F8C
+:102AE000009A10213C0300080043902130C50020CB
+:102AF000036080213C080111277B000814A000021C
+:102B0000264600702646006C92130004975101047B
+:102B1000920F00043267000F322EFFFF31ED0040AC
+:102B200001C7282311A0000500004821925900BCCC
+:102B3000333800041700009000000000924300BCEE
+:102B4000307F000413E0000F0000000010A0000D13
+:102B500000000000960E0002240AFF8000A76021FA
+:102B600025CDFFFEA74D1016920B0004014B20242B
+:102B7000308200FF10400085010C40253C0F04000E
+:102B8000010F40258F5301780660FFFE2404000AE0
+:102B9000A7440140960D00022404000931AC00074F
+:102BA000000C5823316A0007A74A0142960200022E
+:102BB0002443FFFEA7430144A7400146975F010459
+:102BC000A75F01488F5901083338002053000001E6
+:102BD00024040001920F000431EE001015C0000221
+:102BE0003483001000801821A743014A0000000030
+:102BF000000000000000000000000000AF481000CE
+:102C000000000000000000000000000000000000C4
+:102C10008F5110000621FFFE3113FFFF12600003E9
+:102C2000000000008F481018ACC800009603000692
+:102C3000307FFFFF27F90002001998820013888077
+:102C4000023B30218CD800001520005700183402B8
+:102C5000920300042405FF8000A3F82433F100FF51
+:102C60001220002C00000000924700BC30F200024D
+:102C70001240002800000000974B100C2562FFFE58
+:102C8000A7421016000000003C0A0400354900303D
+:102C9000AF4910000000000000000000000000002C
+:102CA000000000008F4C10000581FFFE00000000B6
+:102CB0009749100C8F51101C00C020213127FFFFB5
+:102CC00024F20030001218820003288000BBF82193
+:102CD0003226FFFFAFF100000E00059500112C0217
+:102CE0000013C880033B98218E7800000002740016
+:102CF000AFB800108FA80010310FFFFFAFAF00106A
+:102D00008FA4001001C46825AFAD00108FA600107D
+:102D1000AE66000097730008976D000A9766000C76
+:102D20008F8A003C000D5C0030CCFFFF3262FFFF59
+:102D3000104A0036016C2025960600023C10100057
+:102D400024D300080E0001393264FFFF974C0104C0
+:102D50000E0001473184FFFFAF5001788FBF00287C
+:102D60008FB300248FB200208FB1001C8FB00018E9
+:102D700003E0000827BD003010A0FF700000000035
+:102D800024A5FFFC0A0005CE240900048CD1000014
+:102D9000AF5110188F5301780660FF7A2404000A9F
+:102DA0000A0005E30000000000A7C8218F88003852
+:102DB0008F4E101C0019C0820018788001E8202175
+:102DC000AC8E0000000E2C0200C020210E000595E4
+:102DD00031C6FFFF023B28218CAD000000025400E9
+:102DE00000403021AFAD00108FAC0010318BFFFFE1
+:102DF000AFAB00108FA2001001424825AFA9001010
+:102E00008FA700100A000613ACA700008F8F0040A8
+:102E1000148FFFC90000000097420104960B0002C6
+:102E20003C0508008CA5046C3049FFFF316AFFFFA8
+:102E30003C1108008E310468012A382124F2FFFE7B
+:102E400000B240210012FFC30112C82B023FC02173
+:102E5000031920213C010800AC28046C3C01080047
+:102E6000AC2404680A00064D0000000000A4102BEA
+:102E700010400009240300010005284000A4102B85
+:102E800004A00003000318405440FFFC0005284044
+:102E900010600007000000000085302B14C0000205
+:102EA00000031842008520231460FFFB0005284220
+:102EB00003E00008008010218F85002C27BDFFE86B
+:102EC000000530272CC300012CA40002008310252C
+:102ED00010400003AFBF00102405007FAF85002C19
+:102EE0000005282730A5FFFF0E000574240426F5F1
+:102EF0008F830030240402BD004030210083382B32
+:102F000010E0000924050001000420400083102B7C
+:102F100004800003000528405440FFFC00042040CA
+:102F200010A0000800C350210064402B15000002CF
+:102F3000000528420064182314A0FFFB000420426F
+:102F400000C350218FBF0010000A4C02312200FF45
+:102F500027BD0018AF8A002C03E00008AF890030BD
+:102F60000A00002600000000000000000000000D24
+:102F7000747870342E362E313600000004061000AE
+:102F80000000000A000001360000EA6000000000B6
+:102F90000000000000000000000000000000000031
+:102FA0000000000000000000000000000000000021
+:102FB0000000000000000000000000000000000011
+:102FC0000000001D000000000000000000000000E4
+:102FD00000000000000000000000000000000000F1
+:102FE00000000000000000000000000000000000E1
+:102FF00000000000000000000000000010000003BE
+:10300000000000000000000D0000000D3C02080060
+:1030100024423AA03C03080024633C54AC40000026
+:103020000043202B1480FFFD244200043C1D0800B7
+:1030300037BD7FFC03A0F0213C100800261000984B
+:103040003C1C0800279C3AA00E000305000000006D
+:103050000000000D8F8300383C08800035070070A9
+:103060008CE50000008330253C02900000C2202542
+:10307000AF850030AF4400208F4900200520FFFEBF
+:103080003C038000346200708C4500008F86003065
+:103090003C1908008F39007C3C0E08008DCE00786A
+:1030A00000A6202303245821000078210164682B06
+:1030B00001CF6021018D50213C010800AC2B007C28
+:1030C0003C010800AC2A007803E000080000000082
+:1030D0000A00003D240400018F8400383C05800074
+:1030E00034A200010082182503E00008AF4300204D
+:1030F00003E00008000010213084FFFF30A5FFFF2F
+:1031000010800007000018213082000110400002EA
+:1031100000042042006518211480FFFB00052840B0
+:1031200003E000080060102110C00007000000004C
+:103130008CA2000024C6FFFF24A50004AC8200007E
+:1031400014C0FFFB2484000403E00008000000001A
+:1031500010A0000824A3FFFFAC86000000000000C0
+:10316000000000002402FFFF2463FFFF1462FFFA47
+:103170002484000403E0000800000000308AFFFF00
+:1031800093A80013A74A014497490E1630C600FFC2
+:103190003C021000A7490146AF450148A346015231
+:1031A000A748015AAF4701608FA400188FA30014ED
+:1031B000A7440158AF43015403E00008AF4201782F
+:1031C00003E00008000000003C038000346200704F
+:1031D0008C4900008F88003C2484000727BDFFF83D
+:1031E0003084FFF8AF890030974D008A31ACFFFF83
+:1031F000AFAC00008FAB0000016850232547FFFFF4
+:1032000030E61FFF00C4282B14A0FFF73C0C800001
+:10321000358B00708D6A00003C0708008CE7008445
+:103220003C0608008CC60080000810820149182363
+:103230000002788000E370210000202101C3C82B28
+:1032400000C4C02101FA4021031948212502400091
+:1032500027BD00083C010800AC2E00843C0108009A
+:10326000AC29008003E00008000000008F82003CD1
+:103270002486000730C5FFF800A2182130641FFF24
+:1032800003E00008AF84003C3C0E20FF27BDFFE0B8
+:103290003C1A80003C0F800835CDFFFDAFBF001801
+:1032A000AFB10014AFB00010AF8F0044AF4D0E00AF
+:1032B000000000000000000000000000000000000E
+:1032C000000000003C0C00FF358BFFFDAF4B0E00F3
+:1032D0003C0660048CC95000240AFF7F3C1160004A
+:1032E000012A40243507380CACC750008E2404381E
+:1032F00024050009AF4500083083FFFF38622F71B5
+:103300002450C0B3AF80004C0E000064AF80003C7E
+:1033100052000001AE20442C0E00046000000000AA
+:103320008FBF00188FB100148FB000100A000E7705
+:1033300027BD002027BDFFD0AFB20028AFB10024C9
+:10334000AFBF002CAFB00020936200080080902136
+:1033500000A088211440002D240400100E00009AC3
+:10336000000000008F8E004C3C10320031C600FF80
+:1033700000067C0001F0602525CD0001AF8D004CDA
+:10338000AC4C0000936B00099369000A316A00FF9E
+:10339000000A3C00312800FF00E82025AC4400046E
+:1033A0008F83004C06400043AC430008AC40000C47
+:1033B000979800403305000814A000022628000654
+:1033C0002628000297420E148F450E1C8F670004BA
+:1033D000937F00023044FFFF33F900FFAFB90010C4
+:1033E0008F710014AFA800180E000087AFB1001451
+:1033F0008FBF002C8FB200288FB100248FB0002027
+:10340000240400100A0000C327BD0030936900099E
+:103410009368000B312300FF310200FF006280211E
+:10342000261F000A33F0FFFF0E00009A0200202141
+:103430008F86004C3C0D410024D90001AF99004C0F
+:103440009378000930C600FF00067400330500FFC2
+:1034500024AF000201CF6025018D5825AC4B000040
+:103460008F6A000C97440E1401523825AC470004B3
+:103470008F450E1C8F670004936900023084FFFFA4
+:10348000312800FFAFA800108F630014AFB10018FF
+:103490000E000087AFA30014020020218FBF002C74
+:1034A0008FB200288FB100248FB000200A0000C323
+:1034B00027BD00303C1280000A000114AC52000C01
+:1034C00027BDFFD8AFB3001CAFBF0020AFB20018BC
+:1034D000AFB10014AFB00010936200081440008137
+:1034E00000809821AF60000C9785004030A4400018
+:1034F0001080008B2403001624104007A363000AE9
+:10350000AF700014938F00428F6C001431EE0007EF
+:10351000000E6A40018D5825AF6B0014978A004059
+:103520008F6800143149001001093825AF67001475
+:103530009786004030C300085060008D00002821AD
+:103540008F6600143C0310003C02810000C3282554
+:10355000AF65001497440E0A2418000E3405FFFCD2
+:10356000309FFFFF03E2C825AF790004A378000273
+:103570009372000A26510004A371000A9783004049
+:103580009364000A30661F00000611830044F8218E
+:1035900027F90028A379000997580E0CA778001086
+:1035A0009372000926510002323000070010782380
+:1035B00031EE0007A36E000B936D0009976C0010AD
+:1035C0008F9000349789004031AB00FF016C50218F
+:1035D000014540213127004010E000053105FFFF83
+:1035E00000B0382B3C06800010E000140000882159
+:1035F0000205402B15000033000020218F4A0E14D5
+:10360000AF4A0E108F490E1CAF490E18AF450E0081
+:103610008F4C0000318B00081160FFFD000000009E
+:10362000974D0E0800A0802100003021A78D00409A
+:103630008F450E0424110001AF850034976E0010F1
+:1036400031D2FFFF8E640000009010231440000967
+:10365000AE6200008F6A00148F8700483549004031
+:10366000AF6900148F480E10ACE800208F430E188D
+:10367000ACE3002400C020210E0000F50200282148
+:103680008E66000014C00005000000008F6B00145F
+:10369000240CFFBF016C9824AF7300148F6D000CD5
+:1036A00001B22821AF65000C937200081640000398
+:1036B000000000001620003100000000A371000887
+:1036C000020020218FBF00208FB3001C8FB2001892
+:1036D0008FB100148FB000100080102103E00008AB
+:1036E00027BD00288F900034979100403C06800051
+:1036F00002009021322F004015E0FFD20000882107
+:10370000977F00108F98003433F9FFFF1738FFEDD3
+:1037100000002021000030210A0001B9241100011D
+:103720002403000E24104007A363000AAF700014A6
+:10373000938F00428F6C001431EE0007000E6A4038
+:10374000018D5825AF6B0014978A00408F680014D4
+:103750003149001001093825AF67001497860040F1
+:1037600030C300081460FF7600000000000028212C
+:10377000AF6000040A000187A36000028F6F00148D
+:103780003C19EFFF3738FFFE01F870240A0001D71B
+:10379000AF6E00148F8700388F8A004427BDFFE08A
+:1037A0008F860048AFB00018AFBF001C8F450104E2
+:1037B0008D4900ACAF4700808CC8002000A9382399
+:1037C00000008021AF480E108F440E1000004821E9
+:1037D000AF440E148CC20024AF420E188F430E1853
+:1037E000AF430E1C10E000362D390001936B00082A
+:1037F0001160004F00000000976E001031CDFFFFF8
+:1038000000ED602B1580004A000000009778001042
+:10381000330FFFFFAF4F0E008F5F000033F900083A
+:103820001320FFFD0000000097420E088F460E0493
+:103830003045FFFF30A300011060008A0000000047
+:103840000000000D30A8A040240400401104003BFB
+:1038500030A9A0001120008500000000936C000832
+:103860005180000927A40010976F001031EEFFFF70
+:1038700000CE682B11A0000427A4001030B800402F
+:103880001300007A00000000AFA70010A7850040D9
+:10389000AF8600340E0001580000000000404821AF
+:1038A0001440FFD08FA700108F420E148F84004861
+:1038B000AC8200208F470E1CAC8700242D390001FC
+:1038C0000330302510C000178FBF001C8F840038D4
+:1038D00024100F0010900085000000008F4F017829
+:1038E00005E0FFFE24180F001098006F0000000094
+:1038F0008F470E14240202403C101000AF470144D1
+:103900008F490E1CAF490148A3400152A740015AFC
+:10391000AF400160A7400158AF420154AF50017859
+:103920008FBF001C8FB0001803E0000827BD0020E7
+:10393000AF470E000A00022E000000008F490178F8
+:103940000520FFFE240A08008F84003CAF4A01785E
+:103950009758008A330FFFFF01E4702325CDFFFF46
+:1039600031AC1FFF2D8B00081560FFF9000000002F
+:103970008F83004C8F9F003800C0482103442021D2
+:103980002466000124190F00AF86004C306A00FF46
+:1039900000E938232486400013F9000524080001BB
+:1039A000938B004231680007000812403448000140
+:1039B000000A7C003C18010001F87025AC8E400024
+:1039C0008F8D004C30AC003630A40008ACCD000424
+:1039D0001080002E010C3025974D0E0A8F8C003C74
+:1039E0003C02810031A4FFFF258B000800824025A6
+:1039F0003C03100031651FFF25390006241F000E0F
+:103A0000AF48016000C33025A75F015AAF85003C75
+:103A1000A759015814E0000A8F9F003824050F00B1
+:103A200053E500022410000134C600408F430E10FD
+:103A30008F880048AD0300208F4B0E18AD0B00247B
+:103A40008F420E14AF4201448F440E1CAF44014814
+:103A5000A34A01523C0A1000AF4601540A00022159
+:103A6000AF4A017814C0FF7830A8A0408F420E14EE
+:103A70008F84004800004821AC8200208F470E1C34
+:103A8000AC8700240A0002582D3900018F98003CB1
+:103A900025390002A7590158270F000831EE1FFFF2
+:103AA0000A0002ADAF8E003CAF40014C1120002C4B
+:103AB000000000008F460E10AF4601448F430E18E1
+:103AC000240200403C101000AF430148A3400152C3
+:103AD000A740015AAF400160A7400158AF420154CE
+:103AE000AF5001780A0002718FBF001C1120000640
+:103AF00000000000975F0E0833E5004014A00002AC
+:103B0000000000000000000D8F4801780500FFFE56
+:103B100000000000974E0E103C0D0500240320000D
+:103B200031CCFFFF018D1025AF42014C8F440E14A4
+:103B30003C0B1000AF4401448F4A0E1CAF4A0148B1
+:103B4000A34001528F840038A740015AAF40016062
+:103B5000A7400158AF4301540A00025FAF4B017800
+:103B60008F590E14AF5901448F430E1C0A0002D91D
+:103B70002402004027BDFFE0AFB20018AFB100142F
+:103B8000AFB00010AFBF001C0E0000CA0000000064
+:103B90003C0280008F8A0044345000703C120800C0
+:103BA00026523B70020088218E0800008F450000DD
+:103BB00038A400013083000110600017AF88003086
+:103BC000022048218D2C00003C0208008C42006C31
+:103BD0003C1808008F1800680188182300436821EA
+:103BE0000000C82101A3782B0319702101CF4021C7
+:103BF0003C010800AC2D006C3C010800AC280068BA
+:103C00008F4B00003967000130E6000114C0FFED62
+:103C100001804021AF8C00308E1800003C0E08005F
+:103C20008DCE006C3C0C08008D8C00680308782356
+:103C300001CF28210000402100AF302B01885821FE
+:103C4000016620213C010800AC25006C3C01080005
+:103C5000AC2400688F49010025470088AF870048E1
+:103C6000AF890038AF4900208E070000AF870030D1
+:103C70008F5901780720FFFE000000008E0F000022
+:103C80003C0D08008DAD00743C0C08008D8C00705C
+:103C900001E7702301AE28210000302100AE582B2F
+:103CA00001862021008B3821240908003C010800EE
+:103CB000AC2500743C010800AC270070AF490178C6
+:103CC00093430108A383004293820042305F0001C6
+:103CD00017E000158F830038241F0D00107F001996
+:103CE00024020F001062001D000000009147000038
+:103CF0002403005030E900FF112300043C0540007C
+:103D0000AF4501380A000312000000000E0008DA77
+:103D1000000000008F8A00443C054000AF45013898
+:103D20000A00031200000000939900423338000695
+:103D3000001851000E00020D0152D8210A00036E36
+:103D40008F8A00443C1B0800277B3BF00E00020DCD
+:103D5000000000000A00036E8F8A00443C1B08002C
+:103D6000277B3C100E00020D000000000A00036ECD
+:103D70008F8A004490AA00018FAB00108CAC001019
+:103D80003C0300FF8D680004AD6C00208CAD001476
+:103D900000E060213462FFFFAD6D00248CA70018A5
+:103DA0003C09FF000109C024AD6700288CAE001C4F
+:103DB0000182C82403197825AD6F0004AD6E002C74
+:103DC0008CAD0008314A00FFAD6D001C94A90002C3
+:103DD0003128FFFFAD68001090A70000A560000229
+:103DE000A1600004A167000090A30002306200FF00
+:103DF0000002198210600005240500011065000E04
+:103E00000000000003E00008A16A00018CD800282F
+:103E1000354A0080AD7800188CCF0014AD6F0014C7
+:103E20008CCE0030AD6E00088CC4002CA16A00015D
+:103E300003E00008AD64000C8CCD001CAD6D0018D3
+:103E40008CC90014AD6900148CC80024AD6800084A
+:103E50008CC70020AD67000C8CC200148C830064FA
+:103E60000043C82B13200007000000008CC2001480
+:103E7000144CFFE400000000354A008003E0000815
+:103E8000A16A00018C8200640A0003C400000000E3
+:103E900090AA000027BDFFF88FA9001CA3AA00006C
+:103EA0008FAE00003C0FFF808FA8001835E2FFFFA7
+:103EB0008CCD002C01C26024AFAC0000A120000416
+:103EC00000E06021A7A000028FB800008D27000449
+:103ED0000188182100A0582100C05021006D28261B
+:103EE0003C06FF7F3C0F00FF2CAD000135EEFFFFCD
+:103EF00034D9FFFF3C02FF0003193024000D1DC020
+:103F0000010EC82400E2C02400C3702503197825DF
+:103F1000AD2E0000AD2F00048D450024AFAE000093
+:103F2000AD2500088D4D00202405FFFFAD2D000CB0
+:103F3000956800023107FFFFAD2700109166001859
+:103F400030C200FF000219C2506000018D450034EC
+:103F5000AD2500148D67000827BD0008AD27001CA3
+:103F60008C8B00CCAD2C0028AD20002CAD2B002478
+:103F7000AD20001803E00008AD20002027BDFFE0C1
+:103F8000AFB20018AFB10014AFB00010AFBF001C4B
+:103F90009098000000C088213C0D00FF330F007F87
+:103FA000A0CF0000908E000135ACFFFF3C0AFF005F
+:103FB000A0CE000194A6001EA22000048CAB001429
+:103FC0008E29000400A08021016C2824012A4024AD
+:103FD0000080902101052025A6260002AE240004C1
+:103FE00026050020262400080E0000722406000288
+:103FF00092470000260500282624001400071E0012
+:104000000003160324060004044000032403FFFFFA
+:10401000965900023323FFFF0E000072AE230010FA
+:10402000262400248FBF001C8FB200188FB100140B
+:104030008FB0001024050003000030210A00007C2E
+:1040400027BD002027BDFFD8AFB1001CAFB00018BE
+:10405000AFBF002090A80000240200018FB0003CF8
+:104060003103003F00808821106200148FAA0038BD
+:10407000240B0005506B0016AFAA001000A02021F1
+:1040800000C028210E00040702003021922400BC49
+:10409000308300021060000326060030ACC0000030
+:1040A00024C600048FBF00208FB1001C8FB0001801
+:1040B00000C0102103E0000827BD0028014038217E
+:1040C0000E000385AFB000100A00044B0000000092
+:1040D0000E0003CCAFB000140A00044B0000000037
+:1040E0003C02000A034218213C04080024843B08D7
+:1040F0002405001A000030210A00007CAF83002C48
+:104100003C038000346200708C48000000A05821FD
+:1041100000C04821308A00FFAF8800308F4401780A
+:104120000480FFFE3C0C8000358600708CC50000CA
+:104130003C0308008C6300743C1808008F18007062
+:1041400000A82023006468210000C82101A4782B66
+:104150000319702101CF60213C010800AC2D0074CF
+:104160003C010800AC2C00708F480E14AF4801448D
+:10417000AF47014CA34A0152A74B0158934601088F
+:1041800030C5000854A0000135291000934B0900E8
+:1041900024070050316A00FF1147000700000000AB
+:1041A0008F450E1CAF450148AF4901543C09100032
+:1041B00003E00008AF490178934D010831A80008D9
+:1041C0001100001000000000934F010831EE0010B4
+:1041D00051C00001352900083C04080090843B6C64
+:1041E000A34401508F4309A4AF4301488F4209A063
+:1041F000AF420144AF4901543C09100003E00008FC
+:10420000AF4901783C1908008F393B283338000842
+:104210005700FFF1352900080A00049E0000000045
+:1042200024070040AF470814AF4008108F420944EC
+:104230008F4309508F4409548F45095C8F46094CC0
+:10424000AF820064AF830054AF840050AF85005C40
+:1042500003E00008AF8600609346010930C5007F87
+:10426000000518C0000521400083102103E000086C
+:10427000244200883C0A0800914A3B2D3C09080072
+:1042800095293B263C051100000A3C002528000228
+:1042900000E8302500C5182524820008AC83000002
+:1042A00003E00008AC8000048F4A002C974D0908F9
+:1042B0003C0E000E034E382131ACFFFF000C41C014
+:1042C000AF48002C9743090894EB001A0080402166
+:1042D000240200013169FFFFAC8900008CE6001C5C
+:1042E00000A05821AC8600048CE40020AD04000836
+:1042F00090E30019306300031062003E00000000EC
+:104300002865000214A00071240F0002106F004CF9
+:104310000000000024180003107800550000000081
+:104320003C09080095293B1C93430934934F09210C
+:104330003C05080094A53B22306400FF94EE002A5F
+:104340000004688231EC00FF978F0058000DC60012
+:10435000000CCC003127FFFF0319102500A73021E6
+:104360000046202501CF68213C03400000836025E2
+:10437000000D4C00AD090004AD0C0000935909205C
+:104380003C1800062509001400193E0000F82825F5
+:10439000AD0500088F4E092C25E6000130C27FFFD5
+:1043A000AD0E000C8F440930A7820058250200286A
+:1043B000AD0400108F4D0938AD0D0014AD2B000475
+:1043C0008F4C0940AD2C0008934309373C19080075
+:1043D00093393B2CAD200010000347000019C400A6
+:1043E000011858253567FFFFAD27000C03E00008D2
+:1043F000AF4A002C3C09080095293B1C3C0D0800E5
+:1044000095AD3B263C0C0800958C3B1894E40024A9
+:10441000312EFFFF01AE302100CC18230004CC0068
+:104420002462FFF20322C025240F0800AD18000CFF
+:10443000AD0F0014AD0000100A0004F225080018AA
+:1044400094E5002494EE00283C09080095293B1CC3
+:1044500000056C00000E640035A68100358408005C
+:10446000AD06000CAD0400100A0004F2250800148B
+:104470003C09080095293B1C3C0F080095EF3B26A2
+:104480003C06080094C63B1894E400243125FFFF45
+:1044900094ED002801E5702101C660230004CC00E2
+:1044A000000D1C002582FFEE006278253738810060
+:1044B00024050800AD18000CAD0F0010AD05001864
+:1044C000AD0000140A0004F22508001C1460FF94DB
+:1044D0000000000094E300243C09080095293B1CDF
+:1044E0000003140034590800AD19000C0A0004F24E
+:1044F0002508001003E00008240201F427BDFFE8AE
+:10450000AFB00010AFBF00140E00005C008080212F
+:1045100024050040AF4508148F8300548F84005059
+:104520008F85005C0070182100641023184000047F
+:10453000AF830054AF6300548F660054AF860050C1
+:104540001200000C000000008F440074936800818A
+:104550003409FA002D07000710E00005008910213A
+:10456000936C0081240B01F4018B50040144102151
+:10457000AF62000C8F4E095C01C5682319A00004CE
+:104580008FBF00148F4F095CAF8F005C8FBF00148A
+:104590008FB000100A00005E27BD00188F840064F1
+:1045A0008F8300548F820050AF640044AF6300508B
+:1045B00003E00008AF6200543C03800034620070E6
+:1045C0008C43000027BDFFF8308700FF30A900FFB3
+:1045D00030C800FFAF8300308F4401780480FFFEB5
+:1045E0003C028000345900708F380000A3A70003FC
+:1045F0003C0708008CE700748FAC00003C06080004
+:104600008CC60070030378233C0E7FFF00EFC821A7
+:1046100035CDFFFF00005021018D282400CA18214C
+:10462000000847C0032F202B00A810250064C021DC
+:10463000AFA200003C010800AC3900743C01080046
+:10464000AC380070934F010AA3A000023C0E80FF1B
+:10465000A3AF00018FAC0000312B007F35CDFFFFF1
+:10466000018D4824000B5600012A40252407300004
+:104670002406FF803C05100027BD0008AF48014C10
+:10468000AF470154A7400158A346015203E0000878
+:10469000AF45017827BDFFE8AFBF0014AFB00010F1
+:1046A0008F6500743C068000309000FF00A6202536
+:1046B0000E00005CAF640074936300053462000870
+:1046C0000E00005EA3620005020020218FBF0014CF
+:1046D0008FB0001024050005240600010A0005968D
+:1046E00027BD001827BDFFE03C038000AFB00010DD
+:1046F000AFBF0018AFB10014346200708C470000E7
+:10470000309000FF30A800FFAF8700308F44017861
+:104710000480FFFE3C188000371100708E2F0000CF
+:104720003C0D08008DAD00743C0A08008D4A0070F5
+:1047300001E7702301AE28210000582100AE302B84
+:10474000014B4821012638213C010800AC250074AA
+:10475000000088213C010800AC2700701100000F08
+:10476000000000008F6200742619FFFF3208007FEE
+:104770000002FE0233E5007F15000006332200FF31
+:104780002407FF800207202624A3FFFF0083802543
+:10479000320200FF00408021241110080E00005C4E
+:1047A000000000008F4908183125000414A0FFFD07
+:1047B0003218007F001878C00018714001CF6821BE
+:1047C00025AC0088AF4C0818274A09808D4B002083
+:1047D000AF4B01448D460024AF460148A350015021
+:1047E0000E00005EA7400158022010218FBF001864
+:1047F0008FB100148FB0001003E0000827BD002027
+:1048000027BDFFE8308400FFAFBF00100E0005E1B8
+:1048100030A500FF8F8300548FBF00103445004047
+:104820002404FF903C02100027BD0018AF43014C48
+:10483000A3440152AF45015403E00008AF420178A0
+:1048400027BDFFE8AFBF0014AFB000109345093F8C
+:10485000240200063C08080095083B2230A300FF14
+:104860002487FFD8240500041062003624060002C5
+:10487000974E093C3C0D02040006340031CCFFFF8A
+:10488000018D5825AC8B0000934A093E3149002028
+:104890001120000800000000935F09363C19010355
+:1048A0003738030033F000FF02187825240500088C
+:1048B000AC8F000493580934934D09213C104000FB
+:1048C000330E00FF000E608231AB00FF000C56007B
+:1048D000000B1400014218250068F82503F0C825D4
+:1048E000AC99FFD8935809378F4C09488F4D094030
+:1048F00000057882330E00FF01CF5821018D282357
+:10490000000B57000146102530A3FFFF0043402550
+:10491000000F488001273021ACE800200E00005C29
+:1049200024D00028240400040E00005EA364003F8D
+:10493000020010218FBF00148FB0001003E00008A8
+:1049400027BD00180A0006442406001227BDFFD028
+:1049500024090010AFB50024AFB40020AFB3001C91
+:10496000AFB10014AFB000103C010800A0293B2CEF
+:10497000AFBF0028AFB2001897480908309400FF75
+:104980003C02000E3107FFFF000731C0AF46002C8C
+:10499000974409089344010B30B300FF0342802180
+:1049A000308300300000A821106000E4000088215E
+:1049B000240C00043C010800A02C3B2C934B093E26
+:1049C000000B5600000A2E0304A001310000000075
+:1049D000AF4000489352010B324F002011E0000617
+:1049E00000000000935F093E001FCE000019C603BF
+:1049F00007000148000000009346010B30C2004050
+:104A0000104000038F9200548F87005424F2FFFF60
+:104A1000960A002C9345093493490937A78A005810
+:104A200030A600FF312700FF00071080004620213C
+:104A30000091F8213C010800A43F3B22920300189A
+:104A40003C010800A4203B1C3C010800A4203B18AA
+:104A5000307000FF03F04021250B000A3170FFFF8A
+:104A60003C010800A4283B243C010800A4283B2664
+:104A70000E00009A020020210E0004C500402021F3
+:104A80008F4B002C975809083C19000E0359402100
+:104A9000330FFFFF000F71C0AF4E002C9743090882
+:104AA000950D001A241100010040382131ACFFFFA0
+:104AB000AC4C00008D0A001CAC4A00048D0500209F
+:104AC000AC4500089109001931230003107100BDA5
+:104AD0002871000216200103240C0002106C00F55E
+:104AE000240D0003106D00CA000000003C090800FE
+:104AF00095293B1C93430934935809213C0A08002B
+:104B0000954A3B22306400FF950C002A0004F8828D
+:104B1000331900FF97980058001F760000197C0099
+:104B20003126FFFF01CF402501466821010D882570
+:104B3000019828213C0840000228102500054C005F
+:104B4000ACE90004ACE20000934309203C040006F9
+:104B500024E900140003FE0003E4C825ACF90008B2
+:104B60008F4E092C270F000131E67FFFACEE000CC1
+:104B70008F4D0930A786005824E60028ACED0010C0
+:104B80008F4C0938ACEC0014AD3200048F51094051
+:104B9000AD310008934209373C05080090A53B2C35
+:104BA000AD2000100002270000051C000083F8253E
+:104BB00037F2FFFFAD32000CAF4B002C12A00033D8
+:104BC000000000009352093F24150006240500044C
+:104BD000324B00FF117500CD24090002974F093CAC
+:104BE0003C0E020431EDFFFF01AE6025ACEC002865
+:104BF0009351093E322200201040000800000000BE
+:104C0000934409363C180103371F0300309900FF15
+:104C1000033F2825ACC5000424050008935209343D
+:104C20009343092100056082324B00FF000BA882EC
+:104C3000306400FF0015FE000004C40003F8C8251E
+:104C4000032A782501E87025ACCEFFD8934D0937AB
+:104C50008F5209488F42094031B100FF022C582180
+:104C600002423023000B1F000009AC0000754825EC
+:104C700030C8FFFF012850250E00005CACEA002080
+:104C8000240700040E00005EA367003F0E0000C36F
+:104C9000020020213C05080090A53B2C30B0000309
+:104CA0001200000F028020218F8800542509000186
+:104CB000AF890054AF6900508F6A0054014938230E
+:104CC00018E00002012020218F640054AF640054DA
+:104CD0008F420074244601F4AF66000C028020214C
+:104CE00002602821A76000680E0005E13C13100057
+:104CF0008F8E005434540006AF4E014C8F8D004C03
+:104D00008FBF00288FB5002431B100FF25AC000112
+:104D1000AF8C004C8FB20018A35101528FB000101D
+:104D2000AF5401548FB10014AF5301788FB40020F9
+:104D30008FB3001C03E0000827BD00309359093EE3
+:104D40000019C6000018960306420048241100020C
+:104D500093420923304400021080FF1E8F870060B9
+:104D60008F86005414E6FF1B000000000E00005C5C
+:104D7000000000009365003F2408001630A900FFE2
+:104D80001128000C240A00083C0D080091AD3B2CB2
+:104D900035AC00013C010800A02C3B2C936B003F7C
+:104DA000316300FF106A0065240E000A106E005E79
+:104DB0002402000C0E00005E000000000A00069DA8
+:104DC000000000003C09080095293B1C3C19080024
+:104DD00097393B263C18080097183B18950E00247D
+:104DE000313FFFFF033F782101F86823000E8C005C
+:104DF00025ACFFF2022C502524050800244700189A
+:104E0000AC4A000CAC4500140A0006E5AC400010AA
+:104E10003C09080095293B1C3C18080097183B26C4
+:104E20003C0F080095EF3B18950D00243139FFFF2A
+:104E3000950C00280319702101CF8823000D2C0048
+:104E4000000C54002622FFEE0142302534A48100DC
+:104E500024030800ACE4000CACE60010ACE300183E
+:104E6000ACE000140A0006E524E7001C3C01080041
+:104E7000A0313B2C9343093E24150001307F0020D4
+:104E800017E0FED4241100080A00069D2411000436
+:104E90008F6E00848F4D094011A0FECDAF8E00545F
+:104EA000240F00143C010800A02F3B2C0A00069C94
+:104EB0000000000095020024950600283C09080027
+:104EC00095293B1C0002240000061C00349F810031
+:104ED00034790800ACFF000CACF900100A0006E5BC
+:104EE00024E700141460FF0100000000951800245E
+:104EF0003C09080095293B1C2447001000187C0041
+:104F000035EE08000A0006E5AC4E000C0A00071F4B
+:104F1000240900128F64004CAF6400548F63005466
+:104F20000A0006A6AF630050A362003F0E00005EB9
+:104F3000000000000A00069D00000000240200148A
+:104F40000A0007F3A362003F27BDFFE8308400FF9B
+:104F5000AFBF00100E0005E130A500FF9378007E82
+:104F60009379007F936E00809368007A332F00FF5F
+:104F700000186600000F6C0031CB00FF018D482542
+:104F8000000B52008FBF0010012A3825310600FFA8
+:104F90003444700000E628252402FF813C03100001
+:104FA00027BD0018AF45014CAF440154A342015244
+:104FB00003E00008AF43017827BDFFD8AFB2001867
+:104FC000AFB10014AFB00010AFBF0020AFB3001CF2
+:104FD00093420109308600FF30B000FF000618C27E
+:104FE000320400023071000114800005305200FFCD
+:104FF0009367000530E5000810A0000D30C80010D0
+:10500000024020210E0005CD0220282124040001A9
+:105010008FBF00208FB3001C8FB200188FB1001417
+:105020008FB000100080102103E0000827BD002889
+:105030001500003200000000934301090000282100
+:105040003062007F000220C00002F94003E4982192
+:1050500026790088033B98218E7800248E6F000803
+:10506000130F0046000000008F6400842418000223
+:105070000004FD8233F900031338007C00000000B7
+:1050800093660083934A0109514600043205007C6F
+:1050900010A00060000000003205007C14A0005346
+:1050A0000240202116200006320400018E7F0024D9
+:1050B0008F59010417F9FFD60000202132040001A6
+:1050C0001080000A024020218F4209408F93006423
+:1050D00010530006000000000E00067B022028216D
+:1050E0008F430940AF630044024020210E00062890
+:1050F000022028210A00082C240400013C09080091
+:105100008D290064252600013C010800AC260064BE
+:1051100016000012000000008F6D00843C0E00C0DD
+:1051200001AE602415800005024020210E0007FA20
+:10513000022028210A00082C240400012405000470
+:105140000E00059624060001024020210E0007FAF9
+:10515000022028210A00082C240400010E00003D32
+:1051600024040001936B007D020B50250E00005EAD
+:10517000A36A007D0A00086F8F6D00848F6600743B
+:105180008F4801048E67002400064E021507FFB603
+:105190003126007F936B008326440001308A007F14
+:1051A00011460043316300FF5464FFB08F640084F4
+:1051B0002645000130B1007F30A200FF1226000416
+:1051C00024050001004090210A000842241100013A
+:1051D000240FFF80024F702401CF9026324200FF3F
+:1051E000004090210A000842241100010E00067BB5
+:1051F00002202821321800301300FFAA321000824A
+:10520000024020210E0005CD022028210A00082C92
+:10521000240400018F6E00743C0F800024050003FD
+:1052200001CF9025AF7200749371008324060001B2
+:105230000E000596322400FF0E00003D24040001FC
+:10524000936D007D020D60250E00005EA36C007D55
+:105250003C0B08008D6B0054257000013C010800D8
+:10526000AC3000540A00082C240400018F6800743C
+:105270003C0980002405000401093825AF6700744B
+:1052800093630083240600010E000596306400FF3E
+:105290000E00003D240400019362007D0202982567
+:1052A0000E00005EA373007D0A00082C2404000198
+:1052B000324D008039AC0080546CFF6C8F640084E8
+:1052C0000A0008952645000127BDFFD03C0A0008CA
+:1052D000AFBF002CAFB40028AFB30024AFB20020A2
+:1052E000AFB1001CAFB00018034AD8212409004018
+:1052F000AF490814AF4008108F4209448F4309504A
+:105300008F4609548F47095C8F48094C9344010824
+:105310009345010BAF820064308400FF30A500FF8D
+:10532000AF830054AF860050AF87005C0E000816B4
+:10533000AF8800601440015A8FBF002CA76000683E
+:10534000934D0900240B00503C14080026943C3077
+:1053500031AC00FF3C12080026523C40118B000388
+:10536000000000000000A02100009021934F0109DF
+:105370008F8800542402001031F1007F001170C0AA
+:105380000011694001AE282124B80088AF580818E0
+:105390008F4A01048F4B09A43C0C000E034CC8211A
+:1053A000014B48233C010800AC293B088F440958B5
+:1053B0003C010800A0223B2C9746090800881823CE
+:1053C0003C010800AC233B0C30C7FFFF0007F9C0CD
+:1053D0003C010800AC283B30AF5F002C9742090825
+:1053E0009730002C8E910000932F0018037898219D
+:1053F000A7900058AF9300480220F80931F000FF51
+:10540000304E000215C0018E30530001126001427F
+:10541000000000008F4F09A4241300013C01080084
+:10542000AC2F3B3493510934934E0937322500FF9A
+:1054300031CD00FF000D60800185502101505821C1
+:105440003C010800A42B3B243C010800A42A3B2279
+:1054500093490934312200FF0202202124900010D8
+:105460003C010800A4303B20240800068F9900541A
+:105470003C010800AC283B288F9F005C8F580958DE
+:105480000000802103F9282304A0013C03192023F4
+:105490000480013A00A4382B10E0013C0000000019
+:1054A0003C010800AC253B0C8E4200000040F8098E
+:1054B000000000003046000214C000DD00408821DA
+:1054C00030430001546000108E4200043C04080088
+:1054D0008C843B103C09C00000898025AF500E0031
+:1054E0008F4B0000316A00081140FFFD00000000F2
+:1054F00097450E0824100001A78500408F4C0E042C
+:10550000AF8C00348E4200040040F8090000000017
+:1055100002228825322D000215A00159000000004A
+:105520003C09080095293B183C06080094C63B241A
+:105530003C04080094843B1A3C1908008F393B1046
+:10554000012658213C1808008F183B343C1F0800E6
+:1055500097FF3B2E016418218F4E09400329282113
+:10556000246F00020319682100BF60213C0108007C
+:10557000A42B3B26AF8E00643C010800AC2D3B34CD
+:105580003C010800A42C3B1C0E00009A31E4FFFFF4
+:105590008F87004C004020213C010800A0273B2DB4
+:1055A0008E42000824E80001AF88004C0040F80952
+:1055B000000000008F4B002C974909083C0A000EA0
+:1055C000034A38213124FFFF000419C08F8A005498
+:1055D000AF43002C9743090894E6001A004040218D
+:1055E00030DFFFFFAC5F00008CF9001CAC590004F9
+:1055F0008CF80020AC58000890EF001931E300034C
+:10560000107300E60000000028620002144001024E
+:10561000240C0002106C00F4240D0003106D00A790
+:10562000000000003C09080095293B1C9345093403
+:10563000934C09213C0F080095EF3B2230BF00FF3F
+:1056400094EE002A001F6882319900FF978C005861
+:10565000000D16000019C4003124FFFF01E43021C1
+:10566000005848250126382501CC28213C0340005C
+:1056700000E3F82500056C00AD0D0004AD1F00002F
+:10568000935909203C180006250D001400197E00CE
+:1056900001F87025AD0E00088F42092C2586000107
+:1056A0008E4C000CAD02000C8F44093030C97FFFD6
+:1056B000A7890058AD0400108F4709382504002839
+:1056C000AD070014ADAA00048F450940ADA5000840
+:1056D000934309373C1F080093FF3B2CADA00010FB
+:1056E0000003C700001FCC000319782535EEFFFF2B
+:1056F000ADAE000CAF4B002C0180F809000000009B
+:105700003C06080094C63B263C02080094423B1A23
+:1057100000C24821252B00020E0000C33164FFFFA8
+:105720003C0808008D083B083C0708008CE73B104C
+:10573000010750233C010800AC2A3B081540000635
+:10574000000000003C0808008D083B28350A004096
+:105750003C010800AC2A3B28120000848F830048DB
+:105760008F470E108F900048AE0700208F4B0E1809
+:10577000AE0B00243C10080096103B1C0E00005C91
+:1057800000000000240F0040AF4F08148F86005423
+:105790008F89005000D018210069702319C00004BF
+:1057A000AF830054AF6300548F640054AF84005043
+:1057B0001200000C000000008F44007493780081F8
+:1057C0003419FA002F020007104000050099182133
+:1057D000937F0081240C01F403EC680401A41821D8
+:1057E000AF63000C8F4A095C8F88005C0148282356
+:1057F00018A00003000000008F50095CAF90005C0F
+:105800000E00005E000000008F8300548E470010E1
+:105810003C010800AC233B3000E0F8090000000028
+:105820003C0B08008D6B3B081560FF102408000638
+:105830008F590024975F09088F8900648F8E005468
+:105840003C0C001F978400588F8F002C8F930050C2
+:1058500033F8FFFF358DFF80032D3024001811C071
+:1058600032320010AF420024A5E4002CAF460024E1
+:10587000AF690044AF6E0050AF7300545640007CD7
+:105880008E850004322A0040554000318E91000878
+:105890008E88000C0100F809000000008FBF002C6A
+:1058A0008FB400288FB300248FB200208FB1001C6A
+:1058B0008FB0001803E0000827BD00303C09080045
+:1058C00095293B1C3C03080094633B263C040800DC
+:1058D00094843B1894F900243125FFFF94F80028A4
+:1058E0000065F82103E478230019640000186C00B7
+:1058F00025EEFFEE01AE302535828100240308003D
+:10590000AD02000CAD060010AD030018AD00001490
+:105910000A0009B32508001C934301098F8600384B
+:1059200000033E0000E64025AF4800808F5F09A0DD
+:105930008F5809A4AFBF0010AF5F0E148FB90010CD
+:10594000AF590E10AF580E1C0A00092DAF580E1893
+:105950000220F809000000008E88000C0100F80900
+:10596000000000000A000A508FBF002CA460002035
+:10597000A47300220A000A05AC7300243C0108004D
+:10598000AC203B0C0A0009538E4200003C01080089
+:10599000AC243B0C0A0009538E4200003C0908006D
+:1059A00095293B1C3C1F080097FF3B263C0508003F
+:1059B00094A53B1894F800243124FFFF03E4C82188
+:1059C0000325782300186C0025EEFFF201AE602558
+:1059D000AC4C000C24020800AD020014AD00001015
+:1059E0000A0009B32508001894E6002494E300286F
+:1059F0003C09080095293B1C000624000003FC001C
+:105A00003485810037F90800AD05000CAD19001090
+:105A10000A0009B3250800141460FF02000000000A
+:105A200094F800243C09080095293B1C00187C00D0
+:105A300035EE0800AD0E000C0A0009B32508001071
+:105A400093520109000028210E000628324400FF6D
+:105A50008FBF002C8FB400288FB300248FB200209A
+:105A60008FB1001C8FB0001803E0000827BD003084
+:105A700000A0F809000000000A000A4A322A00408B
+:105A80001200FF6B000000008F4E0E148F92004832
+:105A9000AE4E00208F530E1C0A000A34AE53002471
+:105AA0008F820018008040213C040100904700854F
+:105AB00030E3002010600009000000003C070800EF
+:105AC0008CE73B308F83001400E320230480000820
+:105AD0009389000014E300030100202103E0000883
+:105AE000008010213C04010003E000080080102128
+:105AF0001120000B006738238F8C001C2409003410
+:105B0000918B00BC316A0002514000012409003031
+:105B100000E9682B15A0FFF10100202100E93823DE
+:105B20002419FFFC00B9C02400F9782400F8702B78
+:105B300015C0FFEA01E8202130C20003000218234B
+:105B400014C00012306900030000302100A9702148
+:105B500001C6682100ED602B1180FFE03C040100CC
+:105B60002D2F00010006482B0105382101E93024C2
+:105B700014C0FFDA24E4FFFC2419FFFC00B9C024A0
+:105B80000308202103E00008008010218F8B001CF7
+:105B900024060004916A00BC314400041480FFEC28
+:105BA00000A970210A000AFC0000302127BDFFE88F
+:105BB000AFBF00108F460100934A01093C1F080047
+:105BC0008FFF00902407FF80314F00FF31E8007FF6
+:105BD0000008614003E6C821032CC02127090120E9
+:105BE000012770243C010800A02F3B6CAF4E080C2D
+:105BF0003C0D08008DAD00903C0400803482000311
+:105C000001A65821016C18212465012030AA0078D2
+:105C100001424025AF48081C3C1F08008FFF009040
+:105C20008F88004403E6C021331900070307482486
+:105C3000033A7821AF49002825E909C0952E0002D2
+:105C40003C0D08008DAD008C3C0A08008D4A009088
+:105C500031CC3FFF01A61821000C5980006B282190
+:105C600000A72024AF44002C952200023C1F08000E
+:105C70008FFF008C9107008530593FFF03E67821A4
+:105C80000019C1800146702101F8682131CC007FE4
+:105C900031AB007F019A2821017A50213C03000C8E
+:105CA0003C04000E00A328210144102130E600200E
+:105CB00027470980AF820028AF880018AF890020ED
+:105CC000AF85001C10C00006AF8700248D02005075
+:105CD0008CA4010C0044302318C0007700000000A1
+:105CE000910C0085240DFFDF018D3824A10700856C
+:105CF0008F8B00188F8900208F8700248D65004CC2
+:105D0000AF850014912F000D31EE002011C0001757
+:105D10000000000024090001A3890000AF800008F2
+:105D20008CE400248F850008240A0008AF8000045A
+:105D3000AF80000C3C010800A42A3B1A3C0108007B
+:105D4000A4203B2E0E000AD0000030218F850020B9
+:105D50008FBF0010AF82001090A8000D27BD001863
+:105D60000008394203E0000830E20001913F0002E0
+:105D70002418000133F900FF00192182109800391E
+:105D8000240800021088005B8F8600288CE5002420
+:105D900014A0001B8F9F001C91220000240A000504
+:105DA0003046003F10CA0047240400018F860004DB
+:105DB000A3840000AF86000CAF8600088CE40024AA
+:105DC0008F850008240A00083C010800A42A3B1A19
+:105DD0003C010800A4203B2E0E000AD00000000069
+:105DE0008F8500208FBF0010AF82001090A8000D9B
+:105DF00027BD00180008394203E0000830E2000126
+:105E00008CF800088CF900248FEE00C4A3800000F9
+:105E10008CE40024AF8E00088F8500088F86000474
+:105E200003197823240A0008AF8F000C3C010800F6
+:105E3000A42A3B1A3C010800A4203B2E0E000AD0E5
+:105E4000000000008F8500208FBF0010AF8200107F
+:105E500090A8000D27BD00180008394203E0000893
+:105E600030E20001912300003062003F104400271F
+:105E70008F85001C8CE400241480002100000000A9
+:105E80008D2E00183C187FFF8F85001C370FFFFFF9
+:105E900001CF1824AF8300048F9F00048CA80084D6
+:105EA00003E8C82B1720000203E020218CA4008403
+:105EB0000A000B8BAF8400048CA3010C0A000B6951
+:105EC000AF8300148D2C00188F8600043C0D7FFFDB
+:105ED0008F89001C35A3FFFF01835824240400018F
+:105EE000AF8B000CAD2000CCA38400000A000B9700
+:105EF000AF8600088CCA00140A000B8BAF8A00041E
+:105F00008CA300C80A000BCEAF8300048F84002846
+:105F10008CAC00648C8D0014018D582B1160000432
+:105F2000000000008CA200640A000BCEAF820004C7
+:105F30008C8200140A000BCEAF8200048F8500080B
+:105F400027BDFFE0AFBF0018AFB1001414A00007D9
+:105F5000AFB000108F8600202402000590C400001E
+:105F60003083003F106200B68F84001C8F910004C4
+:105F700000A080218F8C00243C0508008CA53B0CE0
+:105F80008D8B000431663FFF00C5502B554000014A
+:105F900000C02821938D000011A0007300B0F82BE1
+:105FA0008F98001C24040034930F00BC31EE0002D3
+:105FB00051C000012404003000A4C82B172000D1D8
+:105FC0000000000000A4282300B0F82B3C010800CA
+:105FD000A4243B1817E00068020020213C030800BD
+:105FE0008C633B080083102B544000010080182173
+:105FF0008F8800203C010800AC233B1000004821A2
+:106000009104000D30830020506000018F490E186C
+:106010008F8300100123382B10E00059000000008E
+:106020003C0408008C843B1000895821006B502BE5
+:10603000114000560090602B0069302300C02021E1
+:106040003C010800AC263B1012000003241FFFFC9B
+:106050001090008A32270003009FC8243C010800EA
+:10606000AC393B103C010800A4203B2E8F84000873
+:10607000120400078F83001CAF910004020020214E
+:106080008C7100CCAF90000826300001AC7000CCC1
+:106090003C0208008C423B108F8A000C2407001839
+:1060A0000082202301422823AF84000810800002D0
+:1060B000AF85000C240700108F8600183C010800F3
+:1060C000A0273B2C2407004090CC0085318B00C0DA
+:1060D000116700408F8D001014A0001500002021D2
+:1060E000934A01098F420974314500FF00022602DC
+:1060F00024A300013090007F3071007F1230007ABD
+:106100002407FF80A0C300833C0908008D293B2899
+:106110008F880020240D0002352C00083C01080067
+:10612000A02D3B6D3C010800AC2C3B282404001042
+:10613000910E000D31C6002010C00005008018210E
+:10614000240800013C010800AC283B103483000106
+:106150008FBF00188FB100148FB0001000601021A5
+:1061600003E0000827BD00203C010800A4203B18E4
+:1061700013E0FF9A020020210A000C1F00A020213A
+:106180003C0408008C843B100090602B1180FFAE13
+:10619000000000003C0F080095EF3B1801E470215F
+:1061A00001C6682B11A000072C8200043C1F600070
+:1061B0008FF954043338003F1700FFE524030042F1
+:1061C0002C8200041040FFA0240300420A000C7D32
+:1061D0008FBF0018152DFFC0000000008CDF007479
+:1061E0003C0380002405FF8003E3C825ACD900747C
+:1061F00090D80085240E000424040010330F003FC3
+:1062000001E54025A0C800858F8800203C010800DA
+:10621000A02E3B6D240300019106000D30C9002023
+:1062200015200003000000003C0308008C633B10B5
+:106230003C010800AC233B080A000C74000000007D
+:106240008F87000C8C88008400E8282B14A00002A3
+:1062500000E088218C91008424090001A3890000BA
+:106260008F440E18022028210E000AD0022030216F
+:10627000022080210A000C05AF82001000071823BD
+:10628000306600033C010800A4263B2E12200005C6
+:106290008F8C001C918B00BC316A000415400015E6
+:1062A00024CD00043C0F080095EF3B2E01E4702143
+:1062B00000AE302B50C0FF6E8F8400082C85000587
+:1062C00014A0FFA32403004230980003170000022B
+:1062D000009818232483FFFC3C010800AC233B10EA
+:1062E0000A000C410000000000A758240A000C69B5
+:1062F000016718263C010800A42D3B2E0A000CD192
+:10630000000000003C010800AC203B100A000C7C9F
+:10631000240300428F83000C14600007000010214A
+:106320008F880020240500059106000030C400FF7E
+:10633000108500030000000003E0000800000000DA
+:10634000910A0018314900FF000939C214E0FFFA30
+:106350008F8500183C04080094843B183C03080017
+:106360008C633B303C1908008F393B103C0F080010
+:1063700095EF3B2E0064C0218CAD005403197021B1
+:1063800001CF6021018D58231960001D000000001D
+:10639000910E001C8F8C0028974B0E1031CD00FF02
+:1063A0008D850004016D30238D88000030CEFFFF05
+:1063B000000E510000AAC821000038210107202149
+:1063C000032A182B0083C021AD990004AD9800006A
+:1063D000918F000A01CF6821A18D000A8F880028C3
+:1063E000974B0E12A50B0008950A003825490001AD
+:1063F000A50900389107000D34E60008A106000D3C
+:1064000003E000080000000027BDFFE093870000C4
+:106410008F8F00208FAD00143C0E7FFF8F89000806
+:1064200035C8FFFFAFBF001CAFB0001801A818248B
+:1064300091EA000D000717C03C1FBFFF00625825FE
+:106440002D2E00018F90001437F9FFFF3C18080033
+:106450008F183B303C0F080095EF3B2601796824EC
+:10646000000E47803C07EFFF3C05F0FF01A8182510
+:106470003149002034E2FFFF34ACFFFF0310582302
+:1064800027A500102406000225EA00020062182455
+:106490000080802115200002000040218F480E1C42
+:1064A000A7AA0012056000372407000030FF00FF94
+:1064B000001FCF008F8B001800793825AFA700147C
+:1064C000916F00853C08080091083B2D3C18DFFFC8
+:1064D00031EE00C0370AFFFF000E182B3C1F0800EA
+:1064E00097FF3B2000EA6824A3A80011000317408F
+:1064F00001A248258FB90010AFA900143C0A08007A
+:10650000914A3B2FA7BF00168FA80014032CC0246C
+:106510003C0B01003C0F0FFF030B18253147000314
+:1065200035EEFFFF010C682400071600006EF8240A
+:106530003C09700001A2C82503E95825AFB9001431
+:10654000AFAB00100E000072A3A000158F8C0020CE
+:10655000260200089186000D30C40020108000063D
+:106560008FBF001C3C05080094A53B1C24B0FFFF16
+:106570003C010800A4303B1C8FB0001803E0000869
+:1065800027BD00208F9800100118502B5540FFC7E1
+:10659000240700010A000D5430FF00FF9382000021
+:1065A00027BDFFE0AFBF00181040000F0080502152
+:1065B0008F880020240B00058F89000491070000BC
+:1065C0008F84001C0100282130E3003F8F860028C3
+:1065D000106B000800003821AFA900100E0004392C
+:1065E000AFAA0014A38000008FBF001803E00008CA
+:1065F00027BD00208D1900183C0F08008DEF3B10BF
+:106600008F98000C3C027FFF8D080014345FFFFF61
+:10661000033F682401F8702101AE6023018838210E
+:10662000AFA900100E000439AFAA00140A000DA291
+:10663000A38000008F8700203C05080094A53B2E16
+:106640003C0208008C423B2890E6000D0005240027
+:1066500030C300201060002C004440258F850018B6
+:1066600000006021240B000190A300850000482158
+:10667000240A00013C0F800035EE00708DC7000039
+:10668000AF8700308F5801780700FFFE3C03800081
+:10669000347900708F3800003C0508008CA5007428
+:1066A0003C0D08008DAD00700307782300AF382142
+:1066B0000000102100EF302B01A2202100861821BC
+:1066C0003C010800AC2700743C010800AC230070BA
+:1066D000AF4B01483C1908008F393B30A7490144B2
+:1066E000A74A0146AF59014C3C0B0800916B3B2D6A
+:1066F000A34B0152AF4801543C081000A74C01586D
+:1067000003E00008AF4801788F4B0E1C3C0A0800DC
+:106710008D4A3B1097490E16974D0E140145602186
+:10672000312AFFFF0A000DC531A9FFFF8F8300202A
+:106730009064000D3082002010400029000000000D
+:106740000000482100005021000040213C0780004B
+:1067500034EB00708D670000AF8700308F4C0178FC
+:106760000580FFFE3C0D800035AC00708D8B000075
+:106770003C0508008CA500743C0408008C84007063
+:106780000167302300A678210000102101E6C82B04
+:106790000082C021031970213C010800AC2F007455
+:1067A0003C010800AC2E0070AF4901483C0D0800C8
+:1067B0008DAD3B30A748014424090040A74A01465B
+:1067C0003C081000240AFF91AF4D014CA34A01522E
+:1067D000AF490154A740015803E00008AF480178D1
+:1067E0008F490E1897460E1297450E1030CAFFFFBC
+:1067F0000A000DFB30A8FFFF8F83002027BDFFF8A4
+:106800009064000D308200201040003A000000002B
+:10681000240B000100004821240A00013C088000EC
+:10682000350700708CE30000AF8300308F4C017897
+:106830000580FFFE3C0E80003C04080090843B6C09
+:1068400035C700708CEC00003C0508008CA5007476
+:10685000A3A400033C1908008F3900708FAD00001D
+:106860000183302300A63821000010210322782163
+:1068700000E6C02B01F8602101AE4025AFA8000062
+:106880003C010800AC2700743C010800AC2C0070EF
+:106890009346010A3C04080090843B6DA3A00002CB
+:1068A000A3A600018FA300003C0580FF3099007F64
+:1068B00034A2FFFF006278240019C60001F8702599
+:1068C000240D3000AF4E014C27BD0008AF4D0154E0
+:1068D000A7400158AF4B0148A7490144A74A0146C8
+:1068E0003C091000240AFF80A34A015203E000087B
+:1068F000AF4901788F4B0E1897460E1297450E1030
+:1069000030CAFFFF0A000E2F30A9FFFF8F85001845
+:106910002402008090A40085308300C0106200052E
+:106920008F86001C8F8800048F870008ACC800C8C1
+:10693000ACC700C403E00008000000003C0A0800E7
+:10694000254A37CC3C090800252938983C0808001E
+:1069500025082C4C3C07080024E739AC3C0608000D
+:1069600024C6363C3C05080024A533B43C0408008A
+:1069700024842FDC3C030800246336D43C02080046
+:10698000244234A83C010800AC2A3C383C010800F1
+:10699000AC293C343C010800AC283C303C010800E8
+:1069A000AC273C3C3C010800AC263C4C3C010800B8
+:1069B000AC253C443C010800AC243C403C010800B0
+:1069C000AC233C503C010800AC223C4803E00008EA
+:0469D00000000000C3
+:00000001FF
+/*
+ * This file contains firmware data derived from proprietary unpublished
+ * source code, Copyright (c) 2004 - 2009 Broadcom Corporation.
+ *
+ * Permission is hereby granted for the distribution of this firmware data
+ * in hexadecimal or equivalent format, provided this copyright notice is
+ * accompanying it.
+ */
diff --git a/firmware/bnx2/bnx2-mips-09-4.6.17.fw.ihex b/firmware/bnx2/bnx2-mips-09-4.6.17.fw.ihex
new file mode 100644 (file)
index 0000000..7667c66
--- /dev/null
@@ -0,0 +1,5816 @@
+:10000000080000F80800000000004AC8000000C80E
+:1000100000000000000000000000000008004AC8C6
+:100020000000003000004B90080000800800000035
+:10003000000053A800004BC0080055400000008499
+:1000400000009F68080053A80000016C00009FECAE
+:10005000080031D808000000000079080000A1580D
+:100060000000000000000000000000000800790807
+:100070000000012400011A60080004880800040040
+:10008000000013A400011B84000000000000000019
+:1000900000000000080017A40000000400012F2841
+:1000A000080000980800000000003AFC00012F2C16
+:1000B00000000000000000000000000008003AFC02
+:0800C0000000003000016A2875
+:0800C8000A00003E00000000E8
+:1000D000000000000000000D636F6D342E362E31DD
+:1000E00036000000040610020000000000000003BB
+:1000F00000000014000000320000000300000000B7
+:1001000000000000000000000000000000000000EF
+:1001100000000010000001360000EA60000000014D
+:1001200000000000000000000000000000000008C7
+:1001300000000000000000000000000000000000BF
+:1001400000000000000000000000000000000000AF
+:10015000000000000000000000000000000000009F
+:10016000000000020000000000000000000000008D
+:10017000000000000000000000000000000000007F
+:10018000000000000000000000000010000000005F
+:10019000000000000000000000000000000000005F
+:1001A000000000000000000000000000000000004F
+:1001B000000000000000000000000000000000003F
+:1001C0000000000010000003000000000000000D0F
+:1001D0000000000D3C02080024424B203C030800B4
+:1001E00024634C18AC4000000043202B1480FFFD1A
+:1001F000244200043C1D080037BD9FFC03A0F021F1
+:100200003C100800261000F83C1C0800279C4B20DE
+:100210000E000273000000000000000D27BDFFE883
+:100220003C028000AFB00010AFBF0014345001009A
+:10023000920200091040001A240300013C02080049
+:100240008C42002010400016000018210E000D7195
+:1002500000000000960300083C06080094C64BFE10
+:100260008E0400188F82002C9605000C00031C00E1
+:1002700000661825AC440000AC45000424040001CD
+:10028000AC400008AC40000CAC400010AC40001486
+:10029000AC4000180E000D98AC43001C0000182163
+:1002A0008FBF00148FB000100060102103E0000821
+:1002B00027BD001827BDFFE8AFBF00103C0280003B
+:1002C0009442010830437000240220001062000AAA
+:1002D00028642001548000128FBF001024024000C7
+:1002E00010620008240260001062000A8FBF001034
+:1002F0000A000097000010218FBF00100A0000556F
+:1003000027BD00180E000433000000000A0000960C
+:100310008FBF00100E000C81000000008FBF001086
+:100320000000102103E0000827BD00183C0208006F
+:100330008C42002027BDFFE810400028AFBF00100E
+:100340000E000D71000000003C05800094A2010821
+:1003500094A3010C8F86002C3042003E3063FFFFD7
+:100360000002140000431025ACC200008CA2010062
+:100370003C07080094E74BFE8FBF0010ACC200049E
+:1003800094A3011694A4010E3C02200000031C005B
+:100390003084FFFF00641825ACC3000800E2382554
+:1003A00094A2011094A3011224040001000214007D
+:1003B0003063FFFF00431025ACC2000C94A201146F
+:1003C00027BD00183042FFFFACC20010ACC00014C3
+:1003D000ACC000180A000D98ACC7001C8FBF0010FD
+:1003E00003E0000827BD00183C0680008CC202B85C
+:1003F0002403000104410008008028213C02080079
+:100400008C420060244200013C010800AC220060E4
+:1004100003E00008006010218C8300209482001605
+:10042000ACC302802442FFFCA4C202843C02080048
+:100430008C42005C8C84000494A3000E24420001D2
+:100440003C010800AC22005C3C021000A4C3028600
+:10045000ACC4028800001821ACC202B803E0000856
+:10046000006010213C0208008C42002027BDFFE8FC
+:100470001040002BAFBF00100E000D7100000000F7
+:100480003C05800094A2010894A3010C8F86002CE7
+:100490003042003E3063FFFF00021400004310258D
+:1004A000ACC200008CA201003C07080094E74BFEA0
+:1004B0008FBF0010ACC2000494A3011694A4010ED7
+:1004C0003C02200000031C003084FFFF006418255C
+:1004D000ACC3000800E2382594A2011094A30112D5
+:1004E00024040001000214003063FFFF00431025C4
+:1004F000ACC2000C94A2011427BD00183042FFFFCB
+:10050000ACC200108CA20118ACC2001490A2010B66
+:10051000304200FFACC200180A000D98ACC7001CA6
+:100520008FBF001003E0000827BD001827BDFFE0C3
+:10053000AFB000103C108000AFB20018AFBF001C7D
+:10054000AFB10014361201009243000B2402001ACE
+:10055000965100081462005B00002821322200013D
+:1005600010400018000000008E42000000022340EE
+:100570003C02003F3442FFFF0044102B10400004B7
+:100580003C030040964200140A00013B00832021F6
+:100590008E030100240201005462000696420014FA
+:1005A0003C028008944200043042000F0002250003
+:1005B0009642001400821025AE0200800A00016FEE
+:1005C000000000003C0208008C420020104000287F
+:1005D000000000000E000D710000000096020108EE
+:1005E0009603010C8F85002C3042003E3063FFFFE4
+:1005F0000002140000431025ACA200008E0201008E
+:100600003C06080094C64BFEACA2000496030116FB
+:100610009604010E3C02200000031C003084FFFF02
+:1006200000641825ACA3000800C230259602011012
+:100630009603011224040001000214003063FFFF3E
+:1006400000431025ACA2000C960201143042FFFFBB
+:10065000ACA200108E020118ACA200149202010B91
+:10066000304200FFACA200180E000D98ACA6001C92
+:100670003C0208008C420040244200013C0108007A
+:10068000AC2200403C0308008C630044322200028C
+:1006900032240004246300013C010800AC23004420
+:1006A000108000080002282B024020218FBF001C70
+:1006B0008FB200188FB100148FB000100A0000C86C
+:1006C00027BD00208FBF001C8FB200188FB100140F
+:1006D0008FB0001000A0102103E0000827BD00200B
+:1006E00027BDFFE03C058000AFB10014AFBF00188C
+:1006F000AFB0001034B101009223000B24020003BC
+:1007000014620043963000083202000110400016C7
+:100710003C02003F8E2300003442FFFF00032340D1
+:100720000044102B504000052402010096220014C2
+:100730003C0300400A0001A400832021546200060B
+:10074000962200143C028008944200043042000FBC
+:10075000000225009622001400821025ACA2008021
+:100760000A0001AF000000000E0000990000000028
+:100770003C0208008C420040244200013C01080079
+:10078000AC2200403C0208008C42004432030004CA
+:10079000244200013C010800AC2200441060000724
+:1007A00032020002022020218FBF00188FB10014F6
+:1007B0008FB000100A0000C827BD002010400015AF
+:1007C0008FBF00183C0480008C8301043C02602031
+:1007D000AC4300148C420004240301FE304203FFAA
+:1007E0001443000C8FBF00188C820100000219C254
+:1007F0002462FFFC2C420008104000032404000285
+:100800002462FFFD004420043C026000AC446914F3
+:100810008FBF00188FB100148FB00010000010219E
+:1008200003E0000827BD00203C0480008C83010009
+:1008300024020100506200033C0280080000000D09
+:100840003C02800894430004000010213063000F34
+:1008500000031D0003E00008AC8300803C02800818
+:10086000344200809042000003E00008AF800000A6
+:1008700003E000080000102127BDFFE83C028000D3
+:10088000AFBF0014AFB000108C430100AC43002098
+:100890008C430104AC4300A89050010B0E0001E50D
+:1008A000321000FF3C02080024424B580010188010
+:1008B0002E10001D16000005006210210E0001EA36
+:1008C000004018210A000205000000008C420000D0
+:1008D0000040F80900000000004018213C02080018
+:1008E0008C42003410600005244400013C0280006A
+:1008F0008C4301043C026020AC4300148FBF001401
+:100900008FB000103C0340003C02800027BD00185F
+:10091000AC4301383C010800AC24003403E000087B
+:100920000000000027BDFFE8AFBF0014AFB000100B
+:100930003C1080008E0201400E0001E5AE02002056
+:100940000E000399000000003C04080024840038D5
+:100950008C8200003C034000AE0301788FBF00147E
+:100960008FB000102442000127BD001803E00008EA
+:10097000AC82000027BDFFE8AFB00010AFBF00148D
+:100980003C1080008E0201800E0001E5AE020020C6
+:100990008E03018024020F00546200083C0280088C
+:1009A0008E0201883C0300E03042FFFF0043102527
+:1009B000AE0200800A00024A3C02800034420080FD
+:1009C0009042000024030050304200FF144300080E
+:1009D0003C0280000E000379000000001440000477
+:1009E0003C0280000E000967000000003C0280000D
+:1009F0003C034000AC4301B83C0208008C42003C80
+:100A00008FBF00148FB00010244200013C01080089
+:100A1000AC22003C03E0000827BD001803E00008FA
+:100A2000000010213C05800034A4010094820008DD
+:100A30003043000230420004104000030000000078
+:100A40000A0000C800000000106000052404000136
+:100A50003C0208008C4200840A00026F244200011C
+:100A60008CA301048F82000C104300080000202199
+:100A70008CA301043C0208008C420084AF83000C6C
+:100A8000244200013C010800AC22008403E000087D
+:100A90000080102127BDFFE83C036010AFBF0014A9
+:100AA000AFB000108C6550002402FF7F3C04800032
+:100AB00000A2282434A5380C24020037AC6550006D
+:100AC000AC82000824020C80AC8200243C060800A2
+:100AD00024C607A83C02080024424B582405001CE9
+:100AE00024A5FFFFAC46000004A1FFFD2442000442
+:100AF0003C020800244201EC3C010800AC224B609F
+:100B00003C020800244206183C010800AC224B6459
+:100B10003C02080024420D103C010800AC224BA00E
+:100B20003C020800244204643C0308002463095486
+:100B30003C0408002484095C3C05080024A52C948E
+:100B40003C010800AC224BC03C0208002442076074
+:100B50003C010800AC264BA83C010800AC254BB476
+:100B60003C010800AC234BBC3C010800AC244BC446
+:100B70003C010800AC224BC83C010800AC234B5C94
+:100B80003C010800AC204B683C010800AC204B6CD9
+:100B90003C010800AC204B703C010800AC204B74B9
+:100BA0003C010800AC204B783C010800AC204B7C99
+:100BB0003C010800AC204B803C010800AC244B8475
+:100BC0003C010800AC204B883C010800AC204B8C59
+:100BD0003C010800AC204B903C010800AC204B9439
+:100BE0003C010800AC204B983C010800AC264B9C13
+:100BF0003C010800AC264BA43C010800AC204BACE7
+:100C00003C010800AC254BB03C010800AC234BB8BC
+:100C10000E00055A000000003C02800034420070C3
+:100C20008C420000AF8200103C0308008C6300205F
+:100C30008F820004104300043C0580000E000D3735
+:100C4000AF8300043C05800034A900708D280000AB
+:100C50008F8400103C0708008CE700BC3C060800AD
+:100C60008CC600B8010420230000102100E43821C4
+:100C700000C2302100E4202B00C430213C010800D8
+:100C8000AC2700BC3C010800AC2600B88CB00000CA
+:100C9000320200071040FFE4AF8800108D260000EC
+:100CA0003C0508008CA500BC3C0408008C8400B8FE
+:100CB00000C8302300A628210000102100A6302BF8
+:100CC0000082202100862021320700013C0108001B
+:100CD000AC2500BC3C010800AC2400B810E00004C6
+:100CE000320200020E0001EC00000000320200029D
+:100CF00010400004320200040E0002170000000041
+:100D0000320200045040FFC53C0280000E00022B5E
+:100D1000000000000A0002D53C0280003C02900066
+:100D200034420001008220253C028000AC440020B7
+:100D30003C0380008C6200200440FFFE00000000A5
+:100D400003E00008000000003C0280003443000182
+:100D50000083202503E00008AC44002027BDFFE00D
+:100D6000AFB10014AFB0001000808821AFBF0018F1
+:100D70000E00031530B000FF8F83FFAC022020214E
+:100D80009062002502028025A07000258C7000185A
+:100D90003C0280000E000320020280241600000A9C
+:100DA0008FBF00183C0380008C6201F80440FFFEF6
+:100DB00024020002AC7101C0A06201C43C02100018
+:100DC000AC6201F88FBF00188FB100148FB0001013
+:100DD00003E0000827BD002027BDFFB8AFBF0044D7
+:100DE000AFB000403C0780008CE601048F82FFA872
+:100DF000AFA600288C450020AFA5002C8C44003CF9
+:100E0000AFA400308C430040AFA300348C42004CB0
+:100E1000AFA60010AFA50014AFA20020AFA200380B
+:100E20003C0208008C420020AFA40018AFA3001CB5
+:100E30008CF00100104000198FBF00440E000D71AE
+:100E4000000000008F83002C3C05080094A54BFE99
+:100E50003C024018AC70000000A228258FA20010B0
+:100E600024040001AC6200048FA20014AC620008EC
+:100E70008FA20018AC62000C8FA2001CAC620010A4
+:100E80008FA20020AC6200148FA20024AC62001874
+:100E90000E000D98AC65001C8FBF00448FB0004061
+:100EA0000000102103E0000827BD004827BDFFE82F
+:100EB000AFBF00103C038000946201843042020006
+:100EC00010400005000020210E000FE3000000008C
+:100ED0000A00038F240400018C6201880440000A88
+:100EE0008FBF00108C6201883C03FF000043102478
+:100EF0003C03040014430004240400018F82FFAC6F
+:100F0000904200088FBF00100080102103E000080D
+:100F100027BD00188F82FFB024050001A040001AF1
+:100F20003C0280000A0003258C44014027BDFFE0FD
+:100F3000AFB100148F91FFACAFBF001CAFB200186F
+:100F4000AFB000109222000024030020304200FFC6
+:100F50001043000C3C028000922200002403003069
+:100F6000304200FF104300073C0280009222000044
+:100F700024030050304200FF144300818FBF001C47
+:100F80003C02800090420148304200FF2443FFFFB2
+:100F90002C6200051040007A8FBF001C00031080F7
+:100FA0003C03080024634AD8004310218C4200000F
+:100FB00000400008000000003C1180008E24014029
+:100FC0000E0003158F92FFAC8E50000C8E22014450
+:100FD0001602000224020001AE42000C0E000320A3
+:100FE0008E2401408E220144145000068FBF001C45
+:100FF0008FB200188FB100148FB000100A000F518B
+:1010000027BD00208E42000C0A00042700000000CB
+:10101000962200103C0480008C8301443042FFFF84
+:10102000146200090000000024020001A622001042
+:101030008C820140AC8202003C021000AC8202387B
+:101040000A00042E8FBF001C962200100A000427FD
+:10105000000000009222000024030020304200FF24
+:101060001443000B3C128000962200123C038000C7
+:101070008C6301443042FFFF14620018000000003E
+:1010800024020001A62200120A0004008FBF001CE7
+:101090008E4401400E00031500000000962200124D
+:1010A0008E4301443050FFFF16030002240200016A
+:1010B000A62200120E0003208E4401408E420144FD
+:1010C000160200068FBF001C8FB200188FB10014EB
+:1010D0008FB000100A00039327BD00209622001253
+:1010E0000A00042700000000962200143C03800040
+:1010F0008C6301443042FFFF1462000900000000CD
+:1011000024020001A62200148FBF001C8FB2001819
+:101110008FB100148FB000100A00126827BD0020A4
+:10112000962200140A0004270000000096220016F0
+:101130003C0380008C6301443042FFFF14620008CE
+:1011400024020001A62200168FBF001C8FB20018D7
+:101150008FB100148FB000100A000B0B27BD0020C8
+:1011600096220016144000068FBF001C3C020800A7
+:101170008C420070244200013C010800AC22007047
+:101180008FB200188FB100148FB0001003E0000878
+:1011900027BD002027BDFFE03C028000AFB1001456
+:1011A000AFBF001CAFB20018AFB000103451010047
+:1011B000922300098C5001002402001F106200AA33
+:1011C0002862002010400018240200382862000A1B
+:1011D0001040000C2402000B286200081040002C74
+:1011E0000000000004600100286200021440002892
+:1011F00024020006106200268FBF001C0A00054A68
+:101200008FB20018106200602862000B144000F7D3
+:101210008FBF001C2402000E106200778FB20018EE
+:101220000A00054A00000000106200D3286200395D
+:101230001040000A2402008024020036106200E3FD
+:1012400028620037104000C524020035106200D823
+:101250008FBF001C0A00054A8FB200181062002DD3
+:101260002862008110400006240200C824020039D0
+:10127000106200C98FBF001C0A00054A8FB2001817
+:10128000106200A28FBF001C0A00054A8FB200182E
+:101290003C0208008C420020104000D48FBF001C8C
+:1012A0000E000D71000000003C028000344201007D
+:1012B0008C4400008F83002C944700083C050800F4
+:1012C00094A54BFEAC6400008C44000400073C0075
+:1012D00000E53825AC6400048C4400189446000CEA
+:1012E000AC6400088C45001C000634002404000196
+:1012F000AC65000C9042000A00C23025AC660010BC
+:10130000AC600014AC600018AC67001C0A00050C4F
+:101310008FBF001C3C0208008C420020104000B32C
+:101320008FBF001C0E000D71000000009624000805
+:101330003C03080094634BFE9625000C0004220237
+:101340009626000E8F82002C0004260000832025A4
+:1013500000052C003C03008000A6282500832025E2
+:10136000AC400000AC400004AC400008AC40000CB5
+:10137000AC450010AC400014AC400018AC44001C5C
+:101380000A00050B240400019622000C14400017EB
+:101390008F91FFAC922200053042001014400013E0
+:1013A000000000000E00031502002021922200051B
+:1013B00002002021344200100E000320A22200056A
+:1013C0009222000024030020304200FF10430086D8
+:1013D000020020218FBF001C8FB200188FB10014B3
+:1013E0008FB000100A00104C27BD00200000000D37
+:1013F0000A0005498FBF001C3C0208008C420020F7
+:101400001040007A8FBF001C0E000D71000000001C
+:101410008E2200048F83002C9624000C3C050800CB
+:1014200094A54BFEAC6200003C0280089442002C64
+:10143000000424003042FFFF008220253C02400EC1
+:1014400000A22825AC640004AC600008AC60000C6D
+:10145000AC600010AC600014AC600018AC65001CFF
+:101460000A00050B240400010E00031502002021D0
+:101470008F92FFB0020020210E000320A640000C36
+:10148000020020210E000325240500013C02080073
+:101490008C420020104000558FBF001C0E000D71C3
+:1014A000000000009622000C8F83002C8F84FFAC7C
+:1014B00000021400AC700000AC620004AC600008D4
+:1014C0008C8200383C05080094A54BFEAC62000CF1
+:1014D0008C86003C3C02401F00A22825AC66001010
+:1014E0008E42000424040001AC620014AC600018B9
+:1014F000AC65001C8FBF001C8FB200188FB10014A8
+:101500008FB000100A000D9827BD00208F82FFAC1D
+:101510002403002090420000304200FF10430033BB
+:101520008FBF001C0E000F37000000001040002F7E
+:101530008FBF001C3C0380008C6201F80440FFFE5A
+:1015400024020002AC7001C0A06201C43C02100081
+:10155000AC6201F80A0005498FBF001C020020217F
+:101560008FBF001C8FB200188FB100148FB0001015
+:101570000A000E8027BD00209625000C02002021C5
+:101580008FBF001C8FB200188FB100148FB00010F5
+:101590000A000EA527BD0020020020218FB20018EE
+:1015A0008FB100148FB000100A000ED027BD0020AC
+:1015B0009225000D020020218FB200188FB1001477
+:1015C0008FB000100A000F2127BD0020020020214B
+:1015D0008FBF001C8FB200188FB100148FB00010A5
+:1015E0000A000EF827BD00208FBF001C8FB2001824
+:1015F0008FB100148FB0001003E0000827BD002059
+:101600003C0380008C6202780440FFFE240200024A
+:10161000AC640240A06202443C02100003E00008F7
+:10162000AC620278000411C003E0000824420240CA
+:10163000A380001803E00008A38000193C03800089
+:101640008C6202780440FFFE8F82001CAC62024074
+:1016500024020002A06202443C02100003E00008E1
+:10166000AC62027803E000080000000090830030C4
+:1016700024020005008040213063003F0000482123
+:1016800014620005000050219082004C9483004EAB
+:10169000304900FF306AFFFFAD00000CAD000010C4
+:1016A000AD000024950200148D05001C8D04001867
+:1016B0003042FFFF0049102300021100000237C32F
+:1016C000004038210086202300A2102B0082202316
+:1016D00000A72823AD05001CAD040018A5090014BF
+:1016E000A5090020A50A001603E00008A50A0022AB
+:1016F00003E000080000000027BDFFD8AFB20018CB
+:101700003C128008AFB40020AFB3001CAFB100148E
+:10171000AFBF0024AFB00010365101009222000C80
+:101720003C140800929400F7304300FF24020001AB
+:1017300010620031008098212402000214620034FB
+:10174000365000800E001242000000009204004C4F
+:101750000E0005573084007F026210212403FF80B1
+:10176000004318243C048000AC8300949245000898
+:101770009204004C3042007F3C0380061485000731
+:10178000004380212402FFFFA22200112402FFFF58
+:10179000A62200120A0005BA2402FFFF96020020CA
+:1017A000A222001196020022A62200128E0200241C
+:1017B0003C048008AE2200143485008090A2004CC6
+:1017C00034830100A06200108CA2003CAC620018BF
+:1017D0008C820068AC6200E48C820064AC6200E041
+:1017E0008C82006CAC6200E824020001A0A20068B8
+:1017F0000A0005D63C0480080E00125B00000000C1
+:1018000036420080A04000680A0005D63C048008EB
+:10181000A2000068A20000690A0006123C028008CB
+:10182000348300808C62003834850100AC62006C27
+:1018300024020001A062006990A200C59083000804
+:10184000305100FF3072007F1232001B3C088008CC
+:101850000E00055702202021026210212403FF8080
+:10186000004318243C048000AC8300943042007F85
+:101870003C038006004380218E02000C1040000DC6
+:10188000020020210E000569000000002622000150
+:10189000305100FF9203003C023410260002102B4E
+:1018A000000210233063007F022288240A0005E032
+:1018B000A203003C3C088008350401008C8200D063
+:1018C00035070080ACE2003C8C8200D0AD02000005
+:1018D00090E5004C908600C590E3004C908400C5D4
+:1018E0002402FF8000A228243063007F308400FFA0
+:1018F00000A628250064182A1060000230A500FF09
+:1019000038A50080A0E5004CA10500093C02800834
+:101910009043000E344400803C058000A043000A40
+:101920008C8300183C027FFF3442FFFF00621824C2
+:10193000AC8300188CA201F80440FFFE00000000F8
+:10194000ACB301C08FBF00248FB400208FB3001C44
+:101950008FB200188FB100148FB000102402000263
+:10196000A0A201C427BD00283C02100003E000082B
+:10197000ACA201F890A2000027BDFFE0AFB20018B2
+:1019800024420001A0A200003C0308008C6300F484
+:10199000304200FFAFB10014AFBF001CAFB0001069
+:1019A00000A088211443000200809021A0A0000024
+:1019B0000E000557922400008F90001C2403FF8026
+:1019C00002021021004310243C038000AC6200247A
+:1019D0000E00055792240000020280213210007F81
+:1019E0003C02800A02028021AE5000008FBF001C22
+:1019F0008FB200188FB100148FB0001003E0000800
+:101A000027BD002094820006908300058C85000C81
+:101A10008C8600108C8700188C88001C8C84002019
+:101A20003C010800A4224BD23C010800A0234BD16A
+:101A30003C010800AC254BD83C010800AC264BDC2F
+:101A40003C010800AC274BE43C010800AC284BE803
+:101A50003C010800AC244BEC03E00008000000004F
+:101A60003C028008344201008C4400343C03800076
+:101A700034650400AC6400388C420038AF85003017
+:101A8000AC62003C3C020005AC620030000000008B
+:101A90000000000003E00008000000003C02000617
+:101AA000308400FF008220253C028000AC440030DE
+:101AB0000000000000000000000000003C03800067
+:101AC0008C620000304200101040FFFD34620400C0
+:101AD00003E00008AF82003094C200003C08080018
+:101AE000950800CA30E7FFFF00804821010210215D
+:101AF000A4C2000094C200003042FFFF00E2102B9D
+:101B000054400001A4C7000094A200003C03080058
+:101B10008C6300CC24420001A4A2000094A2000027
+:101B20003042FFFF144300073C0280080107102BDE
+:101B3000A4A000005440000101003821A4C7000007
+:101B40003C028008344601008CC3002894A20000A7
+:101B50003C0480003042FFFE000210C000621021F1
+:101B6000AC82003C8C82003C0062182318600004A8
+:101B7000000000008CC200240A0006AF24420001CD
+:101B80008CC20024AC8200383C0200503442001069
+:101B90003C038000AC620030000000000000000048
+:101BA000000000008C620000304200201040FFFD69
+:101BB0000000000094A200003C04800030420001BC
+:101BC000000210C0004410218C430400AD2300002B
+:101BD0008C420404AD2200043C02002003E0000813
+:101BE000AC82003027BDFFE0AFB20018AFB10014E7
+:101BF000AFB00010AFBF001C94C2000000C0802135
+:101C00003C120800965200C624420001A6020000C1
+:101C10009603000094E2000000E030211443000528
+:101C20008FB100300E000684024038210A0006E61B
+:101C3000000000008C8300048C82000424420040D9
+:101C400004610007AC8200048C820004044000049C
+:101C5000000000008C82000024420001AC820000E1
+:101C6000960200003042FFFF50520001A600000023
+:101C70009622000024420001A62200003C028008B7
+:101C800034420100962300009442003C14430004B7
+:101C90008FBF001C24020001A62200008FBF001C81
+:101CA0008FB200188FB100148FB0001003E000084D
+:101CB00027BD002027BDFFE03C028008AFBF001811
+:101CC000344201008C4800343C0380003469040035
+:101CD000AC6800388C42003830E700FFAF89003034
+:101CE000AC62003C3C020005AC6200300000000029
+:101CF00000000000000000000000000000000000E4
+:101D0000000000008C82000C8C82000C978300166F
+:101D1000AD2200008C82001000604021AD22000442
+:101D20008C820018AD2200088C82001CAD22000CB1
+:101D30008CA20014AD2200108C820020AD22001471
+:101D400090820005304200FF00021200AD22001810
+:101D50008CA20018AD22001C8CA2000CAD22002029
+:101D60008CA20010AD2200248CA2001CAD22002801
+:101D70008CA20020AD22002C3402FFFFAD260030E3
+:101D8000AD200034506200013408FFFFAD28003858
+:101D900050E000113C0280083C04800834840100BB
+:101DA000948200503042FFFFAD22003C94830044F7
+:101DB00094850044240200013063FFFF000318C231
+:101DC000006418219064005430A5000700A210049C
+:101DD0000A0007510044102534420100AD20003CA8
+:101DE00094430044944400443063FFFF000318C24E
+:101DF000006218213084000790650054240200011D
+:101E0000008210040002102700451024A062005434
+:101E10000000000000000000000000003C0200067E
+:101E2000344200403C038000AC62003000000000FF
+:101E300000000000000000008C6200003042001032
+:101E40001040FFFD3C06800834C20150346304009A
+:101E500034C7014A34C4013434C5014034C6014496
+:101E6000AFA200100E0006C7AF8300308FBF00186E
+:101E700003E0000827BD00208F8300143C05080004
+:101E80008CA500E88F82001C30633FFF000319809F
+:101E900000451021004310212403FF800043182433
+:101EA0003C058000ACA300283042007F3C03800C3E
+:101EB0000043302190C2000D000038213442001050
+:101EC000A0C2000D8F8900143C028008344201003A
+:101ED00094430044000913823048000324020001A7
+:101EE000A4C3000E1102000B2902000210400005DD
+:101EF000240200021100000C240300010A000798CC
+:101F00000000182111020006000000000A000798D6
+:101F1000000018218CC2002C0A00079824430001FD
+:101F20008CC20014244300018CC200180043102B03
+:101F3000144000033C0380080A0007A224070001A4
+:101F4000346301009462004C24420001A462004CFE
+:101F500000091382304300032C6200021040000984
+:101F600000802821146000040000000094C20034A6
+:101F70000A0007B23046FFFF8CC600380A0007B2DD
+:101F800000802821000030213C04080024844BCC30
+:101F90000A0006FB0000000027BDFF90AFB60068F6
+:101FA000AFB50064AFB40060AFB3005CAFB200582F
+:101FB000AFB10054AFBF006CAFB000508C900000C8
+:101FC0000080B0213C0208008C4200E896040032F8
+:101FD0008F83001C2414FF8030843FFF006218218F
+:101FE0000004218000641821007410243C13800038
+:101FF00000A0902190A50000AE620028920400325B
+:102000003C02800C3063007F00628821308400C075
+:10201000240200401482002D0000A8218E350038D3
+:102020008E2200181440000224020001AE22001883
+:102030009202003C304200201440000F00000000DB
+:102040000E00055700A020218F83001C006218217C
+:10205000306400783C02008000822025007418243F
+:10206000AE630800AE6408108E2200188E030008CC
+:1020700000431021AE2200188E22002C8E2300185F
+:10208000244200010062182B1060003D0000000097
+:102090009242000024420001A24200003C030800DA
+:1020A0008C6300F4304200FF50430001A240000066
+:1020B0000E000557924400008F90001C0202102170
+:1020C000005410240A0008B8AE62002492030032C3
+:1020D0002402FFC000431024304200FF14400005DA
+:1020E00024020001AE220018962200340A00082EB5
+:1020F0003055FFFF8E22001424420001AE2200184A
+:102100009202003000021600000216030441001C77
+:10211000000000009602003227A400100080282151
+:10212000A7A2001696020032000030212407000109
+:102130003042FFFFAF8200140E0006FBAFA0001C70
+:10214000960200328F83001C3C0408008C8400E857
+:1021500030423FFF00021180006418210062182104
+:1021600000741024AE62002C3063007F3C02800EAD
+:10217000006218219062000D3042007FA062000DC5
+:102180009222000D30420010504000789242000030
+:102190003C028008344401009482004C8EC300004D
+:1021A0003C130800967300C62442FFFFA482004C33
+:1021B000946200329623000E3054FFFF3070FFFF10
+:1021C0003C0308008C6300D000701807A7A30038F8
+:1021D0009482003E3063FFFF3042FFFF146200072D
+:1021E000000000008C8200303C038000244200305C
+:1021F000AC62003C0A0008568C82002C948200409D
+:102200003042FFFF5462000927A400408C8200384E
+:102210003C03800024420030AC62003C8C820034DD
+:10222000AC6200380A0008653C03800027A500382E
+:1022300027A60048026038210E000684A7A00048A7
+:102240008FA300403C02800024630030AC43003880
+:102250008FA30044AC43003C3C0380003C020005DB
+:10226000AC6200303C028008344401009482004299
+:10227000346304003042FFFF0202102B14400007B9
+:10228000AF8300309482004E9483004202021021FA
+:10229000004310230A00087B3043FFFF9483004E65
+:1022A0009482004202631821005010230062182318
+:1022B0003063FFFF3C028008344401009482003CFC
+:1022C0003042FFFF14430003000000000A00088BA7
+:1022D000240300019482003C3042FFFF0062102B77
+:1022E000144000058F8200309482003C006210236D
+:1022F0003043FFFF8F820030AC550000AC4000043B
+:10230000AC540008AC43000C3C0200063442001000
+:102310003C038000AC6200300000000000000000C0
+:10232000000000008C620000304200101040FFFDF1
+:102330003C04800834840100001018C20064182195
+:102340009065005432020007240600010046100484
+:1023500000451025A0620054948300429622000E8E
+:1023600050430001A386001892420000244200015D
+:10237000A24200003C0308008C6300F4304200FFDE
+:1023800050430001A24000000E0005579244000097
+:102390008F90001C2403FF800202102100431024B0
+:1023A0003C038000AC6200240E00055792440000FC
+:1023B000020280213210007F3C02800A020280214A
+:1023C000AED000008FBF006C8FB600688FB5006480
+:1023D0008FB400608FB3005C8FB200588FB100548F
+:1023E0008FB0005003E0000827BD007027BDFFD864
+:1023F000AFB3001CAFB20018AFB10014AFB0001003
+:10240000AFBF00200080982100E0802130B1FFFFA5
+:102410000E000D7130D200FF00000000000000002F
+:10242000000000008F82002CAC510000AC52000470
+:10243000AC530008AC40000CAC400010AC400014A1
+:10244000AC4000183C03080094634BFE0203802557
+:10245000AC50001C00000000000000000000000064
+:10246000240400018FBF00208FB3001C8FB200181E
+:102470008FB100148FB000100A000D9827BD0028FE
+:1024800030A5FFFF30C600FF24030C803C02800013
+:10249000AC43002400000000000000000000000029
+:1024A00000000000000000000A0008C90000000051
+:1024B0003C028008344301009462000E3C0808008E
+:1024C000950800C63046FFFF14C000043402FFFF29
+:1024D000946500DA0A00091F8F84001C10C20027CF
+:1024E000000000009462004E9464003C3045FFFF01
+:1024F00000A6102300A6182B3087FFFF10600004F1
+:102500003044FFFF00C5102300E210233044FFFFDA
+:102510000088102B1040000E00E810233C028008B9
+:10252000344401002403000134420080A443001617
+:102530002402FFFFA482000E948500DA8F84001C21
+:102540000000302130A5FFFF0A0008EE3C076020A4
+:102550000044102A104000093C02800834430080E7
+:102560009462001630420001104000043C028000DA
+:102570009442007E24420014A462001603E0000886
+:102580000000000027BDFFE03C028008AFBF001C38
+:10259000AFB0001834420100944300429442004C12
+:1025A000104000193068FFFF9383001824020001D7
+:1025B000146200298FBF001C3C06800834D0010043
+:1025C000000810C20050102190420054310300074F
+:1025D00034C70148304200FF00621007304200015A
+:1025E00034C9014E34C4012C34C5013E10400016DC
+:1025F00034C601420E0006C7AFA900109602004281
+:102600000A00093C3048FFFF3C02800834440100C6
+:1026100094830044948200421043000F8FBF001C3B
+:1026200094820044A482004294820050A482004E0E
+:102630008C820038AC82003094820040A482003E3C
+:102640009482004AA48200488FBF001C8FB00018FB
+:102650000A0008FA27BD00208FB0001803E0000828
+:1026600027BD002027BDFFA0AFB1004C3C1180006A
+:10267000AFBF0058AFB30054AFB20050AFB0004886
+:102680003626018890C200033044007FA3A40010C6
+:102690008E32018090C200003043007F240200038C
+:1026A0001062003BAF92001C28620004104000063C
+:1026B0002402000424020002106200098FBF0058A7
+:1026C0000A000B038FB300541062004B2402000574
+:1026D0001062014C8FBF00580A000B038FB30054E7
+:1026E000000411C0024210212404FF802442024051
+:1026F0000044102426430040AE2200243063007FB3
+:102700003C02800A006218219062003CAFA3003CAA
+:1027100000441025A062003C8FA3003C9062003C66
+:10272000304200401040016A8FBF00583C108008C2
+:10273000A3800018361001008E0200D08C63003494
+:1027400027A4003C27A50010004310210E0007B469
+:10275000AE0200D093A200103C038000A20200C58C
+:102760008C6202780440FFFE8F82001CAC62024043
+:1027700024020002A06202443C021000AC62027813
+:102780000E00092F000000000A000B028FBF005846
+:102790003C05800890C3000190A2000B1443014C3B
+:1027A0008FBF005834A400808C8200189082004CA7
+:1027B00090A200088C8300183C027FFF3442FFFF88
+:1027C000006218243C0208008C4200B4AC8300185C
+:1027D0003C038000244200013C010800AC2200B40C
+:1027E0008C6201F80440FFFE8F82001CAC6201C0C5
+:1027F0000A000ACA240200023C10800890C30001AB
+:102800009202000B144301328FBF005836050110AD
+:1028100027A400180E000E202406000327A4002879
+:10282000360501E00E000E20240600038FA20028CA
+:1028300036030100AE0200648FA2002CAE020068D5
+:102840008FA20030AE02006C93A40018906300C504
+:102850002402FF800082102400431025305000FF26
+:102860003084007F3202007F0082102A5440000131
+:102870003A1000800E0005570000000002421021AF
+:102880002403FF8000431024AE22009493A4001878
+:102890003C130800927300F70E0005573084007F48
+:1028A000024210213042007F3C0380060043402159
+:1028B0008FA3001C2402FFFF10620034AFA8004069
+:1028C00093A2001995030014304400FF3063FFFF0A
+:1028D0000064182B10600010000000009504001424
+:1028E0008D07001C8D0600183084FFFF0044202354
+:1028F0000004210000E438210000102100E4202B16
+:1029000000C2302100C43021AD07001CAD06001804
+:102910000A000A2393A20019950400148D07001CD5
+:102920008D0600183084FFFF008220230004210060
+:10293000000010210080182100C2302300E4202B69
+:1029400000C4302300E33823AD07001CAD06001897
+:1029500093A200198FA30040A462001497A2001A4A
+:10296000A46200168FA2001CAC6200108FA2001C93
+:10297000AC62000C93A20019A462002097A2001A76
+:10298000A46200228FA2001CAC6200243C048008D8
+:10299000348300808C6200388FA2002002008821DE
+:1029A000AC62003C8FA20020AC82000093A2001811
+:1029B000A062004C93A20018A0820009A0600068E9
+:1029C00093A200181051005293A400183230007FD7
+:1029D0000E00055702002021024210212407FF802B
+:1029E0003046007F3C03800000471024AC62009416
+:1029F0003C02800600C2302190C2003CAFA60040DD
+:102A00000000202100471025A0C2003C8FA80040F4
+:102A100095020002950300148D07001C3042FFFF51
+:102A20003063FFFF8D0600180043102300021100E1
+:102A300000E2382100E2102B00C4302100C2302116
+:102A4000AD07001CAD06001895020002A502001497
+:102A5000A50000168D020008AD0200108D020008CE
+:102A6000AD02000C95020002A5020020A500002284
+:102A70008D020008AD0200249102003C304200406B
+:102A80001040001A26220001A3B000383C10800834
+:102A9000A3800018361001008E0200D08D03003490
+:102AA00027A4004027A50038004310210E0007B4DA
+:102AB000AE0200D093A200383C038000A20200C501
+:102AC0008C6202780440FFFE8F82001CAC620240E0
+:102AD00024020002A06202443C021000AC620278B0
+:102AE0000E00092F00000000262200013043007F65
+:102AF00014730004004020212403FF8002231024CB
+:102B00000043202693A200180A000A3F309100FFDC
+:102B10008FA3001C2402FFFF1062000A309000FF08
+:102B200024820001248300013042007F14530005F9
+:102B3000307000FF2403FF80008310240043102620
+:102B4000305000FF3C0280089042000802008821BB
+:102B5000305000FF123000193222007F000211C0F5
+:102B600002421021244202402403FF800043182423
+:102B70003C048000AC8300943042007F3C0380061C
+:102B8000004310218C43000C004020211060000BFA
+:102B9000AFA200400E0005690000000026230001DE
+:102BA0002405FF803062007F145300020225202498
+:102BB000008518260A000AA3307100FF3C04800833
+:102BC000348400808C8300183C027FFF3442FFFF76
+:102BD00000621824AC8300183C0380008C6201F86A
+:102BE0000440FFFE00000000AC7201C0240200029D
+:102BF000A06201C43C021000AC6201F80A000B02A2
+:102C00008FBF00583C04800890C300019082000BE5
+:102C10001443002F8FBF00583490008092020008A8
+:102C200030420040104000200000000092020008E6
+:102C30000002160000021603044100050240202194
+:102C40000E000EA5240500930A000B028FBF00584A
+:102C50009202000924030018304200FF1443000DC3
+:102C600002402021240500390E000E3D00003021D5
+:102C70000E0003158F84001C8F82FFAC240300120A
+:102C8000A04300090E0003208F84001C0A000B02E1
+:102C90008FBF0058240500360E000E3D0000302185
+:102CA0000A000B028FBF00580E00031502402021BE
+:102CB000920200058F84001C344200200E00032085
+:102CC000A20200050E00104C8F84001C8FBF00581C
+:102CD0008FB300548FB200508FB1004C8FB00048BA
+:102CE00024030C803C02800027BD006003E0000844
+:102CF000AC43002427BDFFE83C028008AFB00010C1
+:102D0000AFBF0014344501003C1080008E0201402A
+:102D100094A3000E0000302100402021AF82001C4F
+:102D20003063FFFF3402FFFF106200063C076020A3
+:102D30002402FFFFA4A2000E94A500DA0E0008EE04
+:102D400030A5FFFF24020C80AE0200248FBF0014C8
+:102D50008FB0001003E0000827BD001827BDFFC09A
+:102D60003C0980003C058008AFB70034AFB20020BA
+:102D7000AFBF0038AFB60030AFB5002CAFB40028FD
+:102D8000AFB30024AFB1001CAFB000183532010062
+:102D900034A801008D2701008E4200148D0300D459
+:102DA0000000B821A38000180043102318400055EC
+:102DB000AF87001C8E4200142403FF8024E40040EF
+:102DC000AD0200D490A60008910500C53084007FB4
+:102DD00030D3007F30A200FF000211C000E21021BA
+:102DE00024420240A3A50010004310248D1400D0FB
+:102DF0008D1500D4AD22002493A300103C02800A5C
+:102E000000822021AFA40014107300330000B02111
+:102E10008FA3001427A4001427A500108C6200348F
+:102E20000282802102B010230440002B2411FF8075
+:102E30009062003C02221024304200FF1440001B2C
+:102E40000200A0219062003C34420040A062003C9D
+:102E500093A2001024420001304300FFA3A20010FF
+:102E60003C0208008C4200F450620001A3A0001054
+:102E70000E00055793A400108F90001C3C038000A7
+:102E80000202102100511024AC6200240E000557EC
+:102E900093A40010020280213210007F3C02800ABD
+:102EA000020280210A000B81AFB000140E0007B4AB
+:102EB000000000003C02800834420100AC5000D009
+:102EC00093A3001024160001A04300C593A2001094
+:102ED0001453FFD08FA300142402000116C200096E
+:102EE0003C0380008C6202780440FFFE8F82001C4D
+:102EF000AC62024024020002A06202443C021000C4
+:102F0000AC6202789242000B24030002304200FFC0
+:102F1000144300720000000096420008304300FF96
+:102F20002402008214620040240200843C028000DB
+:102F3000344901008D22000C952300060002160280
+:102F40003063FFFF3044003F240200271082000F4F
+:102F5000AF830014288200281040000824020031AA
+:102F6000240200211082000924020025108200079B
+:102F7000938200190A000BC00000000010820007B5
+:102F8000938200190A000BC0000000000E00076CBD
+:102F9000012020210A000C40000000003C038000BA
+:102FA0008C6202780440FFFE8F82001CAC620240FB
+:102FB00024020002A06202443C021000AC620278CB
+:102FC0000A000C4000000000952300069124000533
+:102FD0008D25000C8D2600108D2700188D28001CD3
+:102FE0008D290020244200013C010800A4234BD27B
+:102FF0003C010800A0244BD13C010800AC254BD873
+:103000003C010800AC264BDC3C010800AC274BE43B
+:103010003C010800AC284BE83C010800AC294BEC13
+:103020000A000C40A38200191462000A24020081E5
+:103030003C02800834420100944500DA92460005C3
+:103040008F84001C30A5FFFF30C600FF0A000C0172
+:103050003C0760211462005C000000009242000AFC
+:10306000304300FF30620020104000073062004013
+:103070003C02800834420100944500DA8F84001C31
+:103080000A000BFF24060040104000070003160052
+:103090003C02800834420100944500DA8F84001C11
+:1030A0000A000BFF240600410002160304410046FB
+:1030B0003C02800834420100944500DA8F84001CF1
+:1030C0002406004230A5FFFF3C0760190E0008EE01
+:1030D000000000000A000C40000000009242000BBB
+:1030E00024040016304200FF104400063C06800015
+:1030F0009242000B24030017304200FF14430032B9
+:103100000000000034C5010090A2000B304200FF17
+:103110001444000B000080218CA200208CA400200D
+:103120002403FF8000431024000211403084007FFC
+:10313000004410253C03200000431025ACC2083099
+:1031400094A20008000214000002140304420001CB
+:103150002410000194A20008304200805040001A60
+:103160000200B82194A2000830422000504000160E
+:103170000200B8218CA300183C021C2D344219ED2A
+:10318000106200110200B8213C0208008C4200D4F9
+:10319000104000053C028008240300043442010072
+:1031A000A04300EC3C02800834420100944500DA60
+:1031B0008F84001C2406000630A5FFFF0E0008EED9
+:1031C0003C0760210200B8210E00092F000000001A
+:1031D0009242000A30420008104000043C02800085
+:1031E0000E00121F000000003C02800024030C802F
+:1031F000AC4300248FBF003802E010218FB60030AE
+:103200008FB700348FB5002C8FB400288FB3002403
+:103210008FB200208FB1001C8FB0001803E00008AF
+:1032200027BD00402402FF80008220243C02900041
+:1032300034420007008220253C028000AC4400207C
+:103240003C0380008C6200200440FFFE0000000070
+:1032500003E00008000000003C0380002402FF801F
+:10326000008220243462000700822025AC64002004
+:103270008C6200200440FFFE0000000003E0000814
+:10328000000000003C0280082403000534420100D5
+:10329000A04300EC3C0280008C4201003C03800013
+:1032A000AF82001C8C6202780440FFFE8F82001CFB
+:1032B000AC62024024020002A06202443C02100000
+:1032C000AC62027803E000080000000027BDFFE8C0
+:1032D0003C068000AFBF001034C5010094A2000876
+:1032E000304400FF38830082388200842C63000160
+:1032F0002C42000100621825106000302402008377
+:1033000093820019504000398FBF00103C02080022
+:1033100090424BD88CC401003C07080094E74BD284
+:103320003046003F38C3003238C2003F2C630001F2
+:103330002C42000100621825AF84001CAF870014E6
+:10334000A38000191460000600A0202124020020A0
+:1033500014C200113402FFFF14E2000F000000004D
+:103360002402002014C20005000000008CA30014F9
+:103370002402FFFF1062000A000000003C04080065
+:1033800024844BCC000030210E0006FB24070001F2
+:103390000A000CB6000000000E00076C00000000E0
+:1033A0000E00092F0000000024030C803C02800066
+:1033B000AC4300240A000CEF8FBF001014820006FB
+:1033C0002482FF808CC301043C026020AC430014C3
+:1033D0000A000CEF8FBF0010304200FF2C420002A9
+:1033E00010400004240200228FBF00100A000B25A9
+:1033F00027BD0018148200038FBF00100A000C6F55
+:1034000027BD00183C0208008C4200201040001D1F
+:103410002402001890A3000914620003240200167D
+:103420000A000CDB240300081462000724020017C2
+:10343000240300123C02800834420080A0430009AB
+:103440000A000CE894A700085462000794A700083B
+:103450008F82FFAC2404FFFE904300050064182413
+:10346000A043000594A7000890A6001B8CA40000B0
+:1034700094A500068FBF001000073C000A0008C991
+:1034800027BD001803E0000827BD00183C05080010
+:1034900094A54C0A3C0308008C634C143C04800047
+:1034A00030A2FFFF000230C02402FFF000C210244F
+:1034B00000621821AC83003C3C0208008C424C1096
+:1034C0003C038000AC8200383C02005034420010C3
+:1034D000AC620030000000000000000000000000AE
+:1034E0008C620000304200201040FFFD30C2000816
+:1034F000104000093C0280008C6204088C63040CBC
+:103500003C010800AC224C003C010800AC234C04F8
+:103510000A000D1B3C0300208C4304008C42040471
+:103520003C010800AC234C003C010800AC224C04D8
+:103530003C0300203C028000AC4300303C0780008C
+:103540008CE20030004310241440FFFD0000000016
+:103550003C03080094634C083C02080094424C0C65
+:103560003C06080094C64C0E24A5000100621821F8
+:1035700030A4FFFF3C020040ACE200303C010800F8
+:10358000A4234C083C010800A4254C0A148600031F
+:10359000000000003C010800A4204C0A03E00008E1
+:1035A0000000000027BDFFE83C04080024844BF025
+:1035B0003C05800AAFBF00100E000E202406000A52
+:1035C0003C02080094424BF23C03080094634C0E0A
+:1035D0003042000F244200030043180424027FFFFE
+:1035E0000043102B10400002AF8300280000000DA4
+:1035F0000E000CF1000000003C02080094424BF465
+:103600003C03080094634BFA8FBF00103042000F58
+:10361000000215000062182527BD00183C0280003A
+:1036200003E00008AC4300A03C02800A944300067B
+:103630003C02080094424BFA3C010800A4234BF6DC
+:10364000004310238F8300283042FFFF0043102BDC
+:1036500003E000083842000127BDFFE8AFBF0010BB
+:103660003C02800A944200063C010800A4224BF66A
+:103670000E000D58000000005440FFFA3C02800A82
+:103680008FBF001003E0000827BD001827BDFFE82A
+:10369000AFBF00100E000D580000000010400003E6
+:1036A000000000000E000D64000000003C02080055
+:1036B0008C424C003C0380008FBF0010AC6200388D
+:1036C0003C0208008C424C043464040027BD0018FE
+:1036D000AC62003C3C020005AC620030AF84002CC0
+:1036E00003E00008AF8000248F8200243C03000622
+:1036F00000021140004310253C038000AC62003002
+:103700000000000000000000000000008C620000CB
+:10371000304200101040FFFD34620400AF82002CE4
+:1037200003E00008AF8000243C0608008CC64C046F
+:103730008F8500248F83002C3C02080094424BFAB2
+:1037400027BDFFE024A500012463002024420001DE
+:1037500024C70020AFB10014AFB00010AFBF0018F5
+:10376000AF850024AF83002C3C010800A4224BFA53
+:10377000309000FF3C010800AC274C0404C1000855
+:103780000000882104E00006000000003C02080060
+:103790008C424C00244200013C010800AC224C0049
+:1037A0003C04080094844C083C02080094424BFA04
+:1037B0002E030001004410262C440001008318242D
+:1037C000106000040010102B24020001AF820020C2
+:1037D0000010102B00821025144000068F8200205C
+:1037E000144000048F830024240200101462000F90
+:1037F000000000000E000D88241100013C030800A9
+:1038000094634BFA3C02080094424C081462000393
+:10381000000000000E000CF1000000001600000384
+:10382000000000000E000D71000000003C030800C5
+:1038300094634BFE3C02080094424BFC246300015D
+:103840003064FFFF3C010800A4234BFE14820003F8
+:10385000000000003C010800A4204BFE1200000BF9
+:10386000000000003C02080094424BF43C030800B6
+:1038700094634BFA00021500006218253C02800098
+:10388000AC4300A00A000DF7AF8000200E000D58D9
+:103890000000000010400004022010210E000D6402
+:1038A00000000000022010218FBF00188FB100140B
+:1038B0008FB0001003E0000827BD002003E00008DF
+:1038C000000000008F8200343C030006000211401B
+:1038D000004310253C038000AC6200300000000073
+:1038E00000000000000000008C6200003042001068
+:1038F0001040FFFD34620400AF82003003E0000896
+:10390000AF80003403E000080000102103E000084D
+:10391000000000003084FFFF30A5FFFF00001821E9
+:1039200010800007000000003082000110400002FB
+:1039300000042042006518210A000E1600052840E8
+:1039400003E000080060102110C0000624C6FFFF3D
+:103950008CA2000024A50004AC8200000A000E2006
+:103960002484000403E000080000000010A0000808
+:1039700024A3FFFFAC860000000000000000000050
+:103980002402FFFF2463FFFF1462FFFA2484000473
+:1039900003E00008000000003C0280083442008080
+:1039A00024030001AC43000CA4430010A443001204
+:1039B000A443001403E00008A443001627BDFFD869
+:1039C000248200802407FF803043007FAFB00010C6
+:1039D00000808021004720243C0208008C42002007
+:1039E0003C08800EAFB3001CAFB20018AFB100149A
+:1039F000AFBF00203C0980000068182130B100FFF3
+:103A000030D200FF1040002900009821260201005A
+:103A1000AD24002C004728243042007F004820219C
+:103A20009062000024030050304200FF1443000461
+:103A300000000000AD25002C948200DA3053FFFF17
+:103A40000E000D71000000003C03080094634BFE63
+:103A50008F82002C00112C0000A3282500122400C6
+:103A60003C0340003484000100A32825AC50000032
+:103A70008FBF0020AC4000048FB20018AC53000888
+:103A80008FB10014AC40000C8FB3001CAC4400108C
+:103A90008FB00010AC40001424040001AC400018AA
+:103AA00027BD00280A000D98AC45001C8FBF0020E0
+:103AB0008FB3001C8FB200188FB100148FB00010AC
+:103AC00003E0000827BD00283C06800034C2010046
+:103AD0009043000F240200101062000E28650011B0
+:103AE00010A0000724020012240200082405003A56
+:103AF000106200060000302103E000080000000012
+:103B0000240500351462FFFC000030210A000E3D40
+:103B1000000000008CC200748F83FFAC24420FA011
+:103B200003E00008AC62000C27BDFFE8AFBF001047
+:103B30000E000325240500013C0480088FBF0010FF
+:103B40002402000134830080A462001227BD001803
+:103B50002402000103E00008A080001A27BDFFE056
+:103B6000AFB20018AFB10014AFB00010AFBF001C6F
+:103B700030B2FFFF0E000315008088213C02800850
+:103B8000345000809202000924030004304200FFF8
+:103B90001443000C3C028008124000082402000A72
+:103BA0000E000E3400000000920200052403FFFE08
+:103BB00000431024A202000524020012A202000900
+:103BC0003C02800834420080022020210E000320A5
+:103BD000A040002716400003022020210E000E986E
+:103BE0000000000002202021324600FF8FBF001C91
+:103BF0008FB200188FB100148FB000102405003868
+:103C00000A000E3D27BD002027BDFFE0AFBF001C0E
+:103C1000AFB20018AFB10014AFB000100E00031522
+:103C2000008080210E000E34000000003C0280085D
+:103C30003445008090A2000924120018305100FF82
+:103C4000123200030200202124020012A0A2000967
+:103C500090A200052403FFFE004310240E00032061
+:103C6000A0A2000502002021240500201632000732
+:103C7000000030218FBF001C8FB200188FB10014DC
+:103C80008FB000100A00032527BD00208FBF001C45
+:103C90008FB200188FB100148FB0001024050039C6
+:103CA0000A000E3D27BD002027BDFFE83C02800032
+:103CB000AFB00010AFBF0014344201009442000CBA
+:103CC000240500360080802114400012304600FF99
+:103CD0000E000315000000003C0280083442008002
+:103CE00024030012A0430009904300053463001030
+:103CF0000E000E34A04300050E0003200200202118
+:103D0000020020210E000325240500200A000F15C3
+:103D1000000000000E000E3D000000000E00031524
+:103D2000020020213C0280089043001B2405FF9FD5
+:103D300002002021006518248FBF00148FB00010EE
+:103D4000A043001B0A00032027BD001827BDFFE089
+:103D5000AFBF0018AFB10014AFB0001030B100FF1A
+:103D60000E000315008080213C028008240300120D
+:103D7000344200800E000E34A04300090E000320E0
+:103D80000200202102002021022030218FBF0018D4
+:103D90008FB100148FB00010240500350A000E3DCD
+:103DA00027BD00203C0480089083000E9082000A0A
+:103DB0001443000B000028218F82FFAC2403005025
+:103DC0002405000190420000304200FF144300042B
+:103DD000000000009082000E24420001A082000E2C
+:103DE00003E0000800A010213C0380008C6201F871
+:103DF0000440FFFE24020002AC6401C0A06201C4C2
+:103E00003C02100003E00008AC6201F827BDFFE0AF
+:103E1000AFB200183C128008AFB10014AFBF001C55
+:103E2000AFB0001036510080922200092403000A2E
+:103E3000304200FF1443003A000000008E430004AB
+:103E40008E2200385062007E8FBF001C922200003C
+:103E500024030050304200FF144300253C02800040
+:103E60008C4201408E43000436420100022028218A
+:103E7000AC43001C9622005C8E2300383042FFFFCA
+:103E80000002104000621821AE23001C8E43000483
+:103E90008E2400389622005C006418233042FFFF15
+:103EA00000031843000210400043102A104000068F
+:103EB000000000008E4200048E23003800431023CF
+:103EC0000A000F83000220439622005C3042FFFF6D
+:103ED000000220403C02800834430100344200804C
+:103EE000ACA4002CA040002424020001A062000C1D
+:103EF0000E000F3700000000104000518FBF001C63
+:103F00003C0280008C4401408FBF001C8FB200181F
+:103F10008FB100148FB000100A000F4827BD002099
+:103F20009222000924030010304200FF14430004D1
+:103F30003C0280008C4401400A000FC5000028218B
+:103F40009222000924030016304200FF14430006A9
+:103F500024020014A22200093C0280008C4401408B
+:103F60000A000FD88FBF001C8E2200388E23003C21
+:103F700000431023044100328FBF001C922200270F
+:103F800024420001A2220027922200273C030800BD
+:103F90008C630048304200FF144300163C10800040
+:103FA0009222000924030004304200FF1443000958
+:103FB0003C0280008C4401408FBF001C8FB200186F
+:103FC0008FB100148FB00010240500930A000EA5D5
+:103FD00027BD00208C440140240500938FBF001CA6
+:103FE0008FB200188FB100148FB000100A000F219B
+:103FF00027BD00208E0401400E00031500000000C4
+:104000008E4200042442FFFFAE4200048E22003C98
+:104010002442FFFFAE22003C0E0003208E0401402C
+:104020008E0401408FBF001C8FB200188FB10014A6
+:104030008FB00010240500040A00032527BD0020CE
+:104040008FB200188FB100148FB0001003E0000889
+:1040500027BD00203C0680008CC201883C038008FC
+:10406000346500809063000E00021402304400FFAB
+:10407000306300FF1464000E3C02800890A200260A
+:10408000304200FF104400098F82FFACA0A400263C
+:104090002403005090420000304200FF1443000609
+:1040A000000000000A00058C8CC401803C028008DE
+:1040B00034420080A044002603E000080000000015
+:1040C00027BDFFE030E700FFAFB20018AFBF001C14
+:1040D000AFB10014AFB000100080902114E00006D2
+:1040E00030C600FF000000000000000D00000000CE
+:1040F0000A001037240001173C0380089062000E6C
+:10410000304200FF144600233462008090420026B3
+:10411000304200FF1446001F000000009062000FB4
+:10412000304200FF1446001B000000009062000AAD
+:10413000304200FF144600038F90FFAC0000000DDA
+:104140008F90FFAC8F82FFB03C118000AE05003C29
+:10415000AC450000A066000A0E0003158E24010085
+:10416000A20000240E0003208E2401003C038000E6
+:104170008C6201F80440FFFE24020002AC7201C010
+:10418000A06201C43C021000AC6201F80A001038C1
+:104190008FBF001C000000000000000D00000000A8
+:1041A000240001408FBF001C8FB200188FB1001493
+:1041B0008FB0001003E0000827BD00208F83FFAC04
+:1041C0003C0280008C440100344201008C65003CBC
+:1041D0009046001B0A000FFE240700013C028008E5
+:1041E0009043000E9042000A00431026304200FF28
+:1041F00003E000080002102B27BDFFE03C0280080E
+:10420000AFB10014AFB00010AFBF00183450008041
+:104210009202000524030030304200301443008431
+:10422000008088213C0208008C4200201040008160
+:104230008FBF00180E000D71000000008F86002C4B
+:10424000ACD100009202000892030009304200FF46
+:1042500000021200306300FF00431025ACC20004CE
+:104260009202004D000216000002160304410005F0
+:10427000000000003C0308008C6300480A00107630
+:104280003C108008920200083042004014400003B5
+:104290000000182192020027304300FF3C108008E4
+:1042A000361100809222004D00031E003C050800DC
+:1042B00094A54BFE304200FF000214000062182556
+:1042C000ACC300088E2300303C02C00B00A228259E
+:1042D000ACC3000C8E22003400002021ACC20010C0
+:1042E0008E220038ACC200148E22003CACC20018F2
+:1042F0000E000D98ACC5001C8E0200048F84002CAB
+:104300003C058000AC8200008E220020AC820004BC
+:104310008E22001CAC8200088E2200588CA30074F0
+:1043200000431021AC82000C8E22002CAC820010C5
+:104330008E2200408E23004400021400004310250A
+:10434000AC8200149222004D24030080304200FF12
+:1043500014430003000000000A0010B8AC800018ED
+:104360008E23000C240200011062000E2402FFFFC5
+:1043700092220008304200401440000A2402FFFF4D
+:104380008E23000C8CA20074006218233C020800EB
+:10439000006210241440000200002821006028213F
+:1043A00000051043AC8200183C02080094424BFE0A
+:1043B0003C03C00C00002021004310258F83002CFB
+:1043C0000E000D98AC62001C3C0480083482010091
+:1043D0008C4200008F83002C348400803C0608004F
+:1043E00094C64BFEAC620000AC6000048C850048B3
+:1043F0003C02400D00C23025AC650008AC60000CEA
+:10440000AC600010908200058FBF00188FB10014BF
+:1044100000021600AC6200148FB00010AC600018EF
+:1044200024040001AC66001C0A000D9827BD002082
+:104430008FBF00188FB100148FB0001003E0000888
+:1044400027BD00203C0280009443007C3C02800891
+:1044500034460100308400FF3065FFFF2402000570
+:1044600024A34650A0C4000C5482000C3065FFFF0A
+:1044700090C2000D2C4200071040000724A30A0040
+:1044800090C3000D240200140062100400A2102149
+:104490000A0010F53045FFFF3065FFFF3C02800841
+:1044A0003442008003E00008A44500143C03800867
+:1044B00034680080AD050038346701008CE2001CD0
+:1044C000308400FF00A210231840000330C600FF14
+:1044D00024A2FFFCACE2001C308200015040000826
+:1044E0003C0380088D02003C00A21023044100120E
+:1044F000240400058C62000410A2000F3C03800815
+:104500008C62000414A20018000000003C020800A5
+:104510008C4200D830420020104000093C02800844
+:1045200034620080906300089042004C1443000401
+:104530003C028008240400040A0010DF0000000090
+:104540003443008034420100A040000C24020001EA
+:10455000A462001410C000043C0280008C440100DE
+:104560000A000F480000000003E0000800000000FF
+:1045700027BDFFE800A61823AFBF00101860004E4B
+:10458000308800FF3C02800834470080A0E000240F
+:1045900034440100A0E000278C82001C00A21023FC
+:1045A0000440002B000000008CE2003C94E3005C1F
+:1045B0008CE4002C004530233063FFFF00C318213A
+:1045C0000083202B1080000400E018218CE2002CD6
+:1045D0000A00114800A2102194E2005C3042FFFF63
+:1045E00000C2102100A21021AC62001C3C02800815
+:1045F0003447008094E2005C8CE3001C3042FFFFF3
+:104600000002104000A210210043102B10400003B4
+:10461000000000000A0011598CE2001C94E2005CCA
+:104620003042FFFF0002104000A21021ACE2001C4B
+:104630003C028008344201008FBF0010010020219D
+:1046400024060001A040000C0A0010F927BD001844
+:104650008CE2001C004610230043102B5440000144
+:10466000ACE5001C94E2005C3042FFFF0062102BBE
+:10467000144000072402000294E2005C8CE3001C5A
+:104680003042FFFF00621821ACE3001C240200024C
+:10469000ACE500380E000F37A082000C1040001867
+:1046A0008FBF00103C0280008C4401008FBF0010BF
+:1046B0000A000F4827BD00183102001010400010FA
+:1046C0008FBF00103C028008344500808CA3001C82
+:1046D00094A2005C006618233042FFFF006218219C
+:1046E0003C023FFF3444FFFF0083102B5440000185
+:1046F0000080182100C31021ACA2001C8FBF001045
+:1047000003E0000827BD001827BDFFE800C04021D6
+:1047100000A63023AFBF001018C00026308A00FF6B
+:104720003C028008344900808D24001C8D23002C1D
+:10473000008820230064182B1060000F344701000C
+:104740008CE2002000461021ACE200208CE2002028
+:104750000044102B1440000B3C023FFF8CE2002071
+:1047600000441023ACE200209522005C3042FFFFA1
+:104770000A0011AE00822021ACE00020008620213A
+:104780003C023FFF3443FFFF0064102B5440000104
+:10479000006020213C0280083442008000851821FE
+:1047A000AC43001CA0400024A04000270A0011FDDB
+:1047B0008FBF001031420010104000408FBF00102A
+:1047C0003C06800834C400808C82003C00481023E2
+:1047D0005840003B014020219082002424420001E7
+:1047E000A0820024908200243C0308008C630024F3
+:1047F000304200FF0043102B544000348FBF0010A4
+:1048000034C201008C42001C00A210231840002F6B
+:104810008FBF00108CC300049482005C00681823D2
+:104820003042FFFF00031843000210400043102AEB
+:1048300010400005000000008CC200040048102356
+:104840000A0011E3000210439482005C3042FFFF33
+:10485000000210403C068008AC82002C34C5008069
+:1048600094A2005C8CA4002C94A3005C3042FFFF57
+:1048700000021040008220213063FFFF00832021CE
+:1048800001041021ACA2001C8CC2000434C601003B
+:10489000ACC2001C240200020E000F37A0C2000CA4
+:1048A0001040000A8FBF00103C0280008C440100C1
+:1048B0008FBF00100A000F4827BD001801402021BB
+:1048C000240600010A0010F927BD001803E00008C3
+:1048D00027BD00183C098008352A00808D42003C25
+:1048E000308300FF352B01000046102330E700FF26
+:1048F000184000060060202124020001A160000C85
+:10490000A160000D0A001190A542001424020005C8
+:10491000352901000000302114E20008A1400027E1
+:104920009122000D2C4200061040000400000000FF
+:104930009122000D24420001A122000D0A0010F96D
+:10494000000000003C0380083C028000344201006B
+:1049500034640080346301009045000A8C480014E0
+:104960008C8900389062000C30AA00FF01281823BF
+:10497000304700FF1C60000E2CE4000624020001FA
+:1049800000E210041080000A30430003014020219F
+:10499000010028210120302114600007304B000C59
+:1049A000156000073042003014400007000000008E
+:1049B00003E00008000000000A0011900000000061
+:1049C0000A00112A000000000A0012030000000083
+:1049D0003C0380083464010024020003A082000C20
+:1049E0008C62000403E00008AC82001C3C058008D7
+:1049F00034A300809062002734A501002406004300
+:104A000024420001A0620027906300273C020800B6
+:104A10008C420048306300FF146200043C076021B0
+:104A200094A500DA0A0008EE30A5FFFF03E00008B5
+:104A30000000000027BDFFE8AFBF00103C0280006F
+:104A40000E0012498C4401803C028008344301006E
+:104A5000A060000C8C4200048FBF001027BD00181E
+:104A600003E00008AC62001C27BDFFE03C028008A8
+:104A7000AFBF0018AFB10014AFB0001034450080D4
+:104A8000344601003C0880008D09014090C3000CB1
+:104A90008CA4003C8CA2003814820038306700FFE0
+:104AA0009502007C90A30027146000093045FFFFA9
+:104AB0002402000554E200083C04800890C2000D66
+:104AC00024420001A0C2000D0A0012843C048008A8
+:104AD000A0C0000D3C048008348201009042000C0C
+:104AE00024030005304200FF1443000A24A205DC21
+:104AF00034830080906200272C420007504000055C
+:104B000024A20A009063002724020014006210040B
+:104B100000A210213C108008361000803045FFFFB5
+:104B2000012020210E001249A60500149602005C07
+:104B30008E0300383C1180003042FFFF000210401D
+:104B400000621821AE03001C0E0003158E240140E4
+:104B50009202002534420040A20200250E000320EC
+:104B60008E2401408E2401408FBF00188FB10014A5
+:104B70008FB000100A000F4827BD00208FBF00181B
+:104B80008FB100148FB0001003E0000827BD002093
+:104B90008008010080080080800800008008024032
+:104BA00008000EF008000F4808000F8C08001020C5
+:104BB0000800106480080100800800808008000060
+:104BC0000A00002000000000000000000000000DAE
+:104BD0006370342E362E31370000000004061104B5
+:104BE00000000000000000000000000000000000C5
+:104BF0000000000038003C00000000000000000041
+:104C00000000000000000000000000200000000084
+:104C10000000000000000000000000000000000094
+:104C20000000000000000000000000000000000084
+:104C30000000000021003800000000010000002BEF
+:104C40000000000010000003000000000000000D44
+:104C50000000000D3C020800244255C43C0308003B
+:104C6000246357F4AC4000000043202B1480FFFD68
+:104C7000244200043C1D080037BD9FFC03A0F02126
+:104C80003C100800261000803C1C0800279C55C4DE
+:104C90000E00026A000000000000000D00A01821B4
+:104CA00000801021008028213C0460003C07600047
+:104CB0002406000810600006348420788C4200002E
+:104CC000ACE220088C63000003E00008ACE3200C99
+:104CD0000A000E1C00000000240300403C0260009B
+:104CE00003E00008AC4320003C0760008F86000012
+:104CF0008CE520740086102100A2182B1460000798
+:104D0000000028218F8AFDEC24050001A144001336
+:104D10008F89000001244021AF88000003E00008D3
+:104D200000A010218F84FDEC8F8500009086001379
+:104D300030C300FF00A31023AF82000003E000088F
+:104D4000A08000138F84FDEC27BDFFE8AFB00010FA
+:104D5000AFBF001490890011908700112402002831
+:104D6000312800FF3906002830E300FF2485002C9D
+:104D70002CD00001106200162484001C0E000037A5
+:104D8000000000008F8FFDEC3C056000240202044F
+:104D900095EE003E95ED003C000E5C0031ACFFFF4F
+:104DA000016C5025ACAA201052000001240200041E
+:104DB000ACA2200000000000000000000000000085
+:104DC0008FBF00148FB0001003E0000827BD00184B
+:104DD0000A00006F000028218F85FDEC27BDFFD859
+:104DE000AFBF0020AFB3001CAFB20018AFB10014CA
+:104DF000AFB000100080982190A4001124B0001CD6
+:104E000024B1002C308300FF386200280E000059C6
+:104E10002C5200010E000061000000000200202161
+:104E20001240000202202821000028210E00003735
+:104E3000000000008F8DFDEC3C0880003C05600008
+:104E400095AC003E95AB003C02683025000C4C0050
+:104E5000316AFFFF012A3825ACA720102402020284
+:104E6000ACA6201452400001240200028FBF002093
+:104E70008FB3001C8FB200188FB100148FB00010D8
+:104E800027BD002803E00008ACA2200027BDFFE0FA
+:104E9000AFB20018AFB10014AFB00010AFBF001C2C
+:104EA0003C1160008E2320748F82000030D0FFFF01
+:104EB00030F2FFFF1062000C2406008F0E00003756
+:104EC000000000003C06801F0010440034C5FF00B5
+:104ED0000112382524040002AE27201000003021E2
+:104EE000AE252014AE2420008FBF001C8FB2001806
+:104EF0008FB100148FB0001000C0102103E0000833
+:104F000027BD002027BDFFE0AFB0001030D0FFFF6D
+:104F1000AFBF0018AFB100140E00003730F1FFFF33
+:104F200000102400009180253C036000AC7020102C
+:104F30008FBF00188FB100148FB00010240200043E
+:104F4000AC62200027BD002003E000080000102113
+:104F500027BDFFE83C0C6018AFBF00108D985000D3
+:104F60002419FF7F3C0880000319782435EE380CA3
+:104F7000340D8071240A003124090C00AD8E5000DC
+:104F80003C0B800AAD8D53BCAD0A0008AD0900246E
+:104F90000E00048DAF8B002C0E00044B00000000AF
+:104FA0000E000046000000003C0760008CE5080889
+:104FB0002406FFF03C03570900A620243462F000C9
+:104FC00010820048241F0001AF8000380E000BAE95
+:104FD000000000003C0660168CC700003C0860140E
+:104FE0008D0500A03C03FFFF00E320243C02535347
+:104FF00000051FC21082003534C57C0094A201F266
+:10500000A780005010400003A7800060384C1E1E8F
+:10501000A78C005094A201F8104000048F8E003835
+:10502000384D1E1EA78D00608F8E003811C0000401
+:1050300097840060240F0020A78F005097840060A1
+:105040002C980081530000012404008097850050B3
+:105050002CB9040153200001240504003C03600026
+:105060008C670438241F103C30E2FFFF105F000300
+:105070003088FFFF5100000B24060050A38000621F
+:10508000938900621120000B8FBF001027BD00180C
+:10509000A7800060A7800050A780005803E00008A8
+:1050A000A7800076A3860062938900621520FFF72F
+:1050B0008FBF001027BD0018A7840060A78500508F
+:1050C000A780005803E00008A780007600035880FE
+:1050D000016650218D4900043C0660000A00010F62
+:1050E000012628210A000103AF9F00383083FFFF0B
+:1050F0008F88002C8F870028000321403C0580000A
+:105100003C020050008248253C0660003C0A010039
+:1051100034AC04008CCD08E001AA582411600005CD
+:10512000000000008CCF08E024E7000101EA7025B0
+:10513000ACCE08E08D19001001805821ACB90038C0
+:105140008D180014ACB8003CACA900300000000081
+:10515000000000000000000000000000000000004F
+:105160000000000000000000000000003C03800080
+:105170008C640000308200201040FFFD3C0F600076
+:105180008DED08E03C0E010001AE18241460FFE133
+:1051900000000000AF87002803E00008AF8B003C50
+:1051A0008F85002C240BFFF03C06800094A7001A8A
+:1051B0008CA9002430ECFFFF000C38C000EB502419
+:1051C000012A4021ACC8003C8CA400248CC3003CC4
+:1051D0000083102318400033000000008CAD002035
+:1051E00025A200013C0F0050ACC2003835EE001083
+:1051F0003C068000ACCE0030000000000000000043
+:10520000000000000000000000000000000000009E
+:1052100000000000000000003C0480008C990000A9
+:10522000333800201300FFFD30E200081040001763
+:105230003C0980008C880408ACA800108C83040C06
+:10524000ACA300143C1900203C188000AF190030BA
+:1052500094AE001894AF001C01CF3021A4A6001812
+:1052600094AD001A25A70001A4A7001A94AB001A58
+:1052700094AC001E118B00030000000003E0000846
+:105280000000000003E00008A4A0001A8D2A04001A
+:10529000ACAA00108D240404ACA400140A0001A2DE
+:1052A0003C1900208CA200200A00018A3C0F00500B
+:1052B0000A000178000000003C0308008C63002015
+:1052C0008F82003427BDFFE810620008AFBF0010D6
+:1052D0000E0001BCAF8300343C0308008C63002047
+:1052E00024040001106400048F8C002C8FBF001078
+:1052F00003E0000827BD00188FBF00103C058000A8
+:10530000A580000A958B000A958A000427BD001825
+:105310003167FFFF3149000F0009450000E83025E3
+:1053200003E00008ACA600803C0208008C4200208C
+:1053300027BDFFC8AFBF0034AFBE0030AFB7002CF1
+:10534000AFB60028AFB50024AFB40020AFB3001C47
+:10535000AFB20018AFB1001410400053AFB000104E
+:105360008F84002C948600069483000A00C32823AF
+:1053700030B6FFFF12C0004D8FBF00349489001873
+:10538000948A000A012A40233102FFFF02C2382B0F
+:1053900014E0000202C02021004020212C8C0005D6
+:1053A000158000020080A021241400040E00014B8F
+:1053B000028020218F87002C02809821AF8000304E
+:1053C00094ED000A028088211280005131B2FFFF63
+:1053D0003C1770003C1540003C1E60008F8F003C65
+:1053E0008DEE000001D718245075005302202021B3
+:1053F00002A3802B160000383C1820001078004AC9
+:1054000000000000241000018F8300301460003C75
+:10541000029158230230F8230250C82133F1FFFFD4
+:105420001620FFEE3332FFFF8F87002C3C12002046
+:105430003C118000AE32003094EA000A3C17800034
+:10544000026A4821A4E9000A94E3000A94E80004EF
+:105450003065FFFF3106000F0006150000A2F025A1
+:10546000AEFE008094F4000A94F5001812B4003ADD
+:105470000013C9408CF800148CEE00100319582159
+:10548000000078210179682B01CF6021018D202156
+:10549000ACEB0014ACE4001002D3382330F6FFFF6D
+:1054A00016C0FFB68F84002C8FBF00348FBE003033
+:1054B0008FB7002C8FB600288FB500248FB4002042
+:1054C0008FB3001C8FB200188FB100148FB0001082
+:1054D00003E0000827BD0038107E001B000000001C
+:1054E0001477FFC9241000010E0014E00000000032
+:1054F0008F8300301060FFC80230F82302915823D8
+:105500008F87002C017020210A0002553093FFFF85
+:105510008F8300301460FFC83C1200203C118000D3
+:105520000A00021EAE3200300E0003CE02202021FF
+:105530000A000212004080210E0007C60240282106
+:105540000A000212004080210E000D7D0220202161
+:105550000A000212004080210E00017800000000C5
+:105560000A00023702D3382327BDFFD0AFB500248D
+:10557000AFB40020AFB3001CAFB20018AFB100143D
+:10558000AFB00010AFBF00280E0000E43C14800054
+:105590003C0280083C0320003C010800AC20007065
+:1055A00034550080347200032413000136900070DB
+:1055B0002411FF800A0002858E0600003C1980003D
+:1055C0008F3800003B0F000131E200011040002540
+:1055D0008F8600848E0700003C0D08008DAD003CD6
+:1055E0003C0A08008D4A003800E6702301AE4021D5
+:1055F00000005821010E302B014B482101262021AB
+:105600003C010800AC28003CAF8700843C01080046
+:10561000AC2400380E0001BE000000003C0508006C
+:105620008CA5007010A0FFE500A020213C0508001B
+:105630008CA500683C0608008CC6006C0E00148324
+:10564000000000003C010800AC2000703C19800004
+:105650008F3800003B0F000131E200011440FFDDF4
+:105660008F8600848E0C00008F8D00843C0708001C
+:105670008CE7003C3C0608008CC60038018D58239E
+:1056800000EB282100AB202B00C24821012410216F
+:105690003C010800AC25003C3C0880003C010800AF
+:1056A000AC2200388D030100241F0C00107F00265F
+:1056B000000000008D180100240E0020AD1800200D
+:1056C00092AF000031E300FF106E00232419005058
+:1056D00010790026000000003C0480008C88010046
+:1056E0001500000300000000566000143C04400058
+:1056F0008C9901008C8F0100000098210331C02497
+:105700000018694031EE007F01AE602501925825F6
+:10571000AC8B08308C8701008C89010024EA0100E1
+:1057200001513024000629403123007F00A31025B9
+:105730000052F825AC9F08303C044000AE8401388C
+:105740000A00027D000000000E0001DA00000000E7
+:105750000A0002C73C0480008D0401000E00077F90
+:10576000000000000A0002C73C0480008D04010014
+:105770000E00139B000000000A0002C73C048000DA
+:1057800000A4102B24030001104000090000302168
+:105790000005284000A4102B04A0000300031840BB
+:1057A0005440FFFC000528405060000A0004182BFC
+:1057B0000085382B54E000040003184200C3302554
+:1057C00000852023000318421460FFF900052842D9
+:1057D0000004182B03E0000800C310213084FFFFF1
+:1057E00030C600FF3C0780008CE201B80440FFFE99
+:1057F00000064C00012430253C08200000C820256C
+:105800003C031000ACE00180ACE50184ACE401880D
+:1058100003E00008ACE301B83C0660008CC5201C26
+:105820002402FFF030830200308601001060000E79
+:1058300000A2282434A500013087300010E00005C4
+:1058400030830C0034A500043C04600003E0000831
+:10585000AC85201C1060FFFD3C04600034A50008EE
+:1058600003E00008AC85201C54C0FFF334A50002FF
+:105870000A00031F3087300027BDFFE8AFB00010DB
+:10588000AFBF00143C076000240600021080001126
+:1058900000A080218F83003C0E0003168C6400184A
+:1058A0008F82003C00002021240600018C45000C62
+:1058B0000E0003070000000016000002240200038F
+:1058C000000010218FBF00148FB0001003E000080B
+:1058D00027BD00188CE8201C2409FFF001092824AA
+:1058E000ACE5201C8F87003C0A00033C8CE5000CD3
+:1058F0003C02600E0080402134460100240900185B
+:105900000000000000000000000000003C0A005001
+:105910003C03800035470200AC6800383464040062
+:10592000AC65003CAC6700308C6C0000318B002013
+:105930001160FFFD2407FFFF2403007F8C8D000012
+:105940002463FFFF24840004ACCD00001467FFFB38
+:1059500024C6000400000000000000000000000059
+:1059600024A402000085282B3C0300203C0E80006C
+:105970002529FFFF01054021ADC300301520FFE0C0
+:105980000080282103E00008000000008F82003C16
+:1059900027BDFFD8AFB3001CAFBF0020AFB20018C7
+:1059A000AFB10014AFB000109446000200809821FF
+:1059B0008C5200182CC300818C4800048C470008CE
+:1059C0008C51000C8C490010106000078C4A0014A8
+:1059D0002CC400041480001330EB000730C5000312
+:1059E00010A00010000000002410008B02002021F5
+:1059F000022028210E00030724060003166000027F
+:105A000024020003000010218FBF00208FB3001C70
+:105A10008FB200188FB100148FB0001003E000089F
+:105A200027BD00281560FFF12410008B3C0C80007E
+:105A30003C030020241F0001AD830030AF9F0030E5
+:105A40000000000000000000000000002419FFF02A
+:105A500024D8000F031978243C1000D0AD880038FA
+:105A600001F0702524CD00033C08600EAD87003C9A
+:105A700035850400AD8E0030000D38823504003CC1
+:105A80003C0380008C6B0000316200201040FFFD61
+:105A90000000000010E0000824E3FFFF2407FFFFE0
+:105AA0008CA800002463FFFF24A50004AC8800003C
+:105AB0001467FFFB248400043C04600EAC860038AD
+:105AC0000000000000000000000000003C07002073
+:105AD0003C0680000120202101402821ACC7003075
+:105AE0000E00034C000080210E000316024020210E
+:105AF0000A00038C0200202127BDFFD8AFB2001896
+:105B00003092FFFFAFB10014AFBF0020AFB3001C55
+:105B1000AFB000101240002D000088210A0003E2FF
+:105B20002413000350B300428CE5000C0000000D6C
+:105B3000263900013331FFFF24F800200232382BD0
+:105B400010E00022AF98003C8F8200301440001F0C
+:105B50008F87003C3C0670003C0320008CE4000072
+:105B60000086282414A300198F85004400044402F1
+:105B70003C0980000089802414A0FFEA310600FF60
+:105B8000240A000210CA003028CB0003116000175D
+:105B9000000000002404000114C4FFE626390001BF
+:105BA000020028210E00032E240400018F87003CF0
+:105BB000AF820044263900013331FFFF24F8002072
+:105BC0000232382B14E0FFE0AF98003C0220102195
+:105BD0008FBF00208FB3001C8FB200188FB100144C
+:105BE0008FB0001003E0000827BD002810D3001B71
+:105BF000240C000414CCFFCF26390001308DFFFFA8
+:105C0000000D19C03C0480008C8E01B805C0FFFE59
+:105C10003C0F10003C102004AC830180AC80018458
+:105C2000AC900188AC8F01B80A0003DD2639000171
+:105C30000E000307240400841600FFBD8F87003C7C
+:105C40000A0003DCAF800044020028210E00032E6E
+:105C5000000020210A0003FC8F87003C0E00037324
+:105C6000020020218F87003C0A0003FDAF82004420
+:105C7000000449C23127003F000443423C02800037
+:105C800000082040240316802CE60020AC43002CA2
+:105C900024EAFFE02482000114C0000330A900FFC1
+:105CA00000801021314700FF000260803C0D800021
+:105CB000240A0001018D20213C0B000E00EA28047B
+:105CC000008B302111200005000538278CCE000004
+:105CD00001C5382503E00008ACC700008CD80000DF
+:105CE0000307782403E00008ACCF000027BDFFE0E5
+:105CF000AFB10014AFB00010AFBF00183C07600098
+:105D00008CE408083402F0003C1160003083F0009D
+:105D1000240501C03C04800E000030211062000602
+:105D2000241000018CEA08083149F0003928E0000D
+:105D30000008382B000780403C0D0200AE2D0814EF
+:105D4000240C16803C0B80008E2744000E000E268B
+:105D5000AD6C002C120000043C02169124050001D9
+:105D6000120500103C023D6C345800E0AE38440887
+:105D70003C1108008E31007C8FBF00183C0660008B
+:105D800000118540360F16808FB100148FB00010BF
+:105D90003C0E020027BD0020ACCF442003E00008E9
+:105DA000ACCE08103C0218DA345800E0AE38440893
+:105DB0003C1108008E31007C8FBF00183C0660004B
+:105DC00000118540360F16808FB100148FB000107F
+:105DD0003C0E020027BD0020ACCF442003E00008A9
+:105DE000ACCE08100A00042C240500010A00042C83
+:105DF0000000282124020400A782000CA7800004D0
+:105E0000000020213C06080024C656582405FFFF48
+:105E100024890001000440803124FFFF010618217D
+:105E20002C87002014E0FFFAAC6500002404040075
+:105E3000A784000EA7800006000020213C06080071
+:105E400024C656D82405FFFF248D0001000460807D
+:105E500031A4FFFF018658212C8A00201540FFFA4B
+:105E6000AD650000A7800010A7800008A780000A89
+:105E7000000020213C06080024C657582405FFFFD7
+:105E8000249900010004C0803324FFFF0306782119
+:105E90002C8E000415C0FFFAADE500003C05600043
+:105EA0008CA73D002403E08F00E31024344601401A
+:105EB00003E00008ACA63D002487007F000731C244
+:105EC00024C5FFFF000518C2246400013082FFFFD3
+:105ED000000238C0A78400183C010800AC2700303D
+:105EE000AF80001400002821000020210000302194
+:105EF0002489000100A728213124FFFF2CA81701C5
+:105F0000110000032C8300801460FFF924C60001F7
+:105F100000C02821AF86001410C0001DA786001203
+:105F200024CAFFFF000A11423C0808002508575800
+:105F30001040000A00002021004030212407FFFF0C
+:105F4000248E00010004688031C4FFFF01A8602195
+:105F50000086582B1560FFFAAD87000030A2001FA5
+:105F60005040000800043080240300010043C804AE
+:105F700000041080004878212738FFFF03E0000864
+:105F8000ADF8000000C820212405FFFFAC8500000B
+:105F900003E000080000000030A5FFFF30C6FFFF4F
+:105FA00030A8001F0080602130E700FF0005294273
+:105FB0000000502110C0001D24090001240B000125
+:105FC00025180001010B2004330800FF0126782664
+:105FD000390E00202DED00012DC2000101A218256F
+:105FE0001060000D014450250005C880032C40219D
+:105FF0000100182110E0000F000A20278D04000086
+:10600000008A1825AD03000024AD000100004021E6
+:106010000000502131A5FFFF252E000131C9FFFFEF
+:1060200000C9102B1040FFE72518000103E000080D
+:10603000000000008D0A0000014440240A000512FF
+:10604000AC68000027BDFFE830A5FFFF30C6FFFFAA
+:10605000AFB00010AFBF001430E7FFFF00005021C9
+:106060003410FFFF0000602124AF001F00C0482152
+:10607000241800012419002005E0001601E0102179
+:106080000002F943019F682A0009702B01AE4024E9
+:1060900011000017000C18800064102110E00005AA
+:1060A0008C4B000000F84004000838230167582496
+:1060B00000003821154000410000402155600016C5
+:1060C0003169FFFF258B0001316CFFFF05E1FFEC1B
+:1060D00001E0102124A2003E0002F943019F682A3A
+:1060E0000009702B01AE40241500FFEB000C188056
+:1060F000154600053402FFFF020028210E0004F6B9
+:1061000000003821020010218FBF00148FB0001052
+:1061100003E0000827BD00181520000301601821C6
+:10612000000B1C0224080010306A00FF1540000517
+:10613000306E000F250D000800031A0231A800FF81
+:10614000306E000F15C00005307F000325100004DD
+:1061500000031902320800FF307F000317E000053A
+:10616000386900012502000200031882304800FF50
+:10617000386900013123000110600004310300FF81
+:10618000250A0001314800FF310300FF000C69407F
+:1061900001A34021240A000110CAFFD53110FFFFDE
+:1061A000246E000131C800FF1119FFC638C9000173
+:1061B0002D1F002053E0001C258B0001240D000141
+:1061C0000A000589240E002051460017258B000186
+:1061D00025090001312800FF2D090020512000125F
+:1061E000258B000125430001010D5004014B1024B3
+:1061F000250900011440FFF4306AFFFF3127FFFF3B
+:1062000010EE000C2582FFFF304CFFFF00005021F4
+:106210003410FFFF312800FF2D0900205520FFF228
+:1062200025430001258B0001014648260A0005434D
+:10623000316CFFFF00003821000050210A00059555
+:106240003410FFFF27BDFFD8AFB0001030F0FFFFC4
+:10625000AFB10014001039423211FFE00007108086
+:10626000AFB3001C00B1282330D3FFFFAFB200183A
+:1062700030A5FFFF008090210260302100442021E2
+:10628000AFBF00200E0005213207001F0222882127
+:106290003403FFFF02402021020028210260302148
+:1062A00000003821104300093231FFFF0220102185
+:1062B0008FBF00208FB3001C8FB200188FB1001465
+:1062C0008FB0001003E0000827BD00280E00052154
+:1062D0000000000000408821022010218FBF002014
+:1062E0008FB3001C8FB200188FB100148FB0001054
+:1062F00003E0000827BD0028000424003C036000E0
+:10630000AC603D0810A000023482100634821016E2
+:1063100003E00008AC623D0427BDFFE0AFB0001011
+:10632000309000FF2E020006AFBF0018104000089A
+:10633000AFB10014001030803C030800246353B454
+:1063400000C328218CA40000008000080000000089
+:10635000000020218FBF00188FB100148FB00010F3
+:106360000080102103E0000827BD00209791001253
+:1063700016200051000020213C020800904200330A
+:106380000A0005FC00000000978D000E15A00031EA
+:10639000000020210A0005FC240200089787000C59
+:1063A00014E0001A000018210060202124020001DE
+:1063B0001080FFE98FBF0018000429C2004530217A
+:1063C00000A6582B1160FFE43C0880003C07200029
+:1063D000000569C001A76025AD0C00203C038008C2
+:1063E0002402001F2442FFFFAC6000000441FFFDB7
+:1063F0002463000424A5000100A6702B15C0FFF53E
+:10640000000569C00A0005E68FBF001897870004E1
+:106410003C04080024845658240504000E0005A1FD
+:1064200024060001978B000C24440001308AFFFFF2
+:106430002569FFFF2D480400004028211500004079
+:10644000A789000C24AC3800000C19C00A0005FA1A
+:10645000A7800004978700063C040800248456D8CF
+:10646000240504000E0005A1240600019799000EE2
+:10647000244400013098FFFF272FFFFF2F0E040058
+:106480000040882115C0002CA78F000EA7800006B1
+:106490003A020003262401003084FFFF0E0005CEDF
+:1064A0002C4500010011F8C027F00100001021C0A8
+:1064B0000A0005FC24020008978500169787000A49
+:1064C0003C040800248457580E0005A1240600014E
+:1064D000978700128F8900142445000130A8FFFF20
+:1064E00024E3FFFF0109302B0040802114C0001875
+:1064F000A7830012A780000A978500180E000E10CF
+:1065000002002021244A05003144FFFF0E0005CE81
+:10651000240500013C05080094A500320E000E1071
+:1065200002002021244521003C0208009042003353
+:106530000A0005FC000521C00A000634A7840006F5
+:1065400024AC3800000C19C00A0005FAA784000426
+:106550000A00064EA785000A308400FF27BDFFE829
+:106560002C820006AFBF0014AFB000101040001521
+:1065700000A03821000440803C030800246353CC71
+:10658000010328218CA40000008000080000000006
+:1065900024CC007F000751C2000C59C23170FFFFAC
+:1065A0002547C40030E5FFFF2784000402003021A6
+:1065B0000E0004F624070001978600100206202131
+:1065C000A78400108FBF00148FB0001003E00008F4
+:1065D00027BD00183C0508008CA50030000779C2D3
+:1065E0000E0002F025E4DF003045FFFF3C04080008
+:1065F00024845758240600010E0004F624070001E5
+:10660000978E00128FBF00148FB0001025CD0001AF
+:1066100027BD001803E00008A78D00120007C9C2BB
+:106620002738FF00001878C231F0FFFF3C04080053
+:10663000248456D802002821240600010E0004F606
+:1066400024070001978D000E260E0100000E840025
+:1066500025AC00013C0B6000A78C000EAD603D082E
+:1066600036040006000030213C0760008CE23D0447
+:10667000305F000617E0FFFD24C9000100061B0083
+:10668000312600FF006440252CC50004ACE83D0421
+:1066900014A0FFF68FBF00148FB0001003E00008B5
+:1066A00027BD0018000751C22549C8002406000173
+:1066B000240700013C040800248456580E0004F608
+:1066C0003125FFFF9787000C8FBF00148FB000109B
+:1066D00024E6000127BD001803E00008A786000C8F
+:1066E0003084FFFF30A5FFFF3C0680008CC201B85C
+:1066F0000440FFFE3C084080008838253C03100021
+:10670000ACC00180ACC50184ACC7018803E00008BF
+:10671000ACC301B83084FFFF3C0680008CC201B8D6
+:106720000440FFFE3C0840388CA700000088282564
+:106730003C031000ACC70180ACC5018803E0000831
+:10674000ACC301B88F83005C8F8600541066000BC9
+:10675000008040213C07080024E75768000328C058
+:1067600000A710218C44000024630001108800055C
+:106770003063000F5466FFFA000328C003E00008EE
+:10678000000010213C07080024E7576C00A73021C7
+:1067900003E000088CC200003C039000346200015A
+:1067A000008220253C038000AC6400208C65002022
+:1067B00004A0FFFE0000000003E00008000000004D
+:1067C0003C028000344300010083202503E00008E0
+:1067D000AC44002027BDFFE0AFB100143091FFFFB3
+:1067E000AFB00010AFBF00181220001200A080212F
+:1067F0008CA5000014A00011240400023C068000B7
+:106800008CC201B80440FFFE3C074000022720254F
+:106810008FBF00188FB100148FB000103C03100020
+:1068200027BD0020ACC50180ACC4018803E000088E
+:10683000ACC301B80A00070F8CA500000E00066665
+:1068400024060200000028210A00070FAE00000005
+:106850003087FFFF3C0680008CC201B80440FFFE79
+:106860003C0A40068CA9000000EA4025ACC9018022
+:106870008CA400043C031000ACC40184ACC80188A3
+:1068800003E00008ACC301B88F83FDE827BDFFE833
+:10689000AFBF0014AFB00010906700080080102157
+:1068A0000080282130E600400000202110C00008B0
+:1068B0008C5000000E0000860200202102002021E2
+:1068C0008FBF00148FB000100A00048927BD001884
+:1068D0000E000724000000000E00008602002021A8
+:1068E000020020218FBF00148FB000100A0004891D
+:1068F00027BD001827BDFFE0AFB000108F90FDE866
+:10690000AFBF001CAFB20018AFB100149206000177
+:10691000008088210E0006F630D2000492040005A3
+:10692000001129C2A605000034830040A20300051F
+:106930000E000700022020210E00048B02202021DF
+:1069400024020001AE02000C02202821A602001041
+:1069500024040002A602001224060200A60200146B
+:106960000E000666A60200161640000F8FBF001C20
+:10697000978C00583C0B08008D6B00782588FFFF32
+:106980003109FFFF256A0001012A382B10E00006BB
+:10699000A78800583C0F6006240E001635ED001045
+:1069A000ADAE00508FBF001C8FB200188FB1001425
+:1069B0008FB0001003E0000827BD002027BDFFE0D6
+:1069C000AFBF0018AFB10014AFB000100E0006F654
+:1069D000008088218F85FDE80220202190A30005FA
+:1069E0000E000700307000FF2402003E1202000576
+:1069F0008FBF00188FB100148FB0001003E00008A3
+:106A000027BD00203C0580008CA401780480FFFE97
+:106A1000240700073C061000ACB1014002202021F1
+:106A2000A0A701448FBF00188FB100148FB00010D1
+:106A3000ACA601780A00074D27BD002027BDFFE066
+:106A4000AFB00010AFBF0018AFB100143C10800011
+:106A50008E110020000000000E00048BAE04002008
+:106A6000AE1100208FBF00188FB100148FB000103E
+:106A700003E0000827BD00203084FFFF3C068000B3
+:106A80008CC201B80440FFFE3C0840350088382520
+:106A90003C031000ACC50180ACC00184ACC70188C8
+:106AA00003E00008ACC301B83084FFFF3C0680005F
+:106AB0008CC201B80440FFFE3C08403600883825EF
+:106AC0003C031000ACC50180ACC00184ACC7018898
+:106AD00003E00008ACC301B827BDFFD0AFB5002468
+:106AE0003095FFFFAFB60028AFB40020AFBF002C39
+:106AF000AFB3001CAFB20018AFB10014AFB00010BC
+:106B000030B6FFFF12A000270000A0218F92003CAA
+:106B10008E4300003C0680002402004000033E0239
+:106B200000032C0230E4007F006698241482001DCC
+:106B300030A500FF8F83004C2C68000A5100001024
+:106B40008F860030000358803C0C0800258C53E8E9
+:106B5000016C50218D490000012000080000000058
+:106B600002D448213125FFFF0E0006C8240400840A
+:106B7000166000028F92003CAF80004C8F86003080
+:106B800026580020268F00010300902131F4FFFFDA
+:106B900014C00004AF98003C0295282B14A0FFDC21
+:106BA00000000000028010218FBF002C8FB600284B
+:106BB0008FB500248FB400208FB3001C8FB2001853
+:106BC0008FB100148FB0001003E0000827BD003023
+:106BD0002407003414A70146000000009247000E6D
+:106BE0008F99FDEC8F90FDE824181600A32700195B
+:106BF000924A000D3C0880003C07800CA32A001834
+:106C0000964400123C0F60003C117FFFA604005C1C
+:106C1000965F00103622FFFF240A000533E5FFFFD0
+:106C2000AE0500548E46001CAD1800288CE900000B
+:106C30008DEE44480126682601CD3021AE0600388D
+:106C40008E03003824CB00013C0E7F00AE03003CD5
+:106C50008E0C003CAF2C0004AE0B00208E130020E5
+:106C6000AE13001CA320001BAE02002CA32A0012AE
+:106C70008E44001424130050AE0400348E1F0034E0
+:106C8000AF3F00148E450018AE0500489258000C26
+:106C9000A218004E920F000835E90020A209000852
+:106CA0008E0D001801AE1824346C4000AE0C001894
+:106CB000920B0000317200FF125302AD2413FF80CB
+:106CC0003C040800248457E80E000732000000004E
+:106CD00024030004240800013C0508008CA557E8A3
+:106CE0003C048000A2030025A20800058C900178D6
+:106CF0000600FFFE8F92003C240E00023C0D1000A7
+:106D0000AC850140A08E0144AC8D01780A0007EFEC
+:106D1000AF80004C2CAD003711A0FF998F8600305A
+:106D2000000580803C1108002631541002117821A2
+:106D30008DEE000001C000080000000024100004D7
+:106D400014B0008E3C0780003C0C08008D8C57E886
+:106D50008F86FDE8ACEC00208E4B00088F98FDEC90
+:106D600024090050ACCB00308E430008ACC3005067
+:106D70008E42000CACC200348E4A0010ACCA0038FF
+:106D80008E440010ACC400548E5F0014ACDF003C95
+:106D90008E590018AF1900048E4F001CACCF002094
+:106DA00090D10000322500FF10A9027D00000000F4
+:106DB0008CD100348CCF0030022F302304C000F37C
+:106DC0002404008C126000F0240200030A0007EF84
+:106DD000AF82004C2418000514B800683C0B8000FA
+:106DE0003C0C08008D8C57E88F86FDE8AD6C0020C8
+:106DF0008E4300048F9FFDEC24072000ACC3001CD1
+:106E00009242000824120008A3E200198F8A003C75
+:106E100091440009A3E400188F85003C90B9000A52
+:106E2000332400FF1092001028880009150000BCD0
+:106E3000240D0002240900201089000B3407800073
+:106E4000289100211620000824074000240F00404C
+:106E5000108F00053C0700012418008010980002E4
+:106E60003C070002240740008CC400183C0AFF00C5
+:106E7000008AF82403E7C825ACD9001890B2000BAB
+:106E8000A0D200278F83003C9465000C10A0023133
+:106E9000000000009467000C3C1F8000A4C7005C49
+:106EA0009062000E2403FFBF24070004A0C2000864
+:106EB0008F8A003C9144000FA0C400098F88003CD9
+:106EC0008D1200108FF9007402592823ACC50058A8
+:106ED0008D180014ACD8002C950F001831F1FFFF6D
+:106EE000ACD100409509001A3130FFFFACD000440E
+:106EF0008D0E001CACCE0048950D0002A4CD00788C
+:106F0000910C000EA0CC000890CB00080163102467
+:106F1000126001D7A0C200088F92003C0A0007EF60
+:106F2000AF87004C2406000614A600143C0E800017
+:106F30003C1008008E1057E88F8CFDE4ADD0002087
+:106F40008E4D00188F86FDE88F8BFDECAD8D000017
+:106F50008CC8003824040005AD8800048CC3003CB4
+:106F600012600081AD6300000A0007EFAF84004C9F
+:106F70002409000710A9004B240400063C05080062
+:106F800024A557E80E000705240400818F92003CD9
+:106F90000013102B0A0007EFAF82004C241F0023C0
+:106FA00014BFFFF63C0C80003C0308008C6357E8DC
+:106FB0008F8BFDECAD8300208F91FDE88E460004A1
+:106FC0002564002026450014AE2600282406000370
+:106FD0000E000E1C257000308F87003C020020211F
+:106FE000240600030E000E1C24E500083C040800E3
+:106FF000248457E80E0007320000000092220000AF
+:1070000024040050304A00FF5544FFE18F92003CB9
+:107010000E000E07000000000A0008F48F92003CEA
+:107020002408003314A800323C0280003C11080000
+:107030008E3157E88F89FDECAC5100208E4A000854
+:10704000240F00288F8DFDE8AD2A00308E44000CFF
+:1070500024060009AD2400348E5F0010AD3F0038D7
+:107060008E590014AD3900208E450018AD2500243E
+:107070008E58001CAD380028A12F00118E4E000440
+:1070800012600031ADAE00288F92003C0A0007EF7D
+:10709000AF86004C2411002214B1FFB8000000009C
+:1070A000240400073C1808008F1857E83C0F8000A4
+:1070B000ADF800205660FEB1AF84004C3C040800DF
+:1070C000248457E80E000732241300508F99FDE8FE
+:1070D00093320000324500FF10B3016C0000000045
+:1070E0008F92003C000020210A0007EFAF84004C83
+:1070F0003C05080024A557E80E0006D524040081AD
+:107100000A0008F48F92003C02D498213265FFFFF8
+:107110000E0006C8240400840A0007EF8F92003C8A
+:10712000108DFF51240704002887000310E001AAF6
+:1071300024100004240E0001548EFF4B240740004D
+:107140000A0008AA240701003C05080024A557E806
+:107150000E000724240400828F92003C000030219E
+:107160000A0007EFAF86004C3C040800248457E86F
+:107170008CC200380E0007328CC3003C8F92003C5A
+:107180000A00094A00002021240400823C0508006E
+:1071900024A557E80E000724000000008F92003C51
+:1071A000000010210A0007EFAF82004C8E5000044F
+:1071B0008F91FDE83C0A8000AD500020922200052E
+:1071C000020028213046000214C001872404008AEE
+:1071D0008F92FDEC020028212404008D924B001BAD
+:1071E000316300201460018000000000922D00092E
+:1071F000240C001231A800FF110C017B2404008133
+:107200000E0006F6020020219245001B240E000409
+:107210000200202134A90042A249001B0E000700F1
+:10722000A22E00253C0480008C9101780620FFFEF0
+:1072300024180002AC900140A09801448F92003CB9
+:107240003C0F1000AC8F01780A0008F50013102BDA
+:107250008E5000048F91FDE83C1F8000AFF00020AD
+:1072600092390005020028213327000214E0001A99
+:107270002404008A922600092412001230C400FF60
+:10728000109201110000000092230009240A00045A
+:10729000306200FF104A010C000000000E0006F6EC
+:1072A000020020218F88FDEC240CFFFE020020212B
+:1072B000910E001B35CD0020A10D001BA23200094C
+:1072C000922B0005016C90240E000700A2320005ED
+:1072D00002002821000020210E0007BA0000000053
+:1072E0000A0008F48F92003C8E5100043C0280009A
+:1072F0003C100800261057E8AC5100203C01080063
+:10730000AC3157E89246000330C400041080016994
+:107310008F84FDE824020006A0820009924D001B24
+:107320002408FFC031AC003F01885825A08B00081D
+:1073300092430003306A0001154001600000000024
+:107340008E420008AE0200083C0208008C4257F052
+:107350001040015F8F8EFDEC000281C28F85FDE839
+:10736000A5D0000C8E5F000C240F0001240900142E
+:10737000ADDF002C8E590010ADD9001C96470016C9
+:10738000A5C7003C96580014A5D8003EACAF000C31
+:10739000A4AF0010A4AF0012A4AF0014A4AF001655
+:1073A00012600163A1C900119244000330920002EF
+:1073B0002E5300018F92003C266200080A0007EF5E
+:1073C000AF82004C8E4600043C0580003C048008DF
+:1073D000ACA600208E4700089089000024110050C0
+:1073E000312200FF105100BC240500883C048000BD
+:1073F0008C8F01B805E0FFFE0013802B3C1840097C
+:1074000000B81025AF90004C3C101000AC860180F5
+:10741000AC870184AC820188AC9001B80A0007F007
+:107420008F8600308E4500043C0680003C098008B1
+:10743000ACC50020913F00002404005033F900FF48
+:10744000132400B4240600883C0480008C8A01B810
+:107450000540FFFE3C0E400E00CE68253C081000A3
+:10746000AC850180AC800184AC8D0188AC8801B80A
+:10747000912B0000240CFF8024040004016C1825CB
+:10748000240600300E000666A12300000A0008F45E
+:107490008F92003C8E5000048F91FDEC3C0F8000D9
+:1074A000ADF000209225001B30A900101120007CB7
+:1074B000240300813C0480008C8701B804E0FFFEB7
+:1074C0003C1F401FAC900180007F10250013C82B8B
+:1074D0003C101000AC800184AF99004CAC82018854
+:1074E000AC9001B80A0007F08F8600308E44001C73
+:1074F0000E0006E100000000104000FC00403821B2
+:107500008F92003C240600893C0580008CAE01B8B7
+:1075100005C0FFFE00000000ACA701808E50001CDB
+:107520003C1140010013782B00D138253C1310008A
+:10753000ACB00184AF8F004CACA70188ACB301B8EC
+:107540000A0007F08F860030965900023C100800B0
+:10755000261057E833380004130000A73C046000ED
+:107560008E5F001C3C068000ACDF00203C01080060
+:10757000AC3F57E8964F000231E7000114E000E706
+:10758000000000008E420004AE0200083C1008001B
+:107590008E1057F0120000DD3C0680008F85FDE85C
+:1075A000241000018CBF00188F91FDEC8F89FDE441
+:1075B00003E6C825ACB90018A0A00005ACB0000CCB
+:1075C0003C1808008F1857F08F87003CA4B00010BB
+:1075D000001879C2A4B00012A4B00014A4B0001620
+:1075E000A62F000C8CEE00088F8D003C8F8C003C89
+:1075F000AE2E002C8DA8000C24070002AE28001C23
+:10760000918B0010A22B00118F83003C906A001117
+:10761000A12A00088F82003C90440012A0A4004ED2
+:107620008F92003C92460013A22600128F92003CDB
+:10763000965F0014A63F003C96590016A639003EFE
+:107640008E580018AE3800145660FD4CAF87004CC1
+:107650003C05080024A557E80E000705000020217E
+:107660008F92003C000038210A0007EFAF87004CE2
+:107670003C05080024A557E80E00072424040082D6
+:107680008F92003C0A0008D7000038210E000E0738
+:10769000000000008F92003C0A00094A00002021EF
+:1076A0000E0006F6020020219232001B020020216B
+:1076B000365800100E000700A238001B8F92003CC5
+:1076C0000A000A3D000018210E0007BA24040081B8
+:1076D0000A0008F48F92003C9243000C306A0001CB
+:1076E0001140000300000000964B000EA48B002CFC
+:1076F0009248000C310C00021180FF3C0000282150
+:10770000964E00128E4D0014A48E001A0A000A0B29
+:10771000AC8D001C8F83005C8F8700541067FF4A7C
+:10772000000030213C0808002508576C000320C0E9
+:10773000008830218CD10000122500C8246200018D
+:107740003043000F1467FFFA000320C00A000A222A
+:10775000000030213C05080024A557E80E0007244E
+:107760002404008B8F92003C0A0008D70013382BAA
+:107770003C0C08008D8C57E824D9FFFE25910100B0
+:10778000322B007F0167902102331024AD020028C4
+:10779000AE4600D0AE4000D40A000840AE59001CEE
+:1077A000ACC000543C0908008D2957E83C05800C0A
+:1077B00034A80100ACE900288E500014AD1000D0B0
+:1077C0008E4E0014AD0E00D48E4D001025A7FFFE86
+:1077D0000A00087CAD07001C5490FDA3240740005C
+:1077E0000A0008AA240710000E0007AE00000000DF
+:1077F0000A0008F48F92003C8C83442C3C05DEADDB
+:1078000034B2BEEF3C010800AC2057E81072004FC4
+:10781000000000003C046C6234827970146200083D
+:1078200024040002978A0058978300500200282100
+:107830000143482B11200019240400922404000263
+:107840000E0005D6240502003C0B8000AD6200202E
+:107850003C010800AC2257E81040000D8F8E003C20
+:10786000240C00282404000391CD001031A800FF4F
+:10787000550C0001240400010E00004A0000000025
+:1078800010400004240400830A000A6D8F92003C1B
+:10789000240400833C05080024A557E80E000705D2
+:1078A000000000008F92003C0013382B0A0007EF05
+:1078B000AF87004C0A0009D6240200128E4400084B
+:1078C0000E0006E1000000000A0009E2AE02000816
+:1078D0003C05080024A557E80E0006D524040087BF
+:1078E0008F92003C0A0009FF0013102B24040004AF
+:1078F0000E0005D624050030144000170040382142
+:107900008F92003C0A000A52240600833C050800BE
+:1079100024A557E80A000B37240400878E4400048E
+:107920000E0006E1000000000A000A73AE02000823
+:107930003C05080024A557E80E0007242404008213
+:107940008F92003C0A0009FF000010218C83442C18
+:107950000A000B163C046C628F92003C3C088008C5
+:107960003C0C8000240B0050240A0001AD82002052
+:10797000A10B0000A10A000192490004A10900180E
+:1079800092440005A1040019924300063C0408003B
+:107990002484576CA103001A924200073C0308009C
+:1079A00024635768A102001B92450008A105001C32
+:1079B00092460009A106001D925F000AA11F001E49
+:1079C0009259000BA119001F9258000CA118002019
+:1079D0009251000DA11100219250000EA110002221
+:1079E000924F000FA10F0023924E0010A10E002411
+:1079F000924D0011A10D0025964C0014A50C0028F5
+:107A0000964B00168F8A00548F98005CA50B002AB5
+:107A100096490018000A10C025450001A509002C50
+:107A20008E46001C0044C8210043F82130A5000FF9
+:107A3000AFE60000AF27000010B80003AF85005488
+:107A40000A000A520000302124AD000131A8000FC5
+:107A5000000030210A000A52AF88005C3C07080091
+:107A600024E7576800879021ACC000000000302157
+:107A70000A000A22AE4000003C0482013C03600080
+:107A800034820E02AC603D68AF80007C03E00008E9
+:107A9000AC623D6C27BDFFE8AFB000103090FFFF37
+:107AA000001018422C620041AFBF001414400002C5
+:107AB00024040080240300403C010800AC30006036
+:107AC0003C010800AC2300640E000E100060282169
+:107AD000244802BF2409FF800109282400103980AE
+:107AE000001030408FBF00148FB0001000A720217D
+:107AF00000861821AF8300643C010800AC250058C3
+:107B00003C010800AC24005C03E0000827BD00181D
+:107B1000308300FF30C6FFFF30E400FF3C088000E8
+:107B20008D0201B80440FFFE0003540001443825D3
+:107B30003C09600000E920253C031000AD050180F0
+:107B4000AD060184AD04018803E00008AD0301B86F
+:107B50008F86003C3C096012352700108CCB000456
+:107B60003C0C600E35850010316A00062D4800017E
+:107B7000ACE800C48CC40004ACA431808CC2000802
+:107B800094C30002ACA2318403E00008A783007410
+:107B90008F85003C8F87FF408F86FF488CAE0004A6
+:107BA0003C0F601235E80010ACEE00688CAD0008A8
+:107BB000ACED006C8CAC0010ACCC004C8CAB000C71
+:107BC000ACCB004894CA00543C0208008C420044EC
+:107BD00025490001A4C9005494C400543083FFFF18
+:107BE00010620017000000003C0208008C420040B8
+:107BF000A4C200528CA30018ACE300308CA2001485
+:107C0000ACE2002C8CB90018ACF900388CB8001428
+:107C100024050001ACF800348D0600BC50C50019E5
+:107C20008D0200B48D0200B8A4E2004894E400483C
+:107C3000A4E4004A94E800DA03E000083102FFFF00
+:107C40003C0208008C420024A4C00054A4C200528C
+:107C50008CA30018ACE300308CA20014ACE2002C22
+:107C60008CB90018ACF900388CB800142405000158
+:107C7000ACF800348D0600BC54C5FFEB8D0200B893
+:107C80008D0200B4A4E2004894E40048A4E4004A51
+:107C900094E800DA03E000083102FFFF8F86003C21
+:107CA0003C0480008CC900088CC80008000929C069
+:107CB000000839C0AC87002090C300073062000480
+:107CC0001040003AAF85007890CB0007316A000879
+:107CD000114000398F87FF448CCD000C8CCE0014EE
+:107CE00001AE602B11800032000000008CC2000C3D
+:107CF000ACE200708CCB00188F85FF408F88FF4866
+:107D0000ACEB00748CCA00102402FFF8ACAA00C8C7
+:107D10008CC9000CAD0900608CC4001CACA400C070
+:107D200090E3007C0062C824A0F9007C90D8000792
+:107D3000330F000811E000040000000090ED007C0B
+:107D400035AC0001A0EC007C90CF000731EE0001C3
+:107D500011C000090000000090E4007C241800021B
+:107D600034820002A0E2007C90A300EC307900FF96
+:107D7000133800132408003490C90007312600028C
+:107D800010C000040000000090EB007C356A000485
+:107D9000A0EA007C90ED007D31AC003FA0EC007DBE
+:107DA00094A700DA03E0000830E2FFFF8F87FF446A
+:107DB0000A000C4C8CC200140A000C4DACE00070A0
+:107DC0000A000C6EACA800CC8F8C003C27BDFFD8FD
+:107DD000AFB3001CAFB20018AFB00010AFBF0020AF
+:107DE000AFB10014918F00153C13600E3673001074
+:107DF00031EB000FA38B00808D8F00048D8B00086A
+:107E0000959F0012959900109584001A9598001E70
+:107E1000958E001C33EDFFFF332AFFFF3089FFFFF3
+:107E20003308FFFF31C7FFFF3C010800AC2D0024E1
+:107E30003C010800AC2900443C010800AC2A004089
+:107E4000AE683178AE67317C91850015959100164A
+:107E50003C1260123652001030A200FF3230FFFF99
+:107E6000AE623188AE5000B491830014959F001823
+:107E7000240600010066C80433F8FFFFAE5900B8BD
+:107E8000AE5800BC918E0014AF8F00683C086006AD
+:107E900031CD00FFAE4D00C0918A00159584000ED3
+:107EA0003C07600A314900FFAF8B006C3084FFFF54
+:107EB000AE4900C8351100100E000BB534F00410A7
+:107EC0003C0208008C4200603C0308008C630064A4
+:107ED0003C0608008CC600583C0508008CA5005CD8
+:107EE0008F8400648FBF0020AE23004CAE65319CB0
+:107EF000AE030054AE4500DCAE6231A0AE6331A4E7
+:107F0000AE663198AE2200488FB3001CAE0200501E
+:107F10008FB10014AE4200E0AE4300E4AE4600D89C
+:107F20008FB000108FB200180A0004BE27BD0028D1
+:107F3000978500769783006027BDFFE8AFB00010FB
+:107F400000A3102BAFBF0014240400058F90003C49
+:107F500010400055240900020E0005D68F850064EC
+:107F6000AF820078240400031040004F240900026F
+:107F70003C0680000E00004AACC20020240700012D
+:107F8000240820001040004D24040005978E007640
+:107F90008F8AFF442409005025C50001A78500767B
+:107FA000A14900003C0D08008DAD00642403800051
+:107FB0008F84FF40000D6600AD4C0018A540000600
+:107FC000954B000A8F85FF482402FF80016330240F
+:107FD000A546000A915F000A0000482103E2C82577
+:107FE000A159000AA0A00008A140004CA08000C533
+:107FF00096180002978300743C020004A49800DAEB
+:10800000960F00022418FFBF25EE2401A48E00AEB7
+:108010008E0D0004ACAD00448E0C0008ACAC0040EA
+:10802000A4A00050A4A000548E0B000C240C00301F
+:10803000AC8B00288E060010AC860024A480003E85
+:10804000A487004EA4870050A483003CAD42007476
+:10805000AC8800C8ACA80060A08700EC909F00C46A
+:1080600033F9007FA09900C4909000C402187824CE
+:10807000A08F00C4914E007C35CD0001A14D007C45
+:10808000938B0080AD480070AC8C00CCA08B00C6F8
+:108090008F88006C8F870068AC8800B4AC8700B80C
+:1080A000A5400078A540007A8FBF00148FB0001063
+:1080B0000120102103E0000827BD00188F850078FB
+:1080C0000E0006668F8600640A000D3A240900023D
+:1080D00027BDFFE0AFB000108F90003CAFB100149F
+:1080E000AFBF00188E0900040E00048B000921C0E8
+:1080F0008E0800048F84FF408F82FF48000839C03B
+:108100003C068000ACC70020948500DA9043001341
+:108110001460001C30B1FFFF8F8CFF44918B00086E
+:10812000316A00401540000B000000008E0D000475
+:10813000022030218FBF00188FB100148FB00010C3
+:108140002404002200003821000D29C00A000BD4AD
+:1081500027BD00200E000061000000008E0D00040D
+:10816000022030218FBF00188FB100148FB0001093
+:108170002404002200003821000D29C00A000BD47D
+:1081800027BD00200E000059000000008E0D0004E5
+:10819000022030218FBF00188FB100148FB0001063
+:1081A0002404002200003821000D29C00A000BD44D
+:1081B00027BD002027BDFFE0AFB200183092FFFFBF
+:1081C000AFB00010AFBF001CAFB100141240001ED2
+:1081D000000080218F86003C8CC50000240300062F
+:1081E00000053F020005140230E400071483001666
+:1081F000304500FF2CA80006110000400005588003
+:108200003C0C0800258C54EC016C50218D49000079
+:1082100001200008000000008F8E007C240D00016A
+:1082200011CD005024020002AF82007C260900011B
+:108230003130FFFF24C800200212202B0100302122
+:108240001480FFE5AF88003C020010218FBF001CA6
+:108250008FB200188FB100148FB0001003E0000837
+:1082600027BD00209387006254E0003400003021D5
+:108270000E000C82000000008F86003C0A000D9A60
+:10828000240200018F87007C2405000210E50031E4
+:1082900024040013000028210000302124070001DD
+:1082A0000E000BD4000000000A000D9B8F86003CDE
+:1082B0008F83007C240200021462FFF62404001263
+:1082C0000E000C37000000008F8500780040302140
+:1082D000240400120E000BD4000038210A000D9B6C
+:1082E0008F86003C8F83007C2411000310710029CD
+:1082F000241F0002107FFFCE260900012404001075
+:1083000000002821000030210A000DB824070001D8
+:108310008F91007C240600021626FFF92404001029
+:108320000E000CDC00000000144000238F98003C7D
+:108330008F86003C0A000D9A2402000324040014D6
+:108340000E000BD4000028218F86003C0A000D9AF5
+:10835000240200020E000D44000000000A000D9BE4
+:108360008F86003C0E000BE4000000002419000280
+:1083700024040014000028210000302100003821CE
+:10838000AF99007C0E000BD4000000000A000D9B8A
+:108390008F86003C0E000BF4000000008F850078F3
+:1083A000241900020040302124040010000038216C
+:1083B0000A000DF1AF99007C004038212404001020
+:1083C000970F0002000028210E000BD431E6FFFFBA
+:1083D0008F86003C0A000D9BAF91007C8F84FF4488
+:1083E0003C077FFF34E6FFFF8C8500182402000164
+:1083F00000A61824AC83001803E00008A082000542
+:108400003084FFFF30A5FFFF108000070000182117
+:108410003082000110400002000420420065182153
+:108420001480FFFB0005284003E0000800601021D5
+:1084300010C00007000000008CA2000024C6FFFF4F
+:1084400024A50004AC82000014C0FFFB24840004B7
+:1084500003E000080000000010A0000824A3FFFFB4
+:10846000AC86000000000000000000002402FFFFB6
+:108470002463FFFF1462FFFA2484000403E0000871
+:1084800000000000000411C003E000082442024084
+:1084900027BDFFE8AFB0001000808021AFBF0014FF
+:1084A0000E000E3100A0202100504821240AFF8038
+:1084B0008FBF00148FB00010012A30243127007FB5
+:1084C0003C08800A3C04210000E8102100C4282553
+:1084D0003C03800027BD0018AC650024AF8200205B
+:1084E000AC400000AC65002403E00008AC40004054
+:1084F0003C0D08008DAD005800056180240AFF8006
+:1085000001A45821016C4821012A30243127007F21
+:108510003C08800C3C04210000E8102100C4282500
+:108520003C038000AC650028AF82001C03E000081B
+:10853000AC40002430A5FFFF3C0680008CC201B88F
+:108540000440FFFE3C08601500A838253C031000DD
+:10855000ACC40180ACC00184ACC7018803E0000852
+:10856000ACC301B83C0D08008DAD0058000561801A
+:10857000240AFF8001A45821016C4021010A4824EB
+:10858000000931403107007F00C728253C04200046
+:1085900000A418253C028000AC43083003E000082A
+:1085A000AF80001C27BDFFE8AFB000100080802125
+:1085B000AFBF00140E000E3100A020210050482152
+:1085C000240BFF80012B5024000A39403128007F02
+:1085D0003C0620008FBF00148FB0001000E8282553
+:1085E00034C2000100A218253C04800027BD0018F9
+:1085F000AC83083003E00008AF8000203C05800811
+:108600008CA700603C0680080087102B14400011E6
+:108610002C8340008CA800602D0340001060000FE8
+:10862000240340008CC900600089282B14A000029C
+:10863000008018218CC3006000035A42000B308078
+:108640003C0A0800254A554000CA202103E00008E2
+:108650008C8200001460FFF32403400000035A42A0
+:10866000000B30803C0A0800254A554000CA2021F2
+:1086700003E000088C8200003C05800890A60008FA
+:108680009384009024C20001304200FF3043007FF9
+:108690001064000C00023827A0A200083C048000EF
+:1086A0008C85017804A0FFFE8F8A008824090002CF
+:1086B0003C081000AC8A0140A089014403E0000896
+:1086C000AC8801780A000EB630E2008027BDFFC8F2
+:1086D0003C05800834A40080AFBF0034AFBE00303A
+:1086E000AFB7002CAFB60028AFB50024AFB4002060
+:1086F000AFB3001CAFB20018AFB10014AFB00010A0
+:10870000948300789482007A104300CD2405FFFF03
+:108710003C1E80080080B8210A000F923C168000A1
+:10872000108A00C88FBF00348F8400883C0B08007B
+:108730008D6B005C240AFF803C07800E01644021A1
+:10874000010A4824AEC9002C96E6007A3102007F67
+:108750000047182130C57FFF000580400203A82193
+:1087600096BF00003C1908008F390058240FFF8085
+:1087700033F53FFF032488210015C1800238902182
+:10878000024F58243C0C0100016C5025324E007FF2
+:108790003C0D800C01CD9021028028210E000E346A
+:1087A000AECA00288E4800108E4900308F86002007
+:1087B0002402000201093823AE470010A0C20000C5
+:1087C00096E3005C8E4400308F9100200E000E8FE7
+:1087D0003070FFFF00022B800205C8253C1F4200BD
+:1087E000033FC025AE3800048E5100048F8700205F
+:1087F0008E4F000024080008ACF1001CACEF0018FC
+:10880000ACE0000CACE000109250000A2406000519
+:108810002405C000320E00FFA4EE0014964D00089F
+:1088200002E09821A4ED0016924C000A3C0D80084D
+:10883000318B00FFA4EB00209644000835AC01000A
+:10884000A4E40022ACE00024924A000B314900FF6E
+:10885000A4E90002A0E800018E4200308F830020CE
+:108860002408FFBFAC620008A06600308F8E002095
+:108870002403FFDF95DF003203E5C8240335C0255C
+:10888000A5D8003291D10032322F003F35F00040A0
+:10889000A1D000328F890020AD2000348D8B00C024
+:1088A000AD2B00389124003C3C0B7FFF308A007FC9
+:1088B000A12A003C8F8600203564FFFF90C7003C52
+:1088C00000E81024A0C2003C8F9900209325003CB2
+:1088D00000A3F824A33F003C8E5800348F8C002066
+:1088E000AD9800408E4F002C8E51003001F1802356
+:1088F000AD900044918E004831CD007FA18D00489D
+:108900008F8500208E4A00308CA900480144402405
+:108910000136382400E83025ACA600489242000A0F
+:10892000A0A2004C964300088F9F0020A7E3004EB2
+:108930008E5000308E4400300E0002F08FC5006073
+:1089400092F1007C0002C1400002C90003197821A5
+:10895000322E00020040282111C00003020F8021A6
+:108960000002208002048021926D007C31AC000462
+:108970001180000200057080020E80218E440030BC
+:108980008F87002024058000308B0003000B5023CC
+:108990003149000302094021ACE800349664007AB2
+:1089A0009662007A9670007A30467FFF24C30001F9
+:1089B000307F7FFF0205C824033FC025A678007AD8
+:1089C0009671007A3C1208008E520060322F7FFFB1
+:1089D00011F20028000000008F8400880E000E694C
+:1089E00002A028218F8400880E000E7902802821A1
+:1089F0000E000EAE0000000096F3007896F4007AA8
+:108A00001293000F000028213C0980083524010042
+:108A100093C80008908700C53114007F30E400FF40
+:108A20000284302B14C0FF3E268A0001938D0090F3
+:108A3000268B0001008D6021158BFF3C8F84008800
+:108A40008FBF00348FBE00308FB7002C8FB6002848
+:108A50008FB500248FB400208FB3001C8FB2001894
+:108A60008FB100148FB0001000A0102103E00008A7
+:108A700027BD0038967F007A03E5C824A679007ADE
+:108A80009278007A926E007A331100FF001179C259
+:108A9000000F9027001269C031CC007F018D28257E
+:108AA000A265007A0A000F878F8400883C0380004B
+:108AB0003084FFFF30A5FFFFAC640018AC65001CDC
+:108AC00003E000088C62001427BDFFA83C06800864
+:108AD000AFBF0054AFBE0050AFB7004CAFB60048B8
+:108AE000AFB50044AFB40040AFB3003CAFB2003804
+:108AF000AFB10034AFB0003034C80100910500C5FB
+:108B000090C700083084FFFF30A500FF30E2007FEF
+:108B10000045182AAFA40010A7A000181060009C00
+:108B2000AFA0001490CA00083149007F00A930238B
+:108B300024D4FFFF0014882B8FB300100013902B58
+:108B400002328024520000858FB400143C03800858
+:108B500094790052947E00508FB60010033EC023DB
+:108B60000018BC00001714030016FC0002C2A82A5B
+:108B700016A00002001F2C030040282100143C0016
+:108B80000007240300A4102A5440000100A0202163
+:108B90002885000914A000020080B02124160008D6
+:108BA0003C0C80088D860048001659808D88004C4A
+:108BB0003C0380003169FFFF3C0A0010012A202598
+:108BC00034700400AC660038AF90008CAC68003C98
+:108BD000AC64003000000000000000000000000055
+:108BE0000000000000000000000000000000000085
+:108BF000000000008C6E000031CD002011A0FFFDB0
+:108C00000016902A0251782411E000360000B821A5
+:108C10003C1580003C118008922200088EA40100BF
+:108C200000008821305E007F0E000E3403C0282132
+:108C30008E1F00108EA4010033F93FFF032028216E
+:108C40000E000E4CAFB9001C921800003302003F1A
+:108C50002C5300085260000D000080212405000103
+:108C6000004518043067005D14E000B18F92008C5D
+:108C7000306400021480014D8F86008C30680080C3
+:108C80005500004A96180012000080218EA40100B1
+:108C90000E000E698FA5001C8EA401000E000E7937
+:108CA00003C028211200004F3C07800826E4000181
+:108CB0008F8C008C0004BC000291A0230017BC0321
+:108CC00002F6302A0014882B259F00402412000150
+:108CD00000D1F02403E08021AF9F008C17C0FFCDAE
+:108CE000AFB200143C07800894E800508FB3001026
+:108CF0003C05800002E810213C0D0020A4E2005059
+:108D0000ACAD003094F5005094F600520277502339
+:108D10003149FFFF12D50041AFA900108CF6004C7D
+:108D2000001749808CF7004802C9F8210000202173
+:108D300003E9302B02E4602101868021ACFF004C66
+:108D4000ACF000488FB300100013902B0232802447
+:108D50001600FF7F3C0380088FB400148FBF0054BF
+:108D60008FBE00503A8200018FB7004C8FB600488A
+:108D70008FB500448FB400408FB3003C8FB20038F1
+:108D80008FB100348FB0003003E0000827BD0058D9
+:108D900090CF0008938C009031EE007F00AE6823E6
+:108DA000018D58210A000FDD2574FFFF8F84008894
+:108DB00024100001A7B800180E000E5D97A500183A
+:108DC0008EA401000E000E698FA5001C8EA4010068
+:108DD0000E000E7903C028211600FFB526E400011D
+:108DE0003C07800894E800508FB300103C058000D9
+:108DF00002E810213C0D0020A4E20050ACAD003090
+:108E000094F5005094F60052027750233149FFFF49
+:108E10000014882B16D5FFC1AFA9001094FE005492
+:108E20008CF0004433D8FFFE001878C0020F702188
+:108E3000ACAE003C8CF900448CA3003C03235823C7
+:108E4000196002EA000000008CF200402642000196
+:108E5000ACA200383C05005034A700103C03800051
+:108E6000AC670030000000000000000000000000BF
+:108E700000000000000000000000000000000000F2
+:108E8000000000008C7F000033E6002010C0FFFDD2
+:108E90003C108008960D00543C1780003C0680086A
+:108EA00031B30001001350C00157B0218EC9040036
+:108EB0003C0708008CE700443C040020ACC9004893
+:108EC0008ED50404240C0001ACD5004C10EC02D06B
+:108ED000AEE40030961800523C0508008CA5004016
+:108EE00000B87821A60F0052960E005425C3000149
+:108EF000A6030054961900543324FFFF5487FF0F34
+:108F00008FB3001030A5FFFF0E000FBBA60000546A
+:108F10003C0508008CA50024961200520045382319
+:108F20000247F023A61E00520A000FDF8FB3001085
+:108F30008F93001C3C0700808E4400283C1FFFEFED
+:108F400037F9FFFFAE6400008E420024A260000AE1
+:108F50003C0FFF9FAE6200049245002C35EEFFFFF0
+:108F60003C0C0040A265000C8E71000CA265000B49
+:108F70003C0600FF0227C0250319682401AE5824CF
+:108F8000016C5025AE6A000C8E490004AE600018DA
+:108F900034D0FFFFAE6900148E48002C8F82008809
+:108FA000A660000801102024AE6400108E51000855
+:108FB00096470012AE7100208E58000C30E33FFF40
+:108FC00000032980AE7800248E4C001400A2F82102
+:108FD00030F90001AE6C00288E4B0018001F71C2E2
+:108FE00000197B80AE6B002C8E49001C01CF6821DC
+:108FF000A66D001CAE690030964A00028E46002025
+:10900000A66A001EAE66003492430033307000043E
+:1090100056000006924B00003C06800834D0010048
+:109020008E0800C0AE680030924B00008F8A00208E
+:10903000A14B0030924900333123000250600007F9
+:10904000924400018F8C0020240FFF80918E00300D
+:1090500001CF6825A18D0030924400018F8200204D
+:109060002418FFBF240AFFDFA04400318F9900209D
+:109070003C088008350400809331003C323F007F7B
+:10908000A33F003C8F8D002091AF003C01F870247D
+:10909000A1AE003C8F8700208E6C001490E3003C52
+:1090A0002D8B0001000B4940006A302400C9802547
+:1090B000A0F0003C964500128F870020A4E5003206
+:1090C0008E450004909F007C30A20003000288239C
+:1090D0003239000300B9102133F8000217000002F2
+:1090E00024440034244400303C038008346600806B
+:1090F00090C9007C00A980243208000415000002F9
+:1091000024830004008018218F840020240800029A
+:10911000ACE30034A08800009242003F8F9F002003
+:109120003C188008370F0080A3E200018F910020D7
+:109130009259003F8E440004A639000295EE005C6F
+:109140000E000E8F31D0FFFF00026B80020D5825FC
+:109150003C0C4200016C2825AE2500048E4A0038E4
+:109160008F850020ACAA00188E470034ACA7001CE5
+:10917000ACA0000CACA00010A4A00014A4A0001689
+:10918000A4A00020A4A00022ACA000248E620014A1
+:109190005040000124020001ACA200080E000EAEF7
+:1091A000241100010A0010332410000190D30001A3
+:1091B000327200201240018A241000013C0A80080B
+:1091C0003547008090E3007C8F93001CAFA0002403
+:1091D0003069000111200011AFB000203C0580086B
+:1091E0008CCB00148CAC0060016C882B1620000323
+:1091F000016028213C1080088E0500603C0F80082B
+:1092000035E300808C6E007000AE682B15A0000264
+:1092100000A020218C640070AFA400248F82FF4C3A
+:109220008CC400148C5900700099C02B53000001AD
+:109230008C4400708FA200240082F82313E0000306
+:10924000AFBF002824040002AFA400208FB200208A
+:109250000292402B1500015B000018218CC50038DC
+:109260008E6B000C3C0C0080AE6500008CC9003495
+:109270003C11FF9F016C5025AE69000490C8003F6F
+:109280003623FFFF014310243C1200203C04FFEF73
+:10929000A268000B00523825349FFFFF00FFC02456
+:1092A0003C1900088F87008C03197825AE6F000CDD
+:1092B0008CED0014AE6000188FB10024AE6D001468
+:1092C0008CF000188FAE0028AE70001C8CE50008F2
+:1092D000022E6021AE6500248CEB000CA6600038E5
+:1092E000A660003AAE6C002CAE600028AE6B002089
+:1092F0008CEA00148FA30028015148230123302356
+:1093000010C00011AE66001090E9003D8E620004AE
+:109310008E7F00000009910000527821000020217A
+:1093200001F2C82B03E4C02103197021AE6F0004C1
+:10933000AE6E000090ED003DA26D000A8F90008C93
+:1093400096060006A66600088F98002024190002E1
+:109350003C0F80088FA4002435EE0080A319000084
+:1093600095CD005C8F9200200E000E8F31B0FFFF74
+:1093700000022B80020560253C0642008F85008C90
+:1093800001865825AE4B00048F8400208CB1003834
+:10939000AC9100188CA30034AC83001CAC80000C92
+:1093A000AC800010A4800014A4800016A4800020CB
+:1093B000A4800022AC80002490AA003F8FA7002444
+:1093C000A48A000210E0000C240900018FBF0028CD
+:1093D00053E0018890A2003D90A2003E2448000185
+:1093E000A08800018F8500208FA40024ACA4000871
+:1093F0000A0012133C118008A08900018F8500200B
+:1094000024020001ACA200083C1180083623008031
+:10941000906A007C3147000214E000022406003408
+:10942000240600308F8D008C3C0F800835EE0080C4
+:1094300091AC000091C8007C8FB00024A0AC00303B
+:109440008F91008C8F8200208FAA00249227000128
+:1094500032120003240B0004A047003101721823CC
+:109460008F84008C8F8B0020241FC00094980012E2
+:109470009579003230690003330F3FFF033F7024BA
+:1094800001CF6825A56D00329165003200CA3021F8
+:1094900000C9302130B0003F360C0040A16C0032D2
+:1094A0008FB2002431070004124000028F85002093
+:1094B00000C730213C048008ACA600343488010089
+:1094C0008D1900C08FBF0024240DFFBFACB9003838
+:1094D00090AF003C2FF800012412FFDF31EE007F37
+:1094E000A0AE003C8F8B0020001889409170003C9A
+:1094F000020D6024A16C003C8F87002090E3003CAB
+:109500000072502401511025A0E2003C8F88008C8D
+:109510008F9900208D090020AF2900408D0600247E
+:10952000AF2600448D040028AF2400488D1F002C76
+:10953000AF3F004C0E000EAE000000008FB80020C0
+:10954000240500025705009F8FA300203C1F8000C8
+:109550003C1280088FE40100925800088F92FF4C63
+:109560000E000E343305007F8F8E00208FAF002059
+:109570008FA40028A1CF00009659005C8F91002095
+:109580000E000E8F3330FFFF00025B80020B682558
+:109590003C0842008F8B008C01A83025AE260004C9
+:1095A0008D7000388F8600200000282100051100F2
+:1095B000ACD000188D6C00343C047FFF3488FFFF72
+:1095C000ACCC001C9171003E8CCA001C8CDF0018D2
+:1095D0000011390000111F02014770210043482586
+:1095E00001C7C02B03E9782101F8C821ACCE001CCB
+:1095F000ACD90018ACC0000CACC00010916D003E9E
+:109600008FAA002824070005A4CD0014957000043B
+:109610002418C0000148C824A4D00016916C003E54
+:1096200001402021A4CC002095650004A4C500229F
+:10963000ACC000249163003FA4C300029171003DBF
+:1096400026220001A0C200018F8900203C02800870
+:1096500034460100AD2A0008A12700308F91002078
+:109660008F9F008C2402FF80962F003297EE00120D
+:10967000030F802431CD3FFF020D6025A62C003260
+:10968000922500322418FFBF2410FFDF30AB003FCB
+:1096900035630040A22300328F9F00202403FFFF88
+:1096A000AFE000348CCA00C0AFEA003893E7003C5A
+:1096B00030E9007FA3E9003C8F8D00203C09800049
+:1096C00091AF003C01F87024A1AE003C8F8B0020CC
+:1096D000916C003C01902824A165003C8F870020FC
+:1096E000ACE300408FB100243C038008ACF100449F
+:1096F00090EA004801423025A0E600488F90002003
+:109700008F8E008C8E1F004803E9C0240319782532
+:10971000AE0F004891CD003EA20D004C8F8C008C06
+:109720008F8B002095850004A565004E0E0002F089
+:109730008C650060924A007C004028218FA600289A
+:109740000002114000058900005138213149000212
+:109750001120000300C71821000520800064182193
+:109760003C028008344A00809147007C30E90004C4
+:10977000112000038FB9002800056080006C1821BB
+:10978000240B00048F91002033300003017040232C
+:10979000310D0003006D3021AE2600343C038008FB
+:1097A000A66500383C0580008CA401009073000879
+:1097B0000E000E793265007F0E000EAE0000000034
+:1097C0008FA300200003782B000F80230290A02499
+:1097D00000608021006088210A0010330010802B77
+:1097E0008F91001C8CD8003824190003A620000893
+:1097F000AE3800008CCF0034A220000A8F8E008C7F
+:10980000AE2F00043C05008091CB003FA239000C34
+:109810008E28000C3C0DFF9FA22B000B010510258C
+:1098200035A3FFFF3C13FFEF8F8E008C00433824DD
+:10983000366AFFFF00EA4824AE29000C8DC40014EC
+:1098400095D800128F860088AE2400108DCC0014AD
+:10985000AE200018AE200020AE2C0014AE20002454
+:109860008DDF0018330C3FFF000C9180AE3F0028C5
+:109870008DCF00080246C821330B0001AE2F003007
+:109880008DC3000C8F930020001941C2000B2B8068
+:1098900001056821240200023C0A8008A62D001C54
+:1098A000A6200034AE23002C35470080A2620000C1
+:1098B00094E9005C8F9900203C044200313FFFFF97
+:1098C00003E43025AF2600048F98008C240E00019D
+:1098D0002402C0008F12003824060034AF32001872
+:1098E0008F0F00343C12800836580080AF2F001CC8
+:1098F000AF20000CAF200010A7200014A7200016F6
+:10990000A7200020A7200022AF200024A7300002BB
+:10991000A32E00018F8D00208F8B008CADB000082E
+:1099200091680000A1A800308F91008C8F830020E7
+:1099300092250001A06500318F9F002097F300322F
+:1099400002625024014C3825A7E7003293E9003227
+:109950003124003FA3E40032930F007C31EE00027B
+:1099600015C000028F840020240600303C0E8008C1
+:10997000AC86003435D101008E3900C02403FFBF0E
+:1099800002008821AC990038908B003C0010802B9D
+:109990003165007FA085003C8F8D002091A8003CA0
+:1099A00001031024A1A2003C8F87002090F3003C0B
+:1099B000366A0020A0EA003C8F9F008C8F92002026
+:1099C0008FE90020AE4900408FE40024AE440044FB
+:1099D0008FEC0028AE4C00488FE6002C0E000EAE37
+:1099E000AE46004C0A001033000000000A0010A42C
+:1099F0008CE2004024480001A08800018F850020EF
+:109A00008FA40024ACA400080A0012133C118008A3
+:109A100094CB00523C0808008D080024010B102153
+:109A2000A4C200520A000FDF8FB3001027BDFFE071
+:109A30003C0D8008AFB20018AFB00010AFBF001CE3
+:109A4000AFB1001435B200808E4C001835A801006B
+:109A5000964B000695A70050910900EC000C5602A9
+:109A6000016728233143007F312600FF24020003D1
+:109A7000A3830090AF84008810C2001B30B0FFFFAA
+:109A8000910600EC2412000530C200FF1052003392
+:109A900000000000160000098FBF001C8FB20018E4
+:109AA0008FB100148FB00010240D0C003C0C80000E
+:109AB00027BD002003E00008AD8D00240E000FC27A
+:109AC000020020218FBF001C8FB200188FB100143C
+:109AD0008FB00010240D0C003C0C800027BD00202E
+:109AE00003E00008AD8D0024965800789651007A66
+:109AF000924E007D0238782631E8FFFF31C400C065
+:109B0000148000092D11000116000037000000002C
+:109B10005620FFE28FBF001C0E000EC300000000A5
+:109B20000A0013B78FBF001C1620FFDA00000000E8
+:109B30000E000EC3000000001440FFD88FBF001CB1
+:109B40001600002200000000925F007D33E2003F1B
+:109B5000A242007D0A0013B78FBF001C950900DAEE
+:109B60008F86006400802821240400050E0006660C
+:109B70003130FFFF978300763C0480002465FFFFAF
+:109B8000A78500768C8A01B80540FFFE0000000022
+:109B9000AC8001808FBF001CAC9001848FB2001894
+:109BA0008FB100148FB000103C0760133C0B100005
+:109BB000240D0C003C0C800027BD0020AC870188E0
+:109BC000AC8B01B803E00008AD8D00240E000FC27D
+:109BD000020020215040FFB18FBF001C925F007D2A
+:109BE0000A0013E433E2003F0E000FC202002021FE
+:109BF0001440FFAA8FBF001C1220000700000000C5
+:109C00009259007D3330003F36020040A242007D71
+:109C10000A0013B78FBF001C0E000EC30000000027
+:109C20005040FF9E8FBF001C9259007D3330003F93
+:109C30000A00141336020040000411C003E00008BB
+:109C4000244202403C050006008510253C038000AC
+:109C5000AC620030000000000000000000000000C6
+:109C60003C0580008CA7000030E6001010C0FFFD0E
+:109C7000000000008CAB003C8CAA003C0164482131
+:109C8000012A402B110000043C0680008CAD0038F6
+:109C900025AC0001ACAC00388CCF003C01E4702155
+:109CA00003E00008ACCE003C27BDFFD0AFB20018E7
+:109CB000AFB00010AFBF0028AFB50024AFB4002094
+:109CC000AFB3001CAFB1001400A0902114A000128B
+:109CD000008080218F8200240002188014600037E9
+:109CE000240400100E001421000000008FBF002883
+:109CF0008FB500248FB400208FB3001C8FB20018E2
+:109D00008FB100148FB000100000102127BD00306B
+:109D100003E00008AF80002410A0001E000088218E
+:109D20003C138000241400200A0014603C15000538
+:109D3000263100040232502B11400017024010213E
+:109D40008F8800248E0700002404008000084880CB
+:109D50000133182125060001AC6704002610000419
+:109D600014D4FFF3AF8600240E001421000000007D
+:109D7000AE75003000000000000000000000000090
+:109D800000000000263100040232502B1540FFEC89
+:109D9000AF800024024010218FBF00288FB500241F
+:109DA0008FB400208FB3001C8FB200188FB1001445
+:109DB0008FB0001003E0000827BD0030000320230F
+:109DC0003085000F0A0014490065202127BDFFD807
+:109DD0003C03800000A03821AC670038AFB100140C
+:109DE000AC66003C008088213C060022AC66003056
+:109DF000AFB00010AC7100283C10800C3C04800C0B
+:109E000024050070AFBF0024AFB40020AFB3001C26
+:109E10000E00143AAFB20018260400800E00143A67
+:109E200024050080260401000E00143A240500F0E9
+:109E30003C0208008C4200641040001300008021A6
+:109E40003C1480002413FF803C12800C0E00141E72
+:109E50000200202100514821312A007F0133402493
+:109E60000152202124050050AE8800280E00143A2B
+:109E7000261000013C0508008CA500640205202B7B
+:109E80001480FFF2000000003C0608008CC6006051
+:109E900010C00015000080213C1480002413FF80B6
+:109EA0003C12800C3C1908008F3900580010C1800A
+:109EB000240500400331782101F8682131AE007F8C
+:109EC00001B3602401D22021AE8C00280E00143A88
+:109ED000261000013C0608008CC600600206582BC4
+:109EE0001560FFF0000000003C1008008E10005CC0
+:109EF0002414FF803C1F800C0211982102749024CE
+:109F00003262007F3C118000005F2021AE320028C9
+:109F10000E00143A000628408FBF00248FB40020A2
+:109F20008FB3001C8FB200188FB100148FB00010D7
+:109F300000002021000028210A00143A27BD002833
+:109F40008F83003C8C62000410400003000000007E
+:109F500003E00008000000008C6400108C6500081D
+:089F60000A0014838C66000C5A
+:089F6800000000000000001BD6
+:109F70000000000F0000000A0000000800000006BA
+:109F800000000005000000050000000400000004BF
+:109F900000000003000000030000000300000003B5
+:109FA00000000003000000020000000200000002A8
+:109FB0000000000200000002000000020000000299
+:109FC0000000000200000002000000020000000289
+:109FD0000000000200000002000000020000000279
+:0C9FE00000000001000000010000000172
+:049FEC0080080100E8
+:109FF0008008008080080000080017900800179073
+:10A00000080017C8080017C8080017DC080017ACBC
+:10A0100008001A04080019D008001A5C08001A5C2D
+:10A0200008001AE408001A148008024008002154AD
+:10A0300008001FA00800217C0800221408002364E7
+:10A04000080023B0080024D4080023DC08002460A2
+:10A0500008002010080029880800292C08001FBCCF
+:10A0600008001FBC08001FBC080025480800254840
+:10A0700008001FBC08001FBC0800280408001FBC03
+:10A0800008001FBC08001FBC08001FBC0800286493
+:10A0900008001FBC08001FBC08001FBC08001FBC34
+:10A0A00008001FBC08001FBC08001FBC08001FBC24
+:10A0B00008001FBC08001FBC08001FBC08001FBC14
+:10A0C00008001FBC08001FBC080023D008001FBCEC
+:10A0D00008001FBC080028D408001FBC08001FBCD3
+:10A0E00008001FBC08001FBC08001FBC08001FBCE4
+:10A0F00008001FBC08001FBC08001FBC08001FBCD4
+:10A1000008001FBC08001FBC08001FBC08001FBCC3
+:10A1100008001FBC08001FBC08001FBC080027283F
+:10A1200008001FBC08001FBC08002690080025EC92
+:10A130000800375008003724080036F0080036C4FD
+:10A14000080036A408003658800801008008008006
+:08A15000800800008008008077
+:08A158000A000C760000000073
+:10A16000000000000000000D727870342E362E3191
+:10A17000360000000406100300000000000000018B
+:10A1800000000000000000000000000000000000CF
+:10A1900000000000000000000000000000000000BF
+:10A1A00000000000000000000000000000000000AF
+:10A1B000000000000000000000000000000000009F
+:10A1C000000000000000000000000000000000008F
+:10A1D000000000000000000000000000000000007F
+:10A1E000000000000000000000000000000000006F
+:10A1F000000000000000000000000000000000005F
+:10A20000000000000000000000000000000000004E
+:10A21000000000000000000000000000000000003E
+:10A22000000000000000000000000000000000002E
+:10A23000000000000000000000000000000000001E
+:10A24000000000000000000000000000000000000E
+:10A2500000000000000000000000000000000000FE
+:10A2600000000000000000000000000000000000EE
+:10A2700000000000000000000000000000000000DE
+:10A2800000000000000000000000000000000000CE
+:10A2900000000000000000000000000000000000BE
+:10A2A00000000000000000000000000000000000AE
+:10A2B000000000000000000000000000000000009E
+:10A2C000000000000000000000000000000000008E
+:10A2D000000000000000000000000000000000007E
+:10A2E000000000000000000000000000000000006E
+:10A2F000000000000000000000000000000000005E
+:10A30000000000000000000000000000000000004D
+:10A31000000000000000000000000000000000003D
+:10A32000000000000000000000000000000000002D
+:10A33000000000000000000000000000000000001D
+:10A34000000000000000000000000000000000000D
+:10A3500000000000000000000000000000000000FD
+:10A3600000000000000000000000000000000000ED
+:10A3700000000000000000000000000000000000DD
+:10A3800000000000000000000000000000000000CD
+:10A3900000000000000000000000000000000000BD
+:10A3A00000000000000000000000000000000000AD
+:10A3B000000000000000000000000000000000009D
+:10A3C000000000000000000000000000000000008D
+:10A3D000000000000000000000000000000000007D
+:10A3E000000000000000000000000000000000006D
+:10A3F000000000000000000000000000000000005D
+:10A40000000000000000000000000000000000004C
+:10A41000000000000000000000000000000000003C
+:10A42000000000000000000000000000000000002C
+:10A43000000000000000000000000000000000001C
+:10A44000000000000000000000000000000000000C
+:10A4500000000000000000000000000000000000FC
+:10A4600000000000000000000000000000000000EC
+:10A4700000000000000000000000000000000000DC
+:10A4800000000000000000000000000000000000CC
+:10A4900000000000000000000000000000000000BC
+:10A4A00000000000000000000000000000000000AC
+:10A4B000000000000000000000000000000000009C
+:10A4C000000000000000000000000000000000008C
+:10A4D000000000000000000000000000000000007C
+:10A4E000000000000000000000000000000000006C
+:10A4F000000000000000000000000000000000005C
+:10A50000000000000000000000000000000000004B
+:10A51000000000000000000000000000000000003B
+:10A52000000000000000000000000000000000002B
+:10A53000000000000000000000000000000000001B
+:10A54000000000000000000000000000000000000B
+:10A5500000000000000000000000000000000000FB
+:10A5600000000000000000000000000000000000EB
+:10A5700000000000000000000000000000000000DB
+:10A5800000000000000000000000000000000000CB
+:10A5900000000000000000000000000000000000BB
+:10A5A00000000000000000000000000000000000AB
+:10A5B000000000000000000000000000000000009B
+:10A5C000000000000000000000000000000000008B
+:10A5D000000000000000000000000000000000007B
+:10A5E000000000000000000000000000000000006B
+:10A5F000000000000000000000000000000000005B
+:10A60000000000000000000000000000000000004A
+:10A61000000000000000000000000000000000003A
+:10A62000000000000000000000000000000000002A
+:10A63000000000000000000000000000000000001A
+:10A64000000000000000000000000000000000000A
+:10A6500000000000000000000000000000000000FA
+:10A6600000000000000000000000000000000000EA
+:10A6700000000000000000000000000000000000DA
+:10A6800000000000000000000000000000000000CA
+:10A6900000000000000000000000000000000000BA
+:10A6A00000000000000000000000000000000000AA
+:10A6B000000000000000000000000000000000009A
+:10A6C000000000000000000000000000000000008A
+:10A6D000000000000000000000000000000000007A
+:10A6E000000000000000000000000000000000006A
+:10A6F000000000000000000000000000000000005A
+:10A700000000000000000000000000000000000049
+:10A710000000000000000000000000000000000039
+:10A720000000000000000000000000000000000029
+:10A730000000000000000000000000000000000019
+:10A740000000000000000000000000000000000009
+:10A7500000000000000000000000000000000000F9
+:10A7600000000000000000000000000000000000E9
+:10A7700000000000000000000000000000000000D9
+:10A7800000000000000000000000000000000000C9
+:10A7900000000000000000000000000000000000B9
+:10A7A00000000000000000000000000000000000A9
+:10A7B0000000000000000000000000000000000099
+:10A7C0000000000000000000000000000000000089
+:10A7D0000000000000000000000000000000000079
+:10A7E0000000000000000000000000000000000069
+:10A7F0000000000000000000000000000000000059
+:10A800000000000000000000000000000000000048
+:10A810000000000000000000000000000000000038
+:10A820000000000000000000000000000000000028
+:10A830000000000000000000000000000000000018
+:10A840000000000000000000000000000000000008
+:10A8500000000000000000000000000000000000F8
+:10A8600000000000000000000000000000000000E8
+:10A8700000000000000000000000000000000000D8
+:10A8800000000000000000000000000000000000C8
+:10A8900000000000000000000000000000000000B8
+:10A8A00000000000000000000000000000000000A8
+:10A8B0000000000000000000000000000000000098
+:10A8C0000000000000000000000000000000000088
+:10A8D0000000000000000000000000000000000078
+:10A8E0000000000000000000000000000000000068
+:10A8F0000000000000000000000000000000000058
+:10A900000000000000000000000000000000000047
+:10A910000000000000000000000000000000000037
+:10A920000000000000000000000000000000000027
+:10A930000000000000000000000000000000000017
+:10A940000000000000000000000000000000000007
+:10A9500000000000000000000000000000000000F7
+:10A9600000000000000000000000000000000000E7
+:10A9700000000000000000000000000000000000D7
+:10A9800000000000000000000000000000000000C7
+:10A9900000000000000000000000000000000000B7
+:10A9A00000000000000000000000000000000000A7
+:10A9B0000000000000000000000000000000000097
+:10A9C0000000000000000000000000000000000087
+:10A9D0000000000000000000000000000000000077
+:10A9E0000000000000000000000000000000000067
+:10A9F0000000000000000000000000000000000057
+:10AA00000000000000000000000000000000000046
+:10AA10000000000000000000000000000000000036
+:10AA20000000000000000000000000000000000026
+:10AA30000000000000000000000000000000000016
+:10AA40000000000000000000000000000000000006
+:10AA500000000000000000000000000000000000F6
+:10AA600000000000000000000000000000000000E6
+:10AA700000000000000000000000000000000000D6
+:10AA800000000000000000000000000000000000C6
+:10AA900000000000000000000000000000000000B6
+:10AAA00000000000000000000000000000000000A6
+:10AAB0000000000000000000000000000000000096
+:10AAC0000000000000000000000000000000000086
+:10AAD0000000000000000000000000000000000076
+:10AAE0000000000000000000000000000000000066
+:10AAF0000000000000000000000000000000000056
+:10AB00000000000000000000000000000000000045
+:10AB10000000000000000000000000000000000035
+:10AB20000000000000000000000000000000000025
+:10AB30000000000000000000000000000000000015
+:10AB40000000000000000000000000000000000005
+:10AB500000000000000000000000000000000000F5
+:10AB600000000000000000000000000000000000E5
+:10AB700000000000000000000000000000000000D5
+:10AB800000000000000000000000000000000000C5
+:10AB900000000000000000000000000000000000B5
+:10ABA00000000000000000000000000000000000A5
+:10ABB0000000000000000000000000000000000095
+:10ABC0000000000000000000000000000000000085
+:10ABD0000000000000000000000000000000000075
+:10ABE0000000000000000000000000000000000065
+:10ABF0000000000000000000000000000000000055
+:10AC00000000000000000000000000000000000044
+:10AC10000000000000000000000000000000000034
+:10AC20000000000000000000000000000000000024
+:10AC30000000000000000000000000000000000014
+:10AC40000000000000000000000000000000000004
+:10AC500000000000000000000000000000000000F4
+:10AC600000000000000000000000000000000000E4
+:10AC700000000000000000000000000000000000D4
+:10AC800000000000000000000000000000000000C4
+:10AC900000000000000000000000000000000000B4
+:10ACA00000000000000000000000000000000000A4
+:10ACB0000000000000000000000000000000000094
+:10ACC0000000000000000000000000000000000084
+:10ACD0000000000000000000000000000000000074
+:10ACE0000000000000000000000000000000000064
+:10ACF0000000000000000000000000000000000054
+:10AD00000000000000000000000000000000000043
+:10AD10000000000000000000000000000000000033
+:10AD20000000000000000000000000000000000023
+:10AD30000000000000000000000000000000000013
+:10AD40000000000000000000000000000000000003
+:10AD500000000000000000000000000000000000F3
+:10AD600000000000000000000000000000000000E3
+:10AD700000000000000000000000000000000000D3
+:10AD800000000000000000000000000000000000C3
+:10AD900000000000000000000000000000000000B3
+:10ADA00000000000000000000000000000000000A3
+:10ADB0000000000000000000000000000000000093
+:10ADC0000000000000000000000000000000000083
+:10ADD0000000000000000000000000000000000073
+:10ADE0000000000000000000000000000000000063
+:10ADF0000000000000000000000000000000000053
+:10AE00000000000000000000000000000000000042
+:10AE10000000000000000000000000000000000032
+:10AE20000000000000000000000000000000000022
+:10AE30000000000000000000000000000000000012
+:10AE40000000000000000000000000000000000002
+:10AE500000000000000000000000000000000000F2
+:10AE600000000000000000000000000000000000E2
+:10AE700000000000000000000000000000000000D2
+:10AE800000000000000000000000000000000000C2
+:10AE900000000000000000000000000000000000B2
+:10AEA00000000000000000000000000000000000A2
+:10AEB0000000000000000000000000000000000092
+:10AEC0000000000000000000000000000000000082
+:10AED0000000000000000000000000000000000072
+:10AEE0000000000000000000000000000000000062
+:10AEF0000000000000000000000000000000000052
+:10AF00000000000000000000000000000000000041
+:10AF10000000000000000000000000000000000031
+:10AF20000000000000000000000000000000000021
+:10AF30000000000000000000000000000000000011
+:10AF40000000000000000000000000000000000001
+:10AF500000000000000000000000000000000000F1
+:10AF600000000000000000000000000000000000E1
+:10AF700000000000000000000000000000000000D1
+:10AF800000000000000000000000000000000000C1
+:10AF900000000000000000000000000000000000B1
+:10AFA00000000000000000000000000000000000A1
+:10AFB0000000000000000000000000000000000091
+:10AFC0000000000000000000000000000000000081
+:10AFD0000000000000000000000000000000000071
+:10AFE0000000000000000000000000000000000061
+:10AFF0000000000000000000000000000000000051
+:10B000000000000000000000000000000000000040
+:10B010000000000000000000000000000000000030
+:10B020000000000000000000000000000000000020
+:10B030000000000000000000000000000000000010
+:10B040000000000000000000000000000000000000
+:10B0500000000000000000000000000000000000F0
+:10B0600000000000000000000000000000000000E0
+:10B0700000000000000000000000000000000000D0
+:10B0800000000000000000000000000000000000C0
+:10B0900000000000000000000000000000000000B0
+:10B0A00000000000000000000000000000000000A0
+:10B0B0000000000000000000000000000000000090
+:10B0C0000000000000000000000000000000000080
+:10B0D0000000000000000000000000000000000070
+:10B0E0000000000000000000000000000000000060
+:10B0F0000000000000000000000000000000000050
+:10B10000000000000000000000000000000000003F
+:10B11000000000000000000000000000000000002F
+:10B12000000000000000000000000000000000001F
+:10B13000000000000000000000000000000000000F
+:10B1400000000000000000000000000000000000FF
+:10B1500000000000000000000000000000000000EF
+:10B1600000000000000000000000000000000000DF
+:10B1700000000000000000000000000000000000CF
+:10B1800000000000000000000000000000000000BF
+:10B1900000000000000000000000000000000000AF
+:10B1A000000000000000000000000000000000009F
+:10B1B000000000000000000000000000000000008F
+:10B1C000000000000000000000000000000000007F
+:10B1D000000000000000000000000000000000006F
+:10B1E000000000000000000000000000000000005F
+:10B1F000000000000000000000000000000000004F
+:10B20000000000000000000000000000000000003E
+:10B21000000000000000000000000000000000002E
+:10B22000000000000000000000000000000000001E
+:10B23000000000000000000000000000000000000E
+:10B2400000000000000000000000000000000000FE
+:10B2500000000000000000000000000000000000EE
+:10B2600000000000000000000000000000000000DE
+:10B2700000000000000000000000000000000000CE
+:10B2800000000000000000000000000000000000BE
+:10B2900000000000000000000000000000000000AE
+:10B2A000000000000000000000000000000000009E
+:10B2B000000000000000000000000000000000008E
+:10B2C000000000000000000000000000000000007E
+:10B2D000000000000000000000000000000000006E
+:10B2E000000000000000000000000000000000005E
+:10B2F000000000000000000000000000000000004E
+:10B30000000000000000000000000000000000003D
+:10B31000000000000000000000000000000000002D
+:10B32000000000000000000000000000000000001D
+:10B33000000000000000000000000000000000000D
+:10B3400000000000000000000000000000000000FD
+:10B3500000000000000000000000000000000000ED
+:10B3600000000000000000000000000000000000DD
+:10B3700000000000000000000000000000000000CD
+:10B3800000000000000000000000000000000000BD
+:10B3900000000000000000000000000000000000AD
+:10B3A000000000000000000000000000000000009D
+:10B3B000000000000000000000000000000000008D
+:10B3C000000000000000000000000000000000007D
+:10B3D000000000000000000000000000000000006D
+:10B3E000000000000000000000000000000000005D
+:10B3F000000000000000000000000000000000004D
+:10B40000000000000000000000000000000000003C
+:10B41000000000000000000000000000000000002C
+:10B42000000000000000000000000000000000001C
+:10B43000000000000000000000000000000000000C
+:10B4400000000000000000000000000000000000FC
+:10B4500000000000000000000000000000000000EC
+:10B4600000000000000000000000000000000000DC
+:10B4700000000000000000000000000000000000CC
+:10B4800000000000000000000000000000000000BC
+:10B4900000000000000000000000000000000000AC
+:10B4A000000000000000000000000000000000009C
+:10B4B000000000000000000000000000000000008C
+:10B4C000000000000000000000000000000000007C
+:10B4D000000000000000000000000000000000006C
+:10B4E000000000000000000000000000000000005C
+:10B4F000000000000000000000000000000000004C
+:10B50000000000000000000000000000000000003B
+:10B51000000000000000000000000000000000002B
+:10B52000000000000000000000000000000000001B
+:10B53000000000000000000000000000000000000B
+:10B5400000000000000000000000000000000000FB
+:10B5500000000000000000000000000000000000EB
+:10B5600000000000000000000000000000000000DB
+:10B5700000000000000000000000000000000000CB
+:10B5800000000000000000000000000000000000BB
+:10B5900000000000000000000000000000000000AB
+:10B5A000000000000000000000000000000000009B
+:10B5B000000000000000000000000000000000008B
+:10B5C000000000000000000000000000000000007B
+:10B5D000000000000000000000000000000000006B
+:10B5E000000000000000000000000000000000005B
+:10B5F000000000000000000000000000000000004B
+:10B60000000000000000000000000000000000003A
+:10B61000000000000000000000000000000000002A
+:10B62000000000000000000000000000000000001A
+:10B63000000000000000000000000000000000000A
+:10B6400000000000000000000000000000000000FA
+:10B6500000000000000000000000000000000000EA
+:10B6600000000000000000000000000000000000DA
+:10B6700000000000000000000000000000000000CA
+:10B6800000000000000000000000000000000000BA
+:10B6900000000000000000000000000000000000AA
+:10B6A000000000000000000000000000000000009A
+:10B6B000000000000000000000000000000000008A
+:10B6C000000000000000000000000000000000007A
+:10B6D000000000000000000000000000000000006A
+:10B6E000000000000000000000000000000000005A
+:10B6F000000000000000000000000000000000004A
+:10B700000000000000000000000000000000000039
+:10B710000000000000000000000000000000000029
+:10B720000000000000000000000000000000000019
+:10B730000000000000000000000000000000000009
+:10B7400000000000000000000000000000000000F9
+:10B7500000000000000000000000000000000000E9
+:10B7600000000000000000000000000000000000D9
+:10B7700000000000000000000000000000000000C9
+:10B7800000000000000000000000000000000000B9
+:10B7900000000000000000000000000000000000A9
+:10B7A0000000000000000000000000000000000099
+:10B7B0000000000000000000000000000000000089
+:10B7C0000000000000000000000000000000000079
+:10B7D0000000000000000000000000000000000069
+:10B7E0000000000000000000000000000000000059
+:10B7F0000000000000000000000000000000000049
+:10B800000000000000000000000000000000000038
+:10B810000000000000000000000000000000000028
+:10B820000000000000000000000000000000000018
+:10B830000000000000000000000000000000000008
+:10B8400000000000000000000000000000000000F8
+:10B8500000000000000000000000000000000000E8
+:10B8600000000000000000000000000000000000D8
+:10B8700000000000000000000000000000000000C8
+:10B8800000000000000000000000000000000000B8
+:10B8900000000000000000000000000000000000A8
+:10B8A0000000000000000000000000000000000098
+:10B8B0000000000000000000000000000000000088
+:10B8C0000000000000000000000000000000000078
+:10B8D0000000000000000000000000000000000068
+:10B8E0000000000000000000000000000000000058
+:10B8F0000000000000000000000000000000000048
+:10B900000000000000000000000000000000000037
+:10B910000000000000000000000000000000000027
+:10B920000000000000000000000000000000000017
+:10B930000000000000000000000000000000000007
+:10B9400000000000000000000000000000000000F7
+:10B9500000000000000000000000000000000000E7
+:10B9600000000000000000000000000000000000D7
+:10B9700000000000000000000000000000000000C7
+:10B9800000000000000000000000000000000000B7
+:10B9900000000000000000000000000000000000A7
+:10B9A0000000000000000000000000000000000097
+:10B9B0000000000000000000000000000000000087
+:10B9C0000000000000000000000000000000000077
+:10B9D0000000000000000000000000000000000067
+:10B9E0000000000000000000000000000000000057
+:10B9F0000000000000000000000000000000000047
+:10BA00000000000000000000000000000000000036
+:10BA10000000000000000000000000000000000026
+:10BA20000000000000000000000000000000000016
+:10BA30000000000000000000000000000000000006
+:10BA400000000000000000000000000000000000F6
+:10BA500000000000000000000000000000000000E6
+:10BA600000000000000000000000000000000000D6
+:10BA700000000000000000000000000000000000C6
+:10BA800000000000000000000000000000000000B6
+:10BA900000000000000000000000000000000000A6
+:10BAA0000000000000000000000000000000000096
+:10BAB0000000000000000000000000000000000086
+:10BAC0000000000000000000000000000000000076
+:10BAD0000000000000000000000000000000000066
+:10BAE0000000000000000000000000000000000056
+:10BAF0000000000000000000000000000000000046
+:10BB00000000000000000000000000000000000035
+:10BB10000000000000000000000000000000000025
+:10BB20000000000000000000000000000000000015
+:10BB30000000000000000000000000000000000005
+:10BB400000000000000000000000000000000000F5
+:10BB500000000000000000000000000000000000E5
+:10BB600000000000000000000000000000000000D5
+:10BB700000000000000000000000000000000000C5
+:10BB800000000000000000000000000000000000B5
+:10BB900000000000000000000000000000000000A5
+:10BBA0000000000000000000000000000000000095
+:10BBB0000000000000000000000000000000000085
+:10BBC0000000000000000000000000000000000075
+:10BBD0000000000000000000000000000000000065
+:10BBE0000000000000000000000000000000000055
+:10BBF0000000000000000000000000000000000045
+:10BC00000000000000000000000000000000000034
+:10BC10000000000000000000000000000000000024
+:10BC20000000000000000000000000000000000014
+:10BC30000000000000000000000000000000000004
+:10BC400000000000000000000000000000000000F4
+:10BC500000000000000000000000000000000000E4
+:10BC600000000000000000000000000000000000D4
+:10BC700000000000000000000000000000000000C4
+:10BC800000000000000000000000000000000000B4
+:10BC900000000000000000000000000000000000A4
+:10BCA0000000000000000000000000000000000094
+:10BCB0000000000000000000000000000000000084
+:10BCC0000000000000000000000000000000000074
+:10BCD0000000000000000000000000000000000064
+:10BCE0000000000000000000000000000000000054
+:10BCF0000000000000000000000000000000000044
+:10BD00000000000000000000000000000000000033
+:10BD10000000000000000000000000000000000023
+:10BD20000000000000000000000000000000000013
+:10BD30000000000000000000000000000000000003
+:10BD400000000000000000000000000000000000F3
+:10BD500000000000000000000000000000000000E3
+:10BD600000000000000000000000000000000000D3
+:10BD700000000000000000000000000000000000C3
+:10BD800000000000000000000000000000000000B3
+:10BD900000000000000000000000000000000000A3
+:10BDA0000000000000000000000000000000000093
+:10BDB0000000000000000000000000000000000083
+:10BDC0000000000000000000000000000000000073
+:10BDD0000000000000000000000000000000000063
+:10BDE0000000000000000000000000000000000053
+:10BDF0000000000000000000000000000000000043
+:10BE00000000000000000000000000000000000032
+:10BE10000000000000000000000000000000000022
+:10BE20000000000000000000000000000000000012
+:10BE30000000000000000000000000000000000002
+:10BE400000000000000000000000000000000000F2
+:10BE500000000000000000000000000000000000E2
+:10BE600000000000000000000000000000000000D2
+:10BE700000000000000000000000000000000000C2
+:10BE800000000000000000000000000000000000B2
+:10BE900000000000000000000000000000000000A2
+:10BEA0000000000000000000000000000000000092
+:10BEB0000000000000000000000000000000000082
+:10BEC0000000000000000000000000000000000072
+:10BED0000000000000000000000000000000000062
+:10BEE0000000000000000000000000000000000052
+:10BEF0000000000000000000000000000000000042
+:10BF00000000000000000000000000000000000031
+:10BF10000000000000000000000000000000000021
+:10BF20000000000000000000000000000000000011
+:10BF30000000000000000000000000000000000001
+:10BF400000000000000000000000000000000000F1
+:10BF500000000000000000000000000000000000E1
+:10BF600000000000000000000000000000000000D1
+:10BF700000000000000000000000000000000000C1
+:10BF800000000000000000000000000000000000B1
+:10BF900000000000000000000000000000000000A1
+:10BFA0000000000000000000000000000000000091
+:10BFB0000000000000000000000000000000000081
+:10BFC0000000000000000000000000000000000071
+:10BFD0000000000000000000000000000000000061
+:10BFE0000000000000000000000000000000000051
+:10BFF0000000000000000000000000000000000041
+:10C000000000000000000000000000000000000030
+:10C010000000000000000000000000000000000020
+:10C020000000000000000000000000000000000010
+:10C030000000000000000000000000000000000000
+:10C0400000000000000000000000000000000000F0
+:10C0500000000000000000000000000000000000E0
+:10C0600000000000000000000000000000000000D0
+:10C0700000000000000000000000000000000000C0
+:10C0800000000000000000000000000000000000B0
+:10C0900000000000000000000000000000000000A0
+:10C0A0000000000000000000000000000000000090
+:10C0B0000000000000000000000000000000000080
+:10C0C0000000000000000000000000000000000070
+:10C0D0000000000000000000000000000000000060
+:10C0E0000000000000000000000000000000000050
+:10C0F0000000000000000000000000000000000040
+:10C10000000000000000000000000000000000002F
+:10C11000000000000000000000000000000000001F
+:10C12000000000000000000000000000000000000F
+:10C1300000000000000000000000000000000000FF
+:10C1400000000000000000000000000000000000EF
+:10C1500000000000000000000000000000000000DF
+:10C1600000000000000000000000000000000000CF
+:10C1700000000000000000000000000000000000BF
+:10C1800000000000000000000000000000000000AF
+:10C19000000000000000000000000000000000009F
+:10C1A000000000000000000000000000000000008F
+:10C1B000000000000000000000000000000000007F
+:10C1C000000000000000000000000000000000006F
+:10C1D000000000000000000000000000000000005F
+:10C1E000000000000000000000000000000000004F
+:10C1F000000000000000000000000000000000003F
+:10C20000000000000000000000000000000000002E
+:10C21000000000000000000000000000000000001E
+:10C22000000000000000000000000000000000000E
+:10C2300000000000000000000000000000000000FE
+:10C2400000000000000000000000000000000000EE
+:10C2500000000000000000000000000000000000DE
+:10C2600000000000000000000000000000000000CE
+:10C2700000000000000000000000000000000000BE
+:10C2800000000000000000000000000000000000AE
+:10C29000000000000000000000000000000000009E
+:10C2A000000000000000000000000000000000008E
+:10C2B000000000000000000000000000000000007E
+:10C2C000000000000000000000000000000000006E
+:10C2D000000000000000000000000000000000005E
+:10C2E000000000000000000000000000000000004E
+:10C2F000000000000000000000000000000000003E
+:10C30000000000000000000000000000000000002D
+:10C31000000000000000000000000000000000001D
+:10C32000000000000000000000000000000000000D
+:10C3300000000000000000000000000000000000FD
+:10C3400000000000000000000000000000000000ED
+:10C3500000000000000000000000000000000000DD
+:10C3600000000000000000000000000000000000CD
+:10C3700000000000000000000000000000000000BD
+:10C3800000000000000000000000000000000000AD
+:10C39000000000000000000000000000000000009D
+:10C3A000000000000000000000000000000000008D
+:10C3B000000000000000000000000000000000007D
+:10C3C000000000000000000000000000000000006D
+:10C3D000000000000000000000000000000000005D
+:10C3E000000000000000000000000000000000004D
+:10C3F000000000000000000000000000000000003D
+:10C40000000000000000000000000000000000002C
+:10C41000000000000000000000000000000000001C
+:10C42000000000000000000000000000000000000C
+:10C4300000000000000000000000000000000000FC
+:10C4400000000000000000000000000000000000EC
+:10C4500000000000000000000000000000000000DC
+:10C4600000000000000000000000000000000000CC
+:10C4700000000000000000000000000000000000BC
+:10C4800000000000000000000000000000000000AC
+:10C49000000000000000000000000000000000009C
+:10C4A000000000000000000000000000000000008C
+:10C4B000000000000000000000000000000000007C
+:10C4C000000000000000000000000000000000006C
+:10C4D000000000000000000000000000000000005C
+:10C4E000000000000000000000000000000000004C
+:10C4F000000000000000000000000000000000003C
+:10C50000000000000000000000000000000000002B
+:10C51000000000000000000000000000000000001B
+:10C52000000000000000000000000000000000000B
+:10C5300000000000000000000000000000000000FB
+:10C5400000000000000000000000000000000000EB
+:10C5500000000000000000000000000000000000DB
+:10C5600000000000000000000000000000000000CB
+:10C5700000000000000000000000000000000000BB
+:10C5800000000000000000000000000000000000AB
+:10C59000000000000000000000000000000000009B
+:10C5A000000000000000000000000000000000008B
+:10C5B000000000000000000000000000000000007B
+:10C5C000000000000000000000000000000000006B
+:10C5D000000000000000000000000000000000005B
+:10C5E000000000000000000000000000000000004B
+:10C5F000000000000000000000000000000000003B
+:10C60000000000000000000000000000000000002A
+:10C61000000000000000000000000000000000001A
+:10C62000000000000000000000000000000000000A
+:10C6300000000000000000000000000000000000FA
+:10C6400000000000000000000000000000000000EA
+:10C6500000000000000000000000000000000000DA
+:10C6600000000000000000000000000000000000CA
+:10C6700000000000000000000000000000000000BA
+:10C6800000000000000000000000000000000000AA
+:10C69000000000000000000000000000000000009A
+:10C6A000000000000000000000000000000000008A
+:10C6B000000000000000000000000000000000007A
+:10C6C000000000000000000000000000000000006A
+:10C6D000000000000000000000000000000000005A
+:10C6E000000000000000000000000000000000004A
+:10C6F000000000000000000000000000000000003A
+:10C700000000000000000000000000000000000029
+:10C710000000000000000000000000000000000019
+:10C720000000000000000000000000000000000009
+:10C7300000000000000000000000000000000000F9
+:10C7400000000000000000000000000000000000E9
+:10C7500000000000000000000000000000000000D9
+:10C7600000000000000000000000000000000000C9
+:10C7700000000000000000000000000000000000B9
+:10C7800000000000000000000000000000000000A9
+:10C790000000000000000000000000000000000099
+:10C7A0000000000000000000000000000000000089
+:10C7B0000000000000000000000000000000000079
+:10C7C0000000000000000000000000000000000069
+:10C7D0000000000000000000000000000000000059
+:10C7E0000000000000000000000000000000000049
+:10C7F0000000000000000000000000000000000039
+:10C800000000000000000000000000000000000028
+:10C810000000000000000000000000000000000018
+:10C820000000000000000000000000000000000008
+:10C8300000000000000000000000000000000000F8
+:10C8400000000000000000000000000000000000E8
+:10C8500000000000000000000000000000000000D8
+:10C8600000000000000000000000000000000000C8
+:10C8700000000000000000000000000000000000B8
+:10C8800000000000000000000000000000000000A8
+:10C890000000000000000000000000000000000098
+:10C8A0000000000000000000000000000000000088
+:10C8B0000000000000000000000000000000000078
+:10C8C0000000000000000000000000000000000068
+:10C8D0000000000000000000000000000000000058
+:10C8E0000000000000000000000000000000000048
+:10C8F0000000000000000000000000000000000038
+:10C900000000000000000000000000000000000027
+:10C910000000000000000000000000000000000017
+:10C920000000000000000000000000000000000007
+:10C9300000000000000000000000000000000000F7
+:10C9400000000000000000000000000000000000E7
+:10C9500000000000000000000000000000000000D7
+:10C9600000000000000000000000000000000000C7
+:10C9700000000000000000000000000000000000B7
+:10C9800000000000000000000000000000000000A7
+:10C990000000000000000000000000000000000097
+:10C9A0000000000000000000000000000000000087
+:10C9B0000000000000000000000000000000000077
+:10C9C0000000000000000000000000000000000067
+:10C9D0000000000000000000000000000000000057
+:10C9E0000000000000000000000000000000000047
+:10C9F0000000000000000000000000000000000037
+:10CA00000000000000000000000000000000000026
+:10CA10000000000000000000000000000000000016
+:10CA20000000000000000000000000000000000006
+:10CA300000000000000000000000000000000000F6
+:10CA400000000000000000000000000000000000E6
+:10CA500000000000000000000000000000000000D6
+:10CA600000000000000000000000000000000000C6
+:10CA700000000000000000000000000000000000B6
+:10CA800000000000000000000000000000000000A6
+:10CA90000000000000000000000000000000000096
+:10CAA0000000000000000000000000000000000086
+:10CAB0000000000000000000000000000000000076
+:10CAC0000000000000000000000000000000000066
+:10CAD0000000000000000000000000000000000056
+:10CAE0000000000000000000000000000000000046
+:10CAF0000000000000000000000000000000000036
+:10CB00000000000000000000000000000000000025
+:10CB10000000000000000000000000000000000015
+:10CB20000000000000000000000000000000000005
+:10CB300000000000000000000000000000000000F5
+:10CB400000000000000000000000000000000000E5
+:10CB500000000000000000000000000000000000D5
+:10CB600000000000000000000000000000000000C5
+:10CB700000000000000000000000000000000000B5
+:10CB800000000000000000000000000000000000A5
+:10CB90000000000000000000000000000000000095
+:10CBA0000000000000000000000000000000000085
+:10CBB0000000000000000000000000000000000075
+:10CBC0000000000000000000000000000000000065
+:10CBD0000000000000000000000000000000000055
+:10CBE0000000000000000000000000000000000045
+:10CBF0000000000000000000000000000000000035
+:10CC00000000000000000000000000000000000024
+:10CC10000000000000000000000000000000000014
+:10CC20000000000000000000000000000000000004
+:10CC300000000000000000000000000000000000F4
+:10CC400000000000000000000000000000000000E4
+:10CC500000000000000000000000000000000000D4
+:10CC600000000000000000000000000000000000C4
+:10CC700000000000000000000000000000000000B4
+:10CC800000000000000000000000000000000000A4
+:10CC90000000000000000000000000000000000094
+:10CCA0000000000000000000000000000000000084
+:10CCB0000000000000000000000000000000000074
+:10CCC0000000000000000000000000000000000064
+:10CCD0000000000000000000000000000000000054
+:10CCE0000000000000000000000000000000000044
+:10CCF0000000000000000000000000000000000034
+:10CD00000000000000000000000000000000000023
+:10CD10000000000000000000000000000000000013
+:10CD20000000000000000000000000000000000003
+:10CD300000000000000000000000000000000000F3
+:10CD400000000000000000000000000000000000E3
+:10CD500000000000000000000000000000000000D3
+:10CD600000000000000000000000000000000000C3
+:10CD700000000000000000000000000000000000B3
+:10CD800000000000000000000000000000000000A3
+:10CD90000000000000000000000000000000000093
+:10CDA0000000000000000000000000000000000083
+:10CDB0000000000000000000000000000000000073
+:10CDC0000000000000000000000000000000000063
+:10CDD0000000000000000000000000000000000053
+:10CDE0000000000000000000000000000000000043
+:10CDF0000000000000000000000000000000000033
+:10CE00000000000000000000000000000000000022
+:10CE10000000000000000000000000000000000012
+:10CE20000000000000000000000000000000000002
+:10CE300000000000000000000000000000000000F2
+:10CE400000000000000000000000000000000000E2
+:10CE500000000000000000000000000000000000D2
+:10CE600000000000000000000000000000000000C2
+:10CE700000000000000000000000000000000000B2
+:10CE800000000000000000000000000000000000A2
+:10CE90000000000000000000000000000000000092
+:10CEA0000000000000000000000000000000000082
+:10CEB0000000000000000000000000000000000072
+:10CEC0000000000000000000000000000000000062
+:10CED0000000000000000000000000000000000052
+:10CEE0000000000000000000000000000000000042
+:10CEF0000000000000000000000000000000000032
+:10CF00000000000000000000000000000000000021
+:10CF10000000000000000000000000000000000011
+:10CF20000000000000000000000000000000000001
+:10CF300000000000000000000000000000000000F1
+:10CF400000000000000000000000000000000000E1
+:10CF500000000000000000000000000000000000D1
+:10CF600000000000000000000000000000000000C1
+:10CF700000000000000000000000000000000000B1
+:10CF800000000000000000000000000000000000A1
+:10CF90000000000000000000000000000000000091
+:10CFA0000000000000000000000000000000000081
+:10CFB0000000000000000000000000000000000071
+:10CFC0000000000000000000000000000000000061
+:10CFD0000000000000000000000000000000000051
+:10CFE0000000000000000000000000000000000041
+:10CFF0000000000000000000000000000000000031
+:10D000000000000000000000000000000000000020
+:10D010000000000000000000000000000000000010
+:10D020000000000000000000000000000000000000
+:10D0300000000000000000000000000000000000F0
+:10D0400000000000000000000000000000000000E0
+:10D0500000000000000000000000000000000000D0
+:10D0600000000000000000000000000000000000C0
+:10D0700000000000000000000000000000000000B0
+:10D0800000000000000000000000000000000000A0
+:10D090000000000000000000000000000000000090
+:10D0A0000000000000000000000000000000000080
+:10D0B0000000000000000000000000000000000070
+:10D0C0000000000000000000000000000000000060
+:10D0D0000000000000000000000000000000000050
+:10D0E0000000000000000000000000000000000040
+:10D0F0000000000000000000000000000000000030
+:10D10000000000000000000000000000000000001F
+:10D11000000000000000000000000000000000000F
+:10D1200000000000000000000000000000000000FF
+:10D1300000000000000000000000000000000000EF
+:10D1400000000000000000000000000000000000DF
+:10D1500000000000000000000000000000000000CF
+:10D1600000000000000000000000000000000000BF
+:10D1700000000000000000000000000000000000AF
+:10D18000000000000000000000000000000000009F
+:10D19000000000000000000000000000000000008F
+:10D1A000000000000000000000000000000000007F
+:10D1B000000000000000000000000000000000006F
+:10D1C000000000000000000000000000000000005F
+:10D1D000000000000000000000000000000000004F
+:10D1E000000000000000000000000000000000003F
+:10D1F000000000000000000000000000000000002F
+:10D20000000000000000000000000000000000001E
+:10D21000000000000000000000000000000000000E
+:10D2200000000000000000000000000000000000FE
+:10D2300000000000000000000000000000000000EE
+:10D2400000000000000000000000000000000000DE
+:10D2500000000000000000000000000000000000CE
+:10D2600000000000000000000000000000000000BE
+:10D2700000000000000000000000000000000000AE
+:10D28000000000000000000000000000000000009E
+:10D29000000000000000000000000000000000008E
+:10D2A000000000000000000000000000000000007E
+:10D2B000000000000000000000000000000000006E
+:10D2C000000000000000000000000000000000005E
+:10D2D000000000000000000000000000000000004E
+:10D2E000000000000000000000000000000000003E
+:10D2F000000000000000000000000000000000002E
+:10D30000000000000000000000000000000000001D
+:10D31000000000000000000000000000000000000D
+:10D3200000000000000000000000000000000000FD
+:10D330000000000010000003000000000000000DCD
+:10D340000000000D3C02080024427A603C03080003
+:10D3500024637AD8AC4000000043202B1480FFFDEA
+:10D36000244200043C1D080037BD9FFC03A0F021AF
+:10D370003C100800261031D83C1C0800279C7A601D
+:10D380000E001253000000000000000D3C0280005F
+:10D3900030A5FFFF30C600FF344301803C08800009
+:10D3A0008D0901B80520FFFE00000000AC640000FC
+:10D3B00024040002A4650008A066000AA064000B13
+:10D3C000AC6700183C03100003E00008AD0301B88F
+:10D3D0003C0560008CA24FF80440FFFE00000000F6
+:10D3E000ACA44FC03C0310003C040200ACA44FC4EA
+:10D3F00003E00008ACA34FF827BDFFE8AFBF00145F
+:10D40000AFB000100E0012A5008080213C048008FF
+:10D410003485008090A600052403FFFE0200202131
+:10D4200000C310248FBF00148FB00010A0A200050D
+:10D430000A0012AF27BD001827BDFFE8AFB00010EB
+:10D44000AFBF00140E000ED6008080213C0680087D
+:10D4500034C5008090A4000024020050308300FFF7
+:10D46000106200073C098000020020218FBF0014D9
+:10D470008FB00010AD2001800A000FC527BD001835
+:10D48000240801003C078000020020218FBF001407
+:10D490008FB00010ACE801800A000FC527BD00184E
+:10D4A00027BDFF883C088008AFBE0070AFB600689B
+:10D4B000AFB40060AFB00050AFBF0074AFB7006C46
+:10D4C000AFB50064AFB3005CAFB20058AFB1005469
+:10D4D000350500803C0780008CF1012890A40009EC
+:10D4E000ACE0008490A60005309000FF0000A02171
+:10D4F00000061827306200010000B02114400067C8
+:10D500000000F02190A9000024050020312400FF34
+:10D5100010850016240A0050108A008D00000000BB
+:10D520003C0C08008D8C00DC258B00013C010800C0
+:10D53000AC2B00DC0E00139B000000008FBF0074BA
+:10D540008FBE00708FB7006C8FB600688FB5006417
+:10D550008FB400608FB3005C8FB200588FB100545D
+:10D560008FB0005003E0000827BD00780000000DD8
+:10D570003C158000AFA0003096A201168EB90104C0
+:10D580003C1F002036B20C00033FC0240018B82B0B
+:10D5900000173140AFA600308EAE01043053FFFFBC
+:10D5A0003C0F00400272382101CF682490F2000D38
+:10D5B00011A0004834C4004032430020146000022F
+:10D5C000348600800080302114C00094AFA6003063
+:10D5D0003C0980083525008090A8000831060040ED
+:10D5E00050C000063C088008240A0004120A00A368
+:10D5F000240B0012120B00293C088008351501008D
+:10D600003C17800096F3011A94EE000E92AF0008CA
+:10D61000324C00043275FFFF01EE6804AFAD003CF0
+:10D620008CF30004118000318CF700083503008072
+:10D63000907800083307004014E000280000000044
+:10D640008C72005002728823062000063C0680007F
+:10D650008C7F0034027FC823072200848E8200085A
+:10D660003C068000ACC00044240200018FBF00745F
+:10D670008FBE00708FB7006C8FB600688FB50064E6
+:10D680008FB400608FB3005C8FB200588FB100542C
+:10D690008FB0005003E0000827BD00780E000CB8E2
+:10D6A000000020218FBF00748FBE00708FB7006C08
+:10D6B0008FB600688FB500648FB400608FB3005CD4
+:10D6C0008FB200588FB100548FB0005003E00008B3
+:10D6D00027BD00780A000D1800C020210E00146C30
+:10D6E000026020211440FFDF3C0680003C038008DC
+:10D6F000346300808C6400340264102304400018FA
+:10D70000000000003C1408008E94310026900001B7
+:10D710003C010800AC3031000E0012A5022020218F
+:10D720003C048008349F008093FE002502202021C5
+:10D7300037C90004A3E900250E0012AF0000000065
+:10D740000E000C9E022020210A000D45240200013B
+:10D750003C14080026947AC80A000D073C15800086
+:10D760008C6800300268302318C00008240B000CBD
+:10D770003C0908008D293100325200FC0000A8212C
+:10D78000252500013C010800AC253100AFAB00307D
+:10D790008C6A003001534023190000E002A8602A7F
+:10D7A0001580FFDD0000000012A8002A02A87823DF
+:10D7B0000268982131F5FFFF3247000210E0003483
+:10D7C000325900103C13800836700080921E000809
+:10D7D00033D6004052C000D38E82000802202021A0
+:10D7E0000E0012A524120018A212000992170005BB
+:10D7F0002418FFFE0220202102F8A8240E0012AFF8
+:10D80000A215000524040039000028210E00144749
+:10D81000240600180A000D45240200019296000C0F
+:10D820003C048008349E00808FC700380016A30097
+:10D830003690008130C600FF022020210E000C8DA2
+:10D840003205F0813C068000ACC000440A000D4562
+:10D85000240200013A4E000131CD000115A0FFAEB7
+:10D86000026898210A000D97000000000040F809A6
+:10D87000240400160A000D45240200010220202184
+:10D880000E00152900E028210A000CFA8FBF007451
+:10D890001320FF733C048008348900808D230038F6
+:10D8A0008C82000402E2F8231FE0FF6E3C06800039
+:10D8B00002E3302304C200010060B821AFA80018C1
+:10D8C0003C198000AFB30010AFB5001497260120BB
+:10D8D0008D2A00309524005C8FB8003C8FAD00305D
+:10D8E0003087FFFF30DFFFFF03E87021372F400054
+:10D8F0000307282B8E82000401CF602101A5582543
+:10D90000AFA90048AFAC0020AFAA0028AFAB0030F1
+:10D91000AFAA0024AFA0002CAFB700340040F80934
+:10D9200027A400108FA8003031030002106000020D
+:10D930008FA90048325200FE912300083069004050
+:10D94000512000138FA400243C0280088C4800045E
+:10D95000111700A4240A0014325800015300000CCF
+:10D960008FA400242419000C121900C02A1F000DD6
+:10D9700013E000BA2406000E2404000A5204000139
+:10D98000241600088FA9002425240001AFA4002438
+:10D990003C188008370500808FA700148CAF00303A
+:10D9A000340CFFFF00877021ACAE0030AFAF003801
+:10D9B00090AD004E8CAB00308FA8003C01AC100441
+:10D9C00001625021ACAA00348FA6003002E8202169
+:10D9D00030C300081060000BAFA400408CB90020D9
+:10D9E0001324008F30C600FF9289000C8FA70034EB
+:10D9F00000098300360400803085F0800E000C8D15
+:10DA0000022020213C0A8008355000808E0300301F
+:10DA10008FA800380068302318C00065262F0080CA
+:10DA20003C0E08008DCE31982407FF8001E7682462
+:10DA300031EC007F3C0680003C02800431CB0010BA
+:10DA4000ACCD00901160003B0182282190B8006BA2
+:10DA5000570000393C048008241F0001A0BF006B60
+:10DA600094C5007A24B9000AA61900123C0A80085D
+:10DA70003545008090A800083110004016000004D1
+:10DA80003C038008324B00011560006B0000000071
+:10DA9000346400808C8C00208FB200401192000909
+:10DAA000346301008C6D0000026D102318400012D9
+:10DAB0008FB80040241E0001AC980020AC73000019
+:10DAC000AC77000416C0002D0000000017C000272E
+:10DAD0000000000012A00005000018218FA50030F2
+:10DAE00030B5000452A0FE9500601021240300010F
+:10DAF0000A000CF9006010218C6E000015D3FFF1B4
+:10DB0000000000008C67000402E7782305E1FFE9CC
+:10DB10008FB800400A000E5B000000000A000D985C
+:10DB2000000040210040F809240400170A000D45B8
+:10DB3000240200013C04800834900080241E00016F
+:10DB4000022020210E0012A5A61E00129209002517
+:10DB500002202021241E0001352200010E0012AFF8
+:10DB6000A20200250A000E463C0A80080E000C9E08
+:10DB7000022020210A000E5F000000000E0012A506
+:10DB8000022020213C198008373700800220202104
+:10DB90000E0012AFA2F6000902C0302124040037A3
+:10DBA0000E001447000028210A000E5D000000004E
+:10DBB0008FA6001858C0FFAE3C0A80080E0012A5C0
+:10DBC000022020219203002502202021241E000192
+:10DBD000346200040E0012AFA20200250A000E46B5
+:10DBE0003C0A8008120A00302A0B0015116000243C
+:10DBF000240D0016240C000C560CFF58325800015E
+:10DC00003C05800890AF001B2407FFBD2416000EC2
+:10DC100001E77024A0AE001B0A000E01325800017B
+:10DC20003C1F800097E5011A50A0FF6F34C600101A
+:10DC30000A000E259289000C8CB300308E960008E5
+:10DC4000240400182674000102C0F809ACB40030A6
+:10DC50008FB100300A000CF9322200041606FF4A88
+:10DC60008FA900240A000E0C241600102410000EA8
+:10DC700052D0FF44241600100A000E0B2416001682
+:10DC8000560DFF36325800013C05800890AF001B4E
+:10DC90002407FFBD2416001001E77024A0AE001B6E
+:10DCA0000A000E01325800010A000E00241600126C
+:10DCB0003C0380008C6201B80440FFFE240408008D
+:10DCC000AC6401B803E00008000000003C058008D7
+:10DCD00094A200483084FFFF1040001924840012F1
+:10DCE00094A900483C0380003128FFFF0104382A32
+:10DCF00010E0001334660180946D01208F8C0004C5
+:10DD0000240B001A31AAFFFF31834000A0CB000B87
+:10DD1000106000102544FFFE94AF004831EEFFFF75
+:10DD200001C4282B14A0000C8F98000CA4C400146C
+:10DD30008F86000C34C2000103E00008AF82000CA3
+:10DD40003C0780002404000334E2018003E0000863
+:10DD5000A044000B8F98000C2419FFFE0319102417
+:10DD600003E00008AF82000C27BDFFD8AFB400204D
+:10DD7000AFB3001CAFB20018AFB10014AFBF0024A6
+:10DD8000AFB000100080182130B3FFFF30D2FFFF8A
+:10DD900030F4FFFF3C1180008E2201B80440FFFEEA
+:10DDA00036300180AE030000024020210E000EDD5F
+:10DDB000AE2300208F86000C8F8500048F83000027
+:10DDC00030C48000A613000CA612000EA605001099
+:10DDD000AE030028A61400081080000E3C0F80003F
+:10DDE000962C0116318BFFFC256A00040151482155
+:10DDF0008D2840003107FFFF14E000072414BFFF07
+:10DE00003C0EFFFF35CD7FFF00CD3024AF86000CE8
+:10DE10003C0F80002414BFFF35F1018000D498240A
+:10DE2000A63300268DF20104AE32002C3C06100011
+:10DE3000ADE601B88FBF00248FB400208FB3001C63
+:10DE40008FB200188FB100148FB0001003E00008EB
+:10DE500027BD002827BDFFD8AFB100143C118000BA
+:10DE600000804021AFB40020AFB0001030D4FFFFDD
+:10DE70003630018002802021AE080000AE2800204C
+:10DE8000AFB3001CAFB2001830F3FFFFAFBF0024E8
+:10DE90000E000EDD30B2FFFF8F85000C8F83000473
+:10DEA0002406BFFF00A62024A612000CA614000E14
+:10DEB000A6130008A6040026A60300103C021000CA
+:10DEC000AE2201B88FBF00248FB400208FB3001C96
+:10DED0008FB200188FB100148FB0001003E000085B
+:10DEE00027BD00283C028000344501803C048000AE
+:10DEF0008C8301B80460FFFE240720002406000282
+:10DF0000A4A70008A0A6000BA4A000103C051000C8
+:10DF1000AC8501B803E00008000000003C0580006B
+:10DF200034A400708C8A000090A601128F84000433
+:10DF300027BDFFF030C300FF0003188230820100CC
+:10DF4000000038211040003924660003308740006B
+:10DF500050E0003930882000000610800045C821BC
+:10DF60008F2F40002478000400187080AFAF0000AD
+:10DF700001C568218DAC4000AFAC000494AB011624
+:10DF80003169FFFC012540218D054000AFA5000847
+:10DF90008FA9000800003021000028213C0708005C
+:10DFA00024E701000A000F9E2408000890420000A8
+:10DFB00024A500012CAD000C0062C8210019C0800E
+:10DFC000030778218DEE000011A0000600CE302658
+:10DFD00003A5102114A8FFF500051A005520FFF431
+:10DFE000904200003C048000348700703C0508002B
+:10DFF0008CA531048CE300002CA80020110000093E
+:10E00000006A3823000558803C0C0800258C310834
+:10E01000016C482124AA0001AD2700003C01080042
+:10E02000AC2A3104AF8600002407000100E0102173
+:10E0300003E0000827BD00101100FFFC000038219C
+:10E0400000066080018558218D6440002469000429
+:10E0500000093880AFA4000000E518218C6640005C
+:10E06000AFA000080A000F8EAFA600043C02080013
+:10E070008C42003827BDFFD8AFB40020AFB20018E3
+:10E08000AFBF0024AFB3001CAFB10014AFB000109D
+:10E090003C14080026940038144000022452FFFF6C
+:10E0A000000090218F85000430A340001060000F15
+:10E0B00030A980003C06002000A620241080000B20
+:10E0C0008F87000C2408BFFF00A8282434E3100029
+:10E0D000AF85000430AF200015E0000A3C110004B9
+:10E0E0002413FFBF0A000FEF0073102415200062F5
+:10E0F0003C0B002030AF200011E0FFF98F83000CB3
+:10E100003C11000400B180241200FFF62413FFBF6D
+:10E110003462004030B801001300000FAF82000CE1
+:10E120003C1F002000BFC824132000053C0A8000CB
+:10E130003C03000400A31024104000C800000000AD
+:10E140009549011E9548011C3126FFFF00083C003F
+:10E1500000C72025AF8400003C0D800095AC010C69
+:10E1600030AB1000116000083186FFFF30AE002098
+:10E1700015C00006241100053C10100000B07824E2
+:10E1800015E000733C1F0C002411000130A20100B7
+:10E19000544000093C0C00018F83001454600006B9
+:10E1A0003C0C00018F87000C30E440001080009A86
+:10E1B0003C0A1F013C0C000100AC302414C0006C70
+:10E1C0003C1080008F84000C3093400012600006E9
+:10E1D0003C0310003C190F0000B9C0241300008B51
+:10E1E0003C1F80003C03100000A310241040002CB2
+:10E1F0003C0680003C0708008CE7003014E0007308
+:10E200003088400030A6010010C000983C0E0F007E
+:10E2100000AE68243C0C020011AC00948F93000007
+:10E22000027280240214782191F4000426920004E2
+:10E23000001221C03C0E800095C6010E3627000258
+:10E2400024D400043286FFFF240500020E000F04D0
+:10E25000000000008FBF00248FB400208FB3001C8B
+:10E260008FB200188FB100148FB000100000102181
+:10E2700003E0000827BD002800AB50241140FF9E9A
+:10E2800030AF20008F8C000C3C0EFFFF35CD7FFFA0
+:10E2900000AD2824358380000A000FDFAF8500041D
+:10E2A0008CD04000320F010011E0003C30B801007A
+:10E2B0003C1008008E1000241300001432330004B8
+:10E2C0003C020F0000A2F8243C19020013F9000FD1
+:10E2D0008F83000094C9010E022038210072582457
+:10E2E0000174502191480004252400043086FFFF6A
+:10E2F00025140004001421C0240500020E000F04A0
+:10E300002412FFFE021280243231FFFB2407000199
+:10E310001207006F3206000114C000903C0E80000E
+:10E32000320F000411E000048F980004331008003D
+:10E33000160000783C1F80005660FFC78FBF002486
+:10E340000E000F63000000000A0010408FBF002481
+:10E350003C190BFF00BFC0243733FFFF0278882B26
+:10E360005220FF8A241100010A00100D241100051B
+:10E370003C0E08008DCE00D8960F010E24040080BC
+:10E3800025CD000131E6FFFF240500023C01080015
+:10E39000AC2D00D80A00103D240700033C120800F1
+:10E3A0008E520024324200011040FFAB8FBF002488
+:10E3B00094C6010E362700020000202124D4000458
+:10E3C0003286FFFF0A00103D240500021100FF8E77
+:10E3D00030A601003C0B0F0000AB50243C090100AB
+:10E3E000012A202B1480FF88000000003C058000DB
+:10E3F00094A6010E362700022404008024D40004D1
+:10E400003286FFFF0A00103D2405000297E3011643
+:10E410000A0010243C03100000AA48243C08100005
+:10E420001528FF653C0C000130CB02001560FF632E
+:10E4300000AC30243C1480009692010E3627000276
+:10E44000000020212645000430A6FFFF0E000F3FEC
+:10E45000240500020A0010408FBF00240E000F7137
+:10E46000000000000A0010008F850004000000007A
+:10E470003C0608008CC600D0000516023050000F84
+:10E4800038DF00012FF900012E03000C0323C02404
+:10E490001700FF68001021C02608FFFC2D070004AC
+:10E4A00014E000073C0E800038CA00022D4900012C
+:10E4B000012320245080000E000532423C0E8000D3
+:10E4C00095C6010E000020210A00103A36270002EE
+:10E4D0003233000452600001363100023C0C8000EF
+:10E4E0009586010E022038210A0010990000202193
+:10E4F0000010182B00C358241560000F3C05800045
+:10E50000001021C03C0E800095C6010E0A00103A92
+:10E510003627000297F9010E022038212404010059
+:10E52000273100043226FFFF0E000F0424050002ED
+:10E530000A0010780000000094AD010E00002021B8
+:10E540002405000225AC00043186FFFF0E000F04F5
+:10E550003227FFFB0A0010EB001021C095C5010E09
+:10E56000022038210000202124AD000431A6FFFF45
+:10E570000E000F04240500020A0010723231FFFB66
+:10E580003C0580008CA701482403000434A60180C8
+:10E5900000072402308200FF104300103C0480007A
+:10E5A0008C8901B80520FFFE000000008C8F014817
+:10E5B000240D00023C0A1000000F7402A4CE0008D3
+:10E5C000A0CD000B8C8C0148A4CC00108C8B014496
+:10E5D000ACCB002403E00008AC8A01B88CA4014055
+:10E5E0003C03800000C028218C6601B804C0FFFEF7
+:10E5F0002408001CACA40000A0A8000B3C051000DF
+:10E60000AC6501B803E000080000000027BDFFE88A
+:10E61000AFB00010AFBF00143C10600C8E0D500066
+:10E62000240EFF7F2406000301AE60243588380CD9
+:10E630003C058000AE085000ACA600083C01080074
+:10E64000AC2000200E001555000000003C086016AC
+:10E650008D0A00003C0BFFFF3C0900103523805160
+:10E660003C046000014B38243C025353AE03537CFE
+:10E67000348420203C05080024A579082406000ADB
+:10E6800010E2000935037C008C7F007C8C790078D7
+:10E690008FB00010AF9F00108FBF001427BD00186F
+:10E6A0000A0013B1AF9900088D0F00043C186000F8
+:10E6B0008FB0001001F818218C7F007C8C790078D5
+:10E6C000AF9F00108FBF001427BD00180A0013B1C0
+:10E6D000AF9900083C0480008C8340003402FFFFA7
+:10E6E0001062003A000000008C87400030E5010015
+:10E6F00010A00021000000009487010E3C020800D9
+:10E700008C4200EC9485010E3C0D08008DAD31CC9F
+:10E7100030E3FFFF3C1808008F1800E83C090800B0
+:10E720008D2931C80043602130ABFFFF0183782B76
+:10E730000000C82101AB18210000502103197021ED
+:10E74000006B302B012A402101CF2021010610212E
+:10E750003C010800AC2C00EC3C010800AC2400E8B3
+:10E760003C010800AC2331CC3C010800AC2231C88C
+:10E7700003E00008000000008C8840008F8C000837
+:10E78000110C00323C0D800095AB010E3C0A0800D4
+:10E790008D4A00E43C0808008D0800E03169FFFF65
+:10E7A000014928210000302100A9602B01063821F1
+:10E7B00000EC10213C010800AC2500E43C010800FD
+:10E7C000AC2200E003E00008000000009483010E8A
+:10E7D0009482010E3C1908008F3900F43C090800AE
+:10E7E0008D2931CC3C0E08008DCE00F03C0808008D
+:10E7F0008D0831C83078FFFF304BFFFF03382821E8
+:10E80000012B1821000078210000502100B8682B4E
+:10E8100001CF6021006B302B010A3821018D2021AE
+:10E8200000E610213C010800AC2500F43C01080082
+:10E83000AC2400F03C010800AC2331CC3C010800C2
+:10E84000AC2231C803E00008000000008C894004BD
+:10E850008F8600101526FFCC3C0D80009483010E9E
+:10E860003C1908008F3931BC3C0E08008DCE31B800
+:10E870003078FFFF03385821000078210178202BE1
+:10E8800001CF682101A450213C010800AC2B31BC10
+:10E890003C010800AC2A31B803E000080000000089
+:10E8A00027BDFFE83C058000AFBF0014AFB00010EB
+:10E8B0008CB00128ACB000208CA301048CA4010012
+:10E8C000AF8300040E000ED6AF84000C0E00115F63
+:10E8D000000000003C0208008C4200C010400026EE
+:10E8E0008F8400043C0708008CE700C424E6000184
+:10E8F0003C010800AC2600C43C0280008C4401248A
+:10E900003C1F6020AFE40014000000003C068000C3
+:10E910003C034000ACC301380000000012000013AB
+:10E920008FBF0014260F0140261900802404FF80A9
+:10E9300001E4C0240324F824001F6940332E007F23
+:10E940000018594031EC007F3C0A20003548000295
+:10E9500001AE3825016C48250128802500E82825CE
+:10E96000ACC50830ACD008308FBF00148FB0001099
+:10E9700003E0000827BD00183C090010008940246E
+:10E980001100000F8F83000C240DBFFF006D602469
+:10E9900011800007240F87FF006F702415C000133B
+:10E9A0003C1900600099C024130000100000000012
+:10E9B0000E000CD2000000000A001221000000002E
+:10E9C0003C0B08008D6B0020256A00013C0108000B
+:10E9D000AC2A00200E000FC5000020211040FFCC03
+:10E9E0003C0680000A0011E93C0280000E00128EF5
+:10E9F000000000000A0012210000000027BDFFE80F
+:10EA00003C028000AFBF00108C4601403C03700008
+:10EA10003C054000AC4600208C4401480083202483
+:10EA20001085001300A4102B1040000B3C072000A1
+:10EA30003C08600010880017000000003C0A4000FD
+:10EA40003C098000AD2A0178000000008FBF001053
+:10EA500003E0000827BD00185487FFF93C0A400076
+:10EA60000E00110A000000000A00123A3C0A4000A1
+:10EA70000E0012B4000000003C0A40003C09800077
+:10EA8000AD2A0178000000008FBF001003E00008ED
+:10EA900027BD00180E001D6F000000000A00123A8A
+:10EAA0003C0A400027BDFFE0AFB200183C128000D6
+:10EAB000AFB10014AFBF001CAFB000100E00112D9D
+:10EAC000365100708E260000AF8600188E28000098
+:10EAD0003C0B08008D6B00FC3C0708008CE700F83D
+:10EAE00001066023016C28210000482100AC302B76
+:10EAF00000E91821006620213C010800AC2500FC3B
+:10EB00003C010800AC2400F88E50000032020003E3
+:10EB10001040FFEE010030218E2600003C05080069
+:10EB20008CA500FC3C1F08008FFF00F800C81823CC
+:10EB300000A378210000102101E3C82B03E2C021CB
+:10EB400003197021320D00013C010800AC2F00FCBC
+:10EB5000AF8800183C010800AC2E00F815A0000892
+:10EB600000000000320800021100FFD60000000083
+:10EB70000E001229000000000A00125B00000000D5
+:10EB80000E0011D2000000000A00128432080002B8
+:10EB90003C0380008C6401003082003E1440000879
+:10EBA00000000000AC6000488C66010030C507C062
+:10EBB00010A0000500000000AC60004CAC600050EC
+:10EBC00003E0000824020001AC600054AC60004087
+:10EBD0008C6801003107380010E0FFF900000000E8
+:10EBE0002402000103E00008AC6000443C039000F4
+:10EBF00034620001008220253C038000AC640020C8
+:10EC00008C65002004A0FFFE0000000003E0000867
+:10EC1000000000003C0280003443000100832025F6
+:10EC200003E00008AC44002027BDFFD8AFB10014BA
+:10EC30003C048000AFBF0020AFB3001CAFB200188F
+:10EC4000AFB000108C9201408C9001482402000E5D
+:10EC500000108C02322300FF1062005902042824A5
+:10EC60002866000F10C00013286A0037240700062A
+:10EC70001067008E286800075100002D2404000949
+:10EC8000106000783C06800024090001106900B083
+:10EC9000000000000000000D8FBF00208FB3001C9B
+:10ECA0008FB200188FB100148FB0001003E000087D
+:10ECB00027BD002811400059240D0038286B00356D
+:10ECC000116000053C058000240C001F146CFFF14E
+:10ECD000000000003C0580008CB801B80700FFFE72
+:10ECE00034B90180AF320000241F00012412000259
+:10ECF0003C021000AF200004A7310008A33F000A27
+:10ED0000A332000BA7300010AF200024AF20002852
+:10ED1000ACA201B88FBF00208FB3001C8FB20018C7
+:10ED20008FB100148FB0001003E0000827BD002849
+:10ED3000106400232405000B1465FFD63218FFFF72
+:10ED4000170000203C0580008F93FED4927F0005C1
+:10ED500033F900041720FFCF000000000E0012A5B9
+:10ED6000024020219269000502402021352800043C
+:10ED70000E0012AFA26800059267000530E20004A1
+:10ED800014400002000000000000000D926B000023
+:10ED900024060020316A00FF1546000A3C05800069
+:10EDA0008CA401B80480FFFE34AD0180240E000560
+:10EDB0003C0C1000ADB20000A1AE000BACAC01B831
+:10EDC0003C0580008CA301B80460FFFE34AF0180D5
+:10EDD00024130002ADE00000ADF20004A5F100082C
+:10EDE000A1F3000AA1F3000BA5F00010ADE0002490
+:10EDF0008CB101443C101000ADF10028ACB001B85A
+:10EE00008FBF00208FB3001C8FB200188FB1001489
+:10EE10008FB0001003E0000827BD0028106DFFAD83
+:10EE2000240E0080146EFF9B000000003C05800053
+:10EE30008CA301B80460FFFE34AF018024120002ED
+:10EE4000A1F2000BA5F10008A5F000108CB301445D
+:10EE50003C021000A5F30012ACA201B80A0012F0A7
+:10EE60008FBF00208CC301B80460FFFE34D3018043
+:10EE7000AE720000AE60000424120001A67100080A
+:10EE800024110002A272000AA271000BA6700010E9
+:10EE90008CD001443C0F1000AE700024AE600028FE
+:10EEA000ACCF01B80A00132B8FBF00203C038000B9
+:10EEB0008C6601B804C0FFFE346201803C06080085
+:10EEC00090C67AB8AC52000010C000030000382190
+:10EED0003C0708008CE77AC03C05800034AA01801A
+:10EEE0002404000234CC0001AC470004A551000802
+:10EEF000A14C000AA144000BA55000108CAB0144AA
+:10EF00000000202101402821AD4B002410C0000347
+:10EF10008FBF00203C0408008C847ABC8FB3001C97
+:10EF20008FB200188FB100148FB000103C0E10008B
+:10EF30003C0D800027BD0028ACA40028ADAE01B870
+:10EF40003C010800A0207AB803E00008000000009F
+:10EF500010A0000B3C0680008C980144241900028C
+:10EF60003C010800A0397AB83C010800AC327AC0F4
+:10EF70003C010800AC387ABC0A00132B8FBF00207C
+:10EF80008CDF01B807E0FFFE34C7018024090002CE
+:10EF9000ACE00000ACF20004A4F10008A0E9000A13
+:10EFA000A0E9000BA4F00010ACE000248CC80144E0
+:10EFB0003C021000ACE80028ACC201B80A00132BD8
+:10EFC0008FBF002027BDFFE8AFBF00100E000ED698
+:10EFD000000000003C0280008FBF001000002021D4
+:10EFE000AC4001800A000FC527BD00183084FFFF28
+:10EFF00030A5FFFF108000070000182130820001BB
+:10F000001040000200042042006518211480FFFB1C
+:10F010000005284003E000080060102110C0000730
+:10F02000000000008CA2000024C6FFFF24A50004FD
+:10F03000AC82000014C0FFFB2484000403E000083D
+:10F040000000000010A0000824A3FFFFAC86000011
+:10F0500000000000000000002402FFFF2463FFFF07
+:10F060001462FFFA2484000403E00008000000009A
+:10F0700027BDFFE0AFB20018AFB10014AFB0001071
+:10F08000AFBF001C9486000C00A0902124900014B7
+:10F0900000061B020003108000448821000030217C
+:10F0A00000A020210E0013BB240500050211202B17
+:10F0B0001080001200001021920300002C6500094E
+:10F0C00050A0000992020001000348803C0A080099
+:10F0D000254A793C012A40218D07000000E0000804
+:10F0E0000000000092020001020280210211202B88
+:10F0F0005480FFF292030000000010218FBF001C1B
+:10F100008FB200188FB100148FB0001003E0000818
+:10F1100027BD00200A0013D526100001920C000123
+:10F12000240B000C158B0040023070232DCD000AFB
+:10F1300015A0003D260800068E43000026020002AE
+:10F1400034640100AE440000921F00029059000197
+:10F15000904E0002904B0003001F7E000019C40077
+:10F1600001F86025000E6A00018D5025014B4825ED
+:10F17000AE490004920700069105000191040002C7
+:10F180009119000300071E00000534000066F825F1
+:10F190000004120003E2C025031978252610000A96
+:10F1A0000A0013D5AE4F0008921F0001260400028A
+:10F1B0002410000257F00001022020210A0013D57C
+:10F1C00000808021920E0001240D000315CDFFCB9D
+:10F1D000240200018E59000092180002261000033C
+:10F1E000372F0008A25800100A0013D5AE4F0000B8
+:10F1F000920500012406000414A6FFC024020001A9
+:10F20000920C0002920B00038E490000000C520089
+:10F21000014B40253527000426100004AE48000CA1
+:10F220000A0013D5AE4700000A0013E924020001CA
+:10F2300027BDFFE8AFBF0014AFB000100E0012A54D
+:10F24000008080213C048008348300809065002584
+:10F250000200202134A200200E0012AFA06200257F
+:10F26000020020218FBF00148FB000100A000C9EF6
+:10F2700027BD00183C03800027BDFFF834620180E1
+:10F28000AFA20000308C00FF30AD00FF30CE00FF99
+:10F290003C0B80008D6401B80480FFFE000000007C
+:10F2A0008FA900008D6801288FAA00008FA7000099
+:10F2B0008FA400002405000124020002A085000A9A
+:10F2C0008FA30000359940003C051000A062000BA0
+:10F2D0008FB800008FAC00008FA600008FAF000039
+:10F2E00027BD0008AD280000AD400004AD8000241B
+:10F2F000ACC00028A4F90008A70D0010A5EE00126C
+:10F3000003E00008AD6501B83C06800827BDFFE8B2
+:10F3100034C50080AFBF001090A70009240200127E
+:10F3200030E300FF1062000B008030218CA80050F9
+:10F3300000882023048000088FBF00108CAA0034AE
+:10F34000240400390000282100CA482305200005B4
+:10F35000240600128FBF00102402000103E0000801
+:10F3600027BD00180E001447000000008FBF0010DA
+:10F370002402000103E0000827BD001827BDFFC8D4
+:10F38000AFB1002C00A08821AFB2003027A500103B
+:10F390000080902102202021AFBF00340E0013C650
+:10F3A000AFB00028144000813C0C8008918B001104
+:10F3B000918A0012358600808CC80054316500FFA8
+:10F3C000314900FF00A9282100A8382B14E0004F84
+:10F3D0008FA3001094DF005C3066000410C000565C
+:10F3E00033E4FFFF8FA2001C0082102B5440000565
+:10F3F0002C8300803067000414E0007E240402188F
+:10F400002C83008010600002008080212410008086
+:10F410000E0012A5024020213C03800834660080C3
+:10F4200024070001ACC7000C90C200080010604027
+:10F4300034670100305F007FA0DF00088E390004D0
+:10F4400027380001ACD80030A4D0005C8CCE003C42
+:10F45000962F000E01CF6821ACCD00208CCB003C54
+:10F46000016C5021ACCA001C8E290004ACE90000DC
+:10F470008E250008ACE500048FA8001031040008B8
+:10F480005480002F93A60020A0C0004E90C5004ECF
+:10F490002408FFDF3C188008A0E5000890C400089D
+:10F4A000370C00802409005000888024A0D0000878
+:10F4B0008E390008AD9900388F0E00148D8F003002
+:10F4C00001CF6821AD8D0034918B0000316A00FFBF
+:10F4D00011490029264801000E0012AF02402021E8
+:10F4E00024040038000028210E0014472406000AD6
+:10F4F0008FBF00348FB200308FB1002C8FB0002846
+:10F500002402000103E0000827BD003894D8005C05
+:10F510008CD00054330EFFFF0205782301CF682BF7
+:10F5200015A0FFAC8FA300108CD9005430660004E6
+:10F5300014C0FFAC032520230A0014A52C82021856
+:10F540003C188008370C0080A0E600088E390008BF
+:10F5500024090050AD9900388F0E00148D8F0030B3
+:10F5600001CF6821AD8D0034918B0000316A00FF1E
+:10F570001549FFD9264801002406FF8001062824EA
+:10F580003C048000AC8500288E2700083103007FF2
+:10F590003C10800C0070F821AFE700D08E220008EC
+:10F5A000AF9F00240A0014E0AFE200D48E230008CD
+:10F5B0003C04800834820080AC4300540240202187
+:10F5C0000E001436AC400030240400382405008DB1
+:10F5D0000E001447240600128FBF00348FB2003093
+:10F5E0008FB1002C8FB000282402000103E0000836
+:10F5F00027BD00380A0014AA8FA4001C27BDFFE80D
+:10F60000AFBF001090A6000D30C7001010E0000C36
+:10F61000008040213C0280088C4400048CA3000838
+:10F620001064000830C9000430C5000410A0001C9C
+:10F630008FBF00102402000103E0000827BD00185E
+:10F6400030C900041120001030CB001210E0FFF987
+:10F650008FBF00103C0880088CA700088D060004AE
+:10F6600014E6FFF524020001240400382405008D6F
+:10F670000E001447240600128FBF00102402000160
+:10F6800003E0000827BD0018240A0012156AFFE9EC
+:10F690008FBF0010010020210A00148927BD001827
+:10F6A000000020210A000CB827BD00183C05080006
+:10F6B00024A555983C040800248473583C02080093
+:10F6C000244255A0240300063C010800AC257AC85A
+:10F6D0003C010800AC247ACC3C010800AC227AD072
+:10F6E0003C010800A0237AD403E0000800000000D9
+:10F6F00003E00008240200013C028000308800FF83
+:10F70000344701803C0680008CC301B80460FFFED2
+:10F71000000000008CC501282418FF803C0D800AE1
+:10F7200024AF010001F8702431EC007FACCE00243E
+:10F73000018D2021ACE50000948B00DA35096000D2
+:10F7400024080002316AFFFFACEA00042402000131
+:10F75000A4E90008A0E8000BACE000243C0710007E
+:10F76000ACC701B8AF84002403E00008AF850054A3
+:10F770008C9900048F8D00242409FFBF0325C0232A
+:10F78000AC98000491AF00C42403FFEF31EE007F7A
+:10F79000A1AE00C48C8C0020938B00308F86002497
+:10F7A000358A0002AF8B0048A7800044AC8A002055
+:10F7B000A4C000AC90C800C401093824A0C700C48C
+:10F7C0008F840024AC8000DC908500C400A310244A
+:10F7D00003E00008A08200C43C02800034450180A0
+:10F7E0003C0480008C8301B80460FFFE8F890054C4
+:10F7F0002407608324060002ACA900008C88012441
+:10F80000ACA80004A4A70008A0A6000B3C051000AB
+:10F8100003E00008AC8501B8938800308F89004868
+:10F820008F82002430C600FF0109382330E900FF31
+:10F830000122182130A500FF2468007810C00002C2
+:10F84000012438210080382130E4000314800003B3
+:10F8500030AA00031140000D312B000310A0000955
+:10F860000000102190ED0000244E000131C200FF85
+:10F870000045602BA10D000024E700011580FFF971
+:10F880002508000103E00008000000001560FFF3F8
+:10F890000000000010A0FFFB000010218CF8000009
+:10F8A00024590004332200FF0045782BAD180000D6
+:10F8B00024E7000415E0FFF92508000403E0000830
+:10F8C0000000000093850030938800408F87004837
+:10F8D000000432003103007F00E5102B30C47F00AC
+:10F8E0001040000F006428258F8400243C0980000C
+:10F8F0008C8A00DCAD2A00A43C03800000A35825BC
+:10F90000AC6B00A08C6C00A00580FFFE0000000026
+:10F910008C6D00ACAC8D00DC03E000088C6200A8AC
+:10F920000A0015E88F840024938800413C0280007F
+:10F9300000805021310300FEA383004130ABFFFF64
+:10F9400030CC00FF30E7FFFF344801803C098000E5
+:10F950008D2401B80480FFFE8F8D005424180016FA
+:10F96000AD0D00008D2201248F8D0024AD02000416
+:10F970008D590020A5070008240201B4A119000A2E
+:10F98000A118000B952F01208D4E00088D47000413
+:10F99000978300448D59002401CF302100C72821CE
+:10F9A00000A320232418FFFFA504000CA50B000EC4
+:10F9B000A5020010A50C0012AD190018AD18002406
+:10F9C00095AF00D83C0B10002407FFF731EEFFFF86
+:10F9D000AD0E00288DAC0074AD0C002CAD2B01B821
+:10F9E0008D46002000C7282403E00008AD45002014
+:10F9F0008F8800240080582130E7FFFF910900C65E
+:10FA00003C02800030A5FFFF312400FF00041A00F3
+:10FA10000067502530C600FF344701803C09800054
+:10FA20008D2C01B80580FFFE8F820054240F001733
+:10FA3000ACE200008D390124ACF900048D7800207F
+:10FA4000A4EA0008241901B4A0F8000AA0EF000BF2
+:10FA5000952301208D6E00088D6D0004978400446D
+:10FA600001C35021014D602101841023A4E2000C48
+:10FA7000A4E5000EA4F90010A4E60012ACE0001406
+:10FA80008D780024240DFFFFACF800188D0F006C5A
+:10FA9000ACEF001C8D0E00683C0F1000ACEE002097
+:10FAA000ACED0024950A00AE240DFFF73146FFFFB0
+:10FAB000ACE60028950C00709504007231837FFF3E
+:10FAC0000003CA003082FFFF0322C021ACF8002CE3
+:10FAD000AD2F01B8950E00728D6A002000AE302166
+:10FAE000014D2824A506007203E00008AD65002042
+:10FAF0003C028000344601803C0580008CA301B8A4
+:10FB00000460FFFE24090018ACC40000A0C9000B6B
+:10FB10008F8800243C041000950700AEA4C7001095
+:10FB2000ACC0003003E00008ACA401B83C02800087
+:10FB3000344501803C0480008C8301B80460FFFEE2
+:10FB40008F8A002C240600199549001C3128FFFFDC
+:10FB5000000839C0ACA70000A0A6000B3C051000AF
+:10FB600003E00008AC8501B88F8700340080402195
+:10FB700030C400FF3C0680008CC201B80440FFFE88
+:10FB80008F8900549383005034996000ACA9000021
+:10FB9000A0A300058CE20010240F00022403FFF74D
+:10FBA000A4A20006A4B900088D180020A0B8000A7D
+:10FBB000A0AF000B8CEE0000ACAE00108CED00048A
+:10FBC000ACAD00148CEC001CACAC00248CEB002021
+:10FBD000ACAB00288CEA002C3C071000ACAA002C2F
+:10FBE0008D090024ACA90018ACC701B88D05002010
+:10FBF00000A3202403E00008AD04002093850050FA
+:10FC00002403000127BDFFE800A330042CA200203C
+:10FC1000AFB00010AFBF001400C018211040001397
+:10FC20002410FFFE3C0708008CE7319000E610240A
+:10FC30003C0880003505018014400005240600843E
+:10FC40008F890024240A00042410FFFFA12A00EC5D
+:10FC50000E00168400000000020010218FBF001467
+:10FC60008FB0001003E0000827BD00183C06080014
+:10FC70008CC631940A0016B600C310248F87002C5E
+:10FC800027BDFFE0AFB20018AFB10014AFB0001055
+:10FC9000AFBF001C30D000FF90E6000D00A088210F
+:10FCA0000080902130C5007FA0E5000D8F850024E5
+:10FCB0008E2300188CA200C01062002E240A000EB1
+:10FCC0000E0016A9A38A00502409FFFF1049002244
+:10FCD0002404FFFF52000020000020218E26000097
+:10FCE0003C0C001000CC5824156000393C0E000874
+:10FCF00000CE682455A0003F024020213C1800029D
+:10FD000000D880241200001F3C0A00048F87002CBA
+:10FD10008CE200148CE300108CE500140043F823FF
+:10FD200003E5C82B13200005024020218E24002C5F
+:10FD30008CF10010109100310240202124020012A9
+:10FD4000A38200500E0016A92412FFFF10520002D9
+:10FD50002404FFFF000020218FBF001C8FB2001879
+:10FD60008FB100148FB000100080102103E0000854
+:10FD700027BD002090A800C4350400200A0016DF2B
+:10FD8000A0A400C400CA48241520000B8F8B002CAF
+:10FD90008F8D002C8DAC00101580000B02402021AF
+:10FDA0008E2E002C51C0FFEC0000202102402021AB
+:10FDB0000A0016FA240200178D66001050C0FFE6F4
+:10FDC00000002021024020210A0016FA240200111E
+:10FDD00002402021240200150E0016A9A382005023
+:10FDE000240FFFFF104FFFDC2404FFFF0A0016E979
+:10FDF0008E2600000A001720240200143C0800048C
+:10FE000000C8382450E0FFD4000020210240202107
+:10FE10000A0016FA240200138F86002427BDFFE093
+:10FE2000AFB10014AFBF0018AFB0001090C300C452
+:10FE300030A500FF306200201040000800808821BB
+:10FE40008CCB00C02409FFDF256A0001ACCA00C0CA
+:10FE500090C800C401093824A0C700C414A0004001
+:10FE60003C0C80008F840024908700C42418FFBFBE
+:10FE70002406FFEF30E3007FA08300C4979F004477
+:10FE80008F8200488F8D002403E2C823A799004485
+:10FE9000A5A000AC91AF00C401F87024A1AE00C4CD
+:10FEA0008F8C0024A18000C78F8A0024A540007297
+:10FEB000AD4000DC914500C400A65824A14B00C40D
+:10FEC0008F9000208F8400489786004402042821E8
+:10FED00010C0000FAF850020A38000403C078000C9
+:10FEE0008E2C000894ED01208E2B0004018D5021F2
+:10FEF000014B8021020620233086FFFF30C8000F0F
+:10FF0000390900013131000116200009A3880040A1
+:10FF1000938600308FBF00188FB100148FB000108F
+:10FF200027BD0020AF85004C03E00008AF860048E5
+:10FF300000C870238FBF0018938600308FB1001463
+:10FF40008FB0001034EF0C00010F282127BD0020D6
+:10FF5000ACEE0084AF85004C03E00008AF8600489B
+:10FF600035900180020028210E00168424060082AC
+:10FF70008F840024908600C430C5004050A0FFBA92
+:10FF8000A38000508F8500343C0680008CCD01B8E2
+:10FF900005A0FFFE8F890054240860822407000218
+:10FFA000AE090000A6080008A207000B8CA30008F9
+:10FFB0003C0E1000AE0300108CA2000CAE02001428
+:10FFC0008CBF0014AE1F00188CB90018AE190024A5
+:10FFD0008CB80024AE1800288CAF0028AE0F002C7F
+:10FFE000ACCE01B80A001744A38000508F8A0024C9
+:10FFF00027BDFFE0AFB10014AFB000108F880048FC
+:020000040001F9
+:10000000AFBF001893890028954200AC30D100FFA3
+:100010000109182B0080802130AC00FF3047FFFF22
+:100020000000582114600003310600FF0120302138
+:1000300001095823978300440068202B1480001B7B
+:100040000000000010680043240A0001118A0048E3
+:1000500034E708803165FFFF0E00162602002021DC
+:100060000E0016668F8400548F840024948D0070D7
+:1000700025AC0001A48C0070948B00703C06080035
+:100080008CC6318831677FFF10E6004F000000000A
+:1000900002002021022028218FBF00188FB10014F8
+:1000A0008FB000100A00173027BD0020914400C413
+:1000B0002406FF8000868825A15100C4978400444F
+:1000C0003088FFFF1100001C938900288F8E0024C8
+:1000D0002419EFFF008BF82395D800AC0168682B3A
+:1000E00033E900FF03197824A5CF00AC51A0002A02
+:1000F000010058218E0500202408FFFB2403000185
+:1001000000A81024AE0200201183002534E78000EF
+:10011000020020213165FFFF0E001626012030214C
+:10012000978B00448F870048A780004400EB802312
+:10013000AF900048938900288F8C00248FBF00184F
+:100140008FB100148FB0001027BD002003E000081D
+:10015000A18900C78E0800202409FFFB34E7800036
+:1001600001092824AE050020158AFFBA34E708806B
+:10017000020020210E0015F43165FFFF020020214E
+:10018000022028218FBF00188FB100148FB00010FB
+:100190000A00173027BD00200A0017E70000482199
+:1001A000020020213165FFFF0E0015F401203021EF
+:1001B000978B00448F870048A780004400EB802382
+:1001C0000A0017F7AF90004894890070240A800055
+:1001D000012A4024A48800709085007090990070D6
+:1001E00030A200FF000219C20003F827001FC1C09F
+:1001F000332F007F01F87025A08E00700A0017CF02
+:10020000020020218F88002424030001910A007835
+:10021000910500C7250900783147003F24E6FFE03B
+:1002200000C318042CC2002030670019A3850028E1
+:100230001040001AAF8900343C0A8000354B0002A0
+:10024000240500012406000114E00016006B1024B0
+:10025000000028211440000F306300201060000FC0
+:10026000240500018D0600748D1900742403FF809D
+:1002700000C31024000279403338007F01F868255C
+:100280003C0E100001AE6025AD4C083091280001F5
+:10029000310600010A0017A50000000003E0000875
+:1002A000000000008D0F00748D0D00742418FF8075
+:1002B00001F87024000E414031AC007F010C502544
+:1002C0003C0B1000014B38253C0980000A0017A5A3
+:1002D000AD27083027BDFFD8AFB000108F90003495
+:1002E000AFB40020AFB10014AFBF0024AFB3001C07
+:1002F000AFB200188E0500103C0208008C4231B0ED
+:100300008F86003830A73FFF00E2182B8CD20014F4
+:10031000008088218CD30020106000070000A021FD
+:1003200090CB000D240AFF80014B4824312800FFA8
+:100330001500000C00056382022020212411000D0D
+:10034000A39100508FBF00248FB400208FB3001CF6
+:100350008FB200188FB100148FB000100A0016A9D8
+:1003600027BD00283185000354A0FFF4022020217E
+:1003700094CF001C8F8E00248E070028A5CF00D8B4
+:100380008CCD0010024D302310E6005C2402001FCB
+:100390000E0016A9A3820050241FFFFF105F004E1D
+:1003A0002404FFFF8F83003C8F88002C0263982178
+:1003B0008D090010012310238F83001CAD02001053
+:1003C000AD1300208C67007400F3202B14800062B2
+:1003D000022020218F8600388E0C00248CC500243A
+:1003E0001185000702202021240E001C0E0016A9F2
+:1003F000A38E0050240DFFFF104D00372404FFFF93
+:100400008F84002C8C980024270F0001AC8F0024CF
+:10041000127200448F99001C8F32007412530041F5
+:100420003C0A00808E090000012A10241440003A82
+:10043000000000008E0400142412FFFF109200063A
+:10044000240B001B022020210E0016A9A38B0050B4
+:10045000105200212404FFFF8E0300003C0C000119
+:10046000006C282410A000133C0600800066A02425
+:10047000168000090200282102202021240E001AE3
+:100480000E0016A9A38E0050240DFFFF104D001280
+:100490002404FFFF02002821022020210E0016C99B
+:1004A000240600012410FFFF2404FFFF1050000A5F
+:1004B000241400018F8F002C022020210280302183
+:1004C00095F2003424050001265800010E0017A5FE
+:1004D000A5F80034000020218FBF00248FB4002035
+:1004E0008FB3001C8FB200188FB100148FB00010B2
+:1004F0000080102103E0000827BD00288F83003C06
+:1005000000E3C8210259C02B1300FFA88F88002CDC
+:100510000A00188E24020018AC8000200A0018B8C7
+:100520008E0400148E1F00003C07008003E798240F
+:100530001660FFF92408001A022020210E0016A9D7
+:10054000A38800502403FFFF1443FFBA2404FFFFD5
+:100550000A0018E18FBF0024240B001D0E0016A90D
+:10056000A38B0050240AFFFF144AFF9A2404FFFFC4
+:100570000A0018E18FBF00248F85002427BDFFD813
+:10058000AFB3001CAFB20018AFB10014AFB0001091
+:10059000AFBF002090A700C48F9000342412FFFF4B
+:1005A00034E2004092060000A0A200C48E030010B6
+:1005B000008098211072000630D1003F2408000D01
+:1005C0000E0016A9A3880050105200262406FFFF33
+:1005D0008F8A00248E0900188D4400C01124000762
+:1005E000240C000E026020210E0016A9A38C0050DE
+:1005F000240BFFFF104B001B2406FFFF24040020E8
+:10060000122400048F8D002491AF00C435EE002029
+:10061000A1AE00C48F85003C10A0001A00000000AD
+:100620001224004B8F9800248F92FED42406FFFDE5
+:10063000971000709651000A1230000B8FBF0020F7
+:100640003C1F08008FFF318C03E5C82B1720001ECC
+:1006500002602021000028210E0017A524060001B9
+:10066000000030218FBF00208FB3001C8FB2001814
+:100670008FB100148FB0001000C0102103E00008FB
+:1006800027BD00285224002A8E0300148F840024E2
+:100690009489007025280001A48800709487007058
+:1006A0003C0508008CA5318830E27FFF1045000E24
+:1006B00000000000026020210E0017302405000118
+:1006C0000A001943000030212402002DA3820050AB
+:1006D0000E0016A92413FFFF1453FFE12406FFFFA9
+:1006E0000A0019448FBF00209498007024198000DC
+:1006F0002405000103199024A492007090910070C9
+:10070000908D0070323000FF001079C2000F70270A
+:10071000000E61C031AB007F016C5025A08A0070D3
+:100720000E001730026020210A001943000030211A
+:100730002406FFFF1466FFD68F8400240260202168
+:100740000E001730240500010A0019430000302173
+:10075000026020210A00195D2402000A8F8800240B
+:1007600027BDFFE8AFB00010AFBF0014910A00C46E
+:100770008F87003400808021354900408CE60010CE
+:10078000A10900C43C0208008C4231B030C53FFFD3
+:1007900000A2182B106000078F850038240DFF8001
+:1007A00090AE000D01AE6024318B00FF1560000893
+:1007B0000006C382020020212403000D8FBF001415
+:1007C0008FB0001027BD00180A0016A9A38300509F
+:1007D00033060003240F000254CFFFF7020020214C
+:1007E00094A2001C8F85002424190023A4A200D801
+:1007F0008CE8000000081E02307F003F13F900352E
+:100800003C0A00838CE800188CA600C01106000882
+:10081000000000002405000E0E0016A9A38500505C
+:100820002407FFFF104700182404FFFF8F850024D2
+:1008300090A900C435240020A0A400C48F8C002CF3
+:10084000918E000D31CD007FA18D000D8F83003C76
+:100850001060001C020020218F8400388C9800104A
+:100860000303782B11E0000D241900180200202149
+:10087000A39900500E0016A92410FFFF105000028B
+:100880002404FFFF000020218FBF00148FB0001050
+:100890000080102103E0000827BD00188C8600109E
+:1008A0008F9F002C0200202100C31023AFE2001014
+:1008B000240500010E0017A5240600010A0019CC2A
+:1008C000000020210E001730240500010A0019CC79
+:1008D00000002021010A5824156AFFD98F8C002CB2
+:1008E000A0A600EC0A0019B9A386004227BDFFD8D4
+:1008F000AFB000108F900034AFB20018AFBF00202F
+:10090000AFB3001CAFB100148E1100103C030800FF
+:100910008C6331B032253FFF00A3102B104000083C
+:10092000008090218F8600382409FF8090CA000D36
+:10093000012A4024310700FF14E0000B00116B82F4
+:10094000024020212412000DA39200508FBF0020EE
+:100950008FB3001C8FB200188FB100148FB000103D
+:100960000A0016A927BD002831AC0003240B0001A2
+:10097000558BFFF40240202190CF000D31EE00088E
+:1009800011C000608F93003C16600009240200270C
+:100990008E19000C8CD80020173800052402002086
+:1009A0008E0200088CDF0024105F0040240200202B
+:1009B0000E0016A9A38200502406FFFF1046003344
+:1009C0002404FFFF8F99002C240AFFF73C13800EAC
+:1009D0009329000D2404FF803C0D8000012AF82497
+:1009E000A33F000D8F99001C3C0808008D0831AC16
+:1009F0008F830054972700788F9F002C01031021CC
+:100A000030E57FFF000530400046782131F8007F57
+:100A10000313602101E47024ADAE002CA591000009
+:100A20008FEB0028256A0001AFEA00288FE3002C35
+:100A30008E09002C00694021AFE8002C8E07002CA5
+:100A4000AFE700308E050014AFE5003497E6003ABA
+:100A500024C20001A7E2003A973300783C10080056
+:100A60008E1031B02663000130717FFF12300027F5
+:100A7000006030218F8F001C0240202124050001DE
+:100A80000E001730A5E60078000020218FBF00205F
+:100A90008FB3001C8FB200188FB100148FB00010FC
+:100AA0000080102103E0000827BD00288E050014F7
+:100AB0002413FFFF10B3001D8F8300248E0800183D
+:100AC0008C6700C0150700092402000E8E0A00245E
+:100AD0008CC9002815490005240200218E07002832
+:100AE0008CCB002C10EB00132402001F0E0016A963
+:100AF000A38200501453FFB32404FFFF0A001A4ED0
+:100B00008FBF00200A001A1624020024240E800041
+:100B1000006E682431ACFFFF000C5BC2317100FF36
+:100B2000001180270A001A47001033C00A001A6516
+:100B3000240200258E05002C10A0FFEC24020023C7
+:100B40008F8E001C8DCD007401A5602B1580FFE7F2
+:100B5000240200268CCF001400A7C02101F8202B0E
+:100B60001080FF998F99002C024020210A001A65FD
+:100B70002402002227BDFFE0AFB000108F900034A8
+:100B8000AFB10014AFBF00188E0500103C03080081
+:100B90008C6331B00080882130A43FFF0083102B8C
+:100BA000104000078F8600382409FF8090CA000D8E
+:100BB000012A4024310700FF14E000098F8B003C1C
+:100BC0002410000D02202021A39000508FBF001898
+:100BD0008FB100148FB000100A0016A927BD0020A5
+:100BE000116000080005C3828F8F00248F8EFED411
+:100BF0002407FFFD95EC007095CD000A11AC00387C
+:100C00008FBF00183305000314A00010000000007F
+:100C10009219000213200041000000008E060024FB
+:100C200050C0000F92040003022020212402000F74
+:100C30000E0016A9A38200502408FFFF14480007E5
+:100C40002407FFFF0A001AE28FBF001890C3000DAF
+:100C50003064000810800037022020219204000335
+:100C600024070002308900FF15270005308F00FFA0
+:100C70008F8A003C11400031240C002C308F00FF83
+:100C800039E500102CAD00012DEE000102002821F5
+:100C900001CD30250E0016C9022020212410FFFFAF
+:100CA0001050000E2407FFFF8F83003C10600017D8
+:100CB000022020213C1908008F39318C0323C02BDE
+:100CC0005700000C2411002D0220202100002821B3
+:100CD0000E0017A524060001000038218FBF001860
+:100CE0008FB100148FB0001000E0102103E0000865
+:100CF00027BD00200E0016A9A39100501450FFF646
+:100D00002407FFFF0A001AE28FBF00180E001730F9
+:100D1000240500010A001AE1000038218CDF0024BC
+:100D20008E020024545FFFC1022020210A001AC253
+:100D3000920400030A001AB62402001002202021A7
+:100D40000E0016A9A38C0050240BFFFF104BFFE3ED
+:100D50002407FFFF0A001AC99204000330A500FF10
+:100D60002406000124A9000100C9102B1040000C2A
+:100D700000004021240A000100A61823308B000146
+:100D800024C60001006A38040004204211600002F9
+:100D900000C9182B010740251460FFF800A618238E
+:100DA00003E000080100102127BDFFD8AFB00018F4
+:100DB0008F900034AFB1001CAFBF00202403FFFFB1
+:100DC0002411002FAFA30010920600002405000894
+:100DD00026100001006620260E001B01308400FF53
+:100DE00000021E003C021EDC34466F410A001B2933
+:100DF0000000102110A000090080182124450001E6
+:100E000030A2FFFF2C4500080461FFFA00032040D8
+:100E10000086202614A0FFF9008018210E001B0177
+:100E2000240500208FA300102629FFFF313100FF89
+:100E300000034202240700FF1627FFE201021826E2
+:100E400000035027AFAA0014AFAA00100000302101
+:100E500027A8001027A7001400E6782391ED0003CF
+:100E600024CE000100C8602131C600FF2CCB000455
+:100E70001560FFF9A18D00008FA200108FBF002028
+:100E80008FB1001C8FB0001803E0000827BD0028B8
+:100E90009383003027BDFFE024020034AFB100147B
+:100EA000AFB00010AFBF001CAFB2001800808821A7
+:100EB0001062006200A080219204000414800045AA
+:100EC0008F880024A38000288E0500048D0600C8AA
+:100ED0003C0700FF34E3FFFF00A3282400C5102BCC
+:100EE0001440004DAF85003C978A00448F8700482E
+:100EF0000147102310A00032A78200448F98001CE5
+:100F0000304CFFFF9312007C0012788231F1000117
+:100F10000011708001C56821018D582B116000619E
+:100F20008F8600248F8900208F84004C1089005EFA
+:100F30003C023F018E1F00003C10250003E2C82444
+:100F40001730007A8F8400348F8700348F86002416
+:100F50008CE30000ACC300788CE50010ACC50088C1
+:100F60008F8700488F85003C938D002830AE0003AA
+:100F7000000E4023310A0003014D4021A3880028C0
+:100F800094CB00AC01276021AF8C002035691000A4
+:100F9000A4C900AC1620005101452021AF840048AF
+:100FA000000020218FBF001C8FB200188FB10014E9
+:100FB0008FB000100080102103E0000827BD002042
+:100FC0008F840020AF800048008730210A001B92E8
+:100FD000AF860020241F000CA39F00500E0016A90E
+:100FE000022020212419FFFF1059FFEE2404FFFFE7
+:100FF0008F880024A38000288E0500048D0600C879
+:101000003C0700FF34E3FFFF00A3282400C5102B9A
+:101010001040FFB5AF85003C0220202124090019B3
+:10102000A38900500E0016A92411FFFF1051FFDD07
+:101030002404FFFF0A001B648F85003C8F8400247A
+:101040008F8700348CF20030908600C430C50010C9
+:1010500014A000108F8300482C680005150000289C
+:1010600000000000908A00C4246BFFFC314900108E
+:1010700015200008316400FF8F8D004C8F8C0020FC
+:1010800011AC0004388F000131EE000115C0002FB3
+:10109000000000000E001B14000000000A001BEB03
+:1010A000000000008F890020938D002830AE0003DF
+:1010B000000E4023310A0003014D4021A38800287F
+:1010C00094CB00AC01276021AF8C00203569100063
+:1010D000A4C900AC1220FFB101452021251800044D
+:1010E000A398002894CF00AC24920004AF9200484B
+:1010F00035F12000A4D100AC0A001B930000202190
+:101100008C8200DC1242FF6C022020212418000592
+:10111000A39800500E0016A92412FFFF1452FF6678
+:101120002404FFFF0A001B948FBF001C30E500FF62
+:101130000E0015B0000030218F8600248F870048F4
+:101140008F8900200A001B848F85003C0E0015DB70
+:10115000000000000A001BEB000000009383004227
+:1011600027BDFFE024020002AFB20018AFB10014A7
+:10117000AFBF001C00808821AFB00010000090219C
+:10118000106200552404FFFD978300448F850048BA
+:101190003066FFFF00C5202B1480005B9387003072
+:1011A0003C0880009504012010E500528F8A002041
+:1011B0008F84004C30A500FF0E0015B024060001FE
+:1011C0008F9F00543C0580003C19408027ED01783A
+:1011D00031B00078240EFF800219582534AF090081
+:1011E00031B8000701AE6024ACAC0800030F8021C9
+:1011F000ACAB081002202021020028210E001B4E5B
+:10120000AF9000342403FFFF104300332404FFFF9A
+:101210008E0C00103C0708008CE731B092060000ED
+:1012200031843FFF0087102B1040002330CD003F5A
+:101230008F980054000471803C0408008C8431A80D
+:101240002409FF809390004100984021010E202145
+:1012500000897024000E51403C0980003099007FC5
+:101260003C0F00808F8800243525094035E20001BD
+:1012700001593825308B0078308600073C03100078
+:101280003C1F800C00C5C0210162582500E3502599
+:10129000033F782136050001AD2E0804AF980038D1
+:1012A000AD2B0814AF8F002CAD2E0028AD040074B8
+:1012B000AD2A0830A3850041938300422410000327
+:1012C0005070002725A3FFE0240C0001106C001CC7
+:1012D00024060023024020218FBF001C8FB200187B
+:1012E0008FB100148FB000100080102103E00008BF
+:1012F00027BD0020314900035520FFAE8F84004CEC
+:101300000A001C278F90004C8F84004C306500FF32
+:101310000E0015B024060001938B00302405003424
+:1013200011650018978300448F8500483062FFFFE5
+:1013300000A25823AF8B00480A001C5FA78000441E
+:1013400011A6003700000000022020212411000B0C
+:101350000E0016A9A39100500A001C5F00409021C6
+:101360002C7200201240FFF80003F8803C070800B0
+:1013700024E7796003E7C8218F2D000001A0000851
+:10138000000000008F8500482CA200055440001D7D
+:10139000A7800044978A00443148FFFF00A84823F3
+:1013A0002D2F000511E00003314400FF24AEFFFCA7
+:1013B00031C400FF8F90004C8F9800201218000459
+:1013C00038990001332D000115A00029000000000C
+:1013D0008F910024922500C434A30010A22300C4DE
+:1013E000978300448F8500488F8400243062FFFF7C
+:1013F00000A25823AC8000DCA78000440A001C5FD8
+:10140000AF8B00483062FFFF00A258230A001C5F28
+:10141000AF8B00482403FFFF11830005000000008C
+:101420000E001981022020210A001C5F004090213B
+:101430000E001908022020210A001C5F00409021A4
+:101440000E0019E5022020210A001C5F00409021B7
+:101450000E00185F022020210A001C5F004090212E
+:101460000E001A87022020210A001C5F00409021F4
+:101470000E0015DB00000000978300448F850048B4
+:10148000306CFFFF00AC38232CFF000553E0FFA8B1
+:101490003062FFFF8F860024A7800044ACC200DCCE
+:1014A0003062FFFF00A258230A001C5FAF8B004888
+:1014B00027BDFFD0AFB20018AFB00010AFBF0028FB
+:1014C000AFB50024AFB40020AFB3001CAFB100141F
+:1014D0003C0C80008D880128240FFF803C07800A87
+:1014E00025100100250B0080020F68243205007FC3
+:1014F000016F7024AD8E009000A72821AD8D0024CF
+:1015000090A700EC3169007F3C0A8004012A182171
+:10151000A38700429066007C00809021AF83001C6E
+:1015200030C20002AF880054AF85002400A018210B
+:10153000144000022404003424040030A38400304A
+:101540008C6600CC30F100FF24040004AF86004814
+:1015500012240004A38000508E5300041660001D66
+:101560003C0880009387004130F200011240000FD8
+:101570008FBF00288CB800748CA400742419FF80DD
+:101580000319882400117140308F007F01CF60253E
+:101590003C0D2000018D582530F500FE3C0A8000EE
+:1015A000AD4B0830A39500418FBF00288FB50024B4
+:1015B0008FB400208FB3001C8FB200188FB10014BD
+:1015C0008FB000102402000127BD003003E00008A6
+:1015D000ACA600CC8E590008951F01208E46001045
+:1015E000033FC0213307FFFF30F5000F32B4000185
+:1015F000AF8600201680003BA395004035060C0006
+:1016000002A6102100F51823AD030084AF82004C20
+:101610008E4900043128FFFF1100002BA7890044E8
+:101620002410FF803C1580003C1420000A001D4D52
+:101630002413FFFE90AE00C4020E682431AC00FFFC
+:101640001580002A0240202193840041978600449F
+:10165000308F000111E0000B026428248F890024E0
+:101660008D2300748D280074A38500410070102420
+:101670000002C940311F007F033FC02503148825A5
+:10168000AEB1083010C000108F85002490A700C4B0
+:1016900002075824316A00FF1540FFE6024020216E
+:1016A0000E001C01979100441040FFE89384004114
+:1016B0002405FFFD544500058E430020022028210B
+:1016C0000E001586024020218E4300203070000459
+:1016D0001600000A2414FFFB8F8500240A001D0356
+:1016E0008F8600480A001D2EAF86004C0E00182B76
+:1016F000000000000A001D3D9384004100749824FE
+:101700000E0015A0AE5300208F8500240A001D0393
+:101710008F86004827BDFFD8AFB3001CAFB10014BF
+:10172000AFBF0020AFB20018AFB000103C02800085
+:101730008C5201408C4B01483C048000000B8C0211
+:10174000322300FF317300FF8C8501B804A0FFFE37
+:1017500034900180AE1200008C8701442464FFF0B5
+:10176000240600022C830013AE070004A611000813
+:10177000A206000BAE1300241060004F8FBF0020A4
+:10178000000448803C0A0800254A79E0012A4021EB
+:101790008D04000000800008000000003C100800DC
+:1017A0008E1031A831733FFF001389800212282167
+:1017B000240CFF8000B12021264D01002647008027
+:1017C0003C0F80003C03800431A8007F30E9007F9B
+:1017D000308A007F3C0E800A3C02800C008CC024C2
+:1017E00001AC302400ECC82401239821014280215F
+:1017F000ADE60024010EF821ADF90090ADF8002807
+:10180000AF90002CAF9F0024AF93001C0E00167504
+:10181000016080213C0380008C6B01B80560FFFEF5
+:101820008F87002C8F8600243465018090F9000D8D
+:10183000ACB2000024C200780019C60000187E0374
+:10184000000F9027001227C2A4B00006108000707D
+:10185000240E6082A4AE0008A0A00005240F0002A0
+:10186000A0AF000B0004C4008F8B001C3C192700A4
+:1018700003199025ACB20010ACA00014ACA0002459
+:10188000ACA00028ACA0002C8D7300382411FF8080
+:10189000ACB3001890F0000D0230282430A400FFF3
+:1018A000108000058FBF002090EC000D319F007F5D
+:1018B000A0FF000D8FBF00208FB3001C8FB2001857
+:1018C0008FB100148FB000103C0A10003C0D800056
+:1018D00027BD002803E00008ADAA01B8265F01007B
+:1018E0002405FF8033F8007F3C06800003E5782460
+:1018F0003C19800A03192021ACCF0024908E00C42B
+:1019000000AE682431AC00FF1180FFEAAF840024F0
+:10191000248E007895CD00123C0C08008D8C31A8E7
+:101920003C03800C31AB3FFF01924821000B5180FA
+:10193000012A40213104007F010510240083382151
+:10194000ACC200280E001675AF87002C3C03800047
+:101950008C6501B804A0FFFE00000000AE1200007C
+:101960008C720144AE120004A6110008241100027A
+:10197000A211000BAE1300240A001DD88FBF002057
+:101980003C1260008E452C083C03F0033462FFFFDC
+:1019900000A2F824AE5F2C088E582C083C1901B028
+:1019A00003199825AE532C080A001DD88FBF0020BC
+:1019B000264D010031AF007F3C10800A240EFF80CD
+:1019C00001F0282101AE60243C0B8000AD6C0024A6
+:1019D0001660FFB8AF85002424110003A0B100EC0D
+:1019E0000A001DD88FBF002026480100310A007F61
+:1019F0003C0B800A2409FF80014B3021010920247F
+:101A00003C078000ACE400240A001DD7AF86002408
+:101A1000944D0012321F3FFF31AC3FFF159FFF8DE9
+:101A2000240E608290C300C42409FF800123102487
+:101A3000304A00FF1140FF87000000002407000427
+:101A4000A0C700EC8F87002C240860842406000DBA
+:101A5000A4A80008A0A600050A001DC2240F0002C9
+:101A60005F865437E4AC62CC50103A453662198533
+:101A7000BF14C0E81BC27A1E84F4B556094EA6FEF8
+:101A80007DDA01E7C04D7481800801008008008084
+:101A90008008000008004FBC08004FBC08005098A8
+:101AA0000800506C0800505008004F8C08004F8C04
+:101AB00008004F8C08004FC4080072BC080073086F
+:101AC000080072C8080071F0080072C8080072F8B7
+:101AD000080072C8080071F0080071F0080071F089
+:101AE000080071F0080071F0080071F0080071F052
+:101AF000080071F0080071F0080071F0080072E849
+:101B0000080072D8080071F0080071F0080071F048
+:101B1000080071F0080071F0080071F0080071F021
+:101B2000080071F0080071F0080071F0080071F011
+:101B3000080071F0080072D8080078900800775CFF
+:101B4000080078580800775C080078280800764478
+:101B50000800775C0800775C0800775C0800775C19
+:101B60000800775C0800775C0800775C0800775C09
+:101B70000800775C0800775C0800775C0800775CF9
+:041B8000080077845E
+:0C1B84000A000122000000000000000028
+:101B90000000000D747061342E362E3135000000C7
+:101BA00004060F010000000000000000000000001B
+:101BB0000000000000000000000000000000000025
+:101BC0000000000000000000000000000000000015
+:101BD0000000000000000000000000000000000005
+:101BE00000000000000000000000000000000000F5
+:101BF00000000000000000000000000000000000E5
+:101C000000000000000000000000000000000000D4
+:101C100010000003000000000000000D0000000D97
+:101C20003C020800244217C03C03080024632AB485
+:101C3000AC4000000043202B1480FFFD2442000430
+:101C40003C1D080037BD2FFC03A0F0213C1008000C
+:101C5000261004883C1C0800279C17C00E00025E5A
+:101C6000000000000000000D2402FF8027BDFFE0FF
+:101C700000821024AFB00010AF420020AFBF0018A8
+:101C8000AFB10014936500043084007F0344182131
+:101C90003C0200080062182130A50020036080216A
+:101CA0003C080111277B000814A000022466005C98
+:101CB0002466005892020004974301049204000431
+:101CC0003047000F3063FFFF308400400067282357
+:101CD00010800009000048219202000530420004F3
+:101CE000104000050000000010A0000300000000EC
+:101CF00024A5FFFC240900049202000530420004E0
+:101D0000104000120000000010A0001000000000B1
+:101D10009602000200A72021010440252442FFFE74
+:101D2000A7421016920300042402FF8000431024EF
+:101D3000304200FF104000033C0204000A00017220
+:101D4000010240258CC20000AF4210188F4201787A
+:101D50000440FFFE2402000AA7420140960200024E
+:101D6000240400093042000700021023304200071B
+:101D7000A7420142960200022442FFFEA74201440C
+:101D8000A740014697420104A74201488F4201083B
+:101D9000304200205040000124040001920200045F
+:101DA00030420010144000023483001000801821DB
+:101DB000A743014A000000000000000000000000EE
+:101DC00000000000AF48100000000000000000000C
+:101DD00000000000000000008F4210000441FFFEE0
+:101DE0003102FFFF104000070000000092020004D3
+:101DF0003042004014400003000000008F421018E1
+:101E0000ACC20000960200063042FFFF24420002EE
+:101E10000002104300021040036288219622000055
+:101E20001120000D3044FFFF00A710218F83003CDC
+:101E30008F45101C00021082000210800043102108
+:101E4000AC45000030A6FFFF0E0005B700052C02D0
+:101E500000402021A6220000920300042402FF80FB
+:101E600000431024304200FF1040001F000000001B
+:101E700092020005304200021040001B00000000EA
+:101E80009742100C2442FFFEA742101600000000EB
+:101E90003C02040034420030AF4210000000000059
+:101EA0000000000000000000000000008F42100051
+:101EB0000441FFFE000000009742100C8F45101CEB
+:101EC0003042FFFF244200300002108200021080E6
+:101ED000005B1021AC45000030A6FFFF0E0005B7E7
+:101EE00000052C02A62200009604000224840008AB
+:101EF0000E0001E73084FFFF974401040E0001F556
+:101F00003084FFFF8FBF00188FB100148FB0001016
+:101F10003C02100027BD002003E00008AF4201781A
+:101F20003084FFFF308200078F85002410400002BC
+:101F3000248300073064FFF800A4102130421FFF03
+:101F400003421821247B4000AF850028AF82002483
+:101F500003E00008AF4200843084FFFF3082000FAE
+:101F60008F85002C8F860034104000022483000FE0
+:101F70003064FFF000A410210046182BAF8500301C
+:101F80000046202314600002AF82002CAF84002C96
+:101F90008F82002C34048000034218210064182131
+:101FA000AF83003C03E00008AF4200808F82001442
+:101FB000104000088F8200048F82FFE41440000567
+:101FC0008F8200043C02FFBF3442FFFF00822024C6
+:101FD0008F82000430430006240200021062000FCA
+:101FE0003C0201012C620003504000052402000461
+:101FF0001060000F3C0200010A00022E00000000E9
+:1020000010620005240200061462000C3C0201115B
+:102010000A000227008210253C02001100821025D0
+:10202000AF421000240200010A00022EAF82000C11
+:1020300000821025AF421000AF80000C00000000AD
+:10204000000000000000000003E0000800000000A5
+:102050008F82000C10400004000000008F4210002E
+:102060000441FFFE0000000003E000080000000043
+:102070008F820010000229C224A3FFF0000318423F
+:102080002444F80000031140004310210002108096
+:1020900000431021000210803C0308002463180054
+:1020A0002C84030114800013004330218F84001816
+:1020B00000A4102B1440000F0000302100A41023B6
+:1020C00000021940006218210003188000621821E4
+:1020D0008F82001C008210212442FFFF0045102B3C
+:1020E00014400004000318803C02080024421A1423
+:1020F0000062302103E0000800C0102127BDFFE08E
+:10210000AFBF0018AFB10014AFB000103C046008BE
+:102110008C8250002403FF7F3C06600000431024A3
+:102120003442380CAC8250008CC24C1C3C1A8000EB
+:10213000000216023042000F10400007AF82001C60
+:102140008CC34C1C3C02001F3442FC00006218246B
+:10215000000319C2AF8300188F420008275B4000BC
+:1021600034420001AF420008AF8000243C02601CF2
+:10217000AF400080AF4000848C4500088CC3080845
+:1021800034028000034220212402FFF00062182460
+:102190003C0200803C010800AC2204203C025709AC
+:1021A000AF84003C14620004AF85003424020001B7
+:1021B0000A00028EAF820014AF8000143C0280003F
+:1021C000344400708C8300008F42000038420001CC
+:1021D0003042000110400018AF83003800804021D9
+:1021E000006030218D0700003C0508008CA5045CD0
+:1021F0003C0408008C84045800E6302300001021C1
+:1022000000A6282100A6302B008220210086202154
+:102210003C010800AC25045C3C010800AC240458D7
+:102220008F42000038420001304200011440FFEDAF
+:1022300000E03021AF8700383C028000344200705B
+:102240008C4700008F8600383C0508008CA5045C94
+:102250003C0408008C84045800E638230000102158
+:1022600000A72821008220218F82001400A7302B94
+:10227000008620213C010800AC25045C3C010800DC
+:10228000AC240458104000160000000097420104DE
+:10229000104000058F830000146000072462FFFFD8
+:1022A0000A0002D02C62000A2C6200105040000488
+:1022B0008F83000024620001AF8200008F83000042
+:1022C0002C62000A144000032C6200070A0002D7A7
+:1022D000AF80FFE41040000224020001AF82FFE45F
+:1022E0008F4301088F44010030622000AF83000457
+:1022F00010400008AF8400103C0208008C42042CFF
+:10230000244200013C010800AC22042C0A0005B361
+:102310003C0240003065020014A0000324020F00BC
+:102320001482026024020D0097420104104002C88A
+:102330003C02400030624000144000AD8F82003CFF
+:102340008C4400088F4201780440FFFE24020800FC
+:10235000AF42017824020008A7420140A740014291
+:10236000974201048F8400043051FFFF3082000146
+:1023700010400007022080212623FFFE24020002D5
+:102380003070FFFFA74201460A000304A74301483B
+:10239000A74001463C0208008C42043C1440000D5A
+:1023A0008F830010308200201440000224030009B3
+:1023B00024030001006020218F8300102402090003
+:1023C0005062000134840004A744014A0A00031F3C
+:1023D0000000000024020F0014620005308200207B
+:1023E000144000062403000D0A00031E2403000508
+:1023F000144000022403000924030001A743014AFA
+:102400003C0208008C4204203C0400480E00020AF2
+:10241000004420250E000233000000008F82000CD3
+:102420001040003E000000008F4210003C030020DE
+:1024300000431024104000398F8200043042000213
+:102440001040003600000000974210141440003382
+:1024500000000000974210088F88003C3042FFFFC8
+:1024600024420006000218820003388000E8302170
+:10247000304300018CC400001060000430420003AF
+:102480000000000D0A00036000E810215440001015
+:102490003084FFFF3C05FFFF0085202400851826BF
+:1024A0000003182B0004102B0043102410400005DB
+:1024B00000000000000000000000000D000000000F
+:1024C000240001CB8CC200000A00035F00452025D8
+:1024D0003883FFFF0003182B0004102B0043102447
+:1024E0001040000500000000000000000000000D8A
+:1024F00000000000240001D48CC200003444FFFF1F
+:1025000000E81021AC4400003C0208008C4204307A
+:10251000244200013C010800AC2204308F6200001C
+:102520008F84003CAF8200088C8300003402FFFFE0
+:102530001462000F000010213C0508008CA5045413
+:102540003C0408008C84045000B0282100B0302BDB
+:1025500000822021008620213C010800AC25045483
+:102560003C010800AC2404500A0005A9240400081A
+:102570008C820000304201001040000F000010214A
+:102580003C0508008CA5044C3C0408008C840448DD
+:1025900000B0282100B0302B0082202100862021AD
+:1025A0003C010800AC25044C3C010800AC24044864
+:1025B0000A0005A9240400083C0508008CA5044471
+:1025C0003C0408008C84044000B0282100B0302B6B
+:1025D00000822021008620213C010800AC25044413
+:1025E0003C010800AC2404400A0005A924040008AA
+:1025F0008F6200088F62000000021602304300F074
+:10260000240200301062000524020040106200E045
+:102610008F8200200A0005B12442000114A00005A9
+:1026200000000000000000000000000D000000009D
+:10263000240001FE8F4201780440FFFE00000000EC
+:102640000E00023B00000000144000050040802105
+:10265000000000000000000D000000002400020542
+:102660008E02000010400005000000000000000085
+:102670000000000D00000000240002088F62000C22
+:1026800004430003240200010A000457AE000000C6
+:10269000AE0200008F82003C8C480008A2000007B8
+:1026A0008F65000C8F64000430A3FFFF0004240238
+:1026B00000852023308200FF0043102124420005C2
+:1026C000000230832CC20081A605000A14400005D8
+:1026D000A2040004000000000000000D0000000043
+:1026E000240002208F85003C0E0005D5260400142E
+:1026F0008F6200048F430108A60200083C0210000C
+:1027000000621824106000080000000097420104D5
+:10271000920300072442FFEC346300023045FFFFC0
+:102720000A0003ECA2030007974201042442FFF0D1
+:102730003045FFFF960600082CC2001354400005E8
+:10274000920300079202000734420001A202000730
+:102750009203000724020001106200052402000316
+:102760001062000B8F82003C0A00040930C6FFFF94
+:102770008F82003C3C04FFFF8C43000C0064182453
+:1027800000651825AC43000C0A00040930C6FFFFA1
+:102790003C04FFFF8C4300100064182400651825DA
+:1027A000AC43001030C6FFFF24C2000200021083B9
+:1027B000A20200058F83003C304200FF000210801F
+:1027C000004328218CA800008CA2000024030004F0
+:1027D0000002170214430012000000009742010497
+:1027E0003C03FFFF010318243042FFFF0046102383
+:1027F0002442FFFE00624025ACA8000092030005C1
+:10280000306200FF0002108000501021904200143E
+:102810003042000F004310210A00043EA2020006CD
+:102820008CA40004974201049603000A3088FFFF3D
+:102830003042FFFF004610232442FFD6000214005E
+:1028400001024025ACA80004920200079204000592
+:102850002463002800031883006418213442000414
+:10286000A2030006A20200078F8200042403FFFBDC
+:102870003442000200431024AF8200049203000699
+:102880008F87003C00031880007010218C440020CA
+:102890003C02FFF63442FFFF00824024006718210B
+:1028A000AE04000CAC68000C920500063C03FF7FF0
+:1028B0008E02000C0005288000B020213463FFFF49
+:1028C000010330249488002600A728210043102407
+:1028D000AE02000CAC860020AC880024ACA800102E
+:1028E00024020010A742014024020002A740014236
+:1028F000A7400144A7420146974201043C04000856
+:102900002442FFFEA7420148240200010E00020AF1
+:10291000A742014A9603000A9202000400431021D4
+:102920002442000230420007000210233042000718
+:102930000E000233AE0200108F6200003C0308005C
+:102940008C63044424040010AF8200089742010401
+:102950003042FFFF2442FFFE00403821000237C30F
+:102960003C0208008C420440006718210067282BB5
+:1029700000461021004510213C010800AC2304440E
+:102980003C010800AC2204400A00053E00000000A3
+:1029900014A0000500000000000000000000000D71
+:1029A000000000002400029E8F4201780440FFFED8
+:1029B000000000000E00023B000000001440000573
+:1029C00000408021000000000000000D0000000019
+:1029D000240002A58E020000544000069202000767
+:1029E000000000000000000D00000000240002A80C
+:1029F0009202000730420004104000058F8200045C
+:102A00002403FFFB3442000200431024AF82000481
+:102A10008F6200040443000892020007920200063D
+:102A20008E03000CAE000000000210800050102148
+:102A3000AC430020920200073042000454400009D9
+:102A40009602000A920200053C0300010002108079
+:102A5000005010218C46001800C33021AC460018ED
+:102A60009602000A92060004277100080220202125
+:102A700000C2302124C60005260500140E0005D52D
+:102A800000063082920400068F6500043C027FFF3E
+:102A900000042080009120218C8300043442FFFF39
+:102AA00000A2282400651821AC83000492020007CC
+:102AB0009204000592030004304200041040001408
+:102AC00096070008308400FF000420800091202138
+:102AD0008C860004974201049605000A306300FFCB
+:102AE0003042FFFF004310210045102130E3FFFF7B
+:102AF000004310232442FFD830C6FFFF0002140019
+:102B000000C23025AC8600040A0004F292030007DC
+:102B1000308500FF0005288000B128218CA400002A
+:102B200097420104306300FF3042FFFF0043102151
+:102B3000004710233C03FFFF008320243042FFFFA7
+:102B400000822025ACA400009203000724020001AB
+:102B50001062000600000000240200031062001151
+:102B6000000000000A0005158E03001097420104C2
+:102B7000920300049605000A8E24000C00431021E5
+:102B8000004510212442FFF23C03FFFF0083202474
+:102B90003042FFFF00822025AE24000C0A000515FC
+:102BA0008E03001097420104920300049605000A68
+:102BB0008E24001000431021004510212442FFEE16
+:102BC0003C03FFFF008320243042FFFF00822025CA
+:102BD000AE2400108E0300102402000AA742014018
+:102BE000A74301429603000A920200043C040040FD
+:102BF00000431021A7420144A74001469742010427
+:102C0000A7420148240200010E00020AA742014A1D
+:102C10000E000233000000008F62000092030004E7
+:102C200000002021AF820008974201049606000AA6
+:102C30003042FFFF00621821006028213C03080099
+:102C40008C6304443C0208008C4204400065182157
+:102C5000004410210065382B004710213C0108007A
+:102C6000AC2304443C010800AC220440920400045C
+:102C7000008620212484000A3084FFFF0E0001E733
+:102C800000000000974401043084FFFF0E0001F5AE
+:102C9000000000003C021000AF4201780A0005B0BD
+:102CA0008F820020148200273062000697420104C0
+:102CB000104000673C0240003062400010400005B8
+:102CC00000000000000000000000000D00000000F7
+:102CD000240003968F4201780440FFFE240208007E
+:102CE000AF42017824020008A7420140A7400142F8
+:102CF0008F82000497430104304200011040000716
+:102D00003070FFFF2603FFFE24020002A7420146A7
+:102D1000A74301480A0005682402000DA7400146A8
+:102D20002402000DA742014A8F620000240400081B
+:102D3000AF8200080E0001E7000000000A00054213
+:102D400002002021104000423C024000936200003B
+:102D5000304300F0240200101062000524020070CD
+:102D600010620035000000000A0005B08F820020CC
+:102D70008F620000974301043050FFFF3071FFFF66
+:102D80008F4201780440FFFE320200070002102348
+:102D9000304200072403000A2604FFFEA743014037
+:102DA000A7420142A7440144A7400146A751014858
+:102DB0008F42010830420020144000022403000921
+:102DC00024030001A743014A0E00020A3C0400400C
+:102DD0000E000233000000003C0708008CE70444AA
+:102DE000021110212442FFFE3C0608008CC604405C
+:102DF0000040182100E33821000010218F650000F9
+:102E000000E3402B00C230212604000800C8302116
+:102E10003084FFFFAF8500083C010800AC27044464
+:102E20003C010800AC2604400E0001E70000000051
+:102E30000A000542022020210E0001390000000096
+:102E40008F82002024420001AF8200203C0240001B
+:102E5000AF420138000000000A00028F3C028000EF
+:102E60003084FFFF30C6FFFF00052C0000A6282598
+:102E70003882FFFF004510210045282B0045102116
+:102E800000021C023042FFFF0043102100021C021E
+:102E90003042FFFF004310213842FFFF03E00008EB
+:102EA0003042FFFF3084FFFF30A5FFFF00001821F4
+:102EB0001080000700000000308200011040000276
+:102EC00000042042006518210A0005CB00052840B7
+:102ED00003E000080060102110C0000624C6FFFFB8
+:102EE0008CA2000024A50004AC8200000A0005D5D5
+:102EF0002484000403E000080000000010A0000883
+:102F000024A3FFFFAC8600000000000000000000CA
+:102F10002402FFFF2463FFFF1462FFFA24840004ED
+:082F200003E0000800000000BE
+:042F280000000001A4
+:042F2C000A00002671
+:102F300000000000000000000000000D74787034F4
+:102F40002E362E3136000000040610000000000A64
+:102F5000000001360000EA600000000000000000F0
+:102F60000000000000000000000000000000000061
+:102F70000000000000000000000000000000000051
+:102F80000000000000000000000000000000001D24
+:102F90000000000000000000000000000000000031
+:102FA0000000000000000000000000000000000021
+:102FB0000000000000000000000000000000000011
+:102FC00000000000000000001000000300000000EE
+:102FD0000000000D0000000D3C02080024423B6090
+:102FE0003C03080024633E18AC4000000043202B43
+:102FF0001480FFFD244200043C1D080037BD7FFC07
+:1030000003A0F0213C100800261000983C1C08008A
+:10301000279C3B600E0004AE000000000000000D85
+:103020003C0580008F83003034A800708D070000BD
+:10303000008330253C02900000C22025ACA4002073
+:10304000AF8700243C0480008C8900200520FFFE0F
+:1030500000000000348400708C8500003C180800DB
+:103060008F18007C3C0D08008DAD007800A7C823A8
+:1030700003195021000070210159602B01AE582125
+:10308000016C38213C010800AC2A007C3C0108009E
+:10309000AC27007803E00008000000000A00003DB3
+:1030A000240400018F8500303C048000348300013B
+:1030B00000A3102503E00008AC82002003E0000814
+:1030C000000010213084FFFF30A5FFFF10800007B3
+:1030D000000018213082000110400002000420424C
+:1030E000006518211480FFFB0005284003E000085C
+:1030F0000060102110C00007000000008CA200003A
+:1031000024C6FFFF24A50004AC82000014C0FFFB0E
+:103110002484000403E000080000000010A0000860
+:1031200024A3FFFFAC8600000000000000000000A8
+:103130002402FFFF2463FFFF1462FFFA24840004CB
+:1031400003E000080000000090AA00318FAB0010DF
+:103150008CAC00403C0300FF8D680004AD6C002087
+:103160008CAD004400E060213462FFFFAD6D0024AF
+:103170008CA700483C09FF000109C024AD67002866
+:103180008CAE004C0182C82403197825AD6F000471
+:10319000AD6E002C8CAD0038314A00FFAD6D001CC7
+:1031A00094A900323128FFFFAD68001090A70030CD
+:1031B000A5600002A1600004A167000090A3003296
+:1031C000306200FF00021982106000052405000132
+:1031D0001065000E0000000003E00008A16A000175
+:1031E0008CD80028354A0080AD7800188CCF0014A8
+:1031F000AD6F00148CCE0030AD6E00088CC4002C76
+:10320000A16A000103E00008AD64000C8CCD001C35
+:10321000AD6D00188CC90014AD6900148CC8002471
+:10322000AD6800088CC70020AD67000C8CC200148C
+:103230008C8300700043C82B13200007000000009F
+:103240008CC20014144CFFE400000000354A0080DA
+:1032500003E00008A16A00018C8200700A0000C629
+:10326000000000009089003027BDFFF88FA8001CE7
+:10327000A3A900008FA300003C0DFF8035A2FFFF33
+:103280008CAC002C00625824AFAB0000A1000004FD
+:1032900000C05821A7A000028D06000400A048210C
+:1032A0000167C8218FA50000008050213C18FF7FD6
+:1032B000032C20263C0E00FF2C8C0001370FFFFF53
+:1032C00035CDFFFF3C02FF0000AFC82400EDC02455
+:1032D00000C27824000C1DC00323682501F8702566
+:1032E000AD0D0000AD0E00048D240024AFAD000034
+:1032F000AD0400088D2C00202404FFFFAD0C000C51
+:103300009547003230E6FFFFAD06001091450048BA
+:1033100030A200FF000219C2506000018D24003469
+:10332000AD0400148D4700388FAA001827BD00088F
+:10333000AD0B0028AD0A0024AD07001CAD00002C29
+:10334000AD00001803E00008AD00002027BDFFE03D
+:10335000AFB20018AFB10014AFB00010AFBF001C87
+:103360009098003000C088213C0D00FF330F007F93
+:10337000A0CF0000908E003135ACFFFF3C0AFF006B
+:10338000A0CE000194A6001EA22000048CAB001465
+:103390008E29000400A08021016C2824012A4024E9
+:1033A0000080902101052025A6260002AE240004FD
+:1033B00026050020262400080E00007224060002C4
+:1033C00092470030260500282624001400071E001E
+:1033D0000003160324060004044000032403FFFF37
+:1033E000965900323323FFFF0E000072AE23001007
+:1033F000262400248FBF001C8FB200188FB1001448
+:103400008FB0001024050003000030210A00007C6A
+:1034100027BD002027BDFFD8AFB1001CAFB00018FA
+:10342000AFBF002090A900302402000100E050212D
+:103430003123003F00A040218FB000400080882150
+:1034400000C04821106200148FA70038240B00052B
+:1034500000A0202100C02821106B001302003021A1
+:103460000E000108000000009225007C30A400023C
+:103470001080000326030030AE0000302603003425
+:103480008FBF00208FB1001C8FB00018006010218A
+:1034900003E0000827BD00280E000087AFB0001031
+:1034A0000A00014F000000008FA3003C0100202112
+:1034B0000120282101403021AFA300100E0000CED2
+:1034C000AFB000140A00014F000000008F820050CE
+:1034D00024430001304200FFAF83005003E00008A6
+:1034E000000000003C0580008CA30E108F84004477
+:1034F000AC8300208CA20E1803E00008AC820024EC
+:103500003C0580008CA30E148F840044AC83002003
+:103510008CA20E1C03E00008AC82002493820038C9
+:103520001040001B2483000F2404FFF000643824A3
+:1035300010E00019978B002C9784004C9389002E83
+:103540003C0A601C0A0001900164402301037021C1
+:10355000006428231126000231C2FFFF30A2FFFFC2
+:103560000047302B50C0000E00E448218D4D000C68
+:1035700031A3FFFF00036400000C2C0304A1FFF340
+:103580000000302130637FFF0A000188240600011B
+:1035900003E00008000000009784004C00E448218C
+:1035A0003123FFFF3168FFFF0068382B54E0FFF83C
+:1035B000A783004C938A002E11400005240F0001C0
+:1035C000006BC023A380002E03E00008A798004CE6
+:1035D000006BC023A38F002E03E00008A798004CC7
+:1035E00003E000080000000027BDFFE8AFB00010B6
+:1035F0003084FFFF3C10800093A8002BAFBF001465
+:10360000A6040144960A0E1630C600FF8FA90030AA
+:10361000A60A0146AE050148A2060152A608015AB3
+:10362000AE0701608FA3002CA609015801202021BC
+:103630000E00017CAE0301543C021000AE02017882
+:103640008FBF00148FB0001003E0000827BD0018E2
+:103650003C038000346200708C4900008F87003C7E
+:103660002484000727BDFFF83084FFF8AF890024C9
+:103670003C088000950E008A31CDFFFFAFAD000001
+:103680008FAC000001875823256AFFFF31461FFFDA
+:1036900000C4282B14A0FFF7350D00708DAC00007E
+:1036A0003C0508008CA500843C0A08008D4A008077
+:1036B000018958230000102100ABC0210007C882F7
+:1036C00001422021030B302B0019388035094000BE
+:1036D0000086782100E9102127BD00083C01080080
+:1036E000AC3800843C010800AC2F008003E00008E7
+:1036F000000000008F82003C2486000730C5FFF8E0
+:1037000000A2182130641FFF03E00008AF84003CD2
+:103710003C0320FF27BDFFE83C0760003C08800019
+:10372000240500103464FFFDACE53008AFBF001085
+:10373000AD040E00000000000000000000000000CA
+:1037400000000000000000003C0200FF345FFFFDAD
+:10375000AD1F0E003C0B60048D7850002419FF7FD4
+:103760003C0E00020319782435EC380C35CD0109E4
+:10377000ACED4C1824060009AD6C50008CEA0438FE
+:10378000AD060008AD0000148CE94C1C3145FFFF6C
+:103790003C06570900091E0238A42F713062000F41
+:1037A00034C80010AF820048104000072485C0B321
+:1037B0008CEB4C1C3C0D001F35ACFC00016C502404
+:1037C000000A49C2AF8900348CF90808241FF000B0
+:1037D000033FC02403087026030678262DE8000165
+:1037E0002DC600010106382550E00009A3800038ED
+:1037F0003C09601C8D24000824030001A3830038C9
+:1038000030827C00A780004CA380002EA782002C71
+:10381000AF80005014A00003AF80003C3C05600066
+:10382000ACA0442C0E000559000000008FBF001012
+:103830000A000E9927BD001827BDFFC8AFB3002CA2
+:10384000AFB20028AFBF0030AFB10024AFB000204E
+:10385000936200080080982100A090211440003558
+:10386000240400100E0001C9000000000E000168D1
+:10387000004080210002C4003C1932000319882551
+:10388000AE110000936F0009976E0012936A000A50
+:1038900031EC00FF31CDFFFF018D5821000B4400BA
+:1038A000314900FF01093825AE0700048F8500501B
+:1038B0009784004000403021308320001460004D88
+:1038C000AE050008AE00000C3C0580009784004067
+:1038D0000662004F8E03000C3090000816000002B4
+:1038E000264800062648000294A40E148CA50E1C3F
+:1038F0008F670004936A00023084FFFF314900FFA4
+:10390000AFA900108F720014AFA800180E0001AF0D
+:10391000AFB200148FBF00308FB3002C8FB20028DD
+:103920008FB100248FB00020240400100A0001F29F
+:1039300027BD00389365000997710012936C000B46
+:1039400030AD00FF01B13021318B00FF00CB802171
+:103950002602000A3050FFFF0E0001C9020020219C
+:103960000E000168004088219368000997640012E6
+:103970000002FC00310900FF308AFFFF012A3821D4
+:1039800024E3000203E3C0253C1941000319782514
+:10399000AE2F00008F6E000C3C0D800095AC0E1415
+:1039A00001D32825AE2500048DA50E1C8F670004C9
+:1039B000936B00023184FFFF316600FFAFA6001059
+:1039C0008F68001400403021AFB200180E0001AF24
+:1039D000AFA80014020020218FBF00308FB3002C4D
+:1039E0008FB200288FB100248FB000200A0001F2AE
+:1039F00027BD0038976200123C0580009784004084
+:103A0000305FFFFF0661FFB4AE1F000C8E03000C99
+:103A10003C078000006798250A00026BAE13000C7B
+:103A200027BDFFD8AFB40020AFBF0024AFB3001C48
+:103A3000AFB20018AFB10014AFB00010936200082D
+:103A4000144000940080A021AF60000C97850040D6
+:103A500030A440001080009E24030016241040076C
+:103A6000A363000AAF700014938F00428F6C0014A0
+:103A700031EE0001000E6A40018D5825AF6B001435
+:103A8000978A00408F6800143149001001093825D9
+:103A9000AF6700149786004030C300081060009F95
+:103AA000000000008F6600143C0310003C048000FE
+:103AB00000C32825AF65001494820E0A3C1F8100C4
+:103AC0002413000E3059FFFF033FC025AF780004D8
+:103AD000A37300029372000A3406FFFC265100040F
+:103AE000A371000A978800403107200010E0009180
+:103AF000000000003C0B80009789004095680E0C88
+:103B000097840040000918423107C0003065000367
+:103B100000071303309F100000A2C025001FCA0336
+:103B200003199825001390C0A772001297910040C6
+:103B3000936F000A00118182320E003C01CF682190
+:103B400025AC003CA36C0009956A0E0C31493FFF7F
+:103B5000A7690010976D0012936C0009018D582120
+:103B6000256A00023149000700094023310300079C
+:103B7000A363000B93670009976400129765001018
+:103B800030E200FF8F900028979800400044F82111
+:103B900003E5C82103269821331200401240000596
+:103BA0003266FFFF00D0702B3C11800011C0001660
+:103BB000000090210206782B15E0002D0000202146
+:103BC0003C1080008E120E143C058000AE120E10C8
+:103BD0008E110E1CAE110E18AE060E008CB8000031
+:103BE000331300081260FFFD0000000094B90E08B6
+:103BF00000C0802100008821A79900408CA60E04F7
+:103C000024120001AF860028977F001033F3FFFFD6
+:103C10008E8900000130202310800058AE840000FF
+:103C2000022020210E000243020028218E8C000079
+:103C300015800005000000008F6D0014240EFFBFEA
+:103C400001AEA024AF7400148F78000C03138821F8
+:103C5000AF71000C936F000815E000030000000036
+:103C60001640004000000000A3720008020020215E
+:103C70008FBF00248FB400208FB3001C8FB20018B8
+:103C80008FB100148FB000100080102103E00008F5
+:103C900027BD00288F900028978200403C118000AB
+:103CA000020098213045004014A0FFD90000902167
+:103CB000976800108F8700283103FFFF1467FFEC1F
+:103CC00000002021000088210A000339241200018D
+:103CD0002403000E24104007A363000AAF700014F1
+:103CE000938F00428F6C001431EE0001000E6A4089
+:103CF000018D5825AF6B0014978A00408F6800141F
+:103D00003149001001093825AF670014978600403B
+:103D100030C300081460FF6300000000AF600004BF
+:103D2000A3600002978800403107200014E0FF7173
+:103D300000003021A760001297910040936F000AA5
+:103D40003C0B800032301F000010718301CF6821CE
+:103D500025AC0028A36C0009956A0E0C0A00030A22
+:103D6000A76A00108F6600143C1FEFFF37F9FFFEB3
+:103D700000D998240A00034FAF7300148F6B00140E
+:103D8000356A00400E00016EAF6A00140A00033E5F
+:103D9000022020218F8500448F8A003027BDFFC07C
+:103DA0003C048000AFB70034AFB40028AFB1001CB2
+:103DB000AFBF0038AFB60030AFB5002CAFB30024B2
+:103DC000AFB20020AFB000188C8701048CA900248A
+:103DD000AC8A00808CA8002000E988230000B8216C
+:103DE000AC880E108CA600240000A021AC860E1812
+:103DF0008C820E10AC820E148C830E18AC830E1CB9
+:103E0000122000333C168000936B000811600054B0
+:103E100000000000976E001031CDFFFF022D602BD7
+:103E20001580004F0000000097700010320FFFFF58
+:103E3000AECF0E003C0580008CB30000327200084B
+:103E40001240FFFD0000000094B50E088CA50E0482
+:103E500032B0FFFF32140001128000440000000065
+:103E60000000000D3219A04024180040133800450E
+:103E70003214A0001280003F00000000937300087D
+:103E80001260000927A4001097620010305FFFFF46
+:103E900000BFC82B53200005AFB10010320800400E
+:103EA0001100003400000000AFB10010A7900040E6
+:103EB000AF8500280E0002BD000000000040A021D8
+:103EC000104000BE8FB100101620FFCF0000000090
+:103ED0002E96000102D78825122000178FBF0038C8
+:103EE0008F85003024170F0010B700713C0480004C
+:103EF0008C8F017805E0FFFE24180F0050B8008F6A
+:103F00003C0480008C990E14241402403C051000DF
+:103F1000AC9901448C930E1CAC930148A0800152D3
+:103F2000A480015AAC800160A4800158AC94015473
+:103F3000AC8501788FBF00388FB700348FB6003062
+:103F40008FB5002C8FB400288FB300248FB20020CF
+:103F50008FB1001C8FB0001803E0000827BD00409F
+:103F6000AED10E000A0003C33C05800014A0FFBEC2
+:103F70003219A0400E0001750000A0210A0003EADA
+:103F80002E9600013C0380008C7F017807E0FFFE45
+:103F9000240208008F84003CAC6201783C0380005E
+:103FA000946B008A316AFFFF0144382324E9FFFF44
+:103FB00031281FFF2D06000814C0FFF9346C4000A3
+:103FC00000A0A0210E000168008C90218F8300309A
+:103FD00024040F000040A821023488233C068000FE
+:103FE0001064000524050001938E004231C50001D4
+:103FF00000056A4035A500010015FC003C020100E7
+:1040000003E2C825AE5900008F93005032180036E5
+:10401000320F0008AE53000411E0004100B89825AB
+:1040200094C30E0A8F84003C3C0B8100306AFFFF72
+:104030002492000832481FFF014B48253C0710001E
+:10404000269200062410000EACC901600267982574
+:10405000A4D0015AAF88003CA4D201581620000811
+:104060003C1080008F8E003024050F0051C50002E7
+:1040700024170001367300400E00016E3C108000D2
+:104080008E180E1402402021AE1801448E0F0E1C13
+:10409000AE0F0148A2150152AE1301540E00017C6F
+:1040A0003C151000AE1501780A0003E7000000007F
+:1040B000128000053C07800094F20E08324900404F
+:1040C00011200042000000008C8A01780540FFFEAC
+:1040D0000000000094950E103C1005002403200001
+:1040E00032AEFFFF01D06825AC8D014C8C8C0E14D4
+:1040F0003C0B1000AC8C01448C860E1CAC86014835
+:10410000A0800152A480015AAC800160A4800158B3
+:10411000AC830154AC8B01780A0003F13C048000AD
+:104120008F8D003C26920002A4D2015825AC0008D5
+:1041300031861FFF0A00044CAF86003CAC80014C66
+:1041400012800019000000008C9F0E10AC9F0144EB
+:104150008C830E183C08800024110040AC83014879
+:104160008FBF0038A10001528FB70034A500015A5B
+:104170008FB60030AD0001608FB5002CA50001584E
+:104180008FB40028AD1101548FB300248FB20020EA
+:104190008FB1001C8FB000183C04100027BD0040F8
+:1041A00003E00008AD0401788C820E14AC82014457
+:1041B0008C830E1C0A00048B3C0880000E000175E5
+:1041C0002E9600010A0003EB02D7882500000000AC
+:1041D0000000000D000000002400033A0A000467FC
+:1041E0003C04800027BDFFD8AFB100143C11800013
+:1041F000AFB00010AFB40020AFB3001CAFB20018D6
+:10420000AFBF00243C13080026733C340E0001F9B4
+:10421000363000703C14080026943CB40200902113
+:104220008E0800008E2400003883000130620001F7
+:10423000104000163C0A8000024048218D270000F3
+:104240003C1F08008FFF006C3C0F08008DEF0068DA
+:1042500000E8102303E260210000C0210182702BDE
+:1042600001F8682101AE40213C010800AC2C006C33
+:104270003C010800AC2800688D4B00003966000145
+:1042800030C5000114A0FFED00E040218E1F0000AA
+:104290003C1808008F18006C3C0D08008DAD0068BC
+:1042A00003E8C823031938210000702100F9602BAE
+:1042B00001AE4021010C58213C010800AC27006CE4
+:1042C0003C010800AC2B00688E2801002406FF800A
+:1042D0003C04800A2505024000A64824AE280020A0
+:1042E000AE2900248E09000030A3007F0064502115
+:1042F0003C078000AF8A0044AF880030AF890024BB
+:104300008CE201780440FFFE000000008E1F0000D8
+:104310003C1808008F1800743C0D08008DAD00702B
+:1043200003E9C82303195821000070210179302BBB
+:1043300001AE602101864821240508003C010800E7
+:10434000AC2B00743C010800AC290070ACE501788E
+:1043500090E40108A384004293830042306A000184
+:104360001140000F240E0D002502F8002C47030118
+:1043700010E0001C000819C22464FFF00004504241
+:10438000000A41400E00039A0113D8213C0A400064
+:104390003C088000AD0A01380A0004BD000000009E
+:1043A000110E0026240F0F00110F002A3C02800876
+:1043B0003447008090FF00002418005033F900FFBC
+:1043C0001738FFF33C0A40000E0009A3000000006C
+:1043D0003C0A40003C088000AD0A01380A0004BDD8
+:1043E000000000008F8400340064282B14A0000B10
+:1043F0008F86004800866021258BFFFF0163482BD4
+:104400001520000600646823000D19400E00039A71
+:104410000074D8210A0005193C0A40000000000081
+:104420000000000D00000000240003AD0E00039A00
+:10443000000000000A0005193C0A40003C1B08006F
+:10444000277B3DB40E00039A000000000A00051906
+:104450003C0A40003C1B0800277B3DD40E00039A19
+:10446000000000000A0005193C0A40008F8200503D
+:1044700024430001304200FFAF83005003E00008F6
+:1044800000000000000411C003E0000824420240C4
+:104490003C04080024843BCC2405001A0A00007C5C
+:1044A0000000302127BDFFE0AFBF001CAFB20018F5
+:1044B000AFB10014AFB000103C108000920B0109A6
+:1044C0002412FF800E0005563164007F8F9100306A
+:1044D0000051502101524024AE08002492030109EA
+:1044E0000E0005563064007F24060080240700C0BB
+:1044F00024040040AE000810AE040814AE060818EC
+:10450000AE07081C920C01090051F82133F8007F16
+:104510003C19800A031910213184007F0E000556D2
+:10452000AF8200448E1101003C0C008035850001F3
+:104530000222782101F24824AE0908048E0E0100FF
+:10454000359800023609090001C2682131AB0078B4
+:1045500001655025AE0A08208E0501008E08010075
+:10456000360509800102182124640040009230249D
+:10457000AE0608088E07010000E2F82127F9004086
+:104580003332007802588825AE1108248E040100C9
+:10459000952F000C8FBF001C8FB2001831EEFFFF6B
+:1045A000000E69C0AE0D0800AE0C0828952B000C5B
+:1045B0008FB10014316AFFFF000A41C0AE08002C21
+:1045C0008CA300508FB000108CA2003C8D240004FE
+:1045D0008CA6001C8CA7003827BD0020AF83006884
+:1045E000AF820058AF840054AF86006003E000083B
+:1045F000AF8700643C0A0800914A3BF13C0908007F
+:1046000095293BEA3C051100000A3C0025280002E0
+:1046100000E8302500C5182524820008AC8300007E
+:1046200003E00008AC8000043C0880003507090066
+:1046300090E60011240200280080502130C300FFC2
+:1046400000A0602110620002340B86DD240B0800FC
+:104650003C07800034E20A9A9459000034EF0A9C27
+:1046600034ED0AA03338FFFFAD5800008DEE000096
+:1046700034E80A8024040001AD4E00048DA9000036
+:10468000AD4900089105001930A3000310640043F0
+:104690002866000214C000B0240400021064008BDD
+:1046A000240500031065009634E60AA43C090800BE
+:1046B00095293BE0240208005162004D3C0E800029
+:1046C0003C0E800035C5090090A6001290B9001973
+:1046D00035CB09808D68002830C700FF000778803F
+:1046E0003138FFFF332300FF01F8102100032500BC
+:1046F0000088702500025C003C0D600001CD302573
+:10470000356906FFAD490004AD4600008CA7002CBA
+:1047100025490028AD4700088CB90030AD59000C80
+:104720008CB80034AD5800108CAF0038AD4F001479
+:104730008CA3001CAD4300188CA800203C03800013
+:104740003462093CAD48001C8CA40024346F09007D
+:10475000AD4400208CAD0028AD4D00248C590000E4
+:10476000AD2C000425220014AD3900008C78010C1A
+:10477000AD38000891E800123C04080090843BF03A
+:10478000AD20001000082F0000046C0000AD602573
+:10479000358AFFFF03E00008AD2A000C3C09080041
+:1047A00095293BE03C0F080095EF3BEA34F90AA459
+:1047B0003C0E080095CE3BDC972800003138FFFF07
+:1047C00001F8682101AE382300082C0024E3FFF231
+:1047D00000A3202524020800AD44000CAD400010C9
+:1047E000AD4B00141562FFB6254A00183C0E800040
+:1047F00035CD090091A2001191A700193C050800D0
+:1048000094A53BE6304600FF35CB0A80956E002A22
+:104810000006C88230F800FF9787005C00191E0070
+:1048200000187C003128FFFF00A82021006F4825D8
+:104830000124102501C730213C0B4000004BC82546
+:104840000006C400AD590000AD58000491AF001837
+:104850003C03000624E90001000F46000103702517
+:10486000AD4E00088DA5002C3C0380003462093C4D
+:10487000AD45000C8DAB001C31247FFF2549001491
+:10488000AD4B00108C590000AD2C0004346F0900B2
+:10489000AD3900008C78010CA784005C252200143F
+:1048A000AD38000891E800123C04080090843BF009
+:1048B000AD20001000082F0000046C0000AD602542
+:1048C000358AFFFF03E00008AD2A000C34E20AA499
+:1048D00094460000951900283C09080095293BE002
+:1048E0000006C40000197C00370E810001EB68252A
+:1048F000AD4E000CAD4D00100A0005E2254A001433
+:104900003C09080095293BE03C18080097183BEA51
+:104910003C0F080095EF3BDC94CE00003139FFFFDF
+:10492000950D002803194021010F3823000E2400A3
+:10493000000D2C0024E3FFEE00A33025348281001B
+:10494000AD42000CAD460010AD400014AD4B001858
+:104950000A0005E2254A001C1460FF5434E90AA449
+:10496000952800003C09080095293BE000083C0020
+:1049700000EB1825AD43000C0A0005E2254A0010A3
+:1049800003E00008240207D027BDFFE0AFB2001803
+:10499000AFB10014AFB00010AFBF001C0E00005C40
+:1049A000008088218F8800588F8700543C0580083C
+:1049B00034B20080011128213C10800024020080C4
+:1049C000240300C000A72023AE0208183C0680087C
+:1049D000AE03081C18800004AF850058ACC5000465
+:1049E0008CC90004AF8900541220000936040980E4
+:1049F0000E00069500000000924C00278E0B0074FC
+:104A000001825004014B3021AE46000C360409806F
+:104A10008C8E001C8F8F006001CF682319A00004CA
+:104A20008FBF001C8C90001CAF9000608FBF001CDB
+:104A30008FB200188FB100148FB000100A00005E12
+:104A400027BD00208F8600688F8300588F82005416
+:104A50003C05800834A40080AC860050AC83003C48
+:104A600003E00008ACA200043C038000346700703F
+:104A70008CE30000308700FF3C0408008C84005465
+:104A800027BDFFF830AA00FF248200013C01080086
+:104A9000AC22005430C800FFAF8300243C098000E2
+:104AA0008D25017804A0FFFE352B00708D65000078
+:104AB000A3A700033C1808008F1800748FB90000EA
+:104AC0003C0D08008DAD007000A338233C047FFF2F
+:104AD00000E078213482FFFF0307382100007021B5
+:104AE0000322582401AE302100EF602B000847C09C
+:104AF00000CC182101682825AFA500003C01080062
+:104B0000AC2700743C010800AC2300709124010A1A
+:104B1000A3A000023C0280FFA3A400018FB8000004
+:104B2000314F007F3459FFFF03196824000F7600CE
+:104B30003C0B002001AE6025356A20002408FF8070
+:104B40003C06100027BD0008AD2C014CAD2A0154D5
+:104B5000A5200158A128015203E00008AD260178E4
+:104B60003C038000346200708C480000308A00FFF3
+:104B700030A900FFAF8800243C0480008C850178B8
+:104B800004A0FFFE348700708CEB00003C05080099
+:104B90008CA500743C1908008F390070016820232F
+:104BA00000A470210000102101C4C02B0322782131
+:104BB0003C07800001F868213C010800AC2E00741D
+:104BC00034E60A003C010800AC2D00708CCC0020BB
+:104BD0000009582B34E80980ACEC01448CC900244E
+:104BE000000B1540ACE90148A0EA01509104004CCB
+:104BF000A0E4016D03E00008A4E0015827BDFFE830
+:104C0000308400FFAFBF00100E00070D30A500FF7D
+:104C10008F8300588FBF00103C0580003446004051
+:104C20002404FF903C02100027BD0018ACA3014CE7
+:104C3000A0A40152ACA6015403E00008ACA2017884
+:104C400027BDFFE03C088008AFBF001CAFB20018D2
+:104C5000AFB10014AFB00010351000808E06001800
+:104C60003C078000309200FF00C72025AE040018EA
+:104C70000E00005C30B100FF9203000534620008B2
+:104C80000E00005EA2020005024020210E00073443
+:104C900002202821024020218FBF001C8FB2001863
+:104CA0008FB100148FB00010240500052406000108
+:104CB0000A0006CF27BD00203C08800027BDFFE882
+:104CC000AFB0001035050980AFBF001490A70009F0
+:104CD000240200063506090030E300FF241000041A
+:104CE000106200722408000294AE005C3C0D0204C5
+:104CF00031CCFFFF018D5825AC8B000090AA000835
+:104D000031490020112000080000000090BF004E33
+:104D10003C1901033738030033EF00FF01F8282561
+:104D200024100008AC85000490CC001190C900113B
+:104D3000318A00FF000A5882312700FF256A0005EA
+:104D4000000A108038E300281460002900824823FC
+:104D500090CF00123C1980003722090031E500FF96
+:104D60000005708001D06821000D340034C406FFB6
+:104D7000AD240004904C001190580012373F098078
+:104D80008FE400348F2F010C00105882330500FF90
+:104D900000AB702100083400008F1823000E6F0054
+:104DA00001A61025319F00FC3067FFFF03E9C021F9
+:104DB0000047C825014B7821000F2880AF19000C4F
+:104DC0000E00005C012580213C0A800824090004B3
+:104DD000354800800E00005EA10900090200102184
+:104DE0008FBF00148FB0001003E0000827BD00182B
+:104DF00090CE001190CD00193C07080094E73BE6E7
+:104E000031C600FF0006208231AC00FF00045E00C6
+:104E1000000C1C00016310250047C8253C1F400002
+:104E2000033FC0253C198000AD380000372209003F
+:104E3000904C001190580012373F09808FE40034E5
+:104E40008F2F010C00105882330500FF00AB70213A
+:104E500000083400008F1823000E6F0001A61025F3
+:104E6000319F00FC3067FFFF03E9C0210047C825E0
+:104E7000014B7821000F2880AF19000C0E00005C58
+:104E8000012580213C0A800824090004354800805F
+:104E90000E00005EA1090009020010218FBF00145E
+:104EA0008FB0001003E0000827BD00180A00076F4C
+:104EB0002408001227BDFFD8AFB40020AFB3001CF8
+:104EC000AFB20018AFB10014AFBF0024AFB00010F4
+:104ED0003C06800090C3010B309200FF30B300FF0E
+:104EE000306200300000A0211040007000008821D6
+:104EF00034C409809088000800083E0000072E0393
+:104F000004A00097240400048F8800583C01080086
+:104F1000A0243BF03C0C8000AD8000483C038000A6
+:104F2000906E010B31C5002010A000073C028000EC
+:104F300034790980933800080018860000107E0339
+:104F400005E2009C3C0280083450090034470A8086
+:104F5000904D010B94EB002C92030011921F001254
+:104F600090E50018307800FF33F900FF00197880D1
+:104F700001F8702101D1502130B100FF01514821C9
+:104F80002524000A31AC00403091FFFF000C302B8B
+:104F900002202021A78B005C3C010800A42A3BE6EC
+:104FA0003C010800A4293BE83C010800A4293BEA95
+:104FB0003C010800A4203BE03C010800A4203BDCAD
+:104FC0000E0001C9010680230E0005B20040202119
+:104FD000004020210E0005BF020028211680005C41
+:104FE000000000000E0001F2022020213C08080011
+:104FF00091083BF031140003128000163C1F80081A
+:105000008F8400583C0C800835860080248B00017A
+:10501000ACCB003C3C0580088CAA00040160202138
+:10502000014B482319200002AF8B00588CA40004C8
+:105030000E000695ACA400043C0F80008DEE0074B9
+:105040003C05800834AD0080004E8821ADB1000CD5
+:105050003C1F800837F9008002402021026028218F
+:10506000A320006B0E00070D3C1280008F980058A3
+:1050700034500006AE58014C0E0005503C13100091
+:10508000A24201528FBF0024AE5001548FB40020C1
+:10509000AE5301788FB100148FB3001C8FB200188B
+:1050A0008FB0001003E0000827BD002834C309803A
+:1050B000906F0008000F7600000E6E0305A000330D
+:1050C00034C209009059001B241F00103C01080045
+:1050D000A03F3BF0333800021300FF908F88005848
+:1050E0008F8300641468FF8E3C0380000E00005C18
+:1050F000000000003C0980083525008090A40009CC
+:1051000024070016308800FF1107000D0000000082
+:1051100090A600093C0C0800918C3BF0240A000882
+:1051200030C400FF358B00013C010800A02B3BF090
+:10513000108A002F240D000A108D00282402000C74
+:105140000E00005E000000000A0007FC8F88005877
+:105150000E000763004020210A00082E0000000016
+:105160003C0B8008356A00808D4800548CC9010CC6
+:105170001120FF66AF880058240600143C01080087
+:10518000A0263BF00A0007FB3C0C80009071000851
+:10519000241400023C010800A0343BF0323000200F
+:1051A0001200000B241400018F8800580A0007FC2D
+:1051B00024110008345F00808FE70038AC470004FA
+:1051C0008C430004AFE3003C0A0008073C02800067
+:1051D0008F8800580A0007FC24110004A0A20009CF
+:1051E0000E00005E000000000A0007FC8F880058D7
+:1051F000240200140A0008ADA0A2000927BDFFE8A0
+:10520000AFBF0014AFB000103C1080009202010943
+:10521000240500010E00070D304400FF3C1F8008EC
+:1052200093F8000E37E3008093F9000F906E00268C
+:1052300093E9000A332F00FF00186600000F6C008E
+:1052400031CB00FF018D5025000B3200014638257F
+:10525000312800FF3445600000E820252402FF814A
+:105260003C031000AE04014C8FBF0014AE05015486
+:10527000A2020152AE0301788FB0001003E00008D3
+:1052800027BD001827BDFFE8308400FFAFBF001026
+:105290000E00070D30A500FF344600403C0480009E
+:1052A0002405FF92AC860154A08501528F830058DB
+:1052B0008FBF00103C02100027BD0018AC83014CCA
+:1052C00003E00008AC82017827BDFFD8AFB2001818
+:1052D000AFB10014AFB00010AFBF0020AFB3001CDF
+:1052E0003C07800090E20109308600FF30B000FFEB
+:1052F000000618C232040002307100011480000759
+:10530000305200FF3C098008353300809268000568
+:105310003105000810A0000C30CA00100240202106
+:105320000E00074502202821240200018FBF002023
+:105330008FB3001C8FB200188FB100148FB0001013
+:1053400003E0000827BD00281540003034E50A00BE
+:105350008CB900248CB800081338004700004021A5
+:105360003C0E800835D30080926D0068240B00024B
+:1053700031AC00FF118B00803C068000927F004C16
+:1053800090C40109509F00043213007C1100006793
+:10539000000000003213007C1660005A02402021F9
+:1053A00016200008320C00013C07800034EB0A0094
+:1053B0008D6500248CE8010414A8FFDC0000102196
+:1053C000320C00011180000D024020213C108000B1
+:1053D0008E0E010C8F8D006811CD000800000000BA
+:1053E0000E0007E2022028218E0F010C3C188008D5
+:1053F00037100080AE0F0050024020210E0007340D
+:10540000022028210A000900240200013C070800AC
+:105410008CE7006424E600013C010800AC2600642F
+:105420001600000D00000000022028210E000734A5
+:1054300002402021926F0068240D000231EE00FF2F
+:1054400011CD0022024020210E0008B4000000000F
+:105450000A000900240200010E00003D240400019E
+:10546000926C0025020C58250E00005EA26B0025F0
+:105470000A000940022028218E6300188CE40104F0
+:105480008CBF002400031602149FFFB53045007F37
+:105490009269004C264400013093007F1265004061
+:1054A000312300FF1464FFAF3C0E80082648000142
+:1054B0003111007F310200FF1225000B240800018A
+:1054C000004090210A00090D241100012405000468
+:1054D0000E0006CF240600010E0008B400000000F4
+:1054E0000A000900240200012407FF800247282443
+:1054F00000A79026324200FF004090210A00090DCB
+:10550000241100010E0007E202202821320600309B
+:1055100010C0FFA332100082024020210E00074578
+:10552000022028210A000900240200018E630018CD
+:105530000240202102202821006610250E0008D6F6
+:10554000AE6200189264004C24050003240600019A
+:105550000E0006CF308400FF0E00003D2404000141
+:10556000926A0025020A48250E00005EA269002505
+:105570000A000900240200018E7800183C198000FE
+:105580000240202103197825022028210E0007342B
+:10559000AE6F00189264004C0A00098824050004CC
+:1055A0003246008038CA0080146AFF6E3C0E8008C4
+:1055B0000A0009612648000127BDFFC0AFB00018EE
+:1055C0003C108000AFBF0038AFB70034AFB600303A
+:1055D000AFB5002CAFB40028AFB30024AFB20020A9
+:1055E0000E00055EAFB1001C920401089205010B8C
+:1055F000308400FF0E0008E730A500FF144000D6FD
+:105600008FBF00383C09800835280080A100006B5E
+:105610003607098090E60000240200503C1708007D
+:1056200026F73DF430C300FF3C14080026943E04E6
+:10563000106200033C1080000000B8210000A0218F
+:10564000241F001036110A00361309808E1601043B
+:105650008F8D00588E38002436190A808E720020F3
+:105660003C010800A03F3BF0972C002C8EF5000079
+:10567000932B0018024D702302D878233C010800B8
+:10568000AC2F3BCC3C010800AC2E3BD03C010800C9
+:10569000AC2D3BF4A78C005C02A0F809317200FF2E
+:1056A000304A0002154000DA3045000110A000B475
+:1056B00000000000360509008E2B002490BF001169
+:1056C00090B9001290B6001133EF00FF333800FF9D
+:1056D00032CD00FF0018708001CF8021024D602183
+:1056E0000212A821258A00103C010800A4353BE8DD
+:1056F0003C010800AC2B3BF83C010800A42A3BE429
+:105700003C010800A4303BE60260B0213C1580005B
+:105710008F9200588F8400608ED3002024110006E1
+:1057200000923023027228233C010800AC313BEC8C
+:1057300004C000AF0000982104A000AD00C5102BEC
+:10574000104000AF000000003C010800AC263BD038
+:105750008E9000000200F8090000000030430002B3
+:105760001460006F004088213046000154C00011D1
+:105770008E9200043C0808008D083BD43C09C00010
+:105780003C04800001093825AEA70E008C8B000078
+:10579000316A00081140FFFD00000000948D0E08E2
+:1057A00024130001A78D00408C8C0E04AF8C0028C0
+:1057B0008E9200040240F8090000000002228825B1
+:1057C000322E000215C000A5000000003C180800A1
+:1057D00097183BDC3C12080096523BE83C19080045
+:1057E00097393BDE3C0708008CE73BD4031240218D
+:1057F0003C0B08008D6B3BF83C0E080095CE3BF24D
+:105800003C128000011978218E46010C00F86821B5
+:1058100025EC000201AE482101675021AF860068E7
+:105820003C010800AC2A3BF83C010800A4293BE0FD
+:105830003C010800A4283BEA0E0001C93184FFFFA7
+:105840000E000550004080213C010800A0223BF1E1
+:105850008E8200080040F809020020218F85005840
+:105860000E0005BF004020218E90000C0200F809B8
+:10587000004020213C03080094633BEA3C020800FE
+:1058800094423BDE00622021248500020E0001F2DA
+:1058900030A4FFFF3C1908008F393BCC3C1F0800A7
+:1058A0008FFF3BD4033FC0233C010800AC383BCC06
+:1058B00017000006000000003C0508008CA53BEC2A
+:1058C00034BF00403C010800AC3F3BEC126000429A
+:1058D0008F8200448E430E108F930044AE630020ED
+:1058E0008E440E18AE6400243C04080094843BE00F
+:1058F0000E000697000000008F8600588E8A001068
+:105900003C010800AC263BF40140F809000000000F
+:105910003C0908008D293BCC1520FF7E8F92005852
+:105920009796005C3C14800E323500100E0006C6BF
+:10593000A696002C56A000458EEB000432270040AE
+:1059400054E0001E8EF100088EEC000C0180F80976
+:10595000000000008FBF00388FB700348FB60030D2
+:105960008FB5002C8FB400288FB300248FB2002095
+:105970008FB1001C8FB0001803E0000827BD004065
+:10598000920901098F88003000093E0000E83025A7
+:10599000AE0600808E2300208E240024AFA30010CA
+:1059A000AE030E148FA20010AE020E10AE040E1C39
+:1059B000AE040E180A0009E3360509000220F809B2
+:1059C000000000008EEC000C0180F80900000000CF
+:1059D0000A000A8B8FBF0038240800012410000140
+:1059E000A4400020A44800220A000A6FAC50002402
+:1059F0003C010800AC203BD00A000A0A8E9000004F
+:105A00003C010800AC253BD00A000A0A8E90000039
+:105A100092110109000028210E000734322400FFF2
+:105A20008FBF00388FB700348FB600308FB5002C91
+:105A30008FB400288FB300248FB200208FB1001CD8
+:105A40008FB0001803E0000827BD00400160F8098E
+:105A5000000000000A000A85322700405260FFB1B2
+:105A60009796005C8EB60E148F940044AE9600207C
+:105A70008EAF0E1CAE8F00240A000A7E9796005C43
+:105A80008F8200000004218003E0000800821021C2
+:105A90003C07800834E20080904300690080402188
+:105AA000106000093C0401003C0708008CE73BF44F
+:105AB0008F83001C00E320230480000893890008E2
+:105AC00014E300030100202103E0000800801021FE
+:105AD0003C04010003E00008008010211120000BAD
+:105AE000006738233C0D800035AC0980918B007C29
+:105AF000316A0002114000202409003400E9702BB3
+:105B000015C0FFF10100202100E938232403FFFC28
+:105B100000A3C82400E3C02400F9782B15E0FFEAB5
+:105B20000308202130C400030004102314C0001413
+:105B3000304900030000302100A9782101E67021DE
+:105B400000EE682B11A0FFE03C0401002D3800019D
+:105B50000006C82B010548210319382414E0FFDA98
+:105B60002524FFFC2402FFFC00A218240068202149
+:105B700003E00008008010210A000AF42409003024
+:105B80003C0C80003586098090CB007C316A000493
+:105B90001540FFE9240600040A000B030000302131
+:105BA0003C0308008C63005C8F82000427BDFFE883
+:105BB000AFBF001410620005AFB00010000329C091
+:105BC00024A40280AF840000AF8300043C10800056
+:105BD00036030A00946500320E000AD530A43FFF58
+:105BE0008E0401003C180080370F00030082C8219A
+:105BF0002402FF80032260243329007F000CF94037
+:105C000003E94025332E00783C0D1000010D50258E
+:105C100001CF5825AE0C002836080980AE0C080CC0
+:105C2000AE0B082CAE0A0830910300693C06800CCC
+:105C30000126382110600006AF8700208D09003C46
+:105C40008D06006C0126382318E0007F000000005C
+:105C50003C0C8008358B00803C0A8000A160006904
+:105C6000355009808E0200383C06800034C50A0099
+:105C700090AD003C31A8002011000019AF82001C3B
+:105C8000240E00013C19800037300A00A38E000862
+:105C9000AF8000108E0400248F85001024180008A7
+:105CA000AF80000CAF8000143C010800A4383BDE3C
+:105CB0003C010800A4203BF20E000AD9000030216C
+:105CC000920F003C8FBF00148FB00010000F714284
+:105CD000AF82001827BD001803E0000831C20001A0
+:105CE00090B90032240F0001333800FF00182182E0
+:105CF000108F003F241F0002109F006234C20AC0B0
+:105D00003C03800034640A008C9900241720001D95
+:105D10003466090090830030241F00053062003F84
+:105D2000105F004C240500018F86000CA38500083D
+:105D3000AF860014AF8600103C19800037300A008F
+:105D40008E0400248F850010241800083C010800F0
+:105D5000A4383BDE3C010800A4203BF20E000AD927
+:105D600000000000920F003C8FBF00148FB00010A5
+:105D7000000F7142AF82001827BD001803E0000831
+:105D800031C200018C8800088C8D00248CCB00640B
+:105D90003C19800037300A00AF8B0010A380000848
+:105DA0008E0400248F86000C8F850010010D602367
+:105DB00024180008AF8C00143C010800A4383BDE16
+:105DC0003C010800A4203BF20E000AD900000000AC
+:105DD000920F003C8FBF00148FB00010000F714273
+:105DE000AF82001827BD001803E0000831C200018F
+:105DF00090A7003030E3003F5064002834C50AC04B
+:105E00008CAA00241540002234C809008CAB00483D
+:105E10003C0C7FFF3585FFFF016510243C18800096
+:105E2000AF82000C370509008F8E000C8CAF00602C
+:105E300001CF682B15A0000201C020218CA40060B6
+:105E40000A000B75AF84000C8D02006C0A000B5029
+:105E50003C0680008C8900488F86000C3C0A7FFF3E
+:105E60003550FFFF013038243C0480082405000130
+:105E7000AF870014AC80006CA38500080A000B8378
+:105E8000AF8600108C4400140A000B75AF84000C20
+:105E90008D0200680A000BBD3C18800034C40980E4
+:105EA0008C8600708CB0001400D0482B11200004A8
+:105EB000000000008C8200700A000BBD3C188000BE
+:105EC0008CA200140A000BBD3C1880008F850010C6
+:105ED00027BDFFE0AFBF0018AFB1001414A0000849
+:105EE000AFB000103C04800034870A0090E6003018
+:105EF0002402000530C3003F106200B7348409005B
+:105F00008F91000C00A080213C048000348E0A0098
+:105F10008DCD00043C0608008CC63BD031A73FFF66
+:105F200000E6602B5580000100E03021938F0008CF
+:105F300011E0007600D0102B349909809338007C52
+:105F400033040002108000772403003400C3F82BD0
+:105F500017E000D600C3302300D0102B3C0108000E
+:105F6000A4233BDC1440006D020018213C0408000F
+:105F70008C843BCC0064282B54A0000100602021BD
+:105F80003C05800034A90A009128003C3C0108002F
+:105F9000AC243BD4310300201460000200004821EF
+:105FA0008CA90E188F8800180128502B1140005F13
+:105FB000000000003C0508008CA53BD400A960212E
+:105FC000010C582B1160005C00B0682B01093823CC
+:105FD00000E028213C010800AC273BD4120000035C
+:105FE0002402FFFC10B0008C322A000300A2F82427
+:105FF0003C010800A4203BF23C010800AC3F3BD42C
+:1060000003E028218F840010120400063C0380085E
+:106010008C6A006C02002021AF91000C2550000119
+:10602000AC70006C8F8B001400858823AF9100103A
+:1060300001652023AF8400141220000224070018F9
+:10604000240700103C0E800835C6008090CD006803
+:10605000240C00013C010800A0273BF031A700FF01
+:1060600010EC0047000000001480001800002821F8
+:106070003C0B800091650109357109808E23001861
+:1060800030A500FF0003560224A300013146007F23
+:106090003070007F1206007E240CFF803C0F8008C9
+:1060A00035E90080A123004C3C0808008D083BEC3A
+:1060B000240E00023C010800A02E3C31350D0008E2
+:1060C0003C010800AC2D3BEC240500103C1F800077
+:1060D00037E40A009099003C333800201300000593
+:1060E00000A02021240200013C010800AC223BD486
+:1060F00034A400018FBF00188FB100148FB00010BE
+:106100000080102103E0000827BD00203C010800AA
+:10611000A4203BDC1040FF95020018210A000C105F
+:1061200000C018210A000C08240300303C050800B8
+:106130008CA53BD400B0682B11A0FFA80000000084
+:106140003C04080094843BDC0085782101E7702B37
+:1061500011C000072CA200043C1F60008FF95404FA
+:106160003338003F1700FFE3240400422CA2000450
+:106170001040FF9A240400420A000C738FBF0018DD
+:106180001528FFB9000000008CC200183C188000E0
+:10619000241900020058F825ACDF001837040A0063
+:1061A000A0D900689089003C240F000400A01021B1
+:1061B000312800203C010800A02F3C3111000002D2
+:1061C00024050010240200013C010800AC223BCC55
+:1061D0000A000C693C1F80008F8800148C890060C5
+:1061E0000109282B14A00002010088218C91006075
+:1061F0003C0B80008D640E18240A00010220282127
+:1062000002203021A38A00080E000AD90220802132
+:106210000A000BF7AF820018000A182312200007AB
+:10622000306400033C0D800035A7098090EC007CB1
+:10623000318B000415600019248E00043C01080015
+:10624000A4243BF23C18080097183BF203052021D8
+:1062500000C4782B11E0FF6C8F8400102CA6000581
+:1062600014C0FFA42404004230B900031720000228
+:1062700000B9182324A3FFFC3C010800AC233BD445
+:106280003C010800A4203BF20A000C3600602821E3
+:1062900000AC38240A000C5C00EC18263C01080015
+:1062A000A42E3BF20A000CC6000000003C010800CE
+:1062B000AC203BD40A000C72240400428F830014EB
+:1062C0003C0B8000356A0A001460000600001021B3
+:1062D000914600302405000530C400FF10850003FE
+:1062E0000000000003E000080000000091490048A1
+:1062F000312800FF000839C214E0FFFA3C0480088E
+:106300003C06080094C63BDC3C0308008C633BF46D
+:106310003C0508008CA53BD43C18080097183BF2BC
+:106320000066C8218C8E00040325782101F86821BD
+:1063300001AE60231980001D000000009158004C40
+:106340008F8D0020956E0E10330F00FF8DA9000475
+:1063500001CF30238DAA000030CFFFFF000F610076
+:10636000012C2821000038210147202100AC182BE6
+:106370000083C821ADA50004ADB9000091B8000AA2
+:1063800001F87021A1AE000A956C0E128F8A0020D0
+:10639000A54C00089549003825280001A54800387B
+:1063A0009147000D34EB0008A14B000D03E00008FD
+:1063B0000000000027BDFFD8AFB00018938F000881
+:1063C0008FB000143C087FFF8F8700103C0C8000CA
+:1063D0003518FFFFAFBF0020AFB1001C35990A0090
+:1063E00002181824932A003C000F5FC03C02BFFF34
+:1063F0002CF000013449FFFF006BF8253C08080031
+:106400008D083BF48F99001C3C18080097183BEA54
+:1064100003E9582400107F803C07EFFF3C05F0FFA4
+:10642000016F18253C1180003149002034E2FFFF44
+:1064300034ADFFFF362E098027A500102406000288
+:1064400001194023270A00020062182400808021DD
+:1064500015200002000058218D8B0E1CA7AA0012E7
+:106460000500003A2407000030EF00FF000F3F0056
+:10647000006740253C028008AFA80014344B008020
+:10648000916A00683C0F080091EF3BF13C09DFFF87
+:10649000353FFFFF000A602B3C02080094423BE4BA
+:1064A000A3AF0011011FC024000CCF400319182511
+:1064B0008FA70010AFA300143C1F080093FF3BF30D
+:1064C000A7A200168FA8001400ED48243C0B010081
+:1064D0003C0A0FFF012BC82533F80003354CFFFFA2
+:1064E000010D78243C027000032C382400181E0093
+:1064F00000E2482501E35825AFAB0014AFA9001016
+:1065000091DF007CA3BF00150E00007200000000A8
+:10651000362D0A0091A6003C30C4002010800006F1
+:10652000260200083C11080096313BE0262EFFFFB2
+:106530003C010800A42E3BE08FBF00208FB1001C5F
+:106540008FB0001803E0000827BD00288F8A0018CC
+:10655000016A602B5580FFC4240700010A000D501A
+:1065600030EF00FF938300083C02800027BDFFD876
+:1065700034480A0000805021AFBF002034460AC0D2
+:10658000010028211060000E34440980910700307A
+:10659000240B00058F89000C30EC003F118B000BA1
+:1065A00000003821AFA900103C0B80088D69006CF9
+:1065B000AFAA00180E00013AAFA90014A38000088A
+:1065C0008FBF002003E0000827BD00288D1F004872
+:1065D0003C1808008F183BD48F9900143C027FFFB1
+:1065E0008D0800443443FFFFAFA900103C0B800826
+:1065F0008D69006C03E370240319782101CF6823AF
+:1066000001A83821AFAA00180E00013AAFA9001462
+:106610000A000DA5A38000083C05800034A60A00EE
+:1066200090C7003C3C06080094C63BF23C020800C0
+:106630008C423BEC30E30020000624001060003167
+:10664000004448253C0880083505008090A3006878
+:1066500000006821240C000100005021240B0001DF
+:106660003C188000370F00708DE800003C07800068
+:10667000AF8800248CF901780720FFFE34E5007014
+:106680008CA200003C0308008C6300743C0F0800DF
+:106690008DEF007000482023006428210000C021F5
+:1066A00000A4302B01F8702101C640213C010800F4
+:1066B000AC2500743C010800AC280070ACEC01482B
+:1066C0003C0208008C423BF4A4EA0144A4EB0146DE
+:1066D000ACE2014C3C04080090843BF13C03800890
+:1066E000A0E40152ACE90154A4ED0158346D0080DE
+:1066F00091AC004C3C091000A0EC016D03E00008D7
+:10670000ACE901788CAC0E1C3C0B08008D6B3BD4C3
+:1067100094AA0E1694AE0E1401666821314BFFFF49
+:106720000A000DCD31CAFFFF3C04800034830A000B
+:106730009065003C30A200201040002B00000000BB
+:106740000000582100005021000048213C08800032
+:10675000350400708C8800003C078000AF8800245E
+:106760008CEC01780580FFFE34EE00708DCD0000CA
+:106770003C0508008CA500743C0408008C84007063
+:1067800001A8602300ACC02100001021030C302BB5
+:106790000082C821032678213C010800AC3800742F
+:1067A0003C010800AC2F0070ACEB01483C0E080027
+:1067B0008DCE3BF4240DFF91240B0040A4E901444D
+:1067C000A4EA0146ACEE014CA0ED0152ACEB015441
+:1067D000A4E0015890EA01093C091000A0EA016D0B
+:1067E00003E00008ACE901788C8B0E1894870E1238
+:1067F00094860E1030EAFFFF0A000E0830C9FFFF32
+:106800003C04800034830A009065003C30A20020E4
+:106810001040003927BDFFF8240C00010000502172
+:10682000240B00013C088000350400708C890000B6
+:106830003C088000AF8900248D0D017805A0FFFE83
+:10684000350E00708DC700003C0508008CA5007453
+:106850003C0408008C84007000E9682300ADC0216E
+:1068600000001021030D302B0082C821032678215F
+:106870003C010800AC3800743C010800AC2F0070EB
+:10688000910901093C0E080091CE3C313C0380FF88
+:10689000A3A900038FAD000031C7007F3462FFFF62
+:1068A00001A82025AFA400009106010AA3A00002C0
+:1068B0000007CE00A3A600018FA50000240E300023
+:1068C0003C09100000A2C02403197825AD0F014C2B
+:1068D00027BD0008AD0E0154A5000158AD0C0148BC
+:1068E000A50A0144240AFF80A50B0146A10A015212
+:1068F00003E00008AD0901788C8C0E1894870E1205
+:1069000094860E1030EBFFFF0A000E3E30CAFFFFE8
+:1069100027BDFFE8AFB000103C108000AFBF0014EF
+:1069200036180A00970F00320E000AD531E43FFFF7
+:106930008E0E0100240DFF803C04200001C258216E
+:10694000016D6024000C4940316A007F012A402516
+:10695000010438253C048008AE07083034860080E6
+:1069600090C500682403000230A200FF1043000419
+:106970008F9F000C8F990010AC9F0068AC99006449
+:106980008FBF00148FB0001003E0000827BD00186F
+:106990003C0A0800254A37FC3C090800252938D460
+:1069A0003C08080025082C743C07080024E739E45B
+:1069B0003C06080024C636383C05080024A5339060
+:1069C0003C04080024842FA03C030800246336EC18
+:1069D0003C020800244234883C010800AC2A3DFCFB
+:1069E0003C010800AC293DF83C010800AC283DF40E
+:1069F0003C010800AC273E003C010800AC263E10DC
+:106A00003C010800AC253E083C010800AC243E04D3
+:106A10003C010800AC233E143C010800AC223E0CB3
+:086A200003E000080000000083
+:086A2800800009408000090014
+:106A3000800801008008008080080000800E0000AF
+:106A4000800800808008000080000A8080000A0022
+:086A50008000098080000900AC
+:00000001FF
+/*
+ * This file contains firmware data derived from proprietary unpublished
+ * source code, Copyright (c) 2004 - 2009 Broadcom Corporation.
+ *
+ * Permission is hereby granted for the distribution of this firmware data
+ * in hexadecimal or equivalent format, provided this copyright notice is
+ * accompanying it.
+ */
diff --git a/firmware/bnx2/bnx2-rv2p-06-4.6.16.fw.ihex b/firmware/bnx2/bnx2-rv2p-06-4.6.16.fw.ihex
new file mode 100644 (file)
index 0000000..871de9e
--- /dev/null
@@ -0,0 +1,441 @@
+:100000000000000000000CA00000005800000000EC
+:1000100000000000000000000000000000000000E0
+:1000200000000000000000000000000000000000D0
+:1000300000000DE000000CF80000000500000000CA
+:1000400000000000000000000000000000000000B0
+:080050000000000000000000A8
+:0800580000000010B18000025D
+:100060000000001F0103010000000008AC000001B7
+:1000700000000000050000000000000C2F800001BF
+:10008000000000002B000000000000002B8000009A
+:1000900000000010203F006300000010213F00031B
+:1000A0000000001020BF0032000000188000FFFD9B
+:1000B00000000010B1B8B00D0000000B2FDF0002EF
+:1000C0000000000003D80000000000002C380000F1
+:1000D0000000001091D400000000000806005555F3
+:1000E0000000001880000075000000188000010B5F
+:1000F00000000008020000020000000F42E0001CA7
+:100100000000001091840A11000000102C62000B06
+:10011000000000188000001E00000008020000021D
+:100120000000000F42E0001C0000001091840A183B
+:10013000000000082C8000B1000000082D0000091C
+:100140000000001091D40000000000082D8001077D
+:10015000000000188000006F0000001880000015EB
+:1001600000000008B1000001000000082C8000B071
+:10017000000000082D000008000000082D8000018C
+:1001800000000018800000690000000B2FDF000253
+:100190000000000C1F800002000000002C0700007F
+:1001A0000000001091DE00000000000005000000CB
+:1001B000000000188000FFDC0000000B2FDF0002B1
+:1001C0000000000C1F800000000000002C07000051
+:1001D0000000001091DE000000000000050000009B
+:1001E000000000188000FFD60000000C1F800002F5
+:1001F0000000000005000000000000188000FFD390
+:100200000000000C298000020000000C1F8000028A
+:10021000000000002ADF0000000000082A0000059E
+:100220000000000805005555000000188000FFCDB3
+:10023000000000080224003C000000180004000038
+:10024000000000188000001C000000188000001E44
+:100250000000001880000052000000188000009E7E
+:10026000000000188000009D0000001880000000C1
+:10027000000000188000000000000018800000004E
+:10028000000000188000000000000018800000003E
+:10029000000000188000000000000018800000002E
+:1002A000000000188000000000000018800000DF3F
+:1002B000000000188000000000000018800000000E
+:1002C0000000001880000015000000188000001BCE
+:1002D000000000188000000000000018800000B43A
+:1002E000000000188000002E00000018800000DFD1
+:1002F000000000188000010A00000018800000D5EE
+:10030000000000188000012E000000188000003B53
+:10031000000000188000000000000018800000713C
+:100320000000000C1F80000100000000050000001C
+:10033000000000188000FFAC0000001091D4000005
+:100340000000000C298000010000000C1F8000014B
+:10035000000000082A000002000000000500000064
+:10036000000000188000FFA60000001091D40000DB
+:100370000000000C298000010000000C1F8000011B
+:100380000000000029420000000000082A000002CE
+:100390000000000005000000000000188000FF9F22
+:1003A000000000188000FF9E00000010B1BCB00AE1
+:1003B0000000000B2FDF00020000000003D8000047
+:1003C000000000002C3C00000000001091D4000050
+:1003D00000000008060055550000001880000016B7
+:1003E00000000018800000AC000000102C6201BA70
+:1003F0000000001880000005000000082C8000B1FB
+:10040000000000082D0000090000001091D4000039
+:10041000000000082D8001070000000C298000006A
+:100420000000000C1F8000000000001091DE0000A2
+:10043000000000002ADF0000000000082A0000067B
+:100440000000000805005555000000188000FF89D5
+:100450000000001091D400000000000C2980000171
+:100460000000000C1F800001000000082A00000BA3
+:100470000000000005000000000000188000FF835D
+:1004800000000018000200000000000006820000CA
+:1004900000000010B18A000600000000860C140065
+:1004A00000000010B18C00040000000005000000F6
+:1004B000000000082A0000010000001091D4000094
+:1004C00000000018000D0000000000000502000000
+:1004D0000000001091DE000000000018000A00007B
+:1004E00000000010B1A0B0130000000B2FDF0002CD
+:1004F000000000002C200000000000082C800000FC
+:10050000000000082D0000000000001091D4000041
+:100510000000000806005555000000188000FFEE9E
+:10052000000000082D80011C00000010001F0000CA
+:100530000000001091DE00000000000F476000087E
+:100540000000000F060E0001000000000F58000020
+:10055000000000000A640000000000000AE500003E
+:10056000000000090B66FFFF000000000D610000A5
+:1005700000000018800000130000000F4760000812
+:100580000000000B2FDF0002000000082C8000009C
+:10059000000000082D0000000000001091D40000B1
+:1005A000000000082D80011C0000000F060E000155
+:1005B00000000010001F0000000000000F580000A5
+:1005C0000000001091DE0000000000000A6400003E
+:1005D000000000000AE50000000000090B66FFFFB4
+:1005E000000000000D610000000000000262000039
+:1005F0000000000B2FDF00020000000031040000AB
+:1006000000000000309A0000000000000C96180066
+:10061000000000090C99FFFF00000004CC99340091
+:1006200000000010B1963202000000080F800000A8
+:100630000000000C298000010000001000220002D0
+:100640000000000C295200010000000C295200009B
+:10065000000000080200000E000000080280001ADE
+:1006600000000010B1C40A020000000802000003EC
+:1006700000000008220000010000000C1F800001A3
+:10068000000000002ADF0000000000002A0008002F
+:100690000000000805005555000000188000FF3FCD
+:1006A0000000000B2FDF00020000001091D40000BA
+:1006B000000000082A000001000000002C200000BB
+:1006C000000000082C800000000000082D00000041
+:1006D000000000082D80011C0000001091D40000D3
+:1006E0000000001091DE0000000000082C800006D1
+:1006F000000000082D00000600000000308000000F
+:100700000000000031000000000000082D800006FD
+:100710000000000C298000010000000C1F80000177
+:100720000000001091DE0000000000002ADF000041
+:10073000000000082A000010000000000500000072
+:10074000000000188000FF2A0000001091A0B009EE
+:10075000000000082C8000B1000000082D000009F6
+:100760000000001091D40000000000082D80010757
+:10077000000000188000FFAB00000018800000108F
+:1007800000000008AC000001000000188000000B11
+:10079000000000000380B0000000000B2FDF00020B
+:1007A000000000002C0040000000001091D4000068
+:1007B0000000000806005555000000188000FF9A50
+:1007C00000000018800000300000001880000006C3
+:1007D0000000000B2FDF0002000000002C000E00C4
+:1007E000000000082A000007000000080500555519
+:1007F000000000188000FF140000000006820000C6
+:100800000000000C298000010000000C1F80000186
+:10081000000000100CE70007000000090562FFFF60
+:1008200000000010BA6C1405000000002ADF000070
+:100830000000000021000000000000082A00000560
+:100840000000001091D40000000000082C8000B0CF
+:10085000000000082D0000080000000C31620018A4
+:10086000000000082D800001000000188000FF8CAF
+:1008700000000018000D000000000010B1A0B00E34
+:100880000000000B2FDF00020000000003D8000072
+:10089000000000002C2000000000001091D4000097
+:1008A0000000001880000014000000102C620002FC
+:1008B000000000188000000B0000000B2FDF00027A
+:1008C000000000002C0700000000000C1F80000149
+:1008D0000000001091DE0000000000000500000094
+:1008E000000000188000FEF6000000082C8000B117
+:1008F000000000082D0000090000001091D4000045
+:10090000000000082D8001070000000C2980000174
+:100910000000000C1F8000010000001091DE0000AC
+:10092000000000002ADF0000000000082A00000A82
+:100930000000000005000000000000188000FEEB31
+:100940000000000005020000000000082C8000B03C
+:10095000000000082D000008000000082D80015054
+:10096000000000000000000000000010205F0000F8
+:10097000000000082C800000000000082D0000008E
+:10098000000000082D8001080000000000000000A9
+:100990000000001091DE000000000018000A0000B6
+:1009A0000000001091D40000000000080600AAAA70
+:1009B000000000188000FF5B0000000C298000018F
+:1009C0000000000C1F800001000000082A00000940
+:1009D000000000080500AAAA000000188000FED749
+:1009E0000000001091D400000000000806005555DA
+:1009F000000000188000FF530000001091A03C028E
+:100A000000000010B1E662070000000B2FDF0002BB
+:100A1000000000002C310000000000092CB1007F14
+:100A2000000000082CD90000000000082D00000084
+:100A3000000000082D80010D00000010B1A8000684
+:100A400000000010205F0000000000002C200000CB
+:100A5000000000002CA70000000000082D0000107E
+:100A6000000000082D800108000000188000FF4CE5
+:100A700000000010B1A6001000000010001F0000D0
+:100A80000000000F0F300007000000000A600000A7
+:100A9000000000000AE100000000000F4B620008A7
+:100AA000000000090B1600FF000000000D620000AE
+:100AB000000000090D1A00FF0000001007300003BD
+:100AC0000000000C0D1A00080000000C0B160008B6
+:100AD0000000000F4CE30018000000000C992C00EF
+:100AE00000000004CC993400000000080F800000D2
+:100AF0000000000C298000010000000033310000DC
+:100B00000000000822000016000000002ADF00009C
+:100B1000000000082A00000C00000010009F0000E8
+:100B2000000000000F2000000000000C1F800001EA
+:100B30000000000805005555000000188000FEABBD
+:100B40000000001091D40000000000080600AAAACE
+:100B5000000000188000FF270000000F4722000857
+:100B600000000009070E000F00000008070E000833
+:100B700000000008028000010000000702851C0040
+:100B800000000008828500010000000002854C0082
+:100B90000000000742851C0000000003C3AA5200A9
+:100BA0000000000003B10E00000000074B071C000E
+:100BB0000000000F0F3000070000000F0A9600032E
+:100BC000000000000A955C00000000004A005A0086
+:100BD000000000000C960A00000000090C99FFFFBD
+:100BE000000000080D00FFFF00000010B196320267
+:100BF000000000080F80000500000010B1A80008E8
+:100C000000000010205F00000000000B2FDF00023A
+:100C1000000000002C200000000000002CA70000B5
+:100C2000000000082D000010000000082D800108C1
+:100C3000000000188000FF130000000C2980000154
+:100C400000000010001F00000000000C1F800001C9
+:100C5000000000002ADF0000000000082A00000D4C
+:100C6000000000080500AAAA000000188000FE8508
+:100C70000000001091D40000000000080600555547
+:100C8000000000188000FF010000000C2980000116
+:100C90000000000C1F800001000000082A0000076F
+:100CA0000000000805005555000000188000FE7D7A
+:100CB00000000008030500040000000683040C0087
+:100CC00000000008028502000000000086050C00FC
+:100CD00000000001860C0E00000000080204000461
+:100CE00000000000020418000000000083871800C4
+:080CF0000000001800020000E2
+:080CF80000000010B1800004AF
+:100D00000000001F0103010000000008050000FFB3
+:100D10000000001800020000000000002A0000008F
+:100D200000000010B1D400000000000C2980000178
+:100D30000000000802540008000000180004000031
+:100D40000000001880000010000000188000001152
+:100D5000000000188000003A000000188000010424
+:100D6000000000188000010300000018800001024C
+:100D70000000001880000102000000188000000040
+:100D8000000000188000011400000018800000FE20
+:100D9000000000188000000C0000001880000118FE
+:100DA000000000188000016A000000188000006741
+:100DB00000000018800000DA00000018800000E742
+:100DC000000000002A000000000000188000FFEB77
+:100DD000000000002A0000000000000C2980000034
+:100DE0000000001020530000000000188000FFE702
+:100DF000000000002A000000000000188000FFE54D
+:100E000000000018000200000000000005020000C1
+:100E1000000000109196342100000010205F0000B7
+:100E2000000000002C1E0000000000082C800006BE
+:100E3000000000082D000006000000082D800102BF
+:100E400000000000000000000000001091DE000023
+:100E5000000000000D61000000000018000A000002
+:100E600000000000050200000000001091963416FA
+:100E700000000010205F00000000000009D8000002
+:100E8000000000002C1E0000000000082C8000B2B2
+:100E9000000000082D00000A000000082D8001025B
+:100EA00000000000000000000000001091DE0000C3
+:100EB000000000000D620000000000002C13000084
+:100EC00000000018000A00000000000005020000F9
+:100ED000000000109196340900000010205F00000F
+:100EE000000000002C1E0000000000082C800006FE
+:100EF000000000082D00006A000000082D8001029B
+:100F000000000000000000000000001091DE000062
+:100F1000000000000D7A000000000018000A000028
+:100F20000000001091DE000000000010001F000013
+:100F3000000000002F80AA00000000002A0000002E
+:100F4000000000000D6100000000000003620000CE
+:100F5000000000002C4000000000000002638C0034
+:100F600000000000264600000000000802040012F5
+:100F700000000010B9060827000000000F5800000C
+:100F8000000000000A640000000000000AE5000004
+:100F9000000000090B66FFFF000000000C000000CD
+:100FA000000000000B800000000000080CC60012CA
+:100FB000000000188000FFCB000000080F80000335
+:100FC000000000000000000000000010009F000072
+:100FD00000000008271100120000000066900000C9
+:100FE00000000008A31B001200000010B1980003CD
+:100FF00000000010001F0000000000080F80000427
+:101000000000000822000003000000082C80000CF3
+:10101000000000082D00000C00000010009F0000E0
+:1010200000000000259600000000000C2980000050
+:101030000000000006660000000000008661180045
+:10104000000000090260000F0000000F020400020F
+:1010500000000010B60C08030000000C1FBF0000C9
+:101060000000000C33660010000000003214000085
+:1010700000000000329500000000000573662C009F
+:101080000000000031E32E00000000082D80001059
+:1010900000000010205300000000001091DE00004E
+:1010A000000000188000FF900000000023000000F6
+:1010B0000000000925E6FFFF000000082200000BE9
+:1010C0000000000C695200000000000C29800000A4
+:1010D0000000001020530000000000188000FF896D
+:1010E0000000001091DE000000000010001F000052
+:1010F000000000002F80AA00000000002A0000006D
+:10110000000000002C400000000000082C8000407F
+:10111000000000082D000020000000082D80011CA8
+:1011200000000000000000000000001091DE000040
+:101130000000000F42EA001000000010004F000401
+:1011400000000010B746920000000008024900129B
+:1011500000000010B5840A00000000000D610000CE
+:1011600000000010BA66345A00000000036200005C
+:1011700000000010B8630C5800000008830500123E
+:1011800000000010004F00020000000003490000B2
+:101190000000000183068C000000000083C60C00E4
+:1011A00000000010B1870010000000000B6E00006E
+:1011B000000000188000FF6B0000000106691400A9
+:1011C00000000010918C000200000008B4E900014A
+:1011D00000000010B1E92C4C0000000086692C00D2
+:1011E00000000000020000000000000902EAFFFF0A
+:1011F00000000010000C00020000000002040A00C1
+:101200000000000F460C00010000000F02850001E5
+:1012100000000010918C01FC00000010B7040E4388
+:10122000000000002C400000000000000F40000003
+:10123000000000000D610000000000000A640000D2
+:10124000000000000AE50000000000090B66FFFF37
+:10125000000000000C000000000000000B800000F7
+:10126000000000080C860012000000080F80000338
+:101270000000000C2952000000000010009F000038
+:101280000000000827110012000000006690000016
+:1012900000000000264600000000000023060000B9
+:1012A00000000010B198000500000010001F0000B1
+:1012B000000000080F800004000000000000000093
+:1012C00000000010001F00000000000032140000A9
+:1012D00000000000329500000000000031E32E0005
+:1012E0000000000573662C00000000002596000039
+:1012F00000000010B18700160000000C29800000DB
+:101300000000000F0F6B0007000000000D690000D7
+:10131000000000000A6C0000000000000AED000060
+:10132000000000000B6E0000000000000B800000B9
+:10133000000000000C870000000000080F80000380
+:1013400000000010205300000000000C6952000152
+:1013500000000010001F00000000000022C58C00EB
+:1013600000000000231B0000000000002711000007
+:10137000000000002690000000000010B8170E03C7
+:101380000000000C29800000000000188000FFF61B
+:1013900000000010B1980002000000080F80000457
+:1013A000000000082200001A000000082C80000C39
+:1013B000000000082D00000C000000082D80001027
+:1013C00000000010001F0000000000000D6E000073
+:1013D00000000003E7CF34000000000C298000006B
+:1013E0000000001091DE000000000010B18700072F
+:1013F00000000000361400000000000036950000D8
+:101400000000000037160000000000082C8000508B
+:10141000000000082D000030000000082D80000CA6
+:101420000000001020530000000000188000FF1F83
+:10143000000000002646000000000000230000001D
+:101440000000000925E6FFFF000000000B6E000011
+:1014500000000003E7CF2C00000000082200001B62
+:101460000000000C695200000000000C2980000000
+:101470000000001020530000000000188000FF153D
+:10148000000000002FD50000000000002A0000002E
+:1014900000000010003F000B000000000666000086
+:1014A000000000008661180000000009026000F0E2
+:1014B00000000010B70C08070000000C7366001055
+:1014C000000000082C800018000000082D00001803
+:1014D000000000082D8000020000000C5FBF00002B
+:1014E0000000001091DE0000000000188000FF07DF
+:1014F000000000002FD50000000000002A000000BE
+:10150000000000002C4000000000000C29800000BA
+:101510000000001091DE0000000000082C80001A7E
+:10152000000000082D00001A000000003300000039
+:10153000000000082D800002000000003180000043
+:101540000000001091DE0000000000082C80000C5C
+:10155000000000082D00000C000000082D80000491
+:1015600000000010205300000000001091DE000079
+:10157000000000188000FEF6000000188000FEF554
+:10158000000000002A00000000000010001F000002
+:10159000000000000F008000000000080F8000071E
+:1015A0000000001880000014000000000502000088
+:1015B000000000082200000900000000286D000063
+:1015C00000000000290000000000000F6568001006
+:1015D00000000003F66C940000000010B972A00433
+:1015E0000000000C73E700190000000C2142000409
+:1015F000000000003BF600000000000C2980000005
+:101600000000001020530000000000082200000825
+:101610000000000C6142000400000018000A0000F5
+:10162000000000002A00000000000010001F000061
+:101630000000000F0F470007000000080F8000089F
+:101640000000000C29800000000000102053000062
+:10165000000000188000FEDA0000001091DE00009B
+:10166000000000002FD5000000000010001F000047
+:101670000000000033510000000000002A000000BC
+:1016800000000010B1C600230000000F0F5000073B
+:10169000000000000A600000000000000AE10000F5
+:1016A0000000000F4B620008000000090B1600FF4D
+:1016B0000000000F4C620010000000000D620000EE
+:1016C000000000090D1A00FF000000100750000381
+:1016D0000000000C0D1A00080000000C0B1600089A
+:1016E000000000000CC60000000000000B8000009D
+:1016F0000000000006980000000000080F800003B2
+:101700000000001006C200040000000C29000002C6
+:1017100000000010264200020000000C29520003C5
+:10172000000000082200000100000010009F0000DF
+:1017300000000000231B00000000000027111A0019
+:1017400000000000669000000000000C295200001C
+:1017500000000010B19732090000000C2980000041
+:101760000000000006980000000000102053000058
+:101770000000000C295200030000000022C58C006C
+:1017800000000010001F0000000000080F80000390
+:10179000000000188000FFF300000010B1C8001323
+:1017A00000000010B1C600030000000C29800000FA
+:1017B00000000010205300000000000C295200001F
+:1017C0000000000C295200030000001006C20002B5
+:1017D0000000000C295200020000000022C58C000D
+:1017E00000000000276500000000000026E4000063
+:1017F000000000082200001600000010B1C600031F
+:10180000000000002348000000000010B180000527
+:1018100000000000234800000000000C29800000A8
+:101820000000000F0F500007000000188000001299
+:1018300000000008220000160000000C29800000B3
+:10184000000000003014000000000000309500008F
+:101850000000001007500003000000090B1600FFF5
+:10186000000000090D1A00FF0000000F31160008EB
+:10187000000000003162340000000003F16230001B
+:1018800000000010205F0000000000002C5100004C
+:10189000000000092CD1007F000000082CD90000B6
+:1018A000000000082D000000000000082D80000C42
+:1018B00000000000000000000000001091DE0000A9
+:1018C0000000001005C2000300000000330000000B
+:1018D000000000080F8000070000001020530000E7
+:1018E00000000010009F0000000000188000FE872C
+:1018F000000000002FD50000000000002A000000BA
+:101900000000000F0F50000700000010B1C6002DAE
+:101910000000000F4742000800000009070E000FFA
+:1019200000000008070E000800000010001F000063
+:1019300000000008090000010000000709121C0057
+:1019400000000003CBCA9200000000000B97A20029
+:101950000000000742171C00000000000B040000FC
+:101960000000000F0A840003000000000A959C009C
+:10197000000000004A009A000000000882120001E6
+:10198000000000010C170800000000000C978C00FC
+:101990000000000002180000000000080D00FFFF1A
+:1019A000000000080F8000060000000C2900000065
+:1019B0000000001006C200040000000C29520002C2
+:1019C00000000010264200020000000C2952000313
+:1019D000000000082200000100000010009F00002D
+:1019E00000000010B197320C00000000231B000023
+:1019F00000000000271108000000000066900000B1
+:101A00000000000C29800000000000000218000007
+:101A100000000010205300000000000C29520003B9
+:101A20000000000022C5360000000010001F00006A
+:101A3000000000080F800006000000188000FFF47E
+:101A400000000000231B0000000000002711080018
+:101A5000000000006690000000000010B1C8000BFC
+:101A60000000000C2980000000000010205300003E
+:101A70000000000C295200000000000C2952000355
+:101A80000000001006C200020000000C29520002F3
+:101A90000000000022C58C00000000002765000047
+:101AA0000000000026E400000000000023480000C1
+:101AB00000000008220000170000000C2980000030
+:101AC00000000010001F0000000000102053000064
+:081AD000000000188000FE4A2E
+:00000001FF
+/*
+ * This file contains firmware data derived from proprietary unpublished
+ * source code, Copyright (c) 2004 - 2009 Broadcom Corporation.
+ *
+ * Permission is hereby granted for the distribution of this firmware data
+ * in hexadecimal or equivalent format, provided this copyright notice is
+ * accompanying it.
+ */
diff --git a/firmware/bnx2/bnx2-rv2p-09-4.6.15.fw.ihex b/firmware/bnx2/bnx2-rv2p-09-4.6.15.fw.ihex
new file mode 100644 (file)
index 0000000..63995bb
--- /dev/null
@@ -0,0 +1,490 @@
+:100000000000000000000D88000000580000000003
+:1000100000000000000000000000000000000000E0
+:1000200000000000000000000000000000000000D0
+:100030000000101800000DE00000000500000000A6
+:1000400000000000000000000000000000000000B0
+:080050000000000000000000A8
+:0800580000000010B18000025D
+:100060000000001F0303010000000008AC000001B5
+:1000700000000000050000000000000C2F800001BF
+:10008000000000002B000000000000002B8000009A
+:1000900000000010203F006C00000010213F000312
+:1000A0000000001020BF003B000000188000FFFD92
+:1000B00000000010B1B8B0150000000B2FDF0002E7
+:1000C0000000000003D80000000000002C380000F1
+:1000D000000000082C800000000000082D00000037
+:1000E0000000001091D400000000000806005555E3
+:1000F000000000188000008F000000082D80011C07
+:1001000000000008020000010000001091DE000065
+:100110000000000F42E0001C0000001091840A174C
+:1001200000000010086600160000000C2980000284
+:100130000000000C1F800002000000002ADF000009
+:10014000000000082A00000F0000000805005555B7
+:10015000000000188000FFE8000000080200000115
+:100160000000000F42E0001C0000001091840A19FA
+:10017000000000082C800006000000082D0000068A
+:100180000000001091D40000000000082D8001063E
+:1001900000000018800000830000001008660013B3
+:1001A000000000188000FFF100000008B10000010D
+:1001B000000000082C80010C000000082D00000841
+:1001C000000000082D800001000000188000007C65
+:1001D0000000000B2FDF00020000000C1F80000257
+:1001E000000000002C0700000000001091DE00005D
+:1001F0000000000005000000000000188000FFD390
+:100200000000000B2FDF00020000000C1F80000028
+:10021000000000002C0700000000001091DE00002C
+:100220000000000005000000000000188000FFCD65
+:100230000000000C1F80000200000000050000000C
+:10024000000000188000FFCA0000000C2980000296
+:100250000000000C1F800002000000002ADF0000E8
+:10026000000000082A0000050000000805005555A0
+:10027000000000188000FFC40000000802240045B0
+:100280000000001800040000000000188000001C9E
+:10029000000000188000001E0000001880000065AB
+:1002A00000000018800000AD00000018800000ACC5
+:1002B000000000188000000000000018800000000E
+:1002C00000000018800000000000001880000000FE
+:1002D00000000018800000000000001880000000EE
+:1002E00000000018800000000000001880000000DE
+:1002F00000000018800000F30000001880000000DB
+:1003000000000018800000000000001880000015A8
+:10031000000000188000001B000000188000000092
+:1003200000000018800000C3000000188000002EAC
+:1003300000000018800000F3000000188000011E7B
+:1003400000000018800000E9000000188000014251
+:10035000000000188000004E00000018800000001F
+:1003600000000018800000800000000C1F800001C9
+:100370000000000005000000000000188000FFA33E
+:100380000000001091D400000000000C2980000142
+:100390000000000C1F800001000000082A0000027D
+:1003A0000000000005000000000000188000FF9D14
+:1003B0000000001091D400000000000C2980000112
+:1003C0000000000C1F800001000000002942000016
+:1003D000000000082A0000020000000005000000E4
+:1003E000000000188000FF96000000188000FF95B4
+:1003F00000000010B1BCB00A0000000B2FDF0002AB
+:100400000000000003D80000000000002C3C0000A9
+:100410000000001091D400000000000806005555AF
+:10042000000000188000002900000018800000BBB8
+:10043000000000102C6201BA0000001880000005C6
+:10044000000000082C80010D000000082D000009AC
+:100450000000001091D40000000000082D8001076A
+:100460000000000C298000000000000C1F8000002C
+:100470000000001091DE0000000000002ADF0000F4
+:10048000000000082A00000600000008050055557D
+:10049000000000188000FF800000001091D40000D0
+:1004A0000000000C298000010000000C1F800001EA
+:1004B000000000082A00000B0000000005000000FA
+:1004C000000000188000FF7A000000000202000017
+:1004D00000000000029A000000000000060C2C0042
+:1004E00000000004C60C340000000010001F0000D3
+:1004F00000000010B196180C0000000806960004D9
+:1005000000000009068DFFFC00000004CD051A0064
+:1005100000000004CC9A18000000001020D7000052
+:100520000000000C2B56000000000000000000003E
+:1005300000000000000000000000001020D70000B4
+:10054000000000080F80000100000010B18001F4DD
+:1005500000000010001F00000000000C6B5600009F
+:1005600000000018000400000000000006820000E7
+:1005700000000010B18A000600000000860C140084
+:1005800000000010B18C0004000000000500000015
+:10059000000000082A0000010000001091D40000B3
+:1005A00000000018000D000000000000050200001F
+:1005B0000000001091DE000000000018000A00009A
+:1005C00000000010B1A0B0130000000B2FDF0002EC
+:1005D000000000002C200000000000082C8000001B
+:1005E000000000082D0000000000001091D4000061
+:1005F0000000000806005555000000188000FFEEBE
+:10060000000000082D80011C00000010001F0000E9
+:100610000000001091DE00000000000F476000089D
+:100620000000000F060E0001000000000F5800003F
+:10063000000000000A640000000000000AE500005D
+:10064000000000090B66FFFF000000000D610000C4
+:1006500000000018800000130000000F4760000831
+:100660000000000B2FDF0002000000082C800000BB
+:10067000000000082D0000000000001091D40000D0
+:10068000000000082D80011C0000000F060E000174
+:1006900000000010001F0000000000000F580000C4
+:1006A0000000001091DE0000000000000A6400005D
+:1006B000000000000AE50000000000090B66FFFFD3
+:1006C000000000000D610000000000000262000058
+:1006D0000000000B2FDF00020000000031040000CA
+:1006E00000000000309A0000000000188000FFBCED
+:1006F0000000000C29800001000000100022000210
+:100700000000000C295200010000000C29520000DA
+:10071000000000080200000E000000080280001A1D
+:1007200000000010B1C40A0200000008020000032B
+:1007300000000008220000010000000C1F800001E2
+:10074000000000002ADF0000000000002A0008006E
+:100750000000000805005555000000188000FF2724
+:100760000000000B2FDF00020000001091D40000F9
+:10077000000000082A000001000000002C200000FA
+:10078000000000082C800000000000082D00000080
+:10079000000000082D80011C0000001091D4000012
+:1007A0000000001091DE0000000000082C80000610
+:1007B000000000082D00000600000000308000004E
+:1007C0000000000031000000000000082D8000063D
+:1007D0000000000C298000010000000C1F800001B7
+:1007E0000000001091DE0000000000002ADF000081
+:1007F000000000082A0000100000000005000000B2
+:10080000000000188000FF120000001091A0B00945
+:10081000000000082C80010D000000082D000009D8
+:100820000000001091D40000000000082D80010796
+:10083000000000188000FFAF0000001880000010CA
+:1008400000000008AC000001000000188000000B50
+:10085000000000000380B0000000000B2FDF00024A
+:10086000000000002C0040000000001091D40000A7
+:100870000000000806005555000000188000FF9E8B
+:100880000000001880000030000000188000000602
+:100890000000000B2FDF0002000000002C000E0003
+:1008A000000000082A000007000000080500555558
+:1008B000000000188000FEFC00000000068200001E
+:1008C0000000000C298000010000000C1F800001C6
+:1008D000000000100CE70007000000090562FFFFA0
+:1008E00000000010BA6C1405000000002ADF0000B0
+:1008F0000000000021000000000000082A000005A0
+:100900000000001091D40000000000082C80010CB1
+:10091000000000082D0000080000000C31620018E3
+:10092000000000082D800001000000188000FF90EA
+:1009300000000018000D000000000010B1A0B00E73
+:100940000000000B2FDF00020000000003D80000B1
+:10095000000000002C2000000000001091D40000D6
+:100960000000001880000014000000102C6200023B
+:10097000000000188000000B0000000B2FDF0002B9
+:10098000000000002C0700000000000C1F80000188
+:100990000000001091DE00000000000005000000D3
+:1009A000000000188000FEDE000000082C80010D11
+:1009B000000000082D0000090000001091D4000084
+:1009C000000000082D8001070000000C29800001B4
+:1009D0000000000C1F8000010000001091DE0000EC
+:1009E000000000002ADF0000000000082A00000AC2
+:1009F0000000000005000000000000188000FED389
+:100A00000000000005020000000000082C80010C1E
+:100A1000000000082D000008000000082D800134AF
+:100A2000000000000000000000000010205F000037
+:100A3000000000082C800140000000082D00003C50
+:100A4000000000082D80011C0000000000000000D4
+:100A500000000010205F0000000000082C800080D3
+:100A6000000000082D000000000000082D80010893
+:100A700000000000000000000000001091DE0000F7
+:100A800000000018000A00000000001091D40000CF
+:100A9000000000080600AAAA000000188000FF5A03
+:100AA0000000000C298000010000000C1F800001E4
+:100AB000000000082A000009000000080500AAAA9A
+:100AC000000000188000FEBA0000001091D4000061
+:100AD0000000000806005555000000188000FF5275
+:100AE0000000001091A03C0200000010B1E6620777
+:100AF0000000000B2FDF0002000000002C3100007E
+:100B0000000000092CB1007F000000082CD9000073
+:100B1000000000082D000000000000082D80010DDD
+:100B200000000010B1A8000600000010205F0000C7
+:100B3000000000002C200000000000002CA7000096
+:100B4000000000082D000010000000082D800108A2
+:100B5000000000188000FF4B00000010B1A600103C
+:100B600000000010001F00000000000F0F30000701
+:100B7000000000000A600000000000000AE1000020
+:100B80000000000F4B620008000000090B1600FF78
+:100B9000000000000D620000000000090D1A00FFB7
+:100BA00000000010073000030000000C0D1A0008C0
+:100BB0000000000C0B1600080000000F4CE30018AA
+:100BC000000000000C992C0000000004CC993400B7
+:100BD000000000080F8000000000000C29800001C8
+:100BE0000000000033310000000000082200001661
+:100BF000000000002ADF0000000000082A00000CAE
+:100C000000000010009F0000000000000F20000006
+:100C10000000000C1F800001000000080500555571
+:100C2000000000188000FE8E0000001091D400002B
+:100C3000000000080600AAAA000000188000FF2695
+:100C40000000000F4722000800000009070E000FF7
+:100C500000000008070E00080000000802800001E4
+:100C60000000000702851C000000000882850001CA
+:100C70000000000002854C000000000742851C00B7
+:100C800000000003C3AA52000000000003B10E00E0
+:100C9000000000074B071C000000000F0F3000078A
+:100CA0000000000F0A960003000000000A955C0097
+:100CB000000000004A005A00000000000C960A00E4
+:100CC000000000090C99FFFF000000080D00FFFF65
+:100CD00000000010B1963202000000080F800005ED
+:100CE00000000010B1A8000800000010205F000004
+:100CF0000000000B2FDF0002000000002C2000008D
+:100D0000000000002CA70000000000082D000010CB
+:100D1000000000082D800108000000188000FF126C
+:100D20000000000C2980000100000010001F0000DE
+:100D30000000000C1F800001000000002ADF0000FE
+:100D4000000000082A00000D000000080500AAAA03
+:100D5000000000188000FE680000001091D4000020
+:100D60000000000806005555000000188000FF0034
+:100D70000000000C298000010000000C1F80000111
+:100D8000000000082A000007000000080500555573
+:100D9000000000188000FE60000000080305000449
+:100DA0000000000683040C00000000080285020019
+:100DB0000000000086050C0000000001860C0E00FB
+:100DC00000000008020400040000000002041800F3
+:100DD00000000000838718000000001800020000D7
+:100DE00000000010B18000040000001F0303010098
+:100DF00000000008050000FF0000001800020000CD
+:100E0000000000002A00000000000010B1D4000023
+:100E10000000000C298000010000000802540009B5
+:100E2000000000092952003F0000001800040000E3
+:100E30000000001880000010000000188000001161
+:100E4000000000188000004B000000188000013CEA
+:100E5000000000188000013B000000188000013AEB
+:100E6000000000188000013A000000188000000017
+:100E7000000000188000014D0000001880000136BD
+:100E8000000000188000000C0000001880000152D3
+:100E900000000018800001AC0000001880000080F5
+:100EA00000000018800001070000001880000115F4
+:100EB000000000002A000000000000188000FFEA87
+:100EC000000000002A0000000000000C2980000043
+:100ED0000000001020530000000000188000FFE612
+:100EE000000000002A000000000000188000FFE45D
+:100EF0000000000003820000000000188000FFDFF7
+:100F0000000000010C161400000000008C181400F2
+:100F10000000001091980003000000080C960002E9
+:100F200000000010B1800003000000080C960001D2
+:100F3000000000000C000000000000000D1900007F
+:100F400000000010205600000000000C2BD700010C
+:100F5000000000080F8000010000000000000000F9
+:100F600000000010001F00000000000C6BD7000103
+:100F700000000010011301F100000018000700003C
+:100F800000000000050200000000001091963421CE
+:100F900000000010205F0000000000002C1E000078
+:100FA000000000082C800006000000082D0000064C
+:100FB000000000082D800102000000000000000079
+:100FC0000000001091DE0000000000000D61000034
+:100FD00000000018000A00000000000005020000E8
+:100FE000000000109196341600000010205F0000F1
+:100FF0000000000009D80000000000002C1E0000C6
+:10100000000000082C80010E000000082D00000ADE
+:10101000000000082D800102000000000000000018
+:101020000000001091DE0000000000000D620000D2
+:10103000000000002C13000000000018000A00004F
+:101040000000000005020000000000109196340925
+:1010500000000010205F0000000000002C1E0000B7
+:10106000000000082C800006000000082D00006A27
+:10107000000000082D8001020000000000000000B8
+:101080000000001091DE0000000000000D7A00005A
+:1010900000000018000A00000000001091DE0000AF
+:1010A00000000010001F00000000000C6BD70001C2
+:1010B000000000002F80AA00000000002A000000AD
+:1010C000000000000D61000000000000036200004D
+:1010D000000000002C4000000000000002638C00B3
+:1010E0000000000026460000000000080204001274
+:1010F00000000010B906082E000000000F58000084
+:10110000000000000A640000000000000AE5000082
+:10111000000000090B66FFFF000000000C0000004B
+:10112000000000000B800000000000080CC6001248
+:10113000000000188000FFCA0000001020560000C8
+:101140000000000C2BD70001000000080F800003F6
+:10115000000000000000000000000010001F000060
+:101160000000000C6BD700010000000827110012DE
+:10117000000000006690000000000008A31B0012A1
+:1011800000000010B198000600000010001F0000D1
+:101190000000000C6BD7000100000010205600007A
+:1011A0000000000C2BD70001000000080F80000495
+:1011B0000000000822000003000000082C80000C42
+:1011C000000000082D00000C00000010001F0000AF
+:1011D0000000000C6BD70001000000002596000005
+:1011E0000000000C298000000000000006660000DE
+:1011F0000000000086611800000000090260000F76
+:101200000000000F0204000200000010B60C0803EA
+:101210000000000C1FBF00000000000C336600102F
+:1012200000000000321400000000000032950000B1
+:101230000000000573662C000000000031E32E0062
+:10124000000000082D800010000000102053000056
+:101250000000001091DE0000000000188000FF7602
+:1012600000000000230000000000000925E6FFFF49
+:10127000000000082200000B0000000C6952000072
+:101280000000000C29800000000000102053000026
+:10129000000000188000FF6F0000001091DE0000C9
+:1012A00000000010001F00000000000C6BD70001C0
+:1012B000000000002F80AA00000000002A000000AB
+:1012C000000000002C400000000000082C800040BE
+:1012D000000000082D000020000000082D80011CE7
+:1012E00000000000000000000000001091DE00007F
+:1012F0000000000F42EA001000000010004F000440
+:1013000000000010B74692000000000802490012D9
+:1013100000000010B5840A00000000000D6100000C
+:1013200000000010BA66346D000000000362000087
+:1013300000000010B8630C6B000000088305001269
+:1013400000000010004F00020000000003490000F0
+:101350000000000183068C000000000083C60C0022
+:1013600000000010B1870010000000000B6E0000AC
+:10137000000000188000FF50000000010669140002
+:1013800000000010918C000200000008B4E9000188
+:1013900000000010B1E92C5F0000000086692C00FD
+:1013A00000000000020000000000000902EAFFFF48
+:1013B00000000010000C00020000000002040A00FF
+:1013C0000000000F460C00010000000F0285000124
+:1013D00000000010918C01FC00000010B7040E56B4
+:1013E000000000002C400000000000000F40000042
+:1013F000000000000D610000000000000A64000011
+:10140000000000000AE50000000000090B66FFFF75
+:10141000000000000C000000000000000B80000035
+:10142000000000080C86001200000010205600008A
+:101430000000000C2BD70001000000080F80000303
+:101440000000000C2952000000000010001F0000E6
+:101450000000000C6BD700010000000827110012EB
+:10146000000000006690000000000000264600001A
+:10147000000000002306000000000010B1980009E1
+:1014800000000010001F00000000000C6BD70001DE
+:1014900000000010205600000000000C2BD70001B7
+:1014A000000000080F8000040000000000000000A1
+:1014B00000000010001F00000000000C6BD70001AE
+:1014C000000000003214000000000000329500000F
+:1014D0000000000031E32E000000000573662C00C0
+:1014E000000000002596000000000010B1870021D8
+:1014F0000000000C298000000000000F0F6B0007A7
+:10150000000000000D690000000000000A6C0000EF
+:10151000000000000AED0000000000000B6E00005B
+:10152000000000000B800000000000000C8700009D
+:10153000000000188000FF18000000010C161400C5
+:10154000000000008C181400000000080C96000138
+:101550000000001091980002000000080C990001A2
+:10156000000000000D190000000000000C00000049
+:1015700000000010205600000000000C2BD70001D6
+:10158000000000080F800001000000102053000040
+:101590000000000C6952000100000010001F000054
+:1015A0000000000C6BD700010000000022C58C0079
+:1015B00000000000231200000000000027110000BE
+:1015C000000000002690000000000010B8170E0375
+:1015D0000000000C29800000000000188000FFEBD4
+:1015E0000000000082970E0000000000A3120A0015
+:1015F000000000082200001A000000082C80000CE7
+:10160000000000082D00000C000000082D800010D4
+:1016100000000010001F00000000000C6BD700014C
+:10162000000000000D6E000000000003E7CF340052
+:101630000000000C298000000000001091DE000076
+:1016400000000010B1870007000000003614000001
+:101650000000000036950000000000003716000072
+:10166000000000082C800050000000082D00003011
+:10167000000000082D80000C000000102053000026
+:10168000000000188000FEF1000000002646000067
+:1016900000000000230000000000000925E6FFFF15
+:1016A000000000000B6E000000000003E7CF2C00DC
+:1016B000000000082200001B0000000C695200001E
+:1016C0000000000C298000000000001020530000E2
+:1016D000000000188000FEE7000000002FD5000089
+:1016E000000000002A00000000000010003F000C75
+:1016F000000000000666000000000000866118007F
+:1017000000000009026000F000000010B70C08089B
+:10171000000000002C4000000000000C7366001068
+:10172000000000082C800018000000082D000018A0
+:10173000000000082D8000020000000C5FBF0000C8
+:101740000000001091DE0000000000188000FED8AC
+:10175000000000002FD50000000000002A0000005B
+:10176000000000002C4000000000000C7366001018
+:10177000000000082C800018000000082D00001850
+:10178000000000082D8000020000000C5FBF000078
+:101790000000001091DE0000000000082C80000313
+:1017A000000000082D000003000000093060FFF079
+:1017B000000000082D8000010000000C29800000BE
+:1017C0000000001091DE0000000000082C80001ACC
+:1017D000000000082D00001A000000003300000087
+:1017E000000000082D800002000000003180000091
+:1017F0000000001091DE0000000000082C80000CAA
+:10180000000000082D00000C000000082D800004DE
+:1018100000000010205300000000001091DE0000C6
+:10182000000000188000FEBD000000188000FEBC13
+:10183000000000002A00000000000010001F00004F
+:101840000000000C6BD70001000000000F008000BA
+:10185000000000080F80000700000018800000153D
+:10186000000000000502000000000008220000093E
+:1018700000000000286D00000000000029000000AA
+:101880000000000F6568001000000003F66C940073
+:1018900000000010B972A0040000000C73E70019EA
+:1018A0000000000C21420004000000003BF6000094
+:1018B0000000000C298000000000001020530000F0
+:1018C00000000008220000080000000C6142000433
+:1018D00000000018000A0000000000002A000000BC
+:1018E00000000010001F00000000000C6BD700017A
+:1018F0000000000F0F470007000000080F800008DD
+:101900000000000C2980000000000010205300009F
+:10191000000000188000FE9F0000001091DE000013
+:10192000000000002FD5000000000010001F000084
+:101930000000000C6BD700010000000033510000D4
+:10194000000000002A00000000000010B1C60029BD
+:101950000000000F0F500007000000000A600000A8
+:10196000000000000AE100000000000F4B620008C8
+:10197000000000090B1600FF0000000F4C62001071
+:10198000000000000D620000000000090D1A00FFB9
+:1019900000000010075000030000000C0D1A0008A2
+:1019A0000000000C0B160008000000000CC6000030
+:1019B000000000000B8000000000000006980000FE
+:1019C00000000010205600000000000C2BD7000182
+:1019D000000000080F8000030000001006C2000491
+:1019E0000000000C29000002000000102642000246
+:1019F0000000000C29520003000000082200000132
+:101A000000000010001F00000000000C6BD7000158
+:101A100000000000231B00000000000027111A0036
+:101A200000000000669000000000000C2952000039
+:101A300000000010B197320C0000000C298000005B
+:101A40000000000006980000000000102053000075
+:101A50000000000C295200030000000022C58C0089
+:101A600000000010001F00000000000C6BD70001F8
+:101A700000000010205600000000000C2BD70001D1
+:101A8000000000080F800003000000188000FFEF36
+:101A900000000010B1C8001300000010B1C6000320
+:101AA0000000000C298000000000001020530000FE
+:101AB0000000000C295200000000000C2952000315
+:101AC0000000001006C200020000000C29520002B3
+:101AD0000000000022C58C00000000002765000007
+:101AE0000000000026E400000000000822000016AC
+:101AF00000000010B1C600030000000023480000F1
+:101B000000000010B1800005000000002348000024
+:101B10000000000C298000000000000F0F5000079B
+:101B200000000018800000120000000822000016CB
+:101B30000000000C298000000000000030140000AC
+:101B40000000000030950000000000100750000366
+:101B5000000000090B1600FF000000090D1A00FF2D
+:101B60000000000F31160008000000003162340050
+:101B700000000003F162300000000010205F000050
+:101B8000000000002C510000000000092CD1007F53
+:101B9000000000082CD90000000000082D00000003
+:101BA000000000082D80000C000000000000000074
+:101BB0000000001091DE00000000001005C20003CC
+:101BC0000000000033000000000000080F80000744
+:101BD000000000102053000000000010001F000053
+:101BE0000000000C6BD70001000000188000FE44CC
+:101BF000000000002FD50000000000002A000000B7
+:101C00000000000F0F50000700000010B1C60030A8
+:101C10000000000F4742000800000009070E000FF7
+:101C200000000008070E000800000010001F000060
+:101C30000000000C6BD70001000000080900000143
+:101C40000000000709121C0000000003CBCA92002C
+:101C5000000000000B97A2000000000742171C00C4
+:101C6000000000000B0400000000000F0A840003C5
+:101C7000000000000A959C00000000004A009A0045
+:101C80000000000882120001000000010C1708008B
+:101C9000000000000C978C000000000002180000FB
+:101CA000000000080D00FFFF000000080F80000684
+:101CB0000000000C290000000000001006C2000413
+:101CC0000000000C29520002000000102642000211
+:101CD0000000000C2952000300000008220000014F
+:101CE00000000010001F00000000000C6BD7000176
+:101CF00000000010B197320D00000000231B00000F
+:101D0000000000002711080000000000669000009D
+:101D10000000000C298000000000000002180000F4
+:101D200000000010205300000000000C29520003A6
+:101D30000000000022C5360000000010001F000057
+:101D40000000000C6BD70001000000080F800006A7
+:101D5000000000188000FFF200000000231B0000BC
+:101D6000000000002711080000000000669000003D
+:101D700000000010B1C8000B0000000C298000001A
+:101D800000000010205300000000000C2952000049
+:101D90000000000C295200030000001006C20002DF
+:101DA0000000000C295200020000000022C58C0037
+:101DB00000000000276500000000000026E400008D
+:101DC0000000000023480000000000082200001767
+:101DD0000000000C2980000000000010001F00001F
+:101DE0000000000C6BD70001000000102053000021
+:081DF000000000188000FE0352
+:00000001FF
+/*
+ * This file contains firmware data derived from proprietary unpublished
+ * source code, Copyright (c) 2004 - 2009 Broadcom Corporation.
+ *
+ * Permission is hereby granted for the distribution of this firmware data
+ * in hexadecimal or equivalent format, provided this copyright notice is
+ * accompanying it.
+ */
diff --git a/firmware/myricom/lanai.bin.ihex b/firmware/myricom/lanai.bin.ihex
new file mode 100644 (file)
index 0000000..bf47f4c
--- /dev/null
@@ -0,0 +1,4771 @@
+:100000004FF8F20EFE00C290000007880008E001E1
+:10001000014C9793FFFCE000001400000001000079
+:1000200000009293FFFC02900008F7062A6C9713D9
+:10003000FFFCF7062C109713FFFC07880008E00070
+:1000400015489793FFFCF702053C9713FFFCF70256
+:1000500000039713FFFCF70629E09713FFFC0788BE
+:100060000008E000161C9793FFFCF7062B849713FB
+:10007000FFFCF7062C1C9713FFFC07880008E00024
+:1000800015489793FFFCF7020ABC9713FFFCF70291
+:1000900000029713FFFCF7062AF89713FFFC078866
+:1000A0000008E000161C9793FFFC8796FFFC8296E1
+:1000B000FFF802140000013C0000000000019293D0
+:1000C000FFFC02900008F7044A9C85160000203AC5
+:1000D0000001EE00010100000001F70475EC0000D2
+:1000E0000001203A0000E600010000000001F704D2
+:1000F00075F000000001203A0000E600012D00002C
+:100100000001F7042D38F6862C2806380001F60584
+:100110002D3877390002F482001220320044E600C4
+:1001200001E0B4BA6802E00001E0F0052D38F70400
+:100130003B64F5844F54F7057A10202E0000E6004A
+:100140000199972A002095AA001CF6064A9826AC29
+:10015000000177350001C738680077390002073899
+:10016000000CA4BA60020000000194AA0010C73875
+:100170006000873A000400000001972A0014F70489
+:100180004A9C0000000127380001C02E7200D700F1
+:100190000A01E00001D0F7057A1895AA001CF606BE
+:1001A0004A9806AC000177350001C73868007739F6
+:1001B00000020738000CA4BA60020000000194AAF3
+:1001C0000010C7386000873A0004F0057A18972AB3
+:1001D0000014F50579D807880008E00001F497932A
+:1001E000FFFC8796FFFC8296FFF802140004013C96
+:1001F0000000000000019293FFFC02900008221012
+:100200000038F7047A10F6843B6400000001C03A1D
+:100210006A00470C0001D7000A70203A0000E6008F
+:10022000024C00000001F70475EC00000001203AC8
+:100230000000E600024C00000001F70475F0000029
+:100240000001203A0000E6000285F4820000F70475
+:100250002D38F6862C2806380001F6052D3877391A
+:100260000002F302001220320044E6000274B33AA6
+:100270006802F0052D38F3062A6CF3052C10E00017
+:100280000528F0057A18F38479D8F6844AA0231457
+:1002900000209316FFC4841E00109696FFD4F70426
+:1002A0004A9C9416FFE0851E0014C0367200EC00D4
+:1002B000036C9516FFE477350001C738680077397D
+:1002C0000002F3064A98C6B8300006B4000CC58494
+:1002D00000008736000000000001C03A4200E6003E
+:1002E00002FCC62400008736000400000001C03A6A
+:1002F0005200E600030020320000F6020001203226
+:100300000000E600030D00000001F58200008636C3
+:1003100000008716FFE000000001C0327200E2001A
+:100320000348F5020000C0327200E6000350202AA4
+:10033000000086B600048716FFE400000001C03606
+:100340007200E2000351202A0000F5020001202A79
+:100350000000E6000361202E0000F5820001202E3F
+:100360000000E600037020260000F4820001202631
+:100370000000E60003A5F60200018716FFD4F3068D
+:100380004A9876B90001C6B4700076B50002C6B4CA
+:10039000300006B4001486B600009716FFD8E000BF
+:1003A00004189696FFDC2714002C9713FFFC831685
+:1003B000FFC4000000019313FFFCF3064A98931357
+:1003C000FFFC9396FFCC07880008E001256897930F
+:1003D000FFFC8396FFCC20220000E6000415F60205
+:1003E00000018716FFD4F3064A9876B90001C6B417
+:1003F000700076B50002C6B4300006B4001486B6AC
+:1004000000009716FFD89696FFDCF7054AA0E0009B
+:10041000041C20320000F602000020320000E6003A
+:10042000042CF4820001E0000484F482000086962B
+:10043000FFD80000000177350002C738680077391F
+:100440000002F68642C8A63A6802C73868007539C5
+:10045000001E7528FFE505B8000286AE00000738CB
+:1004600000049716FFECC63057C07630FFF09616A2
+:10047000FFF475AD001E75ACFFE5C6B45FC076B481
+:10048000FFF09696FFF020260000E6000525F30613
+:1004900029E08696FFF0F5820000C7346800C49C0E
+:1004A0007200C02E6A00EC0004F0C5240000C62CC7
+:1004B00000008716FFEC00000001A6B2700205AC38
+:1004C0000001C73070007739001E7738FFE5C6B4E9
+:1004D00077C076B4FFF0F6AB280005280002871637
+:1004E000FFF000000001C02E7200EC0004B10630E5
+:1004F0000002F3020003F30576F48716FFF0869EF0
+:100500000004C7387000C7384800C6B470008716AA
+:10051000FFF406B400209702FF6C9482FF5096828D
+:10052000FF58F30629E0F3052C108796FFFC82960E
+:10053000FFF802140000013C00000000000192934B
+:10054000FFFC02900008F7047A1800000001203A2E
+:100550000000E60005CD00000001F7047A10F684E3
+:100560003B6400000001C03A6A00470C0001203AD9
+:100570000000E60005CDF5864A98F60479D8F684A1
+:100580004F540000000196B2001C06B400017735FC
+:100590000001C7386800773900020738000CA53A17
+:1005A00058020000000195320010C7385800873A01
+:1005B0000004F0057A189732001407880008E0005C
+:1005C00001F49793FFFCE00005FC00000001F70434
+:1005D0002D38F6862C2806380001F6052D38773997
+:1005E0000002F502001220320044E60005F4B53A9C
+:1005F0006802F0052D38F5062A6CF5052C10879653
+:10060000FFFC8296FFF802140000013C000000008D
+:1006100000019293FFFC0290000885960000F70409
+:1006200075EC852E0020203A0000E60006CCF5058A
+:100630007A08F70475F000000001203A0000E60097
+:1006400006CC00000001F7047A08F6843B64000041
+:100650000001C03A6A00470C0001D7000A70203A36
+:100660000000E60006CC00000001872E001CF68486
+:100670004F54F7057A00C7347200203A0000EE00AC
+:10068000068DF5020001E0000690F50579F8F08589
+:1006900079F8F6847A00C7387000C6B47000F704A1
+:1006A00079F8F68579E8C7387000C6347000F70429
+:1006B0004A9C00000001C0367200EC0006CCF60532
+:1006C00079F020360000EC0006F800000001F70485
+:1006D0002D38F6862C2806380001F6052D38773996
+:1006E0000002F502001320320044E6000738B53A54
+:1006F0006802E0000738F0052D38F7044A9C000036
+:100700000001C0327200EE00071900000001F7047A
+:100710004A9CE0000728F70579F020320000EC0041
+:10072000072800000001F08579F0F58579E0078859
+:100730000008E000074C9793FFFC8796FFFC829629
+:10074000FFF802140004013C000000000001929335
+:10075000FFFC0290000822100038F70475EC00003E
+:100760000001203A0000E60007A400000001F704A1
+:1007700075F000000001203A0000E60007A4000028
+:100780000001F7047A08F6843B6400000001C03AD7
+:100790006A00470C0001D7000A70203A0000E6000A
+:1007A00007D5F4020000F7042D38F6862C28063809
+:1007B0000001F6052D3877390002F30200132032CC
+:1007C0000044E60007CCB33A6802F0052D38E0009B
+:1007D0000AA4F3062B84F68479E8F6064A9877355E
+:1007E0000001C738680077390002F68479E00738DD
+:1007F000000CA33A6002C3B4000093360010C7385F
+:100800006000873A0004231400209316FFC4973633
+:100810000014849E0010F6844AA09496FFE09696F9
+:10082000FFD4851E0014F7044A9C00000001C03666
+:100830007200EC0008EC9516FFE477350001C7382C
+:10084000680077390002C6B8600006B4000CC584A1
+:1008500000008736000000000001C03A4A00E600B0
+:10086000087CC62000008736000400000001C03A62
+:100870005200E600088020320000F602000120321B
+:100880000000E600088D00000001F58200008636B9
+:1008900000008716FFE000000001C0327200E20095
+:1008A00008C8F5020000C0327200E60008D0202A15
+:1008B000000086B600048716FFE400000001C03681
+:1008C0007200E20008D1202A0000F5020001202A6F
+:1008D0000000E60008E1202E0000F5820001202E35
+:1008E0000000E60008F020220000F40200012022AF
+:1008F0000000E6000925F60200018716FFD4F30682
+:100900004A9876B90001C6B4700076B50002C6B444
+:10091000300006B4001486B600009716FFD8E00039
+:1009200009989696FFDC2714002C9713FFFC83167A
+:10093000FFC4000000019313FFFCF3064A989313D1
+:10094000FFFC9396FFCC07880008E0012568979389
+:10095000FFFC8396FFCC20220000E6000995F602FA
+:1009600000018716FFD4F3064A9876B90001C6B491
+:10097000700076B50002C6B4300006B4001486B626
+:1009800000009716FFD89696FFDCF7054AA0E00016
+:10099000099C20320000F602000020320000E60030
+:1009A00009ACF4820001E0000A04F482000086969B
+:1009B000FFD80000000177350002C738680077399A
+:1009C0000002F68642C8A63A6802C7386800753940
+:1009D000001E7528FFE505B8000286AE0000073846
+:1009E00000049716FFECC63057C07630FFF096161D
+:1009F000FFF475AD001E75ACFFE5C6B45FC076B4FC
+:100A0000FFF09696FFF020260000E6000AA5F30608
+:100A10002AF88696FFF0F5820000C7346800C49C6F
+:100A20007200C02E6A00EC000A70C5240000C62CBB
+:100A300000008716FFEC00000001A6B2700205ACB2
+:100A40000001C73070007739001E7738FFE5C6B463
+:100A500077C076B4FFF0F6AB2800052800028716B1
+:100A6000FFF000000001C02E7200EC000A310630D9
+:100A70000002F3020002F30576F48716FFF0869E6B
+:100A80000004C7387000C7384800C6B47000871625
+:100A9000FFF406B400209702FF6C9482FF50968208
+:100AA000FF58F3062AF8F3052C1C8796FFFC829664
+:100AB000FFF802140000013C0000000000019293C6
+:100AC000FFFC02900008F68479E8F70479F800004A
+:100AD0000001C6B47000F7047A20F68579E807387B
+:100AE0000001F7057A20F70479F0F6047A20C03681
+:100AF0007200E6000B2CF6862C28F7042D38000037
+:100B0000000106380001F6052D3877390002F5821C
+:100B1000001320320044E6000B20B5BA6802F0054D
+:100B20002D38F5862B84E0000B38F5852C1C0788C2
+:100B30000008E000074C9793FFFC8796FFFC829625
+:100B4000FFF802140000013C000000000001929335
+:100B5000FFFC02900008F7062C109713FFFCF70625
+:100B600029E09713FFFC07880008E00014F497932E
+:100B7000FFFCF7062C109713FFFCF7062A6C97135F
+:100B8000FFFC07880008E00014F49793FFFCF706C9
+:100B90002C1C9713FFFCF7062AF89713FFFC078815
+:100BA0000008E00014F49793FFFCF7062C1C971341
+:100BB000FFFCF7062B849713FFFC07880008E00072
+:100BC00014F49793FFFC8796FFFC8296FFF80214BB
+:100BD0000000013C0000000000019293FFFC029025
+:100BE0000008F0052D38F0052D3C8796FFFC829615
+:100BF000FFF802140000013C000000000001929385
+:100C0000FFFC0290000822100018FF852EDCF7067A
+:100C10000C3EC77C7400203A0000E60014299716A9
+:100C2000FFF44738FFFBF6846F50CFB8000083967F
+:100C3000FFF4F702003FC39C6D80C71C7400203A8C
+:100C4000003FE20012609396FFF477390002F682CB
+:100C50000C5CA6B6700200000001C1340000000068
+:100C600012600000126000000D6800000D680000B6
+:100C70000D5C00000D5C00000D6800000D680000B8
+:100C80001250000012500000123C0000123C000004
+:100C90000DE000000DE00000123C0000123C0000DE
+:100CA0000DE800000DF400000E0000000E20000012
+:100CB0000E4000000E6000000E8000000EA000003C
+:100CC0000EC000000EC800000ED000001228000068
+:100CD0000ED800000EF400000F10000012280000D3
+:100CE0000F1800000F1800000F2400000F24000050
+:100CF0000F4400000F4400000F6400000F64000068
+:100D00000F8400000F8400000F8C00000F8C000087
+:100D10000F9400000F9400000FB000000FB000000F
+:100D20000FB800000FD800000FF80000102C0000D2
+:100D3000106000001094000010C8000010FC0000BB
+:100D400011300000114C0000116800001214000066
+:100D50001184000011B4000011E400001214F382A9
+:100D60000006E00012549393FFFCF60200052032C7
+:100D70000014E6000DB527000010203A0001E20043
+:100D80000DB5F7062DCCF6842ECC0000000175B50C
+:100D90000002B62E700206B40001F6852ECC860243
+:100DA000FF34F7062E4C2036001FE2000DB5B62E9C
+:100DB0007002F0052ECCF7042D5800000001873A90
+:100DC000000000000001873A0018000000010788B9
+:100DD0000008C13800009793FFFCE000126000009B
+:100DE0000001E0001240F3820006F382000BE000F5
+:100DF00012549393FFFCF3820007E0001254939384
+:100E0000FFFCF382000B9393FFFC07880008E000CF
+:100E100015849793FFFCF3820005E000125493932E
+:100E2000FFFCF38200079393FFFC07880008E000B3
+:100E300015849793FFFCF3820005E000125493930E
+:100E4000FFFCF382000B9393FFFC07880008E0008F
+:100E500015849793FFFCF3820006E00012549393ED
+:100E6000FFFCF38200079393FFFC07880008E00073
+:100E700015849793FFFCF3820006E00012549393CD
+:100E8000FFFCF382000B9393FFFC07880008E0004F
+:100E900015849793FFFCF3820005E00012549393AE
+:100EA000FFFCF38200079393FFFC07880008E00033
+:100EB00015849793FFFCF3820005E000125493938E
+:100EC000FFFCE0001240F382000BE0001240F382CE
+:100ED0000007E000122CF382000BF382000B9393C7
+:100EE000FFFC07880008E00015849793FFFCE000F2
+:100EF0001240F3820006F38200079393FFFC0788F9
+:100F00000008E00015849793FFFCE0001240F38294
+:100F10000006E000122CF382000BF3820014E000C4
+:100F200012549393FFFCF38200149393FFFC078801
+:100F30000008E00015849793FFFCF3820005E000B1
+:100F400012549393FFFCF38200149393FFFC0788E1
+:100F50000008E00015849793FFFCF3820006E00090
+:100F600012549393FFFCF38200149393FFFC0788C1
+:100F70000008E00015849793FFFCF3820005E00071
+:100F800012549393FFFCE0001240F3820014E0003F
+:100F9000122CF3820014F38200149393FFFC078851
+:100FA0000008E00015849793FFFCE0001240F382F4
+:100FB0000006E000122CF3820014F38200149393D5
+:100FC000FFFC07880008E00015849793FFFCF3827C
+:100FD000000BE00012549393FFFCF38200149393F0
+:100FE000FFFC07880008E00015849793FFFCF3825C
+:100FF0000007E00012549393FFFCF38200149393D4
+:10100000FFFC07880008E00015849793FFFCF3823B
+:10101000000B9393FFFC07880008E000158497936A
+:10102000FFFCF3820005E00012549393FFFCF3826F
+:1010300000149393FFFC07880008E0001584979341
+:10104000FFFCF38200079393FFFC07880008E00091
+:1010500015849793FFFCF3820005E00012549393EC
+:10106000FFFCF38200149393FFFC07880008E00064
+:1010700015849793FFFCF382000B9393FFFC078882
+:101080000008E00015849793FFFCF3820006E0005F
+:1010900012549393FFFCF38200149393FFFC078890
+:1010A0000008E00015849793FFFCF38200079393F8
+:1010B000FFFC07880008E00015849793FFFCF3828B
+:1010C0000006E00012549393FFFCF3820014939304
+:1010D000FFFC07880008E00015849793FFFCF3826B
+:1010E000000B9393FFFC07880008E000158497939A
+:1010F000FFFCF3820005E00012549393FFFCF3829F
+:1011000000149393FFFC07880008E0001584979370
+:10111000FFFCF38200079393FFFC07880008E000C0
+:1011200015849793FFFCF3820005E000125493931B
+:10113000FFFCF38200149393FFFC07880008E00093
+:1011400015849793FFFCE0001240F382000BF382BA
+:1011500000149393FFFC07880008E0001584979320
+:10116000FFFCE0001240F3820007F3820014939327
+:10117000FFFC07880008E00015849793FFFCE0005F
+:10118000122CF382000BF38200149393FFFC078868
+:101190000008E00015849793FFFCF382000B939303
+:1011A000FFFC07880008E00015849793FFFCE0002F
+:1011B0001240F3820006F38200149393FFFC078829
+:1011C0000008E00015849793FFFCF38200079393D7
+:1011D000FFFC07880008E00015849793FFFCE000FF
+:1011E0001240F3820006F38200149393FFFC0788F9
+:1011F0000008E00015849793FFFCE000122CF382B6
+:10120000000BF7043528F682000107380008E000DB
+:1012100013CCF7053544F38200149393FFFC078841
+:101220000008E00015849793FFFCF3820007939376
+:10123000FFFC07880008E00015849793FFFCF38209
+:1012400000059393FFFC07880008E000158497933E
+:10125000FFFC9013FFFC07880008E00015849793BB
+:10126000FFFC8396FFF400000001779C0014703EA1
+:10127000FFE1E600129DF7060400F7046F5C000032
+:10128000000107380001F7056F5CF7046F5CE000B0
+:101290000000000000018396FFF4F7060400C01E62
+:1012A0007400E600142900000001F7042ED0F68433
+:1012B00035240738000120360000E6001405F70544
+:1012C0002ED0F704E01400000001203A0000E600F0
+:1012D0001405F6820000F685E014F7042ED8C53414
+:1012E000000007380001F7052ED8202A0002EE0082
+:1012F00013CCF6820000F684352800000001873602
+:10130000000000000001203A0002E60013A005B42E
+:1013100000089593FFFC9516FFE89596FFE49696D6
+:10132000FFE007880008E00016649793FFFC85162D
+:10133000FFE88596FFE48696FFE020220000E600A5
+:101340001390F70200008636000C000000012032E6
+:10135000000FE20013750000000187360014000042
+:101360000001073800019736001487360014E000AA
+:101370001390F702000076B10002C6B46000773522
+:101380000005C7386A00C738600007380010C72C4E
+:101390007000203A0000E6001200F705352CF684B4
+:1013A0003528F7046F4C00000001C0367200E600DB
+:1013B00013C007341494F3846F44E00013C4F3851E
+:1013C0003528F7053528E00012E805280001203609
+:1013D0000000E6001429F6862C28F7042D38F005C5
+:1013E000352406380001F6052D3877390002F382DE
+:1013F000000D20320044E6001428B3BA6802E00071
+:101400001428F0052D38F704E01000000001203A00
+:101410000000E6001429F7020000F705E010078835
+:101420000008E00102989793FFFCF4842D38F7043C
+:101430002D3C00000001C03A4A00E6000C09F68687
+:101440002C2877390002A53A680200000001202A02
+:101450000014E600149127280015203A0001E2004C
+:101460001491F7062DCCF6842ECC8602FF3475B588
+:101470000002B52E700206B40001F6852ECCF706E8
+:101480002E4C2036001FE2001491B62E7002F0059B
+:101490002ECCF7062D4476A90002A7367002000074
+:1014A0000001873A000000000001C6B470008736D2
+:1014B00000049496FFEC07880008C1380000979359
+:1014C000FFFCF7042D3C8496FFEC07380001203A1E
+:1014D0000044E600142CF7052D3CE000142CF00528
+:1014E0002D3C8796FFFC8296FFF802140000013C19
+:1014F0000000000000019293FFFC02900008841697
+:101500000000F702000085960004203A0021EE005A
+:10151000153495A20000F606233807200084C6A0E3
+:101520000000963A000427380004C03A6A00EC0034
+:101530001520000000018796FFFC8296FFF8021438
+:101540000008013C0000000000019293FFFC0290A3
+:1015500000088696000087160004F6042D40973692
+:1015600000009736000407300001F7052D4096363D
+:1015700000088796FFFC8296FFF802140008013CE1
+:101580000000000000019293FFFC02900008851605
+:10159000000000000001202A0014E60015D92728C9
+:1015A0000015203A0001E20015D9F7062DCCF6848B
+:1015B0002ECC8602FF3475B50002B52E700206B43B
+:1015C0000001F6852ECCF7062E4C2036001FE200D7
+:1015D00015D9B62E7002F0052ECCF6862D4477294B
+:1015E0000002A6BA68020000000186B600000000F2
+:1015F0000001C7386800873A00040000000107882E
+:101600000008C13800009793FFFC8796FFFC829684
+:10161000FFF802140004013C000000000001929356
+:10162000FFFC029000088716000086960004F6066C
+:101630002D4476B5000285BA000000000001B5B661
+:101640006002C6B47000859600080000000195B6DF
+:1016500000048796FFFC8296FFF80214000C013C00
+:101660000000000000019293FFFC02900008861623
+:101670000000000000018732000400000001203A51
+:10168000000F86B20000C5380000EE0016B4C5B4E5
+:1016900000002036000FEE0016B400000001203AD2
+:1016A0000000EC0016B50000000120360000EC0040
+:1016B00016D0000000018732000C0000000107383E
+:1016C00000019732000C8732000CE00016D8F402BB
+:1016D0000000C02A5A00440C00018796FFFC829645
+:1016E000FFF802140004013C0000000000010000AB
+:1016F00000009293FFFC02900008F7062EE097137B
+:10170000FFFCF70632D49713FFFC07880008E000BF
+:1017100015489793FFFCF702182C9713FFFCF782EC
+:1017200000099793FFFCF7062EE09713FFFC07884C
+:101730000008E000161C9793FFFCF702345897133B
+:10174000FFFCF702000C9713FFFCF7062F6C9713B2
+:10175000FFFC07880008E000161C9793FFFCF702C7
+:101760003F949713FFFCF782000B9793FFFCF7065B
+:101770002FF89713FFFC07880008E000161C9793CA
+:10178000FFFCF7023B849713FFFCF782000B979353
+:10179000FFFCF70632289713FFFC07880008E000DB
+:1017A000161C9793FFFCF70226E49713FFFCF70241
+:1017B00000139713FFFCF70630849713FFFC07888C
+:1017C0000008E000161C9793FFFCF70226A0971371
+:1017D000FFFCF70200119713FFFCF7063110971377
+:1017E000FFFC07880008E000161C9793FFFCF70237
+:1017F000182C9713FFFCF78200099793FFFCF7065C
+:10180000319C9713FFFC07880008E000161C979393
+:10181000FFFCF0057A78F00532E88796FFFC8296A7
+:10182000FFF802140000013C000000000001929348
+:10183000FFFC0290000822100050F70471C800005D
+:101840000001203A0000E6001855F68671C4E00059
+:10185000186CF6020000F70471D40000000177391B
+:101860000002C7386800863A001800000001F6053B
+:1018700032C486B2000807018000C5B47400F58543
+:1018800032D087320018F6866F4477390002A73AC3
+:101890006802202E0000F70532C0073809D886B24A
+:1018A0000004F70532CCE6001941F68532C8F7048A
+:1018B0007198F6847A782738000120360000E60017
+:1018C0001910F7057198F70476FC00000001203A22
+:1018D0000000E60018E8F3020011F30632D4F30525
+:1018E00076FCE00018F8F7020001F30576F8F3063D
+:1018F00032D4F3057700F7020000203A0000E6003A
+:101900001914F3020001F3063110E000268CF305F0
+:1019100032D4F3020001F3057A78F3063084F3053C
+:1019200032D4F30432C4000000019313FFFC078893
+:101930000008E00006109793FFFCE000268C0000F2
+:101940000001F3020000202E0000E6001CB99316EF
+:10195000FFE4873200088696FFE4C3040000C03A23
+:101960003200E6001984203600008732000C0000A7
+:101970000001C03A3200E600198420360000F682E9
+:10198000000120360000E6001CB8F3020000F70456
+:1019900032C09316FFACF58432C4863A142803B8DB
+:1019A0001420042C000886BA142400000001C03260
+:1019B0006A00EC001A709616FFEC77310001C73808
+:1019C000600077390002C63838000630000C86B255
+:1019D0000000872E00088516FFACC0367200E600B6
+:1019E0001A00C484000086B20004872E000C000098
+:1019F0000001C0367200E6001A04202A0000F50239
+:101A00000001202A0000E6001A1100000001F48203
+:101A1000000086B200008722000000000001C036EE
+:101A20007200E2001A4CF5820000C0367200E60037
+:101A30001A54202E000086B2000487220004000001
+:101A40000001C0367200E2001A55202E0000F58217
+:101A50000001202E0000E6001A6520260000F48216
+:101A6000000120260000E6001A70F3020001931620
+:101A7000FFAC8316FFAC00000001201A0000E60056
+:101A80001AB1F60200018716FFEC0000000176B9DA
+:101A90000001C6B4700076B50002C6B4380006B4C2
+:101AA000001486B600009716FFF0E0001B1896960B
+:101AB000FFF4271400149713FFFC9413FFFC939377
+:101AC000FFFC9396FFBC07880008E0012568979308
+:101AD000FFFC8396FFBC20220000E6001B15F602E7
+:101AE00000018716FFEC0000000176B90001C6B4C2
+:101AF000700076B50002C6B4380006B4001486B68D
+:101B000000009716FFF09696FFF4971E0008E0007D
+:101B10001B1C20320000F602000020320000E6000C
+:101B20001CB8F3020000F60432C09316FFAC86B274
+:101B3000142803B014200430148C873214240000BD
+:101B40000001C0367200EC001C049696FFEC77355D
+:101B50000001C738680077390002C5B8380005AC05
+:101B6000000C86AE00008732148C8516FFACC036A0
+:101B70007200E6001B94C484000086AE0004873225
+:101B8000149000000001C0367200E6001B98202A65
+:101B90000000F5020001202A0000E6001BA500005D
+:101BA0000001F482000086AE0000872200000000E1
+:101BB0000001C0367200E2001BE0F6020000C036F1
+:101BC0007200E6001BE82032000086AE0004872287
+:101BD000000400000001C0367200E2001BE9203260
+:101BE0000000F602000120320000E6001BF920266A
+:101BF0000000F482000120260000E6001C04F3022D
+:101C000000019316FFAC8316FFAC00000001201A00
+:101C10000000E6001C45F60200018716FFEC0000FC
+:101C2000000176B90001C6B4700076B50002C6B4F2
+:101C3000380006B4001486B600009716FFF0E000E6
+:101C40001CAC9696FFF4271400149713FFFC941312
+:101C5000FFFC9393FFFC9396FFBC07880008E0010C
+:101C600025689793FFFC8396FFBC20220000E600C6
+:101C70001CA9F60200018716FFEC0000000176B9EE
+:101C80000001C6B4700076B50002C6B4380006B4D0
+:101C9000001486B600009716FFF09696FFF4971E84
+:101CA0000008E0001CB020320000F60200002032E4
+:101CB0000000E6001E15F3020001F68432C00000A9
+:101CC000000185B60EF486360EF8202E0010E200D4
+:101CD0001CDC20320010E2001CF9000000018736F5
+:101CE0000F00000000010738000197360F0087360B
+:101CF0000F00E0001D24F702000007300001C03A89
+:101D00005A00E6001D1DF682000020320010E60099
+:101D10001D20202E0000E6001D24C7340000F6829E
+:101D20000001C7340000203A0000E6001E14F30250
+:101D30000001F30432CC000000019316FFDC931382
+:101D4000FFFC07880008E00043689793FFFC20220F
+:101D50000000E6001DFCF30200008316FFDC00001B
+:101D60000001861A00000000000120320010E2008D
+:101D70001D9176B10002871A000C0000000107389F
+:101D80000001971A000C871A000CE0001DFCF302FA
+:101D90000000F302004C9313FFFCC6B460007735DB
+:101DA0000004C7386A008316FFDCC7386000C738F4
+:101DB0003000073800109713FFFCF3067A289313BE
+:101DC000FFFC9616FFB407880008E00126F89793F9
+:101DD000FFFC8616FFB4000000010630000120322F
+:101DE0000011E6001DEC00000001F6020000831661
+:101DF000FFDC00000001961A0000F30200019316B8
+:101E0000FFD48316FFD400000001201A0000E60072
+:101E10001E18F30200019316FFE48316FFE400008E
+:101E20000001201A0000E6001F35F6820CABF70413
+:101E300032B48316FFD407380001F70532B4F70433
+:101E400032B4201A0000E6001E7000000001F70402
+:101E500032C0F306E030C03A3200E6001E700000E7
+:101E60000001F70432E80000000107380001F7051F
+:101E700032E8F70471C400000001203A0000E600D7
+:101E80001EADF6862C28F7042D3800000001063818
+:101E90000001F6052D3877390002F302000A2032DE
+:101EA0000044E6001EACB33A6802F0052D38F70492
+:101EB00071D4F68471CC07380001C03A6A00E6009C
+:101EC0001EC8F70571D4F00571D4F68471D4F704F7
+:101ED00071D0F00571C4C0367200470C0001F68461
+:101EE00032D00000000120360000E60025D9F705B9
+:101EF00071C8F704719800000001203A0000E60064
+:101F0000257900000001F70475EC00000001203A7B
+:101F10000000E600257800000001F70475F00000DD
+:101F20000001203A0000E600257800000001E000F2
+:101F300025DCF306319CF00532E8F70432C0F604E4
+:101F40006F5496BA000420320000E6001F60F302CE
+:101F5000000CF3020001F3056F54E0001F68F70264
+:101F60000001F3056F58F7020000203A0000E60078
+:101F70001F7CF3062F6CE000268CF30532D4F58429
+:101F80007A7024940010202E0001E6002284F5854A
+:101F90007AA0F7020001F60432C8F7057A70F70458
+:101FA00032C4F68432C0F6057A2C9002FF8090028B
+:101FB000FF38F5847A28073800249582FF3C970281
+:101FC000FF409602FF448736141000000001C73816
+:101FD0006000973614108736141800000001073887
+:101FE00000019736141887361418F0056F50F7045F
+:101FF00032B89596FFECC7386000F70532B8F704A1
+:1020000032BCF3062FF807380001F70532BCF7049D
+:1020100032BCF30532D4F7060C3EC07E7400E600F5
+:10202000203400000001C07E7400E600202500007E
+:102030000001F7060C3EC77C7400203A0010E60051
+:10204000268C00000001F70432E4FF820010F584C2
+:102050006F5807380001202E0021E2002090F7057C
+:1020600032E4F7042D38F6862C2806380001F605F0
+:102070002D387739000220320044E6002084B5BABA
+:102080006802F0052D38F3020022E0002094F305E9
+:102090006F58F0056F54F58432C000000001902E97
+:1020A0000004872E000000000001203A0002E60034
+:1020B00021C0000000018702FF38032C0EF49316A4
+:1020C000FFCCF7057A689313FFFC9596FFB8078855
+:1020D0000008E00043A09793FFFC8596FFB82022FC
+:1020E0000000E600217C00000001862E0EF80000B2
+:1020F000000120320010E2002119F302004C872E6B
+:102100000F000000000107380001972E0F00872EF6
+:102110000F00E000217C000000019313FFFCF30698
+:102120007A289313FFFC76B10002C6B460007735BD
+:102130000004C7386A008316FFCCC7386000C73870
+:102140003000073800109713FFFC9596FFB89616DD
+:10215000FFB407880008E00126F89793FFFC861675
+:10216000FFB48596FFB80630000120320011E6006A
+:10217000217800000001F6020000962E0EF8F70408
+:1021800032C0F306E030C03A3200E60021C0000061
+:102190000001F704E0180000000177B8001E703E4F
+:1021A000FFE1E60021C1000000010F814000F704BB
+:1021B00079C80000000107380001F70579C8F70465
+:1021C00079C8F70471C400000001203A0000E6005D
+:1021D00021FDF6862C28F7042D3800000001063872
+:1021E0000001F6052D3877390002F302000A20328B
+:1021F0000044E60021FCB33A6802F0052D38F704EC
+:1022000071D4F68471CC07380001C03A6A00E60048
+:102210002218F70571D4F00571D4F68471D4F7044F
+:1022200071D0F00571C4C0367200470C0001F6840D
+:1022300032D00000000120360000E60025D9F70565
+:1022400071C8F704719800000001203A0000E60010
+:10225000257900000001F70475EC00000001203A28
+:102260000000E600257800000001F70475F000008A
+:102270000001203A0000E600257800000001E0009F
+:1022800025DCF306319CF0057A889002FF38F005D2
+:102290006F509002FF80F70432C4F3063228F30532
+:1022A00032D4F60432C8F6847A2CF50200000738DE
+:1022B0000024F7057A9820320000E60022D5F605C2
+:1022C0007A90C02A5A00E6002620C0326A00EE004A
+:1022D000262100000001F68432C00000000187368C
+:1022E000141000000001C7386000973614108736BC
+:1022F00014180000000107380001973614188736BB
+:102300001418F70432B800000001C7386000F70560
+:1023100032B8F70432BC0000000107380001F705AD
+:1023200032BCF70432BC20320000E6002345000036
+:102330000001F70432E0F5057A7007380001E0008B
+:102340002348F70532E0F5057A70F5846F580000F0
+:102350000001202E0021E200238CF6862C28F704B1
+:102360002D380000000106380001F6052D387739B8
+:10237000000220320044E6002380B5BA6802F0056E
+:102380002D38F3020022E0002390F3056F58F0058A
+:102390006F54F58432C000000001902E0004872E97
+:1023A000000000000001203A0002E60024BC00000A
+:1023B00000018702FF38032C0EF49316FFC4F705C3
+:1023C0007A689313FFFC9596FFB807880008E00031
+:1023D00043A09793FFFC8596FFB820220000E600FB
+:1023E000247800000001862E0EF800000001203243
+:1023F0000010E2002415F302004C872E0F000000AD
+:10240000000107380001972E0F00872E0F00E00013
+:102410002478000000019313FFFCF3067A2893133D
+:10242000FFFC76B10002C6B4600077350004C738FF
+:102430006A008316FFC4C7386000C7383000073809
+:1024400000109713FFFC9596FFB89616FFB4078807
+:102450000008E00126F89793FFFC8616FFB48596E6
+:10246000FFB80630000120320011E600247400009D
+:102470000001F6020000962E0EF8F70432C0F306B3
+:10248000E030C03A3200E60024BC00000001F7044E
+:10249000E0180000000177B8001E703EFFE1E60082
+:1024A00024BD000000010F814000F70479C800003E
+:1024B000000107380001F70579C8F70479C8F70467
+:1024C00071C400000001203A0000E60024F9F686FD
+:1024D0002C28F7042D380000000106380001F6050D
+:1024E0002D3877390002F302000A20320044E6005A
+:1024F00024F8B33A6802F0052D38F70471D4F68455
+:1025000071CC07380001C03A6A00E6002514F705CF
+:1025100071D4F00571D4F68471D4F70471D0F0054C
+:1025200071C4C0367200470C0001F68432D000003E
+:10253000000120360000E60025D9F70571C8F70430
+:10254000719800000001203A0000E60025790000A3
+:102550000001F70475EC00000001203A0000E600DD
+:10256000257800000001F70475F000000001203A12
+:102570000000E60025D100000001F58476F8000097
+:102580000001202E0021E20025C4F6862C28F70445
+:102590002D380000000106380001F6052D38773986
+:1025A000000220320044E60025B0B5BA6802F0050A
+:1025B0002D38F3020022F30576F8F3047700E000EB
+:1025C00025C8F30576FCF00576FCE00025D8F0057B
+:1025D0007A78E00025DCF306319CF3062EE0F30563
+:1025E00032D4F70471C800000001203A0000E60070
+:1025F000268CF6862C28F7042D38000000010638BA
+:102600000001F6052D3877390002F3020009203267
+:102610000044E600268CB33A6802E000268CF00500
+:102620002D38F7047A9000000001C03A6A00EE00ED
+:102630002641C5B40000C7385A00E0002648F70517
+:102640007A90C5B80000F0057A90F6847A88F7068B
+:102650007A2876350003A732700206B40001971677
+:10266000FFEC84A6FFFCF7067A2CF3047A98948298
+:10267000FF3C9302FF409582FF44B5B27002F7041D
+:102680007A98F6857A88C7385800F7057A98879639
+:10269000FFFC8296FFF802140000013C00000000DD
+:1026A00000019293FFFC02900008F7020001F70579
+:1026B0007A78F7063084F70532D4F70432C4000084
+:1026C00000019713FFFC07880008E00006109793AD
+:1026D000FFFC8796FFFC8296FFF802140000013C85
+:1026E0000000000000019293FFFC029000082210FD
+:1026F0000050F70432D0F3020000203A0000E60058
+:102700002A719316FFE4F68432C48616FFE48736F6
+:102710000008C3040000C03A3200E600273C203223
+:1027200000008736000C00000001C03A3200E600CD
+:10273000273C20320000F602000120320000E600B3
+:102740002A70F3020000F70432C09316FFACF58440
+:1027500032C4863A142803B81420042C000886BA20
+:10276000142400000001C0326A00EC0028289616EC
+:10277000FFEC77310001C738600077390002C638B6
+:1027800038000630000C86B20000872E000885163F
+:10279000FFACC0367200E60027B8C484000086B2E1
+:1027A0000004872E000C00000001C0367200E60015
+:1027B00027BC202A0000F5020001202A0000E600C4
+:1027C00027C900000001F482000086B200008722C1
+:1027D000000000000001C0367200E2002804F5820B
+:1027E0000000C0367200E600280C202E000086B2E1
+:1027F00000048722000400000001C0367200E200DD
+:10280000280D202E0000F5820001202E0000E60099
+:10281000281D20260000F482000120260000E6008A
+:102820002828F30200019316FFAC8316FFAC0000CA
+:102830000001201A0000E6002869F6020001871650
+:10284000FFEC0000000176B90001C6B4700076B557
+:102850000002C6B4380006B4001486B6000097160D
+:10286000FFF0E00028D09696FFF427140014971389
+:10287000FFFC9413FFFC9393FFFC9396FFBC078827
+:102880000008E00125689793FFFC8396FFBC202297
+:102890000000E60028CDF60200018716FFEC0000DC
+:1028A000000176B90001C6B4700076B50002C6B466
+:1028B000380006B4001486B600009716FFF096960E
+:1028C000FFF4971E0008E00028D420320000F60232
+:1028D000000020320000E6002A70F3020000F60437
+:1028E00032C09316FFAC86B2142803B01420043013
+:1028F000148C8732142400000001C0367200EC00F2
+:1029000029BC9696FFEC77350001C7386800773907
+:102910000002C5B8380005AC000C86AE0000873256
+:10292000148C8516FFACC0367200E600294CC484B6
+:10293000000086AE00048732149000000001C0360B
+:102940007200E6002950202A0000F5020001202A2A
+:102950000000E600295D00000001F482000086AE60
+:1029600000008722000000000001C0367200E20073
+:102970002998F6020000C0367200E60029A0203235
+:10298000000086AE00048722000400000001C0366B
+:102990007200E20029A120320000F602000120327C
+:1029A0000000E60029B120260000F4820001202664
+:1029B0000000E60029BCF30200019316FFAC831669
+:1029C000FFAC00000001201A0000E60029FDF6021D
+:1029D00000018716FFEC0000000176B90001C6B4C3
+:1029E000700076B50002C6B4380006B4001486B68E
+:1029F00000009716FFF0E0002A649696FFF4271473
+:102A000000149713FFFC9413FFFC9393FFFC939621
+:102A1000FFBC07880008E00125689793FFFC8396B8
+:102A2000FFBC20220000E6002A61F60200018716A2
+:102A3000FFEC0000000176B90001C6B4700076B565
+:102A40000002C6B4380006B4001486B6000097161B
+:102A5000FFF09696FFF4971E0008E0002A682032E7
+:102A60000000F602000020320000E6002BCDF30249
+:102A70000001F68432C00000000185B60EF48636EF
+:102A80000EF8202E0010E2002A9420320010E200FE
+:102A90002AB10000000187360F000000000107384E
+:102AA000000197360F0087360F00E0002ADCF7029E
+:102AB000000007300001C03A5A00E6002AD5F6822D
+:102AC000000020320010E6002AD8202E0000E60088
+:102AD0002ADCC7340000F6820001C7340000203A27
+:102AE0000000E6002BCCF3020001F30432CC00001E
+:102AF00000019316FFDC9313FFFC07880008E00039
+:102B000043689793FFFC20220000E6002BB4F302F9
+:102B100000008316FFDC00000001861A00000000A0
+:102B2000000120320010E2002B4976B10002871A22
+:102B3000000C0000000107380001971A000C871AEA
+:102B4000000CE0002BB4F3020000F302004C9313DE
+:102B5000FFFCC6B4600077350004C7386A008316EE
+:102B6000FFDCC7386000C738300007380010971303
+:102B7000FFFCF3067A289313FFFC9616FFB4078830
+:102B80000008E00126F89793FFFC8616FFB40000CA
+:102B900000010630000120320011E6002BA40000E5
+:102BA0000001F60200008316FFDC00000001961A07
+:102BB0000000F30200019316FFD48316FFD4000037
+:102BC0000001201A0000E6002BD0F302000193164A
+:102BD000FFE48316FFE400000001201A0000E60075
+:102BE0002CEDF6820CABF70432B48316FFD4073811
+:102BF0000001F70532B4F70432B4201A0000E600F1
+:102C00002C2800000001F70432C0F306E030C03A7F
+:102C10003200E6002C2800000001F70432E8000032
+:102C2000000107380001F70532E8F70471C400001D
+:102C30000001203A0000E6002C65F6862C28F704F7
+:102C40002D380000000106380001F6052D387739CF
+:102C50000002F302000A20320044E6002C64B33A7A
+:102C60006802F0052D38F70471D4F68471CC07386A
+:102C70000001C03A6A00E6002C80F70571D4F00527
+:102C800071D4F68471D4F70471D0F00571C4C036E4
+:102C90007200470C0001F68432D00000000120369B
+:102CA0000000E6003391F70571C8F7047198000041
+:102CB0000001203A0000E600333100000001F70473
+:102CC00075EC00000001203A0000E60033300000FF
+:102CD0000001F70475F000000001203A0000E60052
+:102CE000333000000001E0003394F306319CF0051E
+:102CF00032E8F70432C0F6046F5496BA000420326A
+:102D00000000E6002D18F302000CF3020001F305A9
+:102D10006F54E0002D20F7020001F3056F58F70211
+:102D20000000203A0000E6002D34F3062F6CE0008E
+:102D30003444F30532D4F5847A7024940010202EA4
+:102D40000001E600303CF5857AA0F7020001F604A8
+:102D500032C8F7057A70F70432C4F68432C0F6053B
+:102D60007A2C9002FF809002FF38F5847A28073889
+:102D700000249582FF3C9702FF409602FF4487366D
+:102D8000141000000001C738600097361410873611
+:102D90001418000000010738000197361418873610
+:102DA0001418F0056F50F70432B89596FFECC73849
+:102DB0006000F70532B8F70432BCF3062FF8073885
+:102DC0000001F70532BCF70432BCF30532D4F70634
+:102DD0000C3EC07E7400E6002DEC00000001C07EB9
+:102DE0007400E6002DDD00000001F7060C3EC77CF4
+:102DF0007400203A0010E600344400000001F7049B
+:102E000032E4FF820010F5846F5807380001202E4D
+:102E10000021E2002E48F70532E4F7042D38F6864B
+:102E20002C2806380001F6052D38773900022032AB
+:102E30000044E6002E3CB5BA6802F0052D38F302D6
+:102E40000022E0002E4CF3056F58F0056F54F58416
+:102E500032C000000001902E0004872E0000000008
+:102E60000001203A0002E6002F78000000018702EE
+:102E7000FF38032C0EF49316FFCCF7057A689313F2
+:102E8000FFFC9596FFB807880008E00043A09793E1
+:102E9000FFFC8596FFB820220000E6002F340000DA
+:102EA0000001862E0EF80000000120320010E20022
+:102EB0002ED1F302004C872E0F00000000010738CE
+:102EC0000001972E0F00872E0F00E0002F34000026
+:102ED00000019313FFFCF3067A289313FFFC76B1ED
+:102EE0000002C6B4600077350004C7386A00831654
+:102EF000FFCCC7386000C738300007380010971380
+:102F0000FFFC9596FFB89616FFB407880008E0010D
+:102F100026F89793FFFC8616FFB48596FFB8063017
+:102F2000000120320011E6002F3000000001F602FF
+:102F30000000962E0EF8F70432C0F306E030C03AD7
+:102F40003200E6002F7800000001F704E0180000CE
+:102F5000000177B8001E703EFFE1E6002F79000007
+:102F600000010F814000F70479C800000001073814
+:102F70000001F70579C8F70479C8F70471C40000A7
+:102F80000001203A0000E6002FB5F6862C28F70451
+:102F90002D380000000106380001F6052D3877397C
+:102FA0000002F302000A20320044E6002FB4B33AD4
+:102FB0006802F0052D38F70471D4F68471CC073817
+:102FC0000001C03A6A00E6002FD0F70571D4F00581
+:102FD00071D4F68471D4F70471D0F00571C4C03691
+:102FE0007200470C0001F68432D000000001203648
+:102FF0000000E6003391F70571C8F70471980000EE
+:103000000001203A0000E600333100000001F7041F
+:1030100075EC00000001203A0000E60033300000AB
+:103020000001F70475F000000001203A0000E600FE
+:10303000333000000001E0003394F306319CF005CA
+:103040007A889002FF38F0056F509002FF80F704F5
+:1030500032C4F3063228F30532D4F60432C8F684BB
+:103060007A2CF502000007380024F7057A98203200
+:103070000000E600308DF6057A90C02A5A00E6007E
+:1030800033D8C0326A00EE0033D900000001F68464
+:1030900032C0000000018736141000000001C7385C
+:1030A00060009736141087361418000000010738A6
+:1030B00000019736141887361418F70432B8000048
+:1030C0000001C7386000F70532B8F70432BC0000D1
+:1030D000000107380001F70532BCF70432BC20328A
+:1030E0000000E60030FD00000001F70432E0F505C5
+:1030F0007A7007380001E0003100F70532E0F5058D
+:103100007A70F5846F5800000001202E0021E20043
+:103110003144F6862C28F7042D38000000010638CB
+:103120000001F6052D387739000220320044E60010
+:103130003138B5BA6802F0052D38F3020022E000FC
+:103140003148F3056F58F0056F54F58432C0000024
+:103150000001902E0004872E000000000001203A9C
+:103160000002E6003274000000018702FF38032CE1
+:103170000EF49316FFC4F7057A689313FFFC959637
+:10318000FFB807880008E00043A09793FFFC8596EE
+:10319000FFB820220000E600323000000001862E39
+:1031A0000EF80000000120320010E20031CDF302E1
+:1031B000004C872E0F000000000107380001972EF9
+:1031C0000F00872E0F00E000323000000001931343
+:1031D000FFFCF3067A289313FFFC76B10002C6B415
+:1031E000600077350004C7386A008316FFC4C7380B
+:1031F0006000C7383000073800109713FFFC959621
+:10320000FFB89616FFB407880008E00126F89793E8
+:10321000FFFC8616FFB48596FFB806300001203209
+:103220000011E600322C00000001F6020000962E8C
+:103230000EF8F70432C0F306E030C03A3200E60080
+:10324000327400000001F704E0180000000177B8B4
+:10325000001E703EFFE1E6003275000000010F81A4
+:103260004000F70479C80000000107380001F705A5
+:1032700079C8F70479C8F70471C400000001203A46
+:103280000000E60032B1F6862C28F7042D38000045
+:10329000000106380001F6052D3877390002F302E7
+:1032A000000A20320044E60032B0B33A6802F0056A
+:1032B0002D38F70471D4F68471CC07380001C03A78
+:1032C0006A00E60032CCF70571D4F00571D4F684BB
+:1032D00071D4F70471D0F00571C4C0367200470C88
+:1032E0000001F68432D00000000120360000E60024
+:1032F0003391F70571C8F704719800000001203A76
+:103300000000E600333100000001F70475EC000016
+:103310000001203A0000E600333000000001F7040D
+:1033200075F000000001203A0000E600338900003B
+:103330000001F58476F800000001202E0021E20053
+:10334000337CF6862C28F7042D380000000106385F
+:103350000001F6052D387739000220320044E600DE
+:103360003368B5BA6802F0052D38F3020022F30580
+:1033700076F8F3047700E0003380F30576FCF0057F
+:1033800076FCE0003390F0057A78E0003394F306A1
+:10339000319CF3062EE0F30532D4F70471C8000027
+:1033A0000001203A0000E6003444F6862C28F70499
+:1033B0002D380000000106380001F6052D38773958
+:1033C0000002F302000920320044E6003444B33A1C
+:1033D0006802E0003444F0052D38F7047A900000CC
+:1033E0000001C03A6A00EE0033F9C5B40000C738E6
+:1033F0005A00E0003400F7057A90C5B80000F005E7
+:103400007A90F6847A88F7067A2876350003A73210
+:10341000700206B400019716FFEC84A6FFFCF706C5
+:103420007A2CF3047A989482FF3C9302FF409582B1
+:10343000FF44B5B27002F7047A98F6857A88C738E7
+:103440005800F7057A988796FFFC8296FFF80214D9
+:103450000000013C0000000000019293FFFC02907C
+:10346000000822100020F5847A7000000001202E50
+:103470000001E600376CF5857AA0F7020001F6043A
+:1034800032C8F7057A70F70432C4F68432C0F60504
+:103490007A2C9002FF809002FF38F5847A28073852
+:1034A00000249582FF3C9702FF409602FF44873636
+:1034B000141000000001C7386000973614108736DA
+:1034C00014180000000107380001973614188736D9
+:1034D0001418F0056F50F70432B89596FFF4C7380A
+:1034E0006000F70532B8F70432BCF4862FF80738CD
+:1034F0000001F70532BCF70432BCF48532D4F7067C
+:103500000C3EC07E7400E600351C00000001C07E49
+:103510007400E600350D00000001F7060C3EC77C84
+:103520007400203A0010E6003B7000000001F70430
+:1035300032E4FF820010F5846F5807380001202E16
+:103540000021E2003578F70532E4F7042D38F686DD
+:103550002C2806380001F6052D3877390002203274
+:103560000044E600356CB5BA6802F0052D38F482E7
+:103570000022E000357CF4856F58F0056F54F58427
+:1035800032C000000001902E0004872E00000000D1
+:103590000001203A0002E60036A800000001870280
+:1035A000FF3804AC0EF49496FFECF7057A68949318
+:1035B000FFFC9596FFDC07880008E00043A0979386
+:1035C000FFFC8596FFDC20220000E6003664000048
+:1035D0000001862E0EF80000000120320010E200EB
+:1035E0003601F482004C872E0F00000000010738DE
+:1035F0000001972E0F00872E0F00E00036640000B8
+:1036000000019493FFFCF4867A289493FFFC76B132
+:103610000002C6B4600077350004C7386A0084969B
+:10362000FFECC7386000C738480007380010971310
+:10363000FFFC9596FFDC9616FFD807880008E0018E
+:1036400026F89793FFFC8616FFD88596FFDC063098
+:10365000000120320011E600366000000001F60291
+:103660000000962E0EF8F70432C0F486E030C03A1F
+:103670004A00E60036A800000001F704E018000048
+:10368000000177B8001E703EFFE1E60036A9000099
+:1036900000010F814000F70479C8000000010738DD
+:1036A0000001F70579C8F70479C8F70471C4000070
+:1036B0000001203A0000E60036E5F6862C28F704E3
+:1036C0002D380000000106380001F6052D38773945
+:1036D0000002F482000A20320044E60036E4B4BA64
+:1036E0006802F0052D38F70471D4F68471CC0738E0
+:1036F0000001C03A6A00E6003700F70571D4F00512
+:1037000071D4F68471D4F70471D0F00571C4C03659
+:103710007200470C0001F68432D000000001203610
+:103720000000E6003AC1F70571C8F704719800007F
+:103730000001203A0000E6003A6100000001F704B1
+:1037400075EC00000001203A0000E6003A6000003D
+:103750000001F70475F000000001203A0000E600C7
+:103760003A6000000001E0003AC4F486319CF005A4
+:103770007A889002FF38F0056F509002FF80F704BE
+:1037800032C4F4863228F48532D4F60432C8F68482
+:103790007A2CF502000007380024F7057A982032C9
+:1037A0000000E60037BDF6057A90C02A5A00E60010
+:1037B0003B08C0326A00EE003B0900000001F684BD
+:1037C00032C0000000018736141000000001C73825
+:1037D000600097361410873614180000000107386F
+:1037E00000019736141887361418F70432B8000011
+:1037F0000001C7386000F70532B8F70432BC00009A
+:10380000000107380001F70532BCF70432BC203252
+:103810000000E600382D00000001F70432E0F50555
+:103820007A7007380001E0003830F70532E0F5051E
+:103830007A70F5846F5800000001202E0021E2000C
+:103840003874F6862C28F7042D380000000106385D
+:103850000001F6052D387739000220320044E600D9
+:103860003868B5BA6802F0052D38F4820022E0000D
+:103870003878F4856F58F0056F54F58432C0000035
+:103880000001902E0004872E000000000001203A65
+:103890000002E60039A4000000018702FF3804ACF2
+:1038A0000EF49496FFE4F7057A689493FFFC9596DE
+:1038B000FFDC07880008E00043A09793FFFC859693
+:1038C000FFDC20220000E600396000000001862EA7
+:1038D0000EF80000000120320010E20038FDF482F2
+:1038E000004C872E0F000000000107380001972EC2
+:1038F0000F00872E0F00E000396000000001949354
+:10390000FFFCF4867A289493FFFC76B10002C6B4DB
+:10391000600077350004C7386A008496FFE4C73832
+:103920006000C7384800073800109713FFFC9596D1
+:10393000FFDC9616FFD807880008E00126F8979369
+:10394000FFFC8616FFD88596FFDC0630000120328A
+:103950000011E600395C00000001F6020000962E1E
+:103960000EF8F70432C0F486E030C03A4A00E600B0
+:1039700039A400000001F704E0180000000177B846
+:10398000001E703EFFE1E60039A5000000010F8136
+:103990004000F70479C80000000107380001F7056E
+:1039A00079C8F70479C8F70471C400000001203A0F
+:1039B0000000E60039E1F6862C28F7042D380000D7
+:1039C000000106380001F6052D3877390002F4822F
+:1039D000000A20320044E60039E0B4BA6802F0057B
+:1039E0002D38F70471D4F68471CC07380001C03A41
+:1039F0006A00E60039FCF70571D4F00571D4F6844D
+:103A000071D4F70471D0F00571C4C0367200470C50
+:103A10000001F68432D00000000120360000E600EC
+:103A20003AC1F70571C8F704719800000001203A07
+:103A30000000E6003A6100000001F70475EC0000A8
+:103A40000001203A0000E6003A6000000001F7049F
+:103A500075F000000001203A0000E6003AB90000CD
+:103A60000001F58476F800000001202E0021E2001C
+:103A70003AACF6862C28F7042D38000000010638F1
+:103A80000001F6052D387739000220320044E600A7
+:103A90003A98B5BA6802F0052D38F4820022F48510
+:103AA00076F8F4847700E0003AB0F48576FCF0050F
+:103AB00076FCE0003AC0F0057A78E0003AC4F4867B
+:103AC000319CF4862EE0F48532D4F70471C80000EE
+:103AD0000001203A0000E6003B70F6862C28F7042F
+:103AE0002D380000000106380001F6052D38773921
+:103AF0000002F482000920320044E6003B70B4BAB0
+:103B00006802E0003B70F0052D38F7047A90000061
+:103B10000001C03A6A00EE003B29C5B40000C73876
+:103B20005A00E0003B30F7057A90C5B80000F00578
+:103B30007A90F7047A88F6867A2876390003A6B256
+:103B4000680207380001F7057A88F7047A98969694
+:103B5000FFF49682FF3CF4847A98F6867A2CC73874
+:103B600058009482FF409582FF44B5B26802F70581
+:103B70007A988796FFFC8296FFF802140000013CB9
+:103B80000000000000019293FFFC02900008221048
+:103B90000018F5047A88F7067A2CF5847A9076A9CD
+:103BA0000003A6B67002202E0000E6003BCD000008
+:103BB0000001F7047AA000000001C02A7200E600AC
+:103BC0003F18C02E6A00EE003F1900000001F68485
+:103BD00032C0F60432C88736141000000001C7381E
+:103BE000600097361410873614180000000107385B
+:103BF00000019736141887361418F70432B80000FD
+:103C00000001C7386000F70532B8F70432BC000085
+:103C1000000107380001F70532BCF70432BC202E42
+:103C20000000E6003C3DF6820000F70432E0F68535
+:103C30007A7007380001E0003C40F70532E0F505F6
+:103C40007A70F5846F5800000001202E0021E200F8
+:103C50003C84F6862C28F7042D3800000001063835
+:103C60000001F6052D387739000220320044E600C5
+:103C70003C78B5BA6802F0052D38F4820022E000E5
+:103C80003C88F4856F58F0056F54F58432C000000D
+:103C90000001902E0004872E000000000001203A51
+:103CA0000002E6003DB4000000018702FF3804ACCA
+:103CB0000EF49496FFECF7057A689493FFFC9596C2
+:103CC000FFE407880008E00043A09793FFFC859677
+:103CD000FFE420220000E6003D7000000001862E77
+:103CE0000EF80000000120320010E2003D0DF482C9
+:103CF000004C872E0F000000000107380001972EAE
+:103D00000F00872E0F00E0003D700000000194932B
+:103D1000FFFCF4867A289493FFFC76B10002C6B4C7
+:103D2000600077350004C7386A008496FFECC73816
+:103D30006000C7384800073800109713FFFC9596BD
+:103D4000FFE49616FFE007880008E00126F8979345
+:103D5000FFFC8616FFE08596FFE406300001203266
+:103D60000011E6003D6C00000001F6020000962EF6
+:103D70000EF8F70432C0F486E030C03A4A00E6009C
+:103D80003DB400000001F704E0180000000177B81E
+:103D9000001E703EFFE1E6003DB5000000010F810E
+:103DA0004000F70479C80000000107380001F7055A
+:103DB00079C8F70479C8F70471C400000001203AFB
+:103DC0000000E6003DF1F6862C28F7042D380000AF
+:103DD000000106380001F6052D3877390002F4821B
+:103DE000000A20320044E6003DF0B4BA6802F00553
+:103DF0002D38F70471D4F68471CC07380001C03A2D
+:103E00006A00E6003E0CF70571D4F00571D4F68423
+:103E100071D4F70471D0F00571C4C0367200470C3C
+:103E20000001F68432D00000000120360000E600D8
+:103E30003ED1F70571C8F704719800000001203ADF
+:103E40000000E6003E7100000001F70475EC000080
+:103E50000001203A0000E6003E7000000001F70477
+:103E600075F000000001203A0000E6003EC90000A5
+:103E70000001F58476F800000001202E0021E20008
+:103E80003EBCF6862C28F7042D38000000010638C9
+:103E90000001F6052D387739000220320044E60093
+:103EA0003EA8B5BA6802F0052D38F4820022F485E8
+:103EB00076F8F4847700E0003EC0F48576FCF005E7
+:103EC00076FCE0003ED0F0057A78E0003ED4F4863F
+:103ED000319CF4862EE0F48532D4F70471C80000DA
+:103EE0000001203A0000E6003F80F6862C28F70407
+:103EF0002D380000000106380001F6052D3877390D
+:103F00000002F482000920320044E6003F80B4BA87
+:103F10006802E0003F80F0052D38F7047A90000039
+:103F20000001C03A6A00EE003F39C5B40000C7384E
+:103F30005A00E0003F40F7057A90C5B80000F00550
+:103F40007A90F7047A88F6867A2876390003A6B242
+:103F5000680207380001F7057A88F7047A98969680
+:103F6000FFF49682FF3CF4847A98F6867A2CC73860
+:103F700058009482FF409582FF44B5B26802F7056D
+:103F80007A988796FFFC8296FFF802140000013CA5
+:103F90000000000000019293FFFC02900008221034
+:103FA0000010F5846F5800000001202E0021E2006F
+:103FB0003FE4F6862C28F7042D380000000106386F
+:103FC0000001F6052D387739000220320044E60062
+:103FD0003FD8B5BA6802F0052D38F5020022E0009E
+:103FE0003FE8F5056F58F0056F54F58432C00000C6
+:103FF0000001902E0004872E000000000001203AEE
+:104000000002E6004114000000018702FF38052C81
+:104010000EF49516FFF4F7057A689513FFFC959654
+:10402000FFEC07880008E00043A09793FFFC85960B
+:10403000FFEC20220000E60040D000000001862EA8
+:104040000EF80000000120320010E200406DF50281
+:10405000004C872E0F000000000107380001972E4A
+:104060000F00872E0F00E00040D0000000019513E4
+:10407000FFFCF5067A289513FFFC76B10002C6B462
+:10408000600077350004C7386A008516FFF4C7382A
+:104090006000C7385000073800109713FFFC959652
+:1040A000FFEC9616FFE807880008E00126F89793D2
+:1040B000FFFC8616FFE88596FFEC063000012032F3
+:1040C0000011E60040CC00000001F6020000962E30
+:1040D0000EF8F70432C0F506E030C03A5200E600B0
+:1040E000411400000001F704E0180000000177B857
+:1040F000001E703EFFE1E6004115000000010F8147
+:104100004000F70479C80000000107380001F705F6
+:1041100079C8F70479C8F70471C400000001203A97
+:104120000000E6004151F6862C28F7042D380000E7
+:10413000000106380001F6052D3877390002F50236
+:10414000000A20320044E6004150B53A6802F0050A
+:104150002D38F70471D4F68471CC07380001C03AC9
+:104160006A00E600416CF70571D4F00571D4F6845D
+:1041700071D4F70471D0F00571C4C0367200470CD9
+:104180000001F68432D00000000120360000E60075
+:104190004231F70571C8F704719800000001203A18
+:1041A0000000E60041D100000001F70475EC0000BA
+:1041B0000001203A0000E60041D000000001F704B1
+:1041C00075F000000001203A0000E60042290000DE
+:1041D0000001F58476F800000001202E0021E200A5
+:1041E000421CF6862C28F7042D3800000001063802
+:1041F0000001F6052D387739000220320044E60030
+:104200004208B5BA6802F0052D38F5020022F5051E
+:1042100076F8F5047700E0004220F50576FCF0051D
+:1042200076FCE0004230F0057A78E0004234F50692
+:10423000319CF5062EE0F50532D4F70471C8000074
+:104240000001203A0000E6004274F6862C28F704AC
+:104250002D380000000106380001F6052D387739A9
+:104260000002F502000920320044E6004274B53A2B
+:104270006802F0052D388796FFFC8296FFF802143D
+:104280000000013C0000000000019293FFFC02903E
+:104290000008F70632D49713FFFCF7062EE09713B9
+:1042A000FFFC07880008E00014F49793FFFCF70672
+:1042B00032D49713FFFCF7062F6C9713FFFC078887
+:1042C0000008E00014F49793FFFCF70632D497132C
+:1042D000FFFCF7062FF89713FFFC07880008E000A3
+:1042E00014F49793FFFCF70632D49713FFFCF706FC
+:1042F00030849713FFFC07880008E00014F49793BC
+:10430000FFFCF70632D49713FFFCF7063110971322
+:10431000FFFC07880008E00014F49793FFFCF70601
+:1043200032D49713FFFCF706319C9713FFFC0788E4
+:104330000008E00014F49793FFFCF70632D49713BB
+:10434000FFFCF70632289713FFFC07880008E000FF
+:1043500014F49793FFFC8796FFFC8296FFF80214F3
+:104360000000013C0000000000019293FFFC02905D
+:104370000008871600000000000186BA0000873A96
+:10438000000400000001C0367200440C0001879652
+:10439000FFFC8296FFF802140004013C00000000BC
+:1043A00000019293FFFC0290000885960000000037
+:1043B0000001862E000086AE000420320010E200CC
+:1043C00043D00000000120360010E20043ED073426
+:1043D0000001872E000C0000000107380001972E15
+:1043E000000C872E000CE0004414F4020000C03AD8
+:1043F0006200E6004411F402000020360010E600DE
+:1044000044140000000120320000E60044140000C3
+:104410000001F40200018796FFFC8296FFF8021467
+:104420000004013C0000000000019293FFFC029098
+:104430000008F7020001F7053524F7046F44000077
+:104440000001F7053528F70632F49713FFFCF7064D
+:1044500035309713FFFC07880008E0001548979354
+:10446000FFFCF70245049713FFFCF702000D9713BA
+:10447000FFFCF70632F49713FFFC07880008E00002
+:10448000161C9793FFFCF7024A049713FFFCF702F0
+:10449000000F9713FFFCF70633809713FFFC078884
+:1044A0000008E000161C9793FFFCF7024EEC9713F0
+:1044B000FFFCF70200089713FFFCF706340C971374
+:1044C000FFFC07880008E000161C9793FFFCF7022A
+:1044D00057649713FFFCF70200079713FFFCF706DA
+:1044E00034989713FFFC07880008E000161C979388
+:1044F000FFFC8796FFFC8296FFF802140000013C47
+:104500000000000000019293FFFC029000082210BE
+:104510000014F70475F800000001203A0000E600DE
+:10452000452DF68675F8E0004544F7020000F704D3
+:1045300076040000000177390002C7386800873A26
+:10454000001800000001203A0000E600455CF70575
+:104550003548F4863380E00049F0F4853530F704BF
+:104560006F5400000001203A0000E6004580F4820C
+:104570000008F4820001F4856F54E0004588F702DA
+:104580000001F4856F58F7020000203A0000E600B1
+:1045900045A0F4820004F486340CE00049F0F48570
+:1045A0003530F6843548F604352CF4B72800073446
+:1045B0000002F4820001F4BB28008732008CF482F0
+:1045C00000019736001887320090F4856F509736B7
+:1045D000000484B200840000000194B6001084B28C
+:1045E00000880000000194B6001484B6001000009A
+:1045F000000194B6000884B600140000000194B6CF
+:10460000000C84B2009800000001F4853554F48257
+:1046100000019482FF80F5043554F4863498F485C3
+:1046200035309502FF3885B2000006B4002495822B
+:10463000FF3C9682FF4087320004F6853550970292
+:10464000FF4486B20004F005354CF704354095165A
+:10465000FFF49596FFF4C7386800F7053540F584F8
+:10466000352886B20004872E141400000001C738D4
+:104670006800972E14148732008000000001203A51
+:104680000001EE0049F0F7060C3EC07E7400E60023
+:1046900046A400000001C07E7400E60046950000BC
+:1046A0000001F7060C3EC77C7400203A0010E600BB
+:1046B00049F000000001FF8200108682FF38F704F5
+:1046C0003558F5846F58F685355407380001202E8B
+:1046D0000021E2004708F7053558F7042D38F68623
+:1046E0002C2806380001F6052D38773900022032D3
+:1046F0000044E60046FCB5BA6802F0052D38F482A5
+:104700000022E000470CF4856F58F0056F54F684E2
+:10471000352C0000000187360094C4840000C03AA4
+:104720004A00E60047710000000186360094F684D6
+:1047300035540000000176B4FFF0F7043554969626
+:10474000FFF4473900009716FFF0C6B47000F70475
+:10475000354877B4000F703EFFE107380024E600CB
+:104760004769C638600006B40001C7046E00F7331D
+:104770002800F6843544000000018736000400005C
+:104780000001203A000FE20047BD073800018736DC
+:10479000000C00000001073800019736000C873636
+:1047A000000CE00047D000000001F7043528F68235
+:1047B000000107380008E0004968F7053544203A51
+:1047C0000010E60047CC00000001F7020000973619
+:1047D0000004F704353CF684352807380001F70556
+:1047E000353CF704353C8736141C000000010738BF
+:1047F00000019736141CF704760486B6141CF604E0
+:1048000075FC07380001F684760000000001C03A0C
+:104810006A00E600481CF7057604F0057604F68485
+:104820007604F7047608F00575FCC0367200470C74
+:10483000000120320000E6004881F70575F8F70412
+:104840007648F4867218C03A4A00470C0001203AB4
+:104850000000E6004881F6862C28F7042D38000079
+:10486000000106380001F6052D3877390002F48280
+:10487000000E20320044E6004880B4BA6802F00519
+:104880002D38F5020000202A0002EE004968F68269
+:104890000000F68435280000000187360000000083
+:1048A0000001203A0002E600493C05B40008959357
+:1048B000FFFC9516FFEC9596FFE89696FFE40788B7
+:1048C0000008E0005EDC9793FFFC8516FFEC859600
+:1048D000FFE88696FFE420220000E600492CF7025C
+:1048E00000008636000C000000012032000FE200BC
+:1048F000491100000001873600140000000107384C
+:1049000000019736001487360014E000492CF702A6
+:10491000000076B10002C6B4600077350005C738E4
+:104920006A00C738600007380010C72C7000203AB2
+:104930000000E60047A8F705352CF6843528F70473
+:104940006F4C00000001C0367200E600495C07347D
+:104950001494F4846F44E0004960F4853528F70529
+:104960003528E00048840528000120360000E600D4
+:1049700049A1F6862C28F7042D38000000010638DE
+:104980000001F6052D3877390002F482000D20323F
+:104990000044E60049A8B4BA6802E00049A8F0055E
+:1049A0002D38F4820001F4853524F6843528F70487
+:1049B0006F44F48632F4C0367200E60049F0F485A4
+:1049C0003530F704E0180000000177B8001F703E92
+:1049D000FFE1E60049F1000000010F814000F7040B
+:1049E00079C80000000107380001F70579C8F7040D
+:1049F00079C88796FFFC8296FFF802140000013CFC
+:104A00000000000000019293FFFC029000082210B9
+:104A10000014F70475F800000001203A0000E600D9
+:104A20004A2DF68675F8E0004A40F6820000F70449
+:104A300076040000000177390002C738680086BAA2
+:104A40000018F7046F5400000001203A0000E6004F
+:104A50004A64F6853548F4820001F4856F54E0001D
+:104A60004A70F7020001F4820008F4856F58F702DB
+:104A70000000203A0000E6004A88F4820004F48630
+:104A8000340CE0004ED8F4853530F6843548F60411
+:104A9000352CF4B7280007340002F4820001F4BB7F
+:104AA00028008732008CF482000197360018873284
+:104AB0000090F4856F509736000484B200840000A3
+:104AC000000194B6001084B200880000000194B682
+:104AD000001484B600100000000194B6000884B6EB
+:104AE00000140000000194B6000C84B2009800008D
+:104AF0000001F4853554F48200019482FF80F504AE
+:104B00003554F4863498F48535309502FF3885B2F3
+:104B1000000006B400249582FF3C9682FF40873255
+:104B20000004F68535509702FF4486B20004F00574
+:104B3000354CF70435409516FFF49596FFF4C738C9
+:104B40006800F7053540F584352886B20004872EC5
+:104B5000141400000001C7386800972E141487321F
+:104B6000008000000001203A0001EE004ED8F70658
+:104B70000C3EC07E7400E6004B8C00000001C07E3D
+:104B80007400E6004B7D00000001F7060C3EC77C78
+:104B90007400203A0010E6004ED800000001FF82A9
+:104BA00000108682FF38F7043558F5846F58F68573
+:104BB000355407380001202E0021E2004BF0F705A4
+:104BC0003558F7042D38F6862C2806380001F605EE
+:104BD0002D387739000220320044E6004BE4B5BAA4
+:104BE0006802F0052D38F4820022E0004BF4F485D1
+:104BF0006F58F0056F54F684352C0000000187369D
+:104C00000094C4840000C03A4A00E6004C590000F9
+:104C1000000186360094F68435540000000176B415
+:104C2000FFF0F70435549696FFF4473900009716C5
+:104C3000FFF0C6B47000F704354877B4000F703E3B
+:104C4000FFE107380024E6004C51C638600006B486
+:104C50000001C7046E00F7332800F68435440000D5
+:104C600000018736000400000001203A000FE20036
+:104C70004CA5073800018736000C000000010738FA
+:104C800000019736000C8736000CE0004CB800009D
+:104C90000001F7043528F682000107380008E0001B
+:104CA0004E50F7053544203A0010E6004CB40000A1
+:104CB0000001F702000097360004F704353CF68443
+:104CC000352807380001F705353CF704353C8736B1
+:104CD000141C00000001073800019736141CF7046B
+:104CE000760486B6141CF60475FC07380001F684B9
+:104CF000760000000001C03A6A00E6004D04F705A6
+:104D00007604F0057604F6847604F7047608F00558
+:104D100075FCC0367200470C000120320000E6002E
+:104D20004D69F70575F8F7047648F4867218C03AAD
+:104D30004A00470C0001203A0000E6004D69F68663
+:104D40002C28F7042D380000000106380001F60574
+:104D50002D3877390002F482000E20320044E6003C
+:104D60004D68B4BA6802F0052D38F5020000202A1B
+:104D70000002EE004E50F6820000F6843528000056
+:104D800000018736000000000001203A0002E60022
+:104D90004E2405B400089593FFFC9516FFEC9596FC
+:104DA000FFE89696FFE407880008E0005EDC979332
+:104DB000FFFC8516FFEC8596FFE88696FFE420222F
+:104DC0000000E6004E14F70200008636000C0000DA
+:104DD00000012032000FE2004DF90000000187368B
+:104DE00000140000000107380001973600148736D0
+:104DF0000014E0004E14F702000076B10002C6B4C1
+:104E0000600077350005C7386A00C738600007388A
+:104E10000010C72C7000203A0000E6004C90F70507
+:104E2000352CF6843528F7046F4C00000001C0369D
+:104E30007200E6004E4407341494F4846F44E0009A
+:104E40004E48F4853528F7053528E0004D6C0528D7
+:104E5000000120360000E6004E89F6862C28F70473
+:104E60002D380000000106380001F6052D3877398D
+:104E70000002F482000D20320044E6004E90B4BAE5
+:104E80006802E0004E90F0052D38F4820001F485B0
+:104E90003524F6843528F7046F44F48632F4C0369E
+:104EA0007200E6004ED8F4853530F704E0180000B3
+:104EB000000177B8001F703EFFE1E6004ED9000008
+:104EC00000010F814000F70479C800000001073895
+:104ED0000001F70579C8F70479C88796FFFC829628
+:104EE000FFF802140000013C000000000001929352
+:104EF000FFFC0290000822100014F6843548F604E6
+:104F0000352CF4820004F4B7280007340002F48240
+:104F10000001F4BB28008732008CF4820001973630
+:104F2000001887320090F4856F509736000484B2E1
+:104F300000840000000194B6001084B200880000D4
+:104F4000000194B6001484B600100000000194B66D
+:104F5000000884B600140000000194B6000C84B26E
+:104F6000009800000001F4853554F4820001948219
+:104F7000FF80F5043554F4863498F4853530950275
+:104F8000FF3885B2000006B400249582FF3C96826B
+:104F9000FF4087320004F68535509702FF4486B201
+:104FA0000004F005354CF70435409516FFF495964E
+:104FB000FFF4C7386800F7053540F584352886B218
+:104FC0000004872E141400000001C7386800972ED3
+:104FD00014148732008000000001203A0001EE0026
+:104FE000534CF7060C3EC07E7400E60050000000F3
+:104FF0000001C07E7400E6004FF100000001F706DA
+:105000000C3EC77C7400203A0010E600534C0000B0
+:105010000001FF8200108682FF38F7043558F584BE
+:105020006F58F685355407380001202E0021E20024
+:105030005064F7053558F7042D38F6862C280638C5
+:105040000001F6052D387739000220320044E600D1
+:105050005058B5BA6802F0052D38F4820022E000FD
+:105060005068F4856F58F0056F54F684352C0000B5
+:10507000000187360094C4840000C03A4A00E6006C
+:1050800050CD0000000186360094F68435540000AF
+:10509000000176B4FFF0F70435549696FFF44739D3
+:1050A00000009716FFF0C6B47000F704354877B4D7
+:1050B000000F703EFFE107380024E60050C5C638F7
+:1050C000600006B40001C7046E00F7332800F684C0
+:1050D0003544000000018736000400000001203A3A
+:1050E000000FE2005119073800018736000C00005C
+:1050F0000001073800019736000C8736000CE000ED
+:10510000512C00000001F7043528F6820001073811
+:105110000008E00052C4F7053544203A0010E600CC
+:10512000512800000001F702000097360004F70440
+:10513000353CF684352807380001F705353CF7047F
+:10514000353C8736141C00000001073800019736F3
+:10515000141CF704760486B6141CF60475FC073894
+:105160000001F684760000000001C03A6A00E60003
+:105170005178F7057604F0057604F6847604F70492
+:105180007608F00575FCC0367200470C000120322D
+:105190000000E60051DDF70575F8F7047648F4865F
+:1051A0007218C03A4A00470C0001203A0000E6009D
+:1051B00051DDF6862C28F7042D3800000001063852
+:1051C0000001F6052D3877390002F482000E2032F6
+:1051D0000044E60051DCB4BA6802F0052D38F5024F
+:1051E0000000202A0002EE0052C4F6820000F6847D
+:1051F0003528000000018736000000000001203A39
+:105200000002E600529805B400089593FFFC95163D
+:10521000FFEC9596FFE89696FFE407880008E0000B
+:105220005EDC9793FFFC8516FFEC8596FFE886967B
+:10523000FFE420220000E6005288F70200008636D4
+:10524000000C000000012032000FE200526D00004F
+:10525000000187360014000000010738000197366E
+:10526000001487360014E0005288F702000076B17F
+:105270000002C6B4600077350005C7386A00C73839
+:10528000600007380010C72C7000203A0000E600CC
+:105290005104F705352CF6843528F7046F4C0000CF
+:1052A0000001C0367200E60052B807341494F4844A
+:1052B0006F44E00052BCF4853528F7053528E0003E
+:1052C00051E00528000120360000E60052FDF68678
+:1052D0002C28F7042D380000000106380001F605DF
+:1052E0002D3877390002F482000D20320044E600A8
+:1052F0005304B4BA6802E0005304F0052D38F48278
+:105300000001F4853524F6843528F7046F44F486CB
+:1053100032F4C0367200E600534CF4853530F704A1
+:10532000E0180000000177B8001F703EFFE1E600C2
+:10533000534D000000010F814000F70479C80000C0
+:10534000000107380001F70579C8F70479C8879686
+:10535000FFFC8296FFF802140000013C00000000F0
+:1053600000019293FFFC0290000822100014F484C4
+:105370003554F684354CF584352C9482FF3876B557
+:105380000003A52E6802000000019502FF3CF38493
+:105390003550C6AC68009382FF4087360004000099
+:1053A00000019702FF4486360004F70435400000F0
+:1053B0000001C7386000F7053540F604352886B689
+:1053C0000004873214149496FFF4C73868009732AB
+:1053D0001414872E008000000001203A0001EE0026
+:1053E00057509516FFF4F7060C3EC07E7400E60099
+:1053F000540400000001C07E7400E60053F5000074
+:105400000001F7060C3EC77C7400203A0010E6004D
+:10541000575000000001FF8200108682FF38F70419
+:105420003558F5846F58F685355407380001202E1D
+:105430000021E2005468F7053558F7042D38F68648
+:105440002C2806380001F6052D3877390002203265
+:105450000044E600545CB5BA6802F0052D38F382CA
+:105460000022E000546CF3856F58F0056F54F68409
+:10547000352C0000000187360094C3840000C03A38
+:105480003A00E60054D10000000186360094F6840C
+:1054900035540000000176B4FFF0F70435549696B9
+:1054A000FFF4473900009716FFF0C6B47000F70408
+:1054B000354877B4000F703EFFE107380024E6005E
+:1054C00054C9C638600006B40001C7046E00F73343
+:1054D0002800F684354400000001873600040000EF
+:1054E0000001203A000FE200551D07380001873601
+:1054F000000C00000001073800019736000C8736C9
+:10550000000CE000553000000001F7043528F68259
+:10551000000107380008E00056C8F7053544203A76
+:105520000010E600552C00000001F702000097363D
+:105530000004F704353CF684352807380001F705E8
+:10554000353CF704353C8736141C00000001073851
+:1055500000019736141CF704760486B6141CF60472
+:1055600075FC07380001F684760000000001C03A9F
+:105570006A00E600557CF7057604F0057604F684AB
+:105580007604F7047608F00575FCC0367200470C07
+:10559000000120320000E60055E1F70575F8F70438
+:1055A0007648F3867218C03A3A00470C0001203A58
+:1055B0000000E60055E1F6862C28F7042D3800009F
+:1055C000000106380001F6052D3877390002F38214
+:1055D000000E20320044E60055E0B3BA6802F00540
+:1055E0002D38F5020000202A0002EE0056C8F6828F
+:1055F0000000F68435280000000187360000000016
+:105600000001203A0002E600569C05B4000895937C
+:10561000FFFC9516FFEC9596FFE89696FFE4078849
+:105620000008E0005EDC9793FFFC8516FFEC859692
+:10563000FFE88696FFE420220000E600568CF70281
+:1056400000008636000C000000012032000FE2004E
+:105650005671000000018736001400000001073871
+:1056600000019736001487360014E000568CF702CC
+:10567000000076B10002C6B4600077350005C73877
+:105680006A00C738600007380010C72C7000203A45
+:105690000000E6005508F705352CF6843528F70498
+:1056A0006F4C00000001C0367200E60056BC0734A3
+:1056B0001494F3846F44E00056C0F3853528F70551
+:1056C0003528E00055E40528000120360000E600FA
+:1056D0005701F6862C28F7042D3800000001063803
+:1056E0000001F6052D3877390002F382000D2032D3
+:1056F0000044E6005708B3BA6802E0005708F00516
+:105700002D38F3820001F3853524F6843528F7041B
+:105710006F44F38632F4C0367200E6005750F385CA
+:105720003530F704E0180000000177B8001F703E24
+:10573000FFE1E6005751000000010F814000F7042F
+:1057400079C80000000107380001F70579C8F7049F
+:1057500079C88796FFFC8296FFF802140000013C8E
+:105760000000000000019293FFFC0290000822104C
+:1057700000148702FF38F384352CF7053554871E53
+:105780000080F504354C27380001C02A7200E6007D
+:105790005A4C00000001F5846F5800000001202ED3
+:1057A0000021E20057D8F6862C28F7042D38000097
+:1057B000000106380001F6052D3877390002203245
+:1057C0000044E60057CCB5BA6802F0052D38F30264
+:1057D0000022E00057DCF3056F58F0056F54F684A3
+:1057E000352C0000000187360094C3040000C03A45
+:1057F0003200E60058410000000186360094F6842D
+:1058000035540000000176B4FFF0F7043554969645
+:10581000FFF4473900009716FFF0C6B47000F70494
+:10582000354877B4000F703EFFE107380024E600EA
+:105830005839C638600006B40001C7046E00F7335B
+:105840002800F6843544000000018736000400007B
+:105850000001203A000FE200588D0738000187361A
+:10586000000C00000001073800019736000C873655
+:10587000000CE00058A000000001F7043528F68273
+:10588000000107380008E0005A38F7053544203A8F
+:105890000010E600589C00000001F7020000973657
+:1058A0000004F704353CF684352807380001F70575
+:1058B000353CF704353C8736141C000000010738DE
+:1058C00000019736141CF704760486B6141CF604FF
+:1058D00075FC07380001F684760000000001C03A2C
+:1058E0006A00E60058ECF7057604F0057604F684C5
+:1058F0007604F7047608F00575FCC0367200470C94
+:10590000000120320000E6005951F70575F8F70450
+:105910007648F3067218C03A3200470C0001203A6C
+:105920000000E6005951F6862C28F7042D380000B7
+:10593000000106380001F6052D3877390002F30220
+:10594000000E20320044E6005950B33A6802F005D8
+:105950002D38F5020000202A0002EE005A38F682A7
+:105960000000F684352800000001873600000000A2
+:105970000001203A0002E6005A0C05B40008959395
+:10598000FFFC9516FFEC9596FFE89696FFE40788D6
+:105990000008E0005EDC9793FFFC8516FFEC85961F
+:1059A000FFE88696FFE420220000E60059FCF7029B
+:1059B00000008636000C000000012032000FE200DB
+:1059C00059E100000001873600140000000107388B
+:1059D00000019736001487360014E00059FCF702E6
+:1059E000000076B10002C6B4600077350005C73804
+:1059F0006A00C738600007380010C72C7000203AD2
+:105A00000000E6005878F705352CF6843528F704B1
+:105A10006F4C00000001C0367200E6005A2C0734BB
+:105A20001494F3046F44E0005A30F3053528F70569
+:105A30003528E00059540528000120360000E60012
+:105A40005DC4F3020001E0005DF000000001772971
+:105A50000003C71C7000873A00040528000176A9DE
+:105A60000003F4843554F60435509482FF38A41EA4
+:105A70006802C63070009402FF3C9602FF40C69C4C
+:105A8000680087360004000000019702FF4485B6D5
+:105A90000004F704354000000001C7385800F7053E
+:105AA000354085B60004F505354CF6843528F605F5
+:105AB0003550873614149496FFF4C738580097363B
+:105AC0001414871E008000000001203A0001EE003F
+:105AD0005E3C9416FFF4F7060C3EC07E7400E600B0
+:105AE0005AF400000001C07E7400E6005AE5000090
+:105AF0000001F7060C3EC77C7400203A0010E60057
+:105B00005E3C00000001FF8200108682FF38F7042F
+:105B10003558F5846F58F685355407380001202E26
+:105B20000021E2005B58F7053558F7042D38F6865A
+:105B30002C2806380001F6052D387739000220326E
+:105B40000044E6005B4CB5BA6802F0052D38F3025C
+:105B50000022E0005B5CF3056F58F0056F54F6849B
+:105B6000352C0000000187360094C3040000C03AC1
+:105B70003200E6005BC10000000186360094F68426
+:105B800035540000000176B4FFF0F70435549696C2
+:105B9000FFF4473900009716FFF0C6B47000F70411
+:105BA000354877B4000F703EFFE107380024E60067
+:105BB0005BB9C638600006B40001C7046E00F73355
+:105BC0002800F684354400000001873600040000F8
+:105BD0000001203A000FE2005C0D07380001873613
+:105BE000000C00000001073800019736000C8736D2
+:105BF000000CE0005C2000000001F7043528F6826C
+:105C0000000107380008E0005DB8F7053544203A88
+:105C10000010E6005C1C00000001F702000097364F
+:105C20000004F704353CF684352807380001F705F1
+:105C3000353CF704353C8736141C0000000107385A
+:105C400000019736141CF704760486B6141CF6047B
+:105C500075FC07380001F684760000000001C03AA8
+:105C60006A00E6005C6CF7057604F0057604F684BD
+:105C70007604F7047608F00575FCC0367200470C10
+:105C8000000120320000E6005CD1F70575F8F7044A
+:105C90007648F3067218C03A3200470C0001203AE9
+:105CA0000000E6005CD1F6862C28F7042D380000B1
+:105CB000000106380001F6052D3877390002F3029D
+:105CC000000E20320044E6005CD0B33A6802F005D2
+:105CD0002D38F5020000202A0002EE005DB8F682A1
+:105CE0000000F6843528000000018736000000001F
+:105CF0000001203A0002E6005D8C05B4000895938F
+:105D0000FFFC9516FFEC9596FFE89696FFE4078852
+:105D10000008E0005EDC9793FFFC8516FFEC85969B
+:105D2000FFE88696FFE420220000E6005D7CF70293
+:105D300000008636000C000000012032000FE20057
+:105D40005D61000000018736001400000001073883
+:105D500000019736001487360014E0005D7CF702DE
+:105D6000000076B10002C6B4600077350005C73880
+:105D70006A00C738600007380010C72C7000203A4E
+:105D80000000E6005BF8F705352CF6843528F704AB
+:105D90006F4C00000001C0367200E6005DAC0734B5
+:105DA0001494F3046F44E0005DB0F3053528F70563
+:105DB0003528E0005CD40528000120360000E6000C
+:105DC0005DF1F3020001F7042D38F6862C28063821
+:105DD0000001F6052D3877390002F302000D20325C
+:105DE0000044E6005DF4B33A6802E0005DF4F005BB
+:105DF0002D38F3053524F6843528F7046F44F3066F
+:105E000032F4C0367200E6005E3CF3053530F7042C
+:105E1000E0180000000177B8001F703EFFE1E600C7
+:105E20005E3D000000010F814000F70479C80000CA
+:105E3000000107380001F70579C8F70479C887968B
+:105E4000FFFC8296FFF802140000013C00000000F5
+:105E500000019293FFFC02900008F706353097137B
+:105E6000FFFCF70632F49713FFFC07880008E000F8
+:105E700014F49793FFFCF70635309713FFFCF706F1
+:105E800033809713FFFC07880008E00014F4979311
+:105E9000FFFCF70635309713FFFCF706340C971319
+:105EA000FFFC07880008E00014F49793FFFCF70656
+:105EB00035309713FFFCF70634989713FFFC0788DB
+:105EC0000008E00014F49793FFFC8796FFFC82968D
+:105ED000FFF802140000013C000000000001929352
+:105EE000FFFC0290000886160000000000018732C7
+:105EF000000400000001203A000F86B20000C538FF
+:105F00000000EE005F2CC5B400002036000FEE004C
+:105F10005F2C00000001203A0000EC005F2D000023
+:105F2000000120360000EC005F48000000018732CD
+:105F3000000C00000001073800019732000C873286
+:105F4000000CE0005F50F4020000C02A5A00440C2C
+:105F500000018796FFFC8296FFF802140004013CC2
+:105F6000000000000001000000009293FFFC02907E
+:105F70000008F68635609693FFFCF68642309693CD
+:105F8000FFFC07880008E00015489793FFFCF682A5
+:105F900066F89693FFFCF78200179793FFFCF6864E
+:105FA00035609693FFFC07880008E000161C979365
+:105FB000FFFCF68269809693FFFCF78200189793A6
+:105FC000FFFCF68635609693FFFC07880008E0002A
+:105FD000161C9793FFFCF6826B509693FFFCF7829A
+:105FE00000169793FFFCF68635609693FFFC0788B2
+:105FF0000008E000161C9793FFFCF68261789693E8
+:10600000FFFCF782001F9793FFFCF686356096939E
+:10601000FFFC07880008E000161C9793FFFCF6823F
+:10602000627C9693FFFCF78200209793FFFCF68634
+:1060300035609693FFFC07880008E000161C9793D4
+:10604000FFFCF68266F89693FFFCF78200179793A1
+:10605000FFFCF68635EC9693FFFC07880008E0000D
+:10606000161C9793FFFCF68269809693FFFCF782DB
+:1060700000189793FFFCF68635EC9693FFFC078893
+:106080000008E000161C9793FFFCF6826B50969375
+:10609000FFFCF78200169793FFFCF68635EC96938B
+:1060A000FFFC07880008E000161C9793FFFCF682AF
+:1060B00061789693FFFCF782001F9793FFFCF686AA
+:1060C00035EC9693FFFC07880008E000161C9793B8
+:1060D000FFFCF682627C9693FFFCF7820020979388
+:1060E000FFFCF68635EC9693FFFC07880008E0007D
+:1060F000161C9793FFFCF704E02800000001203AEB
+:106100000000E600611500000001F704E028E0004F
+:10611000611877390002F70200F0F7054228F70608
+:10612000408AF03B2800F706408CF03B2800F7023D
+:106130000000F7057AC0F7057AB8F7057AB0F705D9
+:106140007AC8F682C3509693FFFCF68200169693A7
+:10615000FFFCF68642309693FFFC07880008E001BA
+:106160001EC09793FFFC8796FFFC8296FFF80214EF
+:106170000000013C0000000000019293FFFC02902F
+:106180000008F6046F340000000120320000E60031
+:1061900061ED76B1001E8732000076B4FFE5C738A6
+:1061A0006FC07739FFF0203A0007E60061EC06B0D7
+:1061B00000028736000076B5001E76B4FFE5C738CA
+:1061C0006FC07739FFF0203A0001E60061ECF50678
+:1061D00035ECF704423000000001C03A5200470C91
+:1061E0000001203A0000E6006211F5820000F70489
+:1061F00042A0F60642A276B1001E76B4FFE5C7388B
+:106200006FC07739FFF007380001E0006268F733AC
+:1062100028008732000400000001F705E00086B284
+:106220000008203A0000E600623CF685E0042036D3
+:106230000000E6006240202E0000F5820001202EC2
+:106240000000E6006265F60642A2F70442A076B1BD
+:10625000001E76B4FFE5C7386FC07739FFF0073806
+:106260000001F7332800F00542288796FFFC82964C
+:10627000FFF802140000013C0000000000019293AE
+:10628000FFFC02900008F704423CF6846F340738A4
+:10629000000120360000E60062B1F705423C873677
+:1062A0000000F59E0002C03A5A00E60062BDF58685
+:1062B00035ECF70442A0E00062DCF60642A2F704E7
+:1062C000423000000001C03A5A00470C0001203A59
+:1062D0000000E60062F9F60642A4F70442A476B193
+:1062E000001E76B4FFE5C7386FC07739FFF0073876
+:1062F0000001E000630CF73328009693FFFC078849
+:106300000008E00063209793FFFCF0054228879681
+:10631000FFFC8296FFF802140000013C0000000020
+:1063200000019293FFFC02900008221000208316C7
+:10633000000000000001871A001800000001203A48
+:106340000000E600636CF7020000839A001C000066
+:106350000001F3857AC0849A0014F7057AC8F485A1
+:106360007AB0F7057AB88316000000000001869A1B
+:106370000014F7047AB000000001C0367200E60095
+:1063800063D0F6020000869A001CF7047AC0000071
+:106390000001C0367200E60063D000000001869A5A
+:1063A0000018F7047AB800000001C0367200E60059
+:1063B00063D000000001869A0020F7047AC800002C
+:1063C0000001C7386800203A0064EE0063D920322B
+:1063D0000000F602000120320000E60064580000D0
+:1063E00000018396000000000001871E00180000D5
+:1063F0000001203A0000E600643CF7020000F705C7
+:106400004080F7054084F6846E50F482FFFF831EBF
+:10641000000CF4854F5493360010839E0010849630
+:10642000000093B6001484A600080000000194B692
+:106430001DDCF6820064F6854A98F7054A9C8316AF
+:10644000000000000001871A002000000001203A2F
+:106450000000EE00647CF3820000F70442A4F6061C
+:1064600042A676B1001E76B4FFE5C7386FC0773913
+:10647000FFF007380001E00066E4F7332800939648
+:10648000FFF484160000F48642C89496FFECF302F1
+:10649000000C9316FFE4839600008496FFF4871E99
+:1064A000002000000001C0267200EC006648F38660
+:1064B0004A9884A200248316FFE4C5040000B49A1D
+:1064C0003802C7183800832200288396FFF4849688
+:1064D000FFE4933A000493BA0008F604E000F306E0
+:1064E0004A98A6A63002F5820000C0326A00E60093
+:1064F0006510C6380000F684E0048732000400000E
+:106500000001C0367200E6006514202E0000F582FE
+:106510000001202E0000E600652100000001F502C8
+:106520000000F684E0008732000000000001C03661
+:106530007200E200655CF5820000C0367200E60081
+:106540006564202E0000F684E00487320004000019
+:106550000001C0367200E2006565202E0000F58261
+:106560000001202E0000E6006575202A0000F502DB
+:106570000001202A0000E6006588000000018396E3
+:10658000FFF400000001F3854F548722002C76A110
+:10659000001E76B4FFE505A0002E762D001E763095
+:1065A000FFE5F48200009496FFDC8316FFEC2026C2
+:1065B0000007C7386FC07738FFF0F71B2800872E19
+:1065C000000006980002C73867C07738FFF0E20085
+:1065D000661CF73728008516FFEC8596FFDC000067
+:1065E0000001C72C400086BA0030062800040528A8
+:1065F000000205AC00028396FFDC7739001E773875
+:10660000FFE5039C00019396FFDC201E0007C6B443
+:1066100077C076B4FFF0E20065E1F6B3280004200D
+:10662000001C8496FFEC8316FFE48396FFF404A419
+:1066300000149496FFEC0318000C9316FFE4039CDF
+:106640000001E00064949396FFF48496000000003B
+:1066500000018726002000000001F7054A9C85A65E
+:106660000020F7047AB80000000107380001F705A0
+:106670007AB8F7047AB8F6847AC886260018C6B4C1
+:1066800058008726001C0000000127380001C03296
+:106690007200470C0001203A0000E60066E5F6852E
+:1066A0007AC883260008F7046E50F3053B6483A67E
+:1066B0000008F682000093BA1DDC84A6000C831645
+:1066C000000094BA0010831A0010F6857AC8933A35
+:1066D0000014F7020001F7054084F6857AC0F685BC
+:1066E0007AB8F6857AB08796FFFC8296FFF8021496
+:1066F0000004013C0000000000019293FFFC0290A6
+:10670000000822100008F3846F3400000001871E87
+:106710000018F684E01C00000001C0367200EC0096
+:106720006729F7020001F7020000203A0000E600A6
+:1067300067E8F5820001F704E01C869E001800005F
+:106740000001C03A6A00470C0001203A0000E60050
+:1067500067E9C5840000869E0010F704E000F60299
+:106760000000C0367200E6006788051C0010869E97
+:106770000014F704E00400000001C0367200E600D7
+:10678000678C20320000F602000120320000E60093
+:10679000679900000001F582000086AA0000F70456
+:1067A000E00000000001C0367200E20067D4F6028B
+:1067B0000000C0367200E60067DC2032000086AAC6
+:1067C0000004F704E00400000001C0367200E2009B
+:1067D00067DD20320000F602000120320000E600F2
+:1067E00067ED202E0000F5820001202E0000E6005B
+:1067F0006810F606429CF704429C76B1001E76B4FF
+:10680000FFE5C7386FC07739FFF007380001F7336D
+:106810002800F70475F475ACFFE1203A0000E600AB
+:1068200068459596FFF4F7044298F606429876B1CB
+:10683000001E76B4FFE5C7386FC07739FFF0073820
+:106840000001F7332800871E0020041C002076A1D9
+:10685000001E76B4FFE5C7386FC07739FFF0203AE5
+:106860000008EE0068C4F3061554F5020000059C0C
+:106870000022C4AC0000F60200018722000076A1CD
+:10688000001E76B4FFE5C7386FC07739FFF0C02A25
+:106890007200EC0068C0C6A46000A726600276B54E
+:1068A000001E76B4FFE505280001C7386FC07739B0
+:1068B000FFE8F72F680005AC0001E00068780630BB
+:1068C0000002F30615549313FFFCF704E0240000C4
+:1068D00000019713FFFCF704E01C00000001971370
+:1068E000FFFCF306E0009313FFFC9393FFFCF3021D
+:1068F00000019313FFFC07880008E000EE64979303
+:10690000FFFC20220000E6006928F606429EF704FC
+:10691000429C76B1001E76B4FFE5C7386FC0773968
+:10692000FFF007380001F73328008316FFF400005A
+:106930000001201A0000E600696CF30635ECF7044C
+:10694000423000000001C03A3200470C0001203AFA
+:106950000000E600696DF0054228F3063560F30596
+:10696000423007880008E000789C9793FFFC8796E8
+:10697000FFFC8296FFF802140000013C00000000BA
+:1069800000019293FFFC0290000822100004F5041D
+:106990006F34F7044240862A001807380001F68455
+:1069A000E01CF7054240C0366200EC0069B5F70212
+:1069B0000001F7020000203A0000E6006A80F702BA
+:1069C0000001F704E01C86AA001800000001C03A8C
+:1069D0006A00470C0001203A0000E6006A7DC58489
+:1069E000000086AA0010F704E000F6020000C0369E
+:1069F0007200E6006A1404A8001086AA0014F704C6
+:106A0000E00400000001C0367200E6006A1820327F
+:106A10000000F602000120320000E6006A250000B6
+:106A20000001F582000086A60000F704E0000000E7
+:106A30000001C0367200E2006A60F6020000C03653
+:106A40007200E6006A682032000086A60004F7049F
+:106A5000E00400000001C0367200E2006A692032E2
+:106A60000000F602000120320000E6006A81C72C17
+:106A70000000F5820001E0006A80C72C0000C70416
+:106A80000000203A0000EE006B3DF686408AF704D5
+:106A9000408876B5001E76B4FFE5C7386FC07738FA
+:106AA000FFF0203A0000E6006B3CF6820000F6851D
+:106AB0004080F68540849693FFFC9693FFFCF70494
+:106AC000E01C000000019713FFFCF386E0009393A5
+:106AD000FFFC9513FFFCF38200029393FFFC969654
+:106AE000FFF407880008E000EE649793FFFCF405CC
+:106AF00040848696FFF4F7046E50F38635ECF685F5
+:106B00004090F6854094873A1DDCF6854228F705CB
+:106B10003B64F7044230F4054080C03A3A00470C29
+:106B20000001203A0000E6006B3DF3863560F385F6
+:106B3000423007880008E000789C9793FFFC879616
+:106B4000FFFC8296FFF802140000013C00000000E8
+:106B500000019293FFFC02900008F4864230949367
+:106B6000FFFC07880008E00120E49793FFFC202247
+:106B70000000E6006DD9F5820000F704408CF606AF
+:106B8000408C7631001EF68442287630FFE506B44C
+:106B90000001C73867C07738FFF0203A0000E600F0
+:106BA0006BC8F6854228F7044088F686408A76B599
+:106BB000001E76B4FFE5C7386FC07738FFF0203A83
+:106BC0000000E6006D0D00000001F704408CF68621
+:106BD000408C76B5001E76B4FFE5C7386FC07738B5
+:106BE000FFF0203A0000E6006C35F606408AF70414
+:106BF000408876B1001E76B4FFE5C7386FC077389D
+:106C0000FFF0203A0000E6006C34F4863678F70492
+:106C1000424400000001C03A4A00470C0001203AFB
+:106C20000000E6006C35F4820001F4B32800E000B7
+:106C30006D10F005422CF704408CF506408C76A9C7
+:106C4000001E76B4FFE5C7386FC07738FFF0203AF2
+:106C50000000E6006CC1F606408AF704408876B171
+:106C6000001E76B4FFE5C7386FC07738FFF0203AD2
+:106C70000000E6006CC100000001F704422C000097
+:106C8000000107380001203A0009EE006D11F705F8
+:106C9000422CF02B2800F0332800F5820001F70485
+:106CA0004294F606429476B1001E76B4FFE5C738EA
+:106CB0006FC07739FFF007380001E0006D10F7333F
+:106CC0002800F704408CF686408C76B5001E76B41A
+:106CD000FFE5C7386FC07738FFF0203A0000E600C4
+:106CE0006D14202E0000F7044088F606408A76B125
+:106CF000001E76B4FFE5C7386FC07738FFF0203A42
+:106D00000000E6006D15202E0000F0332800F5820B
+:106D10000001202E0000E6006DB5F48635ECF70486
+:106D2000423000000001C03A4A00470C0001203AFE
+:106D30000000E6006D5900000001F704E0280000A3
+:106D40000001203A0000E6006D79F682003CF684EE
+:106D5000E028E0006D7800000001F704E028000062
+:106D60000001203A0000E6006D79F68200F0F70499
+:106D7000E0280000000176B90002F7044228000074
+:106D80000001C03A6A00EC006DB5F6862C28F704C5
+:106D90002D38F005422806380001F6052D387739E0
+:106DA0000002F482001920320044E6006DB4B4BA47
+:106DB0006802F0052D38F482C3509493FFFCF482EE
+:106DC00000169493FFFCF48642309493FFFC0788EE
+:106DD0000008E0011EC09793FFFC8796FFFC829697
+:106DE000FFF802140000013C000000000001929333
+:106DF000FFFC0290000822100004F5863678959377
+:106E0000FFFCF58642449593FFFC07880008E000EC
+:106E100015489793FFFCF58274189593FFFCF58253
+:106E200000199593FFFCF58636789593FFFC07884B
+:106E30000008E000161C9793FFFCF58274AC959354
+:106E4000FFFCF782001D9793FFFCF58637049593AE
+:106E5000FFFC07880008E000161C9793FFFCF582F2
+:106E600078009593FFFCF782001B9793FFFCF58653
+:106E700037049593FFFC07880008E000161C9793E1
+:106E8000FFFCF58278FC9593FFFCF782001A97933C
+:106E9000FFFCF58637909593FFFC07880008E0001B
+:106EA000161C9793FFFCF58280D89593FFFCF78220
+:106EB000001B9793FFFCF58637909593FFFC07889E
+:106EC0000008E000161C9793FFFCF58281749593EF
+:106ED000FFFCF782001D9793FFFCF586381C959305
+:106EE000FFFC07880008E000161C9793FFFCF58262
+:106EF00087749593FFFCF782001B9793FFFCF58640
+:106F0000381C9593FFFC07880008E000161C979337
+:106F1000FFFCF58294F89593FFFCF782001B979392
+:106F2000FFFCF58639349593FFFC07880008E000E4
+:106F3000161C9793FFFCF5828A009593FFFCF7825D
+:106F4000001C9793FFFCF58639349593FFFC078866
+:106F50000008E000161C9793FFFCF5828E089593BD
+:106F6000FFFCF782001A9793FFFCF586393495935E
+:106F7000FFFC07880008E000161C9793FFFCF582D1
+:106F8000969C9593FFFCF782001E9793FFFCF58675
+:106F900038A89593FFFC07880008E000161C97931B
+:106FA000FFFCF5829B2C9593FFFCF782001B9793C7
+:106FB000FFFCF58638A89593FFFC07880008E000E1
+:106FC000161C9793FFFCF582A2DC9593FFFCF782D9
+:106FD000001E9793FFFCF5863AD89593FFFC07882F
+:106FE0000008E000161C9793FFFCF5829E549593D1
+:106FF000FFFCF782001B9793FFFCF5863AD8959328
+:10700000FFFC07880008E000161C9793FFFCF58240
+:10701000A3C09593FFFCF782001C9793FFFCF586B5
+:1070200039C09593FFFC07880008E000161C979371
+:10703000FFFCF582A7649593FFFCF782001E9793EF
+:10704000FFFCF58639C09593FFFC07880008E00037
+:10705000161C9793FFFCF582AA049593FFFCF78218
+:10706000001B9793FFFCF58639C09593FFFC0788BA
+:107070000008E000161C9793FFFCF582AEF895938C
+:10708000FFFCF782001C9793FFFCF5863A4C959322
+:10709000FFFC07880008E000161C9793FFFCF7062A
+:1070A0004250F03B2800F7064088F03B2800F602EB
+:1070B0000000F6054080F6054084F7063B70F63B7D
+:1070C0002800F7063B72F0BB2800F582CA20F58540
+:1070D0003B74F7063B78F03B2800F7063B7AF0BBA1
+:1070E0002800F582B194F5853B7CF7063B80F03BA8
+:1070F0002800F7063B82F0BB2800F582C754F585CF
+:107100003B84F7063B88F03B2800F7063B8AF0BB40
+:107110002800F582BEF8F5853B8CF7063B90F03BE6
+:107120002800F7063B92F0BB2800F582C8F8F585E9
+:107130003B94F7063B98F03B2800F7063B9AF0BBE0
+:107140002800F582C5D8F5853B9CF7063BA0F03BAF
+:107150002800F7063BA2F0BB2800F582C770F58532
+:107160003BA4F7063BA8F03B2800F7063BAAF0BB80
+:107170002800F582C1B4F5853BAC9616FFF407886C
+:107180000008E000D5409793FFFCF6846E50861609
+:10719000FFF40000000196361DDCF6053B6487967F
+:1071A000FFFC8296FFF802140000013C0000000082
+:1071B00000019293FFFC02900008221000302594F9
+:1071C0000020F02F280026140038F03328009013F8
+:1071D000FFFCF7044250F686425076B5001E76B4A6
+:1071E000FFE5C7386FC07739FFF09713FFFC9613A0
+:1071F000FFFC9593FFFC07880008E000F5F49793E7
+:10720000FFFC20220000E600721DF5021770F70453
+:1072100042540000000127380001F705425495133D
+:10722000FFFCF502001B9513FFFCF5064244951385
+:10723000FFFC07880008E0011EC09793FFFC8796BB
+:10724000FFFC8296FFF802140000013C00000000E1
+:1072500000019293FFFC02900008F704E0048616F8
+:107260000000F68200FF7739FFF0C7386C00F73373
+:107270002800F706E006873A000006B00002F7375C
+:107280002800F6843B6407300004F6BB2800870220
+:10729000FF3406300006F73328008796FFFC8296FD
+:1072A000FFF802140004013C00000000000192936A
+:1072B000FFFC029000082210003026140020F0335A
+:1072C000280027140038F03B28009713FFFC909308
+:1072D000FFFCF7044250F686425076B5001E76B4A5
+:1072E000FFE5C7386FC07739FFF09713FFFC96139F
+:1072F000FFFC07880008E000F3389793FFFC20228A
+:107300000000E6007319F5821770F704425400007C
+:10731000000127380001F70542549593FFFCF582E0
+:10732000001B9593FFFCF58642449593FFFC07886C
+:107330000008E0011EC09793FFFC8796FFFC829631
+:10734000FFF802140000013C0000000000019293CD
+:10735000FFFC029000082210004026140020961620
+:10736000FFC4F03328009013FFFC9613FFFC261493
+:1073700000389616FFBC9613FFFC07880008E00053
+:10738000D0DC9793FFFC9013FFFCF7044250F68685
+:10739000425076B5001E76B4FFE5C7386FC0773926
+:1073A000FFF09713FFFC8616FFBC00000001961348
+:1073B000FFFC8616FFC4000000019613FFFC07883F
+:1073C0000008E000F5F49793FFFC20220000E6009F
+:1073D00073E5F6021770F7044254000000012738E5
+:1073E0000001F70542549613FFFCF602001B9613AA
+:1073F000FFFCF60642449613FFFC07880008E001F4
+:107400001EC09793FFFC8796FFFC8296FFF802143C
+:107410000000013C0000000000019293FFFC02907C
+:10742000000822100004F5820000F5854080959642
+:10743000FFF407880008E000CB509793FFFC859687
+:10744000FFF4F5020064F5053BB4F7044250F486FE
+:10745000425076A5001E76B4FFE5F6044F5CF402B8
+:107460000006F4054254F5853B6CF5853BB8953232
+:10747000000095B20004C7386FC07739FFF00738B5
+:107480000001F727280007880008E00071B09793F3
+:10749000FFFCF4063704F40542448796FFFC82960D
+:1074A000FFF802140000013C00000000000192936C
+:1074B000FFFC0290000822100050F7044250F686AC
+:1074C000425076B5001E76B4FFE5F6046F34C73837
+:1074D0006FC086B2000C7739FFF0C0367200E6004C
+:1074E00077ECC504000086B20010F704E000F30258
+:1074F0000000C0367200E600751804B0001086B2B5
+:107500000014F704E00400000001C0367200E60039
+:10751000751C201A0000F3020001201A0000E6008A
+:10752000752900000001F502000086A60000F7049E
+:10753000E00000000001C0367200E2007564F6024F
+:107540000000C0367200E600756C2032000086A68E
+:107550000004F704E00400000001C0367200E200FD
+:10756000756D20320000F602000120320000E600B6
+:10757000757D202A0000F5020001202A0000E600A7
+:1075800077EC0000000107880008E000CBCC97935F
+:10759000FFFC26140020F033280004A00002F0278E
+:1075A0002800F582000023940022F59F280003A004
+:1075B000001A9396FFD42594002285AE000077AD83
+:1075C000001E77BCFFE5C5AC7FC075ADFFF076311E
+:1075D000001E7630FFE506A400022314001E751578
+:1075E000001EF59F2800F384E0007528FFE593A2B4
+:1075F000001CF584E0047399001E739CFFE59396CC
+:10760000FFAC7395001E739CFFE59396FFCC23940B
+:10761000004295A200208716FFE07595001E75AC0C
+:10762000FFE59596FFB47595001E75ACFFE5959640
+:10763000FFC4C73867C07738FFF0F7272800F48405
+:107640004F58871A0000C4A04A0074A4FFFAC5A4CA
+:107650000000F59F28008396FFAC2314001A7619CA
+:10766000001E7630FFE58596FFB4C7383FC07738F7
+:10767000FFF0F737280006B400028716FFE4839670
+:10768000FFCCC73857C07738FFF0F7372800871A84
+:10769000000006B40002C73867C07738FFF0F7373C
+:1076A000280006B400028716FFE823140016761996
+:1076B000001E7630FFE5C7385FC07738FFF0F73738
+:1076C0002800871A000006B40002C73867C0773860
+:1076D000FFF0F737280006B400028716FFEC2314EA
+:1076E00000127619001E7630FFE5C7383FC07738A4
+:1076F000FFF0F7372800871A000006B400028596CD
+:10770000FFC4C73867C07738FFF0F73728008716FF
+:10771000FFF006B40002C7385FC07738FFF0F737D4
+:107720002800F3820002F3A3280004200018259407
+:10773000002285AE000077AD001E77BCFFE5C5AC2A
+:107740007FC075ADFFF08396FFD4F5A32800F49FAA
+:1077500028002594004285AE000077AD001E77BC5E
+:10776000FFE5C5AC7FC075ADFFF044AD000094935C
+:10777000FFFCF786E0009793FFFCF3844F5C00006A
+:1077800000019393FFFC07880008E00123409793D2
+:10779000FFFC07880008E00078D89793FFFCF0050D
+:1077A0004084F786E0009793FFFC07880008E0001C
+:1077B000D5A09793FFFCF7046E50F4054084873AF8
+:1077C0001DDC00000001F7053B64F5863678F58581
+:1077D0004244F3863560F3854230F5864244959302
+:1077E000FFFC07880008E0011F489793FFFC87967D
+:1077F000FFFC8296FFF802140000013C000000002C
+:1078000000019293FFFC02900008F5864244959394
+:10781000FFFC07880008E00120E49793FFFC20228A
+:107820000000E600788900000001F70442540000DF
+:107830000001203A0000EE007851F6064250078819
+:107840000008E00071B09793FFFCE000788800002A
+:107850000001F704425076B1001E76B4FFE5F582D0
+:107860000006F5854254C7386FC07739FFF00738F6
+:107870000001F733280007880008E00072AC9793F6
+:10788000FFFCF5863790F58542448796FFFC82968B
+:10789000FFF802140000013C000000000001929378
+:1078A000FFFC02900008F6063678F6054244F7021F
+:1078B0000000F7054080F7054094F6846E50F70508
+:1078C000409097361DDC8796FFFC8296FFF80214E5
+:1078D0000000013C0000000000019293FFFC0290B8
+:1078E0000008F7020001F70540808796FFFC8296AA
+:1078F000FFF802140000013C000000000001929318
+:10790000FFFC02900008221000A8F7044250F58600
+:10791000425076AD001EF4846F3476B4FFE5949641
+:10792000FFC4C7386FC086A6000C7739FFF0C03699
+:107930007200E6007955F606429AF704429876B14D
+:10794000001E76B4FFE5C7386FC07739FFF00738FF
+:107950000001F7332800F704425076AD001E76B4DC
+:10796000FFE58516FFC4C7386FC086AA000C7739BB
+:10797000FFF0C0367200E60080A8F606429A872A19
+:107980000010862A001C203A0000E60079A8F68242
+:107990000000872A001400000001203A0000E600E1
+:1079A00079AC20360000F682000120360000E600A7
+:1079B0007A05249400209496FFBC8516FFC4F02716
+:1079C0002800052800109516FFB49513FFFC0788C2
+:1079D0000008E00072509793FFFC8496FFB400000B
+:1079E00000019493FFFC8516FFBC00000001951375
+:1079F000FFFC07880008E000F9349793FFFCE000E3
+:107A000080C40000000120320000E600806C00000D
+:107A1000000107880008E000CBCC9793FFFC259479
+:107A20000020F02F280004A000029496FF5CF027AD
+:107A30002800F48200002514005AF4AB2800072027
+:107A4000001A2514005A852A000077A9001E77BC69
+:107A5000FFE5C5287FC07529FFF075AD001E75AC28
+:107A6000FFE52314001E7619001EF53B2800F48460
+:107A7000E0007630FFE594A2001CF504E004849653
+:107A8000FF5C952200208716FFE006A40002751512
+:107A9000001E7528FFE59516FF547495001E74A40A
+:107AA000FFE59496FF9C7515001E7528FFE5951659
+:107AB000FF947495001E8516FF5C74A4FFE59496F0
+:107AC000FF8C8496FF54C7385FC07738FFF0F72BE0
+:107AD0002800871A00008516FF9CC73867C07738D2
+:107AE000FFF0F737280006B400028716FFE42314DE
+:107AF000001A7619001E7630FFE5C7384FC0773878
+:107B0000FFF0F7372800871A000006B400028496B9
+:107B1000FF94C73867C07738FFF0F737280006B4FE
+:107B200000028716FFE8231400167619001E76302F
+:107B3000FFE5C73857C07738FFF0F7372800871AB6
+:107B4000000006B40002C73867C07738FFF0F73787
+:107B5000280006B400028716FFEC231400127619E1
+:107B6000001E7630FFE5C7384FC07738FFF0F73793
+:107B70002800871A000006B400028516FF8CC7385B
+:107B800067C07738FFF0F73728008716FFF006B494
+:107B90000002C73857C07738FFF0F7372800F48263
+:107BA0000002F4A328002514005A852A000077A9B2
+:107BB000001E77BCFFE5C5287FC07529FFF00720B0
+:107BC0000018F53B28009416FFAC07880008E00079
+:107BD000CBCC9793FFFC261400382494005A84A63B
+:107BE000000077A5001E77BCFFE5C4A47FC074A584
+:107BF000FFF005A0000206AC000223940036751DBC
+:107C0000001E7528FFE50720001AF4B3280076311E
+:107C1000001E7630FFE59516FF547495001E74A47F
+:107C2000FFE59496FF5C7515001E7528FFE5951617
+:107C3000FF7C7495001E8516FFC474A4FFE594961E
+:107C4000FF74852A00342494005A9516FF8484A674
+:107C5000000077A5001E77BCFFE5C4A47FC074A513
+:107C6000FFF02514005AF4AF2800852A000077A9F8
+:107C7000001E77BCFFE5C5287FC07529FFF08496FC
+:107C8000FFC4F53B280084A600108516FFC494A20B
+:107C9000001C852A00147495001E74A4FFE59496B8
+:107CA000FF6C952200208716FFC88516FF54C73841
+:107CB00067C07738FFF0F72F2800871E00008496F2
+:107CC000FF5CC73857C07738FFF0F737280006B495
+:107CD00000028716FFCC23940032761D001E7630FA
+:107CE000FFE58516FF7CC7384FC07738FFF0F737C0
+:107CF0002800871E000006B40002C73867C0773826
+:107D0000FFF0F737280006B400028716FFD023944F
+:107D1000002E761D001E7630FFE5C73857C0773835
+:107D2000FFF0F7372800871E000006B40002849693
+:107D3000FF748516FF6CC73867C07738FFF0F737D8
+:107D4000280006B400028716FFD42394002A761D6B
+:107D5000001E7630FFE5C7384FC07738FFF0F737A1
+:107D60002800871E000006B40002C73867C07738B5
+:107D7000FFF0F73728008716FFD806B40002C7388F
+:107D800057C07738FFF0F7372800F4820002F4A3D9
+:107D90002800072000182514007A852A000077A9FA
+:107DA000001E77BCFFE5C5287FC07529FFF08496CB
+:107DB000FFC4F53B28008726000400000001203A9C
+:107DC0000024F7044F58E6007EF99416FF54C720AC
+:107DD0007200F6846E508626002C7738FFFA251440
+:107DE000005A842A000077A9001E77BCFFE5C42052
+:107DF0007FC07421FFF04739000086B61DDC77395B
+:107E00000002C0326A00468C0001D6800A68203623
+:107E10000000F6864098E6007EC0C3B86800C584BE
+:107E2000000086A60024F704E000F6020000C03639
+:107E30007200E6007E540324002486A60028F7047E
+:107E4000E00400000001C0367200E6007E582032D7
+:107E50000000F602000120320000E6007E6500000E
+:107E60000001F5820000869A0000F704E00000009F
+:107E70000001C0367200E2007EA0F6020000C036AB
+:107E80007200E6007EA820320000869A0004F70403
+:107E9000E00400000001C0367200E2007EA920323A
+:107EA0000000F602000120320000E6007EB9202E1C
+:107EB0000000F5820001202E0000E6007EC50000D3
+:107EC0000001F4020001F7044F58F41F28008496C3
+:107ED000FF548516FFC4F686409AC724720077388F
+:107EE000FFFA862A00304739000077390002C73888
+:107EF0006800E0007F4CF63B28008496FF54F606AD
+:107F00004098C72472007738FFFAC6B8000046B51B
+:107F1000000076B50002C6B46000F5020001F53736
+:107F200028004739000077390002C73860002494E0
+:107F3000005A84A6000077A5001E77BCFFE5C4A404
+:107F40007FC074A5FFF007380002F4BB2800F704D7
+:107F50004F588516FF548496FFACC6A8720076B4BD
+:107F6000FFFA0624001AF6B32800C72472007738F7
+:107F7000FFFA06A8001AF7372800473900009713C0
+:107F8000FFFC0724001C9713FFFCF5044F5C000066
+:107F900000019513FFFC07880008E0012340979338
+:107FA000FFFCF7044F588496FF5400000001C724DB
+:107FB00072007738FFFA473900009713FFFC072457
+:107FC000001C9713FFFCF5044F5C000000019513A3
+:107FD000FFFC07880008E00123409793FFFC078817
+:107FE0000008E00078D89793FFFCF6846E500000FC
+:107FF000000187361DDC00000001073800019736BC
+:108000001DDC87361DDCF0054084F486E000949387
+:10801000FFFC07880008E000D5A09793FFFCF4055B
+:108020004084F7046E50F005425C873A1DDCF6860A
+:108030002C28F7053B64F7042D38F5063A4CF50576
+:10804000424406380001F6052D3877390002F482E3
+:10805000001C20320044E6008060B4BA6802F005DB
+:108060002D38F50635ECE000808CF50542302032E5
+:108070000001E60080C40000000107880008E0005D
+:10808000789C9793FFFCF4863560F4854230F506C2
+:1080900042449513FFFC07880008E0011F489793AE
+:1080A000FFFCE00080C400000001F704429876B1B4
+:1080B000001E76B4FFE5C7386FC07739FFF0073888
+:1080C0000001F73328008796FFFC8296FFF8021420
+:1080D0000000013C0000000000019293FFFC0290B0
+:1080E0000008F58642449593FFFC07880008E001EC
+:1080F00020E49793FFFC20220000E600816100004D
+:108100000001F704425400000001203A0000EE0094
+:108110008129F606425007880008E00072AC979368
+:10812000FFFCE000816000000001F704425076B1DE
+:10813000001E76B4FFE5F5820006F5854254C73887
+:108140006FC07739FFF007380001F7332800078840
+:108150000008E000734C9793FFFCF586381CF5850A
+:1081600042448796FFFC8296FFF802140000013C0F
+:108170000000000000019293FFFC02900008221012
+:108180000058F7044250F686425076B5001E76B489
+:10819000FFE5F6046F34C7386FC086B2000C77393C
+:1081A000FFF0C0367200E6008250F4820000C50481
+:1081B000000086B20010F704E000C5A40000C0363D
+:1081C0007200E60081E40430001086B20014F70467
+:1081D000E00400000001C0367200E60081E8202EB5
+:1081E0000000F5820001202E0000E60081F500006D
+:1081F0000001F502000086A20000F704E000000084
+:108200000001C0367200E2008230F6020000C03683
+:108210007200E60082382032000086A20004F704D3
+:10822000E00400000001C0367200E2008239203212
+:108230000000F602000120320000E6008249202AF8
+:108240000000F5020001202A0000E60082592026E5
+:108250000000F482000120260000E6008760000094
+:10826000000107880008E000CBCC9793FFFC0720B3
+:108270000002F03B2800F7044F58F4053BB006A07D
+:108280000014C72072007738FFFAF737280006A0DD
+:108290000016F7372800F3020001F32328000788AF
+:1082A0000008E000CBCC9793FFFC26140020F033AD
+:1082B000280004A00002F0272800F3020000239405
+:1082C000002AF31F28000720001A2394002A839E07
+:1082D0000000779D001E77BCFFE5C39C7FC0739DA7
+:1082E000FFF07631001E7630FFE506A4000275151A
+:1082F000001EF3BB2800F304E0007528FFE593227D
+:10830000001CF384E0042314001E9316FFA4759947
+:10831000001E75ACFFE57315001E7318FFE593167C
+:10832000FFCC8316FFA493A200208716FFE073956D
+:10833000001E739CFFE59396FFAC7395001E739C23
+:10834000FFE5C73867C07738FFF0F7272800871A9E
+:1083500000009396FFC4C7385FC07738FFF0F73747
+:10836000280006B400028716FFE42394001A9396AF
+:10837000FFA4761D001E7630FFE5C73857C077385A
+:10838000FFF0F7372800871E000006B40002C73848
+:1083900067C07738FFF0F737280006B40002871669
+:1083A000FFE8231400169316FFA47619001E839687
+:1083B000FFAC7630FFE5C7383FC07738FFF0F737BE
+:1083C0002800871A000006B40002C73867C0773853
+:1083D000FFF0F737280006B400028716FFEC2314DD
+:1083E00000129316FFA47619001E8396FFCC7630F8
+:1083F000FFE5C7383FC07738FFF0F7372800871A06
+:10840000000006B40002C73867C07738FFF0F737BE
+:1084100028008716FFF08316FFC406B40002C73891
+:1084200037C07738FFF0F7372800F3820002F3A354
+:1084300028002314002A831A00007799001E77BCB5
+:10844000FFE5C3187FC07319FFF007200018F33B46
+:1084500028009416FFDC07880008E000CBCC979337
+:10846000FFFC072000022394002A839E0000779DD2
+:10847000001E77BCFFE5C39C7FC0739DFFF0248086
+:1084800000070520000AF3BB280020260007EE00A5
+:1084900084E00628000E86B200007731001E77388F
+:1084A000FFE575B1001E75ACFFE50528000204A4C8
+:1084B0000001C6B477C076B5FFF0F702FF00C6B47E
+:1084C0007400F6B3280087320000F30200FFC738BB
+:1084D0005FC07739FFF0C7383400E0008488F73395
+:1084E000280005200026862A000076A9001EF584B3
+:1084F0004F5876B4FFE58396FFDCF30200FF941635
+:10850000FFBCC71C5A007738FFFAC6306FC07631FF
+:10851000FFF047390000C7383400F682FF00C6304C
+:108520006C00C7386000F6843B6CF72B2800C5A0B0
+:108530005A0075ACFFFA8316FFDC07340001F7051B
+:108540003B6C0720003AF6BB280007200036F03BC2
+:108550002800F3820003F3A328000718001AF5BBD4
+:10856000280007880008E000CBCC9793FFFC072089
+:108570000002F03B2800248000070520000A202686
+:108580000007EE0085D40628000E86B20000773181
+:10859000001E7738FFE575B1001E75ACFFE50528B4
+:1085A000000204A40001C6B477C076B5FFF0F7025C
+:1085B000FF00C6B47400F6B3280087320000F382CF
+:1085C00000FFC7385FC07739FFF0C7383C00E000D4
+:1085D000857CF733280005A00026862E000076ADA6
+:1085E000001E76B4FFE5C520000024000007F3025A
+:1085F00000019316FFA4F7044F588396FFBC248014
+:10860000000EC71C72007738FFFAC6306FC0763193
+:10861000FFF047390000F68200FFC7386C00F68291
+:10862000FF00C6306C00C7386000F6843B6CF72F43
+:10863000280007340001F7053B6C0728003AF6BB19
+:10864000280007280036F03B2800F3020003F32B34
+:10865000280020220007EE008694C6284800063035
+:1086600000268732000076B1001E76B4FFE504A430
+:108670000002042000018396FFA4C7386FC0773939
+:10868000FFF0F682FF00C7386C00C71C7000E000E6
+:108690008650F73328000628002686B2000077317E
+:1086A000001E7738FFE5C6B477C076B5FFF0F70255
+:1086B000FF00C6B47400F6B328009513FFFCF30462
+:1086C0003BB0000000019313FFFC9516FFB4078830
+:1086D0000008E000D42C9793FFFC8516FFB4F0054A
+:1086E000407C8396FFBC23000007F3054258F70443
+:1086F0004250F606425076B1001E76B4FFE5F3060E
+:108700003934F3054244F5054074F3854260F38241
+:108710000006F3854254C7386FC07739FFF0F684FE
+:108720002D3807380001F733280006340001F6051C
+:108730002D38F7062C2876B50002F382001C203273
+:108740000044E600874CB3B67002F0052D38F306FE
+:1087500042449313FFFC07880008E0011F489793E9
+:10876000FFFC8796FFFC8296FFF802140000013C94
+:108770000000000000019293FFFC0290000822100C
+:108780000048F38642449393FFFC07880008E00109
+:1087900020E49793FFFC20220000E60089ED000012
+:1087A0000001F704425400000001203A0000EE00EE
+:1087B00087C90000000107880008E000734C979308
+:1087C000FFFCE00089EC0000000107880008E000E1
+:1087D000CBCC9793FFFC26140020F033280005A093
+:1087E0000002F02F2800F382000024940022F3A757
+:1087F000280004A0001A9496FFD423940022839E9C
+:108800000000779D001E77BCFFE5C39C7FC0739D71
+:10881000FFF07631001E7630FFE506AC000223142F
+:10882000001E7519001EF3A72800F484E0007528C7
+:10883000FFE594A2001CF384E0047495001E74A468
+:10884000FFE59496FFB47495001E74A4FFE594961A
+:10885000FFCC8496FFB493A200208716FFE07395A7
+:10886000001E739CFFE59396FFBC7395001E739CDE
+:10887000FFE59396FFC48396FFBCC73867C077387F
+:10888000FFF0F72F2800F5844F58871A0000C5A085
+:108890005A0075ACFFFAC73857C07738FFF0F73782
+:1088A000280006B400028716FFE42314001A761984
+:1088B000001E7630FFE545AD0000C7384FC0773861
+:1088C000FFF0F7372800871A000006B400028496EC
+:1088D000FFCCC73867C07738FFF0F737280006B4F9
+:1088E00000028716FFE8231400167619001E763062
+:1088F000FFE5C7383FC07738FFF0F7372800871A01
+:10890000000006B40002C73867C07738FFF0F737B9
+:10891000280006B400028716FFEC23140012761913
+:10892000001E7630FFE5C7384FC07738FFF0F737C5
+:108930002800871A000006B400028396FFC4C738D7
+:1089400067C07738FFF0F73728008716FFF006B4C6
+:108950000002C7383FC07738FFF0F7372800F482AD
+:108960000002F4A328000420001823940022839E10
+:108970000000779D001E77BCFFE5C39C7FC0739D00
+:10898000FFF08496FFD4F3A32800F3820001F3A73D
+:1089900028009593FFFCF486E0009493FFFCF38499
+:1089A0004F5C000000019393FFFC07880008E00182
+:1089B00023409793FFFC07880008E00078D897933E
+:1089C000FFFCF4863678F4854244F0054084F68452
+:1089D0004F5CF70200649736000090360004F702FF
+:1089E0000001F7054084F38635ECF3854230879625
+:1089F000FFFC8296FFF802140000013C000000001A
+:108A000000019293FFFC0290000822100090F704EE
+:108A10004260F502000005B80018F6044258000054
+:108A2000000120320007EE008A70C7306000C738AE
+:108A300058000738000E86BA00007739001E7738D4
+:108A4000FFE5C6B477C076B5FFF0F70200FFC6B405
+:108A50007400C0365200470C0001D7000A70203A5B
+:108A60000000E6008A7107300001E0008A18F7056F
+:108A70004258F40442580000000120220007EE0092
+:108A80008D9424940036F604426025140038239413
+:108A90000020063000028732000076B1001E76B456
+:108AA000FFE50630000275B1001EC7386FC0773889
+:108AB000FFF0F72B28008732000075ACFFE5C738C0
+:108AC0005FC07738FFF0F727280024940034063081
+:108AD00000028732000076B1001E76B4FFE5C73889
+:108AE0006FC07738FFF0F727280024940032063053
+:108AF00000028732000076B1001E76B4FFE5C73869
+:108B00006FC07738FFF0F727280024940030063034
+:108B100000028732000076B1001E76B4FFE5C73848
+:108B20006FC07738FFF0F72728002494002E063016
+:108B300000028732000076B1001E76B4FFE5C73828
+:108B40006FC07738FFF0F72728002494002C0630F8
+:108B500000028732000076B1001E76B4FFE5C73808
+:108B60006FC07738FFF0F72728002494002A0630DA
+:108B700000028732000076B1001E76B4FFE5C738E8
+:108B80006FC07738FFF0F7272800063000028732E1
+:108B90000000249400287631001E7630FFE5C738A7
+:108BA00067C07738FFF0F72728009413FFFC951370
+:108BB000FFFC9396FF7C9393FFFC07880008E0007E
+:108BC000D0DC9793FFFCF60442602494007E2514C9
+:108BD000008023940068063000028732000076B1DE
+:108BE000001E76B4FFE50630000275B1001EC738DE
+:108BF0006FC07738FFF0F72B28008732000075AC84
+:108C0000FFE5C7385FC07738FFF0F72728002494C6
+:108C1000007C063000028732000076B1001E76B478
+:108C2000FFE5C7386FC07738FFF0F7272800249496
+:108C3000007A063000028732000076B1001E76B45A
+:108C4000FFE5C7386FC07738FFF0F7272800249476
+:108C50000078063000028732000076B1001E76B43C
+:108C6000FFE5C7386FC07738FFF0F7272800249456
+:108C70000076063000028732000076B1001E76B41E
+:108C8000FFE5C7386FC07738FFF0F7272800249436
+:108C90000074063000028732000076B1001E76B400
+:108CA000FFE5C7386FC07738FFF0F7272800249416
+:108CB0000072063000028732000076B1001E76B4E2
+:108CC000FFE5C7386FC07738FFF0F7272800063078
+:108CD000000287320000249400707631001E763046
+:108CE000FFE5C73867C07738FFF0F72728009513EE
+:108CF000FFFC9396FF749393FFFC07880008E00045
+:108D0000D2589793FFFC8396FF7400000001939361
+:108D1000FFFCF704425823940050C70072009713D9
+:108D2000FFFC9396FF6C9393FFFC07880008E0001C
+:108D3000CF249793FFFC8396FF6CF6864250939363
+:108D4000FFFCF384425876B5001E9393FFFCF704B2
+:108D5000425076B4FFE5C7386FC07739FFF09713FC
+:108D6000FFFC8396FF7C000000019393FFFC0788C3
+:108D70000008E000F3389793FFFC20220000E60093
+:108D80008D9500000001F7044258000000010738EB
+:108D90000001F7054258F704425800000001203A4C
+:108DA0000007EE008DD4F3821770F7042D38F68695
+:108DB0002C2806380001F6052D3877390002F38299
+:108DC000001C20320044E6008DF4B3BA6802E000D3
+:108DD0008DF4F0052D389393FFFCF382001B9393E1
+:108DE000FFFCF38642449393FFFC07880008E001F0
+:108DF0001EC09793FFFC8796FFFC8296FFF8021433
+:108E00000000013C0000000000019293FFFC029072
+:108E1000000822100088F7044250F686425076B5CA
+:108E2000001EF3846F3476B4FFE59396FFC4C73811
+:108E30006FC0869E000C7739FFF0C0367200E600E6
+:108E40008E65F60642A0F70442A076B1001E76B405
+:108E5000FFE5C7386FC07739FFF007380001E00041
+:108E600094E4F7332800F604426024940036851613
+:108E7000FFC423940038063000028732000076B128
+:108E8000001E76B4FFE5852A001C0630000275B18D
+:108E9000001EC7386FC07738FFF09516FFBCF71F6C
+:108EA00028008732000075ACFFE58516FFC4C7387F
+:108EB0005FC07738FFF0F72728002494003406308D
+:108EC00000028732000076B1001E76B4FFE5C73895
+:108ED0006FC07738FFF0F72728002494003206305F
+:108EE00000028732000076B1001E76B4FFE5C73875
+:108EF0006FC07738FFF0F727280024940030063041
+:108F000000028732000076B1001E76B4FFE5C73854
+:108F10006FC07738FFF0F72728002494002E063022
+:108F200000028732000076B1001E76B4FFE5C73834
+:108F30006FC07738FFF0F72728002494002C063004
+:108F400000028732000076B1001E76B4FFE5C73814
+:108F50006FC07738FFF0F72728002494002A0630E6
+:108F600000028732000076B1001E76B4FFE5C738F4
+:108F70006FC07738FFF0F7272800063000028732ED
+:108F80000000249400287631001E7630FFE5C738B3
+:108F900067C07738FFF0F7272800872A00200000F5
+:108FA00000019713FFFC9393FFFC271400209713F5
+:108FB000FFFC07880008E000D0DC9793FFFC839655
+:108FC000FFC400000001871E001000000001203ACD
+:108FD0000000E6008FF0F6820000871E00140000FB
+:108FE0000001203A0000E6008FF420360000F682EF
+:108FF000000120360000E6009041000000018516C7
+:10900000FFC400000001052800109516FFB4951359
+:10901000FFFC07880008E00072509793FFFC8396DE
+:10902000FFB4271400209393FFFC9713FFFC0788DD
+:109030000008E000F9349793FFFCE00094E400009E
+:1090400000018516FFBC00000001202A0000E60098
+:1090500094BC0000000107880008E000CBCC979387
+:10906000FFFCF502000023940062F51F28007595AF
+:10907000001E75ACFFE50620000206B000022314B6
+:10908000001E7399001E739CFFE59396FF7475157F
+:10909000001E7528FFE59516FF7C7395001E739CD6
+:1090A000FFE59396FF8C8516FFC47395001E93967B
+:1090B000FF84852A0034239400629516FFACF033B8
+:1090C00028000520001A9516FF94839E0000779DC6
+:1090D000001E77BCFFE5C39C7FC0739DFFF07495B5
+:1090E000001EF3AB28008516FFC474A4FFE5852A93
+:1090F00000108396FFC49522001C839E00148516E1
+:10910000FF8493A200208716FFE07528FFE59516DF
+:10911000FF84F3844F588516FF74C7385FC07738D3
+:10912000FFF0F7332800871A00009396FFA4C022AF
+:109130003A008396FF7CC73857C07738FFF0F7377F
+:10914000280006B400028716FFE42314001A7619DB
+:10915000001E7630FFE5C7384FC07738FFF0F7378D
+:109160002800871A000006B40002C73867C07738A5
+:10917000FFF0F737280006B400028716FFE8231433
+:1091800000167619001E7630FFE5C7383FC07738E5
+:10919000FFF0F7372800871A000006B40002851692
+:1091A000FF8C8396FF84C73867C07738FFF0F737A6
+:1091B000280006B400028716FFEC2314001276196B
+:1091C000001E7630FFE5C73857C07738FFF0F73715
+:1091D0002800871A000006B40002C73867C0773835
+:1091E000FFF0F73728008716FFF006B40002C738F3
+:1091F0003FC07738FFF0F7372800F5020002F5236B
+:10920000280023940052839E0000779D001E77BCA7
+:10921000FFE5C39C7FC0739DFFF003200018E600AC
+:109220009230F39B2800F7044270E000929CF6060F
+:1092300042728516FFC40000000186AA00200000CB
+:10924000000107340007203A000EE2009294C73470
+:109250006800F5844260F38200FFC72C7000073875
+:10926000002686BA00009716FF747739001E7738FB
+:10927000FFE5C6B477C076B5FFF0C6B43C00203633
+:109280000000470C0001D7000A70203A0000E600F9
+:1092900092C900000001F7044274F606427476B1E8
+:1092A000001E76B4FFE5C7386FC07739FFF0073886
+:1092B0000001F733280007880008E000789C9793A6
+:1092C000FFFCE00094E4000000018516FFA48396F3
+:1092D000FF74C720520074B8FFFAC6240000871E2E
+:1092E0000000769D001E76B4FFE5C5AC520075AC5B
+:1092F000FFFA46310000F50200FFC6305400C738BF
+:109300006FC07739FFF0F682FF00C7386C00C630B7
+:109310007000F61F28008396FF948516FFC4F59F02
+:109320002800872A000400000001203A0024E600FB
+:109330009469F6864098F7046E50862A002CC6A4DD
+:10934000000023940062849E0000779D001E77BC7D
+:10935000FFE5C4A47FC074A5FFF046B50000873ABE
+:109360001DDC76B50002C0327200470C0001D70048
+:109370000A70203A0000F7064098E6009434C3349F
+:109380007000C584000086AA0024F704E000F602FD
+:109390000000C036720005280024E60093C495162C
+:1093A000FF748396FFC400000001869E0028F70426
+:1093B000E00400000001C0367200E60093C82032CD
+:1093C0000000F602000120320000E60093D5000004
+:1093D0000001F58200008516FF74F704E00086AAFC
+:1093E000000000000001C0367200E2009414F60292
+:1093F0000000C0367200E600941C2032000086AAED
+:109400000004F704E00400000001C0367200E2002E
+:10941000941D20320000F602000120320000E60018
+:10942000942D202E0000F5820001202E0000E60081
+:10943000943900000001F4820001F7044F58F49BB6
+:1094400028008396FFC4F686409AC72072007738BA
+:10945000FFFA861E00304739000077390002C7380E
+:109460006800E00094E4F63B2800472500007739C7
+:109470000002C7386800F5020001F53B28000738F4
+:10948000000223940062839E0000779D001E77BC3B
+:10949000FFE5C39C7FC0739DFFF025140062F3BB02
+:1094A0002800852A000077A9001E77BCFFE5C528A3
+:1094B0007FC07529FFF0E00094E4F51B2800839637
+:1094C000FFBC00000001201E0001E60094E4000043
+:1094D000000107880008E000789C9793FFFCF506E0
+:1094E0003560F50542308796FFFC8296FFF802143E
+:1094F0000000013C0000000000019293FFFC02907C
+:109500000008F50642449513FFFC07880008E001B7
+:1095100020E49793FFFC20220000E60096890000DB
+:109520000001F68442540000000120360000EE00E5
+:10953000958DF5864250F7044250762D001E763008
+:10954000FFE526B40001F685425425000007F50525
+:109550004258F6842D38C73867C07739FFF007388E
+:109560000001F72F280006340001F6052D38F70614
+:109570002C2876B50002F502001C20320044E600DB
+:109580009688B5367002E0009688F0052D38F5040F
+:109590004260000000019513FFFC07880008E0000E
+:1095A000B2849793FFFCF6844F5800000001073403
+:1095B0000040C0227200E60095ECF6064276F70401
+:1095C000427476B1001E76B4FFE5C7386FC07739B4
+:1095D000FFF007380001F733280007880008E00093
+:1095E000789C9793FFFCE000968800000001F70448
+:1095F000426000000001C0227200E60096240000D4
+:1096000000019713FFFCF5043BB000000001951327
+:10961000FFFC07880008E000D42C9793FFFCE000D3
+:10962000964000000001C0226A00E600967100002A
+:1096300000019713FFFC07880008E000CC609793B7
+:10964000FFFCF704407C000000010738000197137D
+:10965000FFFCF5044074000000019513FFFC07882F
+:109660000008E000BEF89793FFFCE0009688000039
+:109670000001F5044074000000019513FFFC078809
+:109680000008E000C1B49793FFFC8796FFFC829628
+:10969000FFF802140000013C00000000000192935A
+:1096A000FFFC0290000822100070F6046F34F704EB
+:1096B000426486B2000400000001C0367200E60079
+:1096C0009B1806B0000287360000F404407C76B593
+:1096D000001E76B4FFE5C7386FC07739FFF0C03A97
+:1096E0004200E6009B1824940036F604407423944C
+:1096F0000038063000028732000076B1001E76B4D2
+:10970000FFE50630000275B1001EC7386FC077381C
+:10971000FFF0F71F28008732000075ACFFE5C7385F
+:109720005FC07738FFF0F727280024940034063014
+:1097300000028732000076B1001E76B4FFE5C7381C
+:109740006FC07738FFF0F7272800249400320630E6
+:1097500000028732000076B1001E76B4FFE5C738FC
+:109760006FC07738FFF0F7272800249400300630C8
+:1097700000028732000076B1001E76B4FFE5C738DC
+:109780006FC07738FFF0F72728002494002E0630AA
+:1097900000028732000076B1001E76B4FFE5C738BC
+:1097A0006FC07738FFF0F72728002494002C06308C
+:1097B00000028732000076B1001E76B4FFE5C7389C
+:1097C0006FC07738FFF0F72728002494002A06306E
+:1097D00000028732000076B1001E76B4FFE5C7387C
+:1097E0006FC07738FFF0F727280006300002873275
+:1097F0000000249400287631001E7630FFE5C7383B
+:1098000067C07738FFF0F72728009413FFFC939385
+:10981000FFFC271400209713FFFC07880008E000D6
+:10982000D0DC9793FFFC07880008E000CBCC97932F
+:10983000FFFCF50440749416FFC407200002F03BBF
+:10984000280024800007F40200FF8396FFC49516C9
+:10985000FFBC031C000A20260007EE0098A806188B
+:10986000000E86B200007731001E7738FFE575B133
+:10987000001E75ACFFE503180002C6B477C076B5CC
+:10988000FFF0F702FF00C6B47400F6B32800873279
+:10989000000004A40001C7385FC07739FFF0C73863
+:1098A0004400E0009854F73328008516FFC47495EF
+:1098B000001E74A4FFE58396FFC42314001E7419D0
+:1098C000001E7420FFE5052800269516FF8C85AA4A
+:1098D000000076A9001E76B4FFE5039C0002939673
+:1098E000FFB4061C00027395001E739CFFE593965F
+:1098F000FFAC7395001E739CFFE59396FF9C8396C7
+:10990000FFBC7515001E7528FFE59516FF947515AB
+:10991000001E7528FFE59516FFA48516FFC4C5AC8B
+:109920006FC075ADFFF0F5054260F5044F58F68243
+:1099300000FFC71C52007738FFFA47390000C738CC
+:109940006C00F682FF00C5AC6C00C73858008396E7
+:10995000FF8CF5843B6C8516FFB4F71F2800871633
+:10996000FFE006AC0001F6853B6C8396FFC4C73868
+:109970004FC07738FFF0F72B2800F5044F58871AAF
+:109980000000C01E5200C73847C07738FFF0F733D9
+:109990002800063000028716FFE42314001A769987
+:1099A000001E8396FF9476B4FFE5C7383FC0773832
+:1099B000FFF0F7332800871A000006300002C7388E
+:1099C0006FC07738FFF0F7332800063000028716A3
+:1099D000FFE8231400167699001E76B4FFE585167D
+:1099E000FFAC8396FFA4C73857C07738FFF0F73332
+:1099F0002800871A0000063000028516FF9CC73831
+:109A00006FC07738FFF0F733280006300002871662
+:109A1000FFEC231400127699001E76B4FFE5C738D8
+:109A20003FC07738FFF0F7332800871A0000063070
+:109A300000028396FFC4C7386FC07738FFF0F73352
+:109A400028008716FFF006300002C73857C0773865
+:109A5000FFF0F7332800071C003AF5BB2800071C6D
+:109A60000036F03B2800F5020003E6009AA4F51F3B
+:109A70002800F7044278F606427876B1001E76B4E4
+:109A8000FFE5C7386FC07739FFF007380001F733BB
+:109A9000280007880008E000789C9793FFFCE0000E
+:109AA0009B1800000001F38642449393FFFC078853
+:109AB0000008E0011F489793FFFC25000007F5050B
+:109AC0004258F7044250F606425076B1001E76B472
+:109AD000FFE5F3820006F3854254F5063934F505B7
+:109AE0004244C7386FC07739FFF0F6842D38073805
+:109AF0000001F733280006340001F6052D38F7067B
+:109B00002C2876B50002F382001C20320044E600C7
+:109B10009B18B3B67002F0052D388796FFFC82962D
+:109B2000FFF802140000013C0000000000019293C5
+:109B3000FFFC0290000822100078F38642449393C1
+:109B4000FFFC07880008E00120E49793FFFC202237
+:109B50000000E6009E4100000001F70442540000AE
+:109B60000001203A0000EE009D8524940036F604A2
+:109B7000407425140038063000028732000076B1A8
+:109B8000001E76B4FFE50630000275B1001EC7382E
+:109B90006FC07738FFF0F72B28008732000075ACD4
+:109BA000FFE5C7385FC07738FFF0F7272800249417
+:109BB0000034063000028732000076B1001E76B411
+:109BC000FFE5C7386FC07738FFF0F72728002494E7
+:109BD0000032063000028732000076B1001E76B4F3
+:109BE000FFE5C7386FC07738FFF0F72728002494C7
+:109BF0000030063000028732000076B1001E76B4D5
+:109C0000FFE5C7386FC07738FFF0F72728002494A6
+:109C1000002E063000028732000076B1001E76B4B6
+:109C2000FFE5C7386FC07738FFF0F7272800249486
+:109C3000002C063000028732000076B1001E76B498
+:109C4000FFE5C7386FC07738FFF0F7272800249466
+:109C5000002A063000028732000076B1001E76B47A
+:109C6000FFE5C7386FC07738FFF0F72728000630C8
+:109C7000000287320000249400287631001E7630DE
+:109C8000FFE5C73867C07738FFF0F7272800F3846F
+:109C9000407C000000019393FFFC9513FFFC23948C
+:109CA00000209396FF949393FFFC07880008E00040
+:109CB000D0DC9793FFFC8396FF9400000001939300
+:109CC000FFFC239400689396FF8C9393FFFC078816
+:109CD0000008E000D2589793FFFC8396FF8C0000A9
+:109CE00000019393FFFC9013FFFC23940050939684
+:109CF000FF849393FFFC07880008E000CF2497932C
+:109D0000FFFC8702FF3400000001F7054264F38482
+:109D1000407C000000019393FFFC9713FFFC8396A7
+:109D2000FF84000000019393FFFC8396FF940000E2
+:109D300000019393FFFC07880008E000F7C89793A1
+:109D4000FFFC20220000E6009D5DF3821770F704FF
+:109D500042540000000127380001F7054254939354
+:109D6000FFFCF382001B9393FFFCF3864244939322
+:109D7000FFFC07880008E0011EC09793FFFCE0008D
+:109D80009E4000000001F504407CF4844074C72824
+:109D90005000C724700005B8002686AE0000772D5D
+:109DA000001E7738FFE5C6B477C077B40008703E70
+:109DB000FFE8470C0001D7000A70203A0000F704C2
+:109DC0004F58E6009DFDF60200FFF7044278F606C4
+:109DD000427A76B1001E76B4FFE5C7386FC0773996
+:109DE000FFF007380001F733280007880008E0007B
+:109DF000789C9793FFFCE0009E400000000186AE37
+:109E00000000772D001E7738FFE5C6B477C076B521
+:109E1000FFF0F7020001C7386400F602FF00C6B485
+:109E20006400C7386800F72F28000728000197133F
+:109E3000FFFC9493FFFC07880008E000BEF89793AE
+:109E4000FFFC8796FFFC8296FFF802140000013C9D
+:109E50000000000000019293FFFC02900008221015
+:109E600000D8F38642449393FFFC07880008E00182
+:109E700020E49793FFFC20220000E600A2C9000026
+:109E80000001F704425400000001203A0000EE00F7
+:109E9000A03524940036F6044074251400380630AA
+:109EA00000028732000076B1001E76B4FFE506306E
+:109EB000000275B1001EC7386FC07738FFF0F72B6E
+:109EC00028008732000075ACFFE5C7385FC07738DF
+:109ED000FFF0F72728002494003406300002873270
+:109EE000000076B1001E76B4FFE5C7386FC0773842
+:109EF000FFF0F72728002494003206300002873252
+:109F0000000076B1001E76B4FFE5C7386FC0773821
+:109F1000FFF0F72728002494003006300002873233
+:109F2000000076B1001E76B4FFE5C7386FC0773801
+:109F3000FFF0F72728002494002E06300002873215
+:109F4000000076B1001E76B4FFE5C7386FC07738E1
+:109F5000FFF0F72728002494002C063000028732F7
+:109F6000000076B1001E76B4FFE5C7386FC07738C1
+:109F7000FFF0F72728002494002A063000028732D9
+:109F8000000076B1001E76B4FFE5C7386FC07738A1
+:109F9000FFF0F727280006300002873200002494E3
+:109FA00000287631001E7630FFE5C73867C0773865
+:109FB000FFF0F7272800F384407C00000001939312
+:109FC000FFFC9513FFFC239400209396FF4C939382
+:109FD000FFFC07880008E000D0DC9793FFFC839625
+:109FE000FF4C000000019393FFFC239400509396D4
+:109FF000FF449393FFFC07880008E000D258979332
+:10A00000FFFC8702FF3400000001F7054264F3847F
+:10A01000407C000000019393FFFC9713FFFC8396A4
+:10A02000FF44000000019393FFFC8396FF4CE00087
+:10A03000A2809393FFFCF404407CF6044074F38206
+:10A040000000C7204000C73070000738002686BADD
+:10A0500000007739001E7738FFE5C6B477C077B4C3
+:10A060000008703EFFE8470C0001D7000A70203A54
+:10A070000000E600A0AD9396FF3CF70442A0F60670
+:10A0800042A076B1001E76B4FFE5C7386FC07739BD
+:10A09000FFF007380001F733280007880008E000C8
+:10A0A000789C9793FFFCE000A2C8000000010630F6
+:10A0B00000028732000076B1001E76B4FFE52494DA
+:10A0C000007E25140080239400680630000275B1DC
+:10A0D000001EC7386FC07738FFF0F72B2800873293
+:10A0E000000075ACFFE5C7385FC07738FFF0F72791
+:10A0F00028002494007C063000028732000076B1EC
+:10A10000001E76B4FFE5C7386FC07738FFF0F72739
+:10A1100028002494007A063000028732000076B1CD
+:10A12000001E76B4FFE5C7386FC07738FFF0F72719
+:10A13000280024940078063000028732000076B1AF
+:10A14000001E76B4FFE5C7386FC07738FFF0F727F9
+:10A15000280024940076063000028732000076B191
+:10A16000001E76B4FFE5C7386FC07738FFF0F727D9
+:10A17000280024940074063000028732000076B173
+:10A18000001E76B4FFE5C7386FC07738FFF0F727B9
+:10A19000280024940072063000028732000076B155
+:10A1A000001E76B4FFE5C7386FC07738FFF0F72799
+:10A1B00028000630000287320000249400707631B7
+:10A1C000001E7630FFE5C73867C07738FFF0F72705
+:10A1D00028009413FFFC9513FFFC9396FF34939390
+:10A1E000FFFC07880008E000D0DC9793FFFC839613
+:10A1F000FF34000000019393FFFC239400B093967A
+:10A20000FF2C9393FFFC07880008E000D258979337
+:10A21000FFFC8396FF2C000000019393FFFC8396C4
+:10A22000FF3C000000019393FFFC23940098939659
+:10A23000FF249393FFFC07880008E000CF24979346
+:10A24000FFFCF3820006F38542548702FF34F38655
+:10A2500038A8F3854244F7054264F384407C00004B
+:10A2600000019393FFFC9713FFFC8396FF240000EB
+:10A2700000019393FFFC8396FF3400000001939349
+:10A28000FFFC07880008E000F7C89793FFFC202236
+:10A290000000E600A2A9F3821770F7044254000000
+:10A2A000000127380001F70542549393FFFCF38225
+:10A2B000001B9393FFFCF38642449393FFFC0788B3
+:10A2C0000008E0011EC09793FFFC8796FFFC829672
+:10A2D000FFF802140000013C00000000000192930E
+:10A2E000FFFC02900008F6046F34F704426486B263
+:10A2F000000400000001C0367200E600A3AC06B006
+:10A3000000028736000076B5001E76B4FFE5C73838
+:10A310006FC0F684407C7739FFF0C03A6A00E600EF
+:10A32000A3ACC7346800F5844074F6044F580000AD
+:10A330000001C62C62007630FFFAC5AC700005AC97
+:10A34000002686AE0000772D001E7738FFE54631E7
+:10A350000000C6B477C076B5FFF0F70200FFC63044
+:10A360007400F702FF00C6B47400C6306800F62F10
+:10A370002800F50642449513FFFC07880008E00119
+:10A380001F489793FFFCF704407C0000000107384A
+:10A3900000019713FFFCF5044074000000019513C1
+:10A3A000FFFC07880008E000BEF89793FFFC879643
+:10A3B000FFFC8296FFF802140000013C0000000040
+:10A3C00000019293FFFC0290000822100080F70425
+:10A3D000425800000001203A0000E600A3F4203AB1
+:10A3E0000007F5020001F5054258F7044258000045
+:10A3F0000001203A0007EE00A6F02394001EF604A8
+:10A40000426023140066F4844078063000028732EC
+:10A41000000076B1001E76B4FFE504A400027425A6
+:10A42000001E7420FFE5063000027531001E7528FD
+:10A43000FFE59516FF7CC7386FC07738FFF025140D
+:10A4400000209516FF94F72B280087320000851610
+:10A45000FF7C05A40002C73857C07738FFF0F71F0C
+:10A4600028002394001C063000028732000076B1D9
+:10A47000001E76B4FFE525140050C7386FC077384A
+:10A48000FFF0F71F28002394001A063000028732DD
+:10A49000000076B1001E76B4FFE5C7386FC077388C
+:10A4A000FFF0F71F280023940018063000028732BF
+:10A4B000000076B1001E76B4FFE5C7386FC077386C
+:10A4C000FFF0F71F280023940016063000028732A1
+:10A4D000000076B1001E76B4FFE5C7386FC077384C
+:10A4E000FFF0F71F28002394001406300002873283
+:10A4F000000076B1001E76B4FFE5C7386FC077382C
+:10A50000FFF0F71F28002394001206300002873264
+:10A51000000076B1001E76B4FFE5C7386FC077380B
+:10A52000FFF0F71F28002394001006300002873246
+:10A53000000076AD001E7631001E7630FFE5C7388C
+:10A5400067C07738FFF0F71F280087260000261421
+:10A550000068C73847C07738FFF0F7332800872EE8
+:10A56000000076B4FFE5C7386FC07738FFF0F71BFF
+:10A5700028002314006405AC0002872E000076AD8D
+:10A58000001E76B4FFE5C7386FC07738FFF0F71BC1
+:10A5900028002314006205AC0002872E000076AD6F
+:10A5A000001E76B4FFE5C7386FC07738FFF0F71BA1
+:10A5B00028002314006005AC0002872E000076AD51
+:10A5C000001E76B4FFE5C7386FC07738FFF0F71B81
+:10A5D00028002314005E05AC0002872E000076AD33
+:10A5E000001E76B4FFE5C7386FC07738FFF0F71B61
+:10A5F00028002314005C05AC0002872E000076AD15
+:10A60000001E76B4FFE5C7386FC07738FFF0F71B40
+:10A6100028002314005A05AC0002872E000076ADF6
+:10A62000001E76B4FFE5C7386FC07738FFF0F71B20
+:10A63000280005AC0002872E00002314005875ADD9
+:10A64000001E75ACFFE5C7385FC07738FFF0F71B19
+:10A6500028009613FFFC9516FF8C9513FFFC0788C6
+:10A660000008E000D2589793FFFC8516FF8C00008D
+:10A6700000019513FFFCF5044258000000019513FA
+:10A68000FFFC251400389516FF849513FFFC0788FE
+:10A690000008E000CF249793FFFCF5044258000027
+:10A6A00000019513FFFCF5044264000000019513BE
+:10A6B000FFFC8516FF84000000019513FFFC851642
+:10A6C000FF94000000019513FFFC07880008E000DC
+:10A6D000F7C89793FFFC20220000E600A6F10000D7
+:10A6E0000001F70442580000000107380001F70597
+:10A6F0004258F704425800000001203A0007EE00DB
+:10A70000A730F5021770F7042D38F6862C28063886
+:10A710000001F6052D3877390002F502001C2032C1
+:10A720000044E600A750B53A6802E000A750F005E3
+:10A730002D389513FFFCF502001B9513FFFCF50661
+:10A7400042449513FFFC07880008E0011EC0979360
+:10A75000FFFC8796FFFC8296FFF802140000013C84
+:10A760000000000000019293FFFC029000082210FC
+:10A770000030F6046F34F704426486B2000400002F
+:10A780000001C0367200E600A9F007300002863AE8
+:10A790000000F5820000F684407C7739001E77388F
+:10A7A000FFE5C63077C0F7044074C6B46800763160
+:10A7B000FFF0C60062009616FFF4C738680007383D
+:10A7C000002686BA00007739001E7738FFE5C6B448
+:10A7D00077C077B40008703EFFE8470C0001D7004F
+:10A7E0000A70203A0000E600A834F60200FF831643
+:10A7F000FFF48396FFF4F7044078C6983800C73812
+:10A8000068000738002686BA00007739001E7738BE
+:10A81000FFE5C6B477C076B5FFF0C6B46400C036B5
+:10A820005A00470C0001D7000A70203A0000E600E9
+:10A83000A83D202E0000F5820001202E0000E60039
+:10A84000A875F606427CF704427C76B1001E76B409
+:10A85000FFE5C7386FC07739FFF007380001F733DD
+:10A86000280007880008E000789C9793FFFCE00030
+:10A87000A9F000000001F3044260000000019313FE
+:10A88000FFFC07880008E000CC609793FFFCF4040D
+:10A890004078F7044F58F5044074F384407CF30487
+:10A8A000407CC62072007630FFFAC59C3000C5A8F7
+:10A8B000580005AC002686AE000074AD001E74A4DE
+:10A8C000FFE573AD001E739CFFE59396FFD4C5288A
+:10A8D00072007528FFFA8316FFF48396FFF4463161
+:10A8E000000045290000C7183800C420700004206B
+:10A8F00000267321001EC6B44FC076B5FFF0F48267
+:10A9000000FFC6304C00F382FF00C6B43C00C630E6
+:10A910006800F62F2800872E00007318FFE59316B5
+:10A92000FFCC8316FFD48396FFF4C5284C00C738AC
+:10A9300037C07739FFF0769D001076B5FFF8C7383D
+:10A940004C00C6B47000F6AF28008722000076A144
+:10A95000001E8316FFCCF382FF0076B4FFE5C738F4
+:10A9600037C07739FFF0C7383C00C5287000F523A1
+:10A97000280087220000F304407CC7386FC0773975
+:10A98000FFF0731900109316FFEC7399FFF8C738A6
+:10A990004C00C71C70009716FFDC23140022831A9A
+:10A9A00000007799001E77BCFFE5C3187FC07319BC
+:10A9B000FFF0F3232800F38642449393FFFC0788BB
+:10A9C0000008E0011F489793FFFCF704407C00005B
+:10A9D0000001073800019713FFFCF30440740000E6
+:10A9E00000019313FFFC07880008E000BEF897936E
+:10A9F000FFFC8796FFFC8296FFF802140000013CE2
+:10AA00000000000000019293FFFC02900008221059
+:10AA10000098F30642449313FFFC07880008E00106
+:10AA200020E49793FFFC20220000E600AEE5000042
+:10AA30000001F704425400000001203A0000EE003B
+:10AA4000AD8927380001F70542542394001EF6040F
+:10AA50004260249400669496FF64F3044078249442
+:10AA600000209496FF94063000028732000076B1F1
+:10AA7000001E76B4FFE5031800029316FF747419E4
+:10AA8000001E7420FFE505980002063000027531B3
+:10AA9000001EC7386FC07738FFF0F72728008732CD
+:10AAA00000007528FFE5C73857C07738FFF0F71F5B
+:10AAB00028002394001C063000028732000076B183
+:10AAC000001E76B4FFE58516FF64C7386FC077387F
+:10AAD000FFF0F71F28002394001A06300002873287
+:10AAE000000076B1001E76B4FFE5C7386FC0773836
+:10AAF000FFF0F71F28002394001806300002873269
+:10AB0000000076B1001E76B4FFE5C7386FC0773815
+:10AB1000FFF0F71F2800239400160630000287324A
+:10AB2000000076B1001E76B4FFE5C7386FC07738F5
+:10AB3000FFF0F71F2800239400140630000287322C
+:10AB4000000076B1001E76B4FFE5C7386FC07738D5
+:10AB5000FFF0F71F2800239400120630000287320E
+:10AB6000000076B1001E76B4FFE5C7386FC07738B5
+:10AB7000FFF0F71F280023940010063000028732F0
+:10AB8000000076AD001E7631001E7630FFE5C73836
+:10AB900067C07738FFF0F71F2800871A00002614D7
+:10ABA0000068C73847C07738FFF0F7332800872E92
+:10ABB000000076B4FFE5C7386FC07738FFF0F72B99
+:10ABC0002800231400649316FF6405AC0002872E4E
+:10ABD000000076AD001E76B4FFE5C7386FC0773849
+:10ABE000FFF0F71B2800249400629496FF6405ACE4
+:10ABF0000002872E000076AD001E76B4FFE5C73850
+:10AC00006FC07738FFF0F7272800251400609516ED
+:10AC1000FF6405AC0002872E000076AD001E76B4FE
+:10AC2000FFE5C7386FC07738FFF0F72B28002314F3
+:10AC3000005E9316FF6405AC0002872E000076AD1F
+:10AC4000001E76B4FFE5C7386FC07738FFF0F71BFA
+:10AC500028002494005C9496FF6405AC0002872EC3
+:10AC6000000076AD001E76B4FFE5C7386FC07738B8
+:10AC7000FFF0F72728002514005A9516FF6405AC4D
+:10AC80000002872E000076AD001E76B4FFE5249406
+:10AC90000050C7386FC07738FFF0F72B2800231417
+:10ACA000005805AC0002872E00009316FF6475ADB6
+:10ACB000001E75ACFFE5C7385FC07738FFF0F71BA3
+:10ACC00028009613FFFC9496FF8C9493FFFC078852
+:10ACD0000008E000D2589793FFFC8516FF8C2314E0
+:10ACE00000389513FFFC278000079793FFFC93160D
+:10ACF000FF849313FFFC07880008E000CF2497939C
+:10AD0000FFFC27800007F7854258278000079793AC
+:10AD1000FFFCF4844264000000019493FFFC85165C
+:10AD2000FF84000000019513FFFC8316FF940000D0
+:10AD300000019313FFFC07880008E000F7C8979311
+:10AD4000FFFC20220000E600AD5D00000001F704DA
+:10AD500042580000000107380001F7054258F70487
+:10AD60002D38F6862C2806380001F6052D3877395F
+:10AD70000002F482001C20320044E600AEE4B4BAC3
+:10AD80006802E000AEE4F0052D38F7044078F58461
+:10AD90004F580738001686BA0000F4063B90773902
+:10ADA000001E7738FFE5C6B477C076B4FFF076357D
+:10ADB0000006A72E6002C52C600076A9001E76B49E
+:10ADC000FFE5C7386FC07739FFF077390003C73820
+:10ADD00040000738000286BA00007739001E773835
+:10ADE000FFE5C6B477C073B7FFF0EE00AE55951619
+:10ADF000FF64A72E600276A9001E76B4FFE5C7386F
+:10AE00006FC07739FFF077390003C738400086BA42
+:10AE10000004231400887739001E7738FFE5C6B494
+:10AE200077C076B5FFF0A6AA6802771D0003C73881
+:10AE3000680027380008853A000484BA0000000042
+:10AE40000001951A0004949A00008596FF7CE000AA
+:10AE5000AE78000000018496FF64A72E600276A5FC
+:10AE6000001E76B4FFE5C7386FC07739FFF0773939
+:10AE70000003C738400085BA00048516FF64F60653
+:10AE80003B90872A000076A9001E76B4FFE5C738FC
+:10AE90006FC07739FFF077390003A6BA6002201E31
+:10AEA0000000C73860007739001E7738FFE5C6B468
+:10AEB00077C0EE00AEC976B5FFF08316FF780000CC
+:10AEC00000017719FFF0C6B868008496FF6400009F
+:10AED0000001C72468009713FFFC07880008C12CF5
+:10AEE00000009793FFFC8796FFFC8296FFF8021400
+:10AEF0000000013C0000000000019293FFFC029062
+:10AF0000000822100010F704408400000001203ADD
+:10AF10000000E600AF3CF60642B8F70442B876B14E
+:10AF2000001E76B4FFE5F3063678F3054244C738D1
+:10AF30006FC07739FFF007380001F7332800F704B6
+:10AF40004F5CF384425C833A0004C43800009316DB
+:10AF5000FFEC771D0001C73838007739000204B8CC
+:10AF6000000C8316FFEC00000001C01E3200EC0054
+:10AF7000B070C5040000A6A24802F704E000F58204
+:10AF80000000C0367200E600AFA8C620480086B2B6
+:10AF90000004F704E00400000001C0367200E6007F
+:10AFA000AFAC202E0000F5820001202E0000E6004C
+:10AFB000AFB900000001F502000086B20000F704FE
+:10AFC000E00000000001C0367200E200AFF4F5823C
+:10AFD0000000C0367200E600AFFC202E000086B2F2
+:10AFE0000004F704E00400000001C0367200E20033
+:10AFF000AFFD202E0000F5820001202E0000E600AB
+:10B00000B00D202A0000F5020001202A0000E60011
+:10B01000B05900000001F7047AD000000001203A86
+:10B020000000E600B064C7204800873A0008F60632
+:10B03000409877390002A6BA6002C73860007739B5
+:10B04000001E7738FFE5C6B477C076B5FFF020362E
+:10B050000000E600B0640000000104A4000CE00061
+:10B06000AF60039C00018316FFEC00000001C01ECE
+:10B070003200EC00B104F3063678F6844F5C771D9D
+:10B080000001C7383800773900020738000CC6B411
+:10B09000700087360008F6844F5877390006C6B42A
+:10B0A00070009693FFFC9396FFF407880008E00079
+:10B0B000FA989793FFFC20220000F684426C839656
+:10B0C000FFF4470C0001D7000A70C71C7000F70599
+:10B0D000425C06B40001F7042D38F685426CF68612
+:10B0E0002C2806380001F6052D3877390002F302C6
+:10B0F000001C20320044E600B108B33A6802E000C8
+:10B10000B108F0052D38F30542448796FFFC82967E
+:10B11000FFF802140000013C0000000000019293BF
+:10B12000FFFC02900008F4020000C5A00000F682B7
+:10B130000770F7046E5020360000E600B16D063847
+:10B14000001C8732000000000001C4207000C022F3
+:10B150007200E400B15D0000000105AC000126B4FE
+:10B16000000120360000E600B14006300004C42093
+:10B170005800C0225A00E400B18100000001042000
+:10B1800000018796FFFC8296FFF802140000013C44
+:10B190000000000000019293FFFC02900008078865
+:10B1A0000008E00078D89793FFFC07880008E000CB
+:10B1B000B11C9793FFFCF704409400000001C022EB
+:10B1C0007200E600B1EDF4054090F7046E50000007
+:10B1D000000186BA1DDCF582000106B4000196BAB2
+:10B1E0001DDC873A1DDCE000B1F0F5857AD0F00572
+:10B1F0007AD0F5844090F0054084F5854094F5863A
+:10B20000E0009593FFFC07880008E000D5A0979325
+:10B21000FFFCF7046E50F405408485BA1DDC000085
+:10B220000001F5853B64F584E000F005425C95BAC9
+:10B230000010F584E004F6862C2895BA0014F70473
+:10B240002D38F5863A4CF585424406380001F6055E
+:10B250002D3877390002F582001C20320044E600C8
+:10B26000B268B5BA6802F0052D38F58635ECF5857B
+:10B2700042308796FFFC8296FFF802140008013CDA
+:10B280000000000000019293FFFC029000082210D1
+:10B2900000C8F30200009316FF94248000089496DF
+:10B2A000FF84238000078316FF940000000193169B
+:10B2B000FF54201E0007EE00B564C71C38008496BA
+:10B2C000000000000001C72470000738002686BA7D
+:10B2D0000000F5844F587739001E7738FFE5C6B473
+:10B2E00077C076B5FFF0F70200FFC6B67400E6003F
+:10B2F000B32D20360001E600B32D77350006A6BA3F
+:10B300005802C73858007639001E7630FFE5C6B4BB
+:10B3100067C076B5FFF020360002E600B331C6B84C
+:10B320000000C72C0000E000B330C6B80000F6846F
+:10B330004F58F7044F58C5340000C02A7200E60089
+:10B34000B55D00000001F6843BBCF30200009316DB
+:10B35000FF3C0428001CF7043BB800000001C03685
+:10B360007200EC00B4409696FFAC77350001C73808
+:10B37000680077390002F4863BB4C63848000630CE
+:10B38000000CC30400009316FF3486B20000872A25
+:10B39000001C8596FF3CC0367200E600B3C0202E2C
+:10B3A000000086B20004872A002000000001C03699
+:10B3B0007200E600B3C0202E0000F5820001202EAE
+:10B3C0000000E600B3D100000001F4820000949672
+:10B3D000FF3486B200008722000000000001C03662
+:10B3E0007200E200B40CF5820000C0367200E60084
+:10B3F000B414202E000086B200048722000400004E
+:10B400000001C0367200E200B415202E0000F58263
+:10B410000001202E0000E600B42500000001F30228
+:10B4200000019316FF348496FF34000000012026AB
+:10B430000000E600B44000000001F3020001931692
+:10B44000FF3C8496FF3C0000000120260000E6003F
+:10B45000B481F60200018716FFACF3063BB476B95F
+:10B460000001C6B4700076B50002C6B4300006B460
+:10B47000001486B600009716FFB0E000B4F496966C
+:10B48000FFB4271400549713FFFC9413FFFCF486B9
+:10B490003BB49493FFFC9396FF4C9516FF440788AA
+:10B4A0000008E00125689793FFFC8396FF4C851602
+:10B4B000FF4420220000E600B4F1F60200018716E6
+:10B4C000FFACF3063BB476B90001C6B4700076B5A4
+:10B4D0000002C6B4300006B4001486B60000971609
+:10B4E000FFB09696FFB4F7053BBCE000B4F82032FD
+:10B4F0000000F602000020320000E600B52D2714FF
+:10B5000000088496FF5400000001C72470008316D1
+:10B51000FFB404A400049496FF548496FF94933AD5
+:10B52000FFC004A40001E000B5549496FF94831674
+:10B53000FF5400000001C7187000F4844F5803182E
+:10B5400000049316FF548316FF9494BAFFC00318A7
+:10B5500000019316FF949516FF3C9396FF8CE00034
+:10B56000B2B0039C00018496FF94000000012026E5
+:10B570000000E600B584F3820001F4044F58E000B7
+:10B58000BEE4000000018316FFB88496FF9400001B
+:10B590000001C01E4A00EC00B5CC9316FF7C269437
+:10B5A00000048736FFC08316FF7C00000001C03A0C
+:10B5B0003200E600BB98039C00018496FF940000D3
+:10B5C0000001C01E4A00EC00B5A106B40004F4045A
+:10B5D0004F588316FF7C00000001C01A4200E600AD
+:10B5E000BA2DF48200009496FF7423800007201E79
+:10B5F0000007EE00B748C71C38008316FF7C000028
+:10B600000001C71870000738002686BA0000F584CC
+:10B610004F587739001E7738FFE5C6B477C076B546
+:10B62000FFF0F70200FFC6B67400E600B6692036E8
+:10B630000001E600B66977350006A6BA5802C73899
+:10B6400058007639001E7630FFE5C6B467C076B57F
+:10B65000FFF020360002E600B66DC6B80000C72C29
+:10B660000000E000B66CC6B80000F6844F58F7043E
+:10B670004F58C5340000C02A7200E600B741C584A7
+:10B6800000008496FF7486AA001C8316FF3CF60215
+:10B69000000004A400019496FF74871A001C04A8FB
+:10B6A000001C9496FF34C0367200E600B6CC041835
+:10B6B000001C86AA0020871A002000000001C03666
+:10B6C0007200E600B6D020320000F60200012032FF
+:10B6D0000000E600B6DD00000001F58200008316E0
+:10B6E000FF3487220000869A000000000001C03667
+:10B6F0007200E200B71CF6020000C0367200E600DD
+:10B70000B72420320000869A00048722000400003B
+:10B710000001C0367200E200B72520320000F602B8
+:10B72000000120320000E600B735202E0000F5822F
+:10B730000001202E0000E600B740000000019396B3
+:10B74000FF84E000B5EC039C00018496FF7483162F
+:10B75000FF9400000001C0263200E600BB982300E1
+:10B7600000088496FF8400000001C0263200E60035
+:10B77000BB99F6020000F684407CF7044074C6B41E
+:10B780006800C73868000738002686BA0000773995
+:10B79000001E7738FFE5C6B477C077B40008703E66
+:10B7A000FFE8470C0001D7000A70203A0000E600CD
+:10B7B000B804F58200FF8496FF848316FF8C000096
+:10B7C0000001C72432008496FF7CC7387000C7246C
+:10B7D00070000738002686BA00007739001E7738D7
+:10B7E000FFE5C6B477C076B5FFF0C6B45C00C036DE
+:10B7F0006200470C0001D7000A70203A0000E60002
+:10B80000B80D20320000F602000120320000E600F0
+:10B81000BB9823800007201E0007EE00B8C8C71C95
+:10B8200038008316000000000001C71870000738B8
+:10B83000002686BA0000F5844F587739001E773805
+:10B84000FFE5C6B477C076B5FFF0F70200FFC6B6D5
+:10B850007400E600B89120360001E600B891773513
+:10B860000006A6BA5802C73858007639001E76304E
+:10B87000FFE5C6B467C076B5FFF020360002E600EB
+:10B88000B895C6B80000C72C0000E000B894C6B850
+:10B890000000F6844F58F7044F58C5340000C02A02
+:10B8A0007200E600B8C1000000019513FFFC9396FA
+:10B8B000FF4C07880008E000CC609793FFFC83965C
+:10B8C000FF4CE000B814039C00018496FF848316AB
+:10B8D000FF8CF384407CF5044074C4A43200949639
+:10B8E000FF348316FF34C59C3800C5A8580005AC4A
+:10B8F000002686AE0000772D001E7738FFE5742DF8
+:10B90000001E7420FFE5739D0010739DFFF8C4A412
+:10B9100030009496FF3C8316FF7CC6B477C0C49871
+:10B9200048009496FF3C04A400269496FF3C73259F
+:10B93000001E7318FFE59316FF6C74A5001E949605
+:10B94000FF6474A4FFE59496FF648316FF7CF4847F
+:10B950004F5876B5FFF0C6184A007630FFFA4631E8
+:10B960000000F30200FFC6303400F482FF00C6B4CA
+:10B970004C00C6306800F62F2800872E0000831682
+:10B98000FF34C73847C07739FFF07319001093169A
+:10B99000FF347499FFF8F30200FFC7383400C7245E
+:10B9A00070009716FF34249400CA84A6000077A57F
+:10B9B000001E77BCFFE5C4A47FC074A5FFF083160A
+:10B9C000FF3CF4AF2800F4844F58871A0000C528C4
+:10B9D0004A007528FFFA8316FF6C45290000F4829F
+:10B9E00000FFC5284C008496FF3CC73837C0773924
+:10B9F000FFF0F302FF00C7383400C5287000F527B8
+:10BA00002800872600008316FF648416FF7CC73851
+:10BA100037C07739FFF0F48200FFC7384C00831637
+:10BA2000FF3CC39C7000E000BEE4F39B2800F704D9
+:10BA3000407CF6044074C7387000C7307000073887
+:10BA4000002686BA00007739001E7738FFE5C6B4B5
+:10BA500077C077B40008703EFFE8470C0001D700BC
+:10BA60000A70203A0000E600BA7D25800007E00059
+:10BA7000BEE404200040E000BAD8C42C0000C73067
+:10BA80004200849600007538FFFA0624000A202E32
+:10BA90000007EE00BAD40730000E86BA00007739EE
+:10BAA000001E7738FFE5C6B477C076B5FFF0F70221
+:10BAB00000FFC6B4740047290000C0367200470C6E
+:10BAC0000001203A0000E600BA7406300002E000EF
+:10BAD000BA8C05AC0001F402000807200007203AE8
+:10BAE000000EE200BBA4C5A0400083160000F504D0
+:10BAF000407CF48200FFF6044F58C598580005AC0E
+:10BB0000002686AE0000772D001E7738FFE5C618A8
+:10BB100062007630FFFA46310000C6304C00C6B4F1
+:10BB200077C076B5FFF0772900107739FFF8C6B4F3
+:10BB30004C00C7386800F72F2800F5844074C528EA
+:10BB40005000C5AC500005AC002686AE0000772D35
+:10BB5000001E7738FFE5752D001E7528FFE5C6B479
+:10BB600077C076B5FFF0F702FF00C6B47400C630A8
+:10BB70006800F62F2800872E000076A1001076B509
+:10BB8000FFF8C73857C07739FFF0C7384C00C6B444
+:10BB90007000E000BBF8F6AF2800F4044F58E00056
+:10BBA000BEE404200040F6044F5883160000F7045A
+:10BBB000407CF5844074C61862007630FFFAC738BE
+:10BBC0007000C5AC700005AC002686AE0000772D75
+:10BBD000001E7738FFE546310000C6B477C076B561
+:10BBE000FFF0F70200FFC6307400F702FF00C6B492
+:10BBF0007400C6306800F62F280023800007201E3E
+:10BC00000007EE00BEE0C71C38008496000000006C
+:10BC10000001C72470000738002686BA0000F584AA
+:10BC20004F587739001E7738FFE5C6B477C076B530
+:10BC3000FFF0F70200FFC6B67400E600BC792036BC
+:10BC40000001E600BC7977350006A6BA5802C7386D
+:10BC500058007639001E7630FFE5C6B467C076B569
+:10BC6000FFF020360002E600BC7DC6B80000C72CFD
+:10BC70000000E000BC7CC6B80000F6844F58F70412
+:10BC80004F58C5340000C02A7200E600BED906A88D
+:10BC9000001C83160000000000019313FFFC969324
+:10BCA000FFFCF4863BB49493FFFC9396FF4C9516EF
+:10BCB000FF449696FF4007880008E00123409793D1
+:10BCC000FFFCF3044F5CF48200009496FF5C8696C0
+:10BCD000FF408396FF4C8516FF449316FF34861A67
+:10BCE00000089696FF3C871A000400000001C0324D
+:10BCF0007200EC00BDB89616FF9C77310001C73882
+:10BD0000600077390002C63830000630000C86B279
+:10BD10000000872A001C8596FF5CC0367200E60092
+:10BD2000BD40C404000086B20004872A0020000041
+:10BD30000001C0367200E600BD44202E0000F582EE
+:10BD40000001202E0000E600BD5100000001F402B9
+:10BD500000008316FF3C86B20000871A0000000036
+:10BD60000001C0367200E200BD90F5820000C036CE
+:10BD70007200E600BD98202E000086B20004871AEB
+:10BD8000000400000001C0367200E200BD99202EC0
+:10BD90000000F5820001202E0000E600BDA920224F
+:10BDA0000000F402000120220000E600BDB80000FF
+:10BDB0000001F48200019496FF5C8316FF5C000092
+:10BDC0000001201A0000E600BDF9F6020001871606
+:10BDD000FF9C8496FF3476B90001C6B4700076B536
+:10BDE0000002C6B4480006B4001486B600009716D8
+:10BDF000FFA0E000BE709696FFA42714006497137E
+:10BE0000FFFC8316FF3C000000019313FFFC8496A7
+:10BE1000FF34000000019493FFFC9396FF4C9516AD
+:10BE2000FF4407880008E00125689793FFFC83968C
+:10BE3000FF4C8516FF4420220000E600BE71F6028A
+:10BE400000008716FF9C8316FF3476B90001C6B444
+:10BE5000700076B50002C6B4300006B4001486B691
+:10BE600000009716FFA09696FFA4971A0008F60206
+:10BE7000000120320000E600BE99F606429CF7045D
+:10BE8000429C76B1001E76B4FFE5C7386FC07739A3
+:10BE9000FFF007380001F7332800F7044F5800007F
+:10BEA0000001C72872007738FFFA4739000097135E
+:10BEB000FFFC0728001C9713FFFCF4844F5C000074
+:10BEC00000019493FFFC9396FF4C07880008E00163
+:10BED00023409793FFFC8396FF4CE000BBFC039C40
+:10BEE0000001841600008796FFFC8296FFF802147A
+:10BEF0000004013C0000000000019293FFFC02904E
+:10BF0000000822100060851600008616000406A8AE
+:10BF10000018C7306000C5B8680020320007EE0086
+:10BF2000BF64072C000E86BA00007739001E7738F0
+:10BF3000FFE5C6B477C076B5FFF0F70200FFC6B4E0
+:10BF4000740020360000470C0001D7000A70203A28
+:10BF50000000E600BF6105AC0002E000BF1806303B
+:10BF6000000120320007EE00C04C06A80016F505BF
+:10BF70004074F605407CF3020006F3054254961324
+:10BF8000FFFC052800029516FFC49513FFFC2394BF
+:10BF900000209396FFBC9393FFFC9616FFAC078896
+:10BFA0000008E000D0DC9793FFFC8496FFC42314C4
+:10BFB00000389493FFFC9316FFB49313FFFC07889B
+:10BFC0000008E000D2589793FFFC8702FF348616E2
+:10BFD000FFACF70542649613FFFC9713FFFC8396B2
+:10BFE000FFB4000000019393FFFC8496FFBC0000A7
+:10BFF00000019493FFFC07880008E000F7C89793BE
+:10C00000FFFC20220000E600C01DF3063AD8F7042A
+:10C0100042540000000127380001F7054254F3059F
+:10C020004244F38217709393FFFCF482001B9493B5
+:10C03000FFFCF30642449313FFFC07880008E0016D
+:10C040001EC09793FFFCE000C1A0000000018736EE
+:10C050000000F5844F58F4063B7076B5001E76B4A8
+:10C06000FFE5C7386FC07738FFF076390006A72E96
+:10C070006002C52C600076A9001E76B4FFE5C738C3
+:10C080006FC07739FFF077390003C73840000738B1
+:10C09000000286BA00007739001E7738FFE5C6B483
+:10C0A00077C076B7FFF0EE00C1159696FF9CA72EDD
+:10C0B000600276A9001E76B4FFE58396FF9CC73820
+:10C0C0006FC07739FFF077390003C738400086BA70
+:10C0D0000004249400607739001E7738FFE5C6B469
+:10C0E00077C076B5FFF0A6AA6802771D0003C738AF
+:10C0F00068002738000883BA0004833A0000000073
+:10C10000000193A60004932600008596FFA4E0009A
+:10C11000C13823000007A72E600276A9001E76B45E
+:10C12000FFE5C7386FC07739FFF077390003C738AC
+:10C13000400085BA0004230000079313FFFC872A00
+:10C14000000076A9001E76B4FFE58396FF9CF606F4
+:10C150003B70C7386FC07739FFF077390003A6BA54
+:10C160006002201E0000C73860007739001E773853
+:10C17000FFE5C6B477C0EE00C18D76B5FFF08496BA
+:10C18000FFA0000000017725FFF0C6B86800C728AF
+:10C1900068009713FFFC07880008C12C00009793E4
+:10C1A000FFFC8796FFFC8296FFF802140008013C12
+:10C1B0000000000000019293FFFC02900008221092
+:10C1C000007025000007202A0007EE00C3B8C7282A
+:10C1D00050008316000000000001C71870000738E7
+:10C1E000002686BA0000F5844F587739001E77384C
+:10C1F000FFE5C6B477C076B5FFF0F70200FFC6B61C
+:10C200007400E600C23D20360001E600C23D7735ED
+:10C210000006A6BA5802C73858007639001E763094
+:10C22000FFE5C6B467C076B5FFF020360002E60031
+:10C23000C24DC03A5A00E000C248C72C0000F704C3
+:10C240004F58F5844F5800000001C03A5A00E600EC
+:10C25000C3B1F4863B908396000000000001069C69
+:10C2600000168736000076B5001E76B4FFE5C738A5
+:10C270006FC07738FFF076390006A72E6002C52C14
+:10C28000600076A9001E76B4FFE5C7386FC0773925
+:10C29000FFF077390003C73848000738000286BA34
+:10C2A00000007739001E7738FFE5C6B477C076B74F
+:10C2B000FFF0EE00C3219696FF8CA72E600276A9B0
+:10C2C000001E76B4FFE58316FF8CC7386FC0773940
+:10C2D000FFF077390003C738480086BA0004249479
+:10C2E00000707739001E7738FFE5C6B477C076B5A1
+:10C2F000FFF0A6AA680277190003C738680027383C
+:10C30000000883BA0004833A00000000000193A6ED
+:10C310000004932600008616FF94E000C34400004A
+:10C320000001A72E600276A9001E76B4FFE5F30691
+:10C330003B90C7386FC07739FFF077390003C738B3
+:10C340003000863A0004872A000076A9001E76B4E1
+:10C35000FFE58396FF8CF4863B90C7386FC0773932
+:10C36000FFF077390003A6BA4802201E0000C73844
+:10C3700048007739001E7738FFE5C6B477C0EE0075
+:10C38000C39576B5FFF08316FF9000000001771982
+:10C39000FFF0C6B86800C72868009713FFFC07883D
+:10C3A0000008C13000009793FFFCE000C5C4000006
+:10C3B0000001E000C1C40528000183960000F4825A
+:10C3C0000006F4854254F60442602514001E23142E
+:10C3D00000209316FFACF3854078063000028732C8
+:10C3E000000076B1001E76B4FFE50630000275B19C
+:10C3F000001EC7386FC07738FFF0F71B2800873260
+:10C40000000075ACFFE5C7385FC07738FFF0F72B49
+:10C4100028002514001C063000028732000076B187
+:10C42000001E76B4FFE5C7386FC07738FFF0F72BF2
+:10C4300028002514001A063000028732000076B169
+:10C44000001E76B4FFE5C7386FC07738FFF0F72BD2
+:10C45000280025140018063000028732000076B14B
+:10C46000001E76B4FFE5C7386FC07738FFF0F72BB2
+:10C47000280025140016063000028732000076B12D
+:10C48000001E76B4FFE5C7386FC07738FFF0F72B92
+:10C49000280025140014063000028732000076B10F
+:10C4A000001E76B4FFE5C7386FC07738FFF0F72B72
+:10C4B000280025140012063000028732000076B1F1
+:10C4C000001E76B4FFE5C7386FC07738FFF0F72B52
+:10C4D0002800063000028732000025140010763153
+:10C4E000001E7630FFE5C73867C07738FFF0F72BBE
+:10C4F0002800071C00029713FFFC2394005093961A
+:10C50000FFA49393FFFC07880008E000D25897939C
+:10C51000FFFC8496FFA4231400389493FFFC27802B
+:10C5200000079793FFFC9316FF9C9313FFFC07886B
+:10C530000008E000CF249793FFFC8702FF34278098
+:10C540000007F7854258F705426427800007979354
+:10C55000FFFC9713FFFC8396FF9C00000001939360
+:10C56000FFFC8496FFAC000000019493FFFC078859
+:10C570000008E000F5F49793FFFC20220000E6009D
+:10C58000C59500000001F70442580000000107387B
+:10C590000001F7054258F7042D38F30639C0F305BA
+:10C5A0004244F6862C2806380001F6052D387739E6
+:10C5B0000002F382001C20320044E600C5C4B3BA76
+:10C5C0006802F0052D388796FFFC8296FFF802146A
+:10C5D0000004013C0000000000019293FFFC029067
+:10C5E000000825000007F7044074F6844F58F6044D
+:10C5F0004260C7386A0075B8FFFA0630000A202A80
+:10C600000007EE00C6480730000E86BA00007739F2
+:10C61000001E7738FFE5C6B477C076B5FFF0F702A5
+:10C6200000FFC6B47400472D0000C0367200470CEE
+:10C630000001203A0000E600C64CC3280000063086
+:10C640000002E000C5FC05280001F3020008C5183F
+:10C650003000F3844260F6044F58F704407CF484C1
+:10C660004074C51C50000528002685AA00007429C6
+:10C67000001E7420FFE5C61C62007630FFFAC6B8C3
+:10C680007000C4A4680004A4002676A5001E76B439
+:10C69000FFE5773900107739FFF846310000C5AC67
+:10C6A00047C075ADFFF0F40200FFC5AC4400C738C9
+:10C6B0005800F72B28008726000075A5001EC630FD
+:10C6C000440075ACFFE5C7386FC07739FFF0F682DC
+:10C6D000FF00C7386C00C6307000F6272800872698
+:10C6E00000007699001076B5FFF8C7385FC077393B
+:10C6F000FFF0C7384400C6B47000F6A72800939333
+:10C70000FFFCF3843BB0000000019393FFFC07881B
+:10C710000008E000D42C9793FFFCF704407C000055
+:10C720000001073800019713FFFCF38440740000F8
+:10C7300000019393FFFC07880008E000BEF8979380
+:10C74000FFFC8796FFFC8296FFF802140004013C70
+:10C750000000000000019293FFFC02900008879601
+:10C76000FFFC8296FFF802140008013C0000000064
+:10C7700000019293FFFC029000088796FFFC8296CE
+:10C78000FFF802140004013C000000000001929335
+:10C79000FFFC029000088796FFFC8296FFF80214C7
+:10C7A0000000013C0000000000019293FFFC029099
+:10C7B0000008F70642309713FFFCF7063560971321
+:10C7C000FFFC07880008E00014F49793FFFCF706CD
+:10C7D00042309713FFFCF70635EC9713FFFC0788F0
+:10C7E0000008E00014F49793FFFCF7064244971307
+:10C7F000FFFCF70636789713FFFC07880008E00077
+:10C8000014F49793FFFCF70642449713FFFCF706D6
+:10C8100037049713FFFC07880008E00014F497938F
+:10C82000FFFCF70642449713FFFCF7063790971377
+:10C83000FFFC07880008E00014F49793FFFCF7065C
+:10C8400042449713FFFCF706381C9713FFFC078838
+:10C850000008E00014F49793FFFCF7064244971396
+:10C86000FFFCF70638A89713FFFC07880008E000D4
+:10C8700014F49793FFFCF70642449713FFFCF70666
+:10C8800039349713FFFC07880008E00014F49793ED
+:10C89000FFFCF70642449713FFFCF70639C09713D5
+:10C8A000FFFC07880008E00014F49793FFFCF706EC
+:10C8B00042449713FFFCF7063A4C9713FFFC078896
+:10C8C0000008E00014F49793FFFCF7064244971326
+:10C8D000FFFCF7063AD89713FFFC07880008E00032
+:10C8E00014F49793FFFC8796FFFC8296FFF80214DE
+:10C8F0000000013C0000000000019293FFFC029048
+:10C90000000885960000F5063B90872E000076AD66
+:10C91000001E76B4FFE5C7386FC07739FFF077396E
+:10C920000003C73850000738000286BA0000773984
+:10C93000001E7738FFE5C6B477C07637FFF0EE000B
+:10C94000C99500000001872E000076AD001E76B468
+:10C95000FFE5C7386FC07739FFF077390003C73874
+:10C96000500086BA00047739001E7738FFE5C6B458
+:10C9700077C076B5FFF0A6AE680277310003C738FE
+:10C9800068002738000884BA0004843A0000E000F8
+:10C99000C9B4C5240000872E000076AD001E76B411
+:10C9A000FFE5C7386FC07739FFF077390003C73824
+:10C9B0005000853A0004872E000076AD001E76B444
+:10C9C000FFE520320000F6063B90C7386FC077398C
+:10C9D000FFF077390003A6BA6002C73860007739E4
+:10C9E000001E7738FFE5C6B477C0EE00C9F976B50A
+:10C9F000FFF07721FFF0C6B86800C72C68009713D6
+:10CA0000FFFC07880008C12800009793FFFC879669
+:10CA1000FFFC8296FFF802140004013C00000000B5
+:10CA200000019293FFFC0290000885960000F50635
+:10CA30003B70872E000076AD001E76B4FFE5C73848
+:10CA40006FC07739FFF077390003C73850000738D7
+:10CA5000000286BA00007739001E7738FFE5C6B4B9
+:10CA600077C07637FFF0EE00CABD00000001872EC8
+:10CA7000000076AD001E76B4FFE5C7386FC0773989
+:10CA8000FFF077390003C738500086BA00047739C1
+:10CA9000001E7738FFE5C6B477C076B5FFF0A6AEC6
+:10CAA000680277310003C73868002738000884BA65
+:10CAB0000004843A0000E000CADCC5240000872E90
+:10CAC000000076AD001E76B4FFE5C7386FC0773939
+:10CAD000FFF077390003C7385000853A0004839689
+:10CAE000000476AD001E76B4FFE52032000093937B
+:10CAF000FFFC872E0000F6063B70C7386FC0773901
+:10CB0000FFF077390003A6BA6002C73860007739B2
+:10CB1000001E7738FFE5C6B477C0EE00CB2976B5A6
+:10CB2000FFF07721FFF0C6B86800C72C68009713A4
+:10CB3000FFFC07880008C12800009793FFFC879638
+:10CB4000FFFC8296FFF802140008013C0000000080
+:10CB500000019293FFFC02900008F5044F58F58203
+:10CB6000000206280080202E0062EE00CB900730E5
+:10CB70000040F0332800C6B8520076B4FFFA063001
+:10CB80000014F6B32800C6380000E000CB6405AC02
+:10CB90000001F7044F580000000106B818D4F482D1
+:10CBA0000001F4B72800073818C0F03B2800F7064A
+:10CBB00042C0F4820002F4BB28008796FFFC8296F4
+:10CBC000FFF802140000013C0000000000019293F5
+:10CBD000FFFC02900008F68442C0F60642C077319E
+:10CBE000001E7738FFE575B1001EC6B477C076B475
+:10CBF000FFF0F7044F5876B50006C4386800872266
+:10CC0000001476A1001E76B4FFE5C7386FC07738F0
+:10CC1000FFF0F7332800F70442C075ACFFE5C738D2
+:10CC20005FC07738FFF0203A0001E600CC4CF606F2
+:10CC30004290F704429076B1001E76B4FFE5C73803
+:10CC40006FC07739FFF007380001F7332800879667
+:10CC5000FFFC8296FFF802140000013C0000000077
+:10CC600000019293FFFC0290000822100004851638
+:10CC70000000000000019513FFFC9516FFF40788E3
+:10CC80000008E000CD009793FFFC8516FFF42022FA
+:10CC90000000E600CCBCF58642C0F7044290F606E0
+:10CCA000429276B1001E76B4FFE5C7386FC077397F
+:10CCB000FFF007380001E000CCECF7332800F02B40
+:10CCC0002800F68442C0772D001E7738FFE506283D
+:10CCD0000014C6B477C076B4FFF0F7044F58F6B32B
+:10CCE0002800C72872007738FFFAF72F28008796A8
+:10CCF000FFFC8296FFF802140004013C00000000D3
+:10CD000000019293FFFC0290000886960000F70451
+:10CD10004F58F4020000C6B472007734FFFA273887
+:10CD20000002203A0061F702003FE200CD40C6B4A5
+:10CD3000740020360000E600CD4000000001F4023F
+:10CD400000018796FFFC8296FFF802140004013C64
+:10CD50000000000000019293FFFC0290000886167C
+:10CD600000008716000885960004C5307000C032A8
+:10CD70005200E600CDA10000000186B2000077312C
+:10CD8000001E7738FFE5C6B477C076B5FFE8F6AF8A
+:10CD9000680006300001C0325200E600CD7805ACD4
+:10CDA00000018796FFFC8296FFF80214000C013CFC
+:10CDB000000000000001000000009293FFFC0290C0
+:10CDC000000884960000841600048596000886A654
+:10CDD00000007725001E7738FFE5C6B477C07535AB
+:10CDE000FFF0202A0010E200CE0DF606428EF5027A
+:10CDF0000010F704428C76B1001E76B4FFE5C73808
+:10CE00006FC07739FFF007380001F7332800202E74
+:10CE10000001E600CE70202A0000EE00CE7107244B
+:10CE2000000225280001A5BA50028622000076A142
+:10CE3000001E76B4FFE5C73850007739001E7738FA
+:10CE4000FFE5C5AC77C0C6306FC07631FFF075AD79
+:10CE5000FFE8F68200FFF702F15475AD0002A72E3D
+:10CE60007002C6306C00C6307580F623280024207E
+:10CE7000000225A80001F302F24603A40002C4AC9C
+:10CE80003800252C0001202E0000EC00CF110000FE
+:10CE90000001E600CEA0C71C5000E000CEB4F602B0
+:10CEA0000000A69E50027739001E7738FFE5C6B411
+:10CEB00077C07635FFE886A600007725001E773814
+:10CEC000FFE52528000225AC0002C6B477C076B580
+:10CED000FFE877310004C738620077390001C738AE
+:10CEE0003000C6B46800C6B4700006B4000E8736C1
+:10CEF000000024A4000276B5001E76B4FFE5C73812
+:10CF00006FC07738FFF0F7232800E000CE8424209C
+:10CF100000028796FFFC8296FFF80214000C013C89
+:10CF20000000000000019293FFFC029000088616AA
+:10CF3000000883160004839600008732000076B153
+:10CF4000001E76B4FFE5059C0002749D001E74A4CB
+:10CF5000FFE5741D001E063000027531001EC73843
+:10CF60006FC07738FFF0F71F280087320000752860
+:10CF7000FFE5C73857C07738FFF0F72F280005AC1A
+:10CF80000002063000028732000076B1001E76B43F
+:10CF9000FFE5C7386FC07738FFF0F72F280005ACE2
+:10CFA0000002063000028732000076B1001E76B41F
+:10CFB000FFE5C7386FC07738FFF0F72F280005ACC2
+:10CFC0000002063000028732000076B1001E76B4FF
+:10CFD000FFE5C7386FC07738FFF0F72F280005ACA2
+:10CFE0000002063000028732000076B1001E76B4DF
+:10CFF000FFE5C7386FC07738FFF0F72F280005AC82
+:10D000000002063000028732000076B1001E76B4BE
+:10D01000FFE5C7386FC07738FFF0F72F280005AC61
+:10D020000002063000028732000076B1001E76B49E
+:10D03000FFE5C7386FC07738FFF0F72F28000630BC
+:10D0400000028732000005AC00027631001E763007
+:10D05000FFE5C73867C07738FFF0F72F2800871E35
+:10D0600000007420FFE5C7384FC07739FFF007385C
+:10D070000001F71F2800871E0000049C0002C7382B
+:10D0800047C07739FFF025380001202A0000EE0064
+:10D09000D0BD26280001A7266002C6A4600076B590
+:10D0A000001E76B4FFE5C5A45000C5300000C738A7
+:10D0B0006FC07739FFE8E000D088F72F6800071CC1
+:10D0C0000002F33B6800C41C00008796FFFC8296B8
+:10D0D000FFF80214000C013C0000000000019293D4
+:10D0E000FFFC0290000886160004841600008732B8
+:10D0F000000076B1001E76B4FFE505A0000274A121
+:10D10000001E74A4FFE5063000027531001EC7380A
+:10D110006FC07738FFF0F7232800873200007528AA
+:10D12000FFE5C73857C07738FFF0F72F280005AC68
+:10D130000002063000028732000076B1001E76B48D
+:10D14000FFE5C7386FC07738FFF0F72F280005AC30
+:10D150000002063000028732000076B1001E76B46D
+:10D16000FFE5C7386FC07738FFF0F72F280005AC10
+:10D170000002063000028732000076B1001E76B44D
+:10D18000FFE5C7386FC07738FFF0F72F280005ACF0
+:10D190000002063000028732000076B1001E76B42D
+:10D1A000FFE5C7386FC07738FFF0F72F280005ACD0
+:10D1B0000002063000028732000076B1001E76B40D
+:10D1C000FFE5C7386FC07738FFF0F72F280005ACB0
+:10D1D0000002063000028732000076B1001E76B4ED
+:10D1E000FFE5C7386FC07738FFF0F72F280005AC90
+:10D1F0000002063000028732000006A000027631ED
+:10D20000001E7630FFE5C73867C07738FFF0F72F8C
+:10D210002800872200007621001E85960008C73866
+:10D220004FC07739FFF0C6B47000F5B768008722A9
+:10D2300000007630FFE5C73867C07739FFF0073860
+:10D240000001F72328008796FFFC8296FFF802145E
+:10D25000000C013C0000000000019293FFFC0290D2
+:10D2600000082210002027140020F03B280084969C
+:10D270000004F502000086A600007625001E763028
+:10D28000FFE504240002C6B467C076B4FFF0F6BB25
+:10D2900028008726000076A5001E76B4FFE5C73873
+:10D2A0006FC07739FFF0C02A7200EC00D2F876A583
+:10D2B000001E8726000076B4FFE5062800012594AD
+:10D2C000001EC5AC5000C5300000C7386FC07739AC
+:10D2D000FFF0C7385200A6A27002C720700077394D
+:10D2E000001E7738FFE5C6B477C076B5FFE8C68084
+:10D2F0006A00E000D290F6AF68008716FFE076156E
+:10D30000001E7630FFE5839600002314001E7599F9
+:10D31000001E75ACFFE57515001E7528FFE57495B8
+:10D32000001E74A4FFE57415001E7420FFE5069C22
+:10D3300000027395001E9396FFDCC73867C0839682
+:10D3400000007738FFF0F71F28008396FFDC871A6C
+:10D350000000739CFFE59396FFDCC7385FC0773809
+:10D36000FFF0F737280006B400028716FFE4231405
+:10D37000001A7619001E7630FFE5C73857C0773897
+:10D38000FFF0F7372800871A000006B40002C738FC
+:10D3900067C07738FFF0F737280006B40002871619
+:10D3A000FFE8231400167619001E7630FFE5C73813
+:10D3B0004FC07738FFF0F7372800871A000006B40F
+:10D3C0000002C73867C07738FFF0F737280006B487
+:10D3D00000028716FFEC231400127619001E763027
+:10D3E000FFE5C73847C07738FFF0F7372800871ABE
+:10D3F000000006B4000284160000C73867C0773802
+:10D40000FFF0F73728008716FFF006B40002C73890
+:10D410003FC07738FFF0F73728008796FFFC8296E9
+:10D42000FFF802140008013C000000000001929384
+:10D43000FFFC029000088616000084160004F684A3
+:10D440004F5887320014033000147519001E7528D8
+:10D45000FFE5C3A06A00739CFFFA04A0001475A541
+:10D46000001EC6306A007630FFFAC73857C07738DA
+:10D47000FFF0F7272800F39B280007200016F63B53
+:10D4800028008722001475ACFFE5C7385FC07738E5
+:10D49000FFF077390006C6B4700006B40016F3B783
+:10D4A00028008796FFFC8296FFF802140008013CD2
+:10D4B0000000000000019293FFFC02900008861615
+:10D4C0000000F5844F5805300016872A000076A921
+:10D4D000001E76B4FFE5C7386FC07738FFF07739A4
+:10D4E0000006C42C7000C0226200E600D52906A008
+:10D4F000001687360000C6305A007630FFFA76B53F
+:10D50000001E76B4FFE5C7386FC07738FFF0773973
+:10D51000000676B8FFFAF6AB2800C72C7000073873
+:10D520000014E000D52CF63B2800C42C00008796A0
+:10D53000FFFC8296FFF802140004013C000000008A
+:10D5400000019293FFFC02900008F7064F844738D1
+:10D55000FFFCF7056F30F686505C46B4FFFCF6859D
+:10D560006E50F7066E7C4738FFFCF7056E540734A3
+:10D57000191CF7054F5CF70200649736191CF70277
+:10D5800000009736192006B4001CF6854F58879680
+:10D59000FFFC8296FFF802140000013C000000002E
+:10D5A00000019293FFFC0290000822100090F30209
+:10D5B000FFFFF3054F54F38200009396FFAC231452
+:10D5C00000209316FF9C239400389396FF948316B3
+:10D5D000FFACF7044F5CF382000C9396FF74931634
+:10D5E000FF8C873A0004000000019716FFA4831601
+:10D5F000FFAC8396FFA400000001C01A3A00EC00C3
+:10D60000DB78F30204BCF7044F5C8316FF74000060
+:10D610000001C7383000873A0008F6844F58773940
+:10D620000006C4B470009493FFFC9496FF7C0788B6
+:10D630000008E000CD009793FFFC8496FF7C202239
+:10D640000000E600D654C5040000F7044288E0005C
+:10D65000D87CF6064288F6044F5C83960000831659
+:10D66000FF74869E0000A7323002F5820000C036AB
+:10D670007200E600D694C6303000869E00048732E1
+:10D68000000400000001C0367200E600D698202E8B
+:10D690000000F5820001202E0000E600D6A5000063
+:10D6A0000001F50200008396000087320000869E8C
+:10D6B000000000000001C0367200E200D6E4F582EE
+:10D6C0000000C0367200E600D6EC202E0000869ED8
+:10D6D00000048732000400000001C0367200E2003E
+:10D6E000D6ED202E0000F5820001202E0000E6007D
+:10D6F000D6FD202A0000F5020001202A0000E600E5
+:10D70000D72804A400028316FFACF70642C883960C
+:10D71000FF8CF3054F54C71C7000F03B28000738FE
+:10D720000002E000DB50F03B28009496FF6C872657
+:10D73000000076A5001E76B4FFE58316FF6C839685
+:10D74000FF9C2494001E0618000275B1001E75ACE3
+:10D75000FFE5C7386FC07738FFF0F71F2800873222
+:10D760000000751D001E7528FFE5C7385FC07738BB
+:10D77000FFF0F72728002494001C063000028732AF
+:10D78000000076B1001E76B4FFE5C7386FC0773869
+:10D79000FFF0F72728002494001A06300002873291
+:10D7A000000076B1001E76B4FFE5C7386FC0773849
+:10D7B000FFF0F72728002494001806300002873273
+:10D7C000000076B1001E76B4FFE5C7386FC0773829
+:10D7D000FFF0F72728002494001606300002873255
+:10D7E000000076B1001E76B4FFE5C7386FC0773809
+:10D7F000FFF0F72728002494001406300002873237
+:10D80000000076B1001E76B4FFE5C7386FC07738E8
+:10D81000FFF0F72728002494001206300002873218
+:10D82000000076B1001E76B4FFE5C7386FC07738C8
+:10D83000FFF0F7272800063000028732000024940A
+:10D8400000107631001E7630FFE5C73867C07738A4
+:10D85000FFF0F72728008716FFE0F682FFFCC738A5
+:10D8600057C07739FFF007380003C4B86C00202692
+:10D870000010E200D89DF606428AF704428876B18D
+:10D88000001E76B4FFE5F4020000C7386FC0773998
+:10D89000FFF007380001E000DBA0F7332800831613
+:10D8A000FF6C251400368396FF94871A0000769942
+:10D8B000001E76B4FFE50618000275B1001EC738D9
+:10D8C0006FC07738FFF0F71F28008732000075AC73
+:10D8D000FFE5C7385FC07738FFF0F72B2800251425
+:10D8E0000034063000028732000076B1001E76B4A4
+:10D8F000FFE5C7386FC07738FFF0F72B28002514F5
+:10D900000032063000028732000076B1001E76B485
+:10D91000FFE5C7386FC07738FFF0F72B28002514D4
+:10D920000030063000028732000076B1001E76B467
+:10D93000FFE5C7386FC07738FFF0F72B28002514B4
+:10D94000002E063000028732000076B1001E76B449
+:10D95000FFE5C7386FC07738FFF0F72B2800251494
+:10D96000002C063000028732000076B1001E76B42B
+:10D97000FFE5C7386FC07738FFF0F72B2800251474
+:10D98000002A063000028732000076B1001E76B40D
+:10D99000FFE5C7386FC07738FFF0F72B2800251454
+:10D9A0000028063000028732000026A4000274A47A
+:10D9B000FFFF7631001E7630FFE5C73867C0773845
+:10D9C000FFF0F72B28009013FFFC8316FF8CF7065F
+:10D9D00042CCC7187000C73868009713FFFC9393B8
+:10D9E000FFFC9496FF7C07880008E000CDB8979371
+:10D9F000FFFC8396FF6C2414004E25140050831600
+:10DA0000FF8C8496FF7C871E0000769D001E76B4F6
+:10DA1000FFE5061C000275B1001E75ACFFE5C738B6
+:10DA20006FC07738FFF0F72B280087320000752988
+:10DA3000001E7528FFE5C7385FC07738FFF0F72371
+:10DA400028002414004C063000028732000076B112
+:10DA5000001E76B4FFE5C7386FC07738FFF0F723B4
+:10DA600028002414004A063000028732000076B1F4
+:10DA7000001E76B4FFE5C7386FC07738FFF0F72394
+:10DA8000280024140048063000028732000076B1D6
+:10DA9000001E76B4FFE5C7386FC07738FFF0F72374
+:10DAA000280024140046063000028732000076B1B8
+:10DAB000001E76B4FFE5C7386FC07738FFF0F72354
+:10DAC000280024140044063000028732000076B19A
+:10DAD000001E76B4FFE5C7386FC07738FFF0F72334
+:10DAE000280024140042063000028732000076B17C
+:10DAF000001E76B4FFE5C7386FC07738FFF0F72314
+:10DB000028000630000287320000241400407631DD
+:10DB1000001E7630FFE5C73867C07738FFF0F7237F
+:10DB200028008696FFB0F60642C8C6186000F702C5
+:10DB30000003C6B457C076B5FFF0C6B47400F70250
+:10DB40000004C7386A00F733280006300002F4B337
+:10DB500028008396FF8C8316FF74039C0014939611
+:10DB6000FF8C0318000C8396FFAC9316FF74039C84
+:10DB70000001E000D5EC9396FFAC9313FFFCF38417
+:10DB80004F5C000000019393FFFCF3064A98931347
+:10DB9000FFFC07880008E00126F89793FFFCF402D9
+:10DBA00000018796FFFC8296FFF802140004013CF6
+:10DBB0000000000000019293FFFC02900008221078
+:10DBC00001A0F5020000F3846E50F602001C202A2A
+:10DBD0000063EE00DC08C59C6000A69E6002772D05
+:10DBE000001E7738FFE5C6B477C076B5FFF0203663
+:10DBF0000003E600DBFC072C0036F03B2800063073
+:10DC00000040E000DBCC05280001F5844F5C0000FB
+:10DC1000000186AE0008F4020000872E0004000018
+:10DC20000001C0367200EC00DCF09696FFEC773510
+:10DC30000001C738680077390002C638580006303E
+:10DC4000000CC38400008316000086B20000871A0F
+:10DC5000000000000001C0367200E600DC7CC52038
+:10DC6000000086B20004871A000400000001C036DC
+:10DC70007200E600DC80202A0000F5020001202A64
+:10DC80000000E600DC8D00000001F38200008496B5
+:10DC9000000086B200008726000000000001C036A8
+:10DCA0007200E200DCCCF5020000C0367200E60033
+:10DCB000DCD4202A000086B200048726000400007D
+:10DCC0000001C0367200E200DCD5202A0000F50217
+:10DCD0000001202A0000E600DCE5201E0000F3829F
+:10DCE0000001201E0000E600DCF420220000F40207
+:10DCF000000120220000E600DD29F602000187165F
+:10DD0000FFEC0000000176B90001C6B4700076B5E2
+:10DD10000002C6B4580006B4001486B60000971678
+:10DD2000FFF0E000DD989696FFF427140014971397
+:10DD3000FFFC83160000000000019313FFFC959385
+:10DD4000FFFC9596FE7007880008E0012568979310
+:10DD5000FFFC8596FE7020220000E600DD95F602AD
+:10DD600000018716FFEC0000000176B90001C6B47F
+:10DD7000700076B50002C6B4580006B4001486B62A
+:10DD800000009716FFF09696FFF4972E0008E0002B
+:10DD9000DD9C20320000F602000020320000E60088
+:10DDA000DDB0F4820000F704427CE000E09CF6065F
+:10DDB000427E9496FF448716FFF4F6044F58773955
+:10DDC0000006C73070009716FF5406B8001A873651
+:10DDD00000008316FF5476B5001E76B4FFE5C73801
+:10DDE0006FC09313FFFC7738FFF077390006C63019
+:10DDF00070009616FF4C07880008E000CD0097934E
+:10DE0000FFFC20220000E600DE35F30200018496CC
+:10DE1000FF4C000000019493FFFC07880008E0001D
+:10DE2000CD009793FFFC20220000E600DE380000C2
+:10DE30000001F30200019316FF448496FF440000A2
+:10DE4000000120260000E600DE59F60642A4F70491
+:10DE500042A4E000E0A076B1001E8316FF4C8616B7
+:10DE6000FF4C871A00007699001E76B4FFE5C7388C
+:10DE70006FC07739FFF0203A0002E600DE8500002F
+:10DE80000001F6044F58F5844F5800000001C032DD
+:10DE90005A00E600E025000000018496FF4C0000D7
+:10DEA000000106A4001A873600008316FF5476B5D9
+:10DEB000001E76B4FFE5C7386FC07738FFF07739BA
+:10DEC0000006C72C7000C03A3200E600DEDDF60620
+:10DED0004280F7044280E000E0A076B1001E2614E4
+:10DEE0000030F03328008716FFD07631001E7630E0
+:10DEF000FFE58496FF4C2314002E9316FE6475995B
+:10DF0000001E75ACFFE57515001E7528FFE573153D
+:10DF1000001E7318FFE59316FF348316FE64042475
+:10DF2000000206A000027495001E74A4FFE59496FA
+:10DF3000FF3C7495001EC73867C07738FFF0F723A1
+:10DF40002800871A000074A4FFE59496FF2CC738B8
+:10DF50005FC07738FFF0F737280006B40002871655
+:10DF6000FFD42494002A9496FE647625001E763011
+:10DF7000FFE5C73857C07738FFF0F7372800872606
+:10DF8000000006B40002C73867C07738FFF0F737E3
+:10DF9000280006B400028716FFD823140026931623
+:10DFA000FE647619001E8496FF3C7630FFE5C73884
+:10DFB0004FC07738FFF0F7372800871A000006B403
+:10DFC00000028496FF34C73867C07738FFF0F73710
+:10DFD000280006B400028716FFDC231400229316E3
+:10DFE000FE647619001E7630FFE5C7384FC07738DB
+:10DFF000FFF0F7372800871A000006B40002C73880
+:10E0000067C07738FFF0F73728008716FFE08316E0
+:10E01000FF2C06B40002C73837C07738FFF0E000A5
+:10E02000EAA0F737280007880008E000CBCC9793D8
+:10E03000FFFC06A00002F7044F58F037280006A0A6
+:10E0400000149416FF24C72072007738FFFAF737C0
+:10E05000280006A00016F7372800F4820001F4A378
+:10E0600028009413FFFC07880008E000CD00979378
+:10E07000FFFC20220000E600E0BC26940048F704E4
+:10E080004280E000E09CF60642828696FEF4E000C4
+:10E09000E29400000001F7044284F606428476B15F
+:10E0A000001E76B4FFE5F4020000C7386FC0773970
+:10E0B000FFF007380001E000EAA4F73328008316D8
+:10E0C000FF4C7515001E7528FFE59316FF1C0718F9
+:10E0D0000036F4820001F4BB2800F03728008716D0
+:10E0E000FFB876B5001E76B4FFE5041800020620DE
+:10E0F0000002231400469316FF147599001E75AC98
+:10E10000FFE57495001E74A4FFE59496FF0C73154B
+:10E11000001E7318FFE59316FF047495001E74A487
+:10E12000FFE59496FEFC230000079316FEF4849608
+:10E13000FF1C8316FF1404A4000A9496FE7CC738C3
+:10E140006FC07738FFF0F7232800F6844F58849685
+:10E15000FF54871A0000C6A46A007434FFFAC73857
+:10E160005FC07738FFF0F7332800063000028716CB
+:10E17000FFBC231400429316FF147699001E76B458
+:10E18000FFE5C73857C07738FFF0F7332800871A04
+:10E19000000006300002C7386FC07738FFF0F73351
+:10E1A0002800063000028716FFC02494003E949693
+:10E1B000FF1476A5001E8316FF0C76B4FFE5C73862
+:10E1C00037C07738FFF0F733280087260000063085
+:10E1D0000002C7386FC07738FFF0F73328000630E9
+:10E1E00000028716FFC42494003A9496FF1476A583
+:10E1F000001E8316FF0476B4FFE5C73837C07738B2
+:10E20000FFF0F73328008726000006300002C738E9
+:10E210006FC07738FFF0F73328008716FFC8849661
+:10E22000FEFC06300002C7384FC07738FFF0F733E6
+:10E2300028008316FEF400000001201A0007EE00FB
+:10E24000E294F68200088496FE7C00000001072418
+:10E25000000E86BA00007739001E7738FFE5C6B495
+:10E2600077C076B5FFF0F70200FFC6B4740047210F
+:10E270000000C0367200470C0001203A0000E600A2
+:10E28000E08804A400029496FE7C03180001E000DC
+:10E29000E2309316FEF48316FF1C000000010718FD
+:10E2A0000038F6BB28009313FFFC8496FF2400007F
+:10E2B00000019493FFFC07880008E000D42C97939A
+:10E2C000FFFC231400789316FEBC849600002314F0
+:10E2D00000A886A60004872600009316FE9CC6B4FC
+:10E2E00070009696FEECF7020001C7347400971692
+:10E2F000FEE48496FF24000000019493FFFC07884D
+:10E300000008E000D4B49793FFFCF7044F580000D6
+:10E310000001C0227200E600EAA19416FF1C86A24A
+:10E3200000387721001E7738FFE5F30200009316CE
+:10E33000FED4C6B477C076B5FFF09696FEDC849620
+:10E34000FED4000000012026000EEE00E2F0F302F1
+:10E35000000F9313FFFC8316FEEC00000001C718AA
+:10E3600048009713FFFC07880008E00127E897930F
+:10E37000FFFCC3A000008496FEE4000000012026FC
+:10E380000000E600E38D239C0007C3803A00C71C11
+:10E3900038008316FF1CF48200FFF6044F58C7189C
+:10E3A00070000738002686BA00009716FEC4773939
+:10E3B000001E7738FFE5C6B477C076B5FFF0C6B467
+:10E3C0004C0076B50006C330680007300040C01A24
+:10E3D0007200E600E40D9316FECC9313FFFC9396B7
+:10E3E000FE749616FE6C9696FE6807880008E0009C
+:10E3F000CD009793FFFC8396FE748616FE6C86967E
+:10E40000FE6820220000E600E09500000001F5848F
+:10E410004F588496FECC072C0040C0267200E600C0
+:10E42000EA8D00000001A732680276A5001E76B4CE
+:10E43000FFE58616FECCC7386FC07739FFF0203A6B
+:10E440000002E600E451C0325A00C62C0000C0327F
+:10E450005A00E600E6E5251400768316FF1C849634
+:10E46000FEBC061800028732000076B1001E76B4AA
+:10E47000FFE58316FEDC0630000275B1001EC738CA
+:10E480006FC07738FFF0F72728008732000075AC9F
+:10E49000FFE5C7385FC07738FFF0F72B2800251459
+:10E4A0000074063000028732000076B1001E76B498
+:10E4B000FFE5C7386FC07738FFF0F72B2800251429
+:10E4C0000072063000028732000076B1001E76B47A
+:10E4D000FFE5C7386FC07738FFF0F72B2800251409
+:10E4E0000070063000028732000076B1001E76B45C
+:10E4F000FFE5C7386FC07738FFF0F72B28002514E9
+:10E50000006E063000028732000076B1001E76B43D
+:10E51000FFE5C7386FC07738FFF0F72B28002514C8
+:10E52000006C063000028732000076B1001E76B41F
+:10E53000FFE5C7386FC07738FFF0F72B28002514A8
+:10E54000006A063000028732000076B1001E76B401
+:10E55000FFE5C7386FC07738FFF0F72B280006308B
+:10E56000000287320000251400687631001E7630E4
+:10E57000FFE5C73867C07738FFF0F72B2800C71CC6
+:10E5800032009713FFFC9493FFFC2614006096134F
+:10E59000FFFC9616FE6C07880008E000D0DC97931D
+:10E5A000FFFC8716FFA08616FE6C8496FECC231413
+:10E5B000005E9316FE5C7599001E75ACFFE5741540
+:10E5C000001E7420FFE57315001E7318FFE59316F7
+:10E5D000FEAC8316FE5C7631001E7630FFE5052426
+:10E5E000000206A800027495001E74A4FFE594962C
+:10E5F000FEB47495001EC73867C07738FFF0F72B5C
+:10E600002800871A000074A4FFE59496FEA4C7387A
+:10E610005FC07738FFF0F737280006B4000287168E
+:10E62000FFA42494005A9496FE5C7625001E83165F
+:10E63000FEB47630FFE5C73837C07738FFF0F737DC
+:10E6400028008726000006B40002C73867C0773864
+:10E65000FFF0F737280006B400028716FFA82494BD
+:10E6600000569496FE5C7625001E7630FFE5C7388E
+:10E6700047C07738FFF0F73728008726000006B438
+:10E680000002C73867C07738FFF0F737280006B4B4
+:10E6900000028716FFAC231400529316FE5C761915
+:10E6A000001E8496FEAC7630FFE5C7384FC0773841
+:10E6B000FFF0F7372800871A000006B40002C738B9
+:10E6C00067C07738FFF0F73728008716FFB083164A
+:10E6D000FEA406B40002C73837C07738FFF0E00068
+:10E6E000EA8CF73728008496FECC0000000104A4D1
+:10E6F00000369496FE5C8726000076A5001E76B450
+:10E70000FFE5C7386FC07739FFF0203A0000470CAB
+:10E710000001203A0000E600EA8D000000018316A7
+:10E72000FECC8496FF1C0618003A85B20000072430
+:10E73000003A86BA00007631001E7630FFE5773960
+:10E74000001E7738FFE5C5AC67C0C6B477C075ADAD
+:10E75000FFF076B5FFF0C02E6A00EC00E764F5022A
+:10E760000002F50200018316FF1C000000010718DB
+:10E77000003686BA00007739001E7738FFE5C6B448
+:10E7800077C076B5FFF020360002E600E79C000077
+:10E790000001202A0001E600EA8D000000018496B5
+:10E7A000FE5C8316FF1CF52728000618000287323E
+:10E7B000000076B1001E76B4FFE5251400A684960D
+:10E7C000FE9C8316FEDC0630000275B1001EC738C1
+:10E7D0006FC07738FFF0F72728008732000075AC4C
+:10E7E000FFE5C7385FC07738FFF0F72B2800251406
+:10E7F00000A4063000028732000076B1001E76B415
+:10E80000FFE5C7386FC07738FFF0F72B28002514D5
+:10E8100000A2063000028732000076B1001E76B4F6
+:10E82000FFE5C7386FC07738FFF0F72B28002514B5
+:10E8300000A0063000028732000076B1001E76B4D8
+:10E84000FFE5C7386FC07738FFF0F72B2800251495
+:10E85000009E063000028732000076B1001E76B4BA
+:10E86000FFE5C7386FC07738FFF0F72B2800251475
+:10E87000009C063000028732000076B1001E76B49C
+:10E88000FFE5C7386FC07738FFF0F72B2800251455
+:10E89000009A063000028732000076B1001E76B47E
+:10E8A000FFE5C7386FC07738FFF0F72B2800063038
+:10E8B000000287320000251400987631001E763061
+:10E8C000FFE5C73867C07738FFF0F72B2800C71C73
+:10E8D00032009713FFFC9493FFFC261400909613CC
+:10E8E000FFFC9616FE6C07880008E000D0DC9793CA
+:10E8F000FFFC8716FF708616FE6C8496FECC239470
+:10E90000008E759D001E75ACFFE57315001E731813
+:10E91000FFE59316FE947415001E7420FFE5731531
+:10E92000001E7318FFE59316FE848316FE9476315D
+:10E93000001E7630FFE50524000206A8000274954B
+:10E94000001E74A4FFE59496FE8CC73867C0773824
+:10E95000FFF0F72B28008496FEC4871E0000752563
+:10E96000001EC7385FC07738FFF0F737280006B4BD
+:10E9700000028716FF742394008A761D001E7630ED
+:10E98000FFE58496FE8C7528FFE5C73837C07738D9
+:10E99000FFF0F7372800871E000006B40002831638
+:10E9A000FE84C73867C07738FFF0F737280006B411
+:10E9B00000028716FF7823940086761D001E7630AD
+:10E9C000FFE5C73847C07738FFF0F7372800871EC4
+:10E9D000000006B40002C73867C07738FFF0F73789
+:10E9E000280006B400028716FF7C23940082761D5F
+:10E9F000001E7630FFE5C7384FC07738FFF0F73795
+:10EA00002800871E000006B400028496FEC4C738A2
+:10EA100067C07738FFF0F73728008716FF8006B405
+:10EA20000002C73837C07738FFF0F737280087264D
+:10EA30000000F30200FFC73857C07738FFE8C6B8B8
+:10EA40003400F7020080C73474007739001077393A
+:10EA5000FFF0203A0000E600EA6127000100C6B49A
+:10EA600075808496FECC0000000107240038F6BBB8
+:10EA700028009493FFFC8316FF24000000019313E9
+:10EA8000FFFC07880008E000D42C9793FFFC8496D5
+:10EA9000FED40000000104A40001E000E33C9496D1
+:10EAA000FED4F40200018796FFFC8296FFF8021460
+:10EAB0000004013C0000000000019293FFFC029062
+:10EAC0000008861600088696000CF502FFFC859665
+:10EAD000000484160010F484E0000730000294B2B1
+:10EAE0000010F484E00406B4000394B20014F4842B
+:10EAF000E01CC6B4540094B20018F4820005F4B3CC
+:10EB00002800F4820001F4BB280027340008973263
+:10EB1000000486160000072C0003C7385400C6B84E
+:10EB200068009693FFFCC63072009613FFFCF70254
+:10EB30000003C5AC7400F7020004C7385A009713ED
+:10EB4000FFFC07880008C12000009793FFFC879610
+:10EB5000FFFC8296FFF802140014013C0000000044
+:10EB600000019293FFFC0290000822100018871603
+:10EB700000040000000183BA000084960000939610
+:10EB8000FFF0F3846E54873A00049396FFEC9716D7
+:10EB9000FFF49013FFFC271C00029713FFFC0724CF
+:10EBA00000209713FFFC9496FFE407880008E0001C
+:10EBB000CDB89793FFFC8496FFE4839600088726E0
+:10EBC00000188516FFECC03A3A00EE00EC7CF582A6
+:10EBD0000001872600188396000800000001C01E6F
+:10EBE0007200E600EC7CC584000086A60010871643
+:10EBF000FFF0F6020000C0367200E600EC1C0424B0
+:10EC0000001086A600148716FFF400000001C0362D
+:10EC10007200E600EC2020320000F60200012032F3
+:10EC20000000E600EC2D00000001F582000086A245
+:10EC300000008716FFF000000001C0367200E200FD
+:10EC4000EC68F6020000C0367200E600EC7020327C
+:10EC5000000086A200048716FFF400000001C03601
+:10EC60007200E200EC7120320000F6020001203256
+:10EC70000000E600EC81202E0000F5820001202E2D
+:10EC80000000E600ECACF7020001F704429CF60637
+:10EC9000429C76B1001E76B4FFE5C7386FC0773965
+:10ECA000FFF007380001F7332800F7020001972A28
+:10ECB000000883A6000C772CFFE193AA000C972A8A
+:10ECC000001C83A6001CF7046E5093AA002083BA90
+:10ECD0001DDCF682000093AA002C8396000CC5B4BC
+:10ECE000000093AA003083BA0010C634000093AA33
+:10ECF0000024873A001400000001972A00282036DB
+:10ED0000001FEE00ED1CC73050000738003495BAE4
+:10ED1000000006300004E000ECFC06B4000183961D
+:10ED2000001076A5001E9393FFFCF38200B493932A
+:10ED3000FFFC9513FFFC8726002076B4FFE5C7385B
+:10ED40006FC07739FFF09713FFFC8396FFEC00004C
+:10ED500000019393FFFC07880008E000EAB897934E
+:10ED6000FFFC8796FFFC8296FFF802140014013C1A
+:10ED70000000000000019293FFFC029000082210A6
+:10ED800000188716000400000001863A0000000009
+:10ED900000019616FFF0873A000400000001971664
+:10EDA000FFF4F6021DE09613FFFC8616000000003B
+:10EDB00000019613FFFCF6046E500000000196134C
+:10EDC000FFFC261400109616FFEC07880008E001EF
+:10EDD00026F89793FFFCF6846E50F6020000873603
+:10EDE0001DD89616FFE476B5001E76B4FFE5C73849
+:10EDF0006FC07738FFF0F68642C0F73728008616D6
+:10EE0000FFEC000000019613FFFC07880008E000FB
+:10EE1000DBB49793FFFC20220000E600EE4D0000DB
+:10EE200000018616FFEC000000019613FFFC078826
+:10EE30000008E000D5A09793FFFC20220000E60028
+:10EE4000EE4D00000001F60200019616FFE4841664
+:10EE5000FFE48796FFFC8296FFF802140008013C4D
+:10EE60000000000000019293FFFC029000088696CB
+:10EE70000004861600008736000885960008203AB0
+:10EE80000000E600EE99203A0003E600EEE9F40205
+:10EE90000000E000EF0C0000000177B0001F703EA2
+:10EEA000FFE1E600EF0DF4020000851600140000FB
+:10EEB00000019513FFFC851600100000000195135A
+:10EEC000FFFC8516000C000000019513FFFC9593D4
+:10EED000FFFC9693FFFC07880008E000EB60979327
+:10EEE000FFFCE000EF0C0000000177B0001E703E58
+:10EEF000FFE1E600EF0D000000019593FFFC969303
+:10EF0000FFFC07880008E000ED749793FFFC8796EC
+:10EF1000FFFC8296FFF802140018013C000000007C
+:10EF200000019293FFFC0290000822100018F48266
+:10EF3000000086960000F6044AA023940010843650
+:10EF400000009616FFE4F7044A9C9416FFF08536FD
+:10EF50000004C0327200EC00F0149516FFF4773113
+:10EF60000001C738600077390002F3064A98C6B836
+:10EF7000300006B4000CC584000087360000000095
+:10EF80000001C03A4200E600EFA4C6240000873624
+:10EF9000000400000001C03A5200E600EFA8203251
+:10EFA0000000F602000120320000E600EFB500008C
+:10EFB0000001F5820000863600008716FFF0000091
+:10EFC0000001C0327200E200EFF0F5020000C03232
+:10EFD0007200E600EFF8202A000086B600048716CB
+:10EFE000FFF400000001C0367200E200EFF9202AB1
+:10EFF0000000F5020001202A0000E600F009202EA2
+:10F000000000F5820001202E0000E600F018202606
+:10F010000000F482000120260000E600F04DF60218
+:10F0200000018716FFE4F3064A9876B90001C6B4DA
+:10F03000700076B50002C6B4300006B4001486B67F
+:10F0400000009716FFE8E000F0B09696FFEC27145A
+:10F05000001C9713FFFC9393FFFCF3064A9893134D
+:10F06000FFFC07880008E00125689793FFFC202239
+:10F070000000E600F0ADF60200018716FFE4F3069B
+:10F080004A9876B90001C6B4700076B50002C6B4DD
+:10F09000300006B4001486B600009716FFE8969676
+:10F0A000FFECF7054AA0E000F0B420320000F602C1
+:10F0B000000020320000E600F121F4020001871672
+:10F0C000FFE8F60642C876B90002C6B4700076B50D
+:10F0D0000002A736600283160004C6B460007635CD
+:10F0E000001E7630FFE50534000275A9001EC73802
+:10F0F00067C07738FFF0971A0000872A000075ACC8
+:10F10000FFE583160008C7385FC07738FFF0971A0D
+:10F1100000008316000C06B40004E000F124969A67
+:10F120000000F40200008796FFFC8296FFF80214AC
+:10F130000010013C0000000000010000B9000000C8
+:10F14000BA000000BB000000BC000000BD000000D1
+:10F15000BE000000BF000000800000008100000031
+:10F160008200000083000000840000008500000091
+:10F17000860000008700B9B9B9BAB9BBB9BCB9BD3E
+:10F18000B9BEB9BFB980B981B982B983B984B9852B
+:10F19000B986B987BAB9BABABABBBABCBABDBABE2F
+:10F1A000BABFBA80BA81BA82BA83BA84BA85BA863B
+:10F1B000BA87BBB9BBBABBBBBBBCBBBDBBBEBBBFCD
+:10F1C000BB80BB81BB82BB83BB84BB85BB86BB874B
+:10F1D000BCB9BCBABCBBBCBCBCBDBCBEBCBFBC80AB
+:10F1E000BC81BC82BC83BC84BC85BC86BC87BDB9E9
+:10F1F000BDBABDBBBDBCBDBDBDBEBDBFBD80BD81BB
+:10F20000BD82BD83BD84BD85BD86BD87BEB9BEBA86
+:10F21000BEBBBEBCBEBDBEBEBEBFBE80BE81BE82CA
+:10F22000BE83BE84BE85BE86BE87BFB9BFBABFBB24
+:10F23000BFBCBFBDBFBEBFBFBF80BF81BF82BF83DA
+:10F24000BF84BF85BF86BF8780B980BA80BB80BCC2
+:10F2500080BD80BE80BF80808081808280838084EA
+:10F2600080858086808781B981BA81BB81BC81BD60
+:10F2700081BE81BF818081818182818381848185FA
+:10F280008186818782B982BA82BB82BC82BD82BEFE
+:10F2900082BF82808281828282838284828582860A
+:10F2A000828783B983BA83BB83BC83BD83BE83BF9C
+:10F2B000838083818382838383848385838683871A
+:10F2C00084B984BA84BB84BC84BD84BE84BF84807A
+:10F2D000848184828483848484858486848785B9B8
+:10F2E00085BA85BB85BC85BD85BE85BF858085818A
+:10F2F00085828583858485858586858786B986BA56
+:10F3000086BB86BC86BD86BE86BF86808681868299
+:10F310008683868486858686868787B987BA87BBF3
+:10F3200087BC87BD87BE87BF8780878187828783A9
+:10F33000878487858786878700009293FFFC0290E9
+:10F34000000822100018F70475EC00000001203AB4
+:10F350000000E600F37DF6064296F704429476B18B
+:10F36000001E76B4FFE5F4020000C7386FC077399D
+:10F37000FFF007380001E000F5E0F7332800F384E0
+:10F380006F309013FFFC271C00029713FFFC8316BD
+:10F390000000000000019313FFFC9396FFEC078828
+:10F3A0000008E000CDB89793FFFC8396FFECF702CE
+:10F3B0000000971E00088316000400000001931E41
+:10F3C000000C83160008049C0022931E001C831668
+:10F3D000000C9396FFF4871A00007699001E76B40D
+:10F3E000FFE50618000275B1001E75ACFFE5C738D1
+:10F3F0006FC07738FFF0069C0020F737280087326F
+:10F4000000009696FFE47535001EC7385FC0773858
+:10F41000FFF0F7272800049C002406300002873202
+:10F42000000076B1001E76B4FFE5C7386FC07738AC
+:10F43000FFF0F7272800049C0026063000028732E0
+:10F44000000076B1001E76B4FFE5C7386FC077388C
+:10F45000FFF0F7272800049C0028063000028732BE
+:10F46000000076B1001E76B4FFE5C7386FC077386C
+:10F47000FFF0F7272800049C002A0630000287329C
+:10F48000000076B1001E76B4FFE5C7386FC077384C
+:10F49000FFF0F7272800049C002C0630000287327A
+:10F4A000000076B1001E76B4FFE5C7386FC077382C
+:10F4B000FFF0F7272800049C002E06300002873258
+:10F4C000000076B1001E76B4FFE5C7386FC077380C
+:10F4D000FFF0F72728000630000287320000049C66
+:10F4E00000307631001E7630FFE5C73867C07738C8
+:10F4F000FFF0F7272800871E00207528FFE5C73892
+:10F5000057C07739FFF0203A0008EE00F598F3066F
+:10F5100014D88316FFE4871E00207699001E76B467
+:10F52000FFE5C7386FC07739FFF025B80001C4ACDC
+:10F53000580004240001202E0000EC00F595F5028F
+:10F5400000008316FFE40000000106180002A73245
+:10F550005802C6B0580076B5001E76B4FFE5C7382D
+:10F560006FC07739FFE8C6B0400077B80018703E2A
+:10F57000FFE1E600F57DF7376800F502FFFFC730D1
+:10F580004800F53B680024A4000224200002E000AB
+:10F59000F53425AC0001F30614D89313FFFCF302F5
+:10F5A00000349313FFFC8316FFF400000001931353
+:10F5B000FFFC8316000000000001871A0000769906
+:10F5C000001E76B4FFE5C7386FC07739FFF0971398
+:10F5D000FFFC9393FFFC07880008E000EAB89793CC
+:10F5E000FFFC8796FFFC8296FFF802140010013C96
+:10F5F0000000000000019293FFFC0290000822101E
+:10F600000010F70475EC00000001203A0000E6004D
+:10F61000F639F6064296F704429476B1001E76B4A7
+:10F62000FFE5F4020000C7386FC07739FFF00738F4
+:10F630000001E000F748F7332800F5046F300000C0
+:10F6400000019516FFF49013FFFC27280002971382
+:10F65000FFFC85960004000000019593FFFC0788DD
+:10F660000008E000CDB89793FFFC85160004F60271
+:10F67000000086AA00007729001E7738FFE5C6B48F
+:10F6800077C076B5FFF0F7020001C0367400E600DF
+:10F69000F6999696FFECC63800009613FFFC859607
+:10F6A000FFEC8516FFF4472CFFFE07380002C72841
+:10F6B00072009713FFFC85960000000000019593EF
+:10F6C000FFFC07880008E000CDB89793FFFC851683
+:10F6D000FFF4F7020002972A000885960008000050
+:10F6E000000195AA000C8596000C0000000195AA67
+:10F6F000001CF50614D89513FFFCF58200209593A5
+:10F70000FFFC8516FFF4000000019513FFFC8596B1
+:10F7100000008516FFEC872E000076AD001E76B443
+:10F72000FFE5C7386FC07739FFF0C738500097132F
+:10F73000FFFC8596FFF4000000019593FFFC07880D
+:10F740000008E000EAB89793FFFC8796FFFC8296DA
+:10F75000FFF802140010013C000000000001929329
+:10F76000FFFC0290000885960000851600048716AD
+:10F770000008F602FFFC06A80003C6B464000738C0
+:10F780000003C7386400C73470009713FFFCC5AC92
+:10F790006A009593FFFCF7020003C5287400F70286
+:10F7A0000004C73852009713FFFC07880008E001E7
+:10F7B00014D89793FFFC8796FFFC8296FFF80214FB
+:10F7C0000010013C0000000000019293FFFC029039
+:10F7D000000822100010F70475EC00000001203A28
+:10F7E0000000E600F80DF6064296F704429476B162
+:10F7F000001E76B4FFE5F4020000C7386FC0773909
+:10F80000FFF007380001E000F920F7332800F50485
+:10F810006F30000000019516FFF49013FFFC2728BD
+:10F8200000029713FFFC85960004000000019593E9
+:10F83000FFFC07880008E000CDB89793FFFC851611
+:10F840000004F602000086AA00007729001E77381F
+:10F85000FFE5C6B477C076B5FFF0F7020001C03609
+:10F860007400E600F86D9696FFECC638000096131B
+:10F87000FFFC8596FFEC8516FFF4472CFFFE07384A
+:10F880000002C72872009713FFFC85960000000055
+:10F8900000019593FFFC07880008E000CDB897931E
+:10F8A000FFFC8516FFF4F5820006F5AB280085966F
+:10F8B00000080728000295AA00040514000E852AF6
+:10F8C000000077A9001E77BCFFE5C5287FC0752919
+:10F8D000FFF0F53B2800F58614D89593FFFCF50260
+:10F8E00000089513FFFC859600008516FFEC872E17
+:10F8F000000076AD001E76B4FFE5C7386FC07739DB
+:10F90000FFF0C73850009713FFFC8596FFF4000006
+:10F9100000019593FFFC07880008E000F75C9793CF
+:10F92000FFFC8796FFFC8296FFF802140010013C52
+:10F930000000000000019293FFFC029000082210DA
+:10F940000008F70475EC83960004203A0000E600F6
+:10F95000FA64F6064296F5046F309013FFFC2728F0
+:10F9600000029713FFFC83160000000000019313B0
+:10F97000FFFC9396FFF49516FFF007880008E0005F
+:10F98000CDB89793FFFC8516FFF0F302000783962E
+:10F99000FFF4F32B280007280002F3020001F33BD9
+:10F9A0002800871E0000769D001E76B4FFE5059CAA
+:10F9B0000002762D001E7630FFE5749D001E74A4B3
+:10F9C000FFE5041C000683160000C7386FC07738B7
+:10F9D000FFF006A80004F7372800872E000006A8CD
+:10F9E000000675A1001EC73867C07738FFF0F737EB
+:10F9F0002800871E000475ACFFE506A800087619EC
+:10FA0000001EC7384FC07738FFF0F737280087222D
+:10FA1000000006A8000AC7385FC07738FFF0F73744
+:10FA20002800F30614D89313FFFCF302000C931381
+:10FA3000FFFC8316000000000001871A00007630EA
+:10FA4000FFE5C73867C07739FFF09713FFFC9513C0
+:10FA5000FFFC07880008E000F75C9793FFFCE000DC
+:10FA6000FA8400000001F704429476B1001E76B4D7
+:10FA7000FFE5F4020000C7386FC07739FFF00738A0
+:10FA80000001F73328008796FFFC8296FFF80214E6
+:10FA90000008013C0000000000019293FFFC02906E
+:10FAA000000822100048F70475EC85960000203A03
+:10FAB0000000E600FD98F606429605AC0002872E8F
+:10FAC000000076AD001E76B4FFE52414001E062C5F
+:10FAD00000027531001E249400207528FFE5F38490
+:10FAE0006E50C7386FC07738FFF0F727280087328D
+:10FAF00000009396FFC4C73857C07738FFF0F7234C
+:10FB000028002414001C063000028732000076B161
+:10FB1000001E76B4FFE5C7386FC07738FFF0F723D3
+:10FB200028002414001A063000028732000076B143
+:10FB3000001E76B4FFE5C7386FC07738FFF0F723B3
+:10FB4000280024140018063000028732000076B125
+:10FB5000001E76B4FFE5C7386FC07738FFF0F72393
+:10FB6000280024140016063000028732000076B107
+:10FB7000001E76B4FFE5C7386FC07738FFF0F72373
+:10FB8000280024140014063000028732000076B1E9
+:10FB9000001E76B4FFE5C7386FC07738FFF0F72353
+:10FBA000280024140012063000028732000076B1CB
+:10FBB000001E76B4FFE5C7386FC07738FFF0F72333
+:10FBC000280006300002873200002414001076312D
+:10FBD000001E7630FFE5C73867C07738FFF0F7239F
+:10FBE00028009013FFFC271C00029713FFFC94933E
+:10FBF000FFFC9596FFBC07880008E000CDB89793FE
+:10FC0000FFFC8596FFBC231400362494003873A5AE
+:10FC1000001E739CFFE5F40442C0F68642C076B530
+:10FC2000001E76B4FFE5872E0000762D001E76308C
+:10FC3000FFE5C4206FC07420FFF005AC0002752DF5
+:10FC4000001E7528FFE5C73867C07738FFF0F72733
+:10FC50002800872E0000F6046E50C73857C077384A
+:10FC6000FFF0F71B28002314003405AC0002872E98
+:10FC7000000076AD001E76B4FFE5C7386FC0773858
+:10FC8000FFF0F71B28002314003205AC0002872E7A
+:10FC9000000076AD001E76B4FFE5C7386FC0773838
+:10FCA000FFF0F71B28002314003005AC0002872E5C
+:10FCB000000076AD001E76B4FFE5C7386FC0773818
+:10FCC000FFF0F71B28002314002E05AC0002872E3E
+:10FCD000000076AD001E76B4FFE5C7386FC07738F8
+:10FCE000FFF0F71B28002314002C05AC0002872E20
+:10FCF000000076AD001E76B4FFE5C7386FC07738D8
+:10FD0000FFF0F71B28002314002A05AC0002872E01
+:10FD1000000076AD001E76B4FFE5C7386FC07738B7
+:10FD2000FFF0F71B280005AC0002872E000023140B
+:10FD3000002875AD001E75ACFFE5C7385FC0773889
+:10FD4000FFF0F71B28008716FFC8F6820003C738AC
+:10FD50003FC096B2000806B01DD8F4372800F386DD
+:10FD600014D89393FFFCF3821DE09393FFFC96134A
+:10FD7000FFFC7739FFF09713FFFC8396FFC4000068
+:10FD800000019393FFFC07880008E000EAB897930E
+:10FD9000FFFCE000FDB800000001F704429476B1DA
+:10FDA000001E76B4FFE5F4020000C7386FC0773953
+:10FDB000FFF007380001F73328008796FFFC829692
+:10FDC000FFF802140004013C0000000000019293BF
+:10FDD000FFFC029000088616000000000001873238
+:10FDE000000076B1001E76B4FFE5C7386FC07739E2
+:10FDF000FFF0203A0006E600FE21F582001EF7041F
+:10FE000042A8F60642A876B1001E76B4FFE5C738D0
+:10FE10006FC07739FFF007380001E000FE34F73398
+:10FE20002800F6056F349593FFFC07880008E00072
+:10FE300015849793FFFC8796FFFC8296FFF80214C7
+:10FE40000004013C0000000000019293FFFC0290BE
+:10FE5000000886160000859600048732000076B1FF
+:10FE6000001E76B4FFE5C7386FC07739FFF0203A3F
+:10FE70000007E600FE9DF4020000F70442A8F60623
+:10FE800042AA76B1001E76B4FFE5C7386FC0773955
+:10FE9000FFF007380001E000FF1CF73328000730AF
+:10FEA000000286BA00007739001E7738FFE5C6B435
+:10FEB00077C076B5FFF020360001E600FED5F605E6
+:10FEC0006F3420360002E600FEE5F5020020E00077
+:10FED000FEFCF60642AC202E000CE600FF1CF402ED
+:10FEE0000000F502001F9513FFFC07880008E000E2
+:10FEF00015849793FFFCE000FF1CF4020001F70457
+:10FF000042AC76B1001E76B4FFE5C7386FC07739D2
+:10FF1000FFF007380001F7332800F402000187964C
+:10FF2000FFFC8296FFF802140008013C000000006C
+:10FF300000019293FFFC02900008869600000000EA
+:10FF4000000187360004F6020000073800089736E3
+:10FF500000048736000800000001203A0000EC0091
+:10FF6000FF7DF6856F348736000800000001203AD7
+:10FF70000003EE00FF8020320000F6020001203274
+:10FF80000000E600FFBDF60642AEF7046F34000045
+:10FF90000001873A0008F682FFEC77390002A73AA1
+:10FFA0006802000000019713FFFC07880008E000CA
+:10FFB00015849793FFFCE000FFD800000001F704D0
+:10FFC00042AC76B1001E76B4FFE5C7386FC0773912
+:10FFD000FFF007380001F73328008796FFFC829670
+:10FFE000FFF802140004013C0000000000010000C2
+:10FFF00000170000001A0000001D0000001800009B
+:020000021000EC
+:10000000000056657273696F6E537472696E673A59
+:10001000206D63702D6C34763320332E303863209E
+:1000200044656320313120313939362031333A305B
+:10003000363A313600009293FFFC02900008F70434
+:10004000E00CFF0200009702FF84F7060C3ECFFC95
+:100050007580F60200029602FF8C9002FF88F7047A
+:10006000E02000000001203A0000E6010074F68262
+:100070000000F68200039682FF988796FFFC829626
+:10008000FFF802140000013C000000000001929300
+:10009000FFFC029000082210000CF5021494F505F4
+:1000A0007B00F50EF014F5057B08F706E000F686F8
+:1000B0007B68C7386A00F7057AF0F502004CF682D3
+:1000C000000020360002EE010124F5057AF8C5B4DF
+:1000D0000000C6340000F706E030C72C7000F506BB
+:1000E0006F44B73250029013FFFC9713FFFC9596B4
+:1000F000FFF49616FFF09696FFEC07880008E001E3
+:10010000031C9793FFFC8596FFF48616FFF08696F6
+:10011000FFEC05AC149406B4000120360002EE0199
+:1001200000D506300004F5020022F5056F58F005F1
+:100130006F54F0056F50F0052D408796FFFC8296B6
+:10014000FFF802140000013C00000000000192933F
+:10015000FFFC0290000807880008E00129589793E7
+:10016000FFFCF7020003F705E008F7047AD8F6026F
+:1001700000019602FF94203A0000E6010191F70683
+:100180007AE807880008E00103DC9793FFFCF70694
+:100190007AE8F6020005F63B2800F7067AE0868248
+:1001A000FF44F602000320360000E60101C9F63BD9
+:1001B0002800F7046F648682FF4407380001203668
+:1001C0000000E60101B0F7056F6407880008E00150
+:1001D00000349793FFFC07880008E001008C979398
+:1001E000FFFC07880008E00044289793FFFC07887D
+:1001F0000008E00016F09793FFFC07880008E00174
+:100200000C609793FFFC07880008E00104089793AF
+:10021000FFFC07880008E00000209793FFFC078898
+:100220000008E0000BD89793FFFC07880008E00166
+:100230001D689793FFFC07880008E0011E50979304
+:10024000FFFC07880008E0005F689793FFFC0788C1
+:100250000008E0006DEC9793FFFC07880008E001C0
+:1002600021D09793FFFC07880008E001222C979388
+:10027000FFFC9002FF9407880008E0000BFC9793B6
+:10028000FFFCF40200008796FFFC8296FFF8021440
+:100290000000013C0000000000019293FFFC02906E
+:1002A000000822100008F6020000C5B0000020324D
+:1002B0000002EE010308F5066F44A6AE50020000EE
+:1002C00000018736000000000001203A0001E6012D
+:1002D00002FCF50200029513FFFC9693FFFC959635
+:1002E000FFF49616FFF007880008E001031C9793BF
+:1002F000FFFC8616FFF08596FFF40000000105ACB8
+:100300000004E00102AC063000018796FFFC8296F3
+:10031000FFF802140000013C00000000000192936D
+:10032000FFFC0290000887160000F6020000F6822B
+:100330000008963A0008963A000C963A09D8963A80
+:1003400009DC963A0EF4963A0EF896BA1420963ACC
+:10035000142490BA148C8696000490BA149096BA1D
+:100360000000963A00048796FFFC8296FFF802147C
+:100370000008013C0000000000019293FFFC029085
+:100380000008859600008716000886160004773856
+:10039000FFFFC5307000C0325200E40103C9000005
+:1003A0000001872E000076AD001E76B4FFE5C73849
+:1003B0006FC07738FFF0F733280006300002C032F4
+:1003C0005200E40103A005AC00028796FFFC829670
+:1003D000FFF80214000C013C0000000000019293A1
+:1003E000FFFC02900008F7020001E00103E8F705B6
+:1003F0007AD88796FFFC8296FFF802140000013C31
+:10040000000000000001000000009293FFFC029039
+:100410000008F502000AF50571CCF00571D4F0056D
+:1004200071D0F00571C4F5020001F682000020369B
+:10043000000AEC010464F50571C8F58A1E00F60691
+:1004400071C4472CFFFC973200180630000406B434
+:100450000001F70471CC00000001C0367200EC010D
+:10046000044105AC214CF0057198F5066F689513B1
+:10047000FFFCF5067B189513FFFC07880008E000D9
+:1004800015489793FFFCF50605D49513FFFCF782FA
+:1004900000059793FFFCF5066F689513FFFC07882E
+:1004A0000008E000161C9793FFFCF5060B709513EF
+:1004B000FFFCF78200069793FFFCF5066F68951323
+:1004C000FFFC07880008E000161C9793FFFCF50668
+:1004D0000BA09513FFFCF78200059793FFFCF50630
+:1004E00070809513FFFC07880008E000161C9793A6
+:1004F000FFFCF5060B709513FFFCF782000697933F
+:10050000FFFCF50670809513FFFC07880008E000EB
+:10051000161C9793FFFCF50605589513FFFCF50292
+:10052000000A9513FFFCF506710C9513FFFC078874
+:100530000008E000161C9793FFFC07880008E00104
+:1005400005589793FFFC8796FFFC8296FFF80214EC
+:100550000000013C0000000000019293FFFC0290AB
+:100560000008F70471C400000001203A0000E60111
+:10057000057DF68671C4E0010594F7020000F704DA
+:1005800071D00000000177390002C7386800873A4F
+:10059000001800000001203A0000E60105ACF70554
+:1005A0007B10F606710CE00105C0F6057B18F60617
+:1005B0006F68F6057B189702FF48073821289702D5
+:1005C000FF4C8796FFFC8296FFF802140000013C66
+:1005D0000000000000019293FFFC0290000822102E
+:1005E00000108682FF48F4866F68F4857B18F50456
+:1005F0007B1026B4000285B60000872A0000762909
+:10060000001E7630FFE576B5001E76B4FFE5C5AC7A
+:100610006FC0C73867C07739FFF077B80010703EF9
+:10062000FFE1E601064575ACFFF0F70471AC000090
+:10063000000107380001F70571ACF70471ACE00167
+:1006400008C4F7020001772CFFF8203A0000E60109
+:10065000067176A9001EF70471A800000001073892
+:100660000001F70571A8F70471A8E00108C4F702BA
+:100670000001872A000076B4FFE5C7386FC07739DC
+:10068000FFF027380004203A0003E20108A400002C
+:10069000000177390002F68606A4A6B670020000B3
+:1006A0000001C1340000000106B40001077C000114
+:1006B00007EC00010844872A0004C4840000C03A03
+:1006C0004A00E60106D8000000018702FF4800004A
+:1006D0000001C7385200972A0004872A000400004E
+:1006E0000001203A2100EE01073CF602000086AA34
+:1006F00000048702FF4800000001C7385200273875
+:100700000028C0367200E601073C0000000177FCBB
+:10071000001D703EFFE1E601073C0000000177FC90
+:100720000017703EFFE1E601073D0000000177FC85
+:100730000016703EFFE1E601074420320000F60299
+:10074000000120320000E601088800000001872A2D
+:10075000001800000001203A0002EE0108C100006C
+:100760000001F70471A40000000107380001F7053B
+:1007700071A4F70471A4E00108C4F7020001872AFC
+:10078000000400000001203A2100EE0107E0F6021B
+:10079000000086AA00048702FF4800000001C73855
+:1007A00052002738000CC0367200E60107E0000056
+:1007B000000177FC001D703EFFE1E60107E000004C
+:1007C000000177FC0017703EFFE1E60107E1000041
+:1007D000000177FC0016703EFFE1E6010880203240
+:1007E0000000F6020001E0010880203200008702CC
+:1007F000FF4800000001C738520027380004203AA3
+:100800000008E6010838F682000077FC001D703E03
+:10081000FFE1E60108380000000177FC0017703E98
+:10082000FFE1E60108390000000177FC0016703E88
+:10083000FFE1E601088020360000F6820001E001B9
+:10084000088020360000F702000077FC001D703E93
+:10085000FFE1E60108780000000177FC0017703E18
+:10086000FFE1E60108790000000177FC0016703E08
+:10087000FFE1E6010880203A0000F7020001203A7B
+:100880000000E60108C100000001F70471A00000AB
+:10089000000107380001F70571A0F70471A0E0011D
+:1008A00008C4F7020001F704719C0000000107383A
+:1008B0000001F705719CF704719CE00108C4F70280
+:1008C0000001F7020000203A0000E601096800007C
+:1008D0000001F6847B10000000018736000076B529
+:1008E000001E76B4FFE5C7386FC07739FFF02738B0
+:1008F0000004203A0003E2010B5077390002F6862B
+:10090000090CA6B6700200000001C134000000010D
+:10091000091C00010AE000010AAC00010B14F704F5
+:1009200071D0F60471CC06B80001C0366200E60151
+:100930000938C7340000F7020000F58471D40000C4
+:100940000001C03A5A00470C0001203A0000E601BD
+:10095000098500000001F70471B0000000010738AC
+:100960000001F70571B0F70471B0F70471B400002D
+:10097000000107380001F70571B4F70471B4E00114
+:100980000B5000000001F48471C8F68571D0949674
+:10099000FFF4F4847B10C0366200E60109A494964B
+:1009A000FFECF00571D0F70471D0F00571C88496A2
+:1009B000FFECC03A5A00470C0001F70571C48726C6
+:1009C000000800000001703AFFE1E60109E10000C3
+:1009D0000001F70471980000000107380001F705D5
+:1009E00071988496FFF40000000120260000E601C3
+:1009F0000A710000000107880008E001055897937C
+:100A0000FFFCF602000920320014E6010A4D27001F
+:100A1000000C203A0001E2010A4DF7062DCCF684C5
+:100A20002ECC0000000175B50002B62E700206B48F
+:100A30000001F6852ECC8602FF34F7062E4C2036B8
+:100A4000001FE2010A4DB62E7002F0052ECCF7040D
+:100A50002D6800000001873A000000000001873A7D
+:100A600000280000000107880008C13800009793A3
+:100A7000FFFCF70471BC8496FFEC07380001F70512
+:100A800071BCF70471BC86A600048496FFF4F704D9
+:100A900071B820260000C7386800F70571B8E60174
+:100AA0000B5100000001E0010B5C00000001F704A5
+:100AB00071C00000000107380001F70571C0F7049C
+:100AC00071C0F4847B10000000019493FFFC078840
+:100AD0000008E000FDCC9793FFFCE0010B50000004
+:100AE0000001F70471C00000000107380001F7059C
+:100AF00071C0F70471C0F4847B100000000194936E
+:100B0000FFFC07880008E000FF309793FFFCE0013E
+:100B10000B5000000001F70471C00000000107380D
+:100B20000001F70571C0F70471C0F6847B108702DD
+:100B3000FF4800000001C7386A00273800049713F7
+:100B4000FFFC9693FFFC07880008E000FE4897939F
+:100B5000FFFC07880008E00105589793FFFC879683
+:100B6000FFFC8296FFF802140000013C0000000028
+:100B700000019293FFFC02900008F7067080F705D1
+:100B80007B1807880008E00105589793FFFC8796BB
+:100B9000FFFC8296FFF802140000013C00000000F8
+:100BA00000019293FFFC02900008F7066F68F705BA
+:100BB0007B1807880008E00105589793FFFC87968B
+:100BC000FFFC8296FFF802140000013C00000000C8
+:100BD00000019293FFFC02900008F7067B18971320
+:100BE000FFFCF7066F689713FFFC07880008E0001A
+:100BF00014F49793FFFCF7067B189713FFFCF70696
+:100C00006FF49713FFFC07880008E00014F4979333
+:100C1000FFFCF7067B189713FFFCF706708097130D
+:100C2000FFFC07880008E00014F49793FFFCF70628
+:100C30007B189713FFFCF706710C9713FFFC0788CE
+:100C40000008E00014F49793FFFC8796FFFC82965F
+:100C5000FFF802140000013C000000000001000049
+:100C600000009293FFFC02900008F5020004F505D5
+:100C70007600F0057608F0057604F00575F8F502C3
+:100C80000001F682000020360004EC010CBCF505E2
+:100C900075FCF58E6AF8F60675F8472CFFFC97325E
+:100CA00000180630000406B40001F70476000000C6
+:100CB0000001C0367200EC010C9905AC214CF50620
+:100CC00072189513FFFCF50676489513FFFC07880C
+:100CD0000008E00015489793FFFCF5060DF4951306
+:100CE000FFFCF782000E9793FFFCF5067218951330
+:100CF000FFFC07880008E000161C9793FFFCF50630
+:100D00000DF49513FFFCF782000E9793FFFCF50698
+:100D100072A49513FFFC07880008E000161C979347
+:100D2000FFFCF506132C9513FFFCF7820001979347
+:100D3000FFFCF50673309513FFFC07880008E00000
+:100D4000161C9793FFFCF50616C89513FFFCF78257
+:100D500000019793FFFCF50673BC9513FFFC078811
+:100D60000008E000161C9793FFFCF5061800951389
+:100D7000FFFCF78200109793FFFCF506744895136B
+:100D8000FFFC07880008E000161C9793FFFCF5069F
+:100D900016409513FFFCF78200109793FFFCF506B1
+:100DA00074D49513FFFC07880008E000161C979385
+:100DB000FFFCF506132C9513FFFCF50200129513AA
+:100DC000FFFCF50675609513FFFC07880008E0003E
+:100DD000161C9793FFFCF00575F0F00575ECF00517
+:100DE00075F48796FFFC8296FFF802140000013C20
+:100DF0000000000000019293FFFC02900008221006
+:100E00000038F70475EC00000001203A0000E6010C
+:100E10000E2800000001F70475F000000001203AE0
+:100E20000000E6010E3D0000000107880008E00117
+:100E300015D09793FFFCE001131800000001F704A0
+:100E400075FC00000001203A0000E6010E59F6860C
+:100E500075F8E0010E6CF6820000F70476080000D9
+:100E6000000177390002C738680086BA0018F70415
+:100E700076FC00000001203A0000E6010E90F685A5
+:100E80007660F3067648F30576FCE0010EA4F702DF
+:100E90000001F3020010F30576F8F3067648F30537
+:100EA0007700F7020000203A0000E6011315F30670
+:100EB0007448F70475EC00000001203A0000E601D8
+:100EC0000ED800000001F70475F000000001203A80
+:100ED0000000E6010EED0000000107880008E001B7
+:100EE00016409793FFFCE001131800000001F68400
+:100EF0007660000000018736000800000001703AAB
+:100F0000FFE1E6010F21F48200009693FFFC0788C1
+:100F10000008E00000BC9793FFFCE0011314F30607
+:100F20007560C3B40000841E0010F6844AA0231428
+:100F300000209316FFC49416FFE09696FFD4851EFA
+:100F40000014F7044A9C00000001C0367200EC0156
+:100F5000100C9516FFE477350001C7386800773923
+:100F60000002F3064A98C6B8300006B4000CC584E7
+:100F700000008736000000000001C03A4200E60190
+:100F80000F9CC62400008736000400000001C03A10
+:100F90005200E6010FA020320000F60200012032CC
+:100FA0000000E6010FAD00000001F582000086366A
+:100FB00000008716FFE000000001C0327200E2016D
+:100FC0000FE8F5020000C0327200E6010FF0202A9F
+:100FD000000086B600048716FFE400000001C0365A
+:100FE0007200E2010FF1202A0000F5020001202A20
+:100FF0000000E6011001202E0000F5820001202EE5
+:101000000000E601101020260000F48200012026D6
+:101010000000E6011045F60200018716FFD4F30632
+:101020004A9876B90001C6B4700076B50002C6B41D
+:10103000300006B4001486B600009716FFD8E00111
+:1010400010B89696FFDC2714002C9713FFFC83162C
+:10105000FFC4000000019313FFFCF3064A989313AA
+:10106000FFFC9396FFCC07880008E0012568979362
+:10107000FFFC8396FFCC20220000E60110B5F602AB
+:1010800000018716FFD4F3064A9876B90001C6B46A
+:10109000700076B50002C6B4300006B4001486B6FF
+:1010A00000009716FFD89696FFDCF7054AA0E001EE
+:1010B00010BC20320000F602000020320000E601E1
+:1010C00010CCF4820001E0011124F4820000869625
+:1010D000FFD80000000177350002C7386800773973
+:1010E0000002F68642C8A63A6802C7386800753919
+:1010F000001E7528FFE505B8000286AE000007381F
+:1011000000049716FFECC63057C07630FFF09616F5
+:10111000FFF475AD001E75ACFFE5C6B45FC076B4D4
+:10112000FFF09696FFF020260000E6011138F582C8
+:101130000000E00111CCF60200008696FFF00000EE
+:101140000001C7346800C49C7200C02E6A00EC0124
+:101150001198C5240000C62C00008716FFEC000083
+:101160000001A6B2700205AC0001C73070007739EB
+:10117000001E7738FFE5C6B477C076B4FFF0F6AB53
+:101180002800052800028716FFF000000001C02E8D
+:101190007200EC01115906300002F3020001F30560
+:1011A00076F4F60200018716FFF0869E0004C73829
+:1011B0007000C7384800C6B470008716FFF406B444
+:1011C00000209702FF6C9482FF509682FF582032D5
+:1011D0000000E601131000000001F704765CF584BE
+:1011E00076F807380001F705765CF704765C202E68
+:1011F0000021E2011230F6862C28F7042D38000079
+:10120000000106380001F6052D387739000220323A
+:101210000044E601121CB5BA6802F0052D38F3024D
+:101220000022F30576F8F3047700E0011234F305A9
+:1012300076FCF00576FCF70475F800000001203A12
+:101240000000E6011271F6862C28F7042D38000004
+:10125000000106380001F6052D3877390002F30247
+:10126000000F20320044E6011270B33A6802F00524
+:101270002D38F7047608F684760007380001C03A66
+:101280006A00E601128CF7057608F0057608F68408
+:101290007608F7047604F00575F8F60675F8C0369A
+:1012A0007200470C0001203A0000E60112B9F70570
+:1012B00075FCE00112C8F702000077350002C7385C
+:1012C0006000873A001800000001203A0000E601A3
+:1012D0001309F7057660F7042D38F30672A4F305B9
+:1012E0007648F6862C2806380001F6052D38773921
+:1012F0000002F302000E20320044E6011318B33A54
+:101300006802E0011318F0052D38E0011314F3060C
+:101310007218F3067330F30576488796FFFC8296C1
+:10132000FFF802140000013C00000000000192934D
+:10133000FFFC02900008F70476600000000186BA06
+:101340000004F704765400000001C7386800F70570
+:101350007654F70476580000000107380001F705BD
+:101360007658F70475F8F6847658203A0000E601BE
+:10137000139DF6862C28F7042D380000000106384E
+:101380000001F6052D3877390002F502000F2032F2
+:101390000044E601139CB53A6802F0052D38F704C5
+:1013A0007608F684760007380001C03A6A00E60144
+:1013B00013B8F7057608F0057608F7047608F68482
+:1013C0007604F00575F8F58476F8C03A6A00470CA3
+:1013D0000001202E0021E2011414F70575FCF7042A
+:1013E0002D38F6862C2806380001F6052D38773979
+:1013F000000220320044E6011400B5BA6802F0058C
+:101400002D38F5020022F50576F8F5047700E001A5
+:101410001418F50576FCF00576FCF70475ECF50676
+:101420007218203A0000E6011440F5057648F704EA
+:1014300075F000000001203A0000E601145500009C
+:10144000000107880008E00115D09793FFFCE00138
+:1014500014C400000001F70475FC00000001203AEC
+:101460000000E6011471F68675F8E0011488F702B1
+:101470000000F70476080000000177390002C73841
+:101480006800873A001800000001203A0000E601D9
+:1014900014C5F7057660F7042D38F6862C28063833
+:1014A0000001F6052D3877390002F502000E2032D2
+:1014B0000044E60114BCB53A6802F0052D38F50683
+:1014C00072A4F50576488796FFFC8296FFF8021411
+:1014D0000000013C0000000000019293FFFC02901C
+:1014E0000008F70475EC00000001203A0000E60156
+:1014F0001540F40200008696000400000001F68505
+:1015000075EC8696000800000001F6857B3886960B
+:101510000000F7047648F6857B30F6867218C03AEC
+:101520006A00470C0001203A0000E6011541F40270
+:10153000000107880008E00115D09793FFFCF40232
+:1015400000018796FFFC8296FFF80214000C013C14
+:101550000000000000019293FFFC02900008F704D5
+:1015600075F400000001203A0000E60115BCF40209
+:1015700000008696000400000001F68575F086964E
+:10158000000800000001F6857B4886960000F704FD
+:101590007648F6857B40F6867218C03A6A00470C9A
+:1015A0000001203A0000E60115BDF40200010788A1
+:1015B0000008E00115D09793FFFCF4020001879624
+:1015C000FFFC8296FFF80214000C013C00000000B2
+:1015D00000019293FFFC02900008F70476FC0000E3
+:1015E0000001203A0000E60115FCF6820010F686A4
+:1015F0007648F68576FCE001160CF7020001F685C8
+:1016000076F8F6867648F6857700F7020000203AED
+:101610000000E6011620F68674D4E001162CF6854B
+:10162000764807880008E00116409793FFFC8796EC
+:10163000FFFC8296FFF802140000013C000000004D
+:1016400000019293FFFC02900008F60475F0000080
+:10165000000120320000E6011685F7020001F705BF
+:1016600075F4F6847B48F70576F4F7047B40C6B042
+:10167000680026B400049702FF6C9602FF50E00158
+:1016800016A800000001F70475ECF6847B38F5829B
+:101690000001F58576F4F6047B30C6B8680026B400
+:1016A00000049602FF6C9702FF509682FF58F58661
+:1016B00073BCF58576488796FFFC8296FFF8021486
+:1016C0000000013C0000000000019293FFFC02902A
+:1016D0000008F7047B280000000107380001F70527
+:1016E0007B28F70475F4F6847B28203A0000E60195
+:1016F000172100000001F00575F4F70475EC0000F7
+:101700000001203A0000E6011725F00575F0078872
+:101710000008E00116409793FFFCE00117EC000081
+:101720000001F00575ECF70475FC00000001203A9B
+:101730000000E6011741F68675F8E0011758F70238
+:101740000000F70476080000000177390002C7386E
+:101750006800873A001800000001203A0000E60106
+:101760001795F7057660F7042D38F6862C2806388D
+:101770000001F6052D3877390002F502000E2032FF
+:101780000044E601178CB53A6802F0052D38E001F7
+:101790001798F50672A4F5067218F5057648F584D3
+:1017A00076F800000001202E0021E20117E8F686FD
+:1017B0002C28F7042D380000000106380001F6053A
+:1017C0002D387739000220320044E60117D4B5BA2B
+:1017D0006802F0052D38F5020022F50576F8F504CB
+:1017E0007700E00117ECF50576FCF00576FC8796AE
+:1017F000FFFC8296FFF802140000013C000000008C
+:1018000000019293FFFC0290000822100038F704B8
+:1018100075EC00000001203A0000E60118340000D9
+:101820000001F70475F000000001203A0000E60115
+:1018300018490000000107880008E001164097934E
+:10184000FFFCE0011C7400000001F68476600000DB
+:1018500000018736000800000001703AFFE1E60150
+:10186000187DF48200009693FFFC07880008E000D2
+:1018700000BC9793FFFCE0011C70F3067560C3B4D5
+:101880000000841E0010F6844AA023140020931642
+:10189000FFC49416FFE09696FFD4851E0014F7044B
+:1018A0004A9C00000001C0367200EC0119689516D0
+:1018B000FFE477350001C738680077390002F30686
+:1018C0004A98C6B8300006B4000CC58400008736BC
+:1018D000000000000001C03A4200E60118F8C624EA
+:1018E00000008736000400000001C03A5200E60103
+:1018F00018FC20320000F602000120320000E60150
+:10190000190900000001F5820000863600008716E4
+:10191000FFE000000001C0327200E2011944F5024C
+:101920000000C0327200E601194C202A000086B681
+:1019300000048716FFE400000001C0367200E201D7
+:10194000194D202A0000F5020001202A0000E601BE
+:10195000195D202E0000F5820001202E0000E60116
+:10196000196C20260000F482000120260000E60108
+:1019700019A1F60200018716FFD4F3064A9876B93A
+:101980000001C6B4700076B50002C6B4300006B4DB
+:10199000001486B600009716FFD8E0011A14969638
+:1019A000FFDC2714002C9713FFFC8316FFC40000F4
+:1019B00000019313FFFCF3064A989313FFFC9396E0
+:1019C000FFCC07880008E00125689793FFFC839609
+:1019D000FFCC20220000E6011A11F6020001871652
+:1019E000FFD4F3064A9876B90001C6B4700076B504
+:1019F0000002C6B4300006B4001486B60000971684
+:101A0000FFD89696FFDCF7054AA0E0011A182032AD
+:101A10000000F602000020320000E6011A28F482DD
+:101A20000001E0011A80F48200008696FFD80000D1
+:101A3000000177350002C738680077390002F68662
+:101A400042C8A63A6802C73868007539001E752872
+:101A5000FFE505B8000286AE0000073800049716BF
+:101A6000FFECC63057C07630FFF09616FFF475AD28
+:101A7000001E75ACFFE5C6B45FC076B4FFF0969665
+:101A8000FFF020260000E6011A94F5820000E00134
+:101A90001B28F60200008696FFF000000001C73404
+:101AA0006800C49C7200C02E6A00EC011AF4C524C0
+:101AB0000000C62C00008716FFEC00000001A6B253
+:101AC000700205AC0001C73070007739001E77380E
+:101AD000FFE5C6B477C076B4FFF0F6AB2800052862
+:101AE00000028716FFF000000001C02E7200EC011A
+:101AF0001AB506300002F3020001F30576F4F6028F
+:101B000000018716FFF0869E0004C7387000C738B2
+:101B10004800C6B470008716FFF406B40020970290
+:101B2000FF6C9482FF509682FF5820320000E6013D
+:101B30001C6C00000001F704765CF58476F8073829
+:101B40000001F705765CF704765C202E0021E201A7
+:101B50001B8CF6862C28F7042D380000000106386F
+:101B60000001F6052D387739000220320044E601E5
+:101B70001B78B5BA6802F0052D38F3020022F30590
+:101B800076F8F3047700E0011B90F30576FCF0058E
+:101B900076FCF70475F800000001203A0000E60129
+:101BA0001BCDF6862C28F7042D38000000010638DE
+:101BB0000001F6052D3877390002F302000F2032BC
+:101BC0000044E6011BCCB33A6802F0052D38F70457
+:101BD0007608F684760007380001C03A6A00E6010C
+:101BE0001BE8F7057608F0057608F6847608F70412
+:101BF0007604F00575F8F60675F8C0367200470CE5
+:101C00000001203A0000E6011C15F70575FCE00113
+:101C10001C24F702000077350002C7386000873ABD
+:101C2000001800000001203A0000E6011C65F705DD
+:101C30007660F7042D38F30672A4F3057648F6862D
+:101C40002C2806380001F6052D3877390002F302FA
+:101C5000000E20320044E6011C74B33A6802E00131
+:101C60001C74F0052D38E0011C70F3067218F306A1
+:101C70007330F30576488796FFFC8296FFF80214CE
+:101C80000000013C0000000000019293FFFC029064
+:101C90000008F70676489713FFFCF70672189713AB
+:101CA000FFFC07880008E00014F49793FFFCF70698
+:101CB00076489713FFFCF70672A49713FFFC07887A
+:101CC0000008E00014F49793FFFCF706764897139A
+:101CD000FFFCF70673309713FFFC07880008E0004D
+:101CE00014F49793FFFCF70676489713FFFCF7066A
+:101CF00073BC9713FFFC07880008E00014F4979367
+:101D0000FFFCF70676489713FFFCF7067448971315
+:101D1000FFFC07880008E00014F49793FFFCF70627
+:101D200076489713FFFCF70674D49713FFFC0788D7
+:101D30000008E00014F49793FFFCF7067648971329
+:101D4000FFFCF70675609713FFFC07880008E000AA
+:101D500014F49793FFFC8796FFFC8296FFF8021419
+:101D60000000013C0000000000019293FFFC029083
+:101D70000008F68676689693FFFCF68677049693BD
+:101D8000FFFC07880008E00015489793FFFCF686E3
+:101D90001DD49693FFFC9013FFFCF686766896930D
+:101DA000FFFC07880008E000161C9793FFFCF70271
+:101DB0000022F70576F4F70576F8F00576FCF005D5
+:101DC00077008796FFFC8296FFF802140000013C22
+:101DD0000000000000019293FFFC02900008F7044D
+:101DE00076F400000001203A0022E6011E01000006
+:101DF00000019713FFFC07880008E0001584979303
+:101E0000FFFC8796FFFC8296FFF802140000013C5D
+:101E10000000000000019293FFFC02900008F7060A
+:101E200077049713FFFCF70676689713FFFC078883
+:101E30000008E00014F49793FFFC8796FFFC82965D
+:101E4000FFF802140000013C000000000001000047
+:101E500000009293FFFC02900008F686781096939B
+:101E6000FFFCF68678A49693FFFC07880008E00044
+:101E700015489793FFFCF6861FBC9693FFFCF682ED
+:101E800000149693FFFCF68678109693FFFC078863
+:101E90000008E000161C9793FFFCF005789C900268
+:101EA000FF34F7027FFFF70578A09702FF3087968F
+:101EB000FFFC8296FFF802140000013C00000000C5
+:101EC00000019293FFFC02900008F604789C8716AC
+:101ED000000084960008F5867710873A0008F68699
+:101EE000218C7539000477390002A73A6802203244
+:101EF0000000C6A8580084160004C63075809436C9
+:101F00000004B4AA580287360008F605789C073802
+:101F10000001E6011F2D973600088702FF30000000
+:101F20000001C03A4A00EE011F3500000001F485AF
+:101F300078A09482FF308796FFFC8296FFF8021407
+:101F4000000C013C0000000000019293FFFC029095
+:101F500000088596000000000001872E0008F68624
+:101F6000218C77390002A73A6802F604789CC704EE
+:101F7000760086AE0008C6307400F7067710F605C6
+:101F8000789C76B50004C6B470008736000820320D
+:101F9000000007380001E6011FA897360008F70285
+:101FA0007FFFF70578A09702FF308796FFFC8296A7
+:101FB000FFF802140004013C0000000000019293AD
+:101FC000FFFC0290000822100008F704789C000033
+:101FD0000001203A0000E60120D1F6027FFF9616AC
+:101FE000FFF4F6842D40F606771026B4000177350D
+:101FF0000004C4B86000C338000074350002F6065F
+:102000007710C0266200EC0120C1F606218CF38413
+:10201000789CA722600200000001C01E7400E60147
+:1020200020B10000000186A60000F70478A000009F
+:102030000001C6B4720020360000EE01209896A67A
+:102040000000F7042D38F6067710C5186000F686F4
+:102050002C28862A000405B80001F5852D3877392B
+:102060000002202E0044E6012070B63A6802F00516
+:102070002D38862A000800000001962A000CF6067A
+:10208000218CA722600200000001C7047600C71C53
+:102090007400E00120B0F705789C8616FFF400007C
+:1020A0000001C0366200EC0120B0000000019696ED
+:1020B000FFF424A4001023180010E0011FFC2420CA
+:1020C00000048616FFF400000001F60578A09602D1
+:1020D000FF308796FFFC8296FFF802140000013C57
+:1020E0000000000000019293FFFC02900008871698
+:1020F000000000000001873A0008F6867710773963
+:102100000004C738680086BA000C873A000800004F
+:102110000001C0367200440C00018796FFFC8296D5
+:10212000FFF802140004013C00000000000192933B
+:10213000FFFC02900008F702000F203A0000EC01BB
+:10214000215DF68677189036000027380001C60416
+:102150000000C03A6200E601214406B40010F60611
+:1021600078A49613FFFCF60678109613FFFC0788F8
+:102170000008E00014F49793FFFC8796FFFC82961A
+:10218000FFF802140000013C000000000001000004
+:102190000001000000020000000400000008000030
+:1021A000001000000020000000400000008000003F
+:1021B0000100000002000000040000000800000010
+:1021C000100000002000000040000000800000001F
+:1021D00000009293FFFC02900008F70678B0971376
+:1021E000FFFCF70679CC9713FFFC07880008E00096
+:1021F00015489793FFFCF706222C9713FFFCF70274
+:1022000000159713FFFCF70678B09713FFFC0788BB
+:102210000008E000161C9793FFFC8796FFFC82964F
+:10222000FFF802140000013C00000000000192933E
+:10223000FFFC02900008F6846F440000000187361E
+:10224000000000000001203A0002E6012270F602C0
+:10225000000087360EF486B60EF800000001C03A82
+:102260006A00470C0001203A0000E6012278203283
+:102270000000F602000120320000E6012294000076
+:102280000001F70432E800000001203A0000E601F6
+:1022900022B1F58203E80F814000F70479C80000FD
+:1022A000000107380001F70579C8F70479C8F582FD
+:1022B00003E89593FFFCF58200159593FFFCF586E6
+:1022C00079CC9593FFFC07880008E0011EC0979326
+:1022D000FFFC8796FFFC8296FFF802140000013C89
+:1022E0000000000000019293FFFC02900008F70636
+:1022F00079CC9713FFFCF70678B09713FFFC07889B
+:102300000008E00014F49793FFFCF70679CC9713CC
+:10231000FFFCF706793C9713FFFC07880008E000F4
+:1023200014F49793FFFC8796FFFC8296FFF8021443
+:102330000000013C000000000001C13C0000021050
+:1023400000049293FFFC029000082210000C859676
+:1023500000000000000186AE0004000000012036ED
+:102360000000E60123842714000C872E00040000DF
+:10237000000107380001972E0004872E0004E001B9
+:1023800024349696FFF49713FFFC85160004000092
+:1023900000019513FFFC9593FFFC9596FFEC0788D1
+:1023A0000008E00125689793FFFC8596FFEC20224A
+:1023B0000000E60124340000000186AE0004861609
+:1023C000FFF400000001C0366200EE0124217735E1
+:1023D0000001C738680077390002C6B85800773165
+:1023E0000001C738600077390002C73858008536C9
+:1023F0000000000000019536000C85360004000046
+:102400000001953600108536000800000001953661
+:10241000001426B4000CC0367200EE0123EC00005C
+:102420000001872E00040000000107380001972EEC
+:102430000004872E00048696FFF485160004773585
+:102440000001C738680077390002C72C7000852A60
+:10245000000000000001953A000C85160004000001
+:102460000001852A000400000001953A001085163D
+:102470000008F4020001953A001496AE0008879611
+:10248000FFFC8296FFF80214000C013C00000000E3
+:1024900000019293FFFC029000082210000C859628
+:1024A000000000000001842E000400000001202232
+:1024B0000000E60125552714000C9713FFFC851634
+:1024C0000004000000019513FFFC9593FFFC959616
+:1024D000FFEC07880008E00125689793FFFC8596CC
+:1024E000FFEC20220000E6012555000000018616C1
+:1024F000FFF40000000120320000EE012545773195
+:102500000001C6AC0000C738600077390002C73848
+:10251000580085360018000000019536000C8536FD
+:10252000001C0000000195360010853600200000D8
+:1025300000019536001406B4000CC0367200EC01A0
+:10254000251100000001872E0004F4020001273845
+:102550000001972E00048796FFFC8296FFF8021474
+:102560000008013C0000000000019293FFFC029073
+:102570000008221000088396000483160000C5009E
+:102580000000841A0004C4A800009416FFF4C026BA
+:102590004200E60126D1000000018316FFF400008E
+:1025A0000001C02A3200E60126D1C7204A00951654
+:1025B000FFF476B8FFE1C73868007739FFFFC5241C
+:1025C000700077290001C738500077390002831660
+:1025D0000000869E0000C5B8300005AC000C872EB8
+:1025E0000000C6000000C0367200E601261020324E
+:1025F0000000869E0004872E000400000001C03603
+:102600007200E601261020320000F602000120329E
+:102610000000E601262500000001C7000000E001DF
+:102620002678203A0000869E0000872E00000000D9
+:102630000001C0367200E201265C00000001E601E4
+:10264000266420320000869E0004872E00040000CD
+:102650000001C0367200E201266520320000F60259
+:102660000001203200004704FFFFE6012679203AEE
+:102670000000F7020001203A0000E60126B1203AEE
+:102680000000EE0126A0203A00014304FFFFC03AFB
+:102690003200E60126C9C0264200E0012590000074
+:1026A0000001E60126C1C0264200E001259000009D
+:1026B000000183160008F4020001E00126E0951AEB
+:1026C0000000E001258CC4A80000E001258CC4288E
+:1026D00000008316000800000001941A0000C400E6
+:1026E00000008796FFFC8296FFF80214000C013C64
+:1026F000000000000001000000009293FFFC029027
+:102700000008859600048416000084960008F702ED
+:102710000003C6A04D80C6B67400E6012771C6202E
+:10272000000020360002E60127A0C5204800C7208F
+:10273000480027380002C0227200E201279CC538F9
+:102740000000872E000076AD001E76B4FFE5C73886
+:102750006FC07738FFF0F733280006300002C03230
+:102760005200E201274105AC0002E00127A0C5208C
+:102770004800C720480027380004C0227200E20148
+:1027800027A0C520480083AD00040000000193B1DC
+:102790000004C0327200E201278500000001C5205C
+:1027A0004800C0325200E40127D50000000186AE87
+:1027B0000000772D001E7738FFE5C6B477C076B5E8
+:1027C000FFE8F6B3680006300001C0325200E401B1
+:1027D00027AC05AC00018796FFFC8296FFF8021437
+:1027E000000C013C0000000000019293FFFC0290ED
+:1027F0000008841600008696000400000001C7222D
+:102800006D80E601281020360000E0012874C438ED
+:102810000000F7020001EE012841F602000076B543
+:10282000000120360000EE01281C77390001E0018C
+:10283000284420220000742100017738FFFF063071
+:10284000000120220000EE012834203A0000E601B9
+:10285000287100000001C0226A00E4012864000021
+:102860000001C4206A00773AFFFFE601285476B4DD
+:10287000FFFFD42007628796FFFC8296FFF80214C0
+:102880000008013C0000000000019293FFFC029050
+:10289000000822100004E00128CCF70629DC86BAE3
+:1028A00000000000000120360000E60128C90000F9
+:1028B00000019716FFF407880008C13400009793C1
+:1028C000FFFC8716FFF40000000127380004F6061D
+:1028D00029E0C03A6200E401289D000000018796CB
+:1028E000FFFC8296FFF802140000013C000000008B
+:1028F00000019293FFFC0290000822100004E00106
+:102900002934F706299886BA000000000001203615
+:102910000000E6012931000000019716FFF4078846
+:102920000008C13400009793FFFC8716FFF40000F5
+:10293000000107380004F60629E0C03A6200E4010D
+:102940002904000000018796FFFC8296FFF802141C
+:102950000000013C0000000000019293FFFC029087
+:102960000008F7047B5000000001203A0000E60157
+:102970002984F6820001F6857B5007880008E00173
+:1029800028F09793FFFC8796FFFC8296FFF80214CD
+:102990000000013C00000000000100000B4C0000A2
+:1029A0000000000042880000000000005E500000AF
+:1029B00000000000C7A80000000000010BD00000CC
+:1029C000000000011C880000000000011E1400002F
+:1029D00000000001212C00000000000122E40000A2
+:0229E0000000F5
+:00000001FF
+/* This is the Myrinet MCP code for LANai4.x */
+/* Generated by  cat $MYRI_HOME/lib/lanai/mcp4.dat > myri_code4.h */
index 86b203f..9f7270f 100644 (file)
@@ -175,9 +175,34 @@ source "fs/qnx4/Kconfig"
 source "fs/romfs/Kconfig"
 source "fs/sysv/Kconfig"
 source "fs/ufs/Kconfig"
-
 source "fs/exofs/Kconfig"
 
+config NILFS2_FS
+       tristate "NILFS2 file system support (EXPERIMENTAL)"
+       depends on BLOCK && EXPERIMENTAL
+       select CRC32
+       help
+         NILFS2 is a log-structured file system (LFS) supporting continuous
+         snapshotting.  In addition to versioning capability of the entire
+         file system, users can even restore files mistakenly overwritten or
+         destroyed just a few seconds ago.  Since this file system can keep
+         consistency like conventional LFS, it achieves quick recovery after
+         system crashes.
+
+         NILFS2 creates a number of checkpoints every few seconds or per
+         synchronous write basis (unless there is no change).  Users can
+         select significant versions among continuously created checkpoints,
+         and can change them into snapshots which will be preserved for long
+         periods until they are changed back to checkpoints.  Each
+         snapshot is mountable as a read-only file system concurrently with
+         its writable mount, and this feature is convenient for online backup.
+
+         Some features including atime, extended attributes, and POSIX ACLs,
+         are not supported yet.
+
+         To compile this file system support as a module, choose M here: the
+         module will be called nilfs2.  If unsure, say N.
+
 endif # MISC_FILESYSTEMS
 
 menuconfig NETWORK_FILESYSTEMS
index 70b2aed..af6d047 100644 (file)
@@ -114,6 +114,7 @@ obj-$(CONFIG_JFS_FS)                += jfs/
 obj-$(CONFIG_XFS_FS)           += xfs/
 obj-$(CONFIG_9P_FS)            += 9p/
 obj-$(CONFIG_AFS_FS)           += afs/
+obj-$(CONFIG_NILFS2_FS)                += nilfs2/
 obj-$(CONFIG_BEFS_FS)          += befs/
 obj-$(CONFIG_HOSTFS)           += hostfs/
 obj-$(CONFIG_HPPFS)            += hppfs/
index 49f1894..7ad3650 100644 (file)
@@ -20,8 +20,7 @@ int afs_get_MAC_address(u8 *mac, size_t maclen)
        struct net_device *dev;
        int ret = -ENODEV;
 
-       if (maclen != ETH_ALEN)
-               BUG();
+       BUG_ON(maclen != ETH_ALEN);
 
        rtnl_lock();
        dev = __dev_getfirstbyhwtype(&init_net, ARPHRD_ETHER);
index 41f2b4d..ca40f82 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/fs.h>
+#include <asm/page.h> /* for PAGE_SIZE */
 
 #include "befs.h"
 #include "super.h"
index 6e35762..13edf7a 100644 (file)
@@ -1596,6 +1596,16 @@ EXPORT_SYMBOL(unmap_underlying_metadata);
  * locked buffer.   This only can happen if someone has written the buffer
  * directly, with submit_bh().  At the address_space level PageWriteback
  * prevents this contention from occurring.
+ *
+ * If block_write_full_page() is called with wbc->sync_mode ==
+ * WB_SYNC_ALL, the writes are posted using WRITE_SYNC_PLUG; this
+ * causes the writes to be flagged as synchronous writes, but the
+ * block device queue will NOT be unplugged, since usually many pages
+ * will be pushed to the out before the higher-level caller actually
+ * waits for the writes to be completed.  The various wait functions,
+ * such as wait_on_writeback_range() will ultimately call sync_page()
+ * which will ultimately call blk_run_backing_dev(), which will end up
+ * unplugging the device queue.
  */
 static int __block_write_full_page(struct inode *inode, struct page *page,
                        get_block_t *get_block, struct writeback_control *wbc)
@@ -1606,7 +1616,8 @@ static int __block_write_full_page(struct inode *inode, struct page *page,
        struct buffer_head *bh, *head;
        const unsigned blocksize = 1 << inode->i_blkbits;
        int nr_underway = 0;
-       int write_op = (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE);
+       int write_op = (wbc->sync_mode == WB_SYNC_ALL ?
+                       WRITE_SYNC_PLUG : WRITE);
 
        BUG_ON(!PageLocked(page));
 
index 8e0cfe4..fb3c1a2 100644 (file)
@@ -28,6 +28,25 @@ config EXT3_FS
          To compile this file system support as a module, choose M here: the
          module will be called ext3.
 
+config EXT3_DEFAULTS_TO_ORDERED
+       bool "Default to 'data=ordered' in ext3 (legacy option)"
+       depends on EXT3_FS
+       help
+         If a filesystem does not explicitly specify a data ordering
+         mode, and the journal capability allowed it, ext3 used to
+         historically default to 'data=ordered'.
+
+         That was a rather unfortunate choice, because it leads to all
+         kinds of latency problems, and the 'data=writeback' mode is more
+         appropriate these days.
+
+         You should probably always answer 'n' here, and if you really
+         want to use 'data=ordered' mode, set it in the filesystem itself
+         with 'tune2fs -o journal_data_ordered'.
+
+         But if you really want to enable the legacy default, you can do
+         so by answering 'y' to this question.
+
 config EXT3_FS_XATTR
        bool "Ext3 extended attributes"
        depends on EXT3_FS
index 466a332..fcfa243 100644 (file)
@@ -1521,12 +1521,16 @@ static int ext3_ordered_writepage(struct page *page,
        if (!page_has_buffers(page)) {
                create_empty_buffers(page, inode->i_sb->s_blocksize,
                                (1 << BH_Dirty)|(1 << BH_Uptodate));
-       } else if (!walk_page_buffers(NULL, page_buffers(page), 0, PAGE_CACHE_SIZE, NULL, buffer_unmapped)) {
-               /* Provide NULL instead of get_block so that we catch bugs if buffers weren't really mapped */
-               return block_write_full_page(page, NULL, wbc);
+               page_bufs = page_buffers(page);
+       } else {
+               page_bufs = page_buffers(page);
+               if (!walk_page_buffers(NULL, page_bufs, 0, PAGE_CACHE_SIZE,
+                                      NULL, buffer_unmapped)) {
+                       /* Provide NULL get_block() to catch bugs if buffers
+                        * weren't really mapped */
+                       return block_write_full_page(page, NULL, wbc);
+               }
        }
-       page_bufs = page_buffers(page);
-
        handle = ext3_journal_start(inode, ext3_writepage_trans_blocks(inode));
 
        if (IS_ERR(handle)) {
@@ -1581,6 +1585,15 @@ static int ext3_writeback_writepage(struct page *page,
        if (ext3_journal_current_handle())
                goto out_fail;
 
+       if (page_has_buffers(page)) {
+               if (!walk_page_buffers(NULL, page_buffers(page), 0,
+                                     PAGE_CACHE_SIZE, NULL, buffer_unmapped)) {
+                       /* Provide NULL get_block() to catch bugs if buffers
+                        * weren't really mapped */
+                       return block_write_full_page(page, NULL, wbc);
+               }
+       }
+
        handle = ext3_journal_start(inode, ext3_writepage_trans_blocks(inode));
        if (IS_ERR(handle)) {
                ret = PTR_ERR(handle);
index 9e5b8e3..599dbfe 100644 (file)
 #include "acl.h"
 #include "namei.h"
 
+#ifdef CONFIG_EXT3_DEFAULTS_TO_ORDERED
+  #define EXT3_MOUNT_DEFAULT_DATA_MODE EXT3_MOUNT_ORDERED_DATA
+#else
+  #define EXT3_MOUNT_DEFAULT_DATA_MODE EXT3_MOUNT_WRITEBACK_DATA
+#endif
+
 static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
                             unsigned long journal_devnum);
 static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
@@ -1919,7 +1925,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
                    cope, else JOURNAL_DATA */
                if (journal_check_available_features
                    (sbi->s_journal, 0, 0, JFS_FEATURE_INCOMPAT_REVOKE))
-                       set_opt(sbi->s_mount_opt, ORDERED_DATA);
+                       set_opt(sbi->s_mount_opt, DEFAULT_DATA_MODE);
                else
                        set_opt(sbi->s_mount_opt, JOURNAL_DATA);
                break;
index ac77d8b..6132353 100644 (file)
@@ -342,7 +342,7 @@ static int ext4_valid_extent_idx(struct inode *inode,
        ext4_fsblk_t block = idx_pblock(ext_idx);
        struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
        if (unlikely(block < le32_to_cpu(es->s_first_data_block) ||
-                       (block > ext4_blocks_count(es))))
+                       (block >= ext4_blocks_count(es))))
                return 0;
        else
                return 1;
index a2e7952..c6bd6ce 100644 (file)
@@ -372,16 +372,16 @@ static int ext4_block_to_path(struct inode *inode,
 }
 
 static int __ext4_check_blockref(const char *function, struct inode *inode,
-                                unsigned int *p, unsigned int max) {
+                                __le32 *p, unsigned int max) {
 
        unsigned int maxblocks = ext4_blocks_count(EXT4_SB(inode->i_sb)->s_es);
-       unsigned int *bref = p;
+       __le32 *bref = p;
        while (bref < p+max) {
-               if (unlikely(*bref >= maxblocks)) {
+               if (unlikely(le32_to_cpu(*bref) >= maxblocks)) {
                        ext4_error(inode->i_sb, function,
                                   "block reference %u >= max (%u) "
                                   "in inode #%lu, offset=%d",
-                                  *bref, maxblocks,
+                                  le32_to_cpu(*bref), maxblocks,
                                   inode->i_ino, (int)(bref-p));
                        return -EIO;
                }
index 9987bba..2958f4e 100644 (file)
@@ -2508,6 +2508,15 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
        if (EXT4_BLOCKS_PER_GROUP(sb) == 0)
                goto cantfind_ext4;
 
+       /* check blocks count against device size */
+       blocks_count = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits;
+       if (blocks_count && ext4_blocks_count(es) > blocks_count) {
+               printk(KERN_WARNING "EXT4-fs: bad geometry: block count %llu "
+                      "exceeds size of device (%llu blocks)\n",
+                      ext4_blocks_count(es), blocks_count);
+               goto failed_mount;
+       }
+
         /*
          * It makes no sense for the first data block to be beyond the end
          * of the filesystem.
index 77ccf8c..043740d 100644 (file)
@@ -38,12 +38,12 @@ static int jffs2_acl_count(size_t size)
        size_t s;
 
        size -= sizeof(struct jffs2_acl_header);
-       s = size - 4 * sizeof(struct jffs2_acl_entry_short);
-       if (s < 0) {
+       if (size < 4 * sizeof(struct jffs2_acl_entry_short)) {
                if (size % sizeof(struct jffs2_acl_entry_short))
                        return -1;
                return size / sizeof(struct jffs2_acl_entry_short);
        } else {
+               s = size - 4 * sizeof(struct jffs2_acl_entry_short);
                if (s % sizeof(struct jffs2_acl_entry))
                        return -1;
                return s / sizeof(struct jffs2_acl_entry) + 4;
index f921125..9eff2bd 100644 (file)
@@ -284,10 +284,9 @@ void jffs2_free_inode_cache(struct jffs2_inode_cache *x)
 struct jffs2_xattr_datum *jffs2_alloc_xattr_datum(void)
 {
        struct jffs2_xattr_datum *xd;
-       xd = kmem_cache_alloc(xattr_datum_cache, GFP_KERNEL);
+       xd = kmem_cache_zalloc(xattr_datum_cache, GFP_KERNEL);
        dbg_memalloc("%p\n", xd);
 
-       memset(xd, 0, sizeof(struct jffs2_xattr_datum));
        xd->class = RAWNODE_CLASS_XATTR_DATUM;
        xd->node = (void *)xd;
        INIT_LIST_HEAD(&xd->xindex);
@@ -303,10 +302,9 @@ void jffs2_free_xattr_datum(struct jffs2_xattr_datum *xd)
 struct jffs2_xattr_ref *jffs2_alloc_xattr_ref(void)
 {
        struct jffs2_xattr_ref *ref;
-       ref = kmem_cache_alloc(xattr_ref_cache, GFP_KERNEL);
+       ref = kmem_cache_zalloc(xattr_ref_cache, GFP_KERNEL);
        dbg_memalloc("%p\n", ref);
 
-       memset(ref, 0, sizeof(struct jffs2_xattr_ref));
        ref->class = RAWNODE_CLASS_XATTR_REF;
        ref->node = (void *)ref;
        return ref;
index 3523b89..5a97bcf 100644 (file)
@@ -516,8 +516,6 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
                goto out_unlock;
 
        ret = nfs_updatepage(filp, page, 0, pagelen);
-       if (ret == 0)
-               ret = pagelen;
 out_unlock:
        unlock_page(page);
        if (ret)
index 82eaadb..6717200 100644 (file)
@@ -1228,7 +1228,6 @@ static int nfs_parse_mount_options(char *raw,
                                goto out_nomem;
                        token = match_token(string,
                                            nfs_xprt_protocol_tokens, args);
-                       kfree(string);
 
                        switch (token) {
                        case Opt_xprt_udp:
@@ -1258,6 +1257,7 @@ static int nfs_parse_mount_options(char *raw,
                                goto out_nomem;
                        token = match_token(string,
                                            nfs_xprt_protocol_tokens, args);
+                       kfree(string);
 
                        switch (token) {
                        case Opt_xprt_udp:
diff --git a/fs/nilfs2/Makefile b/fs/nilfs2/Makefile
new file mode 100644 (file)
index 0000000..df3e62c
--- /dev/null
@@ -0,0 +1,5 @@
+obj-$(CONFIG_NILFS2_FS) += nilfs2.o
+nilfs2-y := inode.o file.o dir.o super.o namei.o page.o mdt.o \
+       btnode.o bmap.o btree.o direct.o dat.o recovery.o \
+       the_nilfs.o segbuf.o segment.o cpfile.o sufile.o \
+       ifile.o alloc.o gcinode.o ioctl.o gcdat.o
diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c
new file mode 100644 (file)
index 0000000..d69e6ae
--- /dev/null
@@ -0,0 +1,504 @@
+/*
+ * alloc.c - NILFS dat/inode allocator
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Original code was written by Koji Sato <koji@osrg.net>.
+ * Two allocators were unified by Ryusuke Konishi <ryusuke@osrg.net>,
+ *                                Amagai Yoshiji <amagai@osrg.net>.
+ */
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/fs.h>
+#include <linux/bitops.h>
+#include "mdt.h"
+#include "alloc.h"
+
+
+static inline unsigned long
+nilfs_palloc_groups_per_desc_block(const struct inode *inode)
+{
+       return (1UL << inode->i_blkbits) /
+               sizeof(struct nilfs_palloc_group_desc);
+}
+
+static inline unsigned long
+nilfs_palloc_groups_count(const struct inode *inode)
+{
+       return 1UL << (BITS_PER_LONG - (inode->i_blkbits + 3 /* log2(8) */));
+}
+
+int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned entry_size)
+{
+       struct nilfs_mdt_info *mi = NILFS_MDT(inode);
+
+       mi->mi_bgl = kmalloc(sizeof(*mi->mi_bgl), GFP_NOFS);
+       if (!mi->mi_bgl)
+               return -ENOMEM;
+
+       bgl_lock_init(mi->mi_bgl);
+
+       nilfs_mdt_set_entry_size(inode, entry_size, 0);
+
+       mi->mi_blocks_per_group =
+               DIV_ROUND_UP(nilfs_palloc_entries_per_group(inode),
+                            mi->mi_entries_per_block) + 1;
+               /* Number of blocks in a group including entry blocks and
+                  a bitmap block */
+       mi->mi_blocks_per_desc_block =
+               nilfs_palloc_groups_per_desc_block(inode) *
+               mi->mi_blocks_per_group + 1;
+               /* Number of blocks per descriptor including the
+                  descriptor block */
+       return 0;
+}
+
+static unsigned long nilfs_palloc_group(const struct inode *inode, __u64 nr,
+                                       unsigned long *offset)
+{
+       __u64 group = nr;
+
+       *offset = do_div(group, nilfs_palloc_entries_per_group(inode));
+       return group;
+}
+
+static unsigned long
+nilfs_palloc_desc_blkoff(const struct inode *inode, unsigned long group)
+{
+       unsigned long desc_block =
+               group / nilfs_palloc_groups_per_desc_block(inode);
+       return desc_block * NILFS_MDT(inode)->mi_blocks_per_desc_block;
+}
+
+static unsigned long
+nilfs_palloc_bitmap_blkoff(const struct inode *inode, unsigned long group)
+{
+       unsigned long desc_offset =
+               group % nilfs_palloc_groups_per_desc_block(inode);
+       return nilfs_palloc_desc_blkoff(inode, group) + 1 +
+               desc_offset * NILFS_MDT(inode)->mi_blocks_per_group;
+}
+
+static unsigned long
+nilfs_palloc_group_desc_nfrees(struct inode *inode, unsigned long group,
+                              const struct nilfs_palloc_group_desc *desc)
+{
+       unsigned long nfree;
+
+       spin_lock(nilfs_mdt_bgl_lock(inode, group));
+       nfree = le32_to_cpu(desc->pg_nfrees);
+       spin_unlock(nilfs_mdt_bgl_lock(inode, group));
+       return nfree;
+}
+
+static void
+nilfs_palloc_group_desc_add_entries(struct inode *inode,
+                                   unsigned long group,
+                                   struct nilfs_palloc_group_desc *desc,
+                                   u32 n)
+{
+       spin_lock(nilfs_mdt_bgl_lock(inode, group));
+       le32_add_cpu(&desc->pg_nfrees, n);
+       spin_unlock(nilfs_mdt_bgl_lock(inode, group));
+}
+
+static unsigned long
+nilfs_palloc_entry_blkoff(const struct inode *inode, __u64 nr)
+{
+       unsigned long group, group_offset;
+
+       group = nilfs_palloc_group(inode, nr, &group_offset);
+
+       return nilfs_palloc_bitmap_blkoff(inode, group) + 1 +
+               group_offset / NILFS_MDT(inode)->mi_entries_per_block;
+}
+
+static void nilfs_palloc_desc_block_init(struct inode *inode,
+                                        struct buffer_head *bh, void *kaddr)
+{
+       struct nilfs_palloc_group_desc *desc = kaddr + bh_offset(bh);
+       unsigned long n = nilfs_palloc_groups_per_desc_block(inode);
+       __le32 nfrees;
+
+       nfrees = cpu_to_le32(nilfs_palloc_entries_per_group(inode));
+       while (n-- > 0) {
+               desc->pg_nfrees = nfrees;
+               desc++;
+       }
+}
+
+static int nilfs_palloc_get_desc_block(struct inode *inode,
+                                      unsigned long group,
+                                      int create, struct buffer_head **bhp)
+{
+       return nilfs_mdt_get_block(inode,
+                                  nilfs_palloc_desc_blkoff(inode, group),
+                                  create, nilfs_palloc_desc_block_init, bhp);
+}
+
+static int nilfs_palloc_get_bitmap_block(struct inode *inode,
+                                        unsigned long group,
+                                        int create, struct buffer_head **bhp)
+{
+       return nilfs_mdt_get_block(inode,
+                                  nilfs_palloc_bitmap_blkoff(inode, group),
+                                  create, NULL, bhp);
+}
+
+int nilfs_palloc_get_entry_block(struct inode *inode, __u64 nr,
+                                int create, struct buffer_head **bhp)
+{
+       return nilfs_mdt_get_block(inode, nilfs_palloc_entry_blkoff(inode, nr),
+                                  create, NULL, bhp);
+}
+
+static struct nilfs_palloc_group_desc *
+nilfs_palloc_block_get_group_desc(const struct inode *inode,
+                                 unsigned long group,
+                                 const struct buffer_head *bh, void *kaddr)
+{
+       return (struct nilfs_palloc_group_desc *)(kaddr + bh_offset(bh)) +
+               group % nilfs_palloc_groups_per_desc_block(inode);
+}
+
+static unsigned char *
+nilfs_palloc_block_get_bitmap(const struct inode *inode,
+                             const struct buffer_head *bh, void *kaddr)
+{
+       return (unsigned char *)(kaddr + bh_offset(bh));
+}
+
+void *nilfs_palloc_block_get_entry(const struct inode *inode, __u64 nr,
+                                  const struct buffer_head *bh, void *kaddr)
+{
+       unsigned long entry_offset, group_offset;
+
+       nilfs_palloc_group(inode, nr, &group_offset);
+       entry_offset = group_offset % NILFS_MDT(inode)->mi_entries_per_block;
+
+       return kaddr + bh_offset(bh) +
+               entry_offset * NILFS_MDT(inode)->mi_entry_size;
+}
+
+static int nilfs_palloc_find_available_slot(struct inode *inode,
+                                           unsigned long group,
+                                           unsigned long target,
+                                           unsigned char *bitmap,
+                                           int bsize)  /* size in bits */
+{
+       int curr, pos, end, i;
+
+       if (target > 0) {
+               end = (target + BITS_PER_LONG - 1) & ~(BITS_PER_LONG - 1);
+               if (end > bsize)
+                       end = bsize;
+               pos = nilfs_find_next_zero_bit(bitmap, end, target);
+               if (pos < end &&
+                   !nilfs_set_bit_atomic(
+                           nilfs_mdt_bgl_lock(inode, group), pos, bitmap))
+                       return pos;
+       } else
+               end = 0;
+
+       for (i = 0, curr = end;
+            i < bsize;
+            i += BITS_PER_LONG, curr += BITS_PER_LONG) {
+               /* wrap around */
+               if (curr >= bsize)
+                       curr = 0;
+               while (*((unsigned long *)bitmap + curr / BITS_PER_LONG)
+                      != ~0UL) {
+                       end = curr + BITS_PER_LONG;
+                       if (end > bsize)
+                               end = bsize;
+                       pos = nilfs_find_next_zero_bit(bitmap, end, curr);
+                       if ((pos < end) &&
+                           !nilfs_set_bit_atomic(
+                                   nilfs_mdt_bgl_lock(inode, group), pos,
+                                   bitmap))
+                               return pos;
+               }
+       }
+       return -ENOSPC;
+}
+
+static unsigned long
+nilfs_palloc_rest_groups_in_desc_block(const struct inode *inode,
+                                      unsigned long curr, unsigned long max)
+{
+       return min_t(unsigned long,
+                    nilfs_palloc_groups_per_desc_block(inode) -
+                    curr % nilfs_palloc_groups_per_desc_block(inode),
+                    max - curr + 1);
+}
+
+int nilfs_palloc_prepare_alloc_entry(struct inode *inode,
+                                    struct nilfs_palloc_req *req)
+{
+       struct buffer_head *desc_bh, *bitmap_bh;
+       struct nilfs_palloc_group_desc *desc;
+       unsigned char *bitmap;
+       void *desc_kaddr, *bitmap_kaddr;
+       unsigned long group, maxgroup, ngroups;
+       unsigned long group_offset, maxgroup_offset;
+       unsigned long n, entries_per_group, groups_per_desc_block;
+       unsigned long i, j;
+       int pos, ret;
+
+       ngroups = nilfs_palloc_groups_count(inode);
+       maxgroup = ngroups - 1;
+       group = nilfs_palloc_group(inode, req->pr_entry_nr, &group_offset);
+       entries_per_group = nilfs_palloc_entries_per_group(inode);
+       groups_per_desc_block = nilfs_palloc_groups_per_desc_block(inode);
+
+       for (i = 0; i < ngroups; i += n) {
+               if (group >= ngroups) {
+                       /* wrap around */
+                       group = 0;
+                       maxgroup = nilfs_palloc_group(inode, req->pr_entry_nr,
+                                                     &maxgroup_offset) - 1;
+               }
+               ret = nilfs_palloc_get_desc_block(inode, group, 1, &desc_bh);
+               if (ret < 0)
+                       return ret;
+               desc_kaddr = kmap(desc_bh->b_page);
+               desc = nilfs_palloc_block_get_group_desc(
+                       inode, group, desc_bh, desc_kaddr);
+               n = nilfs_palloc_rest_groups_in_desc_block(inode, group,
+                                                          maxgroup);
+               for (j = 0; j < n; j++, desc++, group++) {
+                       if (nilfs_palloc_group_desc_nfrees(inode, group, desc)
+                           > 0) {
+                               ret = nilfs_palloc_get_bitmap_block(
+                                       inode, group, 1, &bitmap_bh);
+                               if (ret < 0)
+                                       goto out_desc;
+                               bitmap_kaddr = kmap(bitmap_bh->b_page);
+                               bitmap = nilfs_palloc_block_get_bitmap(
+                                       inode, bitmap_bh, bitmap_kaddr);
+                               pos = nilfs_palloc_find_available_slot(
+                                       inode, group, group_offset, bitmap,
+                                       entries_per_group);
+                               if (pos >= 0) {
+                                       /* found a free entry */
+                                       nilfs_palloc_group_desc_add_entries(
+                                               inode, group, desc, -1);
+                                       req->pr_entry_nr =
+                                               entries_per_group * group + pos;
+                                       kunmap(desc_bh->b_page);
+                                       kunmap(bitmap_bh->b_page);
+
+                                       req->pr_desc_bh = desc_bh;
+                                       req->pr_bitmap_bh = bitmap_bh;
+                                       return 0;
+                               }
+                               kunmap(bitmap_bh->b_page);
+                               brelse(bitmap_bh);
+                       }
+
+                       group_offset = 0;
+               }
+
+               kunmap(desc_bh->b_page);
+               brelse(desc_bh);
+       }
+
+       /* no entries left */
+       return -ENOSPC;
+
+ out_desc:
+       kunmap(desc_bh->b_page);
+       brelse(desc_bh);
+       return ret;
+}
+
+void nilfs_palloc_commit_alloc_entry(struct inode *inode,
+                                    struct nilfs_palloc_req *req)
+{
+       nilfs_mdt_mark_buffer_dirty(req->pr_bitmap_bh);
+       nilfs_mdt_mark_buffer_dirty(req->pr_desc_bh);
+       nilfs_mdt_mark_dirty(inode);
+
+       brelse(req->pr_bitmap_bh);
+       brelse(req->pr_desc_bh);
+}
+
+void nilfs_palloc_commit_free_entry(struct inode *inode,
+                                   struct nilfs_palloc_req *req)
+{
+       struct nilfs_palloc_group_desc *desc;
+       unsigned long group, group_offset;
+       unsigned char *bitmap;
+       void *desc_kaddr, *bitmap_kaddr;
+
+       group = nilfs_palloc_group(inode, req->pr_entry_nr, &group_offset);
+       desc_kaddr = kmap(req->pr_desc_bh->b_page);
+       desc = nilfs_palloc_block_get_group_desc(inode, group,
+                                                req->pr_desc_bh, desc_kaddr);
+       bitmap_kaddr = kmap(req->pr_bitmap_bh->b_page);
+       bitmap = nilfs_palloc_block_get_bitmap(inode, req->pr_bitmap_bh,
+                                              bitmap_kaddr);
+
+       if (!nilfs_clear_bit_atomic(nilfs_mdt_bgl_lock(inode, group),
+                                   group_offset, bitmap))
+               printk(KERN_WARNING "%s: entry number %llu already freed\n",
+                      __func__, (unsigned long long)req->pr_entry_nr);
+
+       nilfs_palloc_group_desc_add_entries(inode, group, desc, 1);
+
+       kunmap(req->pr_bitmap_bh->b_page);
+       kunmap(req->pr_desc_bh->b_page);
+
+       nilfs_mdt_mark_buffer_dirty(req->pr_desc_bh);
+       nilfs_mdt_mark_buffer_dirty(req->pr_bitmap_bh);
+       nilfs_mdt_mark_dirty(inode);
+
+       brelse(req->pr_bitmap_bh);
+       brelse(req->pr_desc_bh);
+}
+
+void nilfs_palloc_abort_alloc_entry(struct inode *inode,
+                                   struct nilfs_palloc_req *req)
+{
+       struct nilfs_palloc_group_desc *desc;
+       void *desc_kaddr, *bitmap_kaddr;
+       unsigned char *bitmap;
+       unsigned long group, group_offset;
+
+       group = nilfs_palloc_group(inode, req->pr_entry_nr, &group_offset);
+       desc_kaddr = kmap(req->pr_desc_bh->b_page);
+       desc = nilfs_palloc_block_get_group_desc(inode, group,
+                                                req->pr_desc_bh, desc_kaddr);
+       bitmap_kaddr = kmap(req->pr_bitmap_bh->b_page);
+       bitmap = nilfs_palloc_block_get_bitmap(inode, req->pr_bitmap_bh,
+                                              bitmap_kaddr);
+       if (!nilfs_clear_bit_atomic(nilfs_mdt_bgl_lock(inode, group),
+                                   group_offset, bitmap))
+               printk(KERN_WARNING "%s: entry numer %llu already freed\n",
+                      __func__, (unsigned long long)req->pr_entry_nr);
+
+       nilfs_palloc_group_desc_add_entries(inode, group, desc, 1);
+
+       kunmap(req->pr_bitmap_bh->b_page);
+       kunmap(req->pr_desc_bh->b_page);
+
+       brelse(req->pr_bitmap_bh);
+       brelse(req->pr_desc_bh);
+
+       req->pr_entry_nr = 0;
+       req->pr_bitmap_bh = NULL;
+       req->pr_desc_bh = NULL;
+}
+
+int nilfs_palloc_prepare_free_entry(struct inode *inode,
+                                   struct nilfs_palloc_req *req)
+{
+       struct buffer_head *desc_bh, *bitmap_bh;
+       unsigned long group, group_offset;
+       int ret;
+
+       group = nilfs_palloc_group(inode, req->pr_entry_nr, &group_offset);
+       ret = nilfs_palloc_get_desc_block(inode, group, 1, &desc_bh);
+       if (ret < 0)
+               return ret;
+       ret = nilfs_palloc_get_bitmap_block(inode, group, 1, &bitmap_bh);
+       if (ret < 0) {
+               brelse(desc_bh);
+               return ret;
+       }
+
+       req->pr_desc_bh = desc_bh;
+       req->pr_bitmap_bh = bitmap_bh;
+       return 0;
+}
+
+void nilfs_palloc_abort_free_entry(struct inode *inode,
+                                  struct nilfs_palloc_req *req)
+{
+       brelse(req->pr_bitmap_bh);
+       brelse(req->pr_desc_bh);
+
+       req->pr_entry_nr = 0;
+       req->pr_bitmap_bh = NULL;
+       req->pr_desc_bh = NULL;
+}
+
+static int
+nilfs_palloc_group_is_in(struct inode *inode, unsigned long group, __u64 nr)
+{
+       __u64 first, last;
+
+       first = group * nilfs_palloc_entries_per_group(inode);
+       last = first + nilfs_palloc_entries_per_group(inode) - 1;
+       return (nr >= first) && (nr <= last);
+}
+
+int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
+{
+       struct buffer_head *desc_bh, *bitmap_bh;
+       struct nilfs_palloc_group_desc *desc;
+       unsigned char *bitmap;
+       void *desc_kaddr, *bitmap_kaddr;
+       unsigned long group, group_offset;
+       int i, j, n, ret;
+
+       for (i = 0; i < nitems; i += n) {
+               group = nilfs_palloc_group(inode, entry_nrs[i], &group_offset);
+               ret = nilfs_palloc_get_desc_block(inode, group, 0, &desc_bh);
+               if (ret < 0)
+                       return ret;
+               ret = nilfs_palloc_get_bitmap_block(inode, group, 0,
+                                                   &bitmap_bh);
+               if (ret < 0) {
+                       brelse(desc_bh);
+                       return ret;
+               }
+               desc_kaddr = kmap(desc_bh->b_page);
+               desc = nilfs_palloc_block_get_group_desc(
+                       inode, group, desc_bh, desc_kaddr);
+               bitmap_kaddr = kmap(bitmap_bh->b_page);
+               bitmap = nilfs_palloc_block_get_bitmap(
+                       inode, bitmap_bh, bitmap_kaddr);
+               for (j = i, n = 0;
+                    (j < nitems) && nilfs_palloc_group_is_in(inode, group,
+                                                             entry_nrs[j]);
+                    j++, n++) {
+                       nilfs_palloc_group(inode, entry_nrs[j], &group_offset);
+                       if (!nilfs_clear_bit_atomic(
+                                   nilfs_mdt_bgl_lock(inode, group),
+                                   group_offset, bitmap)) {
+                               printk(KERN_WARNING
+                                      "%s: entry number %llu already freed\n",
+                                      __func__,
+                                      (unsigned long long)entry_nrs[j]);
+                       }
+               }
+               nilfs_palloc_group_desc_add_entries(inode, group, desc, n);
+
+               kunmap(bitmap_bh->b_page);
+               kunmap(desc_bh->b_page);
+
+               nilfs_mdt_mark_buffer_dirty(desc_bh);
+               nilfs_mdt_mark_buffer_dirty(bitmap_bh);
+               nilfs_mdt_mark_dirty(inode);
+
+               brelse(bitmap_bh);
+               brelse(desc_bh);
+       }
+       return 0;
+}
diff --git a/fs/nilfs2/alloc.h b/fs/nilfs2/alloc.h
new file mode 100644 (file)
index 0000000..4ace547
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * alloc.h - persistent object (dat entry/disk inode) allocator/deallocator
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Original code was written by Koji Sato <koji@osrg.net>.
+ * Two allocators were unified by Ryusuke Konishi <ryusuke@osrg.net>,
+ *                                Amagai Yoshiji <amagai@osrg.net>.
+ */
+
+#ifndef _NILFS_ALLOC_H
+#define _NILFS_ALLOC_H
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/fs.h>
+
+static inline unsigned long
+nilfs_palloc_entries_per_group(const struct inode *inode)
+{
+       return 1UL << (inode->i_blkbits + 3 /* log2(8 = CHAR_BITS) */);
+}
+
+int nilfs_palloc_init_blockgroup(struct inode *, unsigned);
+int nilfs_palloc_get_entry_block(struct inode *, __u64, int,
+                                struct buffer_head **);
+void *nilfs_palloc_block_get_entry(const struct inode *, __u64,
+                                  const struct buffer_head *, void *);
+
+/**
+ * nilfs_palloc_req - persistent alloctor request and reply
+ * @pr_entry_nr: entry number (vblocknr or inode number)
+ * @pr_desc_bh: buffer head of the buffer containing block group descriptors
+ * @pr_bitmap_bh: buffer head of the buffer containing a block group bitmap
+ * @pr_entry_bh: buffer head of the buffer containing translation entries
+ */
+struct nilfs_palloc_req {
+       __u64 pr_entry_nr;
+       struct buffer_head *pr_desc_bh;
+       struct buffer_head *pr_bitmap_bh;
+       struct buffer_head *pr_entry_bh;
+};
+
+int nilfs_palloc_prepare_alloc_entry(struct inode *,
+                                    struct nilfs_palloc_req *);
+void nilfs_palloc_commit_alloc_entry(struct inode *,
+                                    struct nilfs_palloc_req *);
+void nilfs_palloc_abort_alloc_entry(struct inode *, struct nilfs_palloc_req *);
+void nilfs_palloc_commit_free_entry(struct inode *, struct nilfs_palloc_req *);
+int nilfs_palloc_prepare_free_entry(struct inode *, struct nilfs_palloc_req *);
+void nilfs_palloc_abort_free_entry(struct inode *, struct nilfs_palloc_req *);
+int nilfs_palloc_freev(struct inode *, __u64 *, size_t);
+
+#define nilfs_set_bit_atomic           ext2_set_bit_atomic
+#define nilfs_clear_bit_atomic         ext2_clear_bit_atomic
+#define nilfs_find_next_zero_bit       ext2_find_next_zero_bit
+
+#endif /* _NILFS_ALLOC_H */
diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c
new file mode 100644 (file)
index 0000000..24638e0
--- /dev/null
@@ -0,0 +1,783 @@
+/*
+ * bmap.c - NILFS block mapping.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#include <linux/fs.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include "nilfs.h"
+#include "bmap.h"
+#include "sb.h"
+#include "btnode.h"
+#include "mdt.h"
+#include "dat.h"
+#include "alloc.h"
+
+int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level,
+                              __u64 *ptrp)
+{
+       __u64 ptr;
+       int ret;
+
+       down_read(&bmap->b_sem);
+       ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp);
+       if (ret < 0)
+               goto out;
+       if (bmap->b_pops->bpop_translate != NULL) {
+               ret = bmap->b_pops->bpop_translate(bmap, *ptrp, &ptr);
+               if (ret < 0)
+                       goto out;
+               *ptrp = ptr;
+       }
+
+ out:
+       up_read(&bmap->b_sem);
+       return ret;
+}
+
+
+/**
+ * nilfs_bmap_lookup - find a record
+ * @bmap: bmap
+ * @key: key
+ * @recp: pointer to record
+ *
+ * Description: nilfs_bmap_lookup() finds a record whose key matches @key in
+ * @bmap.
+ *
+ * Return Value: On success, 0 is returned and the record associated with @key
+ * is stored in the place pointed by @recp. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - A record associated with @key does not exist.
+ */
+int nilfs_bmap_lookup(struct nilfs_bmap *bmap,
+                     unsigned long key,
+                     unsigned long *recp)
+{
+       __u64 ptr;
+       int ret;
+
+       /* XXX: use macro for level 1 */
+       ret = nilfs_bmap_lookup_at_level(bmap, key, 1, &ptr);
+       if (recp != NULL)
+               *recp = ptr;
+       return ret;
+}
+
+static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
+{
+       __u64 keys[NILFS_BMAP_SMALL_HIGH + 1];
+       __u64 ptrs[NILFS_BMAP_SMALL_HIGH + 1];
+       int ret, n;
+
+       if (bmap->b_ops->bop_check_insert != NULL) {
+               ret = bmap->b_ops->bop_check_insert(bmap, key);
+               if (ret > 0) {
+                       n = bmap->b_ops->bop_gather_data(
+                               bmap, keys, ptrs, NILFS_BMAP_SMALL_HIGH + 1);
+                       if (n < 0)
+                               return n;
+                       ret = nilfs_btree_convert_and_insert(
+                               bmap, key, ptr, keys, ptrs, n,
+                               NILFS_BMAP_LARGE_LOW, NILFS_BMAP_LARGE_HIGH);
+                       if (ret == 0)
+                               bmap->b_u.u_flags |= NILFS_BMAP_LARGE;
+
+                       return ret;
+               } else if (ret < 0)
+                       return ret;
+       }
+
+       return bmap->b_ops->bop_insert(bmap, key, ptr);
+}
+
+/**
+ * nilfs_bmap_insert - insert a new key-record pair into a bmap
+ * @bmap: bmap
+ * @key: key
+ * @rec: record
+ *
+ * Description: nilfs_bmap_insert() inserts the new key-record pair specified
+ * by @key and @rec into @bmap.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-EEXIST - A record associated with @key already exist.
+ */
+int nilfs_bmap_insert(struct nilfs_bmap *bmap,
+                     unsigned long key,
+                     unsigned long rec)
+{
+       int ret;
+
+       down_write(&bmap->b_sem);
+       ret = nilfs_bmap_do_insert(bmap, key, rec);
+       up_write(&bmap->b_sem);
+       return ret;
+}
+
+static int nilfs_bmap_do_delete(struct nilfs_bmap *bmap, __u64 key)
+{
+       __u64 keys[NILFS_BMAP_LARGE_LOW + 1];
+       __u64 ptrs[NILFS_BMAP_LARGE_LOW + 1];
+       int ret, n;
+
+       if (bmap->b_ops->bop_check_delete != NULL) {
+               ret = bmap->b_ops->bop_check_delete(bmap, key);
+               if (ret > 0) {
+                       n = bmap->b_ops->bop_gather_data(
+                               bmap, keys, ptrs, NILFS_BMAP_LARGE_LOW + 1);
+                       if (n < 0)
+                               return n;
+                       ret = nilfs_direct_delete_and_convert(
+                               bmap, key, keys, ptrs, n,
+                               NILFS_BMAP_SMALL_LOW, NILFS_BMAP_SMALL_HIGH);
+                       if (ret == 0)
+                               bmap->b_u.u_flags &= ~NILFS_BMAP_LARGE;
+
+                       return ret;
+               } else if (ret < 0)
+                       return ret;
+       }
+
+       return bmap->b_ops->bop_delete(bmap, key);
+}
+
+int nilfs_bmap_last_key(struct nilfs_bmap *bmap, unsigned long *key)
+{
+       __u64 lastkey;
+       int ret;
+
+       down_read(&bmap->b_sem);
+       ret = bmap->b_ops->bop_last_key(bmap, &lastkey);
+       if (!ret)
+               *key = lastkey;
+       up_read(&bmap->b_sem);
+       return ret;
+}
+
+/**
+ * nilfs_bmap_delete - delete a key-record pair from a bmap
+ * @bmap: bmap
+ * @key: key
+ *
+ * Description: nilfs_bmap_delete() deletes the key-record pair specified by
+ * @key from @bmap.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - A record associated with @key does not exist.
+ */
+int nilfs_bmap_delete(struct nilfs_bmap *bmap, unsigned long key)
+{
+       int ret;
+
+       down_write(&bmap->b_sem);
+       ret = nilfs_bmap_do_delete(bmap, key);
+       up_write(&bmap->b_sem);
+       return ret;
+}
+
+static int nilfs_bmap_do_truncate(struct nilfs_bmap *bmap, unsigned long key)
+{
+       __u64 lastkey;
+       int ret;
+
+       ret = bmap->b_ops->bop_last_key(bmap, &lastkey);
+       if (ret < 0) {
+               if (ret == -ENOENT)
+                       ret = 0;
+               return ret;
+       }
+
+       while (key <= lastkey) {
+               ret = nilfs_bmap_do_delete(bmap, lastkey);
+               if (ret < 0)
+                       return ret;
+               ret = bmap->b_ops->bop_last_key(bmap, &lastkey);
+               if (ret < 0) {
+                       if (ret == -ENOENT)
+                               ret = 0;
+                       return ret;
+               }
+       }
+       return 0;
+}
+
+/**
+ * nilfs_bmap_truncate - truncate a bmap to a specified key
+ * @bmap: bmap
+ * @key: key
+ *
+ * Description: nilfs_bmap_truncate() removes key-record pairs whose keys are
+ * greater than or equal to @key from @bmap.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_bmap_truncate(struct nilfs_bmap *bmap, unsigned long key)
+{
+       int ret;
+
+       down_write(&bmap->b_sem);
+       ret = nilfs_bmap_do_truncate(bmap, key);
+       up_write(&bmap->b_sem);
+       return ret;
+}
+
+/**
+ * nilfs_bmap_clear - free resources a bmap holds
+ * @bmap: bmap
+ *
+ * Description: nilfs_bmap_clear() frees resources associated with @bmap.
+ */
+void nilfs_bmap_clear(struct nilfs_bmap *bmap)
+{
+       down_write(&bmap->b_sem);
+       if (bmap->b_ops->bop_clear != NULL)
+               bmap->b_ops->bop_clear(bmap);
+       up_write(&bmap->b_sem);
+}
+
+/**
+ * nilfs_bmap_propagate - propagate dirty state
+ * @bmap: bmap
+ * @bh: buffer head
+ *
+ * Description: nilfs_bmap_propagate() marks the buffers that directly or
+ * indirectly refer to the block specified by @bh dirty.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_bmap_propagate(struct nilfs_bmap *bmap, struct buffer_head *bh)
+{
+       int ret;
+
+       down_write(&bmap->b_sem);
+       ret = bmap->b_ops->bop_propagate(bmap, bh);
+       up_write(&bmap->b_sem);
+       return ret;
+}
+
+/**
+ * nilfs_bmap_lookup_dirty_buffers -
+ * @bmap: bmap
+ * @listp: pointer to buffer head list
+ */
+void nilfs_bmap_lookup_dirty_buffers(struct nilfs_bmap *bmap,
+                                    struct list_head *listp)
+{
+       if (bmap->b_ops->bop_lookup_dirty_buffers != NULL)
+               bmap->b_ops->bop_lookup_dirty_buffers(bmap, listp);
+}
+
+/**
+ * nilfs_bmap_assign - assign a new block number to a block
+ * @bmap: bmap
+ * @bhp: pointer to buffer head
+ * @blocknr: block number
+ * @binfo: block information
+ *
+ * Description: nilfs_bmap_assign() assigns the block number @blocknr to the
+ * buffer specified by @bh.
+ *
+ * Return Value: On success, 0 is returned and the buffer head of a newly
+ * create buffer and the block information associated with the buffer are
+ * stored in the place pointed by @bh and @binfo, respectively. On error, one
+ * of the following negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_bmap_assign(struct nilfs_bmap *bmap,
+                     struct buffer_head **bh,
+                     unsigned long blocknr,
+                     union nilfs_binfo *binfo)
+{
+       int ret;
+
+       down_write(&bmap->b_sem);
+       ret = bmap->b_ops->bop_assign(bmap, bh, blocknr, binfo);
+       up_write(&bmap->b_sem);
+       return ret;
+}
+
+/**
+ * nilfs_bmap_mark - mark block dirty
+ * @bmap: bmap
+ * @key: key
+ * @level: level
+ *
+ * Description: nilfs_bmap_mark() marks the block specified by @key and @level
+ * as dirty.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_bmap_mark(struct nilfs_bmap *bmap, __u64 key, int level)
+{
+       int ret;
+
+       if (bmap->b_ops->bop_mark == NULL)
+               return 0;
+
+       down_write(&bmap->b_sem);
+       ret = bmap->b_ops->bop_mark(bmap, key, level);
+       up_write(&bmap->b_sem);
+       return ret;
+}
+
+/**
+ * nilfs_bmap_test_and_clear_dirty - test and clear a bmap dirty state
+ * @bmap: bmap
+ *
+ * Description: nilfs_test_and_clear() is the atomic operation to test and
+ * clear the dirty state of @bmap.
+ *
+ * Return Value: 1 is returned if @bmap is dirty, or 0 if clear.
+ */
+int nilfs_bmap_test_and_clear_dirty(struct nilfs_bmap *bmap)
+{
+       int ret;
+
+       down_write(&bmap->b_sem);
+       ret = nilfs_bmap_dirty(bmap);
+       nilfs_bmap_clear_dirty(bmap);
+       up_write(&bmap->b_sem);
+       return ret;
+}
+
+
+/*
+ * Internal use only
+ */
+
+void nilfs_bmap_add_blocks(const struct nilfs_bmap *bmap, int n)
+{
+       inode_add_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n);
+       if (NILFS_MDT(bmap->b_inode))
+               nilfs_mdt_mark_dirty(bmap->b_inode);
+       else
+               mark_inode_dirty(bmap->b_inode);
+}
+
+void nilfs_bmap_sub_blocks(const struct nilfs_bmap *bmap, int n)
+{
+       inode_sub_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n);
+       if (NILFS_MDT(bmap->b_inode))
+               nilfs_mdt_mark_dirty(bmap->b_inode);
+       else
+               mark_inode_dirty(bmap->b_inode);
+}
+
+int nilfs_bmap_get_block(const struct nilfs_bmap *bmap, __u64 ptr,
+                        struct buffer_head **bhp)
+{
+       return nilfs_btnode_get(&NILFS_BMAP_I(bmap)->i_btnode_cache,
+                               ptr, 0, bhp, 0);
+}
+
+void nilfs_bmap_put_block(const struct nilfs_bmap *bmap,
+                         struct buffer_head *bh)
+{
+       brelse(bh);
+}
+
+int nilfs_bmap_get_new_block(const struct nilfs_bmap *bmap, __u64 ptr,
+                            struct buffer_head **bhp)
+{
+       int ret;
+
+       ret = nilfs_btnode_get(&NILFS_BMAP_I(bmap)->i_btnode_cache,
+                              ptr, 0, bhp, 1);
+       if (ret < 0)
+               return ret;
+       set_buffer_nilfs_volatile(*bhp);
+       return 0;
+}
+
+void nilfs_bmap_delete_block(const struct nilfs_bmap *bmap,
+                            struct buffer_head *bh)
+{
+       nilfs_btnode_delete(bh);
+}
+
+__u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap,
+                             const struct buffer_head *bh)
+{
+       struct buffer_head *pbh;
+       __u64 key;
+
+       key = page_index(bh->b_page) << (PAGE_CACHE_SHIFT -
+                                        bmap->b_inode->i_blkbits);
+       for (pbh = page_buffers(bh->b_page); pbh != bh;
+            pbh = pbh->b_this_page, key++);
+
+       return key;
+}
+
+__u64 nilfs_bmap_find_target_seq(const struct nilfs_bmap *bmap, __u64 key)
+{
+       __s64 diff;
+
+       diff = key - bmap->b_last_allocated_key;
+       if ((nilfs_bmap_keydiff_abs(diff) < NILFS_INODE_BMAP_SIZE) &&
+           (bmap->b_last_allocated_ptr != NILFS_BMAP_INVALID_PTR) &&
+           (bmap->b_last_allocated_ptr + diff > 0))
+               return bmap->b_last_allocated_ptr + diff;
+       else
+               return NILFS_BMAP_INVALID_PTR;
+}
+
+static struct inode *nilfs_bmap_get_dat(const struct nilfs_bmap *bmap)
+{
+       return nilfs_dat_inode(NILFS_I_NILFS(bmap->b_inode));
+}
+
+#define NILFS_BMAP_GROUP_DIV   8
+__u64 nilfs_bmap_find_target_in_group(const struct nilfs_bmap *bmap)
+{
+       struct inode *dat = nilfs_bmap_get_dat(bmap);
+       unsigned long entries_per_group = nilfs_palloc_entries_per_group(dat);
+       unsigned long group = bmap->b_inode->i_ino / entries_per_group;
+
+       return group * entries_per_group +
+               (bmap->b_inode->i_ino % NILFS_BMAP_GROUP_DIV) *
+               (entries_per_group / NILFS_BMAP_GROUP_DIV);
+}
+
+static int nilfs_bmap_prepare_alloc_v(struct nilfs_bmap *bmap,
+                                     union nilfs_bmap_ptr_req *req)
+{
+       return nilfs_dat_prepare_alloc(nilfs_bmap_get_dat(bmap), &req->bpr_req);
+}
+
+static void nilfs_bmap_commit_alloc_v(struct nilfs_bmap *bmap,
+                                     union nilfs_bmap_ptr_req *req)
+{
+       nilfs_dat_commit_alloc(nilfs_bmap_get_dat(bmap), &req->bpr_req);
+}
+
+static void nilfs_bmap_abort_alloc_v(struct nilfs_bmap *bmap,
+                                    union nilfs_bmap_ptr_req *req)
+{
+       nilfs_dat_abort_alloc(nilfs_bmap_get_dat(bmap), &req->bpr_req);
+}
+
+static int nilfs_bmap_prepare_start_v(struct nilfs_bmap *bmap,
+                                     union nilfs_bmap_ptr_req *req)
+{
+       return nilfs_dat_prepare_start(nilfs_bmap_get_dat(bmap), &req->bpr_req);
+}
+
+static void nilfs_bmap_commit_start_v(struct nilfs_bmap *bmap,
+                                     union nilfs_bmap_ptr_req *req,
+                                     sector_t blocknr)
+{
+       nilfs_dat_commit_start(nilfs_bmap_get_dat(bmap), &req->bpr_req,
+                              blocknr);
+}
+
+static void nilfs_bmap_abort_start_v(struct nilfs_bmap *bmap,
+                                    union nilfs_bmap_ptr_req *req)
+{
+       nilfs_dat_abort_start(nilfs_bmap_get_dat(bmap), &req->bpr_req);
+}
+
+static int nilfs_bmap_prepare_end_v(struct nilfs_bmap *bmap,
+                                   union nilfs_bmap_ptr_req *req)
+{
+       return nilfs_dat_prepare_end(nilfs_bmap_get_dat(bmap), &req->bpr_req);
+}
+
+static void nilfs_bmap_commit_end_v(struct nilfs_bmap *bmap,
+                                   union nilfs_bmap_ptr_req *req)
+{
+       nilfs_dat_commit_end(nilfs_bmap_get_dat(bmap), &req->bpr_req, 0);
+}
+
+static void nilfs_bmap_commit_end_vmdt(struct nilfs_bmap *bmap,
+                                      union nilfs_bmap_ptr_req *req)
+{
+       nilfs_dat_commit_end(nilfs_bmap_get_dat(bmap), &req->bpr_req, 1);
+}
+
+static void nilfs_bmap_abort_end_v(struct nilfs_bmap *bmap,
+                                  union nilfs_bmap_ptr_req *req)
+{
+       nilfs_dat_abort_end(nilfs_bmap_get_dat(bmap), &req->bpr_req);
+}
+
+int nilfs_bmap_move_v(const struct nilfs_bmap *bmap, __u64 vblocknr,
+                     sector_t blocknr)
+{
+       return nilfs_dat_move(nilfs_bmap_get_dat(bmap), vblocknr, blocknr);
+}
+
+int nilfs_bmap_mark_dirty(const struct nilfs_bmap *bmap, __u64 vblocknr)
+{
+       return nilfs_dat_mark_dirty(nilfs_bmap_get_dat(bmap), vblocknr);
+}
+
+int nilfs_bmap_prepare_update(struct nilfs_bmap *bmap,
+                             union nilfs_bmap_ptr_req *oldreq,
+                             union nilfs_bmap_ptr_req *newreq)
+{
+       int ret;
+
+       ret = bmap->b_pops->bpop_prepare_end_ptr(bmap, oldreq);
+       if (ret < 0)
+               return ret;
+       ret = bmap->b_pops->bpop_prepare_alloc_ptr(bmap, newreq);
+       if (ret < 0)
+               bmap->b_pops->bpop_abort_end_ptr(bmap, oldreq);
+
+       return ret;
+}
+
+void nilfs_bmap_commit_update(struct nilfs_bmap *bmap,
+                             union nilfs_bmap_ptr_req *oldreq,
+                             union nilfs_bmap_ptr_req *newreq)
+{
+       bmap->b_pops->bpop_commit_end_ptr(bmap, oldreq);
+       bmap->b_pops->bpop_commit_alloc_ptr(bmap, newreq);
+}
+
+void nilfs_bmap_abort_update(struct nilfs_bmap *bmap,
+                            union nilfs_bmap_ptr_req *oldreq,
+                            union nilfs_bmap_ptr_req *newreq)
+{
+       bmap->b_pops->bpop_abort_end_ptr(bmap, oldreq);
+       bmap->b_pops->bpop_abort_alloc_ptr(bmap, newreq);
+}
+
+static int nilfs_bmap_translate_v(const struct nilfs_bmap *bmap, __u64 ptr,
+                                 __u64 *ptrp)
+{
+       sector_t blocknr;
+       int ret;
+
+       ret = nilfs_dat_translate(nilfs_bmap_get_dat(bmap), ptr, &blocknr);
+       if (ret < 0)
+               return ret;
+       if (ptrp != NULL)
+               *ptrp = blocknr;
+       return 0;
+}
+
+static int nilfs_bmap_prepare_alloc_p(struct nilfs_bmap *bmap,
+                                     union nilfs_bmap_ptr_req *req)
+{
+       /* ignore target ptr */
+       req->bpr_ptr = bmap->b_last_allocated_ptr++;
+       return 0;
+}
+
+static void nilfs_bmap_commit_alloc_p(struct nilfs_bmap *bmap,
+                                     union nilfs_bmap_ptr_req *req)
+{
+       /* do nothing */
+}
+
+static void nilfs_bmap_abort_alloc_p(struct nilfs_bmap *bmap,
+                                    union nilfs_bmap_ptr_req *req)
+{
+       bmap->b_last_allocated_ptr--;
+}
+
+static const struct nilfs_bmap_ptr_operations nilfs_bmap_ptr_ops_v = {
+       .bpop_prepare_alloc_ptr =       nilfs_bmap_prepare_alloc_v,
+       .bpop_commit_alloc_ptr  =       nilfs_bmap_commit_alloc_v,
+       .bpop_abort_alloc_ptr   =       nilfs_bmap_abort_alloc_v,
+       .bpop_prepare_start_ptr =       nilfs_bmap_prepare_start_v,
+       .bpop_commit_start_ptr  =       nilfs_bmap_commit_start_v,
+       .bpop_abort_start_ptr   =       nilfs_bmap_abort_start_v,
+       .bpop_prepare_end_ptr   =       nilfs_bmap_prepare_end_v,
+       .bpop_commit_end_ptr    =       nilfs_bmap_commit_end_v,
+       .bpop_abort_end_ptr     =       nilfs_bmap_abort_end_v,
+
+       .bpop_translate         =       nilfs_bmap_translate_v,
+};
+
+static const struct nilfs_bmap_ptr_operations nilfs_bmap_ptr_ops_vmdt = {
+       .bpop_prepare_alloc_ptr =       nilfs_bmap_prepare_alloc_v,
+       .bpop_commit_alloc_ptr  =       nilfs_bmap_commit_alloc_v,
+       .bpop_abort_alloc_ptr   =       nilfs_bmap_abort_alloc_v,
+       .bpop_prepare_start_ptr =       nilfs_bmap_prepare_start_v,
+       .bpop_commit_start_ptr  =       nilfs_bmap_commit_start_v,
+       .bpop_abort_start_ptr   =       nilfs_bmap_abort_start_v,
+       .bpop_prepare_end_ptr   =       nilfs_bmap_prepare_end_v,
+       .bpop_commit_end_ptr    =       nilfs_bmap_commit_end_vmdt,
+       .bpop_abort_end_ptr     =       nilfs_bmap_abort_end_v,
+
+       .bpop_translate         =       nilfs_bmap_translate_v,
+};
+
+static const struct nilfs_bmap_ptr_operations nilfs_bmap_ptr_ops_p = {
+       .bpop_prepare_alloc_ptr =       nilfs_bmap_prepare_alloc_p,
+       .bpop_commit_alloc_ptr  =       nilfs_bmap_commit_alloc_p,
+       .bpop_abort_alloc_ptr   =       nilfs_bmap_abort_alloc_p,
+       .bpop_prepare_start_ptr =       NULL,
+       .bpop_commit_start_ptr  =       NULL,
+       .bpop_abort_start_ptr   =       NULL,
+       .bpop_prepare_end_ptr   =       NULL,
+       .bpop_commit_end_ptr    =       NULL,
+       .bpop_abort_end_ptr     =       NULL,
+
+       .bpop_translate         =       NULL,
+};
+
+static const struct nilfs_bmap_ptr_operations nilfs_bmap_ptr_ops_gc = {
+       .bpop_prepare_alloc_ptr =       NULL,
+       .bpop_commit_alloc_ptr  =       NULL,
+       .bpop_abort_alloc_ptr   =       NULL,
+       .bpop_prepare_start_ptr =       NULL,
+       .bpop_commit_start_ptr  =       NULL,
+       .bpop_abort_start_ptr   =       NULL,
+       .bpop_prepare_end_ptr   =       NULL,
+       .bpop_commit_end_ptr    =       NULL,
+       .bpop_abort_end_ptr     =       NULL,
+
+       .bpop_translate         =       NULL,
+};
+
+/**
+ * nilfs_bmap_read - read a bmap from an inode
+ * @bmap: bmap
+ * @raw_inode: on-disk inode
+ *
+ * Description: nilfs_bmap_read() initializes the bmap @bmap.
+ *
+ * Return Value: On success, 0 is returned. On error, the following negative
+ * error code is returned.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_bmap_read(struct nilfs_bmap *bmap, struct nilfs_inode *raw_inode)
+{
+       if (raw_inode == NULL)
+               memset(bmap->b_u.u_data, 0, NILFS_BMAP_SIZE);
+       else
+               memcpy(bmap->b_u.u_data, raw_inode->i_bmap, NILFS_BMAP_SIZE);
+
+       init_rwsem(&bmap->b_sem);
+       bmap->b_state = 0;
+       bmap->b_inode = &NILFS_BMAP_I(bmap)->vfs_inode;
+       switch (bmap->b_inode->i_ino) {
+       case NILFS_DAT_INO:
+               bmap->b_pops = &nilfs_bmap_ptr_ops_p;
+               bmap->b_last_allocated_key = 0; /* XXX: use macro */
+               bmap->b_last_allocated_ptr = NILFS_BMAP_NEW_PTR_INIT;
+               break;
+       case NILFS_CPFILE_INO:
+       case NILFS_SUFILE_INO:
+               bmap->b_pops = &nilfs_bmap_ptr_ops_vmdt;
+               bmap->b_last_allocated_key = 0; /* XXX: use macro */
+               bmap->b_last_allocated_ptr = NILFS_BMAP_INVALID_PTR;
+               break;
+       default:
+               bmap->b_pops = &nilfs_bmap_ptr_ops_v;
+               bmap->b_last_allocated_key = 0; /* XXX: use macro */
+               bmap->b_last_allocated_ptr = NILFS_BMAP_INVALID_PTR;
+               break;
+       }
+
+       return (bmap->b_u.u_flags & NILFS_BMAP_LARGE) ?
+               nilfs_btree_init(bmap,
+                                NILFS_BMAP_LARGE_LOW,
+                                NILFS_BMAP_LARGE_HIGH) :
+               nilfs_direct_init(bmap,
+                                 NILFS_BMAP_SMALL_LOW,
+                                 NILFS_BMAP_SMALL_HIGH);
+}
+
+/**
+ * nilfs_bmap_write - write back a bmap to an inode
+ * @bmap: bmap
+ * @raw_inode: on-disk inode
+ *
+ * Description: nilfs_bmap_write() stores @bmap in @raw_inode.
+ */
+void nilfs_bmap_write(struct nilfs_bmap *bmap, struct nilfs_inode *raw_inode)
+{
+       down_write(&bmap->b_sem);
+       memcpy(raw_inode->i_bmap, bmap->b_u.u_data,
+              NILFS_INODE_BMAP_SIZE * sizeof(__le64));
+       if (bmap->b_inode->i_ino == NILFS_DAT_INO)
+               bmap->b_last_allocated_ptr = NILFS_BMAP_NEW_PTR_INIT;
+
+       up_write(&bmap->b_sem);
+}
+
+void nilfs_bmap_init_gc(struct nilfs_bmap *bmap)
+{
+       memset(&bmap->b_u, 0, NILFS_BMAP_SIZE);
+       init_rwsem(&bmap->b_sem);
+       bmap->b_inode = &NILFS_BMAP_I(bmap)->vfs_inode;
+       bmap->b_pops = &nilfs_bmap_ptr_ops_gc;
+       bmap->b_last_allocated_key = 0;
+       bmap->b_last_allocated_ptr = NILFS_BMAP_INVALID_PTR;
+       bmap->b_state = 0;
+       nilfs_btree_init_gc(bmap);
+}
+
+void nilfs_bmap_init_gcdat(struct nilfs_bmap *gcbmap, struct nilfs_bmap *bmap)
+{
+       memcpy(gcbmap, bmap, sizeof(union nilfs_bmap_union));
+       init_rwsem(&gcbmap->b_sem);
+       gcbmap->b_inode = &NILFS_BMAP_I(gcbmap)->vfs_inode;
+}
+
+void nilfs_bmap_commit_gcdat(struct nilfs_bmap *gcbmap, struct nilfs_bmap *bmap)
+{
+       memcpy(bmap, gcbmap, sizeof(union nilfs_bmap_union));
+       init_rwsem(&bmap->b_sem);
+       bmap->b_inode = &NILFS_BMAP_I(bmap)->vfs_inode;
+}
diff --git a/fs/nilfs2/bmap.h b/fs/nilfs2/bmap.h
new file mode 100644 (file)
index 0000000..4f2708a
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * bmap.h - NILFS block mapping.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#ifndef _NILFS_BMAP_H
+#define _NILFS_BMAP_H
+
+#include <linux/types.h>
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/nilfs2_fs.h>
+#include "alloc.h"
+
+#define NILFS_BMAP_INVALID_PTR 0
+
+#define nilfs_bmap_dkey_to_key(dkey)   le64_to_cpu(dkey)
+#define nilfs_bmap_key_to_dkey(key)    cpu_to_le64(key)
+#define nilfs_bmap_dptr_to_ptr(dptr)   le64_to_cpu(dptr)
+#define nilfs_bmap_ptr_to_dptr(ptr)    cpu_to_le64(ptr)
+
+#define nilfs_bmap_keydiff_abs(diff)   ((diff) < 0 ? -(diff) : (diff))
+
+
+struct nilfs_bmap;
+
+/**
+ * union nilfs_bmap_ptr_req - request for bmap ptr
+ * @bpr_ptr: bmap pointer
+ * @bpr_req: request for persistent allocator
+ */
+union nilfs_bmap_ptr_req {
+       __u64 bpr_ptr;
+       struct nilfs_palloc_req bpr_req;
+};
+
+/**
+ * struct nilfs_bmap_stats - bmap statistics
+ * @bs_nblocks: number of blocks created or deleted
+ */
+struct nilfs_bmap_stats {
+       unsigned int bs_nblocks;
+};
+
+/**
+ * struct nilfs_bmap_operations - bmap operation table
+ */
+struct nilfs_bmap_operations {
+       int (*bop_lookup)(const struct nilfs_bmap *, __u64, int, __u64 *);
+       int (*bop_insert)(struct nilfs_bmap *, __u64, __u64);
+       int (*bop_delete)(struct nilfs_bmap *, __u64);
+       void (*bop_clear)(struct nilfs_bmap *);
+
+       int (*bop_propagate)(const struct nilfs_bmap *, struct buffer_head *);
+       void (*bop_lookup_dirty_buffers)(struct nilfs_bmap *,
+                                        struct list_head *);
+
+       int (*bop_assign)(struct nilfs_bmap *,
+                         struct buffer_head **,
+                         sector_t,
+                         union nilfs_binfo *);
+       int (*bop_mark)(struct nilfs_bmap *, __u64, int);
+
+       /* The following functions are internal use only. */
+       int (*bop_last_key)(const struct nilfs_bmap *, __u64 *);
+       int (*bop_check_insert)(const struct nilfs_bmap *, __u64);
+       int (*bop_check_delete)(struct nilfs_bmap *, __u64);
+       int (*bop_gather_data)(struct nilfs_bmap *, __u64 *, __u64 *, int);
+};
+
+
+/**
+ * struct nilfs_bmap_ptr_operations - bmap ptr operation table
+ */
+struct nilfs_bmap_ptr_operations {
+       int (*bpop_prepare_alloc_ptr)(struct nilfs_bmap *,
+                                     union nilfs_bmap_ptr_req *);
+       void (*bpop_commit_alloc_ptr)(struct nilfs_bmap *,
+                                     union nilfs_bmap_ptr_req *);
+       void (*bpop_abort_alloc_ptr)(struct nilfs_bmap *,
+                                    union nilfs_bmap_ptr_req *);
+       int (*bpop_prepare_start_ptr)(struct nilfs_bmap *,
+                                     union nilfs_bmap_ptr_req *);
+       void (*bpop_commit_start_ptr)(struct nilfs_bmap *,
+                                     union nilfs_bmap_ptr_req *,
+                                     sector_t);
+       void (*bpop_abort_start_ptr)(struct nilfs_bmap *,
+                                    union nilfs_bmap_ptr_req *);
+       int (*bpop_prepare_end_ptr)(struct nilfs_bmap *,
+                                   union nilfs_bmap_ptr_req *);
+       void (*bpop_commit_end_ptr)(struct nilfs_bmap *,
+                                   union nilfs_bmap_ptr_req *);
+       void (*bpop_abort_end_ptr)(struct nilfs_bmap *,
+                                  union nilfs_bmap_ptr_req *);
+
+       int (*bpop_translate)(const struct nilfs_bmap *, __u64, __u64 *);
+};
+
+
+#define NILFS_BMAP_SIZE                (NILFS_INODE_BMAP_SIZE * sizeof(__le64))
+#define NILFS_BMAP_KEY_BIT     (sizeof(unsigned long) * 8 /* CHAR_BIT */)
+#define NILFS_BMAP_NEW_PTR_INIT        \
+       (1UL << (sizeof(unsigned long) * 8 /* CHAR_BIT */ - 1))
+
+static inline int nilfs_bmap_is_new_ptr(unsigned long ptr)
+{
+       return !!(ptr & NILFS_BMAP_NEW_PTR_INIT);
+}
+
+
+/**
+ * struct nilfs_bmap - bmap structure
+ * @b_u: raw data
+ * @b_sem: semaphore
+ * @b_inode: owner of bmap
+ * @b_ops: bmap operation table
+ * @b_pops: bmap ptr operation table
+ * @b_low: low watermark of conversion
+ * @b_high: high watermark of conversion
+ * @b_last_allocated_key: last allocated key for data block
+ * @b_last_allocated_ptr: last allocated ptr for data block
+ * @b_state: state
+ */
+struct nilfs_bmap {
+       union {
+               __u8 u_flags;
+               __le64 u_data[NILFS_BMAP_SIZE / sizeof(__le64)];
+       } b_u;
+       struct rw_semaphore b_sem;
+       struct inode *b_inode;
+       const struct nilfs_bmap_operations *b_ops;
+       const struct nilfs_bmap_ptr_operations *b_pops;
+       __u64 b_low;
+       __u64 b_high;
+       __u64 b_last_allocated_key;
+       __u64 b_last_allocated_ptr;
+       int b_state;
+};
+
+/* state */
+#define NILFS_BMAP_DIRTY       0x00000001
+
+
+int nilfs_bmap_test_and_clear_dirty(struct nilfs_bmap *);
+int nilfs_bmap_read(struct nilfs_bmap *, struct nilfs_inode *);
+void nilfs_bmap_write(struct nilfs_bmap *, struct nilfs_inode *);
+int nilfs_bmap_lookup(struct nilfs_bmap *, unsigned long, unsigned long *);
+int nilfs_bmap_insert(struct nilfs_bmap *, unsigned long, unsigned long);
+int nilfs_bmap_delete(struct nilfs_bmap *, unsigned long);
+int nilfs_bmap_last_key(struct nilfs_bmap *, unsigned long *);
+int nilfs_bmap_truncate(struct nilfs_bmap *, unsigned long);
+void nilfs_bmap_clear(struct nilfs_bmap *);
+int nilfs_bmap_propagate(struct nilfs_bmap *, struct buffer_head *);
+void nilfs_bmap_lookup_dirty_buffers(struct nilfs_bmap *, struct list_head *);
+int nilfs_bmap_assign(struct nilfs_bmap *, struct buffer_head **,
+                     unsigned long, union nilfs_binfo *);
+int nilfs_bmap_lookup_at_level(struct nilfs_bmap *, __u64, int, __u64 *);
+int nilfs_bmap_mark(struct nilfs_bmap *, __u64, int);
+
+void nilfs_bmap_init_gc(struct nilfs_bmap *);
+void nilfs_bmap_init_gcdat(struct nilfs_bmap *, struct nilfs_bmap *);
+void nilfs_bmap_commit_gcdat(struct nilfs_bmap *, struct nilfs_bmap *);
+
+
+/*
+ * Internal use only
+ */
+
+int nilfs_bmap_move_v(const struct nilfs_bmap *, __u64, sector_t);
+int nilfs_bmap_mark_dirty(const struct nilfs_bmap *, __u64);
+
+
+__u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *,
+                             const struct buffer_head *);
+
+__u64 nilfs_bmap_find_target_seq(const struct nilfs_bmap *, __u64);
+__u64 nilfs_bmap_find_target_in_group(const struct nilfs_bmap *);
+
+int nilfs_bmap_prepare_update(struct nilfs_bmap *,
+                             union nilfs_bmap_ptr_req *,
+                             union nilfs_bmap_ptr_req *);
+void nilfs_bmap_commit_update(struct nilfs_bmap *,
+                             union nilfs_bmap_ptr_req *,
+                             union nilfs_bmap_ptr_req *);
+void nilfs_bmap_abort_update(struct nilfs_bmap *,
+                            union nilfs_bmap_ptr_req *,
+                            union nilfs_bmap_ptr_req *);
+
+void nilfs_bmap_add_blocks(const struct nilfs_bmap *, int);
+void nilfs_bmap_sub_blocks(const struct nilfs_bmap *, int);
+
+
+int nilfs_bmap_get_block(const struct nilfs_bmap *, __u64,
+                        struct buffer_head **);
+void nilfs_bmap_put_block(const struct nilfs_bmap *, struct buffer_head *);
+int nilfs_bmap_get_new_block(const struct nilfs_bmap *, __u64,
+                            struct buffer_head **);
+void nilfs_bmap_delete_block(const struct nilfs_bmap *, struct buffer_head *);
+
+
+/* Assume that bmap semaphore is locked. */
+static inline int nilfs_bmap_dirty(const struct nilfs_bmap *bmap)
+{
+       return !!(bmap->b_state & NILFS_BMAP_DIRTY);
+}
+
+/* Assume that bmap semaphore is locked. */
+static inline void nilfs_bmap_set_dirty(struct nilfs_bmap *bmap)
+{
+       bmap->b_state |= NILFS_BMAP_DIRTY;
+}
+
+/* Assume that bmap semaphore is locked. */
+static inline void nilfs_bmap_clear_dirty(struct nilfs_bmap *bmap)
+{
+       bmap->b_state &= ~NILFS_BMAP_DIRTY;
+}
+
+
+#define NILFS_BMAP_LARGE       0x1
+
+#define NILFS_BMAP_SMALL_LOW   NILFS_DIRECT_KEY_MIN
+#define NILFS_BMAP_SMALL_HIGH  NILFS_DIRECT_KEY_MAX
+#define NILFS_BMAP_LARGE_LOW   NILFS_BTREE_ROOT_NCHILDREN_MAX
+#define NILFS_BMAP_LARGE_HIGH  NILFS_BTREE_KEY_MAX
+
+#endif /* _NILFS_BMAP_H */
diff --git a/fs/nilfs2/bmap_union.h b/fs/nilfs2/bmap_union.h
new file mode 100644 (file)
index 0000000..d41509b
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * bmap_union.h - NILFS block mapping.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#ifndef _NILFS_BMAP_UNION_H
+#define _NILFS_BMAP_UNION_H
+
+#include "bmap.h"
+#include "direct.h"
+#include "btree.h"
+
+/**
+ * nilfs_bmap_union -
+ * @bi_bmap: bmap structure
+ * @bi_btree: direct map structure
+ * @bi_direct: B-tree structure
+ */
+union nilfs_bmap_union {
+       struct nilfs_bmap bi_bmap;
+       struct nilfs_direct bi_direct;
+       struct nilfs_btree bi_btree;
+};
+
+#endif /* _NILFS_BMAP_UNION_H */
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c
new file mode 100644 (file)
index 0000000..4cc07b2
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ * btnode.c - NILFS B-tree node cache
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * This file was originally written by Seiji Kihara <kihara@osrg.net>
+ * and fully revised by Ryusuke Konishi <ryusuke@osrg.net> for
+ * stabilization and simplification.
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/mm.h>
+#include <linux/backing-dev.h>
+#include "nilfs.h"
+#include "mdt.h"
+#include "dat.h"
+#include "page.h"
+#include "btnode.h"
+
+
+void nilfs_btnode_cache_init_once(struct address_space *btnc)
+{
+       INIT_RADIX_TREE(&btnc->page_tree, GFP_ATOMIC);
+       spin_lock_init(&btnc->tree_lock);
+       INIT_LIST_HEAD(&btnc->private_list);
+       spin_lock_init(&btnc->private_lock);
+
+       spin_lock_init(&btnc->i_mmap_lock);
+       INIT_RAW_PRIO_TREE_ROOT(&btnc->i_mmap);
+       INIT_LIST_HEAD(&btnc->i_mmap_nonlinear);
+}
+
+static struct address_space_operations def_btnode_aops;
+
+void nilfs_btnode_cache_init(struct address_space *btnc)
+{
+       btnc->host = NULL;  /* can safely set to host inode ? */
+       btnc->flags = 0;
+       mapping_set_gfp_mask(btnc, GFP_NOFS);
+       btnc->assoc_mapping = NULL;
+       btnc->backing_dev_info = &default_backing_dev_info;
+       btnc->a_ops = &def_btnode_aops;
+}
+
+void nilfs_btnode_cache_clear(struct address_space *btnc)
+{
+       invalidate_mapping_pages(btnc, 0, -1);
+       truncate_inode_pages(btnc, 0);
+}
+
+int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
+                             sector_t pblocknr, struct buffer_head **pbh,
+                             int newblk)
+{
+       struct buffer_head *bh;
+       struct inode *inode = NILFS_BTNC_I(btnc);
+       int err;
+
+       bh = nilfs_grab_buffer(inode, btnc, blocknr, 1 << BH_NILFS_Node);
+       if (unlikely(!bh))
+               return -ENOMEM;
+
+       err = -EEXIST; /* internal code */
+       if (newblk) {
+               if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) ||
+                            buffer_dirty(bh))) {
+                       brelse(bh);
+                       BUG();
+               }
+               bh->b_bdev = NILFS_I_NILFS(inode)->ns_bdev;
+               bh->b_blocknr = blocknr;
+               set_buffer_mapped(bh);
+               set_buffer_uptodate(bh);
+               goto found;
+       }
+
+       if (buffer_uptodate(bh) || buffer_dirty(bh))
+               goto found;
+
+       if (pblocknr == 0) {
+               pblocknr = blocknr;
+               if (inode->i_ino != NILFS_DAT_INO) {
+                       struct inode *dat =
+                               nilfs_dat_inode(NILFS_I_NILFS(inode));
+
+                       /* blocknr is a virtual block number */
+                       err = nilfs_dat_translate(dat, blocknr, &pblocknr);
+                       if (unlikely(err)) {
+                               brelse(bh);
+                               goto out_locked;
+                       }
+               }
+       }
+       lock_buffer(bh);
+       if (buffer_uptodate(bh)) {
+               unlock_buffer(bh);
+               err = -EEXIST; /* internal code */
+               goto found;
+       }
+       set_buffer_mapped(bh);
+       bh->b_bdev = NILFS_I_NILFS(inode)->ns_bdev;
+       bh->b_blocknr = pblocknr; /* set block address for read */
+       bh->b_end_io = end_buffer_read_sync;
+       get_bh(bh);
+       submit_bh(READ, bh);
+       bh->b_blocknr = blocknr; /* set back to the given block address */
+       err = 0;
+found:
+       *pbh = bh;
+
+out_locked:
+       unlock_page(bh->b_page);
+       page_cache_release(bh->b_page);
+       return err;
+}
+
+int nilfs_btnode_get(struct address_space *btnc, __u64 blocknr,
+                    sector_t pblocknr, struct buffer_head **pbh, int newblk)
+{
+       struct buffer_head *bh;
+       int err;
+
+       err = nilfs_btnode_submit_block(btnc, blocknr, pblocknr, pbh, newblk);
+       if (err == -EEXIST) /* internal code (cache hit) */
+               return 0;
+       if (unlikely(err))
+               return err;
+
+       bh = *pbh;
+       wait_on_buffer(bh);
+       if (!buffer_uptodate(bh)) {
+               brelse(bh);
+               return -EIO;
+       }
+       return 0;
+}
+
+/**
+ * nilfs_btnode_delete - delete B-tree node buffer
+ * @bh: buffer to be deleted
+ *
+ * nilfs_btnode_delete() invalidates the specified buffer and delete the page
+ * including the buffer if the page gets unbusy.
+ */
+void nilfs_btnode_delete(struct buffer_head *bh)
+{
+       struct address_space *mapping;
+       struct page *page = bh->b_page;
+       pgoff_t index = page_index(page);
+       int still_dirty;
+
+       page_cache_get(page);
+       lock_page(page);
+       wait_on_page_writeback(page);
+
+       nilfs_forget_buffer(bh);
+       still_dirty = PageDirty(page);
+       mapping = page->mapping;
+       unlock_page(page);
+       page_cache_release(page);
+
+       if (!still_dirty && mapping)
+               invalidate_inode_pages2_range(mapping, index, index);
+}
+
+/**
+ * nilfs_btnode_prepare_change_key
+ *  prepare to move contents of the block for old key to one of new key.
+ *  the old buffer will not be removed, but might be reused for new buffer.
+ *  it might return -ENOMEM because of memory allocation errors,
+ *  and might return -EIO because of disk read errors.
+ */
+int nilfs_btnode_prepare_change_key(struct address_space *btnc,
+                                   struct nilfs_btnode_chkey_ctxt *ctxt)
+{
+       struct buffer_head *obh, *nbh;
+       struct inode *inode = NILFS_BTNC_I(btnc);
+       __u64 oldkey = ctxt->oldkey, newkey = ctxt->newkey;
+       int err;
+
+       if (oldkey == newkey)
+               return 0;
+
+       obh = ctxt->bh;
+       ctxt->newbh = NULL;
+
+       if (inode->i_blkbits == PAGE_CACHE_SHIFT) {
+               lock_page(obh->b_page);
+               /*
+                * We cannot call radix_tree_preload for the kernels older
+                * than 2.6.23, because it is not exported for modules.
+                */
+               err = radix_tree_preload(GFP_NOFS & ~__GFP_HIGHMEM);
+               if (err)
+                       goto failed_unlock;
+               /* BUG_ON(oldkey != obh->b_page->index); */
+               if (unlikely(oldkey != obh->b_page->index))
+                       NILFS_PAGE_BUG(obh->b_page,
+                                      "invalid oldkey %lld (newkey=%lld)",
+                                      (unsigned long long)oldkey,
+                                      (unsigned long long)newkey);
+
+retry:
+               spin_lock_irq(&btnc->tree_lock);
+               err = radix_tree_insert(&btnc->page_tree, newkey, obh->b_page);
+               spin_unlock_irq(&btnc->tree_lock);
+               /*
+                * Note: page->index will not change to newkey until
+                * nilfs_btnode_commit_change_key() will be called.
+                * To protect the page in intermediate state, the page lock
+                * is held.
+                */
+               radix_tree_preload_end();
+               if (!err)
+                       return 0;
+               else if (err != -EEXIST)
+                       goto failed_unlock;
+
+               err = invalidate_inode_pages2_range(btnc, newkey, newkey);
+               if (!err)
+                       goto retry;
+               /* fallback to copy mode */
+               unlock_page(obh->b_page);
+       }
+
+       err = nilfs_btnode_get(btnc, newkey, 0, &nbh, 1);
+       if (likely(!err)) {
+               BUG_ON(nbh == obh);
+               ctxt->newbh = nbh;
+       }
+       return err;
+
+ failed_unlock:
+       unlock_page(obh->b_page);
+       return err;
+}
+
+/**
+ * nilfs_btnode_commit_change_key
+ *  commit the change_key operation prepared by prepare_change_key().
+ */
+void nilfs_btnode_commit_change_key(struct address_space *btnc,
+                                   struct nilfs_btnode_chkey_ctxt *ctxt)
+{
+       struct buffer_head *obh = ctxt->bh, *nbh = ctxt->newbh;
+       __u64 oldkey = ctxt->oldkey, newkey = ctxt->newkey;
+       struct page *opage;
+
+       if (oldkey == newkey)
+               return;
+
+       if (nbh == NULL) {      /* blocksize == pagesize */
+               opage = obh->b_page;
+               if (unlikely(oldkey != opage->index))
+                       NILFS_PAGE_BUG(opage,
+                                      "invalid oldkey %lld (newkey=%lld)",
+                                      (unsigned long long)oldkey,
+                                      (unsigned long long)newkey);
+               if (!test_set_buffer_dirty(obh) && TestSetPageDirty(opage))
+                       BUG();
+
+               spin_lock_irq(&btnc->tree_lock);
+               radix_tree_delete(&btnc->page_tree, oldkey);
+               radix_tree_tag_set(&btnc->page_tree, newkey,
+                                  PAGECACHE_TAG_DIRTY);
+               spin_unlock_irq(&btnc->tree_lock);
+
+               opage->index = obh->b_blocknr = newkey;
+               unlock_page(opage);
+       } else {
+               nilfs_copy_buffer(nbh, obh);
+               nilfs_btnode_mark_dirty(nbh);
+
+               nbh->b_blocknr = newkey;
+               ctxt->bh = nbh;
+               nilfs_btnode_delete(obh); /* will decrement bh->b_count */
+       }
+}
+
+/**
+ * nilfs_btnode_abort_change_key
+ *  abort the change_key operation prepared by prepare_change_key().
+ */
+void nilfs_btnode_abort_change_key(struct address_space *btnc,
+                                  struct nilfs_btnode_chkey_ctxt *ctxt)
+{
+       struct buffer_head *nbh = ctxt->newbh;
+       __u64 oldkey = ctxt->oldkey, newkey = ctxt->newkey;
+
+       if (oldkey == newkey)
+               return;
+
+       if (nbh == NULL) {      /* blocksize == pagesize */
+               spin_lock_irq(&btnc->tree_lock);
+               radix_tree_delete(&btnc->page_tree, newkey);
+               spin_unlock_irq(&btnc->tree_lock);
+               unlock_page(ctxt->bh->b_page);
+       } else
+               brelse(nbh);
+}
diff --git a/fs/nilfs2/btnode.h b/fs/nilfs2/btnode.h
new file mode 100644 (file)
index 0000000..35faa86
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * btnode.h - NILFS B-tree node cache
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Seiji Kihara <kihara@osrg.net>
+ * Revised by Ryusuke Konishi <ryusuke@osrg.net>
+ */
+
+#ifndef _NILFS_BTNODE_H
+#define _NILFS_BTNODE_H
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/fs.h>
+#include <linux/backing-dev.h>
+
+
+struct nilfs_btnode_chkey_ctxt {
+       __u64 oldkey;
+       __u64 newkey;
+       struct buffer_head *bh;
+       struct buffer_head *newbh;
+};
+
+void nilfs_btnode_cache_init_once(struct address_space *);
+void nilfs_btnode_cache_init(struct address_space *);
+void nilfs_btnode_cache_clear(struct address_space *);
+int nilfs_btnode_submit_block(struct address_space *, __u64, sector_t,
+                             struct buffer_head **, int);
+int nilfs_btnode_get(struct address_space *, __u64, sector_t,
+                    struct buffer_head **, int);
+void nilfs_btnode_delete(struct buffer_head *);
+int nilfs_btnode_prepare_change_key(struct address_space *,
+                                   struct nilfs_btnode_chkey_ctxt *);
+void nilfs_btnode_commit_change_key(struct address_space *,
+                                   struct nilfs_btnode_chkey_ctxt *);
+void nilfs_btnode_abort_change_key(struct address_space *,
+                                  struct nilfs_btnode_chkey_ctxt *);
+
+#define nilfs_btnode_mark_dirty(bh)    nilfs_mark_buffer_dirty(bh)
+
+
+#endif /* _NILFS_BTNODE_H */
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
new file mode 100644 (file)
index 0000000..6b37a27
--- /dev/null
@@ -0,0 +1,2269 @@
+/*
+ * btree.c - NILFS B-tree.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/pagevec.h>
+#include "nilfs.h"
+#include "page.h"
+#include "btnode.h"
+#include "btree.h"
+#include "alloc.h"
+
+/**
+ * struct nilfs_btree_path - A path on which B-tree operations are executed
+ * @bp_bh: buffer head of node block
+ * @bp_sib_bh: buffer head of sibling node block
+ * @bp_index: index of child node
+ * @bp_oldreq: ptr end request for old ptr
+ * @bp_newreq: ptr alloc request for new ptr
+ * @bp_op: rebalance operation
+ */
+struct nilfs_btree_path {
+       struct buffer_head *bp_bh;
+       struct buffer_head *bp_sib_bh;
+       int bp_index;
+       union nilfs_bmap_ptr_req bp_oldreq;
+       union nilfs_bmap_ptr_req bp_newreq;
+       struct nilfs_btnode_chkey_ctxt bp_ctxt;
+       void (*bp_op)(struct nilfs_btree *, struct nilfs_btree_path *,
+                     int, __u64 *, __u64 *);
+};
+
+/*
+ * B-tree path operations
+ */
+
+static struct kmem_cache *nilfs_btree_path_cache;
+
+int __init nilfs_btree_path_cache_init(void)
+{
+       nilfs_btree_path_cache =
+               kmem_cache_create("nilfs2_btree_path_cache",
+                                 sizeof(struct nilfs_btree_path) *
+                                 NILFS_BTREE_LEVEL_MAX, 0, 0, NULL);
+       return (nilfs_btree_path_cache != NULL) ? 0 : -ENOMEM;
+}
+
+void nilfs_btree_path_cache_destroy(void)
+{
+       kmem_cache_destroy(nilfs_btree_path_cache);
+}
+
+static inline struct nilfs_btree_path *
+nilfs_btree_alloc_path(const struct nilfs_btree *btree)
+{
+       return (struct nilfs_btree_path *)
+               kmem_cache_alloc(nilfs_btree_path_cache, GFP_NOFS);
+}
+
+static inline void nilfs_btree_free_path(const struct nilfs_btree *btree,
+                                        struct nilfs_btree_path *path)
+{
+       kmem_cache_free(nilfs_btree_path_cache, path);
+}
+
+static void nilfs_btree_init_path(const struct nilfs_btree *btree,
+                                 struct nilfs_btree_path *path)
+{
+       int level;
+
+       for (level = NILFS_BTREE_LEVEL_DATA;
+            level < NILFS_BTREE_LEVEL_MAX;
+            level++) {
+               path[level].bp_bh = NULL;
+               path[level].bp_sib_bh = NULL;
+               path[level].bp_index = 0;
+               path[level].bp_oldreq.bpr_ptr = NILFS_BMAP_INVALID_PTR;
+               path[level].bp_newreq.bpr_ptr = NILFS_BMAP_INVALID_PTR;
+               path[level].bp_op = NULL;
+       }
+}
+
+static void nilfs_btree_clear_path(const struct nilfs_btree *btree,
+                                  struct nilfs_btree_path *path)
+{
+       int level;
+
+       for (level = NILFS_BTREE_LEVEL_DATA;
+            level < NILFS_BTREE_LEVEL_MAX;
+            level++) {
+               if (path[level].bp_bh != NULL) {
+                       nilfs_bmap_put_block(&btree->bt_bmap,
+                                            path[level].bp_bh);
+                       path[level].bp_bh = NULL;
+               }
+               /* sib_bh is released or deleted by prepare or commit
+                * operations. */
+               path[level].bp_sib_bh = NULL;
+               path[level].bp_index = 0;
+               path[level].bp_oldreq.bpr_ptr = NILFS_BMAP_INVALID_PTR;
+               path[level].bp_newreq.bpr_ptr = NILFS_BMAP_INVALID_PTR;
+               path[level].bp_op = NULL;
+       }
+}
+
+
+/*
+ * B-tree node operations
+ */
+
+static inline int
+nilfs_btree_node_get_flags(const struct nilfs_btree *btree,
+                          const struct nilfs_btree_node *node)
+{
+       return node->bn_flags;
+}
+
+static inline void
+nilfs_btree_node_set_flags(struct nilfs_btree *btree,
+                          struct nilfs_btree_node *node,
+                          int flags)
+{
+       node->bn_flags = flags;
+}
+
+static inline int nilfs_btree_node_root(const struct nilfs_btree *btree,
+                                       const struct nilfs_btree_node *node)
+{
+       return nilfs_btree_node_get_flags(btree, node) & NILFS_BTREE_NODE_ROOT;
+}
+
+static inline int
+nilfs_btree_node_get_level(const struct nilfs_btree *btree,
+                          const struct nilfs_btree_node *node)
+{
+       return node->bn_level;
+}
+
+static inline void
+nilfs_btree_node_set_level(struct nilfs_btree *btree,
+                          struct nilfs_btree_node *node,
+                          int level)
+{
+       node->bn_level = level;
+}
+
+static inline int
+nilfs_btree_node_get_nchildren(const struct nilfs_btree *btree,
+                              const struct nilfs_btree_node *node)
+{
+       return le16_to_cpu(node->bn_nchildren);
+}
+
+static inline void
+nilfs_btree_node_set_nchildren(struct nilfs_btree *btree,
+                              struct nilfs_btree_node *node,
+                              int nchildren)
+{
+       node->bn_nchildren = cpu_to_le16(nchildren);
+}
+
+static inline int
+nilfs_btree_node_size(const struct nilfs_btree *btree)
+{
+       return 1 << btree->bt_bmap.b_inode->i_blkbits;
+}
+
+static inline int
+nilfs_btree_node_nchildren_min(const struct nilfs_btree *btree,
+                              const struct nilfs_btree_node *node)
+{
+       return nilfs_btree_node_root(btree, node) ?
+               NILFS_BTREE_ROOT_NCHILDREN_MIN :
+               NILFS_BTREE_NODE_NCHILDREN_MIN(nilfs_btree_node_size(btree));
+}
+
+static inline int
+nilfs_btree_node_nchildren_max(const struct nilfs_btree *btree,
+                              const struct nilfs_btree_node *node)
+{
+       return nilfs_btree_node_root(btree, node) ?
+               NILFS_BTREE_ROOT_NCHILDREN_MAX :
+               NILFS_BTREE_NODE_NCHILDREN_MAX(nilfs_btree_node_size(btree));
+}
+
+static inline __le64 *
+nilfs_btree_node_dkeys(const struct nilfs_btree *btree,
+                      const struct nilfs_btree_node *node)
+{
+       return (__le64 *)((char *)(node + 1) +
+                         (nilfs_btree_node_root(btree, node) ?
+                          0 : NILFS_BTREE_NODE_EXTRA_PAD_SIZE));
+}
+
+static inline __le64 *
+nilfs_btree_node_dptrs(const struct nilfs_btree *btree,
+                      const struct nilfs_btree_node *node)
+{
+       return (__le64 *)(nilfs_btree_node_dkeys(btree, node) +
+                         nilfs_btree_node_nchildren_max(btree, node));
+}
+
+static inline __u64
+nilfs_btree_node_get_key(const struct nilfs_btree *btree,
+                        const struct nilfs_btree_node *node, int index)
+{
+       return nilfs_bmap_dkey_to_key(*(nilfs_btree_node_dkeys(btree, node) +
+                                       index));
+}
+
+static inline void
+nilfs_btree_node_set_key(struct nilfs_btree *btree,
+                        struct nilfs_btree_node *node, int index, __u64 key)
+{
+       *(nilfs_btree_node_dkeys(btree, node) + index) =
+               nilfs_bmap_key_to_dkey(key);
+}
+
+static inline __u64
+nilfs_btree_node_get_ptr(const struct nilfs_btree *btree,
+                        const struct nilfs_btree_node *node,
+                        int index)
+{
+       return nilfs_bmap_dptr_to_ptr(*(nilfs_btree_node_dptrs(btree, node) +
+                                       index));
+}
+
+static inline void
+nilfs_btree_node_set_ptr(struct nilfs_btree *btree,
+                        struct nilfs_btree_node *node,
+                        int index,
+                        __u64 ptr)
+{
+       *(nilfs_btree_node_dptrs(btree, node) + index) =
+               nilfs_bmap_ptr_to_dptr(ptr);
+}
+
+static void nilfs_btree_node_init(struct nilfs_btree *btree,
+                                 struct nilfs_btree_node *node,
+                                 int flags, int level, int nchildren,
+                                 const __u64 *keys, const __u64 *ptrs)
+{
+       __le64 *dkeys;
+       __le64 *dptrs;
+       int i;
+
+       nilfs_btree_node_set_flags(btree, node, flags);
+       nilfs_btree_node_set_level(btree, node, level);
+       nilfs_btree_node_set_nchildren(btree, node, nchildren);
+
+       dkeys = nilfs_btree_node_dkeys(btree, node);
+       dptrs = nilfs_btree_node_dptrs(btree, node);
+       for (i = 0; i < nchildren; i++) {
+               dkeys[i] = nilfs_bmap_key_to_dkey(keys[i]);
+               dptrs[i] = nilfs_bmap_ptr_to_dptr(ptrs[i]);
+       }
+}
+
+/* Assume the buffer heads corresponding to left and right are locked. */
+static void nilfs_btree_node_move_left(struct nilfs_btree *btree,
+                                      struct nilfs_btree_node *left,
+                                      struct nilfs_btree_node *right,
+                                      int n)
+{
+       __le64 *ldkeys, *rdkeys;
+       __le64 *ldptrs, *rdptrs;
+       int lnchildren, rnchildren;
+
+       ldkeys = nilfs_btree_node_dkeys(btree, left);
+       ldptrs = nilfs_btree_node_dptrs(btree, left);
+       lnchildren = nilfs_btree_node_get_nchildren(btree, left);
+
+       rdkeys = nilfs_btree_node_dkeys(btree, right);
+       rdptrs = nilfs_btree_node_dptrs(btree, right);
+       rnchildren = nilfs_btree_node_get_nchildren(btree, right);
+
+       memcpy(ldkeys + lnchildren, rdkeys, n * sizeof(*rdkeys));
+       memcpy(ldptrs + lnchildren, rdptrs, n * sizeof(*rdptrs));
+       memmove(rdkeys, rdkeys + n, (rnchildren - n) * sizeof(*rdkeys));
+       memmove(rdptrs, rdptrs + n, (rnchildren - n) * sizeof(*rdptrs));
+
+       lnchildren += n;
+       rnchildren -= n;
+       nilfs_btree_node_set_nchildren(btree, left, lnchildren);
+       nilfs_btree_node_set_nchildren(btree, right, rnchildren);
+}
+
+/* Assume that the buffer heads corresponding to left and right are locked. */
+static void nilfs_btree_node_move_right(struct nilfs_btree *btree,
+                                       struct nilfs_btree_node *left,
+                                       struct nilfs_btree_node *right,
+                                       int n)
+{
+       __le64 *ldkeys, *rdkeys;
+       __le64 *ldptrs, *rdptrs;
+       int lnchildren, rnchildren;
+
+       ldkeys = nilfs_btree_node_dkeys(btree, left);
+       ldptrs = nilfs_btree_node_dptrs(btree, left);
+       lnchildren = nilfs_btree_node_get_nchildren(btree, left);
+
+       rdkeys = nilfs_btree_node_dkeys(btree, right);
+       rdptrs = nilfs_btree_node_dptrs(btree, right);
+       rnchildren = nilfs_btree_node_get_nchildren(btree, right);
+
+       memmove(rdkeys + n, rdkeys, rnchildren * sizeof(*rdkeys));
+       memmove(rdptrs + n, rdptrs, rnchildren * sizeof(*rdptrs));
+       memcpy(rdkeys, ldkeys + lnchildren - n, n * sizeof(*rdkeys));
+       memcpy(rdptrs, ldptrs + lnchildren - n, n * sizeof(*rdptrs));
+
+       lnchildren -= n;
+       rnchildren += n;
+       nilfs_btree_node_set_nchildren(btree, left, lnchildren);
+       nilfs_btree_node_set_nchildren(btree, right, rnchildren);
+}
+
+/* Assume that the buffer head corresponding to node is locked. */
+static void nilfs_btree_node_insert(struct nilfs_btree *btree,
+                                   struct nilfs_btree_node *node,
+                                   __u64 key, __u64 ptr, int index)
+{
+       __le64 *dkeys;
+       __le64 *dptrs;
+       int nchildren;
+
+       dkeys = nilfs_btree_node_dkeys(btree, node);
+       dptrs = nilfs_btree_node_dptrs(btree, node);
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       if (index < nchildren) {
+               memmove(dkeys + index + 1, dkeys + index,
+                       (nchildren - index) * sizeof(*dkeys));
+               memmove(dptrs + index + 1, dptrs + index,
+                       (nchildren - index) * sizeof(*dptrs));
+       }
+       dkeys[index] = nilfs_bmap_key_to_dkey(key);
+       dptrs[index] = nilfs_bmap_ptr_to_dptr(ptr);
+       nchildren++;
+       nilfs_btree_node_set_nchildren(btree, node, nchildren);
+}
+
+/* Assume that the buffer head corresponding to node is locked. */
+static void nilfs_btree_node_delete(struct nilfs_btree *btree,
+                                   struct nilfs_btree_node *node,
+                                   __u64 *keyp, __u64 *ptrp, int index)
+{
+       __u64 key;
+       __u64 ptr;
+       __le64 *dkeys;
+       __le64 *dptrs;
+       int nchildren;
+
+       dkeys = nilfs_btree_node_dkeys(btree, node);
+       dptrs = nilfs_btree_node_dptrs(btree, node);
+       key = nilfs_bmap_dkey_to_key(dkeys[index]);
+       ptr = nilfs_bmap_dptr_to_ptr(dptrs[index]);
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       if (keyp != NULL)
+               *keyp = key;
+       if (ptrp != NULL)
+               *ptrp = ptr;
+
+       if (index < nchildren - 1) {
+               memmove(dkeys + index, dkeys + index + 1,
+                       (nchildren - index - 1) * sizeof(*dkeys));
+               memmove(dptrs + index, dptrs + index + 1,
+                       (nchildren - index - 1) * sizeof(*dptrs));
+       }
+       nchildren--;
+       nilfs_btree_node_set_nchildren(btree, node, nchildren);
+}
+
+static int nilfs_btree_node_lookup(const struct nilfs_btree *btree,
+                                  const struct nilfs_btree_node *node,
+                                  __u64 key, int *indexp)
+{
+       __u64 nkey;
+       int index, low, high, s;
+
+       /* binary search */
+       low = 0;
+       high = nilfs_btree_node_get_nchildren(btree, node) - 1;
+       index = 0;
+       s = 0;
+       while (low <= high) {
+               index = (low + high) / 2;
+               nkey = nilfs_btree_node_get_key(btree, node, index);
+               if (nkey == key) {
+                       s = 0;
+                       goto out;
+               } else if (nkey < key) {
+                       low = index + 1;
+                       s = -1;
+               } else {
+                       high = index - 1;
+                       s = 1;
+               }
+       }
+
+       /* adjust index */
+       if (nilfs_btree_node_get_level(btree, node) >
+           NILFS_BTREE_LEVEL_NODE_MIN) {
+               if ((s > 0) && (index > 0))
+                       index--;
+       } else if (s < 0)
+               index++;
+
+ out:
+       *indexp = index;
+
+       return s == 0;
+}
+
+static inline struct nilfs_btree_node *
+nilfs_btree_get_root(const struct nilfs_btree *btree)
+{
+       return (struct nilfs_btree_node *)btree->bt_bmap.b_u.u_data;
+}
+
+static inline struct nilfs_btree_node *
+nilfs_btree_get_nonroot_node(const struct nilfs_btree *btree,
+                            const struct nilfs_btree_path *path,
+                            int level)
+{
+       return (struct nilfs_btree_node *)path[level].bp_bh->b_data;
+}
+
+static inline struct nilfs_btree_node *
+nilfs_btree_get_sib_node(const struct nilfs_btree *btree,
+                        const struct nilfs_btree_path *path,
+                        int level)
+{
+       return (struct nilfs_btree_node *)path[level].bp_sib_bh->b_data;
+}
+
+static inline int nilfs_btree_height(const struct nilfs_btree *btree)
+{
+       return nilfs_btree_node_get_level(btree, nilfs_btree_get_root(btree))
+               + 1;
+}
+
+static inline struct nilfs_btree_node *
+nilfs_btree_get_node(const struct nilfs_btree *btree,
+                    const struct nilfs_btree_path *path,
+                    int level)
+{
+       return (level == nilfs_btree_height(btree) - 1) ?
+               nilfs_btree_get_root(btree) :
+               nilfs_btree_get_nonroot_node(btree, path, level);
+}
+
+static int nilfs_btree_do_lookup(const struct nilfs_btree *btree,
+                                struct nilfs_btree_path *path,
+                                __u64 key, __u64 *ptrp, int minlevel)
+{
+       struct nilfs_btree_node *node;
+       __u64 ptr;
+       int level, index, found, ret;
+
+       node = nilfs_btree_get_root(btree);
+       level = nilfs_btree_node_get_level(btree, node);
+       if ((level < minlevel) ||
+           (nilfs_btree_node_get_nchildren(btree, node) <= 0))
+               return -ENOENT;
+
+       found = nilfs_btree_node_lookup(btree, node, key, &index);
+       ptr = nilfs_btree_node_get_ptr(btree, node, index);
+       path[level].bp_bh = NULL;
+       path[level].bp_index = index;
+
+       for (level--; level >= minlevel; level--) {
+               ret = nilfs_bmap_get_block(&btree->bt_bmap, ptr,
+                                          &path[level].bp_bh);
+               if (ret < 0)
+                       return ret;
+               node = nilfs_btree_get_nonroot_node(btree, path, level);
+               BUG_ON(level != nilfs_btree_node_get_level(btree, node));
+               if (!found)
+                       found = nilfs_btree_node_lookup(btree, node, key,
+                                                       &index);
+               else
+                       index = 0;
+               if (index < nilfs_btree_node_nchildren_max(btree, node))
+                       ptr = nilfs_btree_node_get_ptr(btree, node, index);
+               else {
+                       WARN_ON(found || level != NILFS_BTREE_LEVEL_NODE_MIN);
+                       /* insert */
+                       ptr = NILFS_BMAP_INVALID_PTR;
+               }
+               path[level].bp_index = index;
+       }
+       if (!found)
+               return -ENOENT;
+
+       if (ptrp != NULL)
+               *ptrp = ptr;
+
+       return 0;
+}
+
+static int nilfs_btree_do_lookup_last(const struct nilfs_btree *btree,
+                                     struct nilfs_btree_path *path,
+                                     __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node;
+       __u64 ptr;
+       int index, level, ret;
+
+       node = nilfs_btree_get_root(btree);
+       index = nilfs_btree_node_get_nchildren(btree, node) - 1;
+       if (index < 0)
+               return -ENOENT;
+       level = nilfs_btree_node_get_level(btree, node);
+       ptr = nilfs_btree_node_get_ptr(btree, node, index);
+       path[level].bp_bh = NULL;
+       path[level].bp_index = index;
+
+       for (level--; level > 0; level--) {
+               ret = nilfs_bmap_get_block(&btree->bt_bmap, ptr,
+                                          &path[level].bp_bh);
+               if (ret < 0)
+                       return ret;
+               node = nilfs_btree_get_nonroot_node(btree, path, level);
+               BUG_ON(level != nilfs_btree_node_get_level(btree, node));
+               index = nilfs_btree_node_get_nchildren(btree, node) - 1;
+               ptr = nilfs_btree_node_get_ptr(btree, node, index);
+               path[level].bp_index = index;
+       }
+
+       if (keyp != NULL)
+               *keyp = nilfs_btree_node_get_key(btree, node, index);
+       if (ptrp != NULL)
+               *ptrp = ptr;
+
+       return 0;
+}
+
+static int nilfs_btree_lookup(const struct nilfs_bmap *bmap,
+                             __u64 key, int level, __u64 *ptrp)
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_path *path;
+       __u64 ptr;
+       int ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       path = nilfs_btree_alloc_path(btree);
+       if (path == NULL)
+               return -ENOMEM;
+       nilfs_btree_init_path(btree, path);
+
+       ret = nilfs_btree_do_lookup(btree, path, key, &ptr, level);
+
+       if (ptrp != NULL)
+               *ptrp = ptr;
+
+       nilfs_btree_clear_path(btree, path);
+       nilfs_btree_free_path(btree, path);
+
+       return ret;
+}
+
+static void nilfs_btree_promote_key(struct nilfs_btree *btree,
+                                   struct nilfs_btree_path *path,
+                                   int level, __u64 key)
+{
+       if (level < nilfs_btree_height(btree) - 1) {
+               do {
+                       lock_buffer(path[level].bp_bh);
+                       nilfs_btree_node_set_key(
+                               btree,
+                               nilfs_btree_get_nonroot_node(
+                                       btree, path, level),
+                               path[level].bp_index, key);
+                       if (!buffer_dirty(path[level].bp_bh))
+                               nilfs_btnode_mark_dirty(path[level].bp_bh);
+                       unlock_buffer(path[level].bp_bh);
+               } while ((path[level].bp_index == 0) &&
+                        (++level < nilfs_btree_height(btree) - 1));
+       }
+
+       /* root */
+       if (level == nilfs_btree_height(btree) - 1) {
+               nilfs_btree_node_set_key(btree,
+                                        nilfs_btree_get_root(btree),
+                                        path[level].bp_index, key);
+       }
+}
+
+static void nilfs_btree_do_insert(struct nilfs_btree *btree,
+                                 struct nilfs_btree_path *path,
+                                 int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node;
+
+       if (level < nilfs_btree_height(btree) - 1) {
+               lock_buffer(path[level].bp_bh);
+               node = nilfs_btree_get_nonroot_node(btree, path, level);
+               nilfs_btree_node_insert(btree, node, *keyp, *ptrp,
+                                       path[level].bp_index);
+               if (!buffer_dirty(path[level].bp_bh))
+                       nilfs_btnode_mark_dirty(path[level].bp_bh);
+               unlock_buffer(path[level].bp_bh);
+
+               if (path[level].bp_index == 0)
+                       nilfs_btree_promote_key(btree, path, level + 1,
+                                               nilfs_btree_node_get_key(
+                                                       btree, node, 0));
+       } else {
+               node = nilfs_btree_get_root(btree);
+               nilfs_btree_node_insert(btree, node, *keyp, *ptrp,
+                                       path[level].bp_index);
+       }
+}
+
+static void nilfs_btree_carry_left(struct nilfs_btree *btree,
+                                  struct nilfs_btree_path *path,
+                                  int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node, *left;
+       int nchildren, lnchildren, n, move;
+
+       lock_buffer(path[level].bp_bh);
+       lock_buffer(path[level].bp_sib_bh);
+
+       node = nilfs_btree_get_nonroot_node(btree, path, level);
+       left = nilfs_btree_get_sib_node(btree, path, level);
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       lnchildren = nilfs_btree_node_get_nchildren(btree, left);
+       move = 0;
+
+       n = (nchildren + lnchildren + 1) / 2 - lnchildren;
+       if (n > path[level].bp_index) {
+               /* move insert point */
+               n--;
+               move = 1;
+       }
+
+       nilfs_btree_node_move_left(btree, left, node, n);
+
+       if (!buffer_dirty(path[level].bp_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_bh);
+       if (!buffer_dirty(path[level].bp_sib_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_sib_bh);
+
+       unlock_buffer(path[level].bp_bh);
+       unlock_buffer(path[level].bp_sib_bh);
+
+       nilfs_btree_promote_key(btree, path, level + 1,
+                               nilfs_btree_node_get_key(btree, node, 0));
+
+       if (move) {
+               nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_bh);
+               path[level].bp_bh = path[level].bp_sib_bh;
+               path[level].bp_sib_bh = NULL;
+               path[level].bp_index += lnchildren;
+               path[level + 1].bp_index--;
+       } else {
+               nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh);
+               path[level].bp_sib_bh = NULL;
+               path[level].bp_index -= n;
+       }
+
+       nilfs_btree_do_insert(btree, path, level, keyp, ptrp);
+}
+
+static void nilfs_btree_carry_right(struct nilfs_btree *btree,
+                                   struct nilfs_btree_path *path,
+                                   int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node, *right;
+       int nchildren, rnchildren, n, move;
+
+       lock_buffer(path[level].bp_bh);
+       lock_buffer(path[level].bp_sib_bh);
+
+       node = nilfs_btree_get_nonroot_node(btree, path, level);
+       right = nilfs_btree_get_sib_node(btree, path, level);
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       rnchildren = nilfs_btree_node_get_nchildren(btree, right);
+       move = 0;
+
+       n = (nchildren + rnchildren + 1) / 2 - rnchildren;
+       if (n > nchildren - path[level].bp_index) {
+               /* move insert point */
+               n--;
+               move = 1;
+       }
+
+       nilfs_btree_node_move_right(btree, node, right, n);
+
+       if (!buffer_dirty(path[level].bp_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_bh);
+       if (!buffer_dirty(path[level].bp_sib_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_sib_bh);
+
+       unlock_buffer(path[level].bp_bh);
+       unlock_buffer(path[level].bp_sib_bh);
+
+       path[level + 1].bp_index++;
+       nilfs_btree_promote_key(btree, path, level + 1,
+                               nilfs_btree_node_get_key(btree, right, 0));
+       path[level + 1].bp_index--;
+
+       if (move) {
+               nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_bh);
+               path[level].bp_bh = path[level].bp_sib_bh;
+               path[level].bp_sib_bh = NULL;
+               path[level].bp_index -=
+                       nilfs_btree_node_get_nchildren(btree, node);
+               path[level + 1].bp_index++;
+       } else {
+               nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh);
+               path[level].bp_sib_bh = NULL;
+       }
+
+       nilfs_btree_do_insert(btree, path, level, keyp, ptrp);
+}
+
+static void nilfs_btree_split(struct nilfs_btree *btree,
+                             struct nilfs_btree_path *path,
+                             int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node, *right;
+       __u64 newkey;
+       __u64 newptr;
+       int nchildren, n, move;
+
+       lock_buffer(path[level].bp_bh);
+       lock_buffer(path[level].bp_sib_bh);
+
+       node = nilfs_btree_get_nonroot_node(btree, path, level);
+       right = nilfs_btree_get_sib_node(btree, path, level);
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       move = 0;
+
+       n = (nchildren + 1) / 2;
+       if (n > nchildren - path[level].bp_index) {
+               n--;
+               move = 1;
+       }
+
+       nilfs_btree_node_move_right(btree, node, right, n);
+
+       if (!buffer_dirty(path[level].bp_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_bh);
+       if (!buffer_dirty(path[level].bp_sib_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_sib_bh);
+
+       unlock_buffer(path[level].bp_bh);
+       unlock_buffer(path[level].bp_sib_bh);
+
+       newkey = nilfs_btree_node_get_key(btree, right, 0);
+       newptr = path[level].bp_newreq.bpr_ptr;
+
+       if (move) {
+               path[level].bp_index -=
+                       nilfs_btree_node_get_nchildren(btree, node);
+               nilfs_btree_node_insert(btree, right, *keyp, *ptrp,
+                                       path[level].bp_index);
+
+               *keyp = nilfs_btree_node_get_key(btree, right, 0);
+               *ptrp = path[level].bp_newreq.bpr_ptr;
+
+               nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_bh);
+               path[level].bp_bh = path[level].bp_sib_bh;
+               path[level].bp_sib_bh = NULL;
+       } else {
+               nilfs_btree_do_insert(btree, path, level, keyp, ptrp);
+
+               *keyp = nilfs_btree_node_get_key(btree, right, 0);
+               *ptrp = path[level].bp_newreq.bpr_ptr;
+
+               nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh);
+               path[level].bp_sib_bh = NULL;
+       }
+
+       path[level + 1].bp_index++;
+}
+
+static void nilfs_btree_grow(struct nilfs_btree *btree,
+                            struct nilfs_btree_path *path,
+                            int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *root, *child;
+       int n;
+
+       lock_buffer(path[level].bp_sib_bh);
+
+       root = nilfs_btree_get_root(btree);
+       child = nilfs_btree_get_sib_node(btree, path, level);
+
+       n = nilfs_btree_node_get_nchildren(btree, root);
+
+       nilfs_btree_node_move_right(btree, root, child, n);
+       nilfs_btree_node_set_level(btree, root, level + 1);
+
+       if (!buffer_dirty(path[level].bp_sib_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_sib_bh);
+
+       unlock_buffer(path[level].bp_sib_bh);
+
+       path[level].bp_bh = path[level].bp_sib_bh;
+       path[level].bp_sib_bh = NULL;
+
+       nilfs_btree_do_insert(btree, path, level, keyp, ptrp);
+
+       *keyp = nilfs_btree_node_get_key(btree, child, 0);
+       *ptrp = path[level].bp_newreq.bpr_ptr;
+}
+
+static __u64 nilfs_btree_find_near(const struct nilfs_btree *btree,
+                                  const struct nilfs_btree_path *path)
+{
+       struct nilfs_btree_node *node;
+       int level;
+
+       if (path == NULL)
+               return NILFS_BMAP_INVALID_PTR;
+
+       /* left sibling */
+       level = NILFS_BTREE_LEVEL_NODE_MIN;
+       if (path[level].bp_index > 0) {
+               node = nilfs_btree_get_node(btree, path, level);
+               return nilfs_btree_node_get_ptr(btree, node,
+                                               path[level].bp_index - 1);
+       }
+
+       /* parent */
+       level = NILFS_BTREE_LEVEL_NODE_MIN + 1;
+       if (level <= nilfs_btree_height(btree) - 1) {
+               node = nilfs_btree_get_node(btree, path, level);
+               return nilfs_btree_node_get_ptr(btree, node,
+                                               path[level].bp_index);
+       }
+
+       return NILFS_BMAP_INVALID_PTR;
+}
+
+static __u64 nilfs_btree_find_target_v(const struct nilfs_btree *btree,
+                                      const struct nilfs_btree_path *path,
+                                      __u64 key)
+{
+       __u64 ptr;
+
+       ptr = nilfs_bmap_find_target_seq(&btree->bt_bmap, key);
+       if (ptr != NILFS_BMAP_INVALID_PTR)
+               /* sequential access */
+               return ptr;
+       else {
+               ptr = nilfs_btree_find_near(btree, path);
+               if (ptr != NILFS_BMAP_INVALID_PTR)
+                       /* near */
+                       return ptr;
+       }
+       /* block group */
+       return nilfs_bmap_find_target_in_group(&btree->bt_bmap);
+}
+
+static void nilfs_btree_set_target_v(struct nilfs_btree *btree, __u64 key,
+                                    __u64 ptr)
+{
+       btree->bt_bmap.b_last_allocated_key = key;
+       btree->bt_bmap.b_last_allocated_ptr = ptr;
+}
+
+static int nilfs_btree_prepare_insert(struct nilfs_btree *btree,
+                                     struct nilfs_btree_path *path,
+                                     int *levelp, __u64 key, __u64 ptr,
+                                     struct nilfs_bmap_stats *stats)
+{
+       struct buffer_head *bh;
+       struct nilfs_btree_node *node, *parent, *sib;
+       __u64 sibptr;
+       int pindex, level, ret;
+
+       stats->bs_nblocks = 0;
+       level = NILFS_BTREE_LEVEL_DATA;
+
+       /* allocate a new ptr for data block */
+       if (btree->bt_ops->btop_find_target != NULL)
+               path[level].bp_newreq.bpr_ptr =
+                       btree->bt_ops->btop_find_target(btree, path, key);
+
+       ret = btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr(
+               &btree->bt_bmap, &path[level].bp_newreq);
+       if (ret < 0)
+               goto err_out_data;
+
+       for (level = NILFS_BTREE_LEVEL_NODE_MIN;
+            level < nilfs_btree_height(btree) - 1;
+            level++) {
+               node = nilfs_btree_get_nonroot_node(btree, path, level);
+               if (nilfs_btree_node_get_nchildren(btree, node) <
+                   nilfs_btree_node_nchildren_max(btree, node)) {
+                       path[level].bp_op = nilfs_btree_do_insert;
+                       stats->bs_nblocks++;
+                       goto out;
+               }
+
+               parent = nilfs_btree_get_node(btree, path, level + 1);
+               pindex = path[level + 1].bp_index;
+
+               /* left sibling */
+               if (pindex > 0) {
+                       sibptr = nilfs_btree_node_get_ptr(btree, parent,
+                                                         pindex - 1);
+                       ret = nilfs_bmap_get_block(&btree->bt_bmap, sibptr,
+                                                  &bh);
+                       if (ret < 0)
+                               goto err_out_child_node;
+                       sib = (struct nilfs_btree_node *)bh->b_data;
+                       if (nilfs_btree_node_get_nchildren(btree, sib) <
+                           nilfs_btree_node_nchildren_max(btree, sib)) {
+                               path[level].bp_sib_bh = bh;
+                               path[level].bp_op = nilfs_btree_carry_left;
+                               stats->bs_nblocks++;
+                               goto out;
+                       } else
+                               nilfs_bmap_put_block(&btree->bt_bmap, bh);
+               }
+
+               /* right sibling */
+               if (pindex <
+                   nilfs_btree_node_get_nchildren(btree, parent) - 1) {
+                       sibptr = nilfs_btree_node_get_ptr(btree, parent,
+                                                         pindex + 1);
+                       ret = nilfs_bmap_get_block(&btree->bt_bmap, sibptr,
+                                                  &bh);
+                       if (ret < 0)
+                               goto err_out_child_node;
+                       sib = (struct nilfs_btree_node *)bh->b_data;
+                       if (nilfs_btree_node_get_nchildren(btree, sib) <
+                           nilfs_btree_node_nchildren_max(btree, sib)) {
+                               path[level].bp_sib_bh = bh;
+                               path[level].bp_op = nilfs_btree_carry_right;
+                               stats->bs_nblocks++;
+                               goto out;
+                       } else
+                               nilfs_bmap_put_block(&btree->bt_bmap, bh);
+               }
+
+               /* split */
+               path[level].bp_newreq.bpr_ptr =
+                       path[level - 1].bp_newreq.bpr_ptr + 1;
+               ret = btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr(
+                       &btree->bt_bmap, &path[level].bp_newreq);
+               if (ret < 0)
+                       goto err_out_child_node;
+               ret = nilfs_bmap_get_new_block(&btree->bt_bmap,
+                                              path[level].bp_newreq.bpr_ptr,
+                                              &bh);
+               if (ret < 0)
+                       goto err_out_curr_node;
+
+               stats->bs_nblocks++;
+
+               lock_buffer(bh);
+               nilfs_btree_node_init(btree,
+                                     (struct nilfs_btree_node *)bh->b_data,
+                                     0, level, 0, NULL, NULL);
+               unlock_buffer(bh);
+               path[level].bp_sib_bh = bh;
+               path[level].bp_op = nilfs_btree_split;
+       }
+
+       /* root */
+       node = nilfs_btree_get_root(btree);
+       if (nilfs_btree_node_get_nchildren(btree, node) <
+           nilfs_btree_node_nchildren_max(btree, node)) {
+               path[level].bp_op = nilfs_btree_do_insert;
+               stats->bs_nblocks++;
+               goto out;
+       }
+
+       /* grow */
+       path[level].bp_newreq.bpr_ptr = path[level - 1].bp_newreq.bpr_ptr + 1;
+       ret = btree->bt_bmap.b_pops->bpop_prepare_alloc_ptr(
+               &btree->bt_bmap, &path[level].bp_newreq);
+       if (ret < 0)
+               goto err_out_child_node;
+       ret = nilfs_bmap_get_new_block(&btree->bt_bmap,
+                                      path[level].bp_newreq.bpr_ptr, &bh);
+       if (ret < 0)
+               goto err_out_curr_node;
+
+       lock_buffer(bh);
+       nilfs_btree_node_init(btree, (struct nilfs_btree_node *)bh->b_data,
+                             0, level, 0, NULL, NULL);
+       unlock_buffer(bh);
+       path[level].bp_sib_bh = bh;
+       path[level].bp_op = nilfs_btree_grow;
+
+       level++;
+       path[level].bp_op = nilfs_btree_do_insert;
+
+       /* a newly-created node block and a data block are added */
+       stats->bs_nblocks += 2;
+
+       /* success */
+ out:
+       *levelp = level;
+       return ret;
+
+       /* error */
+ err_out_curr_node:
+       btree->bt_bmap.b_pops->bpop_abort_alloc_ptr(&btree->bt_bmap,
+                                                   &path[level].bp_newreq);
+ err_out_child_node:
+       for (level--; level > NILFS_BTREE_LEVEL_DATA; level--) {
+               nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_sib_bh);
+               btree->bt_bmap.b_pops->bpop_abort_alloc_ptr(
+                       &btree->bt_bmap, &path[level].bp_newreq);
+
+       }
+
+       btree->bt_bmap.b_pops->bpop_abort_alloc_ptr(&btree->bt_bmap,
+                                                      &path[level].bp_newreq);
+ err_out_data:
+       *levelp = level;
+       stats->bs_nblocks = 0;
+       return ret;
+}
+
+static void nilfs_btree_commit_insert(struct nilfs_btree *btree,
+                                     struct nilfs_btree_path *path,
+                                     int maxlevel, __u64 key, __u64 ptr)
+{
+       int level;
+
+       set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr));
+       ptr = path[NILFS_BTREE_LEVEL_DATA].bp_newreq.bpr_ptr;
+       if (btree->bt_ops->btop_set_target != NULL)
+               btree->bt_ops->btop_set_target(btree, key, ptr);
+
+       for (level = NILFS_BTREE_LEVEL_NODE_MIN; level <= maxlevel; level++) {
+               if (btree->bt_bmap.b_pops->bpop_commit_alloc_ptr != NULL) {
+                       btree->bt_bmap.b_pops->bpop_commit_alloc_ptr(
+                               &btree->bt_bmap, &path[level - 1].bp_newreq);
+               }
+               path[level].bp_op(btree, path, level, &key, &ptr);
+       }
+
+       if (!nilfs_bmap_dirty(&btree->bt_bmap))
+               nilfs_bmap_set_dirty(&btree->bt_bmap);
+}
+
+static int nilfs_btree_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_path *path;
+       struct nilfs_bmap_stats stats;
+       int level, ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       path = nilfs_btree_alloc_path(btree);
+       if (path == NULL)
+               return -ENOMEM;
+       nilfs_btree_init_path(btree, path);
+
+       ret = nilfs_btree_do_lookup(btree, path, key, NULL,
+                                   NILFS_BTREE_LEVEL_NODE_MIN);
+       if (ret != -ENOENT) {
+               if (ret == 0)
+                       ret = -EEXIST;
+               goto out;
+       }
+
+       ret = nilfs_btree_prepare_insert(btree, path, &level, key, ptr, &stats);
+       if (ret < 0)
+               goto out;
+       nilfs_btree_commit_insert(btree, path, level, key, ptr);
+       nilfs_bmap_add_blocks(bmap, stats.bs_nblocks);
+
+ out:
+       nilfs_btree_clear_path(btree, path);
+       nilfs_btree_free_path(btree, path);
+       return ret;
+}
+
+static void nilfs_btree_do_delete(struct nilfs_btree *btree,
+                                 struct nilfs_btree_path *path,
+                                 int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node;
+
+       if (level < nilfs_btree_height(btree) - 1) {
+               lock_buffer(path[level].bp_bh);
+               node = nilfs_btree_get_nonroot_node(btree, path, level);
+               nilfs_btree_node_delete(btree, node, keyp, ptrp,
+                                       path[level].bp_index);
+               if (!buffer_dirty(path[level].bp_bh))
+                       nilfs_btnode_mark_dirty(path[level].bp_bh);
+               unlock_buffer(path[level].bp_bh);
+               if (path[level].bp_index == 0)
+                       nilfs_btree_promote_key(btree, path, level + 1,
+                               nilfs_btree_node_get_key(btree, node, 0));
+       } else {
+               node = nilfs_btree_get_root(btree);
+               nilfs_btree_node_delete(btree, node, keyp, ptrp,
+                                       path[level].bp_index);
+       }
+}
+
+static void nilfs_btree_borrow_left(struct nilfs_btree *btree,
+                                   struct nilfs_btree_path *path,
+                                   int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node, *left;
+       int nchildren, lnchildren, n;
+
+       nilfs_btree_do_delete(btree, path, level, keyp, ptrp);
+
+       lock_buffer(path[level].bp_bh);
+       lock_buffer(path[level].bp_sib_bh);
+
+       node = nilfs_btree_get_nonroot_node(btree, path, level);
+       left = nilfs_btree_get_sib_node(btree, path, level);
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       lnchildren = nilfs_btree_node_get_nchildren(btree, left);
+
+       n = (nchildren + lnchildren) / 2 - nchildren;
+
+       nilfs_btree_node_move_right(btree, left, node, n);
+
+       if (!buffer_dirty(path[level].bp_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_bh);
+       if (!buffer_dirty(path[level].bp_sib_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_sib_bh);
+
+       unlock_buffer(path[level].bp_bh);
+       unlock_buffer(path[level].bp_sib_bh);
+
+       nilfs_btree_promote_key(btree, path, level + 1,
+                               nilfs_btree_node_get_key(btree, node, 0));
+
+       nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh);
+       path[level].bp_sib_bh = NULL;
+       path[level].bp_index += n;
+}
+
+static void nilfs_btree_borrow_right(struct nilfs_btree *btree,
+                                    struct nilfs_btree_path *path,
+                                    int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node, *right;
+       int nchildren, rnchildren, n;
+
+       nilfs_btree_do_delete(btree, path, level, keyp, ptrp);
+
+       lock_buffer(path[level].bp_bh);
+       lock_buffer(path[level].bp_sib_bh);
+
+       node = nilfs_btree_get_nonroot_node(btree, path, level);
+       right = nilfs_btree_get_sib_node(btree, path, level);
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       rnchildren = nilfs_btree_node_get_nchildren(btree, right);
+
+       n = (nchildren + rnchildren) / 2 - nchildren;
+
+       nilfs_btree_node_move_left(btree, node, right, n);
+
+       if (!buffer_dirty(path[level].bp_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_bh);
+       if (!buffer_dirty(path[level].bp_sib_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_sib_bh);
+
+       unlock_buffer(path[level].bp_bh);
+       unlock_buffer(path[level].bp_sib_bh);
+
+       path[level + 1].bp_index++;
+       nilfs_btree_promote_key(btree, path, level + 1,
+                               nilfs_btree_node_get_key(btree, right, 0));
+       path[level + 1].bp_index--;
+
+       nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh);
+       path[level].bp_sib_bh = NULL;
+}
+
+static void nilfs_btree_concat_left(struct nilfs_btree *btree,
+                                   struct nilfs_btree_path *path,
+                                   int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node, *left;
+       int n;
+
+       nilfs_btree_do_delete(btree, path, level, keyp, ptrp);
+
+       lock_buffer(path[level].bp_bh);
+       lock_buffer(path[level].bp_sib_bh);
+
+       node = nilfs_btree_get_nonroot_node(btree, path, level);
+       left = nilfs_btree_get_sib_node(btree, path, level);
+
+       n = nilfs_btree_node_get_nchildren(btree, node);
+
+       nilfs_btree_node_move_left(btree, left, node, n);
+
+       if (!buffer_dirty(path[level].bp_sib_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_sib_bh);
+
+       unlock_buffer(path[level].bp_bh);
+       unlock_buffer(path[level].bp_sib_bh);
+
+       nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_bh);
+       path[level].bp_bh = path[level].bp_sib_bh;
+       path[level].bp_sib_bh = NULL;
+       path[level].bp_index += nilfs_btree_node_get_nchildren(btree, left);
+}
+
+static void nilfs_btree_concat_right(struct nilfs_btree *btree,
+                                    struct nilfs_btree_path *path,
+                                    int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *node, *right;
+       int n;
+
+       nilfs_btree_do_delete(btree, path, level, keyp, ptrp);
+
+       lock_buffer(path[level].bp_bh);
+       lock_buffer(path[level].bp_sib_bh);
+
+       node = nilfs_btree_get_nonroot_node(btree, path, level);
+       right = nilfs_btree_get_sib_node(btree, path, level);
+
+       n = nilfs_btree_node_get_nchildren(btree, right);
+
+       nilfs_btree_node_move_left(btree, node, right, n);
+
+       if (!buffer_dirty(path[level].bp_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_bh);
+
+       unlock_buffer(path[level].bp_bh);
+       unlock_buffer(path[level].bp_sib_bh);
+
+       nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_sib_bh);
+       path[level].bp_sib_bh = NULL;
+       path[level + 1].bp_index++;
+}
+
+static void nilfs_btree_shrink(struct nilfs_btree *btree,
+                              struct nilfs_btree_path *path,
+                              int level, __u64 *keyp, __u64 *ptrp)
+{
+       struct nilfs_btree_node *root, *child;
+       int n;
+
+       nilfs_btree_do_delete(btree, path, level, keyp, ptrp);
+
+       lock_buffer(path[level].bp_bh);
+       root = nilfs_btree_get_root(btree);
+       child = nilfs_btree_get_nonroot_node(btree, path, level);
+
+       nilfs_btree_node_delete(btree, root, NULL, NULL, 0);
+       nilfs_btree_node_set_level(btree, root, level);
+       n = nilfs_btree_node_get_nchildren(btree, child);
+       nilfs_btree_node_move_left(btree, root, child, n);
+       unlock_buffer(path[level].bp_bh);
+
+       nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_bh);
+       path[level].bp_bh = NULL;
+}
+
+
+static int nilfs_btree_prepare_delete(struct nilfs_btree *btree,
+                                     struct nilfs_btree_path *path,
+                                     int *levelp,
+                                     struct nilfs_bmap_stats *stats)
+{
+       struct buffer_head *bh;
+       struct nilfs_btree_node *node, *parent, *sib;
+       __u64 sibptr;
+       int pindex, level, ret;
+
+       ret = 0;
+       stats->bs_nblocks = 0;
+       for (level = NILFS_BTREE_LEVEL_NODE_MIN;
+            level < nilfs_btree_height(btree) - 1;
+            level++) {
+               node = nilfs_btree_get_nonroot_node(btree, path, level);
+               path[level].bp_oldreq.bpr_ptr =
+                       nilfs_btree_node_get_ptr(btree, node,
+                                                path[level].bp_index);
+               if (btree->bt_bmap.b_pops->bpop_prepare_end_ptr != NULL) {
+                       ret = btree->bt_bmap.b_pops->bpop_prepare_end_ptr(
+                               &btree->bt_bmap, &path[level].bp_oldreq);
+                       if (ret < 0)
+                               goto err_out_child_node;
+               }
+
+               if (nilfs_btree_node_get_nchildren(btree, node) >
+                   nilfs_btree_node_nchildren_min(btree, node)) {
+                       path[level].bp_op = nilfs_btree_do_delete;
+                       stats->bs_nblocks++;
+                       goto out;
+               }
+
+               parent = nilfs_btree_get_node(btree, path, level + 1);
+               pindex = path[level + 1].bp_index;
+
+               if (pindex > 0) {
+                       /* left sibling */
+                       sibptr = nilfs_btree_node_get_ptr(btree, parent,
+                                                         pindex - 1);
+                       ret = nilfs_bmap_get_block(&btree->bt_bmap, sibptr,
+                                                  &bh);
+                       if (ret < 0)
+                               goto err_out_curr_node;
+                       sib = (struct nilfs_btree_node *)bh->b_data;
+                       if (nilfs_btree_node_get_nchildren(btree, sib) >
+                           nilfs_btree_node_nchildren_min(btree, sib)) {
+                               path[level].bp_sib_bh = bh;
+                               path[level].bp_op = nilfs_btree_borrow_left;
+                               stats->bs_nblocks++;
+                               goto out;
+                       } else {
+                               path[level].bp_sib_bh = bh;
+                               path[level].bp_op = nilfs_btree_concat_left;
+                               stats->bs_nblocks++;
+                               /* continue; */
+                       }
+               } else if (pindex <
+                          nilfs_btree_node_get_nchildren(btree, parent) - 1) {
+                       /* right sibling */
+                       sibptr = nilfs_btree_node_get_ptr(btree, parent,
+                                                         pindex + 1);
+                       ret = nilfs_bmap_get_block(&btree->bt_bmap, sibptr,
+                                                  &bh);
+                       if (ret < 0)
+                               goto err_out_curr_node;
+                       sib = (struct nilfs_btree_node *)bh->b_data;
+                       if (nilfs_btree_node_get_nchildren(btree, sib) >
+                           nilfs_btree_node_nchildren_min(btree, sib)) {
+                               path[level].bp_sib_bh = bh;
+                               path[level].bp_op = nilfs_btree_borrow_right;
+                               stats->bs_nblocks++;
+                               goto out;
+                       } else {
+                               path[level].bp_sib_bh = bh;
+                               path[level].bp_op = nilfs_btree_concat_right;
+                               stats->bs_nblocks++;
+                               /* continue; */
+                       }
+               } else {
+                       /* no siblings */
+                       /* the only child of the root node */
+                       WARN_ON(level != nilfs_btree_height(btree) - 2);
+                       if (nilfs_btree_node_get_nchildren(btree, node) - 1 <=
+                           NILFS_BTREE_ROOT_NCHILDREN_MAX) {
+                               path[level].bp_op = nilfs_btree_shrink;
+                               stats->bs_nblocks += 2;
+                       } else {
+                               path[level].bp_op = nilfs_btree_do_delete;
+                               stats->bs_nblocks++;
+                       }
+
+                       goto out;
+
+               }
+       }
+
+       node = nilfs_btree_get_root(btree);
+       path[level].bp_oldreq.bpr_ptr =
+               nilfs_btree_node_get_ptr(btree, node, path[level].bp_index);
+       if (btree->bt_bmap.b_pops->bpop_prepare_end_ptr != NULL) {
+               ret = btree->bt_bmap.b_pops->bpop_prepare_end_ptr(
+                       &btree->bt_bmap, &path[level].bp_oldreq);
+               if (ret < 0)
+                       goto err_out_child_node;
+       }
+       /* child of the root node is deleted */
+       path[level].bp_op = nilfs_btree_do_delete;
+       stats->bs_nblocks++;
+
+       /* success */
+ out:
+       *levelp = level;
+       return ret;
+
+       /* error */
+ err_out_curr_node:
+       if (btree->bt_bmap.b_pops->bpop_abort_end_ptr != NULL)
+               btree->bt_bmap.b_pops->bpop_abort_end_ptr(
+                       &btree->bt_bmap, &path[level].bp_oldreq);
+ err_out_child_node:
+       for (level--; level >= NILFS_BTREE_LEVEL_NODE_MIN; level--) {
+               nilfs_bmap_put_block(&btree->bt_bmap, path[level].bp_sib_bh);
+               if (btree->bt_bmap.b_pops->bpop_abort_end_ptr != NULL)
+                       btree->bt_bmap.b_pops->bpop_abort_end_ptr(
+                               &btree->bt_bmap, &path[level].bp_oldreq);
+       }
+       *levelp = level;
+       stats->bs_nblocks = 0;
+       return ret;
+}
+
+static void nilfs_btree_commit_delete(struct nilfs_btree *btree,
+                                     struct nilfs_btree_path *path,
+                                     int maxlevel)
+{
+       int level;
+
+       for (level = NILFS_BTREE_LEVEL_NODE_MIN; level <= maxlevel; level++) {
+               if (btree->bt_bmap.b_pops->bpop_commit_end_ptr != NULL)
+                       btree->bt_bmap.b_pops->bpop_commit_end_ptr(
+                               &btree->bt_bmap, &path[level].bp_oldreq);
+               path[level].bp_op(btree, path, level, NULL, NULL);
+       }
+
+       if (!nilfs_bmap_dirty(&btree->bt_bmap))
+               nilfs_bmap_set_dirty(&btree->bt_bmap);
+}
+
+static int nilfs_btree_delete(struct nilfs_bmap *bmap, __u64 key)
+
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_path *path;
+       struct nilfs_bmap_stats stats;
+       int level, ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       path = nilfs_btree_alloc_path(btree);
+       if (path == NULL)
+               return -ENOMEM;
+       nilfs_btree_init_path(btree, path);
+       ret = nilfs_btree_do_lookup(btree, path, key, NULL,
+                                   NILFS_BTREE_LEVEL_NODE_MIN);
+       if (ret < 0)
+               goto out;
+
+       ret = nilfs_btree_prepare_delete(btree, path, &level, &stats);
+       if (ret < 0)
+               goto out;
+       nilfs_btree_commit_delete(btree, path, level);
+       nilfs_bmap_sub_blocks(bmap, stats.bs_nblocks);
+
+out:
+       nilfs_btree_clear_path(btree, path);
+       nilfs_btree_free_path(btree, path);
+       return ret;
+}
+
+static int nilfs_btree_last_key(const struct nilfs_bmap *bmap, __u64 *keyp)
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_path *path;
+       int ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       path = nilfs_btree_alloc_path(btree);
+       if (path == NULL)
+               return -ENOMEM;
+       nilfs_btree_init_path(btree, path);
+
+       ret = nilfs_btree_do_lookup_last(btree, path, keyp, NULL);
+
+       nilfs_btree_clear_path(btree, path);
+       nilfs_btree_free_path(btree, path);
+
+       return ret;
+}
+
+static int nilfs_btree_check_delete(struct nilfs_bmap *bmap, __u64 key)
+{
+       struct buffer_head *bh;
+       struct nilfs_btree *btree;
+       struct nilfs_btree_node *root, *node;
+       __u64 maxkey, nextmaxkey;
+       __u64 ptr;
+       int nchildren, ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       root = nilfs_btree_get_root(btree);
+       switch (nilfs_btree_height(btree)) {
+       case 2:
+               bh = NULL;
+               node = root;
+               break;
+       case 3:
+               nchildren = nilfs_btree_node_get_nchildren(btree, root);
+               if (nchildren > 1)
+                       return 0;
+               ptr = nilfs_btree_node_get_ptr(btree, root, nchildren - 1);
+               ret = nilfs_bmap_get_block(bmap, ptr, &bh);
+               if (ret < 0)
+                       return ret;
+               node = (struct nilfs_btree_node *)bh->b_data;
+               break;
+       default:
+               return 0;
+       }
+
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       maxkey = nilfs_btree_node_get_key(btree, node, nchildren - 1);
+       nextmaxkey = (nchildren > 1) ?
+               nilfs_btree_node_get_key(btree, node, nchildren - 2) : 0;
+       if (bh != NULL)
+               nilfs_bmap_put_block(bmap, bh);
+
+       return (maxkey == key) && (nextmaxkey < bmap->b_low);
+}
+
+static int nilfs_btree_gather_data(struct nilfs_bmap *bmap,
+                                  __u64 *keys, __u64 *ptrs, int nitems)
+{
+       struct buffer_head *bh;
+       struct nilfs_btree *btree;
+       struct nilfs_btree_node *node, *root;
+       __le64 *dkeys;
+       __le64 *dptrs;
+       __u64 ptr;
+       int nchildren, i, ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       root = nilfs_btree_get_root(btree);
+       switch (nilfs_btree_height(btree)) {
+       case 2:
+               bh = NULL;
+               node = root;
+               break;
+       case 3:
+               nchildren = nilfs_btree_node_get_nchildren(btree, root);
+               WARN_ON(nchildren > 1);
+               ptr = nilfs_btree_node_get_ptr(btree, root, nchildren - 1);
+               ret = nilfs_bmap_get_block(bmap, ptr, &bh);
+               if (ret < 0)
+                       return ret;
+               node = (struct nilfs_btree_node *)bh->b_data;
+               break;
+       default:
+               node = NULL;
+               return -EINVAL;
+       }
+
+       nchildren = nilfs_btree_node_get_nchildren(btree, node);
+       if (nchildren < nitems)
+               nitems = nchildren;
+       dkeys = nilfs_btree_node_dkeys(btree, node);
+       dptrs = nilfs_btree_node_dptrs(btree, node);
+       for (i = 0; i < nitems; i++) {
+               keys[i] = nilfs_bmap_dkey_to_key(dkeys[i]);
+               ptrs[i] = nilfs_bmap_dptr_to_ptr(dptrs[i]);
+       }
+
+       if (bh != NULL)
+               nilfs_bmap_put_block(bmap, bh);
+
+       return nitems;
+}
+
+static int
+nilfs_btree_prepare_convert_and_insert(struct nilfs_bmap *bmap, __u64 key,
+                                      union nilfs_bmap_ptr_req *dreq,
+                                      union nilfs_bmap_ptr_req *nreq,
+                                      struct buffer_head **bhp,
+                                      struct nilfs_bmap_stats *stats)
+{
+       struct buffer_head *bh;
+       struct nilfs_btree *btree;
+       int ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       stats->bs_nblocks = 0;
+
+       /* for data */
+       /* cannot find near ptr */
+       if (btree->bt_ops->btop_find_target != NULL)
+               dreq->bpr_ptr
+                       = btree->bt_ops->btop_find_target(btree, NULL, key);
+       ret = bmap->b_pops->bpop_prepare_alloc_ptr(bmap, dreq);
+       if (ret < 0)
+               return ret;
+
+       *bhp = NULL;
+       stats->bs_nblocks++;
+       if (nreq != NULL) {
+               nreq->bpr_ptr = dreq->bpr_ptr + 1;
+               ret = bmap->b_pops->bpop_prepare_alloc_ptr(bmap, nreq);
+               if (ret < 0)
+                       goto err_out_dreq;
+
+               ret = nilfs_bmap_get_new_block(bmap, nreq->bpr_ptr, &bh);
+               if (ret < 0)
+                       goto err_out_nreq;
+
+               *bhp = bh;
+               stats->bs_nblocks++;
+       }
+
+       /* success */
+       return 0;
+
+       /* error */
+ err_out_nreq:
+       bmap->b_pops->bpop_abort_alloc_ptr(bmap, nreq);
+ err_out_dreq:
+       bmap->b_pops->bpop_abort_alloc_ptr(bmap, dreq);
+       stats->bs_nblocks = 0;
+       return ret;
+
+}
+
+static void
+nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *bmap,
+                                     __u64 key, __u64 ptr,
+                                     const __u64 *keys, const __u64 *ptrs,
+                                     int n, __u64 low, __u64 high,
+                                     union nilfs_bmap_ptr_req *dreq,
+                                     union nilfs_bmap_ptr_req *nreq,
+                                     struct buffer_head *bh)
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_node *node;
+       __u64 tmpptr;
+
+       /* free resources */
+       if (bmap->b_ops->bop_clear != NULL)
+               bmap->b_ops->bop_clear(bmap);
+
+       /* ptr must be a pointer to a buffer head. */
+       set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr));
+
+       /* convert and insert */
+       btree = (struct nilfs_btree *)bmap;
+       nilfs_btree_init(bmap, low, high);
+       if (nreq != NULL) {
+               if (bmap->b_pops->bpop_commit_alloc_ptr != NULL) {
+                       bmap->b_pops->bpop_commit_alloc_ptr(bmap, dreq);
+                       bmap->b_pops->bpop_commit_alloc_ptr(bmap, nreq);
+               }
+
+               /* create child node at level 1 */
+               lock_buffer(bh);
+               node = (struct nilfs_btree_node *)bh->b_data;
+               nilfs_btree_node_init(btree, node, 0, 1, n, keys, ptrs);
+               nilfs_btree_node_insert(btree, node,
+                                       key, dreq->bpr_ptr, n);
+               if (!buffer_dirty(bh))
+                       nilfs_btnode_mark_dirty(bh);
+               if (!nilfs_bmap_dirty(bmap))
+                       nilfs_bmap_set_dirty(bmap);
+
+               unlock_buffer(bh);
+               nilfs_bmap_put_block(bmap, bh);
+
+               /* create root node at level 2 */
+               node = nilfs_btree_get_root(btree);
+               tmpptr = nreq->bpr_ptr;
+               nilfs_btree_node_init(btree, node, NILFS_BTREE_NODE_ROOT,
+                                     2, 1, &keys[0], &tmpptr);
+       } else {
+               if (bmap->b_pops->bpop_commit_alloc_ptr != NULL)
+                       bmap->b_pops->bpop_commit_alloc_ptr(bmap, dreq);
+
+               /* create root node at level 1 */
+               node = nilfs_btree_get_root(btree);
+               nilfs_btree_node_init(btree, node, NILFS_BTREE_NODE_ROOT,
+                                     1, n, keys, ptrs);
+               nilfs_btree_node_insert(btree, node,
+                                       key, dreq->bpr_ptr, n);
+               if (!nilfs_bmap_dirty(bmap))
+                       nilfs_bmap_set_dirty(bmap);
+       }
+
+       if (btree->bt_ops->btop_set_target != NULL)
+               btree->bt_ops->btop_set_target(btree, key, dreq->bpr_ptr);
+}
+
+/**
+ * nilfs_btree_convert_and_insert -
+ * @bmap:
+ * @key:
+ * @ptr:
+ * @keys:
+ * @ptrs:
+ * @n:
+ * @low:
+ * @high:
+ */
+int nilfs_btree_convert_and_insert(struct nilfs_bmap *bmap,
+                                  __u64 key, __u64 ptr,
+                                  const __u64 *keys, const __u64 *ptrs,
+                                  int n, __u64 low, __u64 high)
+{
+       struct buffer_head *bh;
+       union nilfs_bmap_ptr_req dreq, nreq, *di, *ni;
+       struct nilfs_bmap_stats stats;
+       int ret;
+
+       if (n + 1 <= NILFS_BTREE_ROOT_NCHILDREN_MAX) {
+               di = &dreq;
+               ni = NULL;
+       } else if ((n + 1) <= NILFS_BTREE_NODE_NCHILDREN_MAX(
+                          1 << bmap->b_inode->i_blkbits)) {
+               di = &dreq;
+               ni = &nreq;
+       } else {
+               di = NULL;
+               ni = NULL;
+               BUG();
+       }
+
+       ret = nilfs_btree_prepare_convert_and_insert(bmap, key, di, ni, &bh,
+                                                    &stats);
+       if (ret < 0)
+               return ret;
+       nilfs_btree_commit_convert_and_insert(bmap, key, ptr, keys, ptrs, n,
+                                             low, high, di, ni, bh);
+       nilfs_bmap_add_blocks(bmap, stats.bs_nblocks);
+       return 0;
+}
+
+static int nilfs_btree_propagate_p(struct nilfs_btree *btree,
+                                  struct nilfs_btree_path *path,
+                                  int level,
+                                  struct buffer_head *bh)
+{
+       while ((++level < nilfs_btree_height(btree) - 1) &&
+              !buffer_dirty(path[level].bp_bh))
+               nilfs_btnode_mark_dirty(path[level].bp_bh);
+
+       return 0;
+}
+
+static int nilfs_btree_prepare_update_v(struct nilfs_btree *btree,
+                                       struct nilfs_btree_path *path,
+                                       int level)
+{
+       struct nilfs_btree_node *parent;
+       int ret;
+
+       parent = nilfs_btree_get_node(btree, path, level + 1);
+       path[level].bp_oldreq.bpr_ptr =
+               nilfs_btree_node_get_ptr(btree, parent,
+                                        path[level + 1].bp_index);
+       path[level].bp_newreq.bpr_ptr = path[level].bp_oldreq.bpr_ptr + 1;
+       ret = nilfs_bmap_prepare_update(&btree->bt_bmap,
+                                       &path[level].bp_oldreq,
+                                       &path[level].bp_newreq);
+       if (ret < 0)
+               return ret;
+
+       if (buffer_nilfs_node(path[level].bp_bh)) {
+               path[level].bp_ctxt.oldkey = path[level].bp_oldreq.bpr_ptr;
+               path[level].bp_ctxt.newkey = path[level].bp_newreq.bpr_ptr;
+               path[level].bp_ctxt.bh = path[level].bp_bh;
+               ret = nilfs_btnode_prepare_change_key(
+                       &NILFS_BMAP_I(&btree->bt_bmap)->i_btnode_cache,
+                       &path[level].bp_ctxt);
+               if (ret < 0) {
+                       nilfs_bmap_abort_update(&btree->bt_bmap,
+                                               &path[level].bp_oldreq,
+                                               &path[level].bp_newreq);
+                       return ret;
+               }
+       }
+
+       return 0;
+}
+
+static void nilfs_btree_commit_update_v(struct nilfs_btree *btree,
+                                       struct nilfs_btree_path *path,
+                                       int level)
+{
+       struct nilfs_btree_node *parent;
+
+       nilfs_bmap_commit_update(&btree->bt_bmap,
+                                &path[level].bp_oldreq,
+                                &path[level].bp_newreq);
+
+       if (buffer_nilfs_node(path[level].bp_bh)) {
+               nilfs_btnode_commit_change_key(
+                       &NILFS_BMAP_I(&btree->bt_bmap)->i_btnode_cache,
+                       &path[level].bp_ctxt);
+               path[level].bp_bh = path[level].bp_ctxt.bh;
+       }
+       set_buffer_nilfs_volatile(path[level].bp_bh);
+
+       parent = nilfs_btree_get_node(btree, path, level + 1);
+       nilfs_btree_node_set_ptr(btree, parent, path[level + 1].bp_index,
+                                path[level].bp_newreq.bpr_ptr);
+}
+
+static void nilfs_btree_abort_update_v(struct nilfs_btree *btree,
+                                      struct nilfs_btree_path *path,
+                                      int level)
+{
+       nilfs_bmap_abort_update(&btree->bt_bmap,
+                               &path[level].bp_oldreq,
+                               &path[level].bp_newreq);
+       if (buffer_nilfs_node(path[level].bp_bh))
+               nilfs_btnode_abort_change_key(
+                       &NILFS_BMAP_I(&btree->bt_bmap)->i_btnode_cache,
+                       &path[level].bp_ctxt);
+}
+
+static int nilfs_btree_prepare_propagate_v(struct nilfs_btree *btree,
+                                          struct nilfs_btree_path *path,
+                                          int minlevel,
+                                          int *maxlevelp)
+{
+       int level, ret;
+
+       level = minlevel;
+       if (!buffer_nilfs_volatile(path[level].bp_bh)) {
+               ret = nilfs_btree_prepare_update_v(btree, path, level);
+               if (ret < 0)
+                       return ret;
+       }
+       while ((++level < nilfs_btree_height(btree) - 1) &&
+              !buffer_dirty(path[level].bp_bh)) {
+
+               WARN_ON(buffer_nilfs_volatile(path[level].bp_bh));
+               ret = nilfs_btree_prepare_update_v(btree, path, level);
+               if (ret < 0)
+                       goto out;
+       }
+
+       /* success */
+       *maxlevelp = level - 1;
+       return 0;
+
+       /* error */
+ out:
+       while (--level > minlevel)
+               nilfs_btree_abort_update_v(btree, path, level);
+       if (!buffer_nilfs_volatile(path[level].bp_bh))
+               nilfs_btree_abort_update_v(btree, path, level);
+       return ret;
+}
+
+static void nilfs_btree_commit_propagate_v(struct nilfs_btree *btree,
+                                          struct nilfs_btree_path *path,
+                                          int minlevel,
+                                          int maxlevel,
+                                          struct buffer_head *bh)
+{
+       int level;
+
+       if (!buffer_nilfs_volatile(path[minlevel].bp_bh))
+               nilfs_btree_commit_update_v(btree, path, minlevel);
+
+       for (level = minlevel + 1; level <= maxlevel; level++)
+               nilfs_btree_commit_update_v(btree, path, level);
+}
+
+static int nilfs_btree_propagate_v(struct nilfs_btree *btree,
+                                  struct nilfs_btree_path *path,
+                                  int level,
+                                  struct buffer_head *bh)
+{
+       int maxlevel, ret;
+       struct nilfs_btree_node *parent;
+       __u64 ptr;
+
+       get_bh(bh);
+       path[level].bp_bh = bh;
+       ret = nilfs_btree_prepare_propagate_v(btree, path, level, &maxlevel);
+       if (ret < 0)
+               goto out;
+
+       if (buffer_nilfs_volatile(path[level].bp_bh)) {
+               parent = nilfs_btree_get_node(btree, path, level + 1);
+               ptr = nilfs_btree_node_get_ptr(btree, parent,
+                                              path[level + 1].bp_index);
+               ret = nilfs_bmap_mark_dirty(&btree->bt_bmap, ptr);
+               if (ret < 0)
+                       goto out;
+       }
+
+       nilfs_btree_commit_propagate_v(btree, path, level, maxlevel, bh);
+
+ out:
+       brelse(path[level].bp_bh);
+       path[level].bp_bh = NULL;
+       return ret;
+}
+
+static int nilfs_btree_propagate(const struct nilfs_bmap *bmap,
+                                struct buffer_head *bh)
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_path *path;
+       struct nilfs_btree_node *node;
+       __u64 key;
+       int level, ret;
+
+       WARN_ON(!buffer_dirty(bh));
+
+       btree = (struct nilfs_btree *)bmap;
+       path = nilfs_btree_alloc_path(btree);
+       if (path == NULL)
+               return -ENOMEM;
+       nilfs_btree_init_path(btree, path);
+
+       if (buffer_nilfs_node(bh)) {
+               node = (struct nilfs_btree_node *)bh->b_data;
+               key = nilfs_btree_node_get_key(btree, node, 0);
+               level = nilfs_btree_node_get_level(btree, node);
+       } else {
+               key = nilfs_bmap_data_get_key(bmap, bh);
+               level = NILFS_BTREE_LEVEL_DATA;
+       }
+
+       ret = nilfs_btree_do_lookup(btree, path, key, NULL, level + 1);
+       if (ret < 0) {
+               if (unlikely(ret == -ENOENT))
+                       printk(KERN_CRIT "%s: key = %llu, level == %d\n",
+                              __func__, (unsigned long long)key, level);
+               goto out;
+       }
+
+       ret = btree->bt_ops->btop_propagate(btree, path, level, bh);
+
+ out:
+       nilfs_btree_clear_path(btree, path);
+       nilfs_btree_free_path(btree, path);
+
+       return ret;
+}
+
+static int nilfs_btree_propagate_gc(const struct nilfs_bmap *bmap,
+                                   struct buffer_head *bh)
+{
+       return nilfs_bmap_mark_dirty(bmap, bh->b_blocknr);
+}
+
+static void nilfs_btree_add_dirty_buffer(struct nilfs_btree *btree,
+                                        struct list_head *lists,
+                                        struct buffer_head *bh)
+{
+       struct list_head *head;
+       struct buffer_head *cbh;
+       struct nilfs_btree_node *node, *cnode;
+       __u64 key, ckey;
+       int level;
+
+       get_bh(bh);
+       node = (struct nilfs_btree_node *)bh->b_data;
+       key = nilfs_btree_node_get_key(btree, node, 0);
+       level = nilfs_btree_node_get_level(btree, node);
+       list_for_each(head, &lists[level]) {
+               cbh = list_entry(head, struct buffer_head, b_assoc_buffers);
+               cnode = (struct nilfs_btree_node *)cbh->b_data;
+               ckey = nilfs_btree_node_get_key(btree, cnode, 0);
+               if (key < ckey)
+                       break;
+       }
+       list_add_tail(&bh->b_assoc_buffers, head);
+}
+
+static void nilfs_btree_lookup_dirty_buffers(struct nilfs_bmap *bmap,
+                                            struct list_head *listp)
+{
+       struct nilfs_btree *btree = (struct nilfs_btree *)bmap;
+       struct address_space *btcache = &NILFS_BMAP_I(bmap)->i_btnode_cache;
+       struct list_head lists[NILFS_BTREE_LEVEL_MAX];
+       struct pagevec pvec;
+       struct buffer_head *bh, *head;
+       pgoff_t index = 0;
+       int level, i;
+
+       for (level = NILFS_BTREE_LEVEL_NODE_MIN;
+            level < NILFS_BTREE_LEVEL_MAX;
+            level++)
+               INIT_LIST_HEAD(&lists[level]);
+
+       pagevec_init(&pvec, 0);
+
+       while (pagevec_lookup_tag(&pvec, btcache, &index, PAGECACHE_TAG_DIRTY,
+                                 PAGEVEC_SIZE)) {
+               for (i = 0; i < pagevec_count(&pvec); i++) {
+                       bh = head = page_buffers(pvec.pages[i]);
+                       do {
+                               if (buffer_dirty(bh))
+                                       nilfs_btree_add_dirty_buffer(btree,
+                                                                    lists, bh);
+                       } while ((bh = bh->b_this_page) != head);
+               }
+               pagevec_release(&pvec);
+               cond_resched();
+       }
+
+       for (level = NILFS_BTREE_LEVEL_NODE_MIN;
+            level < NILFS_BTREE_LEVEL_MAX;
+            level++)
+               list_splice(&lists[level], listp->prev);
+}
+
+static int nilfs_btree_assign_p(struct nilfs_btree *btree,
+                               struct nilfs_btree_path *path,
+                               int level,
+                               struct buffer_head **bh,
+                               sector_t blocknr,
+                               union nilfs_binfo *binfo)
+{
+       struct nilfs_btree_node *parent;
+       __u64 key;
+       __u64 ptr;
+       int ret;
+
+       parent = nilfs_btree_get_node(btree, path, level + 1);
+       ptr = nilfs_btree_node_get_ptr(btree, parent,
+                                      path[level + 1].bp_index);
+       if (buffer_nilfs_node(*bh)) {
+               path[level].bp_ctxt.oldkey = ptr;
+               path[level].bp_ctxt.newkey = blocknr;
+               path[level].bp_ctxt.bh = *bh;
+               ret = nilfs_btnode_prepare_change_key(
+                       &NILFS_BMAP_I(&btree->bt_bmap)->i_btnode_cache,
+                       &path[level].bp_ctxt);
+               if (ret < 0)
+                       return ret;
+               nilfs_btnode_commit_change_key(
+                       &NILFS_BMAP_I(&btree->bt_bmap)->i_btnode_cache,
+                       &path[level].bp_ctxt);
+               *bh = path[level].bp_ctxt.bh;
+       }
+
+       nilfs_btree_node_set_ptr(btree, parent,
+                                path[level + 1].bp_index, blocknr);
+
+       key = nilfs_btree_node_get_key(btree, parent,
+                                      path[level + 1].bp_index);
+       /* on-disk format */
+       binfo->bi_dat.bi_blkoff = nilfs_bmap_key_to_dkey(key);
+       binfo->bi_dat.bi_level = level;
+
+       return 0;
+}
+
+static int nilfs_btree_assign_v(struct nilfs_btree *btree,
+                               struct nilfs_btree_path *path,
+                               int level,
+                               struct buffer_head **bh,
+                               sector_t blocknr,
+                               union nilfs_binfo *binfo)
+{
+       struct nilfs_btree_node *parent;
+       __u64 key;
+       __u64 ptr;
+       union nilfs_bmap_ptr_req req;
+       int ret;
+
+       parent = nilfs_btree_get_node(btree, path, level + 1);
+       ptr = nilfs_btree_node_get_ptr(btree, parent,
+                                      path[level + 1].bp_index);
+       req.bpr_ptr = ptr;
+       ret = btree->bt_bmap.b_pops->bpop_prepare_start_ptr(&btree->bt_bmap,
+                                                              &req);
+       if (ret < 0)
+               return ret;
+       btree->bt_bmap.b_pops->bpop_commit_start_ptr(&btree->bt_bmap,
+                                                       &req, blocknr);
+
+       key = nilfs_btree_node_get_key(btree, parent,
+                                      path[level + 1].bp_index);
+       /* on-disk format */
+       binfo->bi_v.bi_vblocknr = nilfs_bmap_ptr_to_dptr(ptr);
+       binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key);
+
+       return 0;
+}
+
+static int nilfs_btree_assign(struct nilfs_bmap *bmap,
+                             struct buffer_head **bh,
+                             sector_t blocknr,
+                             union nilfs_binfo *binfo)
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_path *path;
+       struct nilfs_btree_node *node;
+       __u64 key;
+       int level, ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       path = nilfs_btree_alloc_path(btree);
+       if (path == NULL)
+               return -ENOMEM;
+       nilfs_btree_init_path(btree, path);
+
+       if (buffer_nilfs_node(*bh)) {
+               node = (struct nilfs_btree_node *)(*bh)->b_data;
+               key = nilfs_btree_node_get_key(btree, node, 0);
+               level = nilfs_btree_node_get_level(btree, node);
+       } else {
+               key = nilfs_bmap_data_get_key(bmap, *bh);
+               level = NILFS_BTREE_LEVEL_DATA;
+       }
+
+       ret = nilfs_btree_do_lookup(btree, path, key, NULL, level + 1);
+       if (ret < 0) {
+               WARN_ON(ret == -ENOENT);
+               goto out;
+       }
+
+       ret = btree->bt_ops->btop_assign(btree, path, level, bh,
+                                           blocknr, binfo);
+
+ out:
+       nilfs_btree_clear_path(btree, path);
+       nilfs_btree_free_path(btree, path);
+
+       return ret;
+}
+
+static int nilfs_btree_assign_gc(struct nilfs_bmap *bmap,
+                                struct buffer_head **bh,
+                                sector_t blocknr,
+                                union nilfs_binfo *binfo)
+{
+       struct nilfs_btree *btree;
+       struct nilfs_btree_node *node;
+       __u64 key;
+       int ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       ret = nilfs_bmap_move_v(bmap, (*bh)->b_blocknr, blocknr);
+       if (ret < 0)
+               return ret;
+
+       if (buffer_nilfs_node(*bh)) {
+               node = (struct nilfs_btree_node *)(*bh)->b_data;
+               key = nilfs_btree_node_get_key(btree, node, 0);
+       } else
+               key = nilfs_bmap_data_get_key(bmap, *bh);
+
+       /* on-disk format */
+       binfo->bi_v.bi_vblocknr = cpu_to_le64((*bh)->b_blocknr);
+       binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key);
+
+       return 0;
+}
+
+static int nilfs_btree_mark(struct nilfs_bmap *bmap, __u64 key, int level)
+{
+       struct buffer_head *bh;
+       struct nilfs_btree *btree;
+       struct nilfs_btree_path *path;
+       __u64 ptr;
+       int ret;
+
+       btree = (struct nilfs_btree *)bmap;
+       path = nilfs_btree_alloc_path(btree);
+       if (path == NULL)
+               return -ENOMEM;
+       nilfs_btree_init_path(btree, path);
+
+       ret = nilfs_btree_do_lookup(btree, path, key, &ptr, level + 1);
+       if (ret < 0) {
+               WARN_ON(ret == -ENOENT);
+               goto out;
+       }
+       ret = nilfs_bmap_get_block(&btree->bt_bmap, ptr, &bh);
+       if (ret < 0) {
+               WARN_ON(ret == -ENOENT);
+               goto out;
+       }
+
+       if (!buffer_dirty(bh))
+               nilfs_btnode_mark_dirty(bh);
+       nilfs_bmap_put_block(&btree->bt_bmap, bh);
+       if (!nilfs_bmap_dirty(&btree->bt_bmap))
+               nilfs_bmap_set_dirty(&btree->bt_bmap);
+
+ out:
+       nilfs_btree_clear_path(btree, path);
+       nilfs_btree_free_path(btree, path);
+       return ret;
+}
+
+static const struct nilfs_bmap_operations nilfs_btree_ops = {
+       .bop_lookup             =       nilfs_btree_lookup,
+       .bop_insert             =       nilfs_btree_insert,
+       .bop_delete             =       nilfs_btree_delete,
+       .bop_clear              =       NULL,
+
+       .bop_propagate          =       nilfs_btree_propagate,
+
+       .bop_lookup_dirty_buffers =     nilfs_btree_lookup_dirty_buffers,
+
+       .bop_assign             =       nilfs_btree_assign,
+       .bop_mark               =       nilfs_btree_mark,
+
+       .bop_last_key           =       nilfs_btree_last_key,
+       .bop_check_insert       =       NULL,
+       .bop_check_delete       =       nilfs_btree_check_delete,
+       .bop_gather_data        =       nilfs_btree_gather_data,
+};
+
+static const struct nilfs_bmap_operations nilfs_btree_ops_gc = {
+       .bop_lookup             =       NULL,
+       .bop_insert             =       NULL,
+       .bop_delete             =       NULL,
+       .bop_clear              =       NULL,
+
+       .bop_propagate          =       nilfs_btree_propagate_gc,
+
+       .bop_lookup_dirty_buffers =     nilfs_btree_lookup_dirty_buffers,
+
+       .bop_assign             =       nilfs_btree_assign_gc,
+       .bop_mark               =       NULL,
+
+       .bop_last_key           =       NULL,
+       .bop_check_insert       =       NULL,
+       .bop_check_delete       =       NULL,
+       .bop_gather_data        =       NULL,
+};
+
+static const struct nilfs_btree_operations nilfs_btree_ops_v = {
+       .btop_find_target       =       nilfs_btree_find_target_v,
+       .btop_set_target        =       nilfs_btree_set_target_v,
+       .btop_propagate         =       nilfs_btree_propagate_v,
+       .btop_assign            =       nilfs_btree_assign_v,
+};
+
+static const struct nilfs_btree_operations nilfs_btree_ops_p = {
+       .btop_find_target       =       NULL,
+       .btop_set_target        =       NULL,
+       .btop_propagate         =       nilfs_btree_propagate_p,
+       .btop_assign            =       nilfs_btree_assign_p,
+};
+
+int nilfs_btree_init(struct nilfs_bmap *bmap, __u64 low, __u64 high)
+{
+       struct nilfs_btree *btree;
+
+       btree = (struct nilfs_btree *)bmap;
+       bmap->b_ops = &nilfs_btree_ops;
+       bmap->b_low = low;
+       bmap->b_high = high;
+       switch (bmap->b_inode->i_ino) {
+       case NILFS_DAT_INO:
+               btree->bt_ops = &nilfs_btree_ops_p;
+               break;
+       default:
+               btree->bt_ops = &nilfs_btree_ops_v;
+               break;
+       }
+
+       return 0;
+}
+
+void nilfs_btree_init_gc(struct nilfs_bmap *bmap)
+{
+       bmap->b_low = NILFS_BMAP_LARGE_LOW;
+       bmap->b_high = NILFS_BMAP_LARGE_HIGH;
+       bmap->b_ops = &nilfs_btree_ops_gc;
+}
diff --git a/fs/nilfs2/btree.h b/fs/nilfs2/btree.h
new file mode 100644 (file)
index 0000000..4766deb
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * btree.h - NILFS B-tree.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#ifndef _NILFS_BTREE_H
+#define _NILFS_BTREE_H
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/list.h>
+#include <linux/nilfs2_fs.h>
+#include "btnode.h"
+#include "bmap.h"
+
+struct nilfs_btree;
+struct nilfs_btree_path;
+
+/**
+ * struct nilfs_btree_operations - B-tree operation table
+ */
+struct nilfs_btree_operations {
+       __u64 (*btop_find_target)(const struct nilfs_btree *,
+                                 const struct nilfs_btree_path *, __u64);
+       void (*btop_set_target)(struct nilfs_btree *, __u64, __u64);
+
+       struct the_nilfs *(*btop_get_nilfs)(struct nilfs_btree *);
+
+       int (*btop_propagate)(struct nilfs_btree *,
+                             struct nilfs_btree_path *,
+                             int,
+                             struct buffer_head *);
+       int (*btop_assign)(struct nilfs_btree *,
+                          struct nilfs_btree_path *,
+                          int,
+                          struct buffer_head **,
+                          sector_t,
+                          union nilfs_binfo *);
+};
+
+/**
+ * struct nilfs_btree_node - B-tree node
+ * @bn_flags: flags
+ * @bn_level: level
+ * @bn_nchildren: number of children
+ * @bn_pad: padding
+ */
+struct nilfs_btree_node {
+       __u8 bn_flags;
+       __u8 bn_level;
+       __le16 bn_nchildren;
+       __le32 bn_pad;
+};
+
+/* flags */
+#define NILFS_BTREE_NODE_ROOT  0x01
+
+/* level */
+#define NILFS_BTREE_LEVEL_DATA         0
+#define NILFS_BTREE_LEVEL_NODE_MIN     (NILFS_BTREE_LEVEL_DATA + 1)
+#define NILFS_BTREE_LEVEL_MAX          14
+
+/**
+ * struct nilfs_btree - B-tree structure
+ * @bt_bmap: bmap base structure
+ * @bt_ops: B-tree operation table
+ */
+struct nilfs_btree {
+       struct nilfs_bmap bt_bmap;
+
+       /* B-tree-specific members */
+       const struct nilfs_btree_operations *bt_ops;
+};
+
+
+#define NILFS_BTREE_ROOT_SIZE          NILFS_BMAP_SIZE
+#define NILFS_BTREE_ROOT_NCHILDREN_MAX                                 \
+       ((NILFS_BTREE_ROOT_SIZE - sizeof(struct nilfs_btree_node)) /    \
+        (sizeof(__le64 /* dkey */) + sizeof(__le64 /* dptr */)))
+#define NILFS_BTREE_ROOT_NCHILDREN_MIN 0
+#define NILFS_BTREE_NODE_EXTRA_PAD_SIZE        (sizeof(__le64))
+#define NILFS_BTREE_NODE_NCHILDREN_MAX(nodesize)                       \
+       (((nodesize) - sizeof(struct nilfs_btree_node) -                \
+               NILFS_BTREE_NODE_EXTRA_PAD_SIZE) /                      \
+        (sizeof(__le64 /* dkey */) + sizeof(__le64 /* dptr */)))
+#define NILFS_BTREE_NODE_NCHILDREN_MIN(nodesize)                       \
+       ((NILFS_BTREE_NODE_NCHILDREN_MAX(nodesize) - 1) / 2 + 1)
+#define NILFS_BTREE_KEY_MIN    ((__u64)0)
+#define NILFS_BTREE_KEY_MAX    (~(__u64)0)
+
+
+int nilfs_btree_path_cache_init(void);
+void nilfs_btree_path_cache_destroy(void);
+int nilfs_btree_init(struct nilfs_bmap *, __u64, __u64);
+int nilfs_btree_convert_and_insert(struct nilfs_bmap *, __u64, __u64,
+                                  const __u64 *, const __u64 *,
+                                  int, __u64, __u64);
+void nilfs_btree_init_gc(struct nilfs_bmap *);
+
+#endif /* _NILFS_BTREE_H */
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
new file mode 100644 (file)
index 0000000..e90b60d
--- /dev/null
@@ -0,0 +1,925 @@
+/*
+ * cpfile.c - NILFS checkpoint file.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/string.h>
+#include <linux/buffer_head.h>
+#include <linux/errno.h>
+#include <linux/nilfs2_fs.h>
+#include "mdt.h"
+#include "cpfile.h"
+
+
+static inline unsigned long
+nilfs_cpfile_checkpoints_per_block(const struct inode *cpfile)
+{
+       return NILFS_MDT(cpfile)->mi_entries_per_block;
+}
+
+/* block number from the beginning of the file */
+static unsigned long
+nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno)
+{
+       __u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
+       do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
+       return (unsigned long)tcno;
+}
+
+/* offset in block */
+static unsigned long
+nilfs_cpfile_get_offset(const struct inode *cpfile, __u64 cno)
+{
+       __u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
+       return do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
+}
+
+static unsigned long
+nilfs_cpfile_checkpoints_in_block(const struct inode *cpfile,
+                                 __u64 curr,
+                                 __u64 max)
+{
+       return min_t(__u64,
+                    nilfs_cpfile_checkpoints_per_block(cpfile) -
+                    nilfs_cpfile_get_offset(cpfile, curr),
+                    max - curr);
+}
+
+static inline int nilfs_cpfile_is_in_first(const struct inode *cpfile,
+                                          __u64 cno)
+{
+       return nilfs_cpfile_get_blkoff(cpfile, cno) == 0;
+}
+
+static unsigned int
+nilfs_cpfile_block_add_valid_checkpoints(const struct inode *cpfile,
+                                        struct buffer_head *bh,
+                                        void *kaddr,
+                                        unsigned int n)
+{
+       struct nilfs_checkpoint *cp = kaddr + bh_offset(bh);
+       unsigned int count;
+
+       count = le32_to_cpu(cp->cp_checkpoints_count) + n;
+       cp->cp_checkpoints_count = cpu_to_le32(count);
+       return count;
+}
+
+static unsigned int
+nilfs_cpfile_block_sub_valid_checkpoints(const struct inode *cpfile,
+                                        struct buffer_head *bh,
+                                        void *kaddr,
+                                        unsigned int n)
+{
+       struct nilfs_checkpoint *cp = kaddr + bh_offset(bh);
+       unsigned int count;
+
+       WARN_ON(le32_to_cpu(cp->cp_checkpoints_count) < n);
+       count = le32_to_cpu(cp->cp_checkpoints_count) - n;
+       cp->cp_checkpoints_count = cpu_to_le32(count);
+       return count;
+}
+
+static inline struct nilfs_cpfile_header *
+nilfs_cpfile_block_get_header(const struct inode *cpfile,
+                             struct buffer_head *bh,
+                             void *kaddr)
+{
+       return kaddr + bh_offset(bh);
+}
+
+static struct nilfs_checkpoint *
+nilfs_cpfile_block_get_checkpoint(const struct inode *cpfile, __u64 cno,
+                                 struct buffer_head *bh,
+                                 void *kaddr)
+{
+       return kaddr + bh_offset(bh) + nilfs_cpfile_get_offset(cpfile, cno) *
+               NILFS_MDT(cpfile)->mi_entry_size;
+}
+
+static void nilfs_cpfile_block_init(struct inode *cpfile,
+                                   struct buffer_head *bh,
+                                   void *kaddr)
+{
+       struct nilfs_checkpoint *cp = kaddr + bh_offset(bh);
+       size_t cpsz = NILFS_MDT(cpfile)->mi_entry_size;
+       int n = nilfs_cpfile_checkpoints_per_block(cpfile);
+
+       while (n-- > 0) {
+               nilfs_checkpoint_set_invalid(cp);
+               cp = (void *)cp + cpsz;
+       }
+}
+
+static inline int nilfs_cpfile_get_header_block(struct inode *cpfile,
+                                               struct buffer_head **bhp)
+{
+       return nilfs_mdt_get_block(cpfile, 0, 0, NULL, bhp);
+}
+
+static inline int nilfs_cpfile_get_checkpoint_block(struct inode *cpfile,
+                                                   __u64 cno,
+                                                   int create,
+                                                   struct buffer_head **bhp)
+{
+       return nilfs_mdt_get_block(cpfile,
+                                  nilfs_cpfile_get_blkoff(cpfile, cno),
+                                  create, nilfs_cpfile_block_init, bhp);
+}
+
+static inline int nilfs_cpfile_delete_checkpoint_block(struct inode *cpfile,
+                                                      __u64 cno)
+{
+       return nilfs_mdt_delete_block(cpfile,
+                                     nilfs_cpfile_get_blkoff(cpfile, cno));
+}
+
+/**
+ * nilfs_cpfile_get_checkpoint - get a checkpoint
+ * @cpfile: inode of checkpoint file
+ * @cno: checkpoint number
+ * @create: create flag
+ * @cpp: pointer to a checkpoint
+ * @bhp: pointer to a buffer head
+ *
+ * Description: nilfs_cpfile_get_checkpoint() acquires the checkpoint
+ * specified by @cno. A new checkpoint will be created if @cno is the current
+ * checkpoint number and @create is nonzero.
+ *
+ * Return Value: On success, 0 is returned, and the checkpoint and the
+ * buffer head of the buffer on which the checkpoint is located are stored in
+ * the place pointed by @cpp and @bhp, respectively. On error, one of the
+ * following negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - No such checkpoint.
+ *
+ * %-EINVAL - invalid checkpoint.
+ */
+int nilfs_cpfile_get_checkpoint(struct inode *cpfile,
+                               __u64 cno,
+                               int create,
+                               struct nilfs_checkpoint **cpp,
+                               struct buffer_head **bhp)
+{
+       struct buffer_head *header_bh, *cp_bh;
+       struct nilfs_cpfile_header *header;
+       struct nilfs_checkpoint *cp;
+       void *kaddr;
+       int ret;
+
+       if (unlikely(cno < 1 || cno > nilfs_mdt_cno(cpfile) ||
+                    (cno < nilfs_mdt_cno(cpfile) && create)))
+               return -EINVAL;
+
+       down_write(&NILFS_MDT(cpfile)->mi_sem);
+
+       ret = nilfs_cpfile_get_header_block(cpfile, &header_bh);
+       if (ret < 0)
+               goto out_sem;
+       ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, create, &cp_bh);
+       if (ret < 0)
+               goto out_header;
+       kaddr = kmap(cp_bh->b_page);
+       cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr);
+       if (nilfs_checkpoint_invalid(cp)) {
+               if (!create) {
+                       kunmap(cp_bh->b_page);
+                       brelse(cp_bh);
+                       ret = -ENOENT;
+                       goto out_header;
+               }
+               /* a newly-created checkpoint */
+               nilfs_checkpoint_clear_invalid(cp);
+               if (!nilfs_cpfile_is_in_first(cpfile, cno))
+                       nilfs_cpfile_block_add_valid_checkpoints(cpfile, cp_bh,
+                                                                kaddr, 1);
+               nilfs_mdt_mark_buffer_dirty(cp_bh);
+
+               kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+               header = nilfs_cpfile_block_get_header(cpfile, header_bh,
+                                                      kaddr);
+               le64_add_cpu(&header->ch_ncheckpoints, 1);
+               kunmap_atomic(kaddr, KM_USER0);
+               nilfs_mdt_mark_buffer_dirty(header_bh);
+               nilfs_mdt_mark_dirty(cpfile);
+       }
+
+       if (cpp != NULL)
+               *cpp = cp;
+       *bhp = cp_bh;
+
+ out_header:
+       brelse(header_bh);
+
+ out_sem:
+       up_write(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_cpfile_put_checkpoint - put a checkpoint
+ * @cpfile: inode of checkpoint file
+ * @cno: checkpoint number
+ * @bh: buffer head
+ *
+ * Description: nilfs_cpfile_put_checkpoint() releases the checkpoint
+ * specified by @cno. @bh must be the buffer head which has been returned by
+ * a previous call to nilfs_cpfile_get_checkpoint() with @cno.
+ */
+void nilfs_cpfile_put_checkpoint(struct inode *cpfile, __u64 cno,
+                                struct buffer_head *bh)
+{
+       kunmap(bh->b_page);
+       brelse(bh);
+}
+
+/**
+ * nilfs_cpfile_delete_checkpoints - delete checkpoints
+ * @cpfile: inode of checkpoint file
+ * @start: start checkpoint number
+ * @end: end checkpoint numer
+ *
+ * Description: nilfs_cpfile_delete_checkpoints() deletes the checkpoints in
+ * the period from @start to @end, excluding @end itself. The checkpoints
+ * which have been already deleted are ignored.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-EINVAL - invalid checkpoints.
+ */
+int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
+                                   __u64 start,
+                                   __u64 end)
+{
+       struct buffer_head *header_bh, *cp_bh;
+       struct nilfs_cpfile_header *header;
+       struct nilfs_checkpoint *cp;
+       size_t cpsz = NILFS_MDT(cpfile)->mi_entry_size;
+       __u64 cno;
+       void *kaddr;
+       unsigned long tnicps;
+       int ret, ncps, nicps, count, i;
+
+       if (unlikely(start == 0 || start > end)) {
+               printk(KERN_ERR "%s: invalid range of checkpoint numbers: "
+                      "[%llu, %llu)\n", __func__,
+                      (unsigned long long)start, (unsigned long long)end);
+               return -EINVAL;
+       }
+
+       /* cannot delete the latest checkpoint */
+       if (start == nilfs_mdt_cno(cpfile) - 1)
+               return -EPERM;
+
+       down_write(&NILFS_MDT(cpfile)->mi_sem);
+
+       ret = nilfs_cpfile_get_header_block(cpfile, &header_bh);
+       if (ret < 0)
+               goto out_sem;
+       tnicps = 0;
+
+       for (cno = start; cno < end; cno += ncps) {
+               ncps = nilfs_cpfile_checkpoints_in_block(cpfile, cno, end);
+               ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh);
+               if (ret < 0) {
+                       if (ret != -ENOENT)
+                               goto out_sem;
+                       /* skip hole */
+                       ret = 0;
+                       continue;
+               }
+
+               kaddr = kmap_atomic(cp_bh->b_page, KM_USER0);
+               cp = nilfs_cpfile_block_get_checkpoint(
+                       cpfile, cno, cp_bh, kaddr);
+               nicps = 0;
+               for (i = 0; i < ncps; i++, cp = (void *)cp + cpsz) {
+                       WARN_ON(nilfs_checkpoint_snapshot(cp));
+                       if (!nilfs_checkpoint_invalid(cp)) {
+                               nilfs_checkpoint_set_invalid(cp);
+                               nicps++;
+                       }
+               }
+               if (nicps > 0) {
+                       tnicps += nicps;
+                       nilfs_mdt_mark_buffer_dirty(cp_bh);
+                       nilfs_mdt_mark_dirty(cpfile);
+                       if (!nilfs_cpfile_is_in_first(cpfile, cno) &&
+                           (count = nilfs_cpfile_block_sub_valid_checkpoints(
+                                   cpfile, cp_bh, kaddr, nicps)) == 0) {
+                               /* make hole */
+                               kunmap_atomic(kaddr, KM_USER0);
+                               brelse(cp_bh);
+                               ret = nilfs_cpfile_delete_checkpoint_block(
+                                       cpfile, cno);
+                               if (ret == 0)
+                                       continue;
+                               printk(KERN_ERR "%s: cannot delete block\n",
+                                      __func__);
+                               goto out_sem;
+                       }
+               }
+
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(cp_bh);
+       }
+
+       if (tnicps > 0) {
+               kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+               header = nilfs_cpfile_block_get_header(cpfile, header_bh,
+                                                      kaddr);
+               le64_add_cpu(&header->ch_ncheckpoints, -(u64)tnicps);
+               nilfs_mdt_mark_buffer_dirty(header_bh);
+               nilfs_mdt_mark_dirty(cpfile);
+               kunmap_atomic(kaddr, KM_USER0);
+       }
+       brelse(header_bh);
+
+ out_sem:
+       up_write(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
+
+static void nilfs_cpfile_checkpoint_to_cpinfo(struct inode *cpfile,
+                                             struct nilfs_checkpoint *cp,
+                                             struct nilfs_cpinfo *ci)
+{
+       ci->ci_flags = le32_to_cpu(cp->cp_flags);
+       ci->ci_cno = le64_to_cpu(cp->cp_cno);
+       ci->ci_create = le64_to_cpu(cp->cp_create);
+       ci->ci_nblk_inc = le64_to_cpu(cp->cp_nblk_inc);
+       ci->ci_inodes_count = le64_to_cpu(cp->cp_inodes_count);
+       ci->ci_blocks_count = le64_to_cpu(cp->cp_blocks_count);
+       ci->ci_next = le64_to_cpu(cp->cp_snapshot_list.ssl_next);
+}
+
+static ssize_t nilfs_cpfile_do_get_cpinfo(struct inode *cpfile, __u64 *cnop,
+                                         struct nilfs_cpinfo *ci, size_t nci)
+{
+       struct nilfs_checkpoint *cp;
+       struct buffer_head *bh;
+       size_t cpsz = NILFS_MDT(cpfile)->mi_entry_size;
+       __u64 cur_cno = nilfs_mdt_cno(cpfile), cno = *cnop;
+       void *kaddr;
+       int n, ret;
+       int ncps, i;
+
+       if (cno == 0)
+               return -ENOENT; /* checkpoint number 0 is invalid */
+       down_read(&NILFS_MDT(cpfile)->mi_sem);
+
+       for (n = 0; cno < cur_cno && n < nci; cno += ncps) {
+               ncps = nilfs_cpfile_checkpoints_in_block(cpfile, cno, cur_cno);
+               ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &bh);
+               if (ret < 0) {
+                       if (ret != -ENOENT)
+                               goto out;
+                       continue; /* skip hole */
+               }
+
+               kaddr = kmap_atomic(bh->b_page, KM_USER0);
+               cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, bh, kaddr);
+               for (i = 0; i < ncps && n < nci; i++, cp = (void *)cp + cpsz) {
+                       if (!nilfs_checkpoint_invalid(cp))
+                               nilfs_cpfile_checkpoint_to_cpinfo(
+                                       cpfile, cp, &ci[n++]);
+               }
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(bh);
+       }
+
+       ret = n;
+       if (n > 0)
+               *cnop = ci[n - 1].ci_cno + 1;
+
+ out:
+       up_read(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
+
+static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop,
+                                         struct nilfs_cpinfo *ci, size_t nci)
+{
+       struct buffer_head *bh;
+       struct nilfs_cpfile_header *header;
+       struct nilfs_checkpoint *cp;
+       __u64 curr = *cnop, next;
+       unsigned long curr_blkoff, next_blkoff;
+       void *kaddr;
+       int n = 0, ret;
+
+       down_read(&NILFS_MDT(cpfile)->mi_sem);
+
+       if (curr == 0) {
+               ret = nilfs_cpfile_get_header_block(cpfile, &bh);
+               if (ret < 0)
+                       goto out;
+               kaddr = kmap_atomic(bh->b_page, KM_USER0);
+               header = nilfs_cpfile_block_get_header(cpfile, bh, kaddr);
+               curr = le64_to_cpu(header->ch_snapshot_list.ssl_next);
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(bh);
+               if (curr == 0) {
+                       ret = 0;
+                       goto out;
+               }
+       } else if (unlikely(curr == ~(__u64)0)) {
+               ret = 0;
+               goto out;
+       }
+
+       curr_blkoff = nilfs_cpfile_get_blkoff(cpfile, curr);
+       ret = nilfs_cpfile_get_checkpoint_block(cpfile, curr, 0, &bh);
+       if (unlikely(ret < 0)) {
+               if (ret == -ENOENT)
+                       ret = 0; /* No snapshots (started from a hole block) */
+               goto out;
+       }
+       kaddr = kmap_atomic(bh->b_page, KM_USER0);
+       while (n < nci) {
+               cp = nilfs_cpfile_block_get_checkpoint(cpfile, curr, bh, kaddr);
+               curr = ~(__u64)0; /* Terminator */
+               if (unlikely(nilfs_checkpoint_invalid(cp) ||
+                            !nilfs_checkpoint_snapshot(cp)))
+                       break;
+               nilfs_cpfile_checkpoint_to_cpinfo(cpfile, cp, &ci[n++]);
+               next = le64_to_cpu(cp->cp_snapshot_list.ssl_next);
+               if (next == 0)
+                       break; /* reach end of the snapshot list */
+
+               next_blkoff = nilfs_cpfile_get_blkoff(cpfile, next);
+               if (curr_blkoff != next_blkoff) {
+                       kunmap_atomic(kaddr, KM_USER0);
+                       brelse(bh);
+                       ret = nilfs_cpfile_get_checkpoint_block(cpfile, next,
+                                                               0, &bh);
+                       if (unlikely(ret < 0)) {
+                               WARN_ON(ret == -ENOENT);
+                               goto out;
+                       }
+                       kaddr = kmap_atomic(bh->b_page, KM_USER0);
+               }
+               curr = next;
+               curr_blkoff = next_blkoff;
+       }
+       kunmap_atomic(kaddr, KM_USER0);
+       brelse(bh);
+       *cnop = curr;
+       ret = n;
+
+ out:
+       up_read(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_cpfile_get_cpinfo -
+ * @cpfile:
+ * @cno:
+ * @ci:
+ * @nci:
+ */
+
+ssize_t nilfs_cpfile_get_cpinfo(struct inode *cpfile, __u64 *cnop, int mode,
+                               struct nilfs_cpinfo *ci, size_t nci)
+{
+       switch (mode) {
+       case NILFS_CHECKPOINT:
+               return nilfs_cpfile_do_get_cpinfo(cpfile, cnop, ci, nci);
+       case NILFS_SNAPSHOT:
+               return nilfs_cpfile_do_get_ssinfo(cpfile, cnop, ci, nci);
+       default:
+               return -EINVAL;
+       }
+}
+
+/**
+ * nilfs_cpfile_delete_checkpoint -
+ * @cpfile:
+ * @cno:
+ */
+int nilfs_cpfile_delete_checkpoint(struct inode *cpfile, __u64 cno)
+{
+       struct nilfs_cpinfo ci;
+       __u64 tcno = cno;
+       ssize_t nci;
+       int ret;
+
+       nci = nilfs_cpfile_do_get_cpinfo(cpfile, &tcno, &ci, 1);
+       if (nci < 0)
+               return nci;
+       else if (nci == 0 || ci.ci_cno != cno)
+               return -ENOENT;
+
+       /* cannot delete the latest checkpoint nor snapshots */
+       ret = nilfs_cpinfo_snapshot(&ci);
+       if (ret < 0)
+               return ret;
+       else if (ret > 0 || cno == nilfs_mdt_cno(cpfile) - 1)
+               return -EPERM;
+
+       return nilfs_cpfile_delete_checkpoints(cpfile, cno, cno + 1);
+}
+
+static struct nilfs_snapshot_list *
+nilfs_cpfile_block_get_snapshot_list(const struct inode *cpfile,
+                                    __u64 cno,
+                                    struct buffer_head *bh,
+                                    void *kaddr)
+{
+       struct nilfs_cpfile_header *header;
+       struct nilfs_checkpoint *cp;
+       struct nilfs_snapshot_list *list;
+
+       if (cno != 0) {
+               cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, bh, kaddr);
+               list = &cp->cp_snapshot_list;
+       } else {
+               header = nilfs_cpfile_block_get_header(cpfile, bh, kaddr);
+               list = &header->ch_snapshot_list;
+       }
+       return list;
+}
+
+static int nilfs_cpfile_set_snapshot(struct inode *cpfile, __u64 cno)
+{
+       struct buffer_head *header_bh, *curr_bh, *prev_bh, *cp_bh;
+       struct nilfs_cpfile_header *header;
+       struct nilfs_checkpoint *cp;
+       struct nilfs_snapshot_list *list;
+       __u64 curr, prev;
+       unsigned long curr_blkoff, prev_blkoff;
+       void *kaddr;
+       int ret;
+
+       if (cno == 0)
+               return -ENOENT; /* checkpoint number 0 is invalid */
+       down_write(&NILFS_MDT(cpfile)->mi_sem);
+
+       ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh);
+       if (ret < 0)
+               goto out_sem;
+       kaddr = kmap_atomic(cp_bh->b_page, KM_USER0);
+       cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr);
+       if (nilfs_checkpoint_invalid(cp)) {
+               ret = -ENOENT;
+               kunmap_atomic(kaddr, KM_USER0);
+               goto out_cp;
+       }
+       if (nilfs_checkpoint_snapshot(cp)) {
+               ret = 0;
+               kunmap_atomic(kaddr, KM_USER0);
+               goto out_cp;
+       }
+       kunmap_atomic(kaddr, KM_USER0);
+
+       ret = nilfs_cpfile_get_header_block(cpfile, &header_bh);
+       if (ret < 0)
+               goto out_cp;
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_cpfile_block_get_header(cpfile, header_bh, kaddr);
+       list = &header->ch_snapshot_list;
+       curr_bh = header_bh;
+       get_bh(curr_bh);
+       curr = 0;
+       curr_blkoff = 0;
+       prev = le64_to_cpu(list->ssl_prev);
+       while (prev > cno) {
+               prev_blkoff = nilfs_cpfile_get_blkoff(cpfile, prev);
+               curr = prev;
+               if (curr_blkoff != prev_blkoff) {
+                       kunmap_atomic(kaddr, KM_USER0);
+                       brelse(curr_bh);
+                       ret = nilfs_cpfile_get_checkpoint_block(cpfile, curr,
+                                                               0, &curr_bh);
+                       if (ret < 0)
+                               goto out_header;
+                       kaddr = kmap_atomic(curr_bh->b_page, KM_USER0);
+               }
+               curr_blkoff = prev_blkoff;
+               cp = nilfs_cpfile_block_get_checkpoint(
+                       cpfile, curr, curr_bh, kaddr);
+               list = &cp->cp_snapshot_list;
+               prev = le64_to_cpu(list->ssl_prev);
+       }
+       kunmap_atomic(kaddr, KM_USER0);
+
+       if (prev != 0) {
+               ret = nilfs_cpfile_get_checkpoint_block(cpfile, prev, 0,
+                                                       &prev_bh);
+               if (ret < 0)
+                       goto out_curr;
+       } else {
+               prev_bh = header_bh;
+               get_bh(prev_bh);
+       }
+
+       kaddr = kmap_atomic(curr_bh->b_page, KM_USER0);
+       list = nilfs_cpfile_block_get_snapshot_list(
+               cpfile, curr, curr_bh, kaddr);
+       list->ssl_prev = cpu_to_le64(cno);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       kaddr = kmap_atomic(cp_bh->b_page, KM_USER0);
+       cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr);
+       cp->cp_snapshot_list.ssl_next = cpu_to_le64(curr);
+       cp->cp_snapshot_list.ssl_prev = cpu_to_le64(prev);
+       nilfs_checkpoint_set_snapshot(cp);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       kaddr = kmap_atomic(prev_bh->b_page, KM_USER0);
+       list = nilfs_cpfile_block_get_snapshot_list(
+               cpfile, prev, prev_bh, kaddr);
+       list->ssl_next = cpu_to_le64(cno);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_cpfile_block_get_header(cpfile, header_bh, kaddr);
+       le64_add_cpu(&header->ch_nsnapshots, 1);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_mdt_mark_buffer_dirty(prev_bh);
+       nilfs_mdt_mark_buffer_dirty(curr_bh);
+       nilfs_mdt_mark_buffer_dirty(cp_bh);
+       nilfs_mdt_mark_buffer_dirty(header_bh);
+       nilfs_mdt_mark_dirty(cpfile);
+
+       brelse(prev_bh);
+
+ out_curr:
+       brelse(curr_bh);
+
+ out_header:
+       brelse(header_bh);
+
+ out_cp:
+       brelse(cp_bh);
+
+ out_sem:
+       up_write(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
+
+static int nilfs_cpfile_clear_snapshot(struct inode *cpfile, __u64 cno)
+{
+       struct buffer_head *header_bh, *next_bh, *prev_bh, *cp_bh;
+       struct nilfs_cpfile_header *header;
+       struct nilfs_checkpoint *cp;
+       struct nilfs_snapshot_list *list;
+       __u64 next, prev;
+       void *kaddr;
+       int ret;
+
+       if (cno == 0)
+               return -ENOENT; /* checkpoint number 0 is invalid */
+       down_write(&NILFS_MDT(cpfile)->mi_sem);
+
+       ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh);
+       if (ret < 0)
+               goto out_sem;
+       kaddr = kmap_atomic(cp_bh->b_page, KM_USER0);
+       cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr);
+       if (nilfs_checkpoint_invalid(cp)) {
+               ret = -ENOENT;
+               kunmap_atomic(kaddr, KM_USER0);
+               goto out_cp;
+       }
+       if (!nilfs_checkpoint_snapshot(cp)) {
+               ret = 0;
+               kunmap_atomic(kaddr, KM_USER0);
+               goto out_cp;
+       }
+
+       list = &cp->cp_snapshot_list;
+       next = le64_to_cpu(list->ssl_next);
+       prev = le64_to_cpu(list->ssl_prev);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       ret = nilfs_cpfile_get_header_block(cpfile, &header_bh);
+       if (ret < 0)
+               goto out_cp;
+       if (next != 0) {
+               ret = nilfs_cpfile_get_checkpoint_block(cpfile, next, 0,
+                                                       &next_bh);
+               if (ret < 0)
+                       goto out_header;
+       } else {
+               next_bh = header_bh;
+               get_bh(next_bh);
+       }
+       if (prev != 0) {
+               ret = nilfs_cpfile_get_checkpoint_block(cpfile, prev, 0,
+                                                       &prev_bh);
+               if (ret < 0)
+                       goto out_next;
+       } else {
+               prev_bh = header_bh;
+               get_bh(prev_bh);
+       }
+
+       kaddr = kmap_atomic(next_bh->b_page, KM_USER0);
+       list = nilfs_cpfile_block_get_snapshot_list(
+               cpfile, next, next_bh, kaddr);
+       list->ssl_prev = cpu_to_le64(prev);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       kaddr = kmap_atomic(prev_bh->b_page, KM_USER0);
+       list = nilfs_cpfile_block_get_snapshot_list(
+               cpfile, prev, prev_bh, kaddr);
+       list->ssl_next = cpu_to_le64(next);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       kaddr = kmap_atomic(cp_bh->b_page, KM_USER0);
+       cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr);
+       cp->cp_snapshot_list.ssl_next = cpu_to_le64(0);
+       cp->cp_snapshot_list.ssl_prev = cpu_to_le64(0);
+       nilfs_checkpoint_clear_snapshot(cp);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_cpfile_block_get_header(cpfile, header_bh, kaddr);
+       le64_add_cpu(&header->ch_nsnapshots, -1);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_mdt_mark_buffer_dirty(next_bh);
+       nilfs_mdt_mark_buffer_dirty(prev_bh);
+       nilfs_mdt_mark_buffer_dirty(cp_bh);
+       nilfs_mdt_mark_buffer_dirty(header_bh);
+       nilfs_mdt_mark_dirty(cpfile);
+
+       brelse(prev_bh);
+
+ out_next:
+       brelse(next_bh);
+
+ out_header:
+       brelse(header_bh);
+
+ out_cp:
+       brelse(cp_bh);
+
+ out_sem:
+       up_write(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_cpfile_is_snapshot -
+ * @cpfile: inode of checkpoint file
+ * @cno: checkpoint number
+ *
+ * Description:
+ *
+ * Return Value: On success, 1 is returned if the checkpoint specified by
+ * @cno is a snapshot, or 0 if not. On error, one of the following negative
+ * error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - No such checkpoint.
+ */
+int nilfs_cpfile_is_snapshot(struct inode *cpfile, __u64 cno)
+{
+       struct buffer_head *bh;
+       struct nilfs_checkpoint *cp;
+       void *kaddr;
+       int ret;
+
+       if (cno == 0)
+               return -ENOENT; /* checkpoint number 0 is invalid */
+       down_read(&NILFS_MDT(cpfile)->mi_sem);
+
+       ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &bh);
+       if (ret < 0)
+               goto out;
+       kaddr = kmap_atomic(bh->b_page, KM_USER0);
+       cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, bh, kaddr);
+       ret = nilfs_checkpoint_snapshot(cp);
+       kunmap_atomic(kaddr, KM_USER0);
+       brelse(bh);
+
+ out:
+       up_read(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_cpfile_change_cpmode - change checkpoint mode
+ * @cpfile: inode of checkpoint file
+ * @cno: checkpoint number
+ * @status: mode of checkpoint
+ *
+ * Description: nilfs_change_cpmode() changes the mode of the checkpoint
+ * specified by @cno. The mode @mode is NILFS_CHECKPOINT or NILFS_SNAPSHOT.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - No such checkpoint.
+ */
+int nilfs_cpfile_change_cpmode(struct inode *cpfile, __u64 cno, int mode)
+{
+       struct the_nilfs *nilfs;
+       int ret;
+
+       nilfs = NILFS_MDT(cpfile)->mi_nilfs;
+
+       switch (mode) {
+       case NILFS_CHECKPOINT:
+               /*
+                * Check for protecting existing snapshot mounts:
+                * bd_mount_sem is used to make this operation atomic and
+                * exclusive with a new mount job.  Though it doesn't cover
+                * umount, it's enough for the purpose.
+                */
+               down(&nilfs->ns_bdev->bd_mount_sem);
+               if (nilfs_checkpoint_is_mounted(nilfs, cno, 1)) {
+                       /* Current implementation does not have to protect
+                          plain read-only mounts since they are exclusive
+                          with a read/write mount and are protected from the
+                          cleaner. */
+                       ret = -EBUSY;
+               } else
+                       ret = nilfs_cpfile_clear_snapshot(cpfile, cno);
+               up(&nilfs->ns_bdev->bd_mount_sem);
+               return ret;
+       case NILFS_SNAPSHOT:
+               return nilfs_cpfile_set_snapshot(cpfile, cno);
+       default:
+               return -EINVAL;
+       }
+}
+
+/**
+ * nilfs_cpfile_get_stat - get checkpoint statistics
+ * @cpfile: inode of checkpoint file
+ * @stat: pointer to a structure of checkpoint statistics
+ *
+ * Description: nilfs_cpfile_get_stat() returns information about checkpoints.
+ *
+ * Return Value: On success, 0 is returned, and checkpoints information is
+ * stored in the place pointed by @stat. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_cpfile_get_stat(struct inode *cpfile, struct nilfs_cpstat *cpstat)
+{
+       struct buffer_head *bh;
+       struct nilfs_cpfile_header *header;
+       void *kaddr;
+       int ret;
+
+       down_read(&NILFS_MDT(cpfile)->mi_sem);
+
+       ret = nilfs_cpfile_get_header_block(cpfile, &bh);
+       if (ret < 0)
+               goto out_sem;
+       kaddr = kmap_atomic(bh->b_page, KM_USER0);
+       header = nilfs_cpfile_block_get_header(cpfile, bh, kaddr);
+       cpstat->cs_cno = nilfs_mdt_cno(cpfile);
+       cpstat->cs_ncps = le64_to_cpu(header->ch_ncheckpoints);
+       cpstat->cs_nsss = le64_to_cpu(header->ch_nsnapshots);
+       kunmap_atomic(kaddr, KM_USER0);
+       brelse(bh);
+
+ out_sem:
+       up_read(&NILFS_MDT(cpfile)->mi_sem);
+       return ret;
+}
diff --git a/fs/nilfs2/cpfile.h b/fs/nilfs2/cpfile.h
new file mode 100644 (file)
index 0000000..1a8a100
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * cpfile.h - NILFS checkpoint file.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#ifndef _NILFS_CPFILE_H
+#define _NILFS_CPFILE_H
+
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/nilfs2_fs.h>
+
+#define NILFS_CPFILE_GFP       NILFS_MDT_GFP
+
+
+int nilfs_cpfile_get_checkpoint(struct inode *, __u64, int,
+                               struct nilfs_checkpoint **,
+                               struct buffer_head **);
+void nilfs_cpfile_put_checkpoint(struct inode *, __u64, struct buffer_head *);
+int nilfs_cpfile_delete_checkpoints(struct inode *, __u64, __u64);
+int nilfs_cpfile_delete_checkpoint(struct inode *, __u64);
+int nilfs_cpfile_change_cpmode(struct inode *, __u64, int);
+int nilfs_cpfile_is_snapshot(struct inode *, __u64);
+int nilfs_cpfile_get_stat(struct inode *, struct nilfs_cpstat *);
+ssize_t nilfs_cpfile_get_cpinfo(struct inode *, __u64 *, int,
+                               struct nilfs_cpinfo *, size_t);
+
+#endif /* _NILFS_CPFILE_H */
diff --git a/fs/nilfs2/dat.c b/fs/nilfs2/dat.c
new file mode 100644 (file)
index 0000000..bb8a581
--- /dev/null
@@ -0,0 +1,430 @@
+/*
+ * dat.c - NILFS disk address translation.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include "nilfs.h"
+#include "mdt.h"
+#include "alloc.h"
+#include "dat.h"
+
+
+#define NILFS_CNO_MIN  ((__u64)1)
+#define NILFS_CNO_MAX  (~(__u64)0)
+
+static int nilfs_dat_prepare_entry(struct inode *dat,
+                                  struct nilfs_palloc_req *req, int create)
+{
+       return nilfs_palloc_get_entry_block(dat, req->pr_entry_nr,
+                                           create, &req->pr_entry_bh);
+}
+
+static void nilfs_dat_commit_entry(struct inode *dat,
+                                  struct nilfs_palloc_req *req)
+{
+       nilfs_mdt_mark_buffer_dirty(req->pr_entry_bh);
+       nilfs_mdt_mark_dirty(dat);
+       brelse(req->pr_entry_bh);
+}
+
+static void nilfs_dat_abort_entry(struct inode *dat,
+                                 struct nilfs_palloc_req *req)
+{
+       brelse(req->pr_entry_bh);
+}
+
+int nilfs_dat_prepare_alloc(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       int ret;
+
+       ret = nilfs_palloc_prepare_alloc_entry(dat, req);
+       if (ret < 0)
+               return ret;
+
+       ret = nilfs_dat_prepare_entry(dat, req, 1);
+       if (ret < 0)
+               nilfs_palloc_abort_alloc_entry(dat, req);
+
+       return ret;
+}
+
+void nilfs_dat_commit_alloc(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       struct nilfs_dat_entry *entry;
+       void *kaddr;
+
+       kaddr = kmap_atomic(req->pr_entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, req->pr_entry_nr,
+                                            req->pr_entry_bh, kaddr);
+       entry->de_start = cpu_to_le64(NILFS_CNO_MIN);
+       entry->de_end = cpu_to_le64(NILFS_CNO_MAX);
+       entry->de_blocknr = cpu_to_le64(0);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_palloc_commit_alloc_entry(dat, req);
+       nilfs_dat_commit_entry(dat, req);
+}
+
+void nilfs_dat_abort_alloc(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       nilfs_dat_abort_entry(dat, req);
+       nilfs_palloc_abort_alloc_entry(dat, req);
+}
+
+int nilfs_dat_prepare_free(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       int ret;
+
+       ret = nilfs_palloc_prepare_free_entry(dat, req);
+       if (ret < 0)
+               return ret;
+       ret = nilfs_dat_prepare_entry(dat, req, 0);
+       if (ret < 0) {
+               nilfs_palloc_abort_free_entry(dat, req);
+               return ret;
+       }
+       return 0;
+}
+
+void nilfs_dat_commit_free(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       struct nilfs_dat_entry *entry;
+       void *kaddr;
+
+       kaddr = kmap_atomic(req->pr_entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, req->pr_entry_nr,
+                                            req->pr_entry_bh, kaddr);
+       entry->de_start = cpu_to_le64(NILFS_CNO_MIN);
+       entry->de_end = cpu_to_le64(NILFS_CNO_MIN);
+       entry->de_blocknr = cpu_to_le64(0);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_dat_commit_entry(dat, req);
+       nilfs_palloc_commit_free_entry(dat, req);
+}
+
+void nilfs_dat_abort_free(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       nilfs_dat_abort_entry(dat, req);
+       nilfs_palloc_abort_free_entry(dat, req);
+}
+
+int nilfs_dat_prepare_start(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       int ret;
+
+       ret = nilfs_dat_prepare_entry(dat, req, 0);
+       WARN_ON(ret == -ENOENT);
+       return ret;
+}
+
+void nilfs_dat_commit_start(struct inode *dat, struct nilfs_palloc_req *req,
+                           sector_t blocknr)
+{
+       struct nilfs_dat_entry *entry;
+       void *kaddr;
+
+       kaddr = kmap_atomic(req->pr_entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, req->pr_entry_nr,
+                                            req->pr_entry_bh, kaddr);
+       entry->de_start = cpu_to_le64(nilfs_mdt_cno(dat));
+       if (entry->de_blocknr != cpu_to_le64(0) ||
+           entry->de_end != cpu_to_le64(NILFS_CNO_MAX)) {
+               printk(KERN_CRIT
+                      "%s: vbn = %llu, start = %llu, end = %llu, pbn = %llu\n",
+                      __func__, (unsigned long long)req->pr_entry_nr,
+                      (unsigned long long)le64_to_cpu(entry->de_start),
+                      (unsigned long long)le64_to_cpu(entry->de_end),
+                      (unsigned long long)le64_to_cpu(entry->de_blocknr));
+       }
+       entry->de_blocknr = cpu_to_le64(blocknr);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_dat_commit_entry(dat, req);
+}
+
+void nilfs_dat_abort_start(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       nilfs_dat_abort_entry(dat, req);
+}
+
+int nilfs_dat_prepare_end(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       struct nilfs_dat_entry *entry;
+       __u64 start;
+       sector_t blocknr;
+       void *kaddr;
+       int ret;
+
+       ret = nilfs_dat_prepare_entry(dat, req, 0);
+       if (ret < 0) {
+               WARN_ON(ret == -ENOENT);
+               return ret;
+       }
+
+       kaddr = kmap_atomic(req->pr_entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, req->pr_entry_nr,
+                                            req->pr_entry_bh, kaddr);
+       start = le64_to_cpu(entry->de_start);
+       blocknr = le64_to_cpu(entry->de_blocknr);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       if (blocknr == 0) {
+               ret = nilfs_palloc_prepare_free_entry(dat, req);
+               if (ret < 0) {
+                       nilfs_dat_abort_entry(dat, req);
+                       return ret;
+               }
+       }
+
+       return 0;
+}
+
+void nilfs_dat_commit_end(struct inode *dat, struct nilfs_palloc_req *req,
+                         int dead)
+{
+       struct nilfs_dat_entry *entry;
+       __u64 start, end;
+       sector_t blocknr;
+       void *kaddr;
+
+       kaddr = kmap_atomic(req->pr_entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, req->pr_entry_nr,
+                                            req->pr_entry_bh, kaddr);
+       end = start = le64_to_cpu(entry->de_start);
+       if (!dead) {
+               end = nilfs_mdt_cno(dat);
+               WARN_ON(start > end);
+       }
+       entry->de_end = cpu_to_le64(end);
+       blocknr = le64_to_cpu(entry->de_blocknr);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       if (blocknr == 0)
+               nilfs_dat_commit_free(dat, req);
+       else
+               nilfs_dat_commit_entry(dat, req);
+}
+
+void nilfs_dat_abort_end(struct inode *dat, struct nilfs_palloc_req *req)
+{
+       struct nilfs_dat_entry *entry;
+       __u64 start;
+       sector_t blocknr;
+       void *kaddr;
+
+       kaddr = kmap_atomic(req->pr_entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, req->pr_entry_nr,
+                                            req->pr_entry_bh, kaddr);
+       start = le64_to_cpu(entry->de_start);
+       blocknr = le64_to_cpu(entry->de_blocknr);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       if (start == nilfs_mdt_cno(dat) && blocknr == 0)
+               nilfs_palloc_abort_free_entry(dat, req);
+       nilfs_dat_abort_entry(dat, req);
+}
+
+/**
+ * nilfs_dat_mark_dirty -
+ * @dat: DAT file inode
+ * @vblocknr: virtual block number
+ *
+ * Description:
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_dat_mark_dirty(struct inode *dat, __u64 vblocknr)
+{
+       struct nilfs_palloc_req req;
+       int ret;
+
+       req.pr_entry_nr = vblocknr;
+       ret = nilfs_dat_prepare_entry(dat, &req, 0);
+       if (ret == 0)
+               nilfs_dat_commit_entry(dat, &req);
+       return ret;
+}
+
+/**
+ * nilfs_dat_freev - free virtual block numbers
+ * @dat: DAT file inode
+ * @vblocknrs: array of virtual block numbers
+ * @nitems: number of virtual block numbers
+ *
+ * Description: nilfs_dat_freev() frees the virtual block numbers specified by
+ * @vblocknrs and @nitems.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * nagative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - The virtual block number have not been allocated.
+ */
+int nilfs_dat_freev(struct inode *dat, __u64 *vblocknrs, size_t nitems)
+{
+       return nilfs_palloc_freev(dat, vblocknrs, nitems);
+}
+
+/**
+ * nilfs_dat_move - change a block number
+ * @dat: DAT file inode
+ * @vblocknr: virtual block number
+ * @blocknr: block number
+ *
+ * Description: nilfs_dat_move() changes the block number associated with
+ * @vblocknr to @blocknr.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_dat_move(struct inode *dat, __u64 vblocknr, sector_t blocknr)
+{
+       struct buffer_head *entry_bh;
+       struct nilfs_dat_entry *entry;
+       void *kaddr;
+       int ret;
+
+       ret = nilfs_palloc_get_entry_block(dat, vblocknr, 0, &entry_bh);
+       if (ret < 0)
+               return ret;
+       kaddr = kmap_atomic(entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, vblocknr, entry_bh, kaddr);
+       if (unlikely(entry->de_blocknr == cpu_to_le64(0))) {
+               printk(KERN_CRIT "%s: vbn = %llu, [%llu, %llu)\n", __func__,
+                      (unsigned long long)vblocknr,
+                      (unsigned long long)le64_to_cpu(entry->de_start),
+                      (unsigned long long)le64_to_cpu(entry->de_end));
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(entry_bh);
+               return -EINVAL;
+       }
+       WARN_ON(blocknr == 0);
+       entry->de_blocknr = cpu_to_le64(blocknr);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_mdt_mark_buffer_dirty(entry_bh);
+       nilfs_mdt_mark_dirty(dat);
+
+       brelse(entry_bh);
+
+       return 0;
+}
+
+/**
+ * nilfs_dat_translate - translate a virtual block number to a block number
+ * @dat: DAT file inode
+ * @vblocknr: virtual block number
+ * @blocknrp: pointer to a block number
+ *
+ * Description: nilfs_dat_translate() maps the virtual block number @vblocknr
+ * to the corresponding block number.
+ *
+ * Return Value: On success, 0 is returned and the block number associated
+ * with @vblocknr is stored in the place pointed by @blocknrp. On error, one
+ * of the following negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - A block number associated with @vblocknr does not exist.
+ */
+int nilfs_dat_translate(struct inode *dat, __u64 vblocknr, sector_t *blocknrp)
+{
+       struct buffer_head *entry_bh;
+       struct nilfs_dat_entry *entry;
+       sector_t blocknr;
+       void *kaddr;
+       int ret;
+
+       ret = nilfs_palloc_get_entry_block(dat, vblocknr, 0, &entry_bh);
+       if (ret < 0)
+               return ret;
+
+       kaddr = kmap_atomic(entry_bh->b_page, KM_USER0);
+       entry = nilfs_palloc_block_get_entry(dat, vblocknr, entry_bh, kaddr);
+       blocknr = le64_to_cpu(entry->de_blocknr);
+       if (blocknr == 0) {
+               ret = -ENOENT;
+               goto out;
+       }
+       if (blocknrp != NULL)
+               *blocknrp = blocknr;
+
+ out:
+       kunmap_atomic(kaddr, KM_USER0);
+       brelse(entry_bh);
+       return ret;
+}
+
+ssize_t nilfs_dat_get_vinfo(struct inode *dat, struct nilfs_vinfo *vinfo,
+                           size_t nvi)
+{
+       struct buffer_head *entry_bh;
+       struct nilfs_dat_entry *entry;
+       __u64 first, last;
+       void *kaddr;
+       unsigned long entries_per_block = NILFS_MDT(dat)->mi_entries_per_block;
+       int i, j, n, ret;
+
+       for (i = 0; i < nvi; i += n) {
+               ret = nilfs_palloc_get_entry_block(dat, vinfo[i].vi_vblocknr,
+                                                  0, &entry_bh);
+               if (ret < 0)
+                       return ret;
+               kaddr = kmap_atomic(entry_bh->b_page, KM_USER0);
+               /* last virtual block number in this block */
+               first = vinfo[i].vi_vblocknr;
+               do_div(first, entries_per_block);
+               first *= entries_per_block;
+               last = first + entries_per_block - 1;
+               for (j = i, n = 0;
+                    j < nvi && vinfo[j].vi_vblocknr >= first &&
+                            vinfo[j].vi_vblocknr <= last;
+                    j++, n++) {
+                       entry = nilfs_palloc_block_get_entry(
+                               dat, vinfo[j].vi_vblocknr, entry_bh, kaddr);
+                       vinfo[j].vi_start = le64_to_cpu(entry->de_start);
+                       vinfo[j].vi_end = le64_to_cpu(entry->de_end);
+                       vinfo[j].vi_blocknr = le64_to_cpu(entry->de_blocknr);
+               }
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(entry_bh);
+       }
+
+       return nvi;
+}
diff --git a/fs/nilfs2/dat.h b/fs/nilfs2/dat.h
new file mode 100644 (file)
index 0000000..d956065
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * dat.h - NILFS disk address translation.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#ifndef _NILFS_DAT_H
+#define _NILFS_DAT_H
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/fs.h>
+
+#define NILFS_DAT_GFP  NILFS_MDT_GFP
+
+struct nilfs_palloc_req;
+
+int nilfs_dat_translate(struct inode *, __u64, sector_t *);
+
+int nilfs_dat_prepare_alloc(struct inode *, struct nilfs_palloc_req *);
+void nilfs_dat_commit_alloc(struct inode *, struct nilfs_palloc_req *);
+void nilfs_dat_abort_alloc(struct inode *, struct nilfs_palloc_req *);
+int nilfs_dat_prepare_start(struct inode *, struct nilfs_palloc_req *);
+void nilfs_dat_commit_start(struct inode *, struct nilfs_palloc_req *,
+                           sector_t);
+void nilfs_dat_abort_start(struct inode *, struct nilfs_palloc_req *);
+int nilfs_dat_prepare_end(struct inode *, struct nilfs_palloc_req *);
+void nilfs_dat_commit_end(struct inode *, struct nilfs_palloc_req *, int);
+void nilfs_dat_abort_end(struct inode *, struct nilfs_palloc_req *);
+
+int nilfs_dat_mark_dirty(struct inode *, __u64);
+int nilfs_dat_freev(struct inode *, __u64 *, size_t);
+int nilfs_dat_move(struct inode *, __u64, sector_t);
+ssize_t nilfs_dat_get_vinfo(struct inode *, struct nilfs_vinfo *, size_t);
+
+#endif /* _NILFS_DAT_H */
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
new file mode 100644 (file)
index 0000000..54100ac
--- /dev/null
@@ -0,0 +1,711 @@
+/*
+ * dir.c - NILFS directory entry operations
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Modified for NILFS by Amagai Yoshiji <amagai@osrg.net>
+ */
+/*
+ *  linux/fs/ext2/dir.c
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ *  from
+ *
+ *  linux/fs/minix/dir.c
+ *
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ *
+ *  ext2 directory handling functions
+ *
+ *  Big-endian to little-endian byte-swapping/bitmaps by
+ *        David S. Miller (davem@caip.rutgers.edu), 1995
+ *
+ * All code that works with directory layout had been switched to pagecache
+ * and moved here. AV
+ */
+
+#include <linux/pagemap.h>
+#include <linux/smp_lock.h>
+#include "nilfs.h"
+#include "page.h"
+
+/*
+ * nilfs uses block-sized chunks. Arguably, sector-sized ones would be
+ * more robust, but we have what we have
+ */
+static inline unsigned nilfs_chunk_size(struct inode *inode)
+{
+       return inode->i_sb->s_blocksize;
+}
+
+static inline void nilfs_put_page(struct page *page)
+{
+       kunmap(page);
+       page_cache_release(page);
+}
+
+static inline unsigned long dir_pages(struct inode *inode)
+{
+       return (inode->i_size+PAGE_CACHE_SIZE-1)>>PAGE_CACHE_SHIFT;
+}
+
+/*
+ * Return the offset into page `page_nr' of the last valid
+ * byte in that page, plus one.
+ */
+static unsigned nilfs_last_byte(struct inode *inode, unsigned long page_nr)
+{
+       unsigned last_byte = inode->i_size;
+
+       last_byte -= page_nr << PAGE_CACHE_SHIFT;
+       if (last_byte > PAGE_CACHE_SIZE)
+               last_byte = PAGE_CACHE_SIZE;
+       return last_byte;
+}
+
+static int nilfs_prepare_chunk_uninterruptible(struct page *page,
+                                              struct address_space *mapping,
+                                              unsigned from, unsigned to)
+{
+       loff_t pos = page_offset(page) + from;
+       return block_write_begin(NULL, mapping, pos, to - from,
+                                AOP_FLAG_UNINTERRUPTIBLE, &page,
+                                NULL, nilfs_get_block);
+}
+
+static int nilfs_prepare_chunk(struct page *page,
+                              struct address_space *mapping,
+                              unsigned from, unsigned to)
+{
+       loff_t pos = page_offset(page) + from;
+       return block_write_begin(NULL, mapping, pos, to - from, 0, &page,
+                                NULL, nilfs_get_block);
+}
+
+static int nilfs_commit_chunk(struct page *page,
+                             struct address_space *mapping,
+                             unsigned from, unsigned to)
+{
+       struct inode *dir = mapping->host;
+       struct nilfs_sb_info *sbi = NILFS_SB(dir->i_sb);
+       loff_t pos = page_offset(page) + from;
+       unsigned len = to - from;
+       unsigned nr_dirty, copied;
+       int err;
+
+       nr_dirty = nilfs_page_count_clean_buffers(page, from, to);
+       copied = block_write_end(NULL, mapping, pos, len, len, page, NULL);
+       if (pos + copied > dir->i_size) {
+               i_size_write(dir, pos + copied);
+               mark_inode_dirty(dir);
+       }
+       if (IS_DIRSYNC(dir))
+               nilfs_set_transaction_flag(NILFS_TI_SYNC);
+       err = nilfs_set_file_dirty(sbi, dir, nr_dirty);
+       unlock_page(page);
+       return err;
+}
+
+static void nilfs_check_page(struct page *page)
+{
+       struct inode *dir = page->mapping->host;
+       struct super_block *sb = dir->i_sb;
+       unsigned chunk_size = nilfs_chunk_size(dir);
+       char *kaddr = page_address(page);
+       unsigned offs, rec_len;
+       unsigned limit = PAGE_CACHE_SIZE;
+       struct nilfs_dir_entry *p;
+       char *error;
+
+       if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) {
+               limit = dir->i_size & ~PAGE_CACHE_MASK;
+               if (limit & (chunk_size - 1))
+                       goto Ebadsize;
+               if (!limit)
+                       goto out;
+       }
+       for (offs = 0; offs <= limit - NILFS_DIR_REC_LEN(1); offs += rec_len) {
+               p = (struct nilfs_dir_entry *)(kaddr + offs);
+               rec_len = le16_to_cpu(p->rec_len);
+
+               if (rec_len < NILFS_DIR_REC_LEN(1))
+                       goto Eshort;
+               if (rec_len & 3)
+                       goto Ealign;
+               if (rec_len < NILFS_DIR_REC_LEN(p->name_len))
+                       goto Enamelen;
+               if (((offs + rec_len - 1) ^ offs) & ~(chunk_size-1))
+                       goto Espan;
+       }
+       if (offs != limit)
+               goto Eend;
+out:
+       SetPageChecked(page);
+       return;
+
+       /* Too bad, we had an error */
+
+Ebadsize:
+       nilfs_error(sb, "nilfs_check_page",
+                   "size of directory #%lu is not a multiple of chunk size",
+                   dir->i_ino
+       );
+       goto fail;
+Eshort:
+       error = "rec_len is smaller than minimal";
+       goto bad_entry;
+Ealign:
+       error = "unaligned directory entry";
+       goto bad_entry;
+Enamelen:
+       error = "rec_len is too small for name_len";
+       goto bad_entry;
+Espan:
+       error = "directory entry across blocks";
+bad_entry:
+       nilfs_error(sb, "nilfs_check_page", "bad entry in directory #%lu: %s - "
+                   "offset=%lu, inode=%lu, rec_len=%d, name_len=%d",
+                   dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
+                   (unsigned long) le64_to_cpu(p->inode),
+                   rec_len, p->name_len);
+       goto fail;
+Eend:
+       p = (struct nilfs_dir_entry *)(kaddr + offs);
+       nilfs_error(sb, "nilfs_check_page",
+                   "entry in directory #%lu spans the page boundary"
+                   "offset=%lu, inode=%lu",
+                   dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs,
+                   (unsigned long) le64_to_cpu(p->inode));
+fail:
+       SetPageChecked(page);
+       SetPageError(page);
+}
+
+static struct page *nilfs_get_page(struct inode *dir, unsigned long n)
+{
+       struct address_space *mapping = dir->i_mapping;
+       struct page *page = read_cache_page(mapping, n,
+                               (filler_t *)mapping->a_ops->readpage, NULL);
+       if (!IS_ERR(page)) {
+               wait_on_page_locked(page);
+               kmap(page);
+               if (!PageUptodate(page))
+                       goto fail;
+               if (!PageChecked(page))
+                       nilfs_check_page(page);
+               if (PageError(page))
+                       goto fail;
+       }
+       return page;
+
+fail:
+       nilfs_put_page(page);
+       return ERR_PTR(-EIO);
+}
+
+/*
+ * NOTE! unlike strncmp, nilfs_match returns 1 for success, 0 for failure.
+ *
+ * len <= NILFS_NAME_LEN and de != NULL are guaranteed by caller.
+ */
+static int
+nilfs_match(int len, const char * const name, struct nilfs_dir_entry *de)
+{
+       if (len != de->name_len)
+               return 0;
+       if (!de->inode)
+               return 0;
+       return !memcmp(name, de->name, len);
+}
+
+/*
+ * p is at least 6 bytes before the end of page
+ */
+static struct nilfs_dir_entry *nilfs_next_entry(struct nilfs_dir_entry *p)
+{
+       return (struct nilfs_dir_entry *)((char *)p + le16_to_cpu(p->rec_len));
+}
+
+static unsigned char
+nilfs_filetype_table[NILFS_FT_MAX] = {
+       [NILFS_FT_UNKNOWN]      = DT_UNKNOWN,
+       [NILFS_FT_REG_FILE]     = DT_REG,
+       [NILFS_FT_DIR]          = DT_DIR,
+       [NILFS_FT_CHRDEV]       = DT_CHR,
+       [NILFS_FT_BLKDEV]       = DT_BLK,
+       [NILFS_FT_FIFO]         = DT_FIFO,
+       [NILFS_FT_SOCK]         = DT_SOCK,
+       [NILFS_FT_SYMLINK]      = DT_LNK,
+};
+
+#define S_SHIFT 12
+static unsigned char
+nilfs_type_by_mode[S_IFMT >> S_SHIFT] = {
+       [S_IFREG >> S_SHIFT]    = NILFS_FT_REG_FILE,
+       [S_IFDIR >> S_SHIFT]    = NILFS_FT_DIR,
+       [S_IFCHR >> S_SHIFT]    = NILFS_FT_CHRDEV,
+       [S_IFBLK >> S_SHIFT]    = NILFS_FT_BLKDEV,
+       [S_IFIFO >> S_SHIFT]    = NILFS_FT_FIFO,
+       [S_IFSOCK >> S_SHIFT]   = NILFS_FT_SOCK,
+       [S_IFLNK >> S_SHIFT]    = NILFS_FT_SYMLINK,
+};
+
+static void nilfs_set_de_type(struct nilfs_dir_entry *de, struct inode *inode)
+{
+       mode_t mode = inode->i_mode;
+
+       de->file_type = nilfs_type_by_mode[(mode & S_IFMT)>>S_SHIFT];
+}
+
+static int nilfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
+{
+       loff_t pos = filp->f_pos;
+       struct inode *inode = filp->f_dentry->d_inode;
+       struct super_block *sb = inode->i_sb;
+       unsigned int offset = pos & ~PAGE_CACHE_MASK;
+       unsigned long n = pos >> PAGE_CACHE_SHIFT;
+       unsigned long npages = dir_pages(inode);
+/*     unsigned chunk_mask = ~(nilfs_chunk_size(inode)-1); */
+       unsigned char *types = NULL;
+       int ret;
+
+       if (pos > inode->i_size - NILFS_DIR_REC_LEN(1))
+               goto success;
+
+       types = nilfs_filetype_table;
+
+       for ( ; n < npages; n++, offset = 0) {
+               char *kaddr, *limit;
+               struct nilfs_dir_entry *de;
+               struct page *page = nilfs_get_page(inode, n);
+
+               if (IS_ERR(page)) {
+                       nilfs_error(sb, __func__, "bad page in #%lu",
+                                   inode->i_ino);
+                       filp->f_pos += PAGE_CACHE_SIZE - offset;
+                       ret = -EIO;
+                       goto done;
+               }
+               kaddr = page_address(page);
+               de = (struct nilfs_dir_entry *)(kaddr + offset);
+               limit = kaddr + nilfs_last_byte(inode, n) -
+                       NILFS_DIR_REC_LEN(1);
+               for ( ; (char *)de <= limit; de = nilfs_next_entry(de)) {
+                       if (de->rec_len == 0) {
+                               nilfs_error(sb, __func__,
+                                           "zero-length directory entry");
+                               ret = -EIO;
+                               nilfs_put_page(page);
+                               goto done;
+                       }
+                       if (de->inode) {
+                               int over;
+                               unsigned char d_type = DT_UNKNOWN;
+
+                               if (types && de->file_type < NILFS_FT_MAX)
+                                       d_type = types[de->file_type];
+
+                               offset = (char *)de - kaddr;
+                               over = filldir(dirent, de->name, de->name_len,
+                                               (n<<PAGE_CACHE_SHIFT) | offset,
+                                               le64_to_cpu(de->inode), d_type);
+                               if (over) {
+                                       nilfs_put_page(page);
+                                       goto success;
+                               }
+                       }
+                       filp->f_pos += le16_to_cpu(de->rec_len);
+               }
+               nilfs_put_page(page);
+       }
+
+success:
+       ret = 0;
+done:
+       return ret;
+}
+
+/*
+ *     nilfs_find_entry()
+ *
+ * finds an entry in the specified directory with the wanted name. It
+ * returns the page in which the entry was found, and the entry itself
+ * (as a parameter - res_dir). Page is returned mapped and unlocked.
+ * Entry is guaranteed to be valid.
+ */
+struct nilfs_dir_entry *
+nilfs_find_entry(struct inode *dir, struct dentry *dentry,
+                struct page **res_page)
+{
+       const char *name = dentry->d_name.name;
+       int namelen = dentry->d_name.len;
+       unsigned reclen = NILFS_DIR_REC_LEN(namelen);
+       unsigned long start, n;
+       unsigned long npages = dir_pages(dir);
+       struct page *page = NULL;
+       struct nilfs_inode_info *ei = NILFS_I(dir);
+       struct nilfs_dir_entry *de;
+
+       if (npages == 0)
+               goto out;
+
+       /* OFFSET_CACHE */
+       *res_page = NULL;
+
+       start = ei->i_dir_start_lookup;
+       if (start >= npages)
+               start = 0;
+       n = start;
+       do {
+               char *kaddr;
+               page = nilfs_get_page(dir, n);
+               if (!IS_ERR(page)) {
+                       kaddr = page_address(page);
+                       de = (struct nilfs_dir_entry *)kaddr;
+                       kaddr += nilfs_last_byte(dir, n) - reclen;
+                       while ((char *) de <= kaddr) {
+                               if (de->rec_len == 0) {
+                                       nilfs_error(dir->i_sb, __func__,
+                                               "zero-length directory entry");
+                                       nilfs_put_page(page);
+                                       goto out;
+                               }
+                               if (nilfs_match(namelen, name, de))
+                                       goto found;
+                               de = nilfs_next_entry(de);
+                       }
+                       nilfs_put_page(page);
+               }
+               if (++n >= npages)
+                       n = 0;
+               /* next page is past the blocks we've got */
+               if (unlikely(n > (dir->i_blocks >> (PAGE_CACHE_SHIFT - 9)))) {
+                       nilfs_error(dir->i_sb, __func__,
+                              "dir %lu size %lld exceeds block cout %llu",
+                              dir->i_ino, dir->i_size,
+                              (unsigned long long)dir->i_blocks);
+                       goto out;
+               }
+       } while (n != start);
+out:
+       return NULL;
+
+found:
+       *res_page = page;
+       ei->i_dir_start_lookup = n;
+       return de;
+}
+
+struct nilfs_dir_entry *nilfs_dotdot(struct inode *dir, struct page **p)
+{
+       struct page *page = nilfs_get_page(dir, 0);
+       struct nilfs_dir_entry *de = NULL;
+
+       if (!IS_ERR(page)) {
+               de = nilfs_next_entry(
+                       (struct nilfs_dir_entry *)page_address(page));
+               *p = page;
+       }
+       return de;
+}
+
+ino_t nilfs_inode_by_name(struct inode *dir, struct dentry *dentry)
+{
+       ino_t res = 0;
+       struct nilfs_dir_entry *de;
+       struct page *page;
+
+       de = nilfs_find_entry(dir, dentry, &page);
+       if (de) {
+               res = le64_to_cpu(de->inode);
+               kunmap(page);
+               page_cache_release(page);
+       }
+       return res;
+}
+
+/* Releases the page */
+void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
+                   struct page *page, struct inode *inode)
+{
+       unsigned from = (char *) de - (char *) page_address(page);
+       unsigned to = from + le16_to_cpu(de->rec_len);
+       struct address_space *mapping = page->mapping;
+       int err;
+
+       lock_page(page);
+       err = nilfs_prepare_chunk_uninterruptible(page, mapping, from, to);
+       BUG_ON(err);
+       de->inode = cpu_to_le64(inode->i_ino);
+       nilfs_set_de_type(de, inode);
+       err = nilfs_commit_chunk(page, mapping, from, to);
+       nilfs_put_page(page);
+       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+/*     NILFS_I(dir)->i_flags &= ~NILFS_BTREE_FL; */
+       mark_inode_dirty(dir);
+}
+
+/*
+ *     Parent is locked.
+ */
+int nilfs_add_link(struct dentry *dentry, struct inode *inode)
+{
+       struct inode *dir = dentry->d_parent->d_inode;
+       const char *name = dentry->d_name.name;
+       int namelen = dentry->d_name.len;
+       unsigned chunk_size = nilfs_chunk_size(dir);
+       unsigned reclen = NILFS_DIR_REC_LEN(namelen);
+       unsigned short rec_len, name_len;
+       struct page *page = NULL;
+       struct nilfs_dir_entry *de;
+       unsigned long npages = dir_pages(dir);
+       unsigned long n;
+       char *kaddr;
+       unsigned from, to;
+       int err;
+
+       /*
+        * We take care of directory expansion in the same loop.
+        * This code plays outside i_size, so it locks the page
+        * to protect that region.
+        */
+       for (n = 0; n <= npages; n++) {
+               char *dir_end;
+
+               page = nilfs_get_page(dir, n);
+               err = PTR_ERR(page);
+               if (IS_ERR(page))
+                       goto out;
+               lock_page(page);
+               kaddr = page_address(page);
+               dir_end = kaddr + nilfs_last_byte(dir, n);
+               de = (struct nilfs_dir_entry *)kaddr;
+               kaddr += PAGE_CACHE_SIZE - reclen;
+               while ((char *)de <= kaddr) {
+                       if ((char *)de == dir_end) {
+                               /* We hit i_size */
+                               name_len = 0;
+                               rec_len = chunk_size;
+                               de->rec_len = cpu_to_le16(chunk_size);
+                               de->inode = 0;
+                               goto got_it;
+                       }
+                       if (de->rec_len == 0) {
+                               nilfs_error(dir->i_sb, __func__,
+                                           "zero-length directory entry");
+                               err = -EIO;
+                               goto out_unlock;
+                       }
+                       err = -EEXIST;
+                       if (nilfs_match(namelen, name, de))
+                               goto out_unlock;
+                       name_len = NILFS_DIR_REC_LEN(de->name_len);
+                       rec_len = le16_to_cpu(de->rec_len);
+                       if (!de->inode && rec_len >= reclen)
+                               goto got_it;
+                       if (rec_len >= name_len + reclen)
+                               goto got_it;
+                       de = (struct nilfs_dir_entry *)((char *)de + rec_len);
+               }
+               unlock_page(page);
+               nilfs_put_page(page);
+       }
+       BUG();
+       return -EINVAL;
+
+got_it:
+       from = (char *)de - (char *)page_address(page);
+       to = from + rec_len;
+       err = nilfs_prepare_chunk(page, page->mapping, from, to);
+       if (err)
+               goto out_unlock;
+       if (de->inode) {
+               struct nilfs_dir_entry *de1;
+
+               de1 = (struct nilfs_dir_entry *)((char *)de + name_len);
+               de1->rec_len = cpu_to_le16(rec_len - name_len);
+               de->rec_len = cpu_to_le16(name_len);
+               de = de1;
+       }
+       de->name_len = namelen;
+       memcpy(de->name, name, namelen);
+       de->inode = cpu_to_le64(inode->i_ino);
+       nilfs_set_de_type(de, inode);
+       err = nilfs_commit_chunk(page, page->mapping, from, to);
+       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+/*     NILFS_I(dir)->i_flags &= ~NILFS_BTREE_FL; */
+       mark_inode_dirty(dir);
+       /* OFFSET_CACHE */
+out_put:
+       nilfs_put_page(page);
+out:
+       return err;
+out_unlock:
+       unlock_page(page);
+       goto out_put;
+}
+
+/*
+ * nilfs_delete_entry deletes a directory entry by merging it with the
+ * previous entry. Page is up-to-date. Releases the page.
+ */
+int nilfs_delete_entry(struct nilfs_dir_entry *dir, struct page *page)
+{
+       struct address_space *mapping = page->mapping;
+       struct inode *inode = mapping->host;
+       char *kaddr = page_address(page);
+       unsigned from = ((char *)dir - kaddr) & ~(nilfs_chunk_size(inode) - 1);
+       unsigned to = ((char *)dir - kaddr) + le16_to_cpu(dir->rec_len);
+       struct nilfs_dir_entry *pde = NULL;
+       struct nilfs_dir_entry *de = (struct nilfs_dir_entry *)(kaddr + from);
+       int err;
+
+       while ((char *)de < (char *)dir) {
+               if (de->rec_len == 0) {
+                       nilfs_error(inode->i_sb, __func__,
+                                   "zero-length directory entry");
+                       err = -EIO;
+                       goto out;
+               }
+               pde = de;
+               de = nilfs_next_entry(de);
+       }
+       if (pde)
+               from = (char *)pde - (char *)page_address(page);
+       lock_page(page);
+       err = nilfs_prepare_chunk(page, mapping, from, to);
+       BUG_ON(err);
+       if (pde)
+               pde->rec_len = cpu_to_le16(to - from);
+       dir->inode = 0;
+       err = nilfs_commit_chunk(page, mapping, from, to);
+       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+/*     NILFS_I(inode)->i_flags &= ~NILFS_BTREE_FL; */
+       mark_inode_dirty(inode);
+out:
+       nilfs_put_page(page);
+       return err;
+}
+
+/*
+ * Set the first fragment of directory.
+ */
+int nilfs_make_empty(struct inode *inode, struct inode *parent)
+{
+       struct address_space *mapping = inode->i_mapping;
+       struct page *page = grab_cache_page(mapping, 0);
+       unsigned chunk_size = nilfs_chunk_size(inode);
+       struct nilfs_dir_entry *de;
+       int err;
+       void *kaddr;
+
+       if (!page)
+               return -ENOMEM;
+
+       err = nilfs_prepare_chunk(page, mapping, 0, chunk_size);
+       if (unlikely(err)) {
+               unlock_page(page);
+               goto fail;
+       }
+       kaddr = kmap_atomic(page, KM_USER0);
+       memset(kaddr, 0, chunk_size);
+       de = (struct nilfs_dir_entry *)kaddr;
+       de->name_len = 1;
+       de->rec_len = cpu_to_le16(NILFS_DIR_REC_LEN(1));
+       memcpy(de->name, ".\0\0", 4);
+       de->inode = cpu_to_le64(inode->i_ino);
+       nilfs_set_de_type(de, inode);
+
+       de = (struct nilfs_dir_entry *)(kaddr + NILFS_DIR_REC_LEN(1));
+       de->name_len = 2;
+       de->rec_len = cpu_to_le16(chunk_size - NILFS_DIR_REC_LEN(1));
+       de->inode = cpu_to_le64(parent->i_ino);
+       memcpy(de->name, "..\0", 4);
+       nilfs_set_de_type(de, inode);
+       kunmap_atomic(kaddr, KM_USER0);
+       err = nilfs_commit_chunk(page, mapping, 0, chunk_size);
+fail:
+       page_cache_release(page);
+       return err;
+}
+
+/*
+ * routine to check that the specified directory is empty (for rmdir)
+ */
+int nilfs_empty_dir(struct inode *inode)
+{
+       struct page *page = NULL;
+       unsigned long i, npages = dir_pages(inode);
+
+       for (i = 0; i < npages; i++) {
+               char *kaddr;
+               struct nilfs_dir_entry *de;
+
+               page = nilfs_get_page(inode, i);
+               if (IS_ERR(page))
+                       continue;
+
+               kaddr = page_address(page);
+               de = (struct nilfs_dir_entry *)kaddr;
+               kaddr += nilfs_last_byte(inode, i) - NILFS_DIR_REC_LEN(1);
+
+               while ((char *)de <= kaddr) {
+                       if (de->rec_len == 0) {
+                               nilfs_error(inode->i_sb, __func__,
+                                           "zero-length directory entry "
+                                           "(kaddr=%p, de=%p)\n", kaddr, de);
+                               goto not_empty;
+                       }
+                       if (de->inode != 0) {
+                               /* check for . and .. */
+                               if (de->name[0] != '.')
+                                       goto not_empty;
+                               if (de->name_len > 2)
+                                       goto not_empty;
+                               if (de->name_len < 2) {
+                                       if (de->inode !=
+                                           cpu_to_le64(inode->i_ino))
+                                               goto not_empty;
+                               } else if (de->name[1] != '.')
+                                       goto not_empty;
+                       }
+                       de = nilfs_next_entry(de);
+               }
+               nilfs_put_page(page);
+       }
+       return 1;
+
+not_empty:
+       nilfs_put_page(page);
+       return 0;
+}
+
+struct file_operations nilfs_dir_operations = {
+       .llseek         = generic_file_llseek,
+       .read           = generic_read_dir,
+       .readdir        = nilfs_readdir,
+       .unlocked_ioctl = nilfs_ioctl,
+#ifdef CONFIG_COMPAT
+       .compat_ioctl   = nilfs_ioctl,
+#endif /* CONFIG_COMPAT */
+       .fsync          = nilfs_sync_file,
+
+};
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c
new file mode 100644 (file)
index 0000000..c6379e4
--- /dev/null
@@ -0,0 +1,436 @@
+/*
+ * direct.c - NILFS direct block pointer.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#include <linux/errno.h>
+#include "nilfs.h"
+#include "page.h"
+#include "direct.h"
+#include "alloc.h"
+
+static inline __le64 *nilfs_direct_dptrs(const struct nilfs_direct *direct)
+{
+       return (__le64 *)
+               ((struct nilfs_direct_node *)direct->d_bmap.b_u.u_data + 1);
+}
+
+static inline __u64
+nilfs_direct_get_ptr(const struct nilfs_direct *direct, __u64 key)
+{
+       return nilfs_bmap_dptr_to_ptr(*(nilfs_direct_dptrs(direct) + key));
+}
+
+static inline void nilfs_direct_set_ptr(struct nilfs_direct *direct,
+                                       __u64 key, __u64 ptr)
+{
+       *(nilfs_direct_dptrs(direct) + key) = nilfs_bmap_ptr_to_dptr(ptr);
+}
+
+static int nilfs_direct_lookup(const struct nilfs_bmap *bmap,
+                              __u64 key, int level, __u64 *ptrp)
+{
+       struct nilfs_direct *direct;
+       __u64 ptr;
+
+       direct = (struct nilfs_direct *)bmap;
+       if ((key > NILFS_DIRECT_KEY_MAX) ||
+           (level != 1) ||     /* XXX: use macro for level 1 */
+           ((ptr = nilfs_direct_get_ptr(direct, key)) ==
+            NILFS_BMAP_INVALID_PTR))
+               return -ENOENT;
+
+       if (ptrp != NULL)
+               *ptrp = ptr;
+       return 0;
+}
+
+static __u64
+nilfs_direct_find_target_v(const struct nilfs_direct *direct, __u64 key)
+{
+       __u64 ptr;
+
+       ptr = nilfs_bmap_find_target_seq(&direct->d_bmap, key);
+       if (ptr != NILFS_BMAP_INVALID_PTR)
+               /* sequential access */
+               return ptr;
+       else
+               /* block group */
+               return nilfs_bmap_find_target_in_group(&direct->d_bmap);
+}
+
+static void nilfs_direct_set_target_v(struct nilfs_direct *direct,
+                                     __u64 key, __u64 ptr)
+{
+       direct->d_bmap.b_last_allocated_key = key;
+       direct->d_bmap.b_last_allocated_ptr = ptr;
+}
+
+static int nilfs_direct_prepare_insert(struct nilfs_direct *direct,
+                                      __u64 key,
+                                      union nilfs_bmap_ptr_req *req,
+                                      struct nilfs_bmap_stats *stats)
+{
+       int ret;
+
+       if (direct->d_ops->dop_find_target != NULL)
+               req->bpr_ptr = direct->d_ops->dop_find_target(direct, key);
+       ret = direct->d_bmap.b_pops->bpop_prepare_alloc_ptr(&direct->d_bmap,
+                                                              req);
+       if (ret < 0)
+               return ret;
+
+       stats->bs_nblocks = 1;
+       return 0;
+}
+
+static void nilfs_direct_commit_insert(struct nilfs_direct *direct,
+                                      union nilfs_bmap_ptr_req *req,
+                                      __u64 key, __u64 ptr)
+{
+       struct buffer_head *bh;
+
+       /* ptr must be a pointer to a buffer head. */
+       bh = (struct buffer_head *)((unsigned long)ptr);
+       set_buffer_nilfs_volatile(bh);
+
+       if (direct->d_bmap.b_pops->bpop_commit_alloc_ptr != NULL)
+               direct->d_bmap.b_pops->bpop_commit_alloc_ptr(
+                       &direct->d_bmap, req);
+       nilfs_direct_set_ptr(direct, key, req->bpr_ptr);
+
+       if (!nilfs_bmap_dirty(&direct->d_bmap))
+               nilfs_bmap_set_dirty(&direct->d_bmap);
+
+       if (direct->d_ops->dop_set_target != NULL)
+               direct->d_ops->dop_set_target(direct, key, req->bpr_ptr);
+}
+
+static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
+{
+       struct nilfs_direct *direct;
+       union nilfs_bmap_ptr_req req;
+       struct nilfs_bmap_stats stats;
+       int ret;
+
+       direct = (struct nilfs_direct *)bmap;
+       if (key > NILFS_DIRECT_KEY_MAX)
+               return -ENOENT;
+       if (nilfs_direct_get_ptr(direct, key) != NILFS_BMAP_INVALID_PTR)
+               return -EEXIST;
+
+       ret = nilfs_direct_prepare_insert(direct, key, &req, &stats);
+       if (ret < 0)
+               return ret;
+       nilfs_direct_commit_insert(direct, &req, key, ptr);
+       nilfs_bmap_add_blocks(bmap, stats.bs_nblocks);
+
+       return 0;
+}
+
+static int nilfs_direct_prepare_delete(struct nilfs_direct *direct,
+                                      union nilfs_bmap_ptr_req *req,
+                                      __u64 key,
+                                      struct nilfs_bmap_stats *stats)
+{
+       int ret;
+
+       if (direct->d_bmap.b_pops->bpop_prepare_end_ptr != NULL) {
+               req->bpr_ptr = nilfs_direct_get_ptr(direct, key);
+               ret = direct->d_bmap.b_pops->bpop_prepare_end_ptr(
+                       &direct->d_bmap, req);
+               if (ret < 0)
+                       return ret;
+       }
+
+       stats->bs_nblocks = 1;
+       return 0;
+}
+
+static void nilfs_direct_commit_delete(struct nilfs_direct *direct,
+                                      union nilfs_bmap_ptr_req *req,
+                                      __u64 key)
+{
+       if (direct->d_bmap.b_pops->bpop_commit_end_ptr != NULL)
+               direct->d_bmap.b_pops->bpop_commit_end_ptr(
+                       &direct->d_bmap, req);
+       nilfs_direct_set_ptr(direct, key, NILFS_BMAP_INVALID_PTR);
+}
+
+static int nilfs_direct_delete(struct nilfs_bmap *bmap, __u64 key)
+{
+       struct nilfs_direct *direct;
+       union nilfs_bmap_ptr_req req;
+       struct nilfs_bmap_stats stats;
+       int ret;
+
+       direct = (struct nilfs_direct *)bmap;
+       if ((key > NILFS_DIRECT_KEY_MAX) ||
+           nilfs_direct_get_ptr(direct, key) == NILFS_BMAP_INVALID_PTR)
+               return -ENOENT;
+
+       ret = nilfs_direct_prepare_delete(direct, &req, key, &stats);
+       if (ret < 0)
+               return ret;
+       nilfs_direct_commit_delete(direct, &req, key);
+       nilfs_bmap_sub_blocks(bmap, stats.bs_nblocks);
+
+       return 0;
+}
+
+static int nilfs_direct_last_key(const struct nilfs_bmap *bmap, __u64 *keyp)
+{
+       struct nilfs_direct *direct;
+       __u64 key, lastkey;
+
+       direct = (struct nilfs_direct *)bmap;
+       lastkey = NILFS_DIRECT_KEY_MAX + 1;
+       for (key = NILFS_DIRECT_KEY_MIN; key <= NILFS_DIRECT_KEY_MAX; key++)
+               if (nilfs_direct_get_ptr(direct, key) !=
+                   NILFS_BMAP_INVALID_PTR)
+                       lastkey = key;
+
+       if (lastkey == NILFS_DIRECT_KEY_MAX + 1)
+               return -ENOENT;
+
+       *keyp = lastkey;
+
+       return 0;
+}
+
+static int nilfs_direct_check_insert(const struct nilfs_bmap *bmap, __u64 key)
+{
+       return key > NILFS_DIRECT_KEY_MAX;
+}
+
+static int nilfs_direct_gather_data(struct nilfs_bmap *bmap,
+                                   __u64 *keys, __u64 *ptrs, int nitems)
+{
+       struct nilfs_direct *direct;
+       __u64 key;
+       __u64 ptr;
+       int n;
+
+       direct = (struct nilfs_direct *)bmap;
+       if (nitems > NILFS_DIRECT_NBLOCKS)
+               nitems = NILFS_DIRECT_NBLOCKS;
+       n = 0;
+       for (key = 0; key < nitems; key++) {
+               ptr = nilfs_direct_get_ptr(direct, key);
+               if (ptr != NILFS_BMAP_INVALID_PTR) {
+                       keys[n] = key;
+                       ptrs[n] = ptr;
+                       n++;
+               }
+       }
+       return n;
+}
+
+int nilfs_direct_delete_and_convert(struct nilfs_bmap *bmap,
+                                   __u64 key, __u64 *keys, __u64 *ptrs,
+                                   int n, __u64 low, __u64 high)
+{
+       struct nilfs_direct *direct;
+       __le64 *dptrs;
+       int ret, i, j;
+
+       /* no need to allocate any resource for conversion */
+
+       /* delete */
+       ret = bmap->b_ops->bop_delete(bmap, key);
+       if (ret < 0)
+               return ret;
+
+       /* free resources */
+       if (bmap->b_ops->bop_clear != NULL)
+               bmap->b_ops->bop_clear(bmap);
+
+       /* convert */
+       direct = (struct nilfs_direct *)bmap;
+       dptrs = nilfs_direct_dptrs(direct);
+       for (i = 0, j = 0; i < NILFS_DIRECT_NBLOCKS; i++) {
+               if ((j < n) && (i == keys[j])) {
+                       dptrs[i] = (i != key) ?
+                               nilfs_bmap_ptr_to_dptr(ptrs[j]) :
+                               NILFS_BMAP_INVALID_PTR;
+                       j++;
+               } else
+                       dptrs[i] = NILFS_BMAP_INVALID_PTR;
+       }
+
+       nilfs_direct_init(bmap, low, high);
+
+       return 0;
+}
+
+static int nilfs_direct_propagate_v(struct nilfs_direct *direct,
+                                   struct buffer_head *bh)
+{
+       union nilfs_bmap_ptr_req oldreq, newreq;
+       __u64 key;
+       __u64 ptr;
+       int ret;
+
+       key = nilfs_bmap_data_get_key(&direct->d_bmap, bh);
+       ptr = nilfs_direct_get_ptr(direct, key);
+       if (!buffer_nilfs_volatile(bh)) {
+               oldreq.bpr_ptr = ptr;
+               newreq.bpr_ptr = ptr;
+               ret = nilfs_bmap_prepare_update(&direct->d_bmap, &oldreq,
+                                               &newreq);
+               if (ret < 0)
+                       return ret;
+               nilfs_bmap_commit_update(&direct->d_bmap, &oldreq, &newreq);
+               set_buffer_nilfs_volatile(bh);
+               nilfs_direct_set_ptr(direct, key, newreq.bpr_ptr);
+       } else
+               ret = nilfs_bmap_mark_dirty(&direct->d_bmap, ptr);
+
+       return ret;
+}
+
+static int nilfs_direct_propagate(const struct nilfs_bmap *bmap,
+                                 struct buffer_head *bh)
+{
+       struct nilfs_direct *direct;
+
+       direct = (struct nilfs_direct *)bmap;
+       return (direct->d_ops->dop_propagate != NULL) ?
+               direct->d_ops->dop_propagate(direct, bh) :
+               0;
+}
+
+static int nilfs_direct_assign_v(struct nilfs_direct *direct,
+                                __u64 key, __u64 ptr,
+                                struct buffer_head **bh,
+                                sector_t blocknr,
+                                union nilfs_binfo *binfo)
+{
+       union nilfs_bmap_ptr_req req;
+       int ret;
+
+       req.bpr_ptr = ptr;
+       ret = direct->d_bmap.b_pops->bpop_prepare_start_ptr(
+               &direct->d_bmap, &req);
+       if (ret < 0)
+               return ret;
+       direct->d_bmap.b_pops->bpop_commit_start_ptr(&direct->d_bmap,
+                                                    &req, blocknr);
+
+       binfo->bi_v.bi_vblocknr = nilfs_bmap_ptr_to_dptr(ptr);
+       binfo->bi_v.bi_blkoff = nilfs_bmap_key_to_dkey(key);
+
+       return 0;
+}
+
+static int nilfs_direct_assign_p(struct nilfs_direct *direct,
+                                __u64 key, __u64 ptr,
+                                struct buffer_head **bh,
+                                sector_t blocknr,
+                                union nilfs_binfo *binfo)
+{
+       nilfs_direct_set_ptr(direct, key, blocknr);
+
+       binfo->bi_dat.bi_blkoff = nilfs_bmap_key_to_dkey(key);
+       binfo->bi_dat.bi_level = 0;
+
+       return 0;
+}
+
+static int nilfs_direct_assign(struct nilfs_bmap *bmap,
+                              struct buffer_head **bh,
+                              sector_t blocknr,
+                              union nilfs_binfo *binfo)
+{
+       struct nilfs_direct *direct;
+       __u64 key;
+       __u64 ptr;
+
+       direct = (struct nilfs_direct *)bmap;
+       key = nilfs_bmap_data_get_key(bmap, *bh);
+       if (unlikely(key > NILFS_DIRECT_KEY_MAX)) {
+               printk(KERN_CRIT "%s: invalid key: %llu\n", __func__,
+                      (unsigned long long)key);
+               return -EINVAL;
+       }
+       ptr = nilfs_direct_get_ptr(direct, key);
+       if (unlikely(ptr == NILFS_BMAP_INVALID_PTR)) {
+               printk(KERN_CRIT "%s: invalid pointer: %llu\n", __func__,
+                      (unsigned long long)ptr);
+               return -EINVAL;
+       }
+
+       return direct->d_ops->dop_assign(direct, key, ptr, bh,
+                                        blocknr, binfo);
+}
+
+static const struct nilfs_bmap_operations nilfs_direct_ops = {
+       .bop_lookup             =       nilfs_direct_lookup,
+       .bop_insert             =       nilfs_direct_insert,
+       .bop_delete             =       nilfs_direct_delete,
+       .bop_clear              =       NULL,
+
+       .bop_propagate          =       nilfs_direct_propagate,
+
+       .bop_lookup_dirty_buffers       =       NULL,
+
+       .bop_assign             =       nilfs_direct_assign,
+       .bop_mark               =       NULL,
+
+       .bop_last_key           =       nilfs_direct_last_key,
+       .bop_check_insert       =       nilfs_direct_check_insert,
+       .bop_check_delete       =       NULL,
+       .bop_gather_data        =       nilfs_direct_gather_data,
+};
+
+
+static const struct nilfs_direct_operations nilfs_direct_ops_v = {
+       .dop_find_target        =       nilfs_direct_find_target_v,
+       .dop_set_target         =       nilfs_direct_set_target_v,
+       .dop_propagate          =       nilfs_direct_propagate_v,
+       .dop_assign             =       nilfs_direct_assign_v,
+};
+
+static const struct nilfs_direct_operations nilfs_direct_ops_p = {
+       .dop_find_target        =       NULL,
+       .dop_set_target         =       NULL,
+       .dop_propagate          =       NULL,
+       .dop_assign             =       nilfs_direct_assign_p,
+};
+
+int nilfs_direct_init(struct nilfs_bmap *bmap, __u64 low, __u64 high)
+{
+       struct nilfs_direct *direct;
+
+       direct = (struct nilfs_direct *)bmap;
+       bmap->b_ops = &nilfs_direct_ops;
+       bmap->b_low = low;
+       bmap->b_high = high;
+       switch (bmap->b_inode->i_ino) {
+       case NILFS_DAT_INO:
+               direct->d_ops = &nilfs_direct_ops_p;
+               break;
+       default:
+               direct->d_ops = &nilfs_direct_ops_v;
+               break;
+       }
+
+       return 0;
+}
diff --git a/fs/nilfs2/direct.h b/fs/nilfs2/direct.h
new file mode 100644 (file)
index 0000000..45d2c5c
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * direct.h - NILFS direct block pointer.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#ifndef _NILFS_DIRECT_H
+#define _NILFS_DIRECT_H
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include "bmap.h"
+
+
+struct nilfs_direct;
+
+/**
+ * struct nilfs_direct_operations - direct mapping operation table
+ */
+struct nilfs_direct_operations {
+       __u64 (*dop_find_target)(const struct nilfs_direct *, __u64);
+       void (*dop_set_target)(struct nilfs_direct *, __u64, __u64);
+       int (*dop_propagate)(struct nilfs_direct *, struct buffer_head *);
+       int (*dop_assign)(struct nilfs_direct *, __u64, __u64,
+                         struct buffer_head **, sector_t,
+                         union nilfs_binfo *);
+};
+
+/**
+ * struct nilfs_direct_node - direct node
+ * @dn_flags: flags
+ * @dn_pad: padding
+ */
+struct nilfs_direct_node {
+       __u8 dn_flags;
+       __u8 pad[7];
+};
+
+/**
+ * struct nilfs_direct - direct mapping
+ * @d_bmap: bmap structure
+ * @d_ops: direct mapping operation table
+ */
+struct nilfs_direct {
+       struct nilfs_bmap d_bmap;
+
+       /* direct-mapping-specific members */
+       const struct nilfs_direct_operations *d_ops;
+};
+
+
+#define NILFS_DIRECT_NBLOCKS   (NILFS_BMAP_SIZE / sizeof(__le64) - 1)
+#define NILFS_DIRECT_KEY_MIN   0
+#define NILFS_DIRECT_KEY_MAX   (NILFS_DIRECT_NBLOCKS - 1)
+
+
+int nilfs_direct_init(struct nilfs_bmap *, __u64, __u64);
+int nilfs_direct_delete_and_convert(struct nilfs_bmap *, __u64, __u64 *,
+                                   __u64 *, int, __u64, __u64);
+
+
+#endif /* _NILFS_DIRECT_H */
diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c
new file mode 100644 (file)
index 0000000..6bd84a0
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+ * file.c - NILFS regular file handling primitives including fsync().
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Amagai Yoshiji <amagai@osrg.net>,
+ *            Ryusuke Konishi <ryusuke@osrg.net>
+ */
+
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/writeback.h>
+#include "nilfs.h"
+#include "segment.h"
+
+int nilfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
+{
+       /*
+        * Called from fsync() system call
+        * This is the only entry point that can catch write and synch
+        * timing for both data blocks and intermediate blocks.
+        *
+        * This function should be implemented when the writeback function
+        * will be implemented.
+        */
+       struct inode *inode = dentry->d_inode;
+       int err;
+
+       if (!nilfs_inode_dirty(inode))
+               return 0;
+
+       if (datasync)
+               err = nilfs_construct_dsync_segment(inode->i_sb, inode, 0,
+                                                   LLONG_MAX);
+       else
+               err = nilfs_construct_segment(inode->i_sb);
+
+       return err;
+}
+
+static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
+{
+       struct page *page = vmf->page;
+       struct inode *inode = vma->vm_file->f_dentry->d_inode;
+       struct nilfs_transaction_info ti;
+       int ret;
+
+       if (unlikely(nilfs_near_disk_full(NILFS_SB(inode->i_sb)->s_nilfs)))
+               return VM_FAULT_SIGBUS; /* -ENOSPC */
+
+       lock_page(page);
+       if (page->mapping != inode->i_mapping ||
+           page_offset(page) >= i_size_read(inode) || !PageUptodate(page)) {
+               unlock_page(page);
+               return VM_FAULT_NOPAGE; /* make the VM retry the fault */
+       }
+
+       /*
+        * check to see if the page is mapped already (no holes)
+        */
+       if (PageMappedToDisk(page)) {
+               unlock_page(page);
+               goto mapped;
+       }
+       if (page_has_buffers(page)) {
+               struct buffer_head *bh, *head;
+               int fully_mapped = 1;
+
+               bh = head = page_buffers(page);
+               do {
+                       if (!buffer_mapped(bh)) {
+                               fully_mapped = 0;
+                               break;
+                       }
+               } while (bh = bh->b_this_page, bh != head);
+
+               if (fully_mapped) {
+                       SetPageMappedToDisk(page);
+                       unlock_page(page);
+                       goto mapped;
+               }
+       }
+       unlock_page(page);
+
+       /*
+        * fill hole blocks
+        */
+       ret = nilfs_transaction_begin(inode->i_sb, &ti, 1);
+       /* never returns -ENOMEM, but may return -ENOSPC */
+       if (unlikely(ret))
+               return VM_FAULT_SIGBUS;
+
+       ret = block_page_mkwrite(vma, vmf, nilfs_get_block);
+       if (unlikely(ret)) {
+               nilfs_transaction_abort(inode->i_sb);
+               return ret;
+       }
+       nilfs_transaction_commit(inode->i_sb);
+
+ mapped:
+       SetPageChecked(page);
+       wait_on_page_writeback(page);
+       return 0;
+}
+
+struct vm_operations_struct nilfs_file_vm_ops = {
+       .fault          = filemap_fault,
+       .page_mkwrite   = nilfs_page_mkwrite,
+};
+
+static int nilfs_file_mmap(struct file *file, struct vm_area_struct *vma)
+{
+       file_accessed(file);
+       vma->vm_ops = &nilfs_file_vm_ops;
+       vma->vm_flags |= VM_CAN_NONLINEAR;
+       return 0;
+}
+
+/*
+ * We have mostly NULL's here: the current defaults are ok for
+ * the nilfs filesystem.
+ */
+struct file_operations nilfs_file_operations = {
+       .llseek         = generic_file_llseek,
+       .read           = do_sync_read,
+       .write          = do_sync_write,
+       .aio_read       = generic_file_aio_read,
+       .aio_write      = generic_file_aio_write,
+       .unlocked_ioctl = nilfs_ioctl,
+#ifdef CONFIG_COMPAT
+       .compat_ioctl   = nilfs_ioctl,
+#endif /* CONFIG_COMPAT */
+       .mmap           = nilfs_file_mmap,
+       .open           = generic_file_open,
+       /* .release     = nilfs_release_file, */
+       .fsync          = nilfs_sync_file,
+       .splice_read    = generic_file_splice_read,
+};
+
+struct inode_operations nilfs_file_inode_operations = {
+       .truncate       = nilfs_truncate,
+       .setattr        = nilfs_setattr,
+       .permission     = nilfs_permission,
+};
+
+/* end of file */
diff --git a/fs/nilfs2/gcdat.c b/fs/nilfs2/gcdat.c
new file mode 100644 (file)
index 0000000..93383c5
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * gcdat.c - NILFS shadow DAT inode for GC
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Seiji Kihara <kihara@osrg.net>, Amagai Yoshiji <amagai@osrg.net>,
+ *            and Ryusuke Konishi <ryusuke@osrg.net>.
+ *
+ */
+
+#include <linux/buffer_head.h>
+#include "nilfs.h"
+#include "page.h"
+#include "mdt.h"
+
+int nilfs_init_gcdat_inode(struct the_nilfs *nilfs)
+{
+       struct inode *dat = nilfs->ns_dat, *gcdat = nilfs->ns_gc_dat;
+       struct nilfs_inode_info *dii = NILFS_I(dat), *gii = NILFS_I(gcdat);
+       int err;
+
+       gcdat->i_state = 0;
+       gcdat->i_blocks = dat->i_blocks;
+       gii->i_flags = dii->i_flags;
+       gii->i_state = dii->i_state | (1 << NILFS_I_GCDAT);
+       gii->i_cno = 0;
+       nilfs_bmap_init_gcdat(gii->i_bmap, dii->i_bmap);
+       err = nilfs_copy_dirty_pages(gcdat->i_mapping, dat->i_mapping);
+       if (unlikely(err))
+               return err;
+
+       return nilfs_copy_dirty_pages(&gii->i_btnode_cache,
+                                     &dii->i_btnode_cache);
+}
+
+void nilfs_commit_gcdat_inode(struct the_nilfs *nilfs)
+{
+       struct inode *dat = nilfs->ns_dat, *gcdat = nilfs->ns_gc_dat;
+       struct nilfs_inode_info *dii = NILFS_I(dat), *gii = NILFS_I(gcdat);
+       struct address_space *mapping = dat->i_mapping;
+       struct address_space *gmapping = gcdat->i_mapping;
+
+       down_write(&NILFS_MDT(dat)->mi_sem);
+       dat->i_blocks = gcdat->i_blocks;
+       dii->i_flags = gii->i_flags;
+       dii->i_state = gii->i_state & ~(1 << NILFS_I_GCDAT);
+
+       nilfs_bmap_commit_gcdat(gii->i_bmap, dii->i_bmap);
+
+       nilfs_clear_dirty_pages(mapping);
+       nilfs_copy_back_pages(mapping, gmapping);
+       /* note: mdt dirty flags should be cleared by segctor. */
+
+       nilfs_clear_dirty_pages(&dii->i_btnode_cache);
+       nilfs_copy_back_pages(&dii->i_btnode_cache, &gii->i_btnode_cache);
+
+       up_write(&NILFS_MDT(dat)->mi_sem);
+}
+
+void nilfs_clear_gcdat_inode(struct the_nilfs *nilfs)
+{
+       struct inode *gcdat = nilfs->ns_gc_dat;
+       struct nilfs_inode_info *gii = NILFS_I(gcdat);
+
+       gcdat->i_state = I_CLEAR;
+       gii->i_flags = 0;
+
+       truncate_inode_pages(gcdat->i_mapping, 0);
+       truncate_inode_pages(&gii->i_btnode_cache, 0);
+}
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
new file mode 100644 (file)
index 0000000..19d2102
--- /dev/null
@@ -0,0 +1,288 @@
+/*
+ * gcinode.c - dummy inodes to buffer blocks for garbage collection
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Seiji Kihara <kihara@osrg.net>, Amagai Yoshiji <amagai@osrg.net>,
+ *            and Ryusuke Konishi <ryusuke@osrg.net>.
+ * Revised by Ryusuke Konishi <ryusuke@osrg.net>.
+ *
+ */
+/*
+ * This file adds the cache of on-disk blocks to be moved in garbage
+ * collection.  The disk blocks are held with dummy inodes (called
+ * gcinodes), and this file provides lookup function of the dummy
+ * inodes and their buffer read function.
+ *
+ * Since NILFS2 keeps up multiple checkpoints/snapshots accross GC, it
+ * has to treat blocks that belong to a same file but have different
+ * checkpoint numbers.  To avoid interference among generations, dummy
+ * inodes are managed separatly from actual inodes, and their lookup
+ * function (nilfs_gc_iget) is designed to be specified with a
+ * checkpoint number argument as well as an inode number.
+ *
+ * Buffers and pages held by the dummy inodes will be released each
+ * time after they are copied to a new log.  Dirty blocks made on the
+ * current generation and the blocks to be moved by GC never overlap
+ * because the dirty blocks make a new generation; they rather must be
+ * written individually.
+ */
+
+#include <linux/buffer_head.h>
+#include <linux/mpage.h>
+#include <linux/hash.h>
+#include <linux/swap.h>
+#include "nilfs.h"
+#include "page.h"
+#include "mdt.h"
+#include "dat.h"
+#include "ifile.h"
+
+static struct address_space_operations def_gcinode_aops = {};
+/* XXX need def_gcinode_iops/fops? */
+
+/*
+ * nilfs_gccache_submit_read_data() - add data buffer and submit read request
+ * @inode - gc inode
+ * @blkoff - dummy offset treated as the key for the page cache
+ * @pbn - physical block number of the block
+ * @vbn - virtual block number of the block, 0 for non-virtual block
+ * @out_bh - indirect pointer to a buffer_head struct to receive the results
+ *
+ * Description: nilfs_gccache_submit_read_data() registers the data buffer
+ * specified by @pbn to the GC pagecache with the key @blkoff.
+ * This function sets @vbn (@pbn if @vbn is zero) in b_blocknr of the buffer.
+ *
+ * Return Value: On success, 0 is returned. On Error, one of the following
+ * negative error code is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - The block specified with @pbn does not exist.
+ */
+int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff,
+                                  sector_t pbn, __u64 vbn,
+                                  struct buffer_head **out_bh)
+{
+       struct buffer_head *bh;
+       int err;
+
+       bh = nilfs_grab_buffer(inode, inode->i_mapping, blkoff, 0);
+       if (unlikely(!bh))
+               return -ENOMEM;
+
+       if (buffer_uptodate(bh))
+               goto out;
+
+       if (pbn == 0) {
+               struct inode *dat_inode = NILFS_I_NILFS(inode)->ns_dat;
+                                         /* use original dat, not gc dat. */
+               err = nilfs_dat_translate(dat_inode, vbn, &pbn);
+               if (unlikely(err)) { /* -EIO, -ENOMEM, -ENOENT */
+                       brelse(bh);
+                       goto failed;
+               }
+       }
+
+       lock_buffer(bh);
+       if (buffer_uptodate(bh)) {
+               unlock_buffer(bh);
+               goto out;
+       }
+
+       if (!buffer_mapped(bh)) {
+               bh->b_bdev = NILFS_I_NILFS(inode)->ns_bdev;
+               set_buffer_mapped(bh);
+       }
+       bh->b_blocknr = pbn;
+       bh->b_end_io = end_buffer_read_sync;
+       get_bh(bh);
+       submit_bh(READ, bh);
+       if (vbn)
+               bh->b_blocknr = vbn;
+ out:
+       err = 0;
+       *out_bh = bh;
+
+ failed:
+       unlock_page(bh->b_page);
+       page_cache_release(bh->b_page);
+       return err;
+}
+
+/*
+ * nilfs_gccache_submit_read_node() - add node buffer and submit read request
+ * @inode - gc inode
+ * @pbn - physical block number for the block
+ * @vbn - virtual block number for the block
+ * @out_bh - indirect pointer to a buffer_head struct to receive the results
+ *
+ * Description: nilfs_gccache_submit_read_node() registers the node buffer
+ * specified by @vbn to the GC pagecache.  @pbn can be supplied by the
+ * caller to avoid translation of the disk block address.
+ *
+ * Return Value: On success, 0 is returned. On Error, one of the following
+ * negative error code is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_gccache_submit_read_node(struct inode *inode, sector_t pbn,
+                                  __u64 vbn, struct buffer_head **out_bh)
+{
+       int ret = nilfs_btnode_submit_block(&NILFS_I(inode)->i_btnode_cache,
+                                           vbn ? : pbn, pbn, out_bh, 0);
+       if (ret == -EEXIST) /* internal code (cache hit) */
+               ret = 0;
+       return ret;
+}
+
+int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh)
+{
+       wait_on_buffer(bh);
+       if (!buffer_uptodate(bh))
+               return -EIO;
+       if (buffer_dirty(bh))
+               return -EEXIST;
+
+       if (buffer_nilfs_node(bh))
+               nilfs_btnode_mark_dirty(bh);
+       else
+               nilfs_mdt_mark_buffer_dirty(bh);
+       return 0;
+}
+
+/*
+ * nilfs_init_gccache() - allocate and initialize gc_inode hash table
+ * @nilfs - the_nilfs
+ *
+ * Return Value: On success, 0.
+ * On error, a negative error code is returned.
+ */
+int nilfs_init_gccache(struct the_nilfs *nilfs)
+{
+       int loop;
+
+       BUG_ON(nilfs->ns_gc_inodes_h);
+
+       INIT_LIST_HEAD(&nilfs->ns_gc_inodes);
+
+       nilfs->ns_gc_inodes_h =
+               kmalloc(sizeof(struct hlist_head) * NILFS_GCINODE_HASH_SIZE,
+                       GFP_NOFS);
+       if (nilfs->ns_gc_inodes_h == NULL)
+               return -ENOMEM;
+
+       for (loop = 0; loop < NILFS_GCINODE_HASH_SIZE; loop++)
+               INIT_HLIST_HEAD(&nilfs->ns_gc_inodes_h[loop]);
+       return 0;
+}
+
+/*
+ * nilfs_destroy_gccache() - free gc_inode hash table
+ * @nilfs - the nilfs
+ */
+void nilfs_destroy_gccache(struct the_nilfs *nilfs)
+{
+       if (nilfs->ns_gc_inodes_h) {
+               nilfs_remove_all_gcinode(nilfs);
+               kfree(nilfs->ns_gc_inodes_h);
+               nilfs->ns_gc_inodes_h = NULL;
+       }
+}
+
+static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino,
+                                  __u64 cno)
+{
+       struct inode *inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS);
+       struct nilfs_inode_info *ii;
+
+       if (!inode)
+               return NULL;
+
+       inode->i_op = NULL;
+       inode->i_fop = NULL;
+       inode->i_mapping->a_ops = &def_gcinode_aops;
+
+       ii = NILFS_I(inode);
+       ii->i_cno = cno;
+       ii->i_flags = 0;
+       ii->i_state = 1 << NILFS_I_GCINODE;
+       ii->i_bh = NULL;
+       nilfs_bmap_init_gc(ii->i_bmap);
+
+       return inode;
+}
+
+static unsigned long ihash(ino_t ino, __u64 cno)
+{
+       return hash_long((unsigned long)((ino << 2) + cno),
+                        NILFS_GCINODE_HASH_BITS);
+}
+
+/*
+ * nilfs_gc_iget() - find or create gc inode with specified (ino,cno)
+ */
+struct inode *nilfs_gc_iget(struct the_nilfs *nilfs, ino_t ino, __u64 cno)
+{
+       struct hlist_head *head = nilfs->ns_gc_inodes_h + ihash(ino, cno);
+       struct hlist_node *node;
+       struct inode *inode;
+
+       hlist_for_each_entry(inode, node, head, i_hash) {
+               if (inode->i_ino == ino && NILFS_I(inode)->i_cno == cno)
+                       return inode;
+       }
+
+       inode = alloc_gcinode(nilfs, ino, cno);
+       if (likely(inode)) {
+               hlist_add_head(&inode->i_hash, head);
+               list_add(&NILFS_I(inode)->i_dirty, &nilfs->ns_gc_inodes);
+       }
+       return inode;
+}
+
+/*
+ * nilfs_clear_gcinode() - clear and free a gc inode
+ */
+void nilfs_clear_gcinode(struct inode *inode)
+{
+       nilfs_mdt_clear(inode);
+       nilfs_mdt_destroy(inode);
+}
+
+/*
+ * nilfs_remove_all_gcinode() - remove all inodes from the_nilfs
+ */
+void nilfs_remove_all_gcinode(struct the_nilfs *nilfs)
+{
+       struct hlist_head *head = nilfs->ns_gc_inodes_h;
+       struct hlist_node *node, *n;
+       struct inode *inode;
+       int loop;
+
+       for (loop = 0; loop < NILFS_GCINODE_HASH_SIZE; loop++, head++) {
+               hlist_for_each_entry_safe(inode, node, n, head, i_hash) {
+                       hlist_del_init(&inode->i_hash);
+                       list_del_init(&NILFS_I(inode)->i_dirty);
+                       nilfs_clear_gcinode(inode); /* might sleep */
+               }
+       }
+}
diff --git a/fs/nilfs2/ifile.c b/fs/nilfs2/ifile.c
new file mode 100644 (file)
index 0000000..de86401
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * ifile.c - NILFS inode file
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Amagai Yoshiji <amagai@osrg.net>.
+ * Revised by Ryusuke Konishi <ryusuke@osrg.net>.
+ *
+ */
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include "nilfs.h"
+#include "mdt.h"
+#include "alloc.h"
+#include "ifile.h"
+
+/**
+ * nilfs_ifile_create_inode - create a new disk inode
+ * @ifile: ifile inode
+ * @out_ino: pointer to a variable to store inode number
+ * @out_bh: buffer_head contains newly allocated disk inode
+ *
+ * Return Value: On success, 0 is returned and the newly allocated inode
+ * number is stored in the place pointed by @ino, and buffer_head pointer
+ * that contains newly allocated disk inode structure is stored in the
+ * place pointed by @out_bh
+ * On error, one of the following negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOSPC - No inode left.
+ */
+int nilfs_ifile_create_inode(struct inode *ifile, ino_t *out_ino,
+                            struct buffer_head **out_bh)
+{
+       struct nilfs_palloc_req req;
+       int ret;
+
+       req.pr_entry_nr = 0;  /* 0 says find free inode from beginning of
+                                a group. dull code!! */
+       req.pr_entry_bh = NULL;
+
+       ret = nilfs_palloc_prepare_alloc_entry(ifile, &req);
+       if (!ret) {
+               ret = nilfs_palloc_get_entry_block(ifile, req.pr_entry_nr, 1,
+                                                  &req.pr_entry_bh);
+               if (ret < 0)
+                       nilfs_palloc_abort_alloc_entry(ifile, &req);
+       }
+       if (ret < 0) {
+               brelse(req.pr_entry_bh);
+               return ret;
+       }
+       nilfs_palloc_commit_alloc_entry(ifile, &req);
+       nilfs_mdt_mark_buffer_dirty(req.pr_entry_bh);
+       nilfs_mdt_mark_dirty(ifile);
+       *out_ino = (ino_t)req.pr_entry_nr;
+       *out_bh = req.pr_entry_bh;
+       return 0;
+}
+
+/**
+ * nilfs_ifile_delete_inode - delete a disk inode
+ * @ifile: ifile inode
+ * @ino: inode number
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOENT - The inode number @ino have not been allocated.
+ */
+int nilfs_ifile_delete_inode(struct inode *ifile, ino_t ino)
+{
+       struct nilfs_palloc_req req = {
+               .pr_entry_nr = ino, .pr_entry_bh = NULL
+       };
+       struct nilfs_inode *raw_inode;
+       void *kaddr;
+       int ret;
+
+       ret = nilfs_palloc_prepare_free_entry(ifile, &req);
+       if (!ret) {
+               ret = nilfs_palloc_get_entry_block(ifile, req.pr_entry_nr, 0,
+                                                  &req.pr_entry_bh);
+               if (ret < 0)
+                       nilfs_palloc_abort_free_entry(ifile, &req);
+       }
+       if (ret < 0) {
+               brelse(req.pr_entry_bh);
+               return ret;
+       }
+
+       kaddr = kmap_atomic(req.pr_entry_bh->b_page, KM_USER0);
+       raw_inode = nilfs_palloc_block_get_entry(ifile, req.pr_entry_nr,
+                                                req.pr_entry_bh, kaddr);
+       raw_inode->i_flags = 0;
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_mdt_mark_buffer_dirty(req.pr_entry_bh);
+       brelse(req.pr_entry_bh);
+
+       nilfs_palloc_commit_free_entry(ifile, &req);
+
+       return 0;
+}
+
+int nilfs_ifile_get_inode_block(struct inode *ifile, ino_t ino,
+                               struct buffer_head **out_bh)
+{
+       struct super_block *sb = ifile->i_sb;
+       int err;
+
+       if (unlikely(!NILFS_VALID_INODE(sb, ino))) {
+               nilfs_error(sb, __func__, "bad inode number: %lu",
+                           (unsigned long) ino);
+               return -EINVAL;
+       }
+
+       err = nilfs_palloc_get_entry_block(ifile, ino, 0, out_bh);
+       if (unlikely(err)) {
+               if (err == -EINVAL)
+                       nilfs_error(sb, __func__, "ifile is broken");
+               else
+                       nilfs_warning(sb, __func__,
+                                     "unable to read inode: %lu",
+                                     (unsigned long) ino);
+       }
+       return err;
+}
diff --git a/fs/nilfs2/ifile.h b/fs/nilfs2/ifile.h
new file mode 100644 (file)
index 0000000..5d30a35
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * ifile.h - NILFS inode file
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Amagai Yoshiji <amagai@osrg.net>
+ * Revised by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+
+#ifndef _NILFS_IFILE_H
+#define _NILFS_IFILE_H
+
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/nilfs2_fs.h>
+#include "mdt.h"
+#include "alloc.h"
+
+#define NILFS_IFILE_GFP  NILFS_MDT_GFP
+
+static inline struct nilfs_inode *
+nilfs_ifile_map_inode(struct inode *ifile, ino_t ino, struct buffer_head *ibh)
+{
+       void *kaddr = kmap(ibh->b_page);
+       return nilfs_palloc_block_get_entry(ifile, ino, ibh, kaddr);
+}
+
+static inline void nilfs_ifile_unmap_inode(struct inode *ifile, ino_t ino,
+                                          struct buffer_head *ibh)
+{
+       kunmap(ibh->b_page);
+}
+
+int nilfs_ifile_create_inode(struct inode *, ino_t *, struct buffer_head **);
+int nilfs_ifile_delete_inode(struct inode *, ino_t);
+int nilfs_ifile_get_inode_block(struct inode *, ino_t, struct buffer_head **);
+
+#endif /* _NILFS_IFILE_H */
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
new file mode 100644 (file)
index 0000000..49ab4a4
--- /dev/null
@@ -0,0 +1,785 @@
+/*
+ * inode.c - NILFS inode operations.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+
+#include <linux/buffer_head.h>
+#include <linux/mpage.h>
+#include <linux/writeback.h>
+#include <linux/uio.h>
+#include "nilfs.h"
+#include "segment.h"
+#include "page.h"
+#include "mdt.h"
+#include "cpfile.h"
+#include "ifile.h"
+
+
+/**
+ * nilfs_get_block() - get a file block on the filesystem (callback function)
+ * @inode - inode struct of the target file
+ * @blkoff - file block number
+ * @bh_result - buffer head to be mapped on
+ * @create - indicate whether allocating the block or not when it has not
+ *      been allocated yet.
+ *
+ * This function does not issue actual read request of the specified data
+ * block. It is done by VFS.
+ * Bulk read for direct-io is not supported yet. (should be supported)
+ */
+int nilfs_get_block(struct inode *inode, sector_t blkoff,
+                   struct buffer_head *bh_result, int create)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       unsigned long blknum = 0;
+       int err = 0, ret;
+       struct inode *dat = nilfs_dat_inode(NILFS_I_NILFS(inode));
+
+       /* This exclusion control is a workaround; should be revised */
+       down_read(&NILFS_MDT(dat)->mi_sem);     /* XXX */
+       ret = nilfs_bmap_lookup(ii->i_bmap, (unsigned long)blkoff, &blknum);
+       up_read(&NILFS_MDT(dat)->mi_sem);       /* XXX */
+       if (ret == 0) { /* found */
+               map_bh(bh_result, inode->i_sb, blknum);
+               goto out;
+       }
+       /* data block was not found */
+       if (ret == -ENOENT && create) {
+               struct nilfs_transaction_info ti;
+
+               bh_result->b_blocknr = 0;
+               err = nilfs_transaction_begin(inode->i_sb, &ti, 1);
+               if (unlikely(err))
+                       goto out;
+               err = nilfs_bmap_insert(ii->i_bmap, (unsigned long)blkoff,
+                                       (unsigned long)bh_result);
+               if (unlikely(err != 0)) {
+                       if (err == -EEXIST) {
+                               /*
+                                * The get_block() function could be called
+                                * from multiple callers for an inode.
+                                * However, the page having this block must
+                                * be locked in this case.
+                                */
+                               printk(KERN_WARNING
+                                      "nilfs_get_block: a race condition "
+                                      "while inserting a data block. "
+                                      "(inode number=%lu, file block "
+                                      "offset=%llu)\n",
+                                      inode->i_ino,
+                                      (unsigned long long)blkoff);
+                               err = 0;
+                       } else if (err == -EINVAL) {
+                               nilfs_error(inode->i_sb, __func__,
+                                           "broken bmap (inode=%lu)\n",
+                                           inode->i_ino);
+                               err = -EIO;
+                       }
+                       nilfs_transaction_abort(inode->i_sb);
+                       goto out;
+               }
+               nilfs_transaction_commit(inode->i_sb); /* never fails */
+               /* Error handling should be detailed */
+               set_buffer_new(bh_result);
+               map_bh(bh_result, inode->i_sb, 0); /* dbn must be changed
+                                                     to proper value */
+       } else if (ret == -ENOENT) {
+               /* not found is not error (e.g. hole); must return without
+                  the mapped state flag. */
+               ;
+       } else {
+               err = ret;
+       }
+
+ out:
+       return err;
+}
+
+/**
+ * nilfs_readpage() - implement readpage() method of nilfs_aops {}
+ * address_space_operations.
+ * @file - file struct of the file to be read
+ * @page - the page to be read
+ */
+static int nilfs_readpage(struct file *file, struct page *page)
+{
+       return mpage_readpage(page, nilfs_get_block);
+}
+
+/**
+ * nilfs_readpages() - implement readpages() method of nilfs_aops {}
+ * address_space_operations.
+ * @file - file struct of the file to be read
+ * @mapping - address_space struct used for reading multiple pages
+ * @pages - the pages to be read
+ * @nr_pages - number of pages to be read
+ */
+static int nilfs_readpages(struct file *file, struct address_space *mapping,
+                          struct list_head *pages, unsigned nr_pages)
+{
+       return mpage_readpages(mapping, pages, nr_pages, nilfs_get_block);
+}
+
+static int nilfs_writepages(struct address_space *mapping,
+                           struct writeback_control *wbc)
+{
+       struct inode *inode = mapping->host;
+       int err = 0;
+
+       if (wbc->sync_mode == WB_SYNC_ALL)
+               err = nilfs_construct_dsync_segment(inode->i_sb, inode,
+                                                   wbc->range_start,
+                                                   wbc->range_end);
+       return err;
+}
+
+static int nilfs_writepage(struct page *page, struct writeback_control *wbc)
+{
+       struct inode *inode = page->mapping->host;
+       int err;
+
+       redirty_page_for_writepage(wbc, page);
+       unlock_page(page);
+
+       if (wbc->sync_mode == WB_SYNC_ALL) {
+               err = nilfs_construct_segment(inode->i_sb);
+               if (unlikely(err))
+                       return err;
+       } else if (wbc->for_reclaim)
+               nilfs_flush_segment(inode->i_sb, inode->i_ino);
+
+       return 0;
+}
+
+static int nilfs_set_page_dirty(struct page *page)
+{
+       int ret = __set_page_dirty_buffers(page);
+
+       if (ret) {
+               struct inode *inode = page->mapping->host;
+               struct nilfs_sb_info *sbi = NILFS_SB(inode->i_sb);
+               unsigned nr_dirty = 1 << (PAGE_SHIFT - inode->i_blkbits);
+
+               nilfs_set_file_dirty(sbi, inode, nr_dirty);
+       }
+       return ret;
+}
+
+static int nilfs_write_begin(struct file *file, struct address_space *mapping,
+                            loff_t pos, unsigned len, unsigned flags,
+                            struct page **pagep, void **fsdata)
+
+{
+       struct inode *inode = mapping->host;
+       int err = nilfs_transaction_begin(inode->i_sb, NULL, 1);
+
+       if (unlikely(err))
+               return err;
+
+       *pagep = NULL;
+       err = block_write_begin(file, mapping, pos, len, flags, pagep,
+                               fsdata, nilfs_get_block);
+       if (unlikely(err))
+               nilfs_transaction_abort(inode->i_sb);
+       return err;
+}
+
+static int nilfs_write_end(struct file *file, struct address_space *mapping,
+                          loff_t pos, unsigned len, unsigned copied,
+                          struct page *page, void *fsdata)
+{
+       struct inode *inode = mapping->host;
+       unsigned start = pos & (PAGE_CACHE_SIZE - 1);
+       unsigned nr_dirty;
+       int err;
+
+       nr_dirty = nilfs_page_count_clean_buffers(page, start,
+                                                 start + copied);
+       copied = generic_write_end(file, mapping, pos, len, copied, page,
+                                  fsdata);
+       nilfs_set_file_dirty(NILFS_SB(inode->i_sb), inode, nr_dirty);
+       err = nilfs_transaction_commit(inode->i_sb);
+       return err ? : copied;
+}
+
+static ssize_t
+nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
+               loff_t offset, unsigned long nr_segs)
+{
+       struct file *file = iocb->ki_filp;
+       struct inode *inode = file->f_mapping->host;
+       ssize_t size;
+
+       if (rw == WRITE)
+               return 0;
+
+       /* Needs synchronization with the cleaner */
+       size = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
+                                 offset, nr_segs, nilfs_get_block, NULL);
+       return size;
+}
+
+struct address_space_operations nilfs_aops = {
+       .writepage              = nilfs_writepage,
+       .readpage               = nilfs_readpage,
+       /* .sync_page           = nilfs_sync_page, */
+       .writepages             = nilfs_writepages,
+       .set_page_dirty         = nilfs_set_page_dirty,
+       .readpages              = nilfs_readpages,
+       .write_begin            = nilfs_write_begin,
+       .write_end              = nilfs_write_end,
+       /* .releasepage         = nilfs_releasepage, */
+       .invalidatepage         = block_invalidatepage,
+       .direct_IO              = nilfs_direct_IO,
+};
+
+struct inode *nilfs_new_inode(struct inode *dir, int mode)
+{
+       struct super_block *sb = dir->i_sb;
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct inode *inode;
+       struct nilfs_inode_info *ii;
+       int err = -ENOMEM;
+       ino_t ino;
+
+       inode = new_inode(sb);
+       if (unlikely(!inode))
+               goto failed;
+
+       mapping_set_gfp_mask(inode->i_mapping,
+                            mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
+
+       ii = NILFS_I(inode);
+       ii->i_state = 1 << NILFS_I_NEW;
+
+       err = nilfs_ifile_create_inode(sbi->s_ifile, &ino, &ii->i_bh);
+       if (unlikely(err))
+               goto failed_ifile_create_inode;
+       /* reference count of i_bh inherits from nilfs_mdt_read_block() */
+
+       atomic_inc(&sbi->s_inodes_count);
+
+       inode->i_uid = current_fsuid();
+       if (dir->i_mode & S_ISGID) {
+               inode->i_gid = dir->i_gid;
+               if (S_ISDIR(mode))
+                       mode |= S_ISGID;
+       } else
+               inode->i_gid = current_fsgid();
+
+       inode->i_mode = mode;
+       inode->i_ino = ino;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+
+       if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) {
+               err = nilfs_bmap_read(ii->i_bmap, NULL);
+               if (err < 0)
+                       goto failed_bmap;
+
+               set_bit(NILFS_I_BMAP, &ii->i_state);
+               /* No lock is needed; iget() ensures it. */
+       }
+
+       ii->i_flags = NILFS_I(dir)->i_flags;
+       if (S_ISLNK(mode))
+               ii->i_flags &= ~(NILFS_IMMUTABLE_FL | NILFS_APPEND_FL);
+       if (!S_ISDIR(mode))
+               ii->i_flags &= ~NILFS_DIRSYNC_FL;
+
+       /* ii->i_file_acl = 0; */
+       /* ii->i_dir_acl = 0; */
+       ii->i_dir_start_lookup = 0;
+#ifdef CONFIG_NILFS_FS_POSIX_ACL
+       ii->i_acl = NULL;
+       ii->i_default_acl = NULL;
+#endif
+       ii->i_cno = 0;
+       nilfs_set_inode_flags(inode);
+       spin_lock(&sbi->s_next_gen_lock);
+       inode->i_generation = sbi->s_next_generation++;
+       spin_unlock(&sbi->s_next_gen_lock);
+       insert_inode_hash(inode);
+
+       err = nilfs_init_acl(inode, dir);
+       if (unlikely(err))
+               goto failed_acl; /* never occur. When supporting
+                                   nilfs_init_acl(), proper cancellation of
+                                   above jobs should be considered */
+
+       mark_inode_dirty(inode);
+       return inode;
+
+ failed_acl:
+ failed_bmap:
+       inode->i_nlink = 0;
+       iput(inode);  /* raw_inode will be deleted through
+                        generic_delete_inode() */
+       goto failed;
+
+ failed_ifile_create_inode:
+       make_bad_inode(inode);
+       iput(inode);  /* if i_nlink == 1, generic_forget_inode() will be
+                        called */
+ failed:
+       return ERR_PTR(err);
+}
+
+void nilfs_free_inode(struct inode *inode)
+{
+       struct super_block *sb = inode->i_sb;
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+
+       clear_inode(inode);
+       /* XXX: check error code? Is there any thing I can do? */
+       (void) nilfs_ifile_delete_inode(sbi->s_ifile, inode->i_ino);
+       atomic_dec(&sbi->s_inodes_count);
+}
+
+void nilfs_set_inode_flags(struct inode *inode)
+{
+       unsigned int flags = NILFS_I(inode)->i_flags;
+
+       inode->i_flags &= ~(S_SYNC | S_APPEND | S_IMMUTABLE | S_NOATIME |
+                           S_DIRSYNC);
+       if (flags & NILFS_SYNC_FL)
+               inode->i_flags |= S_SYNC;
+       if (flags & NILFS_APPEND_FL)
+               inode->i_flags |= S_APPEND;
+       if (flags & NILFS_IMMUTABLE_FL)
+               inode->i_flags |= S_IMMUTABLE;
+#ifndef NILFS_ATIME_DISABLE
+       if (flags & NILFS_NOATIME_FL)
+#endif
+               inode->i_flags |= S_NOATIME;
+       if (flags & NILFS_DIRSYNC_FL)
+               inode->i_flags |= S_DIRSYNC;
+       mapping_set_gfp_mask(inode->i_mapping,
+                            mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
+}
+
+int nilfs_read_inode_common(struct inode *inode,
+                           struct nilfs_inode *raw_inode)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       int err;
+
+       inode->i_mode = le16_to_cpu(raw_inode->i_mode);
+       inode->i_uid = (uid_t)le32_to_cpu(raw_inode->i_uid);
+       inode->i_gid = (gid_t)le32_to_cpu(raw_inode->i_gid);
+       inode->i_nlink = le16_to_cpu(raw_inode->i_links_count);
+       inode->i_size = le64_to_cpu(raw_inode->i_size);
+       inode->i_atime.tv_sec = le64_to_cpu(raw_inode->i_mtime);
+       inode->i_ctime.tv_sec = le64_to_cpu(raw_inode->i_ctime);
+       inode->i_mtime.tv_sec = le64_to_cpu(raw_inode->i_mtime);
+       inode->i_atime.tv_nsec = le32_to_cpu(raw_inode->i_mtime_nsec);
+       inode->i_ctime.tv_nsec = le32_to_cpu(raw_inode->i_ctime_nsec);
+       inode->i_mtime.tv_nsec = le32_to_cpu(raw_inode->i_mtime_nsec);
+       if (inode->i_nlink == 0 && inode->i_mode == 0)
+               return -EINVAL; /* this inode is deleted */
+
+       inode->i_blocks = le64_to_cpu(raw_inode->i_blocks);
+       ii->i_flags = le32_to_cpu(raw_inode->i_flags);
+#if 0
+       ii->i_file_acl = le32_to_cpu(raw_inode->i_file_acl);
+       ii->i_dir_acl = S_ISREG(inode->i_mode) ?
+               0 : le32_to_cpu(raw_inode->i_dir_acl);
+#endif
+       ii->i_cno = 0;
+       inode->i_generation = le32_to_cpu(raw_inode->i_generation);
+
+       if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
+           S_ISLNK(inode->i_mode)) {
+               err = nilfs_bmap_read(ii->i_bmap, raw_inode);
+               if (err < 0)
+                       return err;
+               set_bit(NILFS_I_BMAP, &ii->i_state);
+               /* No lock is needed; iget() ensures it. */
+       }
+       return 0;
+}
+
+static int __nilfs_read_inode(struct super_block *sb, unsigned long ino,
+                             struct inode *inode)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct inode *dat = nilfs_dat_inode(sbi->s_nilfs);
+       struct buffer_head *bh;
+       struct nilfs_inode *raw_inode;
+       int err;
+
+       down_read(&NILFS_MDT(dat)->mi_sem);     /* XXX */
+       err = nilfs_ifile_get_inode_block(sbi->s_ifile, ino, &bh);
+       if (unlikely(err))
+               goto bad_inode;
+
+       raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, bh);
+
+#ifdef CONFIG_NILFS_FS_POSIX_ACL
+       ii->i_acl = NILFS_ACL_NOT_CACHED;
+       ii->i_default_acl = NILFS_ACL_NOT_CACHED;
+#endif
+       if (nilfs_read_inode_common(inode, raw_inode))
+               goto failed_unmap;
+
+       if (S_ISREG(inode->i_mode)) {
+               inode->i_op = &nilfs_file_inode_operations;
+               inode->i_fop = &nilfs_file_operations;
+               inode->i_mapping->a_ops = &nilfs_aops;
+       } else if (S_ISDIR(inode->i_mode)) {
+               inode->i_op = &nilfs_dir_inode_operations;
+               inode->i_fop = &nilfs_dir_operations;
+               inode->i_mapping->a_ops = &nilfs_aops;
+       } else if (S_ISLNK(inode->i_mode)) {
+               inode->i_op = &nilfs_symlink_inode_operations;
+               inode->i_mapping->a_ops = &nilfs_aops;
+       } else {
+               inode->i_op = &nilfs_special_inode_operations;
+               init_special_inode(
+                       inode, inode->i_mode,
+                       new_decode_dev(le64_to_cpu(raw_inode->i_device_code)));
+       }
+       nilfs_ifile_unmap_inode(sbi->s_ifile, ino, bh);
+       brelse(bh);
+       up_read(&NILFS_MDT(dat)->mi_sem);       /* XXX */
+       nilfs_set_inode_flags(inode);
+       return 0;
+
+ failed_unmap:
+       nilfs_ifile_unmap_inode(sbi->s_ifile, ino, bh);
+       brelse(bh);
+
+ bad_inode:
+       up_read(&NILFS_MDT(dat)->mi_sem);       /* XXX */
+       return err;
+}
+
+struct inode *nilfs_iget(struct super_block *sb, unsigned long ino)
+{
+       struct inode *inode;
+       int err;
+
+       inode = iget_locked(sb, ino);
+       if (unlikely(!inode))
+               return ERR_PTR(-ENOMEM);
+       if (!(inode->i_state & I_NEW))
+               return inode;
+
+       err = __nilfs_read_inode(sb, ino, inode);
+       if (unlikely(err)) {
+               iget_failed(inode);
+               return ERR_PTR(err);
+       }
+       unlock_new_inode(inode);
+       return inode;
+}
+
+void nilfs_write_inode_common(struct inode *inode,
+                             struct nilfs_inode *raw_inode, int has_bmap)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+
+       raw_inode->i_mode = cpu_to_le16(inode->i_mode);
+       raw_inode->i_uid = cpu_to_le32(inode->i_uid);
+       raw_inode->i_gid = cpu_to_le32(inode->i_gid);
+       raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
+       raw_inode->i_size = cpu_to_le64(inode->i_size);
+       raw_inode->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
+       raw_inode->i_mtime = cpu_to_le64(inode->i_mtime.tv_sec);
+       raw_inode->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
+       raw_inode->i_mtime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
+       raw_inode->i_blocks = cpu_to_le64(inode->i_blocks);
+
+       raw_inode->i_flags = cpu_to_le32(ii->i_flags);
+       raw_inode->i_generation = cpu_to_le32(inode->i_generation);
+
+       if (has_bmap)
+               nilfs_bmap_write(ii->i_bmap, raw_inode);
+       else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
+               raw_inode->i_device_code =
+                       cpu_to_le64(new_encode_dev(inode->i_rdev));
+       /* When extending inode, nilfs->ns_inode_size should be checked
+          for substitutions of appended fields */
+}
+
+void nilfs_update_inode(struct inode *inode, struct buffer_head *ibh)
+{
+       ino_t ino = inode->i_ino;
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       struct super_block *sb = inode->i_sb;
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct nilfs_inode *raw_inode;
+
+       raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, ibh);
+
+       /* The buffer is guarded with lock_buffer() by the caller */
+       if (test_and_clear_bit(NILFS_I_NEW, &ii->i_state))
+               memset(raw_inode, 0, NILFS_MDT(sbi->s_ifile)->mi_entry_size);
+       set_bit(NILFS_I_INODE_DIRTY, &ii->i_state);
+
+       nilfs_write_inode_common(inode, raw_inode, 0);
+               /* XXX: call with has_bmap = 0 is a workaround to avoid
+                  deadlock of bmap. This delays update of i_bmap to just
+                  before writing */
+       nilfs_ifile_unmap_inode(sbi->s_ifile, ino, ibh);
+}
+
+#define NILFS_MAX_TRUNCATE_BLOCKS      16384  /* 64MB for 4KB block */
+
+static void nilfs_truncate_bmap(struct nilfs_inode_info *ii,
+                               unsigned long from)
+{
+       unsigned long b;
+       int ret;
+
+       if (!test_bit(NILFS_I_BMAP, &ii->i_state))
+               return;
+ repeat:
+       ret = nilfs_bmap_last_key(ii->i_bmap, &b);
+       if (ret == -ENOENT)
+               return;
+       else if (ret < 0)
+               goto failed;
+
+       if (b < from)
+               return;
+
+       b -= min_t(unsigned long, NILFS_MAX_TRUNCATE_BLOCKS, b - from);
+       ret = nilfs_bmap_truncate(ii->i_bmap, b);
+       nilfs_relax_pressure_in_lock(ii->vfs_inode.i_sb);
+       if (!ret || (ret == -ENOMEM &&
+                    nilfs_bmap_truncate(ii->i_bmap, b) == 0))
+               goto repeat;
+
+ failed:
+       if (ret == -EINVAL)
+               nilfs_error(ii->vfs_inode.i_sb, __func__,
+                           "bmap is broken (ino=%lu)", ii->vfs_inode.i_ino);
+       else
+               nilfs_warning(ii->vfs_inode.i_sb, __func__,
+                             "failed to truncate bmap (ino=%lu, err=%d)",
+                             ii->vfs_inode.i_ino, ret);
+}
+
+void nilfs_truncate(struct inode *inode)
+{
+       unsigned long blkoff;
+       unsigned int blocksize;
+       struct nilfs_transaction_info ti;
+       struct super_block *sb = inode->i_sb;
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+
+       if (!test_bit(NILFS_I_BMAP, &ii->i_state))
+               return;
+       if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
+               return;
+
+       blocksize = sb->s_blocksize;
+       blkoff = (inode->i_size + blocksize - 1) >> sb->s_blocksize_bits;
+       nilfs_transaction_begin(sb, &ti, 0); /* never fails */
+
+       block_truncate_page(inode->i_mapping, inode->i_size, nilfs_get_block);
+
+       nilfs_truncate_bmap(ii, blkoff);
+
+       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       if (IS_SYNC(inode))
+               nilfs_set_transaction_flag(NILFS_TI_SYNC);
+
+       nilfs_set_file_dirty(NILFS_SB(sb), inode, 0);
+       nilfs_transaction_commit(sb);
+       /* May construct a logical segment and may fail in sync mode.
+          But truncate has no return value. */
+}
+
+void nilfs_delete_inode(struct inode *inode)
+{
+       struct nilfs_transaction_info ti;
+       struct super_block *sb = inode->i_sb;
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+
+       if (unlikely(is_bad_inode(inode))) {
+               if (inode->i_data.nrpages)
+                       truncate_inode_pages(&inode->i_data, 0);
+               clear_inode(inode);
+               return;
+       }
+       nilfs_transaction_begin(sb, &ti, 0); /* never fails */
+
+       if (inode->i_data.nrpages)
+               truncate_inode_pages(&inode->i_data, 0);
+
+       nilfs_truncate_bmap(ii, 0);
+       nilfs_free_inode(inode);
+       /* nilfs_free_inode() marks inode buffer dirty */
+       if (IS_SYNC(inode))
+               nilfs_set_transaction_flag(NILFS_TI_SYNC);
+       nilfs_transaction_commit(sb);
+       /* May construct a logical segment and may fail in sync mode.
+          But delete_inode has no return value. */
+}
+
+int nilfs_setattr(struct dentry *dentry, struct iattr *iattr)
+{
+       struct nilfs_transaction_info ti;
+       struct inode *inode = dentry->d_inode;
+       struct super_block *sb = inode->i_sb;
+       int err;
+
+       err = inode_change_ok(inode, iattr);
+       if (err)
+               return err;
+
+       err = nilfs_transaction_begin(sb, &ti, 0);
+       if (unlikely(err))
+               return err;
+       err = inode_setattr(inode, iattr);
+       if (!err && (iattr->ia_valid & ATTR_MODE))
+               err = nilfs_acl_chmod(inode);
+       if (likely(!err))
+               err = nilfs_transaction_commit(sb);
+       else
+               nilfs_transaction_abort(sb);
+
+       return err;
+}
+
+int nilfs_load_inode_block(struct nilfs_sb_info *sbi, struct inode *inode,
+                          struct buffer_head **pbh)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       int err;
+
+       spin_lock(&sbi->s_inode_lock);
+       /* Caller of this function MUST lock s_inode_lock */
+       if (ii->i_bh == NULL) {
+               spin_unlock(&sbi->s_inode_lock);
+               err = nilfs_ifile_get_inode_block(sbi->s_ifile, inode->i_ino,
+                                                 pbh);
+               if (unlikely(err))
+                       return err;
+               spin_lock(&sbi->s_inode_lock);
+               if (ii->i_bh == NULL)
+                       ii->i_bh = *pbh;
+               else {
+                       brelse(*pbh);
+                       *pbh = ii->i_bh;
+               }
+       } else
+               *pbh = ii->i_bh;
+
+       get_bh(*pbh);
+       spin_unlock(&sbi->s_inode_lock);
+       return 0;
+}
+
+int nilfs_inode_dirty(struct inode *inode)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       struct nilfs_sb_info *sbi = NILFS_SB(inode->i_sb);
+       int ret = 0;
+
+       if (!list_empty(&ii->i_dirty)) {
+               spin_lock(&sbi->s_inode_lock);
+               ret = test_bit(NILFS_I_DIRTY, &ii->i_state) ||
+                       test_bit(NILFS_I_BUSY, &ii->i_state);
+               spin_unlock(&sbi->s_inode_lock);
+       }
+       return ret;
+}
+
+int nilfs_set_file_dirty(struct nilfs_sb_info *sbi, struct inode *inode,
+                        unsigned nr_dirty)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+
+       atomic_add(nr_dirty, &sbi->s_nilfs->ns_ndirtyblks);
+
+       if (test_and_set_bit(NILFS_I_DIRTY, &ii->i_state))
+               return 0;
+
+       spin_lock(&sbi->s_inode_lock);
+       if (!test_bit(NILFS_I_QUEUED, &ii->i_state) &&
+           !test_bit(NILFS_I_BUSY, &ii->i_state)) {
+               /* Because this routine may race with nilfs_dispose_list(),
+                  we have to check NILFS_I_QUEUED here, too. */
+               if (list_empty(&ii->i_dirty) && igrab(inode) == NULL) {
+                       /* This will happen when somebody is freeing
+                          this inode. */
+                       nilfs_warning(sbi->s_super, __func__,
+                                     "cannot get inode (ino=%lu)\n",
+                                     inode->i_ino);
+                       spin_unlock(&sbi->s_inode_lock);
+                       return -EINVAL; /* NILFS_I_DIRTY may remain for
+                                          freeing inode */
+               }
+               list_del(&ii->i_dirty);
+               list_add_tail(&ii->i_dirty, &sbi->s_dirty_files);
+               set_bit(NILFS_I_QUEUED, &ii->i_state);
+       }
+       spin_unlock(&sbi->s_inode_lock);
+       return 0;
+}
+
+int nilfs_mark_inode_dirty(struct inode *inode)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(inode->i_sb);
+       struct buffer_head *ibh;
+       int err;
+
+       err = nilfs_load_inode_block(sbi, inode, &ibh);
+       if (unlikely(err)) {
+               nilfs_warning(inode->i_sb, __func__,
+                             "failed to reget inode block.\n");
+               return err;
+       }
+       lock_buffer(ibh);
+       nilfs_update_inode(inode, ibh);
+       unlock_buffer(ibh);
+       nilfs_mdt_mark_buffer_dirty(ibh);
+       nilfs_mdt_mark_dirty(sbi->s_ifile);
+       brelse(ibh);
+       return 0;
+}
+
+/**
+ * nilfs_dirty_inode - reflect changes on given inode to an inode block.
+ * @inode: inode of the file to be registered.
+ *
+ * nilfs_dirty_inode() loads a inode block containing the specified
+ * @inode and copies data from a nilfs_inode to a corresponding inode
+ * entry in the inode block. This operation is excluded from the segment
+ * construction. This function can be called both as a single operation
+ * and as a part of indivisible file operations.
+ */
+void nilfs_dirty_inode(struct inode *inode)
+{
+       struct nilfs_transaction_info ti;
+
+       if (is_bad_inode(inode)) {
+               nilfs_warning(inode->i_sb, __func__,
+                             "tried to mark bad_inode dirty. ignored.\n");
+               dump_stack();
+               return;
+       }
+       nilfs_transaction_begin(inode->i_sb, &ti, 0);
+       nilfs_mark_inode_dirty(inode);
+       nilfs_transaction_commit(inode->i_sb); /* never fails */
+}
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
new file mode 100644 (file)
index 0000000..108d281
--- /dev/null
@@ -0,0 +1,654 @@
+/*
+ * ioctl.c - NILFS ioctl operations.
+ *
+ * Copyright (C) 2007, 2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#include <linux/fs.h>
+#include <linux/wait.h>
+#include <linux/smp_lock.h>    /* lock_kernel(), unlock_kernel() */
+#include <linux/capability.h>  /* capable() */
+#include <linux/uaccess.h>     /* copy_from_user(), copy_to_user() */
+#include <linux/nilfs2_fs.h>
+#include "nilfs.h"
+#include "segment.h"
+#include "bmap.h"
+#include "cpfile.h"
+#include "sufile.h"
+#include "dat.h"
+
+
+static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,
+                                struct nilfs_argv *argv, int dir,
+                                ssize_t (*dofunc)(struct the_nilfs *,
+                                                  __u64 *, int,
+                                                  void *, size_t, size_t))
+{
+       void *buf;
+       void __user *base = (void __user *)(unsigned long)argv->v_base;
+       size_t maxmembs, total, n;
+       ssize_t nr;
+       int ret, i;
+       __u64 pos, ppos;
+
+       if (argv->v_nmembs == 0)
+               return 0;
+
+       if (argv->v_size > PAGE_SIZE)
+               return -EINVAL;
+
+       buf = (void *)__get_free_pages(GFP_NOFS, 0);
+       if (unlikely(!buf))
+               return -ENOMEM;
+       maxmembs = PAGE_SIZE / argv->v_size;
+
+       ret = 0;
+       total = 0;
+       pos = argv->v_index;
+       for (i = 0; i < argv->v_nmembs; i += n) {
+               n = (argv->v_nmembs - i < maxmembs) ?
+                       argv->v_nmembs - i : maxmembs;
+               if ((dir & _IOC_WRITE) &&
+                   copy_from_user(buf, base + argv->v_size * i,
+                                  argv->v_size * n)) {
+                       ret = -EFAULT;
+                       break;
+               }
+               ppos = pos;
+               nr = dofunc(nilfs, &pos, argv->v_flags, buf, argv->v_size,
+                              n);
+               if (nr < 0) {
+                       ret = nr;
+                       break;
+               }
+               if ((dir & _IOC_READ) &&
+                   copy_to_user(base + argv->v_size * i, buf,
+                                argv->v_size * nr)) {
+                       ret = -EFAULT;
+                       break;
+               }
+               total += nr;
+               if ((size_t)nr < n)
+                       break;
+               if (pos == ppos)
+                       pos += n;
+       }
+       argv->v_nmembs = total;
+
+       free_pages((unsigned long)buf, 0);
+       return ret;
+}
+
+static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp,
+                                    unsigned int cmd, void __user *argp)
+{
+       struct inode *cpfile = NILFS_SB(inode->i_sb)->s_nilfs->ns_cpfile;
+       struct nilfs_transaction_info ti;
+       struct nilfs_cpmode cpmode;
+       int ret;
+
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
+       if (copy_from_user(&cpmode, argp, sizeof(cpmode)))
+               return -EFAULT;
+
+       nilfs_transaction_begin(inode->i_sb, &ti, 0);
+       ret = nilfs_cpfile_change_cpmode(
+               cpfile, cpmode.cm_cno, cpmode.cm_mode);
+       if (unlikely(ret < 0)) {
+               nilfs_transaction_abort(inode->i_sb);
+               return ret;
+       }
+       nilfs_transaction_commit(inode->i_sb); /* never fails */
+       return ret;
+}
+
+static int
+nilfs_ioctl_delete_checkpoint(struct inode *inode, struct file *filp,
+                             unsigned int cmd, void __user *argp)
+{
+       struct inode *cpfile = NILFS_SB(inode->i_sb)->s_nilfs->ns_cpfile;
+       struct nilfs_transaction_info ti;
+       __u64 cno;
+       int ret;
+
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
+       if (copy_from_user(&cno, argp, sizeof(cno)))
+               return -EFAULT;
+
+       nilfs_transaction_begin(inode->i_sb, &ti, 0);
+       ret = nilfs_cpfile_delete_checkpoint(cpfile, cno);
+       if (unlikely(ret < 0)) {
+               nilfs_transaction_abort(inode->i_sb);
+               return ret;
+       }
+       nilfs_transaction_commit(inode->i_sb); /* never fails */
+       return ret;
+}
+
+static ssize_t
+nilfs_ioctl_do_get_cpinfo(struct the_nilfs *nilfs, __u64 *posp, int flags,
+                         void *buf, size_t size, size_t nmembs)
+{
+       return nilfs_cpfile_get_cpinfo(nilfs->ns_cpfile, posp, flags, buf,
+                                      nmembs);
+}
+
+static int nilfs_ioctl_get_cpinfo(struct inode *inode, struct file *filp,
+                                 unsigned int cmd, void __user *argp)
+{
+       struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
+       struct nilfs_argv argv;
+       int ret;
+
+       if (copy_from_user(&argv, argp, sizeof(argv)))
+               return -EFAULT;
+
+       down_read(&nilfs->ns_segctor_sem);
+       ret = nilfs_ioctl_wrap_copy(nilfs, &argv, _IOC_DIR(cmd),
+                                   nilfs_ioctl_do_get_cpinfo);
+       up_read(&nilfs->ns_segctor_sem);
+       if (ret < 0)
+               return ret;
+
+       if (copy_to_user(argp, &argv, sizeof(argv)))
+               ret = -EFAULT;
+       return ret;
+}
+
+static int nilfs_ioctl_get_cpstat(struct inode *inode, struct file *filp,
+                                 unsigned int cmd, void __user *argp)
+{
+       struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
+       struct nilfs_cpstat cpstat;
+       int ret;
+
+       down_read(&nilfs->ns_segctor_sem);
+       ret = nilfs_cpfile_get_stat(nilfs->ns_cpfile, &cpstat);
+       up_read(&nilfs->ns_segctor_sem);
+       if (ret < 0)
+               return ret;
+
+       if (copy_to_user(argp, &cpstat, sizeof(cpstat)))
+               ret = -EFAULT;
+       return ret;
+}
+
+static ssize_t
+nilfs_ioctl_do_get_suinfo(struct the_nilfs *nilfs, __u64 *posp, int flags,
+                         void *buf, size_t size, size_t nmembs)
+{
+       return nilfs_sufile_get_suinfo(nilfs->ns_sufile, *posp, buf, nmembs);
+}
+
+static int nilfs_ioctl_get_suinfo(struct inode *inode, struct file *filp,
+                                 unsigned int cmd, void __user *argp)
+{
+       struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
+       struct nilfs_argv argv;
+       int ret;
+
+       if (copy_from_user(&argv, argp, sizeof(argv)))
+               return -EFAULT;
+
+       down_read(&nilfs->ns_segctor_sem);
+       ret = nilfs_ioctl_wrap_copy(nilfs, &argv, _IOC_DIR(cmd),
+                                   nilfs_ioctl_do_get_suinfo);
+       up_read(&nilfs->ns_segctor_sem);
+       if (ret < 0)
+               return ret;
+
+       if (copy_to_user(argp, &argv, sizeof(argv)))
+               ret = -EFAULT;
+       return ret;
+}
+
+static int nilfs_ioctl_get_sustat(struct inode *inode, struct file *filp,
+                                 unsigned int cmd, void __user *argp)
+{
+       struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
+       struct nilfs_sustat sustat;
+       int ret;
+
+       down_read(&nilfs->ns_segctor_sem);
+       ret = nilfs_sufile_get_stat(nilfs->ns_sufile, &sustat);
+       up_read(&nilfs->ns_segctor_sem);
+       if (ret < 0)
+               return ret;
+
+       if (copy_to_user(argp, &sustat, sizeof(sustat)))
+               ret = -EFAULT;
+       return ret;
+}
+
+static ssize_t
+nilfs_ioctl_do_get_vinfo(struct the_nilfs *nilfs, __u64 *posp, int flags,
+                        void *buf, size_t size, size_t nmembs)
+{
+       return nilfs_dat_get_vinfo(nilfs_dat_inode(nilfs), buf, nmembs);
+}
+
+static int nilfs_ioctl_get_vinfo(struct inode *inode, struct file *filp,
+                                unsigned int cmd, void __user *argp)
+{
+       struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
+       struct nilfs_argv argv;
+       int ret;
+
+       if (copy_from_user(&argv, argp, sizeof(argv)))
+               return -EFAULT;
+
+       down_read(&nilfs->ns_segctor_sem);
+       ret = nilfs_ioctl_wrap_copy(nilfs, &argv, _IOC_DIR(cmd),
+                                   nilfs_ioctl_do_get_vinfo);
+       up_read(&nilfs->ns_segctor_sem);
+       if (ret < 0)
+               return ret;
+
+       if (copy_to_user(argp, &argv, sizeof(argv)))
+               ret = -EFAULT;
+       return ret;
+}
+
+static ssize_t
+nilfs_ioctl_do_get_bdescs(struct the_nilfs *nilfs, __u64 *posp, int flags,
+                         void *buf, size_t size, size_t nmembs)
+{
+       struct inode *dat = nilfs_dat_inode(nilfs);
+       struct nilfs_bmap *bmap = NILFS_I(dat)->i_bmap;
+       struct nilfs_bdesc *bdescs = buf;
+       int ret, i;
+
+       for (i = 0; i < nmembs; i++) {
+               ret = nilfs_bmap_lookup_at_level(bmap,
+                                                bdescs[i].bd_offset,
+                                                bdescs[i].bd_level + 1,
+                                                &bdescs[i].bd_blocknr);
+               if (ret < 0) {
+                       if (ret != -ENOENT)
+                               return ret;
+                       bdescs[i].bd_blocknr = 0;
+               }
+       }
+       return nmembs;
+}
+
+static int nilfs_ioctl_get_bdescs(struct inode *inode, struct file *filp,
+                                 unsigned int cmd, void __user *argp)
+{
+       struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
+       struct nilfs_argv argv;
+       int ret;
+
+       if (copy_from_user(&argv, argp, sizeof(argv)))
+               return -EFAULT;
+
+       down_read(&nilfs->ns_segctor_sem);
+       ret = nilfs_ioctl_wrap_copy(nilfs, &argv, _IOC_DIR(cmd),
+                                   nilfs_ioctl_do_get_bdescs);
+       up_read(&nilfs->ns_segctor_sem);
+       if (ret < 0)
+               return ret;
+
+       if (copy_to_user(argp, &argv, sizeof(argv)))
+               ret = -EFAULT;
+       return ret;
+}
+
+static int nilfs_ioctl_move_inode_block(struct inode *inode,
+                                       struct nilfs_vdesc *vdesc,
+                                       struct list_head *buffers)
+{
+       struct buffer_head *bh;
+       int ret;
+
+       if (vdesc->vd_flags == 0)
+               ret = nilfs_gccache_submit_read_data(
+                       inode, vdesc->vd_offset, vdesc->vd_blocknr,
+                       vdesc->vd_vblocknr, &bh);
+       else
+               ret = nilfs_gccache_submit_read_node(
+                       inode, vdesc->vd_blocknr, vdesc->vd_vblocknr, &bh);
+
+       if (unlikely(ret < 0)) {
+               if (ret == -ENOENT)
+                       printk(KERN_CRIT
+                              "%s: invalid virtual block address (%s): "
+                              "ino=%llu, cno=%llu, offset=%llu, "
+                              "blocknr=%llu, vblocknr=%llu\n",
+                              __func__, vdesc->vd_flags ? "node" : "data",
+                              (unsigned long long)vdesc->vd_ino,
+                              (unsigned long long)vdesc->vd_cno,
+                              (unsigned long long)vdesc->vd_offset,
+                              (unsigned long long)vdesc->vd_blocknr,
+                              (unsigned long long)vdesc->vd_vblocknr);
+               return ret;
+       }
+       bh->b_private = vdesc;
+       list_add_tail(&bh->b_assoc_buffers, buffers);
+       return 0;
+}
+
+static ssize_t
+nilfs_ioctl_do_move_blocks(struct the_nilfs *nilfs, __u64 *posp, int flags,
+                          void *buf, size_t size, size_t nmembs)
+{
+       struct inode *inode;
+       struct nilfs_vdesc *vdesc;
+       struct buffer_head *bh, *n;
+       LIST_HEAD(buffers);
+       ino_t ino;
+       __u64 cno;
+       int i, ret;
+
+       for (i = 0, vdesc = buf; i < nmembs; ) {
+               ino = vdesc->vd_ino;
+               cno = vdesc->vd_cno;
+               inode = nilfs_gc_iget(nilfs, ino, cno);
+               if (unlikely(inode == NULL)) {
+                       ret = -ENOMEM;
+                       goto failed;
+               }
+               do {
+                       ret = nilfs_ioctl_move_inode_block(inode, vdesc,
+                                                          &buffers);
+                       if (unlikely(ret < 0))
+                               goto failed;
+                       vdesc++;
+               } while (++i < nmembs &&
+                        vdesc->vd_ino == ino && vdesc->vd_cno == cno);
+       }
+
+       list_for_each_entry_safe(bh, n, &buffers, b_assoc_buffers) {
+               ret = nilfs_gccache_wait_and_mark_dirty(bh);
+               if (unlikely(ret < 0)) {
+                       if (ret == -EEXIST) {
+                               vdesc = bh->b_private;
+                               printk(KERN_CRIT
+                                      "%s: conflicting %s buffer: "
+                                      "ino=%llu, cno=%llu, offset=%llu, "
+                                      "blocknr=%llu, vblocknr=%llu\n",
+                                      __func__,
+                                      vdesc->vd_flags ? "node" : "data",
+                                      (unsigned long long)vdesc->vd_ino,
+                                      (unsigned long long)vdesc->vd_cno,
+                                      (unsigned long long)vdesc->vd_offset,
+                                      (unsigned long long)vdesc->vd_blocknr,
+                                      (unsigned long long)vdesc->vd_vblocknr);
+                       }
+                       goto failed;
+               }
+               list_del_init(&bh->b_assoc_buffers);
+               bh->b_private = NULL;
+               brelse(bh);
+       }
+       return nmembs;
+
+ failed:
+       list_for_each_entry_safe(bh, n, &buffers, b_assoc_buffers) {
+               list_del_init(&bh->b_assoc_buffers);
+               bh->b_private = NULL;
+               brelse(bh);
+       }
+       return ret;
+}
+
+static inline int nilfs_ioctl_move_blocks(struct the_nilfs *nilfs,
+                                         struct nilfs_argv *argv,
+                                         int dir)
+{
+       return nilfs_ioctl_wrap_copy(nilfs, argv, dir,
+                                    nilfs_ioctl_do_move_blocks);
+}
+
+static ssize_t
+nilfs_ioctl_do_delete_checkpoints(struct the_nilfs *nilfs, __u64 *posp,
+                                 int flags, void *buf, size_t size,
+                                 size_t nmembs)
+{
+       struct inode *cpfile = nilfs->ns_cpfile;
+       struct nilfs_period *periods = buf;
+       int ret, i;
+
+       for (i = 0; i < nmembs; i++) {
+               ret = nilfs_cpfile_delete_checkpoints(
+                       cpfile, periods[i].p_start, periods[i].p_end);
+               if (ret < 0)
+                       return ret;
+       }
+       return nmembs;
+}
+
+static inline int nilfs_ioctl_delete_checkpoints(struct the_nilfs *nilfs,
+                                                struct nilfs_argv *argv,
+                                                int dir)
+{
+       return nilfs_ioctl_wrap_copy(nilfs, argv, dir,
+                                    nilfs_ioctl_do_delete_checkpoints);
+}
+
+static ssize_t
+nilfs_ioctl_do_free_vblocknrs(struct the_nilfs *nilfs, __u64 *posp, int flags,
+                             void *buf, size_t size, size_t nmembs)
+{
+       int ret = nilfs_dat_freev(nilfs_dat_inode(nilfs), buf, nmembs);
+
+       return (ret < 0) ? ret : nmembs;
+}
+
+static inline int nilfs_ioctl_free_vblocknrs(struct the_nilfs *nilfs,
+                                            struct nilfs_argv *argv,
+                                            int dir)
+{
+       return nilfs_ioctl_wrap_copy(nilfs, argv, dir,
+                                    nilfs_ioctl_do_free_vblocknrs);
+}
+
+static ssize_t
+nilfs_ioctl_do_mark_blocks_dirty(struct the_nilfs *nilfs, __u64 *posp,
+                                int flags, void *buf, size_t size,
+                                size_t nmembs)
+{
+       struct inode *dat = nilfs_dat_inode(nilfs);
+       struct nilfs_bmap *bmap = NILFS_I(dat)->i_bmap;
+       struct nilfs_bdesc *bdescs = buf;
+       int ret, i;
+
+       for (i = 0; i < nmembs; i++) {
+               /* XXX: use macro or inline func to check liveness */
+               ret = nilfs_bmap_lookup_at_level(bmap,
+                                                bdescs[i].bd_offset,
+                                                bdescs[i].bd_level + 1,
+                                                &bdescs[i].bd_blocknr);
+               if (ret < 0) {
+                       if (ret != -ENOENT)
+                               return ret;
+                       bdescs[i].bd_blocknr = 0;
+               }
+               if (bdescs[i].bd_blocknr != bdescs[i].bd_oblocknr)
+                       /* skip dead block */
+                       continue;
+               if (bdescs[i].bd_level == 0) {
+                       ret = nilfs_mdt_mark_block_dirty(dat,
+                                                        bdescs[i].bd_offset);
+                       if (ret < 0) {
+                               WARN_ON(ret == -ENOENT);
+                               return ret;
+                       }
+               } else {
+                       ret = nilfs_bmap_mark(bmap, bdescs[i].bd_offset,
+                                             bdescs[i].bd_level);
+                       if (ret < 0) {
+                               WARN_ON(ret == -ENOENT);
+                               return ret;
+                       }
+               }
+       }
+       return nmembs;
+}
+
+static inline int nilfs_ioctl_mark_blocks_dirty(struct the_nilfs *nilfs,
+                                               struct nilfs_argv *argv,
+                                               int dir)
+{
+       return nilfs_ioctl_wrap_copy(nilfs, argv, dir,
+                                    nilfs_ioctl_do_mark_blocks_dirty);
+}
+
+static ssize_t
+nilfs_ioctl_do_free_segments(struct the_nilfs *nilfs, __u64 *posp, int flags,
+                            void *buf, size_t size, size_t nmembs)
+{
+       struct nilfs_sb_info *sbi = nilfs_get_writer(nilfs);
+       int ret;
+
+       if (unlikely(!sbi))
+               return -EROFS;
+       ret = nilfs_segctor_add_segments_to_be_freed(
+               NILFS_SC(sbi), buf, nmembs);
+       nilfs_put_writer(nilfs);
+
+       return (ret < 0) ? ret : nmembs;
+}
+
+static inline int nilfs_ioctl_free_segments(struct the_nilfs *nilfs,
+                                            struct nilfs_argv *argv,
+                                            int dir)
+{
+       return nilfs_ioctl_wrap_copy(nilfs, argv, dir,
+                                    nilfs_ioctl_do_free_segments);
+}
+
+int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *nilfs,
+                                      void __user *argp)
+{
+       struct nilfs_argv argv[5];
+       const char *msg;
+       int dir, ret;
+
+       if (copy_from_user(argv, argp, sizeof(argv)))
+               return -EFAULT;
+
+       dir = _IOC_WRITE;
+       ret = nilfs_ioctl_move_blocks(nilfs, &argv[0], dir);
+       if (ret < 0) {
+               msg = "cannot read source blocks";
+               goto failed;
+       }
+       ret = nilfs_ioctl_delete_checkpoints(nilfs, &argv[1], dir);
+       if (ret < 0) {
+               /*
+                * can safely abort because checkpoints can be removed
+                * independently.
+                */
+               msg = "cannot delete checkpoints";
+               goto failed;
+       }
+       ret = nilfs_ioctl_free_vblocknrs(nilfs, &argv[2], dir);
+       if (ret < 0) {
+               /*
+                * can safely abort because DAT file is updated atomically
+                * using a copy-on-write technique.
+                */
+               msg = "cannot delete virtual blocks from DAT file";
+               goto failed;
+       }
+       ret = nilfs_ioctl_mark_blocks_dirty(nilfs, &argv[3], dir);
+       if (ret < 0) {
+               /*
+                * can safely abort because the operation is nondestructive.
+                */
+               msg = "cannot mark copying blocks dirty";
+               goto failed;
+       }
+       ret = nilfs_ioctl_free_segments(nilfs, &argv[4], dir);
+       if (ret < 0) {
+               /*
+                * can safely abort because this operation is atomic.
+                */
+               msg = "cannot set segments to be freed";
+               goto failed;
+       }
+       return 0;
+
+ failed:
+       nilfs_remove_all_gcinode(nilfs);
+       printk(KERN_ERR "NILFS: GC failed during preparation: %s: err=%d\n",
+              msg, ret);
+       return ret;
+}
+
+static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
+                                     unsigned int cmd, void __user *argp)
+{
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
+       return nilfs_clean_segments(inode->i_sb, argp);
+}
+
+static int nilfs_ioctl_sync(struct inode *inode, struct file *filp,
+                           unsigned int cmd, void __user *argp)
+{
+       __u64 cno;
+       int ret;
+
+       ret = nilfs_construct_segment(inode->i_sb);
+       if (ret < 0)
+               return ret;
+
+       if (argp != NULL) {
+               cno = NILFS_SB(inode->i_sb)->s_nilfs->ns_cno - 1;
+               if (copy_to_user(argp, &cno, sizeof(cno)))
+                       return -EFAULT;
+       }
+       return 0;
+}
+
+long nilfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+       struct inode *inode = filp->f_dentry->d_inode;
+       void __user *argp = (void * __user *)arg;
+
+       switch (cmd) {
+       case NILFS_IOCTL_CHANGE_CPMODE:
+               return nilfs_ioctl_change_cpmode(inode, filp, cmd, argp);
+       case NILFS_IOCTL_DELETE_CHECKPOINT:
+               return nilfs_ioctl_delete_checkpoint(inode, filp, cmd, argp);
+       case NILFS_IOCTL_GET_CPINFO:
+               return nilfs_ioctl_get_cpinfo(inode, filp, cmd, argp);
+       case NILFS_IOCTL_GET_CPSTAT:
+               return nilfs_ioctl_get_cpstat(inode, filp, cmd, argp);
+       case NILFS_IOCTL_GET_SUINFO:
+               return nilfs_ioctl_get_suinfo(inode, filp, cmd, argp);
+       case NILFS_IOCTL_GET_SUSTAT:
+               return nilfs_ioctl_get_sustat(inode, filp, cmd, argp);
+       case NILFS_IOCTL_GET_VINFO:
+               /* XXX: rename to ??? */
+               return nilfs_ioctl_get_vinfo(inode, filp, cmd, argp);
+       case NILFS_IOCTL_GET_BDESCS:
+               return nilfs_ioctl_get_bdescs(inode, filp, cmd, argp);
+       case NILFS_IOCTL_CLEAN_SEGMENTS:
+               return nilfs_ioctl_clean_segments(inode, filp, cmd, argp);
+       case NILFS_IOCTL_SYNC:
+               return nilfs_ioctl_sync(inode, filp, cmd, argp);
+       default:
+               return -ENOTTY;
+       }
+}
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
new file mode 100644 (file)
index 0000000..47dd815
--- /dev/null
@@ -0,0 +1,563 @@
+/*
+ * mdt.c - meta data file for NILFS
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ */
+
+#include <linux/buffer_head.h>
+#include <linux/mpage.h>
+#include <linux/mm.h>
+#include <linux/writeback.h>
+#include <linux/backing-dev.h>
+#include <linux/swap.h>
+#include "nilfs.h"
+#include "segment.h"
+#include "page.h"
+#include "mdt.h"
+
+
+#define NILFS_MDT_MAX_RA_BLOCKS                (16 - 1)
+
+#define INIT_UNUSED_INODE_FIELDS
+
+static int
+nilfs_mdt_insert_new_block(struct inode *inode, unsigned long block,
+                          struct buffer_head *bh,
+                          void (*init_block)(struct inode *,
+                                             struct buffer_head *, void *))
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       void *kaddr;
+       int ret;
+
+       /* Caller exclude read accesses using page lock */
+
+       /* set_buffer_new(bh); */
+       bh->b_blocknr = 0;
+
+       ret = nilfs_bmap_insert(ii->i_bmap, block, (unsigned long)bh);
+       if (unlikely(ret))
+               return ret;
+
+       set_buffer_mapped(bh);
+
+       kaddr = kmap_atomic(bh->b_page, KM_USER0);
+       memset(kaddr + bh_offset(bh), 0, 1 << inode->i_blkbits);
+       if (init_block)
+               init_block(inode, bh, kaddr);
+       flush_dcache_page(bh->b_page);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       set_buffer_uptodate(bh);
+       nilfs_mark_buffer_dirty(bh);
+       nilfs_mdt_mark_dirty(inode);
+       return 0;
+}
+
+static int nilfs_mdt_create_block(struct inode *inode, unsigned long block,
+                                 struct buffer_head **out_bh,
+                                 void (*init_block)(struct inode *,
+                                                    struct buffer_head *,
+                                                    void *))
+{
+       struct the_nilfs *nilfs = NILFS_MDT(inode)->mi_nilfs;
+       struct nilfs_sb_info *writer = NULL;
+       struct super_block *sb = inode->i_sb;
+       struct nilfs_transaction_info ti;
+       struct buffer_head *bh;
+       int err;
+
+       if (!sb) {
+               writer = nilfs_get_writer(nilfs);
+               if (!writer) {
+                       err = -EROFS;
+                       goto out;
+               }
+               sb = writer->s_super;
+       }
+
+       nilfs_transaction_begin(sb, &ti, 0);
+
+       err = -ENOMEM;
+       bh = nilfs_grab_buffer(inode, inode->i_mapping, block, 0);
+       if (unlikely(!bh))
+               goto failed_unlock;
+
+       err = -EEXIST;
+       if (buffer_uptodate(bh) || buffer_mapped(bh))
+               goto failed_bh;
+#if 0
+       /* The uptodate flag is not protected by the page lock, but
+          the mapped flag is.  Thus, we don't have to wait the buffer. */
+       wait_on_buffer(bh);
+       if (buffer_uptodate(bh))
+               goto failed_bh;
+#endif
+
+       bh->b_bdev = nilfs->ns_bdev;
+       err = nilfs_mdt_insert_new_block(inode, block, bh, init_block);
+       if (likely(!err)) {
+               get_bh(bh);
+               *out_bh = bh;
+       }
+
+ failed_bh:
+       unlock_page(bh->b_page);
+       page_cache_release(bh->b_page);
+       brelse(bh);
+
+ failed_unlock:
+       if (likely(!err))
+               err = nilfs_transaction_commit(sb);
+       else
+               nilfs_transaction_abort(sb);
+       if (writer)
+               nilfs_put_writer(nilfs);
+ out:
+       return err;
+}
+
+static int
+nilfs_mdt_submit_block(struct inode *inode, unsigned long blkoff,
+                      int mode, struct buffer_head **out_bh)
+{
+       struct buffer_head *bh;
+       unsigned long blknum = 0;
+       int ret = -ENOMEM;
+
+       bh = nilfs_grab_buffer(inode, inode->i_mapping, blkoff, 0);
+       if (unlikely(!bh))
+               goto failed;
+
+       ret = -EEXIST; /* internal code */
+       if (buffer_uptodate(bh))
+               goto out;
+
+       if (mode == READA) {
+               if (!trylock_buffer(bh)) {
+                       ret = -EBUSY;
+                       goto failed_bh;
+               }
+       } else /* mode == READ */
+               lock_buffer(bh);
+
+       if (buffer_uptodate(bh)) {
+               unlock_buffer(bh);
+               goto out;
+       }
+       if (!buffer_mapped(bh)) { /* unused buffer */
+               ret = nilfs_bmap_lookup(NILFS_I(inode)->i_bmap, blkoff,
+                                       &blknum);
+               if (unlikely(ret)) {
+                       unlock_buffer(bh);
+                       goto failed_bh;
+               }
+               bh->b_bdev = NILFS_MDT(inode)->mi_nilfs->ns_bdev;
+               bh->b_blocknr = blknum;
+               set_buffer_mapped(bh);
+       }
+
+       bh->b_end_io = end_buffer_read_sync;
+       get_bh(bh);
+       submit_bh(mode, bh);
+       ret = 0;
+ out:
+       get_bh(bh);
+       *out_bh = bh;
+
+ failed_bh:
+       unlock_page(bh->b_page);
+       page_cache_release(bh->b_page);
+       brelse(bh);
+ failed:
+       return ret;
+}
+
+static int nilfs_mdt_read_block(struct inode *inode, unsigned long block,
+                               struct buffer_head **out_bh)
+{
+       struct buffer_head *first_bh, *bh;
+       unsigned long blkoff;
+       int i, nr_ra_blocks = NILFS_MDT_MAX_RA_BLOCKS;
+       int err;
+
+       err = nilfs_mdt_submit_block(inode, block, READ, &first_bh);
+       if (err == -EEXIST) /* internal code */
+               goto out;
+
+       if (unlikely(err))
+               goto failed;
+
+       blkoff = block + 1;
+       for (i = 0; i < nr_ra_blocks; i++, blkoff++) {
+               err = nilfs_mdt_submit_block(inode, blkoff, READA, &bh);
+               if (likely(!err || err == -EEXIST))
+                       brelse(bh);
+               else if (err != -EBUSY)
+                       break; /* abort readahead if bmap lookup failed */
+
+               if (!buffer_locked(first_bh))
+                       goto out_no_wait;
+       }
+
+       wait_on_buffer(first_bh);
+
+ out_no_wait:
+       err = -EIO;
+       if (!buffer_uptodate(first_bh))
+               goto failed_bh;
+ out:
+       *out_bh = first_bh;
+       return 0;
+
+ failed_bh:
+       brelse(first_bh);
+ failed:
+       return err;
+}
+
+/**
+ * nilfs_mdt_get_block - read or create a buffer on meta data file.
+ * @inode: inode of the meta data file
+ * @blkoff: block offset
+ * @create: create flag
+ * @init_block: initializer used for newly allocated block
+ * @out_bh: output of a pointer to the buffer_head
+ *
+ * nilfs_mdt_get_block() looks up the specified buffer and tries to create
+ * a new buffer if @create is not zero.  On success, the returned buffer is
+ * assured to be either existing or formatted using a buffer lock on success.
+ * @out_bh is substituted only when zero is returned.
+ *
+ * Return Value: On success, it returns 0. On error, the following negative
+ * error code is returned.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ *
+ * %-EIO - I/O error
+ *
+ * %-ENOENT - the specified block does not exist (hole block)
+ *
+ * %-EINVAL - bmap is broken. (the caller should call nilfs_error())
+ *
+ * %-EROFS - Read only filesystem (for create mode)
+ */
+int nilfs_mdt_get_block(struct inode *inode, unsigned long blkoff, int create,
+                       void (*init_block)(struct inode *,
+                                          struct buffer_head *, void *),
+                       struct buffer_head **out_bh)
+{
+       int ret;
+
+       /* Should be rewritten with merging nilfs_mdt_read_block() */
+ retry:
+       ret = nilfs_mdt_read_block(inode, blkoff, out_bh);
+       if (!create || ret != -ENOENT)
+               return ret;
+
+       ret = nilfs_mdt_create_block(inode, blkoff, out_bh, init_block);
+       if (unlikely(ret == -EEXIST)) {
+               /* create = 0; */  /* limit read-create loop retries */
+               goto retry;
+       }
+       return ret;
+}
+
+/**
+ * nilfs_mdt_delete_block - make a hole on the meta data file.
+ * @inode: inode of the meta data file
+ * @block: block offset
+ *
+ * Return Value: On success, zero is returned.
+ * On error, one of the following negative error code is returned.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ *
+ * %-EIO - I/O error
+ *
+ * %-EINVAL - bmap is broken. (the caller should call nilfs_error())
+ */
+int nilfs_mdt_delete_block(struct inode *inode, unsigned long block)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       int err;
+
+       err = nilfs_bmap_delete(ii->i_bmap, block);
+       if (likely(!err)) {
+               nilfs_mdt_mark_dirty(inode);
+               nilfs_mdt_forget_block(inode, block);
+       }
+       return err;
+}
+
+/**
+ * nilfs_mdt_forget_block - discard dirty state and try to remove the page
+ * @inode: inode of the meta data file
+ * @block: block offset
+ *
+ * nilfs_mdt_forget_block() clears a dirty flag of the specified buffer, and
+ * tries to release the page including the buffer from a page cache.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error code is returned.
+ *
+ * %-EBUSY - page has an active buffer.
+ *
+ * %-ENOENT - page cache has no page addressed by the offset.
+ */
+int nilfs_mdt_forget_block(struct inode *inode, unsigned long block)
+{
+       pgoff_t index = (pgoff_t)block >>
+               (PAGE_CACHE_SHIFT - inode->i_blkbits);
+       struct page *page;
+       unsigned long first_block;
+       int ret = 0;
+       int still_dirty;
+
+       page = find_lock_page(inode->i_mapping, index);
+       if (!page)
+               return -ENOENT;
+
+       wait_on_page_writeback(page);
+
+       first_block = (unsigned long)index <<
+               (PAGE_CACHE_SHIFT - inode->i_blkbits);
+       if (page_has_buffers(page)) {
+               struct buffer_head *bh;
+
+               bh = nilfs_page_get_nth_block(page, block - first_block);
+               nilfs_forget_buffer(bh);
+       }
+       still_dirty = PageDirty(page);
+       unlock_page(page);
+       page_cache_release(page);
+
+       if (still_dirty ||
+           invalidate_inode_pages2_range(inode->i_mapping, index, index) != 0)
+               ret = -EBUSY;
+       return ret;
+}
+
+/**
+ * nilfs_mdt_mark_block_dirty - mark a block on the meta data file dirty.
+ * @inode: inode of the meta data file
+ * @block: block offset
+ *
+ * Return Value: On success, it returns 0. On error, the following negative
+ * error code is returned.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ *
+ * %-EIO - I/O error
+ *
+ * %-ENOENT - the specified block does not exist (hole block)
+ *
+ * %-EINVAL - bmap is broken. (the caller should call nilfs_error())
+ */
+int nilfs_mdt_mark_block_dirty(struct inode *inode, unsigned long block)
+{
+       struct buffer_head *bh;
+       int err;
+
+       err = nilfs_mdt_read_block(inode, block, &bh);
+       if (unlikely(err))
+               return err;
+       nilfs_mark_buffer_dirty(bh);
+       nilfs_mdt_mark_dirty(inode);
+       brelse(bh);
+       return 0;
+}
+
+int nilfs_mdt_fetch_dirty(struct inode *inode)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+
+       if (nilfs_bmap_test_and_clear_dirty(ii->i_bmap)) {
+               set_bit(NILFS_I_DIRTY, &ii->i_state);
+               return 1;
+       }
+       return test_bit(NILFS_I_DIRTY, &ii->i_state);
+}
+
+static int
+nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc)
+{
+       struct inode *inode = container_of(page->mapping,
+                                          struct inode, i_data);
+       struct super_block *sb = inode->i_sb;
+       struct nilfs_sb_info *writer = NULL;
+       int err = 0;
+
+       redirty_page_for_writepage(wbc, page);
+       unlock_page(page);
+
+       if (page->mapping->assoc_mapping)
+               return 0; /* Do not request flush for shadow page cache */
+       if (!sb) {
+               writer = nilfs_get_writer(NILFS_MDT(inode)->mi_nilfs);
+               if (!writer)
+                       return -EROFS;
+               sb = writer->s_super;
+       }
+
+       if (wbc->sync_mode == WB_SYNC_ALL)
+               err = nilfs_construct_segment(sb);
+       else if (wbc->for_reclaim)
+               nilfs_flush_segment(sb, inode->i_ino);
+
+       if (writer)
+               nilfs_put_writer(NILFS_MDT(inode)->mi_nilfs);
+       return err;
+}
+
+
+static struct address_space_operations def_mdt_aops = {
+       .writepage              = nilfs_mdt_write_page,
+};
+
+static struct inode_operations def_mdt_iops;
+static struct file_operations def_mdt_fops;
+
+/*
+ * NILFS2 uses pseudo inodes for meta data files such as DAT, cpfile, sufile,
+ * ifile, or gcinodes.  This allows the B-tree code and segment constructor
+ * to treat them like regular files, and this helps to simplify the
+ * implementation.
+ *   On the other hand, some of the pseudo inodes have an irregular point:
+ * They don't have valid inode->i_sb pointer because their lifetimes are
+ * longer than those of the super block structs; they may continue for
+ * several consecutive mounts/umounts.  This would need discussions.
+ */
+struct inode *
+nilfs_mdt_new_common(struct the_nilfs *nilfs, struct super_block *sb,
+                    ino_t ino, gfp_t gfp_mask)
+{
+       struct inode *inode = nilfs_alloc_inode(sb);
+
+       if (!inode)
+               return NULL;
+       else {
+               struct address_space * const mapping = &inode->i_data;
+               struct nilfs_mdt_info *mi = kzalloc(sizeof(*mi), GFP_NOFS);
+
+               if (!mi) {
+                       nilfs_destroy_inode(inode);
+                       return NULL;
+               }
+               mi->mi_nilfs = nilfs;
+               init_rwsem(&mi->mi_sem);
+
+               inode->i_sb = sb; /* sb may be NULL for some meta data files */
+               inode->i_blkbits = nilfs->ns_blocksize_bits;
+               inode->i_flags = 0;
+               atomic_set(&inode->i_count, 1);
+               inode->i_nlink = 1;
+               inode->i_ino = ino;
+               inode->i_mode = S_IFREG;
+               inode->i_private = mi;
+
+#ifdef INIT_UNUSED_INODE_FIELDS
+               atomic_set(&inode->i_writecount, 0);
+               inode->i_size = 0;
+               inode->i_blocks = 0;
+               inode->i_bytes = 0;
+               inode->i_generation = 0;
+#ifdef CONFIG_QUOTA
+               memset(&inode->i_dquot, 0, sizeof(inode->i_dquot));
+#endif
+               inode->i_pipe = NULL;
+               inode->i_bdev = NULL;
+               inode->i_cdev = NULL;
+               inode->i_rdev = 0;
+#ifdef CONFIG_SECURITY
+               inode->i_security = NULL;
+#endif
+               inode->dirtied_when = 0;
+
+               INIT_LIST_HEAD(&inode->i_list);
+               INIT_LIST_HEAD(&inode->i_sb_list);
+               inode->i_state = 0;
+#endif
+
+               spin_lock_init(&inode->i_lock);
+               mutex_init(&inode->i_mutex);
+               init_rwsem(&inode->i_alloc_sem);
+
+               mapping->host = NULL;  /* instead of inode */
+               mapping->flags = 0;
+               mapping_set_gfp_mask(mapping, gfp_mask);
+               mapping->assoc_mapping = NULL;
+               mapping->backing_dev_info = nilfs->ns_bdi;
+
+               inode->i_mapping = mapping;
+       }
+
+       return inode;
+}
+
+struct inode *nilfs_mdt_new(struct the_nilfs *nilfs, struct super_block *sb,
+                           ino_t ino, gfp_t gfp_mask)
+{
+       struct inode *inode = nilfs_mdt_new_common(nilfs, sb, ino, gfp_mask);
+
+       if (!inode)
+               return NULL;
+
+       inode->i_op = &def_mdt_iops;
+       inode->i_fop = &def_mdt_fops;
+       inode->i_mapping->a_ops = &def_mdt_aops;
+       return inode;
+}
+
+void nilfs_mdt_set_entry_size(struct inode *inode, unsigned entry_size,
+                             unsigned header_size)
+{
+       struct nilfs_mdt_info *mi = NILFS_MDT(inode);
+
+       mi->mi_entry_size = entry_size;
+       mi->mi_entries_per_block = (1 << inode->i_blkbits) / entry_size;
+       mi->mi_first_entry_offset = DIV_ROUND_UP(header_size, entry_size);
+}
+
+void nilfs_mdt_set_shadow(struct inode *orig, struct inode *shadow)
+{
+       shadow->i_mapping->assoc_mapping = orig->i_mapping;
+       NILFS_I(shadow)->i_btnode_cache.assoc_mapping =
+               &NILFS_I(orig)->i_btnode_cache;
+}
+
+void nilfs_mdt_clear(struct inode *inode)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+
+       invalidate_mapping_pages(inode->i_mapping, 0, -1);
+       truncate_inode_pages(inode->i_mapping, 0);
+
+       nilfs_bmap_clear(ii->i_bmap);
+       nilfs_btnode_cache_clear(&ii->i_btnode_cache);
+}
+
+void nilfs_mdt_destroy(struct inode *inode)
+{
+       struct nilfs_mdt_info *mdi = NILFS_MDT(inode);
+
+       kfree(mdi->mi_bgl); /* kfree(NULL) is safe */
+       kfree(mdi);
+       nilfs_destroy_inode(inode);
+}
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h
new file mode 100644 (file)
index 0000000..df683e0
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * mdt.h - NILFS meta data file prototype and definitions
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ */
+
+#ifndef _NILFS_MDT_H
+#define _NILFS_MDT_H
+
+#include <linux/buffer_head.h>
+#include <linux/blockgroup_lock.h>
+#include "nilfs.h"
+#include "page.h"
+
+/**
+ * struct nilfs_mdt_info - on-memory private data of meta data files
+ * @mi_nilfs: back pointer to the_nilfs struct
+ * @mi_sem: reader/writer semaphore for meta data operations
+ * @mi_bgl: per-blockgroup locking
+ * @mi_entry_size: size of an entry
+ * @mi_first_entry_offset: offset to the first entry
+ * @mi_entries_per_block: number of entries in a block
+ * @mi_blocks_per_group: number of blocks in a group
+ * @mi_blocks_per_desc_block: number of blocks per descriptor block
+ */
+struct nilfs_mdt_info {
+       struct the_nilfs       *mi_nilfs;
+       struct rw_semaphore     mi_sem;
+       struct blockgroup_lock *mi_bgl;
+       unsigned                mi_entry_size;
+       unsigned                mi_first_entry_offset;
+       unsigned long           mi_entries_per_block;
+       unsigned long           mi_blocks_per_group;
+       unsigned long           mi_blocks_per_desc_block;
+};
+
+static inline struct nilfs_mdt_info *NILFS_MDT(const struct inode *inode)
+{
+       return inode->i_private;
+}
+
+static inline struct the_nilfs *NILFS_I_NILFS(struct inode *inode)
+{
+       struct super_block *sb = inode->i_sb;
+
+       return sb ? NILFS_SB(sb)->s_nilfs : NILFS_MDT(inode)->mi_nilfs;
+}
+
+/* Default GFP flags using highmem */
+#define NILFS_MDT_GFP      (__GFP_WAIT | __GFP_IO | __GFP_HIGHMEM)
+
+int nilfs_mdt_get_block(struct inode *, unsigned long, int,
+                       void (*init_block)(struct inode *,
+                                          struct buffer_head *, void *),
+                       struct buffer_head **);
+int nilfs_mdt_delete_block(struct inode *, unsigned long);
+int nilfs_mdt_forget_block(struct inode *, unsigned long);
+int nilfs_mdt_mark_block_dirty(struct inode *, unsigned long);
+int nilfs_mdt_fetch_dirty(struct inode *);
+
+struct inode *nilfs_mdt_new(struct the_nilfs *, struct super_block *, ino_t,
+                           gfp_t);
+struct inode *nilfs_mdt_new_common(struct the_nilfs *, struct super_block *,
+                                  ino_t, gfp_t);
+void nilfs_mdt_destroy(struct inode *);
+void nilfs_mdt_clear(struct inode *);
+void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned);
+void nilfs_mdt_set_shadow(struct inode *, struct inode *);
+
+
+#define nilfs_mdt_mark_buffer_dirty(bh)        nilfs_mark_buffer_dirty(bh)
+
+static inline void nilfs_mdt_mark_dirty(struct inode *inode)
+{
+       if (!test_bit(NILFS_I_DIRTY, &NILFS_I(inode)->i_state))
+               set_bit(NILFS_I_DIRTY, &NILFS_I(inode)->i_state);
+}
+
+static inline void nilfs_mdt_clear_dirty(struct inode *inode)
+{
+       clear_bit(NILFS_I_DIRTY, &NILFS_I(inode)->i_state);
+}
+
+static inline __u64 nilfs_mdt_cno(struct inode *inode)
+{
+       return NILFS_MDT(inode)->mi_nilfs->ns_cno;
+}
+
+#define nilfs_mdt_bgl_lock(inode, bg) \
+       (&NILFS_MDT(inode)->mi_bgl->locks[(bg) & (NR_BG_LOCKS-1)].lock)
+
+
+static inline int
+nilfs_mdt_read_inode_direct(struct inode *inode, struct buffer_head *bh,
+                           unsigned n)
+{
+       return nilfs_read_inode_common(
+               inode, (struct nilfs_inode *)(bh->b_data + n));
+}
+
+static inline void
+nilfs_mdt_write_inode_direct(struct inode *inode, struct buffer_head *bh,
+                            unsigned n)
+{
+       nilfs_write_inode_common(
+               inode, (struct nilfs_inode *)(bh->b_data + n), 1);
+}
+
+#endif /* _NILFS_MDT_H */
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
new file mode 100644 (file)
index 0000000..df70dad
--- /dev/null
@@ -0,0 +1,474 @@
+/*
+ * namei.c - NILFS pathname lookup operations.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Modified for NILFS by Amagai Yoshiji <amagai@osrg.net>,
+ *                       Ryusuke Konishi <ryusuke@osrg.net>
+ */
+/*
+ *  linux/fs/ext2/namei.c
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ *  from
+ *
+ *  linux/fs/minix/namei.c
+ *
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ *
+ *  Big-endian to little-endian byte-swapping/bitmaps by
+ *        David S. Miller (davem@caip.rutgers.edu), 1995
+ */
+
+#include <linux/pagemap.h>
+#include "nilfs.h"
+
+
+static inline int nilfs_add_nondir(struct dentry *dentry, struct inode *inode)
+{
+       int err = nilfs_add_link(dentry, inode);
+       if (!err) {
+               d_instantiate(dentry, inode);
+               return 0;
+       }
+       inode_dec_link_count(inode);
+       iput(inode);
+       return err;
+}
+
+/*
+ * Methods themselves.
+ */
+
+static struct dentry *
+nilfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
+{
+       struct inode *inode;
+       ino_t ino;
+
+       if (dentry->d_name.len > NILFS_NAME_LEN)
+               return ERR_PTR(-ENAMETOOLONG);
+
+       ino = nilfs_inode_by_name(dir, dentry);
+       inode = NULL;
+       if (ino) {
+               inode = nilfs_iget(dir->i_sb, ino);
+               if (IS_ERR(inode))
+                       return ERR_CAST(inode);
+       }
+       return d_splice_alias(inode, dentry);
+}
+
+struct dentry *nilfs_get_parent(struct dentry *child)
+{
+       unsigned long ino;
+       struct inode *inode;
+       struct dentry dotdot;
+
+       dotdot.d_name.name = "..";
+       dotdot.d_name.len = 2;
+
+       ino = nilfs_inode_by_name(child->d_inode, &dotdot);
+       if (!ino)
+               return ERR_PTR(-ENOENT);
+
+       inode = nilfs_iget(child->d_inode->i_sb, ino);
+       if (IS_ERR(inode))
+               return ERR_CAST(inode);
+       return d_obtain_alias(inode);
+}
+
+/*
+ * By the time this is called, we already have created
+ * the directory cache entry for the new file, but it
+ * is so far negative - it has no inode.
+ *
+ * If the create succeeds, we fill in the inode information
+ * with d_instantiate().
+ */
+static int nilfs_create(struct inode *dir, struct dentry *dentry, int mode,
+                       struct nameidata *nd)
+{
+       struct inode *inode;
+       struct nilfs_transaction_info ti;
+       int err;
+
+       err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
+       if (err)
+               return err;
+       inode = nilfs_new_inode(dir, mode);
+       err = PTR_ERR(inode);
+       if (!IS_ERR(inode)) {
+               inode->i_op = &nilfs_file_inode_operations;
+               inode->i_fop = &nilfs_file_operations;
+               inode->i_mapping->a_ops = &nilfs_aops;
+               mark_inode_dirty(inode);
+               err = nilfs_add_nondir(dentry, inode);
+       }
+       if (!err)
+               err = nilfs_transaction_commit(dir->i_sb);
+       else
+               nilfs_transaction_abort(dir->i_sb);
+
+       return err;
+}
+
+static int
+nilfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
+{
+       struct inode *inode;
+       struct nilfs_transaction_info ti;
+       int err;
+
+       if (!new_valid_dev(rdev))
+               return -EINVAL;
+
+       err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
+       if (err)
+               return err;
+       inode = nilfs_new_inode(dir, mode);
+       err = PTR_ERR(inode);
+       if (!IS_ERR(inode)) {
+               init_special_inode(inode, inode->i_mode, rdev);
+               mark_inode_dirty(inode);
+               err = nilfs_add_nondir(dentry, inode);
+       }
+       if (!err)
+               err = nilfs_transaction_commit(dir->i_sb);
+       else
+               nilfs_transaction_abort(dir->i_sb);
+
+       return err;
+}
+
+static int nilfs_symlink(struct inode *dir, struct dentry *dentry,
+                        const char *symname)
+{
+       struct nilfs_transaction_info ti;
+       struct super_block *sb = dir->i_sb;
+       unsigned l = strlen(symname)+1;
+       struct inode *inode;
+       int err;
+
+       if (l > sb->s_blocksize)
+               return -ENAMETOOLONG;
+
+       err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
+       if (err)
+               return err;
+
+       inode = nilfs_new_inode(dir, S_IFLNK | S_IRWXUGO);
+       err = PTR_ERR(inode);
+       if (IS_ERR(inode))
+               goto out;
+
+       /* slow symlink */
+       inode->i_op = &nilfs_symlink_inode_operations;
+       inode->i_mapping->a_ops = &nilfs_aops;
+       err = page_symlink(inode, symname, l);
+       if (err)
+               goto out_fail;
+
+       /* mark_inode_dirty(inode); */
+       /* nilfs_new_inode() and page_symlink() do this */
+
+       err = nilfs_add_nondir(dentry, inode);
+out:
+       if (!err)
+               err = nilfs_transaction_commit(dir->i_sb);
+       else
+               nilfs_transaction_abort(dir->i_sb);
+
+       return err;
+
+out_fail:
+       inode_dec_link_count(inode);
+       iput(inode);
+       goto out;
+}
+
+static int nilfs_link(struct dentry *old_dentry, struct inode *dir,
+                     struct dentry *dentry)
+{
+       struct inode *inode = old_dentry->d_inode;
+       struct nilfs_transaction_info ti;
+       int err;
+
+       if (inode->i_nlink >= NILFS_LINK_MAX)
+               return -EMLINK;
+
+       err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
+       if (err)
+               return err;
+
+       inode->i_ctime = CURRENT_TIME;
+       inode_inc_link_count(inode);
+       atomic_inc(&inode->i_count);
+
+       err = nilfs_add_nondir(dentry, inode);
+       if (!err)
+               err = nilfs_transaction_commit(dir->i_sb);
+       else
+               nilfs_transaction_abort(dir->i_sb);
+
+       return err;
+}
+
+static int nilfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+{
+       struct inode *inode;
+       struct nilfs_transaction_info ti;
+       int err;
+
+       if (dir->i_nlink >= NILFS_LINK_MAX)
+               return -EMLINK;
+
+       err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
+       if (err)
+               return err;
+
+       inode_inc_link_count(dir);
+
+       inode = nilfs_new_inode(dir, S_IFDIR | mode);
+       err = PTR_ERR(inode);
+       if (IS_ERR(inode))
+               goto out_dir;
+
+       inode->i_op = &nilfs_dir_inode_operations;
+       inode->i_fop = &nilfs_dir_operations;
+       inode->i_mapping->a_ops = &nilfs_aops;
+
+       inode_inc_link_count(inode);
+
+       err = nilfs_make_empty(inode, dir);
+       if (err)
+               goto out_fail;
+
+       err = nilfs_add_link(dentry, inode);
+       if (err)
+               goto out_fail;
+
+       d_instantiate(dentry, inode);
+out:
+       if (!err)
+               err = nilfs_transaction_commit(dir->i_sb);
+       else
+               nilfs_transaction_abort(dir->i_sb);
+
+       return err;
+
+out_fail:
+       inode_dec_link_count(inode);
+       inode_dec_link_count(inode);
+       iput(inode);
+out_dir:
+       inode_dec_link_count(dir);
+       goto out;
+}
+
+static int nilfs_unlink(struct inode *dir, struct dentry *dentry)
+{
+       struct inode *inode;
+       struct nilfs_dir_entry *de;
+       struct page *page;
+       struct nilfs_transaction_info ti;
+       int err;
+
+       err = nilfs_transaction_begin(dir->i_sb, &ti, 0);
+       if (err)
+               return err;
+
+       err = -ENOENT;
+       de = nilfs_find_entry(dir, dentry, &page);
+       if (!de)
+               goto out;
+
+       inode = dentry->d_inode;
+       err = -EIO;
+       if (le64_to_cpu(de->inode) != inode->i_ino)
+               goto out;
+
+       if (!inode->i_nlink) {
+               nilfs_warning(inode->i_sb, __func__,
+                             "deleting nonexistent file (%lu), %d\n",
+                             inode->i_ino, inode->i_nlink);
+               inode->i_nlink = 1;
+       }
+       err = nilfs_delete_entry(de, page);
+       if (err)
+               goto out;
+
+       inode->i_ctime = dir->i_ctime;
+       inode_dec_link_count(inode);
+       err = 0;
+out:
+       if (!err)
+               err = nilfs_transaction_commit(dir->i_sb);
+       else
+               nilfs_transaction_abort(dir->i_sb);
+
+       return err;
+}
+
+static int nilfs_rmdir(struct inode *dir, struct dentry *dentry)
+{
+       struct inode *inode = dentry->d_inode;
+       struct nilfs_transaction_info ti;
+       int err;
+
+       err = nilfs_transaction_begin(dir->i_sb, &ti, 0);
+       if (err)
+               return err;
+
+       err = -ENOTEMPTY;
+       if (nilfs_empty_dir(inode)) {
+               err = nilfs_unlink(dir, dentry);
+               if (!err) {
+                       inode->i_size = 0;
+                       inode_dec_link_count(inode);
+                       inode_dec_link_count(dir);
+               }
+       }
+       if (!err)
+               err = nilfs_transaction_commit(dir->i_sb);
+       else
+               nilfs_transaction_abort(dir->i_sb);
+
+       return err;
+}
+
+static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+                       struct inode *new_dir,  struct dentry *new_dentry)
+{
+       struct inode *old_inode = old_dentry->d_inode;
+       struct inode *new_inode = new_dentry->d_inode;
+       struct page *dir_page = NULL;
+       struct nilfs_dir_entry *dir_de = NULL;
+       struct page *old_page;
+       struct nilfs_dir_entry *old_de;
+       struct nilfs_transaction_info ti;
+       int err;
+
+       err = nilfs_transaction_begin(old_dir->i_sb, &ti, 1);
+       if (unlikely(err))
+               return err;
+
+       err = -ENOENT;
+       old_de = nilfs_find_entry(old_dir, old_dentry, &old_page);
+       if (!old_de)
+               goto out;
+
+       if (S_ISDIR(old_inode->i_mode)) {
+               err = -EIO;
+               dir_de = nilfs_dotdot(old_inode, &dir_page);
+               if (!dir_de)
+                       goto out_old;
+       }
+
+       if (new_inode) {
+               struct page *new_page;
+               struct nilfs_dir_entry *new_de;
+
+               err = -ENOTEMPTY;
+               if (dir_de && !nilfs_empty_dir(new_inode))
+                       goto out_dir;
+
+               err = -ENOENT;
+               new_de = nilfs_find_entry(new_dir, new_dentry, &new_page);
+               if (!new_de)
+                       goto out_dir;
+               inode_inc_link_count(old_inode);
+               nilfs_set_link(new_dir, new_de, new_page, old_inode);
+               new_inode->i_ctime = CURRENT_TIME;
+               if (dir_de)
+                       drop_nlink(new_inode);
+               inode_dec_link_count(new_inode);
+       } else {
+               if (dir_de) {
+                       err = -EMLINK;
+                       if (new_dir->i_nlink >= NILFS_LINK_MAX)
+                               goto out_dir;
+               }
+               inode_inc_link_count(old_inode);
+               err = nilfs_add_link(new_dentry, old_inode);
+               if (err) {
+                       inode_dec_link_count(old_inode);
+                       goto out_dir;
+               }
+               if (dir_de)
+                       inode_inc_link_count(new_dir);
+       }
+
+       /*
+        * Like most other Unix systems, set the ctime for inodes on a
+        * rename.
+        * inode_dec_link_count() will mark the inode dirty.
+        */
+       old_inode->i_ctime = CURRENT_TIME;
+
+       nilfs_delete_entry(old_de, old_page);
+       inode_dec_link_count(old_inode);
+
+       if (dir_de) {
+               nilfs_set_link(old_inode, dir_de, dir_page, new_dir);
+               inode_dec_link_count(old_dir);
+       }
+
+       err = nilfs_transaction_commit(old_dir->i_sb);
+       return err;
+
+out_dir:
+       if (dir_de) {
+               kunmap(dir_page);
+               page_cache_release(dir_page);
+       }
+out_old:
+       kunmap(old_page);
+       page_cache_release(old_page);
+out:
+       nilfs_transaction_abort(old_dir->i_sb);
+       return err;
+}
+
+struct inode_operations nilfs_dir_inode_operations = {
+       .create         = nilfs_create,
+       .lookup         = nilfs_lookup,
+       .link           = nilfs_link,
+       .unlink         = nilfs_unlink,
+       .symlink        = nilfs_symlink,
+       .mkdir          = nilfs_mkdir,
+       .rmdir          = nilfs_rmdir,
+       .mknod          = nilfs_mknod,
+       .rename         = nilfs_rename,
+       .setattr        = nilfs_setattr,
+       .permission     = nilfs_permission,
+};
+
+struct inode_operations nilfs_special_inode_operations = {
+       .setattr        = nilfs_setattr,
+       .permission     = nilfs_permission,
+};
+
+struct inode_operations nilfs_symlink_inode_operations = {
+       .readlink       = generic_readlink,
+       .follow_link    = page_follow_link_light,
+       .put_link       = page_put_link,
+};
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h
new file mode 100644 (file)
index 0000000..7558c97
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+ * nilfs.h - NILFS local header file.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>
+ *            Ryusuke Konishi <ryusuke@osrg.net>
+ */
+
+#ifndef _NILFS_H
+#define _NILFS_H
+
+#include <linux/kernel.h>
+#include <linux/buffer_head.h>
+#include <linux/spinlock.h>
+#include <linux/blkdev.h>
+#include <linux/nilfs2_fs.h>
+#include "the_nilfs.h"
+#include "sb.h"
+#include "bmap.h"
+#include "bmap_union.h"
+
+/*
+ * NILFS filesystem version
+ */
+#define NILFS_VERSION          "2.0.5"
+
+/*
+ * nilfs inode data in memory
+ */
+struct nilfs_inode_info {
+       __u32 i_flags;
+       unsigned long  i_state;         /* Dynamic state flags */
+       struct nilfs_bmap *i_bmap;
+       union nilfs_bmap_union i_bmap_union;
+       __u64 i_xattr;  /* sector_t ??? */
+       __u32 i_dir_start_lookup;
+       __u64 i_cno;            /* check point number for GC inode */
+       struct address_space i_btnode_cache;
+       struct list_head i_dirty;       /* List for connecting dirty files */
+
+#ifdef CONFIG_NILFS_XATTR
+       /*
+        * Extended attributes can be read independently of the main file
+        * data. Taking i_sem even when reading would cause contention
+        * between readers of EAs and writers of regular file data, so
+        * instead we synchronize on xattr_sem when reading or changing
+        * EAs.
+        */
+       struct rw_semaphore xattr_sem;
+#endif
+#ifdef CONFIG_NILFS_POSIX_ACL
+       struct posix_acl *i_acl;
+       struct posix_acl *i_default_acl;
+#endif
+       struct buffer_head *i_bh;       /* i_bh contains a new or dirty
+                                          disk inode */
+       struct inode vfs_inode;
+};
+
+static inline struct nilfs_inode_info *NILFS_I(const struct inode *inode)
+{
+       return container_of(inode, struct nilfs_inode_info, vfs_inode);
+}
+
+static inline struct nilfs_inode_info *
+NILFS_BMAP_I(const struct nilfs_bmap *bmap)
+{
+       return container_of((union nilfs_bmap_union *)bmap,
+                           struct nilfs_inode_info,
+                           i_bmap_union);
+}
+
+static inline struct inode *NILFS_BTNC_I(struct address_space *btnc)
+{
+       struct nilfs_inode_info *ii =
+               container_of(btnc, struct nilfs_inode_info, i_btnode_cache);
+       return &ii->vfs_inode;
+}
+
+static inline struct inode *NILFS_AS_I(struct address_space *mapping)
+{
+       return (mapping->host) ? :
+               container_of(mapping, struct inode, i_data);
+}
+
+/*
+ * Dynamic state flags of NILFS on-memory inode (i_state)
+ */
+enum {
+       NILFS_I_NEW = 0,                /* Inode is newly created */
+       NILFS_I_DIRTY,                  /* The file is dirty */
+       NILFS_I_QUEUED,                 /* inode is in dirty_files list */
+       NILFS_I_BUSY,                   /* inode is grabbed by a segment
+                                          constructor */
+       NILFS_I_COLLECTED,              /* All dirty blocks are collected */
+       NILFS_I_UPDATED,                /* The file has been written back */
+       NILFS_I_INODE_DIRTY,            /* write_inode is requested */
+       NILFS_I_BMAP,                   /* has bmap and btnode_cache */
+       NILFS_I_GCINODE,                /* inode for GC, on memory only */
+       NILFS_I_GCDAT,                  /* shadow DAT, on memory only */
+};
+
+/*
+ * Macros to check inode numbers
+ */
+#define NILFS_MDT_INO_BITS   \
+  ((unsigned int)(1 << NILFS_DAT_INO | 1 << NILFS_CPFILE_INO |         \
+                 1 << NILFS_SUFILE_INO | 1 << NILFS_IFILE_INO |        \
+                 1 << NILFS_ATIME_INO | 1 << NILFS_SKETCH_INO))
+
+#define NILFS_SYS_INO_BITS   \
+  ((unsigned int)(1 << NILFS_ROOT_INO) | NILFS_MDT_INO_BITS)
+
+#define NILFS_FIRST_INO(sb)  (NILFS_SB(sb)->s_nilfs->ns_first_ino)
+
+#define NILFS_MDT_INODE(sb, ino) \
+  ((ino) < NILFS_FIRST_INO(sb) && (NILFS_MDT_INO_BITS & (1 << (ino))))
+#define NILFS_VALID_INODE(sb, ino) \
+  ((ino) >= NILFS_FIRST_INO(sb) || (NILFS_SYS_INO_BITS & (1 << (ino))))
+
+/**
+ * struct nilfs_transaction_info: context information for synchronization
+ * @ti_magic: Magic number
+ * @ti_save: Backup of journal_info field of task_struct
+ * @ti_flags: Flags
+ * @ti_count: Nest level
+ * @ti_garbage:        List of inode to be put when releasing semaphore
+ */
+struct nilfs_transaction_info {
+       u32                     ti_magic;
+       void                   *ti_save;
+                               /* This should never used. If this happens,
+                                  one of other filesystems has a bug. */
+       unsigned short          ti_flags;
+       unsigned short          ti_count;
+       struct list_head        ti_garbage;
+};
+
+/* ti_magic */
+#define NILFS_TI_MAGIC         0xd9e392fb
+
+/* ti_flags */
+#define NILFS_TI_DYNAMIC_ALLOC 0x0001  /* Allocated from slab */
+#define NILFS_TI_SYNC          0x0002  /* Force to construct segment at the
+                                          end of transaction. */
+#define NILFS_TI_GC            0x0004  /* GC context */
+#define NILFS_TI_COMMIT                0x0008  /* Change happened or not */
+#define NILFS_TI_WRITER                0x0010  /* Constructor context */
+
+
+int nilfs_transaction_begin(struct super_block *,
+                           struct nilfs_transaction_info *, int);
+int nilfs_transaction_commit(struct super_block *);
+void nilfs_transaction_abort(struct super_block *);
+
+static inline void nilfs_set_transaction_flag(unsigned int flag)
+{
+       struct nilfs_transaction_info *ti = current->journal_info;
+
+       ti->ti_flags |= flag;
+}
+
+static inline int nilfs_test_transaction_flag(unsigned int flag)
+{
+       struct nilfs_transaction_info *ti = current->journal_info;
+
+       if (ti == NULL || ti->ti_magic != NILFS_TI_MAGIC)
+               return 0;
+       return !!(ti->ti_flags & flag);
+}
+
+static inline int nilfs_doing_gc(void)
+{
+       return nilfs_test_transaction_flag(NILFS_TI_GC);
+}
+
+static inline int nilfs_doing_construction(void)
+{
+       return nilfs_test_transaction_flag(NILFS_TI_WRITER);
+}
+
+static inline struct inode *nilfs_dat_inode(const struct the_nilfs *nilfs)
+{
+       return nilfs_doing_gc() ? nilfs->ns_gc_dat : nilfs->ns_dat;
+}
+
+/*
+ * function prototype
+ */
+#ifdef CONFIG_NILFS_POSIX_ACL
+#error "NILFS: not yet supported POSIX ACL"
+extern int nilfs_permission(struct inode *, int, struct nameidata *);
+extern int nilfs_acl_chmod(struct inode *);
+extern int nilfs_init_acl(struct inode *, struct inode *);
+#else
+#define nilfs_permission   NULL
+
+static inline int nilfs_acl_chmod(struct inode *inode)
+{
+       return 0;
+}
+
+static inline int nilfs_init_acl(struct inode *inode, struct inode *dir)
+{
+       inode->i_mode &= ~current_umask();
+       return 0;
+}
+#endif
+
+#define NILFS_ATIME_DISABLE
+
+/* dir.c */
+extern int nilfs_add_link(struct dentry *, struct inode *);
+extern ino_t nilfs_inode_by_name(struct inode *, struct dentry *);
+extern int nilfs_make_empty(struct inode *, struct inode *);
+extern struct nilfs_dir_entry *
+nilfs_find_entry(struct inode *, struct dentry *, struct page **);
+extern int nilfs_delete_entry(struct nilfs_dir_entry *, struct page *);
+extern int nilfs_empty_dir(struct inode *);
+extern struct nilfs_dir_entry *nilfs_dotdot(struct inode *, struct page **);
+extern void nilfs_set_link(struct inode *, struct nilfs_dir_entry *,
+                          struct page *, struct inode *);
+
+/* file.c */
+extern int nilfs_sync_file(struct file *, struct dentry *, int);
+
+/* ioctl.c */
+long nilfs_ioctl(struct file *, unsigned int, unsigned long);
+int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *, void __user *);
+
+/* inode.c */
+extern struct inode *nilfs_new_inode(struct inode *, int);
+extern void nilfs_free_inode(struct inode *);
+extern int nilfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
+extern void nilfs_set_inode_flags(struct inode *);
+extern int nilfs_read_inode_common(struct inode *, struct nilfs_inode *);
+extern void nilfs_write_inode_common(struct inode *, struct nilfs_inode *, int);
+extern struct inode *nilfs_iget(struct super_block *, unsigned long);
+extern void nilfs_update_inode(struct inode *, struct buffer_head *);
+extern void nilfs_truncate(struct inode *);
+extern void nilfs_delete_inode(struct inode *);
+extern int nilfs_setattr(struct dentry *, struct iattr *);
+extern int nilfs_load_inode_block(struct nilfs_sb_info *, struct inode *,
+                                 struct buffer_head **);
+extern int nilfs_inode_dirty(struct inode *);
+extern int nilfs_set_file_dirty(struct nilfs_sb_info *, struct inode *,
+                               unsigned);
+extern int nilfs_mark_inode_dirty(struct inode *);
+extern void nilfs_dirty_inode(struct inode *);
+
+/* namei.c */
+extern struct dentry *nilfs_get_parent(struct dentry *);
+
+/* super.c */
+extern struct inode *nilfs_alloc_inode(struct super_block *);
+extern void nilfs_destroy_inode(struct inode *);
+extern void nilfs_error(struct super_block *, const char *, const char *, ...)
+       __attribute__ ((format (printf, 3, 4)));
+extern void nilfs_warning(struct super_block *, const char *, const char *, ...)
+       __attribute__ ((format (printf, 3, 4)));
+extern struct nilfs_super_block *
+nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **);
+extern int nilfs_store_magic_and_option(struct super_block *,
+                                       struct nilfs_super_block *, char *);
+extern int nilfs_commit_super(struct nilfs_sb_info *, int);
+extern int nilfs_attach_checkpoint(struct nilfs_sb_info *, __u64);
+extern void nilfs_detach_checkpoint(struct nilfs_sb_info *);
+
+/* gcinode.c */
+int nilfs_gccache_submit_read_data(struct inode *, sector_t, sector_t, __u64,
+                                  struct buffer_head **);
+int nilfs_gccache_submit_read_node(struct inode *, sector_t, __u64,
+                                  struct buffer_head **);
+int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *);
+int nilfs_init_gccache(struct the_nilfs *);
+void nilfs_destroy_gccache(struct the_nilfs *);
+void nilfs_clear_gcinode(struct inode *);
+struct inode *nilfs_gc_iget(struct the_nilfs *, ino_t, __u64);
+void nilfs_remove_all_gcinode(struct the_nilfs *);
+
+/* gcdat.c */
+int nilfs_init_gcdat_inode(struct the_nilfs *);
+void nilfs_commit_gcdat_inode(struct the_nilfs *);
+void nilfs_clear_gcdat_inode(struct the_nilfs *);
+
+/*
+ * Inodes and files operations
+ */
+extern struct file_operations nilfs_dir_operations;
+extern struct inode_operations nilfs_file_inode_operations;
+extern struct file_operations nilfs_file_operations;
+extern struct address_space_operations nilfs_aops;
+extern struct inode_operations nilfs_dir_inode_operations;
+extern struct inode_operations nilfs_special_inode_operations;
+extern struct inode_operations nilfs_symlink_inode_operations;
+
+/*
+ * filesystem type
+ */
+extern struct file_system_type nilfs_fs_type;
+
+
+#endif /* _NILFS_H */
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
new file mode 100644 (file)
index 0000000..1bfbba9
--- /dev/null
@@ -0,0 +1,540 @@
+/*
+ * page.c - buffer/page management specific to NILFS
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>,
+ *            Seiji Kihara <kihara@osrg.net>.
+ */
+
+#include <linux/pagemap.h>
+#include <linux/writeback.h>
+#include <linux/swap.h>
+#include <linux/bitops.h>
+#include <linux/page-flags.h>
+#include <linux/list.h>
+#include <linux/highmem.h>
+#include <linux/pagevec.h>
+#include "nilfs.h"
+#include "page.h"
+#include "mdt.h"
+
+
+#define NILFS_BUFFER_INHERENT_BITS  \
+       ((1UL << BH_Uptodate) | (1UL << BH_Mapped) | (1UL << BH_NILFS_Node) | \
+        (1UL << BH_NILFS_Volatile) | (1UL << BH_NILFS_Allocated))
+
+static struct buffer_head *
+__nilfs_get_page_block(struct page *page, unsigned long block, pgoff_t index,
+                      int blkbits, unsigned long b_state)
+
+{
+       unsigned long first_block;
+       struct buffer_head *bh;
+
+       if (!page_has_buffers(page))
+               create_empty_buffers(page, 1 << blkbits, b_state);
+
+       first_block = (unsigned long)index << (PAGE_CACHE_SHIFT - blkbits);
+       bh = nilfs_page_get_nth_block(page, block - first_block);
+
+       touch_buffer(bh);
+       wait_on_buffer(bh);
+       return bh;
+}
+
+/*
+ * Since the page cache of B-tree node pages or data page cache of pseudo
+ * inodes does not have a valid mapping->host pointer, calling
+ * mark_buffer_dirty() for their buffers causes a NULL pointer dereference;
+ * it calls __mark_inode_dirty(NULL) through __set_page_dirty().
+ * To avoid this problem, the old style mark_buffer_dirty() is used instead.
+ */
+void nilfs_mark_buffer_dirty(struct buffer_head *bh)
+{
+       if (!buffer_dirty(bh) && !test_set_buffer_dirty(bh))
+               __set_page_dirty_nobuffers(bh->b_page);
+}
+
+struct buffer_head *nilfs_grab_buffer(struct inode *inode,
+                                     struct address_space *mapping,
+                                     unsigned long blkoff,
+                                     unsigned long b_state)
+{
+       int blkbits = inode->i_blkbits;
+       pgoff_t index = blkoff >> (PAGE_CACHE_SHIFT - blkbits);
+       struct page *page, *opage;
+       struct buffer_head *bh, *obh;
+
+       page = grab_cache_page(mapping, index);
+       if (unlikely(!page))
+               return NULL;
+
+       bh = __nilfs_get_page_block(page, blkoff, index, blkbits, b_state);
+       if (unlikely(!bh)) {
+               unlock_page(page);
+               page_cache_release(page);
+               return NULL;
+       }
+       if (!buffer_uptodate(bh) && mapping->assoc_mapping != NULL) {
+               /*
+                * Shadow page cache uses assoc_mapping to point its original
+                * page cache.  The following code tries the original cache
+                * if the given cache is a shadow and it didn't hit.
+                */
+               opage = find_lock_page(mapping->assoc_mapping, index);
+               if (!opage)
+                       return bh;
+
+               obh = __nilfs_get_page_block(opage, blkoff, index, blkbits,
+                                            b_state);
+               if (buffer_uptodate(obh)) {
+                       nilfs_copy_buffer(bh, obh);
+                       if (buffer_dirty(obh)) {
+                               nilfs_mark_buffer_dirty(bh);
+                               if (!buffer_nilfs_node(bh) && NILFS_MDT(inode))
+                                       nilfs_mdt_mark_dirty(inode);
+                       }
+               }
+               brelse(obh);
+               unlock_page(opage);
+               page_cache_release(opage);
+       }
+       return bh;
+}
+
+/**
+ * nilfs_forget_buffer - discard dirty state
+ * @inode: owner inode of the buffer
+ * @bh: buffer head of the buffer to be discarded
+ */
+void nilfs_forget_buffer(struct buffer_head *bh)
+{
+       struct page *page = bh->b_page;
+
+       lock_buffer(bh);
+       clear_buffer_nilfs_volatile(bh);
+       if (test_clear_buffer_dirty(bh) && nilfs_page_buffers_clean(page))
+               __nilfs_clear_page_dirty(page);
+
+       clear_buffer_uptodate(bh);
+       clear_buffer_mapped(bh);
+       bh->b_blocknr = -1;
+       ClearPageUptodate(page);
+       ClearPageMappedToDisk(page);
+       unlock_buffer(bh);
+       brelse(bh);
+}
+
+/**
+ * nilfs_copy_buffer -- copy buffer data and flags
+ * @dbh: destination buffer
+ * @sbh: source buffer
+ */
+void nilfs_copy_buffer(struct buffer_head *dbh, struct buffer_head *sbh)
+{
+       void *kaddr0, *kaddr1;
+       unsigned long bits;
+       struct page *spage = sbh->b_page, *dpage = dbh->b_page;
+       struct buffer_head *bh;
+
+       kaddr0 = kmap_atomic(spage, KM_USER0);
+       kaddr1 = kmap_atomic(dpage, KM_USER1);
+       memcpy(kaddr1 + bh_offset(dbh), kaddr0 + bh_offset(sbh), sbh->b_size);
+       kunmap_atomic(kaddr1, KM_USER1);
+       kunmap_atomic(kaddr0, KM_USER0);
+
+       dbh->b_state = sbh->b_state & NILFS_BUFFER_INHERENT_BITS;
+       dbh->b_blocknr = sbh->b_blocknr;
+       dbh->b_bdev = sbh->b_bdev;
+
+       bh = dbh;
+       bits = sbh->b_state & ((1UL << BH_Uptodate) | (1UL << BH_Mapped));
+       while ((bh = bh->b_this_page) != dbh) {
+               lock_buffer(bh);
+               bits &= bh->b_state;
+               unlock_buffer(bh);
+       }
+       if (bits & (1UL << BH_Uptodate))
+               SetPageUptodate(dpage);
+       else
+               ClearPageUptodate(dpage);
+       if (bits & (1UL << BH_Mapped))
+               SetPageMappedToDisk(dpage);
+       else
+               ClearPageMappedToDisk(dpage);
+}
+
+/**
+ * nilfs_page_buffers_clean - check if a page has dirty buffers or not.
+ * @page: page to be checked
+ *
+ * nilfs_page_buffers_clean() returns zero if the page has dirty buffers.
+ * Otherwise, it returns non-zero value.
+ */
+int nilfs_page_buffers_clean(struct page *page)
+{
+       struct buffer_head *bh, *head;
+
+       bh = head = page_buffers(page);
+       do {
+               if (buffer_dirty(bh))
+                       return 0;
+               bh = bh->b_this_page;
+       } while (bh != head);
+       return 1;
+}
+
+void nilfs_page_bug(struct page *page)
+{
+       struct address_space *m;
+       unsigned long ino = 0;
+
+       if (unlikely(!page)) {
+               printk(KERN_CRIT "NILFS_PAGE_BUG(NULL)\n");
+               return;
+       }
+
+       m = page->mapping;
+       if (m) {
+               struct inode *inode = NILFS_AS_I(m);
+               if (inode != NULL)
+                       ino = inode->i_ino;
+       }
+       printk(KERN_CRIT "NILFS_PAGE_BUG(%p): cnt=%d index#=%llu flags=0x%lx "
+              "mapping=%p ino=%lu\n",
+              page, atomic_read(&page->_count),
+              (unsigned long long)page->index, page->flags, m, ino);
+
+       if (page_has_buffers(page)) {
+               struct buffer_head *bh, *head;
+               int i = 0;
+
+               bh = head = page_buffers(page);
+               do {
+                       printk(KERN_CRIT
+                              " BH[%d] %p: cnt=%d block#=%llu state=0x%lx\n",
+                              i++, bh, atomic_read(&bh->b_count),
+                              (unsigned long long)bh->b_blocknr, bh->b_state);
+                       bh = bh->b_this_page;
+               } while (bh != head);
+       }
+}
+
+/**
+ * nilfs_alloc_private_page - allocate a private page with buffer heads
+ *
+ * Return Value: On success, a pointer to the allocated page is returned.
+ * On error, NULL is returned.
+ */
+struct page *nilfs_alloc_private_page(struct block_device *bdev, int size,
+                                     unsigned long state)
+{
+       struct buffer_head *bh, *head, *tail;
+       struct page *page;
+
+       page = alloc_page(GFP_NOFS); /* page_count of the returned page is 1 */
+       if (unlikely(!page))
+               return NULL;
+
+       lock_page(page);
+       head = alloc_page_buffers(page, size, 0);
+       if (unlikely(!head)) {
+               unlock_page(page);
+               __free_page(page);
+               return NULL;
+       }
+
+       bh = head;
+       do {
+               bh->b_state = (1UL << BH_NILFS_Allocated) | state;
+               tail = bh;
+               bh->b_bdev = bdev;
+               bh = bh->b_this_page;
+       } while (bh);
+
+       tail->b_this_page = head;
+       attach_page_buffers(page, head);
+
+       return page;
+}
+
+void nilfs_free_private_page(struct page *page)
+{
+       BUG_ON(!PageLocked(page));
+       BUG_ON(page->mapping);
+
+       if (page_has_buffers(page) && !try_to_free_buffers(page))
+               NILFS_PAGE_BUG(page, "failed to free page");
+
+       unlock_page(page);
+       __free_page(page);
+}
+
+/**
+ * nilfs_copy_page -- copy the page with buffers
+ * @dst: destination page
+ * @src: source page
+ * @copy_dirty: flag whether to copy dirty states on the page's buffer heads.
+ *
+ * This fuction is for both data pages and btnode pages.  The dirty flag
+ * should be treated by caller.  The page must not be under i/o.
+ * Both src and dst page must be locked
+ */
+static void nilfs_copy_page(struct page *dst, struct page *src, int copy_dirty)
+{
+       struct buffer_head *dbh, *dbufs, *sbh, *sbufs;
+       unsigned long mask = NILFS_BUFFER_INHERENT_BITS;
+
+       BUG_ON(PageWriteback(dst));
+
+       sbh = sbufs = page_buffers(src);
+       if (!page_has_buffers(dst))
+               create_empty_buffers(dst, sbh->b_size, 0);
+
+       if (copy_dirty)
+               mask |= (1UL << BH_Dirty);
+
+       dbh = dbufs = page_buffers(dst);
+       do {
+               lock_buffer(sbh);
+               lock_buffer(dbh);
+               dbh->b_state = sbh->b_state & mask;
+               dbh->b_blocknr = sbh->b_blocknr;
+               dbh->b_bdev = sbh->b_bdev;
+               sbh = sbh->b_this_page;
+               dbh = dbh->b_this_page;
+       } while (dbh != dbufs);
+
+       copy_highpage(dst, src);
+
+       if (PageUptodate(src) && !PageUptodate(dst))
+               SetPageUptodate(dst);
+       else if (!PageUptodate(src) && PageUptodate(dst))
+               ClearPageUptodate(dst);
+       if (PageMappedToDisk(src) && !PageMappedToDisk(dst))
+               SetPageMappedToDisk(dst);
+       else if (!PageMappedToDisk(src) && PageMappedToDisk(dst))
+               ClearPageMappedToDisk(dst);
+
+       do {
+               unlock_buffer(sbh);
+               unlock_buffer(dbh);
+               sbh = sbh->b_this_page;
+               dbh = dbh->b_this_page;
+       } while (dbh != dbufs);
+}
+
+int nilfs_copy_dirty_pages(struct address_space *dmap,
+                          struct address_space *smap)
+{
+       struct pagevec pvec;
+       unsigned int i;
+       pgoff_t index = 0;
+       int err = 0;
+
+       pagevec_init(&pvec, 0);
+repeat:
+       if (!pagevec_lookup_tag(&pvec, smap, &index, PAGECACHE_TAG_DIRTY,
+                               PAGEVEC_SIZE))
+               return 0;
+
+       for (i = 0; i < pagevec_count(&pvec); i++) {
+               struct page *page = pvec.pages[i], *dpage;
+
+               lock_page(page);
+               if (unlikely(!PageDirty(page)))
+                       NILFS_PAGE_BUG(page, "inconsistent dirty state");
+
+               dpage = grab_cache_page(dmap, page->index);
+               if (unlikely(!dpage)) {
+                       /* No empty page is added to the page cache */
+                       err = -ENOMEM;
+                       unlock_page(page);
+                       break;
+               }
+               if (unlikely(!page_has_buffers(page)))
+                       NILFS_PAGE_BUG(page,
+                                      "found empty page in dat page cache");
+
+               nilfs_copy_page(dpage, page, 1);
+               __set_page_dirty_nobuffers(dpage);
+
+               unlock_page(dpage);
+               page_cache_release(dpage);
+               unlock_page(page);
+       }
+       pagevec_release(&pvec);
+       cond_resched();
+
+       if (likely(!err))
+               goto repeat;
+       return err;
+}
+
+/**
+ * nilfs_copy_back_pages -- copy back pages to orignal cache from shadow cache
+ * @dmap: destination page cache
+ * @smap: source page cache
+ *
+ * No pages must no be added to the cache during this process.
+ * This must be ensured by the caller.
+ */
+void nilfs_copy_back_pages(struct address_space *dmap,
+                          struct address_space *smap)
+{
+       struct pagevec pvec;
+       unsigned int i, n;
+       pgoff_t index = 0;
+       int err;
+
+       pagevec_init(&pvec, 0);
+repeat:
+       n = pagevec_lookup(&pvec, smap, index, PAGEVEC_SIZE);
+       if (!n)
+               return;
+       index = pvec.pages[n - 1]->index + 1;
+
+       for (i = 0; i < pagevec_count(&pvec); i++) {
+               struct page *page = pvec.pages[i], *dpage;
+               pgoff_t offset = page->index;
+
+               lock_page(page);
+               dpage = find_lock_page(dmap, offset);
+               if (dpage) {
+                       /* override existing page on the destination cache */
+                       WARN_ON(PageDirty(dpage));
+                       nilfs_copy_page(dpage, page, 0);
+                       unlock_page(dpage);
+                       page_cache_release(dpage);
+               } else {
+                       struct page *page2;
+
+                       /* move the page to the destination cache */
+                       spin_lock_irq(&smap->tree_lock);
+                       page2 = radix_tree_delete(&smap->page_tree, offset);
+                       WARN_ON(page2 != page);
+
+                       smap->nrpages--;
+                       spin_unlock_irq(&smap->tree_lock);
+
+                       spin_lock_irq(&dmap->tree_lock);
+                       err = radix_tree_insert(&dmap->page_tree, offset, page);
+                       if (unlikely(err < 0)) {
+                               WARN_ON(err == -EEXIST);
+                               page->mapping = NULL;
+                               page_cache_release(page); /* for cache */
+                       } else {
+                               page->mapping = dmap;
+                               dmap->nrpages++;
+                               if (PageDirty(page))
+                                       radix_tree_tag_set(&dmap->page_tree,
+                                                          offset,
+                                                          PAGECACHE_TAG_DIRTY);
+                       }
+                       spin_unlock_irq(&dmap->tree_lock);
+               }
+               unlock_page(page);
+       }
+       pagevec_release(&pvec);
+       cond_resched();
+
+       goto repeat;
+}
+
+void nilfs_clear_dirty_pages(struct address_space *mapping)
+{
+       struct pagevec pvec;
+       unsigned int i;
+       pgoff_t index = 0;
+
+       pagevec_init(&pvec, 0);
+
+       while (pagevec_lookup_tag(&pvec, mapping, &index, PAGECACHE_TAG_DIRTY,
+                                 PAGEVEC_SIZE)) {
+               for (i = 0; i < pagevec_count(&pvec); i++) {
+                       struct page *page = pvec.pages[i];
+                       struct buffer_head *bh, *head;
+
+                       lock_page(page);
+                       ClearPageUptodate(page);
+                       ClearPageMappedToDisk(page);
+                       bh = head = page_buffers(page);
+                       do {
+                               lock_buffer(bh);
+                               clear_buffer_dirty(bh);
+                               clear_buffer_nilfs_volatile(bh);
+                               clear_buffer_uptodate(bh);
+                               clear_buffer_mapped(bh);
+                               unlock_buffer(bh);
+                               bh = bh->b_this_page;
+                       } while (bh != head);
+
+                       __nilfs_clear_page_dirty(page);
+                       unlock_page(page);
+               }
+               pagevec_release(&pvec);
+               cond_resched();
+       }
+}
+
+unsigned nilfs_page_count_clean_buffers(struct page *page,
+                                       unsigned from, unsigned to)
+{
+       unsigned block_start, block_end;
+       struct buffer_head *bh, *head;
+       unsigned nc = 0;
+
+       for (bh = head = page_buffers(page), block_start = 0;
+            bh != head || !block_start;
+            block_start = block_end, bh = bh->b_this_page) {
+               block_end = block_start + bh->b_size;
+               if (block_end > from && block_start < to && !buffer_dirty(bh))
+                       nc++;
+       }
+       return nc;
+}
+
+/*
+ * NILFS2 needs clear_page_dirty() in the following two cases:
+ *
+ * 1) For B-tree node pages and data pages of the dat/gcdat, NILFS2 clears
+ *    page dirty flags when it copies back pages from the shadow cache
+ *    (gcdat->{i_mapping,i_btnode_cache}) to its original cache
+ *    (dat->{i_mapping,i_btnode_cache}).
+ *
+ * 2) Some B-tree operations like insertion or deletion may dispose buffers
+ *    in dirty state, and this needs to cancel the dirty state of their pages.
+ */
+int __nilfs_clear_page_dirty(struct page *page)
+{
+       struct address_space *mapping = page->mapping;
+
+       if (mapping) {
+               spin_lock_irq(&mapping->tree_lock);
+               if (test_bit(PG_dirty, &page->flags)) {
+                       radix_tree_tag_clear(&mapping->page_tree,
+                                            page_index(page),
+                                            PAGECACHE_TAG_DIRTY);
+                       spin_unlock_irq(&mapping->tree_lock);
+                       return clear_page_dirty_for_io(page);
+               }
+               spin_unlock_irq(&mapping->tree_lock);
+               return 0;
+       }
+       return TestClearPageDirty(page);
+}
diff --git a/fs/nilfs2/page.h b/fs/nilfs2/page.h
new file mode 100644 (file)
index 0000000..8abca4d
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * page.h - buffer/page management specific to NILFS
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>,
+ *            Seiji Kihara <kihara@osrg.net>.
+ */
+
+#ifndef _NILFS_PAGE_H
+#define _NILFS_PAGE_H
+
+#include <linux/buffer_head.h>
+#include "nilfs.h"
+
+/*
+ * Extended buffer state bits
+ */
+enum {
+       BH_NILFS_Allocated = BH_PrivateStart,
+       BH_NILFS_Node,
+       BH_NILFS_Volatile,
+};
+
+BUFFER_FNS(NILFS_Allocated, nilfs_allocated)   /* nilfs private buffers */
+BUFFER_FNS(NILFS_Node, nilfs_node)             /* nilfs node buffers */
+BUFFER_FNS(NILFS_Volatile, nilfs_volatile)
+
+
+void nilfs_mark_buffer_dirty(struct buffer_head *bh);
+int __nilfs_clear_page_dirty(struct page *);
+
+struct buffer_head *nilfs_grab_buffer(struct inode *, struct address_space *,
+                                     unsigned long, unsigned long);
+void nilfs_forget_buffer(struct buffer_head *);
+void nilfs_copy_buffer(struct buffer_head *, struct buffer_head *);
+int nilfs_page_buffers_clean(struct page *);
+void nilfs_page_bug(struct page *);
+struct page *nilfs_alloc_private_page(struct block_device *, int,
+                                     unsigned long);
+void nilfs_free_private_page(struct page *);
+
+int nilfs_copy_dirty_pages(struct address_space *, struct address_space *);
+void nilfs_copy_back_pages(struct address_space *, struct address_space *);
+void nilfs_clear_dirty_pages(struct address_space *);
+unsigned nilfs_page_count_clean_buffers(struct page *, unsigned, unsigned);
+
+#define NILFS_PAGE_BUG(page, m, a...) \
+       do { nilfs_page_bug(page); BUG(); } while (0)
+
+static inline struct buffer_head *
+nilfs_page_get_nth_block(struct page *page, unsigned int count)
+{
+       struct buffer_head *bh = page_buffers(page);
+
+       while (count-- > 0)
+               bh = bh->b_this_page;
+       get_bh(bh);
+       return bh;
+}
+
+#endif /* _NILFS_PAGE_H */
diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c
new file mode 100644 (file)
index 0000000..6ade096
--- /dev/null
@@ -0,0 +1,929 @@
+/*
+ * recovery.c - NILFS recovery logic
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ */
+
+#include <linux/buffer_head.h>
+#include <linux/blkdev.h>
+#include <linux/swap.h>
+#include <linux/crc32.h>
+#include "nilfs.h"
+#include "segment.h"
+#include "sufile.h"
+#include "page.h"
+#include "seglist.h"
+#include "segbuf.h"
+
+/*
+ * Segment check result
+ */
+enum {
+       NILFS_SEG_VALID,
+       NILFS_SEG_NO_SUPER_ROOT,
+       NILFS_SEG_FAIL_IO,
+       NILFS_SEG_FAIL_MAGIC,
+       NILFS_SEG_FAIL_SEQ,
+       NILFS_SEG_FAIL_CHECKSUM_SEGSUM,
+       NILFS_SEG_FAIL_CHECKSUM_SUPER_ROOT,
+       NILFS_SEG_FAIL_CHECKSUM_FULL,
+       NILFS_SEG_FAIL_CONSISTENCY,
+};
+
+/* work structure for recovery */
+struct nilfs_recovery_block {
+       ino_t ino;              /* Inode number of the file that this block
+                                  belongs to */
+       sector_t blocknr;       /* block number */
+       __u64 vblocknr;         /* virtual block number */
+       unsigned long blkoff;   /* File offset of the data block (per block) */
+       struct list_head list;
+};
+
+
+static int nilfs_warn_segment_error(int err)
+{
+       switch (err) {
+       case NILFS_SEG_FAIL_IO:
+               printk(KERN_WARNING
+                      "NILFS warning: I/O error on loading last segment\n");
+               return -EIO;
+       case NILFS_SEG_FAIL_MAGIC:
+               printk(KERN_WARNING
+                      "NILFS warning: Segment magic number invalid\n");
+               break;
+       case NILFS_SEG_FAIL_SEQ:
+               printk(KERN_WARNING
+                      "NILFS warning: Sequence number mismatch\n");
+               break;
+       case NILFS_SEG_FAIL_CHECKSUM_SEGSUM:
+               printk(KERN_WARNING
+                      "NILFS warning: Checksum error in segment summary\n");
+               break;
+       case NILFS_SEG_FAIL_CHECKSUM_SUPER_ROOT:
+               printk(KERN_WARNING
+                      "NILFS warning: Checksum error in super root\n");
+               break;
+       case NILFS_SEG_FAIL_CHECKSUM_FULL:
+               printk(KERN_WARNING
+                      "NILFS warning: Checksum error in segment payload\n");
+               break;
+       case NILFS_SEG_FAIL_CONSISTENCY:
+               printk(KERN_WARNING
+                      "NILFS warning: Inconsistent segment\n");
+               break;
+       case NILFS_SEG_NO_SUPER_ROOT:
+               printk(KERN_WARNING
+                      "NILFS warning: No super root in the last segment\n");
+               break;
+       }
+       return -EINVAL;
+}
+
+static void store_segsum_info(struct nilfs_segsum_info *ssi,
+                             struct nilfs_segment_summary *sum,
+                             unsigned int blocksize)
+{
+       ssi->flags = le16_to_cpu(sum->ss_flags);
+       ssi->seg_seq = le64_to_cpu(sum->ss_seq);
+       ssi->ctime = le64_to_cpu(sum->ss_create);
+       ssi->next = le64_to_cpu(sum->ss_next);
+       ssi->nblocks = le32_to_cpu(sum->ss_nblocks);
+       ssi->nfinfo = le32_to_cpu(sum->ss_nfinfo);
+       ssi->sumbytes = le32_to_cpu(sum->ss_sumbytes);
+
+       ssi->nsumblk = DIV_ROUND_UP(ssi->sumbytes, blocksize);
+       ssi->nfileblk = ssi->nblocks - ssi->nsumblk - !!NILFS_SEG_HAS_SR(ssi);
+}
+
+/**
+ * calc_crc_cont - check CRC of blocks continuously
+ * @sbi: nilfs_sb_info
+ * @bhs: buffer head of start block
+ * @sum: place to store result
+ * @offset: offset bytes in the first block
+ * @check_bytes: number of bytes to be checked
+ * @start: DBN of start block
+ * @nblock: number of blocks to be checked
+ */
+static int calc_crc_cont(struct nilfs_sb_info *sbi, struct buffer_head *bhs,
+                        u32 *sum, unsigned long offset, u64 check_bytes,
+                        sector_t start, unsigned long nblock)
+{
+       unsigned long blocksize = sbi->s_super->s_blocksize;
+       unsigned long size;
+       u32 crc;
+
+       BUG_ON(offset >= blocksize);
+       check_bytes -= offset;
+       size = min_t(u64, check_bytes, blocksize - offset);
+       crc = crc32_le(sbi->s_nilfs->ns_crc_seed,
+                      (unsigned char *)bhs->b_data + offset, size);
+       if (--nblock > 0) {
+               do {
+                       struct buffer_head *bh
+                               = sb_bread(sbi->s_super, ++start);
+                       if (!bh)
+                               return -EIO;
+                       check_bytes -= size;
+                       size = min_t(u64, check_bytes, blocksize);
+                       crc = crc32_le(crc, bh->b_data, size);
+                       brelse(bh);
+               } while (--nblock > 0);
+       }
+       *sum = crc;
+       return 0;
+}
+
+/**
+ * nilfs_read_super_root_block - read super root block
+ * @sb: super_block
+ * @sr_block: disk block number of the super root block
+ * @pbh: address of a buffer_head pointer to return super root buffer
+ * @check: CRC check flag
+ */
+int nilfs_read_super_root_block(struct super_block *sb, sector_t sr_block,
+                               struct buffer_head **pbh, int check)
+{
+       struct buffer_head *bh_sr;
+       struct nilfs_super_root *sr;
+       u32 crc;
+       int ret;
+
+       *pbh = NULL;
+       bh_sr = sb_bread(sb, sr_block);
+       if (unlikely(!bh_sr)) {
+               ret = NILFS_SEG_FAIL_IO;
+               goto failed;
+       }
+
+       sr = (struct nilfs_super_root *)bh_sr->b_data;
+       if (check) {
+               unsigned bytes = le16_to_cpu(sr->sr_bytes);
+
+               if (bytes == 0 || bytes > sb->s_blocksize) {
+                       ret = NILFS_SEG_FAIL_CHECKSUM_SUPER_ROOT;
+                       goto failed_bh;
+               }
+               if (calc_crc_cont(NILFS_SB(sb), bh_sr, &crc,
+                                 sizeof(sr->sr_sum), bytes, sr_block, 1)) {
+                       ret = NILFS_SEG_FAIL_IO;
+                       goto failed_bh;
+               }
+               if (crc != le32_to_cpu(sr->sr_sum)) {
+                       ret = NILFS_SEG_FAIL_CHECKSUM_SUPER_ROOT;
+                       goto failed_bh;
+               }
+       }
+       *pbh = bh_sr;
+       return 0;
+
+ failed_bh:
+       brelse(bh_sr);
+
+ failed:
+       return nilfs_warn_segment_error(ret);
+}
+
+/**
+ * load_segment_summary - read segment summary of the specified partial segment
+ * @sbi: nilfs_sb_info
+ * @pseg_start: start disk block number of partial segment
+ * @seg_seq: sequence number requested
+ * @ssi: pointer to nilfs_segsum_info struct to store information
+ * @full_check: full check flag
+ *              (0: only checks segment summary CRC, 1: data CRC)
+ */
+static int
+load_segment_summary(struct nilfs_sb_info *sbi, sector_t pseg_start,
+                    u64 seg_seq, struct nilfs_segsum_info *ssi,
+                    int full_check)
+{
+       struct buffer_head *bh_sum;
+       struct nilfs_segment_summary *sum;
+       unsigned long offset, nblock;
+       u64 check_bytes;
+       u32 crc, crc_sum;
+       int ret = NILFS_SEG_FAIL_IO;
+
+       bh_sum = sb_bread(sbi->s_super, pseg_start);
+       if (!bh_sum)
+               goto out;
+
+       sum = (struct nilfs_segment_summary *)bh_sum->b_data;
+
+       /* Check consistency of segment summary */
+       if (le32_to_cpu(sum->ss_magic) != NILFS_SEGSUM_MAGIC) {
+               ret = NILFS_SEG_FAIL_MAGIC;
+               goto failed;
+       }
+       store_segsum_info(ssi, sum, sbi->s_super->s_blocksize);
+       if (seg_seq != ssi->seg_seq) {
+               ret = NILFS_SEG_FAIL_SEQ;
+               goto failed;
+       }
+       if (full_check) {
+               offset = sizeof(sum->ss_datasum);
+               check_bytes =
+                       ((u64)ssi->nblocks << sbi->s_super->s_blocksize_bits);
+               nblock = ssi->nblocks;
+               crc_sum = le32_to_cpu(sum->ss_datasum);
+               ret = NILFS_SEG_FAIL_CHECKSUM_FULL;
+       } else { /* only checks segment summary */
+               offset = sizeof(sum->ss_datasum) + sizeof(sum->ss_sumsum);
+               check_bytes = ssi->sumbytes;
+               nblock = ssi->nsumblk;
+               crc_sum = le32_to_cpu(sum->ss_sumsum);
+               ret = NILFS_SEG_FAIL_CHECKSUM_SEGSUM;
+       }
+
+       if (unlikely(nblock == 0 ||
+                    nblock > sbi->s_nilfs->ns_blocks_per_segment)) {
+               /* This limits the number of blocks read in the CRC check */
+               ret = NILFS_SEG_FAIL_CONSISTENCY;
+               goto failed;
+       }
+       if (calc_crc_cont(sbi, bh_sum, &crc, offset, check_bytes,
+                         pseg_start, nblock)) {
+               ret = NILFS_SEG_FAIL_IO;
+               goto failed;
+       }
+       if (crc == crc_sum)
+               ret = 0;
+ failed:
+       brelse(bh_sum);
+ out:
+       return ret;
+}
+
+static void *segsum_get(struct super_block *sb, struct buffer_head **pbh,
+                       unsigned int *offset, unsigned int bytes)
+{
+       void *ptr;
+       sector_t blocknr;
+
+       BUG_ON((*pbh)->b_size < *offset);
+       if (bytes > (*pbh)->b_size - *offset) {
+               blocknr = (*pbh)->b_blocknr;
+               brelse(*pbh);
+               *pbh = sb_bread(sb, blocknr + 1);
+               if (unlikely(!*pbh))
+                       return NULL;
+               *offset = 0;
+       }
+       ptr = (*pbh)->b_data + *offset;
+       *offset += bytes;
+       return ptr;
+}
+
+static void segsum_skip(struct super_block *sb, struct buffer_head **pbh,
+                       unsigned int *offset, unsigned int bytes,
+                       unsigned long count)
+{
+       unsigned int rest_item_in_current_block
+               = ((*pbh)->b_size - *offset) / bytes;
+
+       if (count <= rest_item_in_current_block) {
+               *offset += bytes * count;
+       } else {
+               sector_t blocknr = (*pbh)->b_blocknr;
+               unsigned int nitem_per_block = (*pbh)->b_size / bytes;
+               unsigned int bcnt;
+
+               count -= rest_item_in_current_block;
+               bcnt = DIV_ROUND_UP(count, nitem_per_block);
+               *offset = bytes * (count - (bcnt - 1) * nitem_per_block);
+
+               brelse(*pbh);
+               *pbh = sb_bread(sb, blocknr + bcnt);
+       }
+}
+
+static int
+collect_blocks_from_segsum(struct nilfs_sb_info *sbi, sector_t sum_blocknr,
+                          struct nilfs_segsum_info *ssi,
+                          struct list_head *head)
+{
+       struct buffer_head *bh;
+       unsigned int offset;
+       unsigned long nfinfo = ssi->nfinfo;
+       sector_t blocknr = sum_blocknr + ssi->nsumblk;
+       ino_t ino;
+       int err = -EIO;
+
+       if (!nfinfo)
+               return 0;
+
+       bh = sb_bread(sbi->s_super, sum_blocknr);
+       if (unlikely(!bh))
+               goto out;
+
+       offset = le16_to_cpu(
+               ((struct nilfs_segment_summary *)bh->b_data)->ss_bytes);
+       for (;;) {
+               unsigned long nblocks, ndatablk, nnodeblk;
+               struct nilfs_finfo *finfo;
+
+               finfo = segsum_get(sbi->s_super, &bh, &offset, sizeof(*finfo));
+               if (unlikely(!finfo))
+                       goto out;
+
+               ino = le64_to_cpu(finfo->fi_ino);
+               nblocks = le32_to_cpu(finfo->fi_nblocks);
+               ndatablk = le32_to_cpu(finfo->fi_ndatablk);
+               nnodeblk = nblocks - ndatablk;
+
+               while (ndatablk-- > 0) {
+                       struct nilfs_recovery_block *rb;
+                       struct nilfs_binfo_v *binfo;
+
+                       binfo = segsum_get(sbi->s_super, &bh, &offset,
+                                          sizeof(*binfo));
+                       if (unlikely(!binfo))
+                               goto out;
+
+                       rb = kmalloc(sizeof(*rb), GFP_NOFS);
+                       if (unlikely(!rb)) {
+                               err = -ENOMEM;
+                               goto out;
+                       }
+                       rb->ino = ino;
+                       rb->blocknr = blocknr++;
+                       rb->vblocknr = le64_to_cpu(binfo->bi_vblocknr);
+                       rb->blkoff = le64_to_cpu(binfo->bi_blkoff);
+                       /* INIT_LIST_HEAD(&rb->list); */
+                       list_add_tail(&rb->list, head);
+               }
+               if (--nfinfo == 0)
+                       break;
+               blocknr += nnodeblk; /* always 0 for the data sync segments */
+               segsum_skip(sbi->s_super, &bh, &offset, sizeof(__le64),
+                           nnodeblk);
+               if (unlikely(!bh))
+                       goto out;
+       }
+       err = 0;
+ out:
+       brelse(bh);   /* brelse(NULL) is just ignored */
+       return err;
+}
+
+static void dispose_recovery_list(struct list_head *head)
+{
+       while (!list_empty(head)) {
+               struct nilfs_recovery_block *rb
+                       = list_entry(head->next,
+                                    struct nilfs_recovery_block, list);
+               list_del(&rb->list);
+               kfree(rb);
+       }
+}
+
+void nilfs_dispose_segment_list(struct list_head *head)
+{
+       while (!list_empty(head)) {
+               struct nilfs_segment_entry *ent
+                       = list_entry(head->next,
+                                    struct nilfs_segment_entry, list);
+               list_del(&ent->list);
+               nilfs_free_segment_entry(ent);
+       }
+}
+
+static int nilfs_prepare_segment_for_recovery(struct the_nilfs *nilfs,
+                                             struct nilfs_recovery_info *ri)
+{
+       struct list_head *head = &ri->ri_used_segments;
+       struct nilfs_segment_entry *ent, *n;
+       struct inode *sufile = nilfs->ns_sufile;
+       __u64 segnum[4];
+       time_t mtime;
+       int err;
+       int i;
+
+       segnum[0] = nilfs->ns_segnum;
+       segnum[1] = nilfs->ns_nextnum;
+       segnum[2] = ri->ri_segnum;
+       segnum[3] = ri->ri_nextnum;
+
+       /*
+        * Releasing the next segment of the latest super root.
+        * The next segment is invalidated by this recovery.
+        */
+       err = nilfs_sufile_free(sufile, segnum[1]);
+       if (unlikely(err))
+               goto failed;
+
+       err = -ENOMEM;
+       for (i = 1; i < 4; i++) {
+               ent = nilfs_alloc_segment_entry(segnum[i]);
+               if (unlikely(!ent))
+                       goto failed;
+               list_add_tail(&ent->list, head);
+       }
+
+       /*
+        * Collecting segments written after the latest super root.
+        * These are marked dirty to avoid being reallocated in the next write.
+        */
+       mtime = get_seconds();
+       list_for_each_entry_safe(ent, n, head, list) {
+               if (ent->segnum == segnum[0]) {
+                       list_del(&ent->list);
+                       nilfs_free_segment_entry(ent);
+                       continue;
+               }
+               err = nilfs_open_segment_entry(ent, sufile);
+               if (unlikely(err))
+                       goto failed;
+               if (!nilfs_segment_usage_dirty(ent->raw_su)) {
+                       /* make the segment garbage */
+                       ent->raw_su->su_nblocks = cpu_to_le32(0);
+                       ent->raw_su->su_lastmod = cpu_to_le32(mtime);
+                       nilfs_segment_usage_set_dirty(ent->raw_su);
+               }
+               list_del(&ent->list);
+               nilfs_close_segment_entry(ent, sufile);
+               nilfs_free_segment_entry(ent);
+       }
+
+       /* Allocate new segments for recovery */
+       err = nilfs_sufile_alloc(sufile, &segnum[0]);
+       if (unlikely(err))
+               goto failed;
+
+       nilfs->ns_pseg_offset = 0;
+       nilfs->ns_seg_seq = ri->ri_seq + 2;
+       nilfs->ns_nextnum = nilfs->ns_segnum = segnum[0];
+       return 0;
+
+ failed:
+       /* No need to recover sufile because it will be destroyed on error */
+       return err;
+}
+
+static int nilfs_recovery_copy_block(struct nilfs_sb_info *sbi,
+                                    struct nilfs_recovery_block *rb,
+                                    struct page *page)
+{
+       struct buffer_head *bh_org;
+       void *kaddr;
+
+       bh_org = sb_bread(sbi->s_super, rb->blocknr);
+       if (unlikely(!bh_org))
+               return -EIO;
+
+       kaddr = kmap_atomic(page, KM_USER0);
+       memcpy(kaddr + bh_offset(bh_org), bh_org->b_data, bh_org->b_size);
+       kunmap_atomic(kaddr, KM_USER0);
+       brelse(bh_org);
+       return 0;
+}
+
+static int recover_dsync_blocks(struct nilfs_sb_info *sbi,
+                               struct list_head *head,
+                               unsigned long *nr_salvaged_blocks)
+{
+       struct inode *inode;
+       struct nilfs_recovery_block *rb, *n;
+       unsigned blocksize = sbi->s_super->s_blocksize;
+       struct page *page;
+       loff_t pos;
+       int err = 0, err2 = 0;
+
+       list_for_each_entry_safe(rb, n, head, list) {
+               inode = nilfs_iget(sbi->s_super, rb->ino);
+               if (IS_ERR(inode)) {
+                       err = PTR_ERR(inode);
+                       inode = NULL;
+                       goto failed_inode;
+               }
+
+               pos = rb->blkoff << inode->i_blkbits;
+               page = NULL;
+               err = block_write_begin(NULL, inode->i_mapping, pos, blocksize,
+                                       0, &page, NULL, nilfs_get_block);
+               if (unlikely(err))
+                       goto failed_inode;
+
+               err = nilfs_recovery_copy_block(sbi, rb, page);
+               if (unlikely(err))
+                       goto failed_page;
+
+               err = nilfs_set_file_dirty(sbi, inode, 1);
+               if (unlikely(err))
+                       goto failed_page;
+
+               block_write_end(NULL, inode->i_mapping, pos, blocksize,
+                               blocksize, page, NULL);
+
+               unlock_page(page);
+               page_cache_release(page);
+
+               (*nr_salvaged_blocks)++;
+               goto next;
+
+ failed_page:
+               unlock_page(page);
+               page_cache_release(page);
+
+ failed_inode:
+               printk(KERN_WARNING
+                      "NILFS warning: error recovering data block "
+                      "(err=%d, ino=%lu, block-offset=%llu)\n",
+                      err, rb->ino, (unsigned long long)rb->blkoff);
+               if (!err2)
+                       err2 = err;
+ next:
+               iput(inode); /* iput(NULL) is just ignored */
+               list_del_init(&rb->list);
+               kfree(rb);
+       }
+       return err2;
+}
+
+/**
+ * nilfs_do_roll_forward - salvage logical segments newer than the latest
+ * checkpoint
+ * @sbi: nilfs_sb_info
+ * @nilfs: the_nilfs
+ * @ri: pointer to a nilfs_recovery_info
+ */
+static int nilfs_do_roll_forward(struct the_nilfs *nilfs,
+                                struct nilfs_sb_info *sbi,
+                                struct nilfs_recovery_info *ri)
+{
+       struct nilfs_segsum_info ssi;
+       sector_t pseg_start;
+       sector_t seg_start, seg_end;  /* Starting/ending DBN of full segment */
+       unsigned long nsalvaged_blocks = 0;
+       u64 seg_seq;
+       __u64 segnum, nextnum = 0;
+       int empty_seg = 0;
+       int err = 0, ret;
+       LIST_HEAD(dsync_blocks);  /* list of data blocks to be recovered */
+       enum {
+               RF_INIT_ST,
+               RF_DSYNC_ST,   /* scanning data-sync segments */
+       };
+       int state = RF_INIT_ST;
+
+       nilfs_attach_writer(nilfs, sbi);
+       pseg_start = ri->ri_lsegs_start;
+       seg_seq = ri->ri_lsegs_start_seq;
+       segnum = nilfs_get_segnum_of_block(nilfs, pseg_start);
+       nilfs_get_segment_range(nilfs, segnum, &seg_start, &seg_end);
+
+       while (segnum != ri->ri_segnum || pseg_start <= ri->ri_pseg_start) {
+
+               ret = load_segment_summary(sbi, pseg_start, seg_seq, &ssi, 1);
+               if (ret) {
+                       if (ret == NILFS_SEG_FAIL_IO) {
+                               err = -EIO;
+                               goto failed;
+                       }
+                       goto strayed;
+               }
+               if (unlikely(NILFS_SEG_HAS_SR(&ssi)))
+                       goto confused;
+
+               /* Found a valid partial segment; do recovery actions */
+               nextnum = nilfs_get_segnum_of_block(nilfs, ssi.next);
+               empty_seg = 0;
+               nilfs->ns_ctime = ssi.ctime;
+               if (!(ssi.flags & NILFS_SS_GC))
+                       nilfs->ns_nongc_ctime = ssi.ctime;
+
+               switch (state) {
+               case RF_INIT_ST:
+                       if (!NILFS_SEG_LOGBGN(&ssi) || !NILFS_SEG_DSYNC(&ssi))
+                               goto try_next_pseg;
+                       state = RF_DSYNC_ST;
+                       /* Fall through */
+               case RF_DSYNC_ST:
+                       if (!NILFS_SEG_DSYNC(&ssi))
+                               goto confused;
+
+                       err = collect_blocks_from_segsum(
+                               sbi, pseg_start, &ssi, &dsync_blocks);
+                       if (unlikely(err))
+                               goto failed;
+                       if (NILFS_SEG_LOGEND(&ssi)) {
+                               err = recover_dsync_blocks(
+                                       sbi, &dsync_blocks, &nsalvaged_blocks);
+                               if (unlikely(err))
+                                       goto failed;
+                               state = RF_INIT_ST;
+                       }
+                       break; /* Fall through to try_next_pseg */
+               }
+
+ try_next_pseg:
+               if (pseg_start == ri->ri_lsegs_end)
+                       break;
+               pseg_start += ssi.nblocks;
+               if (pseg_start < seg_end)
+                       continue;
+               goto feed_segment;
+
+ strayed:
+               if (pseg_start == ri->ri_lsegs_end)
+                       break;
+
+ feed_segment:
+               /* Looking to the next full segment */
+               if (empty_seg++)
+                       break;
+               seg_seq++;
+               segnum = nextnum;
+               nilfs_get_segment_range(nilfs, segnum, &seg_start, &seg_end);
+               pseg_start = seg_start;
+       }
+
+       if (nsalvaged_blocks) {
+               printk(KERN_INFO "NILFS (device %s): salvaged %lu blocks\n",
+                      sbi->s_super->s_id, nsalvaged_blocks);
+               ri->ri_need_recovery = NILFS_RECOVERY_ROLLFORWARD_DONE;
+       }
+ out:
+       dispose_recovery_list(&dsync_blocks);
+       nilfs_detach_writer(sbi->s_nilfs, sbi);
+       return err;
+
+ confused:
+       err = -EINVAL;
+ failed:
+       printk(KERN_ERR
+              "NILFS (device %s): Error roll-forwarding "
+              "(err=%d, pseg block=%llu). ",
+              sbi->s_super->s_id, err, (unsigned long long)pseg_start);
+       goto out;
+}
+
+static void nilfs_finish_roll_forward(struct the_nilfs *nilfs,
+                                     struct nilfs_sb_info *sbi,
+                                     struct nilfs_recovery_info *ri)
+{
+       struct buffer_head *bh;
+       int err;
+
+       if (nilfs_get_segnum_of_block(nilfs, ri->ri_lsegs_start) !=
+           nilfs_get_segnum_of_block(nilfs, ri->ri_super_root))
+               return;
+
+       bh = sb_getblk(sbi->s_super, ri->ri_lsegs_start);
+       BUG_ON(!bh);
+       memset(bh->b_data, 0, bh->b_size);
+       set_buffer_dirty(bh);
+       err = sync_dirty_buffer(bh);
+       if (unlikely(err))
+               printk(KERN_WARNING
+                      "NILFS warning: buffer sync write failed during "
+                      "post-cleaning of recovery.\n");
+       brelse(bh);
+}
+
+/**
+ * nilfs_recover_logical_segments - salvage logical segments written after
+ * the latest super root
+ * @nilfs: the_nilfs
+ * @sbi: nilfs_sb_info
+ * @ri: pointer to a nilfs_recovery_info struct to store search results.
+ *
+ * Return Value: On success, 0 is returned.  On error, one of the following
+ * negative error code is returned.
+ *
+ * %-EINVAL - Inconsistent filesystem state.
+ *
+ * %-EIO - I/O error
+ *
+ * %-ENOSPC - No space left on device (only in a panic state).
+ *
+ * %-ERESTARTSYS - Interrupted.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ */
+int nilfs_recover_logical_segments(struct the_nilfs *nilfs,
+                                  struct nilfs_sb_info *sbi,
+                                  struct nilfs_recovery_info *ri)
+{
+       int err;
+
+       if (ri->ri_lsegs_start == 0 || ri->ri_lsegs_end == 0)
+               return 0;
+
+       err = nilfs_attach_checkpoint(sbi, ri->ri_cno);
+       if (unlikely(err)) {
+               printk(KERN_ERR
+                      "NILFS: error loading the latest checkpoint.\n");
+               return err;
+       }
+
+       err = nilfs_do_roll_forward(nilfs, sbi, ri);
+       if (unlikely(err))
+               goto failed;
+
+       if (ri->ri_need_recovery == NILFS_RECOVERY_ROLLFORWARD_DONE) {
+               err = nilfs_prepare_segment_for_recovery(nilfs, ri);
+               if (unlikely(err)) {
+                       printk(KERN_ERR "NILFS: Error preparing segments for "
+                              "recovery.\n");
+                       goto failed;
+               }
+
+               err = nilfs_attach_segment_constructor(sbi);
+               if (unlikely(err))
+                       goto failed;
+
+               set_nilfs_discontinued(nilfs);
+               err = nilfs_construct_segment(sbi->s_super);
+               nilfs_detach_segment_constructor(sbi);
+
+               if (unlikely(err)) {
+                       printk(KERN_ERR "NILFS: Oops! recovery failed. "
+                              "(err=%d)\n", err);
+                       goto failed;
+               }
+
+               nilfs_finish_roll_forward(nilfs, sbi, ri);
+       }
+
+       nilfs_detach_checkpoint(sbi);
+       return 0;
+
+ failed:
+       nilfs_detach_checkpoint(sbi);
+       nilfs_mdt_clear(nilfs->ns_cpfile);
+       nilfs_mdt_clear(nilfs->ns_sufile);
+       nilfs_mdt_clear(nilfs->ns_dat);
+       return err;
+}
+
+/**
+ * nilfs_search_super_root - search the latest valid super root
+ * @nilfs: the_nilfs
+ * @sbi: nilfs_sb_info
+ * @ri: pointer to a nilfs_recovery_info struct to store search results.
+ *
+ * nilfs_search_super_root() looks for the latest super-root from a partial
+ * segment pointed by the superblock.  It sets up struct the_nilfs through
+ * this search. It fills nilfs_recovery_info (ri) required for recovery.
+ *
+ * Return Value: On success, 0 is returned.  On error, one of the following
+ * negative error code is returned.
+ *
+ * %-EINVAL - No valid segment found
+ *
+ * %-EIO - I/O error
+ */
+int nilfs_search_super_root(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi,
+                           struct nilfs_recovery_info *ri)
+{
+       struct nilfs_segsum_info ssi;
+       sector_t pseg_start, pseg_end, sr_pseg_start = 0;
+       sector_t seg_start, seg_end; /* range of full segment (block number) */
+       u64 seg_seq;
+       __u64 segnum, nextnum = 0;
+       __u64 cno;
+       struct nilfs_segment_entry *ent;
+       LIST_HEAD(segments);
+       int empty_seg = 0, scan_newer = 0;
+       int ret;
+
+       pseg_start = nilfs->ns_last_pseg;
+       seg_seq = nilfs->ns_last_seq;
+       cno = nilfs->ns_last_cno;
+       segnum = nilfs_get_segnum_of_block(nilfs, pseg_start);
+
+       /* Calculate range of segment */
+       nilfs_get_segment_range(nilfs, segnum, &seg_start, &seg_end);
+
+       for (;;) {
+               /* Load segment summary */
+               ret = load_segment_summary(sbi, pseg_start, seg_seq, &ssi, 1);
+               if (ret) {
+                       if (ret == NILFS_SEG_FAIL_IO)
+                               goto failed;
+                       goto strayed;
+               }
+               pseg_end = pseg_start + ssi.nblocks - 1;
+               if (unlikely(pseg_end > seg_end)) {
+                       ret = NILFS_SEG_FAIL_CONSISTENCY;
+                       goto strayed;
+               }
+
+               /* A valid partial segment */
+               ri->ri_pseg_start = pseg_start;
+               ri->ri_seq = seg_seq;
+               ri->ri_segnum = segnum;
+               nextnum = nilfs_get_segnum_of_block(nilfs, ssi.next);
+               ri->ri_nextnum = nextnum;
+               empty_seg = 0;
+
+               if (!NILFS_SEG_HAS_SR(&ssi)) {
+                       if (!scan_newer) {
+                               /* This will never happen because a superblock
+                                  (last_segment) always points to a pseg
+                                  having a super root. */
+                               ret = NILFS_SEG_FAIL_CONSISTENCY;
+                               goto failed;
+                       }
+                       if (!ri->ri_lsegs_start && NILFS_SEG_LOGBGN(&ssi)) {
+                               ri->ri_lsegs_start = pseg_start;
+                               ri->ri_lsegs_start_seq = seg_seq;
+                       }
+                       if (NILFS_SEG_LOGEND(&ssi))
+                               ri->ri_lsegs_end = pseg_start;
+                       goto try_next_pseg;
+               }
+
+               /* A valid super root was found. */
+               ri->ri_cno = cno++;
+               ri->ri_super_root = pseg_end;
+               ri->ri_lsegs_start = ri->ri_lsegs_end = 0;
+
+               nilfs_dispose_segment_list(&segments);
+               nilfs->ns_pseg_offset = (sr_pseg_start = pseg_start)
+                       + ssi.nblocks - seg_start;
+               nilfs->ns_seg_seq = seg_seq;
+               nilfs->ns_segnum = segnum;
+               nilfs->ns_cno = cno;  /* nilfs->ns_cno = ri->ri_cno + 1 */
+               nilfs->ns_ctime = ssi.ctime;
+               nilfs->ns_nextnum = nextnum;
+
+               if (scan_newer)
+                       ri->ri_need_recovery = NILFS_RECOVERY_SR_UPDATED;
+               else {
+                       if (nilfs->ns_mount_state & NILFS_VALID_FS)
+                               goto super_root_found;
+                       scan_newer = 1;
+               }
+
+               /* reset region for roll-forward */
+               pseg_start += ssi.nblocks;
+               if (pseg_start < seg_end)
+                       continue;
+               goto feed_segment;
+
+ try_next_pseg:
+               /* Standing on a course, or met an inconsistent state */
+               pseg_start += ssi.nblocks;
+               if (pseg_start < seg_end)
+                       continue;
+               goto feed_segment;
+
+ strayed:
+               /* Off the trail */
+               if (!scan_newer)
+                       /*
+                        * This can happen if a checkpoint was written without
+                        * barriers, or as a result of an I/O failure.
+                        */
+                       goto failed;
+
+ feed_segment:
+               /* Looking to the next full segment */
+               if (empty_seg++)
+                       goto super_root_found; /* found a valid super root */
+
+               ent = nilfs_alloc_segment_entry(segnum);
+               if (unlikely(!ent)) {
+                       ret = -ENOMEM;
+                       goto failed;
+               }
+               list_add_tail(&ent->list, &segments);
+
+               seg_seq++;
+               segnum = nextnum;
+               nilfs_get_segment_range(nilfs, segnum, &seg_start, &seg_end);
+               pseg_start = seg_start;
+       }
+
+ super_root_found:
+       /* Updating pointers relating to the latest checkpoint */
+       list_splice(&segments, ri->ri_used_segments.prev);
+       nilfs->ns_last_pseg = sr_pseg_start;
+       nilfs->ns_last_seq = nilfs->ns_seg_seq;
+       nilfs->ns_last_cno = ri->ri_cno;
+       return 0;
+
+ failed:
+       nilfs_dispose_segment_list(&segments);
+       return (ret < 0) ? ret : nilfs_warn_segment_error(ret);
+}
diff --git a/fs/nilfs2/sb.h b/fs/nilfs2/sb.h
new file mode 100644 (file)
index 0000000..adccd4f
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * sb.h - NILFS on-memory super block structure.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+
+#ifndef _NILFS_SB
+#define _NILFS_SB
+
+#include <linux/types.h>
+#include <linux/fs.h>
+
+/*
+ * Mount options
+ */
+struct nilfs_mount_options {
+       unsigned long mount_opt;
+       __u64 snapshot_cno;
+};
+
+struct the_nilfs;
+struct nilfs_sc_info;
+
+/*
+ * NILFS super-block data in memory
+ */
+struct nilfs_sb_info {
+       /* Snapshot status */
+       __u64 s_snapshot_cno;           /* Checkpoint number */
+       atomic_t s_inodes_count;
+       atomic_t s_blocks_count;        /* Reserved (might be deleted) */
+
+       /* Mount options */
+       unsigned long s_mount_opt;
+       uid_t s_resuid;
+       gid_t s_resgid;
+
+       unsigned long s_interval;       /* construction interval */
+       unsigned long s_watermark;      /* threshold of data amount
+                                          for the segment construction */
+
+       /* Fundamental members */
+       struct super_block *s_super;    /* reverse pointer to super_block */
+       struct the_nilfs *s_nilfs;
+       struct list_head s_list;        /* list head for nilfs->ns_supers */
+
+       /* Segment constructor */
+       struct list_head s_dirty_files; /* dirty files list */
+       struct nilfs_sc_info *s_sc_info; /* segment constructor info */
+       spinlock_t s_inode_lock;        /* Lock for the nilfs inode.
+                                          It covers s_dirty_files list */
+
+       /* Metadata files */
+       struct inode *s_ifile;          /* index file inode */
+
+       /* Inode allocator */
+       spinlock_t s_next_gen_lock;
+       u32 s_next_generation;
+};
+
+static inline struct nilfs_sb_info *NILFS_SB(struct super_block *sb)
+{
+       return sb->s_fs_info;
+}
+
+static inline struct nilfs_sc_info *NILFS_SC(struct nilfs_sb_info *sbi)
+{
+       return sbi->s_sc_info;
+}
+
+/*
+ * Bit operations for the mount option
+ */
+#define nilfs_clear_opt(sbi, opt)  \
+       do { (sbi)->s_mount_opt &= ~NILFS_MOUNT_##opt; } while (0)
+#define nilfs_set_opt(sbi, opt)  \
+       do { (sbi)->s_mount_opt |= NILFS_MOUNT_##opt; } while (0)
+#define nilfs_test_opt(sbi, opt)   ((sbi)->s_mount_opt & NILFS_MOUNT_##opt)
+#define nilfs_write_opt(sbi, mask, opt)                                        \
+       do { (sbi)->s_mount_opt =                                       \
+               (((sbi)->s_mount_opt & ~NILFS_MOUNT_##mask) |           \
+                NILFS_MOUNT_##opt);                                    \
+       } while (0)
+
+#endif /* _NILFS_SB */
diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c
new file mode 100644 (file)
index 0000000..1e68821
--- /dev/null
@@ -0,0 +1,439 @@
+/*
+ * segbuf.c - NILFS segment buffer
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+
+#include <linux/buffer_head.h>
+#include <linux/writeback.h>
+#include <linux/crc32.h>
+#include "page.h"
+#include "segbuf.h"
+#include "seglist.h"
+
+
+static struct kmem_cache *nilfs_segbuf_cachep;
+
+static void nilfs_segbuf_init_once(void *obj)
+{
+       memset(obj, 0, sizeof(struct nilfs_segment_buffer));
+}
+
+int __init nilfs_init_segbuf_cache(void)
+{
+       nilfs_segbuf_cachep =
+               kmem_cache_create("nilfs2_segbuf_cache",
+                                 sizeof(struct nilfs_segment_buffer),
+                                 0, SLAB_RECLAIM_ACCOUNT,
+                                 nilfs_segbuf_init_once);
+
+       return (nilfs_segbuf_cachep == NULL) ? -ENOMEM : 0;
+}
+
+void nilfs_destroy_segbuf_cache(void)
+{
+       kmem_cache_destroy(nilfs_segbuf_cachep);
+}
+
+struct nilfs_segment_buffer *nilfs_segbuf_new(struct super_block *sb)
+{
+       struct nilfs_segment_buffer *segbuf;
+
+       segbuf = kmem_cache_alloc(nilfs_segbuf_cachep, GFP_NOFS);
+       if (unlikely(!segbuf))
+               return NULL;
+
+       segbuf->sb_super = sb;
+       INIT_LIST_HEAD(&segbuf->sb_list);
+       INIT_LIST_HEAD(&segbuf->sb_segsum_buffers);
+       INIT_LIST_HEAD(&segbuf->sb_payload_buffers);
+       return segbuf;
+}
+
+void nilfs_segbuf_free(struct nilfs_segment_buffer *segbuf)
+{
+       kmem_cache_free(nilfs_segbuf_cachep, segbuf);
+}
+
+void nilfs_segbuf_map(struct nilfs_segment_buffer *segbuf, __u64 segnum,
+                    unsigned long offset, struct the_nilfs *nilfs)
+{
+       segbuf->sb_segnum = segnum;
+       nilfs_get_segment_range(nilfs, segnum, &segbuf->sb_fseg_start,
+                               &segbuf->sb_fseg_end);
+
+       segbuf->sb_pseg_start = segbuf->sb_fseg_start + offset;
+       segbuf->sb_rest_blocks =
+               segbuf->sb_fseg_end - segbuf->sb_pseg_start + 1;
+}
+
+void nilfs_segbuf_set_next_segnum(struct nilfs_segment_buffer *segbuf,
+                                 __u64 nextnum, struct the_nilfs *nilfs)
+{
+       segbuf->sb_nextnum = nextnum;
+       segbuf->sb_sum.next = nilfs_get_segment_start_blocknr(nilfs, nextnum);
+}
+
+int nilfs_segbuf_extend_segsum(struct nilfs_segment_buffer *segbuf)
+{
+       struct buffer_head *bh;
+
+       bh = sb_getblk(segbuf->sb_super,
+                      segbuf->sb_pseg_start + segbuf->sb_sum.nsumblk);
+       if (unlikely(!bh))
+               return -ENOMEM;
+
+       nilfs_segbuf_add_segsum_buffer(segbuf, bh);
+       return 0;
+}
+
+int nilfs_segbuf_extend_payload(struct nilfs_segment_buffer *segbuf,
+                               struct buffer_head **bhp)
+{
+       struct buffer_head *bh;
+
+       bh = sb_getblk(segbuf->sb_super,
+                      segbuf->sb_pseg_start + segbuf->sb_sum.nblocks);
+       if (unlikely(!bh))
+               return -ENOMEM;
+
+       nilfs_segbuf_add_payload_buffer(segbuf, bh);
+       *bhp = bh;
+       return 0;
+}
+
+int nilfs_segbuf_reset(struct nilfs_segment_buffer *segbuf, unsigned flags,
+                      time_t ctime)
+{
+       int err;
+
+       segbuf->sb_sum.nblocks = segbuf->sb_sum.nsumblk = 0;
+       err = nilfs_segbuf_extend_segsum(segbuf);
+       if (unlikely(err))
+               return err;
+
+       segbuf->sb_sum.flags = flags;
+       segbuf->sb_sum.sumbytes = sizeof(struct nilfs_segment_summary);
+       segbuf->sb_sum.nfinfo = segbuf->sb_sum.nfileblk = 0;
+       segbuf->sb_sum.ctime = ctime;
+
+       segbuf->sb_io_error = 0;
+       return 0;
+}
+
+/*
+ * Setup segument summary
+ */
+void nilfs_segbuf_fill_in_segsum(struct nilfs_segment_buffer *segbuf)
+{
+       struct nilfs_segment_summary *raw_sum;
+       struct buffer_head *bh_sum;
+
+       bh_sum = list_entry(segbuf->sb_segsum_buffers.next,
+                           struct buffer_head, b_assoc_buffers);
+       raw_sum = (struct nilfs_segment_summary *)bh_sum->b_data;
+
+       raw_sum->ss_magic    = cpu_to_le32(NILFS_SEGSUM_MAGIC);
+       raw_sum->ss_bytes    = cpu_to_le16(sizeof(*raw_sum));
+       raw_sum->ss_flags    = cpu_to_le16(segbuf->sb_sum.flags);
+       raw_sum->ss_seq      = cpu_to_le64(segbuf->sb_sum.seg_seq);
+       raw_sum->ss_create   = cpu_to_le64(segbuf->sb_sum.ctime);
+       raw_sum->ss_next     = cpu_to_le64(segbuf->sb_sum.next);
+       raw_sum->ss_nblocks  = cpu_to_le32(segbuf->sb_sum.nblocks);
+       raw_sum->ss_nfinfo   = cpu_to_le32(segbuf->sb_sum.nfinfo);
+       raw_sum->ss_sumbytes = cpu_to_le32(segbuf->sb_sum.sumbytes);
+       raw_sum->ss_pad      = 0;
+}
+
+/*
+ * CRC calculation routines
+ */
+void nilfs_segbuf_fill_in_segsum_crc(struct nilfs_segment_buffer *segbuf,
+                                    u32 seed)
+{
+       struct buffer_head *bh;
+       struct nilfs_segment_summary *raw_sum;
+       unsigned long size, bytes = segbuf->sb_sum.sumbytes;
+       u32 crc;
+
+       bh = list_entry(segbuf->sb_segsum_buffers.next, struct buffer_head,
+                       b_assoc_buffers);
+
+       raw_sum = (struct nilfs_segment_summary *)bh->b_data;
+       size = min_t(unsigned long, bytes, bh->b_size);
+       crc = crc32_le(seed,
+                      (unsigned char *)raw_sum +
+                      sizeof(raw_sum->ss_datasum) + sizeof(raw_sum->ss_sumsum),
+                      size - (sizeof(raw_sum->ss_datasum) +
+                              sizeof(raw_sum->ss_sumsum)));
+
+       list_for_each_entry_continue(bh, &segbuf->sb_segsum_buffers,
+                                    b_assoc_buffers) {
+               bytes -= size;
+               size = min_t(unsigned long, bytes, bh->b_size);
+               crc = crc32_le(crc, bh->b_data, size);
+       }
+       raw_sum->ss_sumsum = cpu_to_le32(crc);
+}
+
+void nilfs_segbuf_fill_in_data_crc(struct nilfs_segment_buffer *segbuf,
+                                  u32 seed)
+{
+       struct buffer_head *bh;
+       struct nilfs_segment_summary *raw_sum;
+       void *kaddr;
+       u32 crc;
+
+       bh = list_entry(segbuf->sb_segsum_buffers.next, struct buffer_head,
+                       b_assoc_buffers);
+       raw_sum = (struct nilfs_segment_summary *)bh->b_data;
+       crc = crc32_le(seed,
+                      (unsigned char *)raw_sum + sizeof(raw_sum->ss_datasum),
+                      bh->b_size - sizeof(raw_sum->ss_datasum));
+
+       list_for_each_entry_continue(bh, &segbuf->sb_segsum_buffers,
+                                    b_assoc_buffers) {
+               crc = crc32_le(crc, bh->b_data, bh->b_size);
+       }
+       list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) {
+               kaddr = kmap_atomic(bh->b_page, KM_USER0);
+               crc = crc32_le(crc, kaddr + bh_offset(bh), bh->b_size);
+               kunmap_atomic(kaddr, KM_USER0);
+       }
+       raw_sum->ss_datasum = cpu_to_le32(crc);
+}
+
+void nilfs_release_buffers(struct list_head *list)
+{
+       struct buffer_head *bh, *n;
+
+       list_for_each_entry_safe(bh, n, list, b_assoc_buffers) {
+               list_del_init(&bh->b_assoc_buffers);
+               if (buffer_nilfs_allocated(bh)) {
+                       struct page *clone_page = bh->b_page;
+
+                       /* remove clone page */
+                       brelse(bh);
+                       page_cache_release(clone_page); /* for each bh */
+                       if (page_count(clone_page) <= 2) {
+                               lock_page(clone_page);
+                               nilfs_free_private_page(clone_page);
+                       }
+                       continue;
+               }
+               brelse(bh);
+       }
+}
+
+/*
+ * BIO operations
+ */
+static void nilfs_end_bio_write(struct bio *bio, int err)
+{
+       const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
+       struct nilfs_write_info *wi = bio->bi_private;
+
+       if (err == -EOPNOTSUPP) {
+               set_bit(BIO_EOPNOTSUPP, &bio->bi_flags);
+               bio_put(bio);
+               /* to be detected by submit_seg_bio() */
+       }
+
+       if (!uptodate)
+               atomic_inc(&wi->err);
+
+       bio_put(bio);
+       complete(&wi->bio_event);
+}
+
+static int nilfs_submit_seg_bio(struct nilfs_write_info *wi, int mode)
+{
+       struct bio *bio = wi->bio;
+       int err;
+
+       if (wi->nbio > 0 && bdi_write_congested(wi->bdi)) {
+               wait_for_completion(&wi->bio_event);
+               wi->nbio--;
+               if (unlikely(atomic_read(&wi->err))) {
+                       bio_put(bio);
+                       err = -EIO;
+                       goto failed;
+               }
+       }
+
+       bio->bi_end_io = nilfs_end_bio_write;
+       bio->bi_private = wi;
+       bio_get(bio);
+       submit_bio(mode, bio);
+       if (bio_flagged(bio, BIO_EOPNOTSUPP)) {
+               bio_put(bio);
+               err = -EOPNOTSUPP;
+               goto failed;
+       }
+       wi->nbio++;
+       bio_put(bio);
+
+       wi->bio = NULL;
+       wi->rest_blocks -= wi->end - wi->start;
+       wi->nr_vecs = min(wi->max_pages, wi->rest_blocks);
+       wi->start = wi->end;
+       return 0;
+
+ failed:
+       wi->bio = NULL;
+       return err;
+}
+
+/**
+ * nilfs_alloc_seg_bio - allocate a bio for writing segment.
+ * @sb: super block
+ * @start: beginning disk block number of this BIO.
+ * @nr_vecs: request size of page vector.
+ *
+ * alloc_seg_bio() allocates a new BIO structure and initialize it.
+ *
+ * Return Value: On success, pointer to the struct bio is returned.
+ * On error, NULL is returned.
+ */
+static struct bio *nilfs_alloc_seg_bio(struct super_block *sb, sector_t start,
+                                      int nr_vecs)
+{
+       struct bio *bio;
+
+       bio = bio_alloc(GFP_NOWAIT, nr_vecs);
+       if (bio == NULL) {
+               while (!bio && (nr_vecs >>= 1))
+                       bio = bio_alloc(GFP_NOWAIT, nr_vecs);
+       }
+       if (likely(bio)) {
+               bio->bi_bdev = sb->s_bdev;
+               bio->bi_sector = (sector_t)start << (sb->s_blocksize_bits - 9);
+       }
+       return bio;
+}
+
+void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *segbuf,
+                               struct nilfs_write_info *wi)
+{
+       wi->bio = NULL;
+       wi->rest_blocks = segbuf->sb_sum.nblocks;
+       wi->max_pages = bio_get_nr_vecs(wi->sb->s_bdev);
+       wi->nr_vecs = min(wi->max_pages, wi->rest_blocks);
+       wi->start = wi->end = 0;
+       wi->nbio = 0;
+       wi->blocknr = segbuf->sb_pseg_start;
+
+       atomic_set(&wi->err, 0);
+       init_completion(&wi->bio_event);
+}
+
+static int nilfs_submit_bh(struct nilfs_write_info *wi, struct buffer_head *bh,
+                          int mode)
+{
+       int len, err;
+
+       BUG_ON(wi->nr_vecs <= 0);
+ repeat:
+       if (!wi->bio) {
+               wi->bio = nilfs_alloc_seg_bio(wi->sb, wi->blocknr + wi->end,
+                                             wi->nr_vecs);
+               if (unlikely(!wi->bio))
+                       return -ENOMEM;
+       }
+
+       len = bio_add_page(wi->bio, bh->b_page, bh->b_size, bh_offset(bh));
+       if (len == bh->b_size) {
+               wi->end++;
+               return 0;
+       }
+       /* bio is FULL */
+       err = nilfs_submit_seg_bio(wi, mode);
+       /* never submit current bh */
+       if (likely(!err))
+               goto repeat;
+       return err;
+}
+
+int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf,
+                      struct nilfs_write_info *wi)
+{
+       struct buffer_head *bh;
+       int res, rw = WRITE;
+
+       list_for_each_entry(bh, &segbuf->sb_segsum_buffers, b_assoc_buffers) {
+               res = nilfs_submit_bh(wi, bh, rw);
+               if (unlikely(res))
+                       goto failed_bio;
+       }
+
+       list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) {
+               res = nilfs_submit_bh(wi, bh, rw);
+               if (unlikely(res))
+                       goto failed_bio;
+       }
+
+       if (wi->bio) {
+               /*
+                * Last BIO is always sent through the following
+                * submission.
+                */
+               rw |= (1 << BIO_RW_SYNCIO);
+               res = nilfs_submit_seg_bio(wi, rw);
+               if (unlikely(res))
+                       goto failed_bio;
+       }
+
+       res = 0;
+ out:
+       return res;
+
+ failed_bio:
+       atomic_inc(&wi->err);
+       goto out;
+}
+
+/**
+ * nilfs_segbuf_wait - wait for completion of requested BIOs
+ * @wi: nilfs_write_info
+ *
+ * Return Value: On Success, 0 is returned. On Error, one of the following
+ * negative error code is returned.
+ *
+ * %-EIO - I/O error
+ */
+int nilfs_segbuf_wait(struct nilfs_segment_buffer *segbuf,
+                     struct nilfs_write_info *wi)
+{
+       int err = 0;
+
+       if (!wi->nbio)
+               return 0;
+
+       do {
+               wait_for_completion(&wi->bio_event);
+       } while (--wi->nbio > 0);
+
+       if (unlikely(atomic_read(&wi->err) > 0)) {
+               printk(KERN_ERR "NILFS: IO error writing segment\n");
+               err = -EIO;
+               segbuf->sb_io_error = 1;
+       }
+       return err;
+}
diff --git a/fs/nilfs2/segbuf.h b/fs/nilfs2/segbuf.h
new file mode 100644 (file)
index 0000000..0c3076f
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * segbuf.h - NILFS Segment buffer prototypes and definitions
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+#ifndef _NILFS_SEGBUF_H
+#define _NILFS_SEGBUF_H
+
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/bio.h>
+#include <linux/completion.h>
+#include <linux/backing-dev.h>
+
+/**
+ * struct nilfs_segsum_info - On-memory segment summary
+ * @flags: Flags
+ * @nfinfo: Number of file information structures
+ * @nblocks: Number of blocks included in the partial segment
+ * @nsumblk: Number of summary blocks
+ * @sumbytes: Byte count of segment summary
+ * @nfileblk: Total number of file blocks
+ * @seg_seq: Segment sequence number
+ * @ctime: Creation time
+ * @next: Block number of the next full segment
+ */
+struct nilfs_segsum_info {
+       unsigned int            flags;
+       unsigned long           nfinfo;
+       unsigned long           nblocks;
+       unsigned long           nsumblk;
+       unsigned long           sumbytes;
+       unsigned long           nfileblk;
+       u64                     seg_seq;
+       time_t                  ctime;
+       sector_t                next;
+};
+
+/* macro for the flags */
+#define NILFS_SEG_HAS_SR(sum)    ((sum)->flags & NILFS_SS_SR)
+#define NILFS_SEG_LOGBGN(sum)    ((sum)->flags & NILFS_SS_LOGBGN)
+#define NILFS_SEG_LOGEND(sum)    ((sum)->flags & NILFS_SS_LOGEND)
+#define NILFS_SEG_DSYNC(sum)     ((sum)->flags & NILFS_SS_SYNDT)
+#define NILFS_SEG_SIMPLEX(sum) \
+       (((sum)->flags & (NILFS_SS_LOGBGN | NILFS_SS_LOGEND)) == \
+        (NILFS_SS_LOGBGN | NILFS_SS_LOGEND))
+
+#define NILFS_SEG_EMPTY(sum)   ((sum)->nblocks == (sum)->nsumblk)
+
+/**
+ * struct nilfs_segment_buffer - Segment buffer
+ * @sb_super: back pointer to a superblock struct
+ * @sb_list: List head to chain this structure
+ * @sb_sum: On-memory segment summary
+ * @sb_segnum: Index number of the full segment
+ * @sb_nextnum: Index number of the next full segment
+ * @sb_fseg_start: Start block number of the full segment
+ * @sb_fseg_end: End block number of the full segment
+ * @sb_pseg_start: Disk block number of partial segment
+ * @sb_rest_blocks: Number of residual blocks in the current segment
+ * @sb_segsum_buffers: List of buffers for segment summaries
+ * @sb_payload_buffers: List of buffers for segment payload
+ * @sb_io_error: I/O error status
+ */
+struct nilfs_segment_buffer {
+       struct super_block     *sb_super;
+       struct list_head        sb_list;
+
+       /* Segment information */
+       struct nilfs_segsum_info sb_sum;
+       __u64                   sb_segnum;
+       __u64                   sb_nextnum;
+       sector_t                sb_fseg_start, sb_fseg_end;
+       sector_t                sb_pseg_start;
+       unsigned                sb_rest_blocks;
+
+       /* Buffers */
+       struct list_head        sb_segsum_buffers;
+       struct list_head        sb_payload_buffers; /* including super root */
+
+       /* io status */
+       int                     sb_io_error;
+};
+
+#define NILFS_LIST_SEGBUF(head)  \
+       list_entry((head), struct nilfs_segment_buffer, sb_list)
+#define NILFS_NEXT_SEGBUF(segbuf)  NILFS_LIST_SEGBUF((segbuf)->sb_list.next)
+#define NILFS_PREV_SEGBUF(segbuf)  NILFS_LIST_SEGBUF((segbuf)->sb_list.prev)
+#define NILFS_LAST_SEGBUF(head)    NILFS_LIST_SEGBUF((head)->prev)
+#define NILFS_FIRST_SEGBUF(head)   NILFS_LIST_SEGBUF((head)->next)
+#define NILFS_SEGBUF_IS_LAST(segbuf, head)  ((segbuf)->sb_list.next == (head))
+
+#define nilfs_for_each_segbuf_before(s, t, h) \
+       for ((s) = NILFS_FIRST_SEGBUF(h); (s) != (t); \
+            (s) = NILFS_NEXT_SEGBUF(s))
+
+#define NILFS_SEGBUF_FIRST_BH(head)  \
+       (list_entry((head)->next, struct buffer_head, b_assoc_buffers))
+#define NILFS_SEGBUF_NEXT_BH(bh)  \
+       (list_entry((bh)->b_assoc_buffers.next, struct buffer_head, \
+                   b_assoc_buffers))
+#define NILFS_SEGBUF_BH_IS_LAST(bh, head)  ((bh)->b_assoc_buffers.next == head)
+
+
+int __init nilfs_init_segbuf_cache(void);
+void nilfs_destroy_segbuf_cache(void);
+struct nilfs_segment_buffer *nilfs_segbuf_new(struct super_block *);
+void nilfs_segbuf_free(struct nilfs_segment_buffer *);
+void nilfs_segbuf_map(struct nilfs_segment_buffer *, __u64, unsigned long,
+                     struct the_nilfs *);
+void nilfs_segbuf_set_next_segnum(struct nilfs_segment_buffer *, __u64,
+                                 struct the_nilfs *);
+int nilfs_segbuf_reset(struct nilfs_segment_buffer *, unsigned, time_t);
+int nilfs_segbuf_extend_segsum(struct nilfs_segment_buffer *);
+int nilfs_segbuf_extend_payload(struct nilfs_segment_buffer *,
+                               struct buffer_head **);
+void nilfs_segbuf_fill_in_segsum(struct nilfs_segment_buffer *);
+void nilfs_segbuf_fill_in_segsum_crc(struct nilfs_segment_buffer *, u32);
+void nilfs_segbuf_fill_in_data_crc(struct nilfs_segment_buffer *, u32);
+
+static inline void
+nilfs_segbuf_add_segsum_buffer(struct nilfs_segment_buffer *segbuf,
+                              struct buffer_head *bh)
+{
+       list_add_tail(&bh->b_assoc_buffers, &segbuf->sb_segsum_buffers);
+       segbuf->sb_sum.nblocks++;
+       segbuf->sb_sum.nsumblk++;
+}
+
+static inline void
+nilfs_segbuf_add_payload_buffer(struct nilfs_segment_buffer *segbuf,
+                               struct buffer_head *bh)
+{
+       list_add_tail(&bh->b_assoc_buffers, &segbuf->sb_payload_buffers);
+       segbuf->sb_sum.nblocks++;
+}
+
+static inline void
+nilfs_segbuf_add_file_buffer(struct nilfs_segment_buffer *segbuf,
+                            struct buffer_head *bh)
+{
+       get_bh(bh);
+       nilfs_segbuf_add_payload_buffer(segbuf, bh);
+       segbuf->sb_sum.nfileblk++;
+}
+
+void nilfs_release_buffers(struct list_head *);
+
+static inline void nilfs_segbuf_clear(struct nilfs_segment_buffer *segbuf)
+{
+       nilfs_release_buffers(&segbuf->sb_segsum_buffers);
+       nilfs_release_buffers(&segbuf->sb_payload_buffers);
+}
+
+struct nilfs_write_info {
+       struct bio             *bio;
+       int                     start, end; /* The region to be submitted */
+       int                     rest_blocks;
+       int                     max_pages;
+       int                     nr_vecs;
+       sector_t                blocknr;
+
+       int                     nbio;
+       atomic_t                err;
+       struct completion       bio_event;
+                               /* completion event of segment write */
+
+       /*
+        * The following fields must be set explicitly
+        */
+       struct super_block     *sb;
+       struct backing_dev_info *bdi; /* backing dev info */
+       struct buffer_head     *bh_sr;
+};
+
+
+void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *,
+                               struct nilfs_write_info *);
+int nilfs_segbuf_write(struct nilfs_segment_buffer *,
+                      struct nilfs_write_info *);
+int nilfs_segbuf_wait(struct nilfs_segment_buffer *,
+                     struct nilfs_write_info *);
+
+#endif /* _NILFS_SEGBUF_H */
diff --git a/fs/nilfs2/seglist.h b/fs/nilfs2/seglist.h
new file mode 100644 (file)
index 0000000..d39df91
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * seglist.h - expediential structure and routines to handle list of segments
+ *             (would be removed in a future release)
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+#ifndef _NILFS_SEGLIST_H
+#define _NILFS_SEGLIST_H
+
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/nilfs2_fs.h>
+#include "sufile.h"
+
+struct nilfs_segment_entry {
+       __u64                   segnum;
+
+#define NILFS_SLH_FREED                0x0001  /* The segment was freed provisonally.
+                                          It must be cancelled if
+                                          construction aborted */
+
+       unsigned                flags;
+       struct list_head        list;
+       struct buffer_head     *bh_su;
+       struct nilfs_segment_usage *raw_su;
+};
+
+
+void nilfs_dispose_segment_list(struct list_head *);
+
+static inline struct nilfs_segment_entry *
+nilfs_alloc_segment_entry(__u64 segnum)
+{
+       struct nilfs_segment_entry *ent = kmalloc(sizeof(*ent), GFP_NOFS);
+
+       if (likely(ent)) {
+               ent->segnum = segnum;
+               ent->flags = 0;
+               ent->bh_su = NULL;
+               ent->raw_su = NULL;
+               INIT_LIST_HEAD(&ent->list);
+       }
+       return ent;
+}
+
+static inline int nilfs_open_segment_entry(struct nilfs_segment_entry *ent,
+                                          struct inode *sufile)
+{
+       return nilfs_sufile_get_segment_usage(sufile, ent->segnum,
+                                             &ent->raw_su, &ent->bh_su);
+}
+
+static inline void nilfs_close_segment_entry(struct nilfs_segment_entry *ent,
+                                            struct inode *sufile)
+{
+       if (!ent->bh_su)
+               return;
+       nilfs_sufile_put_segment_usage(sufile, ent->segnum, ent->bh_su);
+       ent->bh_su = NULL;
+       ent->raw_su = NULL;
+}
+
+static inline void nilfs_free_segment_entry(struct nilfs_segment_entry *ent)
+{
+       kfree(ent);
+}
+
+#endif /* _NILFS_SEGLIST_H */
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
new file mode 100644 (file)
index 0000000..fb70ec3
--- /dev/null
@@ -0,0 +1,2977 @@
+/*
+ * segment.c - NILFS segment constructor.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+
+#include <linux/pagemap.h>
+#include <linux/buffer_head.h>
+#include <linux/writeback.h>
+#include <linux/bio.h>
+#include <linux/completion.h>
+#include <linux/blkdev.h>
+#include <linux/backing-dev.h>
+#include <linux/freezer.h>
+#include <linux/kthread.h>
+#include <linux/crc32.h>
+#include <linux/pagevec.h>
+#include "nilfs.h"
+#include "btnode.h"
+#include "page.h"
+#include "segment.h"
+#include "sufile.h"
+#include "cpfile.h"
+#include "ifile.h"
+#include "seglist.h"
+#include "segbuf.h"
+
+
+/*
+ * Segment constructor
+ */
+#define SC_N_INODEVEC  16   /* Size of locally allocated inode vector */
+
+#define SC_MAX_SEGDELTA 64   /* Upper limit of the number of segments
+                               appended in collection retry loop */
+
+/* Construction mode */
+enum {
+       SC_LSEG_SR = 1, /* Make a logical segment having a super root */
+       SC_LSEG_DSYNC,  /* Flush data blocks of a given file and make
+                          a logical segment without a super root */
+       SC_FLUSH_FILE,  /* Flush data files, leads to segment writes without
+                          creating a checkpoint */
+       SC_FLUSH_DAT,   /* Flush DAT file. This also creates segments without
+                          a checkpoint */
+};
+
+/* Stage numbers of dirty block collection */
+enum {
+       NILFS_ST_INIT = 0,
+       NILFS_ST_GC,            /* Collecting dirty blocks for GC */
+       NILFS_ST_FILE,
+       NILFS_ST_IFILE,
+       NILFS_ST_CPFILE,
+       NILFS_ST_SUFILE,
+       NILFS_ST_DAT,
+       NILFS_ST_SR,            /* Super root */
+       NILFS_ST_DSYNC,         /* Data sync blocks */
+       NILFS_ST_DONE,
+};
+
+/* State flags of collection */
+#define NILFS_CF_NODE          0x0001  /* Collecting node blocks */
+#define NILFS_CF_IFILE_STARTED 0x0002  /* IFILE stage has started */
+#define NILFS_CF_HISTORY_MASK  (NILFS_CF_IFILE_STARTED)
+
+/* Operations depending on the construction mode and file type */
+struct nilfs_sc_operations {
+       int (*collect_data)(struct nilfs_sc_info *, struct buffer_head *,
+                           struct inode *);
+       int (*collect_node)(struct nilfs_sc_info *, struct buffer_head *,
+                           struct inode *);
+       int (*collect_bmap)(struct nilfs_sc_info *, struct buffer_head *,
+                           struct inode *);
+       void (*write_data_binfo)(struct nilfs_sc_info *,
+                                struct nilfs_segsum_pointer *,
+                                union nilfs_binfo *);
+       void (*write_node_binfo)(struct nilfs_sc_info *,
+                                struct nilfs_segsum_pointer *,
+                                union nilfs_binfo *);
+};
+
+/*
+ * Other definitions
+ */
+static void nilfs_segctor_start_timer(struct nilfs_sc_info *);
+static void nilfs_segctor_do_flush(struct nilfs_sc_info *, int);
+static void nilfs_segctor_do_immediate_flush(struct nilfs_sc_info *);
+static void nilfs_dispose_list(struct nilfs_sb_info *, struct list_head *,
+                              int);
+
+#define nilfs_cnt32_gt(a, b)   \
+       (typecheck(__u32, a) && typecheck(__u32, b) && \
+        ((__s32)(b) - (__s32)(a) < 0))
+#define nilfs_cnt32_ge(a, b)   \
+       (typecheck(__u32, a) && typecheck(__u32, b) && \
+        ((__s32)(a) - (__s32)(b) >= 0))
+#define nilfs_cnt32_lt(a, b)  nilfs_cnt32_gt(b, a)
+#define nilfs_cnt32_le(a, b)  nilfs_cnt32_ge(b, a)
+
+/*
+ * Transaction
+ */
+static struct kmem_cache *nilfs_transaction_cachep;
+
+/**
+ * nilfs_init_transaction_cache - create a cache for nilfs_transaction_info
+ *
+ * nilfs_init_transaction_cache() creates a slab cache for the struct
+ * nilfs_transaction_info.
+ *
+ * Return Value: On success, it returns 0. On error, one of the following
+ * negative error code is returned.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ */
+int nilfs_init_transaction_cache(void)
+{
+       nilfs_transaction_cachep =
+               kmem_cache_create("nilfs2_transaction_cache",
+                                 sizeof(struct nilfs_transaction_info),
+                                 0, SLAB_RECLAIM_ACCOUNT, NULL);
+       return (nilfs_transaction_cachep == NULL) ? -ENOMEM : 0;
+}
+
+/**
+ * nilfs_detroy_transaction_cache - destroy the cache for transaction info
+ *
+ * nilfs_destroy_transaction_cache() frees the slab cache for the struct
+ * nilfs_transaction_info.
+ */
+void nilfs_destroy_transaction_cache(void)
+{
+       kmem_cache_destroy(nilfs_transaction_cachep);
+}
+
+static int nilfs_prepare_segment_lock(struct nilfs_transaction_info *ti)
+{
+       struct nilfs_transaction_info *cur_ti = current->journal_info;
+       void *save = NULL;
+
+       if (cur_ti) {
+               if (cur_ti->ti_magic == NILFS_TI_MAGIC)
+                       return ++cur_ti->ti_count;
+               else {
+                       /*
+                        * If journal_info field is occupied by other FS,
+                        * it is saved and will be restored on
+                        * nilfs_transaction_commit().
+                        */
+                       printk(KERN_WARNING
+                              "NILFS warning: journal info from a different "
+                              "FS\n");
+                       save = current->journal_info;
+               }
+       }
+       if (!ti) {
+               ti = kmem_cache_alloc(nilfs_transaction_cachep, GFP_NOFS);
+               if (!ti)
+                       return -ENOMEM;
+               ti->ti_flags = NILFS_TI_DYNAMIC_ALLOC;
+       } else {
+               ti->ti_flags = 0;
+       }
+       ti->ti_count = 0;
+       ti->ti_save = save;
+       ti->ti_magic = NILFS_TI_MAGIC;
+       current->journal_info = ti;
+       return 0;
+}
+
+/**
+ * nilfs_transaction_begin - start indivisible file operations.
+ * @sb: super block
+ * @ti: nilfs_transaction_info
+ * @vacancy_check: flags for vacancy rate checks
+ *
+ * nilfs_transaction_begin() acquires a reader/writer semaphore, called
+ * the segment semaphore, to make a segment construction and write tasks
+ * exclusive.  The function is used with nilfs_transaction_commit() in pairs.
+ * The region enclosed by these two functions can be nested.  To avoid a
+ * deadlock, the semaphore is only acquired or released in the outermost call.
+ *
+ * This function allocates a nilfs_transaction_info struct to keep context
+ * information on it.  It is initialized and hooked onto the current task in
+ * the outermost call.  If a pre-allocated struct is given to @ti, it is used
+ * instead; othewise a new struct is assigned from a slab.
+ *
+ * When @vacancy_check flag is set, this function will check the amount of
+ * free space, and will wait for the GC to reclaim disk space if low capacity.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error code is returned.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ *
+ * %-ENOSPC - No space left on device
+ */
+int nilfs_transaction_begin(struct super_block *sb,
+                           struct nilfs_transaction_info *ti,
+                           int vacancy_check)
+{
+       struct nilfs_sb_info *sbi;
+       struct the_nilfs *nilfs;
+       int ret = nilfs_prepare_segment_lock(ti);
+
+       if (unlikely(ret < 0))
+               return ret;
+       if (ret > 0)
+               return 0;
+
+       sbi = NILFS_SB(sb);
+       nilfs = sbi->s_nilfs;
+       down_read(&nilfs->ns_segctor_sem);
+       if (vacancy_check && nilfs_near_disk_full(nilfs)) {
+               up_read(&nilfs->ns_segctor_sem);
+               ret = -ENOSPC;
+               goto failed;
+       }
+       return 0;
+
+ failed:
+       ti = current->journal_info;
+       current->journal_info = ti->ti_save;
+       if (ti->ti_flags & NILFS_TI_DYNAMIC_ALLOC)
+               kmem_cache_free(nilfs_transaction_cachep, ti);
+       return ret;
+}
+
+/**
+ * nilfs_transaction_commit - commit indivisible file operations.
+ * @sb: super block
+ *
+ * nilfs_transaction_commit() releases the read semaphore which is
+ * acquired by nilfs_transaction_begin(). This is only performed
+ * in outermost call of this function.  If a commit flag is set,
+ * nilfs_transaction_commit() sets a timer to start the segment
+ * constructor.  If a sync flag is set, it starts construction
+ * directly.
+ */
+int nilfs_transaction_commit(struct super_block *sb)
+{
+       struct nilfs_transaction_info *ti = current->journal_info;
+       struct nilfs_sb_info *sbi;
+       struct nilfs_sc_info *sci;
+       int err = 0;
+
+       BUG_ON(ti == NULL || ti->ti_magic != NILFS_TI_MAGIC);
+       ti->ti_flags |= NILFS_TI_COMMIT;
+       if (ti->ti_count > 0) {
+               ti->ti_count--;
+               return 0;
+       }
+       sbi = NILFS_SB(sb);
+       sci = NILFS_SC(sbi);
+       if (sci != NULL) {
+               if (ti->ti_flags & NILFS_TI_COMMIT)
+                       nilfs_segctor_start_timer(sci);
+               if (atomic_read(&sbi->s_nilfs->ns_ndirtyblks) >
+                   sci->sc_watermark)
+                       nilfs_segctor_do_flush(sci, 0);
+       }
+       up_read(&sbi->s_nilfs->ns_segctor_sem);
+       current->journal_info = ti->ti_save;
+
+       if (ti->ti_flags & NILFS_TI_SYNC)
+               err = nilfs_construct_segment(sb);
+       if (ti->ti_flags & NILFS_TI_DYNAMIC_ALLOC)
+               kmem_cache_free(nilfs_transaction_cachep, ti);
+       return err;
+}
+
+void nilfs_transaction_abort(struct super_block *sb)
+{
+       struct nilfs_transaction_info *ti = current->journal_info;
+
+       BUG_ON(ti == NULL || ti->ti_magic != NILFS_TI_MAGIC);
+       if (ti->ti_count > 0) {
+               ti->ti_count--;
+               return;
+       }
+       up_read(&NILFS_SB(sb)->s_nilfs->ns_segctor_sem);
+
+       current->journal_info = ti->ti_save;
+       if (ti->ti_flags & NILFS_TI_DYNAMIC_ALLOC)
+               kmem_cache_free(nilfs_transaction_cachep, ti);
+}
+
+void nilfs_relax_pressure_in_lock(struct super_block *sb)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct nilfs_sc_info *sci = NILFS_SC(sbi);
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+
+       if (!sci || !sci->sc_flush_request)
+               return;
+
+       set_bit(NILFS_SC_PRIOR_FLUSH, &sci->sc_flags);
+       up_read(&nilfs->ns_segctor_sem);
+
+       down_write(&nilfs->ns_segctor_sem);
+       if (sci->sc_flush_request &&
+           test_bit(NILFS_SC_PRIOR_FLUSH, &sci->sc_flags)) {
+               struct nilfs_transaction_info *ti = current->journal_info;
+
+               ti->ti_flags |= NILFS_TI_WRITER;
+               nilfs_segctor_do_immediate_flush(sci);
+               ti->ti_flags &= ~NILFS_TI_WRITER;
+       }
+       downgrade_write(&nilfs->ns_segctor_sem);
+}
+
+static void nilfs_transaction_lock(struct nilfs_sb_info *sbi,
+                                  struct nilfs_transaction_info *ti,
+                                  int gcflag)
+{
+       struct nilfs_transaction_info *cur_ti = current->journal_info;
+
+       WARN_ON(cur_ti);
+       ti->ti_flags = NILFS_TI_WRITER;
+       ti->ti_count = 0;
+       ti->ti_save = cur_ti;
+       ti->ti_magic = NILFS_TI_MAGIC;
+       INIT_LIST_HEAD(&ti->ti_garbage);
+       current->journal_info = ti;
+
+       for (;;) {
+               down_write(&sbi->s_nilfs->ns_segctor_sem);
+               if (!test_bit(NILFS_SC_PRIOR_FLUSH, &NILFS_SC(sbi)->sc_flags))
+                       break;
+
+               nilfs_segctor_do_immediate_flush(NILFS_SC(sbi));
+
+               up_write(&sbi->s_nilfs->ns_segctor_sem);
+               yield();
+       }
+       if (gcflag)
+               ti->ti_flags |= NILFS_TI_GC;
+}
+
+static void nilfs_transaction_unlock(struct nilfs_sb_info *sbi)
+{
+       struct nilfs_transaction_info *ti = current->journal_info;
+
+       BUG_ON(ti == NULL || ti->ti_magic != NILFS_TI_MAGIC);
+       BUG_ON(ti->ti_count > 0);
+
+       up_write(&sbi->s_nilfs->ns_segctor_sem);
+       current->journal_info = ti->ti_save;
+       if (!list_empty(&ti->ti_garbage))
+               nilfs_dispose_list(sbi, &ti->ti_garbage, 0);
+}
+
+static void *nilfs_segctor_map_segsum_entry(struct nilfs_sc_info *sci,
+                                           struct nilfs_segsum_pointer *ssp,
+                                           unsigned bytes)
+{
+       struct nilfs_segment_buffer *segbuf = sci->sc_curseg;
+       unsigned blocksize = sci->sc_super->s_blocksize;
+       void *p;
+
+       if (unlikely(ssp->offset + bytes > blocksize)) {
+               ssp->offset = 0;
+               BUG_ON(NILFS_SEGBUF_BH_IS_LAST(ssp->bh,
+                                              &segbuf->sb_segsum_buffers));
+               ssp->bh = NILFS_SEGBUF_NEXT_BH(ssp->bh);
+       }
+       p = ssp->bh->b_data + ssp->offset;
+       ssp->offset += bytes;
+       return p;
+}
+
+/**
+ * nilfs_segctor_reset_segment_buffer - reset the current segment buffer
+ * @sci: nilfs_sc_info
+ */
+static int nilfs_segctor_reset_segment_buffer(struct nilfs_sc_info *sci)
+{
+       struct nilfs_segment_buffer *segbuf = sci->sc_curseg;
+       struct buffer_head *sumbh;
+       unsigned sumbytes;
+       unsigned flags = 0;
+       int err;
+
+       if (nilfs_doing_gc())
+               flags = NILFS_SS_GC;
+       err = nilfs_segbuf_reset(segbuf, flags, sci->sc_seg_ctime);
+       if (unlikely(err))
+               return err;
+
+       sumbh = NILFS_SEGBUF_FIRST_BH(&segbuf->sb_segsum_buffers);
+       sumbytes = segbuf->sb_sum.sumbytes;
+       sci->sc_finfo_ptr.bh = sumbh;  sci->sc_finfo_ptr.offset = sumbytes;
+       sci->sc_binfo_ptr.bh = sumbh;  sci->sc_binfo_ptr.offset = sumbytes;
+       sci->sc_blk_cnt = sci->sc_datablk_cnt = 0;
+       return 0;
+}
+
+static int nilfs_segctor_feed_segment(struct nilfs_sc_info *sci)
+{
+       sci->sc_nblk_this_inc += sci->sc_curseg->sb_sum.nblocks;
+       if (NILFS_SEGBUF_IS_LAST(sci->sc_curseg, &sci->sc_segbufs))
+               return -E2BIG; /* The current segment is filled up
+                                 (internal code) */
+       sci->sc_curseg = NILFS_NEXT_SEGBUF(sci->sc_curseg);
+       return nilfs_segctor_reset_segment_buffer(sci);
+}
+
+static int nilfs_segctor_add_super_root(struct nilfs_sc_info *sci)
+{
+       struct nilfs_segment_buffer *segbuf = sci->sc_curseg;
+       int err;
+
+       if (segbuf->sb_sum.nblocks >= segbuf->sb_rest_blocks) {
+               err = nilfs_segctor_feed_segment(sci);
+               if (err)
+                       return err;
+               segbuf = sci->sc_curseg;
+       }
+       err = nilfs_segbuf_extend_payload(segbuf, &sci->sc_super_root);
+       if (likely(!err))
+               segbuf->sb_sum.flags |= NILFS_SS_SR;
+       return err;
+}
+
+/*
+ * Functions for making segment summary and payloads
+ */
+static int nilfs_segctor_segsum_block_required(
+       struct nilfs_sc_info *sci, const struct nilfs_segsum_pointer *ssp,
+       unsigned binfo_size)
+{
+       unsigned blocksize = sci->sc_super->s_blocksize;
+       /* Size of finfo and binfo is enough small against blocksize */
+
+       return ssp->offset + binfo_size +
+               (!sci->sc_blk_cnt ? sizeof(struct nilfs_finfo) : 0) >
+               blocksize;
+}
+
+static void nilfs_segctor_begin_finfo(struct nilfs_sc_info *sci,
+                                     struct inode *inode)
+{
+       sci->sc_curseg->sb_sum.nfinfo++;
+       sci->sc_binfo_ptr = sci->sc_finfo_ptr;
+       nilfs_segctor_map_segsum_entry(
+               sci, &sci->sc_binfo_ptr, sizeof(struct nilfs_finfo));
+
+       if (inode->i_sb && !test_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags))
+               set_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags);
+       /* skip finfo */
+}
+
+static void nilfs_segctor_end_finfo(struct nilfs_sc_info *sci,
+                                   struct inode *inode)
+{
+       struct nilfs_finfo *finfo;
+       struct nilfs_inode_info *ii;
+       struct nilfs_segment_buffer *segbuf;
+
+       if (sci->sc_blk_cnt == 0)
+               return;
+
+       ii = NILFS_I(inode);
+       finfo = nilfs_segctor_map_segsum_entry(sci, &sci->sc_finfo_ptr,
+                                                sizeof(*finfo));
+       finfo->fi_ino = cpu_to_le64(inode->i_ino);
+       finfo->fi_nblocks = cpu_to_le32(sci->sc_blk_cnt);
+       finfo->fi_ndatablk = cpu_to_le32(sci->sc_datablk_cnt);
+       finfo->fi_cno = cpu_to_le64(ii->i_cno);
+
+       segbuf = sci->sc_curseg;
+       segbuf->sb_sum.sumbytes = sci->sc_binfo_ptr.offset +
+               sci->sc_super->s_blocksize * (segbuf->sb_sum.nsumblk - 1);
+       sci->sc_finfo_ptr = sci->sc_binfo_ptr;
+       sci->sc_blk_cnt = sci->sc_datablk_cnt = 0;
+}
+
+static int nilfs_segctor_add_file_block(struct nilfs_sc_info *sci,
+                                       struct buffer_head *bh,
+                                       struct inode *inode,
+                                       unsigned binfo_size)
+{
+       struct nilfs_segment_buffer *segbuf;
+       int required, err = 0;
+
+ retry:
+       segbuf = sci->sc_curseg;
+       required = nilfs_segctor_segsum_block_required(
+               sci, &sci->sc_binfo_ptr, binfo_size);
+       if (segbuf->sb_sum.nblocks + required + 1 > segbuf->sb_rest_blocks) {
+               nilfs_segctor_end_finfo(sci, inode);
+               err = nilfs_segctor_feed_segment(sci);
+               if (err)
+                       return err;
+               goto retry;
+       }
+       if (unlikely(required)) {
+               err = nilfs_segbuf_extend_segsum(segbuf);
+               if (unlikely(err))
+                       goto failed;
+       }
+       if (sci->sc_blk_cnt == 0)
+               nilfs_segctor_begin_finfo(sci, inode);
+
+       nilfs_segctor_map_segsum_entry(sci, &sci->sc_binfo_ptr, binfo_size);
+       /* Substitution to vblocknr is delayed until update_blocknr() */
+       nilfs_segbuf_add_file_buffer(segbuf, bh);
+       sci->sc_blk_cnt++;
+ failed:
+       return err;
+}
+
+static int nilfs_handle_bmap_error(int err, const char *fname,
+                                  struct inode *inode, struct super_block *sb)
+{
+       if (err == -EINVAL) {
+               nilfs_error(sb, fname, "broken bmap (inode=%lu)\n",
+                           inode->i_ino);
+               err = -EIO;
+       }
+       return err;
+}
+
+/*
+ * Callback functions that enumerate, mark, and collect dirty blocks
+ */
+static int nilfs_collect_file_data(struct nilfs_sc_info *sci,
+                                  struct buffer_head *bh, struct inode *inode)
+{
+       int err;
+
+       err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh);
+       if (unlikely(err < 0))
+               return nilfs_handle_bmap_error(err, __func__, inode,
+                                              sci->sc_super);
+
+       err = nilfs_segctor_add_file_block(sci, bh, inode,
+                                          sizeof(struct nilfs_binfo_v));
+       if (!err)
+               sci->sc_datablk_cnt++;
+       return err;
+}
+
+static int nilfs_collect_file_node(struct nilfs_sc_info *sci,
+                                  struct buffer_head *bh,
+                                  struct inode *inode)
+{
+       int err;
+
+       err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh);
+       if (unlikely(err < 0))
+               return nilfs_handle_bmap_error(err, __func__, inode,
+                                              sci->sc_super);
+       return 0;
+}
+
+static int nilfs_collect_file_bmap(struct nilfs_sc_info *sci,
+                                  struct buffer_head *bh,
+                                  struct inode *inode)
+{
+       WARN_ON(!buffer_dirty(bh));
+       return nilfs_segctor_add_file_block(sci, bh, inode, sizeof(__le64));
+}
+
+static void nilfs_write_file_data_binfo(struct nilfs_sc_info *sci,
+                                       struct nilfs_segsum_pointer *ssp,
+                                       union nilfs_binfo *binfo)
+{
+       struct nilfs_binfo_v *binfo_v = nilfs_segctor_map_segsum_entry(
+               sci, ssp, sizeof(*binfo_v));
+       *binfo_v = binfo->bi_v;
+}
+
+static void nilfs_write_file_node_binfo(struct nilfs_sc_info *sci,
+                                       struct nilfs_segsum_pointer *ssp,
+                                       union nilfs_binfo *binfo)
+{
+       __le64 *vblocknr = nilfs_segctor_map_segsum_entry(
+               sci, ssp, sizeof(*vblocknr));
+       *vblocknr = binfo->bi_v.bi_vblocknr;
+}
+
+struct nilfs_sc_operations nilfs_sc_file_ops = {
+       .collect_data = nilfs_collect_file_data,
+       .collect_node = nilfs_collect_file_node,
+       .collect_bmap = nilfs_collect_file_bmap,
+       .write_data_binfo = nilfs_write_file_data_binfo,
+       .write_node_binfo = nilfs_write_file_node_binfo,
+};
+
+static int nilfs_collect_dat_data(struct nilfs_sc_info *sci,
+                                 struct buffer_head *bh, struct inode *inode)
+{
+       int err;
+
+       err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh);
+       if (unlikely(err < 0))
+               return nilfs_handle_bmap_error(err, __func__, inode,
+                                              sci->sc_super);
+
+       err = nilfs_segctor_add_file_block(sci, bh, inode, sizeof(__le64));
+       if (!err)
+               sci->sc_datablk_cnt++;
+       return err;
+}
+
+static int nilfs_collect_dat_bmap(struct nilfs_sc_info *sci,
+                                 struct buffer_head *bh, struct inode *inode)
+{
+       WARN_ON(!buffer_dirty(bh));
+       return nilfs_segctor_add_file_block(sci, bh, inode,
+                                           sizeof(struct nilfs_binfo_dat));
+}
+
+static void nilfs_write_dat_data_binfo(struct nilfs_sc_info *sci,
+                                      struct nilfs_segsum_pointer *ssp,
+                                      union nilfs_binfo *binfo)
+{
+       __le64 *blkoff = nilfs_segctor_map_segsum_entry(sci, ssp,
+                                                         sizeof(*blkoff));
+       *blkoff = binfo->bi_dat.bi_blkoff;
+}
+
+static void nilfs_write_dat_node_binfo(struct nilfs_sc_info *sci,
+                                      struct nilfs_segsum_pointer *ssp,
+                                      union nilfs_binfo *binfo)
+{
+       struct nilfs_binfo_dat *binfo_dat =
+               nilfs_segctor_map_segsum_entry(sci, ssp, sizeof(*binfo_dat));
+       *binfo_dat = binfo->bi_dat;
+}
+
+struct nilfs_sc_operations nilfs_sc_dat_ops = {
+       .collect_data = nilfs_collect_dat_data,
+       .collect_node = nilfs_collect_file_node,
+       .collect_bmap = nilfs_collect_dat_bmap,
+       .write_data_binfo = nilfs_write_dat_data_binfo,
+       .write_node_binfo = nilfs_write_dat_node_binfo,
+};
+
+struct nilfs_sc_operations nilfs_sc_dsync_ops = {
+       .collect_data = nilfs_collect_file_data,
+       .collect_node = NULL,
+       .collect_bmap = NULL,
+       .write_data_binfo = nilfs_write_file_data_binfo,
+       .write_node_binfo = NULL,
+};
+
+static size_t nilfs_lookup_dirty_data_buffers(struct inode *inode,
+                                             struct list_head *listp,
+                                             size_t nlimit,
+                                             loff_t start, loff_t end)
+{
+       struct address_space *mapping = inode->i_mapping;
+       struct pagevec pvec;
+       pgoff_t index = 0, last = ULONG_MAX;
+       size_t ndirties = 0;
+       int i;
+
+       if (unlikely(start != 0 || end != LLONG_MAX)) {
+               /*
+                * A valid range is given for sync-ing data pages. The
+                * range is rounded to per-page; extra dirty buffers
+                * may be included if blocksize < pagesize.
+                */
+               index = start >> PAGE_SHIFT;
+               last = end >> PAGE_SHIFT;
+       }
+       pagevec_init(&pvec, 0);
+ repeat:
+       if (unlikely(index > last) ||
+           !pagevec_lookup_tag(&pvec, mapping, &index, PAGECACHE_TAG_DIRTY,
+                               min_t(pgoff_t, last - index,
+                                     PAGEVEC_SIZE - 1) + 1))
+               return ndirties;
+
+       for (i = 0; i < pagevec_count(&pvec); i++) {
+               struct buffer_head *bh, *head;
+               struct page *page = pvec.pages[i];
+
+               if (unlikely(page->index > last))
+                       break;
+
+               if (mapping->host) {
+                       lock_page(page);
+                       if (!page_has_buffers(page))
+                               create_empty_buffers(page,
+                                                    1 << inode->i_blkbits, 0);
+                       unlock_page(page);
+               }
+
+               bh = head = page_buffers(page);
+               do {
+                       if (!buffer_dirty(bh))
+                               continue;
+                       get_bh(bh);
+                       list_add_tail(&bh->b_assoc_buffers, listp);
+                       ndirties++;
+                       if (unlikely(ndirties >= nlimit)) {
+                               pagevec_release(&pvec);
+                               cond_resched();
+                               return ndirties;
+                       }
+               } while (bh = bh->b_this_page, bh != head);
+       }
+       pagevec_release(&pvec);
+       cond_resched();
+       goto repeat;
+}
+
+static void nilfs_lookup_dirty_node_buffers(struct inode *inode,
+                                           struct list_head *listp)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+       struct address_space *mapping = &ii->i_btnode_cache;
+       struct pagevec pvec;
+       struct buffer_head *bh, *head;
+       unsigned int i;
+       pgoff_t index = 0;
+
+       pagevec_init(&pvec, 0);
+
+       while (pagevec_lookup_tag(&pvec, mapping, &index, PAGECACHE_TAG_DIRTY,
+                                 PAGEVEC_SIZE)) {
+               for (i = 0; i < pagevec_count(&pvec); i++) {
+                       bh = head = page_buffers(pvec.pages[i]);
+                       do {
+                               if (buffer_dirty(bh)) {
+                                       get_bh(bh);
+                                       list_add_tail(&bh->b_assoc_buffers,
+                                                     listp);
+                               }
+                               bh = bh->b_this_page;
+                       } while (bh != head);
+               }
+               pagevec_release(&pvec);
+               cond_resched();
+       }
+}
+
+static void nilfs_dispose_list(struct nilfs_sb_info *sbi,
+                              struct list_head *head, int force)
+{
+       struct nilfs_inode_info *ii, *n;
+       struct nilfs_inode_info *ivec[SC_N_INODEVEC], **pii;
+       unsigned nv = 0;
+
+       while (!list_empty(head)) {
+               spin_lock(&sbi->s_inode_lock);
+               list_for_each_entry_safe(ii, n, head, i_dirty) {
+                       list_del_init(&ii->i_dirty);
+                       if (force) {
+                               if (unlikely(ii->i_bh)) {
+                                       brelse(ii->i_bh);
+                                       ii->i_bh = NULL;
+                               }
+                       } else if (test_bit(NILFS_I_DIRTY, &ii->i_state)) {
+                               set_bit(NILFS_I_QUEUED, &ii->i_state);
+                               list_add_tail(&ii->i_dirty,
+                                             &sbi->s_dirty_files);
+                               continue;
+                       }
+                       ivec[nv++] = ii;
+                       if (nv == SC_N_INODEVEC)
+                               break;
+               }
+               spin_unlock(&sbi->s_inode_lock);
+
+               for (pii = ivec; nv > 0; pii++, nv--)
+                       iput(&(*pii)->vfs_inode);
+       }
+}
+
+static int nilfs_test_metadata_dirty(struct nilfs_sb_info *sbi)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       int ret = 0;
+
+       if (nilfs_mdt_fetch_dirty(sbi->s_ifile))
+               ret++;
+       if (nilfs_mdt_fetch_dirty(nilfs->ns_cpfile))
+               ret++;
+       if (nilfs_mdt_fetch_dirty(nilfs->ns_sufile))
+               ret++;
+       if (ret || nilfs_doing_gc())
+               if (nilfs_mdt_fetch_dirty(nilfs_dat_inode(nilfs)))
+                       ret++;
+       return ret;
+}
+
+static int nilfs_segctor_clean(struct nilfs_sc_info *sci)
+{
+       return list_empty(&sci->sc_dirty_files) &&
+               !test_bit(NILFS_SC_DIRTY, &sci->sc_flags) &&
+               list_empty(&sci->sc_cleaning_segments) &&
+               (!nilfs_doing_gc() || list_empty(&sci->sc_gc_inodes));
+}
+
+static int nilfs_segctor_confirm(struct nilfs_sc_info *sci)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       int ret = 0;
+
+       if (nilfs_test_metadata_dirty(sbi))
+               set_bit(NILFS_SC_DIRTY, &sci->sc_flags);
+
+       spin_lock(&sbi->s_inode_lock);
+       if (list_empty(&sbi->s_dirty_files) && nilfs_segctor_clean(sci))
+               ret++;
+
+       spin_unlock(&sbi->s_inode_lock);
+       return ret;
+}
+
+static void nilfs_segctor_clear_metadata_dirty(struct nilfs_sc_info *sci)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+
+       nilfs_mdt_clear_dirty(sbi->s_ifile);
+       nilfs_mdt_clear_dirty(nilfs->ns_cpfile);
+       nilfs_mdt_clear_dirty(nilfs->ns_sufile);
+       nilfs_mdt_clear_dirty(nilfs_dat_inode(nilfs));
+}
+
+static int nilfs_segctor_create_checkpoint(struct nilfs_sc_info *sci)
+{
+       struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
+       struct buffer_head *bh_cp;
+       struct nilfs_checkpoint *raw_cp;
+       int err;
+
+       /* XXX: this interface will be changed */
+       err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, nilfs->ns_cno, 1,
+                                         &raw_cp, &bh_cp);
+       if (likely(!err)) {
+               /* The following code is duplicated with cpfile.  But, it is
+                  needed to collect the checkpoint even if it was not newly
+                  created */
+               nilfs_mdt_mark_buffer_dirty(bh_cp);
+               nilfs_mdt_mark_dirty(nilfs->ns_cpfile);
+               nilfs_cpfile_put_checkpoint(
+                       nilfs->ns_cpfile, nilfs->ns_cno, bh_cp);
+       } else
+               WARN_ON(err == -EINVAL || err == -ENOENT);
+
+       return err;
+}
+
+static int nilfs_segctor_fill_in_checkpoint(struct nilfs_sc_info *sci)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       struct buffer_head *bh_cp;
+       struct nilfs_checkpoint *raw_cp;
+       int err;
+
+       err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, nilfs->ns_cno, 0,
+                                         &raw_cp, &bh_cp);
+       if (unlikely(err)) {
+               WARN_ON(err == -EINVAL || err == -ENOENT);
+               goto failed_ibh;
+       }
+       raw_cp->cp_snapshot_list.ssl_next = 0;
+       raw_cp->cp_snapshot_list.ssl_prev = 0;
+       raw_cp->cp_inodes_count =
+               cpu_to_le64(atomic_read(&sbi->s_inodes_count));
+       raw_cp->cp_blocks_count =
+               cpu_to_le64(atomic_read(&sbi->s_blocks_count));
+       raw_cp->cp_nblk_inc =
+               cpu_to_le64(sci->sc_nblk_inc + sci->sc_nblk_this_inc);
+       raw_cp->cp_create = cpu_to_le64(sci->sc_seg_ctime);
+       raw_cp->cp_cno = cpu_to_le64(nilfs->ns_cno);
+
+       if (test_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags))
+               nilfs_checkpoint_clear_minor(raw_cp);
+       else
+               nilfs_checkpoint_set_minor(raw_cp);
+
+       nilfs_write_inode_common(sbi->s_ifile, &raw_cp->cp_ifile_inode, 1);
+       nilfs_cpfile_put_checkpoint(nilfs->ns_cpfile, nilfs->ns_cno, bh_cp);
+       return 0;
+
+ failed_ibh:
+       return err;
+}
+
+static void nilfs_fill_in_file_bmap(struct inode *ifile,
+                                   struct nilfs_inode_info *ii)
+
+{
+       struct buffer_head *ibh;
+       struct nilfs_inode *raw_inode;
+
+       if (test_bit(NILFS_I_BMAP, &ii->i_state)) {
+               ibh = ii->i_bh;
+               BUG_ON(!ibh);
+               raw_inode = nilfs_ifile_map_inode(ifile, ii->vfs_inode.i_ino,
+                                                 ibh);
+               nilfs_bmap_write(ii->i_bmap, raw_inode);
+               nilfs_ifile_unmap_inode(ifile, ii->vfs_inode.i_ino, ibh);
+       }
+}
+
+static void nilfs_segctor_fill_in_file_bmap(struct nilfs_sc_info *sci,
+                                           struct inode *ifile)
+{
+       struct nilfs_inode_info *ii;
+
+       list_for_each_entry(ii, &sci->sc_dirty_files, i_dirty) {
+               nilfs_fill_in_file_bmap(ifile, ii);
+               set_bit(NILFS_I_COLLECTED, &ii->i_state);
+       }
+}
+
+/*
+ * CRC calculation routines
+ */
+static void nilfs_fill_in_super_root_crc(struct buffer_head *bh_sr, u32 seed)
+{
+       struct nilfs_super_root *raw_sr =
+               (struct nilfs_super_root *)bh_sr->b_data;
+       u32 crc;
+
+       crc = crc32_le(seed,
+                      (unsigned char *)raw_sr + sizeof(raw_sr->sr_sum),
+                      NILFS_SR_BYTES - sizeof(raw_sr->sr_sum));
+       raw_sr->sr_sum = cpu_to_le32(crc);
+}
+
+static void nilfs_segctor_fill_in_checksums(struct nilfs_sc_info *sci,
+                                           u32 seed)
+{
+       struct nilfs_segment_buffer *segbuf;
+
+       if (sci->sc_super_root)
+               nilfs_fill_in_super_root_crc(sci->sc_super_root, seed);
+
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
+               nilfs_segbuf_fill_in_segsum_crc(segbuf, seed);
+               nilfs_segbuf_fill_in_data_crc(segbuf, seed);
+       }
+}
+
+static void nilfs_segctor_fill_in_super_root(struct nilfs_sc_info *sci,
+                                            struct the_nilfs *nilfs)
+{
+       struct buffer_head *bh_sr = sci->sc_super_root;
+       struct nilfs_super_root *raw_sr =
+               (struct nilfs_super_root *)bh_sr->b_data;
+       unsigned isz = nilfs->ns_inode_size;
+
+       raw_sr->sr_bytes = cpu_to_le16(NILFS_SR_BYTES);
+       raw_sr->sr_nongc_ctime
+               = cpu_to_le64(nilfs_doing_gc() ?
+                             nilfs->ns_nongc_ctime : sci->sc_seg_ctime);
+       raw_sr->sr_flags = 0;
+
+       nilfs_mdt_write_inode_direct(
+               nilfs_dat_inode(nilfs), bh_sr, NILFS_SR_DAT_OFFSET(isz));
+       nilfs_mdt_write_inode_direct(
+               nilfs->ns_cpfile, bh_sr, NILFS_SR_CPFILE_OFFSET(isz));
+       nilfs_mdt_write_inode_direct(
+               nilfs->ns_sufile, bh_sr, NILFS_SR_SUFILE_OFFSET(isz));
+}
+
+static void nilfs_redirty_inodes(struct list_head *head)
+{
+       struct nilfs_inode_info *ii;
+
+       list_for_each_entry(ii, head, i_dirty) {
+               if (test_bit(NILFS_I_COLLECTED, &ii->i_state))
+                       clear_bit(NILFS_I_COLLECTED, &ii->i_state);
+       }
+}
+
+static void nilfs_drop_collected_inodes(struct list_head *head)
+{
+       struct nilfs_inode_info *ii;
+
+       list_for_each_entry(ii, head, i_dirty) {
+               if (!test_and_clear_bit(NILFS_I_COLLECTED, &ii->i_state))
+                       continue;
+
+               clear_bit(NILFS_I_INODE_DIRTY, &ii->i_state);
+               set_bit(NILFS_I_UPDATED, &ii->i_state);
+       }
+}
+
+static void nilfs_segctor_cancel_free_segments(struct nilfs_sc_info *sci,
+                                              struct inode *sufile)
+
+{
+       struct list_head *head = &sci->sc_cleaning_segments;
+       struct nilfs_segment_entry *ent;
+       int err;
+
+       list_for_each_entry(ent, head, list) {
+               if (!(ent->flags & NILFS_SLH_FREED))
+                       break;
+               err = nilfs_sufile_cancel_free(sufile, ent->segnum);
+               WARN_ON(err); /* do not happen */
+               ent->flags &= ~NILFS_SLH_FREED;
+       }
+}
+
+static int nilfs_segctor_prepare_free_segments(struct nilfs_sc_info *sci,
+                                              struct inode *sufile)
+{
+       struct list_head *head = &sci->sc_cleaning_segments;
+       struct nilfs_segment_entry *ent;
+       int err;
+
+       list_for_each_entry(ent, head, list) {
+               err = nilfs_sufile_free(sufile, ent->segnum);
+               if (unlikely(err))
+                       return err;
+               ent->flags |= NILFS_SLH_FREED;
+       }
+       return 0;
+}
+
+static void nilfs_segctor_commit_free_segments(struct nilfs_sc_info *sci)
+{
+       nilfs_dispose_segment_list(&sci->sc_cleaning_segments);
+}
+
+static int nilfs_segctor_apply_buffers(struct nilfs_sc_info *sci,
+                                      struct inode *inode,
+                                      struct list_head *listp,
+                                      int (*collect)(struct nilfs_sc_info *,
+                                                     struct buffer_head *,
+                                                     struct inode *))
+{
+       struct buffer_head *bh, *n;
+       int err = 0;
+
+       if (collect) {
+               list_for_each_entry_safe(bh, n, listp, b_assoc_buffers) {
+                       list_del_init(&bh->b_assoc_buffers);
+                       err = collect(sci, bh, inode);
+                       brelse(bh);
+                       if (unlikely(err))
+                               goto dispose_buffers;
+               }
+               return 0;
+       }
+
+ dispose_buffers:
+       while (!list_empty(listp)) {
+               bh = list_entry(listp->next, struct buffer_head,
+                               b_assoc_buffers);
+               list_del_init(&bh->b_assoc_buffers);
+               brelse(bh);
+       }
+       return err;
+}
+
+static size_t nilfs_segctor_buffer_rest(struct nilfs_sc_info *sci)
+{
+       /* Remaining number of blocks within segment buffer */
+       return sci->sc_segbuf_nblocks -
+               (sci->sc_nblk_this_inc + sci->sc_curseg->sb_sum.nblocks);
+}
+
+static int nilfs_segctor_scan_file(struct nilfs_sc_info *sci,
+                                  struct inode *inode,
+                                  struct nilfs_sc_operations *sc_ops)
+{
+       LIST_HEAD(data_buffers);
+       LIST_HEAD(node_buffers);
+       int err;
+
+       if (!(sci->sc_stage.flags & NILFS_CF_NODE)) {
+               size_t n, rest = nilfs_segctor_buffer_rest(sci);
+
+               n = nilfs_lookup_dirty_data_buffers(
+                       inode, &data_buffers, rest + 1, 0, LLONG_MAX);
+               if (n > rest) {
+                       err = nilfs_segctor_apply_buffers(
+                               sci, inode, &data_buffers,
+                               sc_ops->collect_data);
+                       BUG_ON(!err); /* always receive -E2BIG or true error */
+                       goto break_or_fail;
+               }
+       }
+       nilfs_lookup_dirty_node_buffers(inode, &node_buffers);
+
+       if (!(sci->sc_stage.flags & NILFS_CF_NODE)) {
+               err = nilfs_segctor_apply_buffers(
+                       sci, inode, &data_buffers, sc_ops->collect_data);
+               if (unlikely(err)) {
+                       /* dispose node list */
+                       nilfs_segctor_apply_buffers(
+                               sci, inode, &node_buffers, NULL);
+                       goto break_or_fail;
+               }
+               sci->sc_stage.flags |= NILFS_CF_NODE;
+       }
+       /* Collect node */
+       err = nilfs_segctor_apply_buffers(
+               sci, inode, &node_buffers, sc_ops->collect_node);
+       if (unlikely(err))
+               goto break_or_fail;
+
+       nilfs_bmap_lookup_dirty_buffers(NILFS_I(inode)->i_bmap, &node_buffers);
+       err = nilfs_segctor_apply_buffers(
+               sci, inode, &node_buffers, sc_ops->collect_bmap);
+       if (unlikely(err))
+               goto break_or_fail;
+
+       nilfs_segctor_end_finfo(sci, inode);
+       sci->sc_stage.flags &= ~NILFS_CF_NODE;
+
+ break_or_fail:
+       return err;
+}
+
+static int nilfs_segctor_scan_file_dsync(struct nilfs_sc_info *sci,
+                                        struct inode *inode)
+{
+       LIST_HEAD(data_buffers);
+       size_t n, rest = nilfs_segctor_buffer_rest(sci);
+       int err;
+
+       n = nilfs_lookup_dirty_data_buffers(inode, &data_buffers, rest + 1,
+                                           sci->sc_dsync_start,
+                                           sci->sc_dsync_end);
+
+       err = nilfs_segctor_apply_buffers(sci, inode, &data_buffers,
+                                         nilfs_collect_file_data);
+       if (!err) {
+               nilfs_segctor_end_finfo(sci, inode);
+               BUG_ON(n > rest);
+               /* always receive -E2BIG or true error if n > rest */
+       }
+       return err;
+}
+
+static int nilfs_segctor_collect_blocks(struct nilfs_sc_info *sci, int mode)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       struct list_head *head;
+       struct nilfs_inode_info *ii;
+       int err = 0;
+
+       switch (sci->sc_stage.scnt) {
+       case NILFS_ST_INIT:
+               /* Pre-processes */
+               sci->sc_stage.flags = 0;
+
+               if (!test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags)) {
+                       sci->sc_nblk_inc = 0;
+                       sci->sc_curseg->sb_sum.flags = NILFS_SS_LOGBGN;
+                       if (mode == SC_LSEG_DSYNC) {
+                               sci->sc_stage.scnt = NILFS_ST_DSYNC;
+                               goto dsync_mode;
+                       }
+               }
+
+               sci->sc_stage.dirty_file_ptr = NULL;
+               sci->sc_stage.gc_inode_ptr = NULL;
+               if (mode == SC_FLUSH_DAT) {
+                       sci->sc_stage.scnt = NILFS_ST_DAT;
+                       goto dat_stage;
+               }
+               sci->sc_stage.scnt++;  /* Fall through */
+       case NILFS_ST_GC:
+               if (nilfs_doing_gc()) {
+                       head = &sci->sc_gc_inodes;
+                       ii = list_prepare_entry(sci->sc_stage.gc_inode_ptr,
+                                               head, i_dirty);
+                       list_for_each_entry_continue(ii, head, i_dirty) {
+                               err = nilfs_segctor_scan_file(
+                                       sci, &ii->vfs_inode,
+                                       &nilfs_sc_file_ops);
+                               if (unlikely(err)) {
+                                       sci->sc_stage.gc_inode_ptr = list_entry(
+                                               ii->i_dirty.prev,
+                                               struct nilfs_inode_info,
+                                               i_dirty);
+                                       goto break_or_fail;
+                               }
+                               set_bit(NILFS_I_COLLECTED, &ii->i_state);
+                       }
+                       sci->sc_stage.gc_inode_ptr = NULL;
+               }
+               sci->sc_stage.scnt++;  /* Fall through */
+       case NILFS_ST_FILE:
+               head = &sci->sc_dirty_files;
+               ii = list_prepare_entry(sci->sc_stage.dirty_file_ptr, head,
+                                       i_dirty);
+               list_for_each_entry_continue(ii, head, i_dirty) {
+                       clear_bit(NILFS_I_DIRTY, &ii->i_state);
+
+                       err = nilfs_segctor_scan_file(sci, &ii->vfs_inode,
+                                                     &nilfs_sc_file_ops);
+                       if (unlikely(err)) {
+                               sci->sc_stage.dirty_file_ptr =
+                                       list_entry(ii->i_dirty.prev,
+                                                  struct nilfs_inode_info,
+                                                  i_dirty);
+                               goto break_or_fail;
+                       }
+                       /* sci->sc_stage.dirty_file_ptr = NILFS_I(inode); */
+                       /* XXX: required ? */
+               }
+               sci->sc_stage.dirty_file_ptr = NULL;
+               if (mode == SC_FLUSH_FILE) {
+                       sci->sc_stage.scnt = NILFS_ST_DONE;
+                       return 0;
+               }
+               sci->sc_stage.scnt++;
+               sci->sc_stage.flags |= NILFS_CF_IFILE_STARTED;
+               /* Fall through */
+       case NILFS_ST_IFILE:
+               err = nilfs_segctor_scan_file(sci, sbi->s_ifile,
+                                             &nilfs_sc_file_ops);
+               if (unlikely(err))
+                       break;
+               sci->sc_stage.scnt++;
+               /* Creating a checkpoint */
+               err = nilfs_segctor_create_checkpoint(sci);
+               if (unlikely(err))
+                       break;
+               /* Fall through */
+       case NILFS_ST_CPFILE:
+               err = nilfs_segctor_scan_file(sci, nilfs->ns_cpfile,
+                                             &nilfs_sc_file_ops);
+               if (unlikely(err))
+                       break;
+               sci->sc_stage.scnt++;  /* Fall through */
+       case NILFS_ST_SUFILE:
+               err = nilfs_segctor_prepare_free_segments(sci,
+                                                         nilfs->ns_sufile);
+               if (unlikely(err))
+                       break;
+               err = nilfs_segctor_scan_file(sci, nilfs->ns_sufile,
+                                             &nilfs_sc_file_ops);
+               if (unlikely(err))
+                       break;
+               sci->sc_stage.scnt++;  /* Fall through */
+       case NILFS_ST_DAT:
+ dat_stage:
+               err = nilfs_segctor_scan_file(sci, nilfs_dat_inode(nilfs),
+                                             &nilfs_sc_dat_ops);
+               if (unlikely(err))
+                       break;
+               if (mode == SC_FLUSH_DAT) {
+                       sci->sc_stage.scnt = NILFS_ST_DONE;
+                       return 0;
+               }
+               sci->sc_stage.scnt++;  /* Fall through */
+       case NILFS_ST_SR:
+               if (mode == SC_LSEG_SR) {
+                       /* Appending a super root */
+                       err = nilfs_segctor_add_super_root(sci);
+                       if (unlikely(err))
+                               break;
+               }
+               /* End of a logical segment */
+               sci->sc_curseg->sb_sum.flags |= NILFS_SS_LOGEND;
+               sci->sc_stage.scnt = NILFS_ST_DONE;
+               return 0;
+       case NILFS_ST_DSYNC:
+ dsync_mode:
+               sci->sc_curseg->sb_sum.flags |= NILFS_SS_SYNDT;
+               ii = sci->sc_dsync_inode;
+               if (!test_bit(NILFS_I_BUSY, &ii->i_state))
+                       break;
+
+               err = nilfs_segctor_scan_file_dsync(sci, &ii->vfs_inode);
+               if (unlikely(err))
+                       break;
+               sci->sc_curseg->sb_sum.flags |= NILFS_SS_LOGEND;
+               sci->sc_stage.scnt = NILFS_ST_DONE;
+               return 0;
+       case NILFS_ST_DONE:
+               return 0;
+       default:
+               BUG();
+       }
+
+ break_or_fail:
+       return err;
+}
+
+static int nilfs_touch_segusage(struct inode *sufile, __u64 segnum)
+{
+       struct buffer_head *bh_su;
+       struct nilfs_segment_usage *raw_su;
+       int err;
+
+       err = nilfs_sufile_get_segment_usage(sufile, segnum, &raw_su, &bh_su);
+       if (unlikely(err))
+               return err;
+       nilfs_mdt_mark_buffer_dirty(bh_su);
+       nilfs_mdt_mark_dirty(sufile);
+       nilfs_sufile_put_segment_usage(sufile, segnum, bh_su);
+       return 0;
+}
+
+static int nilfs_segctor_begin_construction(struct nilfs_sc_info *sci,
+                                           struct the_nilfs *nilfs)
+{
+       struct nilfs_segment_buffer *segbuf, *n;
+       __u64 nextnum;
+       int err;
+
+       if (list_empty(&sci->sc_segbufs)) {
+               segbuf = nilfs_segbuf_new(sci->sc_super);
+               if (unlikely(!segbuf))
+                       return -ENOMEM;
+               list_add(&segbuf->sb_list, &sci->sc_segbufs);
+       } else
+               segbuf = NILFS_FIRST_SEGBUF(&sci->sc_segbufs);
+
+       nilfs_segbuf_map(segbuf, nilfs->ns_segnum, nilfs->ns_pseg_offset,
+                        nilfs);
+
+       if (segbuf->sb_rest_blocks < NILFS_PSEG_MIN_BLOCKS) {
+               nilfs_shift_to_next_segment(nilfs);
+               nilfs_segbuf_map(segbuf, nilfs->ns_segnum, 0, nilfs);
+       }
+       sci->sc_segbuf_nblocks = segbuf->sb_rest_blocks;
+
+       err = nilfs_touch_segusage(nilfs->ns_sufile, segbuf->sb_segnum);
+       if (unlikely(err))
+               return err;
+
+       if (nilfs->ns_segnum == nilfs->ns_nextnum) {
+               /* Start from the head of a new full segment */
+               err = nilfs_sufile_alloc(nilfs->ns_sufile, &nextnum);
+               if (unlikely(err))
+                       return err;
+       } else
+               nextnum = nilfs->ns_nextnum;
+
+       segbuf->sb_sum.seg_seq = nilfs->ns_seg_seq;
+       nilfs_segbuf_set_next_segnum(segbuf, nextnum, nilfs);
+
+       /* truncating segment buffers */
+       list_for_each_entry_safe_continue(segbuf, n, &sci->sc_segbufs,
+                                         sb_list) {
+               list_del_init(&segbuf->sb_list);
+               nilfs_segbuf_free(segbuf);
+       }
+       return 0;
+}
+
+static int nilfs_segctor_extend_segments(struct nilfs_sc_info *sci,
+                                        struct the_nilfs *nilfs, int nadd)
+{
+       struct nilfs_segment_buffer *segbuf, *prev, *n;
+       struct inode *sufile = nilfs->ns_sufile;
+       __u64 nextnextnum;
+       LIST_HEAD(list);
+       int err, ret, i;
+
+       prev = NILFS_LAST_SEGBUF(&sci->sc_segbufs);
+       /*
+        * Since the segment specified with nextnum might be allocated during
+        * the previous construction, the buffer including its segusage may
+        * not be dirty.  The following call ensures that the buffer is dirty
+        * and will pin the buffer on memory until the sufile is written.
+        */
+       err = nilfs_touch_segusage(sufile, prev->sb_nextnum);
+       if (unlikely(err))
+               return err;
+
+       for (i = 0; i < nadd; i++) {
+               /* extend segment info */
+               err = -ENOMEM;
+               segbuf = nilfs_segbuf_new(sci->sc_super);
+               if (unlikely(!segbuf))
+                       goto failed;
+
+               /* map this buffer to region of segment on-disk */
+               nilfs_segbuf_map(segbuf, prev->sb_nextnum, 0, nilfs);
+               sci->sc_segbuf_nblocks += segbuf->sb_rest_blocks;
+
+               /* allocate the next next full segment */
+               err = nilfs_sufile_alloc(sufile, &nextnextnum);
+               if (unlikely(err))
+                       goto failed_segbuf;
+
+               segbuf->sb_sum.seg_seq = prev->sb_sum.seg_seq + 1;
+               nilfs_segbuf_set_next_segnum(segbuf, nextnextnum, nilfs);
+
+               list_add_tail(&segbuf->sb_list, &list);
+               prev = segbuf;
+       }
+       list_splice(&list, sci->sc_segbufs.prev);
+       return 0;
+
+ failed_segbuf:
+       nilfs_segbuf_free(segbuf);
+ failed:
+       list_for_each_entry_safe(segbuf, n, &list, sb_list) {
+               ret = nilfs_sufile_free(sufile, segbuf->sb_nextnum);
+               WARN_ON(ret); /* never fails */
+               list_del_init(&segbuf->sb_list);
+               nilfs_segbuf_free(segbuf);
+       }
+       return err;
+}
+
+static void nilfs_segctor_free_incomplete_segments(struct nilfs_sc_info *sci,
+                                                  struct the_nilfs *nilfs)
+{
+       struct nilfs_segment_buffer *segbuf;
+       int ret, done = 0;
+
+       segbuf = NILFS_FIRST_SEGBUF(&sci->sc_segbufs);
+       if (nilfs->ns_nextnum != segbuf->sb_nextnum) {
+               ret = nilfs_sufile_free(nilfs->ns_sufile, segbuf->sb_nextnum);
+               WARN_ON(ret); /* never fails */
+       }
+       if (segbuf->sb_io_error) {
+               /* Case 1: The first segment failed */
+               if (segbuf->sb_pseg_start != segbuf->sb_fseg_start)
+                       /* Case 1a:  Partial segment appended into an existing
+                          segment */
+                       nilfs_terminate_segment(nilfs, segbuf->sb_fseg_start,
+                                               segbuf->sb_fseg_end);
+               else /* Case 1b:  New full segment */
+                       set_nilfs_discontinued(nilfs);
+               done++;
+       }
+
+       list_for_each_entry_continue(segbuf, &sci->sc_segbufs, sb_list) {
+               ret = nilfs_sufile_free(nilfs->ns_sufile, segbuf->sb_nextnum);
+               WARN_ON(ret); /* never fails */
+               if (!done && segbuf->sb_io_error) {
+                       if (segbuf->sb_segnum != nilfs->ns_nextnum)
+                               /* Case 2: extended segment (!= next) failed */
+                               nilfs_sufile_set_error(nilfs->ns_sufile,
+                                                      segbuf->sb_segnum);
+                       done++;
+               }
+       }
+}
+
+static void nilfs_segctor_clear_segment_buffers(struct nilfs_sc_info *sci)
+{
+       struct nilfs_segment_buffer *segbuf;
+
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list)
+               nilfs_segbuf_clear(segbuf);
+       sci->sc_super_root = NULL;
+}
+
+static void nilfs_segctor_destroy_segment_buffers(struct nilfs_sc_info *sci)
+{
+       struct nilfs_segment_buffer *segbuf;
+
+       while (!list_empty(&sci->sc_segbufs)) {
+               segbuf = NILFS_FIRST_SEGBUF(&sci->sc_segbufs);
+               list_del_init(&segbuf->sb_list);
+               nilfs_segbuf_free(segbuf);
+       }
+       /* sci->sc_curseg = NULL; */
+}
+
+static void nilfs_segctor_end_construction(struct nilfs_sc_info *sci,
+                                          struct the_nilfs *nilfs, int err)
+{
+       if (unlikely(err)) {
+               nilfs_segctor_free_incomplete_segments(sci, nilfs);
+               nilfs_segctor_cancel_free_segments(sci, nilfs->ns_sufile);
+       }
+       nilfs_segctor_clear_segment_buffers(sci);
+}
+
+static void nilfs_segctor_update_segusage(struct nilfs_sc_info *sci,
+                                         struct inode *sufile)
+{
+       struct nilfs_segment_buffer *segbuf;
+       struct buffer_head *bh_su;
+       struct nilfs_segment_usage *raw_su;
+       unsigned long live_blocks;
+       int ret;
+
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
+               ret = nilfs_sufile_get_segment_usage(sufile, segbuf->sb_segnum,
+                                                    &raw_su, &bh_su);
+               WARN_ON(ret); /* always succeed because bh_su is dirty */
+               live_blocks = segbuf->sb_sum.nblocks +
+                       (segbuf->sb_pseg_start - segbuf->sb_fseg_start);
+               raw_su->su_lastmod = cpu_to_le64(sci->sc_seg_ctime);
+               raw_su->su_nblocks = cpu_to_le32(live_blocks);
+               nilfs_sufile_put_segment_usage(sufile, segbuf->sb_segnum,
+                                              bh_su);
+       }
+}
+
+static void nilfs_segctor_cancel_segusage(struct nilfs_sc_info *sci,
+                                         struct inode *sufile)
+{
+       struct nilfs_segment_buffer *segbuf;
+       struct buffer_head *bh_su;
+       struct nilfs_segment_usage *raw_su;
+       int ret;
+
+       segbuf = NILFS_FIRST_SEGBUF(&sci->sc_segbufs);
+       ret = nilfs_sufile_get_segment_usage(sufile, segbuf->sb_segnum,
+                                            &raw_su, &bh_su);
+       WARN_ON(ret); /* always succeed because bh_su is dirty */
+       raw_su->su_nblocks = cpu_to_le32(segbuf->sb_pseg_start -
+                                        segbuf->sb_fseg_start);
+       nilfs_sufile_put_segment_usage(sufile, segbuf->sb_segnum, bh_su);
+
+       list_for_each_entry_continue(segbuf, &sci->sc_segbufs, sb_list) {
+               ret = nilfs_sufile_get_segment_usage(sufile, segbuf->sb_segnum,
+                                                    &raw_su, &bh_su);
+               WARN_ON(ret); /* always succeed */
+               raw_su->su_nblocks = 0;
+               nilfs_sufile_put_segment_usage(sufile, segbuf->sb_segnum,
+                                              bh_su);
+       }
+}
+
+static void nilfs_segctor_truncate_segments(struct nilfs_sc_info *sci,
+                                           struct nilfs_segment_buffer *last,
+                                           struct inode *sufile)
+{
+       struct nilfs_segment_buffer *segbuf = last, *n;
+       int ret;
+
+       list_for_each_entry_safe_continue(segbuf, n, &sci->sc_segbufs,
+                                         sb_list) {
+               list_del_init(&segbuf->sb_list);
+               sci->sc_segbuf_nblocks -= segbuf->sb_rest_blocks;
+               ret = nilfs_sufile_free(sufile, segbuf->sb_nextnum);
+               WARN_ON(ret);
+               nilfs_segbuf_free(segbuf);
+       }
+}
+
+
+static int nilfs_segctor_collect(struct nilfs_sc_info *sci,
+                                struct the_nilfs *nilfs, int mode)
+{
+       struct nilfs_cstage prev_stage = sci->sc_stage;
+       int err, nadd = 1;
+
+       /* Collection retry loop */
+       for (;;) {
+               sci->sc_super_root = NULL;
+               sci->sc_nblk_this_inc = 0;
+               sci->sc_curseg = NILFS_FIRST_SEGBUF(&sci->sc_segbufs);
+
+               err = nilfs_segctor_reset_segment_buffer(sci);
+               if (unlikely(err))
+                       goto failed;
+
+               err = nilfs_segctor_collect_blocks(sci, mode);
+               sci->sc_nblk_this_inc += sci->sc_curseg->sb_sum.nblocks;
+               if (!err)
+                       break;
+
+               if (unlikely(err != -E2BIG))
+                       goto failed;
+
+               /* The current segment is filled up */
+               if (mode != SC_LSEG_SR || sci->sc_stage.scnt < NILFS_ST_CPFILE)
+                       break;
+
+               nilfs_segctor_cancel_free_segments(sci, nilfs->ns_sufile);
+               nilfs_segctor_clear_segment_buffers(sci);
+
+               err = nilfs_segctor_extend_segments(sci, nilfs, nadd);
+               if (unlikely(err))
+                       return err;
+
+               nadd = min_t(int, nadd << 1, SC_MAX_SEGDELTA);
+               sci->sc_stage = prev_stage;
+       }
+       nilfs_segctor_truncate_segments(sci, sci->sc_curseg, nilfs->ns_sufile);
+       return 0;
+
+ failed:
+       return err;
+}
+
+static void nilfs_list_replace_buffer(struct buffer_head *old_bh,
+                                     struct buffer_head *new_bh)
+{
+       BUG_ON(!list_empty(&new_bh->b_assoc_buffers));
+
+       list_replace_init(&old_bh->b_assoc_buffers, &new_bh->b_assoc_buffers);
+       /* The caller must release old_bh */
+}
+
+static int
+nilfs_segctor_update_payload_blocknr(struct nilfs_sc_info *sci,
+                                    struct nilfs_segment_buffer *segbuf,
+                                    int mode)
+{
+       struct inode *inode = NULL;
+       sector_t blocknr;
+       unsigned long nfinfo = segbuf->sb_sum.nfinfo;
+       unsigned long nblocks = 0, ndatablk = 0;
+       struct nilfs_sc_operations *sc_op = NULL;
+       struct nilfs_segsum_pointer ssp;
+       struct nilfs_finfo *finfo = NULL;
+       union nilfs_binfo binfo;
+       struct buffer_head *bh, *bh_org;
+       ino_t ino = 0;
+       int err = 0;
+
+       if (!nfinfo)
+               goto out;
+
+       blocknr = segbuf->sb_pseg_start + segbuf->sb_sum.nsumblk;
+       ssp.bh = NILFS_SEGBUF_FIRST_BH(&segbuf->sb_segsum_buffers);
+       ssp.offset = sizeof(struct nilfs_segment_summary);
+
+       list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) {
+               if (bh == sci->sc_super_root)
+                       break;
+               if (!finfo) {
+                       finfo = nilfs_segctor_map_segsum_entry(
+                               sci, &ssp, sizeof(*finfo));
+                       ino = le64_to_cpu(finfo->fi_ino);
+                       nblocks = le32_to_cpu(finfo->fi_nblocks);
+                       ndatablk = le32_to_cpu(finfo->fi_ndatablk);
+
+                       if (buffer_nilfs_node(bh))
+                               inode = NILFS_BTNC_I(bh->b_page->mapping);
+                       else
+                               inode = NILFS_AS_I(bh->b_page->mapping);
+
+                       if (mode == SC_LSEG_DSYNC)
+                               sc_op = &nilfs_sc_dsync_ops;
+                       else if (ino == NILFS_DAT_INO)
+                               sc_op = &nilfs_sc_dat_ops;
+                       else /* file blocks */
+                               sc_op = &nilfs_sc_file_ops;
+               }
+               bh_org = bh;
+               get_bh(bh_org);
+               err = nilfs_bmap_assign(NILFS_I(inode)->i_bmap, &bh, blocknr,
+                                       &binfo);
+               if (bh != bh_org)
+                       nilfs_list_replace_buffer(bh_org, bh);
+               brelse(bh_org);
+               if (unlikely(err))
+                       goto failed_bmap;
+
+               if (ndatablk > 0)
+                       sc_op->write_data_binfo(sci, &ssp, &binfo);
+               else
+                       sc_op->write_node_binfo(sci, &ssp, &binfo);
+
+               blocknr++;
+               if (--nblocks == 0) {
+                       finfo = NULL;
+                       if (--nfinfo == 0)
+                               break;
+               } else if (ndatablk > 0)
+                       ndatablk--;
+       }
+ out:
+       return 0;
+
+ failed_bmap:
+       err = nilfs_handle_bmap_error(err, __func__, inode, sci->sc_super);
+       return err;
+}
+
+static int nilfs_segctor_assign(struct nilfs_sc_info *sci, int mode)
+{
+       struct nilfs_segment_buffer *segbuf;
+       int err;
+
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
+               err = nilfs_segctor_update_payload_blocknr(sci, segbuf, mode);
+               if (unlikely(err))
+                       return err;
+               nilfs_segbuf_fill_in_segsum(segbuf);
+       }
+       return 0;
+}
+
+static int
+nilfs_copy_replace_page_buffers(struct page *page, struct list_head *out)
+{
+       struct page *clone_page;
+       struct buffer_head *bh, *head, *bh2;
+       void *kaddr;
+
+       bh = head = page_buffers(page);
+
+       clone_page = nilfs_alloc_private_page(bh->b_bdev, bh->b_size, 0);
+       if (unlikely(!clone_page))
+               return -ENOMEM;
+
+       bh2 = page_buffers(clone_page);
+       kaddr = kmap_atomic(page, KM_USER0);
+       do {
+               if (list_empty(&bh->b_assoc_buffers))
+                       continue;
+               get_bh(bh2);
+               page_cache_get(clone_page); /* for each bh */
+               memcpy(bh2->b_data, kaddr + bh_offset(bh), bh2->b_size);
+               bh2->b_blocknr = bh->b_blocknr;
+               list_replace(&bh->b_assoc_buffers, &bh2->b_assoc_buffers);
+               list_add_tail(&bh->b_assoc_buffers, out);
+       } while (bh = bh->b_this_page, bh2 = bh2->b_this_page, bh != head);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       if (!TestSetPageWriteback(clone_page))
+               inc_zone_page_state(clone_page, NR_WRITEBACK);
+       unlock_page(clone_page);
+
+       return 0;
+}
+
+static int nilfs_test_page_to_be_frozen(struct page *page)
+{
+       struct address_space *mapping = page->mapping;
+
+       if (!mapping || !mapping->host || S_ISDIR(mapping->host->i_mode))
+               return 0;
+
+       if (page_mapped(page)) {
+               ClearPageChecked(page);
+               return 1;
+       }
+       return PageChecked(page);
+}
+
+static int nilfs_begin_page_io(struct page *page, struct list_head *out)
+{
+       if (!page || PageWriteback(page))
+               /* For split b-tree node pages, this function may be called
+                  twice.  We ignore the 2nd or later calls by this check. */
+               return 0;
+
+       lock_page(page);
+       clear_page_dirty_for_io(page);
+       set_page_writeback(page);
+       unlock_page(page);
+
+       if (nilfs_test_page_to_be_frozen(page)) {
+               int err = nilfs_copy_replace_page_buffers(page, out);
+               if (unlikely(err))
+                       return err;
+       }
+       return 0;
+}
+
+static int nilfs_segctor_prepare_write(struct nilfs_sc_info *sci,
+                                      struct page **failed_page)
+{
+       struct nilfs_segment_buffer *segbuf;
+       struct page *bd_page = NULL, *fs_page = NULL;
+       struct list_head *list = &sci->sc_copied_buffers;
+       int err;
+
+       *failed_page = NULL;
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
+               struct buffer_head *bh;
+
+               list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
+                                   b_assoc_buffers) {
+                       if (bh->b_page != bd_page) {
+                               if (bd_page) {
+                                       lock_page(bd_page);
+                                       clear_page_dirty_for_io(bd_page);
+                                       set_page_writeback(bd_page);
+                                       unlock_page(bd_page);
+                               }
+                               bd_page = bh->b_page;
+                       }
+               }
+
+               list_for_each_entry(bh, &segbuf->sb_payload_buffers,
+                                   b_assoc_buffers) {
+                       if (bh == sci->sc_super_root) {
+                               if (bh->b_page != bd_page) {
+                                       lock_page(bd_page);
+                                       clear_page_dirty_for_io(bd_page);
+                                       set_page_writeback(bd_page);
+                                       unlock_page(bd_page);
+                                       bd_page = bh->b_page;
+                               }
+                               break;
+                       }
+                       if (bh->b_page != fs_page) {
+                               err = nilfs_begin_page_io(fs_page, list);
+                               if (unlikely(err)) {
+                                       *failed_page = fs_page;
+                                       goto out;
+                               }
+                               fs_page = bh->b_page;
+                       }
+               }
+       }
+       if (bd_page) {
+               lock_page(bd_page);
+               clear_page_dirty_for_io(bd_page);
+               set_page_writeback(bd_page);
+               unlock_page(bd_page);
+       }
+       err = nilfs_begin_page_io(fs_page, list);
+       if (unlikely(err))
+               *failed_page = fs_page;
+ out:
+       return err;
+}
+
+static int nilfs_segctor_write(struct nilfs_sc_info *sci,
+                              struct backing_dev_info *bdi)
+{
+       struct nilfs_segment_buffer *segbuf;
+       struct nilfs_write_info wi;
+       int err, res;
+
+       wi.sb = sci->sc_super;
+       wi.bh_sr = sci->sc_super_root;
+       wi.bdi = bdi;
+
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
+               nilfs_segbuf_prepare_write(segbuf, &wi);
+               err = nilfs_segbuf_write(segbuf, &wi);
+
+               res = nilfs_segbuf_wait(segbuf, &wi);
+               err = unlikely(err) ? : res;
+               if (unlikely(err))
+                       return err;
+       }
+       return 0;
+}
+
+static int nilfs_page_has_uncleared_buffer(struct page *page)
+{
+       struct buffer_head *head, *bh;
+
+       head = bh = page_buffers(page);
+       do {
+               if (buffer_dirty(bh) && !list_empty(&bh->b_assoc_buffers))
+                       return 1;
+               bh = bh->b_this_page;
+       } while (bh != head);
+       return 0;
+}
+
+static void __nilfs_end_page_io(struct page *page, int err)
+{
+       if (!err) {
+               if (!nilfs_page_buffers_clean(page))
+                       __set_page_dirty_nobuffers(page);
+               ClearPageError(page);
+       } else {
+               __set_page_dirty_nobuffers(page);
+               SetPageError(page);
+       }
+
+       if (buffer_nilfs_allocated(page_buffers(page))) {
+               if (TestClearPageWriteback(page))
+                       dec_zone_page_state(page, NR_WRITEBACK);
+       } else
+               end_page_writeback(page);
+}
+
+static void nilfs_end_page_io(struct page *page, int err)
+{
+       if (!page)
+               return;
+
+       if (buffer_nilfs_node(page_buffers(page)) &&
+           nilfs_page_has_uncleared_buffer(page))
+               /* For b-tree node pages, this function may be called twice
+                  or more because they might be split in a segment.
+                  This check assures that cleanup has been done for all
+                  buffers in a split btnode page. */
+               return;
+
+       __nilfs_end_page_io(page, err);
+}
+
+static void nilfs_clear_copied_buffers(struct list_head *list, int err)
+{
+       struct buffer_head *bh, *head;
+       struct page *page;
+
+       while (!list_empty(list)) {
+               bh = list_entry(list->next, struct buffer_head,
+                               b_assoc_buffers);
+               page = bh->b_page;
+               page_cache_get(page);
+               head = bh = page_buffers(page);
+               do {
+                       if (!list_empty(&bh->b_assoc_buffers)) {
+                               list_del_init(&bh->b_assoc_buffers);
+                               if (!err) {
+                                       set_buffer_uptodate(bh);
+                                       clear_buffer_dirty(bh);
+                                       clear_buffer_nilfs_volatile(bh);
+                               }
+                               brelse(bh); /* for b_assoc_buffers */
+                       }
+               } while ((bh = bh->b_this_page) != head);
+
+               __nilfs_end_page_io(page, err);
+               page_cache_release(page);
+       }
+}
+
+static void nilfs_segctor_abort_write(struct nilfs_sc_info *sci,
+                                     struct page *failed_page, int err)
+{
+       struct nilfs_segment_buffer *segbuf;
+       struct page *bd_page = NULL, *fs_page = NULL;
+
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
+               struct buffer_head *bh;
+
+               list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
+                                   b_assoc_buffers) {
+                       if (bh->b_page != bd_page) {
+                               if (bd_page)
+                                       end_page_writeback(bd_page);
+                               bd_page = bh->b_page;
+                       }
+               }
+
+               list_for_each_entry(bh, &segbuf->sb_payload_buffers,
+                                   b_assoc_buffers) {
+                       if (bh == sci->sc_super_root) {
+                               if (bh->b_page != bd_page) {
+                                       end_page_writeback(bd_page);
+                                       bd_page = bh->b_page;
+                               }
+                               break;
+                       }
+                       if (bh->b_page != fs_page) {
+                               nilfs_end_page_io(fs_page, err);
+                               if (unlikely(fs_page == failed_page))
+                                       goto done;
+                               fs_page = bh->b_page;
+                       }
+               }
+       }
+       if (bd_page)
+               end_page_writeback(bd_page);
+
+       nilfs_end_page_io(fs_page, err);
+ done:
+       nilfs_clear_copied_buffers(&sci->sc_copied_buffers, err);
+}
+
+static void nilfs_set_next_segment(struct the_nilfs *nilfs,
+                                  struct nilfs_segment_buffer *segbuf)
+{
+       nilfs->ns_segnum = segbuf->sb_segnum;
+       nilfs->ns_nextnum = segbuf->sb_nextnum;
+       nilfs->ns_pseg_offset = segbuf->sb_pseg_start - segbuf->sb_fseg_start
+               + segbuf->sb_sum.nblocks;
+       nilfs->ns_seg_seq = segbuf->sb_sum.seg_seq;
+       nilfs->ns_ctime = segbuf->sb_sum.ctime;
+}
+
+static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)
+{
+       struct nilfs_segment_buffer *segbuf;
+       struct page *bd_page = NULL, *fs_page = NULL;
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       int update_sr = (sci->sc_super_root != NULL);
+
+       list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
+               struct buffer_head *bh;
+
+               list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
+                                   b_assoc_buffers) {
+                       set_buffer_uptodate(bh);
+                       clear_buffer_dirty(bh);
+                       if (bh->b_page != bd_page) {
+                               if (bd_page)
+                                       end_page_writeback(bd_page);
+                               bd_page = bh->b_page;
+                       }
+               }
+               /*
+                * We assume that the buffers which belong to the same page
+                * continue over the buffer list.
+                * Under this assumption, the last BHs of pages is
+                * identifiable by the discontinuity of bh->b_page
+                * (page != fs_page).
+                *
+                * For B-tree node blocks, however, this assumption is not
+                * guaranteed.  The cleanup code of B-tree node pages needs
+                * special care.
+                */
+               list_for_each_entry(bh, &segbuf->sb_payload_buffers,
+                                   b_assoc_buffers) {
+                       set_buffer_uptodate(bh);
+                       clear_buffer_dirty(bh);
+                       clear_buffer_nilfs_volatile(bh);
+                       if (bh == sci->sc_super_root) {
+                               if (bh->b_page != bd_page) {
+                                       end_page_writeback(bd_page);
+                                       bd_page = bh->b_page;
+                               }
+                               break;
+                       }
+                       if (bh->b_page != fs_page) {
+                               nilfs_end_page_io(fs_page, 0);
+                               fs_page = bh->b_page;
+                       }
+               }
+
+               if (!NILFS_SEG_SIMPLEX(&segbuf->sb_sum)) {
+                       if (NILFS_SEG_LOGBGN(&segbuf->sb_sum)) {
+                               set_bit(NILFS_SC_UNCLOSED, &sci->sc_flags);
+                               sci->sc_lseg_stime = jiffies;
+                       }
+                       if (NILFS_SEG_LOGEND(&segbuf->sb_sum))
+                               clear_bit(NILFS_SC_UNCLOSED, &sci->sc_flags);
+               }
+       }
+       /*
+        * Since pages may continue over multiple segment buffers,
+        * end of the last page must be checked outside of the loop.
+        */
+       if (bd_page)
+               end_page_writeback(bd_page);
+
+       nilfs_end_page_io(fs_page, 0);
+
+       nilfs_clear_copied_buffers(&sci->sc_copied_buffers, 0);
+
+       nilfs_drop_collected_inodes(&sci->sc_dirty_files);
+
+       if (nilfs_doing_gc()) {
+               nilfs_drop_collected_inodes(&sci->sc_gc_inodes);
+               if (update_sr)
+                       nilfs_commit_gcdat_inode(nilfs);
+       } else
+               nilfs->ns_nongc_ctime = sci->sc_seg_ctime;
+
+       sci->sc_nblk_inc += sci->sc_nblk_this_inc;
+
+       segbuf = NILFS_LAST_SEGBUF(&sci->sc_segbufs);
+       nilfs_set_next_segment(nilfs, segbuf);
+
+       if (update_sr) {
+               nilfs_set_last_segment(nilfs, segbuf->sb_pseg_start,
+                                      segbuf->sb_sum.seg_seq, nilfs->ns_cno++);
+               sbi->s_super->s_dirt = 1;
+
+               clear_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags);
+               clear_bit(NILFS_SC_DIRTY, &sci->sc_flags);
+               set_bit(NILFS_SC_SUPER_ROOT, &sci->sc_flags);
+       } else
+               clear_bit(NILFS_SC_SUPER_ROOT, &sci->sc_flags);
+}
+
+static int nilfs_segctor_check_in_files(struct nilfs_sc_info *sci,
+                                       struct nilfs_sb_info *sbi)
+{
+       struct nilfs_inode_info *ii, *n;
+       __u64 cno = sbi->s_nilfs->ns_cno;
+
+       spin_lock(&sbi->s_inode_lock);
+ retry:
+       list_for_each_entry_safe(ii, n, &sbi->s_dirty_files, i_dirty) {
+               if (!ii->i_bh) {
+                       struct buffer_head *ibh;
+                       int err;
+
+                       spin_unlock(&sbi->s_inode_lock);
+                       err = nilfs_ifile_get_inode_block(
+                               sbi->s_ifile, ii->vfs_inode.i_ino, &ibh);
+                       if (unlikely(err)) {
+                               nilfs_warning(sbi->s_super, __func__,
+                                             "failed to get inode block.\n");
+                               return err;
+                       }
+                       nilfs_mdt_mark_buffer_dirty(ibh);
+                       nilfs_mdt_mark_dirty(sbi->s_ifile);
+                       spin_lock(&sbi->s_inode_lock);
+                       if (likely(!ii->i_bh))
+                               ii->i_bh = ibh;
+                       else
+                               brelse(ibh);
+                       goto retry;
+               }
+               ii->i_cno = cno;
+
+               clear_bit(NILFS_I_QUEUED, &ii->i_state);
+               set_bit(NILFS_I_BUSY, &ii->i_state);
+               list_del(&ii->i_dirty);
+               list_add_tail(&ii->i_dirty, &sci->sc_dirty_files);
+       }
+       spin_unlock(&sbi->s_inode_lock);
+
+       NILFS_I(sbi->s_ifile)->i_cno = cno;
+
+       return 0;
+}
+
+static void nilfs_segctor_check_out_files(struct nilfs_sc_info *sci,
+                                         struct nilfs_sb_info *sbi)
+{
+       struct nilfs_transaction_info *ti = current->journal_info;
+       struct nilfs_inode_info *ii, *n;
+       __u64 cno = sbi->s_nilfs->ns_cno;
+
+       spin_lock(&sbi->s_inode_lock);
+       list_for_each_entry_safe(ii, n, &sci->sc_dirty_files, i_dirty) {
+               if (!test_and_clear_bit(NILFS_I_UPDATED, &ii->i_state) ||
+                   test_bit(NILFS_I_DIRTY, &ii->i_state)) {
+                       /* The current checkpoint number (=nilfs->ns_cno) is
+                          changed between check-in and check-out only if the
+                          super root is written out.  So, we can update i_cno
+                          for the inodes that remain in the dirty list. */
+                       ii->i_cno = cno;
+                       continue;
+               }
+               clear_bit(NILFS_I_BUSY, &ii->i_state);
+               brelse(ii->i_bh);
+               ii->i_bh = NULL;
+               list_del(&ii->i_dirty);
+               list_add_tail(&ii->i_dirty, &ti->ti_garbage);
+       }
+       spin_unlock(&sbi->s_inode_lock);
+}
+
+/*
+ * Main procedure of segment constructor
+ */
+static int nilfs_segctor_do_construct(struct nilfs_sc_info *sci, int mode)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       struct page *failed_page;
+       int err, has_sr = 0;
+
+       sci->sc_stage.scnt = NILFS_ST_INIT;
+
+       err = nilfs_segctor_check_in_files(sci, sbi);
+       if (unlikely(err))
+               goto out;
+
+       if (nilfs_test_metadata_dirty(sbi))
+               set_bit(NILFS_SC_DIRTY, &sci->sc_flags);
+
+       if (nilfs_segctor_clean(sci))
+               goto out;
+
+       do {
+               sci->sc_stage.flags &= ~NILFS_CF_HISTORY_MASK;
+
+               err = nilfs_segctor_begin_construction(sci, nilfs);
+               if (unlikely(err))
+                       goto out;
+
+               /* Update time stamp */
+               sci->sc_seg_ctime = get_seconds();
+
+               err = nilfs_segctor_collect(sci, nilfs, mode);
+               if (unlikely(err))
+                       goto failed;
+
+               has_sr = (sci->sc_super_root != NULL);
+
+               /* Avoid empty segment */
+               if (sci->sc_stage.scnt == NILFS_ST_DONE &&
+                   NILFS_SEG_EMPTY(&sci->sc_curseg->sb_sum)) {
+                       nilfs_segctor_end_construction(sci, nilfs, 1);
+                       goto out;
+               }
+
+               err = nilfs_segctor_assign(sci, mode);
+               if (unlikely(err))
+                       goto failed;
+
+               if (sci->sc_stage.flags & NILFS_CF_IFILE_STARTED)
+                       nilfs_segctor_fill_in_file_bmap(sci, sbi->s_ifile);
+
+               if (has_sr) {
+                       err = nilfs_segctor_fill_in_checkpoint(sci);
+                       if (unlikely(err))
+                               goto failed_to_make_up;
+
+                       nilfs_segctor_fill_in_super_root(sci, nilfs);
+               }
+               nilfs_segctor_update_segusage(sci, nilfs->ns_sufile);
+
+               /* Write partial segments */
+               err = nilfs_segctor_prepare_write(sci, &failed_page);
+               if (unlikely(err))
+                       goto failed_to_write;
+
+               nilfs_segctor_fill_in_checksums(sci, nilfs->ns_crc_seed);
+
+               err = nilfs_segctor_write(sci, nilfs->ns_bdi);
+               if (unlikely(err))
+                       goto failed_to_write;
+
+               nilfs_segctor_complete_write(sci);
+
+               /* Commit segments */
+               if (has_sr) {
+                       nilfs_segctor_commit_free_segments(sci);
+                       nilfs_segctor_clear_metadata_dirty(sci);
+               }
+
+               nilfs_segctor_end_construction(sci, nilfs, 0);
+
+       } while (sci->sc_stage.scnt != NILFS_ST_DONE);
+
+ out:
+       nilfs_segctor_destroy_segment_buffers(sci);
+       nilfs_segctor_check_out_files(sci, sbi);
+       return err;
+
+ failed_to_write:
+       nilfs_segctor_abort_write(sci, failed_page, err);
+       nilfs_segctor_cancel_segusage(sci, nilfs->ns_sufile);
+
+ failed_to_make_up:
+       if (sci->sc_stage.flags & NILFS_CF_IFILE_STARTED)
+               nilfs_redirty_inodes(&sci->sc_dirty_files);
+
+ failed:
+       if (nilfs_doing_gc())
+               nilfs_redirty_inodes(&sci->sc_gc_inodes);
+       nilfs_segctor_end_construction(sci, nilfs, err);
+       goto out;
+}
+
+/**
+ * nilfs_secgtor_start_timer - set timer of background write
+ * @sci: nilfs_sc_info
+ *
+ * If the timer has already been set, it ignores the new request.
+ * This function MUST be called within a section locking the segment
+ * semaphore.
+ */
+static void nilfs_segctor_start_timer(struct nilfs_sc_info *sci)
+{
+       spin_lock(&sci->sc_state_lock);
+       if (sci->sc_timer && !(sci->sc_state & NILFS_SEGCTOR_COMMIT)) {
+               sci->sc_timer->expires = jiffies + sci->sc_interval;
+               add_timer(sci->sc_timer);
+               sci->sc_state |= NILFS_SEGCTOR_COMMIT;
+       }
+       spin_unlock(&sci->sc_state_lock);
+}
+
+static void nilfs_segctor_do_flush(struct nilfs_sc_info *sci, int bn)
+{
+       spin_lock(&sci->sc_state_lock);
+       if (!(sci->sc_flush_request & (1 << bn))) {
+               unsigned long prev_req = sci->sc_flush_request;
+
+               sci->sc_flush_request |= (1 << bn);
+               if (!prev_req)
+                       wake_up(&sci->sc_wait_daemon);
+       }
+       spin_unlock(&sci->sc_state_lock);
+}
+
+/**
+ * nilfs_flush_segment - trigger a segment construction for resource control
+ * @sb: super block
+ * @ino: inode number of the file to be flushed out.
+ */
+void nilfs_flush_segment(struct super_block *sb, ino_t ino)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct nilfs_sc_info *sci = NILFS_SC(sbi);
+
+       if (!sci || nilfs_doing_construction())
+               return;
+       nilfs_segctor_do_flush(sci, NILFS_MDT_INODE(sb, ino) ? ino : 0);
+                                       /* assign bit 0 to data files */
+}
+
+int nilfs_segctor_add_segments_to_be_freed(struct nilfs_sc_info *sci,
+                                          __u64 *segnum, size_t nsegs)
+{
+       struct nilfs_segment_entry *ent;
+       struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
+       struct inode *sufile = nilfs->ns_sufile;
+       LIST_HEAD(list);
+       __u64 *pnum;
+       size_t i;
+       int err;
+
+       for (pnum = segnum, i = 0; i < nsegs; pnum++, i++) {
+               ent = nilfs_alloc_segment_entry(*pnum);
+               if (unlikely(!ent)) {
+                       err = -ENOMEM;
+                       goto failed;
+               }
+               list_add_tail(&ent->list, &list);
+
+               err = nilfs_open_segment_entry(ent, sufile);
+               if (unlikely(err))
+                       goto failed;
+
+               if (unlikely(!nilfs_segment_usage_dirty(ent->raw_su)))
+                       printk(KERN_WARNING "NILFS: unused segment is "
+                              "requested to be cleaned (segnum=%llu)\n",
+                              (unsigned long long)ent->segnum);
+               nilfs_close_segment_entry(ent, sufile);
+       }
+       list_splice(&list, sci->sc_cleaning_segments.prev);
+       return 0;
+
+ failed:
+       nilfs_dispose_segment_list(&list);
+       return err;
+}
+
+void nilfs_segctor_clear_segments_to_be_freed(struct nilfs_sc_info *sci)
+{
+       nilfs_dispose_segment_list(&sci->sc_cleaning_segments);
+}
+
+struct nilfs_segctor_wait_request {
+       wait_queue_t    wq;
+       __u32           seq;
+       int             err;
+       atomic_t        done;
+};
+
+static int nilfs_segctor_sync(struct nilfs_sc_info *sci)
+{
+       struct nilfs_segctor_wait_request wait_req;
+       int err = 0;
+
+       spin_lock(&sci->sc_state_lock);
+       init_wait(&wait_req.wq);
+       wait_req.err = 0;
+       atomic_set(&wait_req.done, 0);
+       wait_req.seq = ++sci->sc_seq_request;
+       spin_unlock(&sci->sc_state_lock);
+
+       init_waitqueue_entry(&wait_req.wq, current);
+       add_wait_queue(&sci->sc_wait_request, &wait_req.wq);
+       set_current_state(TASK_INTERRUPTIBLE);
+       wake_up(&sci->sc_wait_daemon);
+
+       for (;;) {
+               if (atomic_read(&wait_req.done)) {
+                       err = wait_req.err;
+                       break;
+               }
+               if (!signal_pending(current)) {
+                       schedule();
+                       continue;
+               }
+               err = -ERESTARTSYS;
+               break;
+       }
+       finish_wait(&sci->sc_wait_request, &wait_req.wq);
+       return err;
+}
+
+static void nilfs_segctor_wakeup(struct nilfs_sc_info *sci, int err)
+{
+       struct nilfs_segctor_wait_request *wrq, *n;
+       unsigned long flags;
+
+       spin_lock_irqsave(&sci->sc_wait_request.lock, flags);
+       list_for_each_entry_safe(wrq, n, &sci->sc_wait_request.task_list,
+                                wq.task_list) {
+               if (!atomic_read(&wrq->done) &&
+                   nilfs_cnt32_ge(sci->sc_seq_done, wrq->seq)) {
+                       wrq->err = err;
+                       atomic_set(&wrq->done, 1);
+               }
+               if (atomic_read(&wrq->done)) {
+                       wrq->wq.func(&wrq->wq,
+                                    TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE,
+                                    0, NULL);
+               }
+       }
+       spin_unlock_irqrestore(&sci->sc_wait_request.lock, flags);
+}
+
+/**
+ * nilfs_construct_segment - construct a logical segment
+ * @sb: super block
+ *
+ * Return Value: On success, 0 is retured. On errors, one of the following
+ * negative error code is returned.
+ *
+ * %-EROFS - Read only filesystem.
+ *
+ * %-EIO - I/O error
+ *
+ * %-ENOSPC - No space left on device (only in a panic state).
+ *
+ * %-ERESTARTSYS - Interrupted.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ */
+int nilfs_construct_segment(struct super_block *sb)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct nilfs_sc_info *sci = NILFS_SC(sbi);
+       struct nilfs_transaction_info *ti;
+       int err;
+
+       if (!sci)
+               return -EROFS;
+
+       /* A call inside transactions causes a deadlock. */
+       BUG_ON((ti = current->journal_info) && ti->ti_magic == NILFS_TI_MAGIC);
+
+       err = nilfs_segctor_sync(sci);
+       return err;
+}
+
+/**
+ * nilfs_construct_dsync_segment - construct a data-only logical segment
+ * @sb: super block
+ * @inode: inode whose data blocks should be written out
+ * @start: start byte offset
+ * @end: end byte offset (inclusive)
+ *
+ * Return Value: On success, 0 is retured. On errors, one of the following
+ * negative error code is returned.
+ *
+ * %-EROFS - Read only filesystem.
+ *
+ * %-EIO - I/O error
+ *
+ * %-ENOSPC - No space left on device (only in a panic state).
+ *
+ * %-ERESTARTSYS - Interrupted.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ */
+int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode,
+                                 loff_t start, loff_t end)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct nilfs_sc_info *sci = NILFS_SC(sbi);
+       struct nilfs_inode_info *ii;
+       struct nilfs_transaction_info ti;
+       int err = 0;
+
+       if (!sci)
+               return -EROFS;
+
+       nilfs_transaction_lock(sbi, &ti, 0);
+
+       ii = NILFS_I(inode);
+       if (test_bit(NILFS_I_INODE_DIRTY, &ii->i_state) ||
+           nilfs_test_opt(sbi, STRICT_ORDER) ||
+           test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags) ||
+           nilfs_discontinued(sbi->s_nilfs)) {
+               nilfs_transaction_unlock(sbi);
+               err = nilfs_segctor_sync(sci);
+               return err;
+       }
+
+       spin_lock(&sbi->s_inode_lock);
+       if (!test_bit(NILFS_I_QUEUED, &ii->i_state) &&
+           !test_bit(NILFS_I_BUSY, &ii->i_state)) {
+               spin_unlock(&sbi->s_inode_lock);
+               nilfs_transaction_unlock(sbi);
+               return 0;
+       }
+       spin_unlock(&sbi->s_inode_lock);
+       sci->sc_dsync_inode = ii;
+       sci->sc_dsync_start = start;
+       sci->sc_dsync_end = end;
+
+       err = nilfs_segctor_do_construct(sci, SC_LSEG_DSYNC);
+
+       nilfs_transaction_unlock(sbi);
+       return err;
+}
+
+struct nilfs_segctor_req {
+       int mode;
+       __u32 seq_accepted;
+       int sc_err;  /* construction failure */
+       int sb_err;  /* super block writeback failure */
+};
+
+#define FLUSH_FILE_BIT (0x1) /* data file only */
+#define FLUSH_DAT_BIT  (1 << NILFS_DAT_INO) /* DAT only */
+
+static void nilfs_segctor_accept(struct nilfs_sc_info *sci,
+                                struct nilfs_segctor_req *req)
+{
+       req->sc_err = req->sb_err = 0;
+       spin_lock(&sci->sc_state_lock);
+       req->seq_accepted = sci->sc_seq_request;
+       spin_unlock(&sci->sc_state_lock);
+
+       if (sci->sc_timer)
+               del_timer_sync(sci->sc_timer);
+}
+
+static void nilfs_segctor_notify(struct nilfs_sc_info *sci,
+                                struct nilfs_segctor_req *req)
+{
+       /* Clear requests (even when the construction failed) */
+       spin_lock(&sci->sc_state_lock);
+
+       sci->sc_state &= ~NILFS_SEGCTOR_COMMIT;
+
+       if (req->mode == SC_LSEG_SR) {
+               sci->sc_seq_done = req->seq_accepted;
+               nilfs_segctor_wakeup(sci, req->sc_err ? : req->sb_err);
+               sci->sc_flush_request = 0;
+       } else if (req->mode == SC_FLUSH_FILE)
+               sci->sc_flush_request &= ~FLUSH_FILE_BIT;
+       else if (req->mode == SC_FLUSH_DAT)
+               sci->sc_flush_request &= ~FLUSH_DAT_BIT;
+
+       spin_unlock(&sci->sc_state_lock);
+}
+
+static int nilfs_segctor_construct(struct nilfs_sc_info *sci,
+                                  struct nilfs_segctor_req *req)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       int err = 0;
+
+       if (nilfs_discontinued(nilfs))
+               req->mode = SC_LSEG_SR;
+       if (!nilfs_segctor_confirm(sci)) {
+               err = nilfs_segctor_do_construct(sci, req->mode);
+               req->sc_err = err;
+       }
+       if (likely(!err)) {
+               if (req->mode != SC_FLUSH_DAT)
+                       atomic_set(&nilfs->ns_ndirtyblks, 0);
+               if (test_bit(NILFS_SC_SUPER_ROOT, &sci->sc_flags) &&
+                   nilfs_discontinued(nilfs)) {
+                       down_write(&nilfs->ns_sem);
+                       req->sb_err = nilfs_commit_super(sbi, 0);
+                       up_write(&nilfs->ns_sem);
+               }
+       }
+       return err;
+}
+
+static void nilfs_construction_timeout(unsigned long data)
+{
+       struct task_struct *p = (struct task_struct *)data;
+       wake_up_process(p);
+}
+
+static void
+nilfs_remove_written_gcinodes(struct the_nilfs *nilfs, struct list_head *head)
+{
+       struct nilfs_inode_info *ii, *n;
+
+       list_for_each_entry_safe(ii, n, head, i_dirty) {
+               if (!test_bit(NILFS_I_UPDATED, &ii->i_state))
+                       continue;
+               hlist_del_init(&ii->vfs_inode.i_hash);
+               list_del_init(&ii->i_dirty);
+               nilfs_clear_gcinode(&ii->vfs_inode);
+       }
+}
+
+int nilfs_clean_segments(struct super_block *sb, void __user *argp)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct nilfs_sc_info *sci = NILFS_SC(sbi);
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       struct nilfs_transaction_info ti;
+       struct nilfs_segctor_req req = { .mode = SC_LSEG_SR };
+       int err;
+
+       if (unlikely(!sci))
+               return -EROFS;
+
+       nilfs_transaction_lock(sbi, &ti, 1);
+
+       err = nilfs_init_gcdat_inode(nilfs);
+       if (unlikely(err))
+               goto out_unlock;
+       err = nilfs_ioctl_prepare_clean_segments(nilfs, argp);
+       if (unlikely(err))
+               goto out_unlock;
+
+       list_splice_init(&nilfs->ns_gc_inodes, sci->sc_gc_inodes.prev);
+
+       for (;;) {
+               nilfs_segctor_accept(sci, &req);
+               err = nilfs_segctor_construct(sci, &req);
+               nilfs_remove_written_gcinodes(nilfs, &sci->sc_gc_inodes);
+               nilfs_segctor_notify(sci, &req);
+
+               if (likely(!err))
+                       break;
+
+               nilfs_warning(sb, __func__,
+                             "segment construction failed. (err=%d)", err);
+               set_current_state(TASK_INTERRUPTIBLE);
+               schedule_timeout(sci->sc_interval);
+       }
+
+ out_unlock:
+       nilfs_clear_gcdat_inode(nilfs);
+       nilfs_transaction_unlock(sbi);
+       return err;
+}
+
+static void nilfs_segctor_thread_construct(struct nilfs_sc_info *sci, int mode)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       struct nilfs_transaction_info ti;
+       struct nilfs_segctor_req req = { .mode = mode };
+
+       nilfs_transaction_lock(sbi, &ti, 0);
+
+       nilfs_segctor_accept(sci, &req);
+       nilfs_segctor_construct(sci, &req);
+       nilfs_segctor_notify(sci, &req);
+
+       /*
+        * Unclosed segment should be retried.  We do this using sc_timer.
+        * Timeout of sc_timer will invoke complete construction which leads
+        * to close the current logical segment.
+        */
+       if (test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags))
+               nilfs_segctor_start_timer(sci);
+
+       nilfs_transaction_unlock(sbi);
+}
+
+static void nilfs_segctor_do_immediate_flush(struct nilfs_sc_info *sci)
+{
+       int mode = 0;
+       int err;
+
+       spin_lock(&sci->sc_state_lock);
+       mode = (sci->sc_flush_request & FLUSH_DAT_BIT) ?
+               SC_FLUSH_DAT : SC_FLUSH_FILE;
+       spin_unlock(&sci->sc_state_lock);
+
+       if (mode) {
+               err = nilfs_segctor_do_construct(sci, mode);
+
+               spin_lock(&sci->sc_state_lock);
+               sci->sc_flush_request &= (mode == SC_FLUSH_FILE) ?
+                       ~FLUSH_FILE_BIT : ~FLUSH_DAT_BIT;
+               spin_unlock(&sci->sc_state_lock);
+       }
+       clear_bit(NILFS_SC_PRIOR_FLUSH, &sci->sc_flags);
+}
+
+static int nilfs_segctor_flush_mode(struct nilfs_sc_info *sci)
+{
+       if (!test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags) ||
+           time_before(jiffies, sci->sc_lseg_stime + sci->sc_mjcp_freq)) {
+               if (!(sci->sc_flush_request & ~FLUSH_FILE_BIT))
+                       return SC_FLUSH_FILE;
+               else if (!(sci->sc_flush_request & ~FLUSH_DAT_BIT))
+                       return SC_FLUSH_DAT;
+       }
+       return SC_LSEG_SR;
+}
+
+/**
+ * nilfs_segctor_thread - main loop of the segment constructor thread.
+ * @arg: pointer to a struct nilfs_sc_info.
+ *
+ * nilfs_segctor_thread() initializes a timer and serves as a daemon
+ * to execute segment constructions.
+ */
+static int nilfs_segctor_thread(void *arg)
+{
+       struct nilfs_sc_info *sci = (struct nilfs_sc_info *)arg;
+       struct timer_list timer;
+       int timeout = 0;
+
+       init_timer(&timer);
+       timer.data = (unsigned long)current;
+       timer.function = nilfs_construction_timeout;
+       sci->sc_timer = &timer;
+
+       /* start sync. */
+       sci->sc_task = current;
+       wake_up(&sci->sc_wait_task); /* for nilfs_segctor_start_thread() */
+       printk(KERN_INFO
+              "segctord starting. Construction interval = %lu seconds, "
+              "CP frequency < %lu seconds\n",
+              sci->sc_interval / HZ, sci->sc_mjcp_freq / HZ);
+
+       spin_lock(&sci->sc_state_lock);
+ loop:
+       for (;;) {
+               int mode;
+
+               if (sci->sc_state & NILFS_SEGCTOR_QUIT)
+                       goto end_thread;
+
+               if (timeout || sci->sc_seq_request != sci->sc_seq_done)
+                       mode = SC_LSEG_SR;
+               else if (!sci->sc_flush_request)
+                       break;
+               else
+                       mode = nilfs_segctor_flush_mode(sci);
+
+               spin_unlock(&sci->sc_state_lock);
+               nilfs_segctor_thread_construct(sci, mode);
+               spin_lock(&sci->sc_state_lock);
+               timeout = 0;
+       }
+
+
+       if (freezing(current)) {
+               spin_unlock(&sci->sc_state_lock);
+               refrigerator();
+               spin_lock(&sci->sc_state_lock);
+       } else {
+               DEFINE_WAIT(wait);
+               int should_sleep = 1;
+
+               prepare_to_wait(&sci->sc_wait_daemon, &wait,
+                               TASK_INTERRUPTIBLE);
+
+               if (sci->sc_seq_request != sci->sc_seq_done)
+                       should_sleep = 0;
+               else if (sci->sc_flush_request)
+                       should_sleep = 0;
+               else if (sci->sc_state & NILFS_SEGCTOR_COMMIT)
+                       should_sleep = time_before(jiffies,
+                                                  sci->sc_timer->expires);
+
+               if (should_sleep) {
+                       spin_unlock(&sci->sc_state_lock);
+                       schedule();
+                       spin_lock(&sci->sc_state_lock);
+               }
+               finish_wait(&sci->sc_wait_daemon, &wait);
+               timeout = ((sci->sc_state & NILFS_SEGCTOR_COMMIT) &&
+                          time_after_eq(jiffies, sci->sc_timer->expires));
+       }
+       goto loop;
+
+ end_thread:
+       spin_unlock(&sci->sc_state_lock);
+       del_timer_sync(sci->sc_timer);
+       sci->sc_timer = NULL;
+
+       /* end sync. */
+       sci->sc_task = NULL;
+       wake_up(&sci->sc_wait_task); /* for nilfs_segctor_kill_thread() */
+       return 0;
+}
+
+static int nilfs_segctor_start_thread(struct nilfs_sc_info *sci)
+{
+       struct task_struct *t;
+
+       t = kthread_run(nilfs_segctor_thread, sci, "segctord");
+       if (IS_ERR(t)) {
+               int err = PTR_ERR(t);
+
+               printk(KERN_ERR "NILFS: error %d creating segctord thread\n",
+                      err);
+               return err;
+       }
+       wait_event(sci->sc_wait_task, sci->sc_task != NULL);
+       return 0;
+}
+
+static void nilfs_segctor_kill_thread(struct nilfs_sc_info *sci)
+{
+       sci->sc_state |= NILFS_SEGCTOR_QUIT;
+
+       while (sci->sc_task) {
+               wake_up(&sci->sc_wait_daemon);
+               spin_unlock(&sci->sc_state_lock);
+               wait_event(sci->sc_wait_task, sci->sc_task == NULL);
+               spin_lock(&sci->sc_state_lock);
+       }
+}
+
+static int nilfs_segctor_init(struct nilfs_sc_info *sci)
+{
+       sci->sc_seq_done = sci->sc_seq_request;
+
+       return nilfs_segctor_start_thread(sci);
+}
+
+/*
+ * Setup & clean-up functions
+ */
+static struct nilfs_sc_info *nilfs_segctor_new(struct nilfs_sb_info *sbi)
+{
+       struct nilfs_sc_info *sci;
+
+       sci = kzalloc(sizeof(*sci), GFP_KERNEL);
+       if (!sci)
+               return NULL;
+
+       sci->sc_sbi = sbi;
+       sci->sc_super = sbi->s_super;
+
+       init_waitqueue_head(&sci->sc_wait_request);
+       init_waitqueue_head(&sci->sc_wait_daemon);
+       init_waitqueue_head(&sci->sc_wait_task);
+       spin_lock_init(&sci->sc_state_lock);
+       INIT_LIST_HEAD(&sci->sc_dirty_files);
+       INIT_LIST_HEAD(&sci->sc_segbufs);
+       INIT_LIST_HEAD(&sci->sc_gc_inodes);
+       INIT_LIST_HEAD(&sci->sc_cleaning_segments);
+       INIT_LIST_HEAD(&sci->sc_copied_buffers);
+
+       sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT;
+       sci->sc_mjcp_freq = HZ * NILFS_SC_DEFAULT_SR_FREQ;
+       sci->sc_watermark = NILFS_SC_DEFAULT_WATERMARK;
+
+       if (sbi->s_interval)
+               sci->sc_interval = sbi->s_interval;
+       if (sbi->s_watermark)
+               sci->sc_watermark = sbi->s_watermark;
+       return sci;
+}
+
+static void nilfs_segctor_write_out(struct nilfs_sc_info *sci)
+{
+       int ret, retrycount = NILFS_SC_CLEANUP_RETRY;
+
+       /* The segctord thread was stopped and its timer was removed.
+          But some tasks remain. */
+       do {
+               struct nilfs_sb_info *sbi = sci->sc_sbi;
+               struct nilfs_transaction_info ti;
+               struct nilfs_segctor_req req = { .mode = SC_LSEG_SR };
+
+               nilfs_transaction_lock(sbi, &ti, 0);
+               nilfs_segctor_accept(sci, &req);
+               ret = nilfs_segctor_construct(sci, &req);
+               nilfs_segctor_notify(sci, &req);
+               nilfs_transaction_unlock(sbi);
+
+       } while (ret && retrycount-- > 0);
+}
+
+/**
+ * nilfs_segctor_destroy - destroy the segment constructor.
+ * @sci: nilfs_sc_info
+ *
+ * nilfs_segctor_destroy() kills the segctord thread and frees
+ * the nilfs_sc_info struct.
+ * Caller must hold the segment semaphore.
+ */
+static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
+{
+       struct nilfs_sb_info *sbi = sci->sc_sbi;
+       int flag;
+
+       up_write(&sbi->s_nilfs->ns_segctor_sem);
+
+       spin_lock(&sci->sc_state_lock);
+       nilfs_segctor_kill_thread(sci);
+       flag = ((sci->sc_state & NILFS_SEGCTOR_COMMIT) || sci->sc_flush_request
+               || sci->sc_seq_request != sci->sc_seq_done);
+       spin_unlock(&sci->sc_state_lock);
+
+       if (flag || nilfs_segctor_confirm(sci))
+               nilfs_segctor_write_out(sci);
+
+       WARN_ON(!list_empty(&sci->sc_copied_buffers));
+
+       if (!list_empty(&sci->sc_dirty_files)) {
+               nilfs_warning(sbi->s_super, __func__,
+                             "dirty file(s) after the final construction\n");
+               nilfs_dispose_list(sbi, &sci->sc_dirty_files, 1);
+       }
+
+       if (!list_empty(&sci->sc_cleaning_segments))
+               nilfs_dispose_segment_list(&sci->sc_cleaning_segments);
+
+       WARN_ON(!list_empty(&sci->sc_segbufs));
+
+       down_write(&sbi->s_nilfs->ns_segctor_sem);
+
+       kfree(sci);
+}
+
+/**
+ * nilfs_attach_segment_constructor - attach a segment constructor
+ * @sbi: nilfs_sb_info
+ *
+ * nilfs_attach_segment_constructor() allocates a struct nilfs_sc_info,
+ * initilizes it, and starts the segment constructor.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error code is returned.
+ *
+ * %-ENOMEM - Insufficient memory available.
+ */
+int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       int err;
+
+       /* Each field of nilfs_segctor is cleared through the initialization
+          of super-block info */
+       sbi->s_sc_info = nilfs_segctor_new(sbi);
+       if (!sbi->s_sc_info)
+               return -ENOMEM;
+
+       nilfs_attach_writer(nilfs, sbi);
+       err = nilfs_segctor_init(NILFS_SC(sbi));
+       if (err) {
+               nilfs_detach_writer(nilfs, sbi);
+               kfree(sbi->s_sc_info);
+               sbi->s_sc_info = NULL;
+       }
+       return err;
+}
+
+/**
+ * nilfs_detach_segment_constructor - destroy the segment constructor
+ * @sbi: nilfs_sb_info
+ *
+ * nilfs_detach_segment_constructor() kills the segment constructor daemon,
+ * frees the struct nilfs_sc_info, and destroy the dirty file list.
+ */
+void nilfs_detach_segment_constructor(struct nilfs_sb_info *sbi)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       LIST_HEAD(garbage_list);
+
+       down_write(&nilfs->ns_segctor_sem);
+       if (NILFS_SC(sbi)) {
+               nilfs_segctor_destroy(NILFS_SC(sbi));
+               sbi->s_sc_info = NULL;
+       }
+
+       /* Force to free the list of dirty files */
+       spin_lock(&sbi->s_inode_lock);
+       if (!list_empty(&sbi->s_dirty_files)) {
+               list_splice_init(&sbi->s_dirty_files, &garbage_list);
+               nilfs_warning(sbi->s_super, __func__,
+                             "Non empty dirty list after the last "
+                             "segment construction\n");
+       }
+       spin_unlock(&sbi->s_inode_lock);
+       up_write(&nilfs->ns_segctor_sem);
+
+       nilfs_dispose_list(sbi, &garbage_list, 1);
+       nilfs_detach_writer(nilfs, sbi);
+}
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h
new file mode 100644 (file)
index 0000000..a98fc1e
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * segment.h - NILFS Segment constructor prototypes and definitions
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+#ifndef _NILFS_SEGMENT_H
+#define _NILFS_SEGMENT_H
+
+#include <linux/types.h>
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/nilfs2_fs.h>
+#include "sb.h"
+
+/**
+ * struct nilfs_recovery_info - Recovery infomation
+ * @ri_need_recovery: Recovery status
+ * @ri_super_root: Block number of the last super root
+ * @ri_ri_cno: Number of the last checkpoint
+ * @ri_lsegs_start: Region for roll-forwarding (start block number)
+ * @ri_lsegs_end: Region for roll-forwarding (end block number)
+ * @ri_lseg_start_seq: Sequence value of the segment at ri_lsegs_start
+ * @ri_used_segments: List of segments to be mark active
+ * @ri_pseg_start: Block number of the last partial segment
+ * @ri_seq: Sequence number on the last partial segment
+ * @ri_segnum: Segment number on the last partial segment
+ * @ri_nextnum: Next segment number on the last partial segment
+ */
+struct nilfs_recovery_info {
+       int                     ri_need_recovery;
+       sector_t                ri_super_root;
+       __u64                   ri_cno;
+
+       sector_t                ri_lsegs_start;
+       sector_t                ri_lsegs_end;
+       u64                     ri_lsegs_start_seq;
+       struct list_head        ri_used_segments;
+       sector_t                ri_pseg_start;
+       u64                     ri_seq;
+       __u64                   ri_segnum;
+       __u64                   ri_nextnum;
+};
+
+/* ri_need_recovery */
+#define NILFS_RECOVERY_SR_UPDATED       1  /* The super root was updated */
+#define NILFS_RECOVERY_ROLLFORWARD_DONE         2  /* Rollforward was carried out */
+
+/**
+ * struct nilfs_cstage - Context of collection stage
+ * @scnt: Stage count
+ * @flags: State flags
+ * @dirty_file_ptr: Pointer on dirty_files list, or inode of a target file
+ * @gc_inode_ptr: Pointer on the list of gc-inodes
+ */
+struct nilfs_cstage {
+       int                     scnt;
+       unsigned                flags;
+       struct nilfs_inode_info *dirty_file_ptr;
+       struct nilfs_inode_info *gc_inode_ptr;
+};
+
+struct nilfs_segment_buffer;
+
+struct nilfs_segsum_pointer {
+       struct buffer_head     *bh;
+       unsigned                offset; /* offset in bytes */
+};
+
+/**
+ * struct nilfs_sc_info - Segment constructor information
+ * @sc_super: Back pointer to super_block struct
+ * @sc_sbi: Back pointer to nilfs_sb_info struct
+ * @sc_nblk_inc: Block count of current generation
+ * @sc_dirty_files: List of files to be written
+ * @sc_gc_inodes: List of GC inodes having blocks to be written
+ * @sc_cleaning_segments: List of segments to be freed through construction
+ * @sc_copied_buffers: List of copied buffers (buffer heads) to freeze data
+ * @sc_dsync_inode: inode whose data pages are written for a sync operation
+ * @sc_dsync_start: start byte offset of data pages
+ * @sc_dsync_end: end byte offset of data pages (inclusive)
+ * @sc_segbufs: List of segment buffers
+ * @sc_segbuf_nblocks: Number of available blocks in segment buffers.
+ * @sc_curseg: Current segment buffer
+ * @sc_super_root: Pointer to the super root buffer
+ * @sc_stage: Collection stage
+ * @sc_finfo_ptr: pointer to the current finfo struct in the segment summary
+ * @sc_binfo_ptr: pointer to the current binfo struct in the segment summary
+ * @sc_blk_cnt:        Block count of a file
+ * @sc_datablk_cnt: Data block count of a file
+ * @sc_nblk_this_inc: Number of blocks included in the current logical segment
+ * @sc_seg_ctime: Creation time
+ * @sc_flags: Internal flags
+ * @sc_state_lock: spinlock for sc_state and so on
+ * @sc_state: Segctord state flags
+ * @sc_flush_request: inode bitmap of metadata files to be flushed
+ * @sc_wait_request: Client request queue
+ * @sc_wait_daemon: Daemon wait queue
+ * @sc_wait_task: Start/end wait queue to control segctord task
+ * @sc_seq_request: Request counter
+ * @sc_seq_done: Completion counter
+ * @sc_sync: Request of explicit sync operation
+ * @sc_interval: Timeout value of background construction
+ * @sc_mjcp_freq: Frequency of creating checkpoints
+ * @sc_lseg_stime: Start time of the latest logical segment
+ * @sc_watermark: Watermark for the number of dirty buffers
+ * @sc_timer: Timer for segctord
+ * @sc_task: current thread of segctord
+ */
+struct nilfs_sc_info {
+       struct super_block     *sc_super;
+       struct nilfs_sb_info   *sc_sbi;
+
+       unsigned long           sc_nblk_inc;
+
+       struct list_head        sc_dirty_files;
+       struct list_head        sc_gc_inodes;
+       struct list_head        sc_cleaning_segments;
+       struct list_head        sc_copied_buffers;
+
+       struct nilfs_inode_info *sc_dsync_inode;
+       loff_t                  sc_dsync_start;
+       loff_t                  sc_dsync_end;
+
+       /* Segment buffers */
+       struct list_head        sc_segbufs;
+       unsigned long           sc_segbuf_nblocks;
+       struct nilfs_segment_buffer *sc_curseg;
+       struct buffer_head     *sc_super_root;
+
+       struct nilfs_cstage     sc_stage;
+
+       struct nilfs_segsum_pointer sc_finfo_ptr;
+       struct nilfs_segsum_pointer sc_binfo_ptr;
+       unsigned long           sc_blk_cnt;
+       unsigned long           sc_datablk_cnt;
+       unsigned long           sc_nblk_this_inc;
+       time_t                  sc_seg_ctime;
+
+       unsigned long           sc_flags;
+
+       spinlock_t              sc_state_lock;
+       unsigned long           sc_state;
+       unsigned long           sc_flush_request;
+
+       wait_queue_head_t       sc_wait_request;
+       wait_queue_head_t       sc_wait_daemon;
+       wait_queue_head_t       sc_wait_task;
+
+       __u32                   sc_seq_request;
+       __u32                   sc_seq_done;
+
+       int                     sc_sync;
+       unsigned long           sc_interval;
+       unsigned long           sc_mjcp_freq;
+       unsigned long           sc_lseg_stime;  /* in 1/HZ seconds */
+       unsigned long           sc_watermark;
+
+       struct timer_list      *sc_timer;
+       struct task_struct     *sc_task;
+};
+
+/* sc_flags */
+enum {
+       NILFS_SC_DIRTY,         /* One or more dirty meta-data blocks exist */
+       NILFS_SC_UNCLOSED,      /* Logical segment is not closed */
+       NILFS_SC_SUPER_ROOT,    /* The latest segment has a super root */
+       NILFS_SC_PRIOR_FLUSH,   /* Requesting immediate flush without making a
+                                  checkpoint */
+       NILFS_SC_HAVE_DELTA,    /* Next checkpoint will have update of files
+                                  other than DAT, cpfile, sufile, or files
+                                  moved by GC */
+};
+
+/* sc_state */
+#define NILFS_SEGCTOR_QUIT         0x0001  /* segctord is being destroyed */
+#define NILFS_SEGCTOR_COMMIT       0x0004  /* committed transaction exists */
+
+/*
+ * Constant parameters
+ */
+#define NILFS_SC_CLEANUP_RETRY     3  /* Retry count of construction when
+                                         destroying segctord */
+
+/*
+ * Default values of timeout, in seconds.
+ */
+#define NILFS_SC_DEFAULT_TIMEOUT    5   /* Timeout value of dirty blocks.
+                                          It triggers construction of a
+                                          logical segment with a super root */
+#define NILFS_SC_DEFAULT_SR_FREQ    30  /* Maximum frequency of super root
+                                          creation */
+
+/*
+ * The default threshold amount of data, in block counts.
+ */
+#define NILFS_SC_DEFAULT_WATERMARK  3600
+
+
+/* segment.c */
+extern int nilfs_init_transaction_cache(void);
+extern void nilfs_destroy_transaction_cache(void);
+extern void nilfs_relax_pressure_in_lock(struct super_block *);
+
+extern int nilfs_construct_segment(struct super_block *);
+extern int nilfs_construct_dsync_segment(struct super_block *, struct inode *,
+                                        loff_t, loff_t);
+extern void nilfs_flush_segment(struct super_block *, ino_t);
+extern int nilfs_clean_segments(struct super_block *, void __user *);
+
+extern int nilfs_segctor_add_segments_to_be_freed(struct nilfs_sc_info *,
+                                                 __u64 *, size_t);
+extern void nilfs_segctor_clear_segments_to_be_freed(struct nilfs_sc_info *);
+
+extern int nilfs_attach_segment_constructor(struct nilfs_sb_info *);
+extern void nilfs_detach_segment_constructor(struct nilfs_sb_info *);
+
+/* recovery.c */
+extern int nilfs_read_super_root_block(struct super_block *, sector_t,
+                                      struct buffer_head **, int);
+extern int nilfs_search_super_root(struct the_nilfs *, struct nilfs_sb_info *,
+                                  struct nilfs_recovery_info *);
+extern int nilfs_recover_logical_segments(struct the_nilfs *,
+                                         struct nilfs_sb_info *,
+                                         struct nilfs_recovery_info *);
+
+#endif /* _NILFS_SEGMENT_H */
diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c
new file mode 100644 (file)
index 0000000..c774cf3
--- /dev/null
@@ -0,0 +1,640 @@
+/*
+ * sufile.c - NILFS segment usage file.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/string.h>
+#include <linux/buffer_head.h>
+#include <linux/errno.h>
+#include <linux/nilfs2_fs.h>
+#include "mdt.h"
+#include "sufile.h"
+
+
+static inline unsigned long
+nilfs_sufile_segment_usages_per_block(const struct inode *sufile)
+{
+       return NILFS_MDT(sufile)->mi_entries_per_block;
+}
+
+static unsigned long
+nilfs_sufile_get_blkoff(const struct inode *sufile, __u64 segnum)
+{
+       __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset;
+       do_div(t, nilfs_sufile_segment_usages_per_block(sufile));
+       return (unsigned long)t;
+}
+
+static unsigned long
+nilfs_sufile_get_offset(const struct inode *sufile, __u64 segnum)
+{
+       __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset;
+       return do_div(t, nilfs_sufile_segment_usages_per_block(sufile));
+}
+
+static unsigned long
+nilfs_sufile_segment_usages_in_block(const struct inode *sufile, __u64 curr,
+                                    __u64 max)
+{
+       return min_t(unsigned long,
+                    nilfs_sufile_segment_usages_per_block(sufile) -
+                    nilfs_sufile_get_offset(sufile, curr),
+                    max - curr + 1);
+}
+
+static inline struct nilfs_sufile_header *
+nilfs_sufile_block_get_header(const struct inode *sufile,
+                             struct buffer_head *bh,
+                             void *kaddr)
+{
+       return kaddr + bh_offset(bh);
+}
+
+static struct nilfs_segment_usage *
+nilfs_sufile_block_get_segment_usage(const struct inode *sufile, __u64 segnum,
+                                    struct buffer_head *bh, void *kaddr)
+{
+       return kaddr + bh_offset(bh) +
+               nilfs_sufile_get_offset(sufile, segnum) *
+               NILFS_MDT(sufile)->mi_entry_size;
+}
+
+static inline int nilfs_sufile_get_header_block(struct inode *sufile,
+                                               struct buffer_head **bhp)
+{
+       return nilfs_mdt_get_block(sufile, 0, 0, NULL, bhp);
+}
+
+static inline int
+nilfs_sufile_get_segment_usage_block(struct inode *sufile, __u64 segnum,
+                                    int create, struct buffer_head **bhp)
+{
+       return nilfs_mdt_get_block(sufile,
+                                  nilfs_sufile_get_blkoff(sufile, segnum),
+                                  create, NULL, bhp);
+}
+
+/**
+ * nilfs_sufile_alloc - allocate a segment
+ * @sufile: inode of segment usage file
+ * @segnump: pointer to segment number
+ *
+ * Description: nilfs_sufile_alloc() allocates a clean segment.
+ *
+ * Return Value: On success, 0 is returned and the segment number of the
+ * allocated segment is stored in the place pointed by @segnump. On error, one
+ * of the following negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-ENOSPC - No clean segment left.
+ */
+int nilfs_sufile_alloc(struct inode *sufile, __u64 *segnump)
+{
+       struct buffer_head *header_bh, *su_bh;
+       struct the_nilfs *nilfs;
+       struct nilfs_sufile_header *header;
+       struct nilfs_segment_usage *su;
+       size_t susz = NILFS_MDT(sufile)->mi_entry_size;
+       __u64 segnum, maxsegnum, last_alloc;
+       void *kaddr;
+       unsigned long nsegments, ncleansegs, nsus;
+       int ret, i, j;
+
+       down_write(&NILFS_MDT(sufile)->mi_sem);
+
+       nilfs = NILFS_MDT(sufile)->mi_nilfs;
+
+       ret = nilfs_sufile_get_header_block(sufile, &header_bh);
+       if (ret < 0)
+               goto out_sem;
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_sufile_block_get_header(sufile, header_bh, kaddr);
+       ncleansegs = le64_to_cpu(header->sh_ncleansegs);
+       last_alloc = le64_to_cpu(header->sh_last_alloc);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nsegments = nilfs_sufile_get_nsegments(sufile);
+       segnum = last_alloc + 1;
+       maxsegnum = nsegments - 1;
+       for (i = 0; i < nsegments; i += nsus) {
+               if (segnum >= nsegments) {
+                       /* wrap around */
+                       segnum = 0;
+                       maxsegnum = last_alloc;
+               }
+               ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 1,
+                                                          &su_bh);
+               if (ret < 0)
+                       goto out_header;
+               kaddr = kmap_atomic(su_bh->b_page, KM_USER0);
+               su = nilfs_sufile_block_get_segment_usage(
+                       sufile, segnum, su_bh, kaddr);
+
+               nsus = nilfs_sufile_segment_usages_in_block(
+                       sufile, segnum, maxsegnum);
+               for (j = 0; j < nsus; j++, su = (void *)su + susz, segnum++) {
+                       if (!nilfs_segment_usage_clean(su))
+                               continue;
+                       /* found a clean segment */
+                       nilfs_segment_usage_set_dirty(su);
+                       kunmap_atomic(kaddr, KM_USER0);
+
+                       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+                       header = nilfs_sufile_block_get_header(
+                               sufile, header_bh, kaddr);
+                       le64_add_cpu(&header->sh_ncleansegs, -1);
+                       le64_add_cpu(&header->sh_ndirtysegs, 1);
+                       header->sh_last_alloc = cpu_to_le64(segnum);
+                       kunmap_atomic(kaddr, KM_USER0);
+
+                       nilfs_mdt_mark_buffer_dirty(header_bh);
+                       nilfs_mdt_mark_buffer_dirty(su_bh);
+                       nilfs_mdt_mark_dirty(sufile);
+                       brelse(su_bh);
+                       *segnump = segnum;
+                       goto out_header;
+               }
+
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(su_bh);
+       }
+
+       /* no segments left */
+       ret = -ENOSPC;
+
+ out_header:
+       brelse(header_bh);
+
+ out_sem:
+       up_write(&NILFS_MDT(sufile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_sufile_cancel_free -
+ * @sufile: inode of segment usage file
+ * @segnum: segment number
+ *
+ * Description:
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_sufile_cancel_free(struct inode *sufile, __u64 segnum)
+{
+       struct buffer_head *header_bh, *su_bh;
+       struct the_nilfs *nilfs;
+       struct nilfs_sufile_header *header;
+       struct nilfs_segment_usage *su;
+       void *kaddr;
+       int ret;
+
+       down_write(&NILFS_MDT(sufile)->mi_sem);
+
+       nilfs = NILFS_MDT(sufile)->mi_nilfs;
+
+       ret = nilfs_sufile_get_header_block(sufile, &header_bh);
+       if (ret < 0)
+               goto out_sem;
+
+       ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &su_bh);
+       if (ret < 0)
+               goto out_header;
+
+       kaddr = kmap_atomic(su_bh->b_page, KM_USER0);
+       su = nilfs_sufile_block_get_segment_usage(
+               sufile, segnum, su_bh, kaddr);
+       if (unlikely(!nilfs_segment_usage_clean(su))) {
+               printk(KERN_WARNING "%s: segment %llu must be clean\n",
+                      __func__, (unsigned long long)segnum);
+               kunmap_atomic(kaddr, KM_USER0);
+               goto out_su_bh;
+       }
+       nilfs_segment_usage_set_dirty(su);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_sufile_block_get_header(sufile, header_bh, kaddr);
+       le64_add_cpu(&header->sh_ncleansegs, -1);
+       le64_add_cpu(&header->sh_ndirtysegs, 1);
+       kunmap_atomic(kaddr, KM_USER0);
+
+       nilfs_mdt_mark_buffer_dirty(header_bh);
+       nilfs_mdt_mark_buffer_dirty(su_bh);
+       nilfs_mdt_mark_dirty(sufile);
+
+ out_su_bh:
+       brelse(su_bh);
+ out_header:
+       brelse(header_bh);
+ out_sem:
+       up_write(&NILFS_MDT(sufile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_sufile_freev - free segments
+ * @sufile: inode of segment usage file
+ * @segnum: array of segment numbers
+ * @nsegs: number of segments
+ *
+ * Description: nilfs_sufile_freev() frees segments specified by @segnum and
+ * @nsegs, which must have been returned by a previous call to
+ * nilfs_sufile_alloc().
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+#define NILFS_SUFILE_FREEV_PREALLOC    16
+int nilfs_sufile_freev(struct inode *sufile, __u64 *segnum, size_t nsegs)
+{
+       struct buffer_head *header_bh, **su_bh,
+               *su_bh_prealloc[NILFS_SUFILE_FREEV_PREALLOC];
+       struct the_nilfs *nilfs;
+       struct nilfs_sufile_header *header;
+       struct nilfs_segment_usage *su;
+       void *kaddr;
+       int ret, i;
+
+       down_write(&NILFS_MDT(sufile)->mi_sem);
+
+       nilfs = NILFS_MDT(sufile)->mi_nilfs;
+
+       /* prepare resources */
+       if (nsegs <= NILFS_SUFILE_FREEV_PREALLOC)
+               su_bh = su_bh_prealloc;
+       else {
+               su_bh = kmalloc(sizeof(*su_bh) * nsegs, GFP_NOFS);
+               if (su_bh == NULL) {
+                       ret = -ENOMEM;
+                       goto out_sem;
+               }
+       }
+
+       ret = nilfs_sufile_get_header_block(sufile, &header_bh);
+       if (ret < 0)
+               goto out_su_bh;
+       for (i = 0; i < nsegs; i++) {
+               ret = nilfs_sufile_get_segment_usage_block(sufile, segnum[i],
+                                                          0, &su_bh[i]);
+               if (ret < 0)
+                       goto out_bh;
+       }
+
+       /* free segments */
+       for (i = 0; i < nsegs; i++) {
+               kaddr = kmap_atomic(su_bh[i]->b_page, KM_USER0);
+               su = nilfs_sufile_block_get_segment_usage(
+                       sufile, segnum[i], su_bh[i], kaddr);
+               WARN_ON(nilfs_segment_usage_error(su));
+               nilfs_segment_usage_set_clean(su);
+               kunmap_atomic(kaddr, KM_USER0);
+               nilfs_mdt_mark_buffer_dirty(su_bh[i]);
+       }
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_sufile_block_get_header(sufile, header_bh, kaddr);
+       le64_add_cpu(&header->sh_ncleansegs, nsegs);
+       le64_add_cpu(&header->sh_ndirtysegs, -(u64)nsegs);
+       kunmap_atomic(kaddr, KM_USER0);
+       nilfs_mdt_mark_buffer_dirty(header_bh);
+       nilfs_mdt_mark_dirty(sufile);
+
+ out_bh:
+       for (i--; i >= 0; i--)
+               brelse(su_bh[i]);
+       brelse(header_bh);
+
+ out_su_bh:
+       if (su_bh != su_bh_prealloc)
+               kfree(su_bh);
+
+ out_sem:
+       up_write(&NILFS_MDT(sufile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_sufile_free -
+ * @sufile:
+ * @segnum:
+ */
+int nilfs_sufile_free(struct inode *sufile, __u64 segnum)
+{
+       return nilfs_sufile_freev(sufile, &segnum, 1);
+}
+
+/**
+ * nilfs_sufile_get_segment_usage - get a segment usage
+ * @sufile: inode of segment usage file
+ * @segnum: segment number
+ * @sup: pointer to segment usage
+ * @bhp: pointer to buffer head
+ *
+ * Description: nilfs_sufile_get_segment_usage() acquires the segment usage
+ * specified by @segnum.
+ *
+ * Return Value: On success, 0 is returned, and the segment usage and the
+ * buffer head of the buffer on which the segment usage is located are stored
+ * in the place pointed by @sup and @bhp, respectively. On error, one of the
+ * following negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-EINVAL - Invalid segment usage number.
+ */
+int nilfs_sufile_get_segment_usage(struct inode *sufile, __u64 segnum,
+                                  struct nilfs_segment_usage **sup,
+                                  struct buffer_head **bhp)
+{
+       struct buffer_head *bh;
+       struct nilfs_segment_usage *su;
+       void *kaddr;
+       int ret;
+
+       /* segnum is 0 origin */
+       if (segnum >= nilfs_sufile_get_nsegments(sufile))
+               return -EINVAL;
+       down_write(&NILFS_MDT(sufile)->mi_sem);
+       ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 1, &bh);
+       if (ret < 0)
+               goto out_sem;
+       kaddr = kmap(bh->b_page);
+       su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr);
+       if (nilfs_segment_usage_error(su)) {
+               kunmap(bh->b_page);
+               brelse(bh);
+               ret = -EINVAL;
+               goto out_sem;
+       }
+
+       if (sup != NULL)
+               *sup = su;
+       *bhp = bh;
+
+ out_sem:
+       up_write(&NILFS_MDT(sufile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_sufile_put_segment_usage - put a segment usage
+ * @sufile: inode of segment usage file
+ * @segnum: segment number
+ * @bh: buffer head
+ *
+ * Description: nilfs_sufile_put_segment_usage() releases the segment usage
+ * specified by @segnum. @bh must be the buffer head which have been returned
+ * by a previous call to nilfs_sufile_get_segment_usage() with @segnum.
+ */
+void nilfs_sufile_put_segment_usage(struct inode *sufile, __u64 segnum,
+                                   struct buffer_head *bh)
+{
+       kunmap(bh->b_page);
+       brelse(bh);
+}
+
+/**
+ * nilfs_sufile_get_stat - get segment usage statistics
+ * @sufile: inode of segment usage file
+ * @stat: pointer to a structure of segment usage statistics
+ *
+ * Description: nilfs_sufile_get_stat() returns information about segment
+ * usage.
+ *
+ * Return Value: On success, 0 is returned, and segment usage information is
+ * stored in the place pointed by @stat. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_sufile_get_stat(struct inode *sufile, struct nilfs_sustat *sustat)
+{
+       struct buffer_head *header_bh;
+       struct nilfs_sufile_header *header;
+       struct the_nilfs *nilfs = NILFS_MDT(sufile)->mi_nilfs;
+       void *kaddr;
+       int ret;
+
+       down_read(&NILFS_MDT(sufile)->mi_sem);
+
+       ret = nilfs_sufile_get_header_block(sufile, &header_bh);
+       if (ret < 0)
+               goto out_sem;
+
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_sufile_block_get_header(sufile, header_bh, kaddr);
+       sustat->ss_nsegs = nilfs_sufile_get_nsegments(sufile);
+       sustat->ss_ncleansegs = le64_to_cpu(header->sh_ncleansegs);
+       sustat->ss_ndirtysegs = le64_to_cpu(header->sh_ndirtysegs);
+       sustat->ss_ctime = nilfs->ns_ctime;
+       sustat->ss_nongc_ctime = nilfs->ns_nongc_ctime;
+       spin_lock(&nilfs->ns_last_segment_lock);
+       sustat->ss_prot_seq = nilfs->ns_prot_seq;
+       spin_unlock(&nilfs->ns_last_segment_lock);
+       kunmap_atomic(kaddr, KM_USER0);
+       brelse(header_bh);
+
+ out_sem:
+       up_read(&NILFS_MDT(sufile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_sufile_get_ncleansegs - get the number of clean segments
+ * @sufile: inode of segment usage file
+ * @nsegsp: pointer to the number of clean segments
+ *
+ * Description: nilfs_sufile_get_ncleansegs() acquires the number of clean
+ * segments.
+ *
+ * Return Value: On success, 0 is returned and the number of clean segments is
+ * stored in the place pointed by @nsegsp. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+int nilfs_sufile_get_ncleansegs(struct inode *sufile, unsigned long *nsegsp)
+{
+       struct nilfs_sustat sustat;
+       int ret;
+
+       ret = nilfs_sufile_get_stat(sufile, &sustat);
+       if (ret == 0)
+               *nsegsp = sustat.ss_ncleansegs;
+       return ret;
+}
+
+/**
+ * nilfs_sufile_set_error - mark a segment as erroneous
+ * @sufile: inode of segment usage file
+ * @segnum: segment number
+ *
+ * Description: nilfs_sufile_set_error() marks the segment specified by
+ * @segnum as erroneous. The error segment will never be used again.
+ *
+ * Return Value: On success, 0 is returned. On error, one of the following
+ * negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ *
+ * %-EINVAL - Invalid segment usage number.
+ */
+int nilfs_sufile_set_error(struct inode *sufile, __u64 segnum)
+{
+       struct buffer_head *header_bh, *su_bh;
+       struct nilfs_segment_usage *su;
+       struct nilfs_sufile_header *header;
+       void *kaddr;
+       int ret;
+
+       if (unlikely(segnum >= nilfs_sufile_get_nsegments(sufile))) {
+               printk(KERN_WARNING "%s: invalid segment number: %llu\n",
+                      __func__, (unsigned long long)segnum);
+               return -EINVAL;
+       }
+       down_write(&NILFS_MDT(sufile)->mi_sem);
+
+       ret = nilfs_sufile_get_header_block(sufile, &header_bh);
+       if (ret < 0)
+               goto out_sem;
+       ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &su_bh);
+       if (ret < 0)
+               goto out_header;
+
+       kaddr = kmap_atomic(su_bh->b_page, KM_USER0);
+       su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr);
+       if (nilfs_segment_usage_error(su)) {
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(su_bh);
+               goto out_header;
+       }
+
+       nilfs_segment_usage_set_error(su);
+       kunmap_atomic(kaddr, KM_USER0);
+       brelse(su_bh);
+
+       kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
+       header = nilfs_sufile_block_get_header(sufile, header_bh, kaddr);
+       le64_add_cpu(&header->sh_ndirtysegs, -1);
+       kunmap_atomic(kaddr, KM_USER0);
+       nilfs_mdt_mark_buffer_dirty(header_bh);
+       nilfs_mdt_mark_buffer_dirty(su_bh);
+       nilfs_mdt_mark_dirty(sufile);
+       brelse(su_bh);
+
+ out_header:
+       brelse(header_bh);
+
+ out_sem:
+       up_write(&NILFS_MDT(sufile)->mi_sem);
+       return ret;
+}
+
+/**
+ * nilfs_sufile_get_suinfo -
+ * @sufile: inode of segment usage file
+ * @segnum: segment number to start looking
+ * @si: array of suinfo
+ * @nsi: size of suinfo array
+ *
+ * Description:
+ *
+ * Return Value: On success, 0 is returned and .... On error, one of the
+ * following negative error codes is returned.
+ *
+ * %-EIO - I/O error.
+ *
+ * %-ENOMEM - Insufficient amount of memory available.
+ */
+ssize_t nilfs_sufile_get_suinfo(struct inode *sufile, __u64 segnum,
+                               struct nilfs_suinfo *si, size_t nsi)
+{
+       struct buffer_head *su_bh;
+       struct nilfs_segment_usage *su;
+       size_t susz = NILFS_MDT(sufile)->mi_entry_size;
+       struct the_nilfs *nilfs = NILFS_MDT(sufile)->mi_nilfs;
+       void *kaddr;
+       unsigned long nsegs, segusages_per_block;
+       ssize_t n;
+       int ret, i, j;
+
+       down_read(&NILFS_MDT(sufile)->mi_sem);
+
+       segusages_per_block = nilfs_sufile_segment_usages_per_block(sufile);
+       nsegs = min_t(unsigned long,
+                     nilfs_sufile_get_nsegments(sufile) - segnum,
+                     nsi);
+       for (i = 0; i < nsegs; i += n, segnum += n) {
+               n = min_t(unsigned long,
+                         segusages_per_block -
+                                 nilfs_sufile_get_offset(sufile, segnum),
+                         nsegs - i);
+               ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0,
+                                                          &su_bh);
+               if (ret < 0) {
+                       if (ret != -ENOENT)
+                               goto out;
+                       /* hole */
+                       memset(&si[i], 0, sizeof(struct nilfs_suinfo) * n);
+                       continue;
+               }
+
+               kaddr = kmap_atomic(su_bh->b_page, KM_USER0);
+               su = nilfs_sufile_block_get_segment_usage(
+                       sufile, segnum, su_bh, kaddr);
+               for (j = 0; j < n; j++, su = (void *)su + susz) {
+                       si[i + j].sui_lastmod = le64_to_cpu(su->su_lastmod);
+                       si[i + j].sui_nblocks = le32_to_cpu(su->su_nblocks);
+                       si[i + j].sui_flags = le32_to_cpu(su->su_flags) &
+                               ~(1UL << NILFS_SEGMENT_USAGE_ACTIVE);
+                       if (nilfs_segment_is_active(nilfs, segnum + i + j))
+                               si[i + j].sui_flags |=
+                                       (1UL << NILFS_SEGMENT_USAGE_ACTIVE);
+               }
+               kunmap_atomic(kaddr, KM_USER0);
+               brelse(su_bh);
+       }
+       ret = nsegs;
+
+ out:
+       up_read(&NILFS_MDT(sufile)->mi_sem);
+       return ret;
+}
diff --git a/fs/nilfs2/sufile.h b/fs/nilfs2/sufile.h
new file mode 100644 (file)
index 0000000..d595f33
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * sufile.h - NILFS segment usage file.
+ *
+ * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>.
+ */
+
+#ifndef _NILFS_SUFILE_H
+#define _NILFS_SUFILE_H
+
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/nilfs2_fs.h>
+#include "mdt.h"
+
+#define NILFS_SUFILE_GFP       NILFS_MDT_GFP
+
+static inline unsigned long nilfs_sufile_get_nsegments(struct inode *sufile)
+{
+       return NILFS_MDT(sufile)->mi_nilfs->ns_nsegments;
+}
+
+int nilfs_sufile_alloc(struct inode *, __u64 *);
+int nilfs_sufile_cancel_free(struct inode *, __u64);
+int nilfs_sufile_freev(struct inode *, __u64 *, size_t);
+int nilfs_sufile_free(struct inode *, __u64);
+int nilfs_sufile_get_segment_usage(struct inode *, __u64,
+                                  struct nilfs_segment_usage **,
+                                  struct buffer_head **);
+void nilfs_sufile_put_segment_usage(struct inode *, __u64,
+                                   struct buffer_head *);
+int nilfs_sufile_get_stat(struct inode *, struct nilfs_sustat *);
+int nilfs_sufile_get_ncleansegs(struct inode *, unsigned long *);
+int nilfs_sufile_set_error(struct inode *, __u64);
+ssize_t nilfs_sufile_get_suinfo(struct inode *, __u64, struct nilfs_suinfo *,
+                               size_t);
+
+
+#endif /* _NILFS_SUFILE_H */
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
new file mode 100644 (file)
index 0000000..e117e1e
--- /dev/null
@@ -0,0 +1,1323 @@
+/*
+ * super.c - NILFS module and super block management.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ */
+/*
+ *  linux/fs/ext2/super.c
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ *  from
+ *
+ *  linux/fs/minix/inode.c
+ *
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ *
+ *  Big-endian to little-endian byte-swapping/bitmaps by
+ *        David S. Miller (davem@caip.rutgers.edu), 1995
+ */
+
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <linux/parser.h>
+#include <linux/random.h>
+#include <linux/crc32.h>
+#include <linux/smp_lock.h>
+#include <linux/vfs.h>
+#include <linux/writeback.h>
+#include <linux/kobject.h>
+#include <linux/exportfs.h>
+#include "nilfs.h"
+#include "mdt.h"
+#include "alloc.h"
+#include "page.h"
+#include "cpfile.h"
+#include "ifile.h"
+#include "dat.h"
+#include "segment.h"
+#include "segbuf.h"
+
+MODULE_AUTHOR("NTT Corp.");
+MODULE_DESCRIPTION("A New Implementation of the Log-structured Filesystem "
+                  "(NILFS)");
+MODULE_VERSION(NILFS_VERSION);
+MODULE_LICENSE("GPL");
+
+static int nilfs_remount(struct super_block *sb, int *flags, char *data);
+static int test_exclusive_mount(struct file_system_type *fs_type,
+                               struct block_device *bdev, int flags);
+
+/**
+ * nilfs_error() - report failure condition on a filesystem
+ *
+ * nilfs_error() sets an ERROR_FS flag on the superblock as well as
+ * reporting an error message.  It should be called when NILFS detects
+ * incoherences or defects of meta data on disk.  As for sustainable
+ * errors such as a single-shot I/O error, nilfs_warning() or the printk()
+ * function should be used instead.
+ *
+ * The segment constructor must not call this function because it can
+ * kill itself.
+ */
+void nilfs_error(struct super_block *sb, const char *function,
+                const char *fmt, ...)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       va_list args;
+
+       va_start(args, fmt);
+       printk(KERN_CRIT "NILFS error (device %s): %s: ", sb->s_id, function);
+       vprintk(fmt, args);
+       printk("\n");
+       va_end(args);
+
+       if (!(sb->s_flags & MS_RDONLY)) {
+               struct the_nilfs *nilfs = sbi->s_nilfs;
+
+               if (!nilfs_test_opt(sbi, ERRORS_CONT))
+                       nilfs_detach_segment_constructor(sbi);
+
+               down_write(&nilfs->ns_sem);
+               if (!(nilfs->ns_mount_state & NILFS_ERROR_FS)) {
+                       nilfs->ns_mount_state |= NILFS_ERROR_FS;
+                       nilfs->ns_sbp[0]->s_state |=
+                               cpu_to_le16(NILFS_ERROR_FS);
+                       nilfs_commit_super(sbi, 1);
+               }
+               up_write(&nilfs->ns_sem);
+
+               if (nilfs_test_opt(sbi, ERRORS_RO)) {
+                       printk(KERN_CRIT "Remounting filesystem read-only\n");
+                       sb->s_flags |= MS_RDONLY;
+               }
+       }
+
+       if (nilfs_test_opt(sbi, ERRORS_PANIC))
+               panic("NILFS (device %s): panic forced after error\n",
+                     sb->s_id);
+}
+
+void nilfs_warning(struct super_block *sb, const char *function,
+                  const char *fmt, ...)
+{
+       va_list args;
+
+       va_start(args, fmt);
+       printk(KERN_WARNING "NILFS warning (device %s): %s: ",
+              sb->s_id, function);
+       vprintk(fmt, args);
+       printk("\n");
+       va_end(args);
+}
+
+static struct kmem_cache *nilfs_inode_cachep;
+
+struct inode *nilfs_alloc_inode(struct super_block *sb)
+{
+       struct nilfs_inode_info *ii;
+
+       ii = kmem_cache_alloc(nilfs_inode_cachep, GFP_NOFS);
+       if (!ii)
+               return NULL;
+       ii->i_bh = NULL;
+       ii->i_state = 0;
+       ii->vfs_inode.i_version = 1;
+       nilfs_btnode_cache_init(&ii->i_btnode_cache);
+       return &ii->vfs_inode;
+}
+
+void nilfs_destroy_inode(struct inode *inode)
+{
+       kmem_cache_free(nilfs_inode_cachep, NILFS_I(inode));
+}
+
+static void init_once(void *obj)
+{
+       struct nilfs_inode_info *ii = obj;
+
+       INIT_LIST_HEAD(&ii->i_dirty);
+#ifdef CONFIG_NILFS_XATTR
+       init_rwsem(&ii->xattr_sem);
+#endif
+       nilfs_btnode_cache_init_once(&ii->i_btnode_cache);
+       ii->i_bmap = (struct nilfs_bmap *)&ii->i_bmap_union;
+       inode_init_once(&ii->vfs_inode);
+}
+
+static int nilfs_init_inode_cache(void)
+{
+       nilfs_inode_cachep = kmem_cache_create("nilfs2_inode_cache",
+                                              sizeof(struct nilfs_inode_info),
+                                              0, SLAB_RECLAIM_ACCOUNT,
+                                              init_once);
+
+       return (nilfs_inode_cachep == NULL) ? -ENOMEM : 0;
+}
+
+static inline void nilfs_destroy_inode_cache(void)
+{
+       kmem_cache_destroy(nilfs_inode_cachep);
+}
+
+static void nilfs_clear_inode(struct inode *inode)
+{
+       struct nilfs_inode_info *ii = NILFS_I(inode);
+
+#ifdef CONFIG_NILFS_POSIX_ACL
+       if (ii->i_acl && ii->i_acl != NILFS_ACL_NOT_CACHED) {
+               posix_acl_release(ii->i_acl);
+               ii->i_acl = NILFS_ACL_NOT_CACHED;
+       }
+       if (ii->i_default_acl && ii->i_default_acl != NILFS_ACL_NOT_CACHED) {
+               posix_acl_release(ii->i_default_acl);
+               ii->i_default_acl = NILFS_ACL_NOT_CACHED;
+       }
+#endif
+       /*
+        * Free resources allocated in nilfs_read_inode(), here.
+        */
+       BUG_ON(!list_empty(&ii->i_dirty));
+       brelse(ii->i_bh);
+       ii->i_bh = NULL;
+
+       if (test_bit(NILFS_I_BMAP, &ii->i_state))
+               nilfs_bmap_clear(ii->i_bmap);
+
+       nilfs_btnode_cache_clear(&ii->i_btnode_cache);
+}
+
+static int nilfs_sync_super(struct nilfs_sb_info *sbi, int dupsb)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       int err;
+       int barrier_done = 0;
+
+       if (nilfs_test_opt(sbi, BARRIER)) {
+               set_buffer_ordered(nilfs->ns_sbh[0]);
+               barrier_done = 1;
+       }
+ retry:
+       set_buffer_dirty(nilfs->ns_sbh[0]);
+       err = sync_dirty_buffer(nilfs->ns_sbh[0]);
+       if (err == -EOPNOTSUPP && barrier_done) {
+               nilfs_warning(sbi->s_super, __func__,
+                             "barrier-based sync failed. "
+                             "disabling barriers\n");
+               nilfs_clear_opt(sbi, BARRIER);
+               barrier_done = 0;
+               clear_buffer_ordered(nilfs->ns_sbh[0]);
+               goto retry;
+       }
+       if (unlikely(err)) {
+               printk(KERN_ERR
+                      "NILFS: unable to write superblock (err=%d)\n", err);
+               if (err == -EIO && nilfs->ns_sbh[1]) {
+                       nilfs_fall_back_super_block(nilfs);
+                       goto retry;
+               }
+       } else {
+               struct nilfs_super_block *sbp = nilfs->ns_sbp[0];
+
+               /*
+                * The latest segment becomes trailable from the position
+                * written in superblock.
+                */
+               clear_nilfs_discontinued(nilfs);
+
+               /* update GC protection for recent segments */
+               if (nilfs->ns_sbh[1]) {
+                       sbp = NULL;
+                       if (dupsb) {
+                               set_buffer_dirty(nilfs->ns_sbh[1]);
+                               if (!sync_dirty_buffer(nilfs->ns_sbh[1]))
+                                       sbp = nilfs->ns_sbp[1];
+                       }
+               }
+               if (sbp) {
+                       spin_lock(&nilfs->ns_last_segment_lock);
+                       nilfs->ns_prot_seq = le64_to_cpu(sbp->s_last_seq);
+                       spin_unlock(&nilfs->ns_last_segment_lock);
+               }
+       }
+
+       return err;
+}
+
+int nilfs_commit_super(struct nilfs_sb_info *sbi, int dupsb)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       struct nilfs_super_block **sbp = nilfs->ns_sbp;
+       sector_t nfreeblocks;
+       time_t t;
+       int err;
+
+       /* nilfs->sem must be locked by the caller. */
+       if (sbp[0]->s_magic != NILFS_SUPER_MAGIC) {
+               if (sbp[1] && sbp[1]->s_magic == NILFS_SUPER_MAGIC)
+                       nilfs_swap_super_block(nilfs);
+               else {
+                       printk(KERN_CRIT "NILFS: superblock broke on dev %s\n",
+                              sbi->s_super->s_id);
+                       return -EIO;
+               }
+       }
+       err = nilfs_count_free_blocks(nilfs, &nfreeblocks);
+       if (unlikely(err)) {
+               printk(KERN_ERR "NILFS: failed to count free blocks\n");
+               return err;
+       }
+       spin_lock(&nilfs->ns_last_segment_lock);
+       sbp[0]->s_last_seq = cpu_to_le64(nilfs->ns_last_seq);
+       sbp[0]->s_last_pseg = cpu_to_le64(nilfs->ns_last_pseg);
+       sbp[0]->s_last_cno = cpu_to_le64(nilfs->ns_last_cno);
+       spin_unlock(&nilfs->ns_last_segment_lock);
+
+       t = get_seconds();
+       nilfs->ns_sbwtime[0] = t;
+       sbp[0]->s_free_blocks_count = cpu_to_le64(nfreeblocks);
+       sbp[0]->s_wtime = cpu_to_le64(t);
+       sbp[0]->s_sum = 0;
+       sbp[0]->s_sum = cpu_to_le32(crc32_le(nilfs->ns_crc_seed,
+                                            (unsigned char *)sbp[0],
+                                            nilfs->ns_sbsize));
+       if (dupsb && sbp[1]) {
+               memcpy(sbp[1], sbp[0], nilfs->ns_sbsize);
+               nilfs->ns_sbwtime[1] = t;
+       }
+       sbi->s_super->s_dirt = 0;
+       return nilfs_sync_super(sbi, dupsb);
+}
+
+static void nilfs_put_super(struct super_block *sb)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+
+       nilfs_detach_segment_constructor(sbi);
+
+       if (!(sb->s_flags & MS_RDONLY)) {
+               down_write(&nilfs->ns_sem);
+               nilfs->ns_sbp[0]->s_state = cpu_to_le16(nilfs->ns_mount_state);
+               nilfs_commit_super(sbi, 1);
+               up_write(&nilfs->ns_sem);
+       }
+
+       nilfs_detach_checkpoint(sbi);
+       put_nilfs(sbi->s_nilfs);
+       sbi->s_super = NULL;
+       sb->s_fs_info = NULL;
+       kfree(sbi);
+}
+
+/**
+ * nilfs_write_super - write super block(s) of NILFS
+ * @sb: super_block
+ *
+ * nilfs_write_super() gets a fs-dependent lock, writes super block(s), and
+ * clears s_dirt.  This function is called in the section protected by
+ * lock_super().
+ *
+ * The s_dirt flag is managed by each filesystem and we protect it by ns_sem
+ * of the struct the_nilfs.  Lock order must be as follows:
+ *
+ *   1. lock_super()
+ *   2.    down_write(&nilfs->ns_sem)
+ *
+ * Inside NILFS, locking ns_sem is enough to protect s_dirt and the buffer
+ * of the super block (nilfs->ns_sbp[]).
+ *
+ * In most cases, VFS functions call lock_super() before calling these
+ * methods.  So we must be careful not to bring on deadlocks when using
+ * lock_super();  see generic_shutdown_super(), write_super(), and so on.
+ *
+ * Note that order of lock_kernel() and lock_super() depends on contexts
+ * of VFS.  We should also note that lock_kernel() can be used in its
+ * protective section and only the outermost one has an effect.
+ */
+static void nilfs_write_super(struct super_block *sb)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+
+       down_write(&nilfs->ns_sem);
+       if (!(sb->s_flags & MS_RDONLY)) {
+               struct nilfs_super_block **sbp = nilfs->ns_sbp;
+               u64 t = get_seconds();
+               int dupsb;
+
+               if (!nilfs_discontinued(nilfs) && t >= nilfs->ns_sbwtime[0] &&
+                   t < nilfs->ns_sbwtime[0] + NILFS_SB_FREQ) {
+                       up_write(&nilfs->ns_sem);
+                       return;
+               }
+               dupsb = sbp[1] && t > nilfs->ns_sbwtime[1] + NILFS_ALTSB_FREQ;
+               nilfs_commit_super(sbi, dupsb);
+       }
+       sb->s_dirt = 0;
+       up_write(&nilfs->ns_sem);
+}
+
+static int nilfs_sync_fs(struct super_block *sb, int wait)
+{
+       int err = 0;
+
+       /* This function is called when super block should be written back */
+       if (wait)
+               err = nilfs_construct_segment(sb);
+       return err;
+}
+
+int nilfs_attach_checkpoint(struct nilfs_sb_info *sbi, __u64 cno)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       struct nilfs_checkpoint *raw_cp;
+       struct buffer_head *bh_cp;
+       int err;
+
+       down_write(&nilfs->ns_sem);
+       list_add(&sbi->s_list, &nilfs->ns_supers);
+       up_write(&nilfs->ns_sem);
+
+       sbi->s_ifile = nilfs_mdt_new(
+               nilfs, sbi->s_super, NILFS_IFILE_INO, NILFS_IFILE_GFP);
+       if (!sbi->s_ifile)
+               return -ENOMEM;
+
+       err = nilfs_palloc_init_blockgroup(sbi->s_ifile, nilfs->ns_inode_size);
+       if (unlikely(err))
+               goto failed;
+
+       err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, cno, 0, &raw_cp,
+                                         &bh_cp);
+       if (unlikely(err)) {
+               if (err == -ENOENT || err == -EINVAL) {
+                       printk(KERN_ERR
+                              "NILFS: Invalid checkpoint "
+                              "(checkpoint number=%llu)\n",
+                              (unsigned long long)cno);
+                       err = -EINVAL;
+               }
+               goto failed;
+       }
+       err = nilfs_read_inode_common(sbi->s_ifile, &raw_cp->cp_ifile_inode);
+       if (unlikely(err))
+               goto failed_bh;
+       atomic_set(&sbi->s_inodes_count, le64_to_cpu(raw_cp->cp_inodes_count));
+       atomic_set(&sbi->s_blocks_count, le64_to_cpu(raw_cp->cp_blocks_count));
+
+       nilfs_cpfile_put_checkpoint(nilfs->ns_cpfile, cno, bh_cp);
+       return 0;
+
+ failed_bh:
+       nilfs_cpfile_put_checkpoint(nilfs->ns_cpfile, cno, bh_cp);
+ failed:
+       nilfs_mdt_destroy(sbi->s_ifile);
+       sbi->s_ifile = NULL;
+
+       down_write(&nilfs->ns_sem);
+       list_del_init(&sbi->s_list);
+       up_write(&nilfs->ns_sem);
+
+       return err;
+}
+
+void nilfs_detach_checkpoint(struct nilfs_sb_info *sbi)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+
+       nilfs_mdt_clear(sbi->s_ifile);
+       nilfs_mdt_destroy(sbi->s_ifile);
+       sbi->s_ifile = NULL;
+       down_write(&nilfs->ns_sem);
+       list_del_init(&sbi->s_list);
+       up_write(&nilfs->ns_sem);
+}
+
+static int nilfs_mark_recovery_complete(struct nilfs_sb_info *sbi)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       int err = 0;
+
+       down_write(&nilfs->ns_sem);
+       if (!(nilfs->ns_mount_state & NILFS_VALID_FS)) {
+               nilfs->ns_mount_state |= NILFS_VALID_FS;
+               err = nilfs_commit_super(sbi, 1);
+               if (likely(!err))
+                       printk(KERN_INFO "NILFS: recovery complete.\n");
+       }
+       up_write(&nilfs->ns_sem);
+       return err;
+}
+
+static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf)
+{
+       struct super_block *sb = dentry->d_sb;
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       unsigned long long blocks;
+       unsigned long overhead;
+       unsigned long nrsvblocks;
+       sector_t nfreeblocks;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       int err;
+
+       /*
+        * Compute all of the segment blocks
+        *
+        * The blocks before first segment and after last segment
+        * are excluded.
+        */
+       blocks = nilfs->ns_blocks_per_segment * nilfs->ns_nsegments
+               - nilfs->ns_first_data_block;
+       nrsvblocks = nilfs->ns_nrsvsegs * nilfs->ns_blocks_per_segment;
+
+       /*
+        * Compute the overhead
+        *
+        * When distributing meta data blocks outside semgent structure,
+        * We must count them as the overhead.
+        */
+       overhead = 0;
+
+       err = nilfs_count_free_blocks(nilfs, &nfreeblocks);
+       if (unlikely(err))
+               return err;
+
+       buf->f_type = NILFS_SUPER_MAGIC;
+       buf->f_bsize = sb->s_blocksize;
+       buf->f_blocks = blocks - overhead;
+       buf->f_bfree = nfreeblocks;
+       buf->f_bavail = (buf->f_bfree >= nrsvblocks) ?
+               (buf->f_bfree - nrsvblocks) : 0;
+       buf->f_files = atomic_read(&sbi->s_inodes_count);
+       buf->f_ffree = 0; /* nilfs_count_free_inodes(sb); */
+       buf->f_namelen = NILFS_NAME_LEN;
+       return 0;
+}
+
+static struct super_operations nilfs_sops = {
+       .alloc_inode    = nilfs_alloc_inode,
+       .destroy_inode  = nilfs_destroy_inode,
+       .dirty_inode    = nilfs_dirty_inode,
+       /* .write_inode    = nilfs_write_inode, */
+       /* .put_inode      = nilfs_put_inode, */
+       /* .drop_inode    = nilfs_drop_inode, */
+       .delete_inode   = nilfs_delete_inode,
+       .put_super      = nilfs_put_super,
+       .write_super    = nilfs_write_super,
+       .sync_fs        = nilfs_sync_fs,
+       /* .write_super_lockfs */
+       /* .unlockfs */
+       .statfs         = nilfs_statfs,
+       .remount_fs     = nilfs_remount,
+       .clear_inode    = nilfs_clear_inode,
+       /* .umount_begin */
+       /* .show_options */
+};
+
+static struct inode *
+nilfs_nfs_get_inode(struct super_block *sb, u64 ino, u32 generation)
+{
+       struct inode *inode;
+
+       if (ino < NILFS_FIRST_INO(sb) && ino != NILFS_ROOT_INO &&
+           ino != NILFS_SKETCH_INO)
+               return ERR_PTR(-ESTALE);
+
+       inode = nilfs_iget(sb, ino);
+       if (IS_ERR(inode))
+               return ERR_CAST(inode);
+       if (generation && inode->i_generation != generation) {
+               iput(inode);
+               return ERR_PTR(-ESTALE);
+       }
+
+       return inode;
+}
+
+static struct dentry *
+nilfs_fh_to_dentry(struct super_block *sb, struct fid *fid, int fh_len,
+                  int fh_type)
+{
+       return generic_fh_to_dentry(sb, fid, fh_len, fh_type,
+                                   nilfs_nfs_get_inode);
+}
+
+static struct dentry *
+nilfs_fh_to_parent(struct super_block *sb, struct fid *fid, int fh_len,
+                  int fh_type)
+{
+       return generic_fh_to_parent(sb, fid, fh_len, fh_type,
+                                   nilfs_nfs_get_inode);
+}
+
+static struct export_operations nilfs_export_ops = {
+       .fh_to_dentry = nilfs_fh_to_dentry,
+       .fh_to_parent = nilfs_fh_to_parent,
+       .get_parent = nilfs_get_parent,
+};
+
+enum {
+       Opt_err_cont, Opt_err_panic, Opt_err_ro,
+       Opt_barrier, Opt_snapshot, Opt_order,
+       Opt_err,
+};
+
+static match_table_t tokens = {
+       {Opt_err_cont, "errors=continue"},
+       {Opt_err_panic, "errors=panic"},
+       {Opt_err_ro, "errors=remount-ro"},
+       {Opt_barrier, "barrier=%s"},
+       {Opt_snapshot, "cp=%u"},
+       {Opt_order, "order=%s"},
+       {Opt_err, NULL}
+};
+
+static int match_bool(substring_t *s, int *result)
+{
+       int len = s->to - s->from;
+
+       if (strncmp(s->from, "on", len) == 0)
+               *result = 1;
+       else if (strncmp(s->from, "off", len) == 0)
+               *result = 0;
+       else
+               return 1;
+       return 0;
+}
+
+static int parse_options(char *options, struct super_block *sb)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       char *p;
+       substring_t args[MAX_OPT_ARGS];
+       int option;
+
+       if (!options)
+               return 1;
+
+       while ((p = strsep(&options, ",")) != NULL) {
+               int token;
+               if (!*p)
+                       continue;
+
+               token = match_token(p, tokens, args);
+               switch (token) {
+               case Opt_barrier:
+                       if (match_bool(&args[0], &option))
+                               return 0;
+                       if (option)
+                               nilfs_set_opt(sbi, BARRIER);
+                       else
+                               nilfs_clear_opt(sbi, BARRIER);
+                       break;
+               case Opt_order:
+                       if (strcmp(args[0].from, "relaxed") == 0)
+                               /* Ordered data semantics */
+                               nilfs_clear_opt(sbi, STRICT_ORDER);
+                       else if (strcmp(args[0].from, "strict") == 0)
+                               /* Strict in-order semantics */
+                               nilfs_set_opt(sbi, STRICT_ORDER);
+                       else
+                               return 0;
+                       break;
+               case Opt_err_panic:
+                       nilfs_write_opt(sbi, ERROR_MODE, ERRORS_PANIC);
+                       break;
+               case Opt_err_ro:
+                       nilfs_write_opt(sbi, ERROR_MODE, ERRORS_RO);
+                       break;
+               case Opt_err_cont:
+                       nilfs_write_opt(sbi, ERROR_MODE, ERRORS_CONT);
+                       break;
+               case Opt_snapshot:
+                       if (match_int(&args[0], &option) || option <= 0)
+                               return 0;
+                       if (!(sb->s_flags & MS_RDONLY))
+                               return 0;
+                       sbi->s_snapshot_cno = option;
+                       nilfs_set_opt(sbi, SNAPSHOT);
+                       break;
+               default:
+                       printk(KERN_ERR
+                              "NILFS: Unrecognized mount option \"%s\"\n", p);
+                       return 0;
+               }
+       }
+       return 1;
+}
+
+static inline void
+nilfs_set_default_options(struct nilfs_sb_info *sbi,
+                         struct nilfs_super_block *sbp)
+{
+       sbi->s_mount_opt =
+               NILFS_MOUNT_ERRORS_CONT | NILFS_MOUNT_BARRIER;
+}
+
+static int nilfs_setup_super(struct nilfs_sb_info *sbi)
+{
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       struct nilfs_super_block *sbp = nilfs->ns_sbp[0];
+       int max_mnt_count = le16_to_cpu(sbp->s_max_mnt_count);
+       int mnt_count = le16_to_cpu(sbp->s_mnt_count);
+
+       /* nilfs->sem must be locked by the caller. */
+       if (!(nilfs->ns_mount_state & NILFS_VALID_FS)) {
+               printk(KERN_WARNING "NILFS warning: mounting unchecked fs\n");
+       } else if (nilfs->ns_mount_state & NILFS_ERROR_FS) {
+               printk(KERN_WARNING
+                      "NILFS warning: mounting fs with errors\n");
+#if 0
+       } else if (max_mnt_count >= 0 && mnt_count >= max_mnt_count) {
+               printk(KERN_WARNING
+                      "NILFS warning: maximal mount count reached\n");
+#endif
+       }
+       if (!max_mnt_count)
+               sbp->s_max_mnt_count = cpu_to_le16(NILFS_DFL_MAX_MNT_COUNT);
+
+       sbp->s_mnt_count = cpu_to_le16(mnt_count + 1);
+       sbp->s_state = cpu_to_le16(le16_to_cpu(sbp->s_state) & ~NILFS_VALID_FS);
+       sbp->s_mtime = cpu_to_le64(get_seconds());
+       return nilfs_commit_super(sbi, 1);
+}
+
+struct nilfs_super_block *nilfs_read_super_block(struct super_block *sb,
+                                                u64 pos, int blocksize,
+                                                struct buffer_head **pbh)
+{
+       unsigned long long sb_index = pos;
+       unsigned long offset;
+
+       offset = do_div(sb_index, blocksize);
+       *pbh = sb_bread(sb, sb_index);
+       if (!*pbh)
+               return NULL;
+       return (struct nilfs_super_block *)((char *)(*pbh)->b_data + offset);
+}
+
+int nilfs_store_magic_and_option(struct super_block *sb,
+                                struct nilfs_super_block *sbp,
+                                char *data)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+
+       sb->s_magic = le16_to_cpu(sbp->s_magic);
+
+       /* FS independent flags */
+#ifdef NILFS_ATIME_DISABLE
+       sb->s_flags |= MS_NOATIME;
+#endif
+
+       nilfs_set_default_options(sbi, sbp);
+
+       sbi->s_resuid = le16_to_cpu(sbp->s_def_resuid);
+       sbi->s_resgid = le16_to_cpu(sbp->s_def_resgid);
+       sbi->s_interval = le32_to_cpu(sbp->s_c_interval);
+       sbi->s_watermark = le32_to_cpu(sbp->s_c_block_max);
+
+       return !parse_options(data, sb) ? -EINVAL : 0 ;
+}
+
+/**
+ * nilfs_fill_super() - initialize a super block instance
+ * @sb: super_block
+ * @data: mount options
+ * @silent: silent mode flag
+ * @nilfs: the_nilfs struct
+ *
+ * This function is called exclusively by bd_mount_mutex.
+ * So, the recovery process is protected from other simultaneous mounts.
+ */
+static int
+nilfs_fill_super(struct super_block *sb, void *data, int silent,
+                struct the_nilfs *nilfs)
+{
+       struct nilfs_sb_info *sbi;
+       struct inode *root;
+       __u64 cno;
+       int err;
+
+       sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
+       if (!sbi)
+               return -ENOMEM;
+
+       sb->s_fs_info = sbi;
+
+       get_nilfs(nilfs);
+       sbi->s_nilfs = nilfs;
+       sbi->s_super = sb;
+
+       err = init_nilfs(nilfs, sbi, (char *)data);
+       if (err)
+               goto failed_sbi;
+
+       spin_lock_init(&sbi->s_inode_lock);
+       INIT_LIST_HEAD(&sbi->s_dirty_files);
+       INIT_LIST_HEAD(&sbi->s_list);
+
+       /*
+        * Following initialization is overlapped because
+        * nilfs_sb_info structure has been cleared at the beginning.
+        * But we reserve them to keep our interest and make ready
+        * for the future change.
+        */
+       get_random_bytes(&sbi->s_next_generation,
+                        sizeof(sbi->s_next_generation));
+       spin_lock_init(&sbi->s_next_gen_lock);
+
+       sb->s_op = &nilfs_sops;
+       sb->s_export_op = &nilfs_export_ops;
+       sb->s_root = NULL;
+       sb->s_time_gran = 1;
+
+       if (!nilfs_loaded(nilfs)) {
+               err = load_nilfs(nilfs, sbi);
+               if (err)
+                       goto failed_sbi;
+       }
+       cno = nilfs_last_cno(nilfs);
+
+       if (sb->s_flags & MS_RDONLY) {
+               if (nilfs_test_opt(sbi, SNAPSHOT)) {
+                       err = nilfs_cpfile_is_snapshot(nilfs->ns_cpfile,
+                                                      sbi->s_snapshot_cno);
+                       if (err < 0)
+                               goto failed_sbi;
+                       if (!err) {
+                               printk(KERN_ERR
+                                      "NILFS: The specified checkpoint is "
+                                      "not a snapshot "
+                                      "(checkpoint number=%llu).\n",
+                                      (unsigned long long)sbi->s_snapshot_cno);
+                               err = -EINVAL;
+                               goto failed_sbi;
+                       }
+                       cno = sbi->s_snapshot_cno;
+               } else
+                       /* Read-only mount */
+                       sbi->s_snapshot_cno = cno;
+       }
+
+       err = nilfs_attach_checkpoint(sbi, cno);
+       if (err) {
+               printk(KERN_ERR "NILFS: error loading a checkpoint"
+                      " (checkpoint number=%llu).\n", (unsigned long long)cno);
+               goto failed_sbi;
+       }
+
+       if (!(sb->s_flags & MS_RDONLY)) {
+               err = nilfs_attach_segment_constructor(sbi);
+               if (err)
+                       goto failed_checkpoint;
+       }
+
+       root = nilfs_iget(sb, NILFS_ROOT_INO);
+       if (IS_ERR(root)) {
+               printk(KERN_ERR "NILFS: get root inode failed\n");
+               err = PTR_ERR(root);
+               goto failed_segctor;
+       }
+       if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
+               iput(root);
+               printk(KERN_ERR "NILFS: corrupt root inode.\n");
+               err = -EINVAL;
+               goto failed_segctor;
+       }
+       sb->s_root = d_alloc_root(root);
+       if (!sb->s_root) {
+               iput(root);
+               printk(KERN_ERR "NILFS: get root dentry failed\n");
+               err = -ENOMEM;
+               goto failed_segctor;
+       }
+
+       if (!(sb->s_flags & MS_RDONLY)) {
+               down_write(&nilfs->ns_sem);
+               nilfs_setup_super(sbi);
+               up_write(&nilfs->ns_sem);
+       }
+
+       err = nilfs_mark_recovery_complete(sbi);
+       if (unlikely(err)) {
+               printk(KERN_ERR "NILFS: recovery failed.\n");
+               goto failed_root;
+       }
+
+       return 0;
+
+ failed_root:
+       dput(sb->s_root);
+       sb->s_root = NULL;
+
+ failed_segctor:
+       nilfs_detach_segment_constructor(sbi);
+
+ failed_checkpoint:
+       nilfs_detach_checkpoint(sbi);
+
+ failed_sbi:
+       put_nilfs(nilfs);
+       sb->s_fs_info = NULL;
+       kfree(sbi);
+       return err;
+}
+
+static int nilfs_remount(struct super_block *sb, int *flags, char *data)
+{
+       struct nilfs_sb_info *sbi = NILFS_SB(sb);
+       struct nilfs_super_block *sbp;
+       struct the_nilfs *nilfs = sbi->s_nilfs;
+       unsigned long old_sb_flags;
+       struct nilfs_mount_options old_opts;
+       int err;
+
+       old_sb_flags = sb->s_flags;
+       old_opts.mount_opt = sbi->s_mount_opt;
+       old_opts.snapshot_cno = sbi->s_snapshot_cno;
+
+       if (!parse_options(data, sb)) {
+               err = -EINVAL;
+               goto restore_opts;
+       }
+       sb->s_flags = (sb->s_flags & ~MS_POSIXACL);
+
+       if ((*flags & MS_RDONLY) &&
+           sbi->s_snapshot_cno != old_opts.snapshot_cno) {
+               printk(KERN_WARNING "NILFS (device %s): couldn't "
+                      "remount to a different snapshot. \n",
+                      sb->s_id);
+               err = -EINVAL;
+               goto restore_opts;
+       }
+
+       if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
+               goto out;
+       if (*flags & MS_RDONLY) {
+               /* Shutting down the segment constructor */
+               nilfs_detach_segment_constructor(sbi);
+               sb->s_flags |= MS_RDONLY;
+
+               sbi->s_snapshot_cno = nilfs_last_cno(nilfs);
+               /* nilfs_set_opt(sbi, SNAPSHOT); */
+
+               /*
+                * Remounting a valid RW partition RDONLY, so set
+                * the RDONLY flag and then mark the partition as valid again.
+                */
+               down_write(&nilfs->ns_sem);
+               sbp = nilfs->ns_sbp[0];
+               if (!(sbp->s_state & le16_to_cpu(NILFS_VALID_FS)) &&
+                   (nilfs->ns_mount_state & NILFS_VALID_FS))
+                       sbp->s_state = cpu_to_le16(nilfs->ns_mount_state);
+               sbp->s_mtime = cpu_to_le64(get_seconds());
+               nilfs_commit_super(sbi, 1);
+               up_write(&nilfs->ns_sem);
+       } else {
+               /*
+                * Mounting a RDONLY partition read-write, so reread and
+                * store the current valid flag.  (It may have been changed
+                * by fsck since we originally mounted the partition.)
+                */
+               down(&sb->s_bdev->bd_mount_sem);
+               /* Check existing RW-mount */
+               if (test_exclusive_mount(sb->s_type, sb->s_bdev, 0)) {
+                       printk(KERN_WARNING "NILFS (device %s): couldn't "
+                              "remount because a RW-mount exists.\n",
+                              sb->s_id);
+                       err = -EBUSY;
+                       goto rw_remount_failed;
+               }
+               if (sbi->s_snapshot_cno != nilfs_last_cno(nilfs)) {
+                       printk(KERN_WARNING "NILFS (device %s): couldn't "
+                              "remount because the current RO-mount is not "
+                              "the latest one.\n",
+                              sb->s_id);
+                       err = -EINVAL;
+                       goto rw_remount_failed;
+               }
+               sb->s_flags &= ~MS_RDONLY;
+               nilfs_clear_opt(sbi, SNAPSHOT);
+               sbi->s_snapshot_cno = 0;
+
+               err = nilfs_attach_segment_constructor(sbi);
+               if (err)
+                       goto rw_remount_failed;
+
+               down_write(&nilfs->ns_sem);
+               nilfs_setup_super(sbi);
+               up_write(&nilfs->ns_sem);
+
+               up(&sb->s_bdev->bd_mount_sem);
+       }
+ out:
+       return 0;
+
+ rw_remount_failed:
+       up(&sb->s_bdev->bd_mount_sem);
+ restore_opts:
+       sb->s_flags = old_sb_flags;
+       sbi->s_mount_opt = old_opts.mount_opt;
+       sbi->s_snapshot_cno = old_opts.snapshot_cno;
+       return err;
+}
+
+struct nilfs_super_data {
+       struct block_device *bdev;
+       __u64 cno;
+       int flags;
+};
+
+/**
+ * nilfs_identify - pre-read mount options needed to identify mount instance
+ * @data: mount options
+ * @sd: nilfs_super_data
+ */
+static int nilfs_identify(char *data, struct nilfs_super_data *sd)
+{
+       char *p, *options = data;
+       substring_t args[MAX_OPT_ARGS];
+       int option, token;
+       int ret = 0;
+
+       do {
+               p = strsep(&options, ",");
+               if (p != NULL && *p) {
+                       token = match_token(p, tokens, args);
+                       if (token == Opt_snapshot) {
+                               if (!(sd->flags & MS_RDONLY))
+                                       ret++;
+                               else {
+                                       ret = match_int(&args[0], &option);
+                                       if (!ret) {
+                                               if (option > 0)
+                                                       sd->cno = option;
+                                               else
+                                                       ret++;
+                                       }
+                               }
+                       }
+                       if (ret)
+                               printk(KERN_ERR
+                                      "NILFS: invalid mount option: %s\n", p);
+               }
+               if (!options)
+                       break;
+               BUG_ON(options == data);
+               *(options - 1) = ',';
+       } while (!ret);
+       return ret;
+}
+
+static int nilfs_set_bdev_super(struct super_block *s, void *data)
+{
+       struct nilfs_super_data *sd = data;
+
+       s->s_bdev = sd->bdev;
+       s->s_dev = s->s_bdev->bd_dev;
+       return 0;
+}
+
+static int nilfs_test_bdev_super(struct super_block *s, void *data)
+{
+       struct nilfs_super_data *sd = data;
+
+       return s->s_bdev == sd->bdev;
+}
+
+static int nilfs_test_bdev_super2(struct super_block *s, void *data)
+{
+       struct nilfs_super_data *sd = data;
+       int ret;
+
+       if (s->s_bdev != sd->bdev)
+               return 0;
+
+       if (!((s->s_flags | sd->flags) & MS_RDONLY))
+               return 1; /* Reuse an old R/W-mode super_block */
+
+       if (s->s_flags & sd->flags & MS_RDONLY) {
+               if (down_read_trylock(&s->s_umount)) {
+                       ret = s->s_root &&
+                               (sd->cno == NILFS_SB(s)->s_snapshot_cno);
+                       up_read(&s->s_umount);
+                       /*
+                        * This path is locked with sb_lock by sget().
+                        * So, drop_super() causes deadlock.
+                        */
+                       return ret;
+               }
+       }
+       return 0;
+}
+
+static int
+nilfs_get_sb(struct file_system_type *fs_type, int flags,
+            const char *dev_name, void *data, struct vfsmount *mnt)
+{
+       struct nilfs_super_data sd;
+       struct super_block *s, *s2;
+       struct the_nilfs *nilfs = NULL;
+       int err, need_to_close = 1;
+
+       sd.bdev = open_bdev_exclusive(dev_name, flags, fs_type);
+       if (IS_ERR(sd.bdev))
+               return PTR_ERR(sd.bdev);
+
+       /*
+        * To get mount instance using sget() vfs-routine, NILFS needs
+        * much more information than normal filesystems to identify mount
+        * instance.  For snapshot mounts, not only a mount type (ro-mount
+        * or rw-mount) but also a checkpoint number is required.
+        * The results are passed in sget() using nilfs_super_data.
+        */
+       sd.cno = 0;
+       sd.flags = flags;
+       if (nilfs_identify((char *)data, &sd)) {
+               err = -EINVAL;
+               goto failed;
+       }
+
+       /*
+        * once the super is inserted into the list by sget, s_umount
+        * will protect the lockfs code from trying to start a snapshot
+        * while we are mounting
+        */
+       down(&sd.bdev->bd_mount_sem);
+       if (!sd.cno &&
+           (err = test_exclusive_mount(fs_type, sd.bdev, flags ^ MS_RDONLY))) {
+               err = (err < 0) ? : -EBUSY;
+               goto failed_unlock;
+       }
+
+       /*
+        * Phase-1: search any existent instance and get the_nilfs
+        */
+       s = sget(fs_type, nilfs_test_bdev_super, nilfs_set_bdev_super, &sd);
+       if (IS_ERR(s))
+               goto error_s;
+
+       if (!s->s_root) {
+               err = -ENOMEM;
+               nilfs = alloc_nilfs(sd.bdev);
+               if (!nilfs)
+                       goto cancel_new;
+       } else {
+               struct nilfs_sb_info *sbi = NILFS_SB(s);
+
+               /*
+                * s_umount protects super_block from unmount process;
+                * It covers pointers of nilfs_sb_info and the_nilfs.
+                */
+               nilfs = sbi->s_nilfs;
+               get_nilfs(nilfs);
+               up_write(&s->s_umount);
+
+               /*
+                * Phase-2: search specified snapshot or R/W mode super_block
+                */
+               if (!sd.cno)
+                       /* trying to get the latest checkpoint.  */
+                       sd.cno = nilfs_last_cno(nilfs);
+
+               s2 = sget(fs_type, nilfs_test_bdev_super2,
+                         nilfs_set_bdev_super, &sd);
+               deactivate_super(s);
+               /*
+                * Although deactivate_super() invokes close_bdev_exclusive() at
+                * kill_block_super().  Here, s is an existent mount; we need
+                * one more close_bdev_exclusive() call.
+                */
+               s = s2;
+               if (IS_ERR(s))
+                       goto error_s;
+       }
+
+       if (!s->s_root) {
+               char b[BDEVNAME_SIZE];
+
+               s->s_flags = flags;
+               strlcpy(s->s_id, bdevname(sd.bdev, b), sizeof(s->s_id));
+               sb_set_blocksize(s, block_size(sd.bdev));
+
+               err = nilfs_fill_super(s, data, flags & MS_VERBOSE, nilfs);
+               if (err)
+                       goto cancel_new;
+
+               s->s_flags |= MS_ACTIVE;
+               need_to_close = 0;
+       } else if (!(s->s_flags & MS_RDONLY)) {
+               err = -EBUSY;
+       }
+
+       up(&sd.bdev->bd_mount_sem);
+       put_nilfs(nilfs);
+       if (need_to_close)
+               close_bdev_exclusive(sd.bdev, flags);
+       simple_set_mnt(mnt, s);
+       return 0;
+
+ error_s:
+       up(&sd.bdev->bd_mount_sem);
+       if (nilfs)
+               put_nilfs(nilfs);
+       close_bdev_exclusive(sd.bdev, flags);
+       return PTR_ERR(s);
+
+ failed_unlock:
+       up(&sd.bdev->bd_mount_sem);
+ failed:
+       close_bdev_exclusive(sd.bdev, flags);
+
+       return err;
+
+ cancel_new:
+       /* Abandoning the newly allocated superblock */
+       up(&sd.bdev->bd_mount_sem);
+       if (nilfs)
+               put_nilfs(nilfs);
+       up_write(&s->s_umount);
+       deactivate_super(s);
+       /*
+        * deactivate_super() invokes close_bdev_exclusive().
+        * We must finish all post-cleaning before this call;
+        * put_nilfs() and unlocking bd_mount_sem need the block device.
+        */
+       return err;
+}
+
+static int nilfs_test_bdev_super3(struct super_block *s, void *data)
+{
+       struct nilfs_super_data *sd = data;
+       int ret;
+
+       if (s->s_bdev != sd->bdev)
+               return 0;
+       if (down_read_trylock(&s->s_umount)) {
+               ret = (s->s_flags & MS_RDONLY) && s->s_root &&
+                       nilfs_test_opt(NILFS_SB(s), SNAPSHOT);
+               up_read(&s->s_umount);
+               if (ret)
+                       return 0; /* ignore snapshot mounts */
+       }
+       return !((sd->flags ^ s->s_flags) & MS_RDONLY);
+}
+
+static int __false_bdev_super(struct super_block *s, void *data)
+{
+#if 0 /* XXX: workaround for lock debug. This is not good idea */
+       up_write(&s->s_umount);
+#endif
+       return -EFAULT;
+}
+
+/**
+ * test_exclusive_mount - check whether an exclusive RW/RO mount exists or not.
+ * fs_type: filesystem type
+ * bdev: block device
+ * flag: 0 (check rw-mount) or MS_RDONLY (check ro-mount)
+ * res: pointer to an integer to store result
+ *
+ * This function must be called within a section protected by bd_mount_mutex.
+ */
+static int test_exclusive_mount(struct file_system_type *fs_type,
+                               struct block_device *bdev, int flags)
+{
+       struct super_block *s;
+       struct nilfs_super_data sd = { .flags = flags, .bdev = bdev };
+
+       s = sget(fs_type, nilfs_test_bdev_super3, __false_bdev_super, &sd);
+       if (IS_ERR(s)) {
+               if (PTR_ERR(s) != -EFAULT)
+                       return PTR_ERR(s);
+               return 0;  /* Not found */
+       }
+       up_write(&s->s_umount);
+       deactivate_super(s);
+       return 1;  /* Found */
+}
+
+struct file_system_type nilfs_fs_type = {
+       .owner    = THIS_MODULE,
+       .name     = "nilfs2",
+       .get_sb   = nilfs_get_sb,
+       .kill_sb  = kill_block_super,
+       .fs_flags = FS_REQUIRES_DEV,
+};
+
+static int __init init_nilfs_fs(void)
+{
+       int err;
+
+       err = nilfs_init_inode_cache();
+       if (err)
+               goto failed;
+
+       err = nilfs_init_transaction_cache();
+       if (err)
+               goto failed_inode_cache;
+
+       err = nilfs_init_segbuf_cache();
+       if (err)
+               goto failed_transaction_cache;
+
+       err = nilfs_btree_path_cache_init();
+       if (err)
+               goto failed_segbuf_cache;
+
+       err = register_filesystem(&nilfs_fs_type);
+       if (err)
+               goto failed_btree_path_cache;
+
+       return 0;
+
+ failed_btree_path_cache:
+       nilfs_btree_path_cache_destroy();
+
+ failed_segbuf_cache:
+       nilfs_destroy_segbuf_cache();
+
+ failed_transaction_cache:
+       nilfs_destroy_transaction_cache();
+
+ failed_inode_cache:
+       nilfs_destroy_inode_cache();
+
+ failed:
+       return err;
+}
+
+static void __exit exit_nilfs_fs(void)
+{
+       nilfs_destroy_segbuf_cache();
+       nilfs_destroy_transaction_cache();
+       nilfs_destroy_inode_cache();
+       nilfs_btree_path_cache_destroy();
+       unregister_filesystem(&nilfs_fs_type);
+}
+
+module_init(init_nilfs_fs)
+module_exit(exit_nilfs_fs)
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
new file mode 100644 (file)
index 0000000..33400cf
--- /dev/null
@@ -0,0 +1,637 @@
+/*
+ * the_nilfs.c - the_nilfs shared structure.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+
+#include <linux/buffer_head.h>
+#include <linux/slab.h>
+#include <linux/blkdev.h>
+#include <linux/backing-dev.h>
+#include <linux/crc32.h>
+#include "nilfs.h"
+#include "segment.h"
+#include "alloc.h"
+#include "cpfile.h"
+#include "sufile.h"
+#include "dat.h"
+#include "seglist.h"
+#include "segbuf.h"
+
+void nilfs_set_last_segment(struct the_nilfs *nilfs,
+                           sector_t start_blocknr, u64 seq, __u64 cno)
+{
+       spin_lock(&nilfs->ns_last_segment_lock);
+       nilfs->ns_last_pseg = start_blocknr;
+       nilfs->ns_last_seq = seq;
+       nilfs->ns_last_cno = cno;
+       spin_unlock(&nilfs->ns_last_segment_lock);
+}
+
+/**
+ * alloc_nilfs - allocate the_nilfs structure
+ * @bdev: block device to which the_nilfs is related
+ *
+ * alloc_nilfs() allocates memory for the_nilfs and
+ * initializes its reference count and locks.
+ *
+ * Return Value: On success, pointer to the_nilfs is returned.
+ * On error, NULL is returned.
+ */
+struct the_nilfs *alloc_nilfs(struct block_device *bdev)
+{
+       struct the_nilfs *nilfs;
+
+       nilfs = kzalloc(sizeof(*nilfs), GFP_KERNEL);
+       if (!nilfs)
+               return NULL;
+
+       nilfs->ns_bdev = bdev;
+       atomic_set(&nilfs->ns_count, 1);
+       atomic_set(&nilfs->ns_writer_refcount, -1);
+       atomic_set(&nilfs->ns_ndirtyblks, 0);
+       init_rwsem(&nilfs->ns_sem);
+       mutex_init(&nilfs->ns_writer_mutex);
+       INIT_LIST_HEAD(&nilfs->ns_supers);
+       spin_lock_init(&nilfs->ns_last_segment_lock);
+       nilfs->ns_gc_inodes_h = NULL;
+       init_rwsem(&nilfs->ns_segctor_sem);
+
+       return nilfs;
+}
+
+/**
+ * put_nilfs - release a reference to the_nilfs
+ * @nilfs: the_nilfs structure to be released
+ *
+ * put_nilfs() decrements a reference counter of the_nilfs.
+ * If the reference count reaches zero, the_nilfs is freed.
+ */
+void put_nilfs(struct the_nilfs *nilfs)
+{
+       if (!atomic_dec_and_test(&nilfs->ns_count))
+               return;
+       /*
+        * Increment of ns_count never occur below because the caller
+        * of get_nilfs() holds at least one reference to the_nilfs.
+        * Thus its exclusion control is not required here.
+        */
+       might_sleep();
+       if (nilfs_loaded(nilfs)) {
+               nilfs_mdt_clear(nilfs->ns_sufile);
+               nilfs_mdt_destroy(nilfs->ns_sufile);
+               nilfs_mdt_clear(nilfs->ns_cpfile);
+               nilfs_mdt_destroy(nilfs->ns_cpfile);
+               nilfs_mdt_clear(nilfs->ns_dat);
+               nilfs_mdt_destroy(nilfs->ns_dat);
+               /* XXX: how and when to clear nilfs->ns_gc_dat? */
+               nilfs_mdt_destroy(nilfs->ns_gc_dat);
+       }
+       if (nilfs_init(nilfs)) {
+               nilfs_destroy_gccache(nilfs);
+               brelse(nilfs->ns_sbh[0]);
+               brelse(nilfs->ns_sbh[1]);
+       }
+       kfree(nilfs);
+}
+
+static int nilfs_load_super_root(struct the_nilfs *nilfs,
+                                struct nilfs_sb_info *sbi, sector_t sr_block)
+{
+       struct buffer_head *bh_sr;
+       struct nilfs_super_root *raw_sr;
+       struct nilfs_super_block **sbp = nilfs->ns_sbp;
+       unsigned dat_entry_size, segment_usage_size, checkpoint_size;
+       unsigned inode_size;
+       int err;
+
+       err = nilfs_read_super_root_block(sbi->s_super, sr_block, &bh_sr, 1);
+       if (unlikely(err))
+               return err;
+
+       down_read(&nilfs->ns_sem);
+       dat_entry_size = le16_to_cpu(sbp[0]->s_dat_entry_size);
+       checkpoint_size = le16_to_cpu(sbp[0]->s_checkpoint_size);
+       segment_usage_size = le16_to_cpu(sbp[0]->s_segment_usage_size);
+       up_read(&nilfs->ns_sem);
+
+       inode_size = nilfs->ns_inode_size;
+
+       err = -ENOMEM;
+       nilfs->ns_dat = nilfs_mdt_new(
+               nilfs, NULL, NILFS_DAT_INO, NILFS_DAT_GFP);
+       if (unlikely(!nilfs->ns_dat))
+               goto failed;
+
+       nilfs->ns_gc_dat = nilfs_mdt_new(
+               nilfs, NULL, NILFS_DAT_INO, NILFS_DAT_GFP);
+       if (unlikely(!nilfs->ns_gc_dat))
+               goto failed_dat;
+
+       nilfs->ns_cpfile = nilfs_mdt_new(
+               nilfs, NULL, NILFS_CPFILE_INO, NILFS_CPFILE_GFP);
+       if (unlikely(!nilfs->ns_cpfile))
+               goto failed_gc_dat;
+
+       nilfs->ns_sufile = nilfs_mdt_new(
+               nilfs, NULL, NILFS_SUFILE_INO, NILFS_SUFILE_GFP);
+       if (unlikely(!nilfs->ns_sufile))
+               goto failed_cpfile;
+
+       err = nilfs_palloc_init_blockgroup(nilfs->ns_dat, dat_entry_size);
+       if (unlikely(err))
+               goto failed_sufile;
+
+       err = nilfs_palloc_init_blockgroup(nilfs->ns_gc_dat, dat_entry_size);
+       if (unlikely(err))
+               goto failed_sufile;
+
+       nilfs_mdt_set_shadow(nilfs->ns_dat, nilfs->ns_gc_dat);
+       nilfs_mdt_set_entry_size(nilfs->ns_cpfile, checkpoint_size,
+                                sizeof(struct nilfs_cpfile_header));
+       nilfs_mdt_set_entry_size(nilfs->ns_sufile, segment_usage_size,
+                                sizeof(struct nilfs_sufile_header));
+
+       err = nilfs_mdt_read_inode_direct(
+               nilfs->ns_dat, bh_sr, NILFS_SR_DAT_OFFSET(inode_size));
+       if (unlikely(err))
+               goto failed_sufile;
+
+       err = nilfs_mdt_read_inode_direct(
+               nilfs->ns_cpfile, bh_sr, NILFS_SR_CPFILE_OFFSET(inode_size));
+       if (unlikely(err))
+               goto failed_sufile;
+
+       err = nilfs_mdt_read_inode_direct(
+               nilfs->ns_sufile, bh_sr, NILFS_SR_SUFILE_OFFSET(inode_size));
+       if (unlikely(err))
+               goto failed_sufile;
+
+       raw_sr = (struct nilfs_super_root *)bh_sr->b_data;
+       nilfs->ns_nongc_ctime = le64_to_cpu(raw_sr->sr_nongc_ctime);
+
+ failed:
+       brelse(bh_sr);
+       return err;
+
+ failed_sufile:
+       nilfs_mdt_destroy(nilfs->ns_sufile);
+
+ failed_cpfile:
+       nilfs_mdt_destroy(nilfs->ns_cpfile);
+
+ failed_gc_dat:
+       nilfs_mdt_destroy(nilfs->ns_gc_dat);
+
+ failed_dat:
+       nilfs_mdt_destroy(nilfs->ns_dat);
+       goto failed;
+}
+
+static void nilfs_init_recovery_info(struct nilfs_recovery_info *ri)
+{
+       memset(ri, 0, sizeof(*ri));
+       INIT_LIST_HEAD(&ri->ri_used_segments);
+}
+
+static void nilfs_clear_recovery_info(struct nilfs_recovery_info *ri)
+{
+       nilfs_dispose_segment_list(&ri->ri_used_segments);
+}
+
+/**
+ * load_nilfs - load and recover the nilfs
+ * @nilfs: the_nilfs structure to be released
+ * @sbi: nilfs_sb_info used to recover past segment
+ *
+ * load_nilfs() searches and load the latest super root,
+ * attaches the last segment, and does recovery if needed.
+ * The caller must call this exclusively for simultaneous mounts.
+ */
+int load_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
+{
+       struct nilfs_recovery_info ri;
+       unsigned int s_flags = sbi->s_super->s_flags;
+       int really_read_only = bdev_read_only(nilfs->ns_bdev);
+       unsigned valid_fs;
+       int err = 0;
+
+       nilfs_init_recovery_info(&ri);
+
+       down_write(&nilfs->ns_sem);
+       valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS);
+       up_write(&nilfs->ns_sem);
+
+       if (!valid_fs && (s_flags & MS_RDONLY)) {
+               printk(KERN_INFO "NILFS: INFO: recovery "
+                      "required for readonly filesystem.\n");
+               if (really_read_only) {
+                       printk(KERN_ERR "NILFS: write access "
+                              "unavailable, cannot proceed.\n");
+                       err = -EROFS;
+                       goto failed;
+               }
+               printk(KERN_INFO "NILFS: write access will "
+                      "be enabled during recovery.\n");
+               sbi->s_super->s_flags &= ~MS_RDONLY;
+       }
+
+       err = nilfs_search_super_root(nilfs, sbi, &ri);
+       if (unlikely(err)) {
+               printk(KERN_ERR "NILFS: error searching super root.\n");
+               goto failed;
+       }
+
+       err = nilfs_load_super_root(nilfs, sbi, ri.ri_super_root);
+       if (unlikely(err)) {
+               printk(KERN_ERR "NILFS: error loading super root.\n");
+               goto failed;
+       }
+
+       if (!valid_fs) {
+               err = nilfs_recover_logical_segments(nilfs, sbi, &ri);
+               if (unlikely(err)) {
+                       nilfs_mdt_destroy(nilfs->ns_cpfile);
+                       nilfs_mdt_destroy(nilfs->ns_sufile);
+                       nilfs_mdt_destroy(nilfs->ns_dat);
+                       goto failed;
+               }
+               if (ri.ri_need_recovery == NILFS_RECOVERY_SR_UPDATED)
+                       sbi->s_super->s_dirt = 1;
+       }
+
+       set_nilfs_loaded(nilfs);
+
+ failed:
+       nilfs_clear_recovery_info(&ri);
+       sbi->s_super->s_flags = s_flags;
+       return err;
+}
+
+static unsigned long long nilfs_max_size(unsigned int blkbits)
+{
+       unsigned int max_bits;
+       unsigned long long res = MAX_LFS_FILESIZE; /* page cache limit */
+
+       max_bits = blkbits + NILFS_BMAP_KEY_BIT; /* bmap size limit */
+       if (max_bits < 64)
+               res = min_t(unsigned long long, res, (1ULL << max_bits) - 1);
+       return res;
+}
+
+static int nilfs_store_disk_layout(struct the_nilfs *nilfs,
+                                  struct nilfs_super_block *sbp)
+{
+       if (le32_to_cpu(sbp->s_rev_level) != NILFS_CURRENT_REV) {
+               printk(KERN_ERR "NILFS: revision mismatch "
+                      "(superblock rev.=%d.%d, current rev.=%d.%d). "
+                      "Please check the version of mkfs.nilfs.\n",
+                      le32_to_cpu(sbp->s_rev_level),
+                      le16_to_cpu(sbp->s_minor_rev_level),
+                      NILFS_CURRENT_REV, NILFS_MINOR_REV);
+               return -EINVAL;
+       }
+       nilfs->ns_sbsize = le16_to_cpu(sbp->s_bytes);
+       if (nilfs->ns_sbsize > BLOCK_SIZE)
+               return -EINVAL;
+
+       nilfs->ns_inode_size = le16_to_cpu(sbp->s_inode_size);
+       nilfs->ns_first_ino = le32_to_cpu(sbp->s_first_ino);
+
+       nilfs->ns_blocks_per_segment = le32_to_cpu(sbp->s_blocks_per_segment);
+       if (nilfs->ns_blocks_per_segment < NILFS_SEG_MIN_BLOCKS) {
+               printk(KERN_ERR "NILFS: too short segment. \n");
+               return -EINVAL;
+       }
+
+       nilfs->ns_first_data_block = le64_to_cpu(sbp->s_first_data_block);
+       nilfs->ns_nsegments = le64_to_cpu(sbp->s_nsegments);
+       nilfs->ns_r_segments_percentage =
+               le32_to_cpu(sbp->s_r_segments_percentage);
+       nilfs->ns_nrsvsegs =
+               max_t(unsigned long, NILFS_MIN_NRSVSEGS,
+                     DIV_ROUND_UP(nilfs->ns_nsegments *
+                                  nilfs->ns_r_segments_percentage, 100));
+       nilfs->ns_crc_seed = le32_to_cpu(sbp->s_crc_seed);
+       return 0;
+}
+
+static int nilfs_valid_sb(struct nilfs_super_block *sbp)
+{
+       static unsigned char sum[4];
+       const int sumoff = offsetof(struct nilfs_super_block, s_sum);
+       size_t bytes;
+       u32 crc;
+
+       if (!sbp || le16_to_cpu(sbp->s_magic) != NILFS_SUPER_MAGIC)
+               return 0;
+       bytes = le16_to_cpu(sbp->s_bytes);
+       if (bytes > BLOCK_SIZE)
+               return 0;
+       crc = crc32_le(le32_to_cpu(sbp->s_crc_seed), (unsigned char *)sbp,
+                      sumoff);
+       crc = crc32_le(crc, sum, 4);
+       crc = crc32_le(crc, (unsigned char *)sbp + sumoff + 4,
+                      bytes - sumoff - 4);
+       return crc == le32_to_cpu(sbp->s_sum);
+}
+
+static int nilfs_sb2_bad_offset(struct nilfs_super_block *sbp, u64 offset)
+{
+       return offset < ((le64_to_cpu(sbp->s_nsegments) *
+                         le32_to_cpu(sbp->s_blocks_per_segment)) <<
+                        (le32_to_cpu(sbp->s_log_block_size) + 10));
+}
+
+static void nilfs_release_super_block(struct the_nilfs *nilfs)
+{
+       int i;
+
+       for (i = 0; i < 2; i++) {
+               if (nilfs->ns_sbp[i]) {
+                       brelse(nilfs->ns_sbh[i]);
+                       nilfs->ns_sbh[i] = NULL;
+                       nilfs->ns_sbp[i] = NULL;
+               }
+       }
+}
+
+void nilfs_fall_back_super_block(struct the_nilfs *nilfs)
+{
+       brelse(nilfs->ns_sbh[0]);
+       nilfs->ns_sbh[0] = nilfs->ns_sbh[1];
+       nilfs->ns_sbp[0] = nilfs->ns_sbp[1];
+       nilfs->ns_sbh[1] = NULL;
+       nilfs->ns_sbp[1] = NULL;
+}
+
+void nilfs_swap_super_block(struct the_nilfs *nilfs)
+{
+       struct buffer_head *tsbh = nilfs->ns_sbh[0];
+       struct nilfs_super_block *tsbp = nilfs->ns_sbp[0];
+
+       nilfs->ns_sbh[0] = nilfs->ns_sbh[1];
+       nilfs->ns_sbp[0] = nilfs->ns_sbp[1];
+       nilfs->ns_sbh[1] = tsbh;
+       nilfs->ns_sbp[1] = tsbp;
+}
+
+static int nilfs_load_super_block(struct the_nilfs *nilfs,
+                                 struct super_block *sb, int blocksize,
+                                 struct nilfs_super_block **sbpp)
+{
+       struct nilfs_super_block **sbp = nilfs->ns_sbp;
+       struct buffer_head **sbh = nilfs->ns_sbh;
+       u64 sb2off = NILFS_SB2_OFFSET_BYTES(nilfs->ns_bdev->bd_inode->i_size);
+       int valid[2], swp = 0;
+
+       sbp[0] = nilfs_read_super_block(sb, NILFS_SB_OFFSET_BYTES, blocksize,
+                                       &sbh[0]);
+       sbp[1] = nilfs_read_super_block(sb, sb2off, blocksize, &sbh[1]);
+
+       if (!sbp[0]) {
+               if (!sbp[1]) {
+                       printk(KERN_ERR "NILFS: unable to read superblock\n");
+                       return -EIO;
+               }
+               printk(KERN_WARNING
+                      "NILFS warning: unable to read primary superblock\n");
+       } else if (!sbp[1])
+               printk(KERN_WARNING
+                      "NILFS warning: unable to read secondary superblock\n");
+
+       valid[0] = nilfs_valid_sb(sbp[0]);
+       valid[1] = nilfs_valid_sb(sbp[1]);
+       swp = valid[1] &&
+               (!valid[0] ||
+                le64_to_cpu(sbp[1]->s_wtime) > le64_to_cpu(sbp[0]->s_wtime));
+
+       if (valid[swp] && nilfs_sb2_bad_offset(sbp[swp], sb2off)) {
+               brelse(sbh[1]);
+               sbh[1] = NULL;
+               sbp[1] = NULL;
+               swp = 0;
+       }
+       if (!valid[swp]) {
+               nilfs_release_super_block(nilfs);
+               printk(KERN_ERR "NILFS: Can't find nilfs on dev %s.\n",
+                      sb->s_id);
+               return -EINVAL;
+       }
+
+       if (swp) {
+               printk(KERN_WARNING "NILFS warning: broken superblock. "
+                      "using spare superblock.\n");
+               nilfs_swap_super_block(nilfs);
+       }
+
+       nilfs->ns_sbwtime[0] = le64_to_cpu(sbp[0]->s_wtime);
+       nilfs->ns_sbwtime[1] = valid[!swp] ? le64_to_cpu(sbp[1]->s_wtime) : 0;
+       nilfs->ns_prot_seq = le64_to_cpu(sbp[valid[1] & !swp]->s_last_seq);
+       *sbpp = sbp[0];
+       return 0;
+}
+
+/**
+ * init_nilfs - initialize a NILFS instance.
+ * @nilfs: the_nilfs structure
+ * @sbi: nilfs_sb_info
+ * @sb: super block
+ * @data: mount options
+ *
+ * init_nilfs() performs common initialization per block device (e.g.
+ * reading the super block, getting disk layout information, initializing
+ * shared fields in the_nilfs). It takes on some portion of the jobs
+ * typically done by a fill_super() routine. This division arises from
+ * the nature that multiple NILFS instances may be simultaneously
+ * mounted on a device.
+ * For multiple mounts on the same device, only the first mount
+ * invokes these tasks.
+ *
+ * Return Value: On success, 0 is returned. On error, a negative error
+ * code is returned.
+ */
+int init_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi, char *data)
+{
+       struct super_block *sb = sbi->s_super;
+       struct nilfs_super_block *sbp;
+       struct backing_dev_info *bdi;
+       int blocksize;
+       int err;
+
+       down_write(&nilfs->ns_sem);
+       if (nilfs_init(nilfs)) {
+               /* Load values from existing the_nilfs */
+               sbp = nilfs->ns_sbp[0];
+               err = nilfs_store_magic_and_option(sb, sbp, data);
+               if (err)
+                       goto out;
+
+               blocksize = BLOCK_SIZE << le32_to_cpu(sbp->s_log_block_size);
+               if (sb->s_blocksize != blocksize &&
+                   !sb_set_blocksize(sb, blocksize)) {
+                       printk(KERN_ERR "NILFS: blocksize %d unfit to device\n",
+                              blocksize);
+                       err = -EINVAL;
+               }
+               sb->s_maxbytes = nilfs_max_size(sb->s_blocksize_bits);
+               goto out;
+       }
+
+       blocksize = sb_min_blocksize(sb, BLOCK_SIZE);
+       if (!blocksize) {
+               printk(KERN_ERR "NILFS: unable to set blocksize\n");
+               err = -EINVAL;
+               goto out;
+       }
+       err = nilfs_load_super_block(nilfs, sb, blocksize, &sbp);
+       if (err)
+               goto out;
+
+       err = nilfs_store_magic_and_option(sb, sbp, data);
+       if (err)
+               goto failed_sbh;
+
+       blocksize = BLOCK_SIZE << le32_to_cpu(sbp->s_log_block_size);
+       if (sb->s_blocksize != blocksize) {
+               int hw_blocksize = bdev_hardsect_size(sb->s_bdev);
+
+               if (blocksize < hw_blocksize) {
+                       printk(KERN_ERR
+                              "NILFS: blocksize %d too small for device "
+                              "(sector-size = %d).\n",
+                              blocksize, hw_blocksize);
+                       err = -EINVAL;
+                       goto failed_sbh;
+               }
+               nilfs_release_super_block(nilfs);
+               sb_set_blocksize(sb, blocksize);
+
+               err = nilfs_load_super_block(nilfs, sb, blocksize, &sbp);
+               if (err)
+                       goto out;
+                       /* not failed_sbh; sbh is released automatically
+                          when reloading fails. */
+       }
+       nilfs->ns_blocksize_bits = sb->s_blocksize_bits;
+
+       err = nilfs_store_disk_layout(nilfs, sbp);
+       if (err)
+               goto failed_sbh;
+
+       sb->s_maxbytes = nilfs_max_size(sb->s_blocksize_bits);
+
+       nilfs->ns_mount_state = le16_to_cpu(sbp->s_state);
+
+       bdi = nilfs->ns_bdev->bd_inode_backing_dev_info;
+       if (!bdi)
+               bdi = nilfs->ns_bdev->bd_inode->i_mapping->backing_dev_info;
+       nilfs->ns_bdi = bdi ? : &default_backing_dev_info;
+
+       /* Finding last segment */
+       nilfs->ns_last_pseg = le64_to_cpu(sbp->s_last_pseg);
+       nilfs->ns_last_cno = le64_to_cpu(sbp->s_last_cno);
+       nilfs->ns_last_seq = le64_to_cpu(sbp->s_last_seq);
+
+       nilfs->ns_seg_seq = nilfs->ns_last_seq;
+       nilfs->ns_segnum =
+               nilfs_get_segnum_of_block(nilfs, nilfs->ns_last_pseg);
+       nilfs->ns_cno = nilfs->ns_last_cno + 1;
+       if (nilfs->ns_segnum >= nilfs->ns_nsegments) {
+               printk(KERN_ERR "NILFS invalid last segment number.\n");
+               err = -EINVAL;
+               goto failed_sbh;
+       }
+       /* Dummy values  */
+       nilfs->ns_free_segments_count =
+               nilfs->ns_nsegments - (nilfs->ns_segnum + 1);
+
+       /* Initialize gcinode cache */
+       err = nilfs_init_gccache(nilfs);
+       if (err)
+               goto failed_sbh;
+
+       set_nilfs_init(nilfs);
+       err = 0;
+ out:
+       up_write(&nilfs->ns_sem);
+       return err;
+
+ failed_sbh:
+       nilfs_release_super_block(nilfs);
+       goto out;
+}
+
+int nilfs_count_free_blocks(struct the_nilfs *nilfs, sector_t *nblocks)
+{
+       struct inode *dat = nilfs_dat_inode(nilfs);
+       unsigned long ncleansegs;
+       int err;
+
+       down_read(&NILFS_MDT(dat)->mi_sem);     /* XXX */
+       err = nilfs_sufile_get_ncleansegs(nilfs->ns_sufile, &ncleansegs);
+       up_read(&NILFS_MDT(dat)->mi_sem);       /* XXX */
+       if (likely(!err))
+               *nblocks = (sector_t)ncleansegs * nilfs->ns_blocks_per_segment;
+       return err;
+}
+
+int nilfs_near_disk_full(struct the_nilfs *nilfs)
+{
+       struct inode *sufile = nilfs->ns_sufile;
+       unsigned long ncleansegs, nincsegs;
+       int ret;
+
+       ret = nilfs_sufile_get_ncleansegs(sufile, &ncleansegs);
+       if (likely(!ret)) {
+               nincsegs = atomic_read(&nilfs->ns_ndirtyblks) /
+                       nilfs->ns_blocks_per_segment + 1;
+               if (ncleansegs <= nilfs->ns_nrsvsegs + nincsegs)
+                       ret++;
+       }
+       return ret;
+}
+
+int nilfs_checkpoint_is_mounted(struct the_nilfs *nilfs, __u64 cno,
+                               int snapshot_mount)
+{
+       struct nilfs_sb_info *sbi;
+       int ret = 0;
+
+       down_read(&nilfs->ns_sem);
+       if (cno == 0 || cno > nilfs->ns_cno)
+               goto out_unlock;
+
+       list_for_each_entry(sbi, &nilfs->ns_supers, s_list) {
+               if (sbi->s_snapshot_cno == cno &&
+                   (!snapshot_mount || nilfs_test_opt(sbi, SNAPSHOT))) {
+                                       /* exclude read-only mounts */
+                       ret++;
+                       break;
+               }
+       }
+       /* for protecting recent checkpoints */
+       if (cno >= nilfs_last_cno(nilfs))
+               ret++;
+
+ out_unlock:
+       up_read(&nilfs->ns_sem);
+       return ret;
+}
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h
new file mode 100644 (file)
index 0000000..30fe587
--- /dev/null
@@ -0,0 +1,298 @@
+/*
+ * the_nilfs.h - the_nilfs shared structure.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ *
+ */
+
+#ifndef _THE_NILFS_H
+#define _THE_NILFS_H
+
+#include <linux/types.h>
+#include <linux/buffer_head.h>
+#include <linux/fs.h>
+#include <linux/blkdev.h>
+#include <linux/backing-dev.h>
+#include "sb.h"
+
+/* the_nilfs struct */
+enum {
+       THE_NILFS_INIT = 0,     /* Information from super_block is set */
+       THE_NILFS_LOADED,       /* Roll-back/roll-forward has done and
+                                  the latest checkpoint was loaded */
+       THE_NILFS_DISCONTINUED, /* 'next' pointer chain has broken */
+};
+
+/**
+ * struct the_nilfs - struct to supervise multiple nilfs mount points
+ * @ns_flags: flags
+ * @ns_count: reference count
+ * @ns_bdev: block device
+ * @ns_bdi: backing dev info
+ * @ns_writer: back pointer to writable nilfs_sb_info
+ * @ns_sem: semaphore for shared states
+ * @ns_writer_mutex: mutex protecting ns_writer attach/detach
+ * @ns_writer_refcount: number of referrers on ns_writer
+ * @ns_sbh: buffer heads of on-disk super blocks
+ * @ns_sbp: pointers to super block data
+ * @ns_sbwtime: previous write time of super blocks
+ * @ns_sbsize: size of valid data in super block
+ * @ns_supers: list of nilfs super block structs
+ * @ns_seg_seq: segment sequence counter
+ * @ns_segnum: index number of the latest full segment.
+ * @ns_nextnum: index number of the full segment index to be used next
+ * @ns_pseg_offset: offset of next partial segment in the current full segment
+ * @ns_cno: next checkpoint number
+ * @ns_ctime: write time of the last segment
+ * @ns_nongc_ctime: write time of the last segment not for cleaner operation
+ * @ns_ndirtyblks: Number of dirty data blocks
+ * @ns_last_segment_lock: lock protecting fields for the latest segment
+ * @ns_last_pseg: start block number of the latest segment
+ * @ns_last_seq: sequence value of the latest segment
+ * @ns_last_cno: checkpoint number of the latest segment
+ * @ns_prot_seq: least sequence number of segments which must not be reclaimed
+ * @ns_free_segments_count: counter of free segments
+ * @ns_segctor_sem: segment constructor semaphore
+ * @ns_dat: DAT file inode
+ * @ns_cpfile: checkpoint file inode
+ * @ns_sufile: segusage file inode
+ * @ns_gc_dat: shadow inode of the DAT file inode for GC
+ * @ns_gc_inodes: dummy inodes to keep live blocks
+ * @ns_gc_inodes_h: hash list to keep dummy inode holding live blocks
+ * @ns_blocksize_bits: bit length of block size
+ * @ns_nsegments: number of segments in filesystem
+ * @ns_blocks_per_segment: number of blocks per segment
+ * @ns_r_segments_percentage: reserved segments percentage
+ * @ns_nrsvsegs: number of reserved segments
+ * @ns_first_data_block: block number of first data block
+ * @ns_inode_size: size of on-disk inode
+ * @ns_first_ino: first not-special inode number
+ * @ns_crc_seed: seed value of CRC32 calculation
+ */
+struct the_nilfs {
+       unsigned long           ns_flags;
+       atomic_t                ns_count;
+
+       struct block_device    *ns_bdev;
+       struct backing_dev_info *ns_bdi;
+       struct nilfs_sb_info   *ns_writer;
+       struct rw_semaphore     ns_sem;
+       struct mutex            ns_writer_mutex;
+       atomic_t                ns_writer_refcount;
+
+       /*
+        * used for
+        * - loading the latest checkpoint exclusively.
+        * - allocating a new full segment.
+        * - protecting s_dirt in the super_block struct
+        *   (see nilfs_write_super) and the following fields.
+        */
+       struct buffer_head     *ns_sbh[2];
+       struct nilfs_super_block *ns_sbp[2];
+       time_t                  ns_sbwtime[2];
+       unsigned                ns_sbsize;
+       unsigned                ns_mount_state;
+       struct list_head        ns_supers;
+
+       /*
+        * Following fields are dedicated to a writable FS-instance.
+        * Except for the period seeking checkpoint, code outside the segment
+        * constructor must lock a segment semaphore while accessing these
+        * fields.
+        * The writable FS-instance is sole during a lifetime of the_nilfs.
+        */
+       u64                     ns_seg_seq;
+       __u64                   ns_segnum;
+       __u64                   ns_nextnum;
+       unsigned long           ns_pseg_offset;
+       __u64                   ns_cno;
+       time_t                  ns_ctime;
+       time_t                  ns_nongc_ctime;
+       atomic_t                ns_ndirtyblks;
+
+       /*
+        * The following fields hold information on the latest partial segment
+        * written to disk with a super root.  These fields are protected by
+        * ns_last_segment_lock.
+        */
+       spinlock_t              ns_last_segment_lock;
+       sector_t                ns_last_pseg;
+       u64                     ns_last_seq;
+       __u64                   ns_last_cno;
+       u64                     ns_prot_seq;
+       unsigned long           ns_free_segments_count;
+
+       struct rw_semaphore     ns_segctor_sem;
+
+       /*
+        * Following fields are lock free except for the period before
+        * the_nilfs is initialized.
+        */
+       struct inode           *ns_dat;
+       struct inode           *ns_cpfile;
+       struct inode           *ns_sufile;
+       struct inode           *ns_gc_dat;
+
+       /* GC inode list and hash table head */
+       struct list_head        ns_gc_inodes;
+       struct hlist_head      *ns_gc_inodes_h;
+
+       /* Disk layout information (static) */
+       unsigned int            ns_blocksize_bits;
+       unsigned long           ns_nsegments;
+       unsigned long           ns_blocks_per_segment;
+       unsigned long           ns_r_segments_percentage;
+       unsigned long           ns_nrsvsegs;
+       unsigned long           ns_first_data_block;
+       int                     ns_inode_size;
+       int                     ns_first_ino;
+       u32                     ns_crc_seed;
+};
+
+#define NILFS_GCINODE_HASH_BITS                8
+#define NILFS_GCINODE_HASH_SIZE                (1<<NILFS_GCINODE_HASH_BITS)
+
+#define THE_NILFS_FNS(bit, name)                                       \
+static inline void set_nilfs_##name(struct the_nilfs *nilfs)           \
+{                                                                      \
+       set_bit(THE_NILFS_##bit, &(nilfs)->ns_flags);                   \
+}                                                                      \
+static inline void clear_nilfs_##name(struct the_nilfs *nilfs)         \
+{                                                                      \
+       clear_bit(THE_NILFS_##bit, &(nilfs)->ns_flags);                 \
+}                                                                      \
+static inline int nilfs_##name(struct the_nilfs *nilfs)                        \
+{                                                                      \
+       return test_bit(THE_NILFS_##bit, &(nilfs)->ns_flags);           \
+}
+
+THE_NILFS_FNS(INIT, init)
+THE_NILFS_FNS(LOADED, loaded)
+THE_NILFS_FNS(DISCONTINUED, discontinued)
+
+/* Minimum interval of periodical update of superblocks (in seconds) */
+#define NILFS_SB_FREQ          10
+#define NILFS_ALTSB_FREQ       60  /* spare superblock */
+
+void nilfs_set_last_segment(struct the_nilfs *, sector_t, u64, __u64);
+struct the_nilfs *alloc_nilfs(struct block_device *);
+void put_nilfs(struct the_nilfs *);
+int init_nilfs(struct the_nilfs *, struct nilfs_sb_info *, char *);
+int load_nilfs(struct the_nilfs *, struct nilfs_sb_info *);
+int nilfs_count_free_blocks(struct the_nilfs *, sector_t *);
+int nilfs_checkpoint_is_mounted(struct the_nilfs *, __u64, int);
+int nilfs_near_disk_full(struct the_nilfs *);
+void nilfs_fall_back_super_block(struct the_nilfs *);
+void nilfs_swap_super_block(struct the_nilfs *);
+
+
+static inline void get_nilfs(struct the_nilfs *nilfs)
+{
+       /* Caller must have at least one reference of the_nilfs. */
+       atomic_inc(&nilfs->ns_count);
+}
+
+static inline struct nilfs_sb_info *nilfs_get_writer(struct the_nilfs *nilfs)
+{
+       if (atomic_inc_and_test(&nilfs->ns_writer_refcount))
+               mutex_lock(&nilfs->ns_writer_mutex);
+       return nilfs->ns_writer;
+}
+
+static inline void nilfs_put_writer(struct the_nilfs *nilfs)
+{
+       if (atomic_add_negative(-1, &nilfs->ns_writer_refcount))
+               mutex_unlock(&nilfs->ns_writer_mutex);
+}
+
+static inline void
+nilfs_attach_writer(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
+{
+       mutex_lock(&nilfs->ns_writer_mutex);
+       nilfs->ns_writer = sbi;
+       mutex_unlock(&nilfs->ns_writer_mutex);
+}
+
+static inline void
+nilfs_detach_writer(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
+{
+       mutex_lock(&nilfs->ns_writer_mutex);
+       if (sbi == nilfs->ns_writer)
+               nilfs->ns_writer = NULL;
+       mutex_unlock(&nilfs->ns_writer_mutex);
+}
+
+static inline void
+nilfs_get_segment_range(struct the_nilfs *nilfs, __u64 segnum,
+                       sector_t *seg_start, sector_t *seg_end)
+{
+       *seg_start = (sector_t)nilfs->ns_blocks_per_segment * segnum;
+       *seg_end = *seg_start + nilfs->ns_blocks_per_segment - 1;
+       if (segnum == 0)
+               *seg_start = nilfs->ns_first_data_block;
+}
+
+static inline sector_t
+nilfs_get_segment_start_blocknr(struct the_nilfs *nilfs, __u64 segnum)
+{
+       return (segnum == 0) ? nilfs->ns_first_data_block :
+               (sector_t)nilfs->ns_blocks_per_segment * segnum;
+}
+
+static inline __u64
+nilfs_get_segnum_of_block(struct the_nilfs *nilfs, sector_t blocknr)
+{
+       sector_t segnum = blocknr;
+
+       sector_div(segnum, nilfs->ns_blocks_per_segment);
+       return segnum;
+}
+
+static inline void
+nilfs_terminate_segment(struct the_nilfs *nilfs, sector_t seg_start,
+                       sector_t seg_end)
+{
+       /* terminate the current full segment (used in case of I/O-error) */
+       nilfs->ns_pseg_offset = seg_end - seg_start + 1;
+}
+
+static inline void nilfs_shift_to_next_segment(struct the_nilfs *nilfs)
+{
+       /* move forward with a full segment */
+       nilfs->ns_segnum = nilfs->ns_nextnum;
+       nilfs->ns_pseg_offset = 0;
+       nilfs->ns_seg_seq++;
+}
+
+static inline __u64 nilfs_last_cno(struct the_nilfs *nilfs)
+{
+       __u64 cno;
+
+       spin_lock(&nilfs->ns_last_segment_lock);
+       cno = nilfs->ns_last_cno;
+       spin_unlock(&nilfs->ns_last_segment_lock);
+       return cno;
+}
+
+static inline int nilfs_segment_is_active(struct the_nilfs *nilfs, __u64 n)
+{
+       return n == nilfs->ns_segnum || n == nilfs->ns_nextnum;
+}
+
+#endif /* _THE_NILFS_H */
index a5887df..8672b95 100644 (file)
@@ -1926,7 +1926,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
                   out->f_path.dentry->d_name.len,
                   out->f_path.dentry->d_name.name);
 
-       inode_double_lock(inode, pipe->inode);
+       mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT);
 
        ret = ocfs2_rw_lock(inode, 1);
        if (ret < 0) {
@@ -1941,12 +1941,16 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
                goto out_unlock;
        }
 
+       if (pipe->inode)
+               mutex_lock_nested(&pipe->inode->i_mutex, I_MUTEX_CHILD);
        ret = generic_file_splice_write_nolock(pipe, out, ppos, len, flags);
+       if (pipe->inode)
+               mutex_unlock(&pipe->inode->i_mutex);
 
 out_unlock:
        ocfs2_rw_unlock(inode, 1);
 out:
-       inode_double_unlock(inode, pipe->inode);
+       mutex_unlock(&inode->i_mutex);
 
        mlog_exit(ret);
        return ret;
index b0ae0be..39e4ad4 100644 (file)
@@ -204,6 +204,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
        struct file *file = vma->vm_file;
        int flags = vma->vm_flags;
        unsigned long ino = 0;
+       unsigned long long pgoff = 0;
        dev_t dev = 0;
        int len;
 
@@ -211,6 +212,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
                struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
                dev = inode->i_sb->s_dev;
                ino = inode->i_ino;
+               pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
        }
 
        seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
@@ -220,7 +222,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
                        flags & VM_WRITE ? 'w' : '-',
                        flags & VM_EXEC ? 'x' : '-',
                        flags & VM_MAYSHARE ? 's' : 'p',
-                       ((loff_t)vma->vm_pgoff) << PAGE_SHIFT,
+                       pgoff,
                        MAJOR(dev), MINOR(dev), ino, &len);
 
        /*
index 863464d..64a72e2 100644 (file)
@@ -126,6 +126,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
        struct file *file;
        dev_t dev = 0;
        int flags, len;
+       unsigned long long pgoff = 0;
 
        flags = vma->vm_flags;
        file = vma->vm_file;
@@ -134,6 +135,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
                struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
                dev = inode->i_sb->s_dev;
                ino = inode->i_ino;
+               pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
        }
 
        seq_printf(m,
@@ -144,7 +146,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
                   flags & VM_WRITE ? 'w' : '-',
                   flags & VM_EXEC ? 'x' : '-',
                   flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p',
-                  (unsigned long long) vma->vm_pgoff << PAGE_SHIFT,
+                  pgoff,
                   MAJOR(dev), MINOR(dev), ino, &len);
 
        if (file) {
index a404fb8..3a6b193 100644 (file)
@@ -221,22 +221,23 @@ static int ramfs_fill_super(struct super_block * sb, void * data, int silent)
        save_mount_options(sb, data);
 
        fsi = kzalloc(sizeof(struct ramfs_fs_info), GFP_KERNEL);
+       sb->s_fs_info = fsi;
        if (!fsi) {
                err = -ENOMEM;
                goto fail;
        }
-       sb->s_fs_info = fsi;
 
        err = ramfs_parse_options(data, &fsi->mount_opts);
        if (err)
                goto fail;
 
-       sb->s_maxbytes = MAX_LFS_FILESIZE;
-       sb->s_blocksize = PAGE_CACHE_SIZE;
-       sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
-       sb->s_magic = RAMFS_MAGIC;
-       sb->s_op = &ramfs_ops;
-       sb->s_time_gran = 1;
+       sb->s_maxbytes          = MAX_LFS_FILESIZE;
+       sb->s_blocksize         = PAGE_CACHE_SIZE;
+       sb->s_blocksize_bits    = PAGE_CACHE_SHIFT;
+       sb->s_magic             = RAMFS_MAGIC;
+       sb->s_op                = &ramfs_ops;
+       sb->s_time_gran         = 1;
+
        inode = ramfs_get_inode(sb, S_IFDIR | fsi->mount_opts.mode, 0);
        if (!inode) {
                err = -ENOMEM;
@@ -244,14 +245,16 @@ static int ramfs_fill_super(struct super_block * sb, void * data, int silent)
        }
 
        root = d_alloc_root(inode);
+       sb->s_root = root;
        if (!root) {
                err = -ENOMEM;
                goto fail;
        }
-       sb->s_root = root;
+
        return 0;
 fail:
        kfree(fsi);
+       sb->s_fs_info = NULL;
        iput(inode);
        return err;
 }
index 1a17020..ce2d6bc 100644 (file)
@@ -1,6 +1,6 @@
 config ROMFS_FS
        tristate "ROM file system support"
-       depends on BLOCK
+       depends on BLOCK || MTD
        ---help---
          This is a very small read-only file system mainly intended for
          initial ram disks of installation disks, but it could be used for
@@ -14,3 +14,49 @@ config ROMFS_FS
 
          If you don't know whether you need it, then you don't need it:
          answer N.
+
+#
+# Select the backing stores to be supported
+#
+choice
+       prompt "RomFS backing stores"
+       depends on ROMFS_FS
+       default ROMFS_BACKED_BY_BLOCK
+       help
+         Select the backing stores to be supported.
+
+config ROMFS_BACKED_BY_BLOCK
+       bool "Block device-backed ROM file system support"
+       depends on BLOCK
+       help
+         This permits ROMFS to use block devices buffered through the page
+         cache as the medium from which to retrieve data.  It does not allow
+         direct mapping of the medium.
+
+         If unsure, answer Y.
+
+config ROMFS_BACKED_BY_MTD
+       bool "MTD-backed ROM file system support"
+       depends on MTD=y || (ROMFS_FS=m && MTD)
+       help
+         This permits ROMFS to use MTD based devices directly, without the
+         intercession of the block layer (which may have been disabled).  It
+         also allows direct mapping of MTD devices through romfs files under
+         NOMMU conditions if the underlying device is directly addressable by
+         the CPU.
+
+         If unsure, answer Y.
+
+config ROMFS_BACKED_BY_BOTH
+       bool "Both the above"
+       depends on BLOCK && (MTD=y || (ROMFS_FS=m && MTD))
+endchoice
+
+
+config ROMFS_ON_BLOCK
+       bool
+       default y if ROMFS_BACKED_BY_BLOCK || ROMFS_BACKED_BY_BOTH
+
+config ROMFS_ON_MTD
+       bool
+       default y if ROMFS_BACKED_BY_MTD || ROMFS_BACKED_BY_BOTH
index c95b21c..420beb7 100644 (file)
@@ -1,7 +1,12 @@
 #
-# Makefile for the linux romfs filesystem routines.
+# Makefile for the linux RomFS filesystem routines.
 #
 
 obj-$(CONFIG_ROMFS_FS) += romfs.o
 
-romfs-objs := inode.o
+romfs-y := storage.o super.o
+
+ifneq ($(CONFIG_MMU),y)
+romfs-$(CONFIG_ROMFS_ON_MTD) += mmap-nommu.o
+endif
+
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c
deleted file mode 100644 (file)
index 98a232f..0000000
+++ /dev/null
@@ -1,665 +0,0 @@
-/*
- * ROMFS file system, Linux implementation
- *
- * Copyright (C) 1997-1999  Janos Farkas <chexum@shadow.banki.hu>
- *
- * Using parts of the minix filesystem
- * Copyright (C) 1991, 1992  Linus Torvalds
- *
- * and parts of the affs filesystem additionally
- * Copyright (C) 1993  Ray Burr
- * Copyright (C) 1996  Hans-Joachim Widmaier
- *
- * 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.
- *
- * Changes
- *                                     Changed for 2.1.19 modules
- *     Jan 1997                        Initial release
- *     Jun 1997                        2.1.43+ changes
- *                                     Proper page locking in readpage
- *                                     Changed to work with 2.1.45+ fs
- *     Jul 1997                        Fixed follow_link
- *                     2.1.47
- *                                     lookup shouldn't return -ENOENT
- *                                     from Horst von Brand:
- *                                       fail on wrong checksum
- *                                       double unlock_super was possible
- *                                       correct namelen for statfs
- *                                     spotted by Bill Hawes:
- *                                       readlink shouldn't iput()
- *     Jun 1998        2.1.106         from Avery Pennarun: glibc scandir()
- *                                       exposed a problem in readdir
- *                     2.1.107         code-freeze spellchecker run
- *     Aug 1998                        2.1.118+ VFS changes
- *     Sep 1998        2.1.122         another VFS change (follow_link)
- *     Apr 1999        2.2.7           no more EBADF checking in
- *                                       lookup/readdir, use ERR_PTR
- *     Jun 1999        2.3.6           d_alloc_root use changed
- *                     2.3.9           clean up usage of ENOENT/negative
- *                                       dentries in lookup
- *                                     clean up page flags setting
- *                                       (error, uptodate, locking) in
- *                                       in readpage
- *                                     use init_special_inode for
- *                                       fifos/sockets (and streamline) in
- *                                       read_inode, fix _ops table order
- *     Aug 1999        2.3.16          __initfunc() => __init change
- *     Oct 1999        2.3.24          page->owner hack obsoleted
- *     Nov 1999        2.3.27          2.3.25+ page->offset => index change
- */
-
-/* todo:
- *     - see Documentation/filesystems/romfs.txt
- *     - use allocated, not stack memory for file names?
- *     - considering write access...
- *     - network (tftp) files?
- *     - merge back some _op tables
- */
-
-/*
- * Sorry about some optimizations and for some goto's.  I just wanted
- * to squeeze some more bytes out of this code.. :)
- */
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <linux/romfs_fs.h>
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
-#include <linux/buffer_head.h>
-#include <linux/vfs.h>
-
-#include <asm/uaccess.h>
-
-struct romfs_inode_info {
-       unsigned long i_metasize;       /* size of non-data area */
-       unsigned long i_dataoffset;     /* from the start of fs */
-       struct inode vfs_inode;
-};
-
-static struct inode *romfs_iget(struct super_block *, unsigned long);
-
-/* instead of private superblock data */
-static inline unsigned long romfs_maxsize(struct super_block *sb)
-{
-       return (unsigned long)sb->s_fs_info;
-}
-
-static inline struct romfs_inode_info *ROMFS_I(struct inode *inode)
-{
-       return container_of(inode, struct romfs_inode_info, vfs_inode);
-}
-
-static __u32
-romfs_checksum(void *data, int size)
-{
-       __u32 sum;
-       __be32 *ptr;
-
-       sum = 0; ptr = data;
-       size>>=2;
-       while (size>0) {
-               sum += be32_to_cpu(*ptr++);
-               size--;
-       }
-       return sum;
-}
-
-static const struct super_operations romfs_ops;
-
-static int romfs_fill_super(struct super_block *s, void *data, int silent)
-{
-       struct buffer_head *bh;
-       struct romfs_super_block *rsb;
-       struct inode *root;
-       int sz, ret = -EINVAL;
-
-       /* I would parse the options here, but there are none.. :) */
-
-       sb_set_blocksize(s, ROMBSIZE);
-       s->s_maxbytes = 0xFFFFFFFF;
-
-       bh = sb_bread(s, 0);
-       if (!bh) {
-               /* XXX merge with other printk? */
-                printk ("romfs: unable to read superblock\n");
-               goto outnobh;
-       }
-
-       rsb = (struct romfs_super_block *)bh->b_data;
-       sz = be32_to_cpu(rsb->size);
-       if (rsb->word0 != ROMSB_WORD0 || rsb->word1 != ROMSB_WORD1
-          || sz < ROMFH_SIZE) {
-               if (!silent)
-                       printk ("VFS: Can't find a romfs filesystem on dev "
-                               "%s.\n", s->s_id);
-               goto out;
-       }
-       if (romfs_checksum(rsb, min_t(int, sz, 512))) {
-               printk ("romfs: bad initial checksum on dev "
-                       "%s.\n", s->s_id);
-               goto out;
-       }
-
-       s->s_magic = ROMFS_MAGIC;
-       s->s_fs_info = (void *)(long)sz;
-
-       s->s_flags |= MS_RDONLY;
-
-       /* Find the start of the fs */
-       sz = (ROMFH_SIZE +
-             strnlen(rsb->name, ROMFS_MAXFN) + 1 + ROMFH_PAD)
-            & ROMFH_MASK;
-
-       s->s_op = &romfs_ops;
-       root = romfs_iget(s, sz);
-       if (IS_ERR(root)) {
-               ret = PTR_ERR(root);
-               goto out;
-       }
-
-       ret = -ENOMEM;
-       s->s_root = d_alloc_root(root);
-       if (!s->s_root)
-               goto outiput;
-
-       brelse(bh);
-       return 0;
-
-outiput:
-       iput(root);
-out:
-       brelse(bh);
-outnobh:
-       return ret;
-}
-
-/* That's simple too. */
-
-static int
-romfs_statfs(struct dentry *dentry, struct kstatfs *buf)
-{
-       buf->f_type = ROMFS_MAGIC;
-       buf->f_bsize = ROMBSIZE;
-       buf->f_bfree = buf->f_bavail = buf->f_ffree;
-       buf->f_blocks = (romfs_maxsize(dentry->d_sb)+ROMBSIZE-1)>>ROMBSBITS;
-       buf->f_namelen = ROMFS_MAXFN;
-       return 0;
-}
-
-/* some helper routines */
-
-static int
-romfs_strnlen(struct inode *i, unsigned long offset, unsigned long count)
-{
-       struct buffer_head *bh;
-       unsigned long avail, maxsize, res;
-
-       maxsize = romfs_maxsize(i->i_sb);
-       if (offset >= maxsize)
-               return -1;
-
-       /* strnlen is almost always valid */
-       if (count > maxsize || offset+count > maxsize)
-               count = maxsize-offset;
-
-       bh = sb_bread(i->i_sb, offset>>ROMBSBITS);
-       if (!bh)
-               return -1;              /* error */
-
-       avail = ROMBSIZE - (offset & ROMBMASK);
-       maxsize = min_t(unsigned long, count, avail);
-       res = strnlen(((char *)bh->b_data)+(offset&ROMBMASK), maxsize);
-       brelse(bh);
-
-       if (res < maxsize)
-               return res;             /* found all of it */
-
-       while (res < count) {
-               offset += maxsize;
-
-               bh = sb_bread(i->i_sb, offset>>ROMBSBITS);
-               if (!bh)
-                       return -1;
-               maxsize = min_t(unsigned long, count - res, ROMBSIZE);
-               avail = strnlen(bh->b_data, maxsize);
-               res += avail;
-               brelse(bh);
-               if (avail < maxsize)
-                       return res;
-       }
-       return res;
-}
-
-static int
-romfs_copyfrom(struct inode *i, void *dest, unsigned long offset, unsigned long count)
-{
-       struct buffer_head *bh;
-       unsigned long avail, maxsize, res;
-
-       maxsize = romfs_maxsize(i->i_sb);
-       if (offset >= maxsize || count > maxsize || offset+count>maxsize)
-               return -1;
-
-       bh = sb_bread(i->i_sb, offset>>ROMBSBITS);
-       if (!bh)
-               return -1;              /* error */
-
-       avail = ROMBSIZE - (offset & ROMBMASK);
-       maxsize = min_t(unsigned long, count, avail);
-       memcpy(dest, ((char *)bh->b_data) + (offset & ROMBMASK), maxsize);
-       brelse(bh);
-
-       res = maxsize;                  /* all of it */
-
-       while (res < count) {
-               offset += maxsize;
-               dest += maxsize;
-
-               bh = sb_bread(i->i_sb, offset>>ROMBSBITS);
-               if (!bh)
-                       return -1;
-               maxsize = min_t(unsigned long, count - res, ROMBSIZE);
-               memcpy(dest, bh->b_data, maxsize);
-               brelse(bh);
-               res += maxsize;
-       }
-       return res;
-}
-
-static unsigned char romfs_dtype_table[] = {
-       DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_SOCK, DT_FIFO
-};
-
-static int
-romfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
-{
-       struct inode *i = filp->f_path.dentry->d_inode;
-       struct romfs_inode ri;
-       unsigned long offset, maxoff;
-       int j, ino, nextfh;
-       int stored = 0;
-       char fsname[ROMFS_MAXFN];       /* XXX dynamic? */
-
-       lock_kernel();
-
-       maxoff = romfs_maxsize(i->i_sb);
-
-       offset = filp->f_pos;
-       if (!offset) {
-               offset = i->i_ino & ROMFH_MASK;
-               if (romfs_copyfrom(i, &ri, offset, ROMFH_SIZE) <= 0)
-                       goto out;
-               offset = be32_to_cpu(ri.spec) & ROMFH_MASK;
-       }
-
-       /* Not really failsafe, but we are read-only... */
-       for(;;) {
-               if (!offset || offset >= maxoff) {
-                       offset = maxoff;
-                       filp->f_pos = offset;
-                       goto out;
-               }
-               filp->f_pos = offset;
-
-               /* Fetch inode info */
-               if (romfs_copyfrom(i, &ri, offset, ROMFH_SIZE) <= 0)
-                       goto out;
-
-               j = romfs_strnlen(i, offset+ROMFH_SIZE, sizeof(fsname)-1);
-               if (j < 0)
-                       goto out;
-
-               fsname[j]=0;
-               romfs_copyfrom(i, fsname, offset+ROMFH_SIZE, j);
-
-               ino = offset;
-               nextfh = be32_to_cpu(ri.next);
-               if ((nextfh & ROMFH_TYPE) == ROMFH_HRD)
-                       ino = be32_to_cpu(ri.spec);
-               if (filldir(dirent, fsname, j, offset, ino,
-                           romfs_dtype_table[nextfh & ROMFH_TYPE]) < 0) {
-                       goto out;
-               }
-               stored++;
-               offset = nextfh & ROMFH_MASK;
-       }
-out:
-       unlock_kernel();
-       return stored;
-}
-
-static struct dentry *
-romfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
-{
-       unsigned long offset, maxoff;
-       long res;
-       int fslen;
-       struct inode *inode = NULL;
-       char fsname[ROMFS_MAXFN];       /* XXX dynamic? */
-       struct romfs_inode ri;
-       const char *name;               /* got from dentry */
-       int len;
-
-       res = -EACCES;                  /* placeholder for "no data here" */
-       offset = dir->i_ino & ROMFH_MASK;
-       lock_kernel();
-       if (romfs_copyfrom(dir, &ri, offset, ROMFH_SIZE) <= 0)
-               goto error;
-
-       maxoff = romfs_maxsize(dir->i_sb);
-       offset = be32_to_cpu(ri.spec) & ROMFH_MASK;
-
-       /* OK, now find the file whose name is in "dentry" in the
-        * directory specified by "dir".  */
-
-       name = dentry->d_name.name;
-       len = dentry->d_name.len;
-
-       for(;;) {
-               if (!offset || offset >= maxoff)
-                       goto success; /* negative success */
-               if (romfs_copyfrom(dir, &ri, offset, ROMFH_SIZE) <= 0)
-                       goto error;
-
-               /* try to match the first 16 bytes of name */
-               fslen = romfs_strnlen(dir, offset+ROMFH_SIZE, ROMFH_SIZE);
-               if (len < ROMFH_SIZE) {
-                       if (len == fslen) {
-                               /* both are shorter, and same size */
-                               romfs_copyfrom(dir, fsname, offset+ROMFH_SIZE, len+1);
-                               if (strncmp (name, fsname, len) == 0)
-                                       break;
-                       }
-               } else if (fslen >= ROMFH_SIZE) {
-                       /* both are longer; XXX optimize max size */
-                       fslen = romfs_strnlen(dir, offset+ROMFH_SIZE, sizeof(fsname)-1);
-                       if (len == fslen) {
-                               romfs_copyfrom(dir, fsname, offset+ROMFH_SIZE, len+1);
-                               if (strncmp(name, fsname, len) == 0)
-                                       break;
-                       }
-               }
-               /* next entry */
-               offset = be32_to_cpu(ri.next) & ROMFH_MASK;
-       }
-
-       /* Hard link handling */
-       if ((be32_to_cpu(ri.next) & ROMFH_TYPE) == ROMFH_HRD)
-               offset = be32_to_cpu(ri.spec) & ROMFH_MASK;
-
-       inode = romfs_iget(dir->i_sb, offset);
-       if (IS_ERR(inode)) {
-               res = PTR_ERR(inode);
-               goto error;
-       }
-
-success:
-       d_add(dentry, inode);
-       res = 0;
-error:
-       unlock_kernel();
-       return ERR_PTR(res);
-}
-
-/*
- * Ok, we do readpage, to be able to execute programs.  Unfortunately,
- * we can't use bmap, since we may have looser alignments.
- */
-
-static int
-romfs_readpage(struct file *file, struct page * page)
-{
-       struct inode *inode = page->mapping->host;
-       loff_t offset, size;
-       unsigned long filled;
-       void *buf;
-       int result = -EIO;
-
-       page_cache_get(page);
-       lock_kernel();
-       buf = kmap(page);
-       if (!buf)
-               goto err_out;
-
-       /* 32 bit warning -- but not for us :) */
-       offset = page_offset(page);
-       size = i_size_read(inode);
-       filled = 0;
-       result = 0;
-       if (offset < size) {
-               unsigned long readlen;
-
-               size -= offset;
-               readlen = size > PAGE_SIZE ? PAGE_SIZE : size;
-
-               filled = romfs_copyfrom(inode, buf, ROMFS_I(inode)->i_dataoffset+offset, readlen);
-
-               if (filled != readlen) {
-                       SetPageError(page);
-                       filled = 0;
-                       result = -EIO;
-               }
-       }
-
-       if (filled < PAGE_SIZE)
-               memset(buf + filled, 0, PAGE_SIZE-filled);
-
-       if (!result)
-               SetPageUptodate(page);
-       flush_dcache_page(page);
-
-       unlock_page(page);
-
-       kunmap(page);
-err_out:
-       page_cache_release(page);
-       unlock_kernel();
-
-       return result;
-}
-
-/* Mapping from our types to the kernel */
-
-static const struct address_space_operations romfs_aops = {
-       .readpage = romfs_readpage
-};
-
-static const struct file_operations romfs_dir_operations = {
-       .read           = generic_read_dir,
-       .readdir        = romfs_readdir,
-};
-
-static const struct inode_operations romfs_dir_inode_operations = {
-       .lookup         = romfs_lookup,
-};
-
-static mode_t romfs_modemap[] =
-{
-       0, S_IFDIR+0644, S_IFREG+0644, S_IFLNK+0777,
-       S_IFBLK+0600, S_IFCHR+0600, S_IFSOCK+0644, S_IFIFO+0644
-};
-
-static struct inode *
-romfs_iget(struct super_block *sb, unsigned long ino)
-{
-       int nextfh, ret;
-       struct romfs_inode ri;
-       struct inode *i;
-
-       ino &= ROMFH_MASK;
-       i = iget_locked(sb, ino);
-       if (!i)
-               return ERR_PTR(-ENOMEM);
-       if (!(i->i_state & I_NEW))
-               return i;
-
-       i->i_mode = 0;
-
-       /* Loop for finding the real hard link */
-       for(;;) {
-               if (romfs_copyfrom(i, &ri, ino, ROMFH_SIZE) <= 0) {
-                       printk(KERN_ERR "romfs: read error for inode 0x%lx\n",
-                               ino);
-                       iget_failed(i);
-                       return ERR_PTR(-EIO);
-               }
-               /* XXX: do romfs_checksum here too (with name) */
-
-               nextfh = be32_to_cpu(ri.next);
-               if ((nextfh & ROMFH_TYPE) != ROMFH_HRD)
-                       break;
-
-               ino = be32_to_cpu(ri.spec) & ROMFH_MASK;
-       }
-
-       i->i_nlink = 1;         /* Hard to decide.. */
-       i->i_size = be32_to_cpu(ri.size);
-       i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = 0;
-       i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0;
-
-        /* Precalculate the data offset */
-       ret = romfs_strnlen(i, ino + ROMFH_SIZE, ROMFS_MAXFN);
-       if (ret >= 0)
-               ino = (ROMFH_SIZE + ret + 1 + ROMFH_PAD) & ROMFH_MASK;
-       else
-               ino = 0;
-
-        ROMFS_I(i)->i_metasize = ino;
-        ROMFS_I(i)->i_dataoffset = ino+(i->i_ino&ROMFH_MASK);
-
-        /* Compute permissions */
-        ino = romfs_modemap[nextfh & ROMFH_TYPE];
-       /* only "normal" files have ops */
-       switch (nextfh & ROMFH_TYPE) {
-               case 1:
-                       i->i_size = ROMFS_I(i)->i_metasize;
-                       i->i_op = &romfs_dir_inode_operations;
-                       i->i_fop = &romfs_dir_operations;
-                       if (nextfh & ROMFH_EXEC)
-                               ino |= S_IXUGO;
-                       i->i_mode = ino;
-                       break;
-               case 2:
-                       i->i_fop = &generic_ro_fops;
-                       i->i_data.a_ops = &romfs_aops;
-                       if (nextfh & ROMFH_EXEC)
-                               ino |= S_IXUGO;
-                       i->i_mode = ino;
-                       break;
-               case 3:
-                       i->i_op = &page_symlink_inode_operations;
-                       i->i_data.a_ops = &romfs_aops;
-                       i->i_mode = ino | S_IRWXUGO;
-                       break;
-               default:
-                       /* depending on MBZ for sock/fifos */
-                       nextfh = be32_to_cpu(ri.spec);
-                       init_special_inode(i, ino,
-                                       MKDEV(nextfh>>16,nextfh&0xffff));
-       }
-       unlock_new_inode(i);
-       return i;
-}
-
-static struct kmem_cache * romfs_inode_cachep;
-
-static struct inode *romfs_alloc_inode(struct super_block *sb)
-{
-       struct romfs_inode_info *ei;
-       ei = kmem_cache_alloc(romfs_inode_cachep, GFP_KERNEL);
-       if (!ei)
-               return NULL;
-       return &ei->vfs_inode;
-}
-
-static void romfs_destroy_inode(struct inode *inode)
-{
-       kmem_cache_free(romfs_inode_cachep, ROMFS_I(inode));
-}
-
-static void init_once(void *foo)
-{
-       struct romfs_inode_info *ei = foo;
-
-       inode_init_once(&ei->vfs_inode);
-}
-
-static int init_inodecache(void)
-{
-       romfs_inode_cachep = kmem_cache_create("romfs_inode_cache",
-                                            sizeof(struct romfs_inode_info),
-                                            0, (SLAB_RECLAIM_ACCOUNT|
-                                               SLAB_MEM_SPREAD),
-                                            init_once);
-       if (romfs_inode_cachep == NULL)
-               return -ENOMEM;
-       return 0;
-}
-
-static void destroy_inodecache(void)
-{
-       kmem_cache_destroy(romfs_inode_cachep);
-}
-
-static int romfs_remount(struct super_block *sb, int *flags, char *data)
-{
-       *flags |= MS_RDONLY;
-       return 0;
-}
-
-static const struct super_operations romfs_ops = {
-       .alloc_inode    = romfs_alloc_inode,
-       .destroy_inode  = romfs_destroy_inode,
-       .statfs         = romfs_statfs,
-       .remount_fs     = romfs_remount,
-};
-
-static int romfs_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
-{
-       return get_sb_bdev(fs_type, flags, dev_name, data, romfs_fill_super,
-                          mnt);
-}
-
-static struct file_system_type romfs_fs_type = {
-       .owner          = THIS_MODULE,
-       .name           = "romfs",
-       .get_sb         = romfs_get_sb,
-       .kill_sb        = kill_block_super,
-       .fs_flags       = FS_REQUIRES_DEV,
-};
-
-static int __init init_romfs_fs(void)
-{
-       int err = init_inodecache();
-       if (err)
-               goto out1;
-        err = register_filesystem(&romfs_fs_type);
-       if (err)
-               goto out;
-       return 0;
-out:
-       destroy_inodecache();
-out1:
-       return err;
-}
-
-static void __exit exit_romfs_fs(void)
-{
-       unregister_filesystem(&romfs_fs_type);
-       destroy_inodecache();
-}
-
-/* Yes, works even as a module... :) */
-
-module_init(init_romfs_fs)
-module_exit(exit_romfs_fs)
-MODULE_LICENSE("GPL");
diff --git a/fs/romfs/internal.h b/fs/romfs/internal.h
new file mode 100644 (file)
index 0000000..06044a9
--- /dev/null
@@ -0,0 +1,47 @@
+/* RomFS internal definitions
+ *
+ * Copyright Â© 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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 <linux/romfs_fs.h>
+
+struct romfs_inode_info {
+       struct inode    vfs_inode;
+       unsigned long   i_metasize;     /* size of non-data area */
+       unsigned long   i_dataoffset;   /* from the start of fs */
+};
+
+static inline size_t romfs_maxsize(struct super_block *sb)
+{
+       return (size_t) (unsigned long) sb->s_fs_info;
+}
+
+static inline struct romfs_inode_info *ROMFS_I(struct inode *inode)
+{
+       return container_of(inode, struct romfs_inode_info, vfs_inode);
+}
+
+/*
+ * mmap-nommu.c
+ */
+#if !defined(CONFIG_MMU) && defined(CONFIG_ROMFS_ON_MTD)
+extern const struct file_operations romfs_ro_fops;
+#else
+#define romfs_ro_fops  generic_ro_fops
+#endif
+
+/*
+ * storage.c
+ */
+extern int romfs_dev_read(struct super_block *sb, unsigned long pos,
+                         void *buf, size_t buflen);
+extern ssize_t romfs_dev_strnlen(struct super_block *sb,
+                                unsigned long pos, size_t maxlen);
+extern int romfs_dev_strncmp(struct super_block *sb, unsigned long pos,
+                            const char *str, size_t size);
diff --git a/fs/romfs/mmap-nommu.c b/fs/romfs/mmap-nommu.c
new file mode 100644 (file)
index 0000000..f0511e8
--- /dev/null
@@ -0,0 +1,75 @@
+/* NOMMU mmap support for RomFS on MTD devices
+ *
+ * Copyright Â© 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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 <linux/mm.h>
+#include <linux/mtd/super.h>
+#include "internal.h"
+
+/*
+ * try to determine where a shared mapping can be made
+ * - only supported for NOMMU at the moment (MMU can't doesn't copy private
+ *   mappings)
+ * - attempts to map through to the underlying MTD device
+ */
+static unsigned long romfs_get_unmapped_area(struct file *file,
+                                            unsigned long addr,
+                                            unsigned long len,
+                                            unsigned long pgoff,
+                                            unsigned long flags)
+{
+       struct inode *inode = file->f_mapping->host;
+       struct mtd_info *mtd = inode->i_sb->s_mtd;
+       unsigned long isize, offset;
+
+       if (!mtd)
+               goto cant_map_directly;
+
+       isize = i_size_read(inode);
+       offset = pgoff << PAGE_SHIFT;
+       if (offset > isize || len > isize || offset > isize - len)
+               return (unsigned long) -EINVAL;
+
+       /* we need to call down to the MTD layer to do the actual mapping */
+       if (mtd->get_unmapped_area) {
+               if (addr != 0)
+                       return (unsigned long) -EINVAL;
+
+               if (len > mtd->size || pgoff >= (mtd->size >> PAGE_SHIFT))
+                       return (unsigned long) -EINVAL;
+
+               offset += ROMFS_I(inode)->i_dataoffset;
+               if (offset > mtd->size - len)
+                       return (unsigned long) -EINVAL;
+
+               return mtd->get_unmapped_area(mtd, len, offset, flags);
+       }
+
+cant_map_directly:
+       return (unsigned long) -ENOSYS;
+}
+
+/*
+ * permit a R/O mapping to be made directly through onto an MTD device if
+ * possible
+ */
+static int romfs_mmap(struct file *file, struct vm_area_struct *vma)
+{
+       return vma->vm_flags & (VM_SHARED | VM_MAYSHARE) ? 0 : -ENOSYS;
+}
+
+const struct file_operations romfs_ro_fops = {
+       .llseek                 = generic_file_llseek,
+       .read                   = do_sync_read,
+       .aio_read               = generic_file_aio_read,
+       .splice_read            = generic_file_splice_read,
+       .mmap                   = romfs_mmap,
+       .get_unmapped_area      = romfs_get_unmapped_area,
+};
diff --git a/fs/romfs/storage.c b/fs/romfs/storage.c
new file mode 100644 (file)
index 0000000..7e3e1e1
--- /dev/null
@@ -0,0 +1,261 @@
+/* RomFS storage access routines
+ *
+ * Copyright Â© 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * 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 <linux/fs.h>
+#include <linux/mtd/super.h>
+#include <linux/buffer_head.h>
+#include "internal.h"
+
+#if !defined(CONFIG_ROMFS_ON_MTD) && !defined(CONFIG_ROMFS_ON_BLOCK)
+#error no ROMFS backing store interface configured
+#endif
+
+#ifdef CONFIG_ROMFS_ON_MTD
+#define ROMFS_MTD_READ(sb, ...) ((sb)->s_mtd->read((sb)->s_mtd, ##__VA_ARGS__))
+
+/*
+ * read data from an romfs image on an MTD device
+ */
+static int romfs_mtd_read(struct super_block *sb, unsigned long pos,
+                         void *buf, size_t buflen)
+{
+       size_t rlen;
+       int ret;
+
+       ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf);
+       return (ret < 0 || rlen != buflen) ? -EIO : 0;
+}
+
+/*
+ * determine the length of a string in a romfs image on an MTD device
+ */
+static ssize_t romfs_mtd_strnlen(struct super_block *sb,
+                                unsigned long pos, size_t maxlen)
+{
+       ssize_t n = 0;
+       size_t segment;
+       u_char buf[16], *p;
+       size_t len;
+       int ret;
+
+       /* scan the string up to 16 bytes at a time */
+       while (maxlen > 0) {
+               segment = min_t(size_t, maxlen, 16);
+               ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf);
+               if (ret < 0)
+                       return ret;
+               p = memchr(buf, 0, len);
+               if (p)
+                       return n + (p - buf);
+               maxlen -= len;
+               pos += len;
+               n += len;
+       }
+
+       return n;
+}
+
+/*
+ * compare a string to one in a romfs image on MTD
+ * - return 1 if matched, 0 if differ, -ve if error
+ */
+static int romfs_mtd_strncmp(struct super_block *sb, unsigned long pos,
+                            const char *str, size_t size)
+{
+       u_char buf[16];
+       size_t len, segment;
+       int ret;
+
+       /* scan the string up to 16 bytes at a time */
+       while (size > 0) {
+               segment = min_t(size_t, size, 16);
+               ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf);
+               if (ret < 0)
+                       return ret;
+               if (memcmp(buf, str, len) != 0)
+                       return 0;
+               size -= len;
+               pos += len;
+               str += len;
+       }
+
+       return 1;
+}
+#endif /* CONFIG_ROMFS_ON_MTD */
+
+#ifdef CONFIG_ROMFS_ON_BLOCK
+/*
+ * read data from an romfs image on a block device
+ */
+static int romfs_blk_read(struct super_block *sb, unsigned long pos,
+                         void *buf, size_t buflen)
+{
+       struct buffer_head *bh;
+       unsigned long offset;
+       size_t segment;
+
+       /* copy the string up to blocksize bytes at a time */
+       while (buflen > 0) {
+               offset = pos & (ROMBSIZE - 1);
+               segment = min_t(size_t, buflen, ROMBSIZE - offset);
+               bh = sb_bread(sb, pos >> ROMBSBITS);
+               if (!bh)
+                       return -EIO;
+               memcpy(buf, bh->b_data + offset, segment);
+               brelse(bh);
+               buflen -= segment;
+               pos += segment;
+       }
+
+       return 0;
+}
+
+/*
+ * determine the length of a string in romfs on a block device
+ */
+static ssize_t romfs_blk_strnlen(struct super_block *sb,
+                                unsigned long pos, size_t limit)
+{
+       struct buffer_head *bh;
+       unsigned long offset;
+       ssize_t n = 0;
+       size_t segment;
+       u_char *buf, *p;
+
+       /* scan the string up to blocksize bytes at a time */
+       while (limit > 0) {
+               offset = pos & (ROMBSIZE - 1);
+               segment = min_t(size_t, limit, ROMBSIZE - offset);
+               bh = sb_bread(sb, pos >> ROMBSBITS);
+               if (!bh)
+                       return -EIO;
+               buf = bh->b_data + offset;
+               p = memchr(buf, 0, segment);
+               brelse(bh);
+               if (p)
+                       return n + (p - buf);
+               limit -= segment;
+               pos += segment;
+               n += segment;
+       }
+
+       return n;
+}
+
+/*
+ * compare a string to one in a romfs image on a block device
+ * - return 1 if matched, 0 if differ, -ve if error
+ */
+static int romfs_blk_strncmp(struct super_block *sb, unsigned long pos,
+                            const char *str, size_t size)
+{
+       struct buffer_head *bh;
+       unsigned long offset;
+       size_t segment;
+       bool x;
+
+       /* scan the string up to 16 bytes at a time */
+       while (size > 0) {
+               offset = pos & (ROMBSIZE - 1);
+               segment = min_t(size_t, size, ROMBSIZE - offset);
+               bh = sb_bread(sb, pos >> ROMBSBITS);
+               if (!bh)
+                       return -EIO;
+               x = (memcmp(bh->b_data + offset, str, segment) != 0);
+               brelse(bh);
+               if (x)
+                       return 0;
+               size -= segment;
+               pos += segment;
+               str += segment;
+       }
+
+       return 1;
+}
+#endif /* CONFIG_ROMFS_ON_BLOCK */
+
+/*
+ * read data from the romfs image
+ */
+int romfs_dev_read(struct super_block *sb, unsigned long pos,
+                  void *buf, size_t buflen)
+{
+       size_t limit;
+
+       limit = romfs_maxsize(sb);
+       if (pos >= limit)
+               return -EIO;
+       if (buflen > limit - pos)
+               buflen = limit - pos;
+
+#ifdef CONFIG_ROMFS_ON_MTD
+       if (sb->s_mtd)
+               return romfs_mtd_read(sb, pos, buf, buflen);
+#endif
+#ifdef CONFIG_ROMFS_ON_BLOCK
+       if (sb->s_bdev)
+               return romfs_blk_read(sb, pos, buf, buflen);
+#endif
+       return -EIO;
+}
+
+/*
+ * determine the length of a string in romfs
+ */
+ssize_t romfs_dev_strnlen(struct super_block *sb,
+                         unsigned long pos, size_t maxlen)
+{
+       size_t limit;
+
+       limit = romfs_maxsize(sb);
+       if (pos >= limit)
+               return -EIO;
+       if (maxlen > limit - pos)
+               maxlen = limit - pos;
+
+#ifdef CONFIG_ROMFS_ON_MTD
+       if (sb->s_mtd)
+               return romfs_mtd_strnlen(sb, pos, limit);
+#endif
+#ifdef CONFIG_ROMFS_ON_BLOCK
+       if (sb->s_bdev)
+               return romfs_blk_strnlen(sb, pos, limit);
+#endif
+       return -EIO;
+}
+
+/*
+ * compare a string to one in romfs
+ * - return 1 if matched, 0 if differ, -ve if error
+ */
+int romfs_dev_strncmp(struct super_block *sb, unsigned long pos,
+                     const char *str, size_t size)
+{
+       size_t limit;
+
+       limit = romfs_maxsize(sb);
+       if (pos >= limit)
+               return -EIO;
+       if (size > ROMFS_MAXFN)
+               return -ENAMETOOLONG;
+       if (size > limit - pos)
+               return -EIO;
+
+#ifdef CONFIG_ROMFS_ON_MTD
+       if (sb->s_mtd)
+               return romfs_mtd_strncmp(sb, pos, str, size);
+#endif
+#ifdef CONFIG_ROMFS_ON_BLOCK
+       if (sb->s_bdev)
+               return romfs_blk_strncmp(sb, pos, str, size);
+#endif
+       return -EIO;
+}
diff --git a/fs/romfs/super.c b/fs/romfs/super.c
new file mode 100644 (file)
index 0000000..10ca7d9
--- /dev/null
@@ -0,0 +1,653 @@
+/* Block- or MTD-based romfs
+ *
+ * Copyright Â© 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * Derived from: ROMFS file system, Linux implementation
+ *
+ * Copyright Â© 1997-1999  Janos Farkas <chexum@shadow.banki.hu>
+ *
+ * Using parts of the minix filesystem
+ * Copyright Â© 1991, 1992  Linus Torvalds
+ *
+ * and parts of the affs filesystem additionally
+ * Copyright Â© 1993  Ray Burr
+ * Copyright Â© 1996  Hans-Joachim Widmaier
+ *
+ * Changes
+ *                                     Changed for 2.1.19 modules
+ *     Jan 1997                        Initial release
+ *     Jun 1997                        2.1.43+ changes
+ *                                     Proper page locking in readpage
+ *                                     Changed to work with 2.1.45+ fs
+ *     Jul 1997                        Fixed follow_link
+ *                     2.1.47
+ *                                     lookup shouldn't return -ENOENT
+ *                                     from Horst von Brand:
+ *                                       fail on wrong checksum
+ *                                       double unlock_super was possible
+ *                                       correct namelen for statfs
+ *                                     spotted by Bill Hawes:
+ *                                       readlink shouldn't iput()
+ *     Jun 1998        2.1.106         from Avery Pennarun: glibc scandir()
+ *                                       exposed a problem in readdir
+ *                     2.1.107         code-freeze spellchecker run
+ *     Aug 1998                        2.1.118+ VFS changes
+ *     Sep 1998        2.1.122         another VFS change (follow_link)
+ *     Apr 1999        2.2.7           no more EBADF checking in
+ *                                       lookup/readdir, use ERR_PTR
+ *     Jun 1999        2.3.6           d_alloc_root use changed
+ *                     2.3.9           clean up usage of ENOENT/negative
+ *                                       dentries in lookup
+ *                                     clean up page flags setting
+ *                                       (error, uptodate, locking) in
+ *                                       in readpage
+ *                                     use init_special_inode for
+ *                                       fifos/sockets (and streamline) in
+ *                                       read_inode, fix _ops table order
+ *     Aug 1999        2.3.16          __initfunc() => __init change
+ *     Oct 1999        2.3.24          page->owner hack obsoleted
+ *     Nov 1999        2.3.27          2.3.25+ page->offset => index change
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/fs.h>
+#include <linux/time.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <linux/parser.h>
+#include <linux/mount.h>
+#include <linux/namei.h>
+#include <linux/statfs.h>
+#include <linux/mtd/super.h>
+#include <linux/ctype.h>
+#include <linux/highmem.h>
+#include <linux/pagemap.h>
+#include <linux/uaccess.h>
+#include "internal.h"
+
+static struct kmem_cache *romfs_inode_cachep;
+
+static const umode_t romfs_modemap[8] = {
+       0,                      /* hard link */
+       S_IFDIR  | 0644,        /* directory */
+       S_IFREG  | 0644,        /* regular file */
+       S_IFLNK  | 0777,        /* symlink */
+       S_IFBLK  | 0600,        /* blockdev */
+       S_IFCHR  | 0600,        /* chardev */
+       S_IFSOCK | 0644,        /* socket */
+       S_IFIFO  | 0644         /* FIFO */
+};
+
+static const unsigned char romfs_dtype_table[] = {
+       DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_SOCK, DT_FIFO
+};
+
+static struct inode *romfs_iget(struct super_block *sb, unsigned long pos);
+
+/*
+ * read a page worth of data from the image
+ */
+static int romfs_readpage(struct file *file, struct page *page)
+{
+       struct inode *inode = page->mapping->host;
+       loff_t offset, size;
+       unsigned long fillsize, pos;
+       void *buf;
+       int ret;
+
+       buf = kmap(page);
+       if (!buf)
+               return -ENOMEM;
+
+       /* 32 bit warning -- but not for us :) */
+       offset = page_offset(page);
+       size = i_size_read(inode);
+       fillsize = 0;
+       ret = 0;
+       if (offset < size) {
+               size -= offset;
+               fillsize = size > PAGE_SIZE ? PAGE_SIZE : size;
+
+               pos = ROMFS_I(inode)->i_dataoffset + offset;
+
+               ret = romfs_dev_read(inode->i_sb, pos, buf, fillsize);
+               if (ret < 0) {
+                       SetPageError(page);
+                       fillsize = 0;
+                       ret = -EIO;
+               }
+       }
+
+       if (fillsize < PAGE_SIZE)
+               memset(buf + fillsize, 0, PAGE_SIZE - fillsize);
+       if (ret == 0)
+               SetPageUptodate(page);
+
+       flush_dcache_page(page);
+       kunmap(page);
+       unlock_page(page);
+       return ret;
+}
+
+static const struct address_space_operations romfs_aops = {
+       .readpage       = romfs_readpage
+};
+
+/*
+ * read the entries from a directory
+ */
+static int romfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
+{
+       struct inode *i = filp->f_dentry->d_inode;
+       struct romfs_inode ri;
+       unsigned long offset, maxoff;
+       int j, ino, nextfh;
+       int stored = 0;
+       char fsname[ROMFS_MAXFN];       /* XXX dynamic? */
+       int ret;
+
+       maxoff = romfs_maxsize(i->i_sb);
+
+       offset = filp->f_pos;
+       if (!offset) {
+               offset = i->i_ino & ROMFH_MASK;
+               ret = romfs_dev_read(i->i_sb, offset, &ri, ROMFH_SIZE);
+               if (ret < 0)
+                       goto out;
+               offset = be32_to_cpu(ri.spec) & ROMFH_MASK;
+       }
+
+       /* Not really failsafe, but we are read-only... */
+       for (;;) {
+               if (!offset || offset >= maxoff) {
+                       offset = maxoff;
+                       filp->f_pos = offset;
+                       goto out;
+               }
+               filp->f_pos = offset;
+
+               /* Fetch inode info */
+               ret = romfs_dev_read(i->i_sb, offset, &ri, ROMFH_SIZE);
+               if (ret < 0)
+                       goto out;
+
+               j = romfs_dev_strnlen(i->i_sb, offset + ROMFH_SIZE,
+                                     sizeof(fsname) - 1);
+               if (j < 0)
+                       goto out;
+
+               ret = romfs_dev_read(i->i_sb, offset + ROMFH_SIZE, fsname, j);
+               if (ret < 0)
+                       goto out;
+               fsname[j] = '\0';
+
+               ino = offset;
+               nextfh = be32_to_cpu(ri.next);
+               if ((nextfh & ROMFH_TYPE) == ROMFH_HRD)
+                       ino = be32_to_cpu(ri.spec);
+               if (filldir(dirent, fsname, j, offset, ino,
+                           romfs_dtype_table[nextfh & ROMFH_TYPE]) < 0)
+                       goto out;
+
+               stored++;
+               offset = nextfh & ROMFH_MASK;
+       }
+
+out:
+       return stored;
+}
+
+/*
+ * look up an entry in a directory
+ */
+static struct dentry *romfs_lookup(struct inode *dir, struct dentry *dentry,
+                                  struct nameidata *nd)
+{
+       unsigned long offset, maxoff;
+       struct inode *inode;
+       struct romfs_inode ri;
+       const char *name;               /* got from dentry */
+       int len, ret;
+
+       offset = dir->i_ino & ROMFH_MASK;
+       ret = romfs_dev_read(dir->i_sb, offset, &ri, ROMFH_SIZE);
+       if (ret < 0)
+               goto error;
+
+       /* search all the file entries in the list starting from the one
+        * pointed to by the directory's special data */
+       maxoff = romfs_maxsize(dir->i_sb);
+       offset = be32_to_cpu(ri.spec) & ROMFH_MASK;
+
+       name = dentry->d_name.name;
+       len = dentry->d_name.len;
+
+       for (;;) {
+               if (!offset || offset >= maxoff)
+                       goto out0;
+
+               ret = romfs_dev_read(dir->i_sb, offset, &ri, sizeof(ri));
+               if (ret < 0)
+                       goto error;
+
+               /* try to match the first 16 bytes of name */
+               ret = romfs_dev_strncmp(dir->i_sb, offset + ROMFH_SIZE, name,
+                                       len);
+               if (ret < 0)
+                       goto error;
+               if (ret == 1)
+                       break;
+
+               /* next entry */
+               offset = be32_to_cpu(ri.next) & ROMFH_MASK;
+       }
+
+       /* Hard link handling */
+       if ((be32_to_cpu(ri.next) & ROMFH_TYPE) == ROMFH_HRD)
+               offset = be32_to_cpu(ri.spec) & ROMFH_MASK;
+
+       inode = romfs_iget(dir->i_sb, offset);
+       if (IS_ERR(inode)) {
+               ret = PTR_ERR(inode);
+               goto error;
+       }
+       goto outi;
+
+       /*
+        * it's a bit funky, _lookup needs to return an error code
+        * (negative) or a NULL, both as a dentry.  ENOENT should not
+        * be returned, instead we need to create a negative dentry by
+        * d_add(dentry, NULL); and return 0 as no error.
+        * (Although as I see, it only matters on writable file
+        * systems).
+        */
+out0:
+       inode = NULL;
+outi:
+       d_add(dentry, inode);
+       ret = 0;
+error:
+       return ERR_PTR(ret);
+}
+
+static const struct file_operations romfs_dir_operations = {
+       .read           = generic_read_dir,
+       .readdir        = romfs_readdir,
+};
+
+static struct inode_operations romfs_dir_inode_operations = {
+       .lookup         = romfs_lookup,
+};
+
+/*
+ * get a romfs inode based on its position in the image (which doubles as the
+ * inode number)
+ */
+static struct inode *romfs_iget(struct super_block *sb, unsigned long pos)
+{
+       struct romfs_inode_info *inode;
+       struct romfs_inode ri;
+       struct inode *i;
+       unsigned long nlen;
+       unsigned nextfh, ret;
+       umode_t mode;
+
+       /* we might have to traverse a chain of "hard link" file entries to get
+        * to the actual file */
+       for (;;) {
+               ret = romfs_dev_read(sb, pos, &ri, sizeof(ri));
+               if (ret < 0)
+                       goto error;
+
+               /* XXX: do romfs_checksum here too (with name) */
+
+               nextfh = be32_to_cpu(ri.next);
+               if ((nextfh & ROMFH_TYPE) != ROMFH_HRD)
+                       break;
+
+               pos = be32_to_cpu(ri.spec) & ROMFH_MASK;
+       }
+
+       /* determine the length of the filename */
+       nlen = romfs_dev_strnlen(sb, pos + ROMFH_SIZE, ROMFS_MAXFN);
+       if (IS_ERR_VALUE(nlen))
+               goto eio;
+
+       /* get an inode for this image position */
+       i = iget_locked(sb, pos);
+       if (!i)
+               return ERR_PTR(-ENOMEM);
+
+       if (!(i->i_state & I_NEW))
+               return i;
+
+       /* precalculate the data offset */
+       inode = ROMFS_I(i);
+       inode->i_metasize = (ROMFH_SIZE + nlen + 1 + ROMFH_PAD) & ROMFH_MASK;
+       inode->i_dataoffset = pos + inode->i_metasize;
+
+       i->i_nlink = 1;         /* Hard to decide.. */
+       i->i_size = be32_to_cpu(ri.size);
+       i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = 0;
+       i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0;
+
+       /* set up mode and ops */
+       mode = romfs_modemap[nextfh & ROMFH_TYPE];
+
+       switch (nextfh & ROMFH_TYPE) {
+       case ROMFH_DIR:
+               i->i_size = ROMFS_I(i)->i_metasize;
+               i->i_op = &romfs_dir_inode_operations;
+               i->i_fop = &romfs_dir_operations;
+               if (nextfh & ROMFH_EXEC)
+                       mode |= S_IXUGO;
+               break;
+       case ROMFH_REG:
+               i->i_fop = &romfs_ro_fops;
+               i->i_data.a_ops = &romfs_aops;
+               if (i->i_sb->s_mtd)
+                       i->i_data.backing_dev_info =
+                               i->i_sb->s_mtd->backing_dev_info;
+               if (nextfh & ROMFH_EXEC)
+                       mode |= S_IXUGO;
+               break;
+       case ROMFH_SYM:
+               i->i_op = &page_symlink_inode_operations;
+               i->i_data.a_ops = &romfs_aops;
+               mode |= S_IRWXUGO;
+               break;
+       default:
+               /* depending on MBZ for sock/fifos */
+               nextfh = be32_to_cpu(ri.spec);
+               init_special_inode(i, mode, MKDEV(nextfh >> 16,
+                                                 nextfh & 0xffff));
+               break;
+       }
+
+       i->i_mode = mode;
+
+       unlock_new_inode(i);
+       return i;
+
+eio:
+       ret = -EIO;
+error:
+       printk(KERN_ERR "ROMFS: read error for inode 0x%lx\n", pos);
+       return ERR_PTR(ret);
+}
+
+/*
+ * allocate a new inode
+ */
+static struct inode *romfs_alloc_inode(struct super_block *sb)
+{
+       struct romfs_inode_info *inode;
+       inode = kmem_cache_alloc(romfs_inode_cachep, GFP_KERNEL);
+       return inode ? &inode->vfs_inode : NULL;
+}
+
+/*
+ * return a spent inode to the slab cache
+ */
+static void romfs_destroy_inode(struct inode *inode)
+{
+       kmem_cache_free(romfs_inode_cachep, ROMFS_I(inode));
+}
+
+/*
+ * get filesystem statistics
+ */
+static int romfs_statfs(struct dentry *dentry, struct kstatfs *buf)
+{
+       struct super_block *sb = dentry->d_sb;
+       u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
+
+       buf->f_type = ROMFS_MAGIC;
+       buf->f_namelen = ROMFS_MAXFN;
+       buf->f_bsize = ROMBSIZE;
+       buf->f_bfree = buf->f_bavail = buf->f_ffree;
+       buf->f_blocks =
+               (romfs_maxsize(dentry->d_sb) + ROMBSIZE - 1) >> ROMBSBITS;
+       buf->f_fsid.val[0] = (u32)id;
+       buf->f_fsid.val[1] = (u32)(id >> 32);
+       return 0;
+}
+
+/*
+ * remounting must involve read-only
+ */
+static int romfs_remount(struct super_block *sb, int *flags, char *data)
+{
+       *flags |= MS_RDONLY;
+       return 0;
+}
+
+static const struct super_operations romfs_super_ops = {
+       .alloc_inode    = romfs_alloc_inode,
+       .destroy_inode  = romfs_destroy_inode,
+       .statfs         = romfs_statfs,
+       .remount_fs     = romfs_remount,
+};
+
+/*
+ * checksum check on part of a romfs filesystem
+ */
+static __u32 romfs_checksum(const void *data, int size)
+{
+       const __be32 *ptr = data;
+       __u32 sum;
+
+       sum = 0;
+       size >>= 2;
+       while (size > 0) {
+               sum += be32_to_cpu(*ptr++);
+               size--;
+       }
+       return sum;
+}
+
+/*
+ * fill in the superblock
+ */
+static int romfs_fill_super(struct super_block *sb, void *data, int silent)
+{
+       struct romfs_super_block *rsb;
+       struct inode *root;
+       unsigned long pos, img_size;
+       const char *storage;
+       size_t len;
+       int ret;
+
+#ifdef CONFIG_BLOCK
+       if (!sb->s_mtd) {
+               sb_set_blocksize(sb, ROMBSIZE);
+       } else {
+               sb->s_blocksize = ROMBSIZE;
+               sb->s_blocksize_bits = blksize_bits(ROMBSIZE);
+       }
+#endif
+
+       sb->s_maxbytes = 0xFFFFFFFF;
+       sb->s_magic = ROMFS_MAGIC;
+       sb->s_flags |= MS_RDONLY | MS_NOATIME;
+       sb->s_op = &romfs_super_ops;
+
+       /* read the image superblock and check it */
+       rsb = kmalloc(512, GFP_KERNEL);
+       if (!rsb)
+               return -ENOMEM;
+
+       sb->s_fs_info = (void *) 512;
+       ret = romfs_dev_read(sb, 0, rsb, 512);
+       if (ret < 0)
+               goto error_rsb;
+
+       img_size = be32_to_cpu(rsb->size);
+
+       if (sb->s_mtd && img_size > sb->s_mtd->size)
+               goto error_rsb_inval;
+
+       sb->s_fs_info = (void *) img_size;
+
+       if (rsb->word0 != ROMSB_WORD0 || rsb->word1 != ROMSB_WORD1 ||
+           img_size < ROMFH_SIZE) {
+               if (!silent)
+                       printk(KERN_WARNING "VFS:"
+                              " Can't find a romfs filesystem on dev %s.\n",
+                              sb->s_id);
+               goto error_rsb_inval;
+       }
+
+       if (romfs_checksum(rsb, min_t(size_t, img_size, 512))) {
+               printk(KERN_ERR "ROMFS: bad initial checksum on dev %s.\n",
+                      sb->s_id);
+               goto error_rsb_inval;
+       }
+
+       storage = sb->s_mtd ? "MTD" : "the block layer";
+
+       len = strnlen(rsb->name, ROMFS_MAXFN);
+       if (!silent)
+               printk(KERN_NOTICE "ROMFS: Mounting image '%*.*s' through %s\n",
+                      (unsigned) len, (unsigned) len, rsb->name, storage);
+
+       kfree(rsb);
+       rsb = NULL;
+
+       /* find the root directory */
+       pos = (ROMFH_SIZE + len + 1 + ROMFH_PAD) & ROMFH_MASK;
+
+       root = romfs_iget(sb, pos);
+       if (!root)
+               goto error;
+
+       sb->s_root = d_alloc_root(root);
+       if (!sb->s_root)
+               goto error_i;
+
+       return 0;
+
+error_i:
+       iput(root);
+error:
+       return -EINVAL;
+error_rsb_inval:
+       ret = -EINVAL;
+error_rsb:
+       return ret;
+}
+
+/*
+ * get a superblock for mounting
+ */
+static int romfs_get_sb(struct file_system_type *fs_type,
+                       int flags, const char *dev_name,
+                       void *data, struct vfsmount *mnt)
+{
+       int ret = -EINVAL;
+
+#ifdef CONFIG_ROMFS_ON_MTD
+       ret = get_sb_mtd(fs_type, flags, dev_name, data, romfs_fill_super,
+                        mnt);
+#endif
+#ifdef CONFIG_ROMFS_ON_BLOCK
+       if (ret == -EINVAL)
+               ret = get_sb_bdev(fs_type, flags, dev_name, data,
+                                 romfs_fill_super, mnt);
+#endif
+       return ret;
+}
+
+/*
+ * destroy a romfs superblock in the appropriate manner
+ */
+static void romfs_kill_sb(struct super_block *sb)
+{
+#ifdef CONFIG_ROMFS_ON_MTD
+       if (sb->s_mtd) {
+               kill_mtd_super(sb);
+               return;
+       }
+#endif
+#ifdef CONFIG_ROMFS_ON_BLOCK
+       if (sb->s_bdev) {
+               kill_block_super(sb);
+               return;
+       }
+#endif
+}
+
+static struct file_system_type romfs_fs_type = {
+       .owner          = THIS_MODULE,
+       .name           = "romfs",
+       .get_sb         = romfs_get_sb,
+       .kill_sb        = romfs_kill_sb,
+       .fs_flags       = FS_REQUIRES_DEV,
+};
+
+/*
+ * inode storage initialiser
+ */
+static void romfs_i_init_once(void *_inode)
+{
+       struct romfs_inode_info *inode = _inode;
+
+       inode_init_once(&inode->vfs_inode);
+}
+
+/*
+ * romfs module initialisation
+ */
+static int __init init_romfs_fs(void)
+{
+       int ret;
+
+       printk(KERN_INFO "ROMFS MTD (C) 2007 Red Hat, Inc.\n");
+
+       romfs_inode_cachep =
+               kmem_cache_create("romfs_i",
+                                 sizeof(struct romfs_inode_info), 0,
+                                 SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD,
+                                 romfs_i_init_once);
+
+       if (!romfs_inode_cachep) {
+               printk(KERN_ERR
+                      "ROMFS error: Failed to initialise inode cache\n");
+               return -ENOMEM;
+       }
+       ret = register_filesystem(&romfs_fs_type);
+       if (ret) {
+               printk(KERN_ERR "ROMFS error: Failed to register filesystem\n");
+               goto error_register;
+       }
+       return 0;
+
+error_register:
+       kmem_cache_destroy(romfs_inode_cachep);
+       return ret;
+}
+
+/*
+ * romfs module removal
+ */
+static void __exit exit_romfs_fs(void)
+{
+       unregister_filesystem(&romfs_fs_type);
+       kmem_cache_destroy(romfs_inode_cachep);
+}
+
+module_init(init_romfs_fs);
+module_exit(exit_romfs_fs);
+
+MODULE_DESCRIPTION("Direct-MTD Capable RomFS");
+MODULE_AUTHOR("Red Hat, Inc.");
+MODULE_LICENSE("GPL"); /* Actually dual-licensed, but it doesn't matter for */
index dd727d4..c18aa7e 100644 (file)
@@ -737,10 +737,19 @@ ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out,
         * ->write_end. Most of the time, these expect i_mutex to
         * be held. Since this may result in an ABBA deadlock with
         * pipe->inode, we have to order lock acquiry here.
+        *
+        * Outer lock must be inode->i_mutex, as pipe_wait() will
+        * release and reacquire pipe->inode->i_mutex, AND inode must
+        * never be a pipe.
         */
-       inode_double_lock(inode, pipe->inode);
+       WARN_ON(S_ISFIFO(inode->i_mode));
+       mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT);
+       if (pipe->inode)
+               mutex_lock_nested(&pipe->inode->i_mutex, I_MUTEX_CHILD);
        ret = __splice_from_pipe(pipe, &sd, actor);
-       inode_double_unlock(inode, pipe->inode);
+       if (pipe->inode)
+               mutex_unlock(&pipe->inode->i_mutex);
+       mutex_unlock(&inode->i_mutex);
 
        return ret;
 }
@@ -831,11 +840,17 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
        };
        ssize_t ret;
 
-       inode_double_lock(inode, pipe->inode);
+       WARN_ON(S_ISFIFO(inode->i_mode));
+       mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT);
        ret = file_remove_suid(out);
-       if (likely(!ret))
+       if (likely(!ret)) {
+               if (pipe->inode)
+                       mutex_lock_nested(&pipe->inode->i_mutex, I_MUTEX_CHILD);
                ret = __splice_from_pipe(pipe, &sd, pipe_to_file);
-       inode_double_unlock(inode, pipe->inode);
+               if (pipe->inode)
+                       mutex_unlock(&pipe->inode->i_mutex);
+       }
+       mutex_unlock(&inode->i_mutex);
        if (ret > 0) {
                unsigned long nr_pages;
 
index 77cb4ec..786fe7d 100644 (file)
@@ -771,6 +771,46 @@ void kill_litter_super(struct super_block *sb)
 
 EXPORT_SYMBOL(kill_litter_super);
 
+static int ns_test_super(struct super_block *sb, void *data)
+{
+       return sb->s_fs_info == data;
+}
+
+static int ns_set_super(struct super_block *sb, void *data)
+{
+       sb->s_fs_info = data;
+       return set_anon_super(sb, NULL);
+}
+
+int get_sb_ns(struct file_system_type *fs_type, int flags, void *data,
+       int (*fill_super)(struct super_block *, void *, int),
+       struct vfsmount *mnt)
+{
+       struct super_block *sb;
+
+       sb = sget(fs_type, ns_test_super, ns_set_super, data);
+       if (IS_ERR(sb))
+               return PTR_ERR(sb);
+
+       if (!sb->s_root) {
+               int err;
+               sb->s_flags = flags;
+               err = fill_super(sb, data, flags & MS_SILENT ? 1 : 0);
+               if (err) {
+                       up_write(&sb->s_umount);
+                       deactivate_super(sb);
+                       return err;
+               }
+
+               sb->s_flags |= MS_ACTIVE;
+       }
+
+       simple_set_mnt(mnt, sb);
+       return 0;
+}
+
+EXPORT_SYMBOL(get_sb_ns);
+
 #ifdef CONFIG_BLOCK
 static int set_bdev_super(struct super_block *s, void *data)
 {
index f393620..af19144 100644 (file)
@@ -194,29 +194,26 @@ static int make_free_space(struct ubifs_info *c)
 }
 
 /**
- * ubifs_calc_min_idx_lebs - calculate amount of eraseblocks for the index.
+ * ubifs_calc_min_idx_lebs - calculate amount of LEBs for the index.
  * @c: UBIFS file-system description object
  *
- * This function calculates and returns the number of eraseblocks which should
- * be kept for index usage.
+ * This function calculates and returns the number of LEBs which should be kept
+ * for index usage.
  */
 int ubifs_calc_min_idx_lebs(struct ubifs_info *c)
 {
-       int idx_lebs, eff_leb_size = c->leb_size - c->max_idx_node_sz;
+       int idx_lebs;
        long long idx_size;
 
        idx_size = c->old_idx_sz + c->budg_idx_growth + c->budg_uncommitted_idx;
-
        /* And make sure we have thrice the index size of space reserved */
-       idx_size = idx_size + (idx_size << 1);
-
+       idx_size += idx_size << 1;
        /*
         * We do not maintain 'old_idx_size' as 'old_idx_lebs'/'old_idx_bytes'
         * pair, nor similarly the two variables for the new index size, so we
         * have to do this costly 64-bit division on fast-path.
         */
-       idx_size += eff_leb_size - 1;
-       idx_lebs = div_u64(idx_size, eff_leb_size);
+       idx_lebs = div_u64(idx_size + c->idx_leb_size - 1, c->idx_leb_size);
        /*
         * The index head is not available for the in-the-gaps method, so add an
         * extra LEB to compensate.
@@ -310,23 +307,23 @@ static int can_use_rp(struct ubifs_info *c)
  * do_budget_space - reserve flash space for index and data growth.
  * @c: UBIFS file-system description object
  *
- * This function makes sure UBIFS has enough free eraseblocks for index growth
- * and data.
+ * This function makes sure UBIFS has enough free LEBs for index growth and
+ * data.
  *
  * When budgeting index space, UBIFS reserves thrice as many LEBs as the index
  * would take if it was consolidated and written to the flash. This guarantees
  * that the "in-the-gaps" commit method always succeeds and UBIFS will always
  * be able to commit dirty index. So this function basically adds amount of
  * budgeted index space to the size of the current index, multiplies this by 3,
- * and makes sure this does not exceed the amount of free eraseblocks.
+ * and makes sure this does not exceed the amount of free LEBs.
  *
  * Notes about @c->min_idx_lebs and @c->lst.idx_lebs variables:
  * o @c->lst.idx_lebs is the number of LEBs the index currently uses. It might
  *    be large, because UBIFS does not do any index consolidation as long as
  *    there is free space. IOW, the index may take a lot of LEBs, but the LEBs
  *    will contain a lot of dirt.
- * o @c->min_idx_lebs is the the index presumably takes. IOW, the index may be
- *   consolidated to take up to @c->min_idx_lebs LEBs.
+ * o @c->min_idx_lebs is the number of LEBS the index presumably takes. IOW,
+ *    the index may be consolidated to take up to @c->min_idx_lebs LEBs.
  *
  * This function returns zero in case of success, and %-ENOSPC in case of
  * failure.
@@ -695,12 +692,12 @@ long long ubifs_reported_space(const struct ubifs_info *c, long long free)
  * This function calculates amount of free space to report to user-space.
  *
  * Because UBIFS may introduce substantial overhead (the index, node headers,
- * alignment, wastage at the end of eraseblocks, etc), it cannot report real
- * amount of free flash space it has (well, because not all dirty space is
- * reclaimable, UBIFS does not actually know the real amount). If UBIFS did so,
- * it would bread user expectations about what free space is. Users seem to
- * accustomed to assume that if the file-system reports N bytes of free space,
- * they would be able to fit a file of N bytes to the FS. This almost works for
+ * alignment, wastage at the end of LEBs, etc), it cannot report real amount of
+ * free flash space it has (well, because not all dirty space is reclaimable,
+ * UBIFS does not actually know the real amount). If UBIFS did so, it would
+ * bread user expectations about what free space is. Users seem to accustomed
+ * to assume that if the file-system reports N bytes of free space, they would
+ * be able to fit a file of N bytes to the FS. This almost works for
  * traditional file-systems, because they have way less overhead than UBIFS.
  * So, to keep users happy, UBIFS tries to take the overhead into account.
  */
index e975bd8..ce2cd83 100644 (file)
@@ -479,9 +479,9 @@ void dbg_dump_node(const struct ubifs_info *c, const void *node)
                                          "bad or corrupted node)");
                else {
                        for (i = 0; i < nlen && dent->name[i]; i++)
-                               printk("%c", dent->name[i]);
+                               printk(KERN_CONT "%c", dent->name[i]);
                }
-               printk("\n");
+               printk(KERN_CONT "\n");
 
                break;
        }
@@ -1214,7 +1214,7 @@ static int dbg_check_znode(struct ubifs_info *c, struct ubifs_zbranch *zbr)
 
                        /*
                         * Make sure the last key in our znode is less or
-                        * equivalent than the the key in zbranch which goes
+                        * equivalent than the key in the zbranch which goes
                         * after our pointing zbranch.
                         */
                        cmp = keys_cmp(c, max,
index 0ff89fe..6d34dc7 100644 (file)
@@ -430,6 +430,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
        struct ubifs_inode *ui = ubifs_inode(inode);
        pgoff_t index = pos >> PAGE_CACHE_SHIFT;
        int uninitialized_var(err), appending = !!(pos + len > inode->i_size);
+       int skipped_read = 0;
        struct page *page;
 
        ubifs_assert(ubifs_inode(inode)->ui_size == inode->i_size);
@@ -444,7 +445,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
 
        if (!PageUptodate(page)) {
                /* The page is not loaded from the flash */
-               if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE)
+               if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) {
                        /*
                         * We change whole page so no need to load it. But we
                         * have to set the @PG_checked flag to make the further
@@ -453,7 +454,8 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
                         * the media.
                         */
                        SetPageChecked(page);
-               else {
+                       skipped_read = 1;
+               } else {
                        err = do_readpage(page);
                        if (err) {
                                unlock_page(page);
@@ -470,6 +472,14 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
        if (unlikely(err)) {
                ubifs_assert(err == -ENOSPC);
                /*
+                * If we skipped reading the page because we were going to
+                * write all of it, then it is not up to date.
+                */
+               if (skipped_read) {
+                       ClearPageChecked(page);
+                       ClearPageUptodate(page);
+               }
+               /*
                 * Budgeting failed which means it would have to force
                 * write-back but didn't, because we set the @fast flag in the
                 * request. Write-back cannot be done now, while we have the
@@ -949,7 +959,7 @@ static int do_writepage(struct page *page, int len)
  * whole index and correct all inode sizes, which is long an unacceptable.
  *
  * To prevent situations like this, UBIFS writes pages back only if they are
- * within last synchronized inode size, i.e. the the size which has been
+ * within the last synchronized inode size, i.e. the size which has been
  * written to the flash media last time. Otherwise, UBIFS forces inode
  * write-back, thus making sure the on-flash inode contains current inode size,
  * and then keeps writing pages back.
index 717d79c..1d54383 100644 (file)
@@ -478,7 +478,7 @@ const struct ubifs_lprops *do_find_free_space(struct ubifs_info *c,
  * ubifs_find_free_space - find a data LEB with free space.
  * @c: the UBIFS file-system description object
  * @min_space: minimum amount of required free space
- * @free: contains amount of free space in the LEB on exit
+ * @offs: contains offset of where free space starts on exit
  * @squeeze: whether to try to find space in a non-empty LEB first
  *
  * This function looks for an LEB with at least @min_space bytes of free space.
@@ -490,7 +490,7 @@ const struct ubifs_lprops *do_find_free_space(struct ubifs_info *c,
  * failed to find a LEB with @min_space bytes of free space and other a negative
  * error codes in case of failure.
  */
-int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *free,
+int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *offs,
                          int squeeze)
 {
        const struct ubifs_lprops *lprops;
@@ -558,10 +558,10 @@ int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *free,
                spin_unlock(&c->space_lock);
        }
 
-       *free = lprops->free;
+       *offs = c->leb_size - lprops->free;
        ubifs_release_lprops(c);
 
-       if (*free == c->leb_size) {
+       if (*offs == 0) {
                /*
                 * Ensure that empty LEBs have been unmapped. They may not have
                 * been, for example, because of an unclean unmount.  Also
@@ -573,8 +573,8 @@ int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *free,
                        return err;
        }
 
-       dbg_find("found LEB %d, free %d", lnum, *free);
-       ubifs_assert(*free >= min_space);
+       dbg_find("found LEB %d, free %d", lnum, c->leb_size - *offs);
+       ubifs_assert(*offs <= c->leb_size - min_space);
        return lnum;
 
 out:
index a711d33..f0f5f15 100644 (file)
@@ -47,7 +47,7 @@
  * have to waste large pieces of free space at the end of LEB B, because nodes
  * from LEB A would not fit. And the worst situation is when all nodes are of
  * maximum size. So dark watermark is the amount of free + dirty space in LEB
- * which are guaranteed to be reclaimable. If LEB has less space, the GC migh
+ * which are guaranteed to be reclaimable. If LEB has less space, the GC might
  * be unable to reclaim it. So, LEBs with free + dirty greater than dark
  * watermark are "good" LEBs from GC's point of few. The other LEBs are not so
  * good, and GC takes extra care when moving them.
 #include "ubifs.h"
 
 /*
- * GC tries to optimize the way it fit nodes to available space, and it sorts
- * nodes a little. The below constants are watermarks which define "large",
- * "medium", and "small" nodes.
- */
-#define MEDIUM_NODE_WM (UBIFS_BLOCK_SIZE / 4)
-#define SMALL_NODE_WM  UBIFS_MAX_DENT_NODE_SZ
-
-/*
  * GC may need to move more than one LEB to make progress. The below constants
  * define "soft" and "hard" limits on the number of LEBs the garbage collector
  * may move.
@@ -116,83 +108,222 @@ static int switch_gc_head(struct ubifs_info *c)
 }
 
 /**
- * joinup - bring data nodes for an inode together.
- * @c: UBIFS file-system description object
- * @sleb: describes scanned LEB
- * @inum: inode number
- * @blk: block number
- * @data: list to which to add data nodes
+ * list_sort - sort a list.
+ * @priv: private data, passed to @cmp
+ * @head: the list to sort
+ * @cmp: the elements comparison function
  *
- * This function looks at the first few nodes in the scanned LEB @sleb and adds
- * them to @data if they are data nodes from @inum and have a larger block
- * number than @blk. This function returns %0 on success and a negative error
- * code on failure.
+ * This function has been implemented by Mark J Roberts <mjr@znex.org>. It
+ * implements "merge sort" which has O(nlog(n)) complexity. The list is sorted
+ * in ascending order.
+ *
+ * The comparison function @cmp is supposed to return a negative value if @a is
+ * than @b, and a positive value if @a is greater than @b. If @a and @b are
+ * equivalent, then it does not matter what this function returns.
  */
-static int joinup(struct ubifs_info *c, struct ubifs_scan_leb *sleb, ino_t inum,
-                 unsigned int blk, struct list_head *data)
+static void list_sort(void *priv, struct list_head *head,
+                     int (*cmp)(void *priv, struct list_head *a,
+                                struct list_head *b))
 {
-       int err, cnt = 6, lnum = sleb->lnum, offs;
-       struct ubifs_scan_node *snod, *tmp;
-       union ubifs_key *key;
+       struct list_head *p, *q, *e, *list, *tail, *oldhead;
+       int insize, nmerges, psize, qsize, i;
+
+       if (list_empty(head))
+               return;
+
+       list = head->next;
+       list_del(head);
+       insize = 1;
+       for (;;) {
+               p = oldhead = list;
+               list = tail = NULL;
+               nmerges = 0;
+
+               while (p) {
+                       nmerges++;
+                       q = p;
+                       psize = 0;
+                       for (i = 0; i < insize; i++) {
+                               psize++;
+                               q = q->next == oldhead ? NULL : q->next;
+                               if (!q)
+                                       break;
+                       }
 
-       list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) {
-               key = &snod->key;
-               if (key_inum(c, key) == inum &&
-                   key_type(c, key) == UBIFS_DATA_KEY &&
-                   key_block(c, key) > blk) {
-                       offs = snod->offs;
-                       err = ubifs_tnc_has_node(c, key, 0, lnum, offs, 0);
-                       if (err < 0)
-                               return err;
-                       list_del(&snod->list);
-                       if (err) {
-                               list_add_tail(&snod->list, data);
-                               blk = key_block(c, key);
-                       } else
-                               kfree(snod);
-                       cnt = 6;
-               } else if (--cnt == 0)
+                       qsize = insize;
+                       while (psize > 0 || (qsize > 0 && q)) {
+                               if (!psize) {
+                                       e = q;
+                                       q = q->next;
+                                       qsize--;
+                                       if (q == oldhead)
+                                               q = NULL;
+                               } else if (!qsize || !q) {
+                                       e = p;
+                                       p = p->next;
+                                       psize--;
+                                       if (p == oldhead)
+                                               p = NULL;
+                               } else if (cmp(priv, p, q) <= 0) {
+                                       e = p;
+                                       p = p->next;
+                                       psize--;
+                                       if (p == oldhead)
+                                               p = NULL;
+                               } else {
+                                       e = q;
+                                       q = q->next;
+                                       qsize--;
+                                       if (q == oldhead)
+                                               q = NULL;
+                               }
+                               if (tail)
+                                       tail->next = e;
+                               else
+                                       list = e;
+                               e->prev = tail;
+                               tail = e;
+                       }
+                       p = q;
+               }
+
+               tail->next = list;
+               list->prev = tail;
+
+               if (nmerges <= 1)
                        break;
+
+               insize *= 2;
        }
-       return 0;
+
+       head->next = list;
+       head->prev = list->prev;
+       list->prev->next = head;
+       list->prev = head;
 }
 
 /**
- * move_nodes - move nodes.
+ * data_nodes_cmp - compare 2 data nodes.
+ * @priv: UBIFS file-system description object
+ * @a: first data node
+ * @a: second data node
+ *
+ * This function compares data nodes @a and @b. Returns %1 if @a has greater
+ * inode or block number, and %-1 otherwise.
+ */
+int data_nodes_cmp(void *priv, struct list_head *a, struct list_head *b)
+{
+       ino_t inuma, inumb;
+       struct ubifs_info *c = priv;
+       struct ubifs_scan_node *sa, *sb;
+
+       cond_resched();
+       sa = list_entry(a, struct ubifs_scan_node, list);
+       sb = list_entry(b, struct ubifs_scan_node, list);
+       ubifs_assert(key_type(c, &sa->key) == UBIFS_DATA_KEY);
+       ubifs_assert(key_type(c, &sb->key) == UBIFS_DATA_KEY);
+
+       inuma = key_inum(c, &sa->key);
+       inumb = key_inum(c, &sb->key);
+
+       if (inuma == inumb) {
+               unsigned int blka = key_block(c, &sa->key);
+               unsigned int blkb = key_block(c, &sb->key);
+
+               if (blka <= blkb)
+                       return -1;
+       } else if (inuma <= inumb)
+               return -1;
+
+       return 1;
+}
+
+/*
+ * nondata_nodes_cmp - compare 2 non-data nodes.
+ * @priv: UBIFS file-system description object
+ * @a: first node
+ * @a: second node
+ *
+ * This function compares nodes @a and @b. It makes sure that inode nodes go
+ * first and sorted by length in descending order. Directory entry nodes go
+ * after inode nodes and are sorted in ascending hash valuer order.
+ */
+int nondata_nodes_cmp(void *priv, struct list_head *a, struct list_head *b)
+{
+       int typea, typeb;
+       ino_t inuma, inumb;
+       struct ubifs_info *c = priv;
+       struct ubifs_scan_node *sa, *sb;
+
+       cond_resched();
+       sa = list_entry(a, struct ubifs_scan_node, list);
+       sb = list_entry(b, struct ubifs_scan_node, list);
+       typea = key_type(c, &sa->key);
+       typeb = key_type(c, &sb->key);
+       ubifs_assert(typea != UBIFS_DATA_KEY && typeb != UBIFS_DATA_KEY);
+
+       /* Inodes go before directory entries */
+       if (typea == UBIFS_INO_KEY) {
+               if (typeb == UBIFS_INO_KEY)
+                       return sb->len - sa->len;
+               return -1;
+       }
+       if (typeb == UBIFS_INO_KEY)
+               return 1;
+
+       ubifs_assert(typea == UBIFS_DENT_KEY && typeb == UBIFS_DENT_KEY);
+       inuma = key_inum(c, &sa->key);
+       inumb = key_inum(c, &sb->key);
+
+       if (inuma == inumb) {
+               uint32_t hasha = key_hash(c, &sa->key);
+               uint32_t hashb = key_hash(c, &sb->key);
+
+               if (hasha <= hashb)
+                       return -1;
+       } else if (inuma <= inumb)
+               return -1;
+
+       return 1;
+}
+
+/**
+ * sort_nodes - sort nodes for GC.
  * @c: UBIFS file-system description object
- * @sleb: describes nodes to move
+ * @sleb: describes nodes to sort and contains the result on exit
+ * @nondata: contains non-data nodes on exit
+ * @min: minimum node size is returned here
  *
- * This function moves valid nodes from data LEB described by @sleb to the GC
- * journal head. The obsolete nodes are dropped.
+ * This function sorts the list of inodes to garbage collect. First of all, it
+ * kills obsolete nodes and separates data and non-data nodes to the
+ * @sleb->nodes and @nondata lists correspondingly.
+ *
+ * Data nodes are then sorted in block number order - this is important for
+ * bulk-read; data nodes with lower inode number go before data nodes with
+ * higher inode number, and data nodes with lower block number go before data
+ * nodes with higher block number;
  *
- * When moving nodes we have to deal with classical bin-packing problem: the
- * space in the current GC journal head LEB and in @c->gc_lnum are the "bins",
- * where the nodes in the @sleb->nodes list are the elements which should be
- * fit optimally to the bins. This function uses the "first fit decreasing"
- * strategy, although it does not really sort the nodes but just split them on
- * 3 classes - large, medium, and small, so they are roughly sorted.
+ * Non-data nodes are sorted as follows.
+ *   o First go inode nodes - they are sorted in descending length order.
+ *   o Then go directory entry nodes - they are sorted in hash order, which
+ *     should supposedly optimize 'readdir()'. Direntry nodes with lower parent
+ *     inode number go before direntry nodes with higher parent inode number,
+ *     and direntry nodes with lower name hash values go before direntry nodes
+ *     with higher name hash values.
  *
- * This function returns zero in case of success, %-EAGAIN if commit is
- * required, and other negative error codes in case of other failures.
+ * This function returns zero in case of success and a negative error code in
+ * case of failure.
  */
-static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb)
+static int sort_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
+                     struct list_head *nondata, int *min)
 {
        struct ubifs_scan_node *snod, *tmp;
-       struct list_head data, large, medium, small;
-       struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf;
-       int avail, err, min = INT_MAX;
-       unsigned int blk = 0;
-       ino_t inum = 0;
 
-       INIT_LIST_HEAD(&data);
-       INIT_LIST_HEAD(&large);
-       INIT_LIST_HEAD(&medium);
-       INIT_LIST_HEAD(&small);
+       *min = INT_MAX;
 
-       while (!list_empty(&sleb->nodes)) {
-               struct list_head *lst = sleb->nodes.next;
-
-               snod = list_entry(lst, struct ubifs_scan_node, list);
+       /* Separate data nodes and non-data nodes */
+       list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) {
+               int err;
 
                ubifs_assert(snod->type != UBIFS_IDX_NODE);
                ubifs_assert(snod->type != UBIFS_REF_NODE);
@@ -201,53 +332,72 @@ static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb)
                err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum,
                                         snod->offs, 0);
                if (err < 0)
-                       goto out;
+                       return err;
 
-               list_del(lst);
                if (!err) {
                        /* The node is obsolete, remove it from the list */
+                       list_del(&snod->list);
                        kfree(snod);
                        continue;
                }
 
-               /*
-                * Sort the list of nodes so that data nodes go first, large
-                * nodes go second, and small nodes go last.
-                */
-               if (key_type(c, &snod->key) == UBIFS_DATA_KEY) {
-                       if (inum != key_inum(c, &snod->key)) {
-                               if (inum) {
-                                       /*
-                                        * Try to move data nodes from the same
-                                        * inode together.
-                                        */
-                                       err = joinup(c, sleb, inum, blk, &data);
-                                       if (err)
-                                               goto out;
-                               }
-                               inum = key_inum(c, &snod->key);
-                               blk = key_block(c, &snod->key);
-                       }
-                       list_add_tail(lst, &data);
-               } else if (snod->len > MEDIUM_NODE_WM)
-                       list_add_tail(lst, &large);
-               else if (snod->len > SMALL_NODE_WM)
-                       list_add_tail(lst, &medium);
-               else
-                       list_add_tail(lst, &small);
-
-               /* And find the smallest node */
-               if (snod->len < min)
-                       min = snod->len;
+               if (snod->len < *min)
+                       *min = snod->len;
+
+               if (key_type(c, &snod->key) != UBIFS_DATA_KEY)
+                       list_move_tail(&snod->list, nondata);
        }
 
-       /*
-        * Join the tree lists so that we'd have one roughly sorted list
-        * ('large' will be the head of the joined list).
-        */
-       list_splice(&data, &large);
-       list_splice(&medium, large.prev);
-       list_splice(&small, large.prev);
+       /* Sort data and non-data nodes */
+       list_sort(c, &sleb->nodes, &data_nodes_cmp);
+       list_sort(c, nondata, &nondata_nodes_cmp);
+       return 0;
+}
+
+/**
+ * move_node - move a node.
+ * @c: UBIFS file-system description object
+ * @sleb: describes the LEB to move nodes from
+ * @snod: the mode to move
+ * @wbuf: write-buffer to move node to
+ *
+ * This function moves node @snod to @wbuf, changes TNC correspondingly, and
+ * destroys @snod. Returns zero in case of success and a negative error code in
+ * case of failure.
+ */
+static int move_node(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
+                    struct ubifs_scan_node *snod, struct ubifs_wbuf *wbuf)
+{
+       int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used;
+
+       cond_resched();
+       err = ubifs_wbuf_write_nolock(wbuf, snod->node, snod->len);
+       if (err)
+               return err;
+
+       err = ubifs_tnc_replace(c, &snod->key, sleb->lnum,
+                               snod->offs, new_lnum, new_offs,
+                               snod->len);
+       list_del(&snod->list);
+       kfree(snod);
+       return err;
+}
+
+/**
+ * move_nodes - move nodes.
+ * @c: UBIFS file-system description object
+ * @sleb: describes the LEB to move nodes from
+ *
+ * This function moves valid nodes from data LEB described by @sleb to the GC
+ * journal head. This function returns zero in case of success, %-EAGAIN if
+ * commit is required, and other negative error codes in case of other
+ * failures.
+ */
+static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb)
+{
+       int err, min;
+       LIST_HEAD(nondata);
+       struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf;
 
        if (wbuf->lnum == -1) {
                /*
@@ -256,42 +406,59 @@ static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb)
                 */
                err = switch_gc_head(c);
                if (err)
-                       goto out;
+                       return err;
        }
 
+       err = sort_nodes(c, sleb, &nondata, &min);
+       if (err)
+               goto out;
+
        /* Write nodes to their new location. Use the first-fit strategy */
        while (1) {
-               avail = c->leb_size - wbuf->offs - wbuf->used;
-               list_for_each_entry_safe(snod, tmp, &large, list) {
-                       int new_lnum, new_offs;
+               int avail;
+               struct ubifs_scan_node *snod, *tmp;
+
+               /* Move data nodes */
+               list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) {
+                       avail = c->leb_size - wbuf->offs - wbuf->used;
+                       if  (snod->len > avail)
+                               /*
+                                * Do not skip data nodes in order to optimize
+                                * bulk-read.
+                                */
+                               break;
+
+                       err = move_node(c, sleb, snod, wbuf);
+                       if (err)
+                               goto out;
+               }
 
+               /* Move non-data nodes */
+               list_for_each_entry_safe(snod, tmp, &nondata, list) {
+                       avail = c->leb_size - wbuf->offs - wbuf->used;
                        if (avail < min)
                                break;
 
-                       if (snod->len > avail)
-                               /* This node does not fit */
+                       if  (snod->len > avail) {
+                               /*
+                                * Keep going only if this is an inode with
+                                * some data. Otherwise stop and switch the GC
+                                * head. IOW, we assume that data-less inode
+                                * nodes and direntry nodes are roughly of the
+                                * same size.
+                                */
+                               if (key_type(c, &snod->key) == UBIFS_DENT_KEY ||
+                                   snod->len == UBIFS_INO_NODE_SZ)
+                                       break;
                                continue;
+                       }
 
-                       cond_resched();
-
-                       new_lnum = wbuf->lnum;
-                       new_offs = wbuf->offs + wbuf->used;
-                       err = ubifs_wbuf_write_nolock(wbuf, snod->node,
-                                                     snod->len);
+                       err = move_node(c, sleb, snod, wbuf);
                        if (err)
                                goto out;
-                       err = ubifs_tnc_replace(c, &snod->key, sleb->lnum,
-                                               snod->offs, new_lnum, new_offs,
-                                               snod->len);
-                       if (err)
-                               goto out;
-
-                       avail = c->leb_size - wbuf->offs - wbuf->used;
-                       list_del(&snod->list);
-                       kfree(snod);
                }
 
-               if (list_empty(&large))
+               if (list_empty(&sleb->nodes) && list_empty(&nondata))
                        break;
 
                /*
@@ -306,10 +473,7 @@ static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb)
        return 0;
 
 out:
-       list_for_each_entry_safe(snod, tmp, &large, list) {
-               list_del(&snod->list);
-               kfree(snod);
-       }
+       list_splice_tail(&nondata, &sleb->nodes);
        return err;
 }
 
index a11ca09..64b5f3a 100644 (file)
@@ -114,7 +114,7 @@ static inline void zero_trun_node_unused(struct ubifs_trun_node *trun)
  */
 static int reserve_space(struct ubifs_info *c, int jhead, int len)
 {
-       int err = 0, err1, retries = 0, avail, lnum, offs, free, squeeze;
+       int err = 0, err1, retries = 0, avail, lnum, offs, squeeze;
        struct ubifs_wbuf *wbuf = &c->jheads[jhead].wbuf;
 
        /*
@@ -139,10 +139,9 @@ again:
         * Write buffer wasn't seek'ed or there is no enough space - look for an
         * LEB with some empty space.
         */
-       lnum = ubifs_find_free_space(c, len, &free, squeeze);
+       lnum = ubifs_find_free_space(c, len, &offs, squeeze);
        if (lnum >= 0) {
                /* Found an LEB, add it to the journal head */
-               offs = c->leb_size - free;
                err = ubifs_add_bud_to_log(c, jhead, lnum, offs);
                if (err)
                        goto out_return;
@@ -1366,7 +1365,7 @@ out_ro:
  * @host: host inode
  *
  * This function writes the updated version of an extended attribute inode and
- * the host inode tho the journal (to the base head). The host inode is written
+ * the host inode to the journal (to the base head). The host inode is written
  * after the extended attribute inode in order to guarantee that the extended
  * attribute will be flushed when the inode is synchronized by 'fsync()' and
  * consequently, the write-buffer is synchronized. This function returns zero
index efb3430..5fa27ea 100644 (file)
@@ -381,8 +381,8 @@ static inline ino_t key_inum_flash(const struct ubifs_info *c, const void *k)
  * @c: UBIFS file-system description object
  * @key: the key to get hash from
  */
-static inline int key_hash(const struct ubifs_info *c,
-                          const union ubifs_key *key)
+static inline uint32_t key_hash(const struct ubifs_info *c,
+                               const union ubifs_key *key)
 {
        return key->u32[1] & UBIFS_S_KEY_HASH_MASK;
 }
@@ -392,7 +392,7 @@ static inline int key_hash(const struct ubifs_info *c,
  * @c: UBIFS file-system description object
  * @k: the key to get hash from
  */
-static inline int key_hash_flash(const struct ubifs_info *c, const void *k)
+static inline uint32_t key_hash_flash(const struct ubifs_info *c, const void *k)
 {
        const union ubifs_key *key = k;
 
index 3e0aa73..56e3377 100644 (file)
@@ -239,7 +239,7 @@ int ubifs_add_bud_to_log(struct ubifs_info *c, int jhead, int lnum, int offs)
        }
 
        /*
-        * Make sure the the amount of space in buds will not exceed
+        * Make sure the amount of space in buds will not exceed the
         * 'c->max_bud_bytes' limit, because we want to guarantee mount time
         * limits.
         *
@@ -367,7 +367,6 @@ static void remove_buds(struct ubifs_info *c)
                                bud->jhead, c->leb_size - bud->start,
                                c->cmt_bud_bytes);
                        rb_erase(p1, &c->buds);
-                       list_del(&bud->list);
                        /*
                         * If the commit does not finish, the recovery will need
                         * to replay the journal, in which case the old buds
@@ -375,7 +374,7 @@ static void remove_buds(struct ubifs_info *c)
                         * commit i.e. do not allow them to be garbage
                         * collected.
                         */
-                       list_add(&bud->list, &c->old_buds);
+                       list_move(&bud->list, &c->old_buds);
                }
        }
        spin_unlock(&c->buds_lock);
index 3216a1f..8cbfb82 100644 (file)
@@ -229,7 +229,7 @@ static int layout_cnodes(struct ubifs_info *c)
                while (offs + len > c->leb_size) {
                        alen = ALIGN(offs, c->min_io_size);
                        upd_ltab(c, lnum, c->leb_size - alen, alen - offs);
-                       dbg_chk_lpt_sz(c, 2, alen - offs);
+                       dbg_chk_lpt_sz(c, 2, c->leb_size - offs);
                        err = alloc_lpt_leb(c, &lnum);
                        if (err)
                                goto no_space;
@@ -272,7 +272,7 @@ static int layout_cnodes(struct ubifs_info *c)
                if (offs + c->lsave_sz > c->leb_size) {
                        alen = ALIGN(offs, c->min_io_size);
                        upd_ltab(c, lnum, c->leb_size - alen, alen - offs);
-                       dbg_chk_lpt_sz(c, 2, alen - offs);
+                       dbg_chk_lpt_sz(c, 2, c->leb_size - offs);
                        err = alloc_lpt_leb(c, &lnum);
                        if (err)
                                goto no_space;
@@ -292,7 +292,7 @@ static int layout_cnodes(struct ubifs_info *c)
                if (offs + c->ltab_sz > c->leb_size) {
                        alen = ALIGN(offs, c->min_io_size);
                        upd_ltab(c, lnum, c->leb_size - alen, alen - offs);
-                       dbg_chk_lpt_sz(c, 2, alen - offs);
+                       dbg_chk_lpt_sz(c, 2, c->leb_size - offs);
                        err = alloc_lpt_leb(c, &lnum);
                        if (err)
                                goto no_space;
@@ -416,14 +416,12 @@ static int write_cnodes(struct ubifs_info *c)
                                                       alen, UBI_SHORTTERM);
                                if (err)
                                        return err;
-                               dbg_chk_lpt_sz(c, 4, alen - wlen);
                        }
-                       dbg_chk_lpt_sz(c, 2, 0);
+                       dbg_chk_lpt_sz(c, 2, c->leb_size - offs);
                        err = realloc_lpt_leb(c, &lnum);
                        if (err)
                                goto no_space;
-                       offs = 0;
-                       from = 0;
+                       offs = from = 0;
                        ubifs_assert(lnum >= c->lpt_first &&
                                     lnum <= c->lpt_last);
                        err = ubifs_leb_unmap(c, lnum);
@@ -477,11 +475,11 @@ static int write_cnodes(struct ubifs_info *c)
                                              UBI_SHORTTERM);
                        if (err)
                                return err;
-                       dbg_chk_lpt_sz(c, 2, alen - wlen);
+                       dbg_chk_lpt_sz(c, 2, c->leb_size - offs);
                        err = realloc_lpt_leb(c, &lnum);
                        if (err)
                                goto no_space;
-                       offs = 0;
+                       offs = from = 0;
                        ubifs_assert(lnum >= c->lpt_first &&
                                     lnum <= c->lpt_last);
                        err = ubifs_leb_unmap(c, lnum);
@@ -504,11 +502,11 @@ static int write_cnodes(struct ubifs_info *c)
                                              UBI_SHORTTERM);
                        if (err)
                                return err;
-                       dbg_chk_lpt_sz(c, 2, alen - wlen);
+                       dbg_chk_lpt_sz(c, 2, c->leb_size - offs);
                        err = realloc_lpt_leb(c, &lnum);
                        if (err)
                                goto no_space;
-                       offs = 0;
+                       offs = from = 0;
                        ubifs_assert(lnum >= c->lpt_first &&
                                     lnum <= c->lpt_last);
                        err = ubifs_leb_unmap(c, lnum);
@@ -1756,10 +1754,16 @@ int dbg_chk_lpt_free_spc(struct ubifs_info *c)
 /**
  * dbg_chk_lpt_sz - check LPT does not write more than LPT size.
  * @c: the UBIFS file-system description object
- * @action: action
+ * @action: what to do
  * @len: length written
  *
  * This function returns %0 on success and a negative error code on failure.
+ * The @action argument may be one of:
+ *   o %0 - LPT debugging checking starts, initialize debugging variables;
+ *   o %1 - wrote an LPT node, increase LPT size by @len bytes;
+ *   o %2 - switched to a different LEB and wasted @len bytes;
+ *   o %3 - check that we've written the right number of bytes.
+ *   o %4 - wasted @len bytes;
  */
 int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len)
 {
@@ -1917,12 +1921,12 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
                                       lnum, offs);
                        err = ubifs_unpack_nnode(c, buf, &nnode);
                        for (i = 0; i < UBIFS_LPT_FANOUT; i++) {
-                               printk("%d:%d", nnode.nbranch[i].lnum,
+                               printk(KERN_CONT "%d:%d", nnode.nbranch[i].lnum,
                                       nnode.nbranch[i].offs);
                                if (i != UBIFS_LPT_FANOUT - 1)
-                                       printk(", ");
+                                       printk(KERN_CONT ", ");
                        }
-                       printk("\n");
+                       printk(KERN_CONT "\n");
                        break;
                }
                case UBIFS_LPT_LTAB:
index 90acac6..1066297 100644 (file)
@@ -425,59 +425,35 @@ static void clean_buf(const struct ubifs_info *c, void **buf, int lnum,
  * @lnum: LEB number of the LEB from which @buf was read
  * @offs: offset from which @buf was read
  *
- * This function scans @buf for more nodes and returns %0 is a node is found and
- * %1 if no more nodes are found.
+ * This function ensures that the corrupted node at @offs is the last thing
+ * written to a LEB. This function returns %1 if more data is not found and
+ * %0 if more data is found.
  */
 static int no_more_nodes(const struct ubifs_info *c, void *buf, int len,
                        int lnum, int offs)
 {
-       int skip, next_offs = 0;
+       struct ubifs_ch *ch = buf;
+       int skip, dlen = le32_to_cpu(ch->len);
 
-       if (len > UBIFS_DATA_NODE_SZ) {
-               struct ubifs_ch *ch = buf;
-               int dlen = le32_to_cpu(ch->len);
-
-               if (ch->node_type == UBIFS_DATA_NODE && dlen >= UBIFS_CH_SZ &&
-                   dlen <= UBIFS_MAX_DATA_NODE_SZ)
-                       /* The corrupt node looks like a data node */
-                       next_offs = ALIGN(offs + dlen, 8);
-       }
-
-       if (c->min_io_size == 1)
-               skip = 8;
-       else
-               skip = ALIGN(offs + 1, c->min_io_size) - offs;
-
-       offs += skip;
-       buf += skip;
-       len -= skip;
-       while (len > 8) {
-               struct ubifs_ch *ch = buf;
-               uint32_t magic = le32_to_cpu(ch->magic);
-               int ret;
-
-               if (magic == UBIFS_NODE_MAGIC) {
-                       ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1);
-                       if (ret == SCANNED_A_NODE || ret > 0) {
-                               /*
-                                * There is a small chance this is just data in
-                                * a data node, so check that possibility. e.g.
-                                * this is part of a file that itself contains
-                                * a UBIFS image.
-                                */
-                               if (next_offs && offs + le32_to_cpu(ch->len) <=
-                                   next_offs)
-                                       continue;
-                               dbg_rcvry("unexpected node at %d:%d", lnum,
-                                         offs);
-                               return 0;
-                       }
-               }
-               offs += 8;
-               buf += 8;
-               len -= 8;
+       /* Check for empty space after the corrupt node's common header */
+       skip = ALIGN(offs + UBIFS_CH_SZ, c->min_io_size) - offs;
+       if (is_empty(buf + skip, len - skip))
+               return 1;
+       /*
+        * The area after the common header size is not empty, so the common
+        * header must be intact. Check it.
+        */
+       if (ubifs_check_node(c, buf, lnum, offs, 1, 0) != -EUCLEAN) {
+               dbg_rcvry("unexpected bad common header at %d:%d", lnum, offs);
+               return 0;
        }
-       return 1;
+       /* Now we know the corrupt node's length we can skip over it */
+       skip = ALIGN(offs + dlen, c->min_io_size) - offs;
+       /* After which there should be empty space */
+       if (is_empty(buf + skip, len - skip))
+               return 1;
+       dbg_rcvry("unexpected data at %d:%d", lnum, offs + skip);
+       return 0;
 }
 
 /**
index ce42a7b..11cc801 100644 (file)
@@ -143,7 +143,7 @@ static int set_bud_lprops(struct ubifs_info *c, struct replay_entry *r)
                dirty -= c->leb_size - lp->free;
                /*
                 * If the replay order was perfect the dirty space would now be
-                * zero. The order is not perfect because the the journal heads
+                * zero. The order is not perfect because the journal heads
                 * race with each other. This is not a problem but is does mean
                 * that the dirty space may temporarily exceed c->leb_size
                 * during the replay.
index e070c64..57085e4 100644 (file)
@@ -193,6 +193,7 @@ static int create_default_filesystem(struct ubifs_info *c)
        if (tmp64 > DEFAULT_MAX_RP_SIZE)
                tmp64 = DEFAULT_MAX_RP_SIZE;
        sup->rp_size = cpu_to_le64(tmp64);
+       sup->ro_compat_version = cpu_to_le32(UBIFS_RO_COMPAT_VERSION);
 
        err = ubifs_write_node(c, sup, UBIFS_SB_NODE_SZ, 0, 0, UBI_LONGTERM);
        kfree(sup);
@@ -532,17 +533,39 @@ int ubifs_read_superblock(struct ubifs_info *c)
        if (IS_ERR(sup))
                return PTR_ERR(sup);
 
+       c->fmt_version = le32_to_cpu(sup->fmt_version);
+       c->ro_compat_version = le32_to_cpu(sup->ro_compat_version);
+
        /*
         * The software supports all previous versions but not future versions,
         * due to the unavailability of time-travelling equipment.
         */
-       c->fmt_version = le32_to_cpu(sup->fmt_version);
        if (c->fmt_version > UBIFS_FORMAT_VERSION) {
-               ubifs_err("on-flash format version is %d, but software only "
-                         "supports up to version %d", c->fmt_version,
-                         UBIFS_FORMAT_VERSION);
-               err = -EINVAL;
-               goto out;
+               struct super_block *sb = c->vfs_sb;
+               int mounting_ro = sb->s_flags & MS_RDONLY;
+
+               ubifs_assert(!c->ro_media || mounting_ro);
+               if (!mounting_ro ||
+                   c->ro_compat_version > UBIFS_RO_COMPAT_VERSION) {
+                       ubifs_err("on-flash format version is w%d/r%d, but "
+                                 "software only supports up to version "
+                                 "w%d/r%d", c->fmt_version,
+                                 c->ro_compat_version, UBIFS_FORMAT_VERSION,
+                                 UBIFS_RO_COMPAT_VERSION);
+                       if (c->ro_compat_version <= UBIFS_RO_COMPAT_VERSION) {
+                               ubifs_msg("only R/O mounting is possible");
+                               err = -EROFS;
+                       } else
+                               err = -EINVAL;
+                       goto out;
+               }
+
+               /*
+                * The FS is mounted R/O, and the media format is
+                * R/O-compatible with the UBIFS implementation, so we can
+                * mount.
+                */
+               c->rw_incompat = 1;
        }
 
        if (c->fmt_version < 3) {
@@ -623,7 +646,6 @@ int ubifs_read_superblock(struct ubifs_info *c)
        c->main_lebs = c->leb_cnt - UBIFS_SB_LEBS - UBIFS_MST_LEBS;
        c->main_lebs -= c->log_lebs + c->lpt_lebs + c->orph_lebs;
        c->main_first = c->leb_cnt - c->main_lebs;
-       c->report_rp_size = ubifs_reported_space(c, c->rp_size);
 
        err = validate_sb(c, sup);
 out:
index e7bab52..02feb59 100644 (file)
@@ -206,8 +206,7 @@ static int shrink_tnc_trees(int nr, int age, int *contention)
                 * Move this one to the end of the list to provide some
                 * fairness.
                 */
-               list_del(&c->infos_list);
-               list_add_tail(&c->infos_list, &ubifs_infos);
+               list_move_tail(&c->infos_list, &ubifs_infos);
                mutex_unlock(&c->umount_mutex);
                if (freed >= nr)
                        break;
@@ -263,8 +262,7 @@ static int kick_a_thread(void)
                        }
 
                        if (i == 1) {
-                               list_del(&c->infos_list);
-                               list_add_tail(&c->infos_list, &ubifs_infos);
+                               list_move_tail(&c->infos_list, &ubifs_infos);
                                spin_unlock(&ubifs_infos_lock);
 
                                ubifs_request_bg_commit(c);
index c5c9835..faa44f9 100644 (file)
@@ -421,8 +421,8 @@ static int ubifs_show_options(struct seq_file *s, struct vfsmount *mnt)
                seq_printf(s, ",no_chk_data_crc");
 
        if (c->mount_opts.override_compr) {
-               seq_printf(s, ",compr=");
-               seq_printf(s, ubifs_compr_name(c->mount_opts.compr_type));
+               seq_printf(s, ",compr=%s",
+                          ubifs_compr_name(c->mount_opts.compr_type));
        }
 
        return 0;
@@ -700,6 +700,8 @@ static int init_constants_sb(struct ubifs_info *c)
        if (err)
                return err;
 
+       /* Initialize effective LEB size used in budgeting calculations */
+       c->idx_leb_size = c->leb_size - c->max_idx_node_sz;
        return 0;
 }
 
@@ -716,6 +718,7 @@ static void init_constants_master(struct ubifs_info *c)
        long long tmp64;
 
        c->min_idx_lebs = ubifs_calc_min_idx_lebs(c);
+       c->report_rp_size = ubifs_reported_space(c, c->rp_size);
 
        /*
         * Calculate total amount of FS blocks. This number is not used
@@ -1201,7 +1204,7 @@ static int mount_ubifs(struct ubifs_info *c)
                        goto out_cbuf;
 
                /* Create background thread */
-               c->bgt = kthread_create(ubifs_bg_thread, c, c->bgt_name);
+               c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
                if (IS_ERR(c->bgt)) {
                        err = PTR_ERR(c->bgt);
                        c->bgt = NULL;
@@ -1318,11 +1321,15 @@ static int mount_ubifs(struct ubifs_info *c)
                else {
                        c->need_recovery = 0;
                        ubifs_msg("recovery completed");
-                       /* GC LEB has to be empty and taken at this point */
-                       ubifs_assert(c->lst.taken_empty_lebs == 1);
+                       /*
+                        * GC LEB has to be empty and taken at this point. But
+                        * the journal head LEBs may also be accounted as
+                        * "empty taken" if they are empty.
+                        */
+                       ubifs_assert(c->lst.taken_empty_lebs > 0);
                }
        } else
-               ubifs_assert(c->lst.taken_empty_lebs == 1);
+               ubifs_assert(c->lst.taken_empty_lebs > 0);
 
        err = dbg_check_filesystem(c);
        if (err)
@@ -1344,8 +1351,9 @@ static int mount_ubifs(struct ubifs_info *c)
        x = (long long)c->log_lebs * c->leb_size + c->max_bud_bytes;
        ubifs_msg("journal size:       %lld bytes (%lld KiB, %lld MiB, %d "
                  "LEBs)", x, x >> 10, x >> 20, c->log_lebs + c->max_bud_cnt);
-       ubifs_msg("media format:       %d (latest is %d)",
-                 c->fmt_version, UBIFS_FORMAT_VERSION);
+       ubifs_msg("media format:       w%d/r%d (latest is w%d/r%d)",
+                 c->fmt_version, c->ro_compat_version,
+                 UBIFS_FORMAT_VERSION, UBIFS_RO_COMPAT_VERSION);
        ubifs_msg("default compressor: %s", ubifs_compr_name(c->default_compr));
        ubifs_msg("reserved for root:  %llu bytes (%llu KiB)",
                c->report_rp_size, c->report_rp_size >> 10);
@@ -1485,6 +1493,15 @@ static int ubifs_remount_rw(struct ubifs_info *c)
 {
        int err, lnum;
 
+       if (c->rw_incompat) {
+               ubifs_err("the file-system is not R/W-compatible");
+               ubifs_msg("on-flash format version is w%d/r%d, but software "
+                         "only supports up to version w%d/r%d", c->fmt_version,
+                         c->ro_compat_version, UBIFS_FORMAT_VERSION,
+                         UBIFS_RO_COMPAT_VERSION);
+               return -EROFS;
+       }
+
        mutex_lock(&c->umount_mutex);
        dbg_save_space_info(c);
        c->remounting_rw = 1;
@@ -1554,7 +1571,7 @@ static int ubifs_remount_rw(struct ubifs_info *c)
        ubifs_create_buds_lists(c);
 
        /* Create background thread */
-       c->bgt = kthread_create(ubifs_bg_thread, c, c->bgt_name);
+       c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
        if (IS_ERR(c->bgt)) {
                err = PTR_ERR(c->bgt);
                c->bgt = NULL;
@@ -1775,7 +1792,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
                c->bu.buf = NULL;
        }
 
-       ubifs_assert(c->lst.taken_empty_lebs == 1);
+       ubifs_assert(c->lst.taken_empty_lebs > 0);
        return 0;
 }
 
index fa28a84..f249f7b 100644 (file)
@@ -1252,7 +1252,7 @@ int ubifs_lookup_level0(struct ubifs_info *c, const union ubifs_key *key,
         * splitting in the middle of the colliding sequence. Also, when
         * removing the leftmost key, we would have to correct the key of the
         * parent node, which would introduce additional complications. Namely,
-        * if we changed the the leftmost key of the parent znode, the garbage
+        * if we changed the leftmost key of the parent znode, the garbage
         * collector would be unable to find it (GC is doing this when GC'ing
         * indexing LEBs). Although we already have an additional RB-tree where
         * we save such changed znodes (see 'ins_clr_old_idx_znode()') until
index b25fc36..3eee07e 100644 (file)
 /* UBIFS node magic number (must not have the padding byte first or last) */
 #define UBIFS_NODE_MAGIC  0x06101831
 
-/* UBIFS on-flash format version */
+/*
+ * UBIFS on-flash format version. This version is increased when the on-flash
+ * format is changing. If this happens, UBIFS is will support older versions as
+ * well. But older UBIFS code will not support newer formats. Format changes
+ * will be rare and only when absolutely necessary, e.g. to fix a bug or to add
+ * a new feature.
+ *
+ * UBIFS went into mainline kernel with format version 4. The older formats
+ * were development formats.
+ */
 #define UBIFS_FORMAT_VERSION 4
 
+/*
+ * Read-only compatibility version. If the UBIFS format is changed, older UBIFS
+ * implementations will not be able to mount newer formats in read-write mode.
+ * However, depending on the change, it may be possible to mount newer formats
+ * in R/O mode. This is indicated by the R/O compatibility version which is
+ * stored in the super-block.
+ *
+ * This is needed to support boot-loaders which only need R/O mounting. With
+ * this flag it is possible to do UBIFS format changes without a need to update
+ * boot-loaders.
+ */
+#define UBIFS_RO_COMPAT_VERSION 0
+
 /* Minimum logical eraseblock size in bytes */
 #define UBIFS_MIN_LEB_SZ (15*1024)
 
@@ -53,7 +75,7 @@
 
 /*
  * If compressed data length is less than %UBIFS_MIN_COMPRESS_DIFF bytes
- * shorter than uncompressed data length, UBIFS preferes to leave this data
+ * shorter than uncompressed data length, UBIFS prefers to leave this data
  * node uncompress, because it'll be read faster.
  */
 #define UBIFS_MIN_COMPRESS_DIFF 64
@@ -586,6 +608,7 @@ struct ubifs_pad_node {
  * @padding2: reserved for future, zeroes
  * @time_gran: time granularity in nanoseconds
  * @uuid: UUID generated when the file system image was created
+ * @ro_compat_version: UBIFS R/O compatibility version
  */
 struct ubifs_sb_node {
        struct ubifs_ch ch;
@@ -612,7 +635,8 @@ struct ubifs_sb_node {
        __le64 rp_size;
        __le32 time_gran;
        __u8 uuid[16];
-       __u8 padding2[3972];
+       __le32 ro_compat_version;
+       __u8 padding2[3968];
 } __attribute__ ((packed));
 
 /**
index 039a68b..0a8341e 100644 (file)
@@ -934,6 +934,7 @@ struct ubifs_debug_info;
  *          by @commit_sem
  * @cnt_lock: protects @highest_inum and @max_sqnum counters
  * @fmt_version: UBIFS on-flash format version
+ * @ro_compat_version: R/O compatibility version
  * @uuid: UUID from super block
  *
  * @lhead_lnum: log head logical eraseblock number
@@ -966,6 +967,7 @@ struct ubifs_debug_info;
  *                   recovery)
  * @bulk_read: enable bulk-reads
  * @default_compr: default compression algorithm (%UBIFS_COMPR_LZO, etc)
+ * @rw_incompat: the media is not R/W compatible
  *
  * @tnc_mutex: protects the Tree Node Cache (TNC), @zroot, @cnext, @enext, and
  *             @calc_idx_sz
@@ -1015,6 +1017,8 @@ struct ubifs_debug_info;
  * @min_io_shift: number of bits in @min_io_size minus one
  * @leb_size: logical eraseblock size in bytes
  * @half_leb_size: half LEB size
+ * @idx_leb_size: how many bytes of an LEB are effectively available when it is
+ *                used to store indexing nodes (@leb_size - @max_idx_node_sz)
  * @leb_cnt: count of logical eraseblocks
  * @max_leb_cnt: maximum count of logical eraseblocks
  * @old_leb_cnt: count of logical eraseblocks before re-size
@@ -1132,8 +1136,8 @@ struct ubifs_debug_info;
  *             previous commit start
  * @uncat_list: list of un-categorized LEBs
  * @empty_list: list of empty LEBs
- * @freeable_list: list of freeable non-index LEBs (free + dirty == leb_size)
- * @frdi_idx_list: list of freeable index LEBs (free + dirty == leb_size)
+ * @freeable_list: list of freeable non-index LEBs (free + dirty == @leb_size)
+ * @frdi_idx_list: list of freeable index LEBs (free + dirty == @leb_size)
  * @freeable_cnt: number of freeable LEBs in @freeable_list
  *
  * @ltab_lnum: LEB number of LPT's own lprops table
@@ -1177,6 +1181,7 @@ struct ubifs_info {
        unsigned long long cmt_no;
        spinlock_t cnt_lock;
        int fmt_version;
+       int ro_compat_version;
        unsigned char uuid[16];
 
        int lhead_lnum;
@@ -1205,6 +1210,7 @@ struct ubifs_info {
        unsigned int no_chk_data_crc:1;
        unsigned int bulk_read:1;
        unsigned int default_compr:2;
+       unsigned int rw_incompat:1;
 
        struct mutex tnc_mutex;
        struct ubifs_zbranch zroot;
@@ -1253,6 +1259,7 @@ struct ubifs_info {
        int min_io_shift;
        int leb_size;
        int half_leb_size;
+       int idx_leb_size;
        int leb_cnt;
        int max_leb_cnt;
        int old_leb_cnt;
@@ -1500,7 +1507,7 @@ long long ubifs_reported_space(const struct ubifs_info *c, long long free);
 long long ubifs_calc_available(const struct ubifs_info *c, int min_idx_lebs);
 
 /* find.c */
-int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *free,
+int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *offs,
                          int squeeze);
 int ubifs_find_free_leb_for_idx(struct ubifs_info *c);
 int ubifs_find_dirty_leb(struct ubifs_info *c, struct ubifs_lprops *ret_lp,
index a222851..c34b110 100644 (file)
@@ -270,7 +270,6 @@ struct acpi_device {
        struct list_head children;
        struct list_head node;
        struct list_head wakeup_list;
-       struct list_head g_list;
        struct acpi_device_status status;
        struct acpi_device_flags flags;
        struct acpi_device_pnp pnp;
index aeaf7cd..4db89e9 100644 (file)
@@ -191,14 +191,12 @@ acpi_evaluate_object(acpi_handle object,
                     struct acpi_object_list *parameter_objects,
                     struct acpi_buffer *return_object_buffer);
 
-#ifdef ACPI_FUTURE_USAGE
 acpi_status
 acpi_evaluate_object_typed(acpi_handle object,
                           acpi_string pathname,
                           struct acpi_object_list *external_params,
                           struct acpi_buffer *return_buffer,
                           acpi_object_type return_type);
-#endif
 
 acpi_status
 acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer);
diff --git a/include/asm-frv/Kbuild b/include/asm-frv/Kbuild
deleted file mode 100644 (file)
index 0f8956d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-include include/asm-generic/Kbuild.asm
-
-header-y += registers.h
-
-unifdef-y += termios.h
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h
deleted file mode 100644 (file)
index 296c35c..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/* atomic.h: atomic operation emulation for FR-V
- *
- * For an explanation of how atomic ops work in this arch, see:
- *   Documentation/frv/atomic-ops.txt
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_ATOMIC_H
-#define _ASM_ATOMIC_H
-
-#include <linux/types.h>
-#include <asm/spr-regs.h>
-#include <asm/system.h>
-
-#ifdef CONFIG_SMP
-#error not SMP safe
-#endif
-
-/*
- * Atomic operations that C can't guarantee us.  Useful for
- * resource counting etc..
- *
- * We do not have SMP systems, so we don't have to deal with that.
- */
-
-/* Atomic operations are already serializing */
-#define smp_mb__before_atomic_dec()    barrier()
-#define smp_mb__after_atomic_dec()     barrier()
-#define smp_mb__before_atomic_inc()    barrier()
-#define smp_mb__after_atomic_inc()     barrier()
-
-#define ATOMIC_INIT(i)         { (i) }
-#define atomic_read(v)         ((v)->counter)
-#define atomic_set(v, i)       (((v)->counter) = (i))
-
-#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
-static inline int atomic_add_return(int i, atomic_t *v)
-{
-       unsigned long val;
-
-       asm("0:                                         \n"
-           "   orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
-           "   ckeq            icc3,cc7                \n"
-           "   ld.p            %M0,%1                  \n"     /* LD.P/ORCR must be atomic */
-           "   orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
-           "   add%I2          %1,%2,%1                \n"
-           "   cst.p           %1,%M0          ,cc3,#1 \n"
-           "   corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* clear ICC3.Z if store happens */
-           "   beq             icc3,#0,0b              \n"
-           : "+U"(v->counter), "=&r"(val)
-           : "NPr"(i)
-           : "memory", "cc7", "cc3", "icc3"
-           );
-
-       return val;
-}
-
-static inline int atomic_sub_return(int i, atomic_t *v)
-{
-       unsigned long val;
-
-       asm("0:                                         \n"
-           "   orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
-           "   ckeq            icc3,cc7                \n"
-           "   ld.p            %M0,%1                  \n"     /* LD.P/ORCR must be atomic */
-           "   orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
-           "   sub%I2          %1,%2,%1                \n"
-           "   cst.p           %1,%M0          ,cc3,#1 \n"
-           "   corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* clear ICC3.Z if store happens */
-           "   beq             icc3,#0,0b              \n"
-           : "+U"(v->counter), "=&r"(val)
-           : "NPr"(i)
-           : "memory", "cc7", "cc3", "icc3"
-           );
-
-       return val;
-}
-
-#else
-
-extern int atomic_add_return(int i, atomic_t *v);
-extern int atomic_sub_return(int i, atomic_t *v);
-
-#endif
-
-static inline int atomic_add_negative(int i, atomic_t *v)
-{
-       return atomic_add_return(i, v) < 0;
-}
-
-static inline void atomic_add(int i, atomic_t *v)
-{
-       atomic_add_return(i, v);
-}
-
-static inline void atomic_sub(int i, atomic_t *v)
-{
-       atomic_sub_return(i, v);
-}
-
-static inline void atomic_inc(atomic_t *v)
-{
-       atomic_add_return(1, v);
-}
-
-static inline void atomic_dec(atomic_t *v)
-{
-       atomic_sub_return(1, v);
-}
-
-#define atomic_dec_return(v)           atomic_sub_return(1, (v))
-#define atomic_inc_return(v)           atomic_add_return(1, (v))
-
-#define atomic_sub_and_test(i,v)       (atomic_sub_return((i), (v)) == 0)
-#define atomic_dec_and_test(v)         (atomic_sub_return(1, (v)) == 0)
-#define atomic_inc_and_test(v)         (atomic_add_return(1, (v)) == 0)
-
-/*****************************************************************************/
-/*
- * exchange value with memory
- */
-#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
-
-#define xchg(ptr, x)                                                           \
-({                                                                             \
-       __typeof__(ptr) __xg_ptr = (ptr);                                       \
-       __typeof__(*(ptr)) __xg_orig;                                           \
-                                                                               \
-       switch (sizeof(__xg_orig)) {                                            \
-       case 4:                                                                 \
-               asm volatile(                                                   \
-                       "swap%I0 %M0,%1"                                        \
-                       : "+m"(*__xg_ptr), "=r"(__xg_orig)                      \
-                       : "1"(x)                                                \
-                       : "memory"                                              \
-                       );                                                      \
-               break;                                                          \
-                                                                               \
-       default:                                                                \
-               __xg_orig = (__typeof__(__xg_orig))0;                           \
-               asm volatile("break");                                          \
-               break;                                                          \
-       }                                                                       \
-                                                                               \
-       __xg_orig;                                                              \
-})
-
-#else
-
-extern uint32_t __xchg_32(uint32_t i, volatile void *v);
-
-#define xchg(ptr, x)                                                                           \
-({                                                                                             \
-       __typeof__(ptr) __xg_ptr = (ptr);                                                       \
-       __typeof__(*(ptr)) __xg_orig;                                                           \
-                                                                                               \
-       switch (sizeof(__xg_orig)) {                                                            \
-       case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr);     break;  \
-       default:                                                                                \
-               __xg_orig = (__typeof__(__xg_orig))0;                                                                   \
-               asm volatile("break");                                                          \
-               break;                                                                          \
-       }                                                                                       \
-       __xg_orig;                                                                              \
-})
-
-#endif
-
-#define tas(ptr) (xchg((ptr), 1))
-
-#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
-#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
-
-static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
-{
-       int c, old;
-       c = atomic_read(v);
-       for (;;) {
-               if (unlikely(c == (u)))
-                       break;
-               old = atomic_cmpxchg((v), c, c + (a));
-               if (likely(old == c))
-                       break;
-               c = old;
-       }
-       return c != (u);
-}
-
-#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-
-#include <asm-generic/atomic.h>
-#endif /* _ASM_ATOMIC_H */
diff --git a/include/asm-frv/auxvec.h b/include/asm-frv/auxvec.h
deleted file mode 100644 (file)
index 0771077..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef __FRV_AUXVEC_H
-#define __FRV_AUXVEC_H
-
-#endif
diff --git a/include/asm-frv/ax88796.h b/include/asm-frv/ax88796.h
deleted file mode 100644 (file)
index 637e980..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* ax88796.h: access points to the driver for the AX88796 NE2000 clone
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_AX88796_H
-#define _ASM_AX88796_H
-
-#include <asm/mb-regs.h>
-
-#define AX88796_IOADDR         (__region_CS1 + 0x200)
-#define AX88796_IRQ            IRQ_CPU_EXTERNAL7
-#define AX88796_FULL_DUPLEX    0                       /* force full duplex */
-#define AX88796_BUS_INFO       "CS1#+0x200"            /* bus info for ethtool */
-
-#endif /* _ASM_AX88796_H */
diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h
deleted file mode 100644 (file)
index 287f6f6..0000000
+++ /dev/null
@@ -1,412 +0,0 @@
-/* bitops.h: bit operations for the Fujitsu FR-V CPUs
- *
- * For an explanation of how atomic ops work in this arch, see:
- *   Documentation/frv/atomic-ops.txt
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_BITOPS_H
-#define _ASM_BITOPS_H
-
-#include <linux/compiler.h>
-#include <asm/byteorder.h>
-
-#ifdef __KERNEL__
-
-#ifndef _LINUX_BITOPS_H
-#error only <linux/bitops.h> can be included directly
-#endif
-
-#include <asm-generic/bitops/ffz.h>
-
-/*
- * clear_bit() doesn't provide any barrier for the compiler.
- */
-#define smp_mb__before_clear_bit()     barrier()
-#define smp_mb__after_clear_bit()      barrier()
-
-#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
-static inline
-unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v)
-{
-       unsigned long old, tmp;
-
-       asm volatile(
-               "0:                                             \n"
-               "       orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
-               "       ckeq            icc3,cc7                \n"
-               "       ld.p            %M0,%1                  \n"     /* LD.P/ORCR are atomic */
-               "       orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
-               "       and%I3          %1,%3,%2                \n"
-               "       cst.p           %2,%M0          ,cc3,#1 \n"     /* if store happens... */
-               "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* ... clear ICC3.Z */
-               "       beq             icc3,#0,0b              \n"
-               : "+U"(*v), "=&r"(old), "=r"(tmp)
-               : "NPr"(~mask)
-               : "memory", "cc7", "cc3", "icc3"
-               );
-
-       return old;
-}
-
-static inline
-unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v)
-{
-       unsigned long old, tmp;
-
-       asm volatile(
-               "0:                                             \n"
-               "       orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
-               "       ckeq            icc3,cc7                \n"
-               "       ld.p            %M0,%1                  \n"     /* LD.P/ORCR are atomic */
-               "       orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
-               "       or%I3           %1,%3,%2                \n"
-               "       cst.p           %2,%M0          ,cc3,#1 \n"     /* if store happens... */
-               "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* ... clear ICC3.Z */
-               "       beq             icc3,#0,0b              \n"
-               : "+U"(*v), "=&r"(old), "=r"(tmp)
-               : "NPr"(mask)
-               : "memory", "cc7", "cc3", "icc3"
-               );
-
-       return old;
-}
-
-static inline
-unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v)
-{
-       unsigned long old, tmp;
-
-       asm volatile(
-               "0:                                             \n"
-               "       orcc            gr0,gr0,gr0,icc3        \n"     /* set ICC3.Z */
-               "       ckeq            icc3,cc7                \n"
-               "       ld.p            %M0,%1                  \n"     /* LD.P/ORCR are atomic */
-               "       orcr            cc7,cc7,cc3             \n"     /* set CC3 to true */
-               "       xor%I3          %1,%3,%2                \n"
-               "       cst.p           %2,%M0          ,cc3,#1 \n"     /* if store happens... */
-               "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     /* ... clear ICC3.Z */
-               "       beq             icc3,#0,0b              \n"
-               : "+U"(*v), "=&r"(old), "=r"(tmp)
-               : "NPr"(mask)
-               : "memory", "cc7", "cc3", "icc3"
-               );
-
-       return old;
-}
-
-#else
-
-extern unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v);
-extern unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v);
-extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v);
-
-#endif
-
-#define atomic_clear_mask(mask, v)     atomic_test_and_ANDNOT_mask((mask), (v))
-#define atomic_set_mask(mask, v)       atomic_test_and_OR_mask((mask), (v))
-
-static inline int test_and_clear_bit(int nr, volatile void *addr)
-{
-       volatile unsigned long *ptr = addr;
-       unsigned long mask = 1UL << (nr & 31);
-       ptr += nr >> 5;
-       return (atomic_test_and_ANDNOT_mask(mask, ptr) & mask) != 0;
-}
-
-static inline int test_and_set_bit(int nr, volatile void *addr)
-{
-       volatile unsigned long *ptr = addr;
-       unsigned long mask = 1UL << (nr & 31);
-       ptr += nr >> 5;
-       return (atomic_test_and_OR_mask(mask, ptr) & mask) != 0;
-}
-
-static inline int test_and_change_bit(int nr, volatile void *addr)
-{
-       volatile unsigned long *ptr = addr;
-       unsigned long mask = 1UL << (nr & 31);
-       ptr += nr >> 5;
-       return (atomic_test_and_XOR_mask(mask, ptr) & mask) != 0;
-}
-
-static inline void clear_bit(int nr, volatile void *addr)
-{
-       test_and_clear_bit(nr, addr);
-}
-
-static inline void set_bit(int nr, volatile void *addr)
-{
-       test_and_set_bit(nr, addr);
-}
-
-static inline void change_bit(int nr, volatile void * addr)
-{
-       test_and_change_bit(nr, addr);
-}
-
-static inline void __clear_bit(int nr, volatile void * addr)
-{
-       volatile unsigned long *a = addr;
-       int mask;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 31);
-       *a &= ~mask;
-}
-
-static inline void __set_bit(int nr, volatile void * addr)
-{
-       volatile unsigned long *a = addr;
-       int mask;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 31);
-       *a |= mask;
-}
-
-static inline void __change_bit(int nr, volatile void *addr)
-{
-       volatile unsigned long *a = addr;
-       int mask;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 31);
-       *a ^= mask;
-}
-
-static inline int __test_and_clear_bit(int nr, volatile void * addr)
-{
-       volatile unsigned long *a = addr;
-       int mask, retval;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 31);
-       retval = (mask & *a) != 0;
-       *a &= ~mask;
-       return retval;
-}
-
-static inline int __test_and_set_bit(int nr, volatile void * addr)
-{
-       volatile unsigned long *a = addr;
-       int mask, retval;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 31);
-       retval = (mask & *a) != 0;
-       *a |= mask;
-       return retval;
-}
-
-static inline int __test_and_change_bit(int nr, volatile void * addr)
-{
-       volatile unsigned long *a = addr;
-       int mask, retval;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 31);
-       retval = (mask & *a) != 0;
-       *a ^= mask;
-       return retval;
-}
-
-/*
- * This routine doesn't need to be atomic.
- */
-static inline int __constant_test_bit(int nr, const volatile void * addr)
-{
-       return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
-}
-
-static inline int __test_bit(int nr, const volatile void * addr)
-{
-       int     * a = (int *) addr;
-       int     mask;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 0x1f);
-       return ((mask & *a) != 0);
-}
-
-#define test_bit(nr,addr) \
-(__builtin_constant_p(nr) ? \
- __constant_test_bit((nr),(addr)) : \
- __test_bit((nr),(addr)))
-
-#include <asm-generic/bitops/find.h>
-
-/**
- * fls - find last bit set
- * @x: the word to search
- *
- * This is defined the same way as ffs:
- * - return 32..1 to indicate bit 31..0 most significant bit set
- * - return 0 to indicate no bits set
- */
-#define fls(x)                                         \
-({                                                     \
-       int bit;                                        \
-                                                       \
-       asm("   subcc   %1,gr0,gr0,icc0         \n"     \
-           "   ckne    icc0,cc4                \n"     \
-           "   cscan.p %1,gr0,%0       ,cc4,#1 \n"     \
-           "   csub    %0,%0,%0        ,cc4,#0 \n"     \
-           "   csub    %2,%0,%0        ,cc4,#1 \n"     \
-           : "=&r"(bit)                                \
-           : "r"(x), "r"(32)                           \
-           : "icc0", "cc4"                             \
-           );                                          \
-                                                       \
-       bit;                                            \
-})
-
-/**
- * fls64 - find last bit set in a 64-bit value
- * @n: the value to search
- *
- * This is defined the same way as ffs:
- * - return 64..1 to indicate bit 63..0 most significant bit set
- * - return 0 to indicate no bits set
- */
-static inline __attribute__((const))
-int fls64(u64 n)
-{
-       union {
-               u64 ll;
-               struct { u32 h, l; };
-       } _;
-       int bit, x, y;
-
-       _.ll = n;
-
-       asm("   subcc.p         %3,gr0,gr0,icc0         \n"
-           "   subcc           %4,gr0,gr0,icc1         \n"
-           "   ckne            icc0,cc4                \n"
-           "   ckne            icc1,cc5                \n"
-           "   norcr           cc4,cc5,cc6             \n"
-           "   csub.p          %0,%0,%0        ,cc6,1  \n"
-           "   orcr            cc5,cc4,cc4             \n"
-           "   andcr           cc4,cc5,cc4             \n"
-           "   cscan.p         %3,gr0,%0       ,cc4,0  \n"
-           "   setlos          #64,%1                  \n"
-           "   cscan.p         %4,gr0,%0       ,cc4,1  \n"
-           "   setlos          #32,%2                  \n"
-           "   csub.p          %1,%0,%0        ,cc4,0  \n"
-           "   csub            %2,%0,%0        ,cc4,1  \n"
-           : "=&r"(bit), "=r"(x), "=r"(y)
-           : "0r"(_.h), "r"(_.l)
-           : "icc0", "icc1", "cc4", "cc5", "cc6"
-           );
-       return bit;
-
-}
-
-/**
- * ffs - find first bit set
- * @x: the word to search
- *
- * - return 32..1 to indicate bit 31..0 most least significant bit set
- * - return 0 to indicate no bits set
- */
-static inline __attribute__((const))
-int ffs(int x)
-{
-       /* Note: (x & -x) gives us a mask that is the least significant
-        * (rightmost) 1-bit of the value in x.
-        */
-       return fls(x & -x);
-}
-
-/**
- * __ffs - find first bit set
- * @x: the word to search
- *
- * - return 31..0 to indicate bit 31..0 most least significant bit set
- * - if no bits are set in x, the result is undefined
- */
-static inline __attribute__((const))
-int __ffs(unsigned long x)
-{
-       int bit;
-       asm("scan %1,gr0,%0" : "=r"(bit) : "r"(x & -x));
-       return 31 - bit;
-}
-
-/**
- * __fls - find last (most-significant) set bit in a long word
- * @word: the word to search
- *
- * Undefined if no set bit exists, so code should check against 0 first.
- */
-static inline unsigned long __fls(unsigned long word)
-{
-       unsigned long bit;
-       asm("scan %1,gr0,%0" : "=r"(bit) : "r"(word));
-       return bit;
-}
-
-/*
- * special slimline version of fls() for calculating ilog2_u32()
- * - note: no protection against n == 0
- */
-#define ARCH_HAS_ILOG2_U32
-static inline __attribute__((const))
-int __ilog2_u32(u32 n)
-{
-       int bit;
-       asm("scan %1,gr0,%0" : "=r"(bit) : "r"(n));
-       return 31 - bit;
-}
-
-/*
- * special slimline version of fls64() for calculating ilog2_u64()
- * - note: no protection against n == 0
- */
-#define ARCH_HAS_ILOG2_U64
-static inline __attribute__((const))
-int __ilog2_u64(u64 n)
-{
-       union {
-               u64 ll;
-               struct { u32 h, l; };
-       } _;
-       int bit, x, y;
-
-       _.ll = n;
-
-       asm("   subcc           %3,gr0,gr0,icc0         \n"
-           "   ckeq            icc0,cc4                \n"
-           "   cscan.p         %3,gr0,%0       ,cc4,0  \n"
-           "   setlos          #63,%1                  \n"
-           "   cscan.p         %4,gr0,%0       ,cc4,1  \n"
-           "   setlos          #31,%2                  \n"
-           "   csub.p          %1,%0,%0        ,cc4,0  \n"
-           "   csub            %2,%0,%0        ,cc4,1  \n"
-           : "=&r"(bit), "=r"(x), "=r"(y)
-           : "0r"(_.h), "r"(_.l)
-           : "icc0", "cc4"
-           );
-       return bit;
-}
-
-#include <asm-generic/bitops/sched.h>
-#include <asm-generic/bitops/hweight.h>
-#include <asm-generic/bitops/lock.h>
-
-#include <asm-generic/bitops/ext2-non-atomic.h>
-
-#define ext2_set_bit_atomic(lock,nr,addr)      test_and_set_bit  ((nr) ^ 0x18, (addr))
-#define ext2_clear_bit_atomic(lock,nr,addr)    test_and_clear_bit((nr) ^ 0x18, (addr))
-
-#include <asm-generic/bitops/minix-le.h>
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_BITOPS_H */
diff --git a/include/asm-frv/bug.h b/include/asm-frv/bug.h
deleted file mode 100644 (file)
index 6b1b44d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* bug.h: FRV bug trapping
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_BUG_H
-#define _ASM_BUG_H
-
-#include <linux/linkage.h>
-
-#ifdef CONFIG_BUG
-/*
- * Tell the user there is some problem.
- */
-extern asmlinkage void __debug_bug_trap(int signr);
-
-#ifdef CONFIG_NO_KERNEL_MSG
-#define        _debug_bug_printk()
-#else
-extern void __debug_bug_printk(const char *file, unsigned line);
-#define        _debug_bug_printk() __debug_bug_printk(__FILE__, __LINE__)
-#endif
-
-#define _debug_bug_trap(signr)                 \
-do {                                           \
-       __debug_bug_trap(signr);                \
-       asm volatile("nop");                    \
-} while(0)
-
-#define HAVE_ARCH_BUG
-#define BUG()                                  \
-do {                                           \
-       _debug_bug_printk();                    \
-       _debug_bug_trap(6 /*SIGABRT*/);         \
-} while (0)
-
-#ifdef CONFIG_GDBSTUB
-#define HAVE_ARCH_KGDB_RAISE
-#define kgdb_raise(signr) do { _debug_bug_trap(signr); } while(0)
-
-#define HAVE_ARCH_KGDB_BAD_PAGE
-#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
-#endif
-#endif
-
-#include <asm-generic/bug.h>
-
-#endif
diff --git a/include/asm-frv/bugs.h b/include/asm-frv/bugs.h
deleted file mode 100644 (file)
index f2382be..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* bugs.h: arch bug checking entry
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-static inline void check_bugs(void)
-{
-}
diff --git a/include/asm-frv/busctl-regs.h b/include/asm-frv/busctl-regs.h
deleted file mode 100644 (file)
index bb0ff48..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* busctl-regs.h: FR400-series CPU bus controller registers
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_BUSCTL_REGS_H
-#define _ASM_BUSCTL_REGS_H
-
-/* bus controller registers */
-#define __get_LGCR()   ({ *(volatile unsigned long *)(0xfe000010); })
-#define __get_LMAICR() ({ *(volatile unsigned long *)(0xfe000030); })
-#define __get_LEMBR()  ({ *(volatile unsigned long *)(0xfe000040); })
-#define __get_LEMAM()  ({ *(volatile unsigned long *)(0xfe000048); })
-#define __get_LCR(R)   ({ *(volatile unsigned long *)(0xfe000100 + 8*(R)); })
-#define __get_LSBR(R)  ({ *(volatile unsigned long *)(0xfe000c00 + 8*(R)); })
-#define __get_LSAM(R)  ({ *(volatile unsigned long *)(0xfe000d00 + 8*(R)); })
-
-#define __set_LGCR(V)  do { *(volatile unsigned long *)(0xfe000010) = (V); } while(0)
-#define __set_LMAICR(V)        do { *(volatile unsigned long *)(0xfe000030) = (V); } while(0)
-#define __set_LEMBR(V) do { *(volatile unsigned long *)(0xfe000040) = (V); } while(0)
-#define __set_LEMAM(V) do { *(volatile unsigned long *)(0xfe000048) = (V); } while(0)
-#define __set_LCR(R,V) do { *(volatile unsigned long *)(0xfe000100 + 8*(R)) = (V); } while(0)
-#define __set_LSBR(R,V)        do { *(volatile unsigned long *)(0xfe000c00 + 8*(R)) = (V); } while(0)
-#define __set_LSAM(R,V)        do { *(volatile unsigned long *)(0xfe000d00 + 8*(R)) = (V); } while(0)
-
-/* FR401 SDRAM controller registers */
-#define __get_DBR(R)   ({ *(volatile unsigned long *)(0xfe000e00 + 8*(R)); })
-#define __get_DAM(R)   ({ *(volatile unsigned long *)(0xfe000f00 + 8*(R)); })
-
-/* FR551 SDRAM controller registers */
-#define __get_DARS(R)  ({ *(volatile unsigned long *)(0xfeff0100 + 8*(R)); })
-#define __get_DAMK(R)  ({ *(volatile unsigned long *)(0xfeff0110 + 8*(R)); })
-
-
-#endif /* _ASM_BUSCTL_REGS_H */
diff --git a/include/asm-frv/byteorder.h b/include/asm-frv/byteorder.h
deleted file mode 100644 (file)
index f29b759..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_BYTEORDER_H
-#define _ASM_BYTEORDER_H
-
-#include <linux/byteorder/big_endian.h>
-
-#endif /* _ASM_BYTEORDER_H */
diff --git a/include/asm-frv/cache.h b/include/asm-frv/cache.h
deleted file mode 100644 (file)
index 2797163..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* cache.h: FRV cache definitions
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef __ASM_CACHE_H
-#define __ASM_CACHE_H
-
-
-/* bytes per L1 cache line */
-#define L1_CACHE_SHIFT         (CONFIG_FRV_L1_CACHE_SHIFT)
-#define L1_CACHE_BYTES         (1 << L1_CACHE_SHIFT)
-
-#define __cacheline_aligned    __attribute__((aligned(L1_CACHE_BYTES)))
-#define ____cacheline_aligned  __attribute__((aligned(L1_CACHE_BYTES)))
-
-#endif
diff --git a/include/asm-frv/cacheflush.h b/include/asm-frv/cacheflush.h
deleted file mode 100644 (file)
index 432a69e..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/* cacheflush.h: FRV cache flushing routines
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_CACHEFLUSH_H
-#define _ASM_CACHEFLUSH_H
-
-/* Keep includes the same across arches.  */
-#include <linux/mm.h>
-
-/*
- * virtually-indexed cache management (our cache is physically indexed)
- */
-#define flush_cache_all()                      do {} while(0)
-#define flush_cache_mm(mm)                     do {} while(0)
-#define flush_cache_dup_mm(mm)                 do {} while(0)
-#define flush_cache_range(mm, start, end)      do {} while(0)
-#define flush_cache_page(vma, vmaddr, pfn)     do {} while(0)
-#define flush_cache_vmap(start, end)           do {} while(0)
-#define flush_cache_vunmap(start, end)         do {} while(0)
-#define flush_dcache_mmap_lock(mapping)                do {} while(0)
-#define flush_dcache_mmap_unlock(mapping)      do {} while(0)
-
-/*
- * physically-indexed cache management
- * - see arch/frv/lib/cache.S
- */
-extern void frv_dcache_writeback(unsigned long start, unsigned long size);
-extern void frv_cache_invalidate(unsigned long start, unsigned long size);
-extern void frv_icache_invalidate(unsigned long start, unsigned long size);
-extern void frv_cache_wback_inv(unsigned long start, unsigned long size);
-
-static inline void __flush_cache_all(void)
-{
-       asm volatile("  dcef    @(gr0,gr0),#1   \n"
-                    "  icei    @(gr0,gr0),#1   \n"
-                    "  membar                  \n"
-                    : : : "memory"
-                    );
-}
-
-/* dcache/icache coherency... */
-#ifdef CONFIG_MMU
-extern void flush_dcache_page(struct page *page);
-#else
-static inline void flush_dcache_page(struct page *page)
-{
-       unsigned long addr = page_to_phys(page);
-       frv_dcache_writeback(addr, addr + PAGE_SIZE);
-}
-#endif
-
-static inline void flush_page_to_ram(struct page *page)
-{
-       flush_dcache_page(page);
-}
-
-static inline void flush_icache(void)
-{
-       __flush_cache_all();
-}
-
-static inline void flush_icache_range(unsigned long start, unsigned long end)
-{
-       frv_cache_wback_inv(start, end);
-}
-
-#ifdef CONFIG_MMU
-extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
-                                   unsigned long start, unsigned long len);
-#else
-static inline void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
-                                          unsigned long start, unsigned long len)
-{
-       frv_cache_wback_inv(start, start + len);
-}
-#endif
-
-static inline void flush_icache_page(struct vm_area_struct *vma, struct page *page)
-{
-       flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE);
-}
-
-/*
- * permit ptrace to access another process's address space through the icache
- * and the dcache
- */
-#define copy_to_user_page(vma, page, vaddr, dst, src, len)     \
-do {                                                           \
-       memcpy((dst), (src), (len));                            \
-       flush_icache_user_range((vma), (page), (vaddr), (len)); \
-} while(0)
-
-#define copy_from_user_page(vma, page, vaddr, dst, src, len)   \
-       memcpy((dst), (src), (len))
-
-#endif /* _ASM_CACHEFLUSH_H */
diff --git a/include/asm-frv/checksum.h b/include/asm-frv/checksum.h
deleted file mode 100644 (file)
index 269da09..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/* checksum.h: FRV checksumming
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_CHECKSUM_H
-#define _ASM_CHECKSUM_H
-
-#include <linux/in6.h>
-
-/*
- * computes the checksum of a memory block at buff, length len,
- * and adds in "sum" (32-bit)
- *
- * returns a 32-bit number suitable for feeding into itself
- * or csum_tcpudp_magic
- *
- * this function must be called with even lengths, except
- * for the last fragment, which may be odd
- *
- * it's best to have buff aligned on a 32-bit boundary
- */
-__wsum csum_partial(const void *buff, int len, __wsum sum);
-
-/*
- * the same as csum_partial, but copies from src while it
- * checksums
- *
- * here even more important to align src and dst on a 32-bit (or even
- * better 64-bit) boundary
- */
-__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
-
-/*
- * the same as csum_partial_copy, but copies from user space.
- *
- * here even more important to align src and dst on a 32-bit (or even
- * better 64-bit) boundary
- */
-extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
-                                               int len, __wsum sum, int *csum_err);
-
-/*
- *     This is a version of ip_compute_csum() optimized for IP headers,
- *     which always checksum on 4 octet boundaries.
- *
- */
-static inline
-__sum16 ip_fast_csum(const void *iph, unsigned int ihl)
-{
-       unsigned int tmp, inc, sum = 0;
-
-       asm("   addcc           gr0,gr0,gr0,icc0\n" /* clear icc0.C */
-           "   subi            %1,#4,%1        \n"
-           "0:                                 \n"
-           "   ldu.p           @(%1,%3),%4     \n"
-           "   subicc          %2,#1,%2,icc1   \n"
-           "   addxcc.p        %4,%0,%0,icc0   \n"
-           "   bhi             icc1,#2,0b      \n"
-
-           /* fold the 33-bit result into 16-bits */
-           "   addxcc          gr0,%0,%0,icc0  \n"
-           "   srli            %0,#16,%1       \n"
-           "   sethi           #0,%0           \n"
-           "   add             %1,%0,%0        \n"
-           "   srli            %0,#16,%1       \n"
-           "   add             %1,%0,%0        \n"
-
-           : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp)
-           : "0" (sum), "1" (iph), "2" (ihl), "3" (4),
-           "m"(*(volatile struct { int _[100]; } *)iph)
-           : "icc0", "icc1", "memory"
-           );
-
-       return (__force __sum16)~sum;
-}
-
-/*
- *     Fold a partial checksum
- */
-static inline __sum16 csum_fold(__wsum sum)
-{
-       unsigned int tmp;
-
-       asm("   srli            %0,#16,%1       \n"
-           "   sethi           #0,%0           \n"
-           "   add             %1,%0,%0        \n"
-           "   srli            %0,#16,%1       \n"
-           "   add             %1,%0,%0        \n"
-           : "=r"(sum), "=&r"(tmp)
-           : "0"(sum)
-           );
-
-       return (__force __sum16)~sum;
-}
-
-/*
- * computes the checksum of the TCP/UDP pseudo-header
- * returns a 16-bit checksum, already complemented
- */
-static inline __wsum
-csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
-                 unsigned short proto, __wsum sum)
-{
-       asm("   addcc           %1,%0,%0,icc0   \n"
-           "   addxcc          %2,%0,%0,icc0   \n"
-           "   addxcc          %3,%0,%0,icc0   \n"
-           "   addxcc          gr0,%0,%0,icc0  \n"
-           : "=r" (sum)
-           : "r" (daddr), "r" (saddr), "r" (len + proto), "0"(sum)
-           : "icc0"
-           );
-       return sum;
-}
-
-static inline __sum16
-csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
-                 unsigned short proto, __wsum sum)
-{
-       return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
-}
-
-/*
- * this routine is used for miscellaneous IP-like checksums, mainly
- * in icmp.c
- */
-extern __sum16 ip_compute_csum(const void *buff, int len);
-
-#define _HAVE_ARCH_IPV6_CSUM
-static inline __sum16
-csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
-               __u32 len, unsigned short proto, __wsum sum)
-{
-       unsigned long tmp, tmp2;
-
-       asm("   addcc           %2,%0,%0,icc0   \n"
-
-           /* add up the source addr */
-           "   ldi             @(%3,0),%1      \n"
-           "   addxcc          %1,%0,%0,icc0   \n"
-           "   ldi             @(%3,4),%2      \n"
-           "   addxcc          %2,%0,%0,icc0   \n"
-           "   ldi             @(%3,8),%1      \n"
-           "   addxcc          %1,%0,%0,icc0   \n"
-           "   ldi             @(%3,12),%2     \n"
-           "   addxcc          %2,%0,%0,icc0   \n"
-
-           /* add up the dest addr */
-           "   ldi             @(%4,0),%1      \n"
-           "   addxcc          %1,%0,%0,icc0   \n"
-           "   ldi             @(%4,4),%2      \n"
-           "   addxcc          %2,%0,%0,icc0   \n"
-           "   ldi             @(%4,8),%1      \n"
-           "   addxcc          %1,%0,%0,icc0   \n"
-           "   ldi             @(%4,12),%2     \n"
-           "   addxcc          %2,%0,%0,icc0   \n"
-
-           /* fold the 33-bit result into 16-bits */
-           "   addxcc          gr0,%0,%0,icc0  \n"
-           "   srli            %0,#16,%1       \n"
-           "   sethi           #0,%0           \n"
-           "   add             %1,%0,%0        \n"
-           "   srli            %0,#16,%1       \n"
-           "   add             %1,%0,%0        \n"
-
-           : "=r" (sum), "=&r" (tmp), "=r" (tmp2)
-           : "r" (saddr), "r" (daddr), "0" (sum), "2" (len + proto)
-           : "icc0"
-           );
-
-       return (__force __sum16)~sum;
-}
-
-#endif /* _ASM_CHECKSUM_H */
diff --git a/include/asm-frv/cpu-irqs.h b/include/asm-frv/cpu-irqs.h
deleted file mode 100644 (file)
index 478f349..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* cpu-irqs.h: on-CPU peripheral irqs
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_CPU_IRQS_H
-#define _ASM_CPU_IRQS_H
-
-#ifndef __ASSEMBLY__
-
-/* IRQ to level mappings */
-#define IRQ_GDBSTUB_LEVEL      15
-#define IRQ_UART_LEVEL         13
-
-#ifdef CONFIG_GDBSTUB_UART0
-#define IRQ_UART0_LEVEL                IRQ_GDBSTUB_LEVEL
-#else
-#define IRQ_UART0_LEVEL                IRQ_UART_LEVEL
-#endif
-
-#ifdef CONFIG_GDBSTUB_UART1
-#define IRQ_UART1_LEVEL                IRQ_GDBSTUB_LEVEL
-#else
-#define IRQ_UART1_LEVEL                IRQ_UART_LEVEL
-#endif
-
-#define IRQ_DMA0_LEVEL         14
-#define IRQ_DMA1_LEVEL         14
-#define IRQ_DMA2_LEVEL         14
-#define IRQ_DMA3_LEVEL         14
-#define IRQ_DMA4_LEVEL         14
-#define IRQ_DMA5_LEVEL         14
-#define IRQ_DMA6_LEVEL         14
-#define IRQ_DMA7_LEVEL         14
-
-#define IRQ_TIMER0_LEVEL       12
-#define IRQ_TIMER1_LEVEL       11
-#define IRQ_TIMER2_LEVEL       10
-
-#define IRQ_XIRQ0_LEVEL                1
-#define IRQ_XIRQ1_LEVEL                2
-#define IRQ_XIRQ2_LEVEL                3
-#define IRQ_XIRQ3_LEVEL                4
-#define IRQ_XIRQ4_LEVEL                5
-#define IRQ_XIRQ5_LEVEL                6
-#define IRQ_XIRQ6_LEVEL                7
-#define IRQ_XIRQ7_LEVEL                8
-
-/* IRQ IDs presented to drivers */
-#define IRQ_CPU__UNUSED                IRQ_BASE_CPU
-#define IRQ_CPU_UART0          (IRQ_BASE_CPU + IRQ_UART0_LEVEL)
-#define IRQ_CPU_UART1          (IRQ_BASE_CPU + IRQ_UART1_LEVEL)
-#define IRQ_CPU_TIMER0         (IRQ_BASE_CPU + IRQ_TIMER0_LEVEL)
-#define IRQ_CPU_TIMER1         (IRQ_BASE_CPU + IRQ_TIMER1_LEVEL)
-#define IRQ_CPU_TIMER2         (IRQ_BASE_CPU + IRQ_TIMER2_LEVEL)
-#define IRQ_CPU_DMA0           (IRQ_BASE_CPU + IRQ_DMA0_LEVEL)
-#define IRQ_CPU_DMA1           (IRQ_BASE_CPU + IRQ_DMA1_LEVEL)
-#define IRQ_CPU_DMA2           (IRQ_BASE_CPU + IRQ_DMA2_LEVEL)
-#define IRQ_CPU_DMA3           (IRQ_BASE_CPU + IRQ_DMA3_LEVEL)
-#define IRQ_CPU_DMA4           (IRQ_BASE_CPU + IRQ_DMA4_LEVEL)
-#define IRQ_CPU_DMA5           (IRQ_BASE_CPU + IRQ_DMA5_LEVEL)
-#define IRQ_CPU_DMA6           (IRQ_BASE_CPU + IRQ_DMA6_LEVEL)
-#define IRQ_CPU_DMA7           (IRQ_BASE_CPU + IRQ_DMA7_LEVEL)
-#define IRQ_CPU_EXTERNAL0      (IRQ_BASE_CPU + IRQ_XIRQ0_LEVEL)
-#define IRQ_CPU_EXTERNAL1      (IRQ_BASE_CPU + IRQ_XIRQ1_LEVEL)
-#define IRQ_CPU_EXTERNAL2      (IRQ_BASE_CPU + IRQ_XIRQ2_LEVEL)
-#define IRQ_CPU_EXTERNAL3      (IRQ_BASE_CPU + IRQ_XIRQ3_LEVEL)
-#define IRQ_CPU_EXTERNAL4      (IRQ_BASE_CPU + IRQ_XIRQ4_LEVEL)
-#define IRQ_CPU_EXTERNAL5      (IRQ_BASE_CPU + IRQ_XIRQ5_LEVEL)
-#define IRQ_CPU_EXTERNAL6      (IRQ_BASE_CPU + IRQ_XIRQ6_LEVEL)
-#define IRQ_CPU_EXTERNAL7      (IRQ_BASE_CPU + IRQ_XIRQ7_LEVEL)
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_CPU_IRQS_H */
diff --git a/include/asm-frv/cpumask.h b/include/asm-frv/cpumask.h
deleted file mode 100644 (file)
index d999c20..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_CPUMASK_H
-#define _ASM_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _ASM_CPUMASK_H */
diff --git a/include/asm-frv/cputime.h b/include/asm-frv/cputime.h
deleted file mode 100644 (file)
index f6c373a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_CPUTIME_H
-#define _ASM_CPUTIME_H
-
-#include <asm-generic/cputime.h>
-
-#endif /* _ASM_CPUTIME_H */
diff --git a/include/asm-frv/current.h b/include/asm-frv/current.h
deleted file mode 100644 (file)
index 86b0274..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* current.h: FRV current task pointer
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_CURRENT_H
-#define _ASM_CURRENT_H
-
-#ifndef __ASSEMBLY__
-
-/*
- * dedicate GR29 to keeping the current task pointer
- */
-register struct task_struct *current asm("gr29");
-
-#define get_current() current
-
-#else
-
-#define CURRENT gr29
-
-#endif
-
-#endif /* _ASM_CURRENT_H */
diff --git a/include/asm-frv/delay.h b/include/asm-frv/delay.h
deleted file mode 100644 (file)
index 597b4eb..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* delay.h: FRV delay code
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_DELAY_H
-#define _ASM_DELAY_H
-
-#include <asm/param.h>
-#include <asm/timer-regs.h>
-
-/*
- * delay loop - runs at __core_clock_speed_HZ / 2 [there are 2 insns in the loop]
- */
-extern unsigned long __delay_loops_MHz;
-
-static inline void __delay(unsigned long loops)
-{
-       asm volatile("1:        subicc  %0,#1,%0,icc0   \n"
-                    "          bnc     icc0,#2,1b      \n"
-                    : "=r" (loops)
-                    : "0" (loops)
-                    : "icc0"
-                    );
-}
-
-/*
- * Use only for very small delays ( < 1 msec).  Should probably use a
- * lookup table, really, as the multiplications take much too long with
- * short delays.  This is a "reasonable" implementation, though (and the
- * first constant multiplications gets optimized away if the delay is
- * a constant)
- */
-
-extern unsigned long loops_per_jiffy;
-
-static inline void udelay(unsigned long usecs)
-{
-       __delay(usecs * __delay_loops_MHz);
-}
-
-#define ndelay(n)      udelay((n) * 5)
-
-#endif /* _ASM_DELAY_H */
diff --git a/include/asm-frv/device.h b/include/asm-frv/device.h
deleted file mode 100644 (file)
index d8f9872..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Arch specific extensions to struct device
- *
- * This file is released under the GPLv2
- */
-#include <asm-generic/device.h>
-
diff --git a/include/asm-frv/div64.h b/include/asm-frv/div64.h
deleted file mode 100644 (file)
index 6cd978c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/div64.h>
diff --git a/include/asm-frv/dm9000.h b/include/asm-frv/dm9000.h
deleted file mode 100644 (file)
index f6f48fd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* dm9000.h: Davicom DM9000 adapter configuration
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_DM9000_H
-#define _ASM_DM9000_H
-
-#include <asm/mb-regs.h>
-
-#define DM9000_ARCH_IOBASE     (__region_CS6 + 0x300)
-#define DM9000_ARCH_IRQ                IRQ_CPU_EXTERNAL3       /* XIRQ #3 (shared with FPGA) */
-#undef DM9000_ARCH_IRQ_ACTLOW                          /* IRQ pin active high */
-#define DM9000_ARCH_BUS_INFO   "CS6#+0x300"            /* bus info for ethtool */
-
-#undef __is_PCI_IO
-#define __is_PCI_IO(addr)      0       /* not PCI */
-
-#undef inl
-#define inl(addr)                                                                              \
-({                                                                                             \
-       unsigned long __ioaddr = (unsigned long) addr;                                          \
-       uint32_t x = readl(__ioaddr);                                                           \
-       ((x & 0xff) << 24) | ((x & 0xff00) << 8) | ((x >> 8) & 0xff00) | ((x >> 24) & 0xff);    \
-})
-
-#undef insl
-#define insl(a,b,l)    __insl(a,b,l,0) /* don't byte-swap */
-
-
-#endif /* _ASM_DM9000_H */
diff --git a/include/asm-frv/dma-mapping.h b/include/asm-frv/dma-mapping.h
deleted file mode 100644 (file)
index b289887..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-#ifndef _ASM_DMA_MAPPING_H
-#define _ASM_DMA_MAPPING_H
-
-#include <linux/device.h>
-#include <asm/cache.h>
-#include <asm/cacheflush.h>
-#include <asm/scatterlist.h>
-#include <asm/io.h>
-
-#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
-#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
-
-extern unsigned long __nongprelbss dma_coherent_mem_start;
-extern unsigned long __nongprelbss dma_coherent_mem_end;
-
-void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp);
-void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle);
-
-/*
- * Map a single buffer of the indicated size for DMA in streaming mode.
- * The 32-bit bus address to use is returned.
- *
- * Once the device is given the dma address, the device owns this memory
- * until either pci_unmap_single or pci_dma_sync_single is performed.
- */
-extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
-                                enum dma_data_direction direction);
-
-/*
- * Unmap a single streaming mode DMA translation.  The dma_addr and size
- * must match what was provided for in a previous pci_map_single call.  All
- * other usages are undefined.
- *
- * After this call, reads by the cpu to the buffer are guarenteed to see
- * whatever the device wrote there.
- */
-static inline
-void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                     enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-/*
- * Map a set of buffers described by scatterlist in streaming
- * mode for DMA.  This is the scather-gather version of the
- * above pci_map_single interface.  Here the scatter gather list
- * elements are each tagged with the appropriate dma address
- * and length.  They are obtained via sg_dma_{address,length}(SG).
- *
- * NOTE: An implementation may be able to use a smaller number of
- *       DMA address/length pairs than there are SG table elements.
- *       (for example via virtual mapping capabilities)
- *       The routine returns the number of addr/length pairs actually
- *       used, at most nents.
- *
- * Device ownership issues as mentioned above for pci_map_single are
- * the same here.
- */
-extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-                     enum dma_data_direction direction);
-
-/*
- * Unmap a set of streaming mode DMA translations.
- * Again, cpu read rules concerning calls here are the same as for
- * pci_unmap_single() above.
- */
-static inline
-void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-            enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-extern
-dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset,
-                       size_t size, enum dma_data_direction direction);
-
-static inline
-void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-                   enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-
-static inline
-void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
-                            enum dma_data_direction direction)
-{
-}
-
-static inline
-void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
-                               enum dma_data_direction direction)
-{
-       flush_write_buffers();
-}
-
-static inline
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
-                                  unsigned long offset, size_t size,
-                                  enum dma_data_direction direction)
-{
-}
-
-static inline
-void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
-                                     unsigned long offset, size_t size,
-                                     enum dma_data_direction direction)
-{
-       flush_write_buffers();
-}
-
-static inline
-void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-                        enum dma_data_direction direction)
-{
-}
-
-static inline
-void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
-                           enum dma_data_direction direction)
-{
-       flush_write_buffers();
-}
-
-static inline
-int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
-{
-       return 0;
-}
-
-static inline
-int dma_supported(struct device *dev, u64 mask)
-{
-        /*
-         * we fall back to GFP_DMA when the mask isn't all 1s,
-         * so we can't guarantee allocations that must be
-         * within a tighter range than GFP_DMA..
-         */
-        if (mask < 0x00ffffff)
-                return 0;
-
-       return 1;
-}
-
-static inline
-int dma_set_mask(struct device *dev, u64 mask)
-{
-       if (!dev->dma_mask || !dma_supported(dev, mask))
-               return -EIO;
-
-       *dev->dma_mask = mask;
-
-       return 0;
-}
-
-static inline
-int dma_get_cache_alignment(void)
-{
-       return 1 << L1_CACHE_SHIFT;
-}
-
-#define dma_is_consistent(d, h)        (1)
-
-static inline
-void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
-                   enum dma_data_direction direction)
-{
-       flush_write_buffers();
-}
-
-#endif  /* _ASM_DMA_MAPPING_H */
diff --git a/include/asm-frv/dma.h b/include/asm-frv/dma.h
deleted file mode 100644 (file)
index 683c47d..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/* dma.h: FRV DMA controller management
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_DMA_H
-#define _ASM_DMA_H
-
-//#define DMA_DEBUG 1
-
-#include <linux/interrupt.h>
-
-#undef MAX_DMA_CHANNELS                /* don't use kernel/dma.c */
-
-/* under 2.4 this is actually needed by the new bootmem allocator */
-#define MAX_DMA_ADDRESS                PAGE_OFFSET
-
-/*
- * FRV DMA controller management
- */
-typedef irqreturn_t (*dma_irq_handler_t)(int dmachan, unsigned long cstr, void *data);
-
-extern void frv_dma_init(void);
-
-extern int frv_dma_open(const char *devname,
-                       unsigned long dmamask,
-                       int dmacap,
-                       dma_irq_handler_t handler,
-                       unsigned long irq_flags,
-                       void *data);
-
-/* channels required */
-#define FRV_DMA_MASK_ANY       ULONG_MAX       /* any channel */
-
-/* capabilities required */
-#define FRV_DMA_CAP_DREQ       0x01            /* DMA request pin */
-#define FRV_DMA_CAP_DACK       0x02            /* DMA ACK pin */
-#define FRV_DMA_CAP_DONE       0x04            /* DMA done pin */
-
-extern void frv_dma_close(int dma);
-
-extern void frv_dma_config(int dma, unsigned long ccfr, unsigned long cctr, unsigned long apr);
-
-extern void frv_dma_start(int dma,
-                         unsigned long sba, unsigned long dba,
-                         unsigned long pix, unsigned long six, unsigned long bcl);
-
-extern void frv_dma_restart_circular(int dma, unsigned long six);
-
-extern void frv_dma_stop(int dma);
-
-extern int is_frv_dma_interrupting(int dma);
-
-extern void frv_dma_dump(int dma);
-
-extern void frv_dma_status_clear(int dma);
-
-#define FRV_DMA_NCHANS 8
-#define FRV_DMA_4CHANS 4
-#define FRV_DMA_8CHANS 8
-
-#define DMAC_CCFRx             0x00    /* channel configuration reg */
-#define DMAC_CCFRx_CM_SHIFT    16
-#define DMAC_CCFRx_CM_DA       0x00000000
-#define DMAC_CCFRx_CM_SCA      0x00010000
-#define DMAC_CCFRx_CM_DCA      0x00020000
-#define DMAC_CCFRx_CM_2D       0x00030000
-#define DMAC_CCFRx_ATS_SHIFT   8
-#define DMAC_CCFRx_RS_INTERN   0x00000000
-#define DMAC_CCFRx_RS_EXTERN   0x00000001
-#define DMAC_CCFRx_RS_SHIFT    0
-
-#define DMAC_CSTRx             0x08    /* channel status reg */
-#define DMAC_CSTRx_FS          0x0000003f
-#define DMAC_CSTRx_NE          0x00000100
-#define DMAC_CSTRx_FED         0x00000200
-#define DMAC_CSTRx_WER         0x00000800
-#define DMAC_CSTRx_RER         0x00001000
-#define DMAC_CSTRx_CE          0x00002000
-#define DMAC_CSTRx_INT         0x00800000
-#define DMAC_CSTRx_BUSY                0x80000000
-
-#define DMAC_CCTRx             0x10    /* channel control reg */
-#define DMAC_CCTRx_DSIZ_1      0x00000000
-#define DMAC_CCTRx_DSIZ_2      0x00000001
-#define DMAC_CCTRx_DSIZ_4      0x00000002
-#define DMAC_CCTRx_DSIZ_32     0x00000005
-#define DMAC_CCTRx_DAU_HOLD    0x00000000
-#define DMAC_CCTRx_DAU_INC     0x00000010
-#define DMAC_CCTRx_DAU_DEC     0x00000020
-#define DMAC_CCTRx_SSIZ_1      0x00000000
-#define DMAC_CCTRx_SSIZ_2      0x00000100
-#define DMAC_CCTRx_SSIZ_4      0x00000200
-#define DMAC_CCTRx_SSIZ_32     0x00000500
-#define DMAC_CCTRx_SAU_HOLD    0x00000000
-#define DMAC_CCTRx_SAU_INC     0x00001000
-#define DMAC_CCTRx_SAU_DEC     0x00002000
-#define DMAC_CCTRx_FC          0x08000000
-#define DMAC_CCTRx_ICE         0x10000000
-#define DMAC_CCTRx_IE          0x40000000
-#define DMAC_CCTRx_ACT         0x80000000
-
-#define DMAC_SBAx              0x18    /* source base address reg */
-#define DMAC_DBAx              0x20    /* data base address reg */
-#define DMAC_PIXx              0x28    /* primary index reg */
-#define DMAC_SIXx              0x30    /* secondary index reg */
-#define DMAC_BCLx              0x38    /* byte count limit reg */
-#define DMAC_APRx              0x40    /* alternate pointer reg */
-
-/*
- * required for PCI + MODULES
- */
-#ifdef CONFIG_PCI
-extern int isa_dma_bridge_buggy;
-#else
-#define isa_dma_bridge_buggy   (0)
-#endif
-
-#endif /* _ASM_DMA_H */
diff --git a/include/asm-frv/elf.h b/include/asm-frv/elf.h
deleted file mode 100644 (file)
index 7279ec0..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/* elf.h: FR-V ELF definitions
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * - Derived from include/asm-m68knommu/elf.h
- *
- * 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.
- */
-#ifndef __ASM_ELF_H
-#define __ASM_ELF_H
-
-#include <asm/ptrace.h>
-#include <asm/user.h>
-
-struct elf32_hdr;
-
-/*
- * ELF header e_flags defines.
- */
-#define EF_FRV_GPR_MASK         0x00000003 /* mask for # of gprs */
-#define EF_FRV_GPR32           0x00000001 /* Only uses GR on 32-register */
-#define EF_FRV_GPR64           0x00000002 /* Only uses GR on 64-register */
-#define EF_FRV_FPR_MASK         0x0000000c /* mask for # of fprs */
-#define EF_FRV_FPR32           0x00000004 /* Only uses FR on 32-register */
-#define EF_FRV_FPR64           0x00000008 /* Only uses FR on 64-register */
-#define EF_FRV_FPR_NONE                0x0000000C /* Uses software floating-point */
-#define EF_FRV_DWORD_MASK       0x00000030 /* mask for dword support */
-#define EF_FRV_DWORD_YES       0x00000010 /* Assumes stack aligned to 8-byte boundaries. */
-#define EF_FRV_DWORD_NO                0x00000020 /* Assumes stack aligned to 4-byte boundaries. */
-#define EF_FRV_DOUBLE          0x00000040 /* Uses double instructions. */
-#define EF_FRV_MEDIA           0x00000080 /* Uses media instructions. */
-#define EF_FRV_PIC             0x00000100 /* Uses position independent code. */
-#define EF_FRV_NON_PIC_RELOCS  0x00000200 /* Does not use position Independent code. */
-#define EF_FRV_MULADD           0x00000400 /* -mmuladd */
-#define EF_FRV_BIGPIC           0x00000800 /* -fPIC */
-#define EF_FRV_LIBPIC           0x00001000 /* -mlibrary-pic */
-#define EF_FRV_G0               0x00002000 /* -G 0, no small data ptr */
-#define EF_FRV_NOPACK           0x00004000 /* -mnopack */
-#define EF_FRV_FDPIC            0x00008000 /* -mfdpic */
-#define EF_FRV_CPU_MASK         0xff000000 /* specific cpu bits */
-#define EF_FRV_CPU_GENERIC     0x00000000 /* Set CPU type is FR-V */
-#define EF_FRV_CPU_FR500       0x01000000 /* Set CPU type is FR500 */
-#define EF_FRV_CPU_FR300       0x02000000 /* Set CPU type is FR300 */
-#define EF_FRV_CPU_SIMPLE       0x03000000 /* SIMPLE */
-#define EF_FRV_CPU_TOMCAT       0x04000000 /* Tomcat, FR500 prototype */
-#define EF_FRV_CPU_FR400       0x05000000 /* Set CPU type is FR400 */
-#define EF_FRV_CPU_FR550        0x06000000 /* Set CPU type is FR550 */
-#define EF_FRV_CPU_FR405       0x07000000 /* Set CPU type is FR405 */
-#define EF_FRV_CPU_FR450       0x08000000 /* Set CPU type is FR450 */
-
-/*
- * FR-V ELF relocation types
- */
-
-
-/*
- * ELF register definitions..
- */
-typedef unsigned long elf_greg_t;
-
-#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-typedef struct user_fpmedia_regs elf_fpregset_t;
-
-/*
- * This is used to ensure we don't load something for the wrong architecture.
- */
-extern int elf_check_arch(const struct elf32_hdr *hdr);
-
-#define elf_check_fdpic(x) ((x)->e_flags & EF_FRV_FDPIC && !((x)->e_flags & EF_FRV_NON_PIC_RELOCS))
-#define elf_check_const_displacement(x) ((x)->e_flags & EF_FRV_PIC)
-
-/*
- * These are used to set parameters in the core dumps.
- */
-#define ELF_CLASS      ELFCLASS32
-#define ELF_DATA       ELFDATA2MSB
-#define ELF_ARCH       EM_FRV
-
-#define ELF_PLAT_INIT(_r)                      \
-do {                                           \
-       __kernel_frame0_ptr->gr16       = 0;    \
-       __kernel_frame0_ptr->gr17       = 0;    \
-       __kernel_frame0_ptr->gr18       = 0;    \
-       __kernel_frame0_ptr->gr19       = 0;    \
-       __kernel_frame0_ptr->gr20       = 0;    \
-       __kernel_frame0_ptr->gr21       = 0;    \
-       __kernel_frame0_ptr->gr22       = 0;    \
-       __kernel_frame0_ptr->gr23       = 0;    \
-       __kernel_frame0_ptr->gr24       = 0;    \
-       __kernel_frame0_ptr->gr25       = 0;    \
-       __kernel_frame0_ptr->gr26       = 0;    \
-       __kernel_frame0_ptr->gr27       = 0;    \
-       __kernel_frame0_ptr->gr29       = 0;    \
-} while(0)
-
-#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map_addr, _interp_map_addr, _dynamic_addr)    \
-do {                                                                                   \
-       __kernel_frame0_ptr->gr16       = _exec_map_addr;                               \
-       __kernel_frame0_ptr->gr17       = _interp_map_addr;                             \
-       __kernel_frame0_ptr->gr18       = _dynamic_addr;                                \
-       __kernel_frame0_ptr->gr19       = 0;                                            \
-       __kernel_frame0_ptr->gr20       = 0;                                            \
-       __kernel_frame0_ptr->gr21       = 0;                                            \
-       __kernel_frame0_ptr->gr22       = 0;                                            \
-       __kernel_frame0_ptr->gr23       = 0;                                            \
-       __kernel_frame0_ptr->gr24       = 0;                                            \
-       __kernel_frame0_ptr->gr25       = 0;                                            \
-       __kernel_frame0_ptr->gr26       = 0;                                            \
-       __kernel_frame0_ptr->gr27       = 0;                                            \
-       __kernel_frame0_ptr->gr29       = 0;                                            \
-} while(0)
-
-#define USE_ELF_CORE_DUMP
-#define ELF_FDPIC_CORE_EFLAGS  EF_FRV_FDPIC
-#define ELF_EXEC_PAGESIZE      16384
-
-/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
-   use of this is to invoke "./ld.so someprog" to test out a new version of
-   the loader.  We need to make sure that it is out of the way of the program
-   that it will "exec", and that there is sufficient room for the brk.  */
-
-#define ELF_ET_DYN_BASE         0x08000000UL
-
-/* This yields a mask that user programs can use to figure out what
-   instruction set this cpu supports.  */
-
-#define ELF_HWCAP      (0)
-
-/* This yields a string that ld.so will use to load implementation
-   specific libraries for optimization.  This is more specific in
-   intent than poking at uname or /proc/cpuinfo.  */
-
-#define ELF_PLATFORM  (NULL)
-
-#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
-
-#endif
diff --git a/include/asm-frv/emergency-restart.h b/include/asm-frv/emergency-restart.h
deleted file mode 100644 (file)
index 108d8c4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_EMERGENCY_RESTART_H
-#define _ASM_EMERGENCY_RESTART_H
-
-#include <asm-generic/emergency-restart.h>
-
-#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-frv/errno.h b/include/asm-frv/errno.h
deleted file mode 100644 (file)
index d010795..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_ERRNO_H
-#define _ASM_ERRNO_H
-
-#include <asm-generic/errno.h>
-
-#endif /* _ASM_ERRNO_H */
-
diff --git a/include/asm-frv/fb.h b/include/asm-frv/fb.h
deleted file mode 100644 (file)
index c7df380..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-#include <linux/fb.h>
-
-#define fb_pgprotect(...) do {} while (0)
-
-static inline int fb_is_primary_device(struct fb_info *info)
-{
-       return 0;
-}
-
-#endif /* _ASM_FB_H_ */
diff --git a/include/asm-frv/fcntl.h b/include/asm-frv/fcntl.h
deleted file mode 100644 (file)
index 46ab12d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/fcntl.h>
diff --git a/include/asm-frv/fpu.h b/include/asm-frv/fpu.h
deleted file mode 100644 (file)
index d73c60b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __ASM_FPU_H
-#define __ASM_FPU_H
-
-
-/*
- * MAX floating point unit state size (FSAVE/FRESTORE)
- */
-
-#define kernel_fpu_end() do { asm volatile("bar":::"memory"); preempt_enable(); } while(0)
-
-#endif /* __ASM_FPU_H */
diff --git a/include/asm-frv/ftrace.h b/include/asm-frv/ftrace.h
deleted file mode 100644 (file)
index 40a8c17..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/include/asm-frv/futex.h b/include/asm-frv/futex.h
deleted file mode 100644 (file)
index 08b3d1d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _ASM_FUTEX_H
-#define _ASM_FUTEX_H
-
-#ifdef __KERNEL__
-
-#include <linux/futex.h>
-#include <asm/errno.h>
-#include <asm/uaccess.h>
-
-extern int futex_atomic_op_inuser(int encoded_op, int __user *uaddr);
-
-static inline int
-futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
-{
-       return -ENOSYS;
-}
-
-#endif
-#endif
diff --git a/include/asm-frv/gdb-stub.h b/include/asm-frv/gdb-stub.h
deleted file mode 100644 (file)
index 24f9738..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/* gdb-stub.h: FRV GDB stub
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * - Derived from asm-mips/gdb-stub.h (c) 1995 Andreas Busse
- *
- * 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.
- */
-#ifndef __ASM_GDB_STUB_H
-#define __ASM_GDB_STUB_H
-
-#undef GDBSTUB_DEBUG_PROTOCOL
-
-#include <asm/ptrace.h>
-
-/*
- * important register numbers in GDB protocol
- * - GR0,  GR1,  GR2,  GR3,  GR4,  GR5,  GR6,  GR7,
- * - GR8,  GR9,  GR10, GR11, GR12, GR13, GR14, GR15,
- * - GR16, GR17, GR18, GR19, GR20, GR21, GR22, GR23,
- * - GR24, GR25, GR26, GR27, GR28, GR29, GR30, GR31,
- * - GR32, GR33, GR34, GR35, GR36, GR37, GR38, GR39,
- * - GR40, GR41, GR42, GR43, GR44, GR45, GR46, GR47,
- * - GR48, GR49, GR50, GR51, GR52, GR53, GR54, GR55,
- * - GR56, GR57, GR58, GR59, GR60, GR61, GR62, GR63,
- * - FR0,  FR1,  FR2,  FR3,  FR4,  FR5,  FR6,  FR7,
- * - FR8,  FR9,  FR10, FR11, FR12, FR13, FR14, FR15,
- * - FR16, FR17, FR18, FR19, FR20, FR21, FR22, FR23,
- * - FR24, FR25, FR26, FR27, FR28, FR29, FR30, FR31,
- * - FR32, FR33, FR34, FR35, FR36, FR37, FR38, FR39,
- * - FR40, FR41, FR42, FR43, FR44, FR45, FR46, FR47,
- * - FR48, FR49, FR50, FR51, FR52, FR53, FR54, FR55,
- * - FR56, FR57, FR58, FR59, FR60, FR61, FR62, FR63,
- * - PC, PSR, CCR, CCCR,
- * - _X132, _X133, _X134
- * - TBR, BRR, DBAR0, DBAR1, DBAR2, DBAR3,
- * - SCR0, SCR1, SCR2, SCR3,
- * - LR, LCR,
- * - IACC0H, IACC0L,
- * - FSR0,
- * - ACC0, ACC1, ACC2, ACC3, ACC4, ACC5, ACC6, ACC7,
- * - ACCG0123, ACCG4567,
- * - MSR0, MSR1,
- * - GNER0, GNER1,
- * - FNER0, FNER1,
- */
-#define GDB_REG_GR(N)  (N)
-#define GDB_REG_FR(N)  (64+(N))
-#define GDB_REG_PC     128
-#define GDB_REG_PSR    129
-#define GDB_REG_CCR    130
-#define GDB_REG_CCCR   131
-#define GDB_REG_TBR    135
-#define GDB_REG_BRR    136
-#define GDB_REG_DBAR(N)        (137+(N))
-#define GDB_REG_SCR(N) (141+(N))
-#define GDB_REG_LR     145
-#define GDB_REG_LCR    146
-#define GDB_REG_FSR0   149
-#define GDB_REG_ACC(N) (150+(N))
-#define GDB_REG_ACCG(N)        (158+(N)/4)
-#define GDB_REG_MSR(N) (160+(N))
-#define GDB_REG_GNER(N)        (162+(N))
-#define GDB_REG_FNER(N)        (164+(N))
-
-#define GDB_REG_SP     GDB_REG_GR(1)
-#define GDB_REG_FP     GDB_REG_GR(2)
-
-#ifndef _LANGUAGE_ASSEMBLY
-
-/*
- * Prototypes
- */
-extern void show_registers_only(struct pt_regs *regs);
-
-extern void gdbstub_init(void);
-extern void gdbstub(int type);
-extern void gdbstub_exit(int status);
-
-extern void gdbstub_io_init(void);
-extern void gdbstub_set_baud(unsigned baud);
-extern int gdbstub_rx_char(unsigned char *_ch, int nonblock);
-extern void gdbstub_tx_char(unsigned char ch);
-extern void gdbstub_tx_flush(void);
-extern void gdbstub_do_rx(void);
-
-extern asmlinkage void __debug_stub_init_break(void);
-extern asmlinkage void __break_hijack_kernel_event(void);
-extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
-extern asmlinkage void start_kernel(void);
-
-extern asmlinkage void gdbstub_rx_handler(void);
-extern asmlinkage void gdbstub_rx_irq(void);
-extern asmlinkage void gdbstub_intercept(void);
-
-extern uint32_t __entry_usertrap_table[];
-extern uint32_t __entry_kerneltrap_table[];
-
-extern volatile u8     gdbstub_rx_buffer[PAGE_SIZE];
-extern volatile u32    gdbstub_rx_inp;
-extern volatile u32    gdbstub_rx_outp;
-extern volatile u8     gdbstub_rx_overflow;
-extern u8              gdbstub_rx_unget;
-
-extern void gdbstub_printk(const char *fmt, ...);
-extern void debug_to_serial(const char *p, int n);
-extern void console_set_baud(unsigned baud);
-
-#ifdef GDBSTUB_DEBUG_PROTOCOL
-#define gdbstub_proto(FMT,...) gdbstub_printk(FMT,##__VA_ARGS__)
-#else
-#define gdbstub_proto(FMT,...) ({ 0; })
-#endif
-
-/*
- * we dedicate GR31 to keeping a pointer to the gdbstub exception frame
- * - gr31 is destroyed on entry to the gdbstub if !MMU
- * - gr31 is saved in scr3 on entry to the gdbstub if in !MMU
- */
-register struct frv_frame0 *__debug_frame0 asm("gr31");
-
-#define __debug_frame          (&__debug_frame0->regs)
-#define __debug_user_context   (&__debug_frame0->uc)
-#define __debug_regs           (&__debug_frame0->debug)
-#define __debug_reg(X)         ((unsigned long *) ((unsigned long) &__debug_frame0 + (X)))
-
-struct frv_debug_status {
-       unsigned long           bpsr;
-       unsigned long           dcr;
-       unsigned long           brr;
-       unsigned long           nmar;
-};
-
-extern struct frv_debug_status __debug_status;
-
-#endif /* _LANGUAGE_ASSEMBLY */
-#endif /* __ASM_GDB_STUB_H */
diff --git a/include/asm-frv/gpio-regs.h b/include/asm-frv/gpio-regs.h
deleted file mode 100644 (file)
index 9edf5d5..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/* gpio-regs.h: on-chip general purpose I/O registers
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_GPIO_REGS
-#define _ASM_GPIO_REGS
-
-#define __reg(ADDR) (*(volatile unsigned long *)(ADDR))
-
-#define __get_PDR()    ({ __reg(0xfeff0400); })
-#define __set_PDR(V)   do { __reg(0xfeff0400) = (V); mb(); } while(0)
-
-#define __get_GPDR()   ({ __reg(0xfeff0408); })
-#define __set_GPDR(V)  do { __reg(0xfeff0408) = (V); mb(); } while(0)
-
-#define __get_SIR()    ({ __reg(0xfeff0410); })
-#define __set_SIR(V)   do { __reg(0xfeff0410) = (V); mb(); } while(0)
-
-#define __get_SOR()    ({ __reg(0xfeff0418); })
-#define __set_SOR(V)   do { __reg(0xfeff0418) = (V); mb(); } while(0)
-
-#define __set_PDSR(V)  do { __reg(0xfeff0420) = (V); mb(); } while(0)
-
-#define __set_PDCR(V)  do { __reg(0xfeff0428) = (V); mb(); } while(0)
-
-#define __get_RSTR()   ({ __reg(0xfeff0500); })
-#define __set_RSTR(V)  do { __reg(0xfeff0500) = (V); mb(); } while(0)
-
-
-
-/* PDR definitions */
-#define PDR_GPIO_DATA(X)       (1 << (X))
-
-/* GPDR definitions */
-#define GPDR_INPUT             0
-#define GPDR_OUTPUT            1
-#define GPDR_DREQ0_BIT         0x00001000
-#define GPDR_DREQ1_BIT         0x00008000
-#define GPDR_DREQ2_BIT         0x00040000
-#define GPDR_DREQ3_BIT         0x00080000
-#define GPDR_DREQ4_BIT         0x00004000
-#define GPDR_DREQ5_BIT         0x00020000
-#define GPDR_DREQ6_BIT         0x00100000
-#define GPDR_DREQ7_BIT         0x00200000
-#define GPDR_DACK0_BIT         0x00002000
-#define GPDR_DACK1_BIT         0x00010000
-#define GPDR_DACK2_BIT         0x00100000
-#define GPDR_DACK3_BIT         0x00200000
-#define GPDR_DONE0_BIT         0x00004000
-#define GPDR_DONE1_BIT         0x00020000
-#define GPDR_GPIO_DIR(X,D)     ((D) << (X))
-
-/* SIR definitions */
-#define SIR_GPIO_INPUT         0
-#define SIR_DREQ7_INPUT                0x00200000
-#define SIR_DREQ6_INPUT                0x00100000
-#define SIR_DREQ3_INPUT                0x00080000
-#define SIR_DREQ2_INPUT                0x00040000
-#define SIR_DREQ5_INPUT                0x00020000
-#define SIR_DREQ1_INPUT                0x00008000
-#define SIR_DREQ4_INPUT                0x00004000
-#define SIR_DREQ0_INPUT                0x00001000
-#define SIR_RXD1_INPUT         0x00000400
-#define SIR_CTS0_INPUT         0x00000100
-#define SIR_RXD0_INPUT         0x00000040
-#define SIR_GATE1_INPUT                0x00000020
-#define SIR_GATE0_INPUT                0x00000010
-#define SIR_IRQ3_INPUT         0x00000008
-#define SIR_IRQ2_INPUT         0x00000004
-#define SIR_IRQ1_INPUT         0x00000002
-#define SIR_IRQ0_INPUT         0x00000001
-#define SIR_DREQ_BITS          (SIR_DREQ0_INPUT | SIR_DREQ1_INPUT | \
-                                SIR_DREQ2_INPUT | SIR_DREQ3_INPUT | \
-                                SIR_DREQ4_INPUT | SIR_DREQ5_INPUT | \
-                                SIR_DREQ6_INPUT | SIR_DREQ7_INPUT)
-
-/* SOR definitions */
-#define SOR_GPIO_OUTPUT                0
-#define SOR_DACK3_OUTPUT       0x00200000
-#define SOR_DACK2_OUTPUT       0x00100000
-#define SOR_DONE1_OUTPUT       0x00020000
-#define SOR_DACK1_OUTPUT       0x00010000
-#define SOR_DONE0_OUTPUT       0x00004000
-#define SOR_DACK0_OUTPUT       0x00002000
-#define SOR_TXD1_OUTPUT                0x00000800
-#define SOR_RTS0_OUTPUT                0x00000200
-#define SOR_TXD0_OUTPUT                0x00000080
-#define SOR_TOUT1_OUTPUT       0x00000020
-#define SOR_TOUT0_OUTPUT       0x00000010
-#define SOR_DONE_BITS          (SOR_DONE0_OUTPUT | SOR_DONE1_OUTPUT)
-#define SOR_DACK_BITS          (SOR_DACK0_OUTPUT | SOR_DACK1_OUTPUT | \
-                                SOR_DACK2_OUTPUT | SOR_DACK3_OUTPUT)
-
-/* PDSR definitions */
-#define PDSR_UNCHANGED         0
-#define PDSR_SET_BIT(X)                (1 << (X))
-
-/* PDCR definitions */
-#define PDCR_UNCHANGED         0
-#define PDCR_CLEAR_BIT(X)      (1 << (X))
-
-/* RSTR definitions */
-/* Read Only */
-#define RSTR_POWERON           0x00000400
-#define RSTR_SOFTRESET_STATUS  0x00000100
-/* Write Only */
-#define RSTR_SOFTRESET         0x00000001
-
-#endif /* _ASM_GPIO_REGS */
diff --git a/include/asm-frv/hardirq.h b/include/asm-frv/hardirq.h
deleted file mode 100644 (file)
index fc47515..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* hardirq.h: FRV hardware IRQ management
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef __ASM_HARDIRQ_H
-#define __ASM_HARDIRQ_H
-
-#include <linux/threads.h>
-#include <linux/irq.h>
-
-typedef struct {
-       unsigned int __softirq_pending;
-       unsigned long idle_timestamp;
-} ____cacheline_aligned irq_cpustat_t;
-
-#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
-
-#ifdef CONFIG_SMP
-#error SMP not available on FR-V
-#endif /* CONFIG_SMP */
-
-extern atomic_t irq_err_count;
-static inline void ack_bad_irq(int irq)
-{
-       atomic_inc(&irq_err_count);
-}
-
-#endif
diff --git a/include/asm-frv/highmem.h b/include/asm-frv/highmem.h
deleted file mode 100644 (file)
index 68e4677..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/* highmem.h: virtual kernel memory mappings for high memory
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * - Derived from include/asm-i386/highmem.h
- *
- * See Documentation/frv/mmu-layout.txt for more information.
- *
- * 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.
- */
-
-#ifndef _ASM_HIGHMEM_H
-#define _ASM_HIGHMEM_H
-
-#ifdef __KERNEL__
-
-#include <linux/init.h>
-#include <linux/highmem.h>
-#include <asm/mem-layout.h>
-#include <asm/spr-regs.h>
-#include <asm/mb-regs.h>
-
-#define NR_TLB_LINES           64      /* number of lines in the TLB */
-
-#ifndef __ASSEMBLY__
-
-#include <linux/interrupt.h>
-#include <asm/kmap_types.h>
-#include <asm/pgtable.h>
-
-#ifdef CONFIG_DEBUG_HIGHMEM
-#define HIGHMEM_DEBUG 1
-#else
-#define HIGHMEM_DEBUG 0
-#endif
-
-/* declarations for highmem.c */
-extern unsigned long highstart_pfn, highend_pfn;
-
-#define kmap_prot PAGE_KERNEL
-#define kmap_pte ______kmap_pte_in_TLB
-extern pte_t *pkmap_page_table;
-
-#define flush_cache_kmaps()  do { } while (0)
-
-/*
- * Right now we initialize only a single pte table. It can be extended
- * easily, subsequent pte tables have to be allocated in one physical
- * chunk of RAM.
- */
-#define LAST_PKMAP     PTRS_PER_PTE
-#define LAST_PKMAP_MASK        (LAST_PKMAP - 1)
-#define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)
-#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
-
-extern void *kmap_high(struct page *page);
-extern void kunmap_high(struct page *page);
-
-extern void *kmap(struct page *page);
-extern void kunmap(struct page *page);
-
-extern struct page *kmap_atomic_to_page(void *ptr);
-
-#endif /* !__ASSEMBLY__ */
-
-/*
- * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap
- * gives a more generic (and caching) interface. But kmap_atomic can
- * be used in IRQ contexts, so in some (very limited) cases we need
- * it.
- */
-#define KMAP_ATOMIC_CACHE_DAMR         8
-
-#ifndef __ASSEMBLY__
-
-#define __kmap_atomic_primary(type, paddr, ampr)                                               \
-({                                                                                             \
-       unsigned long damlr, dampr;                                                             \
-                                                                                               \
-       dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V;             \
-                                                                                               \
-       if (type != __KM_CACHE)                                                                 \
-               asm volatile("movgs %0,dampr"#ampr :: "r"(dampr) : "memory");                   \
-       else                                                                                    \
-               asm volatile("movgs %0,iampr"#ampr"\n"                                          \
-                            "movgs %0,dampr"#ampr"\n"                                          \
-                            :: "r"(dampr) : "memory"                                           \
-                            );                                                                 \
-                                                                                               \
-       asm("movsg damlr"#ampr",%0" : "=r"(damlr));                                             \
-                                                                                               \
-       /*printk("DAMR"#ampr": PRIM sl=%d L=%08lx P=%08lx\n", type, damlr, dampr);*/            \
-                                                                                               \
-       (void *) damlr;                                                                         \
-})
-
-#define __kmap_atomic_secondary(slot, paddr)                                                     \
-({                                                                                               \
-       unsigned long damlr = KMAP_ATOMIC_SECONDARY_FRAME + (slot) * PAGE_SIZE;                   \
-       unsigned long dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V; \
-                                                                                                 \
-       asm volatile("movgs %0,tplr \n"                                                           \
-                    "movgs %1,tppr \n"                                                           \
-                    "tlbpr %0,gr0,#2,#1"                                                         \
-                    : : "r"(damlr), "r"(dampr) : "memory");                                      \
-                                                                                                 \
-       /*printk("TLB: SECN sl=%d L=%08lx P=%08lx\n", slot, damlr, dampr);*/                      \
-                                                                                                 \
-       (void *) damlr;                                                                           \
-})
-
-static inline void *kmap_atomic(struct page *page, enum km_type type)
-{
-       unsigned long paddr;
-
-       pagefault_disable();
-       debug_kmap_atomic(type);
-       paddr = page_to_phys(page);
-
-       switch (type) {
-        case 0:                return __kmap_atomic_primary(0, paddr, 2);
-        case 1:                return __kmap_atomic_primary(1, paddr, 3);
-        case 2:                return __kmap_atomic_primary(2, paddr, 4);
-        case 3:                return __kmap_atomic_primary(3, paddr, 5);
-        case 4:                return __kmap_atomic_primary(4, paddr, 6);
-        case 5:                return __kmap_atomic_primary(5, paddr, 7);
-        case 6:                return __kmap_atomic_primary(6, paddr, 8);
-        case 7:                return __kmap_atomic_primary(7, paddr, 9);
-        case 8:                return __kmap_atomic_primary(8, paddr, 10);
-
-       case 9 ... 9 + NR_TLB_LINES - 1:
-               return __kmap_atomic_secondary(type - 9, paddr);
-
-       default:
-               BUG();
-               return NULL;
-       }
-}
-
-#define __kunmap_atomic_primary(type, ampr)                            \
-do {                                                                   \
-       asm volatile("movgs gr0,dampr"#ampr"\n" ::: "memory");          \
-       if (type == __KM_CACHE)                                         \
-               asm volatile("movgs gr0,iampr"#ampr"\n" ::: "memory");  \
-} while(0)
-
-#define __kunmap_atomic_secondary(slot, vaddr)                         \
-do {                                                                   \
-       asm volatile("tlbpr %0,gr0,#4,#1" : : "r"(vaddr) : "memory");   \
-} while(0)
-
-static inline void kunmap_atomic(void *kvaddr, enum km_type type)
-{
-       switch (type) {
-        case 0:                __kunmap_atomic_primary(0, 2);  break;
-        case 1:                __kunmap_atomic_primary(1, 3);  break;
-        case 2:                __kunmap_atomic_primary(2, 4);  break;
-        case 3:                __kunmap_atomic_primary(3, 5);  break;
-        case 4:                __kunmap_atomic_primary(4, 6);  break;
-        case 5:                __kunmap_atomic_primary(5, 7);  break;
-        case 6:                __kunmap_atomic_primary(6, 8);  break;
-        case 7:                __kunmap_atomic_primary(7, 9);  break;
-        case 8:                __kunmap_atomic_primary(8, 10); break;
-
-       case 9 ... 9 + NR_TLB_LINES - 1:
-               __kunmap_atomic_secondary(type - 9, kvaddr);
-               break;
-
-       default:
-               BUG();
-       }
-       pagefault_enable();
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_HIGHMEM_H */
diff --git a/include/asm-frv/hw_irq.h b/include/asm-frv/hw_irq.h
deleted file mode 100644 (file)
index 522ad37..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* hw_irq.h: FR-V specific h/w IRQ stuff
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_HW_IRQ_H
-#define _ASM_HW_IRQ_H
-
-
-#endif /* _ASM_HW_IRQ_H */
diff --git a/include/asm-frv/init.h b/include/asm-frv/init.h
deleted file mode 100644 (file)
index 8b15838..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_INIT_H
-#define _ASM_INIT_H
-
-#define __init __attribute__ ((__section__ (".text.init")))
-#define __initdata __attribute__ ((__section__ (".data.init")))
-/* For assembly routines */
-#define __INIT         .section        ".text.init",#alloc,#execinstr
-#define __FINIT                .previous
-#define __INITDATA     .section        ".data.init",#alloc,#write
-
-#endif
-
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h
deleted file mode 100644 (file)
index ca7475e..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-/* io.h: FRV I/O operations
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- *
- * This gets interesting when talking to the PCI bus - the CPU is in big endian
- * mode, the PCI bus is little endian and the hardware in the middle can do
- * byte swapping
- */
-#ifndef _ASM_IO_H
-#define _ASM_IO_H
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <asm/virtconvert.h>
-#include <asm/string.h>
-#include <asm/mb-regs.h>
-#include <linux/delay.h>
-
-/*
- * swap functions are sometimes needed to interface little-endian hardware
- */
-
-static inline unsigned short _swapw(unsigned short v)
-{
-    return ((v << 8) | (v >> 8));
-}
-
-static inline unsigned long _swapl(unsigned long v)
-{
-    return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24));
-}
-
-//#define __iormb() asm volatile("membar")
-//#define __iowmb() asm volatile("membar")
-
-#define __raw_readb __builtin_read8
-#define __raw_readw __builtin_read16
-#define __raw_readl __builtin_read32
-
-#define __raw_writeb(datum, addr) __builtin_write8(addr, datum)
-#define __raw_writew(datum, addr) __builtin_write16(addr, datum)
-#define __raw_writel(datum, addr) __builtin_write32(addr, datum)
-
-static inline void io_outsb(unsigned int addr, const void *buf, int len)
-{
-       unsigned long __ioaddr = (unsigned long) addr;
-       const uint8_t *bp = buf;
-
-       while (len--)
-               __builtin_write8((volatile void __iomem *) __ioaddr, *bp++);
-}
-
-static inline void io_outsw(unsigned int addr, const void *buf, int len)
-{
-       unsigned long __ioaddr = (unsigned long) addr;
-       const uint16_t *bp = buf;
-
-       while (len--)
-               __builtin_write16((volatile void __iomem *) __ioaddr, (*bp++));
-}
-
-extern void __outsl_ns(unsigned int addr, const void *buf, int len);
-extern void __outsl_sw(unsigned int addr, const void *buf, int len);
-static inline void __outsl(unsigned int addr, const void *buf, int len, int swap)
-{
-       unsigned long __ioaddr = (unsigned long) addr;
-
-       if (!swap)
-               __outsl_ns(__ioaddr, buf, len);
-       else
-               __outsl_sw(__ioaddr, buf, len);
-}
-
-static inline void io_insb(unsigned long addr, void *buf, int len)
-{
-       uint8_t *bp = buf;
-
-       while (len--)
-               *bp++ = __builtin_read8((volatile void __iomem *) addr);
-}
-
-static inline void io_insw(unsigned long addr, void *buf, int len)
-{
-       uint16_t *bp = buf;
-
-       while (len--)
-               *bp++ = __builtin_read16((volatile void __iomem *) addr);
-}
-
-extern void __insl_ns(unsigned long addr, void *buf, int len);
-extern void __insl_sw(unsigned long addr, void *buf, int len);
-static inline void __insl(unsigned long addr, void *buf, int len, int swap)
-{
-       if (!swap)
-               __insl_ns(addr, buf, len);
-       else
-               __insl_sw(addr, buf, len);
-}
-
-#define mmiowb() mb()
-
-/*
- *     make the short names macros so specific devices
- *     can override them as required
- */
-
-static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count)
-{
-       memset((void __force *) addr, val, count);
-}
-
-static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
-{
-       memcpy(dst, (void __force *) src, count);
-}
-
-static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int count)
-{
-       memcpy((void __force *) dst, src, count);
-}
-
-static inline uint8_t inb(unsigned long addr)
-{
-       return __builtin_read8((void __iomem *)addr);
-}
-
-static inline uint16_t inw(unsigned long addr)
-{
-       uint16_t ret = __builtin_read16((void __iomem *)addr);
-
-       if (__is_PCI_IO(addr))
-               ret = _swapw(ret);
-
-       return ret;
-}
-
-static inline uint32_t inl(unsigned long addr)
-{
-       uint32_t ret = __builtin_read32((void __iomem *)addr);
-
-       if (__is_PCI_IO(addr))
-               ret = _swapl(ret);
-
-       return ret;
-}
-
-static inline void outb(uint8_t datum, unsigned long addr)
-{
-       __builtin_write8((void __iomem *)addr, datum);
-}
-
-static inline void outw(uint16_t datum, unsigned long addr)
-{
-       if (__is_PCI_IO(addr))
-               datum = _swapw(datum);
-       __builtin_write16((void __iomem *)addr, datum);
-}
-
-static inline void outl(uint32_t datum, unsigned long addr)
-{
-       if (__is_PCI_IO(addr))
-               datum = _swapl(datum);
-       __builtin_write32((void __iomem *)addr, datum);
-}
-
-#define inb_p(addr)    inb(addr)
-#define inw_p(addr)    inw(addr)
-#define inl_p(addr)    inl(addr)
-#define outb_p(x,addr) outb(x,addr)
-#define outw_p(x,addr) outw(x,addr)
-#define outl_p(x,addr) outl(x,addr)
-
-#define outsb(a,b,l)   io_outsb(a,b,l)
-#define outsw(a,b,l)   io_outsw(a,b,l)
-#define outsl(a,b,l)   __outsl(a,b,l,0)
-
-#define insb(a,b,l)    io_insb(a,b,l)
-#define insw(a,b,l)    io_insw(a,b,l)
-#define insl(a,b,l)    __insl(a,b,l,0)
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-static inline uint8_t readb(const volatile void __iomem *addr)
-{
-       return __builtin_read8((__force void volatile __iomem *) addr);
-}
-
-static inline uint16_t readw(const volatile void __iomem *addr)
-{
-       uint16_t ret =  __builtin_read16((__force void volatile __iomem *)addr);
-
-       if (__is_PCI_MEM(addr))
-               ret = _swapw(ret);
-       return ret;
-}
-
-static inline uint32_t readl(const volatile void __iomem *addr)
-{
-       uint32_t ret =  __builtin_read32((__force void volatile __iomem *)addr);
-
-       if (__is_PCI_MEM(addr))
-               ret = _swapl(ret);
-
-       return ret;
-}
-
-#define readb_relaxed readb
-#define readw_relaxed readw
-#define readl_relaxed readl
-
-static inline void writeb(uint8_t datum, volatile void __iomem *addr)
-{
-       __builtin_write8(addr, datum);
-       if (__is_PCI_MEM(addr))
-               __flush_PCI_writes();
-}
-
-static inline void writew(uint16_t datum, volatile void __iomem *addr)
-{
-       if (__is_PCI_MEM(addr))
-               datum = _swapw(datum);
-
-       __builtin_write16(addr, datum);
-       if (__is_PCI_MEM(addr))
-               __flush_PCI_writes();
-}
-
-static inline void writel(uint32_t datum, volatile void __iomem *addr)
-{
-       if (__is_PCI_MEM(addr))
-               datum = _swapl(datum);
-
-       __builtin_write32(addr, datum);
-       if (__is_PCI_MEM(addr))
-               __flush_PCI_writes();
-}
-
-
-/* Values for nocacheflag and cmode */
-#define IOMAP_FULL_CACHING             0
-#define IOMAP_NOCACHE_SER              1
-#define IOMAP_NOCACHE_NONSER           2
-#define IOMAP_WRITETHROUGH             3
-
-extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);
-
-static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
-{
-       return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
-}
-
-static inline void __iomem *ioremap_nocache(unsigned long physaddr, unsigned long size)
-{
-       return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
-}
-
-static inline void __iomem *ioremap_writethrough(unsigned long physaddr, unsigned long size)
-{
-       return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
-}
-
-static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned long size)
-{
-       return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
-}
-
-#define ioremap_wc ioremap_nocache
-
-extern void iounmap(void volatile __iomem *addr);
-
-static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
-{
-       return (void __iomem *) port;
-}
-
-static inline void ioport_unmap(void __iomem *p)
-{
-}
-
-static inline void flush_write_buffers(void)
-{
-       __asm__ __volatile__ ("membar" : : :"memory");
-}
-
-/*
- * do appropriate I/O accesses for token type
- */
-static inline unsigned int ioread8(void __iomem *p)
-{
-       return __builtin_read8(p);
-}
-
-static inline unsigned int ioread16(void __iomem *p)
-{
-       uint16_t ret = __builtin_read16(p);
-       if (__is_PCI_addr(p))
-               ret = _swapw(ret);
-       return ret;
-}
-
-static inline unsigned int ioread32(void __iomem *p)
-{
-       uint32_t ret = __builtin_read32(p);
-       if (__is_PCI_addr(p))
-               ret = _swapl(ret);
-       return ret;
-}
-
-static inline void iowrite8(u8 val, void __iomem *p)
-{
-       __builtin_write8(p, val);
-       if (__is_PCI_MEM(p))
-               __flush_PCI_writes();
-}
-
-static inline void iowrite16(u16 val, void __iomem *p)
-{
-       if (__is_PCI_addr(p))
-               val = _swapw(val);
-       __builtin_write16(p, val);
-       if (__is_PCI_MEM(p))
-               __flush_PCI_writes();
-}
-
-static inline void iowrite32(u32 val, void __iomem *p)
-{
-       if (__is_PCI_addr(p))
-               val = _swapl(val);
-       __builtin_write32(p, val);
-       if (__is_PCI_MEM(p))
-               __flush_PCI_writes();
-}
-
-static inline void ioread8_rep(void __iomem *p, void *dst, unsigned long count)
-{
-       io_insb((unsigned long) p, dst, count);
-}
-
-static inline void ioread16_rep(void __iomem *p, void *dst, unsigned long count)
-{
-       io_insw((unsigned long) p, dst, count);
-}
-
-static inline void ioread32_rep(void __iomem *p, void *dst, unsigned long count)
-{
-       __insl_ns((unsigned long) p, dst, count);
-}
-
-static inline void iowrite8_rep(void __iomem *p, const void *src, unsigned long count)
-{
-       io_outsb((unsigned long) p, src, count);
-}
-
-static inline void iowrite16_rep(void __iomem *p, const void *src, unsigned long count)
-{
-       io_outsw((unsigned long) p, src, count);
-}
-
-static inline void iowrite32_rep(void __iomem *p, const void *src, unsigned long count)
-{
-       __outsl_ns((unsigned long) p, src, count);
-}
-
-/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
-struct pci_dev;
-extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
-static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
-{
-}
-
-
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-
-/*
- * Convert a virtual cached pointer to an uncached pointer
- */
-#define xlate_dev_kmem_ptr(p)  p
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_IO_H */
diff --git a/include/asm-frv/ioctl.h b/include/asm-frv/ioctl.h
deleted file mode 100644 (file)
index b279fe0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ioctl.h>
diff --git a/include/asm-frv/ioctls.h b/include/asm-frv/ioctls.h
deleted file mode 100644 (file)
index d0c30e3..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef __ASM_IOCTLS_H__
-#define __ASM_IOCTLS_H__
-
-#include <asm/ioctl.h>
-
-/* 0x54 is just a magic number to make these relatively unique ('T') */
-
-#define TCGETS         0x5401
-#define TCSETS         0x5402
-#define TCSETSW                0x5403
-#define TCSETSF                0x5404
-#define TCGETA         0x5405
-#define TCSETA         0x5406
-#define TCSETAW                0x5407
-#define TCSETAF                0x5408
-#define TCSBRK         0x5409
-#define TCXONC         0x540A
-#define TCFLSH         0x540B
-#define TIOCEXCL       0x540C
-#define TIOCNXCL       0x540D
-#define TIOCSCTTY      0x540E
-#define TIOCGPGRP      0x540F
-#define TIOCSPGRP      0x5410
-#define TIOCOUTQ       0x5411
-#define TIOCSTI                0x5412
-#define TIOCGWINSZ     0x5413
-#define TIOCSWINSZ     0x5414
-#define TIOCMGET       0x5415
-#define TIOCMBIS       0x5416
-#define TIOCMBIC       0x5417
-#define TIOCMSET       0x5418
-#define TIOCGSOFTCAR   0x5419
-#define TIOCSSOFTCAR   0x541A
-#define FIONREAD       0x541B
-#define TIOCINQ                FIONREAD
-#define TIOCLINUX      0x541C
-#define TIOCCONS       0x541D
-#define TIOCGSERIAL    0x541E
-#define TIOCSSERIAL    0x541F
-#define TIOCPKT                0x5420
-#define FIONBIO                0x5421
-#define TIOCNOTTY      0x5422
-#define TIOCSETD       0x5423
-#define TIOCGETD       0x5424
-#define TCSBRKP                0x5425  /* Needed for POSIX tcsendbreak() */
-#define TIOCTTYGSTRUCT 0x5426  /* For debugging only */
-#define TIOCSBRK       0x5427  /* BSD compatibility */
-#define TIOCCBRK       0x5428  /* BSD compatibility */
-#define TIOCGSID       0x5429  /* Return the session ID of FD */
-#define TCGETS2                _IOR('T',0x2A, struct termios2)
-#define TCSETS2                _IOW('T',0x2B, struct termios2)
-#define TCSETSW2       _IOW('T',0x2C, struct termios2)
-#define TCSETSF2       _IOW('T',0x2D, struct termios2)
-#define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
-#define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
-
-#define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
-#define FIOCLEX                0x5451
-#define FIOASYNC       0x5452
-#define TIOCSERCONFIG  0x5453
-#define TIOCSERGWILD   0x5454
-#define TIOCSERSWILD   0x5455
-#define TIOCGLCKTRMIOS 0x5456
-#define TIOCSLCKTRMIOS 0x5457
-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
-#define TIOCSERGETLSR   0x5459 /* Get line status register */
-#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
-
-#define TIOCMIWAIT     0x545C  /* wait for a change on serial input line(s) */
-#define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
-#define FIOQSIZE       0x545E
-
-/* Used for packet mode */
-#define TIOCPKT_DATA            0
-#define TIOCPKT_FLUSHREAD       1
-#define TIOCPKT_FLUSHWRITE      2
-#define TIOCPKT_STOP            4
-#define TIOCPKT_START           8
-#define TIOCPKT_NOSTOP         16
-#define TIOCPKT_DOSTOP         32
-
-#define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
-
-#endif /* __ASM_IOCTLS_H__ */
-
diff --git a/include/asm-frv/ipcbuf.h b/include/asm-frv/ipcbuf.h
deleted file mode 100644 (file)
index b546f67..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __ASM_IPCBUF_H__
-#define __ASM_IPCBUF_H__
-
-/*
- * The user_ipc_perm structure for FR-V architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 32-bit mode_t and seq
- * - 2 miscellaneous 32-bit values
- */
-
-struct ipc64_perm
-{
-       __kernel_key_t          key;
-       __kernel_uid32_t        uid;
-       __kernel_gid32_t        gid;
-       __kernel_uid32_t        cuid;
-       __kernel_gid32_t        cgid;
-       __kernel_mode_t         mode;
-       unsigned short          __pad1;
-       unsigned short          seq;
-       unsigned short          __pad2;
-       unsigned long           __unused1;
-       unsigned long           __unused2;
-};
-
-#endif /* __ASM_IPCBUF_H__ */
-
diff --git a/include/asm-frv/irc-regs.h b/include/asm-frv/irc-regs.h
deleted file mode 100644 (file)
index afa30ae..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* irc-regs.h: on-chip interrupt controller registers
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_IRC_REGS
-#define _ASM_IRC_REGS
-
-#define __reg(ADDR) (*(volatile unsigned long *)(ADDR))
-
-#define __get_TM0()    ({ __reg(0xfeff9800); })
-#define __get_TM1()    ({ __reg(0xfeff9808); })
-#define __set_TM1(V)   do { __reg(0xfeff9808) = (V); mb(); } while(0)
-
-#define __set_TM1x(XI,V)                       \
-do {                                           \
-       int shift = (XI) * 2 + 16;              \
-       unsigned long tm1 = __reg(0xfeff9808);  \
-       tm1 &= ~(0x3 << shift);                 \
-       tm1 |= (V) << shift;                    \
-       __reg(0xfeff9808) = tm1;                \
-       mb();                                   \
-} while(0)
-
-#define __get_RS(C)    ({ (__reg(0xfeff9810) >> ((C)+16)) & 1; })
-
-#define __clr_RC(C)    do { __reg(0xfeff9818) = 1 << ((C)+16); mb(); } while(0)
-
-#define __get_MASK(C)  ({ (__reg(0xfeff9820) >> ((C)+16)) & 1; })
-#define __set_MASK(C)  do { __reg(0xfeff9820) |=  1 << ((C)+16); mb(); } while(0)
-#define __clr_MASK(C)  do { __reg(0xfeff9820) &=  ~(1 << ((C)+16)); mb(); } while(0)
-
-#define __get_MASK_all() __get_MASK(0)
-#define __set_MASK_all() __set_MASK(0)
-#define __clr_MASK_all() __clr_MASK(0)
-
-#define __get_IRL()    ({ (__reg(0xfeff9828) >> 16) & 0xf; })
-#define __clr_IRL()    do { __reg(0xfeff9828) = 0x100000; mb(); } while(0)
-
-#define __get_IRR(N)   ({ __reg(0xfeff9840 + (N) * 8); })
-#define __set_IRR(N,V) do { __reg(0xfeff9840 + (N) * 8) = (V); } while(0)
-
-#define __get_IITMR(N) ({ __reg(0xfeff9880 + (N) * 8); })
-#define __set_IITMR(N,V) do { __reg(0xfeff9880 + (N) * 8) = (V); } while(0)
-
-
-#endif /* _ASM_IRC_REGS */
diff --git a/include/asm-frv/irq.h b/include/asm-frv/irq.h
deleted file mode 100644 (file)
index 3a66ebd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* irq.h: FRV IRQ definitions
- *
- * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_IRQ_H_
-#define _ASM_IRQ_H_
-
-#define NR_IRQS                                48
-#define IRQ_BASE_CPU                   (0 * 16)
-#define IRQ_BASE_FPGA                  (1 * 16)
-#define IRQ_BASE_MB93493               (2 * 16)
-
-/* probe returns a 32-bit IRQ mask:-/ */
-#define MIN_PROBE_IRQ                  (NR_IRQS - 32)
-
-#ifndef __ASSEMBLY__
-static inline int irq_canonicalize(int irq)
-{
-       return irq;
-}
-#endif
-
-#endif /* _ASM_IRQ_H_ */
diff --git a/include/asm-frv/irq_regs.h b/include/asm-frv/irq_regs.h
deleted file mode 100644 (file)
index d22e832..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* FRV per-CPU frame pointer holder
- *
- * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_IRQ_REGS_H
-#define _ASM_IRQ_REGS_H
-
-/*
- * Per-cpu current frame pointer - the location of the last exception frame on
- * the stack
- * - on FRV, GR28 is dedicated to keeping a pointer to the current exception
- *   frame
- */
-#define ARCH_HAS_OWN_IRQ_REGS
-
-#ifndef __ASSEMBLY__
-#define get_irq_regs() (__frame)
-#endif
-
-#endif /* _ASM_IRQ_REGS_H */
diff --git a/include/asm-frv/kdebug.h b/include/asm-frv/kdebug.h
deleted file mode 100644 (file)
index 6ece1b0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/kdebug.h>
diff --git a/include/asm-frv/kmap_types.h b/include/asm-frv/kmap_types.h
deleted file mode 100644 (file)
index f8e16b2..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#ifndef _ASM_KMAP_TYPES_H
-#define _ASM_KMAP_TYPES_H
-
-enum km_type {
-       /* arch specific kmaps - change the numbers attached to these at your peril */
-       __KM_CACHE,             /* cache flush page attachment point */
-       __KM_PGD,               /* current page directory */
-       __KM_ITLB_PTD,          /* current instruction TLB miss page table lookup */
-       __KM_DTLB_PTD,          /* current data TLB miss page table lookup */
-
-       /* general kmaps */
-        KM_BOUNCE_READ,
-        KM_SKB_SUNRPC_DATA,
-        KM_SKB_DATA_SOFTIRQ,
-        KM_USER0,
-        KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
-
-#endif
diff --git a/include/asm-frv/linkage.h b/include/asm-frv/linkage.h
deleted file mode 100644 (file)
index 636c1bc..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __ASM_LINKAGE_H
-#define __ASM_LINKAGE_H
-
-#define __ALIGN                .align 4
-#define __ALIGN_STR    ".align 4"
-
-#endif
diff --git a/include/asm-frv/local.h b/include/asm-frv/local.h
deleted file mode 100644 (file)
index c27bdf0..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_LOCAL_H
-#define _ASM_LOCAL_H
-
-#include <asm-generic/local.h>
-
-#endif /* _ASM_LOCAL_H */
diff --git a/include/asm-frv/math-emu.h b/include/asm-frv/math-emu.h
deleted file mode 100644 (file)
index 0c8f731..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-#ifndef _ASM_MATH_EMU_H
-#define _ASM_MATH_EMU_H
-
-#include <asm/setup.h>
-#include <linux/linkage.h>
-
-/* Status Register bits */
-
-/* accrued exception bits */
-#define FPSR_AEXC_INEX 3
-#define FPSR_AEXC_DZ   4
-#define FPSR_AEXC_UNFL 5
-#define FPSR_AEXC_OVFL 6
-#define FPSR_AEXC_IOP  7
-
-/* exception status bits */
-#define FPSR_EXC_INEX1 8
-#define FPSR_EXC_INEX2 9
-#define FPSR_EXC_DZ    10
-#define FPSR_EXC_UNFL  11
-#define FPSR_EXC_OVFL  12
-#define FPSR_EXC_OPERR 13
-#define FPSR_EXC_SNAN  14
-#define FPSR_EXC_BSUN  15
-
-/* quotient byte, assumes big-endian, of course */
-#define FPSR_QUOTIENT(fpsr) (*((signed char *) &(fpsr) + 1))
-
-/* condition code bits */
-#define FPSR_CC_NAN    24
-#define FPSR_CC_INF    25
-#define FPSR_CC_Z      26
-#define FPSR_CC_NEG    27
-
-
-/* Control register bits */
-
-/* rounding mode */
-#define        FPCR_ROUND_RN   0               /* round to nearest/even */
-#define FPCR_ROUND_RZ  1               /* round to zero */
-#define FPCR_ROUND_RM  2               /* minus infinity */
-#define FPCR_ROUND_RP  3               /* plus infinity */
-
-/* rounding precision */
-#define FPCR_PRECISION_X       0       /* long double */
-#define FPCR_PRECISION_S       1       /* double */
-#define FPCR_PRECISION_D       2       /* float */
-
-
-/* Flags to select the debugging output */
-#define PDECODE                0
-#define PEXECUTE       1
-#define PCONV          2
-#define PNORM          3
-#define PREGISTER      4
-#define PINSTR         5
-#define PUNIMPL                6
-#define PMOVEM         7
-
-#define PMDECODE       (1<<PDECODE)
-#define PMEXECUTE      (1<<PEXECUTE)
-#define PMCONV         (1<<PCONV)
-#define PMNORM         (1<<PNORM)
-#define PMREGISTER     (1<<PREGISTER)
-#define PMINSTR                (1<<PINSTR)
-#define PMUNIMPL       (1<<PUNIMPL)
-#define PMMOVEM                (1<<PMOVEM)
-
-#ifndef __ASSEMBLY__
-
-#include <linux/kernel.h>
-#include <linux/sched.h>
-
-union fp_mant64 {
-       unsigned long long m64;
-       unsigned long m32[2];
-};
-
-union fp_mant128 {
-       unsigned long long m64[2];
-       unsigned long m32[4];
-};
-
-/* internal representation of extended fp numbers */
-struct fp_ext {
-       unsigned char lowmant;
-       unsigned char sign;
-       unsigned short exp;
-       union fp_mant64 mant;
-};
-
-/* C representation of FPU registers */
-/* NOTE: if you change this, you have to change the assembler offsets
-   below and the size in <asm/fpu.h>, too */
-struct fp_data {
-       struct fp_ext fpreg[8];
-       unsigned int fpcr;
-       unsigned int fpsr;
-       unsigned int fpiar;
-       unsigned short prec;
-       unsigned short rnd;
-       struct fp_ext temp[2];
-};
-
-#if FPU_EMU_DEBUG
-extern unsigned int fp_debugprint;
-
-#define dprint(bit, fmt, args...) ({                   \
-       if (fp_debugprint & (1 << (bit)))               \
-               printk(fmt, ## args);                   \
-})
-#else
-#define dprint(bit, fmt, args...)
-#endif
-
-#define uprint(str) ({                                 \
-       static int __count = 3;                         \
-                                                       \
-       if (__count > 0) {                              \
-               printk("You just hit an unimplemented " \
-                      "fpu instruction (%s)\n", str);  \
-               printk("Please report this to ....\n"); \
-               __count--;                              \
-       }                                               \
-})
-
-#define FPDATA         ((struct fp_data *)current->thread.fp)
-
-#else  /* __ASSEMBLY__ */
-
-#define FPDATA         %a2
-
-/* offsets from the base register to the floating point data in the task struct */
-#define FPD_FPREG      (TASK_THREAD+THREAD_FPREG+0)
-#define FPD_FPCR       (TASK_THREAD+THREAD_FPREG+96)
-#define FPD_FPSR       (TASK_THREAD+THREAD_FPREG+100)
-#define FPD_FPIAR      (TASK_THREAD+THREAD_FPREG+104)
-#define FPD_PREC       (TASK_THREAD+THREAD_FPREG+108)
-#define FPD_RND                (TASK_THREAD+THREAD_FPREG+110)
-#define FPD_TEMPFP1    (TASK_THREAD+THREAD_FPREG+112)
-#define FPD_TEMPFP2    (TASK_THREAD+THREAD_FPREG+124)
-#define FPD_SIZEOF     (TASK_THREAD+THREAD_FPREG+136)
-
-/* offsets on the stack to access saved registers,
- * these are only used during instruction decoding
- * where we always know how deep we're on the stack.
- */
-#define FPS_DO         (PT_D0)
-#define FPS_D1         (PT_D1)
-#define FPS_D2         (PT_D2)
-#define FPS_A0         (PT_A0)
-#define FPS_A1         (PT_A1)
-#define FPS_A2         (PT_A2)
-#define FPS_SR         (PT_SR)
-#define FPS_PC         (PT_PC)
-#define FPS_EA         (PT_PC+6)
-#define FPS_PC2                (PT_PC+10)
-
-.macro fp_get_fp_reg
-       lea     (FPD_FPREG,FPDATA,%d0.w*4),%a0
-       lea     (%a0,%d0.w*8),%a0
-.endm
-
-/* Macros used to get/put the current program counter.
- * 020/030 use a different stack frame then 040/060, for the
- * 040/060 the return pc points already to the next location,
- * so this only needs to be modified for jump instructions.
- */
-.macro fp_get_pc dest
-       move.l  (FPS_PC+4,%sp),\dest
-.endm
-
-.macro fp_put_pc src,jump=0
-       move.l  \src,(FPS_PC+4,%sp)
-.endm
-
-.macro fp_get_instr_data       f,s,dest,label
-       getuser \f,%sp@(FPS_PC+4)@(0),\dest,\label,%sp@(FPS_PC+4)
-       addq.l  #\s,%sp@(FPS_PC+4)
-.endm
-
-.macro fp_get_instr_word       dest,label,addr
-       fp_get_instr_data       w,2,\dest,\label,\addr
-.endm
-
-.macro fp_get_instr_long       dest,label,addr
-       fp_get_instr_data       l,4,\dest,\label,\addr
-.endm
-
-/* These macros are used to read from/write to user space
- * on error we jump to the fixup section, load the fault
- * address into %a0 and jump to the exit.
- * (derived from <asm/uaccess.h>)
- */
-.macro getuser size,src,dest,label,addr
-|      printf  ,"[\size<%08x]",1,\addr
-.Lu1\@:        moves\size      \src,\dest
-
-       .section .fixup,"ax"
-       .even
-.Lu2\@:        move.l  \addr,%a0
-       jra     \label
-       .previous
-
-       .section __ex_table,"a"
-       .align  4
-       .long   .Lu1\@,.Lu2\@
-       .previous
-.endm
-
-.macro putuser size,src,dest,label,addr
-|      printf  ,"[\size>%08x]",1,\addr
-.Lu1\@:        moves\size      \src,\dest
-.Lu2\@:
-
-       .section .fixup,"ax"
-       .even
-.Lu3\@:        move.l  \addr,%a0
-       jra     \label
-       .previous
-
-       .section __ex_table,"a"
-       .align  4
-       .long   .Lu1\@,.Lu3\@
-       .long   .Lu2\@,.Lu3\@
-       .previous
-.endm
-
-
-.macro movestack       nr,arg1,arg2,arg3,arg4,arg5
-       .if     \nr
-       movestack       (\nr-1),\arg2,\arg3,\arg4,\arg5
-       move.l  \arg1,-(%sp)
-       .endif
-.endm
-
-.macro printf  bit=-1,string,nr=0,arg1,arg2,arg3,arg4,arg5
-#ifdef FPU_EMU_DEBUG
-       .data
-.Lpdata\@:
-       .string "\string"
-       .previous
-
-       movem.l %d0/%d1/%a0/%a1,-(%sp)
-       .if     \bit+1
-#if 0
-       moveq   #\bit,%d0
-       andw    #7,%d0
-       btst    %d0,fp_debugprint+((31-\bit)/8)
-#else
-       btst    #\bit,fp_debugprint+((31-\bit)/8)
-#endif
-       jeq     .Lpskip\@
-       .endif
-       movestack       \nr,\arg1,\arg2,\arg3,\arg4,\arg5
-       pea     .Lpdata\@
-       jsr     printk
-       lea     ((\nr+1)*4,%sp),%sp
-.Lpskip\@:
-       movem.l (%sp)+,%d0/%d1/%a0/%a1
-#endif
-.endm
-
-.macro printx  bit,fp
-#ifdef FPU_EMU_DEBUG
-       movem.l %d0/%a0,-(%sp)
-       lea     \fp,%a0
-#if 0
-       moveq   #'+',%d0
-       tst.w   (%a0)
-       jeq     .Lx1\@
-       moveq   #'-',%d0
-.Lx1\@:        printf  \bit," %c",1,%d0
-       move.l  (4,%a0),%d0
-       bclr    #31,%d0
-       jne     .Lx2\@
-       printf  \bit,"0."
-       jra     .Lx3\@
-.Lx2\@:        printf  \bit,"1."
-.Lx3\@:        printf  \bit,"%08x%08x",2,%d0,%a0@(8)
-       move.w  (2,%a0),%d0
-       ext.l   %d0
-       printf  \bit,"E%04x",1,%d0
-#else
-       printf  \bit," %08x%08x%08x",3,%a0@,%a0@(4),%a0@(8)
-#endif
-       movem.l (%sp)+,%d0/%a0
-#endif
-.endm
-
-.macro debug   instr,args
-#ifdef FPU_EMU_DEBUG
-       \instr  \args
-#endif
-.endm
-
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* _ASM_FRV_MATH_EMU_H */
-
diff --git a/include/asm-frv/mb-regs.h b/include/asm-frv/mb-regs.h
deleted file mode 100644 (file)
index 219e5f9..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/* mb-regs.h: motherboard registers
- *
- * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MB_REGS_H
-#define _ASM_MB_REGS_H
-
-#include <asm/cpu-irqs.h>
-#include <asm/sections.h>
-#include <asm/mem-layout.h>
-
-#ifndef __ASSEMBLY__
-/* gcc builtins, annotated */
-
-unsigned long __builtin_read8(volatile void __iomem *);
-unsigned long __builtin_read16(volatile void __iomem *);
-unsigned long __builtin_read32(volatile void __iomem *);
-void __builtin_write8(volatile void __iomem *, unsigned char);
-void __builtin_write16(volatile void __iomem *, unsigned short);
-void __builtin_write32(volatile void __iomem *, unsigned long);
-#endif
-
-#define __region_IO    KERNEL_IO_START /* the region from 0xe0000000 to 0xffffffff has suitable
-                                        * protection laid over the top for use in memory-mapped
-                                        * I/O
-                                        */
-
-#define __region_CS0   0xff000000      /* Boot ROMs area */
-
-#ifdef CONFIG_MB93091_VDK
-/*
- * VDK motherboard and CPU card specific stuff
- */
-
-#include <asm/mb93091-fpga-irqs.h>
-
-#define IRQ_CPU_MB93493_0      IRQ_CPU_EXTERNAL0
-#define IRQ_CPU_MB93493_1      IRQ_CPU_EXTERNAL1
-
-#define __region_CS2   0xe0000000      /* SLBUS/PCI I/O space */
-#define __region_CS2_M         0x0fffffff /* mask */
-#define __region_CS2_C         0x00000000 /* control */
-#define __region_CS5   0xf0000000      /* MB93493 CSC area (DAV daughter board) */
-#define __region_CS5_M         0x00ffffff
-#define __region_CS5_C         0x00010000
-#define __region_CS7   0xf1000000      /* CB70 CPU-card PCMCIA port I/O space */
-#define __region_CS7_M         0x00ffffff
-#define __region_CS7_C         0x00410701
-#define __region_CS1   0xfc000000      /* SLBUS/PCI bridge control registers */
-#define __region_CS1_M         0x000fffff
-#define __region_CS1_C         0x00000000
-#define __region_CS6   0xfc100000      /* CB70 CPU-card DM9000 LAN I/O space */
-#define __region_CS6_M         0x000fffff
-#define __region_CS6_C         0x00400707
-#define __region_CS3   0xfc200000      /* MB93493 CSR area (DAV daughter board) */
-#define __region_CS3_M         0x000fffff
-#define __region_CS3_C         0xc8100000
-#define __region_CS4   0xfd000000      /* CB70 CPU-card extra flash space */
-#define __region_CS4_M         0x00ffffff
-#define __region_CS4_C         0x00000f07
-
-#define __region_PCI_IO                (__region_CS2 + 0x04000000UL)
-#define __region_PCI_MEM       (__region_CS2 + 0x08000000UL)
-#define __flush_PCI_writes()                                           \
-do {                                                                   \
-       __builtin_write8((volatile void __iomem *) __region_PCI_MEM, 0);        \
-} while(0)
-
-#define __is_PCI_IO(addr) \
-       (((unsigned long)(addr) >> 24) - (__region_PCI_IO >> 24)  < (0x04000000UL >> 24))
-
-#define __is_PCI_MEM(addr) \
-       ((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL)
-
-#define __is_PCI_addr(addr) \
-       ((unsigned long)(addr) - __region_PCI_IO < 0x0c000000UL)
-
-#define __get_CLKSW()  ({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; })
-#define __get_CLKIN()  (__get_CLKSW() * 125U * 100000U / 24U)
-
-#ifndef __ASSEMBLY__
-extern int __nongprelbss mb93090_mb00_detected;
-#endif
-
-#define __addr_LEDS()          (__region_CS2 + 0x01200004UL)
-#ifdef CONFIG_MB93090_MB00
-#define __set_LEDS(X)                                                  \
-do {                                                                   \
-       if (mb93090_mb00_detected)                                      \
-               __builtin_write32((void __iomem *) __addr_LEDS(), ~(X));        \
-} while (0)
-#else
-#define __set_LEDS(X)
-#endif
-
-#define __addr_LCD()           (__region_CS2 + 0x01200008UL)
-#define __get_LCD(B)           __builtin_read32((volatile void __iomem *) (B))
-#define __set_LCD(B,X)         __builtin_write32((volatile void __iomem *) (B), (X))
-
-#define LCD_D                  0x000000ff              /* LCD data bus */
-#define LCD_RW                 0x00000100              /* LCD R/W signal */
-#define LCD_RS                 0x00000200              /* LCD Register Select */
-#define LCD_E                  0x00000400              /* LCD Start Enable Signal */
-
-#define LCD_CMD_CLEAR          (LCD_E|0x001)
-#define LCD_CMD_HOME           (LCD_E|0x002)
-#define LCD_CMD_CURSOR_INC     (LCD_E|0x004)
-#define LCD_CMD_SCROLL_INC     (LCD_E|0x005)
-#define LCD_CMD_CURSOR_DEC     (LCD_E|0x006)
-#define LCD_CMD_SCROLL_DEC     (LCD_E|0x007)
-#define LCD_CMD_OFF            (LCD_E|0x008)
-#define LCD_CMD_ON(CRSR,BLINK) (LCD_E|0x00c|(CRSR<<1)|BLINK)
-#define LCD_CMD_CURSOR_MOVE_L  (LCD_E|0x010)
-#define LCD_CMD_CURSOR_MOVE_R  (LCD_E|0x014)
-#define LCD_CMD_DISPLAY_SHIFT_L        (LCD_E|0x018)
-#define LCD_CMD_DISPLAY_SHIFT_R        (LCD_E|0x01c)
-#define LCD_CMD_FUNCSET(DL,N,F)        (LCD_E|0x020|(DL<<4)|(N<<3)|(F<<2))
-#define LCD_CMD_SET_CG_ADDR(X) (LCD_E|0x040|X)
-#define LCD_CMD_SET_DD_ADDR(X) (LCD_E|0x080|X)
-#define LCD_CMD_READ_BUSY      (LCD_E|LCD_RW)
-#define LCD_DATA_WRITE(X)      (LCD_E|LCD_RS|(X))
-#define LCD_DATA_READ          (LCD_E|LCD_RS|LCD_RW)
-
-#else
-/*
- * PDK unit specific stuff
- */
-
-#include <asm/mb93093-fpga-irqs.h>
-
-#define IRQ_CPU_MB93493_0      IRQ_CPU_EXTERNAL0
-#define IRQ_CPU_MB93493_1      IRQ_CPU_EXTERNAL1
-
-#define __region_CS5   0xf0000000      /* MB93493 CSC area (DAV daughter board) */
-#define __region_CS5_M         0x00ffffff /* mask */
-#define __region_CS5_C         0x00010000 /* control */
-#define __region_CS2   0x20000000      /* FPGA registers */
-#define __region_CS2_M         0x000fffff
-#define __region_CS2_C         0x00000000
-#define __region_CS1   0xfc100000      /* LAN registers */
-#define __region_CS1_M         0x000fffff
-#define __region_CS1_C         0x00010404
-#define __region_CS3   0xfc200000      /* MB93493 CSR area (DAV daughter board) */
-#define __region_CS3_M         0x000fffff
-#define __region_CS3_C         0xc8000000
-#define __region_CS4   0xfd000000      /* extra ROMs area */
-#define __region_CS4_M         0x00ffffff
-#define __region_CS4_C         0x00000f07
-
-#define __region_CS6   0xfe000000      /* not used - hide behind CPU resource I/O regs */
-#define __region_CS6_M         0x000fffff
-#define __region_CS6_C         0x00000f07
-#define __region_CS7   0xfe000000      /* not used - hide behind CPU resource I/O regs */
-#define __region_CS7_M         0x000fffff
-#define __region_CS7_C         0x00000f07
-
-#define __is_PCI_IO(addr)      0       /* no PCI */
-#define __is_PCI_MEM(addr)     0
-#define __is_PCI_addr(addr)    0
-#define __region_PCI_IO                0
-#define __region_PCI_MEM       0
-#define __flush_PCI_writes()   do { } while(0)
-
-#define __get_CLKSW()          0UL
-#define __get_CLKIN()          66000000UL
-
-#define __addr_LEDS()          (__region_CS2 + 0x00000023UL)
-#define __set_LEDS(X)          __builtin_write8((volatile void __iomem *) __addr_LEDS(), (X))
-
-#define __addr_FPGATR()                (__region_CS2 + 0x00000030UL)
-#define __set_FPGATR(X)                __builtin_write32((volatile void __iomem *) __addr_FPGATR(), (X))
-#define __get_FPGATR()         __builtin_read32((volatile void __iomem *) __addr_FPGATR())
-
-#define MB93093_FPGA_FPGATR_AUDIO_CLK  0x00000003
-
-#define __set_FPGATR_AUDIO_CLK(V) \
-       __set_FPGATR((__get_FPGATR() & ~MB93093_FPGA_FPGATR_AUDIO_CLK) | (V))
-
-#define MB93093_FPGA_FPGATR_AUDIO_CLK_OFF      0x0
-#define MB93093_FPGA_FPGATR_AUDIO_CLK_11MHz    0x1
-#define MB93093_FPGA_FPGATR_AUDIO_CLK_12MHz    0x2
-#define MB93093_FPGA_FPGATR_AUDIO_CLK_02MHz    0x3
-
-#define MB93093_FPGA_SWR_PUSHSWMASK    (0x1F<<26)
-#define MB93093_FPGA_SWR_PUSHSW4       (1<<29)
-
-#define __addr_FPGA_SWR                ((volatile void __iomem *)(__region_CS2 + 0x28UL))
-#define __get_FPGA_PUSHSW1_5() (__builtin_read32(__addr_FPGA_SWR) & MB93093_FPGA_SWR_PUSHSWMASK)
-
-
-#endif
-
-#endif /* _ASM_MB_REGS_H */
diff --git a/include/asm-frv/mb86943a.h b/include/asm-frv/mb86943a.h
deleted file mode 100644 (file)
index e87ef92..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* mb86943a.h: MB86943 SPARClite <-> PCI bridge registers
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MB86943A_H
-#define _ASM_MB86943A_H
-
-#include <asm/mb-regs.h>
-
-#define __reg_MB86943_sl_ctl           *(volatile uint32_t *) (__region_CS1 + 0x00)
-
-#define MB86943_SL_CTL_BUS_WIDTH_64    0x00000001
-#define MB86943_SL_CTL_AS_HOST         0x00000002
-#define MB86943_SL_CTL_DRCT_MASTER_SWAP        0x00000004
-#define MB86943_SL_CTL_DRCT_SLAVE_SWAP 0x00000008
-#define MB86943_SL_CTL_PCI_CONFIG_SWAP 0x00000010
-#define MB86943_SL_CTL_ECS0_ENABLE     0x00000020
-#define MB86943_SL_CTL_ECS1_ENABLE     0x00000040
-#define MB86943_SL_CTL_ECS2_ENABLE     0x00000080
-
-#define __reg_MB86943_ecs_ctl(N)       *(volatile uint32_t *) (__region_CS1 + 0x08 + (0x08*(N)))
-#define __reg_MB86943_ecs_range(N)     *(volatile uint32_t *) (__region_CS1 + 0x20 + (0x10*(N)))
-#define __reg_MB86943_ecs_base(N)      *(volatile uint32_t *) (__region_CS1 + 0x28 + (0x10*(N)))
-
-#define __reg_MB86943_sl_pci_io_range  *(volatile uint32_t *) (__region_CS1 + 0x50)
-#define __reg_MB86943_sl_pci_io_base   *(volatile uint32_t *) (__region_CS1 + 0x58)
-#define __reg_MB86943_sl_pci_mem_range *(volatile uint32_t *) (__region_CS1 + 0x60)
-#define __reg_MB86943_sl_pci_mem_base  *(volatile uint32_t *) (__region_CS1 + 0x68)
-#define __reg_MB86943_pci_sl_io_base   *(volatile uint32_t *) (__region_CS1 + 0x70)
-#define __reg_MB86943_pci_sl_mem_base  *(volatile uint32_t *) (__region_CS1 + 0x78)
-
-#define __reg_MB86943_pci_arbiter      *(volatile uint32_t *) (__region_CS2 + 0x01300014)
-#define MB86943_PCIARB_EN              0x00000001
-
-#endif /* _ASM_MB86943A_H */
diff --git a/include/asm-frv/mb93091-fpga-irqs.h b/include/asm-frv/mb93091-fpga-irqs.h
deleted file mode 100644 (file)
index 19778c5..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* mb93091-fpga-irqs.h: MB93091 CPU board FPGA IRQs
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MB93091_FPGA_IRQS_H
-#define _ASM_MB93091_FPGA_IRQS_H
-
-#include <asm/irq.h>
-
-#ifndef __ASSEMBLY__
-
-/* IRQ IDs presented to drivers */
-enum {
-       IRQ_FPGA__UNUSED                        = IRQ_BASE_FPGA,
-       IRQ_FPGA_SYSINT_BUS_EXPANSION_1,
-       IRQ_FPGA_SL_BUS_EXPANSION_2,
-       IRQ_FPGA_PCI_INTD,
-       IRQ_FPGA_PCI_INTC,
-       IRQ_FPGA_PCI_INTB,
-       IRQ_FPGA_PCI_INTA,
-       IRQ_FPGA_SL_BUS_EXPANSION_7,
-       IRQ_FPGA_SYSINT_BUS_EXPANSION_8,
-       IRQ_FPGA_SL_BUS_EXPANSION_9,
-       IRQ_FPGA_MB86943_PCI_INTA,
-       IRQ_FPGA_MB86943_SLBUS_SIDE,
-       IRQ_FPGA_RTL8029_INTA,
-       IRQ_FPGA_SYSINT_BUS_EXPANSION_13,
-       IRQ_FPGA_SL_BUS_EXPANSION_14,
-       IRQ_FPGA_NMI,
-};
-
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_MB93091_FPGA_IRQS_H */
diff --git a/include/asm-frv/mb93093-fpga-irqs.h b/include/asm-frv/mb93093-fpga-irqs.h
deleted file mode 100644 (file)
index 590266b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* mb93093-fpga-irqs.h: MB93093 CPU board FPGA IRQs
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MB93093_FPGA_IRQS_H
-#define _ASM_MB93093_FPGA_IRQS_H
-
-#include <asm/irq.h>
-
-#ifndef __ASSEMBLY__
-
-/* IRQ IDs presented to drivers */
-enum {
-       IRQ_FPGA_PUSH_BUTTON_SW1_5              = IRQ_BASE_FPGA + 8,
-       IRQ_FPGA_ROCKER_C_SW8                   = IRQ_BASE_FPGA + 9,
-       IRQ_FPGA_ROCKER_C_SW9                   = IRQ_BASE_FPGA + 10,
-};
-
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_MB93093_FPGA_IRQS_H */
diff --git a/include/asm-frv/mb93493-irqs.h b/include/asm-frv/mb93493-irqs.h
deleted file mode 100644 (file)
index 82c7aed..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* mb93493-irqs.h: MB93493 companion chip IRQs
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MB93493_IRQS_H
-#define _ASM_MB93493_IRQS_H
-
-#include <asm/irq.h>
-
-#ifndef __ASSEMBLY__
-
-/* IRQ IDs presented to drivers */
-enum {
-       IRQ_MB93493_VDC                 = IRQ_BASE_MB93493 + 0,
-       IRQ_MB93493_VCC                 = IRQ_BASE_MB93493 + 1,
-       IRQ_MB93493_AUDIO_OUT           = IRQ_BASE_MB93493 + 2,
-       IRQ_MB93493_I2C_0               = IRQ_BASE_MB93493 + 3,
-       IRQ_MB93493_I2C_1               = IRQ_BASE_MB93493 + 4,
-       IRQ_MB93493_USB                 = IRQ_BASE_MB93493 + 5,
-       IRQ_MB93493_LOCAL_BUS           = IRQ_BASE_MB93493 + 7,
-       IRQ_MB93493_PCMCIA              = IRQ_BASE_MB93493 + 8,
-       IRQ_MB93493_GPIO                = IRQ_BASE_MB93493 + 9,
-       IRQ_MB93493_AUDIO_IN            = IRQ_BASE_MB93493 + 10,
-};
-
-/* IRQ multiplexor mappings */
-#define ROUTE_VIA_IRQ0 0       /* route IRQ by way of CPU external IRQ 0 */
-#define ROUTE_VIA_IRQ1 1       /* route IRQ by way of CPU external IRQ 1 */
-
-#define IRQ_MB93493_VDC_ROUTE          ROUTE_VIA_IRQ0
-#define IRQ_MB93493_VCC_ROUTE          ROUTE_VIA_IRQ1
-#define IRQ_MB93493_AUDIO_OUT_ROUTE    ROUTE_VIA_IRQ1
-#define IRQ_MB93493_I2C_0_ROUTE                ROUTE_VIA_IRQ1
-#define IRQ_MB93493_I2C_1_ROUTE                ROUTE_VIA_IRQ1
-#define IRQ_MB93493_USB_ROUTE          ROUTE_VIA_IRQ1
-#define IRQ_MB93493_LOCAL_BUS_ROUTE    ROUTE_VIA_IRQ1
-#define IRQ_MB93493_PCMCIA_ROUTE       ROUTE_VIA_IRQ1
-#define IRQ_MB93493_GPIO_ROUTE         ROUTE_VIA_IRQ1
-#define IRQ_MB93493_AUDIO_IN_ROUTE     ROUTE_VIA_IRQ1
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_MB93493_IRQS_H */
diff --git a/include/asm-frv/mb93493-regs.h b/include/asm-frv/mb93493-regs.h
deleted file mode 100644 (file)
index 8a1f6aa..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/* mb93493-regs.h: MB93493 companion chip registers
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MB93493_REGS_H
-#define _ASM_MB93493_REGS_H
-
-#include <asm/mb-regs.h>
-#include <asm/mb93493-irqs.h>
-
-#define __addr_MB93493(X)      ((volatile unsigned long *)(__region_CS3 + (X)))
-#define __get_MB93493(X)       ({ *(volatile unsigned long *)(__region_CS3 + (X)); })
-
-#define __set_MB93493(X,V)                                             \
-do {                                                                   \
-       *(volatile unsigned long *)(__region_CS3 + (X)) = (V); mb();    \
-} while(0)
-
-#define __get_MB93493_STSR(X)  __get_MB93493(0x3c0 + (X) * 4)
-#define __set_MB93493_STSR(X,V)        __set_MB93493(0x3c0 + (X) * 4, (V))
-#define MB93493_STSR_EN
-
-#define __addr_MB93493_IQSR(X) __addr_MB93493(0x3d0 + (X) * 4)
-#define __get_MB93493_IQSR(X)  __get_MB93493(0x3d0 + (X) * 4)
-#define __set_MB93493_IQSR(X,V)        __set_MB93493(0x3d0 + (X) * 4, (V))
-
-#define __get_MB93493_DQSR(X)  __get_MB93493(0x3e0 + (X) * 4)
-#define __set_MB93493_DQSR(X,V)        __set_MB93493(0x3e0 + (X) * 4, (V))
-
-#define __get_MB93493_LBSER()  __get_MB93493(0x3f0)
-#define __set_MB93493_LBSER(V) __set_MB93493(0x3f0, (V))
-
-#define MB93493_LBSER_VDC      0x00010000
-#define MB93493_LBSER_VCC      0x00020000
-#define MB93493_LBSER_AUDIO    0x00040000
-#define MB93493_LBSER_I2C_0    0x00080000
-#define MB93493_LBSER_I2C_1    0x00100000
-#define MB93493_LBSER_USB      0x00200000
-#define MB93493_LBSER_GPIO     0x00800000
-#define MB93493_LBSER_PCMCIA   0x01000000
-
-#define __get_MB93493_LBSR()   __get_MB93493(0x3fc)
-#define __set_MB93493_LBSR(V)  __set_MB93493(0x3fc, (V))
-
-/*
- * video display controller
- */
-#define __get_MB93493_VDC(X)   __get_MB93493(MB93493_VDC_##X)
-#define __set_MB93493_VDC(X,V) __set_MB93493(MB93493_VDC_##X, (V))
-
-#define MB93493_VDC_RCURSOR    0x140   /* cursor position */
-#define MB93493_VDC_RCT1       0x144   /* cursor colour 1 */
-#define MB93493_VDC_RCT2       0x148   /* cursor colour 2 */
-#define MB93493_VDC_RHDC       0x150   /* horizontal display period */
-#define MB93493_VDC_RH_MARGINS 0x154   /* horizontal margin sizes */
-#define MB93493_VDC_RVDC       0x158   /* vertical display period */
-#define MB93493_VDC_RV_MARGINS 0x15c   /* vertical margin sizes */
-#define MB93493_VDC_RC         0x170   /* VDC control */
-#define MB93493_VDC_RCLOCK     0x174   /* clock divider, DMA req delay */
-#define MB93493_VDC_RBLACK     0x178   /* black insert sizes */
-#define MB93493_VDC_RS         0x17c   /* VDC status */
-
-#define __addr_MB93493_VDC_BCI(X)  ({ (volatile unsigned long *)(__region_CS3 + 0x000 + (X)); })
-#define __addr_MB93493_VDC_TPO(X)  (__region_CS3 + 0x1c0 + (X))
-
-#define VDC_TPO_WIDTH          32
-
-#define VDC_RC_DSR             0x00000080      /* VDC master reset */
-
-#define VDC_RS_IT              0x00060000      /* interrupt indicators */
-#define VDC_RS_IT_UNDERFLOW    0x00040000      /* - underflow event */
-#define VDC_RS_IT_VSYNC                0x00020000      /* - VSYNC event */
-#define VDC_RS_DFI             0x00010000      /* current interlace field number */
-#define VDC_RS_DFI_TOP         0x00000000      /* - top field */
-#define VDC_RS_DFI_BOTTOM      0x00010000      /* - bottom field */
-#define VDC_RS_DCSR            0x00000010      /* cursor state */
-#define VDC_RS_DCM             0x00000003      /* display mode */
-#define VDC_RS_DCM_DISABLED    0x00000000      /* - display disabled */
-#define VDC_RS_DCM_STOPPED     0x00000001      /* - VDC stopped */
-#define VDC_RS_DCM_FREERUNNING 0x00000002      /* - VDC free-running */
-#define VDC_RS_DCM_TRANSFERRING        0x00000003      /* - data being transferred to VDC */
-
-/*
- * video capture controller
- */
-#define __get_MB93493_VCC(X)   __get_MB93493(MB93493_VCC_##X)
-#define __set_MB93493_VCC(X,V) __set_MB93493(MB93493_VCC_##X, (V))
-
-#define MB93493_VCC_RREDUCT    0x104   /* reduction rate */
-#define MB93493_VCC_RHY                0x108   /* horizontal brightness filter coefficients */
-#define MB93493_VCC_RHC                0x10c   /* horizontal colour-difference filter coefficients */
-#define MB93493_VCC_RHSIZE     0x110   /* horizontal cycle sizes */
-#define MB93493_VCC_RHBC       0x114   /* horizontal back porch size */
-#define MB93493_VCC_RVCC       0x118   /* vertical capture period */
-#define MB93493_VCC_RVBC       0x11c   /* vertical back porch period */
-#define MB93493_VCC_RV         0x120   /* vertical filter coefficients */
-#define MB93493_VCC_RDTS       0x128   /* DMA transfer size */
-#define MB93493_VCC_RDTS_4B    0x01000000      /* 4-byte transfer */
-#define MB93493_VCC_RDTS_32B   0x03000000      /* 32-byte transfer */
-#define MB93493_VCC_RDTS_SHIFT 24
-#define MB93493_VCC_RCC                0x130   /* VCC control */
-#define MB93493_VCC_RIS                0x134   /* VCC interrupt status */
-
-#define __addr_MB93493_VCC_TPI(X)  (__region_CS3 + 0x180 + (X))
-
-#define VCC_RHSIZE_RHCC                0x000007ff
-#define VCC_RHSIZE_RHCC_SHIFT  0
-#define VCC_RHSIZE_RHTCC       0x0fff0000
-#define VCC_RHSIZE_RHTCC_SHIFT 16
-
-#define VCC_RVBC_RVBC          0x00003f00
-#define VCC_RVBC_RVBC_SHIFT    8
-
-#define VCC_RREDUCT_RHR                0x07ff0000
-#define VCC_RREDUCT_RHR_SHIFT  16
-#define VCC_RREDUCT_RVR                0x000007ff
-#define VCC_RREDUCT_RVR_SHIFT  0
-
-#define VCC_RCC_CE             0x00000001      /* VCC enable */
-#define VCC_RCC_CS             0x00000002      /* request video capture start */
-#define VCC_RCC_CPF            0x0000000c      /* pixel format */
-#define VCC_RCC_CPF_YCBCR_16   0x00000000      /* - YCbCr 4:2:2 16-bit format */
-#define VCC_RCC_CPF_RGB                0x00000004      /* - RGB 4:4:4 format */
-#define VCC_RCC_CPF_YCBCR_24   0x00000008      /* - YCbCr 4:2:2 24-bit format */
-#define VCC_RCC_CPF_BT656      0x0000000c      /* - ITU R-BT.656 format */
-#define VCC_RCC_CPF_SHIFT      2
-#define VCC_RCC_CSR            0x00000080      /* request reset */
-#define VCC_RCC_HSIP           0x00000100      /* HSYNC polarity */
-#define VCC_RCC_HSIP_LOACT     0x00000000      /* - low active */
-#define VCC_RCC_HSIP_HIACT     0x00000100      /* - high active */
-#define VCC_RCC_VSIP           0x00000200      /* VSYNC polarity */
-#define VCC_RCC_VSIP_LOACT     0x00000000      /* - low active */
-#define VCC_RCC_VSIP_HIACT     0x00000200      /* - high active */
-#define VCC_RCC_CIE            0x00000800      /* interrupt enable */
-#define VCC_RCC_CFP            0x00001000      /* RGB pixel packing */
-#define VCC_RCC_CFP_4TO3       0x00000000      /* - pack 4 pixels into 3 words */
-#define VCC_RCC_CFP_1TO1       0x00001000      /* - pack 1 pixel into 1 words */
-#define VCC_RCC_CSM            0x00006000      /* interlace specification */
-#define VCC_RCC_CSM_ONEPASS    0x00002000      /* - non-interlaced */
-#define VCC_RCC_CSM_INTERLACE  0x00004000      /* - interlaced */
-#define VCC_RCC_CSM_SHIFT      13
-#define VCC_RCC_ES             0x00008000      /* capture start polarity */
-#define VCC_RCC_ES_NEG         0x00000000      /* - negative edge */
-#define VCC_RCC_ES_POS         0x00008000      /* - positive edge */
-#define VCC_RCC_IFI            0x00080000      /* inferlace field evaluation reverse */
-#define VCC_RCC_FDTS           0x00300000      /* interlace field start */
-#define VCC_RCC_FDTS_3_8       0x00000000      /* - 3/8 of horizontal entire cycle */
-#define VCC_RCC_FDTS_1_4       0x00100000      /* - 1/4 of horizontal entire cycle */
-#define VCC_RCC_FDTS_7_16      0x00200000      /* - 7/16 of horizontal entire cycle */
-#define VCC_RCC_FDTS_SHIFT     20
-#define VCC_RCC_MOV            0x00400000      /* test bit - always set to 1 */
-#define VCC_RCC_STP            0x00800000      /* request video capture stop */
-#define VCC_RCC_TO             0x01000000      /* input during top-field only */
-
-#define VCC_RIS_VSYNC          0x01000000      /* VSYNC interrupt */
-#define VCC_RIS_OV             0x02000000      /* overflow interrupt */
-#define VCC_RIS_BOTTOM         0x08000000      /* interlace bottom field */
-#define VCC_RIS_STARTED                0x10000000      /* capture started */
-
-/*
- * I2C
- */
-#define MB93493_I2C_BSR        0x340           /* bus status */
-#define MB93493_I2C_BCR                0x344           /* bus control */
-#define MB93493_I2C_CCR                0x348           /* clock control */
-#define MB93493_I2C_ADR                0x34c           /* address */
-#define MB93493_I2C_DTR                0x350           /* data */
-#define MB93493_I2C_BC2R       0x35c           /* bus control 2 */
-
-#define __addr_MB93493_I2C(port,X)   (__region_CS3 + MB93493_I2C_##X + ((port)*0x20))
-#define __get_MB93493_I2C(port,X)    __get_MB93493(MB93493_I2C_##X + ((port)*0x20))
-#define __set_MB93493_I2C(port,X,V)  __set_MB93493(MB93493_I2C_##X + ((port)*0x20), (V))
-
-#define I2C_BSR_BB     (1 << 7)
-
-/*
- * audio controller (I2S) registers
- */
-#define __get_MB93493_I2S(X)   __get_MB93493(MB93493_I2S_##X)
-#define __set_MB93493_I2S(X,V) __set_MB93493(MB93493_I2S_##X, (V))
-
-#define MB93493_I2S_ALDR       0x300           /* L-channel data */
-#define MB93493_I2S_ARDR       0x304           /* R-channel data */
-#define MB93493_I2S_APDR       0x308           /* 16-bit packed data */
-#define MB93493_I2S_AISTR      0x310           /* status */
-#define MB93493_I2S_AICR       0x314           /* control */
-
-#define __addr_MB93493_I2S_ALDR(X)     (__region_CS3 + MB93493_I2S_ALDR + (X))
-#define __addr_MB93493_I2S_ARDR(X)     (__region_CS3 + MB93493_I2S_ARDR + (X))
-#define __addr_MB93493_I2S_APDR(X)     (__region_CS3 + MB93493_I2S_APDR + (X))
-#define __addr_MB93493_I2S_ADR(X)      (__region_CS3 + 0x320 + (X))
-
-#define I2S_AISTR_OTST         0x00000003      /* status of output data transfer */
-#define I2S_AISTR_OTR          0x00000010      /* output transfer request pending */
-#define I2S_AISTR_OUR          0x00000020      /* output FIFO underrun detected */
-#define I2S_AISTR_OOR          0x00000040      /* output FIFO overrun detected */
-#define I2S_AISTR_ODS          0x00000100      /* output DMA transfer size */
-#define I2S_AISTR_ODE          0x00000400      /* output DMA transfer request enable */
-#define I2S_AISTR_OTRIE                0x00001000      /* output transfer request interrupt enable */
-#define I2S_AISTR_OURIE                0x00002000      /* output FIFO underrun interrupt enable */
-#define I2S_AISTR_OORIE                0x00004000      /* output FIFO overrun interrupt enable */
-#define I2S_AISTR__OUT_MASK    0x00007570
-#define I2S_AISTR_ITST         0x00030000      /* status of input data transfer */
-#define I2S_AISTR_ITST_SHIFT   16
-#define I2S_AISTR_ITR          0x00100000      /* input transfer request pending */
-#define I2S_AISTR_IUR          0x00200000      /* input FIFO underrun detected */
-#define I2S_AISTR_IOR          0x00400000      /* input FIFO overrun detected */
-#define I2S_AISTR_IDS          0x01000000      /* input DMA transfer size */
-#define I2S_AISTR_IDE          0x04000000      /* input DMA transfer request enable */
-#define I2S_AISTR_ITRIE                0x10000000      /* input transfer request interrupt enable */
-#define I2S_AISTR_IURIE                0x20000000      /* input FIFO underrun interrupt enable */
-#define I2S_AISTR_IORIE                0x40000000      /* input FIFO overrun interrupt enable */
-#define I2S_AISTR__IN_MASK     0x75700000
-
-#define I2S_AICR_MI            0x00000001      /* mono input requested */
-#define I2S_AICR_AMI           0x00000002      /* relation between LRCKI/FS1 and SDI */
-#define I2S_AICR_LRI           0x00000004      /* function of LRCKI pin */
-#define I2S_AICR_SDMI          0x00000070      /* format of input audio data */
-#define I2S_AICR_SDMI_SHIFT    4
-#define I2S_AICR_CLI           0x00000080      /* input FIFO clearing control */
-#define I2S_AICR_IM            0x00000300      /* input state control */
-#define I2S_AICR_IM_SHIFT      8
-#define I2S_AICR__IN_MASK      0x000003f7
-#define I2S_AICR_MO            0x00001000      /* mono output requested */
-#define I2S_AICR_AMO           0x00002000      /* relation between LRCKO/FS0 and SDO */
-#define I2S_AICR_AMO_SHIFT     13
-#define I2S_AICR_LRO           0x00004000      /* function of LRCKO pin */
-#define I2S_AICR_SDMO          0x00070000      /* format of output audio data */
-#define I2S_AICR_SDMO_SHIFT    16
-#define I2S_AICR_CLO           0x00080000      /* output FIFO clearing control */
-#define I2S_AICR_OM            0x00100000      /* output state control */
-#define I2S_AICR__OUT_MASK     0x001f7000
-#define I2S_AICR_DIV           0x03000000      /* frequency division rate */
-#define I2S_AICR_DIV_SHIFT     24
-#define I2S_AICR_FL            0x20000000      /* frame length */
-#define I2S_AICR_FS            0x40000000      /* frame sync method */
-#define I2S_AICR_ME            0x80000000      /* master enable */
-
-/*
- * PCMCIA
- */
-#define __addr_MB93493_PCMCIA(X)  ((volatile unsigned long *)(__region_CS5 + (X)))
-
-/*
- * GPIO
- */
-#define __get_MB93493_GPIO_PDR(X)      __get_MB93493(0x380 + (X) * 0xc0)
-#define __set_MB93493_GPIO_PDR(X,V)    __set_MB93493(0x380 + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_GPDR(X)     __get_MB93493(0x384 + (X) * 0xc0)
-#define __set_MB93493_GPIO_GPDR(X,V)   __set_MB93493(0x384 + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_SIR(X)      __get_MB93493(0x388 + (X) * 0xc0)
-#define __set_MB93493_GPIO_SIR(X,V)    __set_MB93493(0x388 + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_SOR(X)      __get_MB93493(0x38c + (X) * 0xc0)
-#define __set_MB93493_GPIO_SOR(X,V)    __set_MB93493(0x38c + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_PDSR(X)     __get_MB93493(0x390 + (X) * 0xc0)
-#define __set_MB93493_GPIO_PDSR(X,V)   __set_MB93493(0x390 + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_PDCR(X)     __get_MB93493(0x394 + (X) * 0xc0)
-#define __set_MB93493_GPIO_PDCR(X,V)   __set_MB93493(0x394 + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_INTST(X)    __get_MB93493(0x398 + (X) * 0xc0)
-#define __set_MB93493_GPIO_INTST(X,V)  __set_MB93493(0x398 + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_IEHL(X)     __get_MB93493(0x39c + (X) * 0xc0)
-#define __set_MB93493_GPIO_IEHL(X,V)   __set_MB93493(0x39c + (X) * 0xc0, (V))
-
-#define __get_MB93493_GPIO_IELH(X)     __get_MB93493(0x3a0 + (X) * 0xc0)
-#define __set_MB93493_GPIO_IELH(X,V)   __set_MB93493(0x3a0 + (X) * 0xc0, (V))
-
-#endif /* _ASM_MB93493_REGS_H */
diff --git a/include/asm-frv/mc146818rtc.h b/include/asm-frv/mc146818rtc.h
deleted file mode 100644 (file)
index 90dfb7a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* mc146818rtc.h: RTC defs
- *
- * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MC146818RTC_H
-#define _ASM_MC146818RTC_H
-
-
-#endif /* _ASM_MC146818RTC_H */
diff --git a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h
deleted file mode 100644 (file)
index 2947764..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* mem-layout.h: memory layout
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MEM_LAYOUT_H
-#define _ASM_MEM_LAYOUT_H
-
-#ifndef __ASSEMBLY__
-#define __UL(X)        ((unsigned long) (X))
-#else
-#define __UL(X)        (X)
-#endif
-
-/*
- * PAGE_SHIFT determines the page size
- */
-#define PAGE_SHIFT                     14
-
-#ifndef __ASSEMBLY__
-#define PAGE_SIZE                      (1UL << PAGE_SHIFT)
-#else
-#define PAGE_SIZE                      (1 << PAGE_SHIFT)
-#endif
-
-#define PAGE_MASK                      (~(PAGE_SIZE-1))
-
-/*
- * the slab must be aligned such that load- and store-double instructions don't
- * fault if used
- */
-#define        ARCH_KMALLOC_MINALIGN           8
-#define        ARCH_SLAB_MINALIGN              8
-
-/*****************************************************************************/
-/*
- * virtual memory layout from kernel's point of view
- */
-#define PAGE_OFFSET                    ((unsigned long) &__page_offset)
-
-#ifdef CONFIG_MMU
-
-/* see Documentation/frv/mmu-layout.txt */
-#define KERNEL_LOWMEM_START            __UL(0xc0000000)
-#define KERNEL_LOWMEM_END              __UL(0xd0000000)
-#define VMALLOC_START                  __UL(0xd0000000)
-#define VMALLOC_END                    __UL(0xd8000000)
-#define PKMAP_BASE                     __UL(0xd8000000)
-#define PKMAP_END                      __UL(0xdc000000)
-#define KMAP_ATOMIC_SECONDARY_FRAME    __UL(0xdc000000)
-#define KMAP_ATOMIC_PRIMARY_FRAME      __UL(0xdd000000)
-
-#endif
-
-#define KERNEL_IO_START                        __UL(0xe0000000)
-
-
-/*****************************************************************************/
-/*
- * memory layout from userspace's point of view
- */
-#define BRK_BASE                       __UL(2 * 1024 * 1024 + PAGE_SIZE)
-#define STACK_TOP                      __UL(2 * 1024 * 1024)
-#define STACK_TOP_MAX                  __UL(0xc0000000)
-
-/* userspace process size */
-#ifdef CONFIG_MMU
-#define TASK_SIZE                      (PAGE_OFFSET)
-#else
-#define TASK_SIZE                      __UL(0xFFFFFFFFUL)
-#endif
-
-/* base of area at which unspecified mmaps will start */
-#ifdef CONFIG_BINFMT_ELF_FDPIC
-#define TASK_UNMAPPED_BASE             __UL(16 * 1024 * 1024)
-#else
-#define TASK_UNMAPPED_BASE             __UL(TASK_SIZE / 3)
-#endif
-
-#endif /* _ASM_MEM_LAYOUT_H */
diff --git a/include/asm-frv/mman.h b/include/asm-frv/mman.h
deleted file mode 100644 (file)
index b4371e9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __ASM_MMAN_H__
-#define __ASM_MMAN_H__
-
-#include <asm-generic/mman.h>
-
-#define MAP_GROWSDOWN  0x0100          /* stack-like segment */
-#define MAP_DENYWRITE  0x0800          /* ETXTBSY */
-#define MAP_EXECUTABLE 0x1000          /* mark it as an executable */
-#define MAP_LOCKED     0x2000          /* pages are locked */
-#define MAP_NORESERVE  0x4000          /* don't check for reservations */
-#define MAP_POPULATE   0x8000          /* populate (prefault) pagetables */
-#define MAP_NONBLOCK   0x10000         /* do not block on IO */
-
-#define MCL_CURRENT    1               /* lock all current mappings */
-#define MCL_FUTURE     2               /* lock all future mappings */
-
-#endif /* __ASM_MMAN_H__ */
-
diff --git a/include/asm-frv/mmu.h b/include/asm-frv/mmu.h
deleted file mode 100644 (file)
index 86ca0e8..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* mmu.h: memory management context for FR-V with or without MMU support
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_MMU_H
-#define _ASM_MMU_H
-
-typedef struct {
-#ifdef CONFIG_MMU
-       struct list_head id_link;               /* link in list of context ID owners */
-       unsigned short  id;                     /* MMU context ID */
-       unsigned short  id_busy;                /* true if ID is in CXNR */
-       unsigned long   itlb_cached_pge;        /* [SCR0] PGE cached for insn TLB handler */
-       unsigned long   itlb_ptd_mapping;       /* [DAMR4] PTD mapping for itlb cached PGE */
-       unsigned long   dtlb_cached_pge;        /* [SCR1] PGE cached for data TLB handler */
-       unsigned long   dtlb_ptd_mapping;       /* [DAMR5] PTD mapping for dtlb cached PGE */
-
-#else
-       unsigned long           end_brk;
-
-#endif
-
-#ifdef CONFIG_BINFMT_ELF_FDPIC
-       unsigned long   exec_fdpic_loadmap;
-       unsigned long   interp_fdpic_loadmap;
-#endif
-
-} mm_context_t;
-
-#ifdef CONFIG_MMU
-extern int __nongpreldata cxn_pinned;
-extern int cxn_pin_by_pid(pid_t pid);
-#endif
-
-#endif /* _ASM_MMU_H */
diff --git a/include/asm-frv/mmu_context.h b/include/asm-frv/mmu_context.h
deleted file mode 100644 (file)
index c7daa39..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* mmu_context.h: MMU context management routines
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_MMU_CONTEXT_H
-#define _ASM_MMU_CONTEXT_H
-
-#include <asm/setup.h>
-#include <asm/page.h>
-#include <asm/pgalloc.h>
-#include <asm-generic/mm_hooks.h>
-
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
-{
-}
-
-#ifdef CONFIG_MMU
-extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
-extern void change_mm_context(mm_context_t *old, mm_context_t *ctx, pgd_t *_pgd);
-extern void destroy_context(struct mm_struct *mm);
-
-#else
-#define init_new_context(tsk, mm)              ({ 0; })
-#define change_mm_context(old, ctx, _pml4)     do {} while(0)
-#define destroy_context(mm)                    do {} while(0)
-#endif
-
-#define switch_mm(prev, next, tsk)                                             \
-do {                                                                           \
-       if (prev != next)                                                       \
-               change_mm_context(&prev->context, &next->context, next->pgd);   \
-} while(0)
-
-#define activate_mm(prev, next)                                                \
-do {                                                                   \
-       change_mm_context(&prev->context, &next->context, next->pgd);   \
-} while(0)
-
-#define deactivate_mm(tsk, mm)                 \
-do {                                           \
-} while(0)
-
-#endif
diff --git a/include/asm-frv/module.h b/include/asm-frv/module.h
deleted file mode 100644 (file)
index 3d5c636..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* module.h: FRV module stuff
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_MODULE_H
-#define _ASM_MODULE_H
-
-struct mod_arch_specific
-{
-};
-
-#define Elf_Shdr       Elf32_Shdr
-#define Elf_Sym                Elf32_Sym
-#define Elf_Ehdr       Elf32_Ehdr
-
-/*
- * Include the architecture version.
- */
-#define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " "
-
-#endif /* _ASM_MODULE_H */
-
diff --git a/include/asm-frv/msgbuf.h b/include/asm-frv/msgbuf.h
deleted file mode 100644 (file)
index 97ceb55..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _ASM_MSGBUF_H
-#define _ASM_MSGBUF_H
-
-/*
- * The msqid64_ds structure for FR-V architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct msqid64_ds {
-       struct ipc64_perm       msg_perm;
-       __kernel_time_t         msg_stime;      /* last msgsnd time */
-       unsigned long           __unused1;
-       __kernel_time_t         msg_rtime;      /* last msgrcv time */
-       unsigned long           __unused2;
-       __kernel_time_t         msg_ctime;      /* last change time */
-       unsigned long           __unused3;
-       unsigned long           msg_cbytes;     /* current number of bytes on queue */
-       unsigned long           msg_qnum;       /* number of messages in queue */
-       unsigned long           msg_qbytes;     /* max number of bytes on queue */
-       __kernel_pid_t          msg_lspid;      /* pid of last msgsnd */
-       __kernel_pid_t          msg_lrpid;      /* last receive pid */
-       unsigned long           __unused4;
-       unsigned long           __unused5;
-};
-
-#endif /* _ASM_MSGBUF_H */
-
diff --git a/include/asm-frv/mutex.h b/include/asm-frv/mutex.h
deleted file mode 100644 (file)
index 458c1f7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Pull in the generic implementation for the mutex fastpath.
- *
- * TODO: implement optimized primitives instead, or leave the generic
- * implementation in place, or pick the atomic_xchg() based generic
- * implementation. (see asm-generic/mutex-xchg.h for details)
- */
-
-#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h
deleted file mode 100644 (file)
index bd9c220..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef _ASM_PAGE_H
-#define _ASM_PAGE_H
-
-#include <asm/virtconvert.h>
-#include <asm/mem-layout.h>
-#include <asm/sections.h>
-#include <asm/setup.h>
-
-#ifndef __ASSEMBLY__
-
-#define get_user_page(vaddr)                   __get_free_page(GFP_KERNEL)
-#define free_user_page(page, addr)             free_page(addr)
-
-#define clear_page(pgaddr)                     memset((pgaddr), 0, PAGE_SIZE)
-#define copy_page(to,from)                     memcpy((to), (from), PAGE_SIZE)
-
-#define clear_user_page(pgaddr, vaddr, page)   memset((pgaddr), 0, PAGE_SIZE)
-#define copy_user_page(vto, vfrom, vaddr, topg)        memcpy((vto), (vfrom), PAGE_SIZE)
-
-/*
- * These are used to make use of C type-checking..
- */
-typedef struct { unsigned long pte;    } pte_t;
-typedef struct { unsigned long ste[64];} pmd_t;
-typedef struct { pmd_t         pue[1]; } pud_t;
-typedef struct { pud_t         pge[1]; } pgd_t;
-typedef struct { unsigned long pgprot; } pgprot_t;
-typedef struct page *pgtable_t;
-
-#define pte_val(x)     ((x).pte)
-#define pmd_val(x)     ((x).ste[0])
-#define pud_val(x)     ((x).pue[0])
-#define pgd_val(x)     ((x).pge[0])
-#define pgprot_val(x)  ((x).pgprot)
-
-#define __pte(x)       ((pte_t) { (x) } )
-#define __pmd(x)       ((pmd_t) { (x) } )
-#define __pud(x)       ((pud_t) { (x) } )
-#define __pgd(x)       ((pgd_t) { (x) } )
-#define __pgprot(x)    ((pgprot_t) { (x) } )
-#define PTE_MASK       PAGE_MASK
-
-#define devmem_is_allowed(pfn) 1
-
-#define __pa(vaddr)            virt_to_phys((void *) (unsigned long) (vaddr))
-#define __va(paddr)            phys_to_virt((unsigned long) (paddr))
-
-#define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)
-
-extern unsigned long max_low_pfn;
-extern unsigned long min_low_pfn;
-extern unsigned long max_pfn;
-
-#ifdef CONFIG_MMU
-#define pfn_valid(pfn)         ((pfn) < max_mapnr)
-#else
-#define ARCH_PFN_OFFSET                (PAGE_OFFSET >> PAGE_SHIFT)
-#define pfn_valid(pfn)         ((pfn) >= min_low_pfn && (pfn) < max_low_pfn)
-
-#endif
-
-#define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
-#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
-
-
-#ifdef CONFIG_MMU
-#define VM_DATA_DEFAULT_FLAGS \
-       (VM_READ | VM_WRITE | \
-       ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
-                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-#endif
-
-#endif /* __ASSEMBLY__ */
-
-#include <asm-generic/memory_model.h>
-#include <asm-generic/page.h>
-
-#endif /* _ASM_PAGE_H */
diff --git a/include/asm-frv/param.h b/include/asm-frv/param.h
deleted file mode 100644 (file)
index 6859dd5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _ASM_PARAM_H
-#define _ASM_PARAM_H
-
-#ifdef __KERNEL__
-#define HZ             CONFIG_HZ       /* Internal kernel timer frequency */
-#define USER_HZ                100             /* .. some user interfaces are in "ticks" */
-#define CLOCKS_PER_SEC (USER_HZ)       /* like times() */
-#endif
-
-#ifndef HZ
-#define HZ 100
-#endif
-
-#define EXEC_PAGESIZE  16384
-
-#ifndef NOGROUP
-#define NOGROUP                (-1)
-#endif
-
-#define MAXHOSTNAMELEN         64      /* max length of hostname */
-
-#endif /* _ASM_PARAM_H */
diff --git a/include/asm-frv/pci.h b/include/asm-frv/pci.h
deleted file mode 100644 (file)
index 585d9b4..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/* pci.h: FR-V specific PCI declarations
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * - Derived from include/asm-m68k/pci.h
- *
- * 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.
- */
-
-#ifndef ASM_PCI_H
-#define        ASM_PCI_H
-
-#include <linux/mm.h>
-#include <asm/scatterlist.h>
-#include <asm-generic/pci-dma-compat.h>
-#include <asm-generic/pci.h>
-
-struct pci_dev;
-
-#define pcibios_assign_all_busses()    0
-
-extern void pcibios_set_master(struct pci_dev *dev);
-
-extern void pcibios_penalize_isa_irq(int irq);
-
-#ifdef CONFIG_MMU
-extern void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle);
-extern void consistent_free(void *vaddr);
-extern void consistent_sync(void *vaddr, size_t size, int direction);
-extern void consistent_sync_page(struct page *page, unsigned long offset,
-                                size_t size, int direction);
-#endif
-
-extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
-                                 dma_addr_t *dma_handle);
-
-extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
-                               void *vaddr, dma_addr_t dma_handle);
-
-/* Return the index of the PCI controller for device PDEV. */
-#define pci_controller_num(PDEV)       (0)
-
-/* The PCI address space does equal the physical memory
- * address space.  The networking and block device layers use
- * this boolean for bounce buffer decisions.
- */
-#define PCI_DMA_BUS_IS_PHYS    (1)
-
-/* pci_unmap_{page,single} is a nop so... */
-#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
-#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
-#define pci_unmap_addr(PTR, ADDR_NAME)         (0)
-#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)        do { } while (0)
-#define pci_unmap_len(PTR, LEN_NAME)           (0)
-#define pci_unmap_len_set(PTR, LEN_NAME, VAL)  do { } while (0)
-
-#ifdef CONFIG_PCI
-static inline void pci_dma_burst_advice(struct pci_dev *pdev,
-                                       enum pci_dma_burst_strategy *strat,
-                                       unsigned long *strategy_parameter)
-{
-       *strat = PCI_DMA_BURST_INFINITY;
-       *strategy_parameter = ~0UL;
-}
-#endif
-
-/*
- *     These are pretty much arbitary with the CoMEM implementation.
- *     We have the whole address space to ourselves.
- */
-#define PCIBIOS_MIN_IO         0x100
-#define PCIBIOS_MIN_MEM                0x00010000
-
-/* Make physical memory consistent for a single
- * streaming mode DMA translation after a transfer.
- *
- * If you perform a pci_map_single() but wish to interrogate the
- * buffer using the cpu, yet do not wish to teardown the PCI dma
- * mapping, you must call this function before doing so.  At the
- * next point you give the PCI dma address back to the card, the
- * device again owns the buffer.
- */
-static inline void pci_dma_sync_single(struct pci_dev *hwdev,
-                                      dma_addr_t dma_handle,
-                                      size_t size, int direction)
-{
-       if (direction == PCI_DMA_NONE)
-                BUG();
-
-       frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle),
-                           (unsigned long)bus_to_virt(dma_handle) + size);
-}
-
-/* Make physical memory consistent for a set of streaming
- * mode DMA translations after a transfer.
- *
- * The same as pci_dma_sync_single but for a scatter-gather list,
- * same rules and usage.
- */
-static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
-                                  struct scatterlist *sg,
-                                  int nelems, int direction)
-{
-       int i;
-
-       if (direction == PCI_DMA_NONE)
-                BUG();
-
-       for (i = 0; i < nelems; i++)
-               frv_cache_wback_inv(sg_dma_address(&sg[i]),
-                                   sg_dma_address(&sg[i])+sg_dma_len(&sg[i]));
-}
-
-
-#endif
diff --git a/include/asm-frv/percpu.h b/include/asm-frv/percpu.h
deleted file mode 100644 (file)
index 2cad3f8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __ASM_PERCPU_H
-#define __ASM_PERCPU_H
-
-#include <asm-generic/percpu.h>
-
-#endif /* __ASM_PERCPU_H */
diff --git a/include/asm-frv/pgalloc.h b/include/asm-frv/pgalloc.h
deleted file mode 100644 (file)
index 971e6ad..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* pgalloc.h: Page allocation routines for FRV
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- *
- * Derived from:
- *     include/asm-m68knommu/pgalloc.h
- *     include/asm-i386/pgalloc.h
- */
-#ifndef _ASM_PGALLOC_H
-#define _ASM_PGALLOC_H
-
-#include <asm/setup.h>
-#include <asm/virtconvert.h>
-
-#ifdef CONFIG_MMU
-
-#define pmd_populate_kernel(mm, pmd, pte) __set_pmd(pmd, __pa(pte) | _PAGE_TABLE)
-#define pmd_populate(MM, PMD, PAGE)                                            \
-do {                                                                           \
-       __set_pmd((PMD), page_to_pfn(PAGE) << PAGE_SHIFT | _PAGE_TABLE);        \
-} while(0)
-#define pmd_pgtable(pmd) pmd_page(pmd)
-
-/*
- * Allocate and free page tables.
- */
-
-extern pgd_t *pgd_alloc(struct mm_struct *);
-extern void pgd_free(struct mm_struct *mm, pgd_t *);
-
-extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
-
-extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long);
-
-static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
-{
-       free_page((unsigned long)pte);
-}
-
-static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
-{
-       pgtable_page_dtor(pte);
-       __free_page(pte);
-}
-
-#define __pte_free_tlb(tlb,pte)                                \
-do {                                                   \
-       pgtable_page_dtor(pte);                         \
-       tlb_remove_page((tlb),(pte));                   \
-} while (0)
-
-/*
- * allocating and freeing a pmd is trivial: the 1-entry pmd is
- * inside the pgd, so has no extra memory associated with it.
- * (In the PAE case we free the pmds as part of the pgd.)
- */
-#define pmd_alloc_one(mm, addr)                ({ BUG(); ((pmd_t *) 2); })
-#define pmd_free(mm, x)                        do { } while (0)
-#define __pmd_free_tlb(tlb,x)          do { } while (0)
-
-#endif /* CONFIG_MMU */
-
-#endif /* _ASM_PGALLOC_H */
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h
deleted file mode 100644 (file)
index e16fdb1..0000000
+++ /dev/null
@@ -1,551 +0,0 @@
-/* pgtable.h: FR-V page table mangling
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- *
- * Derived from:
- *     include/asm-m68knommu/pgtable.h
- *     include/asm-i386/pgtable.h
- */
-
-#ifndef _ASM_PGTABLE_H
-#define _ASM_PGTABLE_H
-
-#include <asm/mem-layout.h>
-#include <asm/setup.h>
-#include <asm/processor.h>
-
-#ifndef __ASSEMBLY__
-#include <linux/threads.h>
-#include <linux/slab.h>
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <linux/sched.h>
-struct vm_area_struct;
-#endif
-
-#ifndef __ASSEMBLY__
-#if defined(CONFIG_HIGHPTE)
-typedef unsigned long pte_addr_t;
-#else
-typedef pte_t *pte_addr_t;
-#endif
-#endif
-
-/*****************************************************************************/
-/*
- * MMU-less operation case first
- */
-#ifndef CONFIG_MMU
-
-#define pgd_present(pgd)       (1)             /* pages are always present on NO_MM */
-#define pgd_none(pgd)          (0)
-#define pgd_bad(pgd)           (0)
-#define pgd_clear(pgdp)
-#define kern_addr_valid(addr)  (1)
-#define        pmd_offset(a, b)        ((void *) 0)
-
-#define PAGE_NONE              __pgprot(0)     /* these mean nothing to NO_MM */
-#define PAGE_SHARED            __pgprot(0)     /* these mean nothing to NO_MM */
-#define PAGE_COPY              __pgprot(0)     /* these mean nothing to NO_MM */
-#define PAGE_READONLY          __pgprot(0)     /* these mean nothing to NO_MM */
-#define PAGE_KERNEL            __pgprot(0)     /* these mean nothing to NO_MM */
-
-#define __swp_type(x)          (0)
-#define __swp_offset(x)                (0)
-#define __swp_entry(typ,off)   ((swp_entry_t) { ((typ) | ((off) << 7)) })
-#define __pte_to_swp_entry(pte)        ((swp_entry_t) { pte_val(pte) })
-#define __swp_entry_to_pte(x)  ((pte_t) { (x).val })
-
-#ifndef __ASSEMBLY__
-static inline int pte_file(pte_t pte) { return 0; }
-#endif
-
-#define ZERO_PAGE(vaddr)       ({ BUG(); NULL; })
-
-#define swapper_pg_dir         ((pgd_t *) NULL)
-
-#define pgtable_cache_init()           do {} while (0)
-#define arch_enter_lazy_mmu_mode()     do {} while (0)
-#define arch_leave_lazy_mmu_mode()     do {} while (0)
-#define arch_enter_lazy_cpu_mode()     do {} while (0)
-#define arch_leave_lazy_cpu_mode()     do {} while (0)
-
-#else /* !CONFIG_MMU */
-/*****************************************************************************/
-/*
- * then MMU operation
- */
-
-/*
- * ZERO_PAGE is a global shared page that is always zero: used
- * for zero-mapped memory areas etc..
- */
-#ifndef __ASSEMBLY__
-extern unsigned long empty_zero_page;
-#define ZERO_PAGE(vaddr)       virt_to_page(empty_zero_page)
-#endif
-
-/*
- * we use 2-level page tables, folding the PMD (mid-level table) into the PGE (top-level entry)
- * [see Documentation/frv/mmu-layout.txt]
- *
- * Page Directory:
- *  - Size: 16KB
- *  - 64 PGEs per PGD
- *  - Each PGE holds 1 PUD and covers 64MB
- *
- * Page Upper Directory:
- *  - Size: 256B
- *  - 1 PUE per PUD
- *  - Each PUE holds 1 PMD and covers 64MB
- *
- * Page Mid-Level Directory
- *  - Size: 256B
- *  - 1 PME per PMD
- *  - Each PME holds 64 STEs, all of which point to separate chunks of the same Page Table
- *  - All STEs are instantiated at the same time
- *
- * Page Table
- *  - Size: 16KB
- *  - 4096 PTEs per PT
- *  - Each Linux PT is subdivided into 64 FR451 PT's, each of which holds 64 entries
- *
- * Pages
- *  - Size: 4KB
- *
- * total PTEs
- *     = 1 PML4E * 64 PGEs * 1 PUEs * 1 PMEs * 4096 PTEs
- *     = 1 PML4E * 64 PGEs * 64 STEs * 64 PTEs/FR451-PT
- *     = 262144 (or 256 * 1024)
- */
-#define PGDIR_SHIFT            26
-#define PGDIR_SIZE             (1UL << PGDIR_SHIFT)
-#define PGDIR_MASK             (~(PGDIR_SIZE - 1))
-#define PTRS_PER_PGD           64
-
-#define PUD_SHIFT              26
-#define PTRS_PER_PUD           1
-#define PUD_SIZE               (1UL << PUD_SHIFT)
-#define PUD_MASK               (~(PUD_SIZE - 1))
-#define PUE_SIZE               256
-
-#define PMD_SHIFT              26
-#define PMD_SIZE               (1UL << PMD_SHIFT)
-#define PMD_MASK               (~(PMD_SIZE - 1))
-#define PTRS_PER_PMD           1
-#define PME_SIZE               256
-
-#define __frv_PT_SIZE          256
-
-#define PTRS_PER_PTE           4096
-
-#define USER_PGDS_IN_LAST_PML4 (TASK_SIZE / PGDIR_SIZE)
-#define FIRST_USER_ADDRESS     0
-
-#define USER_PGD_PTRS          (PAGE_OFFSET >> PGDIR_SHIFT)
-#define KERNEL_PGD_PTRS                (PTRS_PER_PGD - USER_PGD_PTRS)
-
-#define TWOLEVEL_PGDIR_SHIFT   26
-#define BOOT_USER_PGD_PTRS     (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
-#define BOOT_KERNEL_PGD_PTRS   (PTRS_PER_PGD - BOOT_USER_PGD_PTRS)
-
-#ifndef __ASSEMBLY__
-
-extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
-
-#define pte_ERROR(e) \
-       printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte)
-#define pmd_ERROR(e) \
-       printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
-#define pud_ERROR(e) \
-       printk("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pmd_val(pud_val(e)))
-#define pgd_ERROR(e) \
-       printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pmd_val(pud_val(pgd_val(e))))
-
-/*
- * Certain architectures need to do special things when PTEs
- * within a page table are directly modified.  Thus, the following
- * hook is made available.
- */
-#define set_pte(pteptr, pteval)                                \
-do {                                                   \
-       *(pteptr) = (pteval);                           \
-       asm volatile("dcf %M0" :: "U"(*pteptr));        \
-} while(0)
-#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
-
-/*
- * pgd_offset() returns a (pgd_t *)
- * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
- */
-#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
-
-/*
- * a shortcut which implies the use of the kernel's pgd, instead
- * of a process's
- */
-#define pgd_offset_k(address) pgd_offset(&init_mm, address)
-
-/*
- * The "pgd_xxx()" functions here are trivial for a folded two-level
- * setup: the pud is never bad, and a pud always exists (as it's folded
- * into the pgd entry)
- */
-static inline int pgd_none(pgd_t pgd)          { return 0; }
-static inline int pgd_bad(pgd_t pgd)           { return 0; }
-static inline int pgd_present(pgd_t pgd)       { return 1; }
-static inline void pgd_clear(pgd_t *pgd)       { }
-
-#define pgd_populate(mm, pgd, pud)             do { } while (0)
-/*
- * (puds are folded into pgds so this doesn't get actually called,
- * but the define is needed for a generic inline function.)
- */
-#define set_pgd(pgdptr, pgdval)                                \
-do {                                                   \
-       memcpy((pgdptr), &(pgdval), sizeof(pgd_t));     \
-       asm volatile("dcf %M0" :: "U"(*(pgdptr)));      \
-} while(0)
-
-static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
-{
-       return (pud_t *) pgd;
-}
-
-#define pgd_page(pgd)                          (pud_page((pud_t){ pgd }))
-#define pgd_page_vaddr(pgd)                    (pud_page_vaddr((pud_t){ pgd }))
-
-/*
- * allocating and freeing a pud is trivial: the 1-entry pud is
- * inside the pgd, so has no extra memory associated with it.
- */
-#define pud_alloc_one(mm, address)             NULL
-#define pud_free(mm, x)                                do { } while (0)
-#define __pud_free_tlb(tlb, x)                 do { } while (0)
-
-/*
- * The "pud_xxx()" functions here are trivial for a folded two-level
- * setup: the pmd is never bad, and a pmd always exists (as it's folded
- * into the pud entry)
- */
-static inline int pud_none(pud_t pud)          { return 0; }
-static inline int pud_bad(pud_t pud)           { return 0; }
-static inline int pud_present(pud_t pud)       { return 1; }
-static inline void pud_clear(pud_t *pud)       { }
-
-#define pud_populate(mm, pmd, pte)             do { } while (0)
-
-/*
- * (pmds are folded into puds so this doesn't get actually called,
- * but the define is needed for a generic inline function.)
- */
-#define set_pud(pudptr, pudval)                        set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval })
-
-#define pud_page(pud)                          (pmd_page((pmd_t){ pud }))
-#define pud_page_vaddr(pud)                    (pmd_page_vaddr((pmd_t){ pud }))
-
-/*
- * (pmds are folded into pgds so this doesn't get actually called,
- * but the define is needed for a generic inline function.)
- */
-extern void __set_pmd(pmd_t *pmdptr, unsigned long __pmd);
-
-#define set_pmd(pmdptr, pmdval)                        \
-do {                                           \
-       __set_pmd((pmdptr), (pmdval).ste[0]);   \
-} while(0)
-
-#define __pmd_index(address)                   0
-
-static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address)
-{
-       return (pmd_t *) dir + __pmd_index(address);
-}
-
-#define pte_same(a, b)         ((a).pte == (b).pte)
-#define pte_page(x)            (mem_map + ((unsigned long)(((x).pte >> PAGE_SHIFT))))
-#define pte_none(x)            (!(x).pte)
-#define pte_pfn(x)             ((unsigned long)(((x).pte >> PAGE_SHIFT)))
-#define pfn_pte(pfn, prot)     __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
-#define pfn_pmd(pfn, prot)     __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
-
-#define VMALLOC_VMADDR(x)      ((unsigned long) (x))
-
-#endif /* !__ASSEMBLY__ */
-
-/*
- * control flags in AMPR registers and TLB entries
- */
-#define _PAGE_BIT_PRESENT      xAMPRx_V_BIT
-#define _PAGE_BIT_WP           DAMPRx_WP_BIT
-#define _PAGE_BIT_NOCACHE      xAMPRx_C_BIT
-#define _PAGE_BIT_SUPER                xAMPRx_S_BIT
-#define _PAGE_BIT_ACCESSED     xAMPRx_RESERVED8_BIT
-#define _PAGE_BIT_DIRTY                xAMPRx_M_BIT
-#define _PAGE_BIT_NOTGLOBAL    xAMPRx_NG_BIT
-
-#define _PAGE_PRESENT          xAMPRx_V
-#define _PAGE_WP               DAMPRx_WP
-#define _PAGE_NOCACHE          xAMPRx_C
-#define _PAGE_SUPER            xAMPRx_S
-#define _PAGE_ACCESSED         xAMPRx_RESERVED8        /* accessed if set */
-#define _PAGE_DIRTY            xAMPRx_M
-#define _PAGE_NOTGLOBAL                xAMPRx_NG
-
-#define _PAGE_RESERVED_MASK    (xAMPRx_RESERVED8 | xAMPRx_RESERVED13)
-
-#define _PAGE_FILE             0x002   /* set:pagecache unset:swap */
-#define _PAGE_PROTNONE         0x000   /* If not present */
-
-#define _PAGE_CHG_MASK         (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
-
-#define __PGPROT_BASE \
-       (_PAGE_PRESENT | xAMPRx_SS_16Kb | xAMPRx_D | _PAGE_NOTGLOBAL | _PAGE_ACCESSED)
-
-#define PAGE_NONE      __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
-#define PAGE_SHARED    __pgprot(__PGPROT_BASE)
-#define PAGE_COPY      __pgprot(__PGPROT_BASE | _PAGE_WP)
-#define PAGE_READONLY  __pgprot(__PGPROT_BASE | _PAGE_WP)
-
-#define __PAGE_KERNEL          (__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY)
-#define __PAGE_KERNEL_NOCACHE  (__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY | _PAGE_NOCACHE)
-#define __PAGE_KERNEL_RO       (__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY | _PAGE_WP)
-
-#define MAKE_GLOBAL(x) __pgprot((x) & ~_PAGE_NOTGLOBAL)
-
-#define PAGE_KERNEL            MAKE_GLOBAL(__PAGE_KERNEL)
-#define PAGE_KERNEL_RO         MAKE_GLOBAL(__PAGE_KERNEL_RO)
-#define PAGE_KERNEL_NOCACHE    MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
-
-#define _PAGE_TABLE            (_PAGE_PRESENT | xAMPRx_SS_16Kb)
-
-#ifndef __ASSEMBLY__
-
-/*
- * The FR451 can do execute protection by virtue of having separate TLB miss handlers for
- * instruction access and for data access. However, we don't have enough reserved bits to say
- * "execute only", so we don't bother. If you can read it, you can execute it and vice versa.
- */
-#define __P000 PAGE_NONE
-#define __P001 PAGE_READONLY
-#define __P010 PAGE_COPY
-#define __P011 PAGE_COPY
-#define __P100 PAGE_READONLY
-#define __P101 PAGE_READONLY
-#define __P110 PAGE_COPY
-#define __P111 PAGE_COPY
-
-#define __S000 PAGE_NONE
-#define __S001 PAGE_READONLY
-#define __S010 PAGE_SHARED
-#define __S011 PAGE_SHARED
-#define __S100 PAGE_READONLY
-#define __S101 PAGE_READONLY
-#define __S110 PAGE_SHARED
-#define __S111 PAGE_SHARED
-
-/*
- * Define this to warn about kernel memory accesses that are
- * done without a 'access_ok(VERIFY_WRITE,..)'
- */
-#undef TEST_ACCESS_OK
-
-#define pte_present(x) (pte_val(x) & _PAGE_PRESENT)
-#define pte_clear(mm,addr,xp)  do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
-
-#define pmd_none(x)    (!pmd_val(x))
-#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
-#define        pmd_bad(x)      (pmd_val(x) & xAMPRx_SS)
-#define pmd_clear(xp)  do { __set_pmd(xp, 0); } while(0)
-
-#define pmd_page_vaddr(pmd) \
-       ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
-
-#ifndef CONFIG_DISCONTIGMEM
-#define pmd_page(pmd)  (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
-#endif
-
-#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
-
-/*
- * The following only work if pte_present() is true.
- * Undefined behaviour if not..
- */
-static inline int pte_dirty(pte_t pte)         { return (pte).pte & _PAGE_DIRTY; }
-static inline int pte_young(pte_t pte)         { return (pte).pte & _PAGE_ACCESSED; }
-static inline int pte_write(pte_t pte)         { return !((pte).pte & _PAGE_WP); }
-static inline int pte_special(pte_t pte)       { return 0; }
-
-static inline pte_t pte_mkclean(pte_t pte)     { (pte).pte &= ~_PAGE_DIRTY; return pte; }
-static inline pte_t pte_mkold(pte_t pte)       { (pte).pte &= ~_PAGE_ACCESSED; return pte; }
-static inline pte_t pte_wrprotect(pte_t pte)   { (pte).pte |= _PAGE_WP; return pte; }
-static inline pte_t pte_mkdirty(pte_t pte)     { (pte).pte |= _PAGE_DIRTY; return pte; }
-static inline pte_t pte_mkyoung(pte_t pte)     { (pte).pte |= _PAGE_ACCESSED; return pte; }
-static inline pte_t pte_mkwrite(pte_t pte)     { (pte).pte &= ~_PAGE_WP; return pte; }
-static inline pte_t pte_mkspecial(pte_t pte)   { return pte; }
-
-static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
-{
-       int i = test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep);
-       asm volatile("dcf %M0" :: "U"(*ptep));
-       return i;
-}
-
-static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
-{
-       unsigned long x = xchg(&ptep->pte, 0);
-       asm volatile("dcf %M0" :: "U"(*ptep));
-       return __pte(x);
-}
-
-static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
-{
-       set_bit(_PAGE_BIT_WP, ptep);
-       asm volatile("dcf %M0" :: "U"(*ptep));
-}
-
-/*
- * Macro to mark a page protection value as "uncacheable"
- */
-#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NOCACHE))
-
-/*
- * Conversion functions: convert a page and protection to a page entry,
- * and a page entry and page directory to the page they refer to.
- */
-
-#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
-#define mk_pte_huge(entry)     ((entry).pte_low |= _PAGE_PRESENT | _PAGE_PSE)
-
-/* This takes a physical page address that is used by the remapping functions */
-#define mk_pte_phys(physpage, pgprot)  pfn_pte((physpage) >> PAGE_SHIFT, pgprot)
-
-static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
-{
-       pte.pte &= _PAGE_CHG_MASK;
-       pte.pte |= pgprot_val(newprot);
-       return pte;
-}
-
-/* to find an entry in a page-table-directory. */
-#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
-#define pgd_index_k(addr) pgd_index(addr)
-
-/* Find an entry in the bottom-level page table.. */
-#define __pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
-
-/*
- * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
- *
- * this macro returns the index of the entry in the pte page which would
- * control the given virtual address
- */
-#define pte_index(address) \
-               (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
-#define pte_offset_kernel(dir, address) \
-       ((pte_t *) pmd_page_vaddr(*(dir)) +  pte_index(address))
-
-#if defined(CONFIG_HIGHPTE)
-#define pte_offset_map(dir, address) \
-       ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address))
-#define pte_offset_map_nested(dir, address) \
-       ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address))
-#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
-#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1)
-#else
-#define pte_offset_map(dir, address) \
-       ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address))
-#define pte_offset_map_nested(dir, address) pte_offset_map((dir), (address))
-#define pte_unmap(pte) do { } while (0)
-#define pte_unmap_nested(pte) do { } while (0)
-#endif
-
-/*
- * Handle swap and file entries
- * - the PTE is encoded in the following format:
- *     bit 0:          Must be 0 (!_PAGE_PRESENT)
- *     bit 1:          Type: 0 for swap, 1 for file (_PAGE_FILE)
- *     bits 2-7:       Swap type
- *     bits 8-31:      Swap offset
- *     bits 2-31:      File pgoff
- */
-#define __swp_type(x)                  (((x).val >> 2) & 0x1f)
-#define __swp_offset(x)                        ((x).val >> 8)
-#define __swp_entry(type, offset)      ((swp_entry_t) { ((type) << 2) | ((offset) << 8) })
-#define __pte_to_swp_entry(_pte)       ((swp_entry_t) { (_pte).pte })
-#define __swp_entry_to_pte(x)          ((pte_t) { (x).val })
-
-static inline int pte_file(pte_t pte)
-{
-       return pte.pte & _PAGE_FILE;
-}
-
-#define PTE_FILE_MAX_BITS      29
-
-#define pte_to_pgoff(PTE)      ((PTE).pte >> 2)
-#define pgoff_to_pte(off)      __pte((off) << 2 | _PAGE_FILE)
-
-/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-#define PageSkip(page)         (0)
-#define kern_addr_valid(addr)  (1)
-
-#define io_remap_pfn_range(vma, vaddr, pfn, size, prot)                \
-               remap_pfn_range(vma, vaddr, pfn, size, prot)
-
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
-#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
-#define __HAVE_ARCH_PTEP_SET_WRPROTECT
-#define __HAVE_ARCH_PTE_SAME
-#include <asm-generic/pgtable.h>
-
-/*
- * preload information about a newly instantiated PTE into the SCR0/SCR1 PGE cache
- */
-static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
-{
-       struct mm_struct *mm;
-       unsigned long ampr;
-
-       mm = current->mm;
-       if (mm) {
-               pgd_t *pge = pgd_offset(mm, address);
-               pud_t *pue = pud_offset(pge, address);
-               pmd_t *pme = pmd_offset(pue, address);
-
-               ampr = pme->ste[0] & 0xffffff00;
-               ampr |= xAMPRx_L | xAMPRx_SS_16Kb | xAMPRx_S | xAMPRx_C |
-                       xAMPRx_V;
-       } else {
-               address = ULONG_MAX;
-               ampr = 0;
-       }
-
-       asm volatile("movgs %0,scr0\n"
-                    "movgs %0,scr1\n"
-                    "movgs %1,dampr4\n"
-                    "movgs %1,dampr5\n"
-                    :
-                    : "r"(address), "r"(ampr)
-                    );
-}
-
-#ifdef CONFIG_PROC_FS
-extern char *proc_pid_status_frv_cxnr(struct mm_struct *mm, char *buffer);
-#endif
-
-extern void __init pgtable_cache_init(void);
-
-#endif /* !__ASSEMBLY__ */
-#endif /* !CONFIG_MMU */
-
-#ifndef __ASSEMBLY__
-extern void __init paging_init(void);
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_PGTABLE_H */
diff --git a/include/asm-frv/poll.h b/include/asm-frv/poll.h
deleted file mode 100644 (file)
index 0d01479..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_POLL_H
-#define _ASM_POLL_H
-
-#define POLLWRNORM     POLLOUT
-#define POLLWRBAND     256
-
-#include <asm-generic/poll.h>
-
-#undef POLLREMOVE
-
-#endif
-
diff --git a/include/asm-frv/posix_types.h b/include/asm-frv/posix_types.h
deleted file mode 100644 (file)
index a9f1f5b..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef _ASM_POSIX_TYPES_H
-#define _ASM_POSIX_TYPES_H
-
-/*
- * This file is generally used by user-level software, so you need to
- * be a little careful about namespace pollution etc.  Also, we cannot
- * assume GCC is being used.
- */
-
-typedef unsigned long  __kernel_ino_t;
-typedef unsigned short __kernel_mode_t;
-typedef unsigned short __kernel_nlink_t;
-typedef long           __kernel_off_t;
-typedef int            __kernel_pid_t;
-typedef unsigned short __kernel_ipc_pid_t;
-typedef unsigned short __kernel_uid_t;
-typedef unsigned short __kernel_gid_t;
-typedef unsigned int   __kernel_size_t;
-typedef int            __kernel_ssize_t;
-typedef int            __kernel_ptrdiff_t;
-typedef long           __kernel_time_t;
-typedef long           __kernel_suseconds_t;
-typedef long           __kernel_clock_t;
-typedef int            __kernel_timer_t;
-typedef int            __kernel_clockid_t;
-typedef int            __kernel_daddr_t;
-typedef char *         __kernel_caddr_t;
-typedef unsigned short __kernel_uid16_t;
-typedef unsigned short __kernel_gid16_t;
-typedef unsigned int   __kernel_uid32_t;
-typedef unsigned int   __kernel_gid32_t;
-
-typedef unsigned short __kernel_old_uid_t;
-typedef unsigned short __kernel_old_gid_t;
-typedef unsigned short __kernel_old_dev_t;
-
-#ifdef __GNUC__
-typedef long long      __kernel_loff_t;
-#endif
-
-typedef struct {
-       int     val[2];
-} __kernel_fsid_t;
-
-#if defined(__KERNEL__)
-
-#undef __FD_SET
-#define        __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
-
-#undef __FD_CLR
-#define        __FD_CLR(d, set)        ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
-
-#undef __FD_ISSET
-#define        __FD_ISSET(d, set)      (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d)))
-
-#undef __FD_ZERO
-#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
-
-#endif /* defined(__KERNEL__) */
-
-#endif
-
diff --git a/include/asm-frv/processor.h b/include/asm-frv/processor.h
deleted file mode 100644 (file)
index 3744f2e..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/* processor.h: FRV processor definitions
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_PROCESSOR_H
-#define _ASM_PROCESSOR_H
-
-#include <asm/mem-layout.h>
-
-#ifndef __ASSEMBLY__
-/*
- * Default implementation of macro that returns current
- * instruction pointer ("program counter").
- */
-#define current_text_addr() ({ __label__ _l; _l: &&_l;})
-
-#include <linux/compiler.h>
-#include <linux/linkage.h>
-#include <asm/sections.h>
-#include <asm/segment.h>
-#include <asm/fpu.h>
-#include <asm/registers.h>
-#include <asm/ptrace.h>
-#include <asm/current.h>
-#include <asm/cache.h>
-
-/* Forward declaration, a strange C thing */
-struct task_struct;
-
-/*
- *  CPU type and hardware bug flags. Kept separately for each CPU.
- */
-struct cpuinfo_frv {
-#ifdef CONFIG_MMU
-       unsigned long   *pgd_quick;
-       unsigned long   *pte_quick;
-       unsigned long   pgtable_cache_sz;
-#endif
-} __cacheline_aligned;
-
-extern struct cpuinfo_frv __nongprelbss boot_cpu_data;
-
-#define cpu_data               (&boot_cpu_data)
-#define current_cpu_data       boot_cpu_data
-
-/*
- * Bus types
- */
-#define EISA_bus 0
-#define MCA_bus 0
-
-struct thread_struct {
-       struct pt_regs          *frame;         /* [GR28] exception frame ptr for this thread */
-       struct task_struct      *curr;          /* [GR29] current pointer for this thread */
-       unsigned long           sp;             /* [GR1 ] kernel stack pointer */
-       unsigned long           fp;             /* [GR2 ] kernel frame pointer */
-       unsigned long           lr;             /* link register */
-       unsigned long           pc;             /* program counter */
-       unsigned long           gr[12];         /* [GR16-GR27] */
-       unsigned long           sched_lr;       /* LR from schedule() */
-
-       union {
-               struct pt_regs          *frame0;        /* top (user) stack frame */
-               struct user_context     *user;          /* userspace context */
-       };
-} __attribute__((aligned(8)));
-
-extern struct pt_regs *__kernel_frame0_ptr;
-extern struct task_struct *__kernel_current_task;
-
-#endif
-
-#ifndef __ASSEMBLY__
-#define INIT_THREAD_FRAME0 \
-       ((struct pt_regs *) \
-       (sizeof(init_stack) + (unsigned long) init_stack - sizeof(struct user_context)))
-
-#define INIT_THREAD {                          \
-       NULL,                                   \
-       (struct task_struct *) init_stack,      \
-       0, 0, 0, 0,                             \
-       { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \
-       0,                                      \
-       { INIT_THREAD_FRAME0 },                 \
-}
-
-/*
- * do necessary setup to start up a newly executed thread.
- * - need to discard the frame stacked by init() invoking the execve syscall
- */
-#define start_thread(_regs, _pc, _usp)                 \
-do {                                                   \
-       set_fs(USER_DS); /* reads from user space */    \
-       __frame = __kernel_frame0_ptr;                  \
-       __frame->pc     = (_pc);                        \
-       __frame->psr    &= ~PSR_S;                      \
-       __frame->sp     = (_usp);                       \
-} while(0)
-
-extern void prepare_to_copy(struct task_struct *tsk);
-
-/* Free all resources held by a thread. */
-static inline void release_thread(struct task_struct *dead_task)
-{
-}
-
-extern asmlinkage int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
-extern asmlinkage void save_user_regs(struct user_context *target);
-extern asmlinkage void *restore_user_regs(const struct user_context *target, ...);
-
-#define copy_segments(tsk, mm)         do { } while (0)
-#define release_segments(mm)           do { } while (0)
-#define forget_segments()              do { } while (0)
-
-/*
- * Free current thread data structures etc..
- */
-static inline void exit_thread(void)
-{
-}
-
-/*
- * Return saved PC of a blocked thread.
- */
-extern unsigned long thread_saved_pc(struct task_struct *tsk);
-
-unsigned long get_wchan(struct task_struct *p);
-
-#define        KSTK_EIP(tsk)   ((tsk)->thread.frame0->pc)
-#define        KSTK_ESP(tsk)   ((tsk)->thread.frame0->sp)
-
-/* Allocation and freeing of basic task resources. */
-extern struct task_struct *alloc_task_struct(void);
-extern void free_task_struct(struct task_struct *p);
-
-#define cpu_relax()    barrier()
-
-/* data cache prefetch */
-#define ARCH_HAS_PREFETCH
-static inline void prefetch(const void *x)
-{
-       asm volatile("dcpl %0,gr0,#0" : : "r"(x));
-}
-
-#endif /* __ASSEMBLY__ */
-#endif /* _ASM_PROCESSOR_H */
diff --git a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h
deleted file mode 100644 (file)
index cf69340..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ptrace.h: ptrace() relevant definitions
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_PTRACE_H
-#define _ASM_PTRACE_H
-
-#include <asm/registers.h>
-#ifdef __KERNEL__
-#include <asm/irq_regs.h>
-
-#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
-#endif
-
-
-#define PT_PSR         0
-#define        PT_ISR          1
-#define PT_CCR         2
-#define PT_CCCR                3
-#define PT_LR          4
-#define PT_LCR         5
-#define PT_PC          6
-
-#define PT__STATUS     7       /* exception status */
-#define PT_SYSCALLNO   8       /* syscall number or -1 */
-#define PT_ORIG_GR8    9       /* saved GR8 for signal handling */
-#define PT_GNER0       10
-#define PT_GNER1       11
-#define PT_IACC0H      12
-#define PT_IACC0L      13
-
-#define PT_GR(j)       ( 14 + (j))     /* GRj for 0<=j<=63 */
-#define PT_FR(j)       ( 78 + (j))     /* FRj for 0<=j<=63 */
-#define PT_FNER(j)     (142 + (j))     /* FNERj for 0<=j<=1 */
-#define PT_MSR(j)      (144 + (j))     /* MSRj for 0<=j<=2 */
-#define PT_ACC(j)      (146 + (j))     /* ACCj for 0<=j<=7 */
-#define PT_ACCG(jklm)  (154 + (jklm))  /* ACCGjklm for 0<=jklm<=1 (reads four regs per slot) */
-#define PT_FSR(j)      (156 + (j))     /* FSRj for 0<=j<=0 */
-#define PT__GPEND      78
-#define PT__END                157
-
-#define PT_TBR         PT_GR(0)
-#define PT_SP          PT_GR(1)
-#define PT_FP          PT_GR(2)
-#define PT_PREV_FRAME  PT_GR(28)       /* previous exception frame pointer (old gr28 value) */
-#define PT_CURR_TASK   PT_GR(29)       /* current task */
-
-
-/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
-#define PTRACE_GETREGS         12
-#define PTRACE_SETREGS         13
-#define PTRACE_GETFPREGS       14
-#define PTRACE_SETFPREGS       15
-#define PTRACE_GETFDPIC                31      /* get the ELF fdpic loadmap address */
-
-#define PTRACE_GETFDPIC_EXEC   0       /* [addr] request the executable loadmap */
-#define PTRACE_GETFDPIC_INTERP 1       /* [addr] request the interpreter loadmap */
-
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
-/*
- * we dedicate GR28 to keeping a pointer to the current exception frame
- * - gr28 is destroyed on entry to the kernel from userspace
- */
-register struct pt_regs *__frame asm("gr28");
-
-#define user_mode(regs)                        (!((regs)->psr & PSR_S))
-#define instruction_pointer(regs)      ((regs)->pc)
-
-extern unsigned long user_stack(const struct pt_regs *);
-extern void show_regs(struct pt_regs *);
-#define profile_pc(regs) ((regs)->pc)
-#endif
-
-#endif /* !__ASSEMBLY__ */
-#endif /* _ASM_PTRACE_H */
diff --git a/include/asm-frv/registers.h b/include/asm-frv/registers.h
deleted file mode 100644 (file)
index 9666119..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/* registers.h: register frame declarations
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-/*
- * notes:
- *
- * (1) that the members of all these structures are carefully aligned to permit
- *     usage of STD/STDF instructions
- *
- * (2) if you change these structures, you must change the code in
- *     arch/frvnommu/kernel/{break.S,entry.S,switch_to.S,gdb-stub.c}
- *
- *
- * the kernel stack space block looks like this:
- *
- *     +0x2000 +----------------------
- *             | union {
- *             |       struct frv_frame0 {
- *             |               struct user_context {
- *             |                       struct user_int_regs
- *             |                       struct user_fpmedia_regs
- *             |               }
- *             |               struct frv_debug_regs
- *             |       }
- *             |       struct pt_regs [user exception]
- *             | }
- *             +---------------------- <-- __kernel_frame0_ptr (maybe GR28)
- *             |
- *             | kernel stack
- *             |
- *             |......................
- *             | struct pt_regs [kernel exception]
- *             |...................... <-- __kernel_frame0_ptr (maybe GR28)
- *             |
- *             | kernel stack
- *             |
- *             |...................... <-- stack pointer (GR1)
- *             |
- *             | unused stack space
- *             |
- *             +----------------------
- *             | struct thread_info
- *     +0x0000 +---------------------- <-- __current_thread_info (GR15);
- *
- * note that GR28 points to the current exception frame
- */
-
-#ifndef _ASM_REGISTERS_H
-#define _ASM_REGISTERS_H
-
-#ifndef __ASSEMBLY__
-#define __OFFSET(X,N)  ((X)+(N)*4)
-#define __OFFSETC(X,N) xxxxxxxxxxxxxxxxxxxxxxxx
-#else
-#define __OFFSET(X,N)  ((X)+(N)*4)
-#define __OFFSETC(X,N) ((X)+(N))
-#endif
-
-/*****************************************************************************/
-/*
- * Exception/Interrupt frame
- * - held on kernel stack
- * - 8-byte aligned on stack (old SP is saved in frame)
- * - GR0 is fixed 0, so we don't save it
- */
-#ifndef __ASSEMBLY__
-
-struct pt_regs {
-       unsigned long           psr;            /* Processor Status Register */
-       unsigned long           isr;            /* Integer Status Register */
-       unsigned long           ccr;            /* Condition Code Register */
-       unsigned long           cccr;           /* Condition Code for Conditional Insns Register */
-       unsigned long           lr;             /* Link Register */
-       unsigned long           lcr;            /* Loop Count Register */
-       unsigned long           pc;             /* Program Counter Register */
-       unsigned long           __status;       /* exception status */
-       unsigned long           syscallno;      /* syscall number or -1 */
-       unsigned long           orig_gr8;       /* original syscall arg #1 */
-       unsigned long           gner0;
-       unsigned long           gner1;
-       unsigned long long      iacc0;
-       unsigned long           tbr;            /* GR0 is fixed zero, so we use this for TBR */
-       unsigned long           sp;             /* GR1: USP/KSP */
-       unsigned long           fp;             /* GR2: FP */
-       unsigned long           gr3;
-       unsigned long           gr4;
-       unsigned long           gr5;
-       unsigned long           gr6;
-       unsigned long           gr7;            /* syscall number */
-       unsigned long           gr8;            /* 1st syscall param; syscall return */
-       unsigned long           gr9;            /* 2nd syscall param */
-       unsigned long           gr10;           /* 3rd syscall param */
-       unsigned long           gr11;           /* 4th syscall param */
-       unsigned long           gr12;           /* 5th syscall param */
-       unsigned long           gr13;           /* 6th syscall param */
-       unsigned long           gr14;
-       unsigned long           gr15;
-       unsigned long           gr16;           /* GP pointer */
-       unsigned long           gr17;           /* small data */
-       unsigned long           gr18;           /* PIC/PID */
-       unsigned long           gr19;
-       unsigned long           gr20;
-       unsigned long           gr21;
-       unsigned long           gr22;
-       unsigned long           gr23;
-       unsigned long           gr24;
-       unsigned long           gr25;
-       unsigned long           gr26;
-       unsigned long           gr27;
-       struct pt_regs          *next_frame;    /* GR28 - next exception frame */
-       unsigned long           gr29;           /* GR29 - OS reserved */
-       unsigned long           gr30;           /* GR30 - OS reserved */
-       unsigned long           gr31;           /* GR31 - OS reserved */
-} __attribute__((aligned(8)));
-
-#endif
-
-#define REG__STATUS_STEP       0x00000001      /* - reenable single stepping on return */
-#define REG__STATUS_STEPPED    0x00000002      /* - single step caused exception */
-#define REG__STATUS_BROKE      0x00000004      /* - BREAK insn caused exception */
-#define REG__STATUS_SYSC_ENTRY 0x40000000      /* - T on syscall entry (ptrace.c only) */
-#define REG__STATUS_SYSC_EXIT  0x80000000      /* - T on syscall exit (ptrace.c only) */
-
-#define REG_GR(R)      __OFFSET(REG_GR0, (R))
-
-#define REG_SP         REG_GR(1)
-#define REG_FP         REG_GR(2)
-#define REG_PREV_FRAME REG_GR(28)      /* previous exception frame pointer (old gr28 value) */
-#define REG_CURR_TASK  REG_GR(29)      /* current task */
-
-/*****************************************************************************/
-/*
- * debugging registers
- */
-#ifndef __ASSEMBLY__
-
-struct frv_debug_regs
-{
-       unsigned long           dcr;
-       unsigned long           ibar[4] __attribute__((aligned(8)));
-       unsigned long           dbar[4] __attribute__((aligned(8)));
-       unsigned long           dbdr[4][4] __attribute__((aligned(8)));
-       unsigned long           dbmr[4][4] __attribute__((aligned(8)));
-} __attribute__((aligned(8)));
-
-#endif
-
-/*****************************************************************************/
-/*
- * userspace registers
- */
-#ifndef __ASSEMBLY__
-
-struct user_int_regs
-{
-       /* integer registers
-        * - up to gr[31] mirror pt_regs
-        * - total size must be multiple of 8 bytes
-        */
-       unsigned long           psr;            /* Processor Status Register */
-       unsigned long           isr;            /* Integer Status Register */
-       unsigned long           ccr;            /* Condition Code Register */
-       unsigned long           cccr;           /* Condition Code for Conditional Insns Register */
-       unsigned long           lr;             /* Link Register */
-       unsigned long           lcr;            /* Loop Count Register */
-       unsigned long           pc;             /* Program Counter Register */
-       unsigned long           __status;       /* exception status */
-       unsigned long           syscallno;      /* syscall number or -1 */
-       unsigned long           orig_gr8;       /* original syscall arg #1 */
-       unsigned long           gner[2];
-       unsigned long long      iacc[1];
-
-       union {
-               unsigned long   tbr;
-               unsigned long   gr[64];
-       };
-};
-
-struct user_fpmedia_regs
-{
-       /* FP/Media registers */
-       unsigned long   fr[64];
-       unsigned long   fner[2];
-       unsigned long   msr[2];
-       unsigned long   acc[8];
-       unsigned char   accg[8];
-       unsigned long   fsr[1];
-};
-
-struct user_context
-{
-       struct user_int_regs            i;
-       struct user_fpmedia_regs        f;
-
-       /* we provide a context extension so that we can save the regs for CPUs that
-        * implement many more of Fujitsu's lavish register spec
-        */
-       void *extension;
-} __attribute__((aligned(8)));
-
-struct frv_frame0 {
-       union {
-               struct pt_regs          regs;
-               struct user_context     uc;
-       };
-
-       struct frv_debug_regs           debug;
-
-} __attribute__((aligned(32)));
-
-#endif
-
-#define __INT_GR(R)            __OFFSET(__INT_GR0,             (R))
-
-#define __FPMEDIA_FR(R)                __OFFSET(__FPMEDIA_FR0,         (R))
-#define __FPMEDIA_FNER(R)      __OFFSET(__FPMEDIA_FNER0,       (R))
-#define __FPMEDIA_MSR(R)       __OFFSET(__FPMEDIA_MSR0,        (R))
-#define __FPMEDIA_ACC(R)       __OFFSET(__FPMEDIA_ACC0,        (R))
-#define __FPMEDIA_ACCG(R)      __OFFSETC(__FPMEDIA_ACCG0,      (R))
-#define __FPMEDIA_FSR(R)       __OFFSET(__FPMEDIA_FSR0,        (R))
-
-#define __THREAD_GR(R)         __OFFSET(__THREAD_GR16,         (R) - 16)
-
-#endif /* _ASM_REGISTERS_H */
diff --git a/include/asm-frv/resource.h b/include/asm-frv/resource.h
deleted file mode 100644 (file)
index 5fc6054..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_RESOURCE_H
-#define _ASM_RESOURCE_H
-
-#include <asm-generic/resource.h>
-
-#endif /* _ASM_RESOURCE_H */
-
diff --git a/include/asm-frv/scatterlist.h b/include/asm-frv/scatterlist.h
deleted file mode 100644 (file)
index 4bca8a2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef _ASM_SCATTERLIST_H
-#define _ASM_SCATTERLIST_H
-
-#include <asm/types.h>
-
-/*
- * Drivers must set either ->address or (preferred) page and ->offset
- * to indicate where data must be transferred to/from.
- *
- * Using page is recommended since it handles highmem data as well as
- * low mem. ->address is restricted to data which has a virtual mapping, and
- * it will go away in the future. Updating to page can be automated very
- * easily -- something like
- *
- * sg->address = some_ptr;
- *
- * can be rewritten as
- *
- * sg_set_buf(sg, some_ptr, length);
- *
- * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
- */
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-       unsigned long   sg_magic;
-#endif
-       unsigned long   page_link;
-       unsigned int    offset;         /* for highmem, page offset */
-
-       dma_addr_t      dma_address;
-       unsigned int    length;
-};
-
-/*
- * These macros should be used after a pci_map_sg call has been done
- * to get bus addresses of each of the SG entries and their lengths.
- * You should only work with the number of sg entries pci_map_sg
- * returns, or alternatively stop on the first sg_dma_len(sg) which
- * is 0.
- */
-#define sg_dma_address(sg)     ((sg)->dma_address)
-#define sg_dma_len(sg)         ((sg)->length)
-
-#define ISA_DMA_THRESHOLD (0xffffffffUL)
-
-#endif /* !_ASM_SCATTERLIST_H */
diff --git a/include/asm-frv/sections.h b/include/asm-frv/sections.h
deleted file mode 100644 (file)
index 17d0fb1..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* sections.h: linkage layout variables
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SECTIONS_H
-#define _ASM_SECTIONS_H
-
-#ifndef __ASSEMBLY__
-
-#include <linux/types.h>
-#include <asm-generic/sections.h>
-
-#ifdef __KERNEL__
-
-/*
- * we don't want to put variables in the GP-REL section if they're not used very much - that would
- * be waste since GP-REL addressing is limited to GP16+/-2048
- */
-#define __nongpreldata __attribute__((section(".data")))
-#define __nongprelbss  __attribute__((section(".bss")))
-
-/*
- * linker symbols
- */
-extern const void __kernel_image_start, __kernel_image_end, __page_offset;
-
-extern unsigned long __nongprelbss memory_start;
-extern unsigned long __nongprelbss memory_end;
-extern unsigned long __nongprelbss rom_length;
-
-/* determine if we're running from ROM */
-static inline int is_in_rom(unsigned long addr)
-{
-       return 0; /* default case: not in ROM */
-}
-
-#endif
-#endif
-#endif /* _ASM_SECTIONS_H */
diff --git a/include/asm-frv/segment.h b/include/asm-frv/segment.h
deleted file mode 100644 (file)
index e3616a6..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* segment.h: MMU segment settings
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SEGMENT_H
-#define _ASM_SEGMENT_H
-
-
-#ifndef __ASSEMBLY__
-
-typedef struct {
-       unsigned long seg;
-} mm_segment_t;
-
-#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
-
-#define KERNEL_DS              MAKE_MM_SEG(0xdfffffffUL)
-
-#ifdef CONFIG_MMU
-#define USER_DS                        MAKE_MM_SEG(TASK_SIZE - 1)
-#else
-#define USER_DS                        KERNEL_DS
-#endif
-
-#define get_ds()               (KERNEL_DS)
-#define get_fs()               (__current_thread_info->addr_limit)
-#define segment_eq(a,b)                ((a).seg == (b).seg)
-#define __kernel_ds_p()                segment_eq(get_fs(), KERNEL_DS)
-#define get_addr_limit()       (get_fs().seg)
-
-#define set_fs(_x)                                     \
-do {                                                   \
-       __current_thread_info->addr_limit = (_x);       \
-} while(0)
-
-
-#endif /* __ASSEMBLY__ */
-#endif /* _ASM_SEGMENT_H */
diff --git a/include/asm-frv/sembuf.h b/include/asm-frv/sembuf.h
deleted file mode 100644 (file)
index 164b127..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _ASM_SEMBUF_H
-#define _ASM_SEMBUF_H
-
-/*
- * The semid64_ds structure for FR-V architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct semid64_ds {
-       struct ipc64_perm       sem_perm;       /* permissions .. see ipc.h */
-       __kernel_time_t         sem_otime;      /* last semop time */
-       unsigned long           __unused1;
-       __kernel_time_t         sem_ctime;      /* last change time */
-       unsigned long           __unused2;
-       unsigned long           sem_nsems;      /* no. of semaphores in array */
-       unsigned long           __unused3;
-       unsigned long           __unused4;
-};
-
-#endif /* _ASM_SEMBUF_H */
-
diff --git a/include/asm-frv/serial-regs.h b/include/asm-frv/serial-regs.h
deleted file mode 100644 (file)
index e1286bd..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* serial-regs.h: serial port registers
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SERIAL_REGS_H
-#define _ASM_SERIAL_REGS_H
-
-#include <linux/serial_reg.h>
-#include <asm/irc-regs.h>
-
-#define SERIAL_ICLK    33333333        /* the target serial input clock */
-#define UART0_BASE     0xfeff9c00
-#define UART1_BASE     0xfeff9c40
-
-#define __get_UART0(R) ({ __reg(UART0_BASE + (R) * 8) >> 24; })
-#define __get_UART1(R) ({ __reg(UART1_BASE + (R) * 8) >> 24; })
-#define __set_UART0(R,V) do { __reg(UART0_BASE + (R) * 8) = (V) << 24; } while(0)
-#define __set_UART1(R,V) do { __reg(UART1_BASE + (R) * 8) = (V) << 24; } while(0)
-
-#define __get_UART0_LSR() ({ __get_UART0(UART_LSR); })
-#define __get_UART1_LSR() ({ __get_UART1(UART_LSR); })
-
-#define __set_UART0_IER(V) __set_UART0(UART_IER,(V))
-#define __set_UART1_IER(V) __set_UART1(UART_IER,(V))
-
-/* serial prescaler select register */
-#define __get_UCPSR()  ({ *(volatile unsigned long *)(0xfeff9c90); })
-#define __set_UCPSR(V) do { *(volatile unsigned long *)(0xfeff9c90) = (V); } while(0)
-#define UCPSR_SELECT0  0x07000000
-#define UCPSR_SELECT1  0x38000000
-
-/* serial prescaler base value register */
-#define __get_UCPVR()  ({ *(volatile unsigned long *)(0xfeff9c98); mb(); })
-#define __set_UCPVR(V) do { *(volatile unsigned long *)(0xfeff9c98) = (V) << 24; mb(); } while(0)
-
-
-#endif /* _ASM_SERIAL_REGS_H */
diff --git a/include/asm-frv/serial.h b/include/asm-frv/serial.h
deleted file mode 100644 (file)
index dbb8259..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * serial.h
- *
- * Copyright (C) 2003 Develer S.r.l. (http://www.develer.com/)
- * Author: Bernardo Innocenti <bernie@codewiz.org>
- *
- * Based on linux/include/asm-i386/serial.h
- */
-#include <asm/serial-regs.h>
-
-/*
- * the base baud is derived from the clock speed and so is variable
- */
-#define BASE_BAUD 0
-
-#define STD_COM_FLAGS          ASYNC_BOOT_AUTOCONF
-
-#define SERIAL_PORT_DFNS
diff --git a/include/asm-frv/setup.h b/include/asm-frv/setup.h
deleted file mode 100644 (file)
index afd787c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* setup.h: setup stuff
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SETUP_H
-#define _ASM_SETUP_H
-
-#define COMMAND_LINE_SIZE       512
-
-#ifdef __KERNEL__
-
-#include <linux/init.h>
-
-#ifndef __ASSEMBLY__
-
-#ifdef CONFIG_MMU
-extern unsigned long __initdata num_mappedpages;
-#endif
-
-#endif /* !__ASSEMBLY__ */
-
-#endif  /*  __KERNEL__  */
-
-#endif /* _ASM_SETUP_H */
diff --git a/include/asm-frv/shmbuf.h b/include/asm-frv/shmbuf.h
deleted file mode 100644 (file)
index 4c6e711..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _ASM_SHMBUF_H
-#define _ASM_SHMBUF_H
-
-/*
- * The shmid64_ds structure for FR-V architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct shmid64_ds {
-       struct ipc64_perm       shm_perm;       /* operation perms */
-       size_t                  shm_segsz;      /* size of segment (bytes) */
-       __kernel_time_t         shm_atime;      /* last attach time */
-       unsigned long           __unused1;
-       __kernel_time_t         shm_dtime;      /* last detach time */
-       unsigned long           __unused2;
-       __kernel_time_t         shm_ctime;      /* last change time */
-       unsigned long           __unused3;
-       __kernel_pid_t          shm_cpid;       /* pid of creator */
-       __kernel_pid_t          shm_lpid;       /* pid of last operator */
-       unsigned long           shm_nattch;     /* no. of current attaches */
-       unsigned long           __unused4;
-       unsigned long           __unused5;
-};
-
-struct shminfo64 {
-       unsigned long   shmmax;
-       unsigned long   shmmin;
-       unsigned long   shmmni;
-       unsigned long   shmseg;
-       unsigned long   shmall;
-       unsigned long   __unused1;
-       unsigned long   __unused2;
-       unsigned long   __unused3;
-       unsigned long   __unused4;
-};
-
-#endif /* _ASM_SHMBUF_H */
-
diff --git a/include/asm-frv/shmparam.h b/include/asm-frv/shmparam.h
deleted file mode 100644 (file)
index ab71100..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_SHMPARAM_H
-#define _ASM_SHMPARAM_H
-
-#define        SHMLBA PAGE_SIZE                 /* attach addr a multiple of this */
-
-#endif /* _ASM_SHMPARAM_H */
-
diff --git a/include/asm-frv/sigcontext.h b/include/asm-frv/sigcontext.h
deleted file mode 100644 (file)
index 3b263f3..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* sigcontext.h: FRV signal context
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_SIGCONTEXT_H
-#define _ASM_SIGCONTEXT_H
-
-#include <asm/registers.h>
-
-/*
- * Signal context structure - contains all info to do with the state
- * before the signal handler was invoked.  Note: only add new entries
- * to the end of the structure.
- */
-struct sigcontext {
-       struct user_context     sc_context;
-       unsigned long           sc_oldmask;     /* old sigmask */
-} __attribute__((aligned(8)));
-
-#endif
diff --git a/include/asm-frv/siginfo.h b/include/asm-frv/siginfo.h
deleted file mode 100644 (file)
index d3fd1ca..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_SIGINFO_H
-#define _ASM_SIGINFO_H
-
-#include <linux/types.h>
-#include <asm-generic/siginfo.h>
-
-#define FPE_MDAOVF     (__SI_FAULT|9)  /* media overflow */
-#undef NSIGFPE
-#define NSIGFPE                9
-
-#endif
-
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h
deleted file mode 100644 (file)
index 2079197..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-#ifndef _ASM_SIGNAL_H
-#define _ASM_SIGNAL_H
-
-#include <linux/types.h>
-
-/* Avoid too many header ordering problems.  */
-struct siginfo;
-
-#ifdef __KERNEL__
-/* Most things should be clean enough to redefine this at will, if care
-   is taken to make libc match.  */
-
-#define _NSIG          64
-#define _NSIG_BPW      32
-#define _NSIG_WORDS    (_NSIG / _NSIG_BPW)
-
-typedef unsigned long old_sigset_t;            /* at least 32 bits */
-
-typedef struct {
-       unsigned long sig[_NSIG_WORDS];
-} sigset_t;
-
-#else
-/* Here we must cater to libcs that poke about in kernel headers.  */
-
-#define NSIG           32
-typedef unsigned long sigset_t;
-
-#endif /* __KERNEL__ */
-
-#define SIGHUP          1
-#define SIGINT          2
-#define SIGQUIT                 3
-#define SIGILL          4
-#define SIGTRAP                 5
-#define SIGABRT                 6
-#define SIGIOT          6
-#define SIGBUS          7
-#define SIGFPE          8
-#define SIGKILL                 9
-#define SIGUSR1                10
-#define SIGSEGV                11
-#define SIGUSR2                12
-#define SIGPIPE                13
-#define SIGALRM                14
-#define SIGTERM                15
-#define SIGSTKFLT      16
-#define SIGCHLD                17
-#define SIGCONT                18
-#define SIGSTOP                19
-#define SIGTSTP                20
-#define SIGTTIN                21
-#define SIGTTOU                22
-#define SIGURG         23
-#define SIGXCPU                24
-#define SIGXFSZ                25
-#define SIGVTALRM      26
-#define SIGPROF                27
-#define SIGWINCH       28
-#define SIGIO          29
-#define SIGPOLL                SIGIO
-/*
-#define SIGLOST                29
-*/
-#define SIGPWR         30
-#define SIGSYS         31
-#define        SIGUNUSED       31
-
-/* These should not be considered constants from userland.  */
-#define SIGRTMIN       32
-#define SIGRTMAX       (_NSIG-1)
-
-/*
- * SA_FLAGS values:
- *
- * SA_ONSTACK indicates that a registered stack_t will be used.
- * SA_RESTART flag to get restarting signals (which were the default long ago)
- * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
- * SA_RESETHAND clears the handler when the signal is delivered.
- * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
- * SA_NODEFER prevents the current signal from being masked in the handler.
- *
- * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
- * Unix names RESETHAND and NODEFER respectively.
- */
-#define SA_NOCLDSTOP   0x00000001
-#define SA_NOCLDWAIT   0x00000002 /* not supported yet */
-#define SA_SIGINFO     0x00000004
-#define SA_ONSTACK     0x08000000
-#define SA_RESTART     0x10000000
-#define SA_NODEFER     0x40000000
-#define SA_RESETHAND   0x80000000
-
-#define SA_NOMASK      SA_NODEFER
-#define SA_ONESHOT     SA_RESETHAND
-
-#define SA_RESTORER    0x04000000
-
-/*
- * sigaltstack controls
- */
-#define SS_ONSTACK     1
-#define SS_DISABLE     2
-
-#define MINSIGSTKSZ    2048
-#define SIGSTKSZ       8192
-
-#include <asm-generic/signal.h>
-
-#ifdef __KERNEL__
-struct old_sigaction {
-       __sighandler_t sa_handler;
-       old_sigset_t sa_mask;
-       unsigned long sa_flags;
-       __sigrestore_t sa_restorer;
-};
-
-struct sigaction {
-       __sighandler_t sa_handler;
-       unsigned long sa_flags;
-       __sigrestore_t sa_restorer;
-       sigset_t sa_mask;               /* mask last for extensibility */
-};
-
-struct k_sigaction {
-       struct sigaction sa;
-};
-#else
-/* Here we must cater to libcs that poke about in kernel headers.  */
-
-struct sigaction {
-       union {
-         __sighandler_t _sa_handler;
-         void (*_sa_sigaction)(int, struct siginfo *, void *);
-       } _u;
-       sigset_t sa_mask;
-       unsigned long sa_flags;
-       void (*sa_restorer)(void);
-};
-
-#define sa_handler     _u._sa_handler
-#define sa_sigaction   _u._sa_sigaction
-
-#endif /* __KERNEL__ */
-
-typedef struct sigaltstack {
-       void __user *ss_sp;
-       int ss_flags;
-       size_t ss_size;
-} stack_t;
-
-#define ptrace_signal_deliver(regs, cookie) do { } while (0)
-
-#ifdef __KERNEL__
-
-#include <asm/sigcontext.h>
-#undef __HAVE_ARCH_SIG_BITOPS
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_SIGNAL_H */
diff --git a/include/asm-frv/smp.h b/include/asm-frv/smp.h
deleted file mode 100644 (file)
index 38349ec..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __ASM_SMP_H
-#define __ASM_SMP_H
-
-
-#ifdef CONFIG_SMP
-#error SMP not supported
-#endif
-
-#endif
diff --git a/include/asm-frv/socket.h b/include/asm-frv/socket.h
deleted file mode 100644 (file)
index 57c3d40..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _ASM_SOCKET_H
-#define _ASM_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* For setsockopt(2) */
-#define SOL_SOCKET     1
-
-#define SO_DEBUG       1
-#define SO_REUSEADDR   2
-#define SO_TYPE                3
-#define SO_ERROR       4
-#define SO_DONTROUTE   5
-#define SO_BROADCAST   6
-#define SO_SNDBUF      7
-#define SO_RCVBUF      8
-#define SO_SNDBUFFORCE 32
-#define SO_RCVBUFFORCE 33
-#define SO_KEEPALIVE   9
-#define SO_OOBINLINE   10
-#define SO_NO_CHECK    11
-#define SO_PRIORITY    12
-#define SO_LINGER      13
-#define SO_BSDCOMPAT   14
-/* To add :#define SO_REUSEPORT 15 */
-#define SO_PASSCRED    16
-#define SO_PEERCRED    17
-#define SO_RCVLOWAT    18
-#define SO_SNDLOWAT    19
-#define SO_RCVTIMEO    20
-#define SO_SNDTIMEO    21
-
-/* Security levels - as per NRL IPv6 - don't actually do anything */
-#define SO_SECURITY_AUTHENTICATION             22
-#define SO_SECURITY_ENCRYPTION_TRANSPORT       23
-#define SO_SECURITY_ENCRYPTION_NETWORK         24
-
-#define SO_BINDTODEVICE        25
-
-/* Socket filtering */
-#define SO_ATTACH_FILTER        26
-#define SO_DETACH_FILTER        27
-
-#define SO_PEERNAME             28
-#define SO_TIMESTAMP           29
-#define SCM_TIMESTAMP          SO_TIMESTAMP
-
-#define SO_ACCEPTCONN          30
-
-#define SO_PEERSEC             31
-#define SO_PASSSEC             34
-#define SO_TIMESTAMPNS         35
-#define SCM_TIMESTAMPNS                SO_TIMESTAMPNS
-
-#define SO_MARK                        36
-
-#define SO_TIMESTAMPING                37
-#define SCM_TIMESTAMPING       SO_TIMESTAMPING
-
-#endif /* _ASM_SOCKET_H */
-
diff --git a/include/asm-frv/sockios.h b/include/asm-frv/sockios.h
deleted file mode 100644 (file)
index 5dbdd13..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _ASM_SOCKIOS__
-#define _ASM_SOCKIOS__
-
-/* Socket-level I/O control calls. */
-#define FIOSETOWN      0x8901
-#define SIOCSPGRP      0x8902
-#define FIOGETOWN      0x8903
-#define SIOCGPGRP      0x8904
-#define SIOCATMARK     0x8905
-#define SIOCGSTAMP     0x8906          /* Get stamp (timeval) */
-#define SIOCGSTAMPNS   0x8907          /* Get stamp (timespec) */
-
-#endif /* _ASM_SOCKIOS__ */
-
diff --git a/include/asm-frv/spinlock.h b/include/asm-frv/spinlock.h
deleted file mode 100644 (file)
index fe385f4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* spinlock.h: spinlocks for FR-V
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SPINLOCK_H
-#define _ASM_SPINLOCK_H
-
-#error no spinlocks for FR-V yet
-
-#endif /* _ASM_SPINLOCK_H */
diff --git a/include/asm-frv/spr-regs.h b/include/asm-frv/spr-regs.h
deleted file mode 100644 (file)
index 01e6af5..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-/* spr-regs.h: special-purpose registers on the FRV
- *
- * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SPR_REGS_H
-#define _ASM_SPR_REGS_H
-
-/*
- * PSR - Processor Status Register
- */
-#define PSR_ET                 0x00000001      /* enable interrupts/exceptions flag */
-#define PSR_PS                 0x00000002      /* previous supervisor mode flag */
-#define PSR_S                  0x00000004      /* supervisor mode flag */
-#define PSR_PIL                        0x00000078      /* processor external interrupt level */
-#define PSR_PIL_0              0x00000000      /* - no interrupt in progress */
-#define PSR_PIL_13             0x00000068      /* - debugging only */
-#define PSR_PIL_14             0x00000070      /* - debugging in progress */
-#define PSR_PIL_15             0x00000078      /* - NMI in progress */
-#define PSR_EM                 0x00000080      /* enable media operation */
-#define PSR_EF                 0x00000100      /* enable FPU operation */
-#define PSR_BE                 0x00001000      /* endianness mode */
-#define PSR_BE_LE              0x00000000      /* - little endian mode */
-#define PSR_BE_BE              0x00001000      /* - big endian mode */
-#define PSR_CM                 0x00002000      /* conditional mode */
-#define PSR_NEM                        0x00004000      /* non-excepting mode */
-#define PSR_ICE                        0x00010000      /* in-circuit emulation mode */
-#define PSR_VERSION_SHIFT      24              /* CPU silicon ID */
-#define PSR_IMPLE_SHIFT                28              /* CPU core ID */
-
-#define PSR_VERSION(psr)       (((psr) >> PSR_VERSION_SHIFT) & 0xf)
-#define PSR_IMPLE(psr)         (((psr) >> PSR_IMPLE_SHIFT) & 0xf)
-
-#define PSR_IMPLE_FR401                0x2
-#define PSR_VERSION_FR401_MB93401      0x0
-#define PSR_VERSION_FR401_MB93401A     0x1
-#define PSR_VERSION_FR401_MB93403      0x2
-
-#define PSR_IMPLE_FR405                0x4
-#define PSR_VERSION_FR405_MB93405      0x0
-
-#define PSR_IMPLE_FR451                0x5
-#define PSR_VERSION_FR451_MB93451      0x0
-
-#define PSR_IMPLE_FR501                0x1
-#define PSR_VERSION_FR501_MB93501      0x1
-#define PSR_VERSION_FR501_MB93501A     0x2
-
-#define PSR_IMPLE_FR551                0x3
-#define PSR_VERSION_FR551_MB93555      0x1
-
-#define __get_PSR()    ({ unsigned long x; asm volatile("movsg psr,%0" : "=r"(x)); x; })
-#define __set_PSR(V)   do { asm volatile("movgs %0,psr" : : "r"(V)); } while(0)
-
-/*
- * TBR - Trap Base Register
- */
-#define TBR_TT                 0x00000ff0
-#define TBR_TT_INSTR_MMU_MISS  (0x01 << 4)
-#define TBR_TT_INSTR_ACC_ERROR (0x02 << 4)
-#define TBR_TT_INSTR_ACC_EXCEP (0x03 << 4)
-#define TBR_TT_PRIV_INSTR      (0x06 << 4)
-#define TBR_TT_ILLEGAL_INSTR   (0x07 << 4)
-#define TBR_TT_FP_EXCEPTION    (0x0d << 4)
-#define TBR_TT_MP_EXCEPTION    (0x0e << 4)
-#define TBR_TT_DATA_ACC_ERROR  (0x11 << 4)
-#define TBR_TT_DATA_MMU_MISS   (0x12 << 4)
-#define TBR_TT_DATA_ACC_EXCEP  (0x13 << 4)
-#define TBR_TT_DATA_STR_ERROR  (0x14 << 4)
-#define TBR_TT_DIVISION_EXCEP  (0x17 << 4)
-#define TBR_TT_COMMIT_EXCEP    (0x19 << 4)
-#define TBR_TT_INSTR_TLB_MISS  (0x1a << 4)
-#define TBR_TT_DATA_TLB_MISS   (0x1b << 4)
-#define TBR_TT_DATA_DAT_EXCEP  (0x1d << 4)
-#define TBR_TT_DECREMENT_TIMER (0x1f << 4)
-#define TBR_TT_COMPOUND_EXCEP  (0x20 << 4)
-#define TBR_TT_INTERRUPT_1     (0x21 << 4)
-#define TBR_TT_INTERRUPT_2     (0x22 << 4)
-#define TBR_TT_INTERRUPT_3     (0x23 << 4)
-#define TBR_TT_INTERRUPT_4     (0x24 << 4)
-#define TBR_TT_INTERRUPT_5     (0x25 << 4)
-#define TBR_TT_INTERRUPT_6     (0x26 << 4)
-#define TBR_TT_INTERRUPT_7     (0x27 << 4)
-#define TBR_TT_INTERRUPT_8     (0x28 << 4)
-#define TBR_TT_INTERRUPT_9     (0x29 << 4)
-#define TBR_TT_INTERRUPT_10    (0x2a << 4)
-#define TBR_TT_INTERRUPT_11    (0x2b << 4)
-#define TBR_TT_INTERRUPT_12    (0x2c << 4)
-#define TBR_TT_INTERRUPT_13    (0x2d << 4)
-#define TBR_TT_INTERRUPT_14    (0x2e << 4)
-#define TBR_TT_INTERRUPT_15    (0x2f << 4)
-#define TBR_TT_TRAP0           (0x80 << 4)
-#define TBR_TT_TRAP1           (0x81 << 4)
-#define TBR_TT_TRAP2           (0x82 << 4)
-#define TBR_TT_TRAP3           (0x83 << 4)
-#define TBR_TT_TRAP120         (0xf8 << 4)
-#define TBR_TT_TRAP121         (0xf9 << 4)
-#define TBR_TT_TRAP122         (0xfa << 4)
-#define TBR_TT_TRAP123         (0xfb << 4)
-#define TBR_TT_TRAP124         (0xfc << 4)
-#define TBR_TT_TRAP125         (0xfd << 4)
-#define TBR_TT_TRAP126         (0xfe << 4)
-#define TBR_TT_BREAK           (0xff << 4)
-
-#define TBR_TT_ATOMIC_CMPXCHG32        TBR_TT_TRAP120
-#define TBR_TT_ATOMIC_XCHG32   TBR_TT_TRAP121
-#define TBR_TT_ATOMIC_XOR      TBR_TT_TRAP122
-#define TBR_TT_ATOMIC_OR       TBR_TT_TRAP123
-#define TBR_TT_ATOMIC_AND      TBR_TT_TRAP124
-#define TBR_TT_ATOMIC_SUB      TBR_TT_TRAP125
-#define TBR_TT_ATOMIC_ADD      TBR_TT_TRAP126
-
-#define __get_TBR()    ({ unsigned long x; asm volatile("movsg tbr,%0" : "=r"(x)); x; })
-
-/*
- * HSR0 - Hardware Status Register 0
- */
-#define HSR0_PDM               0x00000007      /* power down mode */
-#define HSR0_PDM_NORMAL                0x00000000      /* - normal mode */
-#define HSR0_PDM_CORE_SLEEP    0x00000001      /* - CPU core sleep mode */
-#define HSR0_PDM_BUS_SLEEP     0x00000003      /* - bus sleep mode */
-#define HSR0_PDM_PLL_RUN       0x00000005      /* - PLL run */
-#define HSR0_PDM_PLL_STOP      0x00000007      /* - PLL stop */
-#define HSR0_GRLE              0x00000040      /* GR lower register set enable */
-#define HSR0_GRHE              0x00000080      /* GR higher register set enable */
-#define HSR0_FRLE              0x00000100      /* FR lower register set enable */
-#define HSR0_FRHE              0x00000200      /* FR higher register set enable */
-#define HSR0_GRN               0x00000400      /* GR quantity */
-#define HSR0_GRN_64            0x00000000      /* - 64 GR registers */
-#define HSR0_GRN_32            0x00000400      /* - 32 GR registers */
-#define HSR0_FRN               0x00000800      /* FR quantity */
-#define HSR0_FRN_64            0x00000000      /* - 64 FR registers */
-#define HSR0_FRN_32            0x00000800      /* - 32 FR registers */
-#define HSR0_SA                        0x00001000      /* start address (RAMBOOT#) */
-#define HSR0_ETMI              0x00008000      /* enable TIMERI (64-bit up timer) */
-#define HSR0_ETMD              0x00004000      /* enable TIMERD (32-bit down timer) */
-#define HSR0_PEDAT             0x00010000      /* previous DAT mode */
-#define HSR0_XEDAT             0x00020000      /* exception DAT mode */
-#define HSR0_EDAT              0x00080000      /* enable DAT mode */
-#define HSR0_RME               0x00400000      /* enable RAM mode */
-#define HSR0_EMEM              0x00800000      /* enable MMU_Miss mask */
-#define HSR0_EXMMU             0x01000000      /* enable extended MMU mode */
-#define HSR0_EDMMU             0x02000000      /* enable data MMU */
-#define HSR0_EIMMU             0x04000000      /* enable instruction MMU */
-#define HSR0_CBM               0x08000000      /* copy back mode */
-#define HSR0_CBM_WRITE_THRU    0x00000000      /* - write through */
-#define HSR0_CBM_COPY_BACK     0x08000000      /* - copy back */
-#define HSR0_NWA               0x10000000      /* no write allocate */
-#define HSR0_DCE               0x40000000      /* data cache enable */
-#define HSR0_ICE               0x80000000      /* instruction cache enable */
-
-#define __get_HSR(R)   ({ unsigned long x; asm volatile("movsg hsr"#R",%0" : "=r"(x)); x; })
-#define __set_HSR(R,V) do { asm volatile("movgs %0,hsr"#R : : "r"(V)); } while(0)
-
-/*
- * CCR - Condition Codes Register
- */
-#define CCR_FCC0               0x0000000f      /* FP/Media condition 0 (fcc0 reg) */
-#define CCR_FCC1               0x000000f0      /* FP/Media condition 1 (fcc1 reg) */
-#define CCR_FCC2               0x00000f00      /* FP/Media condition 2 (fcc2 reg) */
-#define CCR_FCC3               0x0000f000      /* FP/Media condition 3 (fcc3 reg) */
-#define CCR_ICC0               0x000f0000      /* Integer condition 0 (icc0 reg) */
-#define CCR_ICC0_C             0x00010000      /* - Carry flag */
-#define CCR_ICC0_V             0x00020000      /* - Overflow flag */
-#define CCR_ICC0_Z             0x00040000      /* - Zero flag */
-#define CCR_ICC0_N             0x00080000      /* - Negative flag */
-#define CCR_ICC1               0x00f00000      /* Integer condition 1 (icc1 reg) */
-#define CCR_ICC2               0x0f000000      /* Integer condition 2 (icc2 reg) */
-#define CCR_ICC3               0xf0000000      /* Integer condition 3 (icc3 reg) */
-
-/*
- * CCCR - Condition Codes for Conditional Instructions Register
- */
-#define CCCR_CC0               0x00000003      /* condition 0 (cc0 reg) */
-#define CCCR_CC0_FALSE         0x00000002      /* - condition is false */
-#define CCCR_CC0_TRUE          0x00000003      /* - condition is true */
-#define CCCR_CC1               0x0000000c      /* condition 1 (cc1 reg) */
-#define CCCR_CC2               0x00000030      /* condition 2 (cc2 reg) */
-#define CCCR_CC3               0x000000c0      /* condition 3 (cc3 reg) */
-#define CCCR_CC4               0x00000300      /* condition 4 (cc4 reg) */
-#define CCCR_CC5               0x00000c00      /* condition 5 (cc5 reg) */
-#define CCCR_CC6               0x00003000      /* condition 6 (cc6 reg) */
-#define CCCR_CC7               0x0000c000      /* condition 7 (cc7 reg) */
-
-/*
- * ISR - Integer Status Register
- */
-#define ISR_EMAM               0x00000001      /* memory misaligned access handling */
-#define ISR_EMAM_EXCEPTION     0x00000000      /* - generate exception */
-#define ISR_EMAM_FUDGE         0x00000001      /* - mask out invalid address bits */
-#define ISR_AEXC               0x00000004      /* accrued [overflow] exception */
-#define ISR_DTT                        0x00000018      /* division type trap */
-#define ISR_DTT_IGNORE         0x00000000      /* - ignore division error */
-#define ISR_DTT_DIVBYZERO      0x00000008      /* - generate exception */
-#define ISR_DTT_OVERFLOW       0x00000010      /* - record overflow */
-#define ISR_EDE                        0x00000020      /* enable division exception */
-#define ISR_PLI                        0x20000000      /* pre-load instruction information */
-#define ISR_QI                 0x80000000      /* quad data implementation information */
-
-/*
- * EPCR0 - Exception PC Register
- */
-#define EPCR0_V                        0x00000001      /* register content validity indicator */
-#define EPCR0_PC               0xfffffffc      /* faulting instruction address */
-
-/*
- * ESR0/14/15 - Exception Status Register
- */
-#define ESRx_VALID             0x00000001      /* register content validity indicator */
-#define ESRx_EC                        0x0000003e      /* exception type */
-#define ESRx_EC_DATA_STORE     0x00000000      /* - data_store_error */
-#define ESRx_EC_INSN_ACCESS    0x00000006      /* - instruction_access_error */
-#define ESRx_EC_PRIV_INSN      0x00000008      /* - privileged_instruction */
-#define ESRx_EC_ILL_INSN       0x0000000a      /* - illegal_instruction */
-#define ESRx_EC_MP_EXCEP       0x0000001c      /* - mp_exception */
-#define ESRx_EC_DATA_ACCESS    0x00000020      /* - data_access_error */
-#define ESRx_EC_DIVISION       0x00000026      /* - division_exception */
-#define ESRx_EC_ITLB_MISS      0x00000034      /* - instruction_access_TLB_miss */
-#define ESRx_EC_DTLB_MISS      0x00000036      /* - data_access_TLB_miss */
-#define ESRx_EC_DATA_ACCESS_DAT        0x0000003a      /* - data_access_DAT_exception */
-
-#define ESR0_IAEC              0x00000100      /* info for instruction-access-exception */
-#define ESR0_IAEC_RESV         0x00000000      /* - reserved */
-#define ESR0_IAEC_PROT_VIOL    0x00000100      /* - protection violation */
-
-#define ESR0_ATXC              0x00f00000      /* address translation exception code */
-#define ESR0_ATXC_MMU_MISS     0x00000000      /* - MMU miss exception and more (?) */
-#define ESR0_ATXC_MULTI_DAT    0x00800000      /* - multiple DAT entry hit */
-#define ESR0_ATXC_MULTI_SAT    0x00900000      /* - multiple SAT entry hit */
-#define ESR0_ATXC_AMRTLB_MISS  0x00a00000      /* - MMU/TLB miss exception */
-#define ESR0_ATXC_PRIV_EXCEP   0x00c00000      /* - privilege protection fault */
-#define ESR0_ATXC_WP_EXCEP     0x00d00000      /* - write protection fault */
-
-#define ESR0_EAV               0x00000800      /* true if EAR0 register valid */
-#define ESR15_EAV              0x00000800      /* true if EAR15 register valid */
-
-/*
- * ESFR1 - Exception Status Valid Flag Register
- */
-#define ESFR1_ESR0             0x00000001      /* true if ESR0 is valid */
-#define ESFR1_ESR14            0x00004000      /* true if ESR14 is valid */
-#define ESFR1_ESR15            0x00008000      /* true if ESR15 is valid */
-
-/*
- * MSR - Media Status Register
- */
-#define MSR0_AOVF              0x00000001      /* overflow exception accrued */
-#define MSRx_OVF               0x00000002      /* overflow exception detected */
-#define MSRx_SIE               0x0000003c      /* last SIMD instruction exception detected */
-#define MSRx_SIE_NONE          0x00000000      /* - none detected */
-#define MSRx_SIE_FRkHI_ACCk    0x00000020      /* - exception at FRkHI or ACCk */
-#define MSRx_SIE_FRkLO_ACCk1   0x00000010      /* - exception at FRkLO or ACCk+1 */
-#define MSRx_SIE_FRk1HI_ACCk2  0x00000008      /* - exception at FRk+1HI or ACCk+2 */
-#define MSRx_SIE_FRk1LO_ACCk3  0x00000004      /* - exception at FRk+1LO or ACCk+3 */
-#define MSR0_MTT               0x00007000      /* type of last media trap detected */
-#define MSR0_MTT_NONE          0x00000000      /* - none detected */
-#define MSR0_MTT_OVERFLOW      0x00001000      /* - overflow detected */
-#define MSR0_HI                        0x00c00000      /* hardware implementation */
-#define MSR0_HI_ROUNDING       0x00000000      /* - rounding mode */
-#define MSR0_HI_NONROUNDING    0x00c00000      /* - non-rounding mode */
-#define MSR0_EMCI              0x01000000      /* enable media custom instructions */
-#define MSR0_SRDAV             0x10000000      /* select rounding mode of MAVEH */
-#define MSR0_SRDAV_RDAV                0x00000000      /* - controlled by MSR.RDAV */
-#define MSR0_SRDAV_RD          0x10000000      /* - controlled by MSR.RD */
-#define MSR0_RDAV              0x20000000      /* rounding mode of MAVEH */
-#define MSR0_RDAV_NEAREST_MI   0x00000000      /* - round to nearest minus */
-#define MSR0_RDAV_NEAREST_PL   0x20000000      /* - round to nearest plus */
-#define MSR0_RD                        0xc0000000      /* rounding mode */
-#define MSR0_RD_NEAREST                0x00000000      /* - nearest */
-#define MSR0_RD_ZERO           0x40000000      /* - zero */
-#define MSR0_RD_POS_INF                0x80000000      /* - postive infinity */
-#define MSR0_RD_NEG_INF                0xc0000000      /* - negative infinity */
-
-/*
- * IAMPR0-7 - Instruction Address Mapping Register
- * DAMPR0-7 - Data Address Mapping Register
- */
-#define xAMPRx_V               0x00000001      /* register content validity indicator */
-#define DAMPRx_WP              0x00000002      /* write protect */
-#define DAMPRx_WP_RW           0x00000000      /* - read/write */
-#define DAMPRx_WP_RO           0x00000002      /* - read-only */
-#define xAMPRx_C               0x00000004      /* cached/uncached */
-#define xAMPRx_C_CACHED                0x00000000      /* - cached */
-#define xAMPRx_C_UNCACHED      0x00000004      /* - uncached */
-#define xAMPRx_S               0x00000008      /* supervisor only */
-#define xAMPRx_S_USER          0x00000000      /* - userspace can access */
-#define xAMPRx_S_KERNEL                0x00000008      /* - kernel only */
-#define xAMPRx_SS              0x000000f0      /* segment size */
-#define xAMPRx_SS_16Kb         0x00000000      /* - 16 kilobytes */
-#define xAMPRx_SS_64Kb         0x00000010      /* - 64 kilobytes */
-#define xAMPRx_SS_256Kb                0x00000020      /* - 256 kilobytes */
-#define xAMPRx_SS_1Mb          0x00000030      /* - 1 megabyte */
-#define xAMPRx_SS_2Mb          0x00000040      /* - 2 megabytes */
-#define xAMPRx_SS_4Mb          0x00000050      /* - 4 megabytes */
-#define xAMPRx_SS_8Mb          0x00000060      /* - 8 megabytes */
-#define xAMPRx_SS_16Mb         0x00000070      /* - 16 megabytes */
-#define xAMPRx_SS_32Mb         0x00000080      /* - 32 megabytes */
-#define xAMPRx_SS_64Mb         0x00000090      /* - 64 megabytes */
-#define xAMPRx_SS_128Mb                0x000000a0      /* - 128 megabytes */
-#define xAMPRx_SS_256Mb                0x000000b0      /* - 256 megabytes */
-#define xAMPRx_SS_512Mb                0x000000c0      /* - 512 megabytes */
-#define xAMPRx_RESERVED8       0x00000100      /* reserved bit */
-#define xAMPRx_NG              0x00000200      /* non-global */
-#define xAMPRx_L               0x00000400      /* locked */
-#define xAMPRx_M               0x00000800      /* modified */
-#define xAMPRx_D               0x00001000      /* DAT entry */
-#define xAMPRx_RESERVED13      0x00002000      /* reserved bit */
-#define xAMPRx_PPFN            0xfff00000      /* physical page frame number */
-
-#define xAMPRx_V_BIT           0
-#define DAMPRx_WP_BIT          1
-#define xAMPRx_C_BIT           2
-#define xAMPRx_S_BIT           3
-#define xAMPRx_RESERVED8_BIT   8
-#define xAMPRx_NG_BIT          9
-#define xAMPRx_L_BIT           10
-#define xAMPRx_M_BIT           11
-#define xAMPRx_D_BIT           12
-#define xAMPRx_RESERVED13_BIT  13
-
-#define __get_IAMPR(R) ({ unsigned long x; asm volatile("movsg iampr"#R",%0" : "=r"(x)); x; })
-#define __get_DAMPR(R) ({ unsigned long x; asm volatile("movsg dampr"#R",%0" : "=r"(x)); x; })
-
-#define __get_IAMLR(R) ({ unsigned long x; asm volatile("movsg iamlr"#R",%0" : "=r"(x)); x; })
-#define __get_DAMLR(R) ({ unsigned long x; asm volatile("movsg damlr"#R",%0" : "=r"(x)); x; })
-
-#define __set_IAMPR(R,V)       do { asm volatile("movgs %0,iampr"#R : : "r"(V)); } while(0)
-#define __set_DAMPR(R,V)       do { asm volatile("movgs %0,dampr"#R : : "r"(V)); } while(0)
-
-#define __set_IAMLR(R,V)       do { asm volatile("movgs %0,iamlr"#R : : "r"(V)); } while(0)
-#define __set_DAMLR(R,V)       do { asm volatile("movgs %0,damlr"#R : : "r"(V)); } while(0)
-
-#define save_dampr(R, _dampr)                                  \
-do {                                                           \
-       asm volatile("movsg dampr"R",%0" : "=r"(_dampr));       \
-} while(0)
-
-#define restore_dampr(R, _dampr)                       \
-do {                                                   \
-       asm volatile("movgs %0,dampr"R :: "r"(_dampr)); \
-} while(0)
-
-/*
- * AMCR - Address Mapping Control Register
- */
-#define AMCR_IAMRN             0x000000ff      /* quantity of IAMPR registers */
-#define AMCR_DAMRN             0x0000ff00      /* quantity of DAMPR registers */
-
-/*
- * TTBR - Address Translation Table Base Register
- */
-#define __get_TTBR()           ({ unsigned long x; asm volatile("movsg ttbr,%0" : "=r"(x)); x; })
-
-/*
- * TPXR - TLB Probe Extend Register
- */
-#define TPXR_E                 0x00000001
-#define TPXR_LMAX_SHIFT                20
-#define TPXR_LMAX_SMASK                0xf
-#define TPXR_WMAX_SHIFT                24
-#define TPXR_WMAX_SMASK                0xf
-#define TPXR_WAY_SHIFT         28
-#define TPXR_WAY_SMASK         0xf
-
-/*
- * DCR - Debug Control Register
- */
-#define DCR_IBCE3              0x00000001      /* break on conditional insn pointed to by IBAR3 */
-#define DCR_IBE3               0x00000002      /* break on insn pointed to by IBAR3 */
-#define DCR_IBCE1              0x00000004      /* break on conditional insn pointed to by IBAR2 */
-#define DCR_IBE1               0x00000008      /* break on insn pointed to by IBAR2 */
-#define DCR_IBCE2              0x00000010      /* break on conditional insn pointed to by IBAR1 */
-#define DCR_IBE2               0x00000020      /* break on insn pointed to by IBAR1 */
-#define DCR_IBCE0              0x00000040      /* break on conditional insn pointed to by IBAR0 */
-#define DCR_IBE0               0x00000080      /* break on insn pointed to by IBAR0 */
-
-#define DCR_DDBE1              0x00004000      /* use DBDR1x when checking DBAR1 */
-#define DCR_DWBE1              0x00008000      /* break on store to address in DBAR1/DBMR1x */
-#define DCR_DRBE1              0x00010000      /* break on load from address in DBAR1/DBMR1x */
-#define DCR_DDBE0              0x00020000      /* use DBDR0x when checking DBAR0 */
-#define DCR_DWBE0              0x00040000      /* break on store to address in DBAR0/DBMR0x */
-#define DCR_DRBE0              0x00080000      /* break on load from address in DBAR0/DBMR0x */
-
-#define DCR_EIM                        0x0c000000      /* external interrupt disable */
-#define DCR_IBM                        0x10000000      /* instruction break disable */
-#define DCR_SE                 0x20000000      /* single step enable */
-#define DCR_EBE                        0x40000000      /* exception break enable */
-
-/*
- * BRR - Break Interrupt Request Register
- */
-#define BRR_ST                 0x00000001      /* single-step detected */
-#define BRR_SB                 0x00000002      /* break instruction detected */
-#define BRR_BB                 0x00000004      /* branch with hint detected */
-#define BRR_CBB                        0x00000008      /* branch to LR detected */
-#define BRR_IBx                        0x000000f0      /* hardware breakpoint detected */
-#define BRR_DBx                        0x00000f00      /* hardware watchpoint detected */
-#define BRR_DBNEx              0x0000f000      /* ? */
-#define BRR_EBTT               0x00ff0000      /* trap type of exception break */
-#define BRR_TB                 0x10000000      /* external break request detected */
-#define BRR_CB                 0x20000000      /* ICE break command detected */
-#define BRR_EB                 0x40000000      /* exception break detected */
-
-/*
- * BPSR - Break PSR Save Register
- */
-#define BPSR_BET               0x00000001      /* former PSR.ET */
-#define BPSR_BS                        0x00001000      /* former PSR.S */
-
-#endif /* _ASM_SPR_REGS_H */
diff --git a/include/asm-frv/stat.h b/include/asm-frv/stat.h
deleted file mode 100644 (file)
index ce56de9..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef _ASM_STAT_H
-#define _ASM_STAT_H
-
-struct __old_kernel_stat {
-       unsigned short st_dev;
-       unsigned short st_ino;
-       unsigned short st_mode;
-       unsigned short st_nlink;
-       unsigned short st_uid;
-       unsigned short st_gid;
-       unsigned short st_rdev;
-       unsigned long  st_size;
-       unsigned long  st_atime;
-       unsigned long  st_mtime;
-       unsigned long  st_ctime;
-};
-
-/* This matches struct stat in uClibc/glibc.  */
-struct stat {
-       unsigned char __pad1[6];
-       unsigned short st_dev;
-
-       unsigned long __pad2;
-       unsigned long st_ino;
-
-       unsigned short __pad3;
-       unsigned short st_mode;
-       unsigned short __pad4;
-       unsigned short st_nlink;
-
-       unsigned short __pad5;
-       unsigned short st_uid;
-       unsigned short __pad6;
-       unsigned short st_gid;
-
-       unsigned char __pad7[6];
-       unsigned short st_rdev;
-
-       unsigned long __pad8;
-       unsigned long st_size;
-
-       unsigned long __pad9;           /* align 64-bit st_blocks to 2-word */
-       unsigned long st_blksize;
-
-       unsigned long __pad10;  /* future possible st_blocks high bits */
-       unsigned long st_blocks;        /* Number 512-byte blocks allocated. */
-
-       unsigned long __unused1;
-       unsigned long st_atime;
-
-       unsigned long __unused2;
-       unsigned long st_mtime;
-
-       unsigned long __unused3;
-       unsigned long st_ctime;
-
-       unsigned long long __unused4;
-};
-
-/* This matches struct stat64 in uClibc/glibc.  The layout is exactly
-   the same as that of struct stat above, with 64-bit types taking up
-   space that was formerly used by padding.  stat syscalls are still
-   different from stat64, though, in that the former tests for
-   overflow.  */
-struct stat64 {
-       unsigned char __pad1[6];
-       unsigned short st_dev;
-
-       unsigned long long st_ino;
-
-       unsigned int st_mode;
-       unsigned int st_nlink;
-
-       unsigned long st_uid;
-       unsigned long st_gid;
-
-       unsigned char __pad2[6];
-       unsigned short st_rdev;
-
-       long long st_size;
-
-       unsigned long __pad3;           /* align 64-bit st_blocks to 2-word */
-       unsigned long st_blksize;
-
-       unsigned long __pad4;           /* future possible st_blocks high bits */
-       unsigned long st_blocks;        /* Number 512-byte blocks allocated. */
-
-       unsigned long st_atime_nsec;
-       unsigned long st_atime;
-
-       unsigned int st_mtime_nsec;
-       unsigned long st_mtime;
-
-       unsigned long st_ctime_nsec;
-       unsigned long st_ctime;
-
-       unsigned long long __unused4;
-};
-
-#endif /* _ASM_STAT_H */
diff --git a/include/asm-frv/statfs.h b/include/asm-frv/statfs.h
deleted file mode 100644 (file)
index 741f586..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_STATFS_H
-#define _ASM_STATFS_H
-
-#include <asm-generic/statfs.h>
-
-#endif /* _ASM_STATFS_H */
-
diff --git a/include/asm-frv/string.h b/include/asm-frv/string.h
deleted file mode 100644 (file)
index 5ed310f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* string.h: FRV string handling
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_STRING_H_
-#define _ASM_STRING_H_
-
-#ifdef __KERNEL__ /* only set these up for kernel code */
-
-#define __HAVE_ARCH_MEMSET 1
-#define __HAVE_ARCH_MEMCPY 1
-
-extern void *memset(void *, int, __kernel_size_t);
-extern void *memcpy(void *, const void *, __kernel_size_t);
-
-#else /* KERNEL */
-
-/*
- *     let user libraries deal with these,
- *     IMHO the kernel has no place defining these functions for user apps
- */
-
-#define __HAVE_ARCH_STRCPY 1
-#define __HAVE_ARCH_STRNCPY 1
-#define __HAVE_ARCH_STRCAT 1
-#define __HAVE_ARCH_STRNCAT 1
-#define __HAVE_ARCH_STRCMP 1
-#define __HAVE_ARCH_STRNCMP 1
-#define __HAVE_ARCH_STRNICMP 1
-#define __HAVE_ARCH_STRCHR 1
-#define __HAVE_ARCH_STRRCHR 1
-#define __HAVE_ARCH_STRSTR 1
-#define __HAVE_ARCH_STRLEN 1
-#define __HAVE_ARCH_STRNLEN 1
-#define __HAVE_ARCH_MEMSET 1
-#define __HAVE_ARCH_MEMCPY 1
-#define __HAVE_ARCH_MEMMOVE 1
-#define __HAVE_ARCH_MEMSCAN 1
-#define __HAVE_ARCH_MEMCMP 1
-#define __HAVE_ARCH_MEMCHR 1
-#define __HAVE_ARCH_STRTOK 1
-
-#endif /* KERNEL */
-#endif /* _ASM_STRING_H_ */
diff --git a/include/asm-frv/suspend.h b/include/asm-frv/suspend.h
deleted file mode 100644 (file)
index 5fa7b5a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* suspend.h: suspension stuff
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SUSPEND_H
-#define _ASM_SUSPEND_H
-
-static inline int arch_prepare_suspend(void)
-{
-       return 0;
-}
-
-#endif /* _ASM_SUSPEND_H */
diff --git a/include/asm-frv/swab.h b/include/asm-frv/swab.h
deleted file mode 100644 (file)
index f305834..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _ASM_SWAB_H
-#define _ASM_SWAB_H
-
-#include <linux/types.h>
-
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#  define __SWAB_64_THRU_32__
-#endif
-
-#endif /* _ASM_SWAB_H */
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h
deleted file mode 100644 (file)
index 7742ec0..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/* system.h: FR-V CPU control definitions
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_SYSTEM_H
-#define _ASM_SYSTEM_H
-
-#include <linux/types.h>
-#include <linux/linkage.h>
-#include <linux/kernel.h>
-
-struct thread_struct;
-
-/*
- * switch_to(prev, next) should switch from task `prev' to `next'
- * `prev' will never be the same as `next'.
- * The `mb' is to tell GCC not to cache `current' across this call.
- */
-extern asmlinkage
-struct task_struct *__switch_to(struct thread_struct *prev_thread,
-                               struct thread_struct *next_thread,
-                               struct task_struct *prev);
-
-#define switch_to(prev, next, last)                                    \
-do {                                                                   \
-       (prev)->thread.sched_lr =                                       \
-               (unsigned long) __builtin_return_address(0);            \
-       (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
-       mb();                                                           \
-} while(0)
-
-/*
- * interrupt flag manipulation
- * - use virtual interrupt management since touching the PSR is slow
- *   - ICC2.Z: T if interrupts virtually disabled
- *   - ICC2.C: F if interrupts really disabled
- * - if Z==1 upon interrupt:
- *   - C is set to 0
- *   - interrupts are really disabled
- *   - entry.S returns immediately
- * - uses TIHI (TRAP if Z==0 && C==0) #2 to really reenable interrupts
- *   - if taken, the trap:
- *     - sets ICC2.C
- *     - enables interrupts
- */
-#define local_irq_disable()                                    \
-do {                                                           \
-       /* set Z flag, but don't change the C flag */           \
-       asm volatile("  andcc   gr0,gr0,gr0,icc2        \n"     \
-                    :                                          \
-                    :                                          \
-                    : "memory", "icc2"                         \
-                    );                                         \
-} while(0)
-
-#define local_irq_enable()                                     \
-do {                                                           \
-       /* clear Z flag and then test the C flag */             \
-       asm volatile("  oricc   gr0,#1,gr0,icc2         \n"     \
-                    "  tihi    icc2,gr0,#2             \n"     \
-                    :                                          \
-                    :                                          \
-                    : "memory", "icc2"                         \
-                    );                                         \
-} while(0)
-
-#define local_save_flags(flags)                                        \
-do {                                                           \
-       typecheck(unsigned long, flags);                        \
-       asm volatile("movsg ccr,%0"                             \
-                    : "=r"(flags)                              \
-                    :                                          \
-                    : "memory");                               \
-                                                               \
-       /* shift ICC2.Z to bit 0 */                             \
-       flags >>= 26;                                           \
-                                                               \
-       /* make flags 1 if interrupts disabled, 0 otherwise */  \
-       flags &= 1UL;                                           \
-} while(0)
-
-#define irqs_disabled() \
-       ({unsigned long flags; local_save_flags(flags); !!flags; })
-
-#define        local_irq_save(flags)                   \
-do {                                           \
-       typecheck(unsigned long, flags);        \
-       local_save_flags(flags);                \
-       local_irq_disable();                    \
-} while(0)
-
-#define        local_irq_restore(flags)                                        \
-do {                                                                   \
-       typecheck(unsigned long, flags);                                \
-                                                                       \
-       /* load the Z flag by turning 1 if disabled into 0 if disabled  \
-        * and thus setting the Z flag but not the C flag */            \
-       asm volatile("  xoricc  %0,#1,gr0,icc2          \n"             \
-                    /* then test Z=0 and C=0 */                        \
-                    "  tihi    icc2,gr0,#2             \n"             \
-                    :                                                  \
-                    : "r"(flags)                                       \
-                    : "memory", "icc2"                                 \
-                    );                                                 \
-                                                                       \
-} while(0)
-
-/*
- * real interrupt flag manipulation
- */
-#define __local_irq_disable()                          \
-do {                                                   \
-       unsigned long psr;                              \
-       asm volatile("  movsg   psr,%0          \n"     \
-                    "  andi    %0,%2,%0        \n"     \
-                    "  ori     %0,%1,%0        \n"     \
-                    "  movgs   %0,psr          \n"     \
-                    : "=r"(psr)                        \
-                    : "i" (PSR_PIL_14), "i" (~PSR_PIL) \
-                    : "memory");                       \
-} while(0)
-
-#define __local_irq_enable()                           \
-do {                                                   \
-       unsigned long psr;                              \
-       asm volatile("  movsg   psr,%0          \n"     \
-                    "  andi    %0,%1,%0        \n"     \
-                    "  movgs   %0,psr          \n"     \
-                    : "=r"(psr)                        \
-                    : "i" (~PSR_PIL)                   \
-                    : "memory");                       \
-} while(0)
-
-#define __local_save_flags(flags)              \
-do {                                           \
-       typecheck(unsigned long, flags);        \
-       asm("movsg psr,%0"                      \
-           : "=r"(flags)                       \
-           :                                   \
-           : "memory");                        \
-} while(0)
-
-#define        __local_irq_save(flags)                         \
-do {                                                   \
-       unsigned long npsr;                             \
-       typecheck(unsigned long, flags);                \
-       asm volatile("  movsg   psr,%0          \n"     \
-                    "  andi    %0,%3,%1        \n"     \
-                    "  ori     %1,%2,%1        \n"     \
-                    "  movgs   %1,psr          \n"     \
-                    : "=r"(flags), "=r"(npsr)          \
-                    : "i" (PSR_PIL_14), "i" (~PSR_PIL) \
-                    : "memory");                       \
-} while(0)
-
-#define        __local_irq_restore(flags)                      \
-do {                                                   \
-       typecheck(unsigned long, flags);                \
-       asm volatile("  movgs   %0,psr          \n"     \
-                    :                                  \
-                    : "r" (flags)                      \
-                    : "memory");                       \
-} while(0)
-
-#define __irqs_disabled() \
-       ((__get_PSR() & PSR_PIL) >= PSR_PIL_14)
-
-/*
- * Force strict CPU ordering.
- */
-#define nop()                  asm volatile ("nop"::)
-#define mb()                   asm volatile ("membar" : : :"memory")
-#define rmb()                  asm volatile ("membar" : : :"memory")
-#define wmb()                  asm volatile ("membar" : : :"memory")
-#define read_barrier_depends() do { } while (0)
-
-#ifdef CONFIG_SMP
-#define smp_mb()                       mb()
-#define smp_rmb()                      rmb()
-#define smp_wmb()                      wmb()
-#define smp_read_barrier_depends()     read_barrier_depends()
-#define set_mb(var, value) \
-       do { xchg(&var, (value)); } while (0)
-#else
-#define smp_mb()                       barrier()
-#define smp_rmb()                      barrier()
-#define smp_wmb()                      barrier()
-#define smp_read_barrier_depends()     do {} while(0)
-#define set_mb(var, value) \
-       do { var = (value); barrier(); } while (0)
-#endif
-
-extern void die_if_kernel(const char *, ...) __attribute__((format(printf, 1, 2)));
-extern void free_initmem(void);
-
-#define arch_align_stack(x) (x)
-
-/*****************************************************************************/
-/*
- * compare and conditionally exchange value with memory
- * - if (*ptr == test) then orig = *ptr; *ptr = test;
- * - if (*ptr != test) then orig = *ptr;
- */
-#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
-
-#define cmpxchg(ptr, test, new)                                                        \
-({                                                                             \
-       __typeof__(ptr) __xg_ptr = (ptr);                                       \
-       __typeof__(*(ptr)) __xg_orig, __xg_tmp;                                 \
-       __typeof__(*(ptr)) __xg_test = (test);                                  \
-       __typeof__(*(ptr)) __xg_new = (new);                                    \
-                                                                               \
-       switch (sizeof(__xg_orig)) {                                            \
-       case 4:                                                                 \
-               asm volatile(                                                   \
-                       "0:                                             \n"     \
-                       "       orcc            gr0,gr0,gr0,icc3        \n"     \
-                       "       ckeq            icc3,cc7                \n"     \
-                       "       ld.p            %M0,%1                  \n"     \
-                       "       orcr            cc7,cc7,cc3             \n"     \
-                       "       sub%I4cc        %1,%4,%2,icc0           \n"     \
-                       "       bne             icc0,#0,1f              \n"     \
-                       "       cst.p           %3,%M0          ,cc3,#1 \n"     \
-                       "       corcc           gr29,gr29,gr0   ,cc3,#1 \n"     \
-                       "       beq             icc3,#0,0b              \n"     \
-                       "1:                                             \n"     \
-                       : "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp)    \
-                       : "r"(__xg_new), "NPr"(__xg_test)                       \
-                       : "memory", "cc7", "cc3", "icc3", "icc0"                \
-                       );                                                      \
-               break;                                                          \
-                                                                               \
-       default:                                                                \
-               __xg_orig = (__typeof__(__xg_orig))0;                           \
-               asm volatile("break");                                          \
-               break;                                                          \
-       }                                                                       \
-                                                                               \
-       __xg_orig;                                                              \
-})
-
-#else
-
-extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
-
-#define cmpxchg(ptr, test, new)                                                        \
-({                                                                             \
-       __typeof__(ptr) __xg_ptr = (ptr);                                       \
-       __typeof__(*(ptr)) __xg_orig;                                           \
-       __typeof__(*(ptr)) __xg_test = (test);                                  \
-       __typeof__(*(ptr)) __xg_new = (new);                                    \
-                                                                               \
-       switch (sizeof(__xg_orig)) {                                            \
-       case 4: __xg_orig = (__force __typeof__(*ptr))                          \
-                       __cmpxchg_32((__force uint32_t *)__xg_ptr,              \
-                                        (__force uint32_t)__xg_test,           \
-                                        (__force uint32_t)__xg_new); break;    \
-       default:                                                                \
-               __xg_orig = (__typeof__(__xg_orig))0;                           \
-               asm volatile("break");                                          \
-               break;                                                          \
-       }                                                                       \
-                                                                               \
-       __xg_orig;                                                              \
-})
-
-#endif
-
-#include <asm-generic/cmpxchg-local.h>
-
-static inline unsigned long __cmpxchg_local(volatile void *ptr,
-                                     unsigned long old,
-                                     unsigned long new, int size)
-{
-       switch (size) {
-       case 4:
-               return cmpxchg((unsigned long *)ptr, old, new);
-       default:
-               return __cmpxchg_local_generic(ptr, old, new, size);
-       }
-
-       return old;
-}
-
-/*
- * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
- * them available.
- */
-#define cmpxchg_local(ptr, o, n)                                       \
-       ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
-                       (unsigned long)(n), sizeof(*(ptr))))
-#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
-
-#endif /* _ASM_SYSTEM_H */
diff --git a/include/asm-frv/termbits.h b/include/asm-frv/termbits.h
deleted file mode 100644 (file)
index 5568492..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-#ifndef _ASM_TERMBITS_H__
-#define _ASM_TERMBITS_H__
-
-#include <linux/posix_types.h>
-
-typedef unsigned char  cc_t;
-typedef unsigned int   speed_t;
-typedef unsigned int   tcflag_t;
-
-#define NCCS 19
-struct termios {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-};
-
-struct termios2 {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       speed_t c_ispeed;               /* input speed */
-       speed_t c_ospeed;               /* output speed */
-};
-
-struct ktermios {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       speed_t c_ispeed;               /* input speed */
-       speed_t c_ospeed;               /* output speed */
-};
-
-/* c_cc characters */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VEOL 11
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-#define VEOL2 16
-
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK  0000020
-#define ISTRIP 0000040
-#define INLCR  0000100
-#define IGNCR  0000200
-#define ICRNL  0000400
-#define IUCLC  0001000
-#define IXON   0002000
-#define IXANY  0004000
-#define IXOFF  0010000
-#define IMAXBEL        0020000
-#define IUTF8  0040000
-
-/* c_oflag bits */
-#define OPOST  0000001
-#define OLCUC  0000002
-#define ONLCR  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#define NLDLY  0000400
-#define   NL0  0000000
-#define   NL1  0000400
-#define CRDLY  0003000
-#define   CR0  0000000
-#define   CR1  0001000
-#define   CR2  0002000
-#define   CR3  0003000
-#define TABDLY 0014000
-#define   TAB0 0000000
-#define   TAB1 0004000
-#define   TAB2 0010000
-#define   TAB3 0014000
-#define   XTABS        0014000
-#define BSDLY  0020000
-#define   BS0  0000000
-#define   BS1  0020000
-#define VTDLY  0040000
-#define   VT0  0000000
-#define   VT1  0040000
-#define FFDLY  0100000
-#define   FF0  0000000
-#define   FF1  0100000
-
-/* c_cflag bit meaning */
-#define CBAUD  0010017
-#define  B0    0000000         /* hang up */
-#define  B50   0000001
-#define  B75   0000002
-#define  B110  0000003
-#define  B134  0000004
-#define  B150  0000005
-#define  B200  0000006
-#define  B300  0000007
-#define  B600  0000010
-#define  B1200 0000011
-#define  B1800 0000012
-#define  B2400 0000013
-#define  B4800 0000014
-#define  B9600 0000015
-#define  B19200        0000016
-#define  B38400        0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CSIZE  0000060
-#define   CS5  0000000
-#define   CS6  0000020
-#define   CS7  0000040
-#define   CS8  0000060
-#define CSTOPB 0000100
-#define CREAD  0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL  0002000
-#define CLOCAL 0004000
-#define CBAUDEX 0010000
-#define    BOTHER 0010000
-#define    B57600 0010001
-#define   B115200 0010002
-#define   B230400 0010003
-#define   B460800 0010004
-#define   B500000 0010005
-#define   B576000 0010006
-#define   B921600 0010007
-#define  B1000000 0010010
-#define  B1152000 0010011
-#define  B1500000 0010012
-#define  B2000000 0010013
-#define  B2500000 0010014
-#define  B3000000 0010015
-#define  B3500000 0010016
-#define  B4000000 0010017
-#define CIBAUD   002003600000          /* Input baud rate */
-#define CTVB     004000000000          /* VisioBraille Terminal flow control */
-#define CMSPAR   010000000000          /* mark or space (stick) parity */
-#define CRTSCTS          020000000000          /* flow control */
-
-#define IBSHIFT        16                      /* Shift from CBAUD to CIBAUD */
-
-/* c_lflag bits */
-#define ISIG   0000001
-#define ICANON 0000002
-#define XCASE  0000004
-#define ECHO   0000010
-#define ECHOE  0000020
-#define ECHOK  0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define TOSTOP 0000400
-#define ECHOCTL        0001000
-#define ECHOPRT        0002000
-#define ECHOKE 0004000
-#define FLUSHO 0010000
-#define PENDIN 0040000
-#define IEXTEN 0100000
-
-
-/* tcflow() and TCXONC use these */
-#define        TCOOFF          0
-#define        TCOON           1
-#define        TCIOFF          2
-#define        TCION           3
-
-/* tcflush() and TCFLSH use these */
-#define        TCIFLUSH        0
-#define        TCOFLUSH        1
-#define        TCIOFLUSH       2
-
-/* tcsetattr uses these */
-#define        TCSANOW         0
-#define        TCSADRAIN       1
-#define        TCSAFLUSH       2
-
-#endif /* _ASM_TERMBITS_H__ */
-
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h
deleted file mode 100644 (file)
index a62fb58..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef _ASM_TERMIOS_H
-#define _ASM_TERMIOS_H
-
-#include <asm/termbits.h>
-#include <asm/ioctls.h>
-
-struct winsize {
-       unsigned short ws_row;
-       unsigned short ws_col;
-       unsigned short ws_xpixel;
-       unsigned short ws_ypixel;
-};
-
-#define NCC 8
-struct termio {
-       unsigned short c_iflag;         /* input mode flags */
-       unsigned short c_oflag;         /* output mode flags */
-       unsigned short c_cflag;         /* control mode flags */
-       unsigned short c_lflag;         /* local mode flags */
-       unsigned char c_line;           /* line discipline */
-       unsigned char c_cc[NCC];        /* control characters */
-};
-
-#ifdef __KERNEL__
-/*     intr=^C         quit=^|         erase=del       kill=^U
-       eof=^D          vtime=\0        vmin=\1         sxtc=\0
-       start=^Q        stop=^S         susp=^Z         eol=\0
-       reprint=^R      discard=^U      werase=^W       lnext=^V
-       eol2=\0
-*/
-#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
-#endif
-
-/* modem lines */
-#define TIOCM_LE       0x001
-#define TIOCM_DTR      0x002
-#define TIOCM_RTS      0x004
-#define TIOCM_ST       0x008
-#define TIOCM_SR       0x010
-#define TIOCM_CTS      0x020
-#define TIOCM_CAR      0x040
-#define TIOCM_RNG      0x080
-#define TIOCM_DSR      0x100
-#define TIOCM_CD       TIOCM_CAR
-#define TIOCM_RI       TIOCM_RNG
-#define TIOCM_OUT1     0x2000
-#define TIOCM_OUT2     0x4000
-#define TIOCM_LOOP     0x8000
-
-#define TIOCM_MODEM_BITS       TIOCM_OUT2      /* IRDA support */
-
-/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-
-#ifdef __KERNEL__
-#include <asm-generic/termios.h>
-#endif
-
-#endif /* _ASM_TERMIOS_H */
diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h
deleted file mode 100644 (file)
index b7ac6bf..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/* thread_info.h: description
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * Derived from include/asm-i386/thread_info.h
- *
- * 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.
- */
-
-#ifndef _ASM_THREAD_INFO_H
-#define _ASM_THREAD_INFO_H
-
-#ifdef __KERNEL__
-
-#ifndef __ASSEMBLY__
-#include <asm/processor.h>
-#endif
-
-#define THREAD_SIZE            8192
-
-/*
- * low level task data that entry.S needs immediate access to
- * - this struct should fit entirely inside of one cache line
- * - this struct shares the supervisor stack pages
- * - if the contents of this structure are changed, the assembly constants must also be changed
- */
-#ifndef __ASSEMBLY__
-
-struct thread_info {
-       struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
-       unsigned long           flags;          /* low level flags */
-       unsigned long           status;         /* thread-synchronous flags */
-       __u32                   cpu;            /* current CPU */
-       int                     preempt_count;  /* 0 => preemptable, <0 => BUG */
-
-       mm_segment_t            addr_limit;     /* thread address space:
-                                                  0-0xBFFFFFFF for user-thead
-                                                  0-0xFFFFFFFF for kernel-thread
-                                               */
-       struct restart_block    restart_block;
-
-       __u8                    supervisor_stack[0];
-};
-
-#else /* !__ASSEMBLY__ */
-
-#include <asm/asm-offsets.h>
-
-#endif
-
-#define PREEMPT_ACTIVE         0x10000000
-
-/*
- * macros/functions for gaining access to the thread information structure
- *
- * preempt_count needs to be 1 initially, until the scheduler is functional.
- */
-#ifndef __ASSEMBLY__
-
-#define INIT_THREAD_INFO(tsk)                  \
-{                                              \
-       .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
-       .flags          = 0,                    \
-       .cpu            = 0,                    \
-       .preempt_count  = 1,                    \
-       .addr_limit     = KERNEL_DS,            \
-       .restart_block = {                      \
-               .fn = do_no_restart_syscall,    \
-       },                                      \
-}
-
-#define init_thread_info       (init_thread_union.thread_info)
-#define init_stack             (init_thread_union.stack)
-
-/* how to get the thread information struct from C */
-register struct thread_info *__current_thread_info asm("gr15");
-
-#define current_thread_info() ({ __current_thread_info; })
-
-#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
-
-/* thread information allocation */
-#ifdef CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk)                                 \
-       ({                                                      \
-               struct thread_info *ret;                        \
-                                                               \
-               ret = kzalloc(THREAD_SIZE, GFP_KERNEL);         \
-                                                               \
-               ret;                                            \
-       })
-#else
-#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
-#endif
-
-#define free_thread_info(info) kfree(info)
-
-#endif /* __ASSEMBLY__ */
-
-/*
- * thread information flags
- * - these are process state flags that various assembly files may need to access
- * - pending work-to-be-done flags are in LSW
- * - other flags in MSW
- */
-#define TIF_SYSCALL_TRACE      0       /* syscall trace active */
-#define TIF_SIGPENDING         1       /* signal pending */
-#define TIF_NEED_RESCHED       2       /* rescheduling necessary */
-#define TIF_SINGLESTEP         3       /* restore singlestep on return to user mode */
-#define TIF_IRET               4       /* return with iret */
-#define TIF_RESTORE_SIGMASK    5       /* restore signal mask in do_signal() */
-#define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
-#define TIF_MEMDIE             17      /* OOM killer killed process */
-#define TIF_FREEZE             18      /* freezing for suspend */
-
-#define _TIF_SYSCALL_TRACE     (1 << TIF_SYSCALL_TRACE)
-#define _TIF_SIGPENDING                (1 << TIF_SIGPENDING)
-#define _TIF_NEED_RESCHED      (1 << TIF_NEED_RESCHED)
-#define _TIF_SINGLESTEP                (1 << TIF_SINGLESTEP)
-#define _TIF_IRET              (1 << TIF_IRET)
-#define _TIF_RESTORE_SIGMASK   (1 << TIF_RESTORE_SIGMASK)
-#define _TIF_POLLING_NRFLAG    (1 << TIF_POLLING_NRFLAG)
-#define _TIF_FREEZE            (1 << TIF_FREEZE)
-
-#define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
-#define _TIF_ALLWORK_MASK      0x0000FFFF      /* work to do on any return to u-space */
-
-/*
- * Thread-synchronous status.
- *
- * This is different from the flags in that nobody else
- * ever touches our thread-synchronous status, so we don't
- * have to worry about atomic accesses.
- */
-#define TS_USEDFPM             0x0001  /* FPU/Media was used by this task this quantum (SMP) */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-frv/timer-regs.h b/include/asm-frv/timer-regs.h
deleted file mode 100644 (file)
index 6c5a871..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/* timer-regs.h: hardware timer register definitions
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_TIMER_REGS_H
-#define _ASM_TIMER_REGS_H
-
-#include <asm/sections.h>
-
-extern unsigned long __nongprelbss __clkin_clock_speed_HZ;
-extern unsigned long __nongprelbss __ext_bus_clock_speed_HZ;
-extern unsigned long __nongprelbss __res_bus_clock_speed_HZ;
-extern unsigned long __nongprelbss __sdram_clock_speed_HZ;
-extern unsigned long __nongprelbss __core_bus_clock_speed_HZ;
-extern unsigned long __nongprelbss __core_clock_speed_HZ;
-extern unsigned long __nongprelbss __dsu_clock_speed_HZ;
-extern unsigned long __nongprelbss __serial_clock_speed_HZ;
-
-#define __get_CLKC()   ({ *(volatile unsigned long *)(0xfeff9a00); })
-
-static inline void __set_CLKC(unsigned long v)
-{
-       int tmp;
-
-       asm volatile("  st%I0.p %2,%M0          \n"
-                    "  setlos  %3,%1           \n"
-                    "  membar                  \n"
-                    "0:                        \n"
-                    "  subicc  %1,#1,%1,icc0   \n"
-                    "  bnc     icc0,#1,0b      \n"
-                    : "=m"(*(volatile unsigned long *) 0xfeff9a00), "=r"(tmp)
-                    : "r"(v), "i"(256)
-                    : "icc0");
-}
-
-#define __get_TCTR()   ({ *(volatile unsigned long *)(0xfeff9418); })
-#define __get_TPRV()   ({ *(volatile unsigned long *)(0xfeff9420); })
-#define __get_TPRCKSL()        ({ *(volatile unsigned long *)(0xfeff9428); })
-#define __get_TCSR(T)  ({ *(volatile unsigned long *)(0xfeff9400 + 8 * (T)); })
-#define __get_TxCKSL(T)        ({ *(volatile unsigned long *)(0xfeff9430 + 8 * (T)); })
-
-#define __get_TCSR_DATA(T) ({ __get_TCSR(T) >> 24; })
-
-#define __set_TCTR(V)  do { *(volatile unsigned long *)(0xfeff9418) = (V); mb(); } while(0)
-#define __set_TPRV(V)  do { *(volatile unsigned long *)(0xfeff9420) = (V) << 24; mb(); } while(0)
-#define __set_TPRCKSL(V) do { *(volatile unsigned long *)(0xfeff9428) = (V); mb(); } while(0)
-#define __set_TCSR(T,V)        \
-do { *(volatile unsigned long *)(0xfeff9400 + 8 * (T)) = (V); mb(); } while(0)
-
-#define __set_TxCKSL(T,V) \
-do { *(volatile unsigned long *)(0xfeff9430 + 8 * (T)) = (V); mb(); } while(0)
-
-#define __set_TCSR_DATA(T,V) __set_TCSR(T, (V) << 24)
-#define __set_TxCKSL_DATA(T,V) __set_TxCKSL(T, TxCKSL_EIGHT | __TxCKSL_SELECT((V)))
-
-/* clock control register */
-#define CLKC_CMODE             0x0f000000
-#define CLKC_SLPL              0x000f0000
-#define CLKC_P0                        0x00000100
-#define CLKC_CM                        0x00000003
-
-#define CLKC_CMODE_s           24
-
-/* timer control register - non-readback mode */
-#define TCTR_MODE_0            0x00000000
-#define TCTR_MODE_2            0x04000000
-#define TCTR_MODE_4            0x08000000
-#define TCTR_MODE_5            0x0a000000
-#define TCTR_RL_LATCH          0x00000000
-#define TCTR_RL_RW_LOW8                0x10000000
-#define TCTR_RL_RW_HIGH8       0x20000000
-#define TCTR_RL_RW_LH8         0x30000000
-#define TCTR_SC_CTR0           0x00000000
-#define TCTR_SC_CTR1           0x40000000
-#define TCTR_SC_CTR2           0x80000000
-
-/* timer control register - readback mode */
-#define TCTR_CNT0              0x02000000
-#define TCTR_CNT1              0x04000000
-#define TCTR_CNT2              0x08000000
-#define TCTR_NSTATUS           0x10000000
-#define TCTR_NCOUNT            0x20000000
-#define TCTR_SC_READBACK       0xc0000000
-
-/* timer control status registers - non-readback mode */
-#define TCSRx_DATA             0xff000000
-
-/* timer control status registers - readback mode */
-#define TCSRx_OUTPUT           0x80000000
-#define TCSRx_NULLCOUNT                0x40000000
-#define TCSRx_RL               0x30000000
-#define TCSRx_MODE             0x07000000
-
-/* timer clock select registers */
-#define TxCKSL_SELECT          0x0f000000
-#define __TxCKSL_SELECT(X)     ((X) << 24)
-#define TxCKSL_EIGHT           0xf0000000
-
-#endif /* _ASM_TIMER_REGS_H */
diff --git a/include/asm-frv/timex.h b/include/asm-frv/timex.h
deleted file mode 100644 (file)
index a89bdde..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* timex.h: FR-V architecture timex specifications
- */
-#ifndef _ASM_TIMEX_H
-#define _ASM_TIMEX_H
-
-#define CLOCK_TICK_RATE                1193180 /* Underlying HZ */
-#define CLOCK_TICK_FACTOR      20      /* Factor of both 1000000 and CLOCK_TICK_RATE */
-
-typedef unsigned long cycles_t;
-
-static inline cycles_t get_cycles(void)
-{
-       return 0;
-}
-
-#define vxtime_lock()          do {} while (0)
-#define vxtime_unlock()                do {} while (0)
-
-#endif
-
diff --git a/include/asm-frv/tlb.h b/include/asm-frv/tlb.h
deleted file mode 100644 (file)
index cd458eb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _ASM_TLB_H
-#define _ASM_TLB_H
-
-#include <asm/tlbflush.h>
-
-#ifdef CONFIG_MMU
-extern void check_pgt_cache(void);
-#else
-#define check_pgt_cache() do {} while(0)
-#endif
-
-/*
- * we don't need any special per-pte or per-vma handling...
- */
-#define tlb_start_vma(tlb, vma)                                do { } while (0)
-#define tlb_end_vma(tlb, vma)                          do { } while (0)
-#define __tlb_remove_tlb_entry(tlb, ptep, address)     do { } while (0)
-
-/*
- * .. because we flush the whole mm when it fills up
- */
-#define tlb_flush(tlb)         flush_tlb_mm((tlb)->mm)
-
-#include <asm-generic/tlb.h>
-
-#endif /* _ASM_TLB_H */
-
diff --git a/include/asm-frv/tlbflush.h b/include/asm-frv/tlbflush.h
deleted file mode 100644 (file)
index 7ac5eaf..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/* tlbflush.h: TLB flushing functions
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_TLBFLUSH_H
-#define _ASM_TLBFLUSH_H
-
-#include <linux/mm.h>
-#include <asm/processor.h>
-
-#ifdef CONFIG_MMU
-
-#ifndef __ASSEMBLY__
-extern void asmlinkage __flush_tlb_all(void);
-extern void asmlinkage __flush_tlb_mm(unsigned long contextid);
-extern void asmlinkage __flush_tlb_page(unsigned long contextid, unsigned long start);
-extern void asmlinkage __flush_tlb_range(unsigned long contextid,
-                                        unsigned long start, unsigned long end);
-#endif /* !__ASSEMBLY__ */
-
-#define flush_tlb_all()                                \
-do {                                           \
-       preempt_disable();                      \
-       __flush_tlb_all();                      \
-       preempt_enable();                       \
-} while(0)
-
-#define flush_tlb_mm(mm)                       \
-do {                                           \
-       preempt_disable();                      \
-       __flush_tlb_mm((mm)->context.id);       \
-       preempt_enable();                       \
-} while(0)
-
-#define flush_tlb_range(vma,start,end)                                 \
-do {                                                                   \
-       preempt_disable();                                              \
-       __flush_tlb_range((vma)->vm_mm->context.id, start, end);        \
-       preempt_enable();                                               \
-} while(0)
-
-#define flush_tlb_page(vma,addr)                               \
-do {                                                           \
-       preempt_disable();                                      \
-       __flush_tlb_page((vma)->vm_mm->context.id, addr);       \
-       preempt_enable();                                       \
-} while(0)
-
-
-#define __flush_tlb_global()                   flush_tlb_all()
-#define flush_tlb()                            flush_tlb_all()
-#define flush_tlb_kernel_range(start, end)     flush_tlb_all()
-
-#else
-
-#define flush_tlb()                            BUG()
-#define flush_tlb_all()                                BUG()
-#define flush_tlb_mm(mm)                       BUG()
-#define flush_tlb_page(vma,addr)               BUG()
-#define flush_tlb_range(mm,start,end)          BUG()
-#define flush_tlb_kernel_range(start, end)     BUG()
-
-#endif
-
-
-#endif /* _ASM_TLBFLUSH_H */
diff --git a/include/asm-frv/topology.h b/include/asm-frv/topology.h
deleted file mode 100644 (file)
index 9427243..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_TOPOLOGY_H
-#define _ASM_TOPOLOGY_H
-
-#ifdef CONFIG_NUMA
-
-#error NUMA not supported yet
-
-#endif /* CONFIG_NUMA */
-
-#include <asm-generic/topology.h>
-
-#endif /* _ASM_TOPOLOGY_H */
diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h
deleted file mode 100644 (file)
index 613bf1e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* types.h: FRV types
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_TYPES_H
-#define _ASM_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#ifndef __ASSEMBLY__
-
-typedef unsigned short umode_t;
-
-#endif /* __ASSEMBLY__ */
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-#ifdef __KERNEL__
-
-#define BITS_PER_LONG 32
-
-#ifndef __ASSEMBLY__
-
-/* Dma addresses are 32-bits wide.  */
-
-typedef u32 dma_addr_t;
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_TYPES_H */
diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h
deleted file mode 100644 (file)
index 53650c9..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-/* uaccess.h: userspace accessor functions
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_UACCESS_H
-#define _ASM_UACCESS_H
-
-/*
- * User space memory access functions
- */
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <asm/segment.h>
-#include <asm/sections.h>
-
-#define HAVE_ARCH_UNMAPPED_AREA        /* we decide where to put mmaps */
-
-#define __ptr(x) ((unsigned long __force *)(x))
-
-#define VERIFY_READ    0
-#define VERIFY_WRITE   1
-
-#define __addr_ok(addr) ((unsigned long)(addr) < get_addr_limit())
-
-/*
- * check that a range of addresses falls within the current address limit
- */
-static inline int ___range_ok(unsigned long addr, unsigned long size)
-{
-#ifdef CONFIG_MMU
-       int flag = -EFAULT, tmp;
-
-       asm volatile (
-               "       addcc   %3,%2,%1,icc0   \n"     /* set C-flag if addr+size>4GB */
-               "       subcc.p %1,%4,gr0,icc1  \n"     /* jump if addr+size>limit */
-               "       bc      icc0,#0,0f      \n"
-               "       bhi     icc1,#0,0f      \n"
-               "       setlos  #0,%0           \n"     /* mark okay */
-               "0:                             \n"
-               : "=r"(flag), "=&r"(tmp)
-               : "r"(addr), "r"(size), "r"(get_addr_limit()), "0"(flag)
-               );
-
-       return flag;
-
-#else
-
-       if (addr < memory_start ||
-           addr > memory_end ||
-           size > memory_end - memory_start ||
-           addr + size > memory_end)
-               return -EFAULT;
-
-       return 0;
-#endif
-}
-
-#define __range_ok(addr,size) ___range_ok((unsigned long) (addr), (unsigned long) (size))
-
-#define access_ok(type,addr,size) (__range_ok((void __user *)(addr), (size)) == 0)
-#define __access_ok(addr,size) (__range_ok((addr), (size)) == 0)
-
-/*
- * The exception table consists of pairs of addresses: the first is the
- * address of an instruction that is allowed to fault, and the second is
- * the address at which the program should continue.  No registers are
- * modified, so it is entirely up to the continuation code to figure out
- * what to do.
- *
- * All the routines below use bits of fixup code that are out of line
- * with the main instruction path.  This means when everything is well,
- * we don't even have to jump over them.  Further, they do not intrude
- * on our cache or tlb entries.
- */
-struct exception_table_entry
-{
-       unsigned long insn, fixup;
-};
-
-/* Returns 0 if exception not found and fixup otherwise.  */
-extern unsigned long search_exception_table(unsigned long);
-
-
-/*
- * These are the main single-value transfer routines.  They automatically
- * use the right size if we just have the right pointer type.
- */
-#define __put_user(x, ptr)                                             \
-({                                                                     \
-       int __pu_err = 0;                                               \
-                                                                       \
-       typeof(*(ptr)) __pu_val = (x);                                  \
-       __chk_user_ptr(ptr);                                            \
-                                                                       \
-       switch (sizeof (*(ptr))) {                                      \
-       case 1:                                                         \
-               __put_user_asm(__pu_err, __pu_val, ptr, "b", "r");      \
-               break;                                                  \
-       case 2:                                                         \
-               __put_user_asm(__pu_err, __pu_val, ptr, "h", "r");      \
-               break;                                                  \
-       case 4:                                                         \
-               __put_user_asm(__pu_err, __pu_val, ptr, "",  "r");      \
-               break;                                                  \
-       case 8:                                                         \
-               __put_user_asm(__pu_err, __pu_val, ptr, "d", "e");      \
-               break;                                                  \
-       default:                                                        \
-               __pu_err = __put_user_bad();                            \
-               break;                                                  \
-       }                                                               \
-       __pu_err;                                                       \
-})
-
-#define put_user(x, ptr)                       \
-({                                             \
-       typeof(*(ptr)) __user *_p = (ptr);      \
-       int _e;                                 \
-                                               \
-       _e = __range_ok(_p, sizeof(*_p));       \
-       if (_e == 0)                            \
-               _e = __put_user((x), _p);       \
-       _e;                                     \
-})
-
-extern int __put_user_bad(void);
-
-/*
- * Tell gcc we read from memory instead of writing: this is because
- * we do not write to any memory gcc knows about, so there are no
- * aliasing issues.
- */
-
-#ifdef CONFIG_MMU
-
-#define __put_user_asm(err,x,ptr,dsize,constraint)                                     \
-do {                                                                                   \
-       asm volatile("1:        st"dsize"%I1    %2,%M1  \n"                             \
-                    "2:                                \n"                             \
-                    ".subsection 2                     \n"                             \
-                    "3:        setlos          %3,%0   \n"                             \
-                    "          bra             2b      \n"                             \
-                    ".previous                         \n"                             \
-                    ".section __ex_table,\"a\"         \n"                             \
-                    "          .balign         8       \n"                             \
-                    "          .long           1b,3b   \n"                             \
-                    ".previous"                                                        \
-                    : "=r" (err)                                                       \
-                    : "m" (*__ptr(ptr)), constraint (x), "i"(-EFAULT), "0"(err)        \
-                    : "memory");                                                       \
-} while (0)
-
-#else
-
-#define __put_user_asm(err,x,ptr,bwl,con)      \
-do {                                           \
-       asm("   st"bwl"%I0      %1,%M0  \n"     \
-           "   membar                  \n"     \
-           :                                   \
-           : "m" (*__ptr(ptr)), con (x)        \
-           : "memory");                        \
-} while (0)
-
-#endif
-
-/*****************************************************************************/
-/*
- *
- */
-#define __get_user(x, ptr)                                             \
-({                                                                     \
-       int __gu_err = 0;                                               \
-       __chk_user_ptr(ptr);                                            \
-                                                                       \
-       switch (sizeof(*(ptr))) {                                       \
-       case 1: {                                                       \
-               unsigned char __gu_val;                                 \
-               __get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r");    \
-               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
-               break;                                                  \
-       }                                                               \
-       case 2: {                                                       \
-               unsigned short __gu_val;                                \
-               __get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r");    \
-               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
-               break;                                                  \
-       }                                                               \
-       case 4: {                                                       \
-               unsigned int __gu_val;                                  \
-               __get_user_asm(__gu_err, __gu_val, ptr, "", "=r");      \
-               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
-               break;                                                  \
-       }                                                               \
-       case 8: {                                                       \
-               unsigned long long __gu_val;                            \
-               __get_user_asm(__gu_err, __gu_val, ptr, "d", "=e");     \
-               (x) = *(__force __typeof__(*(ptr)) *) &__gu_val;        \
-               break;                                                  \
-       }                                                               \
-       default:                                                        \
-               __gu_err = __get_user_bad();                            \
-               break;                                                  \
-       }                                                               \
-       __gu_err;                                                       \
-})
-
-#define get_user(x, ptr)                       \
-({                                             \
-       const typeof(*(ptr)) __user *_p = (ptr);\
-       int _e;                                 \
-                                               \
-       _e = __range_ok(_p, sizeof(*_p));       \
-       if (likely(_e == 0))                    \
-               _e = __get_user((x), _p);       \
-       else                                    \
-               (x) = (typeof(x)) 0;            \
-       _e;                                     \
-})
-
-extern int __get_user_bad(void);
-
-#ifdef CONFIG_MMU
-
-#define __get_user_asm(err,x,ptr,dtype,constraint)     \
-do {                                                   \
-       asm("1:         ld"dtype"%I2    %M2,%1  \n"     \
-           "2:                                 \n"     \
-           ".subsection 2                      \n"     \
-           "3:         setlos          %3,%0   \n"     \
-           "           setlos          #0,%1   \n"     \
-           "           bra             2b      \n"     \
-           ".previous                          \n"     \
-           ".section __ex_table,\"a\"          \n"     \
-           "           .balign         8       \n"     \
-           "           .long           1b,3b   \n"     \
-           ".previous"                                 \
-           : "=r" (err), constraint (x)                \
-           : "m" (*__ptr(ptr)), "i"(-EFAULT), "0"(err) \
-           );                                          \
-} while(0)
-
-#else
-
-#define __get_user_asm(err,x,ptr,bwl,con)      \
-       asm("   ld"bwl"%I1      %M1,%0  \n"     \
-           "   membar                  \n"     \
-           : con(x)                            \
-           : "m" (*__ptr(ptr)))
-
-#endif
-
-/*****************************************************************************/
-/*
- *
- */
-#define ____force(x) (__force void *)(void __user *)(x)
-#ifdef CONFIG_MMU
-extern long __memset_user(void *dst, unsigned long count);
-extern long __memcpy_user(void *dst, const void *src, unsigned long count);
-
-#define clear_user(dst,count)                  __memset_user(____force(dst), (count))
-#define __copy_from_user_inatomic(to, from, n) __memcpy_user((to), ____force(from), (n))
-#define __copy_to_user_inatomic(to, from, n)   __memcpy_user(____force(to), (from), (n))
-
-#else
-
-#define clear_user(dst,count)                  (memset(____force(dst), 0, (count)), 0)
-#define __copy_from_user_inatomic(to, from, n) (memcpy((to), ____force(from), (n)), 0)
-#define __copy_to_user_inatomic(to, from, n)   (memcpy(____force(to), (from), (n)), 0)
-
-#endif
-
-#define __clear_user clear_user
-
-static inline unsigned long __must_check
-__copy_to_user(void __user *to, const void *from, unsigned long n)
-{
-       might_sleep();
-       return __copy_to_user_inatomic(to, from, n);
-}
-
-static inline unsigned long
-__copy_from_user(void *to, const void __user *from, unsigned long n)
-{
-       might_sleep();
-       return __copy_from_user_inatomic(to, from, n);
-}
-
-static inline long copy_from_user(void *to, const void __user *from, unsigned long n)
-{
-       unsigned long ret = n;
-
-       if (likely(__access_ok(from, n)))
-               ret = __copy_from_user(to, from, n);
-
-       if (unlikely(ret != 0))
-               memset(to + (n - ret), 0, ret);
-
-       return ret;
-}
-
-static inline long copy_to_user(void __user *to, const void *from, unsigned long n)
-{
-       return likely(__access_ok(to, n)) ? __copy_to_user(to, from, n) : n;
-}
-
-extern long strncpy_from_user(char *dst, const char __user *src, long count);
-extern long strnlen_user(const char __user *src, long count);
-
-#define strlen_user(str) strnlen_user(str, 32767)
-
-extern unsigned long search_exception_table(unsigned long addr);
-
-#endif /* _ASM_UACCESS_H */
diff --git a/include/asm-frv/ucontext.h b/include/asm-frv/ucontext.h
deleted file mode 100644 (file)
index 8d8c0c9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_UCONTEXT_H
-#define _ASM_UCONTEXT_H
-
-struct ucontext {
-       unsigned long           uc_flags;
-       struct ucontext         *uc_link;
-       stack_t                 uc_stack;
-       struct sigcontext       uc_mcontext;
-       sigset_t                uc_sigmask;     /* mask last for extensibility */
-};
-
-#endif
diff --git a/include/asm-frv/unaligned.h b/include/asm-frv/unaligned.h
deleted file mode 100644 (file)
index 6c61c05..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* unaligned.h: unaligned access handler
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_UNALIGNED_H
-#define _ASM_UNALIGNED_H
-
-#include <linux/unaligned/le_byteshift.h>
-#include <linux/unaligned/be_struct.h>
-#include <linux/unaligned/generic.h>
-
-#define get_unaligned  __get_unaligned_be
-#define put_unaligned  __put_unaligned_be
-
-#endif /* _ASM_UNALIGNED_H */
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
deleted file mode 100644 (file)
index edcfaf5..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-#ifndef _ASM_UNISTD_H_
-#define _ASM_UNISTD_H_
-
-/*
- * This file contains the system call numbers.
- */
-
-#define __NR_restart_syscall      0
-#define __NR_exit                1
-#define __NR_fork                2
-#define __NR_read                3
-#define __NR_write               4
-#define __NR_open                5
-#define __NR_close               6
-#define __NR_waitpid             7
-#define __NR_creat               8
-#define __NR_link                9
-#define __NR_unlink             10
-#define __NR_execve             11
-#define __NR_chdir              12
-#define __NR_time               13
-#define __NR_mknod              14
-#define __NR_chmod              15
-#define __NR_lchown             16
-#define __NR_break              17
-#define __NR_oldstat            18
-#define __NR_lseek              19
-#define __NR_getpid             20
-#define __NR_mount              21
-#define __NR_umount             22
-#define __NR_setuid             23
-#define __NR_getuid             24
-#define __NR_stime              25
-#define __NR_ptrace             26
-#define __NR_alarm              27
-#define __NR_oldfstat           28
-#define __NR_pause              29
-#define __NR_utime              30
-#define __NR_stty               31
-#define __NR_gtty               32
-#define __NR_access             33
-#define __NR_nice               34
-#define __NR_ftime              35
-#define __NR_sync               36
-#define __NR_kill               37
-#define __NR_rename             38
-#define __NR_mkdir              39
-#define __NR_rmdir              40
-#define __NR_dup                41
-#define __NR_pipe               42
-#define __NR_times              43
-#define __NR_prof               44
-#define __NR_brk                45
-#define __NR_setgid             46
-#define __NR_getgid             47
-#define __NR_signal             48
-#define __NR_geteuid            49
-#define __NR_getegid            50
-#define __NR_acct               51
-#define __NR_umount2            52
-#define __NR_lock               53
-#define __NR_ioctl              54
-#define __NR_fcntl              55
-#define __NR_mpx                56
-#define __NR_setpgid            57
-#define __NR_ulimit             58
-// #define __NR_oldolduname     /* 59 */ obsolete
-#define __NR_umask              60
-#define __NR_chroot             61
-#define __NR_ustat              62
-#define __NR_dup2               63
-#define __NR_getppid            64
-#define __NR_getpgrp            65
-#define __NR_setsid             66
-#define __NR_sigaction          67
-#define __NR_sgetmask           68
-#define __NR_ssetmask           69
-#define __NR_setreuid           70
-#define __NR_setregid           71
-#define __NR_sigsuspend                 72
-#define __NR_sigpending                 73
-#define __NR_sethostname        74
-#define __NR_setrlimit          75
-#define __NR_getrlimit          76     /* Back compatible 2Gig limited rlimit */
-#define __NR_getrusage          77
-#define __NR_gettimeofday       78
-#define __NR_settimeofday       79
-#define __NR_getgroups          80
-#define __NR_setgroups          81
-#define __NR_select             82
-#define __NR_symlink            83
-#define __NR_oldlstat           84
-#define __NR_readlink           85
-#define __NR_uselib             86
-#define __NR_swapon             87
-#define __NR_reboot             88
-#define __NR_readdir            89
-// #define __NR_mmap            90     /* obsolete - not implemented */
-#define __NR_munmap             91
-#define __NR_truncate           92
-#define __NR_ftruncate          93
-#define __NR_fchmod             94
-#define __NR_fchown             95
-#define __NR_getpriority        96
-#define __NR_setpriority        97
-// #define __NR_profil          /* 98 */ obsolete
-#define __NR_statfs             99
-#define __NR_fstatfs           100
-// #define __NR_ioperm         /* 101 */ not supported
-#define __NR_socketcall                102
-#define __NR_syslog            103
-#define __NR_setitimer         104
-#define __NR_getitimer         105
-#define __NR_stat              106
-#define __NR_lstat             107
-#define __NR_fstat             108
-// #define __NR_olduname               /* 109 */ obsolete
-// #define __NR_iopl           /* 110 */ not supported
-#define __NR_vhangup           111
-// #define __NR_idle           /* 112 */ Obsolete
-// #define __NR_vm86old                /* 113 */ not supported
-#define __NR_wait4             114
-#define __NR_swapoff           115
-#define __NR_sysinfo           116
-#define __NR_ipc               117
-#define __NR_fsync             118
-#define __NR_sigreturn         119
-#define __NR_clone             120
-#define __NR_setdomainname     121
-#define __NR_uname             122
-// #define __NR_modify_ldt     /* 123 */ not supported
-#define __NR_cacheflush                123
-#define __NR_adjtimex          124
-#define __NR_mprotect          125
-#define __NR_sigprocmask       126
-#define __NR_create_module     127
-#define __NR_init_module       128
-#define __NR_delete_module     129
-#define __NR_get_kernel_syms   130
-#define __NR_quotactl          131
-#define __NR_getpgid           132
-#define __NR_fchdir            133
-#define __NR_bdflush           134
-#define __NR_sysfs             135
-#define __NR_personality       136
-#define __NR_afs_syscall       137 /* Syscall for Andrew File System */
-#define __NR_setfsuid          138
-#define __NR_setfsgid          139
-#define __NR__llseek           140
-#define __NR_getdents          141
-#define __NR__newselect                142
-#define __NR_flock             143
-#define __NR_msync             144
-#define __NR_readv             145
-#define __NR_writev            146
-#define __NR_getsid            147
-#define __NR_fdatasync         148
-#define __NR__sysctl           149
-#define __NR_mlock             150
-#define __NR_munlock           151
-#define __NR_mlockall          152
-#define __NR_munlockall                153
-#define __NR_sched_setparam            154
-#define __NR_sched_getparam            155
-#define __NR_sched_setscheduler                156
-#define __NR_sched_getscheduler                157
-#define __NR_sched_yield               158
-#define __NR_sched_get_priority_max    159
-#define __NR_sched_get_priority_min    160
-#define __NR_sched_rr_get_interval     161
-#define __NR_nanosleep         162
-#define __NR_mremap            163
-#define __NR_setresuid         164
-#define __NR_getresuid         165
-// #define __NR_vm86           /* 166 */ not supported
-#define __NR_query_module      167
-#define __NR_poll              168
-#define __NR_nfsservctl                169
-#define __NR_setresgid         170
-#define __NR_getresgid         171
-#define __NR_prctl             172
-#define __NR_rt_sigreturn      173
-#define __NR_rt_sigaction      174
-#define __NR_rt_sigprocmask    175
-#define __NR_rt_sigpending     176
-#define __NR_rt_sigtimedwait   177
-#define __NR_rt_sigqueueinfo   178
-#define __NR_rt_sigsuspend     179
-#define __NR_pread64           180
-#define __NR_pwrite64          181
-#define __NR_chown             182
-#define __NR_getcwd            183
-#define __NR_capget            184
-#define __NR_capset            185
-#define __NR_sigaltstack       186
-#define __NR_sendfile          187
-#define __NR_getpmsg           188     /* some people actually want streams */
-#define __NR_putpmsg           189     /* some people actually want streams */
-#define __NR_vfork             190
-#define __NR_ugetrlimit                191     /* SuS compliant getrlimit */
-#define __NR_mmap2             192
-#define __NR_truncate64                193
-#define __NR_ftruncate64       194
-#define __NR_stat64            195
-#define __NR_lstat64           196
-#define __NR_fstat64           197
-#define __NR_lchown32          198
-#define __NR_getuid32          199
-#define __NR_getgid32          200
-#define __NR_geteuid32         201
-#define __NR_getegid32         202
-#define __NR_setreuid32                203
-#define __NR_setregid32                204
-#define __NR_getgroups32       205
-#define __NR_setgroups32       206
-#define __NR_fchown32          207
-#define __NR_setresuid32       208
-#define __NR_getresuid32       209
-#define __NR_setresgid32       210
-#define __NR_getresgid32       211
-#define __NR_chown32           212
-#define __NR_setuid32          213
-#define __NR_setgid32          214
-#define __NR_setfsuid32                215
-#define __NR_setfsgid32                216
-#define __NR_pivot_root                217
-#define __NR_mincore           218
-#define __NR_madvise           219
-
-#define __NR_getdents64                220
-#define __NR_fcntl64           221
-#define __NR_security          223     /* syscall for security modules */
-#define __NR_gettid            224
-#define __NR_readahead         225
-#define __NR_setxattr          226
-#define __NR_lsetxattr         227
-#define __NR_fsetxattr         228
-#define __NR_getxattr          229
-#define __NR_lgetxattr         230
-#define __NR_fgetxattr         231
-#define __NR_listxattr         232
-#define __NR_llistxattr                233
-#define __NR_flistxattr                234
-#define __NR_removexattr       235
-#define __NR_lremovexattr      236
-#define __NR_fremovexattr      237
-#define __NR_tkill             238
-#define __NR_sendfile64                239
-#define __NR_futex             240
-#define __NR_sched_setaffinity 241
-#define __NR_sched_getaffinity 242
-#define __NR_set_thread_area   243
-#define __NR_get_thread_area   244
-#define __NR_io_setup          245
-#define __NR_io_destroy                246
-#define __NR_io_getevents      247
-#define __NR_io_submit         248
-#define __NR_io_cancel         249
-#define __NR_fadvise64         250
-
-#define __NR_exit_group                252
-#define __NR_lookup_dcookie    253
-#define __NR_epoll_create      254
-#define __NR_epoll_ctl         255
-#define __NR_epoll_wait                256
-#define __NR_remap_file_pages  257
-#define __NR_set_tid_address   258
-#define __NR_timer_create      259
-#define __NR_timer_settime     (__NR_timer_create+1)
-#define __NR_timer_gettime     (__NR_timer_create+2)
-#define __NR_timer_getoverrun  (__NR_timer_create+3)
-#define __NR_timer_delete      (__NR_timer_create+4)
-#define __NR_clock_settime     (__NR_timer_create+5)
-#define __NR_clock_gettime     (__NR_timer_create+6)
-#define __NR_clock_getres      (__NR_timer_create+7)
-#define __NR_clock_nanosleep   (__NR_timer_create+8)
-#define __NR_statfs64          268
-#define __NR_fstatfs64         269
-#define __NR_tgkill            270
-#define __NR_utimes            271
-#define __NR_fadvise64_64      272
-#define __NR_vserver           273
-#define __NR_mbind             274
-#define __NR_get_mempolicy     275
-#define __NR_set_mempolicy     276
-#define __NR_mq_open           277
-#define __NR_mq_unlink         (__NR_mq_open+1)
-#define __NR_mq_timedsend      (__NR_mq_open+2)
-#define __NR_mq_timedreceive   (__NR_mq_open+3)
-#define __NR_mq_notify         (__NR_mq_open+4)
-#define __NR_mq_getsetattr     (__NR_mq_open+5)
-#define __NR_kexec_load                283
-#define __NR_waitid            284
-/* #define __NR_sys_setaltroot 285 */
-#define __NR_add_key           286
-#define __NR_request_key       287
-#define __NR_keyctl            288
-#define __NR_ioprio_set                289
-#define __NR_ioprio_get                290
-#define __NR_inotify_init      291
-#define __NR_inotify_add_watch 292
-#define __NR_inotify_rm_watch  293
-#define __NR_migrate_pages     294
-#define __NR_openat            295
-#define __NR_mkdirat           296
-#define __NR_mknodat           297
-#define __NR_fchownat          298
-#define __NR_futimesat         299
-#define __NR_fstatat64         300
-#define __NR_unlinkat          301
-#define __NR_renameat          302
-#define __NR_linkat            303
-#define __NR_symlinkat         304
-#define __NR_readlinkat                305
-#define __NR_fchmodat          306
-#define __NR_faccessat         307
-#define __NR_pselect6          308
-#define __NR_ppoll             309
-#define __NR_unshare           310
-#define __NR_set_robust_list   311
-#define __NR_get_robust_list   312
-#define __NR_splice            313
-#define __NR_sync_file_range   314
-#define __NR_tee               315
-#define __NR_vmsplice          316
-#define __NR_move_pages                317
-#define __NR_getcpu            318
-#define __NR_epoll_pwait       319
-#define __NR_utimensat         320
-#define __NR_signalfd          321
-#define __NR_timerfd_create    322
-#define __NR_eventfd           323
-#define __NR_fallocate         324
-#define __NR_timerfd_settime   325
-#define __NR_timerfd_gettime   326
-#define __NR_signalfd4         327
-#define __NR_eventfd2          328
-#define __NR_epoll_create1     329
-#define __NR_dup3              330
-#define __NR_pipe2             331
-#define __NR_inotify_init1     332
-
-#ifdef __KERNEL__
-
-#define NR_syscalls 333
-
-#define __ARCH_WANT_IPC_PARSE_VERSION
-/* #define __ARCH_WANT_OLD_READDIR */
-#define __ARCH_WANT_OLD_STAT
-#define __ARCH_WANT_STAT64
-#define __ARCH_WANT_SYS_ALARM
-/* #define __ARCH_WANT_SYS_GETHOSTNAME */
-#define __ARCH_WANT_SYS_PAUSE
-/* #define __ARCH_WANT_SYS_SGETMASK */
-/* #define __ARCH_WANT_SYS_SIGNAL */
-#define __ARCH_WANT_SYS_TIME
-#define __ARCH_WANT_SYS_UTIME
-#define __ARCH_WANT_SYS_WAITPID
-#define __ARCH_WANT_SYS_SOCKETCALL
-#define __ARCH_WANT_SYS_FADVISE64
-#define __ARCH_WANT_SYS_GETPGRP
-#define __ARCH_WANT_SYS_LLSEEK
-#define __ARCH_WANT_SYS_NICE
-/* #define __ARCH_WANT_SYS_OLD_GETRLIMIT */
-#define __ARCH_WANT_SYS_OLDUMOUNT
-/* #define __ARCH_WANT_SYS_SIGPENDING */
-#define __ARCH_WANT_SYS_SIGPROCMASK
-#define __ARCH_WANT_SYS_RT_SIGACTION
-#define __ARCH_WANT_SYS_RT_SIGSUSPEND
-
-/*
- * "Conditional" syscalls
- *
- * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
- * but it doesn't work on all toolchains, so we just do it by hand
- */
-#ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _ASM_UNISTD_H_ */
diff --git a/include/asm-frv/user.h b/include/asm-frv/user.h
deleted file mode 100644 (file)
index 82fa8fa..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/* user.h: FR-V core file format stuff
- *
- * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_USER_H
-#define _ASM_USER_H
-
-#include <asm/page.h>
-#include <asm/registers.h>
-
-/* Core file format: The core file is written in such a way that gdb
- * can understand it and provide useful information to the user (under
- * linux we use the 'trad-core' bfd).  There are quite a number of
- * obstacles to being able to view the contents of the floating point
- * registers, and until these are solved you will not be able to view
- * the contents of them.  Actually, you can read in the core file and
- * look at the contents of the user struct to find out what the
- * floating point registers contain.
- *
- * The actual file contents are as follows:
- * UPAGE:
- *   1 page consisting of a user struct that tells gdb what is present
- *   in the file.  Directly after this is a copy of the task_struct,
- *   which is currently not used by gdb, but it may come in useful at
- *   some point.  All of the registers are stored as part of the
- *   upage.  The upage should always be only one page.
- *
- * DATA:
- *   The data area is stored.  We use current->end_text to
- *   current->brk to pick up all of the user variables, plus any
- *   memory that may have been malloced.  No attempt is made to
- *   determine if a page is demand-zero or if a page is totally
- *   unused, we just cover the entire range.  All of the addresses are
- *   rounded in such a way that an integral number of pages is
- *   written.
- *
- * STACK:
- *   We need the stack information in order to get a meaningful
- *   backtrace.  We need to write the data from (esp) to
- *   current->start_stack, so we round each of these off in order to
- *   be able to write an integer number of pages.  The minimum core
- *   file size is 3 pages, or 12288 bytes.
- */
-
-/* When the kernel dumps core, it starts by dumping the user struct -
- * this will be used by gdb to figure out where the data and stack segments
- *  are within the file, and what virtual addresses to use.
- */
-struct user {
-       /* We start with the registers, to mimic the way that "memory" is returned
-        * from the ptrace(3,...) function.  */
-       struct user_context     regs;
-
-       /* The rest of this junk is to help gdb figure out what goes where */
-       unsigned long           u_tsize;        /* Text segment size (pages). */
-       unsigned long           u_dsize;        /* Data segment size (pages). */
-       unsigned long           u_ssize;        /* Stack segment size (pages). */
-       unsigned long           start_code;     /* Starting virtual address of text. */
-       unsigned long           start_stack;    /* Starting virtual address of stack area.
-                                                * This is actually the bottom of the stack,
-                                                * the top of the stack is always found in the
-                                                * esp register.  */
-       long int                signal;         /* Signal that caused the core dump. */
-
-       unsigned long           magic;          /* To uniquely identify a core file */
-       char                    u_comm[32];     /* User command that was responsible */
-};
-
-#define NBPG                   PAGE_SIZE
-#define UPAGES                 1
-#define HOST_TEXT_START_ADDR   (u.start_code)
-#define HOST_STACK_END_ADDR    (u.start_stack + u.u_ssize * NBPG)
-
-#endif
diff --git a/include/asm-frv/vga.h b/include/asm-frv/vga.h
deleted file mode 100644 (file)
index a702c80..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* vga.h: VGA register stuff
- *
- * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-
-#ifndef _ASM_VGA_H
-#define _ASM_VGA_H
-
-
-
-#endif /* _ASM_VGA_H */
diff --git a/include/asm-frv/virtconvert.h b/include/asm-frv/virtconvert.h
deleted file mode 100644 (file)
index 59788fa..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* virtconvert.h: virtual/physical/page address convertion
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- */
-#ifndef _ASM_VIRTCONVERT_H
-#define _ASM_VIRTCONVERT_H
-
-/*
- * Macros used for converting between virtual and physical mappings.
- */
-
-#ifdef __KERNEL__
-
-#include <asm/setup.h>
-
-#ifdef CONFIG_MMU
-
-#define phys_to_virt(vaddr)    ((void *) ((unsigned long)(vaddr) + PAGE_OFFSET))
-#define virt_to_phys(vaddr)    ((unsigned long) (vaddr) - PAGE_OFFSET)
-
-#else
-
-#define phys_to_virt(vaddr)    ((void *) (vaddr))
-#define virt_to_phys(vaddr)    ((unsigned long) (vaddr))
-
-#endif
-
-#define virt_to_bus virt_to_phys
-#define bus_to_virt phys_to_virt
-
-#define __page_address(page)   (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
-#define page_to_phys(page)     virt_to_phys((void *)__page_address(page))
-
-#endif
-#endif
diff --git a/include/asm-frv/xor.h b/include/asm-frv/xor.h
deleted file mode 100644 (file)
index c82eb12..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/xor.h>
diff --git a/include/asm-mn10300/Kbuild b/include/asm-mn10300/Kbuild
deleted file mode 100644 (file)
index c68e168..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include include/asm-generic/Kbuild.asm
diff --git a/include/asm-mn10300/atomic.h b/include/asm-mn10300/atomic.h
deleted file mode 100644 (file)
index bc06482..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/* MN10300 Atomic counter operations
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_ATOMIC_H
-#define _ASM_ATOMIC_H
-
-#ifdef CONFIG_SMP
-#error not SMP safe
-#endif
-
-/*
- * Atomic operations that C can't guarantee us.  Useful for
- * resource counting etc..
- */
-
-#define ATOMIC_INIT(i) { (i) }
-
-#ifdef __KERNEL__
-
-/**
- * atomic_read - read atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically reads the value of @v.  Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_read(v) ((v)->counter)
-
-/**
- * atomic_set - set atomic variable
- * @v: pointer of type atomic_t
- * @i: required value
- *
- * Atomically sets the value of @v to @i.  Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
-#define atomic_set(v, i) (((v)->counter) = (i))
-
-#include <asm/system.h>
-
-/**
- * atomic_add_return - add integer to atomic variable
- * @i: integer value to add
- * @v: pointer of type atomic_t
- *
- * Atomically adds @i to @v and returns the result
- * Note that the guaranteed useful range of an atomic_t is only 24 bits.
- */
-static inline int atomic_add_return(int i, atomic_t *v)
-{
-       unsigned long flags;
-       int temp;
-
-       local_irq_save(flags);
-       temp = v->counter;
-       temp += i;
-       v->counter = temp;
-       local_irq_restore(flags);
-
-       return temp;
-}
-
-/**
- * atomic_sub_return - subtract integer from atomic variable
- * @i: integer value to subtract
- * @v: pointer of type atomic_t
- *
- * Atomically subtracts @i from @v and returns the result
- * Note that the guaranteed useful range of an atomic_t is only 24 bits.
- */
-static inline int atomic_sub_return(int i, atomic_t *v)
-{
-       unsigned long flags;
-       int temp;
-
-       local_irq_save(flags);
-       temp = v->counter;
-       temp -= i;
-       v->counter = temp;
-       local_irq_restore(flags);
-
-       return temp;
-}
-
-static inline int atomic_add_negative(int i, atomic_t *v)
-{
-       return atomic_add_return(i, v) < 0;
-}
-
-static inline void atomic_add(int i, atomic_t *v)
-{
-       atomic_add_return(i, v);
-}
-
-static inline void atomic_sub(int i, atomic_t *v)
-{
-       atomic_sub_return(i, v);
-}
-
-static inline void atomic_inc(atomic_t *v)
-{
-       atomic_add_return(1, v);
-}
-
-static inline void atomic_dec(atomic_t *v)
-{
-       atomic_sub_return(1, v);
-}
-
-#define atomic_dec_return(v)           atomic_sub_return(1, (v))
-#define atomic_inc_return(v)           atomic_add_return(1, (v))
-
-#define atomic_sub_and_test(i, v)      (atomic_sub_return((i), (v)) == 0)
-#define atomic_dec_and_test(v)         (atomic_sub_return(1, (v)) == 0)
-#define atomic_inc_and_test(v)         (atomic_add_return(1, (v)) == 0)
-
-#define atomic_add_unless(v, a, u)                             \
-({                                                             \
-       int c, old;                                             \
-       c = atomic_read(v);                                     \
-       while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
-               c = old;                                        \
-       c != (u);                                               \
-})
-
-#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-       unsigned long flags;
-
-       mask = ~mask;
-       local_irq_save(flags);
-       *addr &= mask;
-       local_irq_restore(flags);
-}
-
-#define atomic_xchg(ptr, v)            (xchg(&(ptr)->counter, (v)))
-#define atomic_cmpxchg(v, old, new)    (cmpxchg(&((v)->counter), (old), (new)))
-
-/* Atomic operations are already serializing on MN10300??? */
-#define smp_mb__before_atomic_dec()    barrier()
-#define smp_mb__after_atomic_dec()     barrier()
-#define smp_mb__before_atomic_inc()    barrier()
-#define smp_mb__after_atomic_inc()     barrier()
-
-#include <asm-generic/atomic.h>
-
-#endif /* __KERNEL__ */
-#endif /* _ASM_ATOMIC_H */
diff --git a/include/asm-mn10300/auxvec.h b/include/asm-mn10300/auxvec.h
deleted file mode 100644 (file)
index 4fdb60b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef _ASM_AUXVEC_H
-#define _ASM_AUXVEC_H
-
-#endif
diff --git a/include/asm-mn10300/bitops.h b/include/asm-mn10300/bitops.h
deleted file mode 100644 (file)
index 0b610f4..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-/* MN10300 bit operations
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- *
- * These have to be done with inline assembly: that way the bit-setting
- * is guaranteed to be atomic. All bit operations return 0 if the bit
- * was cleared before the operation and != 0 if it was not.
- *
- * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
- */
-#ifndef __ASM_BITOPS_H
-#define __ASM_BITOPS_H
-
-#include <asm/cpu-regs.h>
-
-#define smp_mb__before_clear_bit()     barrier()
-#define smp_mb__after_clear_bit()      barrier()
-
-/*
- * set bit
- */
-#define __set_bit(nr, addr)                                    \
-({                                                             \
-       volatile unsigned char *_a = (unsigned char *)(addr);   \
-       const unsigned shift = (nr) & 7;                        \
-       _a += (nr) >> 3;                                        \
-                                                               \
-       asm volatile("bset %2,(%1) # set_bit reg"               \
-                    : "=m"(*_a)                                \
-                    : "a"(_a), "d"(1 << shift),  "m"(*_a)      \
-                    : "memory", "cc");                         \
-})
-
-#define set_bit(nr, addr) __set_bit((nr), (addr))
-
-/*
- * clear bit
- */
-#define ___clear_bit(nr, addr)                                 \
-({                                                             \
-       volatile unsigned char *_a = (unsigned char *)(addr);   \
-       const unsigned shift = (nr) & 7;                        \
-       _a += (nr) >> 3;                                        \
-                                                               \
-       asm volatile("bclr %2,(%1) # clear_bit reg"             \
-                    : "=m"(*_a)                                \
-                    : "a"(_a), "d"(1 << shift), "m"(*_a)       \
-                    : "memory", "cc");                         \
-})
-
-#define clear_bit(nr, addr) ___clear_bit((nr), (addr))
-
-
-static inline void __clear_bit(int nr, volatile void *addr)
-{
-       unsigned int *a = (unsigned int *) addr;
-       int mask;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 0x1f);
-       *a &= ~mask;
-}
-
-/*
- * test bit
- */
-static inline int test_bit(int nr, const volatile void *addr)
-{
-       return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
-}
-
-/*
- * change bit
- */
-static inline void __change_bit(int nr, volatile void *addr)
-{
-       int     mask;
-       unsigned int *a = (unsigned int *) addr;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 0x1f);
-       *a ^= mask;
-}
-
-extern void change_bit(int nr, volatile void *addr);
-
-/*
- * test and set bit
- */
-#define __test_and_set_bit(nr,addr)                            \
-({                                                             \
-       volatile unsigned char *_a = (unsigned char *)(addr);   \
-       const unsigned shift = (nr) & 7;                        \
-       unsigned epsw;                                          \
-       _a += (nr) >> 3;                                        \
-                                                               \
-       asm volatile("bset %3,(%2) # test_set_bit reg\n"        \
-                    "mov epsw,%1"                              \
-                    : "=m"(*_a), "=d"(epsw)                    \
-                    : "a"(_a), "d"(1 << shift), "m"(*_a)       \
-                    : "memory", "cc");                         \
-                                                               \
-       !(epsw & EPSW_FLAG_Z);                                  \
-})
-
-#define test_and_set_bit(nr, addr) __test_and_set_bit((nr), (addr))
-
-/*
- * test and clear bit
- */
-#define __test_and_clear_bit(nr, addr)                         \
-({                                                             \
-        volatile unsigned char *_a = (unsigned char *)(addr);  \
-       const unsigned shift = (nr) & 7;                        \
-       unsigned epsw;                                          \
-       _a += (nr) >> 3;                                        \
-                                                               \
-       asm volatile("bclr %3,(%2) # test_clear_bit reg\n"      \
-                    "mov epsw,%1"                              \
-                    : "=m"(*_a), "=d"(epsw)                    \
-                    : "a"(_a), "d"(1 << shift), "m"(*_a)       \
-                    : "memory", "cc");                         \
-                                                               \
-       !(epsw & EPSW_FLAG_Z);                                  \
-})
-
-#define test_and_clear_bit(nr, addr) __test_and_clear_bit((nr), (addr))
-
-/*
- * test and change bit
- */
-static inline int __test_and_change_bit(int nr, volatile void *addr)
-{
-       int     mask, retval;
-       unsigned int *a = (unsigned int *)addr;
-
-       a += nr >> 5;
-       mask = 1 << (nr & 0x1f);
-       retval = (mask & *a) != 0;
-       *a ^= mask;
-
-       return retval;
-}
-
-extern int test_and_change_bit(int nr, volatile void *addr);
-
-#include <asm-generic/bitops/lock.h>
-
-#ifdef __KERNEL__
-
-/**
- * __ffs - find first bit set
- * @x: the word to search
- *
- * - return 31..0 to indicate bit 31..0 most least significant bit set
- * - if no bits are set in x, the result is undefined
- */
-static inline __attribute__((const))
-unsigned long __ffs(unsigned long x)
-{
-       int bit;
-       asm("bsch %2,%0" : "=r"(bit) : "0"(0), "r"(x & -x));
-       return bit;
-}
-
-/*
- * special slimline version of fls() for calculating ilog2_u32()
- * - note: no protection against n == 0
- */
-static inline __attribute__((const))
-int __ilog2_u32(u32 n)
-{
-       int bit;
-       asm("bsch %2,%0" : "=r"(bit) : "0"(0), "r"(n));
-       return bit;
-}
-
-/**
- * fls - find last bit set
- * @x: the word to search
- *
- * This is defined the same way as ffs:
- * - return 32..1 to indicate bit 31..0 most significant bit set
- * - return 0 to indicate no bits set
- */
-static inline __attribute__((const))
-int fls(int x)
-{
-       return (x != 0) ? __ilog2_u32(x) + 1 : 0;
-}
-
-/**
- * __fls - find last (most-significant) set bit in a long word
- * @word: the word to search
- *
- * Undefined if no set bit exists, so code should check against 0 first.
- */
-static inline unsigned long __fls(unsigned long word)
-{
-       return __ilog2_u32(word);
-}
-
-/**
- * ffs - find first bit set
- * @x: the word to search
- *
- * - return 32..1 to indicate bit 31..0 most least significant bit set
- * - return 0 to indicate no bits set
- */
-static inline __attribute__((const))
-int ffs(int x)
-{
-       /* Note: (x & -x) gives us a mask that is the least significant
-        * (rightmost) 1-bit of the value in x.
-        */
-       return fls(x & -x);
-}
-
-#include <asm-generic/bitops/ffz.h>
-#include <asm-generic/bitops/fls64.h>
-#include <asm-generic/bitops/find.h>
-#include <asm-generic/bitops/sched.h>
-#include <asm-generic/bitops/hweight.h>
-
-#define ext2_set_bit_atomic(lock, nr, addr) \
-       test_and_set_bit((nr) ^ 0x18, (addr))
-#define ext2_clear_bit_atomic(lock, nr, addr) \
-       test_and_clear_bit((nr) ^ 0x18, (addr))
-
-#include <asm-generic/bitops/ext2-non-atomic.h>
-#include <asm-generic/bitops/minix-le.h>
-
-#endif /* __KERNEL__ */
-#endif /* __ASM_BITOPS_H */
diff --git a/include/asm-mn10300/bug.h b/include/asm-mn10300/bug.h
deleted file mode 100644 (file)
index 4fcf338..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* MN10300 Kernel bug reporting
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_BUG_H
-#define _ASM_BUG_H
-
-/*
- * Tell the user there is some problem.
- */
-#define _debug_bug_trap()                                      \
-do {                                                           \
-       asm volatile(                                           \
-               "       syscall 15                      \n"     \
-               "0:                                     \n"     \
-               "       .section __bug_table,\"a\"      \n"     \
-               "       .long 0b,%0,%1                  \n"     \
-               "       .previous                       \n"     \
-               :                                               \
-               : "i"(__FILE__), "i"(__LINE__)                  \
-               );                                              \
-} while (0)
-
-#define BUG() _debug_bug_trap()
-
-#define HAVE_ARCH_BUG
-#include <asm-generic/bug.h>
-
-#endif /* _ASM_BUG_H */
diff --git a/include/asm-mn10300/bugs.h b/include/asm-mn10300/bugs.h
deleted file mode 100644 (file)
index 31c8bc5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* MN10300 Checks for architecture-dependent bugs
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_BUGS_H
-#define _ASM_BUGS_H
-
-#include <asm/processor.h>
-
-static inline void __init check_bugs(void)
-{
-}
-
-#endif /* _ASM_BUGS_H */
diff --git a/include/asm-mn10300/busctl-regs.h b/include/asm-mn10300/busctl-regs.h
deleted file mode 100644 (file)
index 1632aef..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/* AM33v2 on-board bus controller registers
- *
- * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_BUSCTL_REGS_H
-#define _ASM_BUSCTL_REGS_H
-
-#include <asm/cpu-regs.h>
-
-#ifdef __KERNEL__
-
-/* bus controller registers */
-#define BCCR                   __SYSREG(0xc0002000, u32)       /* bus controller control reg */
-#define BCCR_B0AD              0x00000003      /* block 0 (80000000-83ffffff) bus allocation */
-#define BCCR_B1AD              0x0000000c      /* block 1 (84000000-87ffffff) bus allocation */
-#define BCCR_B2AD              0x00000030      /* block 2 (88000000-8bffffff) bus allocation */
-#define BCCR_B3AD              0x000000c0      /* block 3 (8c000000-8fffffff) bus allocation */
-#define BCCR_B4AD              0x00000300      /* block 4 (90000000-93ffffff) bus allocation */
-#define BCCR_B5AD              0x00000c00      /* block 5 (94000000-97ffffff) bus allocation */
-#define BCCR_B6AD              0x00003000      /* block 6 (98000000-9bffffff) bus allocation */
-#define BCCR_B7AD              0x0000c000      /* block 7 (9c000000-9fffffff) bus allocation */
-#define BCCR_BxAD_EXBUS                0x0             /* - direct to system bus controller */
-#define BCCR_BxAD_OPEXBUS      0x1             /* - direct to memory bus controller */
-#define BCCR_BxAD_OCMBUS       0x2             /* - direct to on chip memory */
-#define BCCR_API               0x00070000      /* bus arbitration priority */
-#define BCCR_API_DMACICD       0x00000000      /* - DMA > CI > CD */
-#define BCCR_API_DMACDCI       0x00010000      /* - DMA > CD > CI */
-#define BCCR_API_CICDDMA       0x00020000      /* - CI > CD > DMA */
-#define BCCR_API_CDCIDMA       0x00030000      /* - CD > CI > DMA */
-#define BCCR_API_ROUNDROBIN    0x00040000      /* - round robin */
-#define BCCR_BEPRI_DMACICD     0x00c00000      /* bus error address priority */
-#define BCCR_BEPRI_DMACDCI     0x00000000      /* - DMA > CI > CD */
-#define BCCR_BEPRI_CICDDMA     0x00400000      /* - DMA > CD > CI */
-#define BCCR_BEPRI_CDCIDMA     0x00800000      /* - CI > CD > DMA */
-#define BCCR_BEPRI             0x00c00000      /* - CD > CI > DMA */
-#define BCCR_TMON              0x03000000      /* timeout value settings */
-#define BCCR_TMON_16IOCLK      0x00000000      /* - 16 IOCLK cycles */
-#define BCCR_TMON_256IOCLK     0x01000000      /* - 256 IOCLK cycles */
-#define BCCR_TMON_4096IOCLK    0x02000000      /* - 4096 IOCLK cycles */
-#define BCCR_TMON_65536IOCLK   0x03000000      /* - 65536 IOCLK cycles */
-#define BCCR_TMOE              0x10000000      /* timeout detection enable */
-
-#define BCBERR                 __SYSREG(0xc0002010, u32)       /* bus error source reg */
-#define BCBERR_BESB            0x0000001f      /* erroneous access destination space */
-#define BCBERR_BESB_MON                0x00000001      /* - monitor space */
-#define BCBERR_BESB_IO         0x00000002      /* - IO bus */
-#define BCBERR_BESB_EX         0x00000004      /* - EX bus */
-#define BCBERR_BESB_OPEX       0x00000008      /* - OpEX bus */
-#define BCBERR_BESB_OCM                0x00000010      /* - on chip memory */
-#define BCBERR_BERW            0x00000100      /* type of access */
-#define BCBERR_BERW_WRITE      0x00000000      /* - write */
-#define BCBERR_BERW_READ       0x00000100      /* - read */
-#define BCBERR_BESD            0x00000200      /* error detector */
-#define BCBERR_BESD_BCU                0x00000000      /* - BCU detected error */
-#define BCBERR_BESD_SLAVE_BUS  0x00000200      /* - slave bus detected error */
-#define BCBERR_BEBST           0x00000400      /* type of access */
-#define BCBERR_BEBST_SINGLE    0x00000000      /* - single */
-#define BCBERR_BEBST_BURST     0x00000400      /* - burst */
-#define BCBERR_BEME            0x00000800      /* multiple bus error flag */
-#define BCBERR_BEMR            0x00007000      /* master bus that caused the error */
-#define BCBERR_BEMR_NOERROR    0x00000000      /* - no error */
-#define BCBERR_BEMR_CI         0x00001000      /* - CPU instruction fetch bus caused error */
-#define BCBERR_BEMR_CD         0x00002000      /* - CPU data bus caused error */
-#define BCBERR_BEMR_DMA                0x00004000      /* - DMA bus caused error */
-
-#define BCBEAR                 __SYSREGC(0xc0002020, u32)      /* bus error address reg */
-
-/* system bus controller registers */
-#define SBBASE(X)              __SYSREG(0xd8c00100 + (X) * 0x10, u32)  /* SBC base addr regs */
-#define SBBASE_BE              0x00000001      /* bank enable */
-#define SBBASE_BAM             0x0000fffe      /* bank address mask [31:17] */
-#define SBBASE_BBA             0xfffe0000      /* bank base address [31:17] */
-
-#define SBCNTRL0(X)            __SYSREG(0xd8c00200 + (X) * 0x10, u32)  /* SBC bank ctrl0 regs */
-#define SBCNTRL0_WEH           0x00000f00      /* write enable hold */
-#define SBCNTRL0_REH           0x0000f000      /* read enable hold */
-#define SBCNTRL0_RWH           0x000f0000      /* SRW signal hold */
-#define SBCNTRL0_CSH           0x00f00000      /* chip select hold */
-#define SBCNTRL0_DAH           0x0f000000      /* data hold */
-#define SBCNTRL0_ADH           0xf0000000      /* address hold */
-
-#define SBCNTRL1(X)            __SYSREG(0xd8c00204 + (X) * 0x10, u32)  /* SBC bank ctrl1 regs */
-#define SBCNTRL1_WED           0x00000f00      /* write enable delay */
-#define SBCNTRL1_RED           0x0000f000      /* read enable delay */
-#define SBCNTRL1_RWD           0x000f0000      /* SRW signal delay */
-#define SBCNTRL1_ASW           0x00f00000      /* address strobe width */
-#define SBCNTRL1_CSD           0x0f000000      /* chip select delay */
-#define SBCNTRL1_ASD           0xf0000000      /* address strobe delay */
-
-#define SBCNTRL2(X)            __SYSREG(0xd8c00208 + (X) * 0x10, u32)  /* SBC bank ctrl2 regs */
-#define SBCNTRL2_WC            0x000000ff      /* wait count */
-#define SBCNTRL2_BWC           0x00000f00      /* burst wait count */
-#define SBCNTRL2_WM            0x01000000      /* wait mode setting */
-#define SBCNTRL2_WM_FIXEDWAIT  0x00000000      /* - fixed wait access */
-#define SBCNTRL2_WM_HANDSHAKE  0x01000000      /* - handshake access */
-#define SBCNTRL2_BM            0x02000000      /* bus synchronisation mode */
-#define SBCNTRL2_BM_SYNC       0x00000000      /* - synchronous mode */
-#define SBCNTRL2_BM_ASYNC      0x02000000      /* - asynchronous mode */
-#define SBCNTRL2_BW            0x04000000      /* bus width */
-#define SBCNTRL2_BW_32         0x00000000      /* - 32 bits */
-#define SBCNTRL2_BW_16         0x04000000      /* - 16 bits */
-#define SBCNTRL2_RWINV         0x08000000      /* R/W signal invert polarity */
-#define SBCNTRL2_RWINV_NORM    0x00000000      /* - normal (read high) */
-#define SBCNTRL2_RWINV_INV     0x08000000      /* - inverted (read low) */
-#define SBCNTRL2_BT            0x70000000      /* bus type setting */
-#define SBCNTRL2_BT_SRAM       0x00000000      /* - SRAM interface */
-#define SBCNTRL2_BT_ADMUX      0x00000000      /* - addr/data multiplexed interface */
-#define SBCNTRL2_BT_BROM       0x00000000      /* - burst ROM interface */
-#define SBCNTRL2_BTSE          0x80000000      /* burst enable */
-
-/* memory bus controller */
-#define SDBASE(X)              __SYSREG(0xda000008 + (X) * 0x4, u32)   /* MBC base addr regs */
-#define SDBASE_CE              0x00000001      /* chip enable */
-#define SDBASE_CBAM            0x0000fff0      /* chip base address mask [31:20] */
-#define SDBASE_CBAM_SHIFT      16
-#define SDBASE_CBA             0xfff00000      /* chip base address [31:20] */
-
-#define SDRAMBUS               __SYSREG(0xda000000, u32)       /* bus mode control reg */
-#define SDRAMBUS_REFEN         0x00000004      /* refresh enable */
-#define SDRAMBUS_TRC           0x00000018      /* refresh command delay time */
-#define SDRAMBUS_BSTPT         0x00000020      /* burst stop command enable */
-#define SDRAMBUS_PONSEQ                0x00000040      /* power on sequence */
-#define SDRAMBUS_SELFREQ       0x00000080      /* self-refresh mode request */
-#define SDRAMBUS_SELFON                0x00000100      /* self-refresh mode on */
-#define SDRAMBUS_SIZE          0x00030000      /* SDRAM size */
-#define SDRAMBUS_SIZE_64Mbit   0x00010000      /* 64Mbit SDRAM (x16) */
-#define SDRAMBUS_SIZE_128Mbit  0x00020000      /* 128Mbit SDRAM (x16) */
-#define SDRAMBUS_SIZE_256Mbit  0x00030000      /* 256Mbit SDRAM (x16) */
-#define SDRAMBUS_TRASWAIT      0x000c0000      /* row address precharge command cycle number */
-#define SDRAMBUS_REFNUM                0x00300000      /* refresh command number */
-#define SDRAMBUS_BSTWAIT       0x00c00000      /* burst stop command cycle */
-#define SDRAMBUS_SETWAIT       0x03000000      /* mode register setting command cycle */
-#define SDRAMBUS_PREWAIT       0x0c000000      /* precharge command cycle */
-#define SDRAMBUS_RASLATE       0x30000000      /* RAS latency */
-#define SDRAMBUS_CASLATE       0xc0000000      /* CAS latency */
-
-#define SDREFCNT               __SYSREG(0xda000004, u32)       /* refresh period reg */
-#define SDREFCNT_PERI          0x00000fff      /* refresh period */
-
-#define SDSHDW                 __SYSREG(0xda000010, u32)       /* test reg */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_BUSCTL_REGS_H */
diff --git a/include/asm-mn10300/byteorder.h b/include/asm-mn10300/byteorder.h
deleted file mode 100644 (file)
index 5dd0bdd..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_BYTEORDER_H
-#define _ASM_BYTEORDER_H
-
-#include <linux/byteorder/little_endian.h>
-
-#endif /* _ASM_BYTEORDER_H */
diff --git a/include/asm-mn10300/cache.h b/include/asm-mn10300/cache.h
deleted file mode 100644 (file)
index 9e01122..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* MN10300 cache management registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_CACHE_H
-#define _ASM_CACHE_H
-
-#include <asm/cpu-regs.h>
-#include <asm/proc/cache.h>
-
-#ifndef __ASSEMBLY__
-#define L1_CACHE_DISPARITY     (L1_CACHE_NENTRIES * L1_CACHE_BYTES)
-#else
-#define L1_CACHE_DISPARITY     L1_CACHE_NENTRIES * L1_CACHE_BYTES
-#endif
-
-/* data cache purge registers
- * - read from the register to unconditionally purge that cache line
- * - write address & 0xffffff00 to conditionally purge that cache line
- *   - clear LSB to request invalidation as well
- */
-#define DCACHE_PURGE(WAY, ENTRY) \
-       __SYSREG(0xc8400000 + (WAY) * L1_CACHE_WAYDISP + \
-                (ENTRY) * L1_CACHE_BYTES, u32)
-
-#define DCACHE_PURGE_WAY0(ENTRY) \
-       __SYSREG(0xc8400000 + 0 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
-#define DCACHE_PURGE_WAY1(ENTRY) \
-       __SYSREG(0xc8400000 + 1 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
-#define DCACHE_PURGE_WAY2(ENTRY) \
-       __SYSREG(0xc8400000 + 2 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
-#define DCACHE_PURGE_WAY3(ENTRY) \
-       __SYSREG(0xc8400000 + 3 * L1_CACHE_WAYDISP + (ENTRY) * L1_CACHE_BYTES, u32)
-
-/* instruction cache access registers */
-#define ICACHE_DATA(WAY, ENTRY, OFF) \
-       __SYSREG(0xc8000000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10 + (OFF) * 4, u32)
-#define ICACHE_TAG(WAY, ENTRY)  \
-       __SYSREG(0xc8100000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10, u32)
-
-/* instruction cache access registers */
-#define DCACHE_DATA(WAY, ENTRY, OFF) \
-       __SYSREG(0xc8200000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10 + (OFF) * 4, u32)
-#define DCACHE_TAG(WAY, ENTRY)  \
-       __SYSREG(0xc8300000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10, u32)
-
-#endif /* _ASM_CACHE_H */
diff --git a/include/asm-mn10300/cacheflush.h b/include/asm-mn10300/cacheflush.h
deleted file mode 100644 (file)
index 2db746a..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/* MN10300 Cache flushing
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_CACHEFLUSH_H
-#define _ASM_CACHEFLUSH_H
-
-#ifndef __ASSEMBLY__
-
-/* Keep includes the same across arches.  */
-#include <linux/mm.h>
-
-/*
- * virtually-indexed cache managment (our cache is physically indexed)
- */
-#define flush_cache_all()                      do {} while (0)
-#define flush_cache_mm(mm)                     do {} while (0)
-#define flush_cache_dup_mm(mm)                 do {} while (0)
-#define flush_cache_range(mm, start, end)      do {} while (0)
-#define flush_cache_page(vma, vmaddr, pfn)     do {} while (0)
-#define flush_cache_vmap(start, end)           do {} while (0)
-#define flush_cache_vunmap(start, end)         do {} while (0)
-#define flush_dcache_page(page)                        do {} while (0)
-#define flush_dcache_mmap_lock(mapping)                do {} while (0)
-#define flush_dcache_mmap_unlock(mapping)      do {} while (0)
-
-/*
- * physically-indexed cache managment
- */
-#ifndef CONFIG_MN10300_CACHE_DISABLED
-
-extern void flush_icache_range(unsigned long start, unsigned long end);
-extern void flush_icache_page(struct vm_area_struct *vma, struct page *pg);
-
-#else
-
-#define flush_icache_range(start, end)         do {} while (0)
-#define flush_icache_page(vma, pg)             do {} while (0)
-
-#endif
-
-#define flush_icache_user_range(vma, pg, adr, len) \
-       flush_icache_range(adr, adr + len)
-
-#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
-       do {                                    \
-               memcpy(dst, src, len);          \
-               flush_icache_page(vma, page);   \
-       } while (0)
-
-#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
-       memcpy(dst, src, len)
-
-/*
- * primitive routines
- */
-#ifndef CONFIG_MN10300_CACHE_DISABLED
-extern void mn10300_icache_inv(void);
-extern void mn10300_dcache_inv(void);
-extern void mn10300_dcache_inv_page(unsigned start);
-extern void mn10300_dcache_inv_range(unsigned start, unsigned end);
-extern void mn10300_dcache_inv_range2(unsigned start, unsigned size);
-#ifdef CONFIG_MN10300_CACHE_WBACK
-extern void mn10300_dcache_flush(void);
-extern void mn10300_dcache_flush_page(unsigned start);
-extern void mn10300_dcache_flush_range(unsigned start, unsigned end);
-extern void mn10300_dcache_flush_range2(unsigned start, unsigned size);
-extern void mn10300_dcache_flush_inv(void);
-extern void mn10300_dcache_flush_inv_page(unsigned start);
-extern void mn10300_dcache_flush_inv_range(unsigned start, unsigned end);
-extern void mn10300_dcache_flush_inv_range2(unsigned start, unsigned size);
-#else
-#define mn10300_dcache_flush()                         do {} while (0)
-#define mn10300_dcache_flush_page(start)               do {} while (0)
-#define mn10300_dcache_flush_range(start, end)         do {} while (0)
-#define mn10300_dcache_flush_range2(start, size)       do {} while (0)
-#define mn10300_dcache_flush_inv()                     mn10300_dcache_inv()
-#define mn10300_dcache_flush_inv_page(start) \
-       mn10300_dcache_inv_page((start))
-#define mn10300_dcache_flush_inv_range(start, end) \
-       mn10300_dcache_inv_range((start), (end))
-#define mn10300_dcache_flush_inv_range2(start, size) \
-       mn10300_dcache_inv_range2((start), (size))
-#endif /* CONFIG_MN10300_CACHE_WBACK */
-#else
-#define mn10300_icache_inv()                           do {} while (0)
-#define mn10300_dcache_inv()                           do {} while (0)
-#define mn10300_dcache_inv_page(start)                 do {} while (0)
-#define mn10300_dcache_inv_range(start, end)           do {} while (0)
-#define mn10300_dcache_inv_range2(start, size)         do {} while (0)
-#define mn10300_dcache_flush()                         do {} while (0)
-#define mn10300_dcache_flush_inv_page(start)           do {} while (0)
-#define mn10300_dcache_flush_inv()                     do {} while (0)
-#define mn10300_dcache_flush_inv_range(start, end)     do {} while (0)
-#define mn10300_dcache_flush_inv_range2(start, size)   do {} while (0)
-#define mn10300_dcache_flush_page(start)               do {} while (0)
-#define mn10300_dcache_flush_range(start, end)         do {} while (0)
-#define mn10300_dcache_flush_range2(start, size)       do {} while (0)
-#endif /* CONFIG_MN10300_CACHE_DISABLED */
-
-/*
- * internal debugging function
- */
-#ifdef CONFIG_DEBUG_PAGEALLOC
-extern void kernel_map_pages(struct page *page, int numpages, int enable);
-#endif
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* _ASM_CACHEFLUSH_H */
diff --git a/include/asm-mn10300/checksum.h b/include/asm-mn10300/checksum.h
deleted file mode 100644 (file)
index 9fb2a8d..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* MN10300 Optimised checksumming code
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_CHECKSUM_H
-#define _ASM_CHECKSUM_H
-
-extern __wsum csum_partial(const void *buff, int len, __wsum sum);
-extern __wsum csum_partial_copy_nocheck(const void *src, void *dst,
-                                       int len, __wsum sum);
-extern __wsum csum_partial_copy_from_user(const void *src, void *dst,
-                                         int len, __wsum sum,
-                                         int *err_ptr);
-extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl);
-extern __wsum csum_partial(const void *buff, int len, __wsum sum);
-extern __sum16 ip_compute_csum(const void *buff, int len);
-
-#define csum_partial_copy_fromuser csum_partial_copy
-extern __wsum csum_partial_copy(const void *src, void *dst, int len,
-                               __wsum sum);
-
-static inline __sum16 csum_fold(__wsum sum)
-{
-       asm(
-               "       add     %1,%0           \n"
-               "       addc    0xffff,%0       \n"
-               : "=r" (sum)
-               : "r" (sum << 16), "0" (sum & 0xffff0000)
-               : "cc"
-           );
-       return (~sum) >> 16;
-}
-
-static inline __wsum csum_tcpudp_nofold(unsigned long saddr,
-                                       unsigned long daddr,
-                                       unsigned short len,
-                                       unsigned short proto,
-                                       __wsum sum)
-{
-       __wsum tmp;
-
-       tmp = (__wsum) ntohs(len) << 16;
-       tmp += (__wsum) proto << 8;
-
-       asm(
-               "       add     %1,%0           \n"
-               "       addc    %2,%0           \n"
-               "       addc    %3,%0           \n"
-               "       addc    0,%0            \n"
-               : "=r" (sum)
-               : "r" (daddr), "r"(saddr), "r"(tmp), "0"(sum)
-               : "cc"
-           );
-       return sum;
-}
-
-/*
- * computes the checksum of the TCP/UDP pseudo-header
- * returns a 16-bit checksum, already complemented
- */
-static inline __sum16 csum_tcpudp_magic(unsigned long saddr,
-                                       unsigned long daddr,
-                                       unsigned short len,
-                                       unsigned short proto,
-                                       __wsum sum)
-{
-       return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
-}
-
-#undef _HAVE_ARCH_IPV6_CSUM
-
-/*
- *     Copy and checksum to user
- */
-#define HAVE_CSUM_COPY_USER
-extern __wsum csum_and_copy_to_user(const void *src, void *dst, int len,
-                                   __wsum sum, int *err_ptr);
-
-
-#endif /* _ASM_CHECKSUM_H */
diff --git a/include/asm-mn10300/cpu-regs.h b/include/asm-mn10300/cpu-regs.h
deleted file mode 100644 (file)
index 757e9b5..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/* MN10300 Core system registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_CPU_REGS_H
-#define _ASM_CPU_REGS_H
-
-#ifndef __ASSEMBLY__
-#include <linux/types.h>
-#endif
-
-#ifdef CONFIG_MN10300_CPU_AM33V2
-/* we tell the compiler to pretend to be AM33 so that it doesn't try and use
- * the FP regs, but tell the assembler that we're actually allowed AM33v2
- * instructions */
-#ifndef __ASSEMBLY__
-asm(" .am33_2\n");
-#else
-.am33_2
-#endif
-#endif
-
-#ifdef __KERNEL__
-
-#ifndef __ASSEMBLY__
-#define __SYSREG(ADDR, TYPE) (*(volatile TYPE *)(ADDR))
-#define __SYSREGC(ADDR, TYPE) (*(const volatile TYPE *)(ADDR))
-#else
-#define __SYSREG(ADDR, TYPE) ADDR
-#define __SYSREGC(ADDR, TYPE) ADDR
-#endif
-
-/* CPU registers */
-#define EPSW_FLAG_Z            0x00000001      /* zero flag */
-#define EPSW_FLAG_N            0x00000002      /* negative flag */
-#define EPSW_FLAG_C            0x00000004      /* carry flag */
-#define EPSW_FLAG_V            0x00000008      /* overflow flag */
-#define EPSW_IM                        0x00000700      /* interrupt mode */
-#define EPSW_IM_0              0x00000000      /* interrupt mode 0 */
-#define EPSW_IM_1              0x00000100      /* interrupt mode 1 */
-#define EPSW_IM_2              0x00000200      /* interrupt mode 2 */
-#define EPSW_IM_3              0x00000300      /* interrupt mode 3 */
-#define EPSW_IM_4              0x00000400      /* interrupt mode 4 */
-#define EPSW_IM_5              0x00000500      /* interrupt mode 5 */
-#define EPSW_IM_6              0x00000600      /* interrupt mode 6 */
-#define EPSW_IM_7              0x00000700      /* interrupt mode 7 */
-#define EPSW_IE                        0x00000800      /* interrupt enable */
-#define EPSW_S                 0x00003000      /* software auxilliary bits */
-#define EPSW_T                 0x00008000      /* trace enable */
-#define EPSW_nSL               0x00010000      /* not supervisor level */
-#define EPSW_NMID              0x00020000      /* nonmaskable interrupt disable */
-#define EPSW_nAR               0x00040000      /* register bank control */
-#define EPSW_ML                        0x00080000      /* monitor level */
-#define EPSW_FE                        0x00100000      /* FPU enable */
-
-/* FPU registers */
-#define FPCR_EF_I              0x00000001      /* inexact result FPU exception flag */
-#define FPCR_EF_U              0x00000002      /* underflow FPU exception flag */
-#define FPCR_EF_O              0x00000004      /* overflow FPU exception flag */
-#define FPCR_EF_Z              0x00000008      /* zero divide FPU exception flag */
-#define FPCR_EF_V              0x00000010      /* invalid operand FPU exception flag */
-#define FPCR_EE_I              0x00000020      /* inexact result FPU exception enable */
-#define FPCR_EE_U              0x00000040      /* underflow FPU exception enable */
-#define FPCR_EE_O              0x00000080      /* overflow FPU exception enable */
-#define FPCR_EE_Z              0x00000100      /* zero divide FPU exception enable */
-#define FPCR_EE_V              0x00000200      /* invalid operand FPU exception enable */
-#define FPCR_EC_I              0x00000400      /* inexact result FPU exception cause */
-#define FPCR_EC_U              0x00000800      /* underflow FPU exception cause */
-#define FPCR_EC_O              0x00001000      /* overflow FPU exception cause */
-#define FPCR_EC_Z              0x00002000      /* zero divide FPU exception cause */
-#define FPCR_EC_V              0x00004000      /* invalid operand FPU exception cause */
-#define FPCR_RM                        0x00030000      /* rounding mode */
-#define FPCR_RM_NEAREST                0x00000000      /* - round to nearest value */
-#define FPCR_FCC_U             0x00040000      /* FPU unordered condition code */
-#define FPCR_FCC_E             0x00080000      /* FPU equal condition code */
-#define FPCR_FCC_G             0x00100000      /* FPU greater than condition code */
-#define FPCR_FCC_L             0x00200000      /* FPU less than condition code */
-#define FPCR_INIT              0x00000000      /* no exceptions, rounding to nearest */
-
-/* CPU control registers */
-#define CPUP                   __SYSREG(0xc0000020, u16)       /* CPU pipeline register */
-#define CPUP_DWBD              0x0020          /* write buffer disable flag */
-#define CPUP_IPFD              0x0040          /* instruction prefetch disable flag */
-#define CPUP_EXM               0x0080          /* exception operation mode */
-#define CPUP_EXM_AM33V1                0x0000          /* - AM33 v1 exception mode */
-#define CPUP_EXM_AM33V2                0x0080          /* - AM33 v2 exception mode */
-
-#define CPUM                   __SYSREG(0xc0000040, u16)       /* CPU mode register */
-#define CPUM_SLEEP             0x0004          /* set to enter sleep state */
-#define CPUM_HALT              0x0008          /* set to enter halt state */
-#define CPUM_STOP              0x0010          /* set to enter stop state */
-
-#define CPUREV                 __SYSREGC(0xc0000050, u32)      /* CPU revision register */
-#define CPUREV_TYPE            0x0000000f      /* CPU type */
-#define CPUREV_TYPE_S          0
-#define CPUREV_TYPE_AM33V1     0x00000000      /* - AM33 V1 core, AM33/1.00 arch */
-#define CPUREV_TYPE_AM33V2     0x00000001      /* - AM33 V2 core, AM33/2.00 arch */
-#define CPUREV_TYPE_AM34V1     0x00000002      /* - AM34 V1 core, AM33/2.00 arch */
-#define CPUREV_REVISION                0x000000f0      /* CPU revision */
-#define CPUREV_REVISION_S      4
-#define CPUREV_ICWAY           0x00000f00      /* number of instruction cache ways */
-#define CPUREV_ICWAY_S         8
-#define CPUREV_ICSIZE          0x0000f000      /* instruction cache way size */
-#define CPUREV_ICSIZE_S                12
-#define CPUREV_DCWAY           0x000f0000      /* number of data cache ways */
-#define CPUREV_DCWAY_S         16
-#define CPUREV_DCSIZE          0x00f00000      /* data cache way size */
-#define CPUREV_DCSIZE_S                20
-#define CPUREV_FPUTYPE         0x0f000000      /* FPU core type */
-#define CPUREV_FPUTYPE_NONE    0x00000000      /* - no FPU core implemented */
-#define CPUREV_OCDCTG          0xf0000000      /* on-chip debug function category */
-
-#define DCR                    __SYSREG(0xc0000030, u16)       /* Debug control register */
-
-/* interrupt/exception control registers */
-#define IVAR0                  __SYSREG(0xc0000000, u16)       /* interrupt vector 0 */
-#define IVAR1                  __SYSREG(0xc0000004, u16)       /* interrupt vector 1 */
-#define IVAR2                  __SYSREG(0xc0000008, u16)       /* interrupt vector 2 */
-#define IVAR3                  __SYSREG(0xc000000c, u16)       /* interrupt vector 3 */
-#define IVAR4                  __SYSREG(0xc0000010, u16)       /* interrupt vector 4 */
-#define IVAR5                  __SYSREG(0xc0000014, u16)       /* interrupt vector 5 */
-#define IVAR6                  __SYSREG(0xc0000018, u16)       /* interrupt vector 6 */
-
-#define TBR                    __SYSREG(0xc0000024, u32)       /* Trap table base */
-#define TBR_TB                 0xff000000      /* table base address bits 31-24 */
-#define TBR_INT_CODE           0x00ffffff      /* interrupt code */
-
-#define DEAR                   __SYSREG(0xc0000038, u32)       /* Data access exception address */
-
-#define sISR                   __SYSREG(0xc0000044, u32)       /* Supervisor interrupt status */
-#define        sISR_IRQICE             0x00000001      /* ICE interrupt */
-#define        sISR_ISTEP              0x00000002      /* single step interrupt */
-#define        sISR_MISSA              0x00000004      /* memory access address misalignment fault */
-#define        sISR_UNIMP              0x00000008      /* unimplemented instruction execution fault */
-#define        sISR_PIEXE              0x00000010      /* program interrupt */
-#define        sISR_MEMERR             0x00000020      /* illegal memory access fault */
-#define        sISR_IBREAK             0x00000040      /* instraction break interrupt */
-#define        sISR_DBSRL              0x00000080      /* debug serial interrupt */
-#define        sISR_PERIDB             0x00000100      /* peripheral debug interrupt */
-#define        sISR_EXUNIMP            0x00000200      /* unimplemented ex-instruction execution fault */
-#define        sISR_OBREAK             0x00000400      /* operand break interrupt */
-#define        sISR_PRIV               0x00000800      /* privileged instruction execution fault */
-#define        sISR_BUSERR             0x00001000      /* bus error fault */
-#define        sISR_DBLFT              0x00002000      /* double fault */
-#define        sISR_DBG                0x00008000      /* debug reserved interrupt */
-#define sISR_ITMISS            0x00010000      /* instruction TLB miss */
-#define sISR_DTMISS            0x00020000      /* data TLB miss */
-#define sISR_ITEX              0x00040000      /* instruction TLB access exception */
-#define sISR_DTEX              0x00080000      /* data TLB access exception */
-#define sISR_ILGIA             0x00100000      /* illegal instruction access exception */
-#define sISR_ILGDA             0x00200000      /* illegal data access exception */
-#define sISR_IOIA              0x00400000      /* internal I/O space instruction access excep */
-#define sISR_PRIVA             0x00800000      /* privileged space instruction access excep */
-#define sISR_PRIDA             0x01000000      /* privileged space data access excep */
-#define sISR_DISA              0x02000000      /* data space instruction access excep */
-#define sISR_SYSC              0x04000000      /* system call instruction excep */
-#define sISR_FPUD              0x08000000      /* FPU disabled excep */
-#define sISR_FPUUI             0x10000000      /* FPU unimplemented instruction excep */
-#define sISR_FPUOP             0x20000000      /* FPU operation excep */
-#define sISR_NE                        0x80000000      /* multiple synchronous exceptions excep */
-
-/* cache control registers */
-#define CHCTR                  __SYSREG(0xc0000070, u16)       /* cache control */
-#define CHCTR_ICEN             0x0001          /* instruction cache enable */
-#define CHCTR_DCEN             0x0002          /* data cache enable */
-#define CHCTR_ICBUSY           0x0004          /* instruction cache busy */
-#define CHCTR_DCBUSY           0x0008          /* data cache busy */
-#define CHCTR_ICINV            0x0010          /* instruction cache invalidate */
-#define CHCTR_DCINV            0x0020          /* data cache invalidate */
-#define CHCTR_DCWTMD           0x0040          /* data cache writing mode */
-#define CHCTR_DCWTMD_WRBACK    0x0000          /* - write back mode */
-#define CHCTR_DCWTMD_WRTHROUGH 0x0040          /* - write through mode */
-#define CHCTR_DCALMD           0x0080          /* data cache allocation mode */
-#define CHCTR_ICWMD            0x0f00          /* instruction cache way mode */
-#define CHCTR_DCWMD            0xf000          /* data cache way mode */
-
-/* MMU control registers */
-#define MMUCTR                 __SYSREG(0xc0000090, u32)       /* MMU control register */
-#define MMUCTR_IRP             0x0000003f      /* instruction TLB replace pointer */
-#define MMUCTR_ITE             0x00000040      /* instruction TLB enable */
-#define MMUCTR_IIV             0x00000080      /* instruction TLB invalidate */
-#define MMUCTR_ITL             0x00000700      /* instruction TLB lock pointer */
-#define MMUCTR_ITL_NOLOCK      0x00000000      /* - no lock */
-#define MMUCTR_ITL_LOCK0       0x00000100      /* - entry 0 locked */
-#define MMUCTR_ITL_LOCK0_1     0x00000200      /* - entry 0-1 locked */
-#define MMUCTR_ITL_LOCK0_3     0x00000300      /* - entry 0-3 locked */
-#define MMUCTR_ITL_LOCK0_7     0x00000400      /* - entry 0-7 locked */
-#define MMUCTR_ITL_LOCK0_15    0x00000500      /* - entry 0-15 locked */
-#define MMUCTR_CE              0x00008000      /* cacheable bit enable */
-#define MMUCTR_DRP             0x003f0000      /* data TLB replace pointer */
-#define MMUCTR_DTE             0x00400000      /* data TLB enable */
-#define MMUCTR_DIV             0x00800000      /* data TLB invalidate */
-#define MMUCTR_DTL             0x07000000      /* data TLB lock pointer */
-#define MMUCTR_DTL_NOLOCK      0x00000000      /* - no lock */
-#define MMUCTR_DTL_LOCK0       0x01000000      /* - entry 0 locked */
-#define MMUCTR_DTL_LOCK0_1     0x02000000      /* - entry 0-1 locked */
-#define MMUCTR_DTL_LOCK0_3     0x03000000      /* - entry 0-3 locked */
-#define MMUCTR_DTL_LOCK0_7     0x04000000      /* - entry 0-7 locked */
-#define MMUCTR_DTL_LOCK0_15    0x05000000      /* - entry 0-15 locked */
-
-#define PIDR                   __SYSREG(0xc0000094, u16)       /* PID register */
-#define PIDR_PID               0x00ff          /* process identifier */
-
-#define PTBR                   __SYSREG(0xc0000098, unsigned long) /* Page table base register */
-
-#define IPTEL                  __SYSREG(0xc00000a0, u32)       /* instruction TLB entry */
-#define DPTEL                  __SYSREG(0xc00000b0, u32)       /* data TLB entry */
-#define xPTEL_V                        0x00000001      /* TLB entry valid */
-#define xPTEL_UNUSED1          0x00000002      /* unused bit */
-#define xPTEL_UNUSED2          0x00000004      /* unused bit */
-#define xPTEL_C                        0x00000008      /* cached if set */
-#define xPTEL_PV               0x00000010      /* page valid */
-#define xPTEL_D                        0x00000020      /* dirty */
-#define xPTEL_PR               0x000001c0      /* page protection */
-#define xPTEL_PR_ROK           0x00000000      /* - R/O kernel */
-#define xPTEL_PR_RWK           0x00000100      /* - R/W kernel */
-#define xPTEL_PR_ROK_ROU       0x00000080      /* - R/O kernel and R/O user */
-#define xPTEL_PR_RWK_ROU       0x00000180      /* - R/W kernel and R/O user */
-#define xPTEL_PR_RWK_RWU       0x000001c0      /* - R/W kernel and R/W user */
-#define xPTEL_G                        0x00000200      /* global (use PID if 0) */
-#define xPTEL_PS               0x00000c00      /* page size */
-#define xPTEL_PS_4Kb           0x00000000      /* - 4Kb page */
-#define xPTEL_PS_128Kb         0x00000400      /* - 128Kb page */
-#define xPTEL_PS_1Kb           0x00000800      /* - 1Kb page */
-#define xPTEL_PS_4Mb           0x00000c00      /* - 4Mb page */
-#define xPTEL_PPN              0xfffff006      /* physical page number */
-
-#define xPTEL_V_BIT            0       /* bit numbers corresponding to above masks */
-#define xPTEL_UNUSED1_BIT      1
-#define xPTEL_UNUSED2_BIT      2
-#define xPTEL_C_BIT            3
-#define xPTEL_PV_BIT           4
-#define xPTEL_D_BIT            5
-#define xPTEL_G_BIT            9
-
-#define IPTEU                  __SYSREG(0xc00000a4, u32)       /* instruction TLB virtual addr */
-#define DPTEU                  __SYSREG(0xc00000b4, u32)       /* data TLB virtual addr */
-#define xPTEU_VPN              0xfffffc00      /* virtual page number */
-#define xPTEU_PID              0x000000ff      /* process identifier to which applicable */
-
-#define IPTEL2                 __SYSREG(0xc00000a8, u32)       /* instruction TLB entry */
-#define DPTEL2                 __SYSREG(0xc00000b8, u32)       /* data TLB entry */
-#define xPTEL2_V               0x00000001      /* TLB entry valid */
-#define xPTEL2_C               0x00000002      /* cacheable */
-#define xPTEL2_PV              0x00000004      /* page valid */
-#define xPTEL2_D               0x00000008      /* dirty */
-#define xPTEL2_PR              0x00000070      /* page protection */
-#define xPTEL2_PR_ROK          0x00000000      /* - R/O kernel */
-#define xPTEL2_PR_RWK          0x00000040      /* - R/W kernel */
-#define xPTEL2_PR_ROK_ROU      0x00000020      /* - R/O kernel and R/O user */
-#define xPTEL2_PR_RWK_ROU      0x00000060      /* - R/W kernel and R/O user */
-#define xPTEL2_PR_RWK_RWU      0x00000070      /* - R/W kernel and R/W user */
-#define xPTEL2_G               0x00000080      /* global (use PID if 0) */
-#define xPTEL2_PS              0x00000300      /* page size */
-#define xPTEL2_PS_4Kb          0x00000000      /* - 4Kb page */
-#define xPTEL2_PS_128Kb                0x00000100      /* - 128Kb page */
-#define xPTEL2_PS_1Kb          0x00000200      /* - 1Kb page */
-#define xPTEL2_PS_4Mb          0x00000300      /* - 4Mb page */
-#define xPTEL2_PPN             0xfffffc00      /* physical page number */
-
-#define MMUFCR                 __SYSREGC(0xc000009c, u32)      /* MMU exception cause */
-#define MMUFCR_IFC             __SYSREGC(0xc000009c, u16)      /* MMU instruction excep cause */
-#define MMUFCR_DFC             __SYSREGC(0xc000009e, u16)      /* MMU data exception cause */
-#define MMUFCR_xFC_TLBMISS     0x0001          /* TLB miss flag */
-#define MMUFCR_xFC_INITWR      0x0002          /* initial write excep flag */
-#define MMUFCR_xFC_PGINVAL     0x0004          /* page invalid excep flag */
-#define MMUFCR_xFC_PROTVIOL    0x0008          /* protection violation excep flag */
-#define MMUFCR_xFC_ACCESS      0x0010          /* access level flag */
-#define MMUFCR_xFC_ACCESS_USR  0x0000          /* - user mode */
-#define MMUFCR_xFC_ACCESS_SR   0x0010          /* - supervisor mode */
-#define MMUFCR_xFC_TYPE                0x0020          /* access type flag */
-#define MMUFCR_xFC_TYPE_READ   0x0000          /* - read */
-#define MMUFCR_xFC_TYPE_WRITE  0x0020          /* - write */
-#define MMUFCR_xFC_PR          0x01c0          /* page protection flag */
-#define MMUFCR_xFC_PR_ROK      0x0000          /* - R/O kernel */
-#define MMUFCR_xFC_PR_RWK      0x0100          /* - R/W kernel */
-#define MMUFCR_xFC_PR_ROK_ROU  0x0080          /* - R/O kernel and R/O user */
-#define MMUFCR_xFC_PR_RWK_ROU  0x0180          /* - R/W kernel and R/O user */
-#define MMUFCR_xFC_PR_RWK_RWU  0x01c0          /* - R/W kernel and R/W user */
-#define MMUFCR_xFC_ILLADDR     0x0200          /* illegal address excep flag */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_CPU_REGS_H */
diff --git a/include/asm-mn10300/cputime.h b/include/asm-mn10300/cputime.h
deleted file mode 100644 (file)
index 6d68ad7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/cputime.h>
diff --git a/include/asm-mn10300/current.h b/include/asm-mn10300/current.h
deleted file mode 100644 (file)
index ca6027d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* MN10300 Current task structure accessor
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_CURRENT_H
-#define _ASM_CURRENT_H
-
-#include <linux/thread_info.h>
-
-/*
- * dedicate E2 to keeping the current task pointer
- */
-#ifdef CONFIG_MN10300_CURRENT_IN_E2
-
-register struct task_struct *const current asm("e2") __attribute__((used));
-
-#define get_current() current
-
-extern struct task_struct *__current;
-
-#else
-static inline __attribute__((const))
-struct task_struct *get_current(void)
-{
-       return current_thread_info()->task;
-}
-
-#define current get_current()
-#endif
-
-#endif /* _ASM_CURRENT_H */
diff --git a/include/asm-mn10300/delay.h b/include/asm-mn10300/delay.h
deleted file mode 100644 (file)
index 34517b3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* MN10300 Uninterruptible delay routines
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_DELAY_H
-#define _ASM_DELAY_H
-
-extern void __udelay(unsigned long usecs);
-extern void __delay(unsigned long loops);
-
-#define udelay(n) __udelay(n)
-
-#endif /* _ASM_DELAY_H */
diff --git a/include/asm-mn10300/device.h b/include/asm-mn10300/device.h
deleted file mode 100644 (file)
index f0a4c25..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/device.h>
diff --git a/include/asm-mn10300/div64.h b/include/asm-mn10300/div64.h
deleted file mode 100644 (file)
index 3a8329b..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/* MN10300 64-bit division
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_DIV64
-#define _ASM_DIV64
-
-#include <linux/types.h>
-
-extern void ____unhandled_size_in_do_div___(void);
-
-/*
- * divide n by base, leaving the result in n and returning the remainder
- * - we can do this quite efficiently on the MN10300 by cascading the divides
- *   through the MDR register
- */
-#define do_div(n, base)                                                        \
-({                                                                     \
-       unsigned __rem = 0;                                             \
-       if (sizeof(n) <= 4) {                                           \
-               asm("mov        %1,mdr  \n"                             \
-                   "divu       %2,%0   \n"                             \
-                   "mov        mdr,%1  \n"                             \
-                   : "+r"(n), "=d"(__rem)                              \
-                   : "r"(base), "1"(__rem)                             \
-                   : "cc"                                              \
-                   );                                                  \
-       } else if (sizeof(n) <= 8) {                                    \
-               union {                                                 \
-                       unsigned long long l;                           \
-                       u32 w[2];                                       \
-               } __quot;                                               \
-               __quot.l = n;                                           \
-               asm("mov        %0,mdr  \n"     /* MDR = 0 */           \
-                   "divu       %3,%1   \n"                             \
-                   /* __quot.MSL = __div.MSL / base, */                \
-                   /* MDR = MDR:__div.MSL % base */                    \
-                   "divu       %3,%2   \n"                             \
-                   /* __quot.LSL = MDR:__div.LSL / base, */            \
-                   /* MDR = MDR:__div.LSL % base */                    \
-                   "mov        mdr,%0  \n"                             \
-                   : "=d"(__rem), "=r"(__quot.w[1]), "=r"(__quot.w[0]) \
-                   : "r"(base), "0"(__rem), "1"(__quot.w[1]),          \
-                     "2"(__quot.w[0])                                  \
-                   : "cc"                                              \
-                   );                                                  \
-               n = __quot.l;                                           \
-       } else {                                                        \
-               ____unhandled_size_in_do_div___();                      \
-       }                                                               \
-       __rem;                                                          \
-})
-
-/*
- * do an unsigned 32-bit multiply and divide with intermediate 64-bit product
- * so as not to lose accuracy
- * - we use the MDR register to hold the MSW of the product
- */
-static inline __attribute__((const))
-unsigned __muldiv64u(unsigned val, unsigned mult, unsigned div)
-{
-       unsigned result;
-
-       asm("mulu       %2,%0   \n"     /* MDR:val = val*mult */
-           "divu       %3,%0   \n"     /* val = MDR:val/div;
-                                        * MDR = MDR:val%div */
-           : "=r"(result)
-           : "0"(val), "ir"(mult), "r"(div)
-           );
-
-       return result;
-}
-
-/*
- * do a signed 32-bit multiply and divide with intermediate 64-bit product so
- * as not to lose accuracy
- * - we use the MDR register to hold the MSW of the product
- */
-static inline __attribute__((const))
-signed __muldiv64s(signed val, signed mult, signed div)
-{
-       signed result;
-
-       asm("mul        %2,%0   \n"     /* MDR:val = val*mult */
-           "div        %3,%0   \n"     /* val = MDR:val/div;
-                                        * MDR = MDR:val%div */
-           : "=r"(result)
-           : "0"(val), "ir"(mult), "r"(div)
-           );
-
-       return result;
-}
-
-#endif /* _ASM_DIV64 */
diff --git a/include/asm-mn10300/dma-mapping.h b/include/asm-mn10300/dma-mapping.h
deleted file mode 100644 (file)
index ccae8f6..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/* DMA mapping routines for the MN10300 arch
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_DMA_MAPPING_H
-#define _ASM_DMA_MAPPING_H
-
-#include <linux/mm.h>
-#include <linux/scatterlist.h>
-
-#include <asm/cache.h>
-#include <asm/io.h>
-
-extern void *dma_alloc_coherent(struct device *dev, size_t size,
-                               dma_addr_t *dma_handle, int flag);
-
-extern void dma_free_coherent(struct device *dev, size_t size,
-                             void *vaddr, dma_addr_t dma_handle);
-
-#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent((d), (s), (h), (f))
-#define dma_free_noncoherent(d, s, v, h)  dma_free_coherent((d), (s), (v), (h))
-
-/*
- * Map a single buffer of the indicated size for DMA in streaming mode.  The
- * 32-bit bus address to use is returned.
- *
- * Once the device is given the dma address, the device owns this memory until
- * either pci_unmap_single or pci_dma_sync_single is performed.
- */
-static inline
-dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
-                         enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-       mn10300_dcache_flush_inv();
-       return virt_to_bus(ptr);
-}
-
-/*
- * Unmap a single streaming mode DMA translation.  The dma_addr and size must
- * match what was provided for in a previous pci_map_single call.  All other
- * usages are undefined.
- *
- * After this call, reads by the cpu to the buffer are guarenteed to see
- * whatever the device wrote there.
- */
-static inline
-void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                     enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-/*
- * Map a set of buffers described by scatterlist in streaming mode for DMA.
- * This is the scather-gather version of the above pci_map_single interface.
- * Here the scatter gather list elements are each tagged with the appropriate
- * dma address and length.  They are obtained via sg_dma_{address,length}(SG).
- *
- * NOTE: An implementation may be able to use a smaller number of DMA
- *       address/length pairs than there are SG table elements.  (for example
- *       via virtual mapping capabilities) The routine returns the number of
- *       addr/length pairs actually used, at most nents.
- *
- * Device ownership issues as mentioned above for pci_map_single are the same
- * here.
- */
-static inline
-int dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
-              enum dma_data_direction direction)
-{
-       struct scatterlist *sg;
-       int i;
-
-       BUG_ON(!valid_dma_direction(direction));
-       WARN_ON(nents == 0 || sglist[0].length == 0);
-
-       for_each_sg(sglist, sg, nents, i) {
-               BUG_ON(!sg_page(sg));
-
-               sg->dma_address = sg_phys(sg);
-       }
-
-       mn10300_dcache_flush_inv();
-       return nents;
-}
-
-/*
- * Unmap a set of streaming mode DMA translations.
- * Again, cpu read rules concerning calls here are the same as for
- * pci_unmap_single() above.
- */
-static inline
-void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-                 enum dma_data_direction direction)
-{
-       BUG_ON(!valid_dma_direction(direction));
-}
-
-/*
- * pci_{map,unmap}_single_page maps a kernel page to a dma_addr_t. identical
- * to pci_map_single, but takes a struct page instead of a virtual address
- */
-static inline
-dma_addr_t dma_map_page(struct device *dev, struct page *page,
-                       unsigned long offset, size_t size,
-                       enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-       return page_to_bus(page) + offset;
-}
-
-static inline
-void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-                   enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-/*
- * Make physical memory consistent for a single streaming mode DMA translation
- * after a transfer.
- *
- * If you perform a pci_map_single() but wish to interrogate the buffer using
- * the cpu, yet do not wish to teardown the PCI dma mapping, you must call this
- * function before doing so.  At the next point you give the PCI dma address
- * back to the card, the device again owns the buffer.
- */
-static inline
-void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
-                            size_t size, enum dma_data_direction direction)
-{
-}
-
-static inline
-void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
-                               size_t size, enum dma_data_direction direction)
-{
-       mn10300_dcache_flush_inv();
-}
-
-static inline
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
-                                  unsigned long offset, size_t size,
-                                  enum dma_data_direction direction)
-{
-}
-
-static inline void
-dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
-                                unsigned long offset, size_t size,
-                                enum dma_data_direction direction)
-{
-       mn10300_dcache_flush_inv();
-}
-
-
-/*
- * Make physical memory consistent for a set of streaming mode DMA translations
- * after a transfer.
- *
- * The same as pci_dma_sync_single but for a scatter-gather list, same rules
- * and usage.
- */
-static inline
-void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
-                        int nelems, enum dma_data_direction direction)
-{
-}
-
-static inline
-void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
-                           int nelems, enum dma_data_direction direction)
-{
-       mn10300_dcache_flush_inv();
-}
-
-static inline
-int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
-{
-       return 0;
-}
-
-/*
- * Return whether the given PCI device DMA address mask can be supported
- * properly.  For example, if your device can only drive the low 24-bits during
- * PCI bus mastering, then you would pass 0x00ffffff as the mask to this
- * function.
- */
-static inline
-int dma_supported(struct device *dev, u64 mask)
-{
-       /*
-        * we fall back to GFP_DMA when the mask isn't all 1s, so we can't
-        * guarantee allocations that must be within a tighter range than
-        * GFP_DMA
-        */
-       if (mask < 0x00ffffff)
-               return 0;
-       return 1;
-}
-
-static inline
-int dma_set_mask(struct device *dev, u64 mask)
-{
-       if (!dev->dma_mask || !dma_supported(dev, mask))
-               return -EIO;
-
-       *dev->dma_mask = mask;
-       return 0;
-}
-
-static inline
-int dma_get_cache_alignment(void)
-{
-       return 1 << L1_CACHE_SHIFT;
-}
-
-#define dma_is_consistent(d)   (1)
-
-static inline
-void dma_cache_sync(void *vaddr, size_t size,
-                   enum dma_data_direction direction)
-{
-       mn10300_dcache_flush_inv();
-}
-
-#endif
diff --git a/include/asm-mn10300/dma.h b/include/asm-mn10300/dma.h
deleted file mode 100644 (file)
index 098df2e..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/* MN10300 ISA DMA handlers and definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_DMA_H
-#define _ASM_DMA_H
-
-#include <asm/system.h>
-#include <linux/spinlock.h>
-#include <asm/io.h>
-#include <linux/delay.h>
-
-#undef MAX_DMA_CHANNELS                /* switch off linux/kernel/dma.c */
-#define MAX_DMA_ADDRESS                0xbfffffff
-
-extern spinlock_t dma_spin_lock;
-
-static inline unsigned long claim_dma_lock(void)
-{
-       unsigned long flags;
-       spin_lock_irqsave(&dma_spin_lock, flags);
-       return flags;
-}
-
-static inline void release_dma_lock(unsigned long flags)
-{
-       spin_unlock_irqrestore(&dma_spin_lock, flags);
-}
-
-/* enable/disable a specific DMA channel */
-static inline void enable_dma(unsigned int dmanr)
-{
-}
-
-static inline void disable_dma(unsigned int dmanr)
-{
-}
-
-/* Clear the 'DMA Pointer Flip Flop'.
- * Write 0 for LSB/MSB, 1 for MSB/LSB access.
- * Use this once to initialize the FF to a known state.
- * After that, keep track of it. :-)
- * --- In order to do that, the DMA routines below should ---
- * --- only be used while holding the DMA lock ! ---
- */
-static inline void clear_dma_ff(unsigned int dmanr)
-{
-}
-
-/* set mode (above) for a specific DMA channel */
-static inline void set_dma_mode(unsigned int dmanr, char mode)
-{
-}
-
-/* Set only the page register bits of the transfer address.
- * This is used for successive transfers when we know the contents of
- * the lower 16 bits of the DMA current address register, but a 64k boundary
- * may have been crossed.
- */
-static inline void set_dma_page(unsigned int dmanr, char pagenr)
-{
-}
-
-
-/* Set transfer address & page bits for specific DMA channel.
- * Assumes dma flipflop is clear.
- */
-static inline void set_dma_addr(unsigned int dmanr, unsigned int a)
-{
-}
-
-
-/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
- * a specific DMA channel.
- * You must ensure the parameters are valid.
- * NOTE: from a manual: "the number of transfers is one more
- * than the initial word count"! This is taken into account.
- * Assumes dma flip-flop is clear.
- * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
- */
-static inline void set_dma_count(unsigned int dmanr, unsigned int count)
-{
-}
-
-
-/* Get DMA residue count. After a DMA transfer, this
- * should return zero. Reading this while a DMA transfer is
- * still in progress will return unpredictable results.
- * If called before the channel has been used, it may return 1.
- * Otherwise, it returns the number of _bytes_ left to transfer.
- *
- * Assumes DMA flip-flop is clear.
- */
-static inline int get_dma_residue(unsigned int dmanr)
-{
-       return 0;
-}
-
-
-/* These are in kernel/dma.c: */
-extern int request_dma(unsigned int dmanr, const char *device_id);
-extern void free_dma(unsigned int dmanr);
-
-/* From PCI */
-
-#ifdef CONFIG_PCI
-extern int isa_dma_bridge_buggy;
-#else
-#define isa_dma_bridge_buggy   (0)
-#endif
-
-#endif /* _ASM_DMA_H */
diff --git a/include/asm-mn10300/dmactl-regs.h b/include/asm-mn10300/dmactl-regs.h
deleted file mode 100644 (file)
index 58a199d..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/* MN10300 on-board DMA controller registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_DMACTL_REGS_H
-#define _ASM_DMACTL_REGS_H
-
-#include <asm/cpu-regs.h>
-
-#ifdef __KERNEL__
-
-/* DMA registers */
-#define        DMxCTR(N)               __SYSREG(0xd2000000 + ((N) * 0x100), u32)       /* control reg */
-#define        DMxCTR_BG               0x0000001f      /* transfer request source */
-#define        DMxCTR_BG_SOFT          0x00000000      /* - software source */
-#define        DMxCTR_BG_SC0TX         0x00000002      /* - serial port 0 transmission */
-#define        DMxCTR_BG_SC0RX         0x00000003      /* - serial port 0 reception */
-#define        DMxCTR_BG_SC1TX         0x00000004      /* - serial port 1 transmission */
-#define        DMxCTR_BG_SC1RX         0x00000005      /* - serial port 1 reception */
-#define        DMxCTR_BG_SC2TX         0x00000006      /* - serial port 2 transmission */
-#define        DMxCTR_BG_SC2RX         0x00000007      /* - serial port 2 reception */
-#define        DMxCTR_BG_TM0UFLOW      0x00000008      /* - timer 0 underflow */
-#define        DMxCTR_BG_TM1UFLOW      0x00000009      /* - timer 1 underflow */
-#define        DMxCTR_BG_TM2UFLOW      0x0000000a      /* - timer 2 underflow */
-#define        DMxCTR_BG_TM3UFLOW      0x0000000b      /* - timer 3 underflow */
-#define        DMxCTR_BG_TM6ACMPCAP    0x0000000c      /* - timer 6A compare/capture */
-#define        DMxCTR_BG_AFE           0x0000000d      /* - analogue front-end interrupt source */
-#define        DMxCTR_BG_ADC           0x0000000e      /* - A/D conversion end interrupt source */
-#define        DMxCTR_BG_IRDA          0x0000000f      /* - IrDA interrupt source */
-#define        DMxCTR_BG_RTC           0x00000010      /* - RTC interrupt source */
-#define        DMxCTR_BG_XIRQ0         0x00000011      /* - XIRQ0 pin interrupt source */
-#define        DMxCTR_BG_XIRQ1         0x00000012      /* - XIRQ1 pin interrupt source */
-#define        DMxCTR_BG_XDMR0         0x00000013      /* - external request 0 source (XDMR0 pin) */
-#define        DMxCTR_BG_XDMR1         0x00000014      /* - external request 1 source (XDMR1 pin) */
-#define        DMxCTR_SAM              0x000000e0      /* DMA transfer src addr mode */
-#define        DMxCTR_SAM_INCR         0x00000000      /* - increment */
-#define        DMxCTR_SAM_DECR         0x00000020      /* - decrement */
-#define        DMxCTR_SAM_FIXED        0x00000040      /* - fixed */
-#define        DMxCTR_DAM              0x00000000      /* DMA transfer dest addr mode */
-#define        DMxCTR_DAM_INCR         0x00000000      /* - increment */
-#define        DMxCTR_DAM_DECR         0x00000100      /* - decrement */
-#define        DMxCTR_DAM_FIXED        0x00000200      /* - fixed */
-#define        DMxCTR_TM               0x00001800      /* DMA transfer mode */
-#define        DMxCTR_TM_BATCH         0x00000000      /* - batch transfer */
-#define        DMxCTR_TM_INTERM        0x00001000      /* - intermittent transfer */
-#define        DMxCTR_UT               0x00006000      /* DMA transfer unit */
-#define        DMxCTR_UT_1             0x00000000      /* - 1 byte */
-#define        DMxCTR_UT_2             0x00002000      /* - 2 byte */
-#define        DMxCTR_UT_4             0x00004000      /* - 4 byte */
-#define        DMxCTR_UT_16            0x00006000      /* - 16 byte */
-#define        DMxCTR_TEN              0x00010000      /* DMA channel transfer enable */
-#define        DMxCTR_RQM              0x00060000      /* external request input source mode */
-#define        DMxCTR_RQM_FALLEDGE     0x00000000      /* - falling edge */
-#define        DMxCTR_RQM_RISEEDGE     0x00020000      /* - rising edge */
-#define        DMxCTR_RQM_LOLEVEL      0x00040000      /* - low level */
-#define        DMxCTR_RQM_HILEVEL      0x00060000      /* - high level */
-#define        DMxCTR_RQF              0x01000000      /* DMA transfer request flag */
-#define        DMxCTR_XEND             0x80000000      /* DMA transfer end flag */
-
-#define        DMxSRC(N)               __SYSREG(0xd2000004 + ((N) * 0x100), u32)       /* control reg */
-
-#define        DMxDST(N)               __SYSREG(0xd2000008 + ((N) * 0x100), u32)       /* src addr reg */
-
-#define        DMxSIZ(N)               __SYSREG(0xd200000c + ((N) * 0x100), u32)       /* dest addr reg */
-#define DMxSIZ_CT              0x000fffff      /* number of bytes to transfer */
-
-#define        DMxCYC(N)               __SYSREG(0xd2000010 + ((N) * 0x100), u32)       /* intermittent
-                                                                                * size reg */
-#define DMxCYC_CYC             0x000000ff      /* number of interrmittent transfers -1 */
-
-#define DM0IRQ                 16              /* DMA channel 0 complete IRQ */
-#define DM1IRQ                 17              /* DMA channel 1 complete IRQ */
-#define DM2IRQ                 18              /* DMA channel 2 complete IRQ */
-#define DM3IRQ                 19              /* DMA channel 3 complete IRQ */
-
-#define        DM0ICR                  GxICR(DM0IRQ)   /* DMA channel 0 complete intr ctrl reg */
-#define        DM1ICR                  GxICR(DM0IR1)   /* DMA channel 1 complete intr ctrl reg */
-#define        DM2ICR                  GxICR(DM0IR2)   /* DMA channel 2 complete intr ctrl reg */
-#define        DM3ICR                  GxICR(DM0IR3)   /* DMA channel 3 complete intr ctrl reg */
-
-#ifndef __ASSEMBLY__
-
-struct mn10300_dmactl_regs {
-       u32             ctr;
-       const void      *src;
-       void            *dst;
-       u32             siz;
-       u32             cyc;
-} __attribute__((aligned(0x100)));
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_DMACTL_REGS_H */
diff --git a/include/asm-mn10300/elf.h b/include/asm-mn10300/elf.h
deleted file mode 100644 (file)
index bf09f8b..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/* MN10300 ELF constant and register definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_ELF_H
-#define _ASM_ELF_H
-
-#include <linux/utsname.h>
-#include <asm/ptrace.h>
-#include <asm/user.h>
-
-/*
- * AM33 relocations
- */
-#define R_MN10300_NONE         0       /* No reloc.  */
-#define R_MN10300_32           1       /* Direct 32 bit.  */
-#define R_MN10300_16           2       /* Direct 16 bit.  */
-#define R_MN10300_8            3       /* Direct 8 bit.  */
-#define R_MN10300_PCREL32      4       /* PC-relative 32-bit.  */
-#define R_MN10300_PCREL16      5       /* PC-relative 16-bit signed.  */
-#define R_MN10300_PCREL8       6       /* PC-relative 8-bit signed.  */
-#define R_MN10300_24           9       /* Direct 24 bit.  */
-#define R_MN10300_RELATIVE     23      /* Adjust by program base.  */
-
-/*
- * ELF register definitions..
- */
-typedef unsigned long elf_greg_t;
-
-#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-#define ELF_NFPREG 32
-typedef float elf_fpreg_t;
-
-typedef struct {
-       elf_fpreg_t     fpregs[ELF_NFPREG];
-       u_int32_t       fpcr;
-} elf_fpregset_t;
-
-extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
-
-/*
- * This is used to ensure we don't load something for the wrong architecture
- */
-#define elf_check_arch(x) \
-       (((x)->e_machine == EM_CYGNUS_MN10300) ||       \
-        ((x)->e_machine == EM_MN10300))
-
-/*
- * These are used to set parameters in the core dumps.
- */
-#define ELF_CLASS      ELFCLASS32
-#define ELF_DATA       ELFDATA2LSB
-#define ELF_ARCH       EM_MN10300
-
-/*
- * ELF process initialiser
- */
-#define ELF_PLAT_INIT(_r, load_addr)                                   \
-do {                                                                   \
-       struct pt_regs *_ur = current->thread.uregs;                    \
-       _ur->a3   = 0;  _ur->a2   = 0;  _ur->d3   = 0;  _ur->d2   = 0;  \
-       _ur->mcvf = 0;  _ur->mcrl = 0;  _ur->mcrh = 0;  _ur->mdrq = 0;  \
-       _ur->e1   = 0;  _ur->e0   = 0;  _ur->e7   = 0;  _ur->e6   = 0;  \
-       _ur->e5   = 0;  _ur->e4   = 0;  _ur->e3   = 0;  _ur->e2   = 0;  \
-       _ur->lar  = 0;  _ur->lir  = 0;  _ur->mdr  = 0;                  \
-       _ur->a1   = 0;  _ur->a0   = 0;  _ur->d1   = 0;  _ur->d0   = 0;  \
-} while (0)
-
-#define USE_ELF_CORE_DUMP
-#define ELF_EXEC_PAGESIZE      4096
-
-/*
- * This is the location that an ET_DYN program is loaded if exec'ed.  Typical
- * use of this is to invoke "./ld.so someprog" to test out a new version of
- * the loader.  We need to make sure that it is out of the way of the program
- * that it will "exec", and that there is sufficient room for the brk.
- * - must clear the VMALLOC area
- */
-#define ELF_ET_DYN_BASE         0x04000000
-
-/*
- * regs is struct pt_regs, pr_reg is elf_gregset_t (which is
- * now struct user_regs, they are different)
- * - ELF_CORE_COPY_REGS has been guessed, and may be wrong
- */
-#define ELF_CORE_COPY_REGS(pr_reg, regs)       \
-do {                                           \
-       pr_reg[0]       = regs->a3;             \
-       pr_reg[1]       = regs->a2;             \
-       pr_reg[2]       = regs->d3;             \
-       pr_reg[3]       = regs->d2;             \
-       pr_reg[4]       = regs->mcvf;           \
-       pr_reg[5]       = regs->mcrl;           \
-       pr_reg[6]       = regs->mcrh;           \
-       pr_reg[7]       = regs->mdrq;           \
-       pr_reg[8]       = regs->e1;             \
-       pr_reg[9]       = regs->e0;             \
-       pr_reg[10]      = regs->e7;             \
-       pr_reg[11]      = regs->e6;             \
-       pr_reg[12]      = regs->e5;             \
-       pr_reg[13]      = regs->e4;             \
-       pr_reg[14]      = regs->e3;             \
-       pr_reg[15]      = regs->e2;             \
-       pr_reg[16]      = regs->sp;             \
-       pr_reg[17]      = regs->lar;            \
-       pr_reg[18]      = regs->lir;            \
-       pr_reg[19]      = regs->mdr;            \
-       pr_reg[20]      = regs->a1;             \
-       pr_reg[21]      = regs->a0;             \
-       pr_reg[22]      = regs->d1;             \
-       pr_reg[23]      = regs->d0;             \
-       pr_reg[24]      = regs->orig_d0;        \
-       pr_reg[25]      = regs->epsw;           \
-       pr_reg[26]      = regs->pc;             \
-} while (0);
-
-/*
- * This yields a mask that user programs can use to figure out what
- * instruction set this CPU supports.  This could be done in user space,
- * but it's not easy, and we've already done it here.
- */
-#define ELF_HWCAP      (0)
-
-/*
- * This yields a string that ld.so will use to load implementation
- * specific libraries for optimization.  This is more specific in
- * intent than poking at uname or /proc/cpuinfo.
- *
- * For the moment, we have only optimizations for the Intel generations,
- * but that could change...
- */
-#define ELF_PLATFORM  (NULL)
-
-#ifdef __KERNEL__
-#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
-#endif
-
-#endif /* _ASM_ELF_H */
diff --git a/include/asm-mn10300/emergency-restart.h b/include/asm-mn10300/emergency-restart.h
deleted file mode 100644 (file)
index 3711bd9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/emergency-restart.h>
diff --git a/include/asm-mn10300/errno.h b/include/asm-mn10300/errno.h
deleted file mode 100644 (file)
index 4c82b50..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/errno.h>
diff --git a/include/asm-mn10300/exceptions.h b/include/asm-mn10300/exceptions.h
deleted file mode 100644 (file)
index fa16466..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/* MN10300 Microcontroller core exceptions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_EXCEPTIONS_H
-#define _ASM_EXCEPTIONS_H
-
-#include <linux/linkage.h>
-
-/*
- * define the breakpoint instruction opcode to use
- * - note that the JTAG unit steals 0xFF, so we want to avoid that if we can
- *   (can use 0xF7)
- */
-#define GDBSTUB_BKPT           0xFF
-
-#ifndef __ASSEMBLY__
-
-/*
- * enumeration of exception codes (as extracted from TBR MSW)
- */
-enum exception_code {
-       EXCEP_RESET             = 0x000000,     /* reset */
-
-       /* MMU exceptions */
-       EXCEP_ITLBMISS          = 0x000100,     /* instruction TLB miss */
-       EXCEP_DTLBMISS          = 0x000108,     /* data TLB miss */
-       EXCEP_IAERROR           = 0x000110,     /* instruction address */
-       EXCEP_DAERROR           = 0x000118,     /* data address */
-
-       /* system exceptions */
-       EXCEP_TRAP              = 0x000128,     /* program interrupt (PI instruction) */
-       EXCEP_ISTEP             = 0x000130,     /* single step */
-       EXCEP_IBREAK            = 0x000150,     /* instruction breakpoint */
-       EXCEP_OBREAK            = 0x000158,     /* operand breakpoint */
-       EXCEP_PRIVINS           = 0x000160,     /* privileged instruction execution */
-       EXCEP_UNIMPINS          = 0x000168,     /* unimplemented instruction execution */
-       EXCEP_UNIMPEXINS        = 0x000170,     /* unimplemented extended instruction execution */
-       EXCEP_MEMERR            = 0x000178,     /* illegal memory access */
-       EXCEP_MISALIGN          = 0x000180,     /* misalignment */
-       EXCEP_BUSERROR          = 0x000188,     /* bus error */
-       EXCEP_ILLINSACC         = 0x000190,     /* illegal instruction access */
-       EXCEP_ILLDATACC         = 0x000198,     /* illegal data access */
-       EXCEP_IOINSACC          = 0x0001a0,     /* I/O space instruction access */
-       EXCEP_PRIVINSACC        = 0x0001a8,     /* privileged space instruction access */
-       EXCEP_PRIVDATACC        = 0x0001b0,     /* privileged space data access */
-       EXCEP_DATINSACC         = 0x0001b8,     /* data space instruction access */
-       EXCEP_DOUBLE_FAULT      = 0x000200,     /* double fault */
-
-       /* FPU exceptions */
-       EXCEP_FPU_DISABLED      = 0x0001c0,     /* FPU disabled */
-       EXCEP_FPU_UNIMPINS      = 0x0001c8,     /* FPU unimplemented operation */
-       EXCEP_FPU_OPERATION     = 0x0001d0,     /* FPU operation */
-
-       /* interrupts */
-       EXCEP_WDT               = 0x000240,     /* watchdog timer overflow */
-       EXCEP_NMI               = 0x000248,     /* non-maskable interrupt */
-       EXCEP_IRQ_LEVEL0        = 0x000280,     /* level 0 maskable interrupt */
-       EXCEP_IRQ_LEVEL1        = 0x000288,     /* level 1 maskable interrupt */
-       EXCEP_IRQ_LEVEL2        = 0x000290,     /* level 2 maskable interrupt */
-       EXCEP_IRQ_LEVEL3        = 0x000298,     /* level 3 maskable interrupt */
-       EXCEP_IRQ_LEVEL4        = 0x0002a0,     /* level 4 maskable interrupt */
-       EXCEP_IRQ_LEVEL5        = 0x0002a8,     /* level 5 maskable interrupt */
-       EXCEP_IRQ_LEVEL6        = 0x0002b0,     /* level 6 maskable interrupt */
-
-       /* system calls */
-       EXCEP_SYSCALL0          = 0x000300,     /* system call 0 */
-       EXCEP_SYSCALL1          = 0x000308,     /* system call 1 */
-       EXCEP_SYSCALL2          = 0x000310,     /* system call 2 */
-       EXCEP_SYSCALL3          = 0x000318,     /* system call 3 */
-       EXCEP_SYSCALL4          = 0x000320,     /* system call 4 */
-       EXCEP_SYSCALL5          = 0x000328,     /* system call 5 */
-       EXCEP_SYSCALL6          = 0x000330,     /* system call 6 */
-       EXCEP_SYSCALL7          = 0x000338,     /* system call 7 */
-       EXCEP_SYSCALL8          = 0x000340,     /* system call 8 */
-       EXCEP_SYSCALL9          = 0x000348,     /* system call 9 */
-       EXCEP_SYSCALL10         = 0x000350,     /* system call 10 */
-       EXCEP_SYSCALL11         = 0x000358,     /* system call 11 */
-       EXCEP_SYSCALL12         = 0x000360,     /* system call 12 */
-       EXCEP_SYSCALL13         = 0x000368,     /* system call 13 */
-       EXCEP_SYSCALL14         = 0x000370,     /* system call 14 */
-       EXCEP_SYSCALL15         = 0x000378,     /* system call 15 */
-};
-
-extern void __set_intr_stub(enum exception_code code, void *handler);
-extern void set_intr_stub(enum exception_code code, void *handler);
-extern void set_jtag_stub(enum exception_code code, void *handler);
-
-struct pt_regs;
-
-extern asmlinkage void __common_exception(void);
-extern asmlinkage void itlb_miss(void);
-extern asmlinkage void dtlb_miss(void);
-extern asmlinkage void itlb_aerror(void);
-extern asmlinkage void dtlb_aerror(void);
-extern asmlinkage void raw_bus_error(void);
-extern asmlinkage void double_fault(void);
-extern asmlinkage int  system_call(struct pt_regs *);
-extern asmlinkage void fpu_exception(struct pt_regs *, enum exception_code);
-extern asmlinkage void nmi(struct pt_regs *, enum exception_code);
-extern asmlinkage void uninitialised_exception(struct pt_regs *,
-                                              enum exception_code);
-extern asmlinkage void irq_handler(void);
-extern asmlinkage void profile_handler(void);
-extern asmlinkage void nmi_handler(void);
-extern asmlinkage void misalignment(struct pt_regs *, enum exception_code);
-
-extern void die(const char *, struct pt_regs *, enum exception_code)
-       ATTRIB_NORET;
-
-extern int die_if_no_fixup(const char *, struct pt_regs *, enum exception_code);
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* _ASM_EXCEPTIONS_H */
diff --git a/include/asm-mn10300/fb.h b/include/asm-mn10300/fb.h
deleted file mode 100644 (file)
index 697b24a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* MN10300 Frame buffer stuff
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_FB_H
-#define _ASM_FB_H
-
-#include <linux/fb.h>
-
-#define fb_pgprotect(...) do {} while (0)
-
-static inline int fb_is_primary_device(struct fb_info *info)
-{
-       return 0;
-}
-
-#endif /* _ASM_FB_H */
diff --git a/include/asm-mn10300/fcntl.h b/include/asm-mn10300/fcntl.h
deleted file mode 100644 (file)
index 46ab12d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/fcntl.h>
diff --git a/include/asm-mn10300/fpu.h b/include/asm-mn10300/fpu.h
deleted file mode 100644 (file)
index 64a2b83..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* MN10300 FPU definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * Derived from include/asm-i386/i387.h: Copyright (C) 1994 Linus Torvalds
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_FPU_H
-#define _ASM_FPU_H
-
-#include <asm/processor.h>
-#include <asm/sigcontext.h>
-#include <asm/user.h>
-
-#ifdef __KERNEL__
-
-/* the task that owns the FPU state */
-extern struct task_struct *fpu_state_owner;
-
-#define set_using_fpu(tsk)                             \
-do {                                                   \
-       (tsk)->thread.fpu_flags |= THREAD_USING_FPU;    \
-} while (0)
-
-#define clear_using_fpu(tsk)                           \
-do {                                                   \
-       (tsk)->thread.fpu_flags &= ~THREAD_USING_FPU;   \
-} while (0)
-
-#define is_using_fpu(tsk) ((tsk)->thread.fpu_flags & THREAD_USING_FPU)
-
-#define unlazy_fpu(tsk)                                        \
-do {                                                   \
-       preempt_disable();                              \
-       if (fpu_state_owner == (tsk))                   \
-               fpu_save(&tsk->thread.fpu_state);       \
-       preempt_enable();                               \
-} while (0)
-
-#define exit_fpu()                             \
-do {                                           \
-       struct task_struct *__tsk = current;    \
-       preempt_disable();                      \
-       if (fpu_state_owner == __tsk)           \
-               fpu_state_owner = NULL;         \
-       preempt_enable();                       \
-} while (0)
-
-#define flush_fpu()                                    \
-do {                                                   \
-       struct task_struct *__tsk = current;            \
-       preempt_disable();                              \
-       if (fpu_state_owner == __tsk) {                 \
-               fpu_state_owner = NULL;                 \
-               __tsk->thread.uregs->epsw &= ~EPSW_FE;  \
-       }                                               \
-       preempt_enable();                               \
-       clear_using_fpu(__tsk);                         \
-} while (0)
-
-extern asmlinkage void fpu_init_state(void);
-extern asmlinkage void fpu_kill_state(struct task_struct *);
-extern asmlinkage void fpu_disabled(struct pt_regs *, enum exception_code);
-extern asmlinkage void fpu_exception(struct pt_regs *, enum exception_code);
-
-#ifdef CONFIG_FPU
-extern asmlinkage void fpu_save(struct fpu_state_struct *);
-extern asmlinkage void fpu_restore(struct fpu_state_struct *);
-#else
-#define fpu_save(a)
-#define fpu_restore(a)
-#endif /* CONFIG_FPU  */
-
-/*
- * signal frame handlers
- */
-extern int fpu_setup_sigcontext(struct fpucontext *buf);
-extern int fpu_restore_sigcontext(struct fpucontext *buf);
-
-#endif /* __KERNEL__ */
-#endif /* _ASM_FPU_H */
diff --git a/include/asm-mn10300/frame.inc b/include/asm-mn10300/frame.inc
deleted file mode 100644 (file)
index 5b1949b..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* MN10300 Microcontroller core system register definitions -*- asm -*-
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_FRAME_INC
-#define _ASM_FRAME_INC
-
-#ifndef __ASSEMBLY__
-#error not for use in C files
-#endif
-
-#ifndef __ASM_OFFSETS_H__
-#include <asm/asm-offsets.h>
-#endif
-
-#define pi break
-
-#define fp a3
-
-###############################################################################
-#
-# build a stack frame from the registers
-# - the caller has subtracted 4 from SP before coming here
-#
-###############################################################################
-.macro SAVE_ALL
-       add     -4,sp                           # next exception frame ptr save area
-       movm    [other],(sp)
-       mov     usp,a1
-       mov     a1,(sp)                         # USP in MOVM[other] dummy slot
-       movm    [d2,d3,a2,a3,exreg0,exreg1,exother],(sp)
-       mov     sp,fp                           # FRAME pointer in A3
-       add     -12,sp                          # allow for calls to be made
-       mov     (__frame),a1
-       mov     a1,(REG_NEXT,fp)
-       mov     fp,(__frame)
-
-       and     ~EPSW_FE,epsw                   # disable the FPU inside the kernel
-
-       # we may be holding current in E2
-#ifdef CONFIG_MN10300_CURRENT_IN_E2
-       mov     (__current),e2
-#endif
-.endm
-
-###############################################################################
-#
-# restore the registers from a stack frame
-#
-###############################################################################
-.macro RESTORE_ALL
-       # peel back the stack to the calling frame
-       # - this permits execve() to discard extra frames due to kernel syscalls
-       mov     (__frame),fp
-       mov     fp,sp
-       mov     (REG_NEXT,fp),d0                # userspace has regs->next == 0
-       mov     d0,(__frame)
-
-#ifndef CONFIG_MN10300_USING_JTAG
-       mov     (REG_EPSW,fp),d0
-       btst    EPSW_T,d0
-       beq     99f
-
-       or      EPSW_NMID,epsw
-       movhu   (DCR),d1
-       or      0x0001, d1
-       movhu   d1,(DCR)
-
-99:
-#endif
-       movm    (sp),[d2,d3,a2,a3,exreg0,exreg1,exother]
-
-       # must restore usp even if returning to kernel space,
-       # when CONFIG_PREEMPT is enabled.
-       mov     (sp),a1                         # USP in MOVM[other] dummy slot
-       mov     a1,usp
-
-       movm    (sp),[other]
-       add     8,sp
-       rti
-
-.endm
-
-
-#endif /* _ASM_FRAME_INC */
diff --git a/include/asm-mn10300/ftrace.h b/include/asm-mn10300/ftrace.h
deleted file mode 100644 (file)
index 40a8c17..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/include/asm-mn10300/futex.h b/include/asm-mn10300/futex.h
deleted file mode 100644 (file)
index 0b74582..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/futex.h>
diff --git a/include/asm-mn10300/gdb-stub.h b/include/asm-mn10300/gdb-stub.h
deleted file mode 100644 (file)
index e5a6368..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/* MN10300 Kernel GDB stub definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * - Derived from asm-mips/gdb-stub.h (c) 1995 Andreas Busse
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_GDB_STUB_H
-#define _ASM_GDB_STUB_H
-
-#include <asm/exceptions.h>
-
-/*
- * register ID numbers in GDB remote protocol
- */
-
-#define GDB_REGID_PC           9
-#define GDB_REGID_FP           7
-#define GDB_REGID_SP           8
-
-/*
- * virtual stack layout for the GDB exception handler
- */
-#define NUMREGS                        64
-
-#define GDB_FR_D0              (0 * 4)
-#define GDB_FR_D1              (1 * 4)
-#define GDB_FR_D2              (2 * 4)
-#define GDB_FR_D3              (3 * 4)
-#define GDB_FR_A0              (4 * 4)
-#define GDB_FR_A1              (5 * 4)
-#define GDB_FR_A2              (6 * 4)
-#define GDB_FR_A3              (7 * 4)
-
-#define GDB_FR_SP              (8 * 4)
-#define GDB_FR_PC              (9 * 4)
-#define GDB_FR_MDR             (10 * 4)
-#define GDB_FR_EPSW            (11 * 4)
-#define GDB_FR_LIR             (12 * 4)
-#define GDB_FR_LAR             (13 * 4)
-#define GDB_FR_MDRQ            (14 * 4)
-
-#define GDB_FR_E0              (15 * 4)
-#define GDB_FR_E1              (16 * 4)
-#define GDB_FR_E2              (17 * 4)
-#define GDB_FR_E3              (18 * 4)
-#define GDB_FR_E4              (19 * 4)
-#define GDB_FR_E5              (20 * 4)
-#define GDB_FR_E6              (21 * 4)
-#define GDB_FR_E7              (22 * 4)
-
-#define GDB_FR_SSP             (23 * 4)
-#define GDB_FR_MSP             (24 * 4)
-#define GDB_FR_USP             (25 * 4)
-#define GDB_FR_MCRH            (26 * 4)
-#define GDB_FR_MCRL            (27 * 4)
-#define GDB_FR_MCVF            (28 * 4)
-
-#define GDB_FR_FPCR            (29 * 4)
-#define GDB_FR_DUMMY0          (30 * 4)
-#define GDB_FR_DUMMY1          (31 * 4)
-
-#define GDB_FR_FS0             (32 * 4)
-
-#define GDB_FR_SIZE            (NUMREGS * 4)
-
-#ifndef __ASSEMBLY__
-
-/*
- * This is the same as above, but for the high-level
- * part of the GDB stub.
- */
-
-struct gdb_regs {
-       /* saved main processor registers */
-       u32     d0, d1, d2, d3, a0, a1, a2, a3;
-       u32     sp, pc, mdr, epsw, lir, lar, mdrq;
-       u32     e0, e1, e2, e3, e4, e5, e6, e7;
-       u32     ssp, msp, usp, mcrh, mcrl, mcvf;
-
-       /* saved floating point registers */
-       u32     fpcr, _dummy0, _dummy1;
-       u32     fs0,  fs1,  fs2,  fs3,  fs4,  fs5,  fs6,  fs7;
-       u32     fs8,  fs9,  fs10, fs11, fs12, fs13, fs14, fs15;
-       u32     fs16, fs17, fs18, fs19, fs20, fs21, fs22, fs23;
-       u32     fs24, fs25, fs26, fs27, fs28, fs29, fs30, fs31;
-};
-
-/*
- * Prototypes
- */
-extern void show_registers_only(struct pt_regs *regs);
-
-extern asmlinkage void gdbstub_init(void);
-extern asmlinkage void gdbstub_exit(int status);
-extern asmlinkage void gdbstub_io_init(void);
-extern asmlinkage void gdbstub_io_set_baud(unsigned baud);
-extern asmlinkage int  gdbstub_io_rx_char(unsigned char *_ch, int nonblock);
-extern asmlinkage void gdbstub_io_tx_char(unsigned char ch);
-extern asmlinkage void gdbstub_io_tx_flush(void);
-
-extern asmlinkage void gdbstub_io_rx_handler(void);
-extern asmlinkage void gdbstub_rx_irq(struct pt_regs *, enum exception_code);
-extern asmlinkage int  gdbstub_intercept(struct pt_regs *, enum exception_code);
-extern asmlinkage void gdbstub_exception(struct pt_regs *, enum exception_code);
-extern asmlinkage void __gdbstub_bug_trap(void);
-extern asmlinkage void __gdbstub_pause(void);
-extern asmlinkage void start_kernel(void);
-
-#ifndef CONFIG_MN10300_CACHE_DISABLED
-extern asmlinkage void gdbstub_purge_cache(void);
-#else
-#define gdbstub_purge_cache()  do {} while (0)
-#endif
-
-/* Used to prevent crashes in memory access */
-extern asmlinkage int  gdbstub_read_byte(const u8 *, u8 *);
-extern asmlinkage int  gdbstub_read_word(const u8 *, u8 *);
-extern asmlinkage int  gdbstub_read_dword(const u8 *, u8 *);
-extern asmlinkage int  gdbstub_write_byte(u32, u8 *);
-extern asmlinkage int  gdbstub_write_word(u32, u8 *);
-extern asmlinkage int  gdbstub_write_dword(u32, u8 *);
-
-extern asmlinkage void gdbstub_read_byte_guard(void);
-extern asmlinkage void gdbstub_read_byte_cont(void);
-extern asmlinkage void gdbstub_read_word_guard(void);
-extern asmlinkage void gdbstub_read_word_cont(void);
-extern asmlinkage void gdbstub_read_dword_guard(void);
-extern asmlinkage void gdbstub_read_dword_cont(void);
-extern asmlinkage void gdbstub_write_byte_guard(void);
-extern asmlinkage void gdbstub_write_byte_cont(void);
-extern asmlinkage void gdbstub_write_word_guard(void);
-extern asmlinkage void gdbstub_write_word_cont(void);
-extern asmlinkage void gdbstub_write_dword_guard(void);
-extern asmlinkage void gdbstub_write_dword_cont(void);
-
-extern u8      gdbstub_rx_buffer[PAGE_SIZE];
-extern u32     gdbstub_rx_inp;
-extern u32     gdbstub_rx_outp;
-extern u8      gdbstub_rx_overflow;
-extern u8      gdbstub_busy;
-extern u8      gdbstub_rx_unget;
-
-#ifdef CONFIG_GDBSTUB_DEBUGGING
-extern void gdbstub_printk(const char *fmt, ...)
-       __attribute__((format(printf, 1, 2)));
-#else
-static inline __attribute__((format(printf, 1, 2)))
-void gdbstub_printk(const char *fmt, ...)
-{
-}
-#endif
-
-#ifdef CONFIG_GDBSTUB_DEBUG_ENTRY
-#define gdbstub_entry(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
-#else
-#define gdbstub_entry(FMT, ...) ({ 0; })
-#endif
-
-#ifdef CONFIG_GDBSTUB_DEBUG_PROTOCOL
-#define gdbstub_proto(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
-#else
-#define gdbstub_proto(FMT, ...) ({ 0; })
-#endif
-
-#ifdef CONFIG_GDBSTUB_DEBUG_IO
-#define gdbstub_io(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
-#else
-#define gdbstub_io(FMT, ...) ({ 0; })
-#endif
-
-#ifdef CONFIG_GDBSTUB_DEBUG_BREAKPOINT
-#define gdbstub_bkpt(FMT, ...) gdbstub_printk(FMT, ##__VA_ARGS__)
-#else
-#define gdbstub_bkpt(FMT, ...) ({ 0; })
-#endif
-
-#endif /* !__ASSEMBLY__ */
-#endif /* _ASM_GDB_STUB_H */
diff --git a/include/asm-mn10300/hardirq.h b/include/asm-mn10300/hardirq.h
deleted file mode 100644 (file)
index 54d9501..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* MN10300 Hardware IRQ statistics and management
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Modified by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_HARDIRQ_H
-#define _ASM_HARDIRQ_H
-
-#include <linux/threads.h>
-#include <linux/irq.h>
-#include <asm/exceptions.h>
-
-/* assembly code in softirq.h is sensitive to the offsets of these fields */
-typedef struct {
-       unsigned int    __softirq_pending;
-       unsigned long   idle_timestamp;
-       unsigned int    __nmi_count;    /* arch dependent */
-       unsigned int    __irq_count;    /* arch dependent */
-} ____cacheline_aligned irq_cpustat_t;
-
-#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
-
-extern void ack_bad_irq(int irq);
-
-/*
- * manipulate stubs in the MN10300 CPU Trap/Interrupt Vector table
- * - these should jump to __common_exception in entry.S unless there's a good
- *   reason to do otherwise (see trap_preinit() in traps.c)
- */
-typedef void (*intr_stub_fnx)(struct pt_regs *regs,
-                             enum exception_code intcode);
-
-/*
- * manipulate pointers in the Exception table (see entry.S)
- * - these are indexed by decoding the lower 24 bits of the TBR register
- * - note that the MN103E010 doesn't always trap through the correct vector,
- *   but does always set the TBR correctly
- */
-extern asmlinkage void set_excp_vector(enum exception_code code,
-                                      intr_stub_fnx handler);
-
-#endif /* _ASM_HARDIRQ_H */
diff --git a/include/asm-mn10300/highmem.h b/include/asm-mn10300/highmem.h
deleted file mode 100644 (file)
index 90f2abb..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/* MN10300 Virtual kernel memory mappings for high memory
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * - Derived from include/asm-i386/highmem.h
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_HIGHMEM_H
-#define _ASM_HIGHMEM_H
-
-#ifdef __KERNEL__
-
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/highmem.h>
-#include <asm/kmap_types.h>
-#include <asm/pgtable.h>
-
-/* undef for production */
-#undef HIGHMEM_DEBUG
-
-/* declarations for highmem.c */
-extern unsigned long highstart_pfn, highend_pfn;
-
-extern pte_t *kmap_pte;
-extern pgprot_t kmap_prot;
-extern pte_t *pkmap_page_table;
-
-extern void __init kmap_init(void);
-
-/*
- * Right now we initialize only a single pte table. It can be extended
- * easily, subsequent pte tables have to be allocated in one physical
- * chunk of RAM.
- */
-#define PKMAP_BASE     0xfe000000UL
-#define LAST_PKMAP     1024
-#define LAST_PKMAP_MASK (LAST_PKMAP - 1)
-#define PKMAP_NR(virt)  ((virt - PKMAP_BASE) >> PAGE_SHIFT)
-#define PKMAP_ADDR(nr)  (PKMAP_BASE + ((nr) << PAGE_SHIFT))
-
-extern unsigned long kmap_high(struct page *page);
-extern void kunmap_high(struct page *page);
-
-static inline unsigned long kmap(struct page *page)
-{
-       if (in_interrupt())
-               BUG();
-       if (page < highmem_start_page)
-               return page_address(page);
-       return kmap_high(page);
-}
-
-static inline void kunmap(struct page *page)
-{
-       if (in_interrupt())
-               BUG();
-       if (page < highmem_start_page)
-               return;
-       kunmap_high(page);
-}
-
-/*
- * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap
- * gives a more generic (and caching) interface. But kmap_atomic can
- * be used in IRQ contexts, so in some (very limited) cases we need
- * it.
- */
-static inline unsigned long kmap_atomic(struct page *page, enum km_type type)
-{
-       enum fixed_addresses idx;
-       unsigned long vaddr;
-
-       if (page < highmem_start_page)
-               return page_address(page);
-
-       debug_kmap_atomic(type);
-       idx = type + KM_TYPE_NR * smp_processor_id();
-       vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-#if HIGHMEM_DEBUG
-       if (!pte_none(*(kmap_pte - idx)))
-               BUG();
-#endif
-       set_pte(kmap_pte - idx, mk_pte(page, kmap_prot));
-       __flush_tlb_one(vaddr);
-
-       return vaddr;
-}
-
-static inline void kunmap_atomic(unsigned long vaddr, enum km_type type)
-{
-#if HIGHMEM_DEBUG
-       enum fixed_addresses idx = type + KM_TYPE_NR * smp_processor_id();
-
-       if (vaddr < FIXADDR_START) /* FIXME */
-               return;
-
-       if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx))
-               BUG();
-
-       /*
-        * force other mappings to Oops if they'll try to access
-        * this pte without first remap it
-        */
-       pte_clear(kmap_pte - idx);
-       __flush_tlb_one(vaddr);
-#endif
-}
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_HIGHMEM_H */
diff --git a/include/asm-mn10300/hw_irq.h b/include/asm-mn10300/hw_irq.h
deleted file mode 100644 (file)
index 7061990..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* MN10300 Hardware interrupt definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_HW_IRQ_H
-#define _ASM_HW_IRQ_H
-
-#endif /* _ASM_HW_IRQ_H */
diff --git a/include/asm-mn10300/intctl-regs.h b/include/asm-mn10300/intctl-regs.h
deleted file mode 100644 (file)
index ba544c7..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/* MN10300 On-board interrupt controller registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_INTCTL_REGS_H
-#define _ASM_INTCTL_REGS_H
-
-#include <asm/cpu-regs.h>
-
-#ifdef __KERNEL__
-
-/* interrupt controller registers */
-#define GxICR(X)               __SYSREG(0xd4000000 + (X) * 4, u16)     /* group irq ctrl regs */
-
-#define IAGR                   __SYSREG(0xd4000100, u16)       /* intr acceptance group reg */
-#define IAGR_GN                        0x00fc          /* group number register
-                                                * (documentation _has_ to be wrong)
-                                                */
-
-#define EXTMD                  __SYSREG(0xd4000200, u16)       /* external pin intr spec reg */
-#define GET_XIRQ_TRIGGER(X) ((EXTMD >> ((X) * 2)) & 3)
-
-#define SET_XIRQ_TRIGGER(X,Y)                  \
-do {                                           \
-       u16 x = EXTMD;                          \
-       x &= ~(3 << ((X) * 2));                 \
-       x |= ((Y) & 3) << ((X) * 2);            \
-       EXTMD = x;                              \
-} while (0)
-
-#define XIRQ_TRIGGER_LOWLEVEL  0
-#define XIRQ_TRIGGER_HILEVEL   1
-#define XIRQ_TRIGGER_NEGEDGE   2
-#define XIRQ_TRIGGER_POSEDGE   3
-
-/* non-maskable interrupt control */
-#define NMIIRQ                 0
-#define NMICR                  GxICR(NMIIRQ)   /* NMI control register */
-#define NMICR_NMIF             0x0001          /* NMI pin interrupt flag */
-#define NMICR_WDIF             0x0002          /* watchdog timer overflow flag */
-#define NMICR_ABUSERR          0x0008          /* async bus error flag */
-
-/* maskable interrupt control */
-#define GxICR_DETECT           0x0001          /* interrupt detect flag */
-#define GxICR_REQUEST          0x0010          /* interrupt request flag */
-#define GxICR_ENABLE           0x0100          /* interrupt enable flag */
-#define GxICR_LEVEL            0x7000          /* interrupt priority level */
-#define GxICR_LEVEL_0          0x0000          /* - level 0 */
-#define GxICR_LEVEL_1          0x1000          /* - level 1 */
-#define GxICR_LEVEL_2          0x2000          /* - level 2 */
-#define GxICR_LEVEL_3          0x3000          /* - level 3 */
-#define GxICR_LEVEL_4          0x4000          /* - level 4 */
-#define GxICR_LEVEL_5          0x5000          /* - level 5 */
-#define GxICR_LEVEL_6          0x6000          /* - level 6 */
-#define GxICR_LEVEL_SHIFT      12
-
-#ifndef __ASSEMBLY__
-extern void set_intr_level(int irq, u16 level);
-extern void set_intr_postackable(int irq);
-#endif
-
-/* external interrupts */
-#define XIRQxICR(X)            GxICR((X))      /* external interrupt control regs */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_INTCTL_REGS_H */
diff --git a/include/asm-mn10300/io.h b/include/asm-mn10300/io.h
deleted file mode 100644 (file)
index c1a4119..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/* MN10300 I/O port emulation and memory-mapped I/O
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_IO_H
-#define _ASM_IO_H
-
-#include <asm/page.h> /* I/O is all done through memory accesses */
-#include <asm/cpu-regs.h>
-#include <asm/cacheflush.h>
-
-#define mmiowb() do {} while (0)
-
-/*****************************************************************************/
-/*
- * readX/writeX() are used to access memory mapped devices. On some
- * architectures the memory mapped IO stuff needs to be accessed
- * differently. On the x86 architecture, we just read/write the
- * memory location directly.
- */
-static inline u8 readb(const volatile void __iomem *addr)
-{
-       return *(const volatile u8 *) addr;
-}
-
-static inline u16 readw(const volatile void __iomem *addr)
-{
-       return *(const volatile u16 *) addr;
-}
-
-static inline u32 readl(const volatile void __iomem *addr)
-{
-       return *(const volatile u32 *) addr;
-}
-
-#define __raw_readb readb
-#define __raw_readw readw
-#define __raw_readl readl
-
-#define readb_relaxed readb
-#define readw_relaxed readw
-#define readl_relaxed readl
-
-static inline void writeb(u8 b, volatile void __iomem *addr)
-{
-       *(volatile u8 *) addr = b;
-}
-
-static inline void writew(u16 b, volatile void __iomem *addr)
-{
-       *(volatile u16 *) addr = b;
-}
-
-static inline void writel(u32 b, volatile void __iomem *addr)
-{
-       *(volatile u32 *) addr = b;
-}
-
-#define __raw_writeb writeb
-#define __raw_writew writew
-#define __raw_writel writel
-
-/*****************************************************************************/
-/*
- * traditional input/output functions
- */
-static inline u8 inb_local(unsigned long addr)
-{
-       return readb((volatile void __iomem *) addr);
-}
-
-static inline void outb_local(u8 b, unsigned long addr)
-{
-       return writeb(b, (volatile void __iomem *) addr);
-}
-
-static inline u8 inb(unsigned long addr)
-{
-       return readb((volatile void __iomem *) addr);
-}
-
-static inline u16 inw(unsigned long addr)
-{
-       return readw((volatile void __iomem *) addr);
-}
-
-static inline u32 inl(unsigned long addr)
-{
-       return readl((volatile void __iomem *) addr);
-}
-
-static inline void outb(u8 b, unsigned long addr)
-{
-       return writeb(b, (volatile void __iomem *) addr);
-}
-
-static inline void outw(u16 b, unsigned long addr)
-{
-       return writew(b, (volatile void __iomem *) addr);
-}
-
-static inline void outl(u32 b, unsigned long addr)
-{
-       return writel(b, (volatile void __iomem *) addr);
-}
-
-#define inb_p(addr)    inb(addr)
-#define inw_p(addr)    inw(addr)
-#define inl_p(addr)    inl(addr)
-#define outb_p(x, addr)        outb((x), (addr))
-#define outw_p(x, addr)        outw((x), (addr))
-#define outl_p(x, addr)        outl((x), (addr))
-
-static inline void insb(unsigned long addr, void *buffer, int count)
-{
-       if (count) {
-               u8 *buf = buffer;
-               do {
-                       u8 x = inb(addr);
-                       *buf++ = x;
-               } while (--count);
-       }
-}
-
-static inline void insw(unsigned long addr, void *buffer, int count)
-{
-       if (count) {
-               u16 *buf = buffer;
-               do {
-                       u16 x = inw(addr);
-                       *buf++ = x;
-               } while (--count);
-       }
-}
-
-static inline void insl(unsigned long addr, void *buffer, int count)
-{
-       if (count) {
-               u32 *buf = buffer;
-               do {
-                       u32 x = inl(addr);
-                       *buf++ = x;
-               } while (--count);
-       }
-}
-
-static inline void outsb(unsigned long addr, const void *buffer, int count)
-{
-       if (count) {
-               const u8 *buf = buffer;
-               do {
-                       outb(*buf++, addr);
-               } while (--count);
-       }
-}
-
-static inline void outsw(unsigned long addr, const void *buffer, int count)
-{
-       if (count) {
-               const u16 *buf = buffer;
-               do {
-                       outw(*buf++, addr);
-               } while (--count);
-       }
-}
-
-extern void __outsl(unsigned long addr, const void *buffer, int count);
-static inline void outsl(unsigned long addr, const void *buffer, int count)
-{
-       if ((unsigned long) buffer & 0x3)
-               return __outsl(addr, buffer, count);
-
-       if (count) {
-               const u32 *buf = buffer;
-               do {
-                       outl(*buf++, addr);
-               } while (--count);
-       }
-}
-
-#define ioread8(addr)          readb(addr)
-#define ioread16(addr)         readw(addr)
-#define ioread32(addr)         readl(addr)
-
-#define iowrite8(v, addr)      writeb((v), (addr))
-#define iowrite16(v, addr)     writew((v), (addr))
-#define iowrite32(v, addr)     writel((v), (addr))
-
-#define ioread8_rep(p, dst, count) \
-       insb((unsigned long) (p), (dst), (count))
-#define ioread16_rep(p, dst, count) \
-       insw((unsigned long) (p), (dst), (count))
-#define ioread32_rep(p, dst, count) \
-       insl((unsigned long) (p), (dst), (count))
-
-#define iowrite8_rep(p, src, count) \
-       outsb((unsigned long) (p), (src), (count))
-#define iowrite16_rep(p, src, count) \
-       outsw((unsigned long) (p), (src), (count))
-#define iowrite32_rep(p, src, count) \
-       outsl((unsigned long) (p), (src), (count))
-
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#ifdef __KERNEL__
-
-#include <linux/vmalloc.h>
-#define __io_virt(x) ((void *) (x))
-
-/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
-struct pci_dev;
-extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
-static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
-{
-}
-
-/*
- * Change virtual addresses to physical addresses and vv.
- * These are pretty trivial
- */
-static inline unsigned long virt_to_phys(volatile void *address)
-{
-       return __pa(address);
-}
-
-static inline void *phys_to_virt(unsigned long address)
-{
-       return __va(address);
-}
-
-/*
- * Change "struct page" to physical address.
- */
-static inline void *__ioremap(unsigned long offset, unsigned long size,
-                             unsigned long flags)
-{
-       return (void *) offset;
-}
-
-static inline void *ioremap(unsigned long offset, unsigned long size)
-{
-       return (void *) offset;
-}
-
-/*
- * This one maps high address device memory and turns off caching for that
- * area.  it's useful if some control registers are in such an area and write
- * combining or read caching is not desirable:
- */
-static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
-{
-       return (void *) (offset | 0x20000000);
-}
-
-#define ioremap_wc ioremap_nocache
-
-static inline void iounmap(void *addr)
-{
-}
-
-static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
-{
-       return (void __iomem *) port;
-}
-
-static inline void ioport_unmap(void __iomem *p)
-{
-}
-
-#define xlate_dev_kmem_ptr(p)  ((void *) (p))
-#define xlate_dev_mem_ptr(p)   ((void *) (p))
-
-/*
- * PCI bus iomem addresses must be in the region 0x80000000-0x9fffffff
- */
-static inline unsigned long virt_to_bus(volatile void *address)
-{
-       return ((unsigned long) address) & ~0x20000000;
-}
-
-static inline void *bus_to_virt(unsigned long address)
-{
-       return (void *) address;
-}
-
-#define page_to_bus page_to_phys
-
-#define memset_io(a, b, c)     memset(__io_virt(a), (b), (c))
-#define memcpy_fromio(a, b, c) memcpy((a), __io_virt(b), (c))
-#define memcpy_toio(a, b, c)   memcpy(__io_virt(a), (b), (c))
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_IO_H */
diff --git a/include/asm-mn10300/ioctl.h b/include/asm-mn10300/ioctl.h
deleted file mode 100644 (file)
index b279fe0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ioctl.h>
diff --git a/include/asm-mn10300/ioctls.h b/include/asm-mn10300/ioctls.h
deleted file mode 100644 (file)
index dcbfb45..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef _ASM_IOCTLS_H
-#define _ASM_IOCTLS_H
-
-#include <asm/ioctl.h>
-
-/* 0x54 is just a magic number to make these relatively unique ('T') */
-
-#define TCGETS         0x5401
-#define TCSETS         0x5402
-#define TCSETSW                0x5403
-#define TCSETSF                0x5404
-#define TCGETA         0x5405
-#define TCSETA         0x5406
-#define TCSETAW                0x5407
-#define TCSETAF                0x5408
-#define TCSBRK         0x5409
-#define TCXONC         0x540A
-#define TCFLSH         0x540B
-#define TIOCEXCL       0x540C
-#define TIOCNXCL       0x540D
-#define TIOCSCTTY      0x540E
-#define TIOCGPGRP      0x540F
-#define TIOCSPGRP      0x5410
-#define TIOCOUTQ       0x5411
-#define TIOCSTI                0x5412
-#define TIOCGWINSZ     0x5413
-#define TIOCSWINSZ     0x5414
-#define TIOCMGET       0x5415
-#define TIOCMBIS       0x5416
-#define TIOCMBIC       0x5417
-#define TIOCMSET       0x5418
-#define TIOCGSOFTCAR   0x5419
-#define TIOCSSOFTCAR   0x541A
-#define FIONREAD       0x541B
-#define TIOCINQ                FIONREAD
-#define TIOCLINUX      0x541C
-#define TIOCCONS       0x541D
-#define TIOCGSERIAL    0x541E
-#define TIOCSSERIAL    0x541F
-#define TIOCPKT                0x5420
-#define FIONBIO                0x5421
-#define TIOCNOTTY      0x5422
-#define TIOCSETD       0x5423
-#define TIOCGETD       0x5424
-#define TCSBRKP                0x5425  /* Needed for POSIX tcsendbreak() */
-/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
-#define TIOCSBRK       0x5427  /* BSD compatibility */
-#define TIOCCBRK       0x5428  /* BSD compatibility */
-#define TIOCGSID       0x5429  /* Return the session ID of FD */
-#define TCGETS2                _IOR('T', 0x2A, struct termios2)
-#define TCSETS2                _IOW('T', 0x2B, struct termios2)
-#define TCSETSW2       _IOW('T', 0x2C, struct termios2)
-#define TCSETSF2       _IOW('T', 0x2D, struct termios2)
-#define TIOCGPTN       _IOR('T', 0x30, unsigned int) /* Get Pty Number
-                                                      * (of pty-mux device) */
-#define TIOCSPTLCK     _IOW('T', 0x31, int)  /* Lock/unlock Pty */
-
-#define FIONCLEX       0x5450
-#define FIOCLEX                0x5451
-#define FIOASYNC       0x5452
-#define TIOCSERCONFIG  0x5453
-#define TIOCSERGWILD   0x5454
-#define TIOCSERSWILD   0x5455
-#define TIOCGLCKTRMIOS 0x5456
-#define TIOCSLCKTRMIOS 0x5457
-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
-#define TIOCSERGETLSR   0x5459 /* Get line status register */
-#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
-
-#define TIOCMIWAIT     0x545C  /* wait for a change on serial input line(s) */
-#define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
-#define TIOCGHAYESESP   0x545E  /* Get Hayes ESP configuration */
-#define TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
-#define FIOQSIZE       0x5460
-
-/* Used for packet mode */
-#define TIOCPKT_DATA            0
-#define TIOCPKT_FLUSHREAD       1
-#define TIOCPKT_FLUSHWRITE      2
-#define TIOCPKT_STOP            4
-#define TIOCPKT_START           8
-#define TIOCPKT_NOSTOP         16
-#define TIOCPKT_DOSTOP         32
-
-#define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
-
-#endif /* _ASM_IOCTLS_H */
diff --git a/include/asm-mn10300/ipc.h b/include/asm-mn10300/ipc.h
deleted file mode 100644 (file)
index a46e3d9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ipc.h>
diff --git a/include/asm-mn10300/ipcbuf.h b/include/asm-mn10300/ipcbuf.h
deleted file mode 100644 (file)
index f6f63d4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _ASM_IPCBUF_H
-#define _ASM_IPCBUF_H
-
-/*
- * The ipc64_perm structure for MN10300 architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 32-bit mode_t and seq
- * - 2 miscellaneous 32-bit values
- */
-
-struct ipc64_perm
-{
-       __kernel_key_t          key;
-       __kernel_uid32_t        uid;
-       __kernel_gid32_t        gid;
-       __kernel_uid32_t        cuid;
-       __kernel_gid32_t        cgid;
-       __kernel_mode_t         mode;
-       unsigned short          __pad1;
-       unsigned short          seq;
-       unsigned short          __pad2;
-       unsigned long           __unused1;
-       unsigned long           __unused2;
-};
-
-#endif /* _ASM_IPCBUF_H */
diff --git a/include/asm-mn10300/irq.h b/include/asm-mn10300/irq.h
deleted file mode 100644 (file)
index 53b3801..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* MN10300 Hardware interrupt definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Modified by David Howells (dhowells@redhat.com)
- * - Derived from include/asm-i386/irq.h:
- *   - (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_IRQ_H
-#define _ASM_IRQ_H
-
-#include <asm/intctl-regs.h>
-#include <asm/reset-regs.h>
-#include <asm/proc/irq.h>
-
-/* this number is used when no interrupt has been assigned */
-#define NO_IRQ         INT_MAX
-
-/* hardware irq numbers */
-#define NR_IRQS                GxICR_NUM_IRQS
-
-/* external hardware irq numbers */
-#define NR_XIRQS       GxICR_NUM_XIRQS
-
-#define irq_canonicalize(IRQ) (IRQ)
-
-#endif /* _ASM_IRQ_H */
diff --git a/include/asm-mn10300/irq_regs.h b/include/asm-mn10300/irq_regs.h
deleted file mode 100644 (file)
index a848cd2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* MN10300 IRQ registers pointer definition
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_IRQ_REGS_H
-#define _ASM_IRQ_REGS_H
-
-/*
- * Per-cpu current frame pointer - the location of the last exception frame on
- * the stack
- */
-#define ARCH_HAS_OWN_IRQ_REGS
-
-#ifndef __ASSEMBLY__
-#define get_irq_regs() (__frame)
-#endif
-
-#endif /* _ASM_IRQ_REGS_H */
diff --git a/include/asm-mn10300/kdebug.h b/include/asm-mn10300/kdebug.h
deleted file mode 100644 (file)
index 0f47e11..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* MN10300 In-kernel death knells
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_KDEBUG_H
-#define _ASM_KDEBUG_H
-
-/* Grossly misnamed. */
-enum die_val {
-       DIE_OOPS = 1,
-       DIE_BREAKPOINT,
-       DIE_GPF,
-};
-
-#endif /* _ASM_KDEBUG_H */
diff --git a/include/asm-mn10300/kmap_types.h b/include/asm-mn10300/kmap_types.h
deleted file mode 100644 (file)
index 3398f9f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* MN10300 kmap_atomic() slot IDs
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_KMAP_TYPES_H
-#define _ASM_KMAP_TYPES_H
-
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
-
-#endif /* _ASM_KMAP_TYPES_H */
diff --git a/include/asm-mn10300/kprobes.h b/include/asm-mn10300/kprobes.h
deleted file mode 100644 (file)
index c800b59..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* MN10300 Kernel Probes support
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by Mark Salter (msalter@redhat.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public Licence as published by
- * the Free Software Foundation; either version 2 of the Licence, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public Licence for more details.
- *
- * You should have received a copy of the GNU General Public Licence
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- */
-#ifndef _ASM_KPROBES_H
-#define _ASM_KPROBES_H
-
-#include <linux/types.h>
-#include <linux/ptrace.h>
-
-struct kprobe;
-
-typedef unsigned char kprobe_opcode_t;
-#define BREAKPOINT_INSTRUCTION 0xff
-#define MAX_INSN_SIZE 8
-#define MAX_STACK_SIZE 128
-
-/* Architecture specific copy of original instruction */
-struct arch_specific_insn {
-       /*  copy of original instruction
-        */
-       kprobe_opcode_t insn[MAX_INSN_SIZE];
-};
-
-extern const int kretprobe_blacklist_size;
-
-extern int kprobe_exceptions_notify(struct notifier_block *self,
-                                   unsigned long val, void *data);
-
-#define flush_insn_slot(p)  do {} while (0)
-
-extern void arch_remove_kprobe(struct kprobe *p);
-
-#endif /* _ASM_KPROBES_H */
diff --git a/include/asm-mn10300/linkage.h b/include/asm-mn10300/linkage.h
deleted file mode 100644 (file)
index dda3002..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* MN10300 Linkage and calling-convention overrides
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_LINKAGE_H
-#define _ASM_LINKAGE_H
-
-/* don't override anything */
-#define asmlinkage
-
-#define __ALIGN                .align 4,0xcb
-#define __ALIGN_STR    ".align 4,0xcb"
-
-#endif
diff --git a/include/asm-mn10300/local.h b/include/asm-mn10300/local.h
deleted file mode 100644 (file)
index c11c530..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/local.h>
diff --git a/include/asm-mn10300/mc146818rtc.h b/include/asm-mn10300/mc146818rtc.h
deleted file mode 100644 (file)
index df6bc6e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm/rtc-regs.h>
diff --git a/include/asm-mn10300/mman.h b/include/asm-mn10300/mman.h
deleted file mode 100644 (file)
index b7986b6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* MN10300 Constants for mmap and co.
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * - Derived from asm-x86/mman.h
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_MMAN_H
-#define _ASM_MMAN_H
-
-#include <asm-generic/mman.h>
-
-#define MAP_GROWSDOWN  0x0100          /* stack-like segment */
-#define MAP_DENYWRITE  0x0800          /* ETXTBSY */
-#define MAP_EXECUTABLE 0x1000          /* mark it as an executable */
-#define MAP_LOCKED     0x2000          /* pages are locked */
-#define MAP_NORESERVE  0x4000          /* don't check for reservations */
-#define MAP_POPULATE   0x8000          /* populate (prefault) pagetables */
-#define MAP_NONBLOCK   0x10000         /* do not block on IO */
-
-#define MCL_CURRENT    1               /* lock all current mappings */
-#define MCL_FUTURE     2               /* lock all future mappings */
-
-#endif /* _ASM_MMAN_H */
diff --git a/include/asm-mn10300/mmu.h b/include/asm-mn10300/mmu.h
deleted file mode 100644 (file)
index 2d2d097..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* MN10300 Memory management context
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- * - Derived from include/asm-frv/mmu.h
- */
-
-#ifndef _ASM_MMU_H
-#define _ASM_MMU_H
-
-/*
- * MMU context
- */
-typedef struct {
-       unsigned long   tlbpid[NR_CPUS];        /* TLB PID for this process on
-                                                * each CPU */
-} mm_context_t;
-
-#endif /* _ASM_MMU_H */
diff --git a/include/asm-mn10300/mmu_context.h b/include/asm-mn10300/mmu_context.h
deleted file mode 100644 (file)
index a9e2e34..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/* MN10300 MMU context management
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Modified by David Howells (dhowells@redhat.com)
- * - Derived from include/asm-m32r/mmu_context.h
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- *
- *
- * This implements an algorithm to provide TLB PID mappings to provide
- * selective access to the TLB for processes, thus reducing the number of TLB
- * flushes required.
- *
- * Note, however, that the M32R algorithm is technically broken as it does not
- * handle version wrap-around, and could, theoretically, have a problem with a
- * very long lived program that sleeps long enough for the version number to
- * wrap all the way around so that its TLB mappings appear valid once again.
- */
-#ifndef _ASM_MMU_CONTEXT_H
-#define _ASM_MMU_CONTEXT_H
-
-#include <asm/atomic.h>
-#include <asm/pgalloc.h>
-#include <asm/tlbflush.h>
-#include <asm-generic/mm_hooks.h>
-
-#define MMU_CONTEXT_TLBPID_MASK                0x000000ffUL
-#define MMU_CONTEXT_VERSION_MASK       0xffffff00UL
-#define MMU_CONTEXT_FIRST_VERSION      0x00000100UL
-#define MMU_NO_CONTEXT                 0x00000000UL
-
-extern unsigned long mmu_context_cache[NR_CPUS];
-#define mm_context(mm) (mm->context.tlbpid[smp_processor_id()])
-
-#define enter_lazy_tlb(mm, tsk)        do {} while (0)
-
-#ifdef CONFIG_SMP
-#define cpu_ran_vm(cpu, task) \
-       cpu_set((cpu), (task)->cpu_vm_mask)
-#define cpu_maybe_ran_vm(cpu, task) \
-       cpu_test_and_set((cpu), (task)->cpu_vm_mask)
-#else
-#define cpu_ran_vm(cpu, task)          do {} while (0)
-#define cpu_maybe_ran_vm(cpu, task)    true
-#endif /* CONFIG_SMP */
-
-/*
- * allocate an MMU context
- */
-static inline unsigned long allocate_mmu_context(struct mm_struct *mm)
-{
-       unsigned long *pmc = &mmu_context_cache[smp_processor_id()];
-       unsigned long mc = ++(*pmc);
-
-       if (!(mc & MMU_CONTEXT_TLBPID_MASK)) {
-               /* we exhausted the TLB PIDs of this version on this CPU, so we
-                * flush this CPU's TLB in its entirety and start new cycle */
-               flush_tlb_all();
-
-               /* fix the TLB version if needed (we avoid version #0 so as to
-                * distingush MMU_NO_CONTEXT) */
-               if (!mc)
-                       *pmc = mc = MMU_CONTEXT_FIRST_VERSION;
-       }
-       mm_context(mm) = mc;
-       return mc;
-}
-
-/*
- * get an MMU context if one is needed
- */
-static inline unsigned long get_mmu_context(struct mm_struct *mm)
-{
-       unsigned long mc = MMU_NO_CONTEXT, cache;
-
-       if (mm) {
-               cache = mmu_context_cache[smp_processor_id()];
-               mc = mm_context(mm);
-
-               /* if we have an old version of the context, replace it */
-               if ((mc ^ cache) & MMU_CONTEXT_VERSION_MASK)
-                       mc = allocate_mmu_context(mm);
-       }
-       return mc;
-}
-
-/*
- * initialise the context related info for a new mm_struct instance
- */
-static inline int init_new_context(struct task_struct *tsk,
-                                  struct mm_struct *mm)
-{
-       int num_cpus = NR_CPUS, i;
-
-       for (i = 0; i < num_cpus; i++)
-               mm->context.tlbpid[i] = MMU_NO_CONTEXT;
-       return 0;
-}
-
-/*
- * destroy context related info for an mm_struct that is about to be put to
- * rest
- */
-#define destroy_context(mm)    do { } while (0)
-
-/*
- * after we have set current->mm to a new value, this activates the context for
- * the new mm so we see the new mappings.
- */
-static inline void activate_context(struct mm_struct *mm, int cpu)
-{
-       PIDR = get_mmu_context(mm) & MMU_CONTEXT_TLBPID_MASK;
-}
-
-/*
- * change between virtual memory sets
- */
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-                            struct task_struct *tsk)
-{
-       int cpu = smp_processor_id();
-
-       if (prev != next) {
-               cpu_ran_vm(cpu, next);
-               activate_context(next, cpu);
-               PTBR = (unsigned long) next->pgd;
-       } else if (!cpu_maybe_ran_vm(cpu, next)) {
-               activate_context(next, cpu);
-       }
-}
-
-#define deactivate_mm(tsk, mm) do {} while (0)
-#define activate_mm(prev, next)        switch_mm((prev), (next), NULL)
-
-#endif /* _ASM_MMU_CONTEXT_H */
diff --git a/include/asm-mn10300/module.h b/include/asm-mn10300/module.h
deleted file mode 100644 (file)
index 5d7057d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* MN10300 Arch-specific module definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by Mark Salter (msalter@redhat.com)
- * Derived from include/asm-i386/module.h
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_MODULE_H
-#define _ASM_MODULE_H
-
-struct mod_arch_specific {
-};
-
-#define Elf_Shdr       Elf32_Shdr
-#define Elf_Sym                Elf32_Sym
-#define Elf_Ehdr       Elf32_Ehdr
-
-/*
- * Include the MN10300 architecture version.
- */
-#define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " "
-
-#endif /* _ASM_MODULE_H */
diff --git a/include/asm-mn10300/msgbuf.h b/include/asm-mn10300/msgbuf.h
deleted file mode 100644 (file)
index 8b60245..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _ASM_MSGBUF_H
-#define _ASM_MSGBUF_H
-
-/*
- * The msqid64_ds structure for MN10300 architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct msqid64_ds {
-       struct ipc64_perm       msg_perm;
-       __kernel_time_t         msg_stime;      /* last msgsnd time */
-       unsigned long           __unused1;
-       __kernel_time_t         msg_rtime;      /* last msgrcv time */
-       unsigned long           __unused2;
-       __kernel_time_t         msg_ctime;      /* last change time */
-       unsigned long           __unused3;
-       unsigned long           msg_cbytes;     /* current number of bytes on queue */
-       unsigned long           msg_qnum;       /* number of messages in queue */
-       unsigned long           msg_qbytes;     /* max number of bytes on queue */
-       __kernel_pid_t          msg_lspid;      /* pid of last msgsnd */
-       __kernel_pid_t          msg_lrpid;      /* last receive pid */
-       unsigned long           __unused4;
-       unsigned long           __unused5;
-};
-
-#endif /* _ASM_MSGBUF_H */
diff --git a/include/asm-mn10300/mutex.h b/include/asm-mn10300/mutex.h
deleted file mode 100644 (file)
index 84f5490..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* MN10300 Mutex fastpath
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- *
- *
- * TODO: implement optimized primitives instead, or leave the generic
- * implementation in place, or pick the atomic_xchg() based generic
- * implementation. (see asm-generic/mutex-xchg.h for details)
- */
-#include <asm-generic/mutex-null.h>
diff --git a/include/asm-mn10300/nmi.h b/include/asm-mn10300/nmi.h
deleted file mode 100644 (file)
index f3671cb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* MN10300 NMI handling
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_NMI_H
-#define _ASM_NMI_H
-
-#endif /* _ASM_NMI_H */
diff --git a/include/asm-mn10300/page.h b/include/asm-mn10300/page.h
deleted file mode 100644 (file)
index 8288e12..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/* MN10300 Page table definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PAGE_H
-#define _ASM_PAGE_H
-
-/* PAGE_SHIFT determines the page size */
-#define PAGE_SHIFT     12
-
-#ifndef __ASSEMBLY__
-#define PAGE_SIZE      (1UL << PAGE_SHIFT)
-#define PAGE_MASK      (~(PAGE_SIZE - 1))
-#else
-#define PAGE_SIZE      +(1 << PAGE_SHIFT)      /* unary plus marks an
-                                                * immediate val not an addr */
-#define PAGE_MASK      +(~(PAGE_SIZE - 1))
-#endif
-
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
-#define clear_page(page)       memset((void *)(page), 0, PAGE_SIZE)
-#define copy_page(to, from)    memcpy((void *)(to), (void *)(from), PAGE_SIZE)
-
-#define clear_user_page(addr, vaddr, page)     clear_page(addr)
-#define copy_user_page(vto, vfrom, vaddr, to)  copy_page(vto, vfrom)
-
-/*
- * These are used to make use of C type-checking..
- */
-typedef struct { unsigned long pte; } pte_t;
-typedef struct { unsigned long pgd; } pgd_t;
-typedef struct { unsigned long pgprot; } pgprot_t;
-typedef struct page *pgtable_t;
-
-#define PTE_MASK       PAGE_MASK
-#define HPAGE_SHIFT    22
-
-#ifdef CONFIG_HUGETLB_PAGE
-#define HPAGE_SIZE             ((1UL) << HPAGE_SHIFT)
-#define HPAGE_MASK             (~(HPAGE_SIZE - 1))
-#define HUGETLB_PAGE_ORDER     (HPAGE_SHIFT - PAGE_SHIFT)
-#endif
-
-#define pte_val(x)     ((x).pte)
-#define pgd_val(x)     ((x).pgd)
-#define pgprot_val(x)  ((x).pgprot)
-
-#define __pte(x)       ((pte_t) { (x) })
-#define __pgd(x)       ((pgd_t) { (x) })
-#define __pgprot(x)    ((pgprot_t) { (x) })
-
-#include <asm-generic/pgtable-nopmd.h>
-
-#endif /* !__ASSEMBLY__ */
-
-/*
- * This handles the memory map.. We could make this a config
- * option, but too many people screw it up, and too few need
- * it.
- *
- * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
- * a virtual address space of one gigabyte, which limits the
- * amount of physical memory you can use to about 950MB.
- */
-
-#ifndef __ASSEMBLY__
-
-/* Pure 2^n version of get_order */
-static inline int get_order(unsigned long size) __attribute__((const));
-static inline int get_order(unsigned long size)
-{
-       int order;
-
-       size = (size - 1) >> (PAGE_SHIFT - 1);
-       order = -1;
-       do {
-               size >>= 1;
-               order++;
-       } while (size);
-       return order;
-}
-
-#endif /* __ASSEMBLY__ */
-
-#include <asm/page_offset.h>
-
-#define __PAGE_OFFSET          (PAGE_OFFSET_RAW)
-#define PAGE_OFFSET            ((unsigned long) __PAGE_OFFSET)
-
-/*
- * main RAM and kernel working space are coincident at 0x90000000, but to make
- * life more interesting, there's also an uncached virtual shadow at 0xb0000000
- * - these mappings are fixed in the MMU
- */
-#define __pfn_disp             (CONFIG_KERNEL_RAM_BASE_ADDRESS >> PAGE_SHIFT)
-
-#define __pa(x)                        ((unsigned long)(x))
-#define __va(x)                        ((void *)(unsigned long)(x))
-#define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)
-#define pfn_to_page(pfn)       (mem_map + ((pfn) - __pfn_disp))
-#define page_to_pfn(page)      ((unsigned long)((page) - mem_map) + __pfn_disp)
-
-#define pfn_valid(pfn)                                 \
-({                                                     \
-       unsigned long __pfn = (pfn) - __pfn_disp;       \
-       __pfn < max_mapnr;                              \
-})
-
-#define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
-#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
-#define page_to_phys(page)     (page_to_pfn(page) << PAGE_SHIFT)
-
-#define VM_DATA_DEFAULT_FLAGS \
-       (VM_READ | VM_WRITE | \
-       ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
-                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_PAGE_H */
diff --git a/include/asm-mn10300/page_offset.h b/include/asm-mn10300/page_offset.h
deleted file mode 100644 (file)
index 8eb5b16..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* MN10300 Kernel base address
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- */
-#ifndef _ASM_PAGE_OFFSET_H
-#define _ASM_PAGE_OFFSET_H
-
-#define PAGE_OFFSET_RAW CONFIG_KERNEL_RAM_BASE_ADDRESS
-
-#endif
diff --git a/include/asm-mn10300/param.h b/include/asm-mn10300/param.h
deleted file mode 100644 (file)
index 789b1df..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* MN10300 Kernel parameters
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PARAM_H
-#define _ASM_PARAM_H
-
-#ifdef __KERNEL__
-#define HZ             CONFIG_HZ       /* Internal kernel timer frequency */
-#define USER_HZ                100             /* .. some user interfaces are in
-                                        * "ticks" */
-#define CLOCKS_PER_SEC (USER_HZ)       /* like times() */
-#endif
-
-#ifndef HZ
-#define HZ             100
-#endif
-
-#define EXEC_PAGESIZE  4096
-
-#ifndef NOGROUP
-#define NOGROUP                (-1)
-#endif
-
-#define MAXHOSTNAMELEN 64      /* max length of hostname */
-#define COMMAND_LINE_SIZE 256
-
-#endif /* _ASM_PARAM_H */
diff --git a/include/asm-mn10300/pci.h b/include/asm-mn10300/pci.h
deleted file mode 100644 (file)
index 0517b45..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/* MN10300 PCI definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PCI_H
-#define _ASM_PCI_H
-
-#ifdef __KERNEL__
-#include <linux/mm.h>          /* for struct page */
-
-#if 0
-#define __pcbdebug(FMT, ADDR, ...) \
-       printk(KERN_DEBUG "PCIBRIDGE[%08x]: "FMT"\n", \
-              (u32)(ADDR), ##__VA_ARGS__)
-
-#define __pcidebug(FMT, BUS, DEVFN, WHERE,...)         \
-do {                                                   \
-       printk(KERN_DEBUG "PCI[%02x:%02x.%x + %02x]: "FMT"\n",  \
-              (BUS)->number,                                   \
-              PCI_SLOT(DEVFN),                                 \
-              PCI_FUNC(DEVFN),                                 \
-              (u32)(WHERE), ##__VA_ARGS__);                    \
-} while (0)
-
-#else
-#define __pcbdebug(FMT, ADDR, ...)             do {} while (0)
-#define __pcidebug(FMT, BUS, DEVFN, WHERE, ...)        do {} while (0)
-#endif
-
-/* Can be used to override the logic in pci_scan_bus for skipping
- * already-configured bus numbers - to be used for buggy BIOSes or
- * architectures with incomplete PCI setup by the loader */
-
-#ifdef CONFIG_PCI
-#define pcibios_assign_all_busses()    1
-extern void unit_pci_init(void);
-#else
-#define pcibios_assign_all_busses()    0
-#endif
-
-extern unsigned long pci_mem_start;
-#define PCIBIOS_MIN_IO         0xBE000004
-#define PCIBIOS_MIN_MEM                0xB8000000
-
-void pcibios_set_master(struct pci_dev *dev);
-void pcibios_penalize_isa_irq(int irq);
-
-/* Dynamic DMA mapping stuff.
- * i386 has everything mapped statically.
- */
-
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <asm/scatterlist.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <asm/io.h>
-
-struct pci_dev;
-
-/* The PCI address space does equal the physical memory
- * address space.  The networking and block device layers use
- * this boolean for bounce buffer decisions.
- */
-#define PCI_DMA_BUS_IS_PHYS    (1)
-
-
-/* This is always fine. */
-#define pci_dac_dma_supported(pci_dev, mask)   (0)
-
-/* Return the index of the PCI controller for device. */
-static inline int pci_controller_num(struct pci_dev *dev)
-{
-       return 0;
-}
-
-#define HAVE_PCI_MMAP
-extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
-                              enum pci_mmap_state mmap_state,
-                              int write_combine);
-
-#endif /* __KERNEL__ */
-
-/* implement the pci_ DMA API in terms of the generic device dma_ one */
-#include <asm-generic/pci-dma-compat.h>
-
-/**
- * pcibios_resource_to_bus - convert resource to PCI bus address
- * @dev: device which owns this resource
- * @region: converted bus-centric region (start,end)
- * @res: resource to convert
- *
- * Convert a resource to a PCI device bus address or bus window.
- */
-extern void pcibios_resource_to_bus(struct pci_dev *dev,
-                                   struct pci_bus_region *region,
-                                   struct resource *res);
-
-extern void pcibios_bus_to_resource(struct pci_dev *dev,
-                                   struct resource *res,
-                                   struct pci_bus_region *region);
-
-static inline struct resource *
-pcibios_select_root(struct pci_dev *pdev, struct resource *res)
-{
-       struct resource *root = NULL;
-
-       if (res->flags & IORESOURCE_IO)
-               root = &ioport_resource;
-       if (res->flags & IORESOURCE_MEM)
-               root = &iomem_resource;
-
-       return root;
-}
-
-#define pcibios_scan_all_fns(a, b)     0
-
-static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
-{
-       return channel ? 15 : 14;
-}
-
-#endif /* _ASM_PCI_H */
diff --git a/include/asm-mn10300/percpu.h b/include/asm-mn10300/percpu.h
deleted file mode 100644 (file)
index 06a959d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/percpu.h>
diff --git a/include/asm-mn10300/pgalloc.h b/include/asm-mn10300/pgalloc.h
deleted file mode 100644 (file)
index ec057e1..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* MN10300 Page and page table/directory allocation
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PGALLOC_H
-#define _ASM_PGALLOC_H
-
-#include <asm/processor.h>
-#include <asm/page.h>
-#include <linux/threads.h>
-#include <linux/mm.h>          /* for struct page */
-
-struct mm_struct;
-struct page;
-
-/* attach a page table to a PMD entry */
-#define pmd_populate_kernel(mm, pmd, pte) \
-       set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE))
-
-static inline
-void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
-{
-       set_pmd(pmd, __pmd((page_to_pfn(pte) << PAGE_SHIFT) | _PAGE_TABLE));
-}
-#define pmd_pgtable(pmd) pmd_page(pmd)
-
-/*
- * Allocate and free page tables.
- */
-
-extern pgd_t *pgd_alloc(struct mm_struct *);
-extern void pgd_free(struct mm_struct *, pgd_t *);
-
-extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
-extern struct page *pte_alloc_one(struct mm_struct *, unsigned long);
-
-static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
-{
-       free_page((unsigned long) pte);
-}
-
-static inline void pte_free(struct mm_struct *mm, struct page *pte)
-{
-       __free_page(pte);
-}
-
-
-#define __pte_free_tlb(tlb, pte) tlb_remove_page((tlb), (pte))
-
-#endif /* _ASM_PGALLOC_H */
diff --git a/include/asm-mn10300/pgtable.h b/include/asm-mn10300/pgtable.h
deleted file mode 100644 (file)
index 6dc30fc..0000000
+++ /dev/null
@@ -1,492 +0,0 @@
-/* MN10300 Page table manipulators and constants
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- *
- *
- * The Linux memory management assumes a three-level page table setup. On
- * the i386, we use that, but "fold" the mid level into the top-level page
- * table, so that we physically have the same two-level page table as the
- * i386 mmu expects.
- *
- * This file contains the functions and defines necessary to modify and use
- * the i386 page table tree for the purposes of the MN10300 TLB handler
- * functions.
- */
-#ifndef _ASM_PGTABLE_H
-#define _ASM_PGTABLE_H
-
-#include <asm/cpu-regs.h>
-
-#ifndef __ASSEMBLY__
-#include <asm/processor.h>
-#include <asm/cache.h>
-#include <linux/threads.h>
-
-#include <asm/bitops.h>
-
-#include <linux/slab.h>
-#include <linux/list.h>
-#include <linux/spinlock.h>
-
-/*
- * ZERO_PAGE is a global shared page that is always zero: used
- * for zero-mapped memory areas etc..
- */
-#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
-extern unsigned long empty_zero_page[1024];
-extern spinlock_t pgd_lock;
-extern struct page *pgd_list;
-
-extern void pmd_ctor(void *, struct kmem_cache *, unsigned long);
-extern void pgtable_cache_init(void);
-extern void paging_init(void);
-
-#endif /* !__ASSEMBLY__ */
-
-/*
- * The Linux mn10300 paging architecture only implements both the traditional
- * 2-level page tables
- */
-#define PGDIR_SHIFT    22
-#define PTRS_PER_PGD   1024
-#define PTRS_PER_PUD   1       /* we don't really have any PUD physically */
-#define PTRS_PER_PMD   1       /* we don't really have any PMD physically */
-#define PTRS_PER_PTE   1024
-
-#define PGD_SIZE       PAGE_SIZE
-#define PMD_SIZE       (1UL << PMD_SHIFT)
-#define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
-#define PGDIR_MASK     (~(PGDIR_SIZE - 1))
-
-#define USER_PTRS_PER_PGD      (TASK_SIZE / PGDIR_SIZE)
-#define FIRST_USER_ADDRESS     0
-
-#define USER_PGD_PTRS          (PAGE_OFFSET >> PGDIR_SHIFT)
-#define KERNEL_PGD_PTRS                (PTRS_PER_PGD - USER_PGD_PTRS)
-
-#define TWOLEVEL_PGDIR_SHIFT   22
-#define BOOT_USER_PGD_PTRS     (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
-#define BOOT_KERNEL_PGD_PTRS   (1024 - BOOT_USER_PGD_PTRS)
-
-#ifndef __ASSEMBLY__
-extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
-#endif
-
-/*
- * Unfortunately, due to the way the MMU works on the MN10300, the vmalloc VM
- * area has to be in the lower half of the virtual address range (the upper
- * half is not translated through the TLB).
- *
- * So in this case, the vmalloc area goes at the bottom of the address map
- * (leaving a hole at the very bottom to catch addressing errors), and
- * userspace starts immediately above.
- *
- * The vmalloc() routines also leaves a hole of 4kB between each vmalloced
- * area to catch addressing errors.
- */
-#define VMALLOC_OFFSET (8 * 1024 * 1024)
-#define VMALLOC_START  (0x70000000)
-#define VMALLOC_END    (0x7C000000)
-
-#ifndef __ASSEMBLY__
-extern pte_t kernel_vmalloc_ptes[(VMALLOC_END - VMALLOC_START) / PAGE_SIZE];
-#endif
-
-/* IPTEL/DPTEL bit assignments */
-#define _PAGE_BIT_VALID                xPTEL_V_BIT
-#define _PAGE_BIT_ACCESSED     xPTEL_UNUSED1_BIT       /* mustn't be loaded into IPTEL/DPTEL */
-#define _PAGE_BIT_NX           xPTEL_UNUSED2_BIT       /* mustn't be loaded into IPTEL/DPTEL */
-#define _PAGE_BIT_CACHE                xPTEL_C_BIT
-#define _PAGE_BIT_PRESENT      xPTEL_PV_BIT
-#define _PAGE_BIT_DIRTY                xPTEL_D_BIT
-#define _PAGE_BIT_GLOBAL       xPTEL_G_BIT
-
-#define _PAGE_VALID            xPTEL_V
-#define _PAGE_ACCESSED         xPTEL_UNUSED1
-#define _PAGE_NX               xPTEL_UNUSED2           /* no-execute bit */
-#define _PAGE_CACHE            xPTEL_C
-#define _PAGE_PRESENT          xPTEL_PV
-#define _PAGE_DIRTY            xPTEL_D
-#define _PAGE_PROT             xPTEL_PR
-#define _PAGE_PROT_RKNU                xPTEL_PR_ROK
-#define _PAGE_PROT_WKNU                xPTEL_PR_RWK
-#define _PAGE_PROT_RKRU                xPTEL_PR_ROK_ROU
-#define _PAGE_PROT_WKRU                xPTEL_PR_RWK_ROU
-#define _PAGE_PROT_WKWU                xPTEL_PR_RWK_RWU
-#define _PAGE_GLOBAL           xPTEL_G
-#define _PAGE_PSE              xPTEL_PS_4Mb            /* 4MB page */
-
-#define _PAGE_FILE             xPTEL_UNUSED1_BIT       /* set:pagecache unset:swap */
-
-#define __PAGE_PROT_UWAUX      0x040
-#define __PAGE_PROT_USER       0x080
-#define __PAGE_PROT_WRITE      0x100
-
-#define _PAGE_PRESENTV         (_PAGE_PRESENT|_PAGE_VALID)
-#define _PAGE_PROTNONE         0x000   /* If not present */
-
-#ifndef __ASSEMBLY__
-
-#define VMALLOC_VMADDR(x) ((unsigned long)(x))
-
-#define _PAGE_TABLE    (_PAGE_PRESENTV | _PAGE_PROT_WKNU | _PAGE_ACCESSED | _PAGE_DIRTY)
-#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
-
-#define __PAGE_NONE    (_PAGE_PRESENTV | _PAGE_PROT_RKNU | _PAGE_ACCESSED | _PAGE_CACHE)
-#define __PAGE_SHARED  (_PAGE_PRESENTV | _PAGE_PROT_WKWU | _PAGE_ACCESSED | _PAGE_CACHE)
-#define __PAGE_COPY    (_PAGE_PRESENTV | _PAGE_PROT_RKRU | _PAGE_ACCESSED | _PAGE_CACHE)
-#define __PAGE_READONLY        (_PAGE_PRESENTV | _PAGE_PROT_RKRU | _PAGE_ACCESSED | _PAGE_CACHE)
-
-#define PAGE_NONE              __pgprot(__PAGE_NONE     | _PAGE_NX)
-#define PAGE_SHARED_NOEXEC     __pgprot(__PAGE_SHARED   | _PAGE_NX)
-#define PAGE_COPY_NOEXEC       __pgprot(__PAGE_COPY     | _PAGE_NX)
-#define PAGE_READONLY_NOEXEC   __pgprot(__PAGE_READONLY | _PAGE_NX)
-#define PAGE_SHARED_EXEC       __pgprot(__PAGE_SHARED)
-#define PAGE_COPY_EXEC         __pgprot(__PAGE_COPY)
-#define PAGE_READONLY_EXEC     __pgprot(__PAGE_READONLY)
-#define PAGE_COPY              PAGE_COPY_NOEXEC
-#define PAGE_READONLY          PAGE_READONLY_NOEXEC
-#define PAGE_SHARED            PAGE_SHARED_EXEC
-
-#define __PAGE_KERNEL_BASE (_PAGE_PRESENTV | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
-
-#define __PAGE_KERNEL          (__PAGE_KERNEL_BASE | _PAGE_PROT_WKNU | _PAGE_CACHE | _PAGE_NX)
-#define __PAGE_KERNEL_NOCACHE  (__PAGE_KERNEL_BASE | _PAGE_PROT_WKNU | _PAGE_NX)
-#define __PAGE_KERNEL_EXEC     (__PAGE_KERNEL & ~_PAGE_NX)
-#define __PAGE_KERNEL_RO       (__PAGE_KERNEL_BASE | _PAGE_PROT_RKNU | _PAGE_CACHE | _PAGE_NX)
-#define __PAGE_KERNEL_LARGE    (__PAGE_KERNEL | _PAGE_PSE)
-#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
-
-#define PAGE_KERNEL            __pgprot(__PAGE_KERNEL)
-#define PAGE_KERNEL_RO         __pgprot(__PAGE_KERNEL_RO)
-#define PAGE_KERNEL_EXEC       __pgprot(__PAGE_KERNEL_EXEC)
-#define PAGE_KERNEL_NOCACHE    __pgprot(__PAGE_KERNEL_NOCACHE)
-#define PAGE_KERNEL_LARGE      __pgprot(__PAGE_KERNEL_LARGE)
-#define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC)
-
-/*
- * Whilst the MN10300 can do page protection for execute (given separate data
- * and insn TLBs), we are not supporting it at the moment. Write permission,
- * however, always implies read permission (but not execute permission).
- */
-#define __P000 PAGE_NONE
-#define __P001 PAGE_READONLY_NOEXEC
-#define __P010 PAGE_COPY_NOEXEC
-#define __P011 PAGE_COPY_NOEXEC
-#define __P100 PAGE_READONLY_EXEC
-#define __P101 PAGE_READONLY_EXEC
-#define __P110 PAGE_COPY_EXEC
-#define __P111 PAGE_COPY_EXEC
-
-#define __S000 PAGE_NONE
-#define __S001 PAGE_READONLY_NOEXEC
-#define __S010 PAGE_SHARED_NOEXEC
-#define __S011 PAGE_SHARED_NOEXEC
-#define __S100 PAGE_READONLY_EXEC
-#define __S101 PAGE_READONLY_EXEC
-#define __S110 PAGE_SHARED_EXEC
-#define __S111 PAGE_SHARED_EXEC
-
-/*
- * Define this to warn about kernel memory accesses that are
- * done without a 'verify_area(VERIFY_WRITE,..)'
- */
-#undef TEST_VERIFY_AREA
-
-#define pte_present(x) (pte_val(x) & _PAGE_VALID)
-#define pte_clear(mm, addr, xp)                                \
-do {                                                   \
-       set_pte_at((mm), (addr), (xp), __pte(0));       \
-} while (0)
-
-#define pmd_none(x)    (!pmd_val(x))
-#define pmd_present(x) (!pmd_none(x))
-#define pmd_clear(xp)  do { set_pmd(xp, __pmd(0)); } while (0)
-#define        pmd_bad(x)      0
-
-
-#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))
-
-#ifndef __ASSEMBLY__
-
-/*
- * The following only work if pte_present() is true.
- * Undefined behaviour if not..
- */
-static inline int pte_user(pte_t pte)  { return pte_val(pte) & __PAGE_PROT_USER; }
-static inline int pte_read(pte_t pte)  { return pte_val(pte) & __PAGE_PROT_USER; }
-static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
-static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
-static inline int pte_write(pte_t pte) { return pte_val(pte) & __PAGE_PROT_WRITE; }
-static inline int pte_special(pte_t pte){ return 0; }
-
-/*
- * The following only works if pte_present() is not true.
- */
-static inline int pte_file(pte_t pte)  { return pte_val(pte) & _PAGE_FILE; }
-
-static inline pte_t pte_rdprotect(pte_t pte)
-{
-       pte_val(pte) &= ~(__PAGE_PROT_USER|__PAGE_PROT_UWAUX); return pte;
-}
-static inline pte_t pte_exprotect(pte_t pte)
-{
-       pte_val(pte) |= _PAGE_NX; return pte;
-}
-
-static inline pte_t pte_wrprotect(pte_t pte)
-{
-       pte_val(pte) &= ~(__PAGE_PROT_WRITE|__PAGE_PROT_UWAUX); return pte;
-}
-
-static inline pte_t pte_mkclean(pte_t pte)     { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
-static inline pte_t pte_mkold(pte_t pte)       { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
-static inline pte_t pte_mkdirty(pte_t pte)     { pte_val(pte) |= _PAGE_DIRTY; return pte; }
-static inline pte_t pte_mkyoung(pte_t pte)     { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
-static inline pte_t pte_mkexec(pte_t pte)      { pte_val(pte) &= ~_PAGE_NX; return pte; }
-
-static inline pte_t pte_mkread(pte_t pte)
-{
-       pte_val(pte) |= __PAGE_PROT_USER;
-       if (pte_write(pte))
-               pte_val(pte) |= __PAGE_PROT_UWAUX;
-       return pte;
-}
-static inline pte_t pte_mkwrite(pte_t pte)
-{
-       pte_val(pte) |= __PAGE_PROT_WRITE;
-       if (pte_val(pte) & __PAGE_PROT_USER)
-               pte_val(pte) |= __PAGE_PROT_UWAUX;
-       return pte;
-}
-
-static inline pte_t pte_mkspecial(pte_t pte)   { return pte; }
-
-#define pte_ERROR(e) \
-       printk(KERN_ERR "%s:%d: bad pte %08lx.\n", \
-              __FILE__, __LINE__, pte_val(e))
-#define pgd_ERROR(e) \
-       printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", \
-              __FILE__, __LINE__, pgd_val(e))
-
-/*
- * The "pgd_xxx()" functions here are trivial for a folded two-level
- * setup: the pgd is never bad, and a pmd always exists (as it's folded
- * into the pgd entry)
- */
-#define pgd_clear(xp)                          do { } while (0)
-
-/*
- * Certain architectures need to do special things when PTEs
- * within a page table are directly modified.  Thus, the following
- * hook is made available.
- */
-#define set_pte(pteptr, pteval)                        (*(pteptr) = pteval)
-#define set_pte_at(mm, addr, ptep, pteval)     set_pte((ptep), (pteval))
-#define set_pte_atomic(pteptr, pteval)         set_pte((pteptr), (pteval))
-
-/*
- * (pmds are folded into pgds so this doesn't get actually called,
- * but the define is needed for a generic inline function.)
- */
-#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
-
-#define ptep_get_and_clear(mm, addr, ptep) \
-       __pte(xchg(&(ptep)->pte, 0))
-#define pte_same(a, b)         (pte_val(a) == pte_val(b))
-#define pte_page(x)            pfn_to_page(pte_pfn(x))
-#define pte_none(x)            (!pte_val(x))
-#define pte_pfn(x)             ((unsigned long) (pte_val(x) >> PAGE_SHIFT))
-#define __pfn_addr(pfn)                ((pfn) << PAGE_SHIFT)
-#define pfn_pte(pfn, prot)     __pte(__pfn_addr(pfn) | pgprot_val(prot))
-#define pfn_pmd(pfn, prot)     __pmd(__pfn_addr(pfn) | pgprot_val(prot))
-
-/*
- * All present user pages are user-executable:
- */
-static inline int pte_exec(pte_t pte)
-{
-       return pte_user(pte);
-}
-
-/*
- * All present pages are kernel-executable:
- */
-static inline int pte_exec_kernel(pte_t pte)
-{
-       return 1;
-}
-
-/*
- * Bits 0 and 1 are taken, split up the 29 bits of offset
- * into this range:
- */
-#define PTE_FILE_MAX_BITS      29
-
-#define pte_to_pgoff(pte)      (pte_val(pte) >> 2)
-#define pgoff_to_pte(off)      __pte((off) << 2 | _PAGE_FILE)
-
-/* Encode and de-code a swap entry */
-#define __swp_type(x)                  (((x).val >> 2) & 0x3f)
-#define __swp_offset(x)                        ((x).val >> 8)
-#define __swp_entry(type, offset) \
-       ((swp_entry_t) { ((type) << 2) | ((offset) << 8) })
-#define __pte_to_swp_entry(pte)                ((swp_entry_t) { pte_val(pte) })
-#define __swp_entry_to_pte(x)          __pte((x).val)
-
-static inline
-int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr,
-                             pte_t *ptep)
-{
-       if (!pte_dirty(*ptep))
-               return 0;
-       return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
-}
-
-static inline
-int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr,
-                             pte_t *ptep)
-{
-       if (!pte_young(*ptep))
-               return 0;
-       return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte);
-}
-
-static inline
-void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
-{
-       pte_val(*ptep) &= ~(__PAGE_PROT_WRITE|__PAGE_PROT_UWAUX);
-}
-
-static inline void ptep_mkdirty(pte_t *ptep)
-{
-       set_bit(_PAGE_BIT_DIRTY, &ptep->pte);
-}
-
-/*
- * Macro to mark a page protection value as "uncacheable".  On processors which
- * do not support it, this is a no-op.
- */
-#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_CACHE)
-
-
-/*
- * Conversion functions: convert a page and protection to a page entry,
- * and a page entry and page directory to the page they refer to.
- */
-
-#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
-#define mk_pte_huge(entry) \
-       ((entry).pte |= _PAGE_PRESENT | _PAGE_PSE | _PAGE_VALID)
-
-static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
-{
-       pte_val(pte) &= _PAGE_CHG_MASK;
-       pte_val(pte) |= pgprot_val(newprot);
-       return pte;
-}
-
-#define page_pte(page) page_pte_prot((page), __pgprot(0))
-
-#define pmd_page_kernel(pmd) \
-       ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
-
-#define pmd_page(pmd)  pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
-
-#define pmd_large(pmd) \
-       ((pmd_val(pmd) & (_PAGE_PSE | _PAGE_PRESENT)) == \
-        (_PAGE_PSE | _PAGE_PRESENT))
-
-/*
- * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
- *
- * this macro returns the index of the entry in the pgd page which would
- * control the given virtual address
- */
-#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
-
-/*
- * pgd_offset() returns a (pgd_t *)
- * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
- */
-#define pgd_offset(mm, address)        ((mm)->pgd + pgd_index(address))
-
-/*
- * a shortcut which implies the use of the kernel's pgd, instead
- * of a process's
- */
-#define pgd_offset_k(address)  pgd_offset(&init_mm, address)
-
-/*
- * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD]
- *
- * this macro returns the index of the entry in the pmd page which would
- * control the given virtual address
- */
-#define pmd_index(address) \
-       (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
-
-/*
- * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
- *
- * this macro returns the index of the entry in the pte page which would
- * control the given virtual address
- */
-#define pte_index(address) \
-       (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
-
-#define pte_offset_kernel(dir, address) \
-       ((pte_t *) pmd_page_kernel(*(dir)) +  pte_index(address))
-
-/*
- * Make a given kernel text page executable/non-executable.
- * Returns the previous executability setting of that page (which
- * is used to restore the previous state). Used by the SMP bootup code.
- * NOTE: this is an __init function for security reasons.
- */
-static inline int set_kernel_exec(unsigned long vaddr, int enable)
-{
-       return 0;
-}
-
-#define pte_offset_map(dir, address) \
-       ((pte_t *) page_address(pmd_page(*(dir))) + pte_index(address))
-#define pte_offset_map_nested(dir, address) pte_offset_map(dir, address)
-#define pte_unmap(pte)         do {} while (0)
-#define pte_unmap_nested(pte)  do {} while (0)
-
-/*
- * The MN10300 has external MMU info in the form of a TLB: this is adapted from
- * the kernel page tables containing the necessary information by tlb-mn10300.S
- */
-extern void update_mmu_cache(struct vm_area_struct *vma,
-                            unsigned long address, pte_t pte);
-
-#endif /* !__ASSEMBLY__ */
-
-#define kern_addr_valid(addr)  (1)
-
-#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
-       remap_pfn_range((vma), (vaddr), (pfn), (size), (prot))
-
-#define MK_IOSPACE_PFN(space, pfn)     (pfn)
-#define GET_IOSPACE(pfn)               0
-#define GET_PFN(pfn)                   (pfn)
-
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
-#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
-#define __HAVE_ARCH_PTEP_SET_WRPROTECT
-#define __HAVE_ARCH_PTEP_MKDIRTY
-#define __HAVE_ARCH_PTE_SAME
-#include <asm-generic/pgtable.h>
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_PGTABLE_H */
diff --git a/include/asm-mn10300/pio-regs.h b/include/asm-mn10300/pio-regs.h
deleted file mode 100644 (file)
index 96bc818..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/* MN10300 On-board I/O port module registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PIO_REGS_H
-#define _ASM_PIO_REGS_H
-
-#include <asm/cpu-regs.h>
-#include <asm/intctl-regs.h>
-
-#ifdef __KERNEL__
-
-/* I/O port 0 */
-#define        P0MD                    __SYSREG(0xdb000000, u16)       /* mode reg */
-#define P0MD_0                 0x0003  /* mask */
-#define P0MD_0_IN              0x0000  /* input mode */
-#define P0MD_0_OUT             0x0001  /* output mode */
-#define P0MD_0_TM0IO           0x0002  /* timer 0 I/O mode */
-#define P0MD_0_EYECLK          0x0003  /* test signal output (clock) */
-#define P0MD_1                 0x000c
-#define P0MD_1_IN              0x0000
-#define P0MD_1_OUT             0x0004
-#define P0MD_1_TM1IO           0x0008  /* timer 1 I/O mode */
-#define P0MD_1_EYED            0x000c  /* test signal output (data) */
-#define P0MD_2                 0x0030
-#define P0MD_2_IN              0x0000
-#define P0MD_2_OUT             0x0010
-#define P0MD_2_TM2IO           0x0020  /* timer 2 I/O mode */
-#define P0MD_3                 0x00c0
-#define P0MD_3_IN              0x0000
-#define P0MD_3_OUT             0x0040
-#define P0MD_3_TM3IO           0x0080  /* timer 3 I/O mode */
-#define P0MD_4                 0x0300
-#define P0MD_4_IN              0x0000
-#define P0MD_4_OUT             0x0100
-#define P0MD_4_TM4IO           0x0200  /* timer 4 I/O mode */
-#define P0MD_4_XCTS            0x0300  /* XCTS input for serial port 2 */
-#define P0MD_5                 0x0c00
-#define P0MD_5_IN              0x0000
-#define P0MD_5_OUT             0x0400
-#define P0MD_5_TM5IO           0x0800  /* timer 5 I/O mode */
-#define P0MD_6                 0x3000
-#define P0MD_6_IN              0x0000
-#define P0MD_6_OUT             0x1000
-#define P0MD_6_TM6IOA          0x2000  /* timer 6 I/O mode A */
-#define P0MD_7                 0xc000
-#define P0MD_7_IN              0x0000
-#define P0MD_7_OUT             0x4000
-#define P0MD_7_TM6IOB          0x8000  /* timer 6 I/O mode B */
-
-#define        P0IN                    __SYSREG(0xdb000004, u8)        /* in reg */
-#define        P0OUT                   __SYSREG(0xdb000008, u8)        /* out reg */
-
-#define        P0TMIO                  __SYSREG(0xdb00000c, u8)        /* TM pin I/O control reg */
-#define P0TMIO_TM0_IN          0x00
-#define P0TMIO_TM0_OUT         0x01
-#define P0TMIO_TM1_IN          0x00
-#define P0TMIO_TM1_OUT         0x02
-#define P0TMIO_TM2_IN          0x00
-#define P0TMIO_TM2_OUT         0x04
-#define P0TMIO_TM3_IN          0x00
-#define P0TMIO_TM3_OUT         0x08
-#define P0TMIO_TM4_IN          0x00
-#define P0TMIO_TM4_OUT         0x10
-#define P0TMIO_TM5_IN          0x00
-#define P0TMIO_TM5_OUT         0x20
-#define P0TMIO_TM6A_IN         0x00
-#define P0TMIO_TM6A_OUT                0x40
-#define P0TMIO_TM6B_IN         0x00
-#define P0TMIO_TM6B_OUT                0x80
-
-/* I/O port 1 */
-#define        P1MD                    __SYSREG(0xdb000100, u16)       /* mode reg */
-#define P1MD_0                 0x0003  /* mask */
-#define P1MD_0_IN              0x0000  /* input mode */
-#define P1MD_0_OUT             0x0001  /* output mode */
-#define P1MD_0_TM7IO           0x0002  /* timer 7 I/O mode */
-#define P1MD_0_ADTRG           0x0003  /* A/D converter trigger mode */
-#define P1MD_1                 0x000c
-#define P1MD_1_IN              0x0000
-#define P1MD_1_OUT             0x0004
-#define P1MD_1_TM8IO           0x0008  /* timer 8 I/O mode */
-#define P1MD_1_XDMR0           0x000c  /* DMA request input 0 mode */
-#define P1MD_2                 0x0030
-#define P1MD_2_IN              0x0000
-#define P1MD_2_OUT             0x0010
-#define P1MD_2_TM9IO           0x0020  /* timer 9 I/O mode */
-#define P1MD_2_XDMR1           0x0030  /* DMA request input 1 mode */
-#define P1MD_3                 0x00c0
-#define P1MD_3_IN              0x0000
-#define P1MD_3_OUT             0x0040
-#define P1MD_3_TM10IO          0x0080  /* timer 10 I/O mode */
-#define P1MD_3_FRQS0           0x00c0  /* CPU clock multiplier setting input 0 mode */
-#define P1MD_4                 0x0300
-#define P1MD_4_IN              0x0000
-#define P1MD_4_OUT             0x0100
-#define P1MD_4_TM11IO          0x0200  /* timer 11 I/O mode */
-#define P1MD_4_FRQS1           0x0300  /* CPU clock multiplier setting input 1 mode */
-
-#define        P1IN                    __SYSREG(0xdb000104, u8)        /* in reg */
-#define        P1OUT                   __SYSREG(0xdb000108, u8)        /* out reg */
-#define        P1TMIO                  __SYSREG(0xdb00010c, u8)        /* TM pin I/O control reg */
-#define P1TMIO_TM11_IN         0x00
-#define P1TMIO_TM11_OUT                0x01
-#define P1TMIO_TM10_IN         0x00
-#define P1TMIO_TM10_OUT                0x02
-#define P1TMIO_TM9_IN          0x00
-#define P1TMIO_TM9_OUT         0x04
-#define P1TMIO_TM8_IN          0x00
-#define P1TMIO_TM8_OUT         0x08
-#define P1TMIO_TM7_IN          0x00
-#define P1TMIO_TM7_OUT         0x10
-
-/* I/O port 2 */
-#define        P2MD                    __SYSREG(0xdb000200, u16)       /* mode reg */
-#define P2MD_0                 0x0003  /* mask */
-#define P2MD_0_IN              0x0000  /* input mode */
-#define P2MD_0_OUT             0x0001  /* output mode */
-#define P2MD_0_BOOTBW          0x0003  /* boot bus width selector mode */
-#define P2MD_1                 0x000c
-#define P2MD_1_IN              0x0000
-#define P2MD_1_OUT             0x0004
-#define P2MD_1_BOOTSEL         0x000c  /* boot device selector mode */
-#define P2MD_2                 0x0030
-#define P2MD_2_IN              0x0000
-#define P2MD_2_OUT             0x0010
-#define P2MD_3                 0x00c0
-#define P2MD_3_IN              0x0000
-#define P2MD_3_OUT             0x0040
-#define P2MD_3_CKIO            0x00c0  /* mode */
-#define P2MD_4                 0x0300
-#define P2MD_4_IN              0x0000
-#define P2MD_4_OUT             0x0100
-#define P2MD_4_CMOD            0x0300  /* mode */
-
-#define        P2IN                    __SYSREG(0xdb000204, u8)        /* in reg */
-#define        P2OUT                   __SYSREG(0xdb000208, u8)        /* out reg */
-#define        P2TMIO                  __SYSREG(0xdb00020c, u8)        /* TM pin I/O control reg */
-
-/* I/O port 3 */
-#define        P3MD                    __SYSREG(0xdb000300, u16)       /* mode reg */
-#define P3MD_0                 0x0003  /* mask */
-#define P3MD_0_IN              0x0000  /* input mode */
-#define P3MD_0_OUT             0x0001  /* output mode */
-#define P3MD_0_AFRXD           0x0002  /* AFR interface mode */
-#define P3MD_1                 0x000c
-#define P3MD_1_IN              0x0000
-#define P3MD_1_OUT             0x0004
-#define P3MD_1_AFTXD           0x0008  /* AFR interface mode */
-#define P3MD_2                 0x0030
-#define P3MD_2_IN              0x0000
-#define P3MD_2_OUT             0x0010
-#define P3MD_2_AFSCLK          0x0020  /* AFR interface mode */
-#define P3MD_3                 0x00c0
-#define P3MD_3_IN              0x0000
-#define P3MD_3_OUT             0x0040
-#define P3MD_3_AFFS            0x0080  /* AFR interface mode */
-#define P3MD_4                 0x0300
-#define P3MD_4_IN              0x0000
-#define P3MD_4_OUT             0x0100
-#define P3MD_4_AFEHC           0x0200  /* AFR interface mode */
-
-#define        P3IN                    __SYSREG(0xdb000304, u8)        /* in reg */
-#define        P3OUT                   __SYSREG(0xdb000308, u8)        /* out reg */
-
-/* I/O port 4 */
-#define        P4MD                    __SYSREG(0xdb000400, u16)       /* mode reg */
-#define P4MD_0                 0x0003  /* mask */
-#define P4MD_0_IN              0x0000  /* input mode */
-#define P4MD_0_OUT             0x0001  /* output mode */
-#define P4MD_0_SCL0            0x0002  /* I2C/serial mode */
-#define P4MD_1                 0x000c
-#define P4MD_1_IN              0x0000
-#define P4MD_1_OUT             0x0004
-#define P4MD_1_SDA0            0x0008
-#define P4MD_2                 0x0030
-#define P4MD_2_IN              0x0000
-#define P4MD_2_OUT             0x0010
-#define P4MD_2_SCL1            0x0020
-#define P4MD_3                 0x00c0
-#define P4MD_3_IN              0x0000
-#define P4MD_3_OUT             0x0040
-#define P4MD_3_SDA1            0x0080
-#define P4MD_4                 0x0300
-#define P4MD_4_IN              0x0000
-#define P4MD_4_OUT             0x0100
-#define P4MD_4_SBO0            0x0200
-#define P4MD_5                 0x0c00
-#define P4MD_5_IN              0x0000
-#define P4MD_5_OUT             0x0400
-#define P4MD_5_SBO1            0x0800
-#define P4MD_6                 0x3000
-#define P4MD_6_IN              0x0000
-#define P4MD_6_OUT             0x1000
-#define P4MD_6_SBT0            0x2000
-#define P4MD_7                 0xc000
-#define P4MD_7_IN              0x0000
-#define P4MD_7_OUT             0x4000
-#define P4MD_7_SBT1            0x8000
-
-#define        P4IN                    __SYSREG(0xdb000404, u8)        /* in reg */
-#define        P4OUT                   __SYSREG(0xdb000408, u8)        /* out reg */
-
-/* I/O port 5 */
-#define        P5MD                    __SYSREG(0xdb000500, u16)       /* mode reg */
-#define P5MD_0                 0x0003  /* mask */
-#define P5MD_0_IN              0x0000  /* input mode */
-#define P5MD_0_OUT             0x0001  /* output mode */
-#define P5MD_0_IRTXD           0x0002  /* IrDA mode */
-#define P5MD_0_SOUT            0x0004  /* serial mode */
-#define P5MD_1                 0x000c
-#define P5MD_1_IN              0x0000
-#define P5MD_1_OUT             0x0004
-#define P5MD_1_IRRXDS          0x0008  /* IrDA mode */
-#define P5MD_1_SIN             0x000c  /* serial mode */
-#define P5MD_2                 0x0030
-#define P5MD_2_IN              0x0000
-#define P5MD_2_OUT             0x0010
-#define P5MD_2_IRRXDF          0x0020  /* IrDA mode */
-
-#define        P5IN                    __SYSREG(0xdb000504, u8)        /* in reg */
-#define        P5OUT                   __SYSREG(0xdb000508, u8)        /* out reg */
-
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_PIO_REGS_H */
diff --git a/include/asm-mn10300/poll.h b/include/asm-mn10300/poll.h
deleted file mode 100644 (file)
index c98509d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/poll.h>
diff --git a/include/asm-mn10300/posix_types.h b/include/asm-mn10300/posix_types.h
deleted file mode 100644 (file)
index 077567c..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/* MN10300 POSIX types
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_POSIX_TYPES_H
-#define _ASM_POSIX_TYPES_H
-
-/*
- * This file is generally used by user-level software, so you need to
- * be a little careful about namespace pollution etc.  Also, we cannot
- * assume GCC is being used.
- */
-
-typedef unsigned long  __kernel_ino_t;
-typedef unsigned short __kernel_mode_t;
-typedef unsigned short __kernel_nlink_t;
-typedef long           __kernel_off_t;
-typedef int            __kernel_pid_t;
-typedef unsigned short __kernel_ipc_pid_t;
-typedef unsigned short __kernel_uid_t;
-typedef unsigned short __kernel_gid_t;
-typedef unsigned long  __kernel_size_t;
-typedef long           __kernel_ssize_t;
-typedef int            __kernel_ptrdiff_t;
-typedef long           __kernel_time_t;
-typedef long           __kernel_suseconds_t;
-typedef long           __kernel_clock_t;
-typedef int            __kernel_timer_t;
-typedef int            __kernel_clockid_t;
-typedef int            __kernel_daddr_t;
-typedef char *         __kernel_caddr_t;
-typedef unsigned short __kernel_uid16_t;
-typedef unsigned short __kernel_gid16_t;
-typedef unsigned int   __kernel_uid32_t;
-typedef unsigned int   __kernel_gid32_t;
-
-typedef unsigned short __kernel_old_uid_t;
-typedef unsigned short __kernel_old_gid_t;
-typedef unsigned short __kernel_old_dev_t;
-
-#ifdef __GNUC__
-typedef long long      __kernel_loff_t;
-#endif
-
-typedef struct {
-#if defined(__KERNEL__) || defined(__USE_ALL)
-       int     val[2];
-#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
-       int     __val[2];
-#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
-} __kernel_fsid_t;
-
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
-
-#undef __FD_SET
-static inline void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
-{
-       unsigned long __tmp = __fd / __NFDBITS;
-       unsigned long __rem = __fd % __NFDBITS;
-       __fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
-}
-
-#undef __FD_CLR
-static inline void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
-{
-       unsigned long __tmp = __fd / __NFDBITS;
-       unsigned long __rem = __fd % __NFDBITS;
-       __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
-}
-
-
-#undef __FD_ISSET
-static inline int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p)
-{
-       unsigned long __tmp = __fd / __NFDBITS;
-       unsigned long __rem = __fd % __NFDBITS;
-       return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0;
-}
-
-/*
- * This will unroll the loop for the normal constant case (8 ints,
- * for a 256-bit fd_set)
- */
-#undef __FD_ZERO
-static inline void __FD_ZERO(__kernel_fd_set *__p)
-{
-       unsigned long *__tmp = __p->fds_bits;
-       int __i;
-
-       if (__builtin_constant_p(__FDSET_LONGS)) {
-               switch (__FDSET_LONGS) {
-               case 16:
-                       __tmp[ 0] = 0; __tmp[ 1] = 0;
-                       __tmp[ 2] = 0; __tmp[ 3] = 0;
-                       __tmp[ 4] = 0; __tmp[ 5] = 0;
-                       __tmp[ 6] = 0; __tmp[ 7] = 0;
-                       __tmp[ 8] = 0; __tmp[ 9] = 0;
-                       __tmp[10] = 0; __tmp[11] = 0;
-                       __tmp[12] = 0; __tmp[13] = 0;
-                       __tmp[14] = 0; __tmp[15] = 0;
-                       return;
-
-               case 8:
-                       __tmp[ 0] = 0; __tmp[ 1] = 0;
-                       __tmp[ 2] = 0; __tmp[ 3] = 0;
-                       __tmp[ 4] = 0; __tmp[ 5] = 0;
-                       __tmp[ 6] = 0; __tmp[ 7] = 0;
-                       return;
-
-               case 4:
-                       __tmp[ 0] = 0; __tmp[ 1] = 0;
-                       __tmp[ 2] = 0; __tmp[ 3] = 0;
-                       return;
-               }
-       }
-       __i = __FDSET_LONGS;
-       while (__i) {
-               __i--;
-               *__tmp = 0;
-               __tmp++;
-       }
-}
-
-#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
-
-#endif /* _ASM_POSIX_TYPES_H */
diff --git a/include/asm-mn10300/proc-mn103e010/cache.h b/include/asm-mn10300/proc-mn103e010/cache.h
deleted file mode 100644 (file)
index bdc1f9a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* MN103E010 Cache specification
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PROC_CACHE_H
-#define _ASM_PROC_CACHE_H
-
-/* L1 cache */
-
-#define L1_CACHE_NWAYS         4       /* number of ways in caches */
-#define L1_CACHE_NENTRIES      256     /* number of entries in each way */
-#define L1_CACHE_BYTES         16      /* bytes per entry */
-#define L1_CACHE_SHIFT         4       /* shift for bytes per entry */
-#define L1_CACHE_WAYDISP       0x1000  /* displacement of one way from the next */
-
-#define L1_CACHE_TAG_VALID     0x00000001      /* cache tag valid bit */
-#define L1_CACHE_TAG_DIRTY     0x00000008      /* data cache tag dirty bit */
-#define L1_CACHE_TAG_ENTRY     0x00000ff0      /* cache tag entry address mask */
-#define L1_CACHE_TAG_ADDRESS   0xfffff000      /* cache tag line address mask */
-
-/*
- * specification of the interval between interrupt checking intervals whilst
- * managing the cache with the interrupts disabled
- */
-#define MN10300_DCACHE_INV_RANGE_INTR_LOG2_INTERVAL    4
-
-#endif /* _ASM_PROC_CACHE_H */
diff --git a/include/asm-mn10300/proc-mn103e010/clock.h b/include/asm-mn10300/proc-mn103e010/clock.h
deleted file mode 100644 (file)
index caf9983..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* MN103E010-specific clocks
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PROC_CLOCK_H
-#define _ASM_PROC_CLOCK_H
-
-#include <asm/unit/clock.h>
-
-#define MN10300_WDCLK          MN10300_IOCLK
-
-#endif /* _ASM_PROC_CLOCK_H */
diff --git a/include/asm-mn10300/proc-mn103e010/irq.h b/include/asm-mn10300/proc-mn103e010/irq.h
deleted file mode 100644 (file)
index aa6ee8f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* MN103E010 On-board interrupt controller numbers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_PROC_IRQ_H
-#define _ASM_PROC_IRQ_H
-
-#ifdef __KERNEL__
-
-#define GxICR_NUM_IRQS         42
-
-#define GxICR_NUM_XIRQS                8
-
-#define XIRQ0          34
-#define XIRQ1          35
-#define XIRQ2          36
-#define XIRQ3          37
-#define XIRQ4          38
-#define XIRQ5          39
-#define XIRQ6          40
-#define XIRQ7          41
-
-#define XIRQ2IRQ(num)  (XIRQ0 + num)
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_PROC_IRQ_H */
diff --git a/include/asm-mn10300/proc-mn103e010/proc.h b/include/asm-mn10300/proc-mn103e010/proc.h
deleted file mode 100644 (file)
index 22a2b93..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* MN103E010 Processor description
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_PROC_PROC_H
-#define _ASM_PROC_PROC_H
-
-#define PROCESSOR_VENDOR_NAME  "Matsushita"
-#define PROCESSOR_MODEL_NAME   "mn103e010"
-
-#endif /* _ASM_PROC_PROC_H */
diff --git a/include/asm-mn10300/processor.h b/include/asm-mn10300/processor.h
deleted file mode 100644 (file)
index 7323927..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/* MN10300 Processor specifics
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_PROCESSOR_H
-#define _ASM_PROCESSOR_H
-
-#include <asm/page.h>
-#include <asm/ptrace.h>
-#include <asm/cpu-regs.h>
-#include <linux/threads.h>
-
-/* Forward declaration, a strange C thing */
-struct task_struct;
-struct mm_struct;
-
-/*
- * Default implementation of macro that returns current
- * instruction pointer ("program counter").
- */
-#define current_text_addr()                    \
-({                                             \
-       void *__pc;                             \
-       asm("mov pc,%0" : "=a"(__pc));          \
-       __pc;                                   \
-})
-
-extern void show_registers(struct pt_regs *regs);
-
-/*
- *  CPU type and hardware bug flags. Kept separately for each CPU.
- *  Members of this structure are referenced in head.S, so think twice
- *  before touching them. [mj]
- */
-
-struct mn10300_cpuinfo {
-       int             type;
-       unsigned long   loops_per_sec;
-       char            hard_math;
-       unsigned long   *pgd_quick;
-       unsigned long   *pte_quick;
-       unsigned long   pgtable_cache_sz;
-};
-
-extern struct mn10300_cpuinfo boot_cpu_data;
-
-#define cpu_data &boot_cpu_data
-#define current_cpu_data boot_cpu_data
-
-extern void identify_cpu(struct mn10300_cpuinfo *);
-extern void print_cpu_info(struct mn10300_cpuinfo *);
-extern void dodgy_tsc(void);
-#define cpu_relax() barrier()
-
-/*
- * User space process size: 1.75GB (default).
- */
-#define TASK_SIZE              0x70000000
-
-/*
- * Where to put the userspace stack by default
- */
-#define STACK_TOP              0x70000000
-#define STACK_TOP_MAX          STACK_TOP
-
-/* This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE     0x30000000
-
-typedef struct {
-       unsigned long   seg;
-} mm_segment_t;
-
-struct fpu_state_struct {
-       unsigned long   fs[32];         /* fpu registers */
-       unsigned long   fpcr;           /* fpu control register */
-};
-
-struct thread_struct {
-       struct pt_regs          *uregs;         /* userspace register frame */
-       unsigned long           pc;             /* kernel PC */
-       unsigned long           sp;             /* kernel SP */
-       unsigned long           a3;             /* kernel FP */
-       unsigned long           wchan;
-       unsigned long           usp;
-       struct pt_regs          *__frame;
-       unsigned long           fpu_flags;
-#define THREAD_USING_FPU       0x00000001      /* T if this task is using the FPU */
-       struct fpu_state_struct fpu_state;
-};
-
-#define INIT_THREAD                            \
-{                                              \
-       .uregs          = init_uregs,           \
-       .pc             = 0,                    \
-       .sp             = 0,                    \
-       .a3             = 0,                    \
-       .wchan          = 0,                    \
-       .__frame        = NULL,                 \
-}
-
-#define INIT_MMAP \
-{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, \
-  NULL, NULL }
-
-/*
- * do necessary setup to start up a newly executed thread
- * - need to discard the frame stacked by the kernel thread invoking the execve
- *   syscall (see RESTORE_ALL macro)
- */
-#define start_thread(regs, new_pc, new_sp) do {                \
-       set_fs(USER_DS);                                \
-       __frame = current->thread.uregs;                \
-       __frame->epsw = EPSW_nSL | EPSW_IE | EPSW_IM;   \
-       __frame->pc = new_pc;                           \
-       __frame->sp = new_sp;                           \
-} while (0)
-
-/* Free all resources held by a thread. */
-extern void release_thread(struct task_struct *);
-
-/* Prepare to copy thread state - unlazy all lazy status */
-extern void prepare_to_copy(struct task_struct *tsk);
-
-/*
- * create a kernel thread without removing it from tasklists
- */
-extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
-
-/*
- * Return saved PC of a blocked thread.
- */
-extern unsigned long thread_saved_pc(struct task_struct *tsk);
-
-unsigned long get_wchan(struct task_struct *p);
-
-#define task_pt_regs(task)                                             \
-({                                                                     \
-       struct pt_regs *__regs__;                                       \
-       __regs__ = (struct pt_regs *) (KSTK_TOP(task_stack_page(task)) - 8); \
-       __regs__ - 1;                                                   \
-})
-
-#define KSTK_EIP(task) (task_pt_regs(task)->pc)
-#define KSTK_ESP(task) (task_pt_regs(task)->sp)
-
-#define KSTK_TOP(info)                         \
-({                                             \
-       (unsigned long)(info) + THREAD_SIZE;    \
-})
-
-#define ARCH_HAS_PREFETCH
-#define ARCH_HAS_PREFETCHW
-
-static inline void prefetch(const void *x)
-{
-#ifndef CONFIG_MN10300_CACHE_DISABLED
-#ifdef CONFIG_MN10300_PROC_MN103E010
-       asm volatile ("nop; nop; dcpf (%0)" : : "r"(x));
-#else
-       asm volatile ("dcpf (%0)" : : "r"(x));
-#endif
-#endif
-}
-
-static inline void prefetchw(const void *x)
-{
-#ifndef CONFIG_MN10300_CACHE_DISABLED
-#ifdef CONFIG_MN10300_PROC_MN103E010
-       asm volatile ("nop; nop; dcpf (%0)" : : "r"(x));
-#else
-       asm volatile ("dcpf (%0)" : : "r"(x));
-#endif
-#endif
-}
-
-#endif /* _ASM_PROCESSOR_H */
diff --git a/include/asm-mn10300/ptrace.h b/include/asm-mn10300/ptrace.h
deleted file mode 100644 (file)
index 7b06cc6..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/* MN10300 Exception frame layout and ptrace constants
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_PTRACE_H
-#define _ASM_PTRACE_H
-
-#define PT_A3          0
-#define PT_A2          1
-#define PT_D3          2
-#define        PT_D2           3
-#define PT_MCVF                4
-#define        PT_MCRL         5
-#define PT_MCRH                6
-#define        PT_MDRQ         7
-#define        PT_E1           8
-#define        PT_E0           9
-#define        PT_E7           10
-#define        PT_E6           11
-#define        PT_E5           12
-#define        PT_E4           13
-#define        PT_E3           14
-#define        PT_E2           15
-#define        PT_SP           16
-#define        PT_LAR          17
-#define        PT_LIR          18
-#define        PT_MDR          19
-#define        PT_A1           20
-#define        PT_A0           21
-#define        PT_D1           22
-#define        PT_D0           23
-#define PT_ORIG_D0     24
-#define        PT_EPSW         25
-#define        PT_PC           26
-#define NR_PTREGS      27
-
-#ifndef __ASSEMBLY__
-/*
- * This defines the way registers are stored in the event of an exception
- * - the strange order is due to the MOVM instruction
- */
-struct pt_regs {
-       unsigned long           a3;             /* syscall arg 3 */
-       unsigned long           a2;             /* syscall arg 4 */
-       unsigned long           d3;             /* syscall arg 5 */
-       unsigned long           d2;             /* syscall arg 6 */
-       unsigned long           mcvf;
-       unsigned long           mcrl;
-       unsigned long           mcrh;
-       unsigned long           mdrq;
-       unsigned long           e1;
-       unsigned long           e0;
-       unsigned long           e7;
-       unsigned long           e6;
-       unsigned long           e5;
-       unsigned long           e4;
-       unsigned long           e3;
-       unsigned long           e2;
-       unsigned long           sp;
-       unsigned long           lar;
-       unsigned long           lir;
-       unsigned long           mdr;
-       unsigned long           a1;
-       unsigned long           a0;             /* syscall arg 1 */
-       unsigned long           d1;             /* syscall arg 2 */
-       unsigned long           d0;             /* syscall ret */
-       struct pt_regs          *next;          /* next frame pointer */
-       unsigned long           orig_d0;        /* syscall number */
-       unsigned long           epsw;
-       unsigned long           pc;
-};
-#endif
-
-extern struct pt_regs *__frame; /* current frame pointer */
-
-/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
-#define PTRACE_GETREGS            12
-#define PTRACE_SETREGS            13
-#define PTRACE_GETFPREGS          14
-#define PTRACE_SETFPREGS          15
-
-/* options set using PTRACE_SETOPTIONS */
-#define PTRACE_O_TRACESYSGOOD     0x00000001
-
-#if defined(__KERNEL__)
-
-#if !defined(__ASSEMBLY__)
-#define user_mode(regs)                        (((regs)->epsw & EPSW_nSL) == EPSW_nSL)
-#define instruction_pointer(regs)      ((regs)->pc)
-extern void show_regs(struct pt_regs *);
-#endif  /*  !__ASSEMBLY  */
-
-#define profile_pc(regs) ((regs)->pc)
-
-#endif  /*  __KERNEL__  */
-
-#endif /* _ASM_PTRACE_H */
diff --git a/include/asm-mn10300/reset-regs.h b/include/asm-mn10300/reset-regs.h
deleted file mode 100644 (file)
index 174523d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* MN10300 Reset controller and watchdog timer definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_RESET_REGS_H
-#define _ASM_RESET_REGS_H
-
-#include <asm/cpu-regs.h>
-#include <asm/exceptions.h>
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_MN10300_WD_TIMER
-#define ARCH_HAS_NMI_WATCHDOG          /* See include/linux/nmi.h */
-#endif
-
-/*
- * watchdog timer registers
- */
-#define WDBC                   __SYSREGC(0xc0001000, u8) /* watchdog binary counter reg */
-
-#define WDCTR                  __SYSREG(0xc0001002, u8)  /* watchdog timer control reg */
-#define WDCTR_WDCK             0x07    /* clock source selection */
-#define WDCTR_WDCK_256th       0x00    /* - OSCI/256 */
-#define WDCTR_WDCK_1024th      0x01    /* - OSCI/1024 */
-#define WDCTR_WDCK_2048th      0x02    /* - OSCI/2048 */
-#define WDCTR_WDCK_16384th     0x03    /* - OSCI/16384 */
-#define WDCTR_WDCK_65536th     0x04    /* - OSCI/65536 */
-#define WDCTR_WDRST            0x40    /* binary counter reset */
-#define WDCTR_WDCNE            0x80    /* watchdog timer enable */
-
-#define RSTCTR                 __SYSREG(0xc0001004, u8) /* reset control reg */
-#define RSTCTR_CHIPRST         0x01    /* chip reset */
-#define RSTCTR_DBFRST          0x02    /* double fault reset flag */
-#define RSTCTR_WDTRST          0x04    /* watchdog timer reset flag */
-#define RSTCTR_WDREN           0x08    /* watchdog timer reset enable */
-
-#ifndef __ASSEMBLY__
-
-static inline void mn10300_proc_hard_reset(void)
-{
-       RSTCTR &= ~RSTCTR_CHIPRST;
-       RSTCTR |= RSTCTR_CHIPRST;
-}
-
-extern unsigned int watchdog_alert_counter;
-
-extern void watchdog_go(void);
-extern asmlinkage void watchdog_handler(void);
-extern asmlinkage
-void watchdog_interrupt(struct pt_regs *, enum exception_code);
-
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_RESET_REGS_H */
diff --git a/include/asm-mn10300/resource.h b/include/asm-mn10300/resource.h
deleted file mode 100644 (file)
index 04bc4db..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/resource.h>
diff --git a/include/asm-mn10300/rtc-regs.h b/include/asm-mn10300/rtc-regs.h
deleted file mode 100644 (file)
index c42deef..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* MN10300 on-chip Real-Time Clock registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_RTC_REGS_H
-#define _ASM_RTC_REGS_H
-
-#include <asm/intctl-regs.h>
-
-#ifdef __KERNEL__
-
-#define RTSCR                  __SYSREG(0xd8600000, u8) /* RTC seconds count reg */
-#define RTSAR                  __SYSREG(0xd8600001, u8) /* RTC seconds alarm reg */
-#define RTMCR                  __SYSREG(0xd8600002, u8) /* RTC minutes count reg */
-#define RTMAR                  __SYSREG(0xd8600003, u8) /* RTC minutes alarm reg */
-#define RTHCR                  __SYSREG(0xd8600004, u8) /* RTC hours count reg */
-#define RTHAR                  __SYSREG(0xd8600005, u8) /* RTC hours alarm reg */
-#define RTDWCR                 __SYSREG(0xd8600006, u8) /* RTC day of the week count reg */
-#define RTDMCR                 __SYSREG(0xd8600007, u8) /* RTC days count reg */
-#define RTMTCR                 __SYSREG(0xd8600008, u8) /* RTC months count reg */
-#define RTYCR                  __SYSREG(0xd8600009, u8) /* RTC years count reg */
-
-#define RTCRA                  __SYSREG(0xd860000a, u8)/* RTC control reg A */
-#define RTCRA_RS               0x0f    /* periodic timer interrupt cycle setting */
-#define RTCRA_RS_NONE          0x00    /* - off */
-#define RTCRA_RS_3_90625ms     0x01    /* - 3.90625ms  (1/256s) */
-#define RTCRA_RS_7_8125ms      0x02    /* - 7.8125ms   (1/128s) */
-#define RTCRA_RS_122_070us     0x03    /* - 122.070us  (1/8192s) */
-#define RTCRA_RS_244_141us     0x04    /* - 244.141us  (1/4096s) */
-#define RTCRA_RS_488_281us     0x05    /* - 488.281us  (1/2048s) */
-#define RTCRA_RS_976_5625us    0x06    /* - 976.5625us (1/1024s) */
-#define RTCRA_RS_1_953125ms    0x07    /* - 1.953125ms (1/512s) */
-#define RTCRA_RS_3_90624ms     0x08    /* - 3.90624ms  (1/256s) */
-#define RTCRA_RS_7_8125ms_b    0x09    /* - 7.8125ms   (1/128s) */
-#define RTCRA_RS_15_625ms      0x0a    /* - 15.625ms   (1/64s) */
-#define RTCRA_RS_31_25ms       0x0b    /* - 31.25ms    (1/32s) */
-#define RTCRA_RS_62_5ms                0x0c    /* - 62.5ms     (1/16s) */
-#define RTCRA_RS_125ms         0x0d    /* - 125ms      (1/8s) */
-#define RTCRA_RS_250ms         0x0e    /* - 250ms      (1/4s) */
-#define RTCRA_RS_500ms         0x0f    /* - 500ms      (1/2s) */
-#define RTCRA_DVR              0x40    /* divider reset */
-#define RTCRA_UIP              0x80    /* clock update flag */
-
-#define RTCRB                  __SYSREG(0xd860000b, u8) /* RTC control reg B */
-#define RTCRB_DSE              0x01    /* daylight savings time enable */
-#define RTCRB_TM               0x02    /* time format */
-#define RTCRB_TM_12HR          0x00    /* - 12 hour format */
-#define RTCRB_TM_24HR          0x02    /* - 24 hour format */
-#define RTCRB_DM               0x04    /* numeric value format */
-#define RTCRB_DM_BCD           0x00    /* - BCD */
-#define RTCRB_DM_BINARY                0x04    /* - binary */
-#define RTCRB_UIE              0x10    /* update interrupt disable */
-#define RTCRB_AIE              0x20    /* alarm interrupt disable */
-#define RTCRB_PIE              0x40    /* periodic interrupt disable */
-#define RTCRB_SET              0x80    /* clock update enable */
-
-#define RTSRC                  __SYSREG(0xd860000c, u8) /* RTC status reg C */
-#define RTSRC_UF               0x10    /* update end interrupt flag */
-#define RTSRC_AF               0x20    /* alarm interrupt flag */
-#define RTSRC_PF               0x40    /* periodic interrupt flag */
-#define RTSRC_IRQF             0x80    /* interrupt flag */
-
-#define RTIRQ                  32
-#define RTICR                  GxICR(RTIRQ)
-
-/*
- * MC146818 RTC compatibility defs for the MN10300 on-chip RTC
- */
-#define RTC_PORT(x)            0xd8600000
-#define RTC_ALWAYS_BCD         1       /* RTC operates in binary mode */
-
-#define CMOS_READ(addr)                __SYSREG(0xd8600000 + (addr), u8)
-#define CMOS_WRITE(val, addr)  \
-       do { __SYSREG(0xd8600000 + (addr), u8) = val; } while (0)
-
-#define RTC_IRQ                        RTIRQ
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_RTC_REGS_H */
diff --git a/include/asm-mn10300/rtc.h b/include/asm-mn10300/rtc.h
deleted file mode 100644 (file)
index c295194..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* MN10300 Real time clock definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_RTC_H
-#define _ASM_RTC_H
-
-#ifdef CONFIG_MN10300_RTC
-
-#include <linux/init.h>
-
-extern void check_rtc_time(void);
-extern void __init calibrate_clock(void);
-extern unsigned long __init get_initial_rtc_time(void);
-
-#else /* !CONFIG_MN10300_RTC */
-
-static inline void check_rtc_time(void)
-{
-}
-
-static inline void calibrate_clock(void)
-{
-}
-
-static inline unsigned long get_initial_rtc_time(void)
-{
-       return 0;
-}
-
-#endif /* !CONFIG_MN10300_RTC */
-
-#include <asm-generic/rtc.h>
-
-#endif /* _ASM_RTC_H */
diff --git a/include/asm-mn10300/scatterlist.h b/include/asm-mn10300/scatterlist.h
deleted file mode 100644 (file)
index 6753590..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* MN10300 Scatterlist definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SCATTERLIST_H
-#define _ASM_SCATTERLIST_H
-
-#include <asm/types.h>
-
-/*
- * Drivers must set either ->address or (preferred) page and ->offset
- * to indicate where data must be transferred to/from.
- *
- * Using page is recommended since it handles highmem data as well as
- * low mem. ->address is restricted to data which has a virtual mapping, and
- * it will go away in the future. Updating to page can be automated very
- * easily -- something like
- *
- * sg->address = some_ptr;
- *
- * can be rewritten as
- *
- * sg_set_page(virt_to_page(some_ptr));
- * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
- *
- * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
- */
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-       unsigned long   sg_magic;
-#endif
-       unsigned long   page_link;
-       unsigned int    offset;         /* for highmem, page offset */
-       dma_addr_t      dma_address;
-       unsigned int    length;
-};
-
-#define ISA_DMA_THRESHOLD (0x00ffffff)
-
-/*
- * These macros should be used after a pci_map_sg call has been done
- * to get bus addresses of each of the SG entries and their lengths.
- * You should only work with the number of sg entries pci_map_sg
- * returns.
- */
-#define sg_dma_address(sg)     ((sg)->dma_address)
-#define sg_dma_len(sg)         ((sg)->length)
-
-#endif /* _ASM_SCATTERLIST_H */
diff --git a/include/asm-mn10300/sections.h b/include/asm-mn10300/sections.h
deleted file mode 100644 (file)
index 2b8c516..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/sections.h>
diff --git a/include/asm-mn10300/sembuf.h b/include/asm-mn10300/sembuf.h
deleted file mode 100644 (file)
index 301f3f9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _ASM_SEMBUF_H
-#define _ASM_SEMBUF_H
-
-/*
- * The semid64_ds structure for MN10300 architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct semid64_ds {
-       struct ipc64_perm sem_perm;             /* permissions .. see ipc.h */
-       __kernel_time_t sem_otime;              /* last semop time */
-       unsigned long   __unused1;
-       __kernel_time_t sem_ctime;              /* last change time */
-       unsigned long   __unused2;
-       unsigned long   sem_nsems;              /* no. of semaphores in array */
-       unsigned long   __unused3;
-       unsigned long   __unused4;
-};
-
-#endif /* _ASM_SEMBUF_H */
diff --git a/include/asm-mn10300/serial-regs.h b/include/asm-mn10300/serial-regs.h
deleted file mode 100644 (file)
index 6498469..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/* MN10300 on-board serial port module registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_SERIAL_REGS_H
-#define _ASM_SERIAL_REGS_H
-
-#include <asm/cpu-regs.h>
-#include <asm/intctl-regs.h>
-
-#ifdef __KERNEL__
-
-/* serial port 0 */
-#define        SC0CTR                  __SYSREG(0xd4002000, u16)       /* control reg */
-#define        SC01CTR_CK              0x0007  /* clock source select */
-#define        SC0CTR_CK_TM8UFLOW_8    0x0000  /* - 1/8 timer 8 underflow (serial port 0 only) */
-#define        SC1CTR_CK_TM9UFLOW_8    0x0000  /* - 1/8 timer 9 underflow (serial port 1 only) */
-#define        SC01CTR_CK_IOCLK_8      0x0001  /* - 1/8 IOCLK */
-#define        SC01CTR_CK_IOCLK_32     0x0002  /* - 1/32 IOCLK */
-#define        SC0CTR_CK_TM2UFLOW_2    0x0003  /* - 1/2 timer 2 underflow (serial port 0 only) */
-#define        SC1CTR_CK_TM3UFLOW_2    0x0003  /* - 1/2 timer 3 underflow (serial port 1 only) */
-#define        SC0CTR_CK_TM0UFLOW_8    0x0004  /* - 1/8 timer 1 underflow (serial port 0 only) */
-#define        SC1CTR_CK_TM1UFLOW_8    0x0004  /* - 1/8 timer 2 underflow (serial port 1 only) */
-#define        SC0CTR_CK_TM2UFLOW_8    0x0005  /* - 1/8 timer 2 underflow (serial port 0 only) */
-#define        SC1CTR_CK_TM3UFLOW_8    0x0005  /* - 1/8 timer 3 underflow (serial port 1 only) */
-#define        SC01CTR_CK_EXTERN_8     0x0006  /* - 1/8 external closk */
-#define        SC01CTR_CK_EXTERN       0x0007  /* - external closk */
-#define        SC01CTR_STB             0x0008  /* stop bit select */
-#define        SC01CTR_STB_1BIT        0x0000  /* - 1 stop bit */
-#define        SC01CTR_STB_2BIT        0x0008  /* - 2 stop bits */
-#define        SC01CTR_PB              0x0070  /* parity bit select */
-#define        SC01CTR_PB_NONE         0x0000  /* - no parity */
-#define        SC01CTR_PB_FIXED0       0x0040  /* - fixed at 0 */
-#define        SC01CTR_PB_FIXED1       0x0050  /* - fixed at 1 */
-#define        SC01CTR_PB_EVEN         0x0060  /* - even parity */
-#define        SC01CTR_PB_ODD          0x0070  /* - odd parity */
-#define        SC01CTR_CLN             0x0080  /* character length */
-#define        SC01CTR_CLN_7BIT        0x0000  /* - 7 bit chars */
-#define        SC01CTR_CLN_8BIT        0x0080  /* - 8 bit chars */
-#define        SC01CTR_TOE             0x0100  /* T input output enable */
-#define        SC01CTR_OD              0x0200  /* bit order select */
-#define        SC01CTR_OD_LSBFIRST     0x0000  /* - LSB first */
-#define        SC01CTR_OD_MSBFIRST     0x0200  /* - MSB first */
-#define        SC01CTR_MD              0x0c00  /* mode select */
-#define SC01CTR_MD_STST_SYNC   0x0000  /* - start-stop synchronous */
-#define SC01CTR_MD_CLOCK_SYNC1 0x0400  /* - clock synchronous 1 */
-#define SC01CTR_MD_I2C         0x0800  /* - I2C mode */
-#define SC01CTR_MD_CLOCK_SYNC2 0x0c00  /* - clock synchronous 2 */
-#define        SC01CTR_IIC             0x1000  /* I2C mode select */
-#define        SC01CTR_BKE             0x2000  /* break transmit enable */
-#define        SC01CTR_RXE             0x4000  /* receive enable */
-#define        SC01CTR_TXE             0x8000  /* transmit enable */
-
-#define        SC0ICR                  __SYSREG(0xd4002004, u8)        /* interrupt control reg */
-#define SC01ICR_DMD            0x80    /* output data mode */
-#define SC01ICR_TD             0x20    /* transmit DMA trigger cause */
-#define SC01ICR_TI             0x10    /* transmit interrupt cause */
-#define SC01ICR_RES            0x04    /* receive error select */
-#define SC01ICR_RI             0x01    /* receive interrupt cause */
-
-#define        SC0TXB                  __SYSREG(0xd4002008, u8)        /* transmit buffer reg */
-#define        SC0RXB                  __SYSREG(0xd4002009, u8)        /* receive buffer reg */
-
-#define        SC0STR                  __SYSREG(0xd400200c, u16)       /* status reg */
-#define SC01STR_OEF            0x0001  /* overrun error found */
-#define SC01STR_PEF            0x0002  /* parity error found */
-#define SC01STR_FEF            0x0004  /* framing error found */
-#define SC01STR_RBF            0x0010  /* receive buffer status */
-#define SC01STR_TBF            0x0020  /* transmit buffer status */
-#define SC01STR_RXF            0x0040  /* receive status */
-#define SC01STR_TXF            0x0080  /* transmit status */
-#define SC01STR_STF            0x0100  /* I2C start sequence found */
-#define SC01STR_SPF            0x0200  /* I2C stop sequence found */
-
-#define SC0RXIRQ               20      /* timer 0 Receive IRQ */
-#define SC0TXIRQ               21      /* timer 0 Transmit IRQ */
-
-#define        SC0RXICR                GxICR(SC0RXIRQ) /* serial 0 receive intr ctrl reg */
-#define        SC0TXICR                GxICR(SC0TXIRQ) /* serial 0 transmit intr ctrl reg */
-
-/* serial port 1 */
-#define        SC1CTR                  __SYSREG(0xd4002010, u16)       /* serial port 1 control */
-#define        SC1ICR                  __SYSREG(0xd4002014, u8)        /* interrupt control reg */
-#define        SC1TXB                  __SYSREG(0xd4002018, u8)        /* transmit buffer reg */
-#define        SC1RXB                  __SYSREG(0xd4002019, u8)        /* receive buffer reg */
-#define        SC1STR                  __SYSREG(0xd400201c, u16)       /* status reg */
-
-#define SC1RXIRQ               22      /* timer 1 Receive IRQ */
-#define SC1TXIRQ               23      /* timer 1 Transmit IRQ */
-
-#define        SC1RXICR                GxICR(SC1RXIRQ) /* serial 1 receive intr ctrl reg */
-#define        SC1TXICR                GxICR(SC1TXIRQ) /* serial 1 transmit intr ctrl reg */
-
-/* serial port 2 */
-#define        SC2CTR                  __SYSREG(0xd4002020, u16)       /* control reg */
-#define        SC2CTR_CK               0x0003  /* clock source select */
-#define        SC2CTR_CK_TM10UFLOW     0x0000  /* - timer 10 underflow */
-#define        SC2CTR_CK_TM2UFLOW      0x0001  /* - timer 2 underflow */
-#define        SC2CTR_CK_EXTERN        0x0002  /* - external closk */
-#define        SC2CTR_CK_TM3UFLOW      0x0003  /* - timer 3 underflow */
-#define        SC2CTR_STB              0x0008  /* stop bit select */
-#define        SC2CTR_STB_1BIT         0x0000  /* - 1 stop bit */
-#define        SC2CTR_STB_2BIT         0x0008  /* - 2 stop bits */
-#define        SC2CTR_PB               0x0070  /* parity bit select */
-#define        SC2CTR_PB_NONE          0x0000  /* - no parity */
-#define        SC2CTR_PB_FIXED0        0x0040  /* - fixed at 0 */
-#define        SC2CTR_PB_FIXED1        0x0050  /* - fixed at 1 */
-#define        SC2CTR_PB_EVEN          0x0060  /* - even parity */
-#define        SC2CTR_PB_ODD           0x0070  /* - odd parity */
-#define        SC2CTR_CLN              0x0080  /* character length */
-#define        SC2CTR_CLN_7BIT         0x0000  /* - 7 bit chars */
-#define        SC2CTR_CLN_8BIT         0x0080  /* - 8 bit chars */
-#define        SC2CTR_TWE              0x0100  /* transmit wait enable (enable XCTS control) */
-#define        SC2CTR_OD               0x0200  /* bit order select */
-#define        SC2CTR_OD_LSBFIRST      0x0000  /* - LSB first */
-#define        SC2CTR_OD_MSBFIRST      0x0200  /* - MSB first */
-#define        SC2CTR_TWS              0x1000  /* transmit wait select */
-#define        SC2CTR_TWS_XCTS_HIGH    0x0000  /* - interrupt TX when XCTS high */
-#define        SC2CTR_TWS_XCTS_LOW     0x1000  /* - interrupt TX when XCTS low */
-#define        SC2CTR_BKE              0x2000  /* break transmit enable */
-#define        SC2CTR_RXE              0x4000  /* receive enable */
-#define        SC2CTR_TXE              0x8000  /* transmit enable */
-
-#define        SC2ICR                  __SYSREG(0xd4002024, u8)        /* interrupt control reg */
-#define SC2ICR_TD              0x20    /* transmit DMA trigger cause */
-#define SC2ICR_TI              0x10    /* transmit interrupt cause */
-#define SC2ICR_RES             0x04    /* receive error select */
-#define SC2ICR_RI              0x01    /* receive interrupt cause */
-
-#define        SC2TXB                  __SYSREG(0xd4002018, u8)        /* transmit buffer reg */
-#define        SC2RXB                  __SYSREG(0xd4002019, u8)        /* receive buffer reg */
-#define        SC2STR                  __SYSREG(0xd400201c, u8)        /* status reg */
-#define SC2STR_OEF             0x0001  /* overrun error found */
-#define SC2STR_PEF             0x0002  /* parity error found */
-#define SC2STR_FEF             0x0004  /* framing error found */
-#define SC2STR_CTS             0x0008  /* XCTS input pin status (0 means high) */
-#define SC2STR_RBF             0x0010  /* receive buffer status */
-#define SC2STR_TBF             0x0020  /* transmit buffer status */
-#define SC2STR_RXF             0x0040  /* receive status */
-#define SC2STR_TXF             0x0080  /* transmit status */
-
-#define        SC2TIM                  __SYSREG(0xd400202d, u8)        /* status reg */
-
-#define SC2RXIRQ               24      /* serial 2 Receive IRQ */
-#define SC2TXIRQ               25      /* serial 2 Transmit IRQ */
-
-#define        SC2RXICR                GxICR(SC2RXIRQ) /* serial 2 receive intr ctrl reg */
-#define        SC2TXICR                GxICR(SC2TXIRQ) /* serial 2 transmit intr ctrl reg */
-
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_SERIAL_REGS_H */
diff --git a/include/asm-mn10300/serial.h b/include/asm-mn10300/serial.h
deleted file mode 100644 (file)
index 99785a9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Standard UART definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-/*
- * The ASB2305 has an 18.432 MHz clock the UART
- */
-#define BASE_BAUD      (18432000 / 16)
-
-/* Standard COM flags (except for COM4, because of the 8514 problem) */
-#ifdef CONFIG_SERIAL_DETECT_IRQ
-#define STD_COM_FLAGS  (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
-#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
-#else
-#define STD_COM_FLAGS  (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
-#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
-#endif
-
-#ifdef CONFIG_SERIAL_MANY_PORTS
-#define FOURPORT_FLAGS ASYNC_FOURPORT
-#define ACCENT_FLAGS   0
-#define BOCA_FLAGS     0
-#define HUB6_FLAGS     0
-#define RS_TABLE_SIZE  64
-#else
-#define RS_TABLE_SIZE
-#endif
-
-#include <asm/unit/serial.h>
diff --git a/include/asm-mn10300/setup.h b/include/asm-mn10300/setup.h
deleted file mode 100644 (file)
index 08356c8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* MN10300 Setup declarations
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SETUP_H
-#define _ASM_SETUP_H
-
-extern void __init unit_setup(void);
-extern void __init unit_init_IRQ(void);
-
-#endif /* _ASM_SETUP_H */
diff --git a/include/asm-mn10300/shmbuf.h b/include/asm-mn10300/shmbuf.h
deleted file mode 100644 (file)
index 8f300cc..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _ASM_SHMBUF_H
-#define _ASM_SHMBUF_H
-
-/*
- * The shmid64_ds structure for MN10300 architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct shmid64_ds {
-       struct ipc64_perm       shm_perm;       /* operation perms */
-       size_t                  shm_segsz;      /* size of segment (bytes) */
-       __kernel_time_t         shm_atime;      /* last attach time */
-       unsigned long           __unused1;
-       __kernel_time_t         shm_dtime;      /* last detach time */
-       unsigned long           __unused2;
-       __kernel_time_t         shm_ctime;      /* last change time */
-       unsigned long           __unused3;
-       __kernel_pid_t          shm_cpid;       /* pid of creator */
-       __kernel_pid_t          shm_lpid;       /* pid of last operator */
-       unsigned long           shm_nattch;     /* no. of current attaches */
-       unsigned long           __unused4;
-       unsigned long           __unused5;
-};
-
-struct shminfo64 {
-       unsigned long   shmmax;
-       unsigned long   shmmin;
-       unsigned long   shmmni;
-       unsigned long   shmseg;
-       unsigned long   shmall;
-       unsigned long   __unused1;
-       unsigned long   __unused2;
-       unsigned long   __unused3;
-       unsigned long   __unused4;
-};
-
-#endif /* _ASM_SHMBUF_H */
diff --git a/include/asm-mn10300/shmparam.h b/include/asm-mn10300/shmparam.h
deleted file mode 100644 (file)
index ab666ed..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_SHMPARAM_H
-#define _ASM_SHMPARAM_H
-
-#define        SHMLBA PAGE_SIZE                 /* attach addr a multiple of this */
-
-#endif /* _ASM_SHMPARAM_H */
diff --git a/include/asm-mn10300/sigcontext.h b/include/asm-mn10300/sigcontext.h
deleted file mode 100644 (file)
index 4de3aff..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* MN10300 Userspace signal context
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SIGCONTEXT_H
-#define _ASM_SIGCONTEXT_H
-
-struct fpucontext {
-       /* Regular FPU environment */
-       unsigned long   fs[32];         /* fpu registers */
-       unsigned long   fpcr;           /* fpu control register */
-};
-
-struct sigcontext {
-       unsigned long   d0;
-       unsigned long   d1;
-       unsigned long   d2;
-       unsigned long   d3;
-       unsigned long   a0;
-       unsigned long   a1;
-       unsigned long   a2;
-       unsigned long   a3;
-       unsigned long   e0;
-       unsigned long   e1;
-       unsigned long   e2;
-       unsigned long   e3;
-       unsigned long   e4;
-       unsigned long   e5;
-       unsigned long   e6;
-       unsigned long   e7;
-       unsigned long   lar;
-       unsigned long   lir;
-       unsigned long   mdr;
-       unsigned long   mcvf;
-       unsigned long   mcrl;
-       unsigned long   mcrh;
-       unsigned long   mdrq;
-       unsigned long   sp;
-       unsigned long   epsw;
-       unsigned long   pc;
-       struct fpucontext *fpucontext;
-       unsigned long   oldmask;
-};
-
-
-#endif /* _ASM_SIGCONTEXT_H */
diff --git a/include/asm-mn10300/siginfo.h b/include/asm-mn10300/siginfo.h
deleted file mode 100644 (file)
index 0815d29..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/siginfo.h>
diff --git a/include/asm-mn10300/signal.h b/include/asm-mn10300/signal.h
deleted file mode 100644 (file)
index e98817c..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/* MN10300 Signal definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SIGNAL_H
-#define _ASM_SIGNAL_H
-
-#include <linux/types.h>
-
-/* Avoid too many header ordering problems.  */
-struct siginfo;
-
-#ifdef __KERNEL__
-/* Most things should be clean enough to redefine this at will, if care
-   is taken to make libc match.  */
-
-#define _NSIG          64
-#define _NSIG_BPW      32
-#define _NSIG_WORDS    (_NSIG / _NSIG_BPW)
-
-typedef unsigned long old_sigset_t;            /* at least 32 bits */
-
-typedef struct {
-       unsigned long   sig[_NSIG_WORDS];
-} sigset_t;
-
-#else
-/* Here we must cater to libcs that poke about in kernel headers.  */
-
-#define NSIG           32
-typedef unsigned long sigset_t;
-
-#endif /* __KERNEL__ */
-
-#define SIGHUP          1
-#define SIGINT          2
-#define SIGQUIT                 3
-#define SIGILL          4
-#define SIGTRAP                 5
-#define SIGABRT                 6
-#define SIGIOT          6
-#define SIGBUS          7
-#define SIGFPE          8
-#define SIGKILL                 9
-#define SIGUSR1                10
-#define SIGSEGV                11
-#define SIGUSR2                12
-#define SIGPIPE                13
-#define SIGALRM                14
-#define SIGTERM                15
-#define SIGSTKFLT      16
-#define SIGCHLD                17
-#define SIGCONT                18
-#define SIGSTOP                19
-#define SIGTSTP                20
-#define SIGTTIN                21
-#define SIGTTOU                22
-#define SIGURG         23
-#define SIGXCPU                24
-#define SIGXFSZ                25
-#define SIGVTALRM      26
-#define SIGPROF                27
-#define SIGWINCH       28
-#define SIGIO          29
-#define SIGPOLL                SIGIO
-/*
-#define SIGLOST                29
-*/
-#define SIGPWR         30
-#define SIGSYS         31
-#define        SIGUNUSED       31
-
-/* These should not be considered constants from userland.  */
-#define SIGRTMIN       32
-#define SIGRTMAX       (_NSIG-1)
-
-/*
- * SA_FLAGS values:
- *
- * SA_ONSTACK indicates that a registered stack_t will be used.
- * SA_RESTART flag to get restarting signals (which were the default long ago)
- * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
- * SA_RESETHAND clears the handler when the signal is delivered.
- * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
- * SA_NODEFER prevents the current signal from being masked in the handler.
- *
- * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
- * Unix names RESETHAND and NODEFER respectively.
- */
-#define SA_NOCLDSTOP   0x00000001U
-#define SA_NOCLDWAIT   0x00000002U
-#define SA_SIGINFO     0x00000004U
-#define SA_ONSTACK     0x08000000U
-#define SA_RESTART     0x10000000U
-#define SA_NODEFER     0x40000000U
-#define SA_RESETHAND   0x80000000U
-
-#define SA_NOMASK      SA_NODEFER
-#define SA_ONESHOT     SA_RESETHAND
-
-#define SA_RESTORER    0x04000000
-
-/*
- * sigaltstack controls
- */
-#define SS_ONSTACK     1
-#define SS_DISABLE     2
-
-#define MINSIGSTKSZ    2048
-#define SIGSTKSZ       8192
-
-#include <asm-generic/signal.h>
-
-#ifdef __KERNEL__
-struct old_sigaction {
-       __sighandler_t sa_handler;
-       old_sigset_t sa_mask;
-       unsigned long sa_flags;
-       __sigrestore_t sa_restorer;
-};
-
-struct sigaction {
-       __sighandler_t sa_handler;
-       unsigned long sa_flags;
-       __sigrestore_t sa_restorer;
-       sigset_t sa_mask;               /* mask last for extensibility */
-};
-
-struct k_sigaction {
-       struct sigaction sa;
-};
-#else
-/* Here we must cater to libcs that poke about in kernel headers.  */
-
-struct sigaction {
-       union {
-         __sighandler_t _sa_handler;
-         void (*_sa_sigaction)(int, struct siginfo *, void *);
-       } _u;
-       sigset_t sa_mask;
-       unsigned long sa_flags;
-       void (*sa_restorer)(void);
-};
-
-#define sa_handler     _u._sa_handler
-#define sa_sigaction   _u._sa_sigaction
-
-#endif /* __KERNEL__ */
-
-typedef struct sigaltstack {
-       void __user     *ss_sp;
-       int             ss_flags;
-       size_t          ss_size;
-} stack_t;
-
-#ifdef __KERNEL__
-#include <asm/sigcontext.h>
-
-
-struct pt_regs;
-#define ptrace_signal_deliver(regs, cookie) do { } while (0)
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_SIGNAL_H */
diff --git a/include/asm-mn10300/smp.h b/include/asm-mn10300/smp.h
deleted file mode 100644 (file)
index 4eb8c61..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* MN10300 SMP support
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SMP_H
-#define _ASM_SMP_H
-
-#ifdef CONFIG_SMP
-#error SMP not yet supported for MN10300
-#endif
-
-#endif
diff --git a/include/asm-mn10300/socket.h b/include/asm-mn10300/socket.h
deleted file mode 100644 (file)
index fb5daf4..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _ASM_SOCKET_H
-#define _ASM_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* For setsockopt(2) */
-#define SOL_SOCKET     1
-
-#define SO_DEBUG       1
-#define SO_REUSEADDR   2
-#define SO_TYPE                3
-#define SO_ERROR       4
-#define SO_DONTROUTE   5
-#define SO_BROADCAST   6
-#define SO_SNDBUF      7
-#define SO_RCVBUF      8
-#define SO_SNDBUFFORCE 32
-#define SO_RCVBUFFORCE 33
-#define SO_KEEPALIVE   9
-#define SO_OOBINLINE   10
-#define SO_NO_CHECK    11
-#define SO_PRIORITY    12
-#define SO_LINGER      13
-#define SO_BSDCOMPAT   14
-/* To add :#define SO_REUSEPORT 15 */
-#define SO_PASSCRED    16
-#define SO_PEERCRED    17
-#define SO_RCVLOWAT    18
-#define SO_SNDLOWAT    19
-#define SO_RCVTIMEO    20
-#define SO_SNDTIMEO    21
-
-/* Security levels - as per NRL IPv6 - don't actually do anything */
-#define SO_SECURITY_AUTHENTICATION             22
-#define SO_SECURITY_ENCRYPTION_TRANSPORT       23
-#define SO_SECURITY_ENCRYPTION_NETWORK         24
-
-#define SO_BINDTODEVICE        25
-
-/* Socket filtering */
-#define SO_ATTACH_FILTER        26
-#define SO_DETACH_FILTER        27
-
-#define SO_PEERNAME            28
-#define SO_TIMESTAMP           29
-#define SCM_TIMESTAMP          SO_TIMESTAMP
-
-#define SO_ACCEPTCONN          30
-
-#define SO_PEERSEC             31
-#define SO_PASSSEC             34
-#define SO_TIMESTAMPNS         35
-#define SCM_TIMESTAMPNS                SO_TIMESTAMPNS
-
-#define SO_MARK                        36
-
-#define SO_TIMESTAMPING                37
-#define SCM_TIMESTAMPING       SO_TIMESTAMPING
-
-#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-mn10300/sockios.h b/include/asm-mn10300/sockios.h
deleted file mode 100644 (file)
index b03043a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _ASM_SOCKIOS_H
-#define _ASM_SOCKIOS_H
-
-/* Socket-level I/O control calls. */
-#define FIOSETOWN      0x8901
-#define SIOCSPGRP      0x8902
-#define FIOGETOWN      0x8903
-#define SIOCGPGRP      0x8904
-#define SIOCATMARK     0x8905
-#define SIOCGSTAMP     0x8906          /* Get stamp */
-#define SIOCGSTAMPNS   0x8907          /* Get stamp (timespec) */
-
-#endif /* _ASM_SOCKIOS_H */
diff --git a/include/asm-mn10300/spinlock.h b/include/asm-mn10300/spinlock.h
deleted file mode 100644 (file)
index 4bf9c8b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* MN10300 spinlock support
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SPINLOCK_H
-#define _ASM_SPINLOCK_H
-
-#error SMP spinlocks not implemented for MN10300
-
-#endif /* _ASM_SPINLOCK_H */
diff --git a/include/asm-mn10300/stat.h b/include/asm-mn10300/stat.h
deleted file mode 100644 (file)
index 63ff837..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef _ASM_STAT_H
-#define _ASM_STAT_H
-
-struct __old_kernel_stat {
-       unsigned short st_dev;
-       unsigned short st_ino;
-       unsigned short st_mode;
-       unsigned short st_nlink;
-       unsigned short st_uid;
-       unsigned short st_gid;
-       unsigned short st_rdev;
-       unsigned long  st_size;
-       unsigned long  st_atime;
-       unsigned long  st_mtime;
-       unsigned long  st_ctime;
-};
-
-struct stat {
-       unsigned long  st_dev;
-       unsigned long  st_ino;
-       unsigned short st_mode;
-       unsigned short st_nlink;
-       unsigned short st_uid;
-       unsigned short st_gid;
-       unsigned long  st_rdev;
-       unsigned long  st_size;
-       unsigned long  st_blksize;
-       unsigned long  st_blocks;
-       unsigned long  st_atime;
-       unsigned long  st_atime_nsec;
-       unsigned long  st_mtime;
-       unsigned long  st_mtime_nsec;
-       unsigned long  st_ctime;
-       unsigned long  st_ctime_nsec;
-       unsigned long  __unused4;
-       unsigned long  __unused5;
-};
-
-/* This matches struct stat64 in glibc2.1, hence the absolutely
- * insane amounts of padding around dev_t's.
- */
-struct stat64 {
-       unsigned long long      st_dev;
-       unsigned char   __pad0[4];
-
-#define STAT64_HAS_BROKEN_ST_INO       1
-       unsigned long   __st_ino;
-
-       unsigned int    st_mode;
-       unsigned int    st_nlink;
-
-       unsigned long   st_uid;
-       unsigned long   st_gid;
-
-       unsigned long long      st_rdev;
-       unsigned char   __pad3[4];
-
-       long long       st_size;
-       unsigned long   st_blksize;
-
-       unsigned long   st_blocks;      /* Number 512-byte blocks allocated. */
-       unsigned long   __pad4;         /* future possible st_blocks high bits */
-
-       unsigned long   st_atime;
-       unsigned long   st_atime_nsec;
-
-       unsigned long   st_mtime;
-       unsigned int    st_mtime_nsec;
-
-       unsigned long   st_ctime;
-       unsigned long   st_ctime_nsec;
-
-       unsigned long long      st_ino;
-};
-
-#define STAT_HAVE_NSEC 1
-
-#endif /* _ASM_STAT_H */
diff --git a/include/asm-mn10300/statfs.h b/include/asm-mn10300/statfs.h
deleted file mode 100644 (file)
index 0b91fe1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/statfs.h>
diff --git a/include/asm-mn10300/string.h b/include/asm-mn10300/string.h
deleted file mode 100644 (file)
index 47dbd43..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* MN10300 Optimised string functions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Modified by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_STRING_H
-#define _ASM_STRING_H
-
-#define __HAVE_ARCH_MEMSET
-#define __HAVE_ARCH_MEMCPY
-#define __HAVE_ARCH_MEMMOVE
-
-extern void *memset(void *dest, int ch, size_t count);
-extern void *memcpy(void *dest, const void *src, size_t count);
-extern void *memmove(void *dest, const void *src, size_t count);
-
-
-extern void __struct_cpy_bug(void);
-#define struct_cpy(x, y)                       \
-({                                              \
-       if (sizeof(*(x)) != sizeof(*(y)))       \
-               __struct_cpy_bug;               \
-       memcpy(x, y, sizeof(*(x)));             \
-})
-
-#endif /* _ASM_STRING_H */
diff --git a/include/asm-mn10300/swab.h b/include/asm-mn10300/swab.h
deleted file mode 100644 (file)
index bd818a8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* MN10300 Byte-order primitive construction
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SWAB_H
-#define _ASM_SWAB_H
-
-#include <linux/types.h>
-
-#ifdef __GNUC__
-
-static inline __attribute__((const))
-__u32 __arch_swab32(__u32 x)
-{
-       __u32 ret;
-       asm("swap %1,%0" : "=r" (ret) : "r" (x));
-       return ret;
-}
-#define __arch_swab32 __arch_swab32
-
-static inline __attribute__((const))
-__u16 __arch_swab16(__u16 x)
-{
-       __u16 ret;
-       asm("swaph %1,%0" : "=r" (ret) : "r" (x));
-       return ret;
-}
-#define __arch_swab32 __arch_swab32
-
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#  define __SWAB_64_THRU_32__
-#endif
-
-#endif /* __GNUC__ */
-
-#endif /* _ASM_SWAB_H */
diff --git a/include/asm-mn10300/system.h b/include/asm-mn10300/system.h
deleted file mode 100644 (file)
index 8214fb7..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-/* MN10300 System definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_SYSTEM_H
-#define _ASM_SYSTEM_H
-
-#include <asm/cpu-regs.h>
-
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
-#include <linux/kernel.h>
-
-struct task_struct;
-struct thread_struct;
-
-extern asmlinkage
-struct task_struct *__switch_to(struct thread_struct *prev,
-                               struct thread_struct *next,
-                               struct task_struct *prev_task);
-
-/* context switching is now performed out-of-line in switch_to.S */
-#define switch_to(prev, next, last)                                    \
-do {                                                                   \
-       current->thread.wchan = (u_long) __builtin_return_address(0);   \
-       (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
-       mb();                                                           \
-       current->thread.wchan = 0;                                      \
-} while (0)
-
-#define arch_align_stack(x) (x)
-
-#define nop() asm volatile ("nop")
-
-#endif /* !__ASSEMBLY__ */
-
-/*
- * Force strict CPU ordering.
- * And yes, this is required on UP too when we're talking
- * to devices.
- *
- * For now, "wmb()" doesn't actually do anything, as all
- * Intel CPU's follow what Intel calls a *Processor Order*,
- * in which all writes are seen in the program order even
- * outside the CPU.
- *
- * I expect future Intel CPU's to have a weaker ordering,
- * but I'd also expect them to finally get their act together
- * and add some real memory barriers if so.
- *
- * Some non intel clones support out of order store. wmb() ceases to be a
- * nop for these.
- */
-
-#define mb()   asm volatile ("": : :"memory")
-#define rmb()  mb()
-#define wmb()  asm volatile ("": : :"memory")
-
-#ifdef CONFIG_SMP
-#define smp_mb()       mb()
-#define smp_rmb()      rmb()
-#define smp_wmb()      wmb()
-#else
-#define smp_mb()       barrier()
-#define smp_rmb()      barrier()
-#define smp_wmb()      barrier()
-#endif
-
-#define set_mb(var, value)  do { var = value;  mb(); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
-
-#define read_barrier_depends()         do {} while (0)
-#define smp_read_barrier_depends()     do {} while (0)
-
-/*****************************************************************************/
-/*
- * interrupt control
- * - "disabled": run in IM1/2
- *   - level 0 - GDB stub
- *   - level 1 - virtual serial DMA (if present)
- *   - level 5 - normal interrupt priority
- *   - level 6 - timer interrupt
- * - "enabled":  run in IM7
- */
-#ifdef CONFIG_MN10300_TTYSM
-#define MN10300_CLI_LEVEL      EPSW_IM_2
-#else
-#define MN10300_CLI_LEVEL      EPSW_IM_1
-#endif
-
-#define local_save_flags(x)                    \
-do {                                           \
-       typecheck(unsigned long, x);            \
-       asm volatile(                           \
-               "       mov epsw,%0     \n"     \
-               : "=d"(x)                       \
-               );                              \
-} while (0)
-
-#define local_irq_disable()                                            \
-do {                                                                   \
-       asm volatile(                                                   \
-               "       and %0,epsw     \n"                             \
-               "       or %1,epsw      \n"                             \
-               "       nop             \n"                             \
-               "       nop             \n"                             \
-               "       nop             \n"                             \
-               :                                                       \
-               : "i"(~EPSW_IM), "i"(EPSW_IE | MN10300_CLI_LEVEL)       \
-               );                                                      \
-} while (0)
-
-#define local_irq_save(x)                      \
-do {                                           \
-       local_save_flags(x);                    \
-       local_irq_disable();                    \
-} while (0)
-
-/*
- * we make sure local_irq_enable() doesn't cause priority inversion
- */
-#ifndef __ASSEMBLY__
-
-extern unsigned long __mn10300_irq_enabled_epsw;
-
-#endif
-
-#define local_irq_enable()                                             \
-do {                                                                   \
-       unsigned long tmp;                                              \
-                                                                       \
-       asm volatile(                                                   \
-               "       mov     epsw,%0         \n"                     \
-               "       and     %1,%0           \n"                     \
-               "       or      %2,%0           \n"                     \
-               "       mov     %0,epsw         \n"                     \
-               : "=&d"(tmp)                                            \
-               : "i"(~EPSW_IM), "r"(__mn10300_irq_enabled_epsw)        \
-               );                                                      \
-} while (0)
-
-#define local_irq_restore(x)                   \
-do {                                           \
-       typecheck(unsigned long, x);            \
-       asm volatile(                           \
-               "       mov %0,epsw     \n"     \
-               "       nop             \n"     \
-               "       nop             \n"     \
-               "       nop             \n"     \
-               :                               \
-               : "d"(x)                        \
-               : "memory", "cc"                \
-               );                              \
-} while (0)
-
-#define irqs_disabled()                                \
-({                                             \
-       unsigned long flags;                    \
-       local_save_flags(flags);                \
-       (flags & EPSW_IM) <= MN10300_CLI_LEVEL; \
-})
-
-/* hook to save power by halting the CPU
- * - called from the idle loop
- * - must reenable interrupts (which takes three instruction cycles to complete)
- */
-#define safe_halt()                                                    \
-do {                                                                   \
-       asm volatile("  or      %0,epsw \n"                             \
-                    "  nop             \n"                             \
-                    "  nop             \n"                             \
-                    "  bset    %2,(%1) \n"                             \
-                    :                                                  \
-                    : "i"(EPSW_IE|EPSW_IM), "n"(&CPUM), "i"(CPUM_SLEEP)\
-                    : "cc"                                             \
-                    );                                                 \
-} while (0)
-
-#define STI    or EPSW_IE|EPSW_IM,epsw
-#define CLI    and ~EPSW_IM,epsw; or EPSW_IE|MN10300_CLI_LEVEL,epsw; nop; nop; nop
-
-/*****************************************************************************/
-/*
- * MN10300 doesn't actually have an exchange instruction
- */
-#ifndef __ASSEMBLY__
-
-struct __xchg_dummy { unsigned long a[100]; };
-#define __xg(x) ((struct __xchg_dummy *)(x))
-
-static inline
-unsigned long __xchg(volatile unsigned long *m, unsigned long val)
-{
-       unsigned long retval;
-       unsigned long flags;
-
-       local_irq_save(flags);
-       retval = *m;
-       *m = val;
-       local_irq_restore(flags);
-       return retval;
-}
-
-#define xchg(ptr, v)                                           \
-       ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr),    \
-                                    (unsigned long)(v)))
-
-static inline unsigned long __cmpxchg(volatile unsigned long *m,
-                                     unsigned long old, unsigned long new)
-{
-       unsigned long retval;
-       unsigned long flags;
-
-       local_irq_save(flags);
-       retval = *m;
-       if (retval == old)
-               *m = new;
-       local_irq_restore(flags);
-       return retval;
-}
-
-#define cmpxchg(ptr, o, n)                                     \
-       ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \
-                                       (unsigned long)(o),     \
-                                       (unsigned long)(n)))
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-#endif /* _ASM_SYSTEM_H */
diff --git a/include/asm-mn10300/termbits.h b/include/asm-mn10300/termbits.h
deleted file mode 100644 (file)
index eb2b0dc..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-#ifndef _ASM_TERMBITS_H
-#define _ASM_TERMBITS_H
-
-#include <linux/posix_types.h>
-
-typedef unsigned char  cc_t;
-typedef unsigned int   speed_t;
-typedef unsigned int   tcflag_t;
-
-#define NCCS 19
-struct termios {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-};
-
-struct termios2 {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       speed_t c_ispeed;               /* input speed */
-       speed_t c_ospeed;               /* output speed */
-};
-
-struct ktermios {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       speed_t c_ispeed;               /* input speed */
-       speed_t c_ospeed;               /* output speed */
-};
-
-/* c_cc characters */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VEOL 11
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-#define VEOL2 16
-
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK  0000020
-#define ISTRIP 0000040
-#define INLCR  0000100
-#define IGNCR  0000200
-#define ICRNL  0000400
-#define IUCLC  0001000
-#define IXON   0002000
-#define IXANY  0004000
-#define IXOFF  0010000
-#define IMAXBEL        0020000
-#define IUTF8  0040000
-
-/* c_oflag bits */
-#define OPOST  0000001
-#define OLCUC  0000002
-#define ONLCR  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#define NLDLY  0000400
-#define   NL0  0000000
-#define   NL1  0000400
-#define CRDLY  0003000
-#define   CR0  0000000
-#define   CR1  0001000
-#define   CR2  0002000
-#define   CR3  0003000
-#define TABDLY 0014000
-#define   TAB0 0000000
-#define   TAB1 0004000
-#define   TAB2 0010000
-#define   TAB3 0014000
-#define   XTABS        0014000
-#define BSDLY  0020000
-#define   BS0  0000000
-#define   BS1  0020000
-#define VTDLY  0040000
-#define   VT0  0000000
-#define   VT1  0040000
-#define FFDLY  0100000
-#define   FF0  0000000
-#define   FF1  0100000
-
-/* c_cflag bit meaning */
-#define CBAUD  0010017
-#define  B0    0000000         /* hang up */
-#define  B50   0000001
-#define  B75   0000002
-#define  B110  0000003
-#define  B134  0000004
-#define  B150  0000005
-#define  B200  0000006
-#define  B300  0000007
-#define  B600  0000010
-#define  B1200 0000011
-#define  B1800 0000012
-#define  B2400 0000013
-#define  B4800 0000014
-#define  B9600 0000015
-#define  B19200        0000016
-#define  B38400        0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CSIZE  0000060
-#define   CS5  0000000
-#define   CS6  0000020
-#define   CS7  0000040
-#define   CS8  0000060
-#define CSTOPB 0000100
-#define CREAD  0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL  0002000
-#define CLOCAL 0004000
-#define CBAUDEX 0010000
-#define   BOTHER  0010000
-#define    B57600 0010001
-#define   B115200 0010002
-#define   B230400 0010003
-#define   B460800 0010004
-#define   B500000 0010005
-#define   B576000 0010006
-#define   B921600 0010007
-#define  B1000000 0010010
-#define  B1152000 0010011
-#define  B1500000 0010012
-#define  B2000000 0010013
-#define  B2500000 0010014
-#define  B3000000 0010015
-#define  B3500000 0010016
-#define  B4000000 0010017
-#define CIBAUD   002003600000  /* input baud rate (not used) */
-#define CTVB     004000000000          /* VisioBraille Terminal flow control */
-#define CMSPAR   010000000000          /* mark or space (stick) parity */
-#define CRTSCTS          020000000000          /* flow control */
-
-#define IBSHIFT          16            /* Shift from CBAUD to CIBAUD */
-
-/* c_lflag bits */
-#define ISIG   0000001
-#define ICANON 0000002
-#define XCASE  0000004
-#define ECHO   0000010
-#define ECHOE  0000020
-#define ECHOK  0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define TOSTOP 0000400
-#define ECHOCTL        0001000
-#define ECHOPRT        0002000
-#define ECHOKE 0004000
-#define FLUSHO 0010000
-#define PENDIN 0040000
-#define IEXTEN 0100000
-
-/* tcflow() and TCXONC use these */
-#define        TCOOFF          0
-#define        TCOON           1
-#define        TCIOFF          2
-#define        TCION           3
-
-/* tcflush() and TCFLSH use these */
-#define        TCIFLUSH        0
-#define        TCOFLUSH        1
-#define        TCIOFLUSH       2
-
-/* tcsetattr uses these */
-#define        TCSANOW         0
-#define        TCSADRAIN       1
-#define        TCSAFLUSH       2
-
-#endif /* _ASM_TERMBITS_H */
diff --git a/include/asm-mn10300/termios.h b/include/asm-mn10300/termios.h
deleted file mode 100644 (file)
index dd7cf61..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#ifndef _ASM_TERMIOS_H
-#define _ASM_TERMIOS_H
-
-#include <asm/termbits.h>
-#include <asm/ioctls.h>
-
-struct winsize {
-       unsigned short ws_row;
-       unsigned short ws_col;
-       unsigned short ws_xpixel;
-       unsigned short ws_ypixel;
-};
-
-#define NCC 8
-struct termio {
-       unsigned short c_iflag;         /* input mode flags */
-       unsigned short c_oflag;         /* output mode flags */
-       unsigned short c_cflag;         /* control mode flags */
-       unsigned short c_lflag;         /* local mode flags */
-       unsigned char c_line;           /* line discipline */
-       unsigned char c_cc[NCC];        /* control characters */
-};
-
-#ifdef __KERNEL__
-/*     intr=^C         quit=^|         erase=del       kill=^U
-       eof=^D          vtime=\0        vmin=\1         sxtc=\0
-       start=^Q        stop=^S         susp=^Z         eol=\0
-       reprint=^R      discard=^U      werase=^W       lnext=^V
-       eol2=\0
-*/
-#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
-#endif
-
-/* modem lines */
-#define TIOCM_LE       0x001
-#define TIOCM_DTR      0x002
-#define TIOCM_RTS      0x004
-#define TIOCM_ST       0x008
-#define TIOCM_SR       0x010
-#define TIOCM_CTS      0x020
-#define TIOCM_CAR      0x040
-#define TIOCM_RNG      0x080
-#define TIOCM_DSR      0x100
-#define TIOCM_CD       TIOCM_CAR
-#define TIOCM_RI       TIOCM_RNG
-#define TIOCM_OUT1     0x2000
-#define TIOCM_OUT2     0x4000
-#define TIOCM_LOOP     0x8000
-
-#define TIOCM_MODEM_BITS       TIOCM_OUT2      /* IRDA support */
-
-/*
- * Translate a "termio" structure into a "termios". Ugh.
- */
-#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
-       unsigned short __tmp; \
-       get_user(__tmp, &(termio)->x); \
-       *(unsigned short *) &(termios)->x = __tmp; \
-}
-
-#define user_termio_to_kernel_termios(termios, termio) \
-({ \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
-       copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
-})
-
-/*
- * Translate a "termios" structure into a "termio". Ugh.
- */
-#define kernel_termios_to_user_termio(termio, termios) \
-({ \
-       put_user((termios)->c_iflag, &(termio)->c_iflag); \
-       put_user((termios)->c_oflag, &(termio)->c_oflag); \
-       put_user((termios)->c_cflag, &(termio)->c_cflag); \
-       put_user((termios)->c_lflag, &(termio)->c_lflag); \
-       put_user((termios)->c_line,  &(termio)->c_line); \
-       copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
-})
-
-#define user_termios_to_kernel_termios(k, u) \
-       copy_from_user(k, u, sizeof(struct termios2))
-#define kernel_termios_to_user_termios(u, k) \
-       copy_to_user(u, k, sizeof(struct termios2))
-#define user_termios_to_kernel_termios_1(k, u) \
-       copy_from_user(k, u, sizeof(struct termios))
-#define kernel_termios_to_user_termios_1(u, k) \
-       copy_to_user(u, k, sizeof(struct termios))
-
-#endif /* _ASM_TERMIOS_H */
diff --git a/include/asm-mn10300/thread_info.h b/include/asm-mn10300/thread_info.h
deleted file mode 100644 (file)
index 78a3881..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/* MN10300 Low-level thread information
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_THREAD_INFO_H
-#define _ASM_THREAD_INFO_H
-
-#ifdef __KERNEL__
-
-#include <asm/page.h>
-
-#ifndef __ASSEMBLY__
-#include <asm/processor.h>
-#endif
-
-#define PREEMPT_ACTIVE         0x10000000
-
-#ifdef CONFIG_4KSTACKS
-#define THREAD_SIZE            (4096)
-#else
-#define THREAD_SIZE            (8192)
-#endif
-
-#define STACK_WARN             (THREAD_SIZE / 8)
-
-/*
- * low level task data that entry.S needs immediate access to
- * - this struct should fit entirely inside of one cache line
- * - this struct shares the supervisor stack pages
- * - if the contents of this structure are changed, the assembly constants
- *   must also be changed
- */
-#ifndef __ASSEMBLY__
-
-struct thread_info {
-       struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
-       unsigned long           flags;          /* low level flags */
-       __u32                   cpu;            /* current CPU */
-       __s32                   preempt_count;  /* 0 => preemptable, <0 => BUG */
-
-       mm_segment_t            addr_limit;     /* thread address space:
-                                                  0-0xBFFFFFFF for user-thead
-                                                  0-0xFFFFFFFF for kernel-thread
-                                               */
-       struct restart_block    restart_block;
-
-       __u8                    supervisor_stack[0];
-};
-
-#else /* !__ASSEMBLY__ */
-
-#ifndef __ASM_OFFSETS_H__
-#include <asm/asm-offsets.h>
-#endif
-
-#endif
-
-/*
- * macros/functions for gaining access to the thread information structure
- *
- * preempt_count needs to be 1 initially, until the scheduler is functional.
- */
-#ifndef __ASSEMBLY__
-
-#define INIT_THREAD_INFO(tsk)                  \
-{                                              \
-       .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
-       .flags          = 0,                    \
-       .cpu            = 0,                    \
-       .preempt_count  = 1,                    \
-       .addr_limit     = KERNEL_DS,            \
-       .restart_block = {                      \
-               .fn = do_no_restart_syscall,    \
-       },                                      \
-}
-
-#define init_thread_info       (init_thread_union.thread_info)
-#define init_stack             (init_thread_union.stack)
-#define init_uregs                                                     \
-       ((struct pt_regs *)                                             \
-        ((unsigned long) init_stack + THREAD_SIZE - sizeof(struct pt_regs)))
-
-extern struct thread_info *__current_ti;
-
-/* how to get the thread information struct from C */
-static inline __attribute__((const))
-struct thread_info *current_thread_info(void)
-{
-       struct thread_info *ti;
-       asm("mov sp,%0\n"
-           "and %1,%0\n"
-           : "=d" (ti)
-           : "i" (~(THREAD_SIZE - 1))
-           : "cc");
-       return ti;
-}
-
-/* how to get the current stack pointer from C */
-static inline unsigned long current_stack_pointer(void)
-{
-       unsigned long sp;
-       asm("mov sp,%0; ":"=r" (sp));
-       return sp;
-}
-
-#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
-
-/* thread information allocation */
-#ifdef CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk) kzalloc(THREAD_SIZE, GFP_KERNEL)
-#else
-#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
-#endif
-
-#define free_thread_info(ti)   kfree((ti))
-#define get_thread_info(ti)    get_task_struct((ti)->task)
-#define put_thread_info(ti)    put_task_struct((ti)->task)
-
-#else /* !__ASSEMBLY__ */
-
-#ifndef __VMLINUX_LDS__
-/* how to get the thread information struct from ASM */
-.macro GET_THREAD_INFO reg
-       mov     sp,\reg
-       and     -THREAD_SIZE,\reg
-.endm
-#endif
-#endif
-
-/*
- * thread information flags
- * - these are process state flags that various assembly files may need to
- *   access
- * - pending work-to-be-done flags are in LSW
- * - other flags in MSW
- */
-#define TIF_SYSCALL_TRACE      0       /* syscall trace active */
-#define TIF_NOTIFY_RESUME      1       /* resumption notification requested */
-#define TIF_SIGPENDING         2       /* signal pending */
-#define TIF_NEED_RESCHED       3       /* rescheduling necessary */
-#define TIF_SINGLESTEP         4       /* restore singlestep on return to user mode */
-#define TIF_RESTORE_SIGMASK    5       /* restore signal mask in do_signal() */
-#define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
-#define TIF_MEMDIE             17      /* OOM killer killed process */
-#define TIF_FREEZE             18      /* freezing for suspend */
-
-#define _TIF_SYSCALL_TRACE     +(1 << TIF_SYSCALL_TRACE)
-#define _TIF_NOTIFY_RESUME     +(1 << TIF_NOTIFY_RESUME)
-#define _TIF_SIGPENDING                +(1 << TIF_SIGPENDING)
-#define _TIF_NEED_RESCHED      +(1 << TIF_NEED_RESCHED)
-#define _TIF_SINGLESTEP                +(1 << TIF_SINGLESTEP)
-#define _TIF_RESTORE_SIGMASK   +(1 << TIF_RESTORE_SIGMASK)
-#define _TIF_POLLING_NRFLAG    +(1 << TIF_POLLING_NRFLAG)
-#define _TIF_FREEZE            +(1 << TIF_FREEZE)
-
-#define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
-#define _TIF_ALLWORK_MASK      0x0000FFFF      /* work to do on any return to u-space */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-mn10300/timer-regs.h b/include/asm-mn10300/timer-regs.h
deleted file mode 100644 (file)
index 1d883b7..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-/* AM33v2 on-board timer module registers
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_TIMER_REGS_H
-#define _ASM_TIMER_REGS_H
-
-#include <asm/cpu-regs.h>
-#include <asm/intctl-regs.h>
-
-#ifdef __KERNEL__
-
-/* timer prescalar control */
-#define        TMPSCNT                 __SYSREG(0xd4003071, u8) /* timer prescaler control */
-#define        TMPSCNT_ENABLE          0x80    /* timer prescaler enable */
-#define        TMPSCNT_DISABLE         0x00    /* timer prescaler disable */
-
-/* 8 bit timers */
-#define        TM0MD                   __SYSREG(0xd4003000, u8) /* timer 0 mode register */
-#define        TM0MD_SRC               0x07    /* timer source */
-#define        TM0MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM0MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM0MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM0MD_SRC_TM2IO         0x03    /* - TM2IO pin input */
-#define        TM0MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM0MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM0MD_SRC_TM0IO         0x07    /* - TM0IO pin input */
-#define        TM0MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM0MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM1MD                   __SYSREG(0xd4003001, u8) /* timer 1 mode register */
-#define        TM1MD_SRC               0x07    /* timer source */
-#define        TM1MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM1MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM1MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM1MD_SRC_TM0CASCADE    0x03    /* - cascade with timer 0 */
-#define        TM1MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM1MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM1MD_SRC_TM1IO         0x07    /* - TM1IO pin input */
-#define        TM1MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM1MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM2MD                   __SYSREG(0xd4003002, u8) /* timer 2 mode register */
-#define        TM2MD_SRC               0x07    /* timer source */
-#define        TM2MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM2MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM2MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM2MD_SRC_TM1CASCADE    0x03    /* - cascade with timer 1 */
-#define        TM2MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM2MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM2MD_SRC_TM2IO         0x07    /* - TM2IO pin input */
-#define        TM2MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM2MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM3MD                   __SYSREG(0xd4003003, u8) /* timer 3 mode register */
-#define        TM3MD_SRC               0x07    /* timer source */
-#define        TM3MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM3MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM3MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM3MD_SRC_TM1CASCADE    0x03    /* - cascade with timer 2 */
-#define        TM3MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM3MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM3MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM3MD_SRC_TM3IO         0x07    /* - TM3IO pin input */
-#define        TM3MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM3MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM01MD                  __SYSREG(0xd4003000, u16)  /* timer 0:1 mode register */
-
-#define        TM0BR                   __SYSREG(0xd4003010, u8)   /* timer 0 base register */
-#define        TM1BR                   __SYSREG(0xd4003011, u8)   /* timer 1 base register */
-#define        TM2BR                   __SYSREG(0xd4003012, u8)   /* timer 2 base register */
-#define        TM3BR                   __SYSREG(0xd4003013, u8)   /* timer 3 base register */
-#define        TM01BR                  __SYSREG(0xd4003010, u16)  /* timer 0:1 base register */
-
-#define        TM0BC                   __SYSREGC(0xd4003020, u8)  /* timer 0 binary counter */
-#define        TM1BC                   __SYSREGC(0xd4003021, u8)  /* timer 1 binary counter */
-#define        TM2BC                   __SYSREGC(0xd4003022, u8)  /* timer 2 binary counter */
-#define        TM3BC                   __SYSREGC(0xd4003023, u8)  /* timer 3 binary counter */
-#define        TM01BC                  __SYSREGC(0xd4003020, u16) /* timer 0:1 binary counter */
-
-#define TM0IRQ                 2       /* timer 0 IRQ */
-#define TM1IRQ                 3       /* timer 1 IRQ */
-#define TM2IRQ                 4       /* timer 2 IRQ */
-#define TM3IRQ                 5       /* timer 3 IRQ */
-
-#define        TM0ICR                  GxICR(TM0IRQ)   /* timer 0 uflow intr ctrl reg */
-#define        TM1ICR                  GxICR(TM1IRQ)   /* timer 1 uflow intr ctrl reg */
-#define        TM2ICR                  GxICR(TM2IRQ)   /* timer 2 uflow intr ctrl reg */
-#define        TM3ICR                  GxICR(TM3IRQ)   /* timer 3 uflow intr ctrl reg */
-
-/* 16-bit timers 4,5 & 7-11 */
-#define        TM4MD                   __SYSREG(0xd4003080, u8)   /* timer 4 mode register */
-#define        TM4MD_SRC               0x07    /* timer source */
-#define        TM4MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM4MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM4MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM4MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM4MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM4MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM4MD_SRC_TM4IO         0x07    /* - TM4IO pin input */
-#define        TM4MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM4MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM5MD                   __SYSREG(0xd4003082, u8)   /* timer 5 mode register */
-#define        TM5MD_SRC               0x07    /* timer source */
-#define        TM5MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM5MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM5MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM5MD_SRC_TM4CASCADE    0x03    /* - cascade with timer 4 */
-#define        TM5MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM5MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM5MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM5MD_SRC_TM5IO         0x07    /* - TM5IO pin input */
-#define        TM5MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM5MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM7MD                   __SYSREG(0xd4003086, u8)   /* timer 7 mode register */
-#define        TM7MD_SRC               0x07    /* timer source */
-#define        TM7MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM7MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM7MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM7MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM7MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM7MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM7MD_SRC_TM7IO         0x07    /* - TM7IO pin input */
-#define        TM7MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM7MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM8MD                   __SYSREG(0xd4003088, u8)   /* timer 8 mode register */
-#define        TM8MD_SRC               0x07    /* timer source */
-#define        TM8MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM8MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM8MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM8MD_SRC_TM7CASCADE    0x03    /* - cascade with timer 7 */
-#define        TM8MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM8MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM8MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM8MD_SRC_TM8IO         0x07    /* - TM8IO pin input */
-#define        TM8MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM8MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM9MD                   __SYSREG(0xd400308a, u8)   /* timer 9 mode register */
-#define        TM9MD_SRC               0x07    /* timer source */
-#define        TM9MD_SRC_IOCLK         0x00    /* - IOCLK */
-#define        TM9MD_SRC_IOCLK_8       0x01    /* - 1/8 IOCLK */
-#define        TM9MD_SRC_IOCLK_32      0x02    /* - 1/32 IOCLK */
-#define        TM9MD_SRC_TM8CASCADE    0x03    /* - cascade with timer 8 */
-#define        TM9MD_SRC_TM0UFLOW      0x04    /* - timer 0 underflow */
-#define        TM9MD_SRC_TM1UFLOW      0x05    /* - timer 1 underflow */
-#define        TM9MD_SRC_TM2UFLOW      0x06    /* - timer 2 underflow */
-#define        TM9MD_SRC_TM9IO         0x07    /* - TM9IO pin input */
-#define        TM9MD_INIT_COUNTER      0x40    /* initialize TMnBC = TMnBR */
-#define        TM9MD_COUNT_ENABLE      0x80    /* timer count enable */
-
-#define        TM10MD                  __SYSREG(0xd400308c, u8)   /* timer 10 mode register */
-#define        TM10MD_SRC              0x07    /* timer source */
-#define        TM10MD_SRC_IOCLK        0x00    /* - IOCLK */
-#define        TM10MD_SRC_IOCLK_8      0x01    /* - 1/8 IOCLK */
-#define        TM10MD_SRC_IOCLK_32     0x02    /* - 1/32 IOCLK */
-#define        TM10MD_SRC_TM9CASCADE   0x03    /* - cascade with timer 9 */
-#define        TM10MD_SRC_TM0UFLOW     0x04    /* - timer 0 underflow */
-#define        TM10MD_SRC_TM1UFLOW     0x05    /* - timer 1 underflow */
-#define        TM10MD_SRC_TM2UFLOW     0x06    /* - timer 2 underflow */
-#define        TM10MD_SRC_TM10IO       0x07    /* - TM10IO pin input */
-#define        TM10MD_INIT_COUNTER     0x40    /* initialize TMnBC = TMnBR */
-#define        TM10MD_COUNT_ENABLE     0x80    /* timer count enable */
-
-#define        TM11MD                  __SYSREG(0xd400308e, u8)   /* timer 11 mode register */
-#define        TM11MD_SRC              0x07    /* timer source */
-#define        TM11MD_SRC_IOCLK        0x00    /* - IOCLK */
-#define        TM11MD_SRC_IOCLK_8      0x01    /* - 1/8 IOCLK */
-#define        TM11MD_SRC_IOCLK_32     0x02    /* - 1/32 IOCLK */
-#define        TM11MD_SRC_TM7CASCADE   0x03    /* - cascade with timer 7 */
-#define        TM11MD_SRC_TM0UFLOW     0x04    /* - timer 0 underflow */
-#define        TM11MD_SRC_TM1UFLOW     0x05    /* - timer 1 underflow */
-#define        TM11MD_SRC_TM2UFLOW     0x06    /* - timer 2 underflow */
-#define        TM11MD_SRC_TM11IO       0x07    /* - TM11IO pin input */
-#define        TM11MD_INIT_COUNTER     0x40    /* initialize TMnBC = TMnBR */
-#define        TM11MD_COUNT_ENABLE     0x80    /* timer count enable */
-
-#define        TM4BR                   __SYSREG(0xd4003090, u16)  /* timer 4 base register */
-#define        TM5BR                   __SYSREG(0xd4003092, u16)  /* timer 5 base register */
-#define        TM7BR                   __SYSREG(0xd4003096, u16)  /* timer 7 base register */
-#define        TM8BR                   __SYSREG(0xd4003098, u16)  /* timer 8 base register */
-#define        TM9BR                   __SYSREG(0xd400309a, u16)  /* timer 9 base register */
-#define        TM10BR                  __SYSREG(0xd400309c, u16)  /* timer 10 base register */
-#define        TM11BR                  __SYSREG(0xd400309e, u16)  /* timer 11 base register */
-#define        TM45BR                  __SYSREG(0xd4003090, u32)  /* timer 4:5 base register */
-
-#define        TM4BC                   __SYSREG(0xd40030a0, u16)  /* timer 4 binary counter */
-#define        TM5BC                   __SYSREG(0xd40030a2, u16)  /* timer 5 binary counter */
-#define        TM45BC                  __SYSREG(0xd40030a0, u32)  /* timer 4:5 binary counter */
-
-#define        TM7BC                   __SYSREG(0xd40030a6, u16)  /* timer 7 binary counter */
-#define        TM8BC                   __SYSREG(0xd40030a8, u16)  /* timer 8 binary counter */
-#define        TM9BC                   __SYSREG(0xd40030aa, u16)  /* timer 9 binary counter */
-#define        TM10BC                  __SYSREG(0xd40030ac, u16)  /* timer 10 binary counter */
-#define        TM11BC                  __SYSREG(0xd40030ae, u16)  /* timer 11 binary counter */
-
-#define TM4IRQ                 6       /* timer 4 IRQ */
-#define TM5IRQ                 7       /* timer 5 IRQ */
-#define TM7IRQ                 11      /* timer 7 IRQ */
-#define TM8IRQ                 12      /* timer 8 IRQ */
-#define TM9IRQ                 13      /* timer 9 IRQ */
-#define TM10IRQ                        14      /* timer 10 IRQ */
-#define TM11IRQ                        15      /* timer 11 IRQ */
-
-#define        TM4ICR                  GxICR(TM4IRQ)   /* timer 4 uflow intr ctrl reg */
-#define        TM5ICR                  GxICR(TM5IRQ)   /* timer 5 uflow intr ctrl reg */
-#define        TM7ICR                  GxICR(TM7IRQ)   /* timer 7 uflow intr ctrl reg */
-#define        TM8ICR                  GxICR(TM8IRQ)   /* timer 8 uflow intr ctrl reg */
-#define        TM9ICR                  GxICR(TM9IRQ)   /* timer 9 uflow intr ctrl reg */
-#define        TM10ICR                 GxICR(TM10IRQ)  /* timer 10 uflow intr ctrl reg */
-#define        TM11ICR                 GxICR(TM11IRQ)  /* timer 11 uflow intr ctrl reg */
-
-/* 16-bit timer 6 */
-#define        TM6MD                   __SYSREG(0xd4003084, u16)  /* timer6 mode register */
-#define        TM6MD_SRC               0x0007  /* timer source */
-#define        TM6MD_SRC_IOCLK         0x0000  /* - IOCLK */
-#define        TM6MD_SRC_IOCLK_8       0x0001  /* - 1/8 IOCLK */
-#define        TM6MD_SRC_IOCLK_32      0x0002  /* - 1/32 IOCLK */
-#define        TM6MD_SRC_TM0UFLOW      0x0004  /* - timer 0 underflow */
-#define        TM6MD_SRC_TM1UFLOW      0x0005  /* - timer 1 underflow */
-#define        TM6MD_SRC_TM6IOB_BOTH   0x0006  /* - TM6IOB pin input (both edges) */
-#define        TM6MD_SRC_TM6IOB_SINGLE 0x0007  /* - TM6IOB pin input (single edge) */
-#define        TM6MD_CLR_ENABLE        0x0010  /* clear count enable */
-#define        TM6MD_ONESHOT_ENABLE    0x0040  /* oneshot count */
-#define        TM6MD_TRIG_ENABLE       0x0080  /* TM6IOB pin trigger enable */
-#define TM6MD_PWM              0x3800  /* PWM output mode */
-#define TM6MD_PWM_DIS          0x0000  /* - disabled */
-#define        TM6MD_PWM_10BIT         0x1000  /* - 10 bits mode */
-#define        TM6MD_PWM_11BIT         0x1800  /* - 11 bits mode */
-#define        TM6MD_PWM_12BIT         0x3000  /* - 12 bits mode */
-#define        TM6MD_PWM_14BIT         0x3800  /* - 14 bits mode */
-#define        TM6MD_INIT_COUNTER      0x4000  /* initialize TMnBC to zero */
-#define        TM6MD_COUNT_ENABLE      0x8000  /* timer count enable */
-
-#define        TM6MDA                  __SYSREG(0xd40030b4, u8)   /* timer6 cmp/cap A mode reg */
-#define TM6MDA_OUT             0x07    /* output select */
-#define        TM6MDA_OUT_SETA_RESETB  0x00    /* - set at match A, reset at match B */
-#define        TM6MDA_OUT_SETA_RESETOV 0x01    /* - set at match A, reset at overflow */
-#define        TM6MDA_OUT_SETA         0x02    /* - set at match A */
-#define        TM6MDA_OUT_RESETA       0x03    /* - reset at match A */
-#define        TM6MDA_OUT_TOGGLE       0x04    /* - toggle on match A */
-#define TM6MDA_MODE            0xc0    /* compare A register mode */
-#define        TM6MDA_MODE_CMP_SINGLE  0x00    /* - compare, single buffer mode */
-#define        TM6MDA_MODE_CMP_DOUBLE  0x40    /* - compare, double buffer mode */
-#define        TM6MDA_MODE_CAP_S_EDGE  0x80    /* - capture, single edge mode */
-#define        TM6MDA_MODE_CAP_D_EDGE  0xc0    /* - capture, double edge mode */
-#define TM6MDA_EDGE            0x20    /* compare A edge select */
-#define        TM6MDA_EDGE_FALLING     0x00    /* capture on falling edge */
-#define        TM6MDA_EDGE_RISING      0x20    /* capture on rising edge */
-#define        TM6MDA_CAPTURE_ENABLE   0x10    /* capture enable */
-
-#define        TM6MDB                  __SYSREG(0xd40030b5, u8)   /* timer6 cmp/cap B mode reg */
-#define TM6MDB_OUT             0x07    /* output select */
-#define        TM6MDB_OUT_SETB_RESETA  0x00    /* - set at match B, reset at match A */
-#define        TM6MDB_OUT_SETB_RESETOV 0x01    /* - set at match B */
-#define        TM6MDB_OUT_RESETB       0x03    /* - reset at match B */
-#define        TM6MDB_OUT_TOGGLE       0x04    /* - toggle on match B */
-#define TM6MDB_MODE            0xc0    /* compare B register mode */
-#define        TM6MDB_MODE_CMP_SINGLE  0x00    /* - compare, single buffer mode */
-#define        TM6MDB_MODE_CMP_DOUBLE  0x40    /* - compare, double buffer mode */
-#define        TM6MDB_MODE_CAP_S_EDGE  0x80    /* - capture, single edge mode */
-#define        TM6MDB_MODE_CAP_D_EDGE  0xc0    /* - capture, double edge mode */
-#define TM6MDB_EDGE            0x20    /* compare B edge select */
-#define        TM6MDB_EDGE_FALLING     0x00    /* capture on falling edge */
-#define        TM6MDB_EDGE_RISING      0x20    /* capture on rising edge */
-#define        TM6MDB_CAPTURE_ENABLE   0x10    /* capture enable */
-
-#define        TM6CA                   __SYSREG(0xd40030c4, u16)   /* timer6 cmp/capture reg A */
-#define        TM6CB                   __SYSREG(0xd40030d4, u16)   /* timer6 cmp/capture reg B */
-#define        TM6BC                   __SYSREG(0xd40030a4, u16)   /* timer6 binary counter */
-
-#define TM6IRQ                 6       /* timer 6 IRQ */
-#define TM6AIRQ                        9       /* timer 6A IRQ */
-#define TM6BIRQ                        10      /* timer 6B IRQ */
-
-#define        TM6ICR                  GxICR(TM6IRQ)   /* timer 6 uflow intr ctrl reg */
-#define        TM6AICR                 GxICR(TM6AIRQ)  /* timer 6A intr control reg */
-#define        TM6BICR                 GxICR(TM6BIRQ)  /* timer 6B intr control reg */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_TIMER_REGS_H */
diff --git a/include/asm-mn10300/timex.h b/include/asm-mn10300/timex.h
deleted file mode 100644 (file)
index 3944277..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* MN10300 Architecture time management specifications
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_TIMEX_H
-#define _ASM_TIMEX_H
-
-#include <asm/hardirq.h>
-#include <asm/unit/timex.h>
-
-#define TICK_SIZE (tick_nsec / 1000)
-
-#define CLOCK_TICK_RATE 1193180 /* Underlying HZ - this should probably be set
-                                * to something appropriate, but what? */
-
-extern cycles_t cacheflush_time;
-
-#ifdef __KERNEL__
-
-static inline cycles_t get_cycles(void)
-{
-       return read_timestamp_counter();
-}
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_TIMEX_H */
diff --git a/include/asm-mn10300/tlb.h b/include/asm-mn10300/tlb.h
deleted file mode 100644 (file)
index 65d232b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* MN10300 TLB definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_TLB_H
-#define _ASM_TLB_H
-
-#include <asm/tlbflush.h>
-
-extern void check_pgt_cache(void);
-
-/*
- * we don't need any special per-pte or per-vma handling...
- */
-#define tlb_start_vma(tlb, vma)                                do { } while (0)
-#define tlb_end_vma(tlb, vma)                          do { } while (0)
-#define __tlb_remove_tlb_entry(tlb, ptep, address)     do { } while (0)
-
-/*
- * .. because we flush the whole mm when it fills up
- */
-#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
-
-/* for now, just use the generic stuff */
-#include <asm-generic/tlb.h>
-
-#endif /* _ASM_TLB_H */
diff --git a/include/asm-mn10300/tlbflush.h b/include/asm-mn10300/tlbflush.h
deleted file mode 100644 (file)
index e023986..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/* MN10300 TLB flushing functions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_TLBFLUSH_H
-#define _ASM_TLBFLUSH_H
-
-#include <asm/processor.h>
-
-#define __flush_tlb()                                          \
-do {                                                           \
-       int w;                                                  \
-       __asm__ __volatile__                                    \
-               ("      mov %1,%0               \n"             \
-                "      or %2,%0                \n"             \
-                "      mov %0,%1               \n"             \
-                : "=d"(w)                                      \
-                : "m"(MMUCTR), "i"(MMUCTR_IIV|MMUCTR_DIV)      \
-                : "memory"                                     \
-                );                                             \
-} while (0)
-
-#define __flush_tlb_all() __flush_tlb()
-#define __flush_tlb_one(addr) __flush_tlb()
-
-
-/*
- * TLB flushing:
- *
- *  - flush_tlb() flushes the current mm struct TLBs
- *  - flush_tlb_all() flushes all processes TLBs
- *  - flush_tlb_mm(mm) flushes the specified mm context TLB's
- *  - flush_tlb_page(vma, vmaddr) flushes one page
- *  - flush_tlb_range(mm, start, end) flushes a range of pages
- *  - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
- */
-#define flush_tlb_all()                                \
-do {                                           \
-       preempt_disable();                      \
-       __flush_tlb_all();                      \
-       preempt_enable();                       \
-} while (0)
-
-#define flush_tlb_mm(mm)                       \
-do {                                           \
-       preempt_disable();                      \
-       __flush_tlb_all();                      \
-       preempt_enable();                       \
-} while (0)
-
-#define flush_tlb_range(vma, start, end)                       \
-do {                                                           \
-       unsigned long __s __attribute__((unused)) = (start);    \
-       unsigned long __e __attribute__((unused)) = (end);      \
-       preempt_disable();                                      \
-       __flush_tlb_all();                                      \
-       preempt_enable();                                       \
-} while (0)
-
-
-#define __flush_tlb_global()                   flush_tlb_all()
-#define flush_tlb()                            flush_tlb_all()
-#define flush_tlb_kernel_range(start, end)                     \
-do {                                                           \
-       unsigned long __s __attribute__((unused)) = (start);    \
-       unsigned long __e __attribute__((unused)) = (end);      \
-       flush_tlb_all();                                        \
-} while (0)
-
-extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
-
-#define flush_tlb_pgtables(mm, start, end)     do {} while (0)
-
-#endif /* _ASM_TLBFLUSH_H */
diff --git a/include/asm-mn10300/topology.h b/include/asm-mn10300/topology.h
deleted file mode 100644 (file)
index 5428f33..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/topology.h>
diff --git a/include/asm-mn10300/types.h b/include/asm-mn10300/types.h
deleted file mode 100644 (file)
index 7b9f010..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* MN10300 Basic type definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_TYPES_H
-#define _ASM_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#ifndef __ASSEMBLY__
-
-typedef unsigned short umode_t;
-
-#endif /* __ASSEMBLY__ */
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-#ifdef __KERNEL__
-
-#define BITS_PER_LONG 32
-
-#ifndef __ASSEMBLY__
-
-/* Dma addresses are 32-bits wide.  */
-typedef u32 dma_addr_t;
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
-#endif /* _ASM_TYPES_H */
diff --git a/include/asm-mn10300/uaccess.h b/include/asm-mn10300/uaccess.h
deleted file mode 100644 (file)
index 8a3a4dd..0000000
+++ /dev/null
@@ -1,490 +0,0 @@
-/* MN10300 userspace access functions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_UACCESS_H
-#define _ASM_UACCESS_H
-
-/*
- * User space memory access functions
- */
-#include <linux/sched.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/errno.h>
-
-#define VERIFY_READ 0
-#define VERIFY_WRITE 1
-
-/*
- * The fs value determines whether argument validity checking should be
- * performed or not.  If get_fs() == USER_DS, checking is performed, with
- * get_fs() == KERNEL_DS, checking is bypassed.
- *
- * For historical reasons, these macros are grossly misnamed.
- */
-
-#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
-
-#define KERNEL_XDS     MAKE_MM_SEG(0xBFFFFFFF)
-#define KERNEL_DS      MAKE_MM_SEG(0x9FFFFFFF)
-#define USER_DS                MAKE_MM_SEG(TASK_SIZE)
-
-#define get_ds()       (KERNEL_DS)
-#define get_fs()       (current_thread_info()->addr_limit)
-#define set_fs(x)      (current_thread_info()->addr_limit = (x))
-#define __kernel_ds_p() (current_thread_info()->addr_limit.seg == 0x9FFFFFFF)
-
-#define segment_eq(a, b) ((a).seg == (b).seg)
-
-#define __addr_ok(addr) \
-       ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg))
-
-/*
- * check that a range of addresses falls within the current address limit
- */
-static inline int ___range_ok(unsigned long addr, unsigned int size)
-{
-       int flag = 1, tmp;
-
-       asm("   add     %3,%1   \n"     /* set C-flag if addr + size > 4Gb */
-           "   bcs     0f      \n"
-           "   cmp     %4,%1   \n"     /* jump if addr+size>limit (error) */
-           "   bhi     0f      \n"
-           "   clr     %0      \n"     /* mark okay */
-           "0:                 \n"
-           : "=r"(flag), "=&r"(tmp)
-           : "1"(addr), "ir"(size),
-             "r"(current_thread_info()->addr_limit.seg), "0"(flag)
-           : "cc"
-           );
-
-       return flag;
-}
-
-#define __range_ok(addr, size) ___range_ok((unsigned long)(addr), (u32)(size))
-
-#define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0)
-#define __access_ok(addr, size)     (__range_ok((addr), (size)) == 0)
-
-static inline int verify_area(int type, const void *addr, unsigned long size)
-{
-       return access_ok(type, addr, size) ? 0 : -EFAULT;
-}
-
-
-/*
- * The exception table consists of pairs of addresses: the first is the
- * address of an instruction that is allowed to fault, and the second is
- * the address at which the program should continue.  No registers are
- * modified, so it is entirely up to the continuation code to figure out
- * what to do.
- *
- * All the routines below use bits of fixup code that are out of line
- * with the main instruction path.  This means when everything is well,
- * we don't even have to jump over them.  Further, they do not intrude
- * on our cache or tlb entries.
- */
-
-struct exception_table_entry
-{
-       unsigned long insn, fixup;
-};
-
-/* Returns 0 if exception not found and fixup otherwise.  */
-extern int fixup_exception(struct pt_regs *regs);
-
-#define put_user(x, ptr) __put_user_check((x), (ptr), sizeof(*(ptr)))
-#define get_user(x, ptr) __get_user_check((x), (ptr), sizeof(*(ptr)))
-
-/*
- * The "__xxx" versions do not do address space checking, useful when
- * doing multiple accesses to the same area (the user has to do the
- * checks by hand with "access_ok()")
- */
-#define __put_user(x, ptr) __put_user_nocheck((x), (ptr), sizeof(*(ptr)))
-#define __get_user(x, ptr) __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
-
-/*
- * The "xxx_ret" versions return constant specified in third argument, if
- * something bad happens. These macros can be optimized for the
- * case of just returning from the function xxx_ret is used.
- */
-
-#define put_user_ret(x, ptr, ret) \
-       ({ if (put_user((x), (ptr)))    return (ret); })
-#define get_user_ret(x, ptr, ret) \
-       ({ if (get_user((x), (ptr)))    return (ret); })
-#define __put_user_ret(x, ptr, ret) \
-       ({ if (__put_user((x), (ptr)))  return (ret); })
-#define __get_user_ret(x, ptr, ret) \
-       ({ if (__get_user((x), (ptr)))  return (ret); })
-
-struct __large_struct { unsigned long buf[100]; };
-#define __m(x) (*(struct __large_struct *)(x))
-
-#define __get_user_nocheck(x, ptr, size)       \
-({                                             \
-       __typeof(*(ptr)) __gu_val;              \
-       unsigned long __gu_addr;                \
-       int __gu_err;                           \
-       __gu_addr = (unsigned long) (ptr);      \
-       switch (size) {                         \
-       case 1:  __get_user_asm("bu"); break;   \
-       case 2:  __get_user_asm("hu"); break;   \
-       case 4:  __get_user_asm(""  ); break;   \
-       default: __get_user_unknown(); break;   \
-       }                                       \
-       x = (__typeof__(*(ptr))) __gu_val;      \
-       __gu_err;                               \
-})
-
-#define __get_user_check(x, ptr, size)                 \
-({                                                     \
-       __typeof__(*(ptr)) __gu_val;                    \
-       unsigned long __gu_addr;                        \
-       int __gu_err;                                   \
-       __gu_addr = (unsigned long) (ptr);              \
-       if (likely(__access_ok(__gu_addr,size))) {      \
-               switch (size) {                         \
-               case 1:  __get_user_asm("bu"); break;   \
-               case 2:  __get_user_asm("hu"); break;   \
-               case 4:  __get_user_asm(""  ); break;   \
-               default: __get_user_unknown(); break;   \
-               }                                       \
-       }                                               \
-       else {                                          \
-               __gu_err = -EFAULT;                     \
-               __gu_val = 0;                           \
-       }                                               \
-       x = (__typeof__(*(ptr))) __gu_val;              \
-       __gu_err;                                       \
-})
-
-#define __get_user_asm(INSN)                                   \
-({                                                             \
-       asm volatile(                                   \
-               "1:\n"                                          \
-               "       mov"INSN"       %2,%1\n"                \
-               "       mov             0,%0\n"                 \
-               "2:\n"                                          \
-               "       .section        .fixup,\"ax\"\n"        \
-               "3:\n\t"                                        \
-               "       mov             %3,%0\n"                \
-               "       jmp             2b\n"                   \
-               "       .previous\n"                            \
-               "       .section        __ex_table,\"a\"\n"     \
-               "       .balign         4\n"                    \
-               "       .long           1b, 3b\n"               \
-               "       .previous"                              \
-               : "=&r" (__gu_err), "=&r" (__gu_val)            \
-               : "m" (__m(__gu_addr)), "i" (-EFAULT));         \
-})
-
-extern int __get_user_unknown(void);
-
-#define __put_user_nocheck(x, ptr, size)                       \
-({                                                             \
-       union {                                                 \
-               __typeof__(*(ptr)) val;                         \
-               u32 bits[2];                                    \
-       } __pu_val;                                             \
-       unsigned long __pu_addr;                                \
-       int __pu_err;                                           \
-       __pu_val.val = (x);                                     \
-       __pu_addr = (unsigned long) (ptr);                      \
-       switch (size) {                                         \
-       case 1:  __put_user_asm("bu"); break;                   \
-       case 2:  __put_user_asm("hu"); break;                   \
-       case 4:  __put_user_asm(""  ); break;                   \
-       case 8:  __put_user_asm8();    break;                   \
-       default: __pu_err = __put_user_unknown(); break;        \
-       }                                                       \
-       __pu_err;                                               \
-})
-
-#define __put_user_check(x, ptr, size)                                 \
-({                                                                     \
-       union {                                                         \
-               __typeof__(*(ptr)) val;                                 \
-               u32 bits[2];                                            \
-       } __pu_val;                                                     \
-       unsigned long __pu_addr;                                        \
-       int __pu_err;                                                   \
-       __pu_val.val = (x);                                             \
-       __pu_addr = (unsigned long) (ptr);                              \
-       if (likely(__access_ok(__pu_addr, size))) {                     \
-               switch (size) {                                         \
-               case 1:  __put_user_asm("bu"); break;                   \
-               case 2:  __put_user_asm("hu"); break;                   \
-               case 4:  __put_user_asm(""  ); break;                   \
-               case 8:  __put_user_asm8();    break;                   \
-               default: __pu_err = __put_user_unknown(); break;        \
-               }                                                       \
-       }                                                               \
-       else {                                                          \
-               __pu_err = -EFAULT;                                     \
-       }                                                               \
-       __pu_err;                                                       \
-})
-
-#define __put_user_asm(INSN)                                   \
-({                                                             \
-       asm volatile(                                           \
-               "1:\n"                                          \
-               "       mov"INSN"       %1,%2\n"                \
-               "       mov             0,%0\n"                 \
-               "2:\n"                                          \
-               "       .section        .fixup,\"ax\"\n"        \
-               "3:\n"                                          \
-               "       mov             %3,%0\n"                \
-               "       jmp             2b\n"                   \
-               "       .previous\n"                            \
-               "       .section        __ex_table,\"a\"\n"     \
-               "       .balign         4\n"                    \
-               "       .long           1b, 3b\n"               \
-               "       .previous"                              \
-               : "=&r" (__pu_err)                              \
-               : "r" (__pu_val.val), "m" (__m(__pu_addr)),     \
-                 "i" (-EFAULT)                                 \
-               );                                              \
-})
-
-#define __put_user_asm8()                                              \
-({                                                                     \
-       asm volatile(                                                   \
-               "1:     mov             %1,%3           \n"             \
-               "2:     mov             %2,%4           \n"             \
-               "       mov             0,%0            \n"             \
-               "3:                                     \n"             \
-               "       .section        .fixup,\"ax\"   \n"             \
-               "4:                                     \n"             \
-               "       mov             %5,%0           \n"             \
-               "       jmp             3b              \n"             \
-               "       .previous                       \n"             \
-               "       .section        __ex_table,\"a\"\n"             \
-               "       .balign         4               \n"             \
-               "       .long           1b, 4b          \n"             \
-               "       .long           2b, 4b          \n"             \
-               "       .previous                       \n"             \
-               : "=&r" (__pu_err)                                      \
-               : "r" (__pu_val.bits[0]), "r" (__pu_val.bits[1]),       \
-                 "m" (__m(__pu_addr)), "m" (__m(__pu_addr+4)),         \
-                 "i" (-EFAULT)                                         \
-               );                                                      \
-})
-
-extern int __put_user_unknown(void);
-
-
-/*
- * Copy To/From Userspace
- */
-/* Generic arbitrary sized copy.  */
-#define __copy_user(to, from, size)                                    \
-do {                                                                   \
-       if (size) {                                                     \
-               void *__to = to;                                        \
-               const void *__from = from;                              \
-               int w;                                                  \
-               asm volatile(                                           \
-                       "0:     movbu   (%0),%3;\n"                     \
-                       "1:     movbu   %3,(%1);\n"                     \
-                       "       inc     %0;\n"                          \
-                       "       inc     %1;\n"                          \
-                       "       add     -1,%2;\n"                       \
-                       "       bne     0b;\n"                          \
-                       "2:\n"                                          \
-                       "       .section .fixup,\"ax\"\n"               \
-                       "3:     jmp     2b\n"                           \
-                       "       .previous\n"                            \
-                       "       .section __ex_table,\"a\"\n"            \
-                       "       .balign 4\n"                            \
-                       "       .long   0b,3b\n"                        \
-                       "       .long   1b,3b\n"                        \
-                       "       .previous\n"                            \
-                       : "=a"(__from), "=a"(__to), "=r"(size), "=&r"(w)\
-                       : "0"(__from), "1"(__to), "2"(size)             \
-                       : "memory");                                    \
-       }                                                               \
-} while (0)
-
-#define __copy_user_zeroing(to, from, size)                            \
-do {                                                                   \
-       if (size) {                                                     \
-               void *__to = to;                                        \
-               const void *__from = from;                              \
-               int w;                                                  \
-               asm volatile(                                           \
-                       "0:     movbu   (%0),%3;\n"                     \
-                       "1:     movbu   %3,(%1);\n"                     \
-                       "       inc     %0;\n"                          \
-                       "       inc     %1;\n"                          \
-                       "       add     -1,%2;\n"                       \
-                       "       bne     0b;\n"                          \
-                       "2:\n"                                          \
-                       "       .section .fixup,\"ax\"\n"               \
-                       "3:\n"                                          \
-                       "       mov     %2,%0\n"                        \
-                       "       clr     %3\n"                           \
-                       "4:     movbu   %3,(%1);\n"                     \
-                       "       inc     %1;\n"                          \
-                       "       add     -1,%2;\n"                       \
-                       "       bne     4b;\n"                          \
-                       "       mov     %0,%2\n"                        \
-                       "       jmp     2b\n"                           \
-                       "       .previous\n"                            \
-                       "       .section __ex_table,\"a\"\n"            \
-                       "       .balign 4\n"                            \
-                       "       .long   0b,3b\n"                        \
-                       "       .long   1b,3b\n"                        \
-                       "       .previous\n"                            \
-                       : "=a"(__from), "=a"(__to), "=r"(size), "=&r"(w)\
-                       : "0"(__from), "1"(__to), "2"(size)             \
-                       : "memory");                                    \
-       }                                                               \
-} while (0)
-
-/* We let the __ versions of copy_from/to_user inline, because they're often
- * used in fast paths and have only a small space overhead.
- */
-static inline
-unsigned long __generic_copy_from_user_nocheck(void *to, const void *from,
-                                              unsigned long n)
-{
-       __copy_user_zeroing(to, from, n);
-       return n;
-}
-
-static inline
-unsigned long __generic_copy_to_user_nocheck(void *to, const void *from,
-                                            unsigned long n)
-{
-       __copy_user(to, from, n);
-       return n;
-}
-
-
-#if 0
-#error don't use - these macros don't increment to & from pointers
-/* Optimize just a little bit when we know the size of the move. */
-#define __constant_copy_user(to, from, size)   \
-do {                                           \
-       asm volatile(                           \
-               "       mov %0,a0;\n"           \
-               "0:     movbu (%1),d3;\n"       \
-               "1:     movbu d3,(%2);\n"       \
-               "       add -1,a0;\n"           \
-               "       bne 0b;\n"              \
-               "2:;"                           \
-               ".section .fixup,\"ax\"\n"      \
-               "3:     jmp 2b\n"               \
-               ".previous\n"                   \
-               ".section __ex_table,\"a\"\n"   \
-               "       .balign 4\n"            \
-               "       .long 0b,3b\n"          \
-               "       .long 1b,3b\n"          \
-               ".previous"                     \
-               :                               \
-               : "d"(size), "d"(to), "d"(from) \
-               : "d3", "a0");                  \
-} while (0)
-
-/* Optimize just a little bit when we know the size of the move. */
-#define __constant_copy_user_zeroing(to, from, size)   \
-do {                                                   \
-       asm volatile(                                   \
-               "       mov %0,a0;\n"                   \
-               "0:     movbu (%1),d3;\n"               \
-               "1:     movbu d3,(%2);\n"               \
-               "       add -1,a0;\n"                   \
-               "       bne 0b;\n"                      \
-               "2:;"                                   \
-               ".section .fixup,\"ax\"\n"              \
-               "3:     jmp 2b\n"                       \
-               ".previous\n"                           \
-               ".section __ex_table,\"a\"\n"           \
-               "       .balign 4\n"                    \
-               "       .long 0b,3b\n"                  \
-               "       .long 1b,3b\n"                  \
-               ".previous"                             \
-               :                                       \
-               : "d"(size), "d"(to), "d"(from)         \
-               : "d3", "a0");                          \
-} while (0)
-
-static inline
-unsigned long __constant_copy_to_user(void *to, const void *from,
-                                     unsigned long n)
-{
-       if (access_ok(VERIFY_WRITE, to, n))
-               __constant_copy_user(to, from, n);
-       return n;
-}
-
-static inline
-unsigned long __constant_copy_from_user(void *to, const void *from,
-                                       unsigned long n)
-{
-       if (access_ok(VERIFY_READ, from, n))
-               __constant_copy_user_zeroing(to, from, n);
-       return n;
-}
-
-static inline
-unsigned long __constant_copy_to_user_nocheck(void *to, const void *from,
-                                             unsigned long n)
-{
-       __constant_copy_user(to, from, n);
-       return n;
-}
-
-static inline
-unsigned long __constant_copy_from_user_nocheck(void *to, const void *from,
-                                               unsigned long n)
-{
-       __constant_copy_user_zeroing(to, from, n);
-       return n;
-}
-#endif
-
-extern unsigned long __generic_copy_to_user(void __user *, const void *,
-                                           unsigned long);
-extern unsigned long __generic_copy_from_user(void *, const void __user *,
-                                             unsigned long);
-
-#define __copy_to_user_inatomic(to, from, n) \
-       __generic_copy_to_user_nocheck((to), (from), (n))
-#define __copy_from_user_inatomic(to, from, n) \
-       __generic_copy_from_user_nocheck((to), (from), (n))
-
-#define __copy_to_user(to, from, n)                    \
-({                                                     \
-       might_sleep();                                  \
-       __copy_to_user_inatomic((to), (from), (n));     \
-})
-
-#define __copy_from_user(to, from, n)                  \
-({                                                     \
-       might_sleep();                                  \
-       __copy_from_user_inatomic((to), (from), (n));   \
-})
-
-
-#define copy_to_user(to, from, n)   __generic_copy_to_user((to), (from), (n))
-#define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
-
-extern long strncpy_from_user(char *dst, const char __user *src, long count);
-extern long __strncpy_from_user(char *dst, const char __user *src, long count);
-extern long strnlen_user(const char __user *str, long n);
-#define strlen_user(str) strnlen_user(str, ~0UL >> 1)
-extern unsigned long clear_user(void __user *mem, unsigned long len);
-extern unsigned long __clear_user(void __user *mem, unsigned long len);
-
-#endif /* _ASM_UACCESS_H */
diff --git a/include/asm-mn10300/ucontext.h b/include/asm-mn10300/ucontext.h
deleted file mode 100644 (file)
index fcab5c1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* MN10300 User context
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_UCONTEXT_H
-#define _ASM_UCONTEXT_H
-
-struct ucontext {
-       unsigned long     uc_flags;
-       struct ucontext  *uc_link;
-       stack_t           uc_stack;
-       struct sigcontext uc_mcontext;
-       sigset_t          uc_sigmask;   /* mask last for extensibility */
-};
-
-#endif /* _ASM_UCONTEXT_H */
diff --git a/include/asm-mn10300/unaligned.h b/include/asm-mn10300/unaligned.h
deleted file mode 100644 (file)
index 0df6713..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* MN10300 Unaligned memory access handling
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_MN10300_UNALIGNED_H
-#define _ASM_MN10300_UNALIGNED_H
-
-#include <linux/unaligned/access_ok.h>
-#include <linux/unaligned/generic.h>
-
-#define get_unaligned  __get_unaligned_le
-#define put_unaligned  __put_unaligned_le
-
-#endif /* _ASM_MN10300_UNALIGNED_H */
diff --git a/include/asm-mn10300/unistd.h b/include/asm-mn10300/unistd.h
deleted file mode 100644 (file)
index 543a4f9..0000000
+++ /dev/null
@@ -1,390 +0,0 @@
-/* MN10300 System call number list
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_UNISTD_H
-#define _ASM_UNISTD_H
-
-#define __NR_restart_syscall      0
-#define __NR_exit                1
-#define __NR_fork                2
-#define __NR_read                3
-#define __NR_write               4
-#define __NR_open                5
-#define __NR_close               6
-#define __NR_waitpid             7
-#define __NR_creat               8
-#define __NR_link                9
-#define __NR_unlink             10
-#define __NR_execve             11
-#define __NR_chdir              12
-#define __NR_time               13
-#define __NR_mknod              14
-#define __NR_chmod              15
-#define __NR_lchown             16
-#define __NR_break              17
-#define __NR_oldstat            18
-#define __NR_lseek              19
-#define __NR_getpid             20
-#define __NR_mount              21
-#define __NR_umount             22
-#define __NR_setuid             23
-#define __NR_getuid             24
-#define __NR_stime              25
-#define __NR_ptrace             26
-#define __NR_alarm              27
-#define __NR_oldfstat           28
-#define __NR_pause              29
-#define __NR_utime              30
-#define __NR_stty               31
-#define __NR_gtty               32
-#define __NR_access             33
-#define __NR_nice               34
-#define __NR_ftime              35
-#define __NR_sync               36
-#define __NR_kill               37
-#define __NR_rename             38
-#define __NR_mkdir              39
-#define __NR_rmdir              40
-#define __NR_dup                41
-#define __NR_pipe               42
-#define __NR_times              43
-#define __NR_prof               44
-#define __NR_brk                45
-#define __NR_setgid             46
-#define __NR_getgid             47
-#define __NR_signal             48
-#define __NR_geteuid            49
-#define __NR_getegid            50
-#define __NR_acct               51
-#define __NR_umount2            52
-#define __NR_lock               53
-#define __NR_ioctl              54
-#define __NR_fcntl              55
-#define __NR_mpx                56
-#define __NR_setpgid            57
-#define __NR_ulimit             58
-#define __NR_oldolduname        59
-#define __NR_umask              60
-#define __NR_chroot             61
-#define __NR_ustat              62
-#define __NR_dup2               63
-#define __NR_getppid            64
-#define __NR_getpgrp            65
-#define __NR_setsid             66
-#define __NR_sigaction          67
-#define __NR_sgetmask           68
-#define __NR_ssetmask           69
-#define __NR_setreuid           70
-#define __NR_setregid           71
-#define __NR_sigsuspend                 72
-#define __NR_sigpending                 73
-#define __NR_sethostname        74
-#define __NR_setrlimit          75
-#define __NR_getrlimit          76     /* Back compatible 2Gig limited rlimit */
-#define __NR_getrusage          77
-#define __NR_gettimeofday       78
-#define __NR_settimeofday       79
-#define __NR_getgroups          80
-#define __NR_setgroups          81
-#define __NR_select             82
-#define __NR_symlink            83
-#define __NR_oldlstat           84
-#define __NR_readlink           85
-#define __NR_uselib             86
-#define __NR_swapon             87
-#define __NR_reboot             88
-#define __NR_readdir            89
-#define __NR_mmap               90
-#define __NR_munmap             91
-#define __NR_truncate           92
-#define __NR_ftruncate          93
-#define __NR_fchmod             94
-#define __NR_fchown             95
-#define __NR_getpriority        96
-#define __NR_setpriority        97
-#define __NR_profil             98
-#define __NR_statfs             99
-#define __NR_fstatfs           100
-#define __NR_ioperm            101
-#define __NR_socketcall                102
-#define __NR_syslog            103
-#define __NR_setitimer         104
-#define __NR_getitimer         105
-#define __NR_stat              106
-#define __NR_lstat             107
-#define __NR_fstat             108
-#define __NR_olduname          109
-#define __NR_iopl              110
-#define __NR_vhangup           111
-#define __NR_idle              112
-#define __NR_vm86old           113
-#define __NR_wait4             114
-#define __NR_swapoff           115
-#define __NR_sysinfo           116
-#define __NR_ipc               117
-#define __NR_fsync             118
-#define __NR_sigreturn         119
-#define __NR_clone             120
-#define __NR_setdomainname     121
-#define __NR_uname             122
-#define __NR_modify_ldt                123
-#define __NR_adjtimex          124
-#define __NR_mprotect          125
-#define __NR_sigprocmask       126
-#define __NR_create_module     127
-#define __NR_init_module       128
-#define __NR_delete_module     129
-#define __NR_get_kernel_syms   130
-#define __NR_quotactl          131
-#define __NR_getpgid           132
-#define __NR_fchdir            133
-#define __NR_bdflush           134
-#define __NR_sysfs             135
-#define __NR_personality       136
-#define __NR_afs_syscall       137 /* Syscall for Andrew File System */
-#define __NR_setfsuid          138
-#define __NR_setfsgid          139
-#define __NR__llseek           140
-#define __NR_getdents          141
-#define __NR__newselect                142
-#define __NR_flock             143
-#define __NR_msync             144
-#define __NR_readv             145
-#define __NR_writev            146
-#define __NR_getsid            147
-#define __NR_fdatasync         148
-#define __NR__sysctl           149
-#define __NR_mlock             150
-#define __NR_munlock           151
-#define __NR_mlockall          152
-#define __NR_munlockall                153
-#define __NR_sched_setparam            154
-#define __NR_sched_getparam            155
-#define __NR_sched_setscheduler                156
-#define __NR_sched_getscheduler                157
-#define __NR_sched_yield               158
-#define __NR_sched_get_priority_max    159
-#define __NR_sched_get_priority_min    160
-#define __NR_sched_rr_get_interval     161
-#define __NR_nanosleep         162
-#define __NR_mremap            163
-#define __NR_setresuid         164
-#define __NR_getresuid         165
-#define __NR_vm86              166
-#define __NR_query_module      167
-#define __NR_poll              168
-#define __NR_nfsservctl                169
-#define __NR_setresgid         170
-#define __NR_getresgid         171
-#define __NR_prctl              172
-#define __NR_rt_sigreturn      173
-#define __NR_rt_sigaction      174
-#define __NR_rt_sigprocmask    175
-#define __NR_rt_sigpending     176
-#define __NR_rt_sigtimedwait   177
-#define __NR_rt_sigqueueinfo   178
-#define __NR_rt_sigsuspend     179
-#define __NR_pread64           180
-#define __NR_pwrite64          181
-#define __NR_chown             182
-#define __NR_getcwd            183
-#define __NR_capget            184
-#define __NR_capset            185
-#define __NR_sigaltstack       186
-#define __NR_sendfile          187
-#define __NR_getpmsg           188     /* some people actually want streams */
-#define __NR_putpmsg           189     /* some people actually want streams */
-#define __NR_vfork             190
-#define __NR_ugetrlimit                191     /* SuS compliant getrlimit */
-#define __NR_mmap2             192
-#define __NR_truncate64                193
-#define __NR_ftruncate64       194
-#define __NR_stat64            195
-#define __NR_lstat64           196
-#define __NR_fstat64           197
-#define __NR_lchown32          198
-#define __NR_getuid32          199
-#define __NR_getgid32          200
-#define __NR_geteuid32         201
-#define __NR_getegid32         202
-#define __NR_setreuid32                203
-#define __NR_setregid32                204
-#define __NR_getgroups32       205
-#define __NR_setgroups32       206
-#define __NR_fchown32          207
-#define __NR_setresuid32       208
-#define __NR_getresuid32       209
-#define __NR_setresgid32       210
-#define __NR_getresgid32       211
-#define __NR_chown32           212
-#define __NR_setuid32          213
-#define __NR_setgid32          214
-#define __NR_setfsuid32                215
-#define __NR_setfsgid32                216
-#define __NR_pivot_root                217
-#define __NR_mincore           218
-#define __NR_madvise           219
-#define __NR_madvise1          219     /* delete when C lib stub is removed */
-#define __NR_getdents64                220
-#define __NR_fcntl64           221
-/* 223 is unused */
-#define __NR_gettid            224
-#define __NR_readahead         225
-#define __NR_setxattr          226
-#define __NR_lsetxattr         227
-#define __NR_fsetxattr         228
-#define __NR_getxattr          229
-#define __NR_lgetxattr         230
-#define __NR_fgetxattr         231
-#define __NR_listxattr         232
-#define __NR_llistxattr                233
-#define __NR_flistxattr                234
-#define __NR_removexattr       235
-#define __NR_lremovexattr      236
-#define __NR_fremovexattr      237
-#define __NR_tkill             238
-#define __NR_sendfile64                239
-#define __NR_futex             240
-#define __NR_sched_setaffinity 241
-#define __NR_sched_getaffinity 242
-#define __NR_set_thread_area   243
-#define __NR_get_thread_area   244
-#define __NR_io_setup          245
-#define __NR_io_destroy                246
-#define __NR_io_getevents      247
-#define __NR_io_submit         248
-#define __NR_io_cancel         249
-#define __NR_fadvise64         250
-
-#define __NR_exit_group                252
-#define __NR_lookup_dcookie    253
-#define __NR_epoll_create      254
-#define __NR_epoll_ctl         255
-#define __NR_epoll_wait                256
-#define __NR_remap_file_pages  257
-#define __NR_set_tid_address   258
-#define __NR_timer_create      259
-#define __NR_timer_settime     (__NR_timer_create+1)
-#define __NR_timer_gettime     (__NR_timer_create+2)
-#define __NR_timer_getoverrun  (__NR_timer_create+3)
-#define __NR_timer_delete      (__NR_timer_create+4)
-#define __NR_clock_settime     (__NR_timer_create+5)
-#define __NR_clock_gettime     (__NR_timer_create+6)
-#define __NR_clock_getres      (__NR_timer_create+7)
-#define __NR_clock_nanosleep   (__NR_timer_create+8)
-#define __NR_statfs64          268
-#define __NR_fstatfs64         269
-#define __NR_tgkill            270
-#define __NR_utimes            271
-#define __NR_fadvise64_64      272
-#define __NR_vserver           273
-#define __NR_mbind             274
-#define __NR_get_mempolicy     275
-#define __NR_set_mempolicy     276
-#define __NR_mq_open           277
-#define __NR_mq_unlink         (__NR_mq_open+1)
-#define __NR_mq_timedsend      (__NR_mq_open+2)
-#define __NR_mq_timedreceive   (__NR_mq_open+3)
-#define __NR_mq_notify         (__NR_mq_open+4)
-#define __NR_mq_getsetattr     (__NR_mq_open+5)
-#define __NR_kexec_load                283
-#define __NR_waitid            284
-#define __NR_add_key           286
-#define __NR_request_key       287
-#define __NR_keyctl            288
-#define __NR_cacheflush                289
-#define __NR_ioprio_set                290
-#define __NR_ioprio_get                291
-#define __NR_inotify_init      292
-#define __NR_inotify_add_watch 293
-#define __NR_inotify_rm_watch  294
-#define __NR_migrate_pages     295
-#define __NR_openat            296
-#define __NR_mkdirat           297
-#define __NR_mknodat           298
-#define __NR_fchownat          299
-#define __NR_futimesat         300
-#define __NR_fstatat64         301
-#define __NR_unlinkat          302
-#define __NR_renameat          303
-#define __NR_linkat            304
-#define __NR_symlinkat         305
-#define __NR_readlinkat                306
-#define __NR_fchmodat          307
-#define __NR_faccessat         308
-#define __NR_pselect6          309
-#define __NR_ppoll             310
-#define __NR_unshare           311
-#define __NR_set_robust_list   312
-#define __NR_get_robust_list   313
-#define __NR_splice            314
-#define __NR_sync_file_range   315
-#define __NR_tee               316
-#define __NR_vmsplice          317
-#define __NR_move_pages                318
-#define __NR_getcpu            319
-#define __NR_epoll_pwait       320
-#define __NR_utimensat         321
-#define __NR_signalfd          322
-#define __NR_timerfd_create    323
-#define __NR_eventfd           324
-#define __NR_fallocate         325
-#define __NR_timerfd_settime   326
-#define __NR_timerfd_gettime   327
-#define __NR_signalfd4         328
-#define __NR_eventfd2          329
-#define __NR_epoll_create1     330
-#define __NR_dup3              331
-#define __NR_pipe2             332
-#define __NR_inotify_init1     333
-
-#ifdef __KERNEL__
-
-#define NR_syscalls 326
-
-/*
- * specify the deprecated syscalls we want to support on this arch
- */
-#define __ARCH_WANT_IPC_PARSE_VERSION
-#define __ARCH_WANT_OLD_READDIR
-#define __ARCH_WANT_OLD_STAT
-#define __ARCH_WANT_STAT64
-#define __ARCH_WANT_SYS_ALARM
-#define __ARCH_WANT_SYS_GETHOSTNAME
-#define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
-#define __ARCH_WANT_SYS_SIGNAL
-#define __ARCH_WANT_SYS_TIME
-#define __ARCH_WANT_SYS_UTIME
-#define __ARCH_WANT_SYS_WAITPID
-#define __ARCH_WANT_SYS_SOCKETCALL
-#define __ARCH_WANT_SYS_FADVISE64
-#define __ARCH_WANT_SYS_GETPGRP
-#define __ARCH_WANT_SYS_LLSEEK
-#define __ARCH_WANT_SYS_NICE
-#define __ARCH_WANT_SYS_OLD_GETRLIMIT
-#define __ARCH_WANT_SYS_OLDUMOUNT
-#define __ARCH_WANT_SYS_SIGPENDING
-#define __ARCH_WANT_SYS_SIGPROCMASK
-#define __ARCH_WANT_SYS_RT_SIGACTION
-#define __ARCH_WANT_SYS_RT_SIGSUSPEND
-
-/*
- * "Conditional" syscalls
- *
- * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
- * but it doesn't work on all toolchains, so we just do it by hand
- */
-#ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _ASM_UNISTD_H */
diff --git a/include/asm-mn10300/unit-asb2303/clock.h b/include/asm-mn10300/unit-asb2303/clock.h
deleted file mode 100644 (file)
index 8b450e9..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ASB2303-specific clocks
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_UNIT_CLOCK_H
-#define _ASM_UNIT_CLOCK_H
-
-#ifndef __ASSEMBLY__
-
-#ifdef CONFIG_MN10300_RTC
-
-extern unsigned long mn10300_ioclk;    /* IOCLK (crystal speed) in HZ */
-extern unsigned long mn10300_iobclk;
-extern unsigned long mn10300_tsc_per_HZ;
-
-#define MN10300_IOCLK          ((unsigned long)mn10300_ioclk)
-/* If this processors has a another clock, uncomment the below. */
-/* #define MN10300_IOBCLK      ((unsigned long)mn10300_iobclk) */
-
-#else /* !CONFIG_MN10300_RTC */
-
-#define MN10300_IOCLK          33333333UL
-/* #define MN10300_IOBCLK      66666666UL */
-
-#endif /* !CONFIG_MN10300_RTC */
-
-#define MN10300_JCCLK          MN10300_IOCLK
-#define MN10300_TSCCLK         MN10300_IOCLK
-
-#ifdef CONFIG_MN10300_RTC
-#define MN10300_TSC_PER_HZ     ((unsigned long)mn10300_tsc_per_HZ)
-#else /* !CONFIG_MN10300_RTC */
-#define MN10300_TSC_PER_HZ     (MN10300_TSCCLK/HZ)
-#endif /* !CONFIG_MN10300_RTC */
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_UNIT_CLOCK_H */
diff --git a/include/asm-mn10300/unit-asb2303/leds.h b/include/asm-mn10300/unit-asb2303/leds.h
deleted file mode 100644 (file)
index 3a7543e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ASB2303-specific LEDs
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_UNIT_LEDS_H
-#define _ASM_UNIT_LEDS_H
-
-#include <asm/pio-regs.h>
-#include <asm/cpu-regs.h>
-#include <asm/exceptions.h>
-
-#define ASB2303_GPIO0DEF       __SYSREG(0xDB000000, u32)
-#define ASB2303_7SEGLEDS       __SYSREG(0xDB000008, u32)
-
-/*
- * use the 7-segment LEDs to indicate states
- */
-
-/* flip the 7-segment LEDs between "G" and "-" */
-#define mn10300_set_gdbleds(ONOFF)                     \
-do {                                                   \
-       ASB2303_7SEGLEDS = (ONOFF) ? 0x85 : 0x7f;       \
-} while (0)
-
-/* indicate double-fault by displaying "d" on the LEDs */
-#define mn10300_set_dbfleds                    \
-       mov     0x43,d0                 ;       \
-       movbu   d0,(ASB2303_7SEGLEDS)
-
-#ifndef __ASSEMBLY__
-extern void peripheral_leds_display_exception(enum exception_code code);
-extern void peripheral_leds_led_chase(void);
-extern void debug_to_serial(const char *p, int n);
-#endif /* __ASSEMBLY__ */
-
-#endif /* _ASM_UNIT_LEDS_H */
diff --git a/include/asm-mn10300/unit-asb2303/serial.h b/include/asm-mn10300/unit-asb2303/serial.h
deleted file mode 100644 (file)
index 0d55cf5..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/* ASB2303-specific 8250 serial ports
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_UNIT_SERIAL_H
-#define _ASM_UNIT_SERIAL_H
-
-#include <asm/cpu-regs.h>
-#include <asm/proc/irq.h>
-#include <linux/serial_reg.h>
-
-#define SERIAL_PORT0_BASE_ADDRESS      0xA6FB0000
-#define SERIAL_PORT1_BASE_ADDRESS      0xA6FC0000
-
-#define SERIAL_IRQ     XIRQ0   /* Dual serial (PC16552)        (Hi) */
-
-/*
- * dispose of the /dev/ttyS0 and /dev/ttyS1 serial ports
- */
-#ifndef CONFIG_GDBSTUB_ON_TTYSx
-
-#define SERIAL_PORT_DFNS                                               \
-       {                                                               \
-       .baud_base              = BASE_BAUD,                            \
-       .irq                    = SERIAL_IRQ,                           \
-       .flags                  = STD_COM_FLAGS,                        \
-       .iomem_base             = (u8 *) SERIAL_PORT0_BASE_ADDRESS,     \
-       .iomem_reg_shift        = 2,                                    \
-       .io_type                = SERIAL_IO_MEM,                        \
-       },                                                              \
-       {                                                               \
-       .baud_base              = BASE_BAUD,                            \
-       .irq                    = SERIAL_IRQ,                           \
-       .flags                  = STD_COM_FLAGS,                        \
-       .iomem_base             = (u8 *) SERIAL_PORT1_BASE_ADDRESS,     \
-       .iomem_reg_shift        = 2,                                    \
-       .io_type                = SERIAL_IO_MEM,                        \
-       },
-
-#ifndef __ASSEMBLY__
-
-static inline void __debug_to_serial(const char *p, int n)
-{
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#else /* CONFIG_GDBSTUB_ON_TTYSx */
-
-#define SERIAL_PORT_DFNS /* both stolen by gdb-stub because they share an IRQ */
-
-#if defined(CONFIG_GDBSTUB_ON_TTYS0)
-#define GDBPORT_SERIAL_RX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_RX  * 4, u8)
-#define GDBPORT_SERIAL_TX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_TX  * 4, u8)
-#define GDBPORT_SERIAL_DLL     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLL * 4, u8)
-#define GDBPORT_SERIAL_DLM     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLM * 4, u8)
-#define GDBPORT_SERIAL_IER     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IER * 4, u8)
-#define GDBPORT_SERIAL_IIR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IIR * 4, u8)
-#define GDBPORT_SERIAL_FCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_FCR * 4, u8)
-#define GDBPORT_SERIAL_LCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LCR * 4, u8)
-#define GDBPORT_SERIAL_MCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MCR * 4, u8)
-#define GDBPORT_SERIAL_LSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LSR * 4, u8)
-#define GDBPORT_SERIAL_MSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MSR * 4, u8)
-#define GDBPORT_SERIAL_SCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_SCR * 4, u8)
-#define GDBPORT_SERIAL_IRQ     SERIAL_IRQ
-
-#elif defined(CONFIG_GDBSTUB_ON_TTYS1)
-#define GDBPORT_SERIAL_RX      __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_RX  * 4, u8)
-#define GDBPORT_SERIAL_TX      __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_TX  * 4, u8)
-#define GDBPORT_SERIAL_DLL     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_DLL * 4, u8)
-#define GDBPORT_SERIAL_DLM     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_DLM * 4, u8)
-#define GDBPORT_SERIAL_IER     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_IER * 4, u8)
-#define GDBPORT_SERIAL_IIR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_IIR * 4, u8)
-#define GDBPORT_SERIAL_FCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_FCR * 4, u8)
-#define GDBPORT_SERIAL_LCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_LCR * 4, u8)
-#define GDBPORT_SERIAL_MCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_MCR * 4, u8)
-#define GDBPORT_SERIAL_LSR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_LSR * 4, u8)
-#define GDBPORT_SERIAL_MSR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_MSR * 4, u8)
-#define GDBPORT_SERIAL_SCR     __SYSREG(SERIAL_PORT1_BASE_ADDRESS + UART_SCR * 4, u8)
-#define GDBPORT_SERIAL_IRQ     SERIAL_IRQ
-#endif
-
-#ifndef __ASSEMBLY__
-
-#define LSR_WAIT_FOR(STATE)                                    \
-do {                                                           \
-       while (!(GDBPORT_SERIAL_LSR & UART_LSR_##STATE)) {}     \
-} while (0)
-#define FLOWCTL_WAIT_FOR(LINE)                                 \
-do {                                                           \
-       while (!(GDBPORT_SERIAL_MSR & UART_MSR_##LINE)) {}      \
-} while (0)
-#define FLOWCTL_CLEAR(LINE)                    \
-do {                                           \
-       GDBPORT_SERIAL_MCR &= ~UART_MCR_##LINE; \
-} while (0)
-#define FLOWCTL_SET(LINE)                      \
-do {                                           \
-       GDBPORT_SERIAL_MCR |= UART_MCR_##LINE;  \
-} while (0)
-#define FLOWCTL_QUERY(LINE)    ({ GDBPORT_SERIAL_MSR & UART_MSR_##LINE; })
-
-static inline void __debug_to_serial(const char *p, int n)
-{
-       char ch;
-
-       FLOWCTL_SET(DTR);
-
-       for (; n > 0; n--) {
-               LSR_WAIT_FOR(THRE);
-               FLOWCTL_WAIT_FOR(CTS);
-
-               ch = *p++;
-               if (ch == 0x0a) {
-                       GDBPORT_SERIAL_TX = 0x0d;
-                       LSR_WAIT_FOR(THRE);
-                       FLOWCTL_WAIT_FOR(CTS);
-               }
-               GDBPORT_SERIAL_TX = ch;
-       }
-
-       FLOWCTL_CLEAR(DTR);
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* CONFIG_GDBSTUB_ON_TTYSx */
-
-#endif /* _ASM_UNIT_SERIAL_H */
diff --git a/include/asm-mn10300/unit-asb2303/smc91111.h b/include/asm-mn10300/unit-asb2303/smc91111.h
deleted file mode 100644 (file)
index dd456e9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Support for the SMC91C111 NIC on an ASB2303
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_UNIT_SMC91111_H
-#define _ASM_UNIT_SMC91111_H
-
-#include <asm/intctl-regs.h>
-
-#define SMC91111_BASE          0xAA000300UL
-#define SMC91111_BASE_END      0xAA000400UL
-#define SMC91111_IRQ           XIRQ3
-
-#define SMC_CAN_USE_8BIT       0
-#define SMC_CAN_USE_16BIT      1
-#define SMC_CAN_USE_32BIT      0
-#define SMC_NOWAIT             1
-#define SMC_IRQ_FLAGS          (0)
-
-#if SMC_CAN_USE_8BIT
-#define SMC_inb(a, r)          inb((unsigned long) ((a) + (r)))
-#define SMC_outb(v, a, r)      outb(v, (unsigned long) ((a) + (r)))
-#endif
-
-#if SMC_CAN_USE_16BIT
-#define SMC_inw(a, r)          inw((unsigned long) ((a) + (r)))
-#define SMC_outw(v, a, r)      outw(v, (unsigned long) ((a) + (r)))
-#define SMC_insw(a, r, p, l)   insw((unsigned long) ((a) + (r)), (p), (l))
-#define SMC_outsw(a, r, p, l)  outsw((unsigned long) ((a) + (r)), (p), (l))
-#endif
-
-#if SMC_CAN_USE_32BIT
-#define SMC_inl(a, r)          inl((unsigned long) ((a) + (r)))
-#define SMC_outl(v, a, r)      outl(v, (unsigned long) ((a) + (r)))
-#define SMC_insl(a, r, p, l)   insl((unsigned long) ((a) + (r)), (p), (l))
-#define SMC_outsl(a, r, p, l)  outsl((unsigned long) ((a) + (r)), (p), (l))
-#endif
-
-#define RPC_LSA_DEFAULT                RPC_LED_100_10
-#define RPC_LSB_DEFAULT                RPC_LED_TX_RX
-
-#define set_irq_type(irq, type)
-
-#endif /*  _ASM_UNIT_SMC91111_H */
diff --git a/include/asm-mn10300/unit-asb2303/timex.h b/include/asm-mn10300/unit-asb2303/timex.h
deleted file mode 100644 (file)
index 7e54b0c..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/* ASB2303-specific timer specifcations
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_UNIT_TIMEX_H
-#define _ASM_UNIT_TIMEX_H
-
-#ifndef __ASSEMBLY__
-#include <linux/irq.h>
-#endif /* __ASSEMBLY__ */
-
-#include <asm/timer-regs.h>
-#include <asm/unit/clock.h>
-
-/*
- * jiffies counter specifications
- */
-
-#define        TMJCBR_MAX              0xffff
-#define        TMJCBC                  TM01BC
-
-#define        TMJCMD                  TM01MD
-#define        TMJCBR                  TM01BR
-#define        TMJCIRQ                 TM1IRQ
-#define        TMJCICR                 TM1ICR
-#define        TMJCICR_LEVEL           GxICR_LEVEL_5
-
-#ifndef __ASSEMBLY__
-
-static inline void startup_jiffies_counter(void)
-{
-       unsigned rate;
-       u16 md, t16;
-
-       /* use as little prescaling as possible to avoid losing accuracy */
-       md = TM0MD_SRC_IOCLK;
-       rate = MN10300_JCCLK / HZ;
-
-       if (rate > TMJCBR_MAX) {
-               md = TM0MD_SRC_IOCLK_8;
-               rate = MN10300_JCCLK / 8 / HZ;
-
-               if (rate > TMJCBR_MAX) {
-                       md = TM0MD_SRC_IOCLK_32;
-                       rate = MN10300_JCCLK / 32 / HZ;
-
-                       if (rate > TMJCBR_MAX)
-                               BUG();
-               }
-       }
-
-       TMJCBR = rate - 1;
-       t16 = TMJCBR;
-
-       TMJCMD =
-               md |
-               TM1MD_SRC_TM0CASCADE << 8 |
-               TM0MD_INIT_COUNTER |
-               TM1MD_INIT_COUNTER << 8;
-
-       TMJCMD =
-               md |
-               TM1MD_SRC_TM0CASCADE << 8 |
-               TM0MD_COUNT_ENABLE |
-               TM1MD_COUNT_ENABLE << 8;
-
-       t16 = TMJCMD;
-
-       TMJCICR |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST;
-       t16 = TMJCICR;
-}
-
-static inline void shutdown_jiffies_counter(void)
-{
-}
-
-#endif /* !__ASSEMBLY__ */
-
-
-/*
- * timestamp counter specifications
- */
-
-#define        TMTSCBR_MAX             0xffffffff
-#define        TMTSCBC                 TM45BC
-
-#ifndef __ASSEMBLY__
-
-static inline void startup_timestamp_counter(void)
-{
-       /* set up timer 4 & 5 cascaded as a 32-bit counter to count real time
-        * - count down from 4Gig-1 to 0 and wrap at IOCLK rate
-        */
-       TM45BR = TMTSCBR_MAX;
-
-       TM4MD = TM4MD_SRC_IOCLK;
-       TM4MD |= TM4MD_INIT_COUNTER;
-       TM4MD &= ~TM4MD_INIT_COUNTER;
-       TM4ICR = 0;
-
-       TM5MD = TM5MD_SRC_TM4CASCADE;
-       TM5MD |= TM5MD_INIT_COUNTER;
-       TM5MD &= ~TM5MD_INIT_COUNTER;
-       TM5ICR = 0;
-
-       TM5MD |= TM5MD_COUNT_ENABLE;
-       TM4MD |= TM4MD_COUNT_ENABLE;
-}
-
-static inline void shutdown_timestamp_counter(void)
-{
-       TM4MD = 0;
-       TM5MD = 0;
-}
-
-/*
- * we use a cascaded pair of 16-bit down-counting timers to count I/O
- * clock cycles for the purposes of time keeping
- */
-typedef unsigned long cycles_t;
-
-static inline cycles_t read_timestamp_counter(void)
-{
-       return (cycles_t)TMTSCBC;
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_UNIT_TIMEX_H */
diff --git a/include/asm-mn10300/unit-asb2305/clock.h b/include/asm-mn10300/unit-asb2305/clock.h
deleted file mode 100644 (file)
index 7d51484..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ASB2305-specific clocks
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_UNIT_CLOCK_H
-#define _ASM_UNIT_CLOCK_H
-
-#ifndef __ASSEMBLY__
-
-#ifdef CONFIG_MN10300_RTC
-
-extern unsigned long mn10300_ioclk;    /* IOCLK (crystal speed) in HZ */
-extern unsigned long mn10300_iobclk;
-extern unsigned long mn10300_tsc_per_HZ;
-
-#define MN10300_IOCLK          ((unsigned long)mn10300_ioclk)
-/* If this processors has a another clock, uncomment the below. */
-/* #define MN10300_IOBCLK      ((unsigned long)mn10300_iobclk) */
-
-#else /* !CONFIG_MN10300_RTC */
-
-#define MN10300_IOCLK          33333333UL
-/* #define MN10300_IOBCLK      66666666UL */
-
-#endif /* !CONFIG_MN10300_RTC */
-
-#define MN10300_JCCLK          MN10300_IOCLK
-#define MN10300_TSCCLK         MN10300_IOCLK
-
-#ifdef CONFIG_MN10300_RTC
-#define MN10300_TSC_PER_HZ     ((unsigned long)mn10300_tsc_per_HZ)
-#else /* !CONFIG_MN10300_RTC */
-#define MN10300_TSC_PER_HZ     (MN10300_TSCCLK/HZ)
-#endif /* !CONFIG_MN10300_RTC */
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_UNIT_CLOCK_H */
diff --git a/include/asm-mn10300/unit-asb2305/leds.h b/include/asm-mn10300/unit-asb2305/leds.h
deleted file mode 100644 (file)
index bc471f6..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ASB2305-specific LEDs
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_UNIT_LEDS_H
-#define _ASM_UNIT_LEDS_H
-
-#include <asm/pio-regs.h>
-#include <asm/cpu-regs.h>
-#include <asm/exceptions.h>
-
-#define ASB2305_7SEGLEDS       __SYSREG(0xA6F90000, u32)
-
-/* perform a hard reset by driving PIO06 low */
-#define mn10300_unit_hard_reset()              \
-do {                                           \
-       P0OUT &= 0xbf;                          \
-       P0MD = (P0MD & P0MD_6) | P0MD_6_OUT;    \
-} while (0)
-
-/*
- * use the 7-segment LEDs to indicate states
- */
-/* indicate double-fault by displaying "db-f" on the LEDs */
-#define mn10300_set_dbfleds                    \
-       mov     0x43077f1d,d0           ;       \
-       mov     d0,(ASB2305_7SEGLEDS)
-
-/* flip the 7-segment LEDs between "Gdb-" and "----" */
-#define mn10300_set_gdbleds(ONOFF)                             \
-do {                                                           \
-       ASB2305_7SEGLEDS = (ONOFF) ? 0x8543077f : 0x7f7f7f7f;   \
-} while (0)
-
-#ifndef __ASSEMBLY__
-extern void peripheral_leds_display_exception(enum exception_code);
-extern void peripheral_leds_led_chase(void);
-extern void peripheral_leds7x4_display_dec(unsigned int, unsigned int);
-extern void peripheral_leds7x4_display_hex(unsigned int, unsigned int);
-extern void peripheral_leds7x4_display_minssecs(unsigned int, unsigned int);
-extern void peripheral_leds7x4_display_rtc(void);
-#endif /* __ASSEMBLY__ */
-
-#endif /* _ASM_UNIT_LEDS_H */
diff --git a/include/asm-mn10300/unit-asb2305/serial.h b/include/asm-mn10300/unit-asb2305/serial.h
deleted file mode 100644 (file)
index 73d31d6..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/* ASB2305-specific 8250 serial ports
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_UNIT_SERIAL_H
-#define _ASM_UNIT_SERIAL_H
-
-#include <asm/cpu/cpu-regs.h>
-#include <asm/proc/irq.h>
-#include <linux/serial_reg.h>
-
-#define SERIAL_PORT0_BASE_ADDRESS      0xA6FB0000
-#define ASB2305_DEBUG_MCR      __SYSREG(0xA6FB0000 + UART_MCR * 2, u8)
-
-#define SERIAL_IRQ     XIRQ0   /* Dual serial (PC16552)        (Hi) */
-
-/*
- * dispose of the /dev/ttyS0 serial port
- */
-#ifndef CONFIG_GDBSTUB_ON_TTYSx
-
-#define SERIAL_PORT_DFNS                                               \
-       {                                                               \
-       .baud_base              = BASE_BAUD,                            \
-       .irq                    = SERIAL_IRQ,                           \
-       .flags                  = STD_COM_FLAGS,                        \
-       .iomem_base             = (u8 *) SERIAL_PORT0_BASE_ADDRESS,     \
-       .iomem_reg_shift        = 2,                                    \
-       .io_type                = SERIAL_IO_MEM,                        \
-       },
-
-#ifndef __ASSEMBLY__
-
-static inline void __debug_to_serial(const char *p, int n)
-{
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#else /* CONFIG_GDBSTUB_ON_TTYSx */
-
-#define SERIAL_PORT_DFNS /* stolen by gdb-stub */
-
-#if defined(CONFIG_GDBSTUB_ON_TTYS0)
-#define GDBPORT_SERIAL_RX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_RX  * 4, u8)
-#define GDBPORT_SERIAL_TX      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_TX  * 4, u8)
-#define GDBPORT_SERIAL_DLL     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLL * 4, u8)
-#define GDBPORT_SERIAL_DLM     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_DLM * 4, u8)
-#define GDBPORT_SERIAL_IER     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IER * 4, u8)
-#define GDBPORT_SERIAL_IIR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IIR * 4, u8)
-#define GDBPORT_SERIAL_FCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_FCR * 4, u8)
-#define GDBPORT_SERIAL_LCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LCR * 4, u8)
-#define GDBPORT_SERIAL_MCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MCR * 4, u8)
-#define GDBPORT_SERIAL_LSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LSR * 4, u8)
-#define GDBPORT_SERIAL_MSR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MSR * 4, u8)
-#define GDBPORT_SERIAL_SCR     __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_SCR * 4, u8)
-#define GDBPORT_SERIAL_IRQ     SERIAL_IRQ
-
-#elif defined(CONFIG_GDBSTUB_ON_TTYS1)
-#error The ASB2305 doesnt have a /dev/ttyS1
-#endif
-
-#ifndef __ASSEMBLY__
-
-#define TTYS0_TX       __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_TX  * 4, u8)
-#define TTYS0_MCR      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MCR * 4, u8)
-#define TTYS0_LSR      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_LSR * 4, u8)
-#define TTYS0_MSR      __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_MSR * 4, u8)
-
-#define LSR_WAIT_FOR(STATE)                            \
-do {                                                   \
-       while (!(TTYS0_LSR & UART_LSR_##STATE)) {}      \
-} while (0)
-#define FLOWCTL_WAIT_FOR(LINE)                         \
-do {                                                   \
-       while (!(TTYS0_MSR & UART_MSR_##LINE)) {}       \
-} while (0)
-#define FLOWCTL_CLEAR(LINE)                    \
-do {                                           \
-       TTYS0_MCR &= ~UART_MCR_##LINE;          \
-} while (0)
-#define FLOWCTL_SET(LINE)                      \
-do {                                           \
-       TTYS0_MCR |= UART_MCR_##LINE;           \
-} while (0)
-#define FLOWCTL_QUERY(LINE)    ({ TTYS0_MSR & UART_MSR_##LINE; })
-
-static inline void __debug_to_serial(const char *p, int n)
-{
-       char ch;
-
-       FLOWCTL_SET(DTR);
-
-       for (; n > 0; n--) {
-               LSR_WAIT_FOR(THRE);
-               FLOWCTL_WAIT_FOR(CTS);
-
-               ch = *p++;
-               if (ch == 0x0a) {
-                       TTYS0_TX = 0x0d;
-                       LSR_WAIT_FOR(THRE);
-                       FLOWCTL_WAIT_FOR(CTS);
-               }
-               TTYS0_TX = ch;
-       }
-
-       FLOWCTL_CLEAR(DTR);
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* CONFIG_GDBSTUB_ON_TTYSx */
-
-#endif /* _ASM_UNIT_SERIAL_H */
diff --git a/include/asm-mn10300/unit-asb2305/timex.h b/include/asm-mn10300/unit-asb2305/timex.h
deleted file mode 100644 (file)
index 10e1bfe..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/* ASB2305 timer specifcations
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_UNIT_TIMEX_H
-#define _ASM_UNIT_TIMEX_H
-
-#ifndef __ASSEMBLY__
-#include <linux/irq.h>
-#endif /* __ASSEMBLY__ */
-
-#include <asm/cpu/timer-regs.h>
-#include <asm/unit/clock.h>
-
-/*
- * jiffies counter specifications
- */
-
-#define        TMJCBR_MAX              0xffff
-#define        TMJCBC                  TM01BC
-
-#define        TMJCMD                  TM01MD
-#define        TMJCBR                  TM01BR
-#define        TMJCIRQ                 TM1IRQ
-#define        TMJCICR                 TM1ICR
-#define        TMJCICR_LEVEL           GxICR_LEVEL_5
-
-#ifndef __ASSEMBLY__
-
-static inline void startup_jiffies_counter(void)
-{
-       unsigned rate;
-       u16 md, t16;
-
-       /* use as little prescaling as possible to avoid losing accuracy */
-       md = TM0MD_SRC_IOCLK;
-       rate = MN10300_JCCLK / HZ;
-
-       if (rate > TMJCBR_MAX) {
-               md = TM0MD_SRC_IOCLK_8;
-               rate = MN10300_JCCLK / 8 / HZ;
-
-               if (rate > TMJCBR_MAX) {
-                       md = TM0MD_SRC_IOCLK_32;
-                       rate = MN10300_JCCLK / 32 / HZ;
-
-                       if (rate > TMJCBR_MAX)
-                               BUG();
-               }
-       }
-
-       TMJCBR = rate - 1;
-       t16 = TMJCBR;
-
-       TMJCMD =
-               md |
-               TM1MD_SRC_TM0CASCADE << 8 |
-               TM0MD_INIT_COUNTER |
-               TM1MD_INIT_COUNTER << 8;
-
-       TMJCMD =
-               md |
-               TM1MD_SRC_TM0CASCADE << 8 |
-               TM0MD_COUNT_ENABLE |
-               TM1MD_COUNT_ENABLE << 8;
-
-       t16 = TMJCMD;
-
-       TMJCICR |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST;
-       t16 = TMJCICR;
-}
-
-static inline void shutdown_jiffies_counter(void)
-{
-}
-
-#endif /* !__ASSEMBLY__ */
-
-
-/*
- * timestamp counter specifications
- */
-
-#define        TMTSCBR_MAX             0xffffffff
-#define        TMTSCBC                 TM45BC
-
-#ifndef __ASSEMBLY__
-
-static inline void startup_timestamp_counter(void)
-{
-       /* set up timer 4 & 5 cascaded as a 32-bit counter to count real time
-        * - count down from 4Gig-1 to 0 and wrap at IOCLK rate
-        */
-       TM45BR = TMTSCBR_MAX;
-
-       TM4MD = TM4MD_SRC_IOCLK;
-       TM4MD |= TM4MD_INIT_COUNTER;
-       TM4MD &= ~TM4MD_INIT_COUNTER;
-       TM4ICR = 0;
-
-       TM5MD = TM5MD_SRC_TM4CASCADE;
-       TM5MD |= TM5MD_INIT_COUNTER;
-       TM5MD &= ~TM5MD_INIT_COUNTER;
-       TM5ICR = 0;
-
-       TM5MD |= TM5MD_COUNT_ENABLE;
-       TM4MD |= TM4MD_COUNT_ENABLE;
-}
-
-static inline void shutdown_timestamp_counter(void)
-{
-       TM4MD = 0;
-       TM5MD = 0;
-}
-
-/*
- * we use a cascaded pair of 16-bit down-counting timers to count I/O
- * clock cycles for the purposes of time keeping
- */
-typedef unsigned long cycles_t;
-
-static inline cycles_t read_timestamp_counter(void)
-{
-       return (cycles_t) TMTSCBC;
-}
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_UNIT_TIMEX_H */
diff --git a/include/asm-mn10300/user.h b/include/asm-mn10300/user.h
deleted file mode 100644 (file)
index e119390..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* MN10300 User process data
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_USER_H
-#define _ASM_USER_H
-
-#include <asm/page.h>
-#include <linux/ptrace.h>
-
-#ifndef __ASSEMBLY__
-/*
- * When the kernel dumps core, it starts by dumping the user struct - this will
- * be used by gdb to figure out where the data and stack segments are within
- * the file, and what virtual addresses to use.
- */
-struct user {
-       /* We start with the registers, to mimic the way that "memory" is
-        * returned from the ptrace(3,...) function.
-        */
-       struct pt_regs regs;            /* Where the registers are actually stored */
-
-       /* The rest of this junk is to help gdb figure out what goes where */
-       unsigned long int u_tsize;      /* Text segment size (pages). */
-       unsigned long int u_dsize;      /* Data segment size (pages). */
-       unsigned long int u_ssize;      /* Stack segment size (pages). */
-       unsigned long start_code;       /* Starting virtual address of text. */
-       unsigned long start_stack;      /* Starting virtual address of stack area.
-                                          This is actually the bottom of the stack,
-                                          the top of the stack is always found in the
-                                          esp register.  */
-       long int signal;                /* Signal that caused the core dump. */
-       int reserved;                   /* No longer used */
-       struct user_pt_regs *u_ar0;     /* Used by gdb to help find the values for */
-
-       /* the registers */
-       unsigned long magic;            /* To uniquely identify a core file */
-       char u_comm[32];                /* User command that was responsible */
-};
-#endif
-
-#define NBPG PAGE_SIZE
-#define UPAGES 1
-#define HOST_TEXT_START_ADDR   +(u.start_code)
-#define HOST_STACK_END_ADDR    +(u.start_stack + u.u_ssize * NBPG)
-
-#endif /* _ASM_USER_H */
diff --git a/include/asm-mn10300/vga.h b/include/asm-mn10300/vga.h
deleted file mode 100644 (file)
index 0163e50..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* MN10300 VGA register definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_VGA_H
-#define _ASM_VGA_H
-
-
-
-#endif /* _ASM_VGA_H */
diff --git a/include/asm-mn10300/xor.h b/include/asm-mn10300/xor.h
deleted file mode 100644 (file)
index c82eb12..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/xor.h>
index 6617c9f..cb79b7a 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef __LINUX_ATA_H__
 #define __LINUX_ATA_H__
 
+#include <linux/kernel.h>
+#include <linux/string.h>
 #include <linux/types.h>
 #include <asm/byteorder.h>
 
@@ -91,6 +93,7 @@ enum {
        ATA_ID_CFA_POWER        = 160,
        ATA_ID_CFA_KEY_MGMT     = 162,
        ATA_ID_CFA_MODES        = 163,
+       ATA_ID_DATA_SET_MGMT    = 169,
        ATA_ID_ROT_SPEED        = 217,
        ATA_ID_PIO4             = (1 << 1),
 
@@ -248,6 +251,7 @@ enum {
        ATA_CMD_SMART           = 0xB0,
        ATA_CMD_MEDIA_LOCK      = 0xDE,
        ATA_CMD_MEDIA_UNLOCK    = 0xDF,
+       ATA_CMD_DSM             = 0x06,
        /* marked obsolete in the ATA/ATAPI-7 spec */
        ATA_CMD_RESTORE         = 0x10,
 
@@ -321,6 +325,9 @@ enum {
        ATA_SMART_READ_VALUES   = 0xD0,
        ATA_SMART_READ_THRESHOLDS = 0xD1,
 
+       /* feature values for Data Set Management */
+       ATA_DSM_TRIM            = 0x01,
+
        /* password used in LBA Mid / LBA High for executing SMART commands */
        ATA_SMART_LBAM_PASS     = 0x4F,
        ATA_SMART_LBAH_PASS     = 0xC2,
@@ -723,6 +730,14 @@ static inline int ata_id_has_unload(const u16 *id)
        return 0;
 }
 
+static inline int ata_id_has_trim(const u16 *id)
+{
+       if (ata_id_major_version(id) >= 7 &&
+           (id[ATA_ID_DATA_SET_MGMT] & 1))
+               return 1;
+       return 0;
+}
+
 static inline int ata_id_current_chs_valid(const u16 *id)
 {
        /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
@@ -863,6 +878,32 @@ static inline void ata_id_to_hd_driveid(u16 *id)
 #endif
 }
 
+/*
+ * Write up to 'max' LBA Range Entries to the buffer that will cover the
+ * extent from sector to sector + count.  This is used for TRIM and for
+ * ADD LBA(S) TO NV CACHE PINNED SET.
+ */
+static inline unsigned ata_set_lba_range_entries(void *_buffer, unsigned max,
+                                               u64 sector, unsigned long count)
+{
+       __le64 *buffer = _buffer;
+       unsigned i = 0;
+
+       while (i < max) {
+               u64 entry = sector |
+                       ((u64)(count > 0xffff ? 0xffff : count) << 48);
+               buffer[i++] = __cpu_to_le64(entry);
+               if (count <= 0xffff)
+                       break;
+               count -= 0xffff;
+               sector += 0xffff;
+       }
+
+       max = ALIGN(i * 8, 512);
+       memset(buffer + i, 0, max - i * 8);
+       return max;
+}
+
 static inline int is_multi_taskfile(struct ata_taskfile *tf)
 {
        return (tf->command == ATA_CMD_READ_MULTI) ||
index e036609..ba54c83 100644 (file)
@@ -117,7 +117,6 @@ enum rq_flag_bits {
        __REQ_RW_META,          /* metadata io request */
        __REQ_COPY_USER,        /* contains copies of user pages */
        __REQ_INTEGRITY,        /* integrity metadata has been remapped */
-       __REQ_UNPLUG,           /* unplug queue on submission */
        __REQ_NOIDLE,           /* Don't anticipate more IO after this one */
        __REQ_NR_BITS,          /* stops here */
 };
@@ -145,7 +144,6 @@ enum rq_flag_bits {
 #define REQ_RW_META    (1 << __REQ_RW_META)
 #define REQ_COPY_USER  (1 << __REQ_COPY_USER)
 #define REQ_INTEGRITY  (1 << __REQ_INTEGRITY)
-#define REQ_UNPLUG     (1 << __REQ_UNPLUG)
 #define REQ_NOIDLE     (1 << __REQ_NOIDLE)
 
 #define BLK_MAX_CDB    16
index 6faa7e5..37bcb50 100644 (file)
@@ -76,7 +76,8 @@ struct ftrace_branch_data {
  * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
  * to disable branch tracing on a per file basis.
  */
-#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING)
+#if defined(CONFIG_TRACE_BRANCH_PROFILING) \
+    && !defined(DISABLE_BRANCH_PROFILING) && !defined(__CHECKER__)
 void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
 
 #define likely_notrace(x)      __builtin_expect(!!(x), 1)
@@ -114,7 +115,9 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
  * "Define 'is'", Bill Clinton
  * "Define 'if'", Steven Rostedt
  */
-#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) :         \
+#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
+#define __trace_if(cond) \
+       if (__builtin_constant_p((cond)) ? !!(cond) :                   \
        ({                                                              \
                int ______r;                                            \
                static struct ftrace_branch_data                        \
index 66ec05a..ded2d7c 100644 (file)
@@ -116,7 +116,6 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d);
 /*
  * Target features
  */
-#define DM_TARGET_SUPPORTS_BARRIERS 0x00000001
 
 struct target_type {
        uint64_t features;
index d7d090d..8083b6a 100644 (file)
@@ -115,7 +115,7 @@ static inline u64 dma_get_mask(struct device *dev)
 {
        if (dev && dev->dma_mask && *dev->dma_mask)
                return *dev->dma_mask;
-       return DMA_32BIT_MASK;
+       return DMA_BIT_MASK(32);
 }
 
 extern u64 dma_get_required_mask(struct device *dev);
index 2f34274..e397dc3 100644 (file)
@@ -34,6 +34,7 @@ struct dmar_drhd_unit {
        u64     reg_base_addr;          /* register base address*/
        struct  pci_dev **devices;      /* target device array  */
        int     devices_cnt;            /* target device count  */
+       u16     segment;                /* PCI domain           */
        u8      ignored:1;              /* ignore drhd          */
        u8      include_all:1;
        struct intel_iommu *iommu;
@@ -44,6 +45,14 @@ extern struct list_head dmar_drhd_units;
 #define for_each_drhd_unit(drhd) \
        list_for_each_entry(drhd, &dmar_drhd_units, list)
 
+#define for_each_active_iommu(i, drhd)                                 \
+       list_for_each_entry(drhd, &dmar_drhd_units, list)               \
+               if (i=drhd->iommu, drhd->ignored) {} else
+
+#define for_each_iommu(i, drhd)                                                \
+       list_for_each_entry(drhd, &dmar_drhd_units, list)               \
+               if (i=drhd->iommu, 0) {} else 
+
 extern int dmar_table_init(void);
 extern int dmar_dev_scope_init(void);
 
@@ -100,6 +109,8 @@ struct irte {
 #ifdef CONFIG_INTR_REMAP
 extern int intr_remapping_enabled;
 extern int enable_intr_remapping(int);
+extern void disable_intr_remapping(void);
+extern int reenable_intr_remapping(int);
 
 extern int get_irte(int irq, struct irte *entry);
 extern int modify_irte(int irq, struct irte *irte_modified);
index 7a20425..c59b769 100644 (file)
@@ -116,6 +116,7 @@ extern void elv_abort_queue(struct request_queue *);
 extern void elv_completed_request(struct request_queue *, struct request *);
 extern int elv_set_request(struct request_queue *, struct request *, gfp_t);
 extern void elv_put_request(struct request_queue *, struct request *);
+extern void elv_drain_elevator(struct request_queue *);
 
 /*
  * io scheduler registration
index bce40a2..562d285 100644 (file)
@@ -1699,6 +1699,9 @@ struct file_system_type {
        struct lock_class_key i_alloc_sem_key;
 };
 
+extern int get_sb_ns(struct file_system_type *fs_type, int flags, void *data,
+       int (*fill_super)(struct super_block *, void *, int),
+       struct vfsmount *mnt);
 extern int get_sb_bdev(struct file_system_type *fs_type,
        int flags, const char *dev_name, void *data,
        int (*fill_super)(struct super_block *, void *, int),
index 7ef1caf..f2a78b5 100644 (file)
@@ -18,7 +18,6 @@
 #define _FSL_DEVICE_H_
 
 #include <linux/types.h>
-#include <linux/phy.h>
 
 /*
  * Some conventions on how we handle peripherals on Freescale chips
  *
  */
 
-struct gianfar_platform_data {
-       /* device specific information */
-       u32     device_flags;
-       char    bus_id[BUS_ID_SIZE];
-       phy_interface_t interface;
-};
-
-struct gianfar_mdio_data {
-       /* board specific information */
-       int     irq[32];
-};
-
-/* Flags in gianfar_platform_data */
-#define FSL_GIANFAR_BRD_HAS_PHY_INTR   0x00000001 /* set or use a timer */
-#define FSL_GIANFAR_BRD_IS_REDUCED     0x00000002 /* Set if RGMII, RMII */
-
-struct fsl_i2c_platform_data {
-       /* device specific information */
-       u32     device_flags;
-};
-
 /* Flags related to I2C device features */
 #define FSL_I2C_DEV_SEPARATE_DFSRR     0x00000001
 #define FSL_I2C_DEV_CLOCK_5200         0x00000002
index 015a3d2..8a0c2f2 100644 (file)
@@ -356,6 +356,9 @@ struct ftrace_graph_ret {
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 
+/* for init task */
+#define INIT_FTRACE_GRAPH              .ret_stack = NULL,
+
 /*
  * Stack of return addresses for functions
  * of a thread.
@@ -430,10 +433,11 @@ static inline void unpause_graph_tracing(void)
 {
        atomic_dec(&current->tracing_graph_pause);
 }
-#else
+#else /* !CONFIG_FUNCTION_GRAPH_TRACER */
 
 #define __notrace_funcgraph
 #define __irq_entry
+#define INIT_FTRACE_GRAPH
 
 static inline void ftrace_graph_init_task(struct task_struct *t) { }
 static inline void ftrace_graph_exit_task(struct task_struct *t) { }
@@ -445,7 +449,7 @@ static inline int task_curr_ret_stack(struct task_struct *tsk)
 
 static inline void pause_graph_tracing(void) { }
 static inline void unpause_graph_tracing(void) { }
-#endif
+#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
 
 #ifdef CONFIG_TRACING
 #include <linux/sched.h>
@@ -507,33 +511,4 @@ static inline void trace_hw_branch_oops(void) {}
 
 #endif /* CONFIG_HW_BRANCH_TRACER */
 
-/*
- * A syscall entry in the ftrace syscalls array.
- *
- * @name: name of the syscall
- * @nb_args: number of parameters it takes
- * @types: list of types as strings
- * @args: list of args as strings (args[i] matches types[i])
- */
-struct syscall_metadata {
-       const char      *name;
-       int             nb_args;
-       const char      **types;
-       const char      **args;
-};
-
-#ifdef CONFIG_FTRACE_SYSCALLS
-extern void arch_init_ftrace_syscalls(void);
-extern struct syscall_metadata *syscall_nr_to_meta(int nr);
-extern void start_ftrace_syscalls(void);
-extern void stop_ftrace_syscalls(void);
-extern void ftrace_syscall_enter(struct pt_regs *regs);
-extern void ftrace_syscall_exit(struct pt_regs *regs);
-#else
-static inline void start_ftrace_syscalls(void) { }
-static inline void stop_ftrace_syscalls(void) { }
-static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
-static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
-#endif
-
 #endif /* _LINUX_FTRACE_H */
index faa1cf8..4525747 100644 (file)
 # define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
 #endif
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) || defined(CONFIG_GENERIC_HARDIRQS)
 extern void synchronize_irq(unsigned int irq);
 #else
 # define synchronize_irq(irq)  barrier()
index ee9fbc1..c9087de 100644 (file)
@@ -51,6 +51,7 @@
 #define I2C_HW_B_CX2341X       0x010020 /* Conexant CX2341X MPEG encoder cards */
 #define I2C_HW_B_CX23885       0x010022 /* conexant 23885 based tv cards (bus1) */
 #define I2C_HW_B_AU0828                0x010023 /* auvitek au0828 usb bridge */
+#define I2C_HW_B_CX231XX       0x010024 /* Conexant CX231XX USB based cards */
 #define I2C_HW_B_HDPVR         0x010025 /* Hauppauge HD PVR */
 
 /* --- SGI adapters                                                    */
diff --git a/include/linux/i2c/s6000.h b/include/linux/i2c/s6000.h
new file mode 100644 (file)
index 0000000..d9b34bf
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef __LINUX_I2C_S6000_H
+#define __LINUX_I2C_S6000_H
+
+struct s6_i2c_platform_data {
+       const char *clock; /* the clock to use */
+       int bus_num; /* the bus number to register */
+};
+
+#endif
+
index a5d26f6..ff65fff 100644 (file)
@@ -240,65 +240,38 @@ typedef enum {
 } ide_startstop_t;
 
 enum {
+       IDE_VALID_ERROR                 = (1 << 1),
+       IDE_VALID_FEATURE               = IDE_VALID_ERROR,
+       IDE_VALID_NSECT                 = (1 << 2),
+       IDE_VALID_LBAL                  = (1 << 3),
+       IDE_VALID_LBAM                  = (1 << 4),
+       IDE_VALID_LBAH                  = (1 << 5),
+       IDE_VALID_DEVICE                = (1 << 6),
+       IDE_VALID_LBA                   = IDE_VALID_LBAL |
+                                         IDE_VALID_LBAM |
+                                         IDE_VALID_LBAH,
+       IDE_VALID_OUT_TF                = IDE_VALID_FEATURE |
+                                         IDE_VALID_NSECT |
+                                         IDE_VALID_LBA,
+       IDE_VALID_IN_TF                 = IDE_VALID_NSECT |
+                                         IDE_VALID_LBA,
+       IDE_VALID_OUT_HOB               = IDE_VALID_OUT_TF,
+       IDE_VALID_IN_HOB                = IDE_VALID_ERROR |
+                                         IDE_VALID_NSECT |
+                                         IDE_VALID_LBA,
+};
+
+enum {
        IDE_TFLAG_LBA48                 = (1 << 0),
-       IDE_TFLAG_OUT_HOB_FEATURE       = (1 << 1),
-       IDE_TFLAG_OUT_HOB_NSECT         = (1 << 2),
-       IDE_TFLAG_OUT_HOB_LBAL          = (1 << 3),
-       IDE_TFLAG_OUT_HOB_LBAM          = (1 << 4),
-       IDE_TFLAG_OUT_HOB_LBAH          = (1 << 5),
-       IDE_TFLAG_OUT_HOB               = IDE_TFLAG_OUT_HOB_FEATURE |
-                                         IDE_TFLAG_OUT_HOB_NSECT |
-                                         IDE_TFLAG_OUT_HOB_LBAL |
-                                         IDE_TFLAG_OUT_HOB_LBAM |
-                                         IDE_TFLAG_OUT_HOB_LBAH,
-       IDE_TFLAG_OUT_FEATURE           = (1 << 6),
-       IDE_TFLAG_OUT_NSECT             = (1 << 7),
-       IDE_TFLAG_OUT_LBAL              = (1 << 8),
-       IDE_TFLAG_OUT_LBAM              = (1 << 9),
-       IDE_TFLAG_OUT_LBAH              = (1 << 10),
-       IDE_TFLAG_OUT_TF                = IDE_TFLAG_OUT_FEATURE |
-                                         IDE_TFLAG_OUT_NSECT |
-                                         IDE_TFLAG_OUT_LBAL |
-                                         IDE_TFLAG_OUT_LBAM |
-                                         IDE_TFLAG_OUT_LBAH,
-       IDE_TFLAG_OUT_DEVICE            = (1 << 11),
-       IDE_TFLAG_WRITE                 = (1 << 12),
-       IDE_TFLAG_CUSTOM_HANDLER        = (1 << 13),
-       IDE_TFLAG_DMA_PIO_FALLBACK      = (1 << 14),
-       IDE_TFLAG_IN_HOB_ERROR          = (1 << 15),
-       IDE_TFLAG_IN_HOB_NSECT          = (1 << 16),
-       IDE_TFLAG_IN_HOB_LBAL           = (1 << 17),
-       IDE_TFLAG_IN_HOB_LBAM           = (1 << 18),
-       IDE_TFLAG_IN_HOB_LBAH           = (1 << 19),
-       IDE_TFLAG_IN_HOB_LBA            = IDE_TFLAG_IN_HOB_LBAL |
-                                         IDE_TFLAG_IN_HOB_LBAM |
-                                         IDE_TFLAG_IN_HOB_LBAH,
-       IDE_TFLAG_IN_HOB                = IDE_TFLAG_IN_HOB_ERROR |
-                                         IDE_TFLAG_IN_HOB_NSECT |
-                                         IDE_TFLAG_IN_HOB_LBA,
-       IDE_TFLAG_IN_ERROR              = (1 << 20),
-       IDE_TFLAG_IN_NSECT              = (1 << 21),
-       IDE_TFLAG_IN_LBAL               = (1 << 22),
-       IDE_TFLAG_IN_LBAM               = (1 << 23),
-       IDE_TFLAG_IN_LBAH               = (1 << 24),
-       IDE_TFLAG_IN_LBA                = IDE_TFLAG_IN_LBAL |
-                                         IDE_TFLAG_IN_LBAM |
-                                         IDE_TFLAG_IN_LBAH,
-       IDE_TFLAG_IN_TF                 = IDE_TFLAG_IN_NSECT |
-                                         IDE_TFLAG_IN_LBA,
-       IDE_TFLAG_IN_DEVICE             = (1 << 25),
-       IDE_TFLAG_HOB                   = IDE_TFLAG_OUT_HOB |
-                                         IDE_TFLAG_IN_HOB,
-       IDE_TFLAG_TF                    = IDE_TFLAG_OUT_TF |
-                                         IDE_TFLAG_IN_TF,
-       IDE_TFLAG_DEVICE                = IDE_TFLAG_OUT_DEVICE |
-                                         IDE_TFLAG_IN_DEVICE,
+       IDE_TFLAG_WRITE                 = (1 << 1),
+       IDE_TFLAG_CUSTOM_HANDLER        = (1 << 2),
+       IDE_TFLAG_DMA_PIO_FALLBACK      = (1 << 3),
        /* force 16-bit I/O operations */
-       IDE_TFLAG_IO_16BIT              = (1 << 26),
+       IDE_TFLAG_IO_16BIT              = (1 << 4),
        /* struct ide_cmd was allocated using kmalloc() */
-       IDE_TFLAG_DYN                   = (1 << 27),
-       IDE_TFLAG_FS                    = (1 << 28),
-       IDE_TFLAG_MULTI_PIO             = (1 << 29),
+       IDE_TFLAG_DYN                   = (1 << 5),
+       IDE_TFLAG_FS                    = (1 << 6),
+       IDE_TFLAG_MULTI_PIO             = (1 << 7),
 };
 
 enum {
@@ -309,45 +282,34 @@ enum {
 };
 
 struct ide_taskfile {
-       u8      hob_data;       /*  0: high data byte (for TASKFILE IOCTL) */
-                               /*  1-5: additional data to support LBA48 */
-       union {
-               u8 hob_error;   /*   read: error */
-               u8 hob_feature; /*  write: feature */
-       };
-
-       u8      hob_nsect;
-       u8      hob_lbal;
-       u8      hob_lbam;
-       u8      hob_lbah;
-
-       u8      data;           /*  6: low data byte (for TASKFILE IOCTL) */
-
-       union {                 /* Â 7: */
-               u8 error;       /*   read:  error */
-               u8 feature;     /*  write: feature */
+       u8      data;           /* 0: data byte (for TASKFILE ioctl) */
+       union {                 /* 1: */
+               u8 error;       /*  read: error */
+               u8 feature;     /* write: feature */
        };
-
-       u8      nsect;          /*  8: number of sectors */
-       u8      lbal;           /*  9: LBA low */
-       u8      lbam;           /* 10: LBA mid */
-       u8      lbah;           /* 11: LBA high */
-
-       u8      device;         /* 12: device select */
-
-       union {                 /* 13: */
-               u8 status;      /* Â read: status Â */
+       u8      nsect;          /* 2: number of sectors */
+       u8      lbal;           /* 3: LBA low */
+       u8      lbam;           /* 4: LBA mid */
+       u8      lbah;           /* 5: LBA high */
+       u8      device;         /* 6: device select */
+       union {                 /* 7: */
+               u8 status;      /*  read: status */
                u8 command;     /* write: command */
        };
 };
 
 struct ide_cmd {
-       union {
-               struct ide_taskfile     tf;
-               u8                      tf_array[14];
-       };
+       struct ide_taskfile     tf;
+       struct ide_taskfile     hob;
+       struct {
+               struct {
+                       u8              tf;
+                       u8              hob;
+               } out, in;
+       } valid;
+
+       u8                      tf_flags;
        u8                      ftf_flags;      /* for TASKFILE ioctl */
-       u32                     tf_flags;
        int                     protocol;
 
        int                     sg_nents;         /* number of sg entries */
@@ -662,8 +624,8 @@ struct ide_tp_ops {
        void    (*write_devctl)(struct hwif_s *, u8);
 
        void    (*dev_select)(ide_drive_t *);
-       void    (*tf_load)(ide_drive_t *, struct ide_cmd *);
-       void    (*tf_read)(ide_drive_t *, struct ide_cmd *);
+       void    (*tf_load)(ide_drive_t *, struct ide_taskfile *, u8);
+       void    (*tf_read)(ide_drive_t *, struct ide_taskfile *, u8);
 
        void    (*input_data)(ide_drive_t *, struct ide_cmd *,
                              void *, unsigned int);
@@ -1162,7 +1124,8 @@ extern int ide_devset_execute(ide_drive_t *drive,
 void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8);
 int ide_complete_rq(ide_drive_t *, int, unsigned int);
 
-void ide_tf_dump(const char *, struct ide_taskfile *);
+void ide_tf_readback(ide_drive_t *drive, struct ide_cmd *cmd);
+void ide_tf_dump(const char *, struct ide_cmd *);
 
 void ide_exec_command(ide_hwif_t *, u8);
 u8 ide_read_status(ide_hwif_t *);
@@ -1170,8 +1133,8 @@ u8 ide_read_altstatus(ide_hwif_t *);
 void ide_write_devctl(ide_hwif_t *, u8);
 
 void ide_dev_select(ide_drive_t *);
-void ide_tf_load(ide_drive_t *, struct ide_cmd *);
-void ide_tf_read(ide_drive_t *, struct ide_cmd *);
+void ide_tf_load(ide_drive_t *, struct ide_taskfile *, u8);
+void ide_tf_read(ide_drive_t *, struct ide_taskfile *, u8);
 
 void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
 void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
@@ -1529,7 +1492,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
 
 extern void ide_toggle_bounce(ide_drive_t *drive, int on);
 
-u64 ide_get_lba_addr(struct ide_taskfile *, int);
+u64 ide_get_lba_addr(struct ide_cmd *, int);
 u8 ide_dump_status(ide_drive_t *, const char *, u8);
 
 struct ide_timing {
index af1de95..dcfb933 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/irqflags.h>
 #include <linux/utsname.h>
 #include <linux/lockdep.h>
+#include <linux/ftrace.h>
 #include <linux/ipc.h>
 #include <linux/pid_namespace.h>
 #include <linux/user_namespace.h>
@@ -185,6 +186,7 @@ extern struct cred init_cred;
        INIT_IDS                                                        \
        INIT_TRACE_IRQFLAGS                                             \
        INIT_LOCKDEP                                                    \
+       INIT_FTRACE_GRAPH                                               \
 }
 
 
index 77214ea..aa8c531 100644 (file)
@@ -164,6 +164,7 @@ static inline void dmar_writeq(void __iomem *addr, u64 val)
 #define DMA_GCMD_QIE (((u32)1) << 26)
 #define DMA_GCMD_SIRTP (((u32)1) << 24)
 #define DMA_GCMD_IRE (((u32) 1) << 25)
+#define DMA_GCMD_CFI (((u32) 1) << 23)
 
 /* GSTS_REG */
 #define DMA_GSTS_TES (((u32)1) << 31)
@@ -174,6 +175,7 @@ static inline void dmar_writeq(void __iomem *addr, u64 val)
 #define DMA_GSTS_QIES (((u32)1) << 26)
 #define DMA_GSTS_IRTPS (((u32)1) << 24)
 #define DMA_GSTS_IRES (((u32)1) << 25)
+#define DMA_GSTS_CFIS (((u32)1) << 23)
 
 /* CCMD_REG */
 #define DMA_CCMD_ICC (((u64)1) << 63)
@@ -284,6 +286,14 @@ struct iommu_flush {
                unsigned int size_order, u64 type, int non_present_entry_flush);
 };
 
+enum {
+       SR_DMAR_FECTL_REG,
+       SR_DMAR_FEDATA_REG,
+       SR_DMAR_FEADDR_REG,
+       SR_DMAR_FEUADDR_REG,
+       MAX_SR_DMAR_REGS
+};
+
 struct intel_iommu {
        void __iomem    *reg; /* Pointer to hardware regs, virtual addr */
        u64             cap;
@@ -304,6 +314,8 @@ struct intel_iommu {
        struct iommu_flush flush;
 #endif
        struct q_inval  *qi;            /* Queued invalidation info */
+       u32 *iommu_state; /* Store iommu states between suspend and resume.*/
+
 #ifdef CONFIG_INTR_REMAP
        struct ir_table *ir_table;      /* Interrupt remapping info */
 #endif
@@ -322,6 +334,7 @@ extern int alloc_iommu(struct dmar_drhd_unit *drhd);
 extern void free_iommu(struct intel_iommu *iommu);
 extern int dmar_enable_qi(struct intel_iommu *iommu);
 extern void dmar_disable_qi(struct intel_iommu *iommu);
+extern int dmar_reenable_qi(struct intel_iommu *iommu);
 extern void qi_global_iec(struct intel_iommu *iommu);
 
 extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid,
index 8a9613d..91bb76f 100644 (file)
 #define IRQF_NOBALANCING       0x00000800
 #define IRQF_IRQPOLL           0x00001000
 
+/*
+ * Bits used by threaded handlers:
+ * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run
+ * IRQTF_DIED      - handler thread died
+ * IRQTF_WARNED    - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed
+ */
+enum {
+       IRQTF_RUNTHREAD,
+       IRQTF_DIED,
+       IRQTF_WARNED,
+};
+
 typedef irqreturn_t (*irq_handler_t)(int, void *);
 
 /**
@@ -71,6 +83,9 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
  * @next:      pointer to the next irqaction for shared interrupts
  * @irq:       interrupt number
  * @dir:       pointer to the proc/irq/NN/name entry
+ * @thread_fn: interupt handler function for threaded interrupts
+ * @thread:    thread pointer for threaded interrupts
+ * @thread_flags:      flags related to @thread
  */
 struct irqaction {
        irq_handler_t handler;
@@ -81,18 +96,68 @@ struct irqaction {
        struct irqaction *next;
        int irq;
        struct proc_dir_entry *dir;
+       irq_handler_t thread_fn;
+       struct task_struct *thread;
+       unsigned long thread_flags;
 };
 
 extern irqreturn_t no_action(int cpl, void *dev_id);
-extern int __must_check request_irq(unsigned int, irq_handler_t handler,
-                      unsigned long, const char *, void *);
+
+#ifdef CONFIG_GENERIC_HARDIRQS
+extern int __must_check
+request_threaded_irq(unsigned int irq, irq_handler_t handler,
+                    irq_handler_t thread_fn,
+                    unsigned long flags, const char *name, void *dev);
+
+static inline int __must_check
+request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
+           const char *name, void *dev)
+{
+       return request_threaded_irq(irq, handler, NULL, flags, name, dev);
+}
+
+extern void exit_irq_thread(void);
+#else
+
+extern int __must_check
+request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
+           const char *name, void *dev);
+
+/*
+ * Special function to avoid ifdeffery in kernel/irq/devres.c which
+ * gets magically built by GENERIC_HARDIRQS=n architectures (sparc,
+ * m68k). I really love these $@%#!* obvious Makefile references:
+ * ../../../kernel/irq/devres.o
+ */
+static inline int __must_check
+request_threaded_irq(unsigned int irq, irq_handler_t handler,
+                    irq_handler_t thread_fn,
+                    unsigned long flags, const char *name, void *dev)
+{
+       return request_irq(irq, handler, flags, name, dev);
+}
+
+static inline void exit_irq_thread(void) { }
+#endif
+
 extern void free_irq(unsigned int, void *);
 
 struct device;
 
-extern int __must_check devm_request_irq(struct device *dev, unsigned int irq,
-                           irq_handler_t handler, unsigned long irqflags,
-                           const char *devname, void *dev_id);
+extern int __must_check
+devm_request_threaded_irq(struct device *dev, unsigned int irq,
+                         irq_handler_t handler, irq_handler_t thread_fn,
+                         unsigned long irqflags, const char *devname,
+                         void *dev_id);
+
+static inline int __must_check
+devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler,
+                unsigned long irqflags, const char *devname, void *dev_id)
+{
+       return devm_request_threaded_irq(dev, irq, handler, NULL, irqflags,
+                                        devname, dev_id);
+}
+
 extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
 
 /*
index ea330f9..3bf40e2 100644 (file)
@@ -25,7 +25,7 @@ struct ipc_ids {
 };
 
 struct ipc_namespace {
-       struct kref     kref;
+       atomic_t        count;
        struct ipc_ids  ids[3];
 
        int             sem_ctls[4];
@@ -44,25 +44,57 @@ struct ipc_namespace {
        int             shm_tot;
 
        struct notifier_block ipcns_nb;
+
+       /* The kern_mount of the mqueuefs sb.  We take a ref on it */
+       struct vfsmount *mq_mnt;
+
+       /* # queues in this ns, protected by mq_lock */
+       unsigned int    mq_queues_count;
+
+       /* next fields are set through sysctl */
+       unsigned int    mq_queues_max;   /* initialized to DFLT_QUEUESMAX */
+       unsigned int    mq_msg_max;      /* initialized to DFLT_MSGMAX */
+       unsigned int    mq_msgsize_max;  /* initialized to DFLT_MSGSIZEMAX */
+
 };
 
 extern struct ipc_namespace init_ipc_ns;
 extern atomic_t nr_ipc_ns;
 
-#ifdef CONFIG_SYSVIPC
+extern spinlock_t mq_lock;
+#if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC)
 #define INIT_IPC_NS(ns)                .ns             = &init_ipc_ns,
+#else
+#define INIT_IPC_NS(ns)
+#endif
 
+#ifdef CONFIG_SYSVIPC
 extern int register_ipcns_notifier(struct ipc_namespace *);
 extern int cond_register_ipcns_notifier(struct ipc_namespace *);
 extern void unregister_ipcns_notifier(struct ipc_namespace *);
 extern int ipcns_notify(unsigned long);
-
 #else /* CONFIG_SYSVIPC */
-#define INIT_IPC_NS(ns)
+static inline int register_ipcns_notifier(struct ipc_namespace *ns)
+{ return 0; }
+static inline int cond_register_ipcns_notifier(struct ipc_namespace *ns)
+{ return 0; }
+static inline void unregister_ipcns_notifier(struct ipc_namespace *ns) { }
+static inline int ipcns_notify(unsigned long l) { return 0; }
 #endif /* CONFIG_SYSVIPC */
 
-#if defined(CONFIG_SYSVIPC) && defined(CONFIG_IPC_NS)
-extern void free_ipc_ns(struct kref *kref);
+#ifdef CONFIG_POSIX_MQUEUE
+extern int mq_init_ns(struct ipc_namespace *ns);
+/* default values */
+#define DFLT_QUEUESMAX 256     /* max number of message queues */
+#define DFLT_MSGMAX    10      /* max number of messages in each queue */
+#define HARD_MSGMAX    (131072/sizeof(void *))
+#define DFLT_MSGSIZEMAX 8192   /* max message size */
+#else
+static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
+#endif
+
+#if defined(CONFIG_IPC_NS)
+extern void free_ipc_ns(struct ipc_namespace *ns);
 extern struct ipc_namespace *copy_ipcs(unsigned long flags,
                                       struct ipc_namespace *ns);
 extern void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
@@ -72,14 +104,11 @@ extern void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
 {
        if (ns)
-               kref_get(&ns->kref);
+               atomic_inc(&ns->count);
        return ns;
 }
 
-static inline void put_ipc_ns(struct ipc_namespace *ns)
-{
-       kref_put(&ns->kref, free_ipc_ns);
-}
+extern void put_ipc_ns(struct ipc_namespace *ns);
 #else
 static inline struct ipc_namespace *copy_ipcs(unsigned long flags,
                struct ipc_namespace *ns)
@@ -99,4 +128,18 @@ static inline void put_ipc_ns(struct ipc_namespace *ns)
 {
 }
 #endif
+
+#ifdef CONFIG_POSIX_MQUEUE_SYSCTL
+
+struct ctl_table_header;
+extern struct ctl_table_header *mq_register_sysctl_table(void);
+
+#else /* CONFIG_POSIX_MQUEUE_SYSCTL */
+
+static inline struct ctl_table_header *mq_register_sysctl_table(void)
+{
+       return NULL;
+}
+
+#endif /* CONFIG_POSIX_MQUEUE_SYSCTL */
 #endif
index 974890b..b7cbeed 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/irqnr.h>
 #include <linux/errno.h>
 #include <linux/topology.h>
+#include <linux/wait.h>
 
 #include <asm/irq.h>
 #include <asm/ptrace.h>
@@ -158,6 +159,8 @@ struct irq_2_iommu;
  * @affinity:          IRQ affinity on SMP
  * @cpu:               cpu index useful for balancing
  * @pending_mask:      pending rebalanced interrupts
+ * @threads_active:    number of irqaction threads currently running
+ * @wait_for_threads:  wait queue for sync_irq to wait for threaded handlers
  * @dir:               /proc/irq/ procfs entry
  * @name:              flow handler name for /proc/interrupts output
  */
@@ -189,6 +192,8 @@ struct irq_desc {
        cpumask_var_t           pending_mask;
 #endif
 #endif
+       atomic_t                threads_active;
+       wait_queue_head_t       wait_for_threads;
 #ifdef CONFIG_PROC_FS
        struct proc_dir_entry   *dir;
 #endif
@@ -482,6 +487,16 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
 #endif
 }
 
+static inline void free_desc_masks(struct irq_desc *old_desc,
+                                  struct irq_desc *new_desc)
+{
+       free_cpumask_var(old_desc->affinity);
+
+#ifdef CONFIG_GENERIC_PENDING_IRQ
+       free_cpumask_var(old_desc->pending_mask);
+#endif
+}
+
 #else /* !CONFIG_SMP */
 
 static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
@@ -495,6 +510,10 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
 {
 }
 
+static inline void free_desc_masks(struct irq_desc *old_desc,
+                                  struct irq_desc *new_desc)
+{
+}
 #endif /* CONFIG_SMP */
 
 #endif /* _LINUX_IRQ_H */
index c5584ca..819acaa 100644 (file)
@@ -5,10 +5,12 @@
  * enum irqreturn
  * @IRQ_NONE           interrupt was not from this device
  * @IRQ_HANDLED                interrupt was handled by this device
+ * @IRQ_WAKE_THREAD    handler requests to wake the handler thread
  */
 enum irqreturn {
        IRQ_NONE,
        IRQ_HANDLED,
+       IRQ_WAKE_THREAD,
 };
 
 typedef enum irqreturn irqreturn_t;
index d5fa565..384ca8b 100644 (file)
@@ -34,7 +34,7 @@ extern int __request_module(bool wait, const char *name, ...) \
 #define request_module(mod...) __request_module(true, mod)
 #define request_module_nowait(mod...) __request_module(false, mod)
 #define try_then_request_module(x, mod...) \
-       ((x) ?: (__request_module(false, mod), (x)))
+       ((x) ?: (__request_module(true, mod), (x)))
 #else
 static inline int request_module(const char *name, ...) { return -ENOSYS; }
 static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; }
index 2ec6cc1..bcd9c07 100644 (file)
@@ -94,12 +94,16 @@ struct kprobe {
        /* Called after addr is executed, unless... */
        kprobe_post_handler_t post_handler;
 
-       /* ... called if executing addr causes a fault (eg. page fault).
-        * Return 1 if it handled fault, otherwise kernel will see it. */
+       /*
+        * ... called if executing addr causes a fault (eg. page fault).
+        * Return 1 if it handled fault, otherwise kernel will see it.
+        */
        kprobe_fault_handler_t fault_handler;
 
-       /* ... called if breakpoint trap occurs in probe handler.
-        * Return 1 if it handled break, otherwise kernel will see it. */
+       /*
+        * ... called if breakpoint trap occurs in probe handler.
+        * Return 1 if it handled break, otherwise kernel will see it.
+        */
        kprobe_break_handler_t break_handler;
 
        /* Saved opcode (which has been replaced with breakpoint) */
@@ -108,18 +112,28 @@ struct kprobe {
        /* copy of the original instruction */
        struct arch_specific_insn ainsn;
 
-       /* Indicates various status flags.  Protected by kprobe_mutex. */
+       /*
+        * Indicates various status flags.
+        * Protected by kprobe_mutex after this kprobe is registered.
+        */
        u32 flags;
 };
 
 /* Kprobe status flags */
 #define KPROBE_FLAG_GONE       1 /* breakpoint has already gone */
+#define KPROBE_FLAG_DISABLED   2 /* probe is temporarily disabled */
 
+/* Has this kprobe gone ? */
 static inline int kprobe_gone(struct kprobe *p)
 {
        return p->flags & KPROBE_FLAG_GONE;
 }
 
+/* Is this kprobe disabled ? */
+static inline int kprobe_disabled(struct kprobe *p)
+{
+       return p->flags & (KPROBE_FLAG_DISABLED | KPROBE_FLAG_GONE);
+}
 /*
  * Special probe type that uses setjmp-longjmp type tricks to resume
  * execution at a specified entry with a matching prototype corresponding
@@ -279,6 +293,9 @@ void unregister_kretprobes(struct kretprobe **rps, int num);
 void kprobe_flush_task(struct task_struct *tk);
 void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
 
+int disable_kprobe(struct kprobe *kp);
+int enable_kprobe(struct kprobe *kp);
+
 #else /* !CONFIG_KPROBES: */
 
 static inline int kprobes_built_in(void)
@@ -345,5 +362,30 @@ static inline void unregister_kretprobes(struct kretprobe **rps, int num)
 static inline void kprobe_flush_task(struct task_struct *tk)
 {
 }
+static inline int disable_kprobe(struct kprobe *kp)
+{
+       return -ENOSYS;
+}
+static inline int enable_kprobe(struct kprobe *kp)
+{
+       return -ENOSYS;
+}
 #endif /* CONFIG_KPROBES */
+static inline int disable_kretprobe(struct kretprobe *rp)
+{
+       return disable_kprobe(&rp->kp);
+}
+static inline int enable_kretprobe(struct kretprobe *rp)
+{
+       return enable_kprobe(&rp->kp);
+}
+static inline int disable_jprobe(struct jprobe *jp)
+{
+       return disable_kprobe(&jp->kp);
+}
+static inline int enable_jprobe(struct jprobe *jp)
+{
+       return enable_kprobe(&jp->kp);
+}
+
 #endif /* _LINUX_KPROBES_H */
index 4455b21..c8f51c3 100644 (file)
@@ -29,6 +29,8 @@ struct pcf50633_platform_data {
        char **batteries;
        int num_batteries;
 
+       int charging_restart_interval;
+
        /* Callbacks */
        void (*probe_done)(struct pcf50633 *);
        void (*mbc_event_callback)(struct pcf50633 *, int);
index 6e17619..4119579 100644 (file)
@@ -128,7 +128,6 @@ enum pcf50633_reg_mbcs3 {
 int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma);
 
 int pcf50633_mbc_get_status(struct pcf50633 *);
-void pcf50633_mbc_set_status(struct pcf50633 *, int what, int status);
 
 #endif
 
diff --git a/include/linux/mg_disk.h b/include/linux/mg_disk.h
new file mode 100644 (file)
index 0000000..1f76b1e
--- /dev/null
@@ -0,0 +1,206 @@
+/*
+ *  include/linux/mg_disk.c
+ *
+ *  Support for the mGine m[g]flash IO mode.
+ *  Based on legacy hd.c
+ *
+ * (c) 2008 mGine Co.,LTD
+ * (c) 2008 unsik Kim <donari75@gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#ifndef __MG_DISK_H__
+#define __MG_DISK_H__
+
+#include <linux/blkdev.h>
+#include <linux/ata.h>
+
+/* name for block device */
+#define MG_DISK_NAME "mgd"
+/* name for platform device */
+#define MG_DEV_NAME "mg_disk"
+
+#define MG_DISK_MAJ 0
+#define MG_DISK_MAX_PART 16
+#define MG_SECTOR_SIZE 512
+#define MG_MAX_SECTS 256
+
+/* Register offsets */
+#define MG_BUFF_OFFSET                 0x8000
+#define MG_STORAGE_BUFFER_SIZE         0x200
+#define MG_REG_OFFSET                  0xC000
+#define MG_REG_FEATURE                 (MG_REG_OFFSET + 2)     /* write case */
+#define MG_REG_ERROR                   (MG_REG_OFFSET + 2)     /* read case */
+#define MG_REG_SECT_CNT                        (MG_REG_OFFSET + 4)
+#define MG_REG_SECT_NUM                        (MG_REG_OFFSET + 6)
+#define MG_REG_CYL_LOW                 (MG_REG_OFFSET + 8)
+#define MG_REG_CYL_HIGH                        (MG_REG_OFFSET + 0xA)
+#define MG_REG_DRV_HEAD                        (MG_REG_OFFSET + 0xC)
+#define MG_REG_COMMAND                 (MG_REG_OFFSET + 0xE)   /* write case */
+#define MG_REG_STATUS                  (MG_REG_OFFSET + 0xE)   /* read  case */
+#define MG_REG_DRV_CTRL                        (MG_REG_OFFSET + 0x10)
+#define MG_REG_BURST_CTRL              (MG_REG_OFFSET + 0x12)
+
+/* "Drive Select/Head Register" bit values */
+#define MG_REG_HEAD_MUST_BE_ON         0xA0 /* These 2 bits are always on */
+#define MG_REG_HEAD_DRIVE_MASTER       (0x00 | MG_REG_HEAD_MUST_BE_ON)
+#define MG_REG_HEAD_DRIVE_SLAVE                (0x10 | MG_REG_HEAD_MUST_BE_ON)
+#define MG_REG_HEAD_LBA_MODE           (0x40 | MG_REG_HEAD_MUST_BE_ON)
+
+
+/* "Device Control Register" bit values */
+#define MG_REG_CTRL_INTR_ENABLE                        0x0
+#define MG_REG_CTRL_INTR_DISABLE               (0x1<<1)
+#define MG_REG_CTRL_RESET                      (0x1<<2)
+#define MG_REG_CTRL_INTR_POLA_ACTIVE_HIGH      0x0
+#define MG_REG_CTRL_INTR_POLA_ACTIVE_LOW       (0x1<<4)
+#define MG_REG_CTRL_DPD_POLA_ACTIVE_LOW                0x0
+#define MG_REG_CTRL_DPD_POLA_ACTIVE_HIGH       (0x1<<5)
+#define MG_REG_CTRL_DPD_DISABLE                        0x0
+#define MG_REG_CTRL_DPD_ENABLE                 (0x1<<6)
+
+/* Status register bit */
+/* error bit in status register */
+#define MG_REG_STATUS_BIT_ERROR                        0x01
+/* corrected error in status register */
+#define MG_REG_STATUS_BIT_CORRECTED_ERROR      0x04
+/* data request bit in status register */
+#define MG_REG_STATUS_BIT_DATA_REQ             0x08
+/* DSC - Drive Seek Complete */
+#define MG_REG_STATUS_BIT_SEEK_DONE            0x10
+/* DWF - Drive Write Fault */
+#define MG_REG_STATUS_BIT_WRITE_FAULT          0x20
+#define MG_REG_STATUS_BIT_READY                        0x40
+#define MG_REG_STATUS_BIT_BUSY                 0x80
+
+/* handy status */
+#define MG_STAT_READY  (MG_REG_STATUS_BIT_READY | MG_REG_STATUS_BIT_SEEK_DONE)
+#define MG_READY_OK(s) (((s) & (MG_STAT_READY | \
+                               (MG_REG_STATUS_BIT_BUSY | \
+                                MG_REG_STATUS_BIT_WRITE_FAULT | \
+                                MG_REG_STATUS_BIT_ERROR))) == MG_STAT_READY)
+
+/* Error register */
+#define MG_REG_ERR_AMNF                0x01
+#define MG_REG_ERR_ABRT                0x04
+#define MG_REG_ERR_IDNF                0x10
+#define MG_REG_ERR_UNC         0x40
+#define MG_REG_ERR_BBK         0x80
+
+/* error code for others */
+#define MG_ERR_NONE            0
+#define MG_ERR_TIMEOUT         0x100
+#define MG_ERR_INIT_STAT       0x101
+#define MG_ERR_TRANSLATION     0x102
+#define MG_ERR_CTRL_RST                0x103
+#define MG_ERR_INV_STAT                0x104
+#define MG_ERR_RSTOUT          0x105
+
+#define MG_MAX_ERRORS  6       /* Max read/write errors */
+
+/* command */
+#define MG_CMD_RD 0x20
+#define MG_CMD_WR 0x30
+#define MG_CMD_SLEEP 0x99
+#define MG_CMD_WAKEUP 0xC3
+#define MG_CMD_ID 0xEC
+#define MG_CMD_WR_CONF 0x3C
+#define MG_CMD_RD_CONF 0x40
+
+/* operation mode */
+#define MG_OP_CASCADE (1 << 0)
+#define MG_OP_CASCADE_SYNC_RD (1 << 1)
+#define MG_OP_CASCADE_SYNC_WR (1 << 2)
+#define MG_OP_INTERLEAVE (1 << 3)
+
+/* synchronous */
+#define MG_BURST_LAT_4 (3 << 4)
+#define MG_BURST_LAT_5 (4 << 4)
+#define MG_BURST_LAT_6 (5 << 4)
+#define MG_BURST_LAT_7 (6 << 4)
+#define MG_BURST_LAT_8 (7 << 4)
+#define MG_BURST_LEN_4 (1 << 1)
+#define MG_BURST_LEN_8 (2 << 1)
+#define MG_BURST_LEN_16 (3 << 1)
+#define MG_BURST_LEN_32 (4 << 1)
+#define MG_BURST_LEN_CONT (0 << 1)
+
+/* timeout value (unit: ms) */
+#define MG_TMAX_CONF_TO_CMD    1
+#define MG_TMAX_WAIT_RD_DRQ    10
+#define MG_TMAX_WAIT_WR_DRQ    500
+#define MG_TMAX_RST_TO_BUSY    10
+#define MG_TMAX_HDRST_TO_RDY   500
+#define MG_TMAX_SWRST_TO_RDY   500
+#define MG_TMAX_RSTOUT         3000
+
+/* device attribution */
+/* use mflash as boot device */
+#define MG_BOOT_DEV            (1 << 0)
+/* use mflash as storage device */
+#define MG_STORAGE_DEV         (1 << 1)
+/* same as MG_STORAGE_DEV, but bootloader already done reset sequence */
+#define MG_STORAGE_DEV_SKIP_RST        (1 << 2)
+
+#define MG_DEV_MASK (MG_BOOT_DEV | MG_STORAGE_DEV | MG_STORAGE_DEV_SKIP_RST)
+
+/* names of GPIO resource */
+#define MG_RST_PIN     "mg_rst"
+/* except MG_BOOT_DEV, reset-out pin should be assigned */
+#define MG_RSTOUT_PIN  "mg_rstout"
+
+/* private driver data */
+struct mg_drv_data {
+       /* disk resource */
+       u32 use_polling;
+
+       /* device attribution */
+       u32 dev_attr;
+
+       /* internally used */
+       struct mg_host *host;
+};
+
+/* main structure for mflash driver */
+struct mg_host {
+       struct device *dev;
+
+       struct request_queue *breq;
+       spinlock_t lock;
+       struct gendisk *gd;
+
+       struct timer_list timer;
+       void (*mg_do_intr) (struct mg_host *);
+
+       u16 id[ATA_ID_WORDS];
+
+       u16 cyls;
+       u16 heads;
+       u16 sectors;
+       u32 n_sectors;
+       u32 nres_sectors;
+
+       void __iomem *dev_base;
+       unsigned int irq;
+       unsigned int rst;
+       unsigned int rstout;
+
+       u32 major;
+       u32 error;
+};
+
+/*
+ * Debugging macro and defines
+ */
+#undef DO_MG_DEBUG
+#ifdef DO_MG_DEBUG
+#  define MG_DBG(fmt, args...) \
+       printk(KERN_DEBUG "%s:%d "fmt, __func__, __LINE__, ##args)
+#else /* CONFIG_MG_DEBUG */
+#  define MG_DBG(fmt, args...) do { } while (0)
+#endif /* CONFIG_MG_DEBUG */
+
+#endif
index 3aa5d77..5675b63 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/uio.h>
 #include <linux/notifier.h>
+#include <linux/device.h>
 
 #include <linux/mtd/compatmac.h>
 #include <mtd/mtd-abi.h>
@@ -162,6 +163,20 @@ struct mtd_info {
        /* We probably shouldn't allow XIP if the unpoint isn't a NULL */
        void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len);
 
+       /* Allow NOMMU mmap() to directly map the device (if not NULL)
+        * - return the address to which the offset maps
+        * - return -ENOSYS to indicate refusal to do the mapping
+        */
+       unsigned long (*get_unmapped_area) (struct mtd_info *mtd,
+                                           unsigned long len,
+                                           unsigned long offset,
+                                           unsigned long flags);
+
+       /* Backing device capabilities for this device
+        * - provides mmap capabilities
+        */
+       struct backing_dev_info *backing_dev_info;
+
 
        int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
        int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
@@ -223,6 +238,7 @@ struct mtd_info {
        void *priv;
 
        struct module *owner;
+       struct device dev;
        int usecount;
 
        /* If the driver is something smart, like UBI, it may need to maintain
@@ -233,6 +249,11 @@ struct mtd_info {
        void (*put_device) (struct mtd_info *mtd);
 };
 
+static inline struct mtd_info *dev_to_mtd(struct device *dev)
+{
+       return dev ? container_of(dev, struct mtd_info, dev) : NULL;
+}
+
 static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd)
 {
        if (mtd->erasesize_shift)
index db5b63d..7efb9be 100644 (file)
@@ -43,8 +43,8 @@ extern void nand_wait_ready(struct mtd_info *mtd);
  * is supported now. If you add a chip with bigger oobsize/page
  * adjust this accordingly.
  */
-#define NAND_MAX_OOBSIZE       64
-#define NAND_MAX_PAGESIZE      2048
+#define NAND_MAX_OOBSIZE       128
+#define NAND_MAX_PAGESIZE      4096
 
 /*
  * Constants for hardware specific CLE/ALE/NCE function
index a45dd83..7535a74 100644 (file)
@@ -76,4 +76,16 @@ int __devinit of_mtd_parse_partitions(struct device *dev,
                                       struct device_node *node,
                                       struct mtd_partition **pparts);
 
+#ifdef CONFIG_MTD_PARTITIONS
+static inline int mtd_has_partitions(void) { return 1; }
+#else
+static inline int mtd_has_partitions(void) { return 0; }
+#endif
+
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+static inline int mtd_has_cmdlinepart(void) { return 1; }
+#else
+static inline int mtd_has_cmdlinepart(void) { return 0; }
+#endif
+
 #endif
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
new file mode 100644 (file)
index 0000000..79fec6a
--- /dev/null
@@ -0,0 +1,801 @@
+/*
+ * nilfs2_fs.h - NILFS2 on-disk structures and common declarations.
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Koji Sato <koji@osrg.net>
+ *            Ryusuke Konishi <ryusuke@osrg.net>
+ */
+/*
+ *  linux/include/linux/ext2_fs.h
+ *
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ *
+ *  from
+ *
+ *  linux/include/linux/minix_fs.h
+ *
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ */
+
+#ifndef _LINUX_NILFS_FS_H
+#define _LINUX_NILFS_FS_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+/*
+ * Inode flags stored in nilfs_inode and on-memory nilfs inode
+ *
+ * We define these flags based on ext2-fs because of the
+ * compatibility reason; to avoid problems in chattr(1)
+ */
+#define NILFS_SECRM_FL         0x00000001 /* Secure deletion */
+#define NILFS_UNRM_FL          0x00000002 /* Undelete */
+#define NILFS_SYNC_FL          0x00000008 /* Synchronous updates */
+#define NILFS_IMMUTABLE_FL     0x00000010 /* Immutable file */
+#define NILFS_APPEND_FL                0x00000020 /* writes to file may only append */
+#define NILFS_NODUMP_FL                0x00000040 /* do not dump file */
+#define NILFS_NOATIME_FL       0x00000080 /* do not update atime */
+/* Reserved for compression usage... */
+#define NILFS_NOTAIL_FL                0x00008000 /* file tail should not be merged */
+#define NILFS_DIRSYNC_FL       0x00010000 /* dirsync behaviour */
+
+#define NILFS_FL_USER_VISIBLE  0x0003DFFF /* User visible flags */
+#define NILFS_FL_USER_MODIFIABLE       0x000380FF /* User modifiable flags */
+
+
+#define NILFS_INODE_BMAP_SIZE  7
+/**
+ * struct nilfs_inode - structure of an inode on disk
+ * @i_blocks: blocks count
+ * @i_size: size in bytes
+ * @i_ctime: creation time (seconds)
+ * @i_mtime: modification time (seconds)
+ * @i_ctime_nsec: creation time (nano seconds)
+ * @i_mtime_nsec: modification time (nano seconds)
+ * @i_uid: user id
+ * @i_gid: group id
+ * @i_mode: file mode
+ * @i_links_count: links count
+ * @i_flags: file flags
+ * @i_bmap: block mapping
+ * @i_xattr: extended attributes
+ * @i_generation: file generation (for NFS)
+ * @i_pad:     padding
+ */
+struct nilfs_inode {
+       __le64  i_blocks;
+       __le64  i_size;
+       __le64  i_ctime;
+       __le64  i_mtime;
+       __le32  i_ctime_nsec;
+       __le32  i_mtime_nsec;
+       __le32  i_uid;
+       __le32  i_gid;
+       __le16  i_mode;
+       __le16  i_links_count;
+       __le32  i_flags;
+       __le64  i_bmap[NILFS_INODE_BMAP_SIZE];
+#define i_device_code  i_bmap[0]
+       __le64  i_xattr;
+       __le32  i_generation;
+       __le32  i_pad;
+};
+
+/**
+ * struct nilfs_super_root - structure of super root
+ * @sr_sum: check sum
+ * @sr_bytes: byte count of the structure
+ * @sr_flags: flags (reserved)
+ * @sr_nongc_ctime: write time of the last segment not for cleaner operation
+ * @sr_dat: DAT file inode
+ * @sr_cpfile: checkpoint file inode
+ * @sr_sufile: segment usage file inode
+ */
+struct nilfs_super_root {
+       __le32 sr_sum;
+       __le16 sr_bytes;
+       __le16 sr_flags;
+       __le64 sr_nongc_ctime;
+       struct nilfs_inode sr_dat;
+       struct nilfs_inode sr_cpfile;
+       struct nilfs_inode sr_sufile;
+};
+
+#define NILFS_SR_MDT_OFFSET(inode_size, i)  \
+       ((unsigned long)&((struct nilfs_super_root *)0)->sr_dat + \
+                       (inode_size) * (i))
+#define NILFS_SR_DAT_OFFSET(inode_size)     NILFS_SR_MDT_OFFSET(inode_size, 0)
+#define NILFS_SR_CPFILE_OFFSET(inode_size)  NILFS_SR_MDT_OFFSET(inode_size, 1)
+#define NILFS_SR_SUFILE_OFFSET(inode_size)  NILFS_SR_MDT_OFFSET(inode_size, 2)
+#define NILFS_SR_BYTES                  (sizeof(struct nilfs_super_root))
+
+/*
+ * Maximal mount counts
+ */
+#define NILFS_DFL_MAX_MNT_COUNT                50      /* 50 mounts */
+
+/*
+ * File system states (sbp->s_state, nilfs->ns_mount_state)
+ */
+#define NILFS_VALID_FS                 0x0001  /* Unmounted cleanly */
+#define NILFS_ERROR_FS                 0x0002  /* Errors detected */
+#define NILFS_RESIZE_FS                        0x0004  /* Resize required */
+
+/*
+ * Mount flags (sbi->s_mount_opt)
+ */
+#define NILFS_MOUNT_ERROR_MODE         0x0070  /* Error mode mask */
+#define NILFS_MOUNT_ERRORS_CONT                0x0010  /* Continue on errors */
+#define NILFS_MOUNT_ERRORS_RO          0x0020  /* Remount fs ro on errors */
+#define NILFS_MOUNT_ERRORS_PANIC       0x0040  /* Panic on errors */
+#define NILFS_MOUNT_SNAPSHOT           0x0080  /* Snapshot flag */
+#define NILFS_MOUNT_BARRIER            0x1000  /* Use block barriers */
+#define NILFS_MOUNT_STRICT_ORDER       0x2000  /* Apply strict in-order
+                                                  semantics also for data */
+
+
+/**
+ * struct nilfs_super_block - structure of super block on disk
+ */
+struct nilfs_super_block {
+       __le32  s_rev_level;            /* Revision level */
+       __le16  s_minor_rev_level;      /* minor revision level */
+       __le16  s_magic;                /* Magic signature */
+
+       __le16  s_bytes;                /* Bytes count of CRC calculation
+                                          for this structure. s_reserved
+                                          is excluded. */
+       __le16  s_flags;                /* flags */
+       __le32  s_crc_seed;             /* Seed value of CRC calculation */
+       __le32  s_sum;                  /* Check sum of super block */
+
+       __le32  s_log_block_size;       /* Block size represented as follows
+                                          blocksize =
+                                              1 << (s_log_block_size + 10) */
+       __le64  s_nsegments;            /* Number of segments in filesystem */
+       __le64  s_dev_size;             /* block device size in bytes */
+       __le64  s_first_data_block;     /* 1st seg disk block number */
+       __le32  s_blocks_per_segment;   /* number of blocks per full segment */
+       __le32  s_r_segments_percentage; /* Reserved segments percentage */
+
+       __le64  s_last_cno;             /* Last checkpoint number */
+       __le64  s_last_pseg;            /* disk block addr pseg written last */
+       __le64  s_last_seq;             /* seq. number of seg written last */
+       __le64  s_free_blocks_count;    /* Free blocks count */
+
+       __le64  s_ctime;                /* Creation time (execution time of
+                                          newfs) */
+       __le64  s_mtime;                /* Mount time */
+       __le64  s_wtime;                /* Write time */
+       __le16  s_mnt_count;            /* Mount count */
+       __le16  s_max_mnt_count;        /* Maximal mount count */
+       __le16  s_state;                /* File system state */
+       __le16  s_errors;               /* Behaviour when detecting errors */
+       __le64  s_lastcheck;            /* time of last check */
+
+       __le32  s_checkinterval;        /* max. time between checks */
+       __le32  s_creator_os;           /* OS */
+       __le16  s_def_resuid;           /* Default uid for reserved blocks */
+       __le16  s_def_resgid;           /* Default gid for reserved blocks */
+       __le32  s_first_ino;            /* First non-reserved inode */
+
+       __le16  s_inode_size;           /* Size of an inode */
+       __le16  s_dat_entry_size;       /* Size of a dat entry */
+       __le16  s_checkpoint_size;      /* Size of a checkpoint */
+       __le16  s_segment_usage_size;   /* Size of a segment usage */
+
+       __u8    s_uuid[16];             /* 128-bit uuid for volume */
+       char    s_volume_name[16];      /* volume name */
+       char    s_last_mounted[64];     /* directory where last mounted */
+
+       __le32  s_c_interval;           /* Commit interval of segment */
+       __le32  s_c_block_max;          /* Threshold of data amount for
+                                          the segment construction */
+       __u32   s_reserved[192];        /* padding to the end of the block */
+};
+
+/*
+ * Codes for operating systems
+ */
+#define NILFS_OS_LINUX         0
+/* Codes from 1 to 4 are reserved to keep compatibility with ext2 creator-OS */
+
+/*
+ * Revision levels
+ */
+#define NILFS_CURRENT_REV      2       /* current major revision */
+#define NILFS_MINOR_REV                0       /* minor revision */
+
+/*
+ * Bytes count of super_block for CRC-calculation
+ */
+#define NILFS_SB_BYTES  \
+       ((long)&((struct nilfs_super_block *)0)->s_reserved)
+
+/*
+ * Special inode number
+ */
+#define NILFS_ROOT_INO         2       /* Root file inode */
+#define NILFS_DAT_INO          3       /* DAT file */
+#define NILFS_CPFILE_INO       4       /* checkpoint file */
+#define NILFS_SUFILE_INO       5       /* segment usage file */
+#define NILFS_IFILE_INO                6       /* ifile */
+#define NILFS_ATIME_INO                7       /* Atime file (reserved) */
+#define NILFS_XATTR_INO                8       /* Xattribute file (reserved) */
+#define NILFS_SKETCH_INO       10      /* Sketch file */
+#define NILFS_USER_INO         11      /* Fisrt user's file inode number */
+
+#define NILFS_SB_OFFSET_BYTES  1024    /* byte offset of nilfs superblock */
+#define NILFS_SUPER_MAGIC      0x3434  /* NILFS filesystem  magic number */
+
+#define NILFS_SEG_MIN_BLOCKS   16      /* Minimum number of blocks in
+                                          a full segment */
+#define NILFS_PSEG_MIN_BLOCKS  2       /* Minimum number of blocks in
+                                          a partial segment */
+#define NILFS_MIN_NRSVSEGS     8       /* Minimum number of reserved
+                                          segments */
+
+/*
+ * bytes offset of secondary super block
+ */
+#define NILFS_SB2_OFFSET_BYTES(devsize)        ((((devsize) >> 12) - 1) << 12)
+
+/*
+ * Maximal count of links to a file
+ */
+#define NILFS_LINK_MAX         32000
+
+/*
+ * Structure of a directory entry
+ *  (Same as ext2)
+ */
+
+#define NILFS_NAME_LEN 255
+
+/*
+ * The new version of the directory entry.  Since V0 structures are
+ * stored in intel byte order, and the name_len field could never be
+ * bigger than 255 chars, it's safe to reclaim the extra byte for the
+ * file_type field.
+ */
+struct nilfs_dir_entry {
+       __le64  inode;                  /* Inode number */
+       __le16  rec_len;                /* Directory entry length */
+       __u8    name_len;               /* Name length */
+       __u8    file_type;
+       char    name[NILFS_NAME_LEN];   /* File name */
+       char    pad;
+};
+
+/*
+ * NILFS directory file types.  Only the low 3 bits are used.  The
+ * other bits are reserved for now.
+ */
+enum {
+       NILFS_FT_UNKNOWN,
+       NILFS_FT_REG_FILE,
+       NILFS_FT_DIR,
+       NILFS_FT_CHRDEV,
+       NILFS_FT_BLKDEV,
+       NILFS_FT_FIFO,
+       NILFS_FT_SOCK,
+       NILFS_FT_SYMLINK,
+       NILFS_FT_MAX
+};
+
+/*
+ * NILFS_DIR_PAD defines the directory entries boundaries
+ *
+ * NOTE: It must be a multiple of 8
+ */
+#define NILFS_DIR_PAD                  8
+#define NILFS_DIR_ROUND                        (NILFS_DIR_PAD - 1)
+#define NILFS_DIR_REC_LEN(name_len)    (((name_len) + 12 + NILFS_DIR_ROUND) & \
+                                       ~NILFS_DIR_ROUND)
+
+
+/**
+ * struct nilfs_finfo - file information
+ * @fi_ino: inode number
+ * @fi_cno: checkpoint number
+ * @fi_nblocks: number of blocks (including intermediate blocks)
+ * @fi_ndatablk: number of file data blocks
+ */
+struct nilfs_finfo {
+       __le64 fi_ino;
+       __le64 fi_cno;
+       __le32 fi_nblocks;
+       __le32 fi_ndatablk;
+       /* array of virtual block numbers */
+};
+
+/**
+ * struct nilfs_binfo_v - information for the block to which a virtual block number is assigned
+ * @bi_vblocknr: virtual block number
+ * @bi_blkoff: block offset
+ */
+struct nilfs_binfo_v {
+       __le64 bi_vblocknr;
+       __le64 bi_blkoff;
+};
+
+/**
+ * struct nilfs_binfo_dat - information for the block which belongs to the DAT file
+ * @bi_blkoff: block offset
+ * @bi_level: level
+ * @bi_pad: padding
+ */
+struct nilfs_binfo_dat {
+       __le64 bi_blkoff;
+       __u8 bi_level;
+       __u8 bi_pad[7];
+};
+
+/**
+ * union nilfs_binfo: block information
+ * @bi_v: nilfs_binfo_v structure
+ * @bi_dat: nilfs_binfo_dat structure
+ */
+union nilfs_binfo {
+       struct nilfs_binfo_v bi_v;
+       struct nilfs_binfo_dat bi_dat;
+};
+
+/**
+ * struct nilfs_segment_summary - segment summary
+ * @ss_datasum: checksum of data
+ * @ss_sumsum: checksum of segment summary
+ * @ss_magic: magic number
+ * @ss_bytes: size of this structure in bytes
+ * @ss_flags: flags
+ * @ss_seq: sequence number
+ * @ss_create: creation timestamp
+ * @ss_next: next segment
+ * @ss_nblocks: number of blocks
+ * @ss_nfinfo: number of finfo structures
+ * @ss_sumbytes: total size of segment summary in bytes
+ * @ss_pad: padding
+ */
+struct nilfs_segment_summary {
+       __le32 ss_datasum;
+       __le32 ss_sumsum;
+       __le32 ss_magic;
+       __le16 ss_bytes;
+       __le16 ss_flags;
+       __le64 ss_seq;
+       __le64 ss_create;
+       __le64 ss_next;
+       __le32 ss_nblocks;
+       __le32 ss_nfinfo;
+       __le32 ss_sumbytes;
+       __le32 ss_pad;
+       /* array of finfo structures */
+};
+
+#define NILFS_SEGSUM_MAGIC     0x1eaffa11  /* segment summary magic number */
+
+/*
+ * Segment summary flags
+ */
+#define NILFS_SS_LOGBGN 0x0001  /* begins a logical segment */
+#define NILFS_SS_LOGEND 0x0002  /* ends a logical segment */
+#define NILFS_SS_SR     0x0004  /* has super root */
+#define NILFS_SS_SYNDT  0x0008  /* includes data only updates */
+#define NILFS_SS_GC     0x0010  /* segment written for cleaner operation */
+
+/**
+ * struct nilfs_palloc_group_desc - block group descriptor
+ * @pg_nfrees: number of free entries in block group
+ */
+struct nilfs_palloc_group_desc {
+       __le32 pg_nfrees;
+};
+
+/**
+ * struct nilfs_dat_entry - disk address translation entry
+ * @dt_blocknr: block number
+ * @dt_start: start checkpoint number
+ * @dt_end: end checkpoint number
+ * @dt_rsv: reserved for future use
+ */
+struct nilfs_dat_entry {
+       __le64 de_blocknr;
+       __le64 de_start;
+       __le64 de_end;
+       __le64 de_rsv;
+};
+
+/**
+ * struct nilfs_dat_group_desc - block group descriptor
+ * @dg_nfrees: number of free virtual block numbers in block group
+ */
+struct nilfs_dat_group_desc {
+       __le32 dg_nfrees;
+};
+
+
+/**
+ * struct nilfs_snapshot_list - snapshot list
+ * @ssl_next: next checkpoint number on snapshot list
+ * @ssl_prev: previous checkpoint number on snapshot list
+ */
+struct nilfs_snapshot_list {
+       __le64 ssl_next;
+       __le64 ssl_prev;
+};
+
+/**
+ * struct nilfs_checkpoint - checkpoint structure
+ * @cp_flags: flags
+ * @cp_checkpoints_count: checkpoints count in a block
+ * @cp_snapshot_list: snapshot list
+ * @cp_cno: checkpoint number
+ * @cp_create: creation timestamp
+ * @cp_nblk_inc: number of blocks incremented by this checkpoint
+ * @cp_inodes_count: inodes count
+ * @cp_blocks_count: blocks count
+ * @cp_ifile_inode: inode of ifile
+ */
+struct nilfs_checkpoint {
+       __le32 cp_flags;
+       __le32 cp_checkpoints_count;
+       struct nilfs_snapshot_list cp_snapshot_list;
+       __le64 cp_cno;
+       __le64 cp_create;
+       __le64 cp_nblk_inc;
+       __le64 cp_inodes_count;
+       __le64 cp_blocks_count;         /* Reserved (might be deleted) */
+
+       /* Do not change the byte offset of ifile inode.
+          To keep the compatibility of the disk format,
+          additional fields should be added behind cp_ifile_inode. */
+       struct nilfs_inode cp_ifile_inode;
+};
+
+/* checkpoint flags */
+enum {
+       NILFS_CHECKPOINT_SNAPSHOT,
+       NILFS_CHECKPOINT_INVALID,
+       NILFS_CHECKPOINT_SKETCH,
+       NILFS_CHECKPOINT_MINOR,
+};
+
+#define NILFS_CHECKPOINT_FNS(flag, name)                               \
+static inline void                                                     \
+nilfs_checkpoint_set_##name(struct nilfs_checkpoint *cp)               \
+{                                                                      \
+       cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) |          \
+                                  (1UL << NILFS_CHECKPOINT_##flag));   \
+}                                                                      \
+static inline void                                                     \
+nilfs_checkpoint_clear_##name(struct nilfs_checkpoint *cp)             \
+{                                                                      \
+       cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) &          \
+                                  ~(1UL << NILFS_CHECKPOINT_##flag));  \
+}                                                                      \
+static inline int                                                      \
+nilfs_checkpoint_##name(const struct nilfs_checkpoint *cp)             \
+{                                                                      \
+       return !!(le32_to_cpu(cp->cp_flags) &                           \
+                 (1UL << NILFS_CHECKPOINT_##flag));                    \
+}
+
+NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot)
+NILFS_CHECKPOINT_FNS(INVALID, invalid)
+NILFS_CHECKPOINT_FNS(MINOR, minor)
+
+/**
+ * struct nilfs_cpinfo - checkpoint information
+ * @ci_flags: flags
+ * @ci_pad: padding
+ * @ci_cno: checkpoint number
+ * @ci_create: creation timestamp
+ * @ci_nblk_inc: number of blocks incremented by this checkpoint
+ * @ci_inodes_count: inodes count
+ * @ci_blocks_count: blocks count
+ * @ci_next: next checkpoint number in snapshot list
+ */
+struct nilfs_cpinfo {
+       __u32 ci_flags;
+       __u32 ci_pad;
+       __u64 ci_cno;
+       __u64 ci_create;
+       __u64 ci_nblk_inc;
+       __u64 ci_inodes_count;
+       __u64 ci_blocks_count;
+       __u64 ci_next;
+};
+
+#define NILFS_CPINFO_FNS(flag, name)                                   \
+static inline int                                                      \
+nilfs_cpinfo_##name(const struct nilfs_cpinfo *cpinfo)                 \
+{                                                                      \
+       return !!(cpinfo->ci_flags & (1UL << NILFS_CHECKPOINT_##flag)); \
+}
+
+NILFS_CPINFO_FNS(SNAPSHOT, snapshot)
+NILFS_CPINFO_FNS(INVALID, invalid)
+NILFS_CPINFO_FNS(MINOR, minor)
+
+
+/**
+ * struct nilfs_cpfile_header - checkpoint file header
+ * @ch_ncheckpoints: number of checkpoints
+ * @ch_nsnapshots: number of snapshots
+ * @ch_snapshot_list: snapshot list
+ */
+struct nilfs_cpfile_header {
+       __le64 ch_ncheckpoints;
+       __le64 ch_nsnapshots;
+       struct nilfs_snapshot_list ch_snapshot_list;
+};
+
+#define NILFS_CPFILE_FIRST_CHECKPOINT_OFFSET   \
+       ((sizeof(struct nilfs_cpfile_header) +                          \
+         sizeof(struct nilfs_checkpoint) - 1) /                        \
+                       sizeof(struct nilfs_checkpoint))
+
+/**
+ * struct nilfs_segment_usage - segment usage
+ * @su_lastmod: last modified timestamp
+ * @su_nblocks: number of blocks in segment
+ * @su_flags: flags
+ */
+struct nilfs_segment_usage {
+       __le64 su_lastmod;
+       __le32 su_nblocks;
+       __le32 su_flags;
+};
+
+/* segment usage flag */
+enum {
+       NILFS_SEGMENT_USAGE_ACTIVE,
+       NILFS_SEGMENT_USAGE_DIRTY,
+       NILFS_SEGMENT_USAGE_ERROR,
+
+       /* ... */
+};
+
+#define NILFS_SEGMENT_USAGE_FNS(flag, name)                            \
+static inline void                                                     \
+nilfs_segment_usage_set_##name(struct nilfs_segment_usage *su)         \
+{                                                                      \
+       su->su_flags = cpu_to_le32(le32_to_cpu(su->su_flags) |          \
+                                  (1UL << NILFS_SEGMENT_USAGE_##flag));\
+}                                                                      \
+static inline void                                                     \
+nilfs_segment_usage_clear_##name(struct nilfs_segment_usage *su)       \
+{                                                                      \
+       su->su_flags =                                                  \
+               cpu_to_le32(le32_to_cpu(su->su_flags) &                 \
+                           ~(1UL << NILFS_SEGMENT_USAGE_##flag));      \
+}                                                                      \
+static inline int                                                      \
+nilfs_segment_usage_##name(const struct nilfs_segment_usage *su)       \
+{                                                                      \
+       return !!(le32_to_cpu(su->su_flags) &                           \
+                 (1UL << NILFS_SEGMENT_USAGE_##flag));                 \
+}
+
+NILFS_SEGMENT_USAGE_FNS(ACTIVE, active)
+NILFS_SEGMENT_USAGE_FNS(DIRTY, dirty)
+NILFS_SEGMENT_USAGE_FNS(ERROR, error)
+
+static inline void
+nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su)
+{
+       su->su_lastmod = cpu_to_le64(0);
+       su->su_nblocks = cpu_to_le32(0);
+       su->su_flags = cpu_to_le32(0);
+}
+
+static inline int
+nilfs_segment_usage_clean(const struct nilfs_segment_usage *su)
+{
+       return !le32_to_cpu(su->su_flags);
+}
+
+/**
+ * struct nilfs_sufile_header - segment usage file header
+ * @sh_ncleansegs: number of clean segments
+ * @sh_ndirtysegs: number of dirty segments
+ * @sh_last_alloc: last allocated segment number
+ */
+struct nilfs_sufile_header {
+       __le64 sh_ncleansegs;
+       __le64 sh_ndirtysegs;
+       __le64 sh_last_alloc;
+       /* ... */
+};
+
+#define NILFS_SUFILE_FIRST_SEGMENT_USAGE_OFFSET        \
+       ((sizeof(struct nilfs_sufile_header) +                          \
+         sizeof(struct nilfs_segment_usage) - 1) /                     \
+                        sizeof(struct nilfs_segment_usage))
+
+/**
+ * nilfs_suinfo - segment usage information
+ * @sui_lastmod:
+ * @sui_nblocks:
+ * @sui_flags:
+ */
+struct nilfs_suinfo {
+       __u64 sui_lastmod;
+       __u32 sui_nblocks;
+       __u32 sui_flags;
+};
+
+#define NILFS_SUINFO_FNS(flag, name)                                   \
+static inline int                                                      \
+nilfs_suinfo_##name(const struct nilfs_suinfo *si)                     \
+{                                                                      \
+       return si->sui_flags & (1UL << NILFS_SEGMENT_USAGE_##flag);     \
+}
+
+NILFS_SUINFO_FNS(ACTIVE, active)
+NILFS_SUINFO_FNS(DIRTY, dirty)
+NILFS_SUINFO_FNS(ERROR, error)
+
+static inline int nilfs_suinfo_clean(const struct nilfs_suinfo *si)
+{
+       return !si->sui_flags;
+}
+
+/* ioctl */
+enum {
+       NILFS_CHECKPOINT,
+       NILFS_SNAPSHOT,
+};
+
+/**
+ * struct nilfs_cpmode -
+ * @cc_cno:
+ * @cc_mode:
+ */
+struct nilfs_cpmode {
+       __u64 cm_cno;
+       __u32 cm_mode;
+       __u32 cm_pad;
+};
+
+/**
+ * struct nilfs_argv - argument vector
+ * @v_base:
+ * @v_nmembs:
+ * @v_size:
+ * @v_flags:
+ * @v_index:
+ */
+struct nilfs_argv {
+       __u64 v_base;
+       __u32 v_nmembs; /* number of members */
+       __u16 v_size;   /* size of members */
+       __u16 v_flags;
+       __u64 v_index;
+};
+
+/**
+ * struct nilfs_period -
+ * @p_start:
+ * @p_end:
+ */
+struct nilfs_period {
+       __u64 p_start;
+       __u64 p_end;
+};
+
+/**
+ * struct nilfs_cpstat -
+ * @cs_cno: checkpoint number
+ * @cs_ncps: number of checkpoints
+ * @cs_nsss: number of snapshots
+ */
+struct nilfs_cpstat {
+       __u64 cs_cno;
+       __u64 cs_ncps;
+       __u64 cs_nsss;
+};
+
+/**
+ * struct nilfs_sustat -
+ * @ss_nsegs: number of segments
+ * @ss_ncleansegs: number of clean segments
+ * @ss_ndirtysegs: number of dirty segments
+ * @ss_ctime: creation time of the last segment
+ * @ss_nongc_ctime: creation time of the last segment not for GC
+ * @ss_prot_seq: least sequence number of segments which must not be reclaimed
+ */
+struct nilfs_sustat {
+       __u64 ss_nsegs;
+       __u64 ss_ncleansegs;
+       __u64 ss_ndirtysegs;
+       __u64 ss_ctime;
+       __u64 ss_nongc_ctime;
+       __u64 ss_prot_seq;
+};
+
+/**
+ * struct nilfs_vinfo - virtual block number information
+ * @vi_vblocknr:
+ * @vi_start:
+ * @vi_end:
+ * @vi_blocknr:
+ */
+struct nilfs_vinfo {
+       __u64 vi_vblocknr;
+       __u64 vi_start;
+       __u64 vi_end;
+       __u64 vi_blocknr;
+};
+
+/**
+ * struct nilfs_vdesc -
+ */
+struct nilfs_vdesc {
+       __u64 vd_ino;
+       __u64 vd_cno;
+       __u64 vd_vblocknr;
+       struct nilfs_period vd_period;
+       __u64 vd_blocknr;
+       __u64 vd_offset;
+       __u32 vd_flags;
+       __u32 vd_pad;
+};
+
+/**
+ * struct nilfs_bdesc -
+ */
+struct nilfs_bdesc {
+       __u64 bd_ino;
+       __u64 bd_oblocknr;
+       __u64 bd_blocknr;
+       __u64 bd_offset;
+       __u32 bd_level;
+       __u32 bd_pad;
+};
+
+#define NILFS_IOCTL_IDENT              'n'
+
+#define NILFS_IOCTL_CHANGE_CPMODE  \
+       _IOW(NILFS_IOCTL_IDENT, 0x80, struct nilfs_cpmode)
+#define NILFS_IOCTL_DELETE_CHECKPOINT  \
+       _IOW(NILFS_IOCTL_IDENT, 0x81, __u64)
+#define NILFS_IOCTL_GET_CPINFO  \
+       _IOR(NILFS_IOCTL_IDENT, 0x82, struct nilfs_argv)
+#define NILFS_IOCTL_GET_CPSTAT  \
+       _IOR(NILFS_IOCTL_IDENT, 0x83, struct nilfs_cpstat)
+#define NILFS_IOCTL_GET_SUINFO  \
+       _IOR(NILFS_IOCTL_IDENT, 0x84, struct nilfs_argv)
+#define NILFS_IOCTL_GET_SUSTAT  \
+       _IOR(NILFS_IOCTL_IDENT, 0x85, struct nilfs_sustat)
+#define NILFS_IOCTL_GET_VINFO  \
+       _IOWR(NILFS_IOCTL_IDENT, 0x86, struct nilfs_argv)
+#define NILFS_IOCTL_GET_BDESCS  \
+       _IOWR(NILFS_IOCTL_IDENT, 0x87, struct nilfs_argv)
+#define NILFS_IOCTL_CLEAN_SEGMENTS  \
+       _IOW(NILFS_IOCTL_IDENT, 0x88, struct nilfs_argv[5])
+#define NILFS_IOCTL_SYNC  \
+       _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64)
+#define NILFS_IOCTL_RESIZE  \
+       _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64)
+
+#endif /* _LINUX_NILFS_FS_H */
index ea8c6d8..cc1767f 100644 (file)
@@ -228,10 +228,11 @@ extern void parport_pc_release_resources(struct parport *p);
 extern int parport_pc_claim_resources(struct parport *p);
 
 /* PCMCIA code will want to get us to look at a port.  Provide a mechanism. */
-extern struct parport *parport_pc_probe_port (unsigned long base,
-                                             unsigned long base_hi,
-                                             int irq, int dma,
-                                             struct device *dev);
-extern void parport_pc_unregister_port (struct parport *p);
+extern struct parport *parport_pc_probe_port(unsigned long base,
+                                            unsigned long base_hi,
+                                            int irq, int dma,
+                                            struct device *dev,
+                                            int irqflags);
+extern void parport_pc_unregister_port(struct parport *p);
 
 #endif
index a7fe4bb..72698d8 100644 (file)
@@ -674,6 +674,11 @@ int __must_check pci_reenable_device(struct pci_dev *);
 int __must_check pcim_enable_device(struct pci_dev *pdev);
 void pcim_pin_device(struct pci_dev *pdev);
 
+static inline int pci_is_enabled(struct pci_dev *pdev)
+{
+       return (atomic_read(&pdev->enable_cnt) > 0);
+}
+
 static inline int pci_is_managed(struct pci_dev *pdev)
 {
        return pdev->is_managed;
index 170f8b1..ee98cd5 100644 (file)
 #define PCI_DEVICE_ID_SUN_TOMATILLO    0xa801
 #define PCI_DEVICE_ID_SUN_CASSINI      0xabba
 
+#define PCI_VENDOR_ID_NI               0x1093
+#define PCI_DEVICE_ID_NI_PCI2322       0xd130
+#define PCI_DEVICE_ID_NI_PCI2324       0xd140
+#define PCI_DEVICE_ID_NI_PCI2328       0xd150
+#define PCI_DEVICE_ID_NI_PXI8422_2322  0xd190
+#define PCI_DEVICE_ID_NI_PXI8422_2324  0xd1a0
+#define PCI_DEVICE_ID_NI_PXI8420_2322  0xd1d0
+#define PCI_DEVICE_ID_NI_PXI8420_2324  0xd1e0
+#define PCI_DEVICE_ID_NI_PXI8420_2328  0xd1f0
+#define PCI_DEVICE_ID_NI_PXI8420_23216 0xd1f1
+#define PCI_DEVICE_ID_NI_PCI2322I      0xd250
+#define PCI_DEVICE_ID_NI_PCI2324I      0xd270
+#define PCI_DEVICE_ID_NI_PCI23216      0xd2b0
+#define PCI_DEVICE_ID_NI_PXI8430_2322  0x7080
+#define PCI_DEVICE_ID_NI_PCI8430_2322  0x70db
+#define PCI_DEVICE_ID_NI_PXI8430_2324  0x70dd
+#define PCI_DEVICE_ID_NI_PCI8430_2324  0x70df
+#define PCI_DEVICE_ID_NI_PXI8430_2328  0x70e2
+#define PCI_DEVICE_ID_NI_PCI8430_2328  0x70e4
+#define PCI_DEVICE_ID_NI_PXI8430_23216 0x70e6
+#define PCI_DEVICE_ID_NI_PCI8430_23216 0x70e7
+#define PCI_DEVICE_ID_NI_PXI8432_2322  0x70e8
+#define PCI_DEVICE_ID_NI_PCI8432_2322  0x70ea
+#define PCI_DEVICE_ID_NI_PXI8432_2324  0x70ec
+#define PCI_DEVICE_ID_NI_PCI8432_2324  0x70ee
+
 #define PCI_VENDOR_ID_CMD              0x1095
 #define PCI_DEVICE_ID_CMD_643          0x0643
 #define PCI_DEVICE_ID_CMD_646          0x0646
index cb7d10f..d4cf7a2 100644 (file)
@@ -31,6 +31,8 @@ struct pda_power_pdata {
        unsigned int wait_for_status; /* msecs, default is 500 */
        unsigned int wait_for_charger; /* msecs, default is 500 */
        unsigned int polling_interval; /* msecs, default is 2000 */
+
+       unsigned long ac_max_uA; /* current to draw when on AC */
 };
 
 #endif /* __PDA_POWER_H__ */
index b94f354..b4c38bc 100644 (file)
@@ -205,7 +205,8 @@ extern unsigned long long time_sync_thresh;
 #define task_is_stopped_or_traced(task)        \
                        ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
 #define task_contributes_to_load(task) \
-                               ((task->state & TASK_UNINTERRUPTIBLE) != 0)
+                               ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
+                                (task->flags & PF_FROZEN) == 0)
 
 #define __set_task_state(tsk, state_value)             \
        do { (tsk)->state = (state_value); } while (0)
@@ -300,17 +301,11 @@ extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
                                    struct file *filp, void __user *buffer,
                                    size_t *lenp, loff_t *ppos);
 extern unsigned int  softlockup_panic;
-extern unsigned long sysctl_hung_task_check_count;
-extern unsigned long sysctl_hung_task_timeout_secs;
-extern unsigned long sysctl_hung_task_warnings;
 extern int softlockup_thresh;
 #else
 static inline void softlockup_tick(void)
 {
 }
-static inline void spawn_softlockup_task(void)
-{
-}
 static inline void touch_softlockup_watchdog(void)
 {
 }
@@ -319,6 +314,15 @@ static inline void touch_all_softlockup_watchdogs(void)
 }
 #endif
 
+#ifdef CONFIG_DETECT_HUNG_TASK
+extern unsigned int  sysctl_hung_task_panic;
+extern unsigned long sysctl_hung_task_check_count;
+extern unsigned long sysctl_hung_task_timeout_secs;
+extern unsigned long sysctl_hung_task_warnings;
+extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
+                                        struct file *filp, void __user *buffer,
+                                        size_t *lenp, loff_t *ppos);
+#endif
 
 /* Attach to any functions which should be ignored in wchan output. */
 #define __sched                __attribute__((__section__(".sched.text")))
@@ -1255,9 +1259,8 @@ struct task_struct {
 /* ipc stuff */
        struct sysv_sem sysvsem;
 #endif
-#ifdef CONFIG_DETECT_SOFTLOCKUP
+#ifdef CONFIG_DETECT_HUNG_TASK
 /* hung task detection */
-       unsigned long last_switch_timestamp;
        unsigned long last_switch_count;
 #endif
 /* CPU-specific state of this task */
@@ -1294,6 +1297,11 @@ struct task_struct {
 /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */
        spinlock_t alloc_lock;
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+       /* IRQ handler threads */
+       struct irqaction *irqaction;
+#endif
+
        /* Protection of the PI data structures: */
        spinlock_t pi_lock;
 
index df9245c..57a97e5 100644 (file)
 /* NWPSERIAL */
 #define PORT_NWPSERIAL 85
 
+/* MAX3100 */
+#define PORT_MAX3100    86
+
 #ifdef __KERNEL__
 
 #include <linux/compiler.h>
@@ -277,7 +280,7 @@ struct uart_port {
        struct uart_icount      icount;                 /* statistics */
 
        struct console          *cons;                  /* struct console, if any */
-#ifdef CONFIG_SERIAL_CORE_CONSOLE
+#if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
        unsigned long           sysrq;                  /* sysrq timeout */
 #endif
 
diff --git a/include/linux/serial_max3100.h b/include/linux/serial_max3100.h
new file mode 100644 (file)
index 0000000..4976bef
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ *
+ *  Copyright (C) 2007 Christian Pellegrin
+ *
+ * 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.
+ */
+
+
+#ifndef _LINUX_SERIAL_MAX3100_H
+#define _LINUX_SERIAL_MAX3100_H 1
+
+
+/**
+ * struct plat_max3100 - MAX3100 SPI UART platform data
+ * @loopback:            force MAX3100 in loopback
+ * @crystal:             1 for 3.6864 Mhz, 0 for 1.8432
+ * @max3100_hw_suspend:  MAX3100 has a shutdown pin. This is a hook
+ *                       called on suspend and resume to activate it.
+ * @poll_time:           poll time for CTS signal in ms, 0 disables (so no hw
+ *                       flow ctrl is possible but you have less CPU usage)
+ *
+ * You should use this structure in your machine description to specify
+ * how the MAX3100 is connected. Example:
+ *
+ * static struct plat_max3100 max3100_plat_data = {
+ *  .loopback = 0,
+ *  .crystal = 0,
+ *  .poll_time = 100,
+ * };
+ *
+ * static struct spi_board_info spi_board_info[] = {
+ * {
+ *  .modalias  = "max3100",
+ *  .platform_data     = &max3100_plat_data,
+ *  .irq               = IRQ_EINT12,
+ *  .max_speed_hz      = 5*1000*1000,
+ *  .chip_select       = 0,
+ * },
+ * };
+ *
+ **/
+struct plat_max3100 {
+       int loopback;
+       int crystal;
+       void (*max3100_hw_suspend) (int suspend);
+       int poll_time;
+};
+
+#endif
index 68bb1c5..2cc43fa 100644 (file)
@@ -204,6 +204,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
  *     SPI slaves, and are numbered from zero to num_chipselects.
  *     each slave has a chipselect signal, but it's common that not
  *     every chipselect is connected to a slave.
+ * @dma_alignment: SPI controller constraint on DMA buffers alignment.
  * @setup: updates the device mode and clocking records used by a
  *     device's SPI controller; protocol code may call this.  This
  *     must fail if an unrecognized or unsupported mode is requested.
@@ -239,6 +240,11 @@ struct spi_master {
         */
        u16                     num_chipselect;
 
+       /* some SPI controllers pose alignment requirements on DMAable
+        * buffers; let protocol drivers know about these requirements.
+        */
+       u16                     dma_alignment;
+
        /* setup mode and clock, etc (spi driver may call many times) */
        int                     (*setup)(struct spi_device *spi);
 
index 6470f74..dabe4ad 100644 (file)
@@ -65,7 +65,7 @@ struct old_linux_dirent;
 #include <asm/signal.h>
 #include <linux/quota.h>
 #include <linux/key.h>
-#include <linux/ftrace.h>
+#include <trace/syscall.h>
 
 #define __SC_DECL1(t1, a1)     t1 a1
 #define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
index 8615d66..bcba84e 100644 (file)
@@ -309,7 +309,8 @@ extern void tty_set_operations(struct tty_driver *driver,
 extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
 
 extern void tty_driver_kref_put(struct tty_driver *driver);
-extern inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
+
+static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
 {
        kref_get(&d->kref);
        return d;
index 139d234..ebb2ea6 100644 (file)
@@ -737,6 +737,11 @@ struct v4l2_input {
 #define V4L2_IN_ST_NO_SIGNAL   0x00000002
 #define V4L2_IN_ST_NO_COLOR    0x00000004
 
+/* field 'status' - sensor orientation */
+/* If sensor is mounted upside down set both bits */
+#define V4L2_IN_ST_HFLIP       0x00000010 /* Frames are flipped horizontally */
+#define V4L2_IN_ST_VFLIP       0x00000020 /* Frames are flipped vertically */
+
 /* field 'status' - analog */
 #define V4L2_IN_ST_NO_H_LOCK   0x00000100  /* No horizontal sync lock */
 #define V4L2_IN_ST_COLOR_KILL  0x00000200  /* Color killer is active */
index 9344547..9c1ed1f 100644 (file)
@@ -168,6 +168,8 @@ void writeback_set_ratelimit(void);
 /* pdflush.c */
 extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
                                   read-only. */
+extern int nr_pdflush_threads_max; /* Global so it can be exported to sysctl */
+extern int nr_pdflush_threads_min; /* Global so it can be exported to sysctl */
 
 
 #endif         /* WRITEBACK_H */
index 6ab8549..90cf22a 100644 (file)
    =======
 
    So to specify a complete routing scheme for the msp3400 you will have to
-   specify in the 'input' field of the v4l2_routing struct:
+   specify in the 'input' arg of the s_routing function:
 
    1) which tuner input to use
    2) which SCART input to use
    3) which DSP input to use for each DSP output
 
-   And in the 'output' field of the v4l2_routing struct you specify:
+   And in the 'output' arg of the s_routing function you specify:
 
    1) which SCART input to use for each SCART output
 
index 57db48d..30d9629 100644 (file)
 #define OV772X_FLAG_VFLIP     0x00000001 /* Vertical flip image */
 #define OV772X_FLAG_HFLIP     0x00000002 /* Horizontal flip image */
 
+/*
+ * for Edge ctrl
+ *
+ * strength also control Auto or Manual Edge Control Mode
+ * see also OV772X_MANUAL_EDGE_CTRL
+ */
+struct ov772x_edge_ctrl {
+       unsigned char strength;
+       unsigned char threshold;
+       unsigned char upper;
+       unsigned char lower;
+};
+
+#define OV772X_MANUAL_EDGE_CTRL        0x80 /* un-used bit of strength */
+#define EDGE_STRENGTH_MASK     0x1F
+#define EDGE_THRESHOLD_MASK    0x0F
+#define EDGE_UPPER_MASK                0xFF
+#define EDGE_LOWER_MASK                0xFF
+
+#define OV772X_AUTO_EDGECTRL(u, l)     \
+{                                      \
+       .upper = (u & EDGE_UPPER_MASK), \
+       .lower = (l & EDGE_LOWER_MASK), \
+}
+
+#define OV772X_MANUAL_EDGECTRL(s, t)                                   \
+{                                                                      \
+       .strength  = (s & EDGE_STRENGTH_MASK) | OV772X_MANUAL_EDGE_CTRL,\
+       .threshold = (t & EDGE_THRESHOLD_MASK),                         \
+}
+
+/*
+ * ov772x camera info
+ */
 struct ov772x_camera_info {
        unsigned long          buswidth;
        unsigned long          flags;
        struct soc_camera_link link;
+       struct ov772x_edge_ctrl edgectrl;
 };
 
 #endif /* __OV772X_H__ */
index fff4235..7a9f76e 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/vmalloc.h>     /* for vmalloc() */
 #include <linux/mm.h>          /* for vmalloc_to_page() */
 
-#define SAA7146_VERSION_CODE 0x000500  /* 0.5.0 */
+#define SAA7146_VERSION_CODE 0x000600  /* 0.6.0 */
 
 #define saa7146_write(sxy,adr,dat)    writel((dat),(sxy->mem+(adr)))
 #define saa7146_read(sxy,adr)         readl(sxy->mem+(adr))
index 6915aaf..1ac8184 100644 (file)
 #ifndef _TVAUDIO_H
 #define _TVAUDIO_H
 
+#include <media/i2c-addr.h>
+
 /* The tvaudio module accepts the following inputs: */
 #define TVAUDIO_INPUT_TUNER  0
 #define TVAUDIO_INPUT_RADIO  1
 #define TVAUDIO_INPUT_EXTERN 2
 #define TVAUDIO_INPUT_INTERN 3
 
+static inline const unsigned short *tvaudio_addrs(void)
+{
+       static const unsigned short addrs[] = {
+               I2C_ADDR_TDA8425   >> 1,
+               I2C_ADDR_TEA6300   >> 1,
+               I2C_ADDR_TEA6420   >> 1,
+               I2C_ADDR_TDA9840   >> 1,
+               I2C_ADDR_TDA985x_L >> 1,
+               I2C_ADDR_TDA985x_H >> 1,
+               I2C_ADDR_TDA9874   >> 1,
+               I2C_ADDR_PIC16C54  >> 1,
+               I2C_CLIENT_END
+       };
+
+       return addrs;
+}
+
 #endif
index 3a69056..c48c24e 100644 (file)
@@ -125,7 +125,7 @@ int v4l2_chip_match_host(const struct v4l2_dbg_match *match);
 
 /* ------------------------------------------------------------------------- */
 
-/* Helper function for I2C legacy drivers */
+/* I2C Helper functions */
 
 struct i2c_driver;
 struct i2c_adapter;
@@ -135,21 +135,24 @@ struct v4l2_device;
 struct v4l2_subdev;
 struct v4l2_subdev_ops;
 
-int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver *driver,
-               const char *name,
-               int (*probe)(struct i2c_client *, const struct i2c_device_id *));
 
 /* Load an i2c module and return an initialized v4l2_subdev struct.
    Only call request_module if module_name != NULL.
    The client_type argument is the name of the chip that's on the adapter. */
-struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
+struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
+               struct i2c_adapter *adapter,
                const char *module_name, const char *client_type, u8 addr);
 /* Probe and load an i2c module and return an initialized v4l2_subdev struct.
    Only call request_module if module_name != NULL.
    The client_type argument is the name of the chip that's on the adapter. */
-struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
+struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev,
+               struct i2c_adapter *adapter,
                const char *module_name, const char *client_type,
                const unsigned short *addrs);
+/* Like v4l2_i2c_new_probed_subdev, except probe for a single address. */
+struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev,
+               struct i2c_adapter *adapter,
+               const char *module_name, const char *client_type, u8 addr);
 /* Initialize an v4l2_subdev with data from an i2c_client struct */
 void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
                const struct v4l2_subdev_ops *ops);
@@ -171,139 +174,23 @@ const unsigned short *v4l2_i2c_tuner_addrs(enum v4l2_i2c_tuner_type type);
 
 /* ------------------------------------------------------------------------- */
 
-/* Internal ioctls */
-
-/* VIDIOC_INT_DECODE_VBI_LINE */
-struct v4l2_decode_vbi_line {
-       u32 is_second_field;    /* Set to 0 for the first (odd) field,
-                                  set to 1 for the second (even) field. */
-       u8 *p;                  /* Pointer to the sliced VBI data from the decoder.
-                                  On exit points to the start of the payload. */
-       u32 line;               /* Line number of the sliced VBI data (1-23) */
-       u32 type;               /* VBI service type (V4L2_SLICED_*). 0 if no service found */
-};
+/* Note: these remaining ioctls/structs should be removed as well, but they are
+   still used in tuner-simple.c (TUNER_SET_CONFIG), cx18/ivtv (RESET) and
+   v4l2-int-device.h (v4l2_routing). To remove these ioctls some more cleanup
+   is needed in those modules. */
 
+/* s_config */
 struct v4l2_priv_tun_config {
        int tuner;
        void *priv;
 };
-
-/* audio ioctls */
-
-/* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */
-#define AUDC_SET_RADIO        _IO('d',88)
-
-/* tuner ioctls */
-
-/* Sets tuner type and its I2C addr */
-#define TUNER_SET_TYPE_ADDR          _IOW('d', 90, int)
-
-/* Puts tuner on powersaving state, disabling it, except for i2c. To be replaced
-   by VIDIOC_INT_S_STANDBY. */
-#define TUNER_SET_STANDBY            _IOW('d', 91, int)
-
-/* Sets tda9887 specific stuff, like port1, port2 and qss */
 #define TUNER_SET_CONFIG           _IOW('d', 92, struct v4l2_priv_tun_config)
 
-/* Switch the tuner to a specific tuner mode. Replacement of AUDC_SET_RADIO */
-#define VIDIOC_INT_S_TUNER_MODE             _IOW('d', 93, enum v4l2_tuner_type)
-
-/* Generic standby command. Passing -1 (all bits set to 1) will put the whole
-   chip into standby mode, value 0 will make the chip fully active. Specific
-   bits can be used by certain chips to enable/disable specific subsystems.
-   Replacement of TUNER_SET_STANDBY. */
-#define VIDIOC_INT_S_STANDBY        _IOW('d', 94, u32)
-
-/* 100, 101 used by  VIDIOC_DBG_[SG]_REGISTER */
-
-/* Generic reset command. The argument selects which subsystems to reset.
-   Passing 0 will always reset the whole chip. */
 #define VIDIOC_INT_RESET               _IOW ('d', 102, u32)
 
-/* Set the frequency (in Hz) of the audio clock output.
-   Used to slave an audio processor to the video decoder, ensuring that audio
-   and video remain synchronized.
-   Usual values for the frequency are 48000, 44100 or 32000 Hz.
-   If the frequency is not supported, then -EINVAL is returned. */
-#define VIDIOC_INT_AUDIO_CLOCK_FREQ    _IOW ('d', 103, u32)
-
-/* Video decoders that support sliced VBI need to implement this ioctl.
-   Field p of the v4l2_sliced_vbi_line struct is set to the start of the VBI
-   data that was generated by the decoder. The driver then parses the sliced
-   VBI data and sets the other fields in the struct accordingly. The pointer p
-   is updated to point to the start of the payload which can be copied
-   verbatim into the data field of the v4l2_sliced_vbi_data struct. If no
-   valid VBI data was found, then the type field is set to 0 on return. */
-#define VIDIOC_INT_DECODE_VBI_LINE     _IOWR('d', 104, struct v4l2_decode_vbi_line)
-
-/* Used to generate VBI signals on a video signal. v4l2_sliced_vbi_data is
-   filled with the data packets that should be output. Note that if you set
-   the line field to 0, then that VBI signal is disabled. If no
-   valid VBI data was found, then the type field is set to 0 on return. */
-#define VIDIOC_INT_S_VBI_DATA          _IOW ('d', 105, struct v4l2_sliced_vbi_data)
-
-/* Used to obtain the sliced VBI packet from a readback register. Not all
-   video decoders support this. If no data is available because the readback
-   register contains invalid or erroneous data -EIO is returned. Note that
-   you must fill in the 'id' member and the 'field' member (to determine
-   whether CC data from the first or second field should be obtained). */
-#define VIDIOC_INT_G_VBI_DATA          _IOWR('d', 106, struct v4l2_sliced_vbi_data)
-
-/* Sets I2S speed in bps. This is used to provide a standard way to select I2S
-   clock used by driving digital audio streams at some board designs.
-   Usual values for the frequency are 1024000 and 2048000.
-   If the frequency is not supported, then -EINVAL is returned. */
-#define VIDIOC_INT_I2S_CLOCK_FREQ      _IOW ('d', 108, u32)
-
-/* Routing definition, device dependent. It specifies which inputs (if any)
-   should be routed to which outputs (if any). */
 struct v4l2_routing {
        u32 input;
        u32 output;
 };
 
-/* These internal commands should be used to define the inputs and outputs
-   of an audio/video chip. They will replace the v4l2 API commands
-   VIDIOC_S/G_INPUT, VIDIOC_S/G_OUTPUT, VIDIOC_S/G_AUDIO and VIDIOC_S/G_AUDOUT
-   that are meant to be used by the user.
-   The internal commands should be used to switch inputs/outputs
-   because only the driver knows how to map a 'Television' input to the precise
-   input/output routing of an A/D converter, or a DSP, or a video digitizer.
-   These four commands should only be sent directly to an i2c device, they
-   should not be broadcast as the routing is very device specific. */
-#define        VIDIOC_INT_S_AUDIO_ROUTING      _IOW ('d', 109, struct v4l2_routing)
-#define        VIDIOC_INT_G_AUDIO_ROUTING      _IOR ('d', 110, struct v4l2_routing)
-#define        VIDIOC_INT_S_VIDEO_ROUTING      _IOW ('d', 111, struct v4l2_routing)
-#define        VIDIOC_INT_G_VIDEO_ROUTING      _IOR ('d', 112, struct v4l2_routing)
-
-struct v4l2_crystal_freq {
-       u32 freq;       /* frequency in Hz of the crystal */
-       u32 flags;      /* device specific flags */
-};
-
-/* Sets the frequency of the crystal used to generate the clocks.
-   An extra flags field allows device specific configuration regarding
-   clock frequency dividers, etc. If not used, then set flags to 0.
-   If the frequency is not supported, then -EINVAL is returned. */
-#define VIDIOC_INT_S_CRYSTAL_FREQ      _IOW('d', 113, struct v4l2_crystal_freq)
-
-/* Initialize the sensor registors to some sort of reasonable
-   default values. */
-#define VIDIOC_INT_INIT                        _IOW('d', 114, u32)
-
-/* Set v4l2_std_id for video OUTPUT devices. This is ignored by
-   video input devices. */
-#define VIDIOC_INT_S_STD_OUTPUT                _IOW('d', 115, v4l2_std_id)
-
-/* Get v4l2_std_id for video OUTPUT devices. This is ignored by
-   video input devices. */
-#define VIDIOC_INT_G_STD_OUTPUT                _IOW('d', 116, v4l2_std_id)
-
-/* Set GPIO pins. Very simple right now, might need to be extended with
-   a v4l2_gpio struct if a direction is also needed. */
-#define VIDIOC_INT_S_GPIO              _IOW('d', 117, u32)
-
-/* Get input status. Same as the status field in the v4l2_input struct. */
-#define VIDIOC_INT_G_INPUT_STATUS      _IOR('d', 118, u32)
-
 #endif /* V4L2_COMMON_H_ */
diff --git a/include/media/v4l2-i2c-drv-legacy.h b/include/media/v4l2-i2c-drv-legacy.h
deleted file mode 100644 (file)
index e65dd9d..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * v4l2-i2c-drv-legacy.h - contains I2C handling code that's identical
- *                 for all V4L2 I2C drivers. Use this header if the
- *                 I2C driver is used by both legacy drivers and
- *                 drivers converted to the bus-based I2C API.
- *
- * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/* NOTE: the full version of this header is in the v4l-dvb repository
- * and allows v4l i2c drivers to be compiled on older kernels as well.
- * The version of this header as it appears in the kernel is a stripped
- * version (without all the backwards compatibility stuff) and so it
- * looks a bit odd.
- *
- * If you look at the full version then you will understand the reason
- * for introducing this header since you really don't want to have all
- * the tricky backwards compatibility code in each and every i2c driver.
- */
-
-struct v4l2_i2c_driver_data {
-       const char * const name;
-       int driverid;
-       int (*command)(struct i2c_client *client, unsigned int cmd, void *arg);
-       int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
-       int (*remove)(struct i2c_client *client);
-       int (*suspend)(struct i2c_client *client, pm_message_t state);
-       int (*resume)(struct i2c_client *client);
-       int (*legacy_probe)(struct i2c_adapter *adapter);
-       int legacy_class;
-       const struct i2c_device_id *id_table;
-};
-
-static struct v4l2_i2c_driver_data v4l2_i2c_data;
-static const struct i2c_client_address_data addr_data;
-static struct i2c_driver v4l2_i2c_driver_legacy;
-static char v4l2_i2c_drv_name_legacy[32];
-
-static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind)
-{
-       return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver_legacy,
-                       v4l2_i2c_drv_name_legacy, v4l2_i2c_data.probe);
-}
-
-static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter)
-{
-       if (v4l2_i2c_data.legacy_probe) {
-               if (v4l2_i2c_data.legacy_probe(adapter))
-                       return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
-               return 0;
-       }
-       if (adapter->class & v4l2_i2c_data.legacy_class)
-               return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
-       return 0;
-}
-
-static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
-{
-       int err;
-
-       if (v4l2_i2c_data.remove)
-               v4l2_i2c_data.remove(client);
-
-       err = i2c_detach_client(client);
-       if (err)
-               return err;
-       kfree(client);
-       return 0;
-}
-
-static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state)
-{
-       return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0;
-}
-
-static int v4l2_i2c_drv_resume_helper(struct i2c_client *client)
-{
-       return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0;
-}
-
-/* ----------------------------------------------------------------------- */
-
-/* i2c implementation */
-static struct i2c_driver v4l2_i2c_driver_legacy = {
-       .driver = {
-               .owner = THIS_MODULE,
-       },
-       .attach_adapter = v4l2_i2c_drv_probe_legacy,
-       .detach_client = v4l2_i2c_drv_detach_legacy,
-       .suspend = v4l2_i2c_drv_suspend_helper,
-       .resume  = v4l2_i2c_drv_resume_helper,
-};
-
-/* ----------------------------------------------------------------------- */
-
-/* i2c implementation */
-static struct i2c_driver v4l2_i2c_driver = {
-       .suspend        = v4l2_i2c_drv_suspend_helper,
-       .resume         = v4l2_i2c_drv_resume_helper,
-};
-
-static int __init v4l2_i2c_drv_init(void)
-{
-       int err;
-
-       strlcpy(v4l2_i2c_drv_name_legacy, v4l2_i2c_data.name, sizeof(v4l2_i2c_drv_name_legacy));
-       strlcat(v4l2_i2c_drv_name_legacy, "'", sizeof(v4l2_i2c_drv_name_legacy));
-
-       if (v4l2_i2c_data.legacy_class == 0)
-               v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG;
-
-       v4l2_i2c_driver_legacy.driver.name = v4l2_i2c_drv_name_legacy;
-       v4l2_i2c_driver_legacy.id = v4l2_i2c_data.driverid;
-       v4l2_i2c_driver_legacy.command = v4l2_i2c_data.command;
-       err = i2c_add_driver(&v4l2_i2c_driver_legacy);
-
-       if (err)
-               return err;
-       v4l2_i2c_driver.driver.name = v4l2_i2c_data.name;
-       v4l2_i2c_driver.id = v4l2_i2c_data.driverid;
-       v4l2_i2c_driver.command = v4l2_i2c_data.command;
-       v4l2_i2c_driver.probe = v4l2_i2c_data.probe;
-       v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
-       v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table;
-       err = i2c_add_driver(&v4l2_i2c_driver);
-       if (err)
-               i2c_del_driver(&v4l2_i2c_driver_legacy);
-       return err;
-}
-
-static void __exit v4l2_i2c_drv_cleanup(void)
-{
-       i2c_del_driver(&v4l2_i2c_driver_legacy);
-       i2c_del_driver(&v4l2_i2c_driver);
-}
-
-module_init(v4l2_i2c_drv_init);
-module_exit(v4l2_i2c_drv_cleanup);
index efdc8bf..10a2882 100644 (file)
 
 struct v4l2_i2c_driver_data {
        const char * const name;
-       int driverid;
        int (*command)(struct i2c_client *client, unsigned int cmd, void *arg);
        int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
        int (*remove)(struct i2c_client *client);
        int (*suspend)(struct i2c_client *client, pm_message_t state);
        int (*resume)(struct i2c_client *client);
-       int (*legacy_probe)(struct i2c_adapter *adapter);
-       int legacy_class;
        const struct i2c_device_id *id_table;
 };
 
@@ -54,12 +51,11 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data;
 static struct i2c_driver v4l2_i2c_driver;
 
 
-/* Bus-based I2C implementation for kernels >= 2.6.22 */
+/* Bus-based I2C implementation for kernels >= 2.6.26 */
 
 static int __init v4l2_i2c_drv_init(void)
 {
        v4l2_i2c_driver.driver.name = v4l2_i2c_data.name;
-       v4l2_i2c_driver.id = v4l2_i2c_data.driverid;
        v4l2_i2c_driver.command = v4l2_i2c_data.command;
        v4l2_i2c_driver.probe = v4l2_i2c_data.probe;
        v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
index 1d181b4..1785608 100644 (file)
@@ -27,6 +27,16 @@ struct v4l2_device;
 struct v4l2_subdev;
 struct tuner_setup;
 
+/* decode_vbi_line */
+struct v4l2_decode_vbi_line {
+       u32 is_second_field;    /* Set to 0 for the first (odd) field,
+                                  set to 1 for the second (even) field. */
+       u8 *p;                  /* Pointer to the sliced VBI data from the decoder.
+                                  On exit points to the start of the payload. */
+       u32 line;               /* Line number of the sliced VBI data (1-23) */
+       u32 type;               /* VBI service type (V4L2_SLICED_*). 0 if no service found */
+};
+
 /* Sub-devices are devices that are connected somehow to the main bridge
    device. These devices are usually audio/video muxers/encoders/decoders or
    sensors and webcam controllers.
@@ -68,11 +78,26 @@ struct tuner_setup;
    the use-case it might be better to use subdev-specific ops (currently
    not yet implemented) since ops provide proper type-checking.
  */
+
+/* init: initialize the sensor registors to some sort of reasonable default
+       values. Do not use for new drivers and should be removed in existing
+       drivers.
+
+   load_fw: load firmware.
+
+   reset: generic reset command. The argument selects which subsystems to
+       reset. Passing 0 will always reset the whole chip. Do not use for new
+       drivers without discussing this first on the linux-media mailinglist.
+       There should be no reason normally to reset a device.
+
+   s_gpio: set GPIO pins. Very simple right now, might need to be extended with
+       a direction argument if needed.
+ */
 struct v4l2_subdev_core_ops {
        int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip);
        int (*log_status)(struct v4l2_subdev *sd);
        int (*init)(struct v4l2_subdev *sd, u32 val);
-       int (*s_standby)(struct v4l2_subdev *sd, u32 standby);
+       int (*load_fw)(struct v4l2_subdev *sd);
        int (*reset)(struct v4l2_subdev *sd, u32 val);
        int (*s_gpio)(struct v4l2_subdev *sd, u32 val);
        int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc);
@@ -82,6 +107,7 @@ struct v4l2_subdev_core_ops {
        int (*s_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
        int (*try_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
        int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm);
+       int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm);
        long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg);
@@ -89,6 +115,16 @@ struct v4l2_subdev_core_ops {
 #endif
 };
 
+/* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio.
+
+   s_radio: v4l device was opened in Radio mode, to be replaced by s_mode.
+
+   s_type_addr: sets tuner type and its I2C addr.
+
+   s_config: sets tda9887 specific stuff, like port1, port2 and qss
+
+   s_standby: puts tuner on powersaving state, disabling it, except for i2c.
+ */
 struct v4l2_subdev_tuner_ops {
        int (*s_mode)(struct v4l2_subdev *sd, enum v4l2_tuner_type);
        int (*s_radio)(struct v4l2_subdev *sd);
@@ -96,20 +132,77 @@ struct v4l2_subdev_tuner_ops {
        int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
        int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
        int (*s_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
-       int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm);
        int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
        int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
+       int (*s_standby)(struct v4l2_subdev *sd);
 };
 
+/* s_clock_freq: set the frequency (in Hz) of the audio clock output.
+       Used to slave an audio processor to the video decoder, ensuring that
+       audio and video remain synchronized. Usual values for the frequency
+       are 48000, 44100 or 32000 Hz. If the frequency is not supported, then
+       -EINVAL is returned.
+
+   s_i2s_clock_freq: sets I2S speed in bps. This is used to provide a standard
+       way to select I2S clock used by driving digital audio streams at some
+       board designs. Usual values for the frequency are 1024000 and 2048000.
+       If the frequency is not supported, then -EINVAL is returned.
+
+   s_routing: used to define the input and/or output pins of an audio chip,
+       and any additional configuration data.
+       Never attempt to use user-level input IDs (e.g. Composite, S-Video,
+       Tuner) at this level. An i2c device shouldn't know about whether an
+       input pin is connected to a Composite connector, become on another
+       board or platform it might be connected to something else entirely.
+       The calling driver is responsible for mapping a user-level input to
+       the right pins on the i2c device.
+ */
 struct v4l2_subdev_audio_ops {
        int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
        int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
-       int (*s_routing)(struct v4l2_subdev *sd, const struct v4l2_routing *route);
+       int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
 };
 
+/*
+   decode_vbi_line: video decoders that support sliced VBI need to implement
+       this ioctl. Field p of the v4l2_sliced_vbi_line struct is set to the
+       start of the VBI data that was generated by the decoder. The driver
+       then parses the sliced VBI data and sets the other fields in the
+       struct accordingly. The pointer p is updated to point to the start of
+       the payload which can be copied verbatim into the data field of the
+       v4l2_sliced_vbi_data struct. If no valid VBI data was found, then the
+       type field is set to 0 on return.
+
+   s_vbi_data: used to generate VBI signals on a video signal.
+       v4l2_sliced_vbi_data is filled with the data packets that should be
+       output. Note that if you set the line field to 0, then that VBI signal
+       is disabled. If no valid VBI data was found, then the type field is
+       set to 0 on return.
+
+   g_vbi_data: used to obtain the sliced VBI packet from a readback register.
+       Not all video decoders support this. If no data is available because
+       the readback register contains invalid or erroneous data -EIO is
+       returned. Note that you must fill in the 'id' member and the 'field'
+       member (to determine whether CC data from the first or second field
+       should be obtained).
+
+   s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by
+       video input devices.
+
+  s_crystal_freq: sets the frequency of the crystal used to generate the
+       clocks in Hz. An extra flags field allows device specific configuration
+       regarding clock frequency dividers, etc. If not used, then set flags
+       to 0. If the frequency is not supported, then -EINVAL is returned.
+
+   g_input_status: get input status. Same as the status field in the v4l2_input
+       struct.
+
+   s_routing: see s_routing in audio_ops, except this version is for video
+       devices.
+ */
 struct v4l2_subdev_video_ops {
-       int (*s_routing)(struct v4l2_subdev *sd, const struct v4l2_routing *route);
-       int (*s_crystal_freq)(struct v4l2_subdev *sd, struct v4l2_crystal_freq *freq);
+       int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
+       int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags);
        int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line);
        int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data);
        int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data);
@@ -163,18 +256,6 @@ static inline void *v4l2_get_subdevdata(const struct v4l2_subdev *sd)
        return sd->priv;
 }
 
-/* Convert an ioctl-type command to the proper v4l2_subdev_ops function call.
-   This is used by subdev modules that can be called by both old-style ioctl
-   commands and through the v4l2_subdev_ops.
-
-   The ioctl API of the subdev driver can call this function to call the
-   right ops based on the ioctl cmd and arg.
-
-   Once all subdev drivers have been converted and all drivers no longer
-   use the ioctl interface, then this function can be removed.
- */
-int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg);
-
 static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
                                        const struct v4l2_subdev_ops *ops)
 {
index ab17a15..a965280 100644 (file)
@@ -99,9 +99,12 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
                       const union nf_inet_addr *,
                       u_int8_t, const __be16 *, const __be16 *);
 void nf_ct_expect_put(struct nf_conntrack_expect *exp);
-int nf_ct_expect_related(struct nf_conntrack_expect *expect);
 int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 
                                u32 pid, int report);
+static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect)
+{
+       return nf_ct_expect_related_report(expect, 0, 0);
+}
 
 #endif /*_NF_CONNTRACK_EXPECT_H*/
 
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
new file mode 100644 (file)
index 0000000..8cfe515
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef _TRACE_SYSCALL_H
+#define _TRACE_SYSCALL_H
+
+#include <asm/ptrace.h>
+
+/*
+ * A syscall entry in the ftrace syscalls array.
+ *
+ * @name: name of the syscall
+ * @nb_args: number of parameters it takes
+ * @types: list of types as strings
+ * @args: list of args as strings (args[i] matches types[i])
+ */
+struct syscall_metadata {
+       const char      *name;
+       int             nb_args;
+       const char      **types;
+       const char      **args;
+};
+
+#ifdef CONFIG_FTRACE_SYSCALLS
+extern void arch_init_ftrace_syscalls(void);
+extern struct syscall_metadata *syscall_nr_to_meta(int nr);
+extern void start_ftrace_syscalls(void);
+extern void stop_ftrace_syscalls(void);
+extern void ftrace_syscall_enter(struct pt_regs *regs);
+extern void ftrace_syscall_exit(struct pt_regs *regs);
+#else
+static inline void start_ftrace_syscalls(void)                 { }
+static inline void stop_ftrace_syscalls(void)                  { }
+static inline void ftrace_syscall_enter(struct pt_regs *regs)  { }
+static inline void ftrace_syscall_exit(struct pt_regs *regs)   { }
+#endif
+
+#endif /* _TRACE_SYSCALL_H */
index 7431d96..befbaf0 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef _TDFX_H
 #define _TDFX_H
 
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+
 /* membase0 register offsets */
 #define STATUS         0x00
 #define PCIINIT0       0x04
 #define VIDCFG_PIXFMT_SHIFT             18
 #define DACMODE_2X                     BIT(0)
 
+/* I2C bit locations in the VIDSERPARPORT register */
+#define DDC_ENAB       0x00040000
+#define DDC_SCL_OUT    0x00080000
+#define DDC_SDA_OUT    0x00100000
+#define DDC_SCL_IN     0x00200000
+#define DDC_SDA_IN     0x00400000
+#define I2C_ENAB       0x00800000
+#define I2C_SCL_OUT    0x01000000
+#define I2C_SDA_OUT    0x02000000
+#define I2C_SCL_IN     0x04000000
+#define I2C_SDA_IN     0x08000000
+
 /* VGA rubbish, need to change this for multihead support */
 #define MISC_W         0x3c2
 #define MISC_R         0x3cc
@@ -168,12 +183,23 @@ struct banshee_reg {
        unsigned long miscinit0;
 };
 
+struct tdfx_par;
+
+struct tdfxfb_i2c_chan {
+       struct tdfx_par *par;
+       struct i2c_adapter adapter;
+       struct i2c_algo_bit_data algo;
+};
+
 struct tdfx_par {
        u32 max_pixclock;
        u32 palette[16];
        void __iomem *regbase_virt;
        unsigned long iobase;
        int mtrr_handle;
+#ifdef CONFIG_FB_3DFX_I2C
+       struct tdfxfb_i2c_chan chan[2];
+#endif
 };
 
 #endif /* __KERNEL__ */
index 09c7953..f2f9b53 100644 (file)
@@ -208,6 +208,12 @@ config POSIX_MQUEUE
 
          If unsure, say Y.
 
+config POSIX_MQUEUE_SYSCTL
+       bool
+       depends on POSIX_MQUEUE
+       depends on SYSCTL
+       default y
+
 config BSD_PROCESS_ACCT
        bool "BSD Process Accounting"
        help
@@ -670,10 +676,10 @@ config UTS_NS
 
 config IPC_NS
        bool "IPC namespace"
-       depends on NAMESPACES && SYSVIPC
+       depends on NAMESPACES && (SYSVIPC || POSIX_MQUEUE)
        help
          In this namespace tasks work with IPC ids which correspond to
-         different IPC objects in different namespaces
+         different IPC objects in different namespaces.
 
 config USER_NS
        bool "User namespace (EXPERIMENTAL)"
@@ -1016,7 +1022,7 @@ source "arch/Kconfig"
 
 config SLOW_WORK
        default n
-       bool "Enable slow work thread pool"
+       bool
        help
          The slow work thread pool provides a number of dynamically allocated
          threads that can be used by the kernel to perform operations that
@@ -1026,6 +1032,8 @@ config SLOW_WORK
          by a series of mkdirs and a create call, all of which have to touch
          disk.
 
+         See Documentation/slow-work.txt.
+
 endmenu                # General setup
 
 config HAVE_GENERIC_DMA_COHERENT
index 65c3843..4e1955e 100644 (file)
@@ -8,4 +8,5 @@ obj-$(CONFIG_SYSVIPC_SYSCTL) += ipc_sysctl.o
 obj_mq-$(CONFIG_COMPAT) += compat_mq.o
 obj-$(CONFIG_POSIX_MQUEUE) += mqueue.o msgutil.o $(obj_mq-y)
 obj-$(CONFIG_IPC_NS) += namespace.o
+obj-$(CONFIG_POSIX_MQUEUE_SYSCTL) += mq_sysctl.o
 
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c
new file mode 100644 (file)
index 0000000..89f60ec
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ *  Copyright (C) 2007 IBM Corporation
+ *
+ *  Author: Cedric Le Goater <clg@fr.ibm.com>
+ *
+ *  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, version 2 of the
+ *  License.
+ */
+
+#include <linux/nsproxy.h>
+#include <linux/ipc_namespace.h>
+#include <linux/sysctl.h>
+
+/*
+ * Define the ranges various user-specified maximum values can
+ * be set to.
+ */
+#define MIN_MSGMAX     1               /* min value for msg_max */
+#define MAX_MSGMAX     HARD_MSGMAX     /* max value for msg_max */
+#define MIN_MSGSIZEMAX 128             /* min value for msgsize_max */
+#define MAX_MSGSIZEMAX (8192*128)      /* max value for msgsize_max */
+
+static void *get_mq(ctl_table *table)
+{
+       char *which = table->data;
+       struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
+       which = (which - (char *)&init_ipc_ns) + (char *)ipc_ns;
+       return which;
+}
+
+#ifdef CONFIG_PROC_SYSCTL
+static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp,
+       void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+       struct ctl_table mq_table;
+       memcpy(&mq_table, table, sizeof(mq_table));
+       mq_table.data = get_mq(table);
+
+       return proc_dointvec(&mq_table, write, filp, buffer, lenp, ppos);
+}
+
+static int proc_mq_dointvec_minmax(ctl_table *table, int write,
+       struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+       struct ctl_table mq_table;
+       memcpy(&mq_table, table, sizeof(mq_table));
+       mq_table.data = get_mq(table);
+
+       return proc_dointvec_minmax(&mq_table, write, filp, buffer,
+                                       lenp, ppos);
+}
+#else
+#define proc_mq_dointvec NULL
+#define proc_mq_dointvec_minmax NULL
+#endif
+
+static int msg_max_limit_min = MIN_MSGMAX;
+static int msg_max_limit_max = MAX_MSGMAX;
+
+static int msg_maxsize_limit_min = MIN_MSGSIZEMAX;
+static int msg_maxsize_limit_max = MAX_MSGSIZEMAX;
+
+static ctl_table mq_sysctls[] = {
+       {
+               .procname       = "queues_max",
+               .data           = &init_ipc_ns.mq_queues_max,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_mq_dointvec,
+       },
+       {
+               .procname       = "msg_max",
+               .data           = &init_ipc_ns.mq_msg_max,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_mq_dointvec_minmax,
+               .extra1         = &msg_max_limit_min,
+               .extra2         = &msg_max_limit_max,
+       },
+       {
+               .procname       = "msgsize_max",
+               .data           = &init_ipc_ns.mq_msgsize_max,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_mq_dointvec_minmax,
+               .extra1         = &msg_maxsize_limit_min,
+               .extra2         = &msg_maxsize_limit_max,
+       },
+       { .ctl_name = 0 }
+};
+
+static ctl_table mq_sysctl_dir[] = {
+       {
+               .procname       = "mqueue",
+               .mode           = 0555,
+               .child          = mq_sysctls,
+       },
+       { .ctl_name = 0 }
+};
+
+static ctl_table mq_sysctl_root[] = {
+       {
+               .ctl_name       = CTL_FS,
+               .procname       = "fs",
+               .mode           = 0555,
+               .child          = mq_sysctl_dir,
+       },
+       { .ctl_name = 0 }
+};
+
+struct ctl_table_header *mq_register_sysctl_table(void)
+{
+       return register_sysctl_table(mq_sysctl_root);
+}
index 9167853..e35ba2c 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/mutex.h>
 #include <linux/nsproxy.h>
 #include <linux/pid.h>
+#include <linux/ipc_namespace.h>
 
 #include <net/sock.h>
 #include "util.h"
 #define STATE_PENDING  1
 #define STATE_READY    2
 
-/* default values */
-#define DFLT_QUEUESMAX 256     /* max number of message queues */
-#define DFLT_MSGMAX    10      /* max number of messages in each queue */
-#define HARD_MSGMAX    (131072/sizeof(void*))
-#define DFLT_MSGSIZEMAX 8192   /* max message size */
-
-/*
- * Define the ranges various user-specified maximum values can
- * be set to.
- */
-#define MIN_MSGMAX     1               /* min value for msg_max */
-#define MAX_MSGMAX     HARD_MSGMAX     /* max value for msg_max */
-#define MIN_MSGSIZEMAX 128             /* min value for msgsize_max */
-#define MAX_MSGSIZEMAX (8192*128)      /* max value for msgsize_max */
-
 struct ext_wait_queue {                /* queue of sleeping tasks */
        struct task_struct *task;
        struct list_head list;
@@ -93,14 +79,7 @@ static const struct file_operations mqueue_file_operations;
 static struct super_operations mqueue_super_ops;
 static void remove_notification(struct mqueue_inode_info *info);
 
-static spinlock_t mq_lock;
 static struct kmem_cache *mqueue_inode_cachep;
-static struct vfsmount *mqueue_mnt;
-
-static unsigned int queues_count;
-static unsigned int queues_max         = DFLT_QUEUESMAX;
-static unsigned int msg_max    = DFLT_MSGMAX;
-static unsigned int msgsize_max = DFLT_MSGSIZEMAX;
 
 static struct ctl_table_header * mq_sysctl_table;
 
@@ -109,8 +88,27 @@ static inline struct mqueue_inode_info *MQUEUE_I(struct inode *inode)
        return container_of(inode, struct mqueue_inode_info, vfs_inode);
 }
 
-static struct inode *mqueue_get_inode(struct super_block *sb, int mode,
-                                                       struct mq_attr *attr)
+/*
+ * This routine should be called with the mq_lock held.
+ */
+static inline struct ipc_namespace *__get_ns_from_inode(struct inode *inode)
+{
+       return get_ipc_ns(inode->i_sb->s_fs_info);
+}
+
+static struct ipc_namespace *get_ns_from_inode(struct inode *inode)
+{
+       struct ipc_namespace *ns;
+
+       spin_lock(&mq_lock);
+       ns = __get_ns_from_inode(inode);
+       spin_unlock(&mq_lock);
+       return ns;
+}
+
+static struct inode *mqueue_get_inode(struct super_block *sb,
+               struct ipc_namespace *ipc_ns, int mode,
+               struct mq_attr *attr)
 {
        struct user_struct *u = current_user();
        struct inode *inode;
@@ -141,8 +139,8 @@ static struct inode *mqueue_get_inode(struct super_block *sb, int mode,
                        info->qsize = 0;
                        info->user = NULL;      /* set when all is ok */
                        memset(&info->attr, 0, sizeof(info->attr));
-                       info->attr.mq_maxmsg = msg_max;
-                       info->attr.mq_msgsize = msgsize_max;
+                       info->attr.mq_maxmsg = ipc_ns->mq_msg_max;
+                       info->attr.mq_msgsize = ipc_ns->mq_msgsize_max;
                        if (attr) {
                                info->attr.mq_maxmsg = attr->mq_maxmsg;
                                info->attr.mq_msgsize = attr->mq_msgsize;
@@ -188,30 +186,38 @@ out_inode:
 static int mqueue_fill_super(struct super_block *sb, void *data, int silent)
 {
        struct inode *inode;
+       struct ipc_namespace *ns = data;
+       int error = 0;
 
        sb->s_blocksize = PAGE_CACHE_SIZE;
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
        sb->s_magic = MQUEUE_MAGIC;
        sb->s_op = &mqueue_super_ops;
 
-       inode = mqueue_get_inode(sb, S_IFDIR | S_ISVTX | S_IRWXUGO, NULL);
-       if (!inode)
-               return -ENOMEM;
+       inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO,
+                               NULL);
+       if (!inode) {
+               error = -ENOMEM;
+               goto out;
+       }
 
        sb->s_root = d_alloc_root(inode);
        if (!sb->s_root) {
                iput(inode);
-               return -ENOMEM;
+               error = -ENOMEM;
        }
 
-       return 0;
+out:
+       return error;
 }
 
 static int mqueue_get_sb(struct file_system_type *fs_type,
                         int flags, const char *dev_name,
                         void *data, struct vfsmount *mnt)
 {
-       return get_sb_single(fs_type, flags, data, mqueue_fill_super, mnt);
+       if (!(flags & MS_KERNMOUNT))
+               data = current->nsproxy->ipc_ns;
+       return get_sb_ns(fs_type, flags, data, mqueue_fill_super, mnt);
 }
 
 static void init_once(void *foo)
@@ -242,11 +248,13 @@ static void mqueue_delete_inode(struct inode *inode)
        struct user_struct *user;
        unsigned long mq_bytes;
        int i;
+       struct ipc_namespace *ipc_ns;
 
        if (S_ISDIR(inode->i_mode)) {
                clear_inode(inode);
                return;
        }
+       ipc_ns = get_ns_from_inode(inode);
        info = MQUEUE_I(inode);
        spin_lock(&info->lock);
        for (i = 0; i < info->attr.mq_curmsgs; i++)
@@ -262,10 +270,19 @@ static void mqueue_delete_inode(struct inode *inode)
        if (user) {
                spin_lock(&mq_lock);
                user->mq_bytes -= mq_bytes;
-               queues_count--;
+               /*
+                * get_ns_from_inode() ensures that the
+                * (ipc_ns = sb->s_fs_info) is either a valid ipc_ns
+                * to which we now hold a reference, or it is NULL.
+                * We can't put it here under mq_lock, though.
+                */
+               if (ipc_ns)
+                       ipc_ns->mq_queues_count--;
                spin_unlock(&mq_lock);
                free_uid(user);
        }
+       if (ipc_ns)
+               put_ipc_ns(ipc_ns);
 }
 
 static int mqueue_create(struct inode *dir, struct dentry *dentry,
@@ -274,31 +291,41 @@ static int mqueue_create(struct inode *dir, struct dentry *dentry,
        struct inode *inode;
        struct mq_attr *attr = dentry->d_fsdata;
        int error;
+       struct ipc_namespace *ipc_ns;
 
        spin_lock(&mq_lock);
-       if (queues_count >= queues_max && !capable(CAP_SYS_RESOURCE)) {
+       ipc_ns = __get_ns_from_inode(dir);
+       if (!ipc_ns) {
+               error = -EACCES;
+               goto out_unlock;
+       }
+       if (ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max &&
+                       !capable(CAP_SYS_RESOURCE)) {
                error = -ENOSPC;
-               goto out_lock;
+               goto out_unlock;
        }
-       queues_count++;
+       ipc_ns->mq_queues_count++;
        spin_unlock(&mq_lock);
 
-       inode = mqueue_get_inode(dir->i_sb, mode, attr);
+       inode = mqueue_get_inode(dir->i_sb, ipc_ns, mode, attr);
        if (!inode) {
                error = -ENOMEM;
                spin_lock(&mq_lock);
-               queues_count--;
-               goto out_lock;
+               ipc_ns->mq_queues_count--;
+               goto out_unlock;
        }
 
+       put_ipc_ns(ipc_ns);
        dir->i_size += DIRENT_SIZE;
        dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME;
 
        d_instantiate(dentry, inode);
        dget(dentry);
        return 0;
-out_lock:
+out_unlock:
        spin_unlock(&mq_lock);
+       if (ipc_ns)
+               put_ipc_ns(ipc_ns);
        return error;
 }
 
@@ -562,7 +589,7 @@ static void remove_notification(struct mqueue_inode_info *info)
        info->notify_owner = NULL;
 }
 
-static int mq_attr_ok(struct mq_attr *attr)
+static int mq_attr_ok(struct ipc_namespace *ipc_ns, struct mq_attr *attr)
 {
        if (attr->mq_maxmsg <= 0 || attr->mq_msgsize <= 0)
                return 0;
@@ -570,8 +597,8 @@ static int mq_attr_ok(struct mq_attr *attr)
                if (attr->mq_maxmsg > HARD_MSGMAX)
                        return 0;
        } else {
-               if (attr->mq_maxmsg > msg_max ||
-                               attr->mq_msgsize > msgsize_max)
+               if (attr->mq_maxmsg > ipc_ns->mq_msg_max ||
+                               attr->mq_msgsize > ipc_ns->mq_msgsize_max)
                        return 0;
        }
        /* check for overflow */
@@ -587,8 +614,9 @@ static int mq_attr_ok(struct mq_attr *attr)
 /*
  * Invoked when creating a new queue via sys_mq_open
  */
-static struct file *do_create(struct dentry *dir, struct dentry *dentry,
-                       int oflag, mode_t mode, struct mq_attr *attr)
+static struct file *do_create(struct ipc_namespace *ipc_ns, struct dentry *dir,
+                       struct dentry *dentry, int oflag, mode_t mode,
+                       struct mq_attr *attr)
 {
        const struct cred *cred = current_cred();
        struct file *result;
@@ -596,14 +624,14 @@ static struct file *do_create(struct dentry *dir, struct dentry *dentry,
 
        if (attr) {
                ret = -EINVAL;
-               if (!mq_attr_ok(attr))
+               if (!mq_attr_ok(ipc_ns, attr))
                        goto out;
                /* store for use during create */
                dentry->d_fsdata = attr;
        }
 
        mode &= ~current_umask();
-       ret = mnt_want_write(mqueue_mnt);
+       ret = mnt_want_write(ipc_ns->mq_mnt);
        if (ret)
                goto out;
        ret = vfs_create(dir->d_inode, dentry, mode, NULL);
@@ -611,24 +639,25 @@ static struct file *do_create(struct dentry *dir, struct dentry *dentry,
        if (ret)
                goto out_drop_write;
 
-       result = dentry_open(dentry, mqueue_mnt, oflag, cred);
+       result = dentry_open(dentry, ipc_ns->mq_mnt, oflag, cred);
        /*
         * dentry_open() took a persistent mnt_want_write(),
         * so we can now drop this one.
         */
-       mnt_drop_write(mqueue_mnt);
+       mnt_drop_write(ipc_ns->mq_mnt);
        return result;
 
 out_drop_write:
-       mnt_drop_write(mqueue_mnt);
+       mnt_drop_write(ipc_ns->mq_mnt);
 out:
        dput(dentry);
-       mntput(mqueue_mnt);
+       mntput(ipc_ns->mq_mnt);
        return ERR_PTR(ret);
 }
 
 /* Opens existing queue */
-static struct file *do_open(struct dentry *dentry, int oflag)
+static struct file *do_open(struct ipc_namespace *ipc_ns,
+                               struct dentry *dentry, int oflag)
 {
        const struct cred *cred = current_cred();
 
@@ -637,17 +666,17 @@ static struct file *do_open(struct dentry *dentry, int oflag)
 
        if ((oflag & O_ACCMODE) == (O_RDWR | O_WRONLY)) {
                dput(dentry);
-               mntput(mqueue_mnt);
+               mntput(ipc_ns->mq_mnt);
                return ERR_PTR(-EINVAL);
        }
 
        if (inode_permission(dentry->d_inode, oflag2acc[oflag & O_ACCMODE])) {
                dput(dentry);
-               mntput(mqueue_mnt);
+               mntput(ipc_ns->mq_mnt);
                return ERR_PTR(-EACCES);
        }
 
-       return dentry_open(dentry, mqueue_mnt, oflag, cred);
+       return dentry_open(dentry, ipc_ns->mq_mnt, oflag, cred);
 }
 
 SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
@@ -658,6 +687,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
        char *name;
        struct mq_attr attr;
        int fd, error;
+       struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
 
        if (u_attr && copy_from_user(&attr, u_attr, sizeof(struct mq_attr)))
                return -EFAULT;
@@ -671,13 +701,13 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
        if (fd < 0)
                goto out_putname;
 
-       mutex_lock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
-       dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name));
+       mutex_lock(&ipc_ns->mq_mnt->mnt_root->d_inode->i_mutex);
+       dentry = lookup_one_len(name, ipc_ns->mq_mnt->mnt_root, strlen(name));
        if (IS_ERR(dentry)) {
                error = PTR_ERR(dentry);
                goto out_err;
        }
-       mntget(mqueue_mnt);
+       mntget(ipc_ns->mq_mnt);
 
        if (oflag & O_CREAT) {
                if (dentry->d_inode) {  /* entry already exists */
@@ -685,10 +715,10 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
                        error = -EEXIST;
                        if (oflag & O_EXCL)
                                goto out;
-                       filp = do_open(dentry, oflag);
+                       filp = do_open(ipc_ns, dentry, oflag);
                } else {
-                       filp = do_create(mqueue_mnt->mnt_root, dentry,
-                                               oflag, mode,
+                       filp = do_create(ipc_ns, ipc_ns->mq_mnt->mnt_root,
+                                               dentry, oflag, mode,
                                                u_attr ? &attr : NULL);
                }
        } else {
@@ -696,7 +726,7 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
                if (!dentry->d_inode)
                        goto out;
                audit_inode(name, dentry);
-               filp = do_open(dentry, oflag);
+               filp = do_open(ipc_ns, dentry, oflag);
        }
 
        if (IS_ERR(filp)) {
@@ -709,13 +739,13 @@ SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
 
 out:
        dput(dentry);
-       mntput(mqueue_mnt);
+       mntput(ipc_ns->mq_mnt);
 out_putfd:
        put_unused_fd(fd);
 out_err:
        fd = error;
 out_upsem:
-       mutex_unlock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
+       mutex_unlock(&ipc_ns->mq_mnt->mnt_root->d_inode->i_mutex);
 out_putname:
        putname(name);
        return fd;
@@ -727,14 +757,15 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
        char *name;
        struct dentry *dentry;
        struct inode *inode = NULL;
+       struct ipc_namespace *ipc_ns = current->nsproxy->ipc_ns;
 
        name = getname(u_name);
        if (IS_ERR(name))
                return PTR_ERR(name);
 
-       mutex_lock_nested(&mqueue_mnt->mnt_root->d_inode->i_mutex,
+       mutex_lock_nested(&ipc_ns->mq_mnt->mnt_root->d_inode->i_mutex,
                        I_MUTEX_PARENT);
-       dentry = lookup_one_len(name, mqueue_mnt->mnt_root, strlen(name));
+       dentry = lookup_one_len(name, ipc_ns->mq_mnt->mnt_root, strlen(name));
        if (IS_ERR(dentry)) {
                err = PTR_ERR(dentry);
                goto out_unlock;
@@ -748,16 +779,16 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
        inode = dentry->d_inode;
        if (inode)
                atomic_inc(&inode->i_count);
-       err = mnt_want_write(mqueue_mnt);
+       err = mnt_want_write(ipc_ns->mq_mnt);
        if (err)
                goto out_err;
        err = vfs_unlink(dentry->d_parent->d_inode, dentry);
-       mnt_drop_write(mqueue_mnt);
+       mnt_drop_write(ipc_ns->mq_mnt);
 out_err:
        dput(dentry);
 
 out_unlock:
-       mutex_unlock(&mqueue_mnt->mnt_root->d_inode->i_mutex);
+       mutex_unlock(&ipc_ns->mq_mnt->mnt_root->d_inode->i_mutex);
        putname(name);
        if (inode)
                iput(inode);
@@ -1205,59 +1236,31 @@ static struct file_system_type mqueue_fs_type = {
        .kill_sb = kill_litter_super,
 };
 
-static int msg_max_limit_min = MIN_MSGMAX;
-static int msg_max_limit_max = MAX_MSGMAX;
-
-static int msg_maxsize_limit_min = MIN_MSGSIZEMAX;
-static int msg_maxsize_limit_max = MAX_MSGSIZEMAX;
-
-static ctl_table mq_sysctls[] = {
-       {
-               .procname       = "queues_max",
-               .data           = &queues_max,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-       },
-       {
-               .procname       = "msg_max",
-               .data           = &msg_max,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec_minmax,
-               .extra1         = &msg_max_limit_min,
-               .extra2         = &msg_max_limit_max,
-       },
-       {
-               .procname       = "msgsize_max",
-               .data           = &msgsize_max,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec_minmax,
-               .extra1         = &msg_maxsize_limit_min,
-               .extra2         = &msg_maxsize_limit_max,
-       },
-       { .ctl_name = 0 }
-};
+int mq_init_ns(struct ipc_namespace *ns)
+{
+       ns->mq_queues_count  = 0;
+       ns->mq_queues_max    = DFLT_QUEUESMAX;
+       ns->mq_msg_max       = DFLT_MSGMAX;
+       ns->mq_msgsize_max   = DFLT_MSGSIZEMAX;
+
+       ns->mq_mnt = kern_mount_data(&mqueue_fs_type, ns);
+       if (IS_ERR(ns->mq_mnt)) {
+               int err = PTR_ERR(ns->mq_mnt);
+               ns->mq_mnt = NULL;
+               return err;
+       }
+       return 0;
+}
 
-static ctl_table mq_sysctl_dir[] = {
-       {
-               .procname       = "mqueue",
-               .mode           = 0555,
-               .child          = mq_sysctls,
-       },
-       { .ctl_name = 0 }
-};
+void mq_clear_sbinfo(struct ipc_namespace *ns)
+{
+       ns->mq_mnt->mnt_sb->s_fs_info = NULL;
+}
 
-static ctl_table mq_sysctl_root[] = {
-       {
-               .ctl_name       = CTL_FS,
-               .procname       = "fs",
-               .mode           = 0555,
-               .child          = mq_sysctl_dir,
-       },
-       { .ctl_name = 0 }
-};
+void mq_put_mnt(struct ipc_namespace *ns)
+{
+       mntput(ns->mq_mnt);
+}
 
 static int __init init_mqueue_fs(void)
 {
@@ -1270,21 +1273,20 @@ static int __init init_mqueue_fs(void)
                return -ENOMEM;
 
        /* ignore failues - they are not fatal */
-       mq_sysctl_table = register_sysctl_table(mq_sysctl_root);
+       mq_sysctl_table = mq_register_sysctl_table();
 
        error = register_filesystem(&mqueue_fs_type);
        if (error)
                goto out_sysctl;
 
-       if (IS_ERR(mqueue_mnt = kern_mount(&mqueue_fs_type))) {
-               error = PTR_ERR(mqueue_mnt);
+       spin_lock_init(&mq_lock);
+
+       init_ipc_ns.mq_mnt = kern_mount_data(&mqueue_fs_type, &init_ipc_ns);
+       if (IS_ERR(init_ipc_ns.mq_mnt)) {
+               error = PTR_ERR(init_ipc_ns.mq_mnt);
                goto out_filesystem;
        }
 
-       /* internal initialization - not common for vfs */
-       queues_count = 0;
-       spin_lock_init(&mq_lock);
-
        return 0;
 
 out_filesystem:
index c82c215..f095ee2 100644 (file)
 #include <linux/security.h>
 #include <linux/slab.h>
 #include <linux/ipc.h>
+#include <linux/ipc_namespace.h>
 #include <asm/uaccess.h>
 
 #include "util.h"
 
+DEFINE_SPINLOCK(mq_lock);
+
+/*
+ * The next 2 defines are here bc this is the only file
+ * compiled when either CONFIG_SYSVIPC and CONFIG_POSIX_MQUEUE
+ * and not CONFIG_IPC_NS.
+ */
+struct ipc_namespace init_ipc_ns = {
+       .count          = ATOMIC_INIT(1),
+#ifdef CONFIG_POSIX_MQUEUE
+       .mq_queues_max   = DFLT_QUEUESMAX,
+       .mq_msg_max      = DFLT_MSGMAX,
+       .mq_msgsize_max  = DFLT_MSGSIZEMAX,
+#endif
+};
+
+atomic_t nr_ipc_ns = ATOMIC_INIT(1);
+
 struct msg_msgseg {
        struct msg_msgseg* next;
        /* the next part of the message follows immediately */
index 9171d94..4a5e752 100644 (file)
@@ -9,17 +9,26 @@
 #include <linux/rcupdate.h>
 #include <linux/nsproxy.h>
 #include <linux/slab.h>
+#include <linux/fs.h>
+#include <linux/mount.h>
 
 #include "util.h"
 
 static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns)
 {
        struct ipc_namespace *ns;
+       int err;
 
        ns = kmalloc(sizeof(struct ipc_namespace), GFP_KERNEL);
        if (ns == NULL)
                return ERR_PTR(-ENOMEM);
 
+       atomic_set(&ns->count, 1);
+       err = mq_init_ns(ns);
+       if (err) {
+               kfree(ns);
+               return ERR_PTR(err);
+       }
        atomic_inc(&nr_ipc_ns);
 
        sem_init_ns(ns);
@@ -34,7 +43,6 @@ static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns)
        ipcns_notify(IPCNS_CREATED);
        register_ipcns_notifier(ns);
 
-       kref_init(&ns->kref);
        return ns;
 }
 
@@ -84,11 +92,34 @@ void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
        up_write(&ids->rw_mutex);
 }
 
-void free_ipc_ns(struct kref *kref)
+/*
+ * put_ipc_ns - drop a reference to an ipc namespace.
+ * @ns: the namespace to put
+ *
+ * If this is the last task in the namespace exiting, and
+ * it is dropping the refcount to 0, then it can race with
+ * a task in another ipc namespace but in a mounts namespace
+ * which has this ipcns's mqueuefs mounted, doing some action
+ * with one of the mqueuefs files.  That can raise the refcount.
+ * So dropping the refcount, and raising the refcount when
+ * accessing it through the VFS, are protected with mq_lock.
+ *
+ * (Clearly, a task raising the refcount on its own ipc_ns
+ * needn't take mq_lock since it can't race with the last task
+ * in the ipcns exiting).
+ */
+void put_ipc_ns(struct ipc_namespace *ns)
 {
-       struct ipc_namespace *ns;
+       if (atomic_dec_and_lock(&ns->count, &mq_lock)) {
+               mq_clear_sbinfo(ns);
+               spin_unlock(&mq_lock);
+               mq_put_mnt(ns);
+               free_ipc_ns(ns);
+       }
+}
 
-       ns = container_of(kref, struct ipc_namespace, kref);
+void free_ipc_ns(struct ipc_namespace *ns)
+{
        /*
         * Unregistering the hotplug notifier at the beginning guarantees
         * that the ipc namespace won't be freed while we are inside the
index 7585a72..b8e4ba9 100644 (file)
@@ -47,15 +47,6 @@ struct ipc_proc_iface {
        int (*show)(struct seq_file *, void *);
 };
 
-struct ipc_namespace init_ipc_ns = {
-       .kref = {
-               .refcount       = ATOMIC_INIT(2),
-       },
-};
-
-atomic_t nr_ipc_ns = ATOMIC_INIT(1);
-
-
 #ifdef CONFIG_MEMORY_HOTPLUG
 
 static void ipc_memory_notifier(struct work_struct *work)
index 3646b45..1187332 100644 (file)
@@ -20,6 +20,15 @@ void shm_init (void);
 
 struct ipc_namespace;
 
+#ifdef CONFIG_POSIX_MQUEUE
+extern void mq_clear_sbinfo(struct ipc_namespace *ns);
+extern void mq_put_mnt(struct ipc_namespace *ns);
+#else
+static inline void mq_clear_sbinfo(struct ipc_namespace *ns) { }
+static inline void mq_put_mnt(struct ipc_namespace *ns) { }
+#endif
+
+#ifdef CONFIG_SYSVIPC
 void sem_init_ns(struct ipc_namespace *ns);
 void msg_init_ns(struct ipc_namespace *ns);
 void shm_init_ns(struct ipc_namespace *ns);
@@ -27,6 +36,15 @@ void shm_init_ns(struct ipc_namespace *ns);
 void sem_exit_ns(struct ipc_namespace *ns);
 void msg_exit_ns(struct ipc_namespace *ns);
 void shm_exit_ns(struct ipc_namespace *ns);
+#else
+static inline void sem_init_ns(struct ipc_namespace *ns) { }
+static inline void msg_init_ns(struct ipc_namespace *ns) { }
+static inline void shm_init_ns(struct ipc_namespace *ns) { }
+
+static inline void sem_exit_ns(struct ipc_namespace *ns) { }
+static inline void msg_exit_ns(struct ipc_namespace *ns) { }
+static inline void shm_exit_ns(struct ipc_namespace *ns) { }
+#endif
 
 /*
  * Structure that holds the parameters needed by the ipc operations
index bab1dff..4242366 100644 (file)
@@ -74,6 +74,7 @@ obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
 obj-$(CONFIG_KPROBES) += kprobes.o
 obj-$(CONFIG_KGDB) += kgdb.o
 obj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o
+obj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o
 obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
 obj-$(CONFIG_SECCOMP) += seccomp.o
 obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
index 6686ed1..abf9cf3 100644 (file)
@@ -837,8 +837,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
         */
        if (tsk->exit_signal != SIGCHLD && !task_detached(tsk) &&
            (tsk->parent_exec_id != tsk->real_parent->self_exec_id ||
-            tsk->self_exec_id != tsk->parent_exec_id) &&
-           !capable(CAP_KILL))
+            tsk->self_exec_id != tsk->parent_exec_id))
                tsk->exit_signal = SIGCHLD;
 
        signal = tracehook_notify_death(tsk, &cookie, group_dead);
@@ -924,6 +923,8 @@ NORET_TYPE void do_exit(long code)
                schedule();
        }
 
+       exit_irq_thread();
+
        exit_signals(tsk);  /* sets PF_EXITING */
        /*
         * tsk->flags are checked in the futex code to protect against
index 660c2b8..b9e2edd 100644 (file)
@@ -645,6 +645,9 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
 
        tsk->min_flt = tsk->maj_flt = 0;
        tsk->nvcsw = tsk->nivcsw = 0;
+#ifdef CONFIG_DETECT_HUNG_TASK
+       tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw;
+#endif
 
        tsk->mm = NULL;
        tsk->active_mm = NULL;
@@ -797,6 +800,12 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig)
        sig->cputime_expires.virt_exp = cputime_zero;
        sig->cputime_expires.sched_exp = 0;
 
+       if (sig->rlim[RLIMIT_CPU].rlim_cur != RLIM_INFINITY) {
+               sig->cputime_expires.prof_exp =
+                       secs_to_cputime(sig->rlim[RLIMIT_CPU].rlim_cur);
+               sig->cputimer.running = 1;
+       }
+
        /* The timer lists. */
        INIT_LIST_HEAD(&sig->cpu_timers[0]);
        INIT_LIST_HEAD(&sig->cpu_timers[1]);
@@ -812,11 +821,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
                atomic_inc(&current->signal->live);
                return 0;
        }
-       sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
-
-       if (sig)
-               posix_cpu_timers_init_group(sig);
 
+       sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
        tsk->signal = sig;
        if (!sig)
                return -ENOMEM;
@@ -856,6 +862,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
        memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
        task_unlock(current->group_leader);
 
+       posix_cpu_timers_init_group(sig);
+
        acct_init_pacct(&sig->pacct);
 
        tty_audit_fork(sig);
@@ -1032,11 +1040,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 
        p->default_timer_slack_ns = current->timer_slack_ns;
 
-#ifdef CONFIG_DETECT_SOFTLOCKUP
-       p->last_switch_count = 0;
-       p->last_switch_timestamp = 0;
-#endif
-
        task_io_accounting_init(&p->ioac);
        acct_clear_integrals(p);
 
index 6b50a02..eef8cd2 100644 (file)
@@ -883,7 +883,12 @@ retry_private:
 out_unlock:
        double_unlock_hb(hb1, hb2);
 
-       /* drop_futex_key_refs() must be called outside the spinlocks. */
+       /*
+        * drop_futex_key_refs() must be called outside the spinlocks. During
+        * the requeue we moved futex_q's from the hash bucket at key1 to the
+        * one at key2 and updated their key pointer.  We no longer need to
+        * hold the references to key1.
+        */
        while (--drop_count >= 0)
                drop_futex_key_refs(&key1);
 
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
new file mode 100644 (file)
index 0000000..022a492
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * Detect Hung Task
+ *
+ * kernel/hung_task.c - kernel thread for detecting tasks stuck in D state
+ *
+ */
+
+#include <linux/mm.h>
+#include <linux/cpu.h>
+#include <linux/nmi.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/freezer.h>
+#include <linux/kthread.h>
+#include <linux/lockdep.h>
+#include <linux/module.h>
+#include <linux/sysctl.h>
+
+/*
+ * The number of tasks checked:
+ */
+unsigned long __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
+
+/*
+ * Limit number of tasks checked in a batch.
+ *
+ * This value controls the preemptibility of khungtaskd since preemption
+ * is disabled during the critical section. It also controls the size of
+ * the RCU grace period. So it needs to be upper-bound.
+ */
+#define HUNG_TASK_BATCHING 1024
+
+/*
+ * Zero means infinite timeout - no checking done:
+ */
+unsigned long __read_mostly sysctl_hung_task_timeout_secs = 120;
+
+unsigned long __read_mostly sysctl_hung_task_warnings = 10;
+
+static int __read_mostly did_panic;
+
+static struct task_struct *watchdog_task;
+
+/*
+ * Should we panic (and reboot, if panic_timeout= is set) when a
+ * hung task is detected:
+ */
+unsigned int __read_mostly sysctl_hung_task_panic =
+                               CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE;
+
+static int __init hung_task_panic_setup(char *str)
+{
+       sysctl_hung_task_panic = simple_strtoul(str, NULL, 0);
+
+       return 1;
+}
+__setup("hung_task_panic=", hung_task_panic_setup);
+
+static int
+hung_task_panic(struct notifier_block *this, unsigned long event, void *ptr)
+{
+       did_panic = 1;
+
+       return NOTIFY_DONE;
+}
+
+static struct notifier_block panic_block = {
+       .notifier_call = hung_task_panic,
+};
+
+static void check_hung_task(struct task_struct *t, unsigned long timeout)
+{
+       unsigned long switch_count = t->nvcsw + t->nivcsw;
+
+       /*
+        * Ensure the task is not frozen.
+        * Also, when a freshly created task is scheduled once, changes
+        * its state to TASK_UNINTERRUPTIBLE without having ever been
+        * switched out once, it musn't be checked.
+        */
+       if (unlikely(t->flags & PF_FROZEN || !switch_count))
+               return;
+
+       if (switch_count != t->last_switch_count) {
+               t->last_switch_count = switch_count;
+               return;
+       }
+       if (!sysctl_hung_task_warnings)
+               return;
+       sysctl_hung_task_warnings--;
+
+       /*
+        * Ok, the task did not get scheduled for more than 2 minutes,
+        * complain:
+        */
+       printk(KERN_ERR "INFO: task %s:%d blocked for more than "
+                       "%ld seconds.\n", t->comm, t->pid, timeout);
+       printk(KERN_ERR "\"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\""
+                       " disables this message.\n");
+       sched_show_task(t);
+       __debug_show_held_locks(t);
+
+       touch_nmi_watchdog();
+
+       if (sysctl_hung_task_panic)
+               panic("hung_task: blocked tasks");
+}
+
+/*
+ * To avoid extending the RCU grace period for an unbounded amount of time,
+ * periodically exit the critical section and enter a new one.
+ *
+ * For preemptible RCU it is sufficient to call rcu_read_unlock in order
+ * exit the grace period. For classic RCU, a reschedule is required.
+ */
+static void rcu_lock_break(struct task_struct *g, struct task_struct *t)
+{
+       get_task_struct(g);
+       get_task_struct(t);
+       rcu_read_unlock();
+       cond_resched();
+       rcu_read_lock();
+       put_task_struct(t);
+       put_task_struct(g);
+}
+
+/*
+ * Check whether a TASK_UNINTERRUPTIBLE does not get woken up for
+ * a really long time (120 seconds). If that happens, print out
+ * a warning.
+ */
+static void check_hung_uninterruptible_tasks(unsigned long timeout)
+{
+       int max_count = sysctl_hung_task_check_count;
+       int batch_count = HUNG_TASK_BATCHING;
+       struct task_struct *g, *t;
+
+       /*
+        * If the system crashed already then all bets are off,
+        * do not report extra hung tasks:
+        */
+       if (test_taint(TAINT_DIE) || did_panic)
+               return;
+
+       rcu_read_lock();
+       do_each_thread(g, t) {
+               if (!--max_count)
+                       goto unlock;
+               if (!--batch_count) {
+                       batch_count = HUNG_TASK_BATCHING;
+                       rcu_lock_break(g, t);
+                       /* Exit if t or g was unhashed during refresh. */
+                       if (t->state == TASK_DEAD || g->state == TASK_DEAD)
+                               goto unlock;
+               }
+               /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
+               if (t->state == TASK_UNINTERRUPTIBLE)
+                       check_hung_task(t, timeout);
+       } while_each_thread(g, t);
+ unlock:
+       rcu_read_unlock();
+}
+
+static unsigned long timeout_jiffies(unsigned long timeout)
+{
+       /* timeout of 0 will disable the watchdog */
+       return timeout ? timeout * HZ : MAX_SCHEDULE_TIMEOUT;
+}
+
+/*
+ * Process updating of timeout sysctl
+ */
+int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
+                                 struct file *filp, void __user *buffer,
+                                 size_t *lenp, loff_t *ppos)
+{
+       int ret;
+
+       ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);
+
+       if (ret || !write)
+               goto out;
+
+       wake_up_process(watchdog_task);
+
+ out:
+       return ret;
+}
+
+/*
+ * kthread which checks for tasks stuck in D state
+ */
+static int watchdog(void *dummy)
+{
+       set_user_nice(current, 0);
+
+       for ( ; ; ) {
+               unsigned long timeout = sysctl_hung_task_timeout_secs;
+
+               while (schedule_timeout_interruptible(timeout_jiffies(timeout)))
+                       timeout = sysctl_hung_task_timeout_secs;
+
+               check_hung_uninterruptible_tasks(timeout);
+       }
+
+       return 0;
+}
+
+static int __init hung_task_init(void)
+{
+       atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
+       watchdog_task = kthread_run(watchdog, NULL, "khungtaskd");
+
+       return 0;
+}
+
+module_init(hung_task_init);
index 38a25b8..d06df9c 100644 (file)
@@ -26,10 +26,12 @@ static int devm_irq_match(struct device *dev, void *res, void *data)
 }
 
 /**
- *     devm_request_irq - allocate an interrupt line for a managed device
+ *     devm_request_threaded_irq - allocate an interrupt line for a managed device
  *     @dev: device to request interrupt for
  *     @irq: Interrupt line to allocate
  *     @handler: Function to be called when the IRQ occurs
+ *     @thread_fn: function to be called in a threaded interrupt context. NULL
+ *                 for devices which handle everything in @handler
  *     @irqflags: Interrupt type flags
  *     @devname: An ascii name for the claiming device
  *     @dev_id: A cookie passed back to the handler function
@@ -42,9 +44,10 @@ static int devm_irq_match(struct device *dev, void *res, void *data)
  *     If an IRQ allocated with this function needs to be freed
  *     separately, dev_free_irq() must be used.
  */
-int devm_request_irq(struct device *dev, unsigned int irq,
-                    irq_handler_t handler, unsigned long irqflags,
-                    const char *devname, void *dev_id)
+int devm_request_threaded_irq(struct device *dev, unsigned int irq,
+                             irq_handler_t handler, irq_handler_t thread_fn,
+                             unsigned long irqflags, const char *devname,
+                             void *dev_id)
 {
        struct irq_devres *dr;
        int rc;
@@ -54,7 +57,8 @@ int devm_request_irq(struct device *dev, unsigned int irq,
        if (!dr)
                return -ENOMEM;
 
-       rc = request_irq(irq, handler, irqflags, devname, dev_id);
+       rc = request_threaded_irq(irq, handler, thread_fn, irqflags, devname,
+                                 dev_id);
        if (rc) {
                devres_free(dr);
                return rc;
@@ -66,7 +70,7 @@ int devm_request_irq(struct device *dev, unsigned int irq,
 
        return 0;
 }
-EXPORT_SYMBOL(devm_request_irq);
+EXPORT_SYMBOL(devm_request_threaded_irq);
 
 /**
  *     devm_free_irq - free an interrupt
index 343acec..d82142b 100644 (file)
@@ -339,6 +339,15 @@ irqreturn_t no_action(int cpl, void *dev_id)
        return IRQ_NONE;
 }
 
+static void warn_no_thread(unsigned int irq, struct irqaction *action)
+{
+       if (test_and_set_bit(IRQTF_WARNED, &action->thread_flags))
+               return;
+
+       printk(KERN_WARNING "IRQ %d device %s returned IRQ_WAKE_THREAD "
+              "but no thread function available.", irq, action->name);
+}
+
 DEFINE_TRACE(irq_handler_entry);
 DEFINE_TRACE(irq_handler_exit);
 
@@ -363,8 +372,47 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
                trace_irq_handler_entry(irq, action);
                ret = action->handler(irq, action->dev_id);
                trace_irq_handler_exit(irq, action, ret);
-               if (ret == IRQ_HANDLED)
+
+               switch (ret) {
+               case IRQ_WAKE_THREAD:
+                       /*
+                        * Set result to handled so the spurious check
+                        * does not trigger.
+                        */
+                       ret = IRQ_HANDLED;
+
+                       /*
+                        * Catch drivers which return WAKE_THREAD but
+                        * did not set up a thread function
+                        */
+                       if (unlikely(!action->thread_fn)) {
+                               warn_no_thread(irq, action);
+                               break;
+                       }
+
+                       /*
+                        * Wake up the handler thread for this
+                        * action. In case the thread crashed and was
+                        * killed we just pretend that we handled the
+                        * interrupt. The hardirq handler above has
+                        * disabled the device interrupt, so no irq
+                        * storm is lurking.
+                        */
+                       if (likely(!test_bit(IRQTF_DIED,
+                                            &action->thread_flags))) {
+                               set_bit(IRQTF_RUNTHREAD, &action->thread_flags);
+                               wake_up_process(action->thread);
+                       }
+
+                       /* Fall through to add to randomness */
+               case IRQ_HANDLED:
                        status |= action->flags;
+                       break;
+
+               default:
+                       break;
+               }
+
                retval |= ret;
                action = action->next;
        } while (action);
index 1516ab7..7e2e7dd 100644 (file)
@@ -8,16 +8,15 @@
  */
 
 #include <linux/irq.h>
+#include <linux/kthread.h>
 #include <linux/module.h>
 #include <linux/random.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
+#include <linux/sched.h>
 
 #include "internals.h"
 
-#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS)
-cpumask_var_t irq_default_affinity;
-
 /**
  *     synchronize_irq - wait for pending IRQ handlers (on other CPUs)
  *     @irq: interrupt number to wait for
@@ -53,9 +52,18 @@ void synchronize_irq(unsigned int irq)
 
                /* Oops, that failed? */
        } while (status & IRQ_INPROGRESS);
+
+       /*
+        * We made sure that no hardirq handler is running. Now verify
+        * that no threaded handlers are active.
+        */
+       wait_event(desc->wait_for_threads, !atomic_read(&desc->threads_active));
 }
 EXPORT_SYMBOL(synchronize_irq);
 
+#ifdef CONFIG_SMP
+cpumask_var_t irq_default_affinity;
+
 /**
  *     irq_can_set_affinity - Check if the affinity of a given irq can be set
  *     @irq:           Interrupt to check
@@ -72,6 +80,18 @@ int irq_can_set_affinity(unsigned int irq)
        return 1;
 }
 
+static void
+irq_set_thread_affinity(struct irq_desc *desc, const struct cpumask *cpumask)
+{
+       struct irqaction *action = desc->action;
+
+       while (action) {
+               if (action->thread)
+                       set_cpus_allowed_ptr(action->thread, cpumask);
+               action = action->next;
+       }
+}
+
 /**
  *     irq_set_affinity - Set the irq affinity of a given irq
  *     @irq:           Interrupt to set affinity
@@ -100,6 +120,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
        cpumask_copy(desc->affinity, cpumask);
        desc->chip->set_affinity(irq, cpumask);
 #endif
+       irq_set_thread_affinity(desc, cpumask);
        desc->status |= IRQ_AFFINITY_SET;
        spin_unlock_irqrestore(&desc->lock, flags);
        return 0;
@@ -150,6 +171,8 @@ int irq_select_affinity_usr(unsigned int irq)
 
        spin_lock_irqsave(&desc->lock, flags);
        ret = setup_affinity(irq, desc);
+       if (!ret)
+               irq_set_thread_affinity(desc, desc->affinity);
        spin_unlock_irqrestore(&desc->lock, flags);
 
        return ret;
@@ -401,6 +424,90 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
        return ret;
 }
 
+static int irq_wait_for_interrupt(struct irqaction *action)
+{
+       while (!kthread_should_stop()) {
+               set_current_state(TASK_INTERRUPTIBLE);
+
+               if (test_and_clear_bit(IRQTF_RUNTHREAD,
+                                      &action->thread_flags)) {
+                       __set_current_state(TASK_RUNNING);
+                       return 0;
+               }
+               schedule();
+       }
+       return -1;
+}
+
+/*
+ * Interrupt handler thread
+ */
+static int irq_thread(void *data)
+{
+       struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO/2, };
+       struct irqaction *action = data;
+       struct irq_desc *desc = irq_to_desc(action->irq);
+       int wake;
+
+       sched_setscheduler(current, SCHED_FIFO, &param);
+       current->irqaction = action;
+
+       while (!irq_wait_for_interrupt(action)) {
+
+               atomic_inc(&desc->threads_active);
+
+               spin_lock_irq(&desc->lock);
+               if (unlikely(desc->status & IRQ_DISABLED)) {
+                       /*
+                        * CHECKME: We might need a dedicated
+                        * IRQ_THREAD_PENDING flag here, which
+                        * retriggers the thread in check_irq_resend()
+                        * but AFAICT IRQ_PENDING should be fine as it
+                        * retriggers the interrupt itself --- tglx
+                        */
+                       desc->status |= IRQ_PENDING;
+                       spin_unlock_irq(&desc->lock);
+               } else {
+                       spin_unlock_irq(&desc->lock);
+
+                       action->thread_fn(action->irq, action->dev_id);
+               }
+
+               wake = atomic_dec_and_test(&desc->threads_active);
+
+               if (wake && waitqueue_active(&desc->wait_for_threads))
+                       wake_up(&desc->wait_for_threads);
+       }
+
+       /*
+        * Clear irqaction. Otherwise exit_irq_thread() would make
+        * fuzz about an active irq thread going into nirvana.
+        */
+       current->irqaction = NULL;
+       return 0;
+}
+
+/*
+ * Called from do_exit()
+ */
+void exit_irq_thread(void)
+{
+       struct task_struct *tsk = current;
+
+       if (!tsk->irqaction)
+               return;
+
+       printk(KERN_ERR
+              "exiting task \"%s\" (%d) is an active IRQ thread (irq %d)\n",
+              tsk->comm ? tsk->comm : "", tsk->pid, tsk->irqaction->irq);
+
+       /*
+        * Set the THREAD DIED flag to prevent further wakeups of the
+        * soon to be gone threaded handler.
+        */
+       set_bit(IRQTF_DIED, &tsk->irqaction->flags);
+}
+
 /*
  * Internal function to register an irqaction - typically used to
  * allocate special interrupts that are part of the architecture.
@@ -437,6 +544,26 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
        }
 
        /*
+        * Threaded handler ?
+        */
+       if (new->thread_fn) {
+               struct task_struct *t;
+
+               t = kthread_create(irq_thread, new, "irq/%d-%s", irq,
+                                  new->name);
+               if (IS_ERR(t))
+                       return PTR_ERR(t);
+               /*
+                * We keep the reference to the task struct even if
+                * the thread dies to avoid that the interrupt code
+                * references an already freed task_struct.
+                */
+               get_task_struct(t);
+               new->thread = t;
+               wake_up_process(t);
+       }
+
+       /*
         * The following block of code has to be executed atomically
         */
        spin_lock_irqsave(&desc->lock, flags);
@@ -473,15 +600,15 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
        if (!shared) {
                irq_chip_set_defaults(desc->chip);
 
+               init_waitqueue_head(&desc->wait_for_threads);
+
                /* Setup the type (level, edge polarity) if configured: */
                if (new->flags & IRQF_TRIGGER_MASK) {
                        ret = __irq_set_trigger(desc, irq,
                                        new->flags & IRQF_TRIGGER_MASK);
 
-                       if (ret) {
-                               spin_unlock_irqrestore(&desc->lock, flags);
-                               return ret;
-                       }
+                       if (ret)
+                               goto out_thread;
                } else
                        compat_irq_chip_set_default_handler(desc);
 #if defined(CONFIG_IRQ_PER_CPU)
@@ -549,8 +676,19 @@ mismatch:
                dump_stack();
        }
 #endif
+       ret = -EBUSY;
+
+out_thread:
        spin_unlock_irqrestore(&desc->lock, flags);
-       return -EBUSY;
+       if (new->thread) {
+               struct task_struct *t = new->thread;
+
+               new->thread = NULL;
+               if (likely(!test_bit(IRQTF_DIED, &new->thread_flags)))
+                       kthread_stop(t);
+               put_task_struct(t);
+       }
+       return ret;
 }
 
 /**
@@ -576,6 +714,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
 {
        struct irq_desc *desc = irq_to_desc(irq);
        struct irqaction *action, **action_ptr;
+       struct task_struct *irqthread;
        unsigned long flags;
 
        WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq);
@@ -622,6 +761,10 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
                else
                        desc->chip->disable(irq);
        }
+
+       irqthread = action->thread;
+       action->thread = NULL;
+
        spin_unlock_irqrestore(&desc->lock, flags);
 
        unregister_handler_proc(irq, action);
@@ -629,6 +772,12 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
        /* Make sure it's not being used on another CPU: */
        synchronize_irq(irq);
 
+       if (irqthread) {
+               if (!test_bit(IRQTF_DIED, &action->thread_flags))
+                       kthread_stop(irqthread);
+               put_task_struct(irqthread);
+       }
+
 #ifdef CONFIG_DEBUG_SHIRQ
        /*
         * It's a shared IRQ -- the driver ought to be prepared for an IRQ
@@ -681,9 +830,12 @@ void free_irq(unsigned int irq, void *dev_id)
 EXPORT_SYMBOL(free_irq);
 
 /**
- *     request_irq - allocate an interrupt line
+ *     request_threaded_irq - allocate an interrupt line
  *     @irq: Interrupt line to allocate
- *     @handler: Function to be called when the IRQ occurs
+ *     @handler: Function to be called when the IRQ occurs.
+ *               Primary handler for threaded interrupts
+ *     @thread_fn: Function called from the irq handler thread
+ *                 If NULL, no irq thread is created
  *     @irqflags: Interrupt type flags
  *     @devname: An ascii name for the claiming device
  *     @dev_id: A cookie passed back to the handler function
@@ -695,6 +847,15 @@ EXPORT_SYMBOL(free_irq);
  *     raises, you must take care both to initialise your hardware
  *     and to set up the interrupt handler in the right order.
  *
+ *     If you want to set up a threaded irq handler for your device
+ *     then you need to supply @handler and @thread_fn. @handler ist
+ *     still called in hard interrupt context and has to check
+ *     whether the interrupt originates from the device. If yes it
+ *     needs to disable the interrupt on the device and return
+ *     IRQ_THREAD_WAKE which will wake up the handler thread and run
+ *     @thread_fn. This split handler design is necessary to support
+ *     shared interrupts.
+ *
  *     Dev_id must be globally unique. Normally the address of the
  *     device data structure is used as the cookie. Since the handler
  *     receives this value it makes sense to use it.
@@ -710,8 +871,9 @@ EXPORT_SYMBOL(free_irq);
  *     IRQF_TRIGGER_*          Specify active edge(s) or level
  *
  */
-int request_irq(unsigned int irq, irq_handler_t handler,
-               unsigned long irqflags, const char *devname, void *dev_id)
+int request_threaded_irq(unsigned int irq, irq_handler_t handler,
+                        irq_handler_t thread_fn, unsigned long irqflags,
+                        const char *devname, void *dev_id)
 {
        struct irqaction *action;
        struct irq_desc *desc;
@@ -759,6 +921,7 @@ int request_irq(unsigned int irq, irq_handler_t handler,
                return -ENOMEM;
 
        action->handler = handler;
+       action->thread_fn = thread_fn;
        action->flags = irqflags;
        action->name = devname;
        action->dev_id = dev_id;
@@ -788,4 +951,4 @@ int request_irq(unsigned int irq, irq_handler_t handler,
 #endif
        return retval;
 }
-EXPORT_SYMBOL(request_irq);
+EXPORT_SYMBOL(request_threaded_irq);
index 243d612..44bbdcb 100644 (file)
@@ -54,6 +54,7 @@ static bool init_copy_one_irq_desc(int irq, struct irq_desc *old_desc,
 static void free_one_irq_desc(struct irq_desc *old_desc, struct irq_desc *desc)
 {
        free_kstat_irqs(old_desc, desc);
+       free_desc_masks(old_desc, desc);
        arch_free_chip_data(old_desc, desc);
 }
 
index 5016bfb..a5e74dd 100644 (file)
@@ -68,7 +68,7 @@ static struct hlist_head kprobe_table[KPROBE_TABLE_SIZE];
 static struct hlist_head kretprobe_inst_table[KPROBE_TABLE_SIZE];
 
 /* NOTE: change this value only with kprobe_mutex held */
-static bool kprobe_enabled;
+static bool kprobes_all_disarmed;
 
 static DEFINE_MUTEX(kprobe_mutex);     /* Protects kprobe_table */
 static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL;
@@ -328,7 +328,7 @@ static int __kprobes aggr_pre_handler(struct kprobe *p, struct pt_regs *regs)
        struct kprobe *kp;
 
        list_for_each_entry_rcu(kp, &p->list, list) {
-               if (kp->pre_handler && !kprobe_gone(kp)) {
+               if (kp->pre_handler && likely(!kprobe_disabled(kp))) {
                        set_kprobe_instance(kp);
                        if (kp->pre_handler(kp, regs))
                                return 1;
@@ -344,7 +344,7 @@ static void __kprobes aggr_post_handler(struct kprobe *p, struct pt_regs *regs,
        struct kprobe *kp;
 
        list_for_each_entry_rcu(kp, &p->list, list) {
-               if (kp->post_handler && !kprobe_gone(kp)) {
+               if (kp->post_handler && likely(!kprobe_disabled(kp))) {
                        set_kprobe_instance(kp);
                        kp->post_handler(kp, regs, flags);
                        reset_kprobe_instance();
@@ -518,20 +518,28 @@ static inline void copy_kprobe(struct kprobe *old_p, struct kprobe *p)
 }
 
 /*
-* Add the new probe to old_p->list. Fail if this is the
+* Add the new probe to ap->list. Fail if this is the
 * second jprobe at the address - two jprobes can't coexist
 */
-static int __kprobes add_new_kprobe(struct kprobe *old_p, struct kprobe *p)
+static int __kprobes add_new_kprobe(struct kprobe *ap, struct kprobe *p)
 {
+       BUG_ON(kprobe_gone(ap) || kprobe_gone(p));
        if (p->break_handler) {
-               if (old_p->break_handler)
+               if (ap->break_handler)
                        return -EEXIST;
-               list_add_tail_rcu(&p->list, &old_p->list);
-               old_p->break_handler = aggr_break_handler;
+               list_add_tail_rcu(&p->list, &ap->list);
+               ap->break_handler = aggr_break_handler;
        } else
-               list_add_rcu(&p->list, &old_p->list);
-       if (p->post_handler && !old_p->post_handler)
-               old_p->post_handler = aggr_post_handler;
+               list_add_rcu(&p->list, &ap->list);
+       if (p->post_handler && !ap->post_handler)
+               ap->post_handler = aggr_post_handler;
+
+       if (kprobe_disabled(ap) && !kprobe_disabled(p)) {
+               ap->flags &= ~KPROBE_FLAG_DISABLED;
+               if (!kprobes_all_disarmed)
+                       /* Arm the breakpoint again. */
+                       arch_arm_kprobe(ap);
+       }
        return 0;
 }
 
@@ -544,6 +552,7 @@ static inline void add_aggr_kprobe(struct kprobe *ap, struct kprobe *p)
        copy_kprobe(p, ap);
        flush_insn_slot(ap);
        ap->addr = p->addr;
+       ap->flags = p->flags;
        ap->pre_handler = aggr_pre_handler;
        ap->fault_handler = aggr_fault_handler;
        /* We don't care the kprobe which has gone. */
@@ -566,44 +575,59 @@ static int __kprobes register_aggr_kprobe(struct kprobe *old_p,
                                          struct kprobe *p)
 {
        int ret = 0;
-       struct kprobe *ap;
+       struct kprobe *ap = old_p;
 
-       if (kprobe_gone(old_p)) {
+       if (old_p->pre_handler != aggr_pre_handler) {
+               /* If old_p is not an aggr_probe, create new aggr_kprobe. */
+               ap = kzalloc(sizeof(struct kprobe), GFP_KERNEL);
+               if (!ap)
+                       return -ENOMEM;
+               add_aggr_kprobe(ap, old_p);
+       }
+
+       if (kprobe_gone(ap)) {
                /*
                 * Attempting to insert new probe at the same location that
                 * had a probe in the module vaddr area which already
                 * freed. So, the instruction slot has already been
                 * released. We need a new slot for the new probe.
                 */
-               ret = arch_prepare_kprobe(old_p);
+               ret = arch_prepare_kprobe(ap);
                if (ret)
+                       /*
+                        * Even if fail to allocate new slot, don't need to
+                        * free aggr_probe. It will be used next time, or
+                        * freed by unregister_kprobe.
+                        */
                        return ret;
-       }
-       if (old_p->pre_handler == aggr_pre_handler) {
-               copy_kprobe(old_p, p);
-               ret = add_new_kprobe(old_p, p);
-               ap = old_p;
-       } else {
-               ap = kzalloc(sizeof(struct kprobe), GFP_KERNEL);
-               if (!ap) {
-                       if (kprobe_gone(old_p))
-                               arch_remove_kprobe(old_p);
-                       return -ENOMEM;
-               }
-               add_aggr_kprobe(ap, old_p);
-               copy_kprobe(ap, p);
-               ret = add_new_kprobe(ap, p);
-       }
-       if (kprobe_gone(old_p)) {
+
                /*
-                * If the old_p has gone, its breakpoint has been disarmed.
-                * We have to arm it again after preparing real kprobes.
+                * Clear gone flag to prevent allocating new slot again, and
+                * set disabled flag because it is not armed yet.
                 */
-               ap->flags &= ~KPROBE_FLAG_GONE;
-               if (kprobe_enabled)
-                       arch_arm_kprobe(ap);
+               ap->flags = (ap->flags & ~KPROBE_FLAG_GONE)
+                           | KPROBE_FLAG_DISABLED;
        }
-       return ret;
+
+       copy_kprobe(ap, p);
+       return add_new_kprobe(ap, p);
+}
+
+/* Try to disable aggr_kprobe, and return 1 if succeeded.*/
+static int __kprobes try_to_disable_aggr_kprobe(struct kprobe *p)
+{
+       struct kprobe *kp;
+
+       list_for_each_entry_rcu(kp, &p->list, list) {
+               if (!kprobe_disabled(kp))
+                       /*
+                        * There is an active probe on the list.
+                        * We can't disable aggr_kprobe.
+                        */
+                       return 0;
+       }
+       p->flags |= KPROBE_FLAG_DISABLED;
+       return 1;
 }
 
 static int __kprobes in_kprobes_functions(unsigned long addr)
@@ -664,7 +688,9 @@ int __kprobes register_kprobe(struct kprobe *p)
                return -EINVAL;
        }
 
-       p->flags = 0;
+       /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */
+       p->flags &= KPROBE_FLAG_DISABLED;
+
        /*
         * Check if are we probing a module.
         */
@@ -709,7 +735,7 @@ int __kprobes register_kprobe(struct kprobe *p)
        hlist_add_head_rcu(&p->hlist,
                       &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]);
 
-       if (kprobe_enabled)
+       if (!kprobes_all_disarmed && !kprobe_disabled(p))
                arch_arm_kprobe(p);
 
 out_unlock_text:
@@ -722,26 +748,39 @@ out:
 
        return ret;
 }
+EXPORT_SYMBOL_GPL(register_kprobe);
 
-/*
- * Unregister a kprobe without a scheduler synchronization.
- */
-static int __kprobes __unregister_kprobe_top(struct kprobe *p)
+/* Check passed kprobe is valid and return kprobe in kprobe_table. */
+static struct kprobe * __kprobes __get_valid_kprobe(struct kprobe *p)
 {
        struct kprobe *old_p, *list_p;
 
        old_p = get_kprobe(p->addr);
        if (unlikely(!old_p))
-               return -EINVAL;
+               return NULL;
 
        if (p != old_p) {
                list_for_each_entry_rcu(list_p, &old_p->list, list)
                        if (list_p == p)
                        /* kprobe p is a valid probe */
-                               goto valid_p;
-               return -EINVAL;
+                               goto valid;
+               return NULL;
        }
-valid_p:
+valid:
+       return old_p;
+}
+
+/*
+ * Unregister a kprobe without a scheduler synchronization.
+ */
+static int __kprobes __unregister_kprobe_top(struct kprobe *p)
+{
+       struct kprobe *old_p, *list_p;
+
+       old_p = __get_valid_kprobe(p);
+       if (old_p == NULL)
+               return -EINVAL;
+
        if (old_p == p ||
            (old_p->pre_handler == aggr_pre_handler &&
             list_is_singular(&old_p->list))) {
@@ -750,7 +789,7 @@ valid_p:
                 * enabled and not gone - otherwise, the breakpoint would
                 * already have been removed. We save on flushing icache.
                 */
-               if (kprobe_enabled && !kprobe_gone(old_p)) {
+               if (!kprobes_all_disarmed && !kprobe_disabled(old_p)) {
                        mutex_lock(&text_mutex);
                        arch_disarm_kprobe(p);
                        mutex_unlock(&text_mutex);
@@ -768,6 +807,11 @@ valid_p:
                }
 noclean:
                list_del_rcu(&p->list);
+               if (!kprobe_disabled(old_p)) {
+                       try_to_disable_aggr_kprobe(old_p);
+                       if (!kprobes_all_disarmed && kprobe_disabled(old_p))
+                               arch_disarm_kprobe(old_p);
+               }
        }
        return 0;
 }
@@ -803,11 +847,13 @@ int __kprobes register_kprobes(struct kprobe **kps, int num)
        }
        return ret;
 }
+EXPORT_SYMBOL_GPL(register_kprobes);
 
 void __kprobes unregister_kprobe(struct kprobe *p)
 {
        unregister_kprobes(&p, 1);
 }
+EXPORT_SYMBOL_GPL(unregister_kprobe);
 
 void __kprobes unregister_kprobes(struct kprobe **kps, int num)
 {
@@ -826,6 +872,7 @@ void __kprobes unregister_kprobes(struct kprobe **kps, int num)
                if (kps[i]->addr)
                        __unregister_kprobe_bottom(kps[i]);
 }
+EXPORT_SYMBOL_GPL(unregister_kprobes);
 
 static struct notifier_block kprobe_exceptions_nb = {
        .notifier_call = kprobe_exceptions_notify,
@@ -865,16 +912,19 @@ int __kprobes register_jprobes(struct jprobe **jps, int num)
        }
        return ret;
 }
+EXPORT_SYMBOL_GPL(register_jprobes);
 
 int __kprobes register_jprobe(struct jprobe *jp)
 {
        return register_jprobes(&jp, 1);
 }
+EXPORT_SYMBOL_GPL(register_jprobe);
 
 void __kprobes unregister_jprobe(struct jprobe *jp)
 {
        unregister_jprobes(&jp, 1);
 }
+EXPORT_SYMBOL_GPL(unregister_jprobe);
 
 void __kprobes unregister_jprobes(struct jprobe **jps, int num)
 {
@@ -894,6 +944,7 @@ void __kprobes unregister_jprobes(struct jprobe **jps, int num)
                        __unregister_kprobe_bottom(&jps[i]->kp);
        }
 }
+EXPORT_SYMBOL_GPL(unregister_jprobes);
 
 #ifdef CONFIG_KRETPROBES
 /*
@@ -987,6 +1038,7 @@ int __kprobes register_kretprobe(struct kretprobe *rp)
                free_rp_inst(rp);
        return ret;
 }
+EXPORT_SYMBOL_GPL(register_kretprobe);
 
 int __kprobes register_kretprobes(struct kretprobe **rps, int num)
 {
@@ -1004,11 +1056,13 @@ int __kprobes register_kretprobes(struct kretprobe **rps, int num)
        }
        return ret;
 }
+EXPORT_SYMBOL_GPL(register_kretprobes);
 
 void __kprobes unregister_kretprobe(struct kretprobe *rp)
 {
        unregister_kretprobes(&rp, 1);
 }
+EXPORT_SYMBOL_GPL(unregister_kretprobe);
 
 void __kprobes unregister_kretprobes(struct kretprobe **rps, int num)
 {
@@ -1030,24 +1084,30 @@ void __kprobes unregister_kretprobes(struct kretprobe **rps, int num)
                }
        }
 }
+EXPORT_SYMBOL_GPL(unregister_kretprobes);
 
 #else /* CONFIG_KRETPROBES */
 int __kprobes register_kretprobe(struct kretprobe *rp)
 {
        return -ENOSYS;
 }
+EXPORT_SYMBOL_GPL(register_kretprobe);
 
 int __kprobes register_kretprobes(struct kretprobe **rps, int num)
 {
        return -ENOSYS;
 }
+EXPORT_SYMBOL_GPL(register_kretprobes);
+
 void __kprobes unregister_kretprobe(struct kretprobe *rp)
 {
 }
+EXPORT_SYMBOL_GPL(unregister_kretprobe);
 
 void __kprobes unregister_kretprobes(struct kretprobe **rps, int num)
 {
 }
+EXPORT_SYMBOL_GPL(unregister_kretprobes);
 
 static int __kprobes pre_handler_kretprobe(struct kprobe *p,
                                           struct pt_regs *regs)
@@ -1061,6 +1121,7 @@ static int __kprobes pre_handler_kretprobe(struct kprobe *p,
 static void __kprobes kill_kprobe(struct kprobe *p)
 {
        struct kprobe *kp;
+
        p->flags |= KPROBE_FLAG_GONE;
        if (p->pre_handler == aggr_pre_handler) {
                /*
@@ -1173,8 +1234,8 @@ static int __init init_kprobes(void)
                }
        }
 
-       /* By default, kprobes are enabled */
-       kprobe_enabled = true;
+       /* By default, kprobes are armed */
+       kprobes_all_disarmed = false;
 
        err = arch_init_kprobes();
        if (!err)
@@ -1202,12 +1263,18 @@ static void __kprobes report_probe(struct seq_file *pi, struct kprobe *p,
        else
                kprobe_type = "k";
        if (sym)
-               seq_printf(pi, "%p  %s  %s+0x%x  %s %s\n", p->addr, kprobe_type,
-                       sym, offset, (modname ? modname : " "),
-                       (kprobe_gone(p) ? "[GONE]" : ""));
+               seq_printf(pi, "%p  %s  %s+0x%x  %s %s%s\n",
+                       p->addr, kprobe_type, sym, offset,
+                       (modname ? modname : " "),
+                       (kprobe_gone(p) ? "[GONE]" : ""),
+                       ((kprobe_disabled(p) && !kprobe_gone(p)) ?
+                        "[DISABLED]" : ""));
        else
-               seq_printf(pi, "%p  %s  %p %s\n", p->addr, kprobe_type, p->addr,
-                       (kprobe_gone(p) ? "[GONE]" : ""));
+               seq_printf(pi, "%p  %s  %p %s%s\n",
+                       p->addr, kprobe_type, p->addr,
+                       (kprobe_gone(p) ? "[GONE]" : ""),
+                       ((kprobe_disabled(p) && !kprobe_gone(p)) ?
+                        "[DISABLED]" : ""));
 }
 
 static void __kprobes *kprobe_seq_start(struct seq_file *f, loff_t *pos)
@@ -1272,7 +1339,72 @@ static struct file_operations debugfs_kprobes_operations = {
        .release        = seq_release,
 };
 
-static void __kprobes enable_all_kprobes(void)
+/* Disable one kprobe */
+int __kprobes disable_kprobe(struct kprobe *kp)
+{
+       int ret = 0;
+       struct kprobe *p;
+
+       mutex_lock(&kprobe_mutex);
+
+       /* Check whether specified probe is valid. */
+       p = __get_valid_kprobe(kp);
+       if (unlikely(p == NULL)) {
+               ret = -EINVAL;
+               goto out;
+       }
+
+       /* If the probe is already disabled (or gone), just return */
+       if (kprobe_disabled(kp))
+               goto out;
+
+       kp->flags |= KPROBE_FLAG_DISABLED;
+       if (p != kp)
+               /* When kp != p, p is always enabled. */
+               try_to_disable_aggr_kprobe(p);
+
+       if (!kprobes_all_disarmed && kprobe_disabled(p))
+               arch_disarm_kprobe(p);
+out:
+       mutex_unlock(&kprobe_mutex);
+       return ret;
+}
+EXPORT_SYMBOL_GPL(disable_kprobe);
+
+/* Enable one kprobe */
+int __kprobes enable_kprobe(struct kprobe *kp)
+{
+       int ret = 0;
+       struct kprobe *p;
+
+       mutex_lock(&kprobe_mutex);
+
+       /* Check whether specified probe is valid. */
+       p = __get_valid_kprobe(kp);
+       if (unlikely(p == NULL)) {
+               ret = -EINVAL;
+               goto out;
+       }
+
+       if (kprobe_gone(kp)) {
+               /* This kprobe has gone, we couldn't enable it. */
+               ret = -EINVAL;
+               goto out;
+       }
+
+       if (!kprobes_all_disarmed && kprobe_disabled(p))
+               arch_arm_kprobe(p);
+
+       p->flags &= ~KPROBE_FLAG_DISABLED;
+       if (p != kp)
+               kp->flags &= ~KPROBE_FLAG_DISABLED;
+out:
+       mutex_unlock(&kprobe_mutex);
+       return ret;
+}
+EXPORT_SYMBOL_GPL(enable_kprobe);
+
+static void __kprobes arm_all_kprobes(void)
 {
        struct hlist_head *head;
        struct hlist_node *node;
@@ -1281,20 +1413,20 @@ static void __kprobes enable_all_kprobes(void)
 
        mutex_lock(&kprobe_mutex);
 
-       /* If kprobes are already enabled, just return */
-       if (kprobe_enabled)
+       /* If kprobes are armed, just return */
+       if (!kprobes_all_disarmed)
                goto already_enabled;
 
        mutex_lock(&text_mutex);
        for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
                head = &kprobe_table[i];
                hlist_for_each_entry_rcu(p, node, head, hlist)
-                       if (!kprobe_gone(p))
+                       if (!kprobe_disabled(p))
                                arch_arm_kprobe(p);
        }
        mutex_unlock(&text_mutex);
 
-       kprobe_enabled = true;
+       kprobes_all_disarmed = false;
        printk(KERN_INFO "Kprobes globally enabled\n");
 
 already_enabled:
@@ -1302,7 +1434,7 @@ already_enabled:
        return;
 }
 
-static void __kprobes disable_all_kprobes(void)
+static void __kprobes disarm_all_kprobes(void)
 {
        struct hlist_head *head;
        struct hlist_node *node;
@@ -1311,17 +1443,17 @@ static void __kprobes disable_all_kprobes(void)
 
        mutex_lock(&kprobe_mutex);
 
-       /* If kprobes are already disabled, just return */
-       if (!kprobe_enabled)
+       /* If kprobes are already disarmed, just return */
+       if (kprobes_all_disarmed)
                goto already_disabled;
 
-       kprobe_enabled = false;
+       kprobes_all_disarmed = true;
        printk(KERN_INFO "Kprobes globally disabled\n");
        mutex_lock(&text_mutex);
        for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
                head = &kprobe_table[i];
                hlist_for_each_entry_rcu(p, node, head, hlist) {
-                       if (!arch_trampoline_kprobe(p) && !kprobe_gone(p))
+                       if (!arch_trampoline_kprobe(p) && !kprobe_disabled(p))
                                arch_disarm_kprobe(p);
                }
        }
@@ -1347,7 +1479,7 @@ static ssize_t read_enabled_file_bool(struct file *file,
 {
        char buf[3];
 
-       if (kprobe_enabled)
+       if (!kprobes_all_disarmed)
                buf[0] = '1';
        else
                buf[0] = '0';
@@ -1370,12 +1502,12 @@ static ssize_t write_enabled_file_bool(struct file *file,
        case 'y':
        case 'Y':
        case '1':
-               enable_all_kprobes();
+               arm_all_kprobes();
                break;
        case 'n':
        case 'N':
        case '0':
-               disable_all_kprobes();
+               disarm_all_kprobes();
                break;
        }
 
@@ -1418,16 +1550,5 @@ late_initcall(debugfs_kprobe_init);
 
 module_init(init_kprobes);
 
-EXPORT_SYMBOL_GPL(register_kprobe);
-EXPORT_SYMBOL_GPL(unregister_kprobe);
-EXPORT_SYMBOL_GPL(register_kprobes);
-EXPORT_SYMBOL_GPL(unregister_kprobes);
-EXPORT_SYMBOL_GPL(register_jprobe);
-EXPORT_SYMBOL_GPL(unregister_jprobe);
-EXPORT_SYMBOL_GPL(register_jprobes);
-EXPORT_SYMBOL_GPL(unregister_jprobes);
+/* defined in arch/.../kernel/kprobes.c */
 EXPORT_SYMBOL_GPL(jprobe_return);
-EXPORT_SYMBOL_GPL(register_kretprobe);
-EXPORT_SYMBOL_GPL(unregister_kretprobe);
-EXPORT_SYMBOL_GPL(register_kretprobes);
-EXPORT_SYMBOL_GPL(unregister_kretprobes);
index 84bbadd..4ebaf85 100644 (file)
@@ -76,6 +76,7 @@ static int kthread(void *_create)
 
        /* OK, tell user we're spawned, wait for stop or wakeup */
        __set_current_state(TASK_UNINTERRUPTIBLE);
+       create->result = current;
        complete(&create->started);
        schedule();
 
@@ -96,22 +97,10 @@ static void create_kthread(struct kthread_create_info *create)
 
        /* We want our own signal handler (we take no signals by default). */
        pid = kernel_thread(kthread, create, CLONE_FS | CLONE_FILES | SIGCHLD);
-       if (pid < 0) {
+       if (pid < 0)
                create->result = ERR_PTR(pid);
-       } else {
-               struct sched_param param = { .sched_priority = 0 };
+       else
                wait_for_completion(&create->started);
-               read_lock(&tasklist_lock);
-               create->result = find_task_by_pid_ns(pid, &init_pid_ns);
-               read_unlock(&tasklist_lock);
-               /*
-                * root may have changed our (kthreadd's) priority or CPU mask.
-                * The kernel thread should not inherit these properties.
-                */
-               sched_setscheduler(create->result, SCHED_NORMAL, &param);
-               set_user_nice(create->result, KTHREAD_NICE_LEVEL);
-               set_cpus_allowed_ptr(create->result, cpu_all_mask);
-       }
        complete(&create->done);
 }
 
@@ -154,11 +143,20 @@ struct task_struct *kthread_create(int (*threadfn)(void *data),
        wait_for_completion(&create.done);
 
        if (!IS_ERR(create.result)) {
+               struct sched_param param = { .sched_priority = 0 };
                va_list args;
+
                va_start(args, namefmt);
                vsnprintf(create.result->comm, sizeof(create.result->comm),
                          namefmt, args);
                va_end(args);
+               /*
+                * root may have changed our (kthreadd's) priority or CPU mask.
+                * The kernel thread should not inherit these properties.
+                */
+               sched_setscheduler_nocheck(create.result, SCHED_NORMAL, &param);
+               set_user_nice(create.result, KTHREAD_NICE_LEVEL);
+               set_cpus_allowed_ptr(create.result, cpu_all_mask);
        }
        return create.result;
 }
index c268a77..05f014e 100644 (file)
@@ -1952,9 +1952,6 @@ static noinline struct module *load_module(void __user *umod,
                if (strstarts(secstrings+sechdrs[i].sh_name, ".exit"))
                        sechdrs[i].sh_flags &= ~(unsigned long)SHF_ALLOC;
 #endif
-               /* Don't keep __versions around; it's just for loading. */
-               if (strcmp(secstrings + sechdrs[i].sh_name, "__versions") == 0)
-                       sechdrs[i].sh_flags &= ~(unsigned long)SHF_ALLOC;
        }
 
        modindex = find_sec(hdr, sechdrs, secstrings,
index 8e5d9a6..c9dcf98 100644 (file)
@@ -18,7 +18,7 @@ void update_rlimit_cpu(unsigned long rlim_new)
 
        cputime = secs_to_cputime(rlim_new);
        if (cputime_eq(current->signal->it_prof_expires, cputime_zero) ||
-           cputime_lt(current->signal->it_prof_expires, cputime)) {
+           cputime_gt(current->signal->it_prof_expires, cputime)) {
                spin_lock_irq(&current->sighand->siglock);
                set_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);
                spin_unlock_irq(&current->sighand->siglock);
@@ -224,7 +224,7 @@ static int cpu_clock_sample(const clockid_t which_clock, struct task_struct *p,
                cpu->cpu = virt_ticks(p);
                break;
        case CPUCLOCK_SCHED:
-               cpu->sched = p->se.sum_exec_runtime + task_delta_exec(p);
+               cpu->sched = task_sched_runtime(p);
                break;
        }
        return 0;
@@ -305,18 +305,19 @@ static int cpu_clock_sample_group(const clockid_t which_clock,
 {
        struct task_cputime cputime;
 
-       thread_group_cputime(p, &cputime);
        switch (CPUCLOCK_WHICH(which_clock)) {
        default:
                return -EINVAL;
        case CPUCLOCK_PROF:
+               thread_group_cputime(p, &cputime);
                cpu->cpu = cputime_add(cputime.utime, cputime.stime);
                break;
        case CPUCLOCK_VIRT:
+               thread_group_cputime(p, &cputime);
                cpu->cpu = cputime.utime;
                break;
        case CPUCLOCK_SCHED:
-               cpu->sched = cputime.sum_exec_runtime + task_delta_exec(p);
+               cpu->sched = thread_group_sched_runtime(p);
                break;
        }
        return 0;
index aaad0ec..64191fa 100644 (file)
@@ -21,9 +21,7 @@
 #include <linux/audit.h>
 #include <linux/pid_namespace.h>
 #include <linux/syscalls.h>
-
-#include <asm/pgtable.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 
 /*
@@ -48,7 +46,7 @@ void __ptrace_link(struct task_struct *child, struct task_struct *new_parent)
        list_add(&child->ptrace_entry, &new_parent->ptraced);
        child->parent = new_parent;
 }
+
 /*
  * Turn a tracing stop into a normal stop now, since with no tracer there
  * would be no way to wake it up with SIGCONT or SIGKILL.  If there was a
@@ -173,7 +171,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
        task_lock(task);
        err = __ptrace_may_access(task, mode);
        task_unlock(task);
-       return (!err ? true : false);
+       return !err;
 }
 
 int ptrace_attach(struct task_struct *task)
@@ -358,7 +356,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
                copied += retval;
                src += retval;
                dst += retval;
-               len -= retval;                  
+               len -= retval;
        }
        return copied;
 }
@@ -383,7 +381,7 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds
                copied += retval;
                src += retval;
                dst += retval;
-               len -= retval;                  
+               len -= retval;
        }
        return copied;
 }
@@ -496,9 +494,9 @@ static int ptrace_resume(struct task_struct *child, long request, long data)
                if (unlikely(!arch_has_single_step()))
                        return -EIO;
                user_enable_single_step(child);
-       }
-       else
+       } else {
                user_disable_single_step(child);
+       }
 
        child->exit_code = data;
        wake_up_process(child);
index 6cc1fd5..5724508 100644 (file)
@@ -1418,10 +1418,22 @@ iter_move_one_task(struct rq *this_rq, int this_cpu, struct rq *busiest,
                   struct rq_iterator *iterator);
 #endif
 
+/* Time spent by the tasks of the cpu accounting group executing in ... */
+enum cpuacct_stat_index {
+       CPUACCT_STAT_USER,      /* ... user mode */
+       CPUACCT_STAT_SYSTEM,    /* ... kernel mode */
+
+       CPUACCT_STAT_NSTATS,
+};
+
 #ifdef CONFIG_CGROUP_CPUACCT
 static void cpuacct_charge(struct task_struct *tsk, u64 cputime);
+static void cpuacct_update_stats(struct task_struct *tsk,
+               enum cpuacct_stat_index idx, cputime_t val);
 #else
 static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime) {}
+static inline void cpuacct_update_stats(struct task_struct *tsk,
+               enum cpuacct_stat_index idx, cputime_t val) {}
 #endif
 
 static inline void inc_cpu_load(struct rq *rq, unsigned long load)
@@ -4511,9 +4523,25 @@ DEFINE_PER_CPU(struct kernel_stat, kstat);
 EXPORT_PER_CPU_SYMBOL(kstat);
 
 /*
- * Return any ns on the sched_clock that have not yet been banked in
+ * Return any ns on the sched_clock that have not yet been accounted in
  * @p in case that task is currently running.
+ *
+ * Called with task_rq_lock() held on @rq.
  */
+static u64 do_task_delta_exec(struct task_struct *p, struct rq *rq)
+{
+       u64 ns = 0;
+
+       if (task_current(rq, p)) {
+               update_rq_clock(rq);
+               ns = rq->clock - p->se.exec_start;
+               if ((s64)ns < 0)
+                       ns = 0;
+       }
+
+       return ns;
+}
+
 unsigned long long task_delta_exec(struct task_struct *p)
 {
        unsigned long flags;
@@ -4521,16 +4549,49 @@ unsigned long long task_delta_exec(struct task_struct *p)
        u64 ns = 0;
 
        rq = task_rq_lock(p, &flags);
+       ns = do_task_delta_exec(p, rq);
+       task_rq_unlock(rq, &flags);
 
-       if (task_current(rq, p)) {
-               u64 delta_exec;
+       return ns;
+}
 
-               update_rq_clock(rq);
-               delta_exec = rq->clock - p->se.exec_start;
-               if ((s64)delta_exec > 0)
-                       ns = delta_exec;
-       }
+/*
+ * Return accounted runtime for the task.
+ * In case the task is currently running, return the runtime plus current's
+ * pending runtime that have not been accounted yet.
+ */
+unsigned long long task_sched_runtime(struct task_struct *p)
+{
+       unsigned long flags;
+       struct rq *rq;
+       u64 ns = 0;
+
+       rq = task_rq_lock(p, &flags);
+       ns = p->se.sum_exec_runtime + do_task_delta_exec(p, rq);
+       task_rq_unlock(rq, &flags);
+
+       return ns;
+}
+
+/*
+ * Return sum_exec_runtime for the thread group.
+ * In case the task is currently running, return the sum plus current's
+ * pending runtime that have not been accounted yet.
+ *
+ * Note that the thread group might have other running tasks as well,
+ * so the return value not includes other pending runtime that other
+ * running tasks might have.
+ */
+unsigned long long thread_group_sched_runtime(struct task_struct *p)
+{
+       struct task_cputime totals;
+       unsigned long flags;
+       struct rq *rq;
+       u64 ns;
 
+       rq = task_rq_lock(p, &flags);
+       thread_group_cputime(p, &totals);
+       ns = totals.sum_exec_runtime + do_task_delta_exec(p, rq);
        task_rq_unlock(rq, &flags);
 
        return ns;
@@ -4559,6 +4620,8 @@ void account_user_time(struct task_struct *p, cputime_t cputime,
                cpustat->nice = cputime64_add(cpustat->nice, tmp);
        else
                cpustat->user = cputime64_add(cpustat->user, tmp);
+
+       cpuacct_update_stats(p, CPUACCT_STAT_USER, cputime);
        /* Account for user time used */
        acct_update_integrals(p);
 }
@@ -4620,6 +4683,8 @@ void account_system_time(struct task_struct *p, int hardirq_offset,
        else
                cpustat->system = cputime64_add(cpustat->system, tmp);
 
+       cpuacct_update_stats(p, CPUACCT_STAT_SYSTEM, cputime);
+
        /* Account for system time used */
        acct_update_integrals(p);
 }
@@ -7302,7 +7367,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
                cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
                cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-               printk(KERN_CONT " %s", str);
+               printk(KERN_CONT " %s (__cpu_power = %d)", str,
+                                               group->__cpu_power);
 
                group = group->next;
        } while (group != sd->groups);
@@ -9925,6 +9991,7 @@ struct cpuacct {
        struct cgroup_subsys_state css;
        /* cpuusage holds pointer to a u64-type object on every cpu */
        u64 *cpuusage;
+       struct percpu_counter cpustat[CPUACCT_STAT_NSTATS];
        struct cpuacct *parent;
 };
 
@@ -9949,20 +10016,32 @@ static struct cgroup_subsys_state *cpuacct_create(
        struct cgroup_subsys *ss, struct cgroup *cgrp)
 {
        struct cpuacct *ca = kzalloc(sizeof(*ca), GFP_KERNEL);
+       int i;
 
        if (!ca)
-               return ERR_PTR(-ENOMEM);
+               goto out;
 
        ca->cpuusage = alloc_percpu(u64);
-       if (!ca->cpuusage) {
-               kfree(ca);
-               return ERR_PTR(-ENOMEM);
-       }
+       if (!ca->cpuusage)
+               goto out_free_ca;
+
+       for (i = 0; i < CPUACCT_STAT_NSTATS; i++)
+               if (percpu_counter_init(&ca->cpustat[i], 0))
+                       goto out_free_counters;
 
        if (cgrp->parent)
                ca->parent = cgroup_ca(cgrp->parent);
 
        return &ca->css;
+
+out_free_counters:
+       while (--i >= 0)
+               percpu_counter_destroy(&ca->cpustat[i]);
+       free_percpu(ca->cpuusage);
+out_free_ca:
+       kfree(ca);
+out:
+       return ERR_PTR(-ENOMEM);
 }
 
 /* destroy an existing cpu accounting group */
@@ -9970,7 +10049,10 @@ static void
 cpuacct_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
 {
        struct cpuacct *ca = cgroup_ca(cgrp);
+       int i;
 
+       for (i = 0; i < CPUACCT_STAT_NSTATS; i++)
+               percpu_counter_destroy(&ca->cpustat[i]);
        free_percpu(ca->cpuusage);
        kfree(ca);
 }
@@ -10057,6 +10139,25 @@ static int cpuacct_percpu_seq_read(struct cgroup *cgroup, struct cftype *cft,
        return 0;
 }
 
+static const char *cpuacct_stat_desc[] = {
+       [CPUACCT_STAT_USER] = "user",
+       [CPUACCT_STAT_SYSTEM] = "system",
+};
+
+static int cpuacct_stats_show(struct cgroup *cgrp, struct cftype *cft,
+               struct cgroup_map_cb *cb)
+{
+       struct cpuacct *ca = cgroup_ca(cgrp);
+       int i;
+
+       for (i = 0; i < CPUACCT_STAT_NSTATS; i++) {
+               s64 val = percpu_counter_read(&ca->cpustat[i]);
+               val = cputime64_to_clock_t(val);
+               cb->fill(cb, cpuacct_stat_desc[i], val);
+       }
+       return 0;
+}
+
 static struct cftype files[] = {
        {
                .name = "usage",
@@ -10067,7 +10168,10 @@ static struct cftype files[] = {
                .name = "usage_percpu",
                .read_seq_string = cpuacct_percpu_seq_read,
        },
-
+       {
+               .name = "stat",
+               .read_map = cpuacct_stats_show,
+       },
 };
 
 static int cpuacct_populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
@@ -10089,12 +10193,38 @@ static void cpuacct_charge(struct task_struct *tsk, u64 cputime)
                return;
 
        cpu = task_cpu(tsk);
+
+       rcu_read_lock();
+
        ca = task_ca(tsk);
 
        for (; ca; ca = ca->parent) {
                u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
                *cpuusage += cputime;
        }
+
+       rcu_read_unlock();
+}
+
+/*
+ * Charge the system/user time to the task's accounting group.
+ */
+static void cpuacct_update_stats(struct task_struct *tsk,
+               enum cpuacct_stat_index idx, cputime_t val)
+{
+       struct cpuacct *ca;
+
+       if (unlikely(!cpuacct_subsys.active))
+               return;
+
+       rcu_read_lock();
+       ca = task_ca(tsk);
+
+       do {
+               percpu_counter_add(&ca->cpustat[idx], val);
+               ca = ca->parent;
+       } while (ca);
+       rcu_read_unlock();
 }
 
 struct cgroup_subsys cpuacct_subsys = {
index 1e00bfa..cdd3c89 100644 (file)
@@ -55,7 +55,7 @@ static int convert_prio(int prio)
  * cpupri_find - find the best (lowest-pri) CPU in the system
  * @cp: The cpupri context
  * @p: The task
- * @lowest_mask: A mask to fill in with selected CPUs
+ * @lowest_mask: A mask to fill in with selected CPUs (or NULL)
  *
  * Note: This function returns the recommended CPUs as calculated during the
  * current invokation.  By the time the call returns, the CPUs may have in
@@ -81,7 +81,8 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p,
                if (cpumask_any_and(&p->cpus_allowed, vec->mask) >= nr_cpu_ids)
                        continue;
 
-               cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask);
+               if (lowest_mask)
+                       cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask);
                return 1;
        }
 
index 299d012..f2c66f8 100644 (file)
@@ -948,20 +948,15 @@ static int select_task_rq_rt(struct task_struct *p, int sync)
 
 static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
 {
-       cpumask_var_t mask;
-
        if (rq->curr->rt.nr_cpus_allowed == 1)
                return;
 
-       if (!alloc_cpumask_var(&mask, GFP_ATOMIC))
-               return;
-
        if (p->rt.nr_cpus_allowed != 1
-           && cpupri_find(&rq->rd->cpupri, p, mask))
-               goto free;
+           && cpupri_find(&rq->rd->cpupri, p, NULL))
+               return;
 
-       if (!cpupri_find(&rq->rd->cpupri, rq->curr, mask))
-               goto free;
+       if (!cpupri_find(&rq->rd->cpupri, rq->curr, NULL))
+               return;
 
        /*
         * There appears to be other cpus that can accept
@@ -970,8 +965,6 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
         */
        requeue_task_rt(rq, p, 1);
        resched_task(rq->curr);
-free:
-       free_cpumask_var(mask);
 }
 
 #endif /* CONFIG_SMP */
index 85d5a24..88796c3 100644 (file)
@@ -166,97 +166,11 @@ void softlockup_tick(void)
 }
 
 /*
- * Have a reasonable limit on the number of tasks checked:
- */
-unsigned long __read_mostly sysctl_hung_task_check_count = 1024;
-
-/*
- * Zero means infinite timeout - no checking done:
- */
-unsigned long __read_mostly sysctl_hung_task_timeout_secs = 480;
-
-unsigned long __read_mostly sysctl_hung_task_warnings = 10;
-
-/*
- * Only do the hung-tasks check on one CPU:
- */
-static int check_cpu __read_mostly = -1;
-
-static void check_hung_task(struct task_struct *t, unsigned long now)
-{
-       unsigned long switch_count = t->nvcsw + t->nivcsw;
-
-       if (t->flags & PF_FROZEN)
-               return;
-
-       if (switch_count != t->last_switch_count || !t->last_switch_timestamp) {
-               t->last_switch_count = switch_count;
-               t->last_switch_timestamp = now;
-               return;
-       }
-       if ((long)(now - t->last_switch_timestamp) <
-                                       sysctl_hung_task_timeout_secs)
-               return;
-       if (!sysctl_hung_task_warnings)
-               return;
-       sysctl_hung_task_warnings--;
-
-       /*
-        * Ok, the task did not get scheduled for more than 2 minutes,
-        * complain:
-        */
-       printk(KERN_ERR "INFO: task %s:%d blocked for more than "
-                       "%ld seconds.\n", t->comm, t->pid,
-                       sysctl_hung_task_timeout_secs);
-       printk(KERN_ERR "\"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\""
-                       " disables this message.\n");
-       sched_show_task(t);
-       __debug_show_held_locks(t);
-
-       t->last_switch_timestamp = now;
-       touch_nmi_watchdog();
-
-       if (softlockup_panic)
-               panic("softlockup: blocked tasks");
-}
-
-/*
- * Check whether a TASK_UNINTERRUPTIBLE does not get woken up for
- * a really long time (120 seconds). If that happens, print out
- * a warning.
- */
-static void check_hung_uninterruptible_tasks(int this_cpu)
-{
-       int max_count = sysctl_hung_task_check_count;
-       unsigned long now = get_timestamp(this_cpu);
-       struct task_struct *g, *t;
-
-       /*
-        * If the system crashed already then all bets are off,
-        * do not report extra hung tasks:
-        */
-       if (test_taint(TAINT_DIE) || did_panic)
-               return;
-
-       read_lock(&tasklist_lock);
-       do_each_thread(g, t) {
-               if (!--max_count)
-                       goto unlock;
-               /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
-               if (t->state == TASK_UNINTERRUPTIBLE)
-                       check_hung_task(t, now);
-       } while_each_thread(g, t);
- unlock:
-       read_unlock(&tasklist_lock);
-}
-
-/*
  * The watchdog thread - runs every second and touches the timestamp.
  */
 static int watchdog(void *__bind_cpu)
 {
        struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
-       int this_cpu = (long)__bind_cpu;
 
        sched_setscheduler(current, SCHED_FIFO, &param);
 
@@ -276,11 +190,6 @@ static int watchdog(void *__bind_cpu)
                if (kthread_should_stop())
                        break;
 
-               if (this_cpu == check_cpu) {
-                       if (sysctl_hung_task_timeout_secs)
-                               check_hung_uninterruptible_tasks(this_cpu);
-               }
-
                set_current_state(TASK_INTERRUPTIBLE);
        }
        __set_current_state(TASK_RUNNING);
@@ -312,18 +221,9 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
                break;
        case CPU_ONLINE:
        case CPU_ONLINE_FROZEN:
-               check_cpu = cpumask_any(cpu_online_mask);
                wake_up_process(per_cpu(watchdog_task, hotcpu));
                break;
 #ifdef CONFIG_HOTPLUG_CPU
-       case CPU_DOWN_PREPARE:
-       case CPU_DOWN_PREPARE_FROZEN:
-               if (hotcpu == check_cpu) {
-                       /* Pick any other online cpu. */
-                       check_cpu = cpumask_any_but(cpu_online_mask, hotcpu);
-               }
-               break;
-
        case CPU_UP_CANCELED:
        case CPU_UP_CANCELED_FROZEN:
                if (!per_cpu(watchdog_task, hotcpu))
index b125e33..4286b62 100644 (file)
@@ -101,6 +101,7 @@ static int __maybe_unused one = 1;
 static int __maybe_unused two = 2;
 static unsigned long one_ul = 1;
 static int one_hundred = 100;
+static int one_thousand = 1000;
 
 /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
 static int maxolduid = 65535;
@@ -813,6 +814,19 @@ static struct ctl_table kern_table[] = {
                .extra1         = &neg_one,
                .extra2         = &sixty,
        },
+#endif
+#ifdef CONFIG_DETECT_HUNG_TASK
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "hung_task_panic",
+               .data           = &sysctl_hung_task_panic,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &zero,
+               .extra2         = &one,
+       },
        {
                .ctl_name       = CTL_UNNUMBERED,
                .procname       = "hung_task_check_count",
@@ -828,7 +842,7 @@ static struct ctl_table kern_table[] = {
                .data           = &sysctl_hung_task_timeout_secs,
                .maxlen         = sizeof(unsigned long),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = &proc_dohung_task_timeout_secs,
                .strategy       = &sysctl_intvec,
        },
        {
@@ -1027,6 +1041,28 @@ static struct ctl_table vm_table[] = {
                .proc_handler   = &proc_dointvec,
        },
        {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "nr_pdflush_threads_min",
+               .data           = &nr_pdflush_threads_min,
+               .maxlen         = sizeof nr_pdflush_threads_min,
+               .mode           = 0644 /* read-write */,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &one,
+               .extra2         = &nr_pdflush_threads_max,
+       },
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "nr_pdflush_threads_max",
+               .data           = &nr_pdflush_threads_max,
+               .maxlen         = sizeof nr_pdflush_threads_max,
+               .mode           = 0644 /* read-write */,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &nr_pdflush_threads_min,
+               .extra2         = &one_thousand,
+       },
+       {
                .ctl_name       = VM_SWAPPINESS,
                .procname       = "swappiness",
                .data           = &vm_swappiness,
index b455556..cffffad 100644 (file)
@@ -531,10 +531,13 @@ static void __init_timer(struct timer_list *timer,
 }
 
 /**
- * init_timer - initialize a timer.
+ * init_timer_key - initialize a timer
  * @timer: the timer to be initialized
+ * @name: name of the timer
+ * @key: lockdep class key of the fake lock used for tracking timer
+ *       sync lock dependencies
  *
- * init_timer() must be done to a timer prior calling *any* of the
+ * init_timer_key() must be done to a timer prior calling *any* of the
  * other timer functions.
  */
 void init_timer_key(struct timer_list *timer,
index 947c5b3..921ef5d 100644 (file)
@@ -327,10 +327,10 @@ static ssize_t blk_msg_write(struct file *filp, const char __user *buffer,
        char *msg;
        struct blk_trace *bt;
 
-       if (count > BLK_TN_MAX_MSG)
+       if (count >= BLK_TN_MAX_MSG)
                return -EINVAL;
 
-       msg = kmalloc(count, GFP_KERNEL);
+       msg = kmalloc(count + 1, GFP_KERNEL);
        if (msg == NULL)
                return -ENOMEM;
 
@@ -339,6 +339,7 @@ static ssize_t blk_msg_write(struct file *filp, const char __user *buffer,
                return -EFAULT;
        }
 
+       msg[count] = '\0';
        bt = filp->private_data;
        __trace_note_message(bt, "%s", msg);
        kfree(msg);
@@ -642,7 +643,7 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq,
        if (blk_pc_request(rq)) {
                what |= BLK_TC_ACT(BLK_TC_PC);
                __blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors,
-                               sizeof(rq->cmd), rq->cmd);
+                               rq->cmd_len, rq->cmd);
        } else  {
                what |= BLK_TC_ACT(BLK_TC_FS);
                __blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9,
@@ -1376,12 +1377,12 @@ static int blk_trace_str2mask(const char *str)
 {
        int i;
        int mask = 0;
-       char *s, *token;
+       char *buf, *s, *token;
 
-       s = kstrdup(str, GFP_KERNEL);
-       if (s == NULL)
+       buf = kstrdup(str, GFP_KERNEL);
+       if (buf == NULL)
                return -ENOMEM;
-       s = strstrip(s);
+       s = strstrip(buf);
 
        while (1) {
                token = strsep(&s, ",");
@@ -1402,7 +1403,7 @@ static int blk_trace_str2mask(const char *str)
                        break;
                }
        }
-       kfree(s);
+       kfree(buf);
 
        return mask;
 }
index a0174a4..9d28476 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/percpu.h>
 #include <linux/splice.h>
 #include <linux/kdebug.h>
+#include <linux/string.h>
 #include <linux/ctype.h>
 #include <linux/init.h>
 #include <linux/poll.h>
@@ -147,8 +148,7 @@ static int __init set_ftrace_dump_on_oops(char *str)
 }
 __setup("ftrace_dump_on_oops", set_ftrace_dump_on_oops);
 
-long
-ns2usecs(cycle_t nsec)
+unsigned long long ns2usecs(cycle_t nsec)
 {
        nsec += 500;
        do_div(nsec, 1000);
@@ -1632,7 +1632,11 @@ static void test_cpu_buff_start(struct trace_iterator *iter)
                return;
 
        cpumask_set_cpu(iter->cpu, iter->started);
-       trace_seq_printf(s, "##### CPU %u buffer started ####\n", iter->cpu);
+
+       /* Don't print started cpu buffer for the first entry of the trace */
+       if (iter->idx > 1)
+               trace_seq_printf(s, "##### CPU %u buffer started ####\n",
+                               iter->cpu);
 }
 
 static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
@@ -1867,6 +1871,11 @@ __tracing_open(struct inode *inode, struct file *file)
        if (current_trace)
                *iter->trace = *current_trace;
 
+       if (!alloc_cpumask_var(&iter->started, GFP_KERNEL))
+               goto fail;
+
+       cpumask_clear(iter->started);
+
        if (current_trace && current_trace->print_max)
                iter->tr = &max_tr;
        else
@@ -1917,6 +1926,7 @@ __tracing_open(struct inode *inode, struct file *file)
                if (iter->buffer_iter[cpu])
                        ring_buffer_read_finish(iter->buffer_iter[cpu]);
        }
+       free_cpumask_var(iter->started);
  fail:
        mutex_unlock(&trace_types_lock);
        kfree(iter->trace);
@@ -1960,6 +1970,7 @@ static int tracing_release(struct inode *inode, struct file *file)
 
        seq_release(inode, file);
        mutex_destroy(&iter->mutex);
+       free_cpumask_var(iter->started);
        kfree(iter->trace);
        kfree(iter);
        return 0;
@@ -2358,9 +2369,9 @@ static const char readme_msg[] =
        "# mkdir /debug\n"
        "# mount -t debugfs nodev /debug\n\n"
        "# cat /debug/tracing/available_tracers\n"
-       "wakeup preemptirqsoff preemptoff irqsoff ftrace sched_switch none\n\n"
+       "wakeup preemptirqsoff preemptoff irqsoff function sched_switch nop\n\n"
        "# cat /debug/tracing/current_tracer\n"
-       "none\n"
+       "nop\n"
        "# echo sched_switch > /debug/tracing/current_tracer\n"
        "# cat /debug/tracing/current_tracer\n"
        "sched_switch\n"
index cbc168f..e685ac2 100644 (file)
@@ -602,7 +602,7 @@ extern int trace_selftest_startup_branch(struct tracer *trace,
 #endif /* CONFIG_FTRACE_STARTUP_TEST */
 
 extern void *head_page(struct trace_array_cpu *data);
-extern long ns2usecs(cycle_t nsec);
+extern unsigned long long ns2usecs(cycle_t nsec);
 extern int
 trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
 extern int
index 4d9952d..07a22c3 100644 (file)
@@ -40,7 +40,7 @@
 
 #undef TRACE_FIELD_ZERO_CHAR
 #define TRACE_FIELD_ZERO_CHAR(item)                                    \
-       ret = trace_seq_printf(s, "\tfield: char " #item ";\t"          \
+       ret = trace_seq_printf(s, "\tfield:char " #item ";\t"           \
                               "offset:%u;\tsize:0;\n",                 \
                               (unsigned int)offsetof(typeof(field), item)); \
        if (!ret)                                                       \
index d72b9a6..64b54a5 100644 (file)
@@ -423,7 +423,7 @@ int trace_print_lat_context(struct trace_iterator *iter)
 
                trace_find_cmdline(entry->pid, comm);
 
-               ret = trace_seq_printf(s, "%16s %5d %3d %d %08x %08lx [%08lx]"
+               ret = trace_seq_printf(s, "%16s %5d %3d %d %08x %08lx [%08llx]"
                                       " %ld.%03ldms (+%ld.%03ldms): ", comm,
                                       entry->pid, iter->cpu, entry->flags,
                                       entry->preempt_count, iter->idx,
index de35f20..9117cea 100644 (file)
@@ -62,6 +62,9 @@ probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success)
        pc = preempt_count();
        tracing_record_cmdline(current);
 
+       if (sched_stopped)
+               return;
+
        local_irq_save(flags);
        cpu = raw_smp_processor_id();
        data = ctx_trace->data[cpu];
index 3c5ad6b..5bc00e8 100644 (file)
@@ -154,7 +154,7 @@ probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev,
        if (unlikely(!tracer_enabled || next != wakeup_task))
                goto out_unlock;
 
-       trace_function(wakeup_trace, CALLER_ADDR1, CALLER_ADDR2, flags, pc);
+       trace_function(wakeup_trace, CALLER_ADDR0, CALLER_ADDR1, flags, pc);
        tracing_sched_switch_trace(wakeup_trace, prev, next, flags, pc);
 
        /*
@@ -257,6 +257,12 @@ probe_wakeup(struct rq *rq, struct task_struct *p, int success)
        data = wakeup_trace->data[wakeup_cpu];
        data->preempt_timestamp = ftrace_now(cpu);
        tracing_sched_wakeup_trace(wakeup_trace, p, current, flags, pc);
+
+       /*
+        * We must be careful in using CALLER_ADDR2. But since wake_up
+        * is not called by an assembly function  (where as schedule is)
+        * it should be safe to use it here.
+        */
        trace_function(wakeup_trace, CALLER_ADDR1, CALLER_ADDR2, flags, pc);
 
 out_locked:
index a2a3af2..5e57964 100644 (file)
@@ -1,5 +1,5 @@
+#include <trace/syscall.h>
 #include <linux/kernel.h>
-#include <linux/ftrace.h>
 #include <asm/syscall.h>
 
 #include "trace_output.h"
index b6b966c..f71fb2a 100644 (file)
@@ -966,20 +966,20 @@ undo:
 }
 
 #ifdef CONFIG_SMP
-static struct workqueue_struct *work_on_cpu_wq __read_mostly;
 
 struct work_for_cpu {
-       struct work_struct work;
+       struct completion completion;
        long (*fn)(void *);
        void *arg;
        long ret;
 };
 
-static void do_work_for_cpu(struct work_struct *w)
+static int do_work_for_cpu(void *_wfc)
 {
-       struct work_for_cpu *wfc = container_of(w, struct work_for_cpu, work);
-
+       struct work_for_cpu *wfc = _wfc;
        wfc->ret = wfc->fn(wfc->arg);
+       complete(&wfc->completion);
+       return 0;
 }
 
 /**
@@ -990,17 +990,23 @@ static void do_work_for_cpu(struct work_struct *w)
  *
  * This will return the value @fn returns.
  * It is up to the caller to ensure that the cpu doesn't go offline.
+ * The caller must not hold any locks which would prevent @fn from completing.
  */
 long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg)
 {
-       struct work_for_cpu wfc;
-
-       INIT_WORK(&wfc.work, do_work_for_cpu);
-       wfc.fn = fn;
-       wfc.arg = arg;
-       queue_work_on(cpu, work_on_cpu_wq, &wfc.work);
-       flush_work(&wfc.work);
-
+       struct task_struct *sub_thread;
+       struct work_for_cpu wfc = {
+               .completion = COMPLETION_INITIALIZER_ONSTACK(wfc.completion),
+               .fn = fn,
+               .arg = arg,
+       };
+
+       sub_thread = kthread_create(do_work_for_cpu, &wfc, "work_for_cpu");
+       if (IS_ERR(sub_thread))
+               return PTR_ERR(sub_thread);
+       kthread_bind(sub_thread, cpu);
+       wake_up_process(sub_thread);
+       wait_for_completion(&wfc.completion);
        return wfc.ret;
 }
 EXPORT_SYMBOL_GPL(work_on_cpu);
@@ -1016,8 +1022,4 @@ void __init init_workqueues(void)
        hotcpu_notifier(workqueue_cpu_callback, 0);
        keventd_wq = create_workqueue("events");
        BUG_ON(!keventd_wq);
-#ifdef CONFIG_SMP
-       work_on_cpu_wq = create_workqueue("work_on_cpu");
-       BUG_ON(!work_on_cpu_wq);
-#endif
 }
index 9638d99..c6e854f 100644 (file)
@@ -186,6 +186,44 @@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
        default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
        default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
 
+config DETECT_HUNG_TASK
+       bool "Detect Hung Tasks"
+       depends on DEBUG_KERNEL
+       default DETECT_SOFTLOCKUP
+       help
+         Say Y here to enable the kernel to detect "hung tasks",
+         which are bugs that cause the task to be stuck in
+         uninterruptible "D" state indefinitiley.
+
+         When a hung task is detected, the kernel will print the
+         current stack trace (which you should report), but the
+         task will stay in uninterruptible state. If lockdep is
+         enabled then all held locks will also be reported. This
+         feature has negligible overhead.
+
+config BOOTPARAM_HUNG_TASK_PANIC
+       bool "Panic (Reboot) On Hung Tasks"
+       depends on DETECT_HUNG_TASK
+       help
+         Say Y here to enable the kernel to panic on "hung tasks",
+         which are bugs that cause the kernel to leave a task stuck
+         in uninterruptible "D" state.
+
+         The panic can be used in combination with panic_timeout,
+         to cause the system to reboot automatically after a
+         hung task has been detected. This feature is useful for
+         high-availability systems that have uptime guarantees and
+         where a hung tasks must be resolved ASAP.
+
+         Say N if unsure.
+
+config BOOTPARAM_HUNG_TASK_PANIC_VALUE
+       int
+       depends on DETECT_HUNG_TASK
+       range 0 1
+       default 0 if !BOOTPARAM_HUNG_TASK_PANIC
+       default 1 if BOOTPARAM_HUNG_TASK_PANIC
+
 config SCHED_DEBUG
        bool "Collect scheduler debugging info"
        depends on DEBUG_KERNEL && PROC_FS
index 32e2bd3..2b0b5a7 100644 (file)
@@ -549,7 +549,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
        dma_addr_t dev_addr;
        void *ret;
        int order = get_order(size);
-       u64 dma_mask = DMA_32BIT_MASK;
+       u64 dma_mask = DMA_BIT_MASK(32);
 
        if (hwdev && hwdev->coherent_dma_mask)
                dma_mask = hwdev->coherent_dma_mask;
index be3001f..7536ace 100644 (file)
@@ -1051,13 +1051,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
                        if (str < end)
                                *str = '%';
                        ++str;
-                       if (*fmt) {
-                               if (str < end)
-                                       *str = *fmt;
-                               ++str;
-                       } else {
-                               --fmt;
-                       }
                        break;
 
                case FORMAT_TYPE_NRCHARS: {
@@ -1339,8 +1332,6 @@ do {                                                                      \
                        break;
 
                case FORMAT_TYPE_INVALID:
-                       if (!*fmt)
-                               --fmt;
                        break;
 
                case FORMAT_TYPE_NRCHARS: {
@@ -1523,13 +1514,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
                        if (str < end)
                                *str = '%';
                        ++str;
-                       if (*fmt) {
-                               if (str < end)
-                                       *str = *fmt;
-                               ++str;
-                       } else {
-                               --fmt;
-                       }
                        break;
 
                case FORMAT_TYPE_NRCHARS:
index 118905e..f2caf96 100644 (file)
@@ -58,6 +58,14 @@ static DEFINE_SPINLOCK(pdflush_lock);
 int nr_pdflush_threads = 0;
 
 /*
+ * The max/min number of pdflush threads. R/W by sysctl at
+ * /proc/sys/vm/nr_pdflush_threads_max/min
+ */
+int nr_pdflush_threads_max __read_mostly = MAX_PDFLUSH_THREADS;
+int nr_pdflush_threads_min __read_mostly = MIN_PDFLUSH_THREADS;
+
+
+/*
  * The time at which the pdflush thread pool last went empty
  */
 static unsigned long last_empty_jifs;
@@ -68,7 +76,7 @@ static unsigned long last_empty_jifs;
  * Thread pool management algorithm:
  * 
  * - The minimum and maximum number of pdflush instances are bound
- *   by MIN_PDFLUSH_THREADS and MAX_PDFLUSH_THREADS.
+ *   by nr_pdflush_threads_min and nr_pdflush_threads_max.
  * 
  * - If there have been no idle pdflush instances for 1 second, create
  *   a new one.
@@ -98,7 +106,6 @@ static int __pdflush(struct pdflush_work *my_work)
        INIT_LIST_HEAD(&my_work->list);
 
        spin_lock_irq(&pdflush_lock);
-       nr_pdflush_threads++;
        for ( ; ; ) {
                struct pdflush_work *pdf;
 
@@ -126,20 +133,25 @@ static int __pdflush(struct pdflush_work *my_work)
 
                (*my_work->fn)(my_work->arg0);
 
+               spin_lock_irq(&pdflush_lock);
+
                /*
                 * Thread creation: For how long have there been zero
                 * available threads?
+                *
+                * To throttle creation, we reset last_empty_jifs.
                 */
                if (time_after(jiffies, last_empty_jifs + 1 * HZ)) {
-                       /* unlocked list_empty() test is OK here */
-                       if (list_empty(&pdflush_list)) {
-                               /* unlocked test is OK here */
-                               if (nr_pdflush_threads < MAX_PDFLUSH_THREADS)
-                                       start_one_pdflush_thread();
+                       if (list_empty(&pdflush_list) &&
+                           nr_pdflush_threads < nr_pdflush_threads_max) {
+                               last_empty_jifs = jiffies;
+                               nr_pdflush_threads++;
+                               spin_unlock_irq(&pdflush_lock);
+                               start_one_pdflush_thread();
+                               spin_lock_irq(&pdflush_lock);
                        }
                }
 
-               spin_lock_irq(&pdflush_lock);
                my_work->fn = NULL;
 
                /*
@@ -148,7 +160,7 @@ static int __pdflush(struct pdflush_work *my_work)
                 */
                if (list_empty(&pdflush_list))
                        continue;
-               if (nr_pdflush_threads <= MIN_PDFLUSH_THREADS)
+               if (nr_pdflush_threads <= nr_pdflush_threads_min)
                        continue;
                pdf = list_entry(pdflush_list.prev, struct pdflush_work, list);
                if (time_after(jiffies, pdf->when_i_went_to_sleep + 1 * HZ)) {
@@ -236,14 +248,27 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0)
 
 static void start_one_pdflush_thread(void)
 {
-       kthread_run(pdflush, NULL, "pdflush");
+       struct task_struct *k;
+
+       k = kthread_run(pdflush, NULL, "pdflush");
+       if (unlikely(IS_ERR(k))) {
+               spin_lock_irq(&pdflush_lock);
+               nr_pdflush_threads--;
+               spin_unlock_irq(&pdflush_lock);
+       }
 }
 
 static int __init pdflush_init(void)
 {
        int i;
 
-       for (i = 0; i < MIN_PDFLUSH_THREADS; i++)
+       /*
+        * Pre-set nr_pdflush_threads...  If we fail to create,
+        * the count will be decremented.
+        */
+       nr_pdflush_threads = nr_pdflush_threads_min;
+
+       for (i = 0; i < nr_pdflush_threads_min; i++)
                start_one_pdflush_thread();
        return 0;
 }
index f1611a1..539e606 100644 (file)
@@ -215,3 +215,5 @@ struct net_device *alloc_fddidev(int sizeof_priv)
        return alloc_netdev(sizeof_priv, "fddi%d", fddi_setup);
 }
 EXPORT_SYMBOL(alloc_fddidev);
+
+MODULE_LICENSE("GPL");
index dfed176..800ae85 100644 (file)
@@ -1033,6 +1033,8 @@ static struct xt_counters *alloc_counters(struct xt_table *table)
 
        xt_free_table_info(info);
 
+       return counters;
+
  free_counters:
        vfree(counters);
  nomem:
index 0af823c..5ee5a03 100644 (file)
@@ -72,6 +72,7 @@ int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb)
 #endif
 
        skb->protocol = htons(ETH_P_IPV6);
+       skb->local_df = 1;
 
        return x->outer_mode->output2(x, skb);
 }
index bb279bf..2329c5f 100644 (file)
@@ -374,7 +374,7 @@ config NETFILTER_XT_TARGET_HL
 
 config NETFILTER_XT_TARGET_LED
        tristate '"LED" target support'
-       depends on LEDS_CLASS && LED_TRIGGERS
+       depends on LEDS_CLASS && LEDS_TRIGGERS
        depends on NETFILTER_ADVANCED
        help
          This option adds a `LED' target, which allows you to blink LEDs in
index 3940f99..afde8f9 100644 (file)
@@ -372,7 +372,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect)
        struct net *net = nf_ct_exp_net(expect);
        struct hlist_node *n;
        unsigned int h;
-       int ret = 0;
+       int ret = 1;
 
        if (!master_help->helper) {
                ret = -ESHUTDOWN;
@@ -412,41 +412,23 @@ out:
        return ret;
 }
 
-int nf_ct_expect_related(struct nf_conntrack_expect *expect)
+int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 
+                               u32 pid, int report)
 {
        int ret;
 
        spin_lock_bh(&nf_conntrack_lock);
        ret = __nf_ct_expect_check(expect);
-       if (ret < 0)
+       if (ret <= 0)
                goto out;
 
+       ret = 0;
        nf_ct_expect_insert(expect);
-       atomic_inc(&expect->use);
-       spin_unlock_bh(&nf_conntrack_lock);
-       nf_ct_expect_event(IPEXP_NEW, expect);
-       nf_ct_expect_put(expect);
-       return ret;
-out:
        spin_unlock_bh(&nf_conntrack_lock);
+       nf_ct_expect_event_report(IPEXP_NEW, expect, pid, report);
        return ret;
-}
-EXPORT_SYMBOL_GPL(nf_ct_expect_related);
-
-int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 
-                               u32 pid, int report)
-{
-       int ret;
-
-       spin_lock_bh(&nf_conntrack_lock);
-       ret = __nf_ct_expect_check(expect);
-       if (ret < 0)
-               goto out;
-       nf_ct_expect_insert(expect);
 out:
        spin_unlock_bh(&nf_conntrack_lock);
-       if (ret == 0)
-               nf_ct_expect_event_report(IPEXP_NEW, expect, pid, report);
        return ret;
 }
 EXPORT_SYMBOL_GPL(nf_ct_expect_related_report);
index 91d0c02..791d71a 100644 (file)
@@ -493,8 +493,7 @@ static struct socket *sock_alloc(void)
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
 
-       get_cpu_var(sockets_in_use)++;
-       put_cpu_var(sockets_in_use);
+       percpu_add(sockets_in_use, 1);
        return sock;
 }
 
@@ -536,8 +535,7 @@ void sock_release(struct socket *sock)
        if (sock->fasync_list)
                printk(KERN_ERR "sock_release: fasync list not empty!\n");
 
-       get_cpu_var(sockets_in_use)--;
-       put_cpu_var(sockets_in_use);
+       percpu_sub(sockets_in_use, 1);
        if (!sock->file) {
                iput(SOCK_INODE(sock));
                return;
diff --git a/scripts/trace/power.pl b/scripts/trace/power.pl
deleted file mode 100644 (file)
index 4f729b3..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/perl
-
-# Copyright 2008, Intel Corporation
-#
-# This file is part of the Linux kernel
-#
-# This program file 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; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program in a file named COPYING; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301 USA
-#
-# Authors:
-#      Arjan van de Ven <arjan@linux.intel.com>
-
-
-#
-# This script turns a cstate ftrace output into a SVG graphic that shows
-# historic C-state information
-#
-#
-#      cat /sys/kernel/debug/tracing/trace | perl power.pl > out.svg
-#
-
-my @styles;
-my $base = 0;
-
-my @pstate_last;
-my @pstate_level;
-
-$styles[0] = "fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[1] = "fill:rgb(0,255,0);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[2] = "fill:rgb(255,0,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[3] = "fill:rgb(255,255,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[4] = "fill:rgb(255,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[5] = "fill:rgb(0,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[6] = "fill:rgb(0,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[7] = "fill:rgb(0,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-$styles[8] = "fill:rgb(0,25,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
-
-
-print "<?xml version=\"1.0\" standalone=\"no\"?> \n";
-print "<svg width=\"10000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n";
-
-my $scale = 30000.0;
-while (<>) {
-       my $line = $_;
-       if ($line =~ /([0-9\.]+)\] CSTATE: Going to C([0-9]) on cpu ([0-9]+) for ([0-9\.]+)/) {
-               if ($base == 0) {
-                       $base = $1;
-               }
-               my $time = $1 - $base;
-               $time = $time * $scale;
-               my $C = $2;
-               my $cpu = $3;
-               my $y = 400 * $cpu;
-               my $duration = $4 * $scale;
-               my $msec = int($4 * 100000)/100.0;
-               my $height = $C * 20;
-               $style = $styles[$C];
-
-               $y = $y + 140 - $height;
-
-               $x2 = $time + 4;
-               $y2 = $y + 4;
-
-
-               print "<rect x=\"$time\" width=\"$duration\" y=\"$y\" height=\"$height\" style=\"$style\"/>\n";
-               print "<text transform=\"translate($x2,$y2) rotate(90)\">C$C $msec</text>\n";
-       }
-       if ($line =~ /([0-9\.]+)\] PSTATE: Going to P([0-9]) on cpu ([0-9]+)/) {
-               my $time = $1 - $base;
-               my $state = $2;
-               my $cpu = $3;
-
-               if (defined($pstate_last[$cpu])) {
-                       my $from = $pstate_last[$cpu];
-                       my $oldstate = $pstate_state[$cpu];
-                       my $duration = ($time-$from) * $scale;
-
-                       $from = $from * $scale;
-                       my $to = $from + $duration;
-                       my $height = 140 - ($oldstate * (140/8));
-
-                       my $y = 400 * $cpu + 200 + $height;
-                       my $y2 = $y+4;
-                       my $style = $styles[8];
-
-                       print "<rect x=\"$from\" y=\"$y\" width=\"$duration\" height=\"5\" style=\"$style\"/>\n";
-                       print "<text transform=\"translate($from,$y2)\">P$oldstate (cpu $cpu)</text>\n";
-               };
-
-               $pstate_last[$cpu] = $time;
-               $pstate_state[$cpu] = $state;
-       }
-}
-
-
-print "</svg>\n";
diff --git a/scripts/tracing/power.pl b/scripts/tracing/power.pl
new file mode 100644 (file)
index 0000000..4f729b3
--- /dev/null
@@ -0,0 +1,108 @@
+#!/usr/bin/perl
+
+# Copyright 2008, Intel Corporation
+#
+# This file is part of the Linux kernel
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+# Authors:
+#      Arjan van de Ven <arjan@linux.intel.com>
+
+
+#
+# This script turns a cstate ftrace output into a SVG graphic that shows
+# historic C-state information
+#
+#
+#      cat /sys/kernel/debug/tracing/trace | perl power.pl > out.svg
+#
+
+my @styles;
+my $base = 0;
+
+my @pstate_last;
+my @pstate_level;
+
+$styles[0] = "fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[1] = "fill:rgb(0,255,0);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[2] = "fill:rgb(255,0,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[3] = "fill:rgb(255,255,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[4] = "fill:rgb(255,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[5] = "fill:rgb(0,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[6] = "fill:rgb(0,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[7] = "fill:rgb(0,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+$styles[8] = "fill:rgb(0,25,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
+
+
+print "<?xml version=\"1.0\" standalone=\"no\"?> \n";
+print "<svg width=\"10000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n";
+
+my $scale = 30000.0;
+while (<>) {
+       my $line = $_;
+       if ($line =~ /([0-9\.]+)\] CSTATE: Going to C([0-9]) on cpu ([0-9]+) for ([0-9\.]+)/) {
+               if ($base == 0) {
+                       $base = $1;
+               }
+               my $time = $1 - $base;
+               $time = $time * $scale;
+               my $C = $2;
+               my $cpu = $3;
+               my $y = 400 * $cpu;
+               my $duration = $4 * $scale;
+               my $msec = int($4 * 100000)/100.0;
+               my $height = $C * 20;
+               $style = $styles[$C];
+
+               $y = $y + 140 - $height;
+
+               $x2 = $time + 4;
+               $y2 = $y + 4;
+
+
+               print "<rect x=\"$time\" width=\"$duration\" y=\"$y\" height=\"$height\" style=\"$style\"/>\n";
+               print "<text transform=\"translate($x2,$y2) rotate(90)\">C$C $msec</text>\n";
+       }
+       if ($line =~ /([0-9\.]+)\] PSTATE: Going to P([0-9]) on cpu ([0-9]+)/) {
+               my $time = $1 - $base;
+               my $state = $2;
+               my $cpu = $3;
+
+               if (defined($pstate_last[$cpu])) {
+                       my $from = $pstate_last[$cpu];
+                       my $oldstate = $pstate_state[$cpu];
+                       my $duration = ($time-$from) * $scale;
+
+                       $from = $from * $scale;
+                       my $to = $from + $duration;
+                       my $height = 140 - ($oldstate * (140/8));
+
+                       my $y = 400 * $cpu + 200 + $height;
+                       my $y2 = $y+4;
+                       my $style = $styles[8];
+
+                       print "<rect x=\"$from\" y=\"$y\" width=\"$duration\" height=\"5\" style=\"$style\"/>\n";
+                       print "<text transform=\"translate($from,$y2)\">P$oldstate (cpu $cpu)</text>\n";
+               };
+
+               $pstate_last[$cpu] = $time;
+               $pstate_state[$cpu] = $state;
+       }
+}
+
+
+print "</svg>\n";
index 7cd61a5..beac025 100644 (file)
@@ -916,7 +916,6 @@ changed:
        return commit_creds(new);
 
 no_change:
-       error = 0;
 error:
        abort_creds(new);
        return error;
index 22a3158..03fe63e 100644 (file)
@@ -311,7 +311,8 @@ static int construct_alloc_key(struct key_type *type,
 
        set_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags);
 
-       down_write(&dest_keyring->sem);
+       if (dest_keyring)
+               down_write(&dest_keyring->sem);
 
        /* attach the key to the destination keyring under lock, but we do need
         * to do another check just in case someone beat us to it whilst we
@@ -322,10 +323,12 @@ static int construct_alloc_key(struct key_type *type,
        if (!IS_ERR(key_ref))
                goto key_already_present;
 
-       __key_link(dest_keyring, key);
+       if (dest_keyring)
+               __key_link(dest_keyring, key);
 
        mutex_unlock(&key_construction_mutex);
-       up_write(&dest_keyring->sem);
+       if (dest_keyring)
+               up_write(&dest_keyring->sem);
        mutex_unlock(&user->cons_lock);
        *_key = key;
        kleave(" = 0 [%d]", key_serial(key));
index 92cea65..a0affd9 100644 (file)
@@ -1252,15 +1252,12 @@ static int tomoyo_write_domain_policy(struct tomoyo_io_buffer *head)
        struct tomoyo_domain_info *domain = head->write_var1;
        bool is_delete = false;
        bool is_select = false;
-       bool is_undelete = false;
        unsigned int profile;
 
        if (tomoyo_str_starts(&data, TOMOYO_KEYWORD_DELETE))
                is_delete = true;
        else if (tomoyo_str_starts(&data, TOMOYO_KEYWORD_SELECT))
                is_select = true;
-       else if (tomoyo_str_starts(&data, TOMOYO_KEYWORD_UNDELETE))
-               is_undelete = true;
        if (is_select && tomoyo_is_select_one(head, data))
                return 0;
        /* Don't allow updating policies by non manager programs. */
@@ -1274,9 +1271,7 @@ static int tomoyo_write_domain_policy(struct tomoyo_io_buffer *head)
                        down_read(&tomoyo_domain_list_lock);
                        domain = tomoyo_find_domain(data);
                        up_read(&tomoyo_domain_list_lock);
-               } else if (is_undelete)
-                       domain = tomoyo_undelete_domain(data);
-               else
+               } else
                        domain = tomoyo_find_or_assign_new_domain(data, 0);
                head->write_var1 = domain;
                return 0;
index 26a76d6..e77e6a6 100644 (file)
@@ -88,10 +88,7 @@ struct tomoyo_domain_info {
        /* Name of this domain. Never NULL.          */
        const struct tomoyo_path_info *domainname;
        u8 profile;        /* Profile number to use. */
-       u8 is_deleted;     /* Delete flag.
-                             0 = active.
-                             1 = deleted but undeletable.
-                             255 = deleted and no longer undeletable. */
+       bool is_deleted;   /* Delete flag.           */
        bool quota_warned; /* Quota warnning flag.   */
        /* DOMAIN_FLAGS_*. Use tomoyo_set_domain_flag() to modify. */
        u8 flags;
@@ -144,7 +141,6 @@ struct tomoyo_double_path_acl_record {
 #define TOMOYO_KEYWORD_NO_INITIALIZE_DOMAIN      "no_initialize_domain "
 #define TOMOYO_KEYWORD_NO_KEEP_DOMAIN            "no_keep_domain "
 #define TOMOYO_KEYWORD_SELECT                    "select "
-#define TOMOYO_KEYWORD_UNDELETE                  "undelete "
 #define TOMOYO_KEYWORD_USE_PROFILE               "use_profile "
 #define TOMOYO_KEYWORD_IGNORE_GLOBAL_ALLOW_READ  "ignore_global_allow_read"
 /* A domain definition starts with <kernel>. */
@@ -267,8 +263,6 @@ struct tomoyo_domain_info *tomoyo_find_domain(const char *domainname);
 struct tomoyo_domain_info *tomoyo_find_or_assign_new_domain(const char *
                                                            domainname,
                                                            const u8 profile);
-/* Undelete a domain. */
-struct tomoyo_domain_info *tomoyo_undelete_domain(const char *domainname);
 /* Check mode for specified functionality. */
 unsigned int tomoyo_check_flags(const struct tomoyo_domain_info *domain,
                                const u8 index);
index 093a756..2f2b449 100644 (file)
@@ -551,9 +551,7 @@ int tomoyo_write_alias_policy(char *data, const bool is_delete)
        return tomoyo_update_alias_entry(data, cp, is_delete);
 }
 
-/* Domain create/delete/undelete handler. */
-
-/* #define TOMOYO_DEBUG_DOMAIN_UNDELETE */
+/* Domain create/delete handler. */
 
 /**
  * tomoyo_delete_domain - Delete a domain.
@@ -571,41 +569,15 @@ int tomoyo_delete_domain(char *domainname)
        tomoyo_fill_path_info(&name);
        /***** EXCLUSIVE SECTION START *****/
        down_write(&tomoyo_domain_list_lock);
-#ifdef TOMOYO_DEBUG_DOMAIN_UNDELETE
-       printk(KERN_DEBUG "tomoyo_delete_domain %s\n", domainname);
-       list_for_each_entry(domain, &tomoyo_domain_list, list) {
-               if (tomoyo_pathcmp(domain->domainname, &name))
-                       continue;
-               printk(KERN_DEBUG "List: %p %u\n", domain, domain->is_deleted);
-       }
-#endif
        /* Is there an active domain? */
        list_for_each_entry(domain, &tomoyo_domain_list, list) {
-               struct tomoyo_domain_info *domain2;
                /* Never delete tomoyo_kernel_domain */
                if (domain == &tomoyo_kernel_domain)
                        continue;
                if (domain->is_deleted ||
                    tomoyo_pathcmp(domain->domainname, &name))
                        continue;
-               /* Mark already deleted domains as non undeletable. */
-               list_for_each_entry(domain2, &tomoyo_domain_list, list) {
-                       if (!domain2->is_deleted ||
-                           tomoyo_pathcmp(domain2->domainname, &name))
-                               continue;
-#ifdef TOMOYO_DEBUG_DOMAIN_UNDELETE
-                       if (domain2->is_deleted != 255)
-                               printk(KERN_DEBUG
-                                      "Marked %p as non undeletable\n",
-                                      domain2);
-#endif
-                       domain2->is_deleted = 255;
-               }
-               /* Delete and mark active domain as undeletable. */
-               domain->is_deleted = 1;
-#ifdef TOMOYO_DEBUG_DOMAIN_UNDELETE
-               printk(KERN_DEBUG "Marked %p as undeletable\n", domain);
-#endif
+               domain->is_deleted = true;
                break;
        }
        up_write(&tomoyo_domain_list_lock);
@@ -614,58 +586,6 @@ int tomoyo_delete_domain(char *domainname)
 }
 
 /**
- * tomoyo_undelete_domain - Undelete a domain.
- *
- * @domainname: The name of domain.
- *
- * Returns pointer to "struct tomoyo_domain_info" on success, NULL otherwise.
- */
-struct tomoyo_domain_info *tomoyo_undelete_domain(const char *domainname)
-{
-       struct tomoyo_domain_info *domain;
-       struct tomoyo_domain_info *candidate_domain = NULL;
-       struct tomoyo_path_info name;
-
-       name.name = domainname;
-       tomoyo_fill_path_info(&name);
-       /***** EXCLUSIVE SECTION START *****/
-       down_write(&tomoyo_domain_list_lock);
-#ifdef TOMOYO_DEBUG_DOMAIN_UNDELETE
-       printk(KERN_DEBUG "tomoyo_undelete_domain %s\n", domainname);
-       list_for_each_entry(domain, &tomoyo_domain_list, list) {
-               if (tomoyo_pathcmp(domain->domainname, &name))
-                       continue;
-               printk(KERN_DEBUG "List: %p %u\n", domain, domain->is_deleted);
-       }
-#endif
-       list_for_each_entry(domain, &tomoyo_domain_list, list) {
-               if (tomoyo_pathcmp(&name, domain->domainname))
-                       continue;
-               if (!domain->is_deleted) {
-                       /* This domain is active. I can't undelete. */
-                       candidate_domain = NULL;
-#ifdef TOMOYO_DEBUG_DOMAIN_UNDELETE
-                       printk(KERN_DEBUG "%p is active. I can't undelete.\n",
-                              domain);
-#endif
-                       break;
-               }
-               /* Is this domain undeletable? */
-               if (domain->is_deleted == 1)
-                       candidate_domain = domain;
-       }
-       if (candidate_domain) {
-               candidate_domain->is_deleted = 0;
-#ifdef TOMOYO_DEBUG_DOMAIN_UNDELETE
-               printk(KERN_DEBUG "%p was undeleted.\n", candidate_domain);
-#endif
-       }
-       up_write(&tomoyo_domain_list_lock);
-       /***** EXCLUSIVE SECTION END *****/
-       return candidate_domain;
-}
-
-/**
  * tomoyo_find_or_assign_new_domain - Create a domain.
  *
  * @domainname: The name of domain.
@@ -711,10 +631,6 @@ struct tomoyo_domain_info *tomoyo_find_or_assign_new_domain(const char *
                /***** CRITICAL SECTION END *****/
                if (flag)
                        continue;
-#ifdef TOMOYO_DEBUG_DOMAIN_UNDELETE
-               printk(KERN_DEBUG "Reusing %p %s\n", domain,
-                      domain->domainname->name);
-#endif
                list_for_each_entry(ptr, &domain->acl_info_list, list) {
                        ptr->type |= TOMOYO_ACL_DELETED;
                }
@@ -722,7 +638,7 @@ struct tomoyo_domain_info *tomoyo_find_or_assign_new_domain(const char *
                domain->profile = profile;
                domain->quota_warned = false;
                mb(); /* Avoid out-of-order execution. */
-               domain->is_deleted = 0;
+               domain->is_deleted = false;
                goto out;
        }
        /* No memory reusable. Create using new memory. */
index 7793d2a..0afd1a8 100644 (file)
@@ -238,6 +238,8 @@ static inline void pxa_ac97_cold_pxa3xx(void)
 
 bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
 {
+       unsigned long gsr;
+
 #ifdef CONFIG_PXA25x
        if (cpu_is_pxa25x())
                pxa_ac97_warm_pxa25x();
@@ -254,10 +256,10 @@ bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
        else
 #endif
                BUG();
-
-       if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) {
+       gsr = GSR | gsr_bits;
+       if (!(gsr & (GSR_PCR | GSR_SCR))) {
                printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
-                                __func__, gsr_bits);
+                                __func__, gsr);
 
                return false;
        }
@@ -268,6 +270,8 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset);
 
 bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
 {
+       unsigned long gsr;
+
 #ifdef CONFIG_PXA25x
        if (cpu_is_pxa25x())
                pxa_ac97_cold_pxa25x();
@@ -285,9 +289,10 @@ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
 #endif
                BUG();
 
-       if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) {
+       gsr = GSR | gsr_bits;
+       if (!(gsr & (GSR_PCR | GSR_SCR))) {
                printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
-                                __func__, gsr_bits);
+                                __func__, gsr);
 
                return false;
        }
index 28b3c7f..f2f41c8 100644 (file)
@@ -165,7 +165,7 @@ static struct snd_pcm_hardware atmel_abdac_hw = {
        .buffer_bytes_max       = 64 * 4096,
        .period_bytes_min       = 4096,
        .period_bytes_max       = 4096,
-       .periods_min            = 4,
+       .periods_min            = 6,
        .periods_max            = 64,
 };
 
@@ -502,7 +502,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, card);
 
        dev_info(&pdev->dev, "Atmel ABDAC at 0x%p using %s\n",
-                       dac->regs, dac->dma.chan->dev->device.bus_id);
+                       dac->regs, dev_name(&dac->dma.chan->dev->device));
 
        return retval;
 
index dd72e00..0c0f877 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Driver for the Atmel AC97C controller
+ * Driver for Atmel AC97C
  *
  * Copyright (C) 2005-2009 Atmel Corporation
  *
@@ -10,6 +10,7 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/bitmap.h>
+#include <linux/device.h>
 #include <linux/dmaengine.h>
 #include <linux/dma-mapping.h>
 #include <linux/init.h>
@@ -65,6 +66,7 @@ struct atmel_ac97c {
        /* Serialize access to opened variable */
        spinlock_t                      lock;
        void __iomem                    *regs;
+       int                             irq;
        int                             opened;
        int                             reset_pin;
 };
@@ -150,10 +152,10 @@ static struct snd_pcm_hardware atmel_ac97c_hw = {
        .rate_max               = 48000,
        .channels_min           = 1,
        .channels_max           = 2,
-       .buffer_bytes_max       = 64 * 4096,
+       .buffer_bytes_max       = 2 * 2 * 64 * 2048,
        .period_bytes_min       = 4096,
        .period_bytes_max       = 4096,
-       .periods_min            = 4,
+       .periods_min            = 6,
        .periods_max            = 64,
 };
 
@@ -297,9 +299,11 @@ static int atmel_ac97c_playback_prepare(struct snd_pcm_substream *substream)
 {
        struct atmel_ac97c *chip = snd_pcm_substream_chip(substream);
        struct snd_pcm_runtime *runtime = substream->runtime;
-       unsigned long word = 0;
+       unsigned long word = ac97c_readl(chip, OCA);
        int retval;
 
+       word &= ~(AC97C_CH_MASK(PCM_LEFT) | AC97C_CH_MASK(PCM_RIGHT));
+
        /* assign channels to AC97C channel A */
        switch (runtime->channels) {
        case 1:
@@ -312,7 +316,6 @@ static int atmel_ac97c_playback_prepare(struct snd_pcm_substream *substream)
        default:
                /* TODO: support more than two channels */
                return -EINVAL;
-               break;
        }
        ac97c_writel(chip, OCA, word);
 
@@ -324,13 +327,25 @@ static int atmel_ac97c_playback_prepare(struct snd_pcm_substream *substream)
                word |= AC97C_CMR_CEM_LITTLE;
                break;
        case SNDRV_PCM_FORMAT_S16_BE: /* fall through */
-       default:
                word &= ~(AC97C_CMR_CEM_LITTLE);
                break;
+       default:
+               word = ac97c_readl(chip, OCA);
+               word &= ~(AC97C_CH_MASK(PCM_LEFT) | AC97C_CH_MASK(PCM_RIGHT));
+               ac97c_writel(chip, OCA, word);
+               return -EINVAL;
        }
 
+       /* Enable underrun interrupt on channel A */
+       word |= AC97C_CSR_UNRUN;
+
        ac97c_writel(chip, CAMR, word);
 
+       /* Enable channel A event interrupt */
+       word = ac97c_readl(chip, IMR);
+       word |= AC97C_SR_CAEVT;
+       ac97c_writel(chip, IER, word);
+
        /* set variable rate if needed */
        if (runtime->rate != 48000) {
                word = ac97c_readl(chip, MR);
@@ -359,9 +374,11 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream)
 {
        struct atmel_ac97c *chip = snd_pcm_substream_chip(substream);
        struct snd_pcm_runtime *runtime = substream->runtime;
-       unsigned long word = 0;
+       unsigned long word = ac97c_readl(chip, ICA);
        int retval;
 
+       word &= ~(AC97C_CH_MASK(PCM_LEFT) | AC97C_CH_MASK(PCM_RIGHT));
+
        /* assign channels to AC97C channel A */
        switch (runtime->channels) {
        case 1:
@@ -374,7 +391,6 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream)
        default:
                /* TODO: support more than two channels */
                return -EINVAL;
-               break;
        }
        ac97c_writel(chip, ICA, word);
 
@@ -386,13 +402,25 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream)
                word |= AC97C_CMR_CEM_LITTLE;
                break;
        case SNDRV_PCM_FORMAT_S16_BE: /* fall through */
-       default:
                word &= ~(AC97C_CMR_CEM_LITTLE);
                break;
+       default:
+               word = ac97c_readl(chip, ICA);
+               word &= ~(AC97C_CH_MASK(PCM_LEFT) | AC97C_CH_MASK(PCM_RIGHT));
+               ac97c_writel(chip, ICA, word);
+               return -EINVAL;
        }
 
+       /* Enable overrun interrupt on channel A */
+       word |= AC97C_CSR_OVRUN;
+
        ac97c_writel(chip, CAMR, word);
 
+       /* Enable channel A event interrupt */
+       word = ac97c_readl(chip, IMR);
+       word |= AC97C_SR_CAEVT;
+       ac97c_writel(chip, IER, word);
+
        /* set variable rate if needed */
        if (runtime->rate != 48000) {
                word = ac97c_readl(chip, MR);
@@ -543,6 +571,43 @@ static struct snd_pcm_ops atmel_ac97_capture_ops = {
        .pointer        = atmel_ac97c_capture_pointer,
 };
 
+static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev)
+{
+       struct atmel_ac97c      *chip  = (struct atmel_ac97c *)dev;
+       irqreturn_t             retval = IRQ_NONE;
+       u32                     sr     = ac97c_readl(chip, SR);
+       u32                     casr   = ac97c_readl(chip, CASR);
+       u32                     cosr   = ac97c_readl(chip, COSR);
+
+       if (sr & AC97C_SR_CAEVT) {
+               dev_info(&chip->pdev->dev, "channel A event%s%s%s%s%s%s\n",
+                               casr & AC97C_CSR_OVRUN   ? " OVRUN"   : "",
+                               casr & AC97C_CSR_RXRDY   ? " RXRDY"   : "",
+                               casr & AC97C_CSR_UNRUN   ? " UNRUN"   : "",
+                               casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
+                               casr & AC97C_CSR_TXRDY   ? " TXRDY"   : "",
+                               !casr                    ? " NONE"    : "");
+               retval = IRQ_HANDLED;
+       }
+
+       if (sr & AC97C_SR_COEVT) {
+               dev_info(&chip->pdev->dev, "codec channel event%s%s%s%s%s\n",
+                               cosr & AC97C_CSR_OVRUN   ? " OVRUN"   : "",
+                               cosr & AC97C_CSR_RXRDY   ? " RXRDY"   : "",
+                               cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
+                               cosr & AC97C_CSR_TXRDY   ? " TXRDY"   : "",
+                               !cosr                    ? " NONE"    : "");
+               retval = IRQ_HANDLED;
+       }
+
+       if (retval == IRQ_NONE) {
+               dev_err(&chip->pdev->dev, "spurious interrupt sr 0x%08x "
+                               "casr 0x%08x cosr 0x%08x\n", sr, casr, cosr);
+       }
+
+       return retval;
+}
+
 static int __devinit atmel_ac97c_pcm_new(struct atmel_ac97c *chip)
 {
        struct snd_pcm          *pcm;
@@ -665,17 +730,17 @@ static bool filter(struct dma_chan *chan, void *slave)
 
 static void atmel_ac97c_reset(struct atmel_ac97c *chip)
 {
-       ac97c_writel(chip, MR, AC97C_MR_WRST);
+       ac97c_writel(chip, MR,   0);
+       ac97c_writel(chip, MR,   AC97C_MR_ENA);
+       ac97c_writel(chip, CAMR, 0);
+       ac97c_writel(chip, COMR, 0);
 
        if (gpio_is_valid(chip->reset_pin)) {
                gpio_set_value(chip->reset_pin, 0);
                /* AC97 v2.2 specifications says minimum 1 us. */
-               udelay(10);
+               udelay(2);
                gpio_set_value(chip->reset_pin, 1);
        }
-
-       udelay(1);
-       ac97c_writel(chip, MR, AC97C_MR_ENA);
 }
 
 static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
@@ -690,6 +755,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
                .read   = atmel_ac97c_read,
        };
        int                             retval;
+       int                             irq;
 
        regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!regs) {
@@ -703,6 +769,12 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
                return -ENXIO;
        }
 
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0) {
+               dev_dbg(&pdev->dev, "could not get irq\n");
+               return -ENXIO;
+       }
+
        pclk = clk_get(&pdev->dev, "pclk");
        if (IS_ERR(pclk)) {
                dev_dbg(&pdev->dev, "no peripheral clock\n");
@@ -719,6 +791,13 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
 
        chip = get_chip(card);
 
+       retval = request_irq(irq, atmel_ac97c_interrupt, 0, "AC97C", chip);
+       if (retval) {
+               dev_dbg(&pdev->dev, "unable to request irq %d\n", irq);
+               goto err_request_irq;
+       }
+       chip->irq = irq;
+
        spin_lock_init(&chip->lock);
 
        strcpy(card->driver, "Atmel AC97C");
@@ -747,14 +826,18 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
 
        snd_card_set_dev(card, &pdev->dev);
 
+       atmel_ac97c_reset(chip);
+
+       /* Enable overrun interrupt from codec channel */
+       ac97c_writel(chip, COMR, AC97C_CSR_OVRUN);
+       ac97c_writel(chip, IER, ac97c_readl(chip, IMR) | AC97C_SR_COEVT);
+
        retval = snd_ac97_bus(card, 0, &ops, chip, &chip->ac97_bus);
        if (retval) {
                dev_dbg(&pdev->dev, "could not register on ac97 bus\n");
                goto err_ac97_bus;
        }
 
-       atmel_ac97c_reset(chip);
-
        retval = atmel_ac97c_mixer_new(chip);
        if (retval) {
                dev_dbg(&pdev->dev, "could not register ac97 mixer\n");
@@ -773,7 +856,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
                chip->dma.rx_chan = dma_request_channel(mask, filter, dws);
 
                dev_info(&chip->pdev->dev, "using %s for DMA RX\n",
-                                       chip->dma.rx_chan->dev->device.bus_id);
+                               dev_name(&chip->dma.rx_chan->dev->device));
                set_bit(DMA_RX_CHAN_PRESENT, &chip->flags);
        }
 
@@ -789,7 +872,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
                chip->dma.tx_chan = dma_request_channel(mask, filter, dws);
 
                dev_info(&chip->pdev->dev, "using %s for DMA TX\n",
-                                       chip->dma.tx_chan->dev->device.bus_id);
+                               dev_name(&chip->dma.tx_chan->dev->device));
                set_bit(DMA_TX_CHAN_PRESENT, &chip->flags);
        }
 
@@ -809,7 +892,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
        retval = snd_card_register(card);
        if (retval) {
                dev_dbg(&pdev->dev, "could not register sound card\n");
-               goto err_ac97_bus;
+               goto err_dma;
        }
 
        platform_set_drvdata(pdev, card);
@@ -836,6 +919,8 @@ err_ac97_bus:
 
        iounmap(chip->regs);
 err_ioremap:
+       free_irq(irq, chip);
+err_request_irq:
        snd_card_free(card);
 err_snd_card_new:
        clk_disable(pclk);
@@ -884,9 +969,14 @@ static int __devexit atmel_ac97c_remove(struct platform_device *pdev)
        if (gpio_is_valid(chip->reset_pin))
                gpio_free(chip->reset_pin);
 
+       ac97c_writel(chip, CAMR, 0);
+       ac97c_writel(chip, COMR, 0);
+       ac97c_writel(chip, MR,   0);
+
        clk_disable(chip->pclk);
        clk_put(chip->pclk);
        iounmap(chip->regs);
+       free_irq(chip->irq, chip);
 
        if (test_bit(DMA_RX_CHAN_PRESENT, &chip->flags))
                dma_release_channel(chip->dma.rx_chan);
index c17bd58..ecbba50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Register definitions for the Atmel AC97C controller
+ * Register definitions for Atmel AC97C
  *
  * Copyright (C) 2005-2009 Atmel Corporation
  *
 #define AC97C_CATHR            0x24
 #define AC97C_CASR             0x28
 #define AC97C_CAMR             0x2c
-#define AC97C_CBRHR            0x30
-#define AC97C_CBTHR            0x34
-#define AC97C_CBSR             0x38
-#define AC97C_CBMR             0x3c
 #define AC97C_CORHR            0x40
 #define AC97C_COTHR            0x44
 #define AC97C_COSR             0x48
 #define AC97C_MR_VRA           (1 << 2)
 
 #define AC97C_CSR_TXRDY                (1 << 0)
+#define AC97C_CSR_TXEMPTY      (1 << 1)
 #define AC97C_CSR_UNRUN                (1 << 2)
 #define AC97C_CSR_RXRDY                (1 << 4)
+#define AC97C_CSR_OVRUN                (1 << 5)
 #define AC97C_CSR_ENDTX                (1 << 10)
 #define AC97C_CSR_ENDRX                (1 << 14)
 
 #define AC97C_CMR_DMAEN                (1 << 22)
 
 #define AC97C_SR_CAEVT         (1 << 3)
+#define AC97C_SR_COEVT         (1 << 2)
+#define AC97C_SR_WKUP          (1 << 1)
+#define AC97C_SR_SOF           (1 << 0)
 
+#define AC97C_CH_MASK(slot)                                            \
+       (0x7 << (3 * (AC97_SLOT_##slot - 3)))
 #define AC97C_CH_ASSIGN(slot, channel)                                 \
        (AC97C_CHANNEL_##channel << (3 * (AC97_SLOT_##slot - 3)))
 #define AC97C_CHANNEL_NONE     0x0
 #define AC97C_CHANNEL_A                0x1
-#define AC97C_CHANNEL_B                0x2
 
 #endif /* __SOUND_ATMEL_AC97C_H */
index e570649..5dcd8a5 100644 (file)
@@ -703,19 +703,27 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
        if (left || right) {
                if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH)
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
+               if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH)
+                       snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
                if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH)
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
                if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE)
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
+               if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE)
+                       snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
                if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE)
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
        } else {
                if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH) {
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
+               } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH) {
+                       snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
                } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH) {
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
                } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE) {
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
+               } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE) {
+                       snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
                } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE) {
                        snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
                }
index ef95279..0481a55 100644 (file)
@@ -481,6 +481,7 @@ OPL3SA2_DOUBLE_TLV("Master Playback Volume", 0, 0x07, 0x08, 0, 0, 15, 1,
 OPL3SA2_SINGLE("Mic Playback Switch", 0, 0x09, 7, 1, 1),
 OPL3SA2_SINGLE_TLV("Mic Playback Volume", 0, 0x09, 0, 31, 1,
                   db_scale_5bit_12db_max),
+OPL3SA2_SINGLE("ZV Port Switch", 0, 0x02, 0, 1, 0),
 };
 
 static struct snd_kcontrol_new snd_opl3sa2_tone_controls[] = {
index d1f242b..8f5098f 100644 (file)
@@ -909,8 +909,8 @@ snd_ad1889_create(struct snd_card *card,
                return err;
 
        /* check PCI availability (32bit DMA) */
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
                printk(KERN_ERR PFX "error setting 32-bit DMA mask.\n");
                pci_disable_device(pci);
                return -ENXIO;
index 4edf270..c551006 100644 (file)
@@ -2186,8 +2186,8 @@ static int __devinit snd_ali_create(struct snd_card *card,
        if (err < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 31 bits */
-       if (pci_set_dma_mask(pci, DMA_31BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_31BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(31)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(31)) < 0) {
                snd_printk(KERN_ERR "architecture does not support "
                           "31bit PCI busmaster DMA\n");
                pci_disable_device(pci);
index 009b4c8..3aa35af 100644 (file)
@@ -689,8 +689,8 @@ static int __devinit snd_als300_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
 
-       if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-               pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+               pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
                printk(KERN_ERR "error setting 28bit DMA mask\n");
                pci_disable_device(pci);
                return -ENXIO;
index 542a0c6..3dbacde 100644 (file)
@@ -872,8 +872,8 @@ static int __devinit snd_card_als4000_probe(struct pci_dev *pci,
                return err;
        }
        /* check, if we can restrict PCI DMA transfers to 24 bits */
-       if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index 9ec1223..7b72c88 100644 (file)
@@ -151,8 +151,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
        // check PCI availability (DMA).
        if ((err = pci_enable_device(pci)) < 0)
                return err;
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
                printk(KERN_ERR "error to set DMA mask\n");
                pci_disable_device(pci);
                return -ENXIO;
index 8eea29f..4d34bb0 100644 (file)
@@ -279,8 +279,8 @@ static int __devinit snd_aw2_create(struct snd_card *card,
        pci_set_master(pci);
 
        /* check PCI availability (32bit DMA) */
-       if ((pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) ||
-           (pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0)) {
+       if ((pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) ||
+           (pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0)) {
                printk(KERN_ERR "aw2: Impossible to set 32bit mask DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index e9e9b58..f290bc5 100644 (file)
@@ -2125,8 +2125,8 @@ snd_azf3328_create(struct snd_card *card,
        chip->irq = -1;
 
        /* check if we can restrict PCI DMA transfers to 24 bits */
-       if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support "
                                        "24bit PCI busmaster DMA\n"
                );
index df75757..bfac30f 100644 (file)
@@ -1589,8 +1589,8 @@ static int __devinit snd_ca0106_create(int dev, struct snd_card *card,
        err = pci_enable_device(pci);
        if (err < 0)
                return err;
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
                printk(KERN_ERR "error to set 32bit mask DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index c89ed1f..05f56e0 100644 (file)
@@ -285,8 +285,8 @@ static int __devinit snd_cs5535audio_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
 
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
                printk(KERN_WARNING "unable to get 32bit dma\n");
                err = -ENXIO;
                goto pcifail;
index 31542ad..1970f0e 100644 (file)
@@ -897,8 +897,8 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
 
        if ((err = pci_enable_device(pci)) < 0)
                return err;
-       if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
                snd_printk(KERN_ERR "error to set 28bit mask DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index dd63b13..fbd2ac0 100644 (file)
@@ -1608,8 +1608,8 @@ static int __devinit snd_es1938_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
         /* check, if we can restrict PCI DMA transfers to 24 bits */
-       if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                 return -ENXIO;
index dc97e81..a11f453 100644 (file)
@@ -2539,8 +2539,8 @@ static int __devinit snd_es1968_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 28 bits */
-       if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index 5bb48ee..38ad3f7 100644 (file)
@@ -3256,7 +3256,7 @@ static const char *ad1884_slave_vols[] = {
        "Mic Playback Volume",
        "CD Playback Volume",
        "Internal Mic Playback Volume",
-       "Docking Mic Playback Volume"
+       "Docking Mic Playback Volume",
        /* "Beep Playback Volume", */
        "IEC958 Playback Volume",
        NULL
index 8209779..f35e58a 100644 (file)
@@ -8764,6 +8764,10 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
        {}
 };
 
+static hda_nid_t alc883_slave_dig_outs[] = {
+       ALC1200_DIGOUT_NID, 0,
+};
+
 static hda_nid_t alc1200_slave_dig_outs[] = {
        ALC883_DIGOUT_NID, 0,
 };
@@ -8809,6 +8813,7 @@ static struct alc_config_preset alc883_presets[] = {
                .dac_nids = alc883_dac_nids,
                .dig_out_nid = ALC883_DIGOUT_NID,
                .dig_in_nid = ALC883_DIGIN_NID,
+               .slave_dig_outs = alc883_slave_dig_outs,
                .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_intel_modes),
                .channel_mode = alc883_3ST_6ch_intel_modes,
                .need_dac_fix = 1,
index b5e108a..61996a2 100644 (file)
@@ -4413,6 +4413,24 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
                if (spec->num_pwrs > 0)
                        stac92xx_pin_sense(codec, event->nid);
                stac92xx_report_jack(codec, event->nid);
+
+               switch (codec->subsystem_id) {
+               case 0x103c308f:
+                       if (event->nid == 0xb) {
+                               int pin = AC_PINCTL_IN_EN;
+
+                               if (get_pin_presence(codec, 0xa)
+                                               && get_pin_presence(codec, 0xb))
+                                       pin |= AC_PINCTL_VREF_80;
+                               if (!get_pin_presence(codec, 0xb))
+                                       pin |= AC_PINCTL_VREF_80;
+
+                               /* toggle VREF state based on mic + hp pin
+                                * status
+                                */
+                               stac92xx_auto_set_pinctl(codec, 0x0a, pin);
+                       }
+               }
                break;
        case STAC_VREF_EVENT:
                data = snd_hda_codec_read(codec, codec->afg, 0,
@@ -4895,6 +4913,7 @@ again:
        switch (codec->vendor_id) {
        case 0x111d7604:
        case 0x111d7605:
+       case 0x111d76d5:
                if (spec->board_config == STAC_92HD83XXX_PWR_REF)
                        break;
                spec->num_pwrs = 0;
@@ -5707,6 +5726,7 @@ static struct hda_codec_preset snd_hda_preset_sigmatel[] = {
        { .id = 0x111d7603, .name = "92HD75B3X5", .patch = patch_stac92hd71bxx},
        { .id = 0x111d7604, .name = "92HD83C1X5", .patch = patch_stac92hd83xxx},
        { .id = 0x111d7605, .name = "92HD81B1X5", .patch = patch_stac92hd83xxx},
+       { .id = 0x111d76d5, .name = "92HD81B1C5", .patch = patch_stac92hd83xxx},
        { .id = 0x111d7608, .name = "92HD75B2X5", .patch = patch_stac92hd71bxx},
        { .id = 0x111d7674, .name = "92HD73D1X5", .patch = patch_stac92hd73xx },
        { .id = 0x111d7675, .name = "92HD73C1X5", .patch = patch_stac92hd73xx },
index 3dd63f1..0d0cdbd 100644 (file)
@@ -2533,8 +2533,8 @@ static int __devinit snd_ice1712_create(struct snd_card *card,
        if (err < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 28 bits */
-       if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index 7014154..75283fb 100644 (file)
@@ -2530,8 +2530,8 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
                return -EIO;
 
        /* check, if we can restrict PCI DMA transfers to 28 bits */
-       if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index c1eb84a..82bc5b9 100644 (file)
@@ -1291,7 +1291,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
        pci_set_master(pci);
 
        /* check if we can restrict PCI DMA transfers to 32 bits */
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 32bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index 80e064a..833e9c7 100644 (file)
@@ -1449,7 +1449,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci,
        pci_set_master(pci);
 
        /* check if we can restrict PCI DMA transfers to 32 bits */
-       if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
                snd_printk(KERN_ERR "architecture does not support "
                           "32bit PCI busmaster DMA\n");
                pci_disable_device(pci);
index baf6d8e..1a5ff06 100644 (file)
@@ -1300,7 +1300,7 @@ static int __devinit sis_chip_create(struct snd_card *card,
        if (rc)
                goto error_out;
 
-       if (pci_set_dma_mask(pci, DMA_30BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0) {
                printk(KERN_ERR "sis7019: architecture does not support "
                                        "30-bit PCI busmaster DMA");
                goto error_out_enabled;
index d989215..7dc60ad 100644 (file)
@@ -1264,8 +1264,8 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 24 bits */
-        if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+        if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                 return -ENXIO;
index a9da9c1..6d943f6 100644 (file)
@@ -3559,8 +3559,8 @@ int __devinit snd_trident_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 30 bits */
-       if (pci_set_dma_mask(pci, DMA_30BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_30BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(30)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 30bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index 5a92906..a2b69b8 100644 (file)
@@ -51,7 +51,7 @@ static struct platform_device *device;
 /*
  */
 
-static int __init snd_pmac_probe(struct platform_device *devptr)
+static int __devinit snd_pmac_probe(struct platform_device *devptr)
 {
        struct snd_card *card;
        struct snd_pmac *chip;
index 8cfed1a..cf0dfb7 100644 (file)
@@ -413,7 +413,7 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
                sport_done(sport_handle);
 }
 
-static u64 bf5xx_pcm_dmamask = DMA_32BIT_MASK;
+static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
 
 int bf5xx_pcm_ac97_new(struct snd_card *card, struct snd_soc_dai *dai,
        struct snd_pcm *pcm)
@@ -424,7 +424,7 @@ int bf5xx_pcm_ac97_new(struct snd_card *card, struct snd_soc_dai *dai,
        if (!card->dev->dma_mask)
                card->dev->dma_mask = &bf5xx_pcm_dmamask;
        if (!card->dev->coherent_dma_mask)
-               card->dev->coherent_dma_mask = DMA_32BIT_MASK;
+               card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
 
        if (dai->playback.channels_min) {
                ret = bf5xx_pcm_preallocate_dma_buffer(pcm,
index 1318c4f..62fbb84 100644 (file)
@@ -245,7 +245,7 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
                sport_done(sport_handle);
 }
 
-static u64 bf5xx_pcm_dmamask = DMA_32BIT_MASK;
+static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
 
 int bf5xx_pcm_i2s_new(struct snd_card *card, struct snd_soc_dai *dai,
        struct snd_pcm *pcm)
@@ -256,7 +256,7 @@ int bf5xx_pcm_i2s_new(struct snd_card *card, struct snd_soc_dai *dai,
        if (!card->dev->dma_mask)
                card->dev->dma_mask = &bf5xx_pcm_dmamask;
        if (!card->dev->coherent_dma_mask)
-               card->dev->coherent_dma_mask = DMA_32BIT_MASK;
+               card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
 
        if (dai->playback.channels_min) {
                ret = bf5xx_pcm_preallocate_dma_buffer(pcm,
index 1f63d38..dd33802 100644 (file)
@@ -659,7 +659,8 @@ static int ak4535_remove(struct platform_device *pdev)
        snd_soc_free_pcms(socdev);
        snd_soc_dapm_free(socdev);
 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
-       i2c_unregister_device(codec->control_data);
+       if (codec->control_data)
+               i2c_unregister_device(codec->control_data);
        i2c_del_driver(&ak4535_i2c_driver);
 #endif
        kfree(codec->private_data);
index 97738e2..921b205 100644 (file)
@@ -122,6 +122,9 @@ struct twl4030_priv {
        unsigned int bypass_state;
        unsigned int codec_powered;
        unsigned int codec_muted;
+
+       struct snd_pcm_substream *master_substream;
+       struct snd_pcm_substream *slave_substream;
 };
 
 /*
@@ -1217,6 +1220,52 @@ static int twl4030_set_bias_level(struct snd_soc_codec *codec,
        return 0;
 }
 
+static int twl4030_startup(struct snd_pcm_substream *substream,
+                          struct snd_soc_dai *dai)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_device *socdev = rtd->socdev;
+       struct snd_soc_codec *codec = socdev->card->codec;
+       struct twl4030_priv *twl4030 = codec->private_data;
+
+       /* If we already have a playback or capture going then constrain
+        * this substream to match it.
+        */
+       if (twl4030->master_substream) {
+               struct snd_pcm_runtime *master_runtime;
+               master_runtime = twl4030->master_substream->runtime;
+
+               snd_pcm_hw_constraint_minmax(substream->runtime,
+                                            SNDRV_PCM_HW_PARAM_RATE,
+                                            master_runtime->rate,
+                                            master_runtime->rate);
+
+               snd_pcm_hw_constraint_minmax(substream->runtime,
+                                            SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
+                                            master_runtime->sample_bits,
+                                            master_runtime->sample_bits);
+
+               twl4030->slave_substream = substream;
+       } else
+               twl4030->master_substream = substream;
+
+       return 0;
+}
+
+static void twl4030_shutdown(struct snd_pcm_substream *substream,
+                            struct snd_soc_dai *dai)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_device *socdev = rtd->socdev;
+       struct snd_soc_codec *codec = socdev->card->codec;
+       struct twl4030_priv *twl4030 = codec->private_data;
+
+       if (twl4030->master_substream == substream)
+               twl4030->master_substream = twl4030->slave_substream;
+
+       twl4030->slave_substream = NULL;
+}
+
 static int twl4030_hw_params(struct snd_pcm_substream *substream,
                           struct snd_pcm_hw_params *params,
                           struct snd_soc_dai *dai)
@@ -1224,8 +1273,13 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_device *socdev = rtd->socdev;
        struct snd_soc_codec *codec = socdev->card->codec;
+       struct twl4030_priv *twl4030 = codec->private_data;
        u8 mode, old_mode, format, old_format;
 
+       if (substream == twl4030->slave_substream)
+               /* Ignoring hw_params for slave substream */
+               return 0;
+
        /* bit rate */
        old_mode = twl4030_read_reg_cache(codec,
                        TWL4030_REG_CODEC_MODE) & ~TWL4030_CODECPDZ;
@@ -1259,6 +1313,9 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,
        case 48000:
                mode |= TWL4030_APLL_RATE_48000;
                break;
+       case 96000:
+               mode |= TWL4030_APLL_RATE_96000;
+               break;
        default:
                printk(KERN_ERR "TWL4030 hw params: unknown rate %d\n",
                        params_rate(params));
@@ -1384,6 +1441,8 @@ static int twl4030_set_dai_fmt(struct snd_soc_dai *codec_dai,
 #define TWL4030_FORMATS         (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE)
 
 static struct snd_soc_dai_ops twl4030_dai_ops = {
+       .startup        = twl4030_startup,
+       .shutdown       = twl4030_shutdown,
        .hw_params      = twl4030_hw_params,
        .set_sysclk     = twl4030_set_dai_sysclk,
        .set_fmt        = twl4030_set_dai_fmt,
@@ -1395,7 +1454,7 @@ struct snd_soc_dai twl4030_dai = {
                .stream_name = "Playback",
                .channels_min = 2,
                .channels_max = 2,
-               .rates = TWL4030_RATES,
+               .rates = TWL4030_RATES | SNDRV_PCM_RATE_96000,
                .formats = TWL4030_FORMATS,},
        .capture = {
                .stream_name = "Capture",
index 33dbb14..cb63765 100644 (file)
 #define TWL4030_APLL_RATE_32000                0x80
 #define TWL4030_APLL_RATE_44100                0x90
 #define TWL4030_APLL_RATE_48000                0xA0
+#define TWL4030_APLL_RATE_96000                0xE0
 #define TWL4030_SEL_16K                        0x04
 #define TWL4030_CODECPDZ               0x02
 #define TWL4030_OPT_MODE               0x01
index 3265817..6e23a81 100644 (file)
@@ -317,6 +317,41 @@ static int wm9705_reset(struct snd_soc_codec *codec)
        return -EIO;
 }
 
+#ifdef CONFIG_PM
+static int wm9705_soc_suspend(struct platform_device *pdev)
+{
+       struct snd_soc_device *socdev = platform_get_drvdata(pdev);
+       struct snd_soc_codec *codec = socdev->card->codec;
+
+       soc_ac97_ops.write(codec->ac97, AC97_POWERDOWN, 0xffff);
+
+       return 0;
+}
+
+static int wm9705_soc_resume(struct platform_device *pdev)
+{
+       struct snd_soc_device *socdev = platform_get_drvdata(pdev);
+       struct snd_soc_codec *codec = socdev->card->codec;
+       int i, ret;
+       u16 *cache = codec->reg_cache;
+
+       ret = wm9705_reset(codec);
+       if (ret < 0) {
+               printk(KERN_ERR "could not reset AC97 codec\n");
+               return ret;
+       }
+
+       for (i = 2; i < ARRAY_SIZE(wm9705_reg) << 1; i += 2) {
+               soc_ac97_ops.write(codec->ac97, i, cache[i>>1]);
+       }
+
+       return 0;
+}
+#else
+#define wm9705_soc_suspend NULL
+#define wm9705_soc_resume NULL
+#endif
+
 static int wm9705_soc_probe(struct platform_device *pdev)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
@@ -407,6 +442,8 @@ static int wm9705_soc_remove(struct platform_device *pdev)
 struct snd_soc_codec_device soc_codec_dev_wm9705 = {
        .probe =        wm9705_soc_probe,
        .remove =       wm9705_soc_remove,
+       .suspend =      wm9705_soc_suspend,
+       .resume =       wm9705_soc_resume,
 };
 EXPORT_SYMBOL_GPL(soc_codec_dev_wm9705);
 
index b3eb857..b1a3a27 100644 (file)
@@ -300,7 +300,7 @@ static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai,
        if (!card->dev->coherent_dma_mask)
                card->dev->coherent_dma_mask = fsl_dma_dmamask;
 
-       ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->dev,
+       ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
                fsl_dma_hardware.buffer_bytes_max,
                &pcm->streams[0].substream->dma_buffer);
        if (ret) {
@@ -310,7 +310,7 @@ static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai,
                return -ENOMEM;
        }
 
-       ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->dev,
+       ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
                fsl_dma_hardware.buffer_bytes_max,
                &pcm->streams[1].substream->dma_buffer);
        if (ret) {
@@ -418,7 +418,7 @@ static int fsl_dma_open(struct snd_pcm_substream *substream)
                return -EBUSY;
        }
 
-       dma_private = dma_alloc_coherent(substream->pcm->dev,
+       dma_private = dma_alloc_coherent(substream->pcm->card->dev,
                sizeof(struct fsl_dma_private), &ld_buf_phys, GFP_KERNEL);
        if (!dma_private) {
                dev_err(substream->pcm->card->dev,
@@ -445,7 +445,7 @@ static int fsl_dma_open(struct snd_pcm_substream *substream)
                dev_err(substream->pcm->card->dev,
                        "can't register ISR for IRQ %u (ret=%i)\n",
                        dma_private->irq, ret);
-               dma_free_coherent(substream->pcm->dev,
+               dma_free_coherent(substream->pcm->card->dev,
                        sizeof(struct fsl_dma_private),
                        dma_private, dma_private->ld_buf_phys);
                return ret;
@@ -697,6 +697,23 @@ static snd_pcm_uframes_t fsl_dma_pointer(struct snd_pcm_substream *substream)
        else
                position = in_be32(&dma_channel->dar);
 
+       /*
+        * When capture is started, the SSI immediately starts to fill its FIFO.
+        * This means that the DMA controller is not started until the FIFO is
+        * full.  However, ALSA calls this function before that happens, when
+        * MR.DAR is still zero.  In this case, just return zero to indicate
+        * that nothing has been received yet.
+        */
+       if (!position)
+               return 0;
+
+       if ((position < dma_private->dma_buf_phys) ||
+           (position > dma_private->dma_buf_end)) {
+               dev_err(substream->pcm->card->dev,
+                       "dma pointer is out of range, halting stream\n");
+               return SNDRV_PCM_POS_XRUN;
+       }
+
        frames = bytes_to_frames(runtime, position - dma_private->dma_buf_phys);
 
        /*
@@ -761,13 +778,13 @@ static int fsl_dma_close(struct snd_pcm_substream *substream)
                        free_irq(dma_private->irq, dma_private);
 
                if (dma_private->ld_buf_phys) {
-                       dma_unmap_single(substream->pcm->dev,
+                       dma_unmap_single(substream->pcm->card->dev,
                                dma_private->ld_buf_phys,
                                sizeof(dma_private->link), DMA_TO_DEVICE);
                }
 
                /* Deallocate the fsl_dma_private structure */
-               dma_free_coherent(substream->pcm->dev,
+               dma_free_coherent(substream->pcm->card->dev,
                        sizeof(struct fsl_dma_private),
                        dma_private, dma_private->ld_buf_phys);
                substream->runtime->private_data = NULL;
index 169bca2..3711d84 100644 (file)
         SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE)
 #endif
 
+/* SIER bitflag of interrupts to enable */
+#define SIER_FLAGS (CCSR_SSI_SIER_TFRC_EN | CCSR_SSI_SIER_TDMAE | \
+                   CCSR_SSI_SIER_TIE | CCSR_SSI_SIER_TUE0_EN | \
+                   CCSR_SSI_SIER_TUE1_EN | CCSR_SSI_SIER_RFRC_EN | \
+                   CCSR_SSI_SIER_RDMAE | CCSR_SSI_SIER_RIE | \
+                   CCSR_SSI_SIER_ROE0_EN | CCSR_SSI_SIER_ROE1_EN)
+
 /**
  * fsl_ssi_private: per-SSI private data
  *
@@ -140,7 +147,7 @@ static irqreturn_t fsl_ssi_isr(int irq, void *dev_id)
           were interrupted for.  We mask it with the Interrupt Enable register
           so that we only check for events that we're interested in.
         */
-       sisr = in_be32(&ssi->sisr) & in_be32(&ssi->sier);
+       sisr = in_be32(&ssi->sisr) & SIER_FLAGS;
 
        if (sisr & CCSR_SSI_SISR_RFRC) {
                ssi_private->stats.rfrc++;
@@ -324,12 +331,7 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream,
                 */
 
                /* 4. Enable the interrupts and DMA requests */
-               out_be32(&ssi->sier,
-                        CCSR_SSI_SIER_TFRC_EN | CCSR_SSI_SIER_TDMAE |
-                        CCSR_SSI_SIER_TIE | CCSR_SSI_SIER_TUE0_EN |
-                        CCSR_SSI_SIER_TUE1_EN | CCSR_SSI_SIER_RFRC_EN |
-                        CCSR_SSI_SIER_RDMAE | CCSR_SSI_SIER_RIE |
-                        CCSR_SSI_SIER_ROE0_EN | CCSR_SSI_SIER_ROE1_EN);
+               out_be32(&ssi->sier, SIER_FLAGS);
 
                /*
                 * Set the watermark for transmit FIFI 0 and receive FIFO 0. We
@@ -466,28 +468,12 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd,
        case SNDRV_PCM_TRIGGER_START:
                clrbits32(&ssi->scr, CCSR_SSI_SCR_SSIEN);
        case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
-               if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+               if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
                        setbits32(&ssi->scr,
                                CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE);
-               } else {
-                       long timeout = jiffies + 10;
-
+               else
                        setbits32(&ssi->scr,
                                CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_RE);
-
-                       /* Wait until the SSI has filled its FIFO. Without this
-                        * delay, ALSA complains about overruns.  When the FIFO
-                        * is full, the DMA controller initiates its first
-                        * transfer.  Until then, however, the DMA's DAR
-                        * register is zero, which translates to an
-                        * out-of-bounds pointer.  This makes ALSA think an
-                        * overrun has occurred.
-                        */
-                       while (!(in_be32(&ssi->sisr) & CCSR_SSI_SISR_RFF0) &&
-                              (jiffies < timeout));
-                       if (!(in_be32(&ssi->sisr) & CCSR_SSI_SISR_RFF0))
-                               return -EIO;
-               }
                break;
 
        case SNDRV_PCM_TRIGGER_STOP:
@@ -606,39 +592,52 @@ static struct snd_soc_dai fsl_ssi_dai_template = {
        .ops = &fsl_ssi_dai_ops,
 };
 
+/* Show the statistics of a flag only if its interrupt is enabled.  The
+ * compiler will optimze this code to a no-op if the interrupt is not
+ * enabled.
+ */
+#define SIER_SHOW(flag, name) \
+       do { \
+               if (SIER_FLAGS & CCSR_SSI_SIER_##flag) \
+                       length += sprintf(buf + length, #name "=%u\n", \
+                               ssi_private->stats.name); \
+       } while (0)
+
+
 /**
  * fsl_sysfs_ssi_show: display SSI statistics
  *
- * Display the statistics for the current SSI device.
+ * Display the statistics for the current SSI device.  To avoid confusion,
+ * we only show those counts that are enabled.
  */
 static ssize_t fsl_sysfs_ssi_show(struct device *dev,
        struct device_attribute *attr, char *buf)
 {
        struct fsl_ssi_private *ssi_private =
-       container_of(attr, struct fsl_ssi_private, dev_attr);
-       ssize_t length;
-
-       length = sprintf(buf, "rfrc=%u", ssi_private->stats.rfrc);
-       length += sprintf(buf + length, "\ttfrc=%u", ssi_private->stats.tfrc);
-       length += sprintf(buf + length, "\tcmdau=%u", ssi_private->stats.cmdau);
-       length += sprintf(buf + length, "\tcmddu=%u", ssi_private->stats.cmddu);
-       length += sprintf(buf + length, "\trxt=%u", ssi_private->stats.rxt);
-       length += sprintf(buf + length, "\trdr1=%u", ssi_private->stats.rdr1);
-       length += sprintf(buf + length, "\trdr0=%u", ssi_private->stats.rdr0);
-       length += sprintf(buf + length, "\ttde1=%u", ssi_private->stats.tde1);
-       length += sprintf(buf + length, "\ttde0=%u", ssi_private->stats.tde0);
-       length += sprintf(buf + length, "\troe1=%u", ssi_private->stats.roe1);
-       length += sprintf(buf + length, "\troe0=%u", ssi_private->stats.roe0);
-       length += sprintf(buf + length, "\ttue1=%u", ssi_private->stats.tue1);
-       length += sprintf(buf + length, "\ttue0=%u", ssi_private->stats.tue0);
-       length += sprintf(buf + length, "\ttfs=%u", ssi_private->stats.tfs);
-       length += sprintf(buf + length, "\trfs=%u", ssi_private->stats.rfs);
-       length += sprintf(buf + length, "\ttls=%u", ssi_private->stats.tls);
-       length += sprintf(buf + length, "\trls=%u", ssi_private->stats.rls);
-       length += sprintf(buf + length, "\trff1=%u", ssi_private->stats.rff1);
-       length += sprintf(buf + length, "\trff0=%u", ssi_private->stats.rff0);
-       length += sprintf(buf + length, "\ttfe1=%u", ssi_private->stats.tfe1);
-       length += sprintf(buf + length, "\ttfe0=%u\n", ssi_private->stats.tfe0);
+               container_of(attr, struct fsl_ssi_private, dev_attr);
+       ssize_t length = 0;
+
+       SIER_SHOW(RFRC_EN, rfrc);
+       SIER_SHOW(TFRC_EN, tfrc);
+       SIER_SHOW(CMDAU_EN, cmdau);
+       SIER_SHOW(CMDDU_EN, cmddu);
+       SIER_SHOW(RXT_EN, rxt);
+       SIER_SHOW(RDR1_EN, rdr1);
+       SIER_SHOW(RDR0_EN, rdr0);
+       SIER_SHOW(TDE1_EN, tde1);
+       SIER_SHOW(TDE0_EN, tde0);
+       SIER_SHOW(ROE1_EN, roe1);
+       SIER_SHOW(ROE0_EN, roe0);
+       SIER_SHOW(TUE1_EN, tue1);
+       SIER_SHOW(TUE0_EN, tue0);
+       SIER_SHOW(TFS_EN, tfs);
+       SIER_SHOW(RFS_EN, rfs);
+       SIER_SHOW(TLS_EN, tls);
+       SIER_SHOW(RLS_EN, rls);
+       SIER_SHOW(RFF1_EN, rff1);
+       SIER_SHOW(RFF0_EN, rff0);
+       SIER_SHOW(TFE1_EN, tfe1);
+       SIER_SHOW(TFE0_EN, tfe0);
 
        return length;
 }
index d6882be..9c09b94 100644 (file)
@@ -146,6 +146,17 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream,
        struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data);
        int err = 0;
 
+       if (cpu_is_omap343x() && mcbsp_data->bus_id == 1) {
+               /*
+                * McBSP2 in OMAP3 has 1024 * 32-bit internal audio buffer.
+                * Set constraint for minimum buffer size to the same than FIFO
+                * size in order to avoid underruns in playback startup because
+                * HW is keeping the DMA request active until FIFO is filled.
+                */
+               snd_pcm_hw_constraint_minmax(substream->runtime,
+                       SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 4096, UINT_MAX);
+       }
+
        if (!cpu_dai->active)
                err = omap_mcbsp_request(mcbsp_data->bus_id);
 
index 8e1431c..1bdbb04 100644 (file)
@@ -327,7 +327,7 @@ int omap_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
        if (!card->dev->dma_mask)
                card->dev->dma_mask = &omap_pcm_dmamask;
        if (!card->dev->coherent_dma_mask)
-               card->dev->coherent_dma_mask = DMA_32BIT_MASK;
+               card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
 
        if (dai->playback.channels_min) {
                ret = omap_pcm_preallocate_dma_buffer(pcm,
index 5998ab3..ad8a10f 100644 (file)
@@ -116,6 +116,16 @@ config SND_SOC_ZYLONITE
          Say Y if you want to add support for SoC audio on the
          Marvell Zylonite reference platform.
 
+config SND_PXA2XX_SOC_MAGICIAN
+       tristate "SoC Audio support for HTC Magician"
+       depends on SND_PXA2XX_SOC && MACH_MAGICIAN
+       select SND_PXA2XX_SOC_I2S
+       select SND_PXA_SOC_SSP
+       select SND_SOC_UDA1380
+       help
+         Say Y if you want to add support for SoC audio on the
+         HTC Magician.
+
 config SND_PXA2XX_SOC_MIOA701
         tristate "SoC Audio support for MIO A701"
         depends on SND_PXA2XX_SOC && MACH_MIOA701
index 8ed881c..4b90c3c 100644 (file)
@@ -20,6 +20,7 @@ snd-soc-spitz-objs := spitz.o
 snd-soc-em-x270-objs := em-x270.o
 snd-soc-palm27x-objs := palm27x.o
 snd-soc-zylonite-objs := zylonite.o
+snd-soc-magician-objs := magician.o
 snd-soc-mioa701-objs := mioa701_wm9713.o
 
 obj-$(CONFIG_SND_PXA2XX_SOC_CORGI) += snd-soc-corgi.o
@@ -31,5 +32,6 @@ obj-$(CONFIG_SND_PXA2XX_SOC_E800) += snd-soc-e800.o
 obj-$(CONFIG_SND_PXA2XX_SOC_SPITZ) += snd-soc-spitz.o
 obj-$(CONFIG_SND_PXA2XX_SOC_EM_X270) += snd-soc-em-x270.o
 obj-$(CONFIG_SND_PXA2XX_SOC_PALM27X) += snd-soc-palm27x.o
+obj-$(CONFIG_SND_PXA2XX_SOC_MAGICIAN) += snd-soc-magician.o
 obj-$(CONFIG_SND_PXA2XX_SOC_MIOA701) += snd-soc-mioa701.o
 obj-$(CONFIG_SND_SOC_ZYLONITE) += snd-soc-zylonite.o
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c
new file mode 100644 (file)
index 0000000..f7c4544
--- /dev/null
@@ -0,0 +1,560 @@
+/*
+ * SoC audio for HTC Magician
+ *
+ * Copyright (c) 2006 Philipp Zabel <philipp.zabel@gmail.com>
+ *
+ * based on spitz.c,
+ * Authors: Liam Girdwood <lrg@slimlogic.co.uk>
+ *          Richard Purdie <richard@openedhand.com>
+ *
+ *  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 <linux/module.h>
+#include <linux/timer.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+
+#include <mach/pxa-regs.h>
+#include <mach/hardware.h>
+#include <mach/magician.h>
+#include <asm/mach-types.h>
+#include "../codecs/uda1380.h"
+#include "pxa2xx-pcm.h"
+#include "pxa2xx-i2s.h"
+#include "pxa-ssp.h"
+
+#define MAGICIAN_MIC       0
+#define MAGICIAN_MIC_EXT   1
+
+static int magician_hp_switch;
+static int magician_spk_switch = 1;
+static int magician_in_sel = MAGICIAN_MIC;
+
+static void magician_ext_control(struct snd_soc_codec *codec)
+{
+       if (magician_spk_switch)
+               snd_soc_dapm_enable_pin(codec, "Speaker");
+       else
+               snd_soc_dapm_disable_pin(codec, "Speaker");
+       if (magician_hp_switch)
+               snd_soc_dapm_enable_pin(codec, "Headphone Jack");
+       else
+               snd_soc_dapm_disable_pin(codec, "Headphone Jack");
+
+       switch (magician_in_sel) {
+       case MAGICIAN_MIC:
+               snd_soc_dapm_disable_pin(codec, "Headset Mic");
+               snd_soc_dapm_enable_pin(codec, "Call Mic");
+               break;
+       case MAGICIAN_MIC_EXT:
+               snd_soc_dapm_disable_pin(codec, "Call Mic");
+               snd_soc_dapm_enable_pin(codec, "Headset Mic");
+               break;
+       }
+
+       snd_soc_dapm_sync(codec);
+}
+
+static int magician_startup(struct snd_pcm_substream *substream)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_codec *codec = rtd->socdev->card->codec;
+
+       /* check the jack status at stream startup */
+       magician_ext_control(codec);
+
+       return 0;
+}
+
+/*
+ * Magician uses SSP port for playback.
+ */
+static int magician_playback_hw_params(struct snd_pcm_substream *substream,
+                                      struct snd_pcm_hw_params *params)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+       struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+       unsigned int acps, acds, width, rate;
+       unsigned int div4 = PXA_SSP_CLK_SCDB_4;
+       int ret = 0;
+
+       rate = params_rate(params);
+       width = snd_pcm_format_physical_width(params_format(params));
+
+       /*
+        * rate = SSPSCLK / (2 * width(16 or 32))
+        * SSPSCLK = (ACPS / ACDS) / SSPSCLKDIV(div4 or div1)
+        */
+       switch (params_rate(params)) {
+       case 8000:
+               /* off by a factor of 2: bug in the PXA27x audio clock? */
+               acps = 32842000;
+               switch (width) {
+               case 16:
+                       /* 513156 Hz ~= _2_ * 8000 Hz * 32 (+0.23%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_16;
+                       break;
+               case 32:
+                       /* 1026312 Hz ~= _2_ * 8000 Hz * 64 (+0.23%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_8;
+               }
+               break;
+       case 11025:
+               acps = 5622000;
+               switch (width) {
+               case 16:
+                       /* 351375 Hz ~= 11025 Hz * 32 (-0.41%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_4;
+                       break;
+               case 32:
+                       /* 702750 Hz ~= 11025 Hz * 64 (-0.41%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_2;
+               }
+               break;
+       case 22050:
+               acps = 5622000;
+               switch (width) {
+               case 16:
+                       /* 702750 Hz ~= 22050 Hz * 32 (-0.41%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_2;
+                       break;
+               case 32:
+                       /* 1405500 Hz ~= 22050 Hz * 64 (-0.41%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_1;
+               }
+               break;
+       case 44100:
+               acps = 5622000;
+               switch (width) {
+               case 16:
+                       /* 1405500 Hz ~= 44100 Hz * 32 (-0.41%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_2;
+                       break;
+               case 32:
+                       /* 2811000 Hz ~= 44100 Hz * 64 (-0.41%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_1;
+               }
+               break;
+       case 48000:
+               acps = 12235000;
+               switch (width) {
+               case 16:
+                       /* 1529375 Hz ~= 48000 Hz * 32 (-0.44%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_2;
+                       break;
+               case 32:
+                       /* 3058750 Hz ~= 48000 Hz * 64 (-0.44%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_1;
+               }
+               break;
+       case 96000:
+               acps = 12235000;
+               switch (width) {
+               case 16:
+                       /* 3058750 Hz ~= 96000 Hz * 32 (-0.44%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_1;
+                       break;
+               case 32:
+                       /* 6117500 Hz ~= 96000 Hz * 64 (-0.44%) */
+                       acds = PXA_SSP_CLK_AUDIO_DIV_2;
+                       div4 = PXA_SSP_CLK_SCDB_1;
+                       break;
+               }
+               break;
+       }
+
+       /* set codec DAI configuration */
+       ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_MSB |
+                       SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
+       if (ret < 0)
+               return ret;
+
+       /* set cpu DAI configuration */
+       ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_DSP_A |
+                       SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBS_CFS);
+       if (ret < 0)
+               return ret;
+
+       ret = snd_soc_dai_set_tdm_slot(cpu_dai, 1, 1);
+       if (ret < 0)
+               return ret;
+
+       /* set audio clock as clock source */
+       ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_AUDIO, 0,
+                       SND_SOC_CLOCK_OUT);
+       if (ret < 0)
+               return ret;
+
+       /* set the SSP audio system clock ACDS divider */
+       ret = snd_soc_dai_set_clkdiv(cpu_dai,
+                       PXA_SSP_AUDIO_DIV_ACDS, acds);
+       if (ret < 0)
+               return ret;
+
+       /* set the SSP audio system clock SCDB divider4 */
+       ret = snd_soc_dai_set_clkdiv(cpu_dai,
+                       PXA_SSP_AUDIO_DIV_SCDB, div4);
+       if (ret < 0)
+               return ret;
+
+       /* set SSP audio pll clock */
+       ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, acps);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
+/*
+ * Magician uses I2S for capture.
+ */
+static int magician_capture_hw_params(struct snd_pcm_substream *substream,
+                                     struct snd_pcm_hw_params *params)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
+       struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+       int ret = 0;
+
+       /* set codec DAI configuration */
+       ret = snd_soc_dai_set_fmt(codec_dai,
+                       SND_SOC_DAIFMT_MSB | SND_SOC_DAIFMT_NB_NF |
+                       SND_SOC_DAIFMT_CBS_CFS);
+       if (ret < 0)
+               return ret;
+
+       /* set cpu DAI configuration */
+       ret = snd_soc_dai_set_fmt(cpu_dai,
+                       SND_SOC_DAIFMT_MSB | SND_SOC_DAIFMT_NB_NF |
+                       SND_SOC_DAIFMT_CBS_CFS);
+       if (ret < 0)
+               return ret;
+
+       /* set the I2S system clock as output */
+       ret = snd_soc_dai_set_sysclk(cpu_dai, PXA2XX_I2S_SYSCLK, 0,
+                       SND_SOC_CLOCK_OUT);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
+static struct snd_soc_ops magician_capture_ops = {
+       .startup = magician_startup,
+       .hw_params = magician_capture_hw_params,
+};
+
+static struct snd_soc_ops magician_playback_ops = {
+       .startup = magician_startup,
+       .hw_params = magician_playback_hw_params,
+};
+
+static int magician_get_hp(struct snd_kcontrol *kcontrol,
+                            struct snd_ctl_elem_value *ucontrol)
+{
+       ucontrol->value.integer.value[0] = magician_hp_switch;
+       return 0;
+}
+
+static int magician_set_hp(struct snd_kcontrol *kcontrol,
+                            struct snd_ctl_elem_value *ucontrol)
+{
+       struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+
+       if (magician_hp_switch == ucontrol->value.integer.value[0])
+               return 0;
+
+       magician_hp_switch = ucontrol->value.integer.value[0];
+       magician_ext_control(codec);
+       return 1;
+}
+
+static int magician_get_spk(struct snd_kcontrol *kcontrol,
+                           struct snd_ctl_elem_value *ucontrol)
+{
+       ucontrol->value.integer.value[0] = magician_spk_switch;
+       return 0;
+}
+
+static int magician_set_spk(struct snd_kcontrol *kcontrol,
+                           struct snd_ctl_elem_value *ucontrol)
+{
+       struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+
+       if (magician_spk_switch == ucontrol->value.integer.value[0])
+               return 0;
+
+       magician_spk_switch = ucontrol->value.integer.value[0];
+       magician_ext_control(codec);
+       return 1;
+}
+
+static int magician_get_input(struct snd_kcontrol *kcontrol,
+                             struct snd_ctl_elem_value *ucontrol)
+{
+       ucontrol->value.integer.value[0] = magician_in_sel;
+       return 0;
+}
+
+static int magician_set_input(struct snd_kcontrol *kcontrol,
+                             struct snd_ctl_elem_value *ucontrol)
+{
+       if (magician_in_sel == ucontrol->value.integer.value[0])
+               return 0;
+
+       magician_in_sel = ucontrol->value.integer.value[0];
+
+       switch (magician_in_sel) {
+       case MAGICIAN_MIC:
+               gpio_set_value(EGPIO_MAGICIAN_IN_SEL1, 1);
+               break;
+       case MAGICIAN_MIC_EXT:
+               gpio_set_value(EGPIO_MAGICIAN_IN_SEL1, 0);
+       }
+
+       return 1;
+}
+
+static int magician_spk_power(struct snd_soc_dapm_widget *w,
+                               struct snd_kcontrol *k, int event)
+{
+       gpio_set_value(EGPIO_MAGICIAN_SPK_POWER, SND_SOC_DAPM_EVENT_ON(event));
+       return 0;
+}
+
+static int magician_hp_power(struct snd_soc_dapm_widget *w,
+                               struct snd_kcontrol *k, int event)
+{
+       gpio_set_value(EGPIO_MAGICIAN_EP_POWER, SND_SOC_DAPM_EVENT_ON(event));
+       return 0;
+}
+
+static int magician_mic_bias(struct snd_soc_dapm_widget *w,
+                               struct snd_kcontrol *k, int event)
+{
+       gpio_set_value(EGPIO_MAGICIAN_MIC_POWER, SND_SOC_DAPM_EVENT_ON(event));
+       return 0;
+}
+
+/* magician machine dapm widgets */
+static const struct snd_soc_dapm_widget uda1380_dapm_widgets[] = {
+       SND_SOC_DAPM_HP("Headphone Jack", magician_hp_power),
+       SND_SOC_DAPM_SPK("Speaker", magician_spk_power),
+       SND_SOC_DAPM_MIC("Call Mic", magician_mic_bias),
+       SND_SOC_DAPM_MIC("Headset Mic", magician_mic_bias),
+};
+
+/* magician machine audio_map */
+static const struct snd_soc_dapm_route audio_map[] = {
+
+       /* Headphone connected to VOUTL, VOUTR */
+       {"Headphone Jack", NULL, "VOUTL"},
+       {"Headphone Jack", NULL, "VOUTR"},
+
+       /* Speaker connected to VOUTL, VOUTR */
+       {"Speaker", NULL, "VOUTL"},
+       {"Speaker", NULL, "VOUTR"},
+
+       /* Mics are connected to VINM */
+       {"VINM", NULL, "Headset Mic"},
+       {"VINM", NULL, "Call Mic"},
+};
+
+static const char *input_select[] = {"Call Mic", "Headset Mic"};
+static const struct soc_enum magician_in_sel_enum =
+       SOC_ENUM_SINGLE_EXT(2, input_select);
+
+static const struct snd_kcontrol_new uda1380_magician_controls[] = {
+       SOC_SINGLE_BOOL_EXT("Headphone Switch",
+                       (unsigned long)&magician_hp_switch,
+                       magician_get_hp, magician_set_hp),
+       SOC_SINGLE_BOOL_EXT("Speaker Switch",
+                       (unsigned long)&magician_spk_switch,
+                       magician_get_spk, magician_set_spk),
+       SOC_ENUM_EXT("Input Select", magician_in_sel_enum,
+                       magician_get_input, magician_set_input),
+};
+
+/*
+ * Logic for a uda1380 as connected on a HTC Magician
+ */
+static int magician_uda1380_init(struct snd_soc_codec *codec)
+{
+       int err;
+
+       /* NC codec pins */
+       snd_soc_dapm_nc_pin(codec, "VOUTLHP");
+       snd_soc_dapm_nc_pin(codec, "VOUTRHP");
+
+       /* FIXME: is anything connected here? */
+       snd_soc_dapm_nc_pin(codec, "VINL");
+       snd_soc_dapm_nc_pin(codec, "VINR");
+
+       /* Add magician specific controls */
+       err = snd_soc_add_controls(codec, uda1380_magician_controls,
+                               ARRAY_SIZE(uda1380_magician_controls));
+       if (err < 0)
+               return err;
+
+       /* Add magician specific widgets */
+       snd_soc_dapm_new_controls(codec, uda1380_dapm_widgets,
+                                 ARRAY_SIZE(uda1380_dapm_widgets));
+
+       /* Set up magician specific audio path interconnects */
+       snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
+
+       snd_soc_dapm_sync(codec);
+       return 0;
+}
+
+/* magician digital audio interface glue - connects codec <--> CPU */
+static struct snd_soc_dai_link magician_dai[] = {
+{
+       .name = "uda1380",
+       .stream_name = "UDA1380 Playback",
+       .cpu_dai = &pxa_ssp_dai[PXA_DAI_SSP1],
+       .codec_dai = &uda1380_dai[UDA1380_DAI_PLAYBACK],
+       .init = magician_uda1380_init,
+       .ops = &magician_playback_ops,
+},
+{
+       .name = "uda1380",
+       .stream_name = "UDA1380 Capture",
+       .cpu_dai = &pxa_i2s_dai,
+       .codec_dai = &uda1380_dai[UDA1380_DAI_CAPTURE],
+       .ops = &magician_capture_ops,
+}
+};
+
+/* magician audio machine driver */
+static struct snd_soc_card snd_soc_card_magician = {
+       .name = "Magician",
+       .dai_link = magician_dai,
+       .num_links = ARRAY_SIZE(magician_dai),
+       .platform = &pxa2xx_soc_platform,
+};
+
+/* magician audio private data */
+static struct uda1380_setup_data magician_uda1380_setup = {
+       .i2c_address = 0x18,
+       .dac_clk = UDA1380_DAC_CLK_WSPLL,
+};
+
+/* magician audio subsystem */
+static struct snd_soc_device magician_snd_devdata = {
+       .card = &snd_soc_card_magician,
+       .codec_dev = &soc_codec_dev_uda1380,
+       .codec_data = &magician_uda1380_setup,
+};
+
+static struct platform_device *magician_snd_device;
+
+static int __init magician_init(void)
+{
+       int ret;
+
+       if (!machine_is_magician())
+               return -ENODEV;
+
+       ret = gpio_request(EGPIO_MAGICIAN_CODEC_POWER, "CODEC_POWER");
+       if (ret)
+               goto err_request_power;
+       ret = gpio_request(EGPIO_MAGICIAN_CODEC_RESET, "CODEC_RESET");
+       if (ret)
+               goto err_request_reset;
+       ret = gpio_request(EGPIO_MAGICIAN_SPK_POWER, "SPK_POWER");
+       if (ret)
+               goto err_request_spk;
+       ret = gpio_request(EGPIO_MAGICIAN_EP_POWER, "EP_POWER");
+       if (ret)
+               goto err_request_ep;
+       ret = gpio_request(EGPIO_MAGICIAN_MIC_POWER, "MIC_POWER");
+       if (ret)
+               goto err_request_mic;
+       ret = gpio_request(EGPIO_MAGICIAN_IN_SEL0, "IN_SEL0");
+       if (ret)
+               goto err_request_in_sel0;
+       ret = gpio_request(EGPIO_MAGICIAN_IN_SEL1, "IN_SEL1");
+       if (ret)
+               goto err_request_in_sel1;
+
+       gpio_set_value(EGPIO_MAGICIAN_CODEC_POWER, 1);
+       gpio_set_value(EGPIO_MAGICIAN_IN_SEL0, 0);
+
+       /* we may need to have the clock running here - pH5 */
+       gpio_set_value(EGPIO_MAGICIAN_CODEC_RESET, 1);
+       udelay(5);
+       gpio_set_value(EGPIO_MAGICIAN_CODEC_RESET, 0);
+
+       magician_snd_device = platform_device_alloc("soc-audio", -1);
+       if (!magician_snd_device) {
+               ret = -ENOMEM;
+               goto err_pdev;
+       }
+
+       platform_set_drvdata(magician_snd_device, &magician_snd_devdata);
+       magician_snd_devdata.dev = &magician_snd_device->dev;
+       ret = platform_device_add(magician_snd_device);
+       if (ret) {
+               platform_device_put(magician_snd_device);
+               goto err_pdev;
+       }
+
+       return 0;
+
+err_pdev:
+       gpio_free(EGPIO_MAGICIAN_IN_SEL1);
+err_request_in_sel1:
+       gpio_free(EGPIO_MAGICIAN_IN_SEL0);
+err_request_in_sel0:
+       gpio_free(EGPIO_MAGICIAN_MIC_POWER);
+err_request_mic:
+       gpio_free(EGPIO_MAGICIAN_EP_POWER);
+err_request_ep:
+       gpio_free(EGPIO_MAGICIAN_SPK_POWER);
+err_request_spk:
+       gpio_free(EGPIO_MAGICIAN_CODEC_RESET);
+err_request_reset:
+       gpio_free(EGPIO_MAGICIAN_CODEC_POWER);
+err_request_power:
+       return ret;
+}
+
+static void __exit magician_exit(void)
+{
+       platform_device_unregister(magician_snd_device);
+
+       gpio_set_value(EGPIO_MAGICIAN_SPK_POWER, 0);
+       gpio_set_value(EGPIO_MAGICIAN_EP_POWER, 0);
+       gpio_set_value(EGPIO_MAGICIAN_MIC_POWER, 0);
+       gpio_set_value(EGPIO_MAGICIAN_CODEC_POWER, 0);
+
+       gpio_free(EGPIO_MAGICIAN_IN_SEL1);
+       gpio_free(EGPIO_MAGICIAN_IN_SEL0);
+       gpio_free(EGPIO_MAGICIAN_MIC_POWER);
+       gpio_free(EGPIO_MAGICIAN_EP_POWER);
+       gpio_free(EGPIO_MAGICIAN_SPK_POWER);
+       gpio_free(EGPIO_MAGICIAN_CODEC_RESET);
+       gpio_free(EGPIO_MAGICIAN_CODEC_POWER);
+}
+
+module_init(magician_init);
+module_exit(magician_exit);
+
+MODULE_AUTHOR("Philipp Zabel");
+MODULE_DESCRIPTION("ALSA SoC Magician");
+MODULE_LICENSE("GPL");
index 7acd3fe..308a657 100644 (file)
@@ -627,12 +627,18 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
        u32 sscr0;
        u32 sspsp;
        int width = snd_pcm_format_physical_width(params_format(params));
+       int ttsa = ssp_read_reg(ssp, SSTSA) & 0xf;
 
        /* select correct DMA params */
        if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
                dma = 1; /* capture DMA offset is 1,3 */
-       if (chn == 2)
-               dma += 2; /* stereo DMA offset is 2, mono is 0 */
+       /* Network mode with one active slot (ttsa == 1) can be used
+        * to force 16-bit frame width on the wire (for S16_LE), even
+        * with two channels. Use 16-bit DMA transfers for this case.
+        */
+       if (((chn == 2) && (ttsa != 1)) || (width == 32))
+               dma += 2; /* 32-bit DMA offset is 2, 16-bit is 0 */
+
        cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma];
 
        dev_dbg(&ssp->pdev->dev, "pxa_ssp_hw_params: dma %d\n", dma);
@@ -712,7 +718,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
        /* When we use a network mode, we always require TDM slots
         * - complain loudly and fail if they've not been set up yet.
         */
-       if ((sscr0 & SSCR0_MOD) && !(ssp_read_reg(ssp, SSTSA) & 0xf)) {
+       if ((sscr0 & SSCR0_MOD) && !ttsa) {
                dev_err(&ssp->pdev->dev, "No TDM timeslot configured\n");
                return -EINVAL;
        }
index 53b9fb1..d38e395 100644 (file)
@@ -81,7 +81,7 @@ static struct snd_pcm_ops pxa2xx_pcm_ops = {
        .mmap           = pxa2xx_pcm_mmap,
 };
 
-static u64 pxa2xx_pcm_dmamask = DMA_32BIT_MASK;
+static u64 pxa2xx_pcm_dmamask = DMA_BIT_MASK(32);
 
 static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
        struct snd_pcm *pcm)
@@ -91,7 +91,7 @@ static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
        if (!card->dev->dma_mask)
                card->dev->dma_mask = &pxa2xx_pcm_dmamask;
        if (!card->dev->coherent_dma_mask)
-               card->dev->coherent_dma_mask = DMA_32BIT_MASK;
+               card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
 
        if (dai->playback.channels_min) {
                ret = pxa2xx_pcm_preallocate_dma_buffer(pcm,
index a9d68fa..169ddad 100644 (file)
@@ -419,7 +419,7 @@ static void s3c24xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
        }
 }
 
-static u64 s3c24xx_pcm_dmamask = DMA_32BIT_MASK;
+static u64 s3c24xx_pcm_dmamask = DMA_BIT_MASK(32);
 
 static int s3c24xx_pcm_new(struct snd_card *card,
        struct snd_soc_dai *dai, struct snd_pcm *pcm)
index 6e710f7..99712f6 100644 (file)
@@ -98,7 +98,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec)
        int err;
 
        codec->ac97->dev.bus = &ac97_bus_type;
-       codec->ac97->dev.parent = NULL;
+       codec->ac97->dev.parent = codec->card->dev;
        codec->ac97->dev.release = soc_ac97_device_release;
 
        dev_set_name(&codec->ac97->dev, "%d-%d:%s",
@@ -767,11 +767,21 @@ static int soc_resume(struct platform_device *pdev)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
        struct snd_soc_card *card = socdev->card;
+       struct snd_soc_dai *cpu_dai = card->dai_link[0].cpu_dai;
 
-       dev_dbg(socdev->dev, "scheduling resume work\n");
-
-       if (!schedule_work(&card->deferred_resume_work))
-               dev_err(socdev->dev, "resume work item may be lost\n");
+       /* AC97 devices might have other drivers hanging off them so
+        * need to resume immediately.  Other drivers don't have that
+        * problem and may take a substantial amount of time to resume
+        * due to I/O costs and anti-pop so handle them out of line.
+        */
+       if (cpu_dai->ac97_control) {
+               dev_dbg(socdev->dev, "Resuming AC97 immediately\n");
+               soc_resume_deferred(&card->deferred_resume_work);
+       } else {
+               dev_dbg(socdev->dev, "Scheduling resume work\n");
+               if (!schedule_work(&card->deferred_resume_work))
+                       dev_err(socdev->dev, "resume work item may be lost\n");
+       }
 
        return 0;
 }
index 7d93fa7..8d13d93 100644 (file)
@@ -703,7 +703,7 @@ static int snd_cs4231_timer_stop(struct snd_timer *timer)
        return 0;
 }
 
-static void __init snd_cs4231_init(struct snd_cs4231 *chip)
+static void __devinit snd_cs4231_init(struct snd_cs4231 *chip)
 {
        unsigned long flags;
 
@@ -1020,7 +1020,7 @@ static snd_pcm_uframes_t snd_cs4231_capture_pointer(
        return bytes_to_frames(substream->runtime, ptr);
 }
 
-static int __init snd_cs4231_probe(struct snd_cs4231 *chip)
+static int __devinit snd_cs4231_probe(struct snd_cs4231 *chip)
 {
        unsigned long flags;
        int i;
@@ -1219,7 +1219,7 @@ static struct snd_pcm_ops snd_cs4231_capture_ops = {
        .pointer        =       snd_cs4231_capture_pointer,
 };
 
-static int __init snd_cs4231_pcm(struct snd_card *card)
+static int __devinit snd_cs4231_pcm(struct snd_card *card)
 {
        struct snd_cs4231 *chip = card->private_data;
        struct snd_pcm *pcm;
@@ -1248,7 +1248,7 @@ static int __init snd_cs4231_pcm(struct snd_card *card)
        return 0;
 }
 
-static int __init snd_cs4231_timer(struct snd_card *card)
+static int __devinit snd_cs4231_timer(struct snd_card *card)
 {
        struct snd_cs4231 *chip = card->private_data;
        struct snd_timer *timer;
@@ -1499,7 +1499,7 @@ static int snd_cs4231_put_double(struct snd_kcontrol *kcontrol,
   .private_value = (left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | \
                   ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22) }
 
-static struct snd_kcontrol_new snd_cs4231_controls[] __initdata = {
+static struct snd_kcontrol_new snd_cs4231_controls[] __devinitdata = {
 CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT,
                CS4231_RIGHT_OUTPUT, 7, 7, 1, 1),
 CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT,
@@ -1538,7 +1538,7 @@ CS4231_SINGLE("Line Out Switch", 0, CS4231_PIN_CTRL, 6, 1, 1),
 CS4231_SINGLE("Headphone Out Switch", 0, CS4231_PIN_CTRL, 7, 1, 1)
 };
 
-static int __init snd_cs4231_mixer(struct snd_card *card)
+static int __devinit snd_cs4231_mixer(struct snd_card *card)
 {
        struct snd_cs4231 *chip = card->private_data;
        int err, idx;
@@ -1559,7 +1559,7 @@ static int __init snd_cs4231_mixer(struct snd_card *card)
 
 static int dev;
 
-static int __init cs4231_attach_begin(struct snd_card **rcard)
+static int __devinit cs4231_attach_begin(struct snd_card **rcard)
 {
        struct snd_card *card;
        struct snd_cs4231 *chip;
@@ -1590,7 +1590,7 @@ static int __init cs4231_attach_begin(struct snd_card **rcard)
        return 0;
 }
 
-static int __init cs4231_attach_finish(struct snd_card *card)
+static int __devinit cs4231_attach_finish(struct snd_card *card)
 {
        struct snd_cs4231 *chip = card->private_data;
        int err;
@@ -1794,9 +1794,9 @@ static struct snd_device_ops snd_cs4231_sbus_dev_ops = {
        .dev_free       =       snd_cs4231_sbus_dev_free,
 };
 
-static int __init snd_cs4231_sbus_create(struct snd_card *card,
-                                        struct of_device *op,
-                                        int dev)
+static int __devinit snd_cs4231_sbus_create(struct snd_card *card,
+                                           struct of_device *op,
+                                           int dev)
 {
        struct snd_cs4231 *chip = card->private_data;
        int err;
@@ -1960,9 +1960,9 @@ static struct snd_device_ops snd_cs4231_ebus_dev_ops = {
        .dev_free       =       snd_cs4231_ebus_dev_free,
 };
 
-static int __init snd_cs4231_ebus_create(struct snd_card *card,
-                                        struct of_device *op,
-                                        int dev)
+static int __devinit snd_cs4231_ebus_create(struct snd_card *card,
+                                           struct of_device *op,
+                                           int dev)
 {
        struct snd_cs4231 *chip = card->private_data;
        int err;
index c2db0f9..823296d 100644 (file)
@@ -121,6 +121,7 @@ struct audioformat {
        unsigned char attributes;       /* corresponding attributes of cs endpoint */
        unsigned char endpoint;         /* endpoint */
        unsigned char ep_attr;          /* endpoint attributes */
+       unsigned char datainterval;     /* log_2 of data packet interval */
        unsigned int maxpacksize;       /* max. packet size */
        unsigned int rates;             /* rate bitmasks */
        unsigned int rate_min, rate_max;        /* min/max rates */
@@ -170,7 +171,6 @@ struct snd_usb_substream {
        unsigned int curframesize;      /* current packet size in frames (for capture) */
        unsigned int fill_max: 1;       /* fill max packet size always */
        unsigned int fmt_type;          /* USB audio format type (1-3) */
-       unsigned int packs_per_ms;      /* packets per millisecond (for playback) */
 
        unsigned int running: 1;        /* running status */
 
@@ -607,9 +607,7 @@ static int prepare_playback_urb(struct snd_usb_substream *subs,
                                break;
                        }
                }
-               /* finish at the frame boundary at/after the period boundary */
-               if (period_elapsed &&
-                   (i & (subs->packs_per_ms - 1)) == subs->packs_per_ms - 1)
+               if (period_elapsed) /* finish at the period boundary */
                        break;
        }
        if (subs->hwptr_done + offs > runtime->buffer_size) {
@@ -1067,7 +1065,6 @@ static int init_substream_urbs(struct snd_usb_substream *subs, unsigned int peri
                packs_per_ms = 8 >> subs->datainterval;
        else
                packs_per_ms = 1;
-       subs->packs_per_ms = packs_per_ms;
 
        if (is_playback) {
                urb_packs = max(nrpacks, 1);
@@ -1087,18 +1084,17 @@ static int init_substream_urbs(struct snd_usb_substream *subs, unsigned int peri
                        minsize -= minsize >> 3;
                minsize = max(minsize, 1u);
                total_packs = (period_bytes + minsize - 1) / minsize;
-               /* round up to multiple of packs_per_ms */
-               total_packs = (total_packs + packs_per_ms - 1)
-                               & ~(packs_per_ms - 1);
                /* we need at least two URBs for queueing */
-               if (total_packs < 2 * packs_per_ms) {
-                       total_packs = 2 * packs_per_ms;
+               if (total_packs < 2) {
+                       total_packs = 2;
                } else {
                        /* and we don't want too long a queue either */
                        maxpacks = max(MAX_QUEUE * packs_per_ms, urb_packs * 2);
                        total_packs = min(total_packs, maxpacks);
                }
        } else {
+               while (urb_packs > 1 && urb_packs * maxsize >= period_bytes)
+                       urb_packs >>= 1;
                total_packs = MAX_URBS * urb_packs;
        }
        subs->nurbs = (total_packs + urb_packs - 1) / urb_packs;
@@ -1350,12 +1346,7 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
                subs->datapipe = usb_sndisocpipe(dev, ep);
        else
                subs->datapipe = usb_rcvisocpipe(dev, ep);
-       if (snd_usb_get_speed(subs->dev) == USB_SPEED_HIGH &&
-           get_endpoint(alts, 0)->bInterval >= 1 &&
-           get_endpoint(alts, 0)->bInterval <= 4)
-               subs->datainterval = get_endpoint(alts, 0)->bInterval - 1;
-       else
-               subs->datainterval = 0;
+       subs->datainterval = fmt->datainterval;
        subs->syncpipe = subs->syncinterval = 0;
        subs->maxpacksize = fmt->maxpacksize;
        subs->fill_max = 0;
@@ -1568,11 +1559,15 @@ static struct snd_pcm_hardware snd_usb_hardware =
 #define hwc_debug(fmt, args...) /**/
 #endif
 
-static int hw_check_valid_format(struct snd_pcm_hw_params *params, struct audioformat *fp)
+static int hw_check_valid_format(struct snd_usb_substream *subs,
+                                struct snd_pcm_hw_params *params,
+                                struct audioformat *fp)
 {
        struct snd_interval *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
        struct snd_interval *ct = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
        struct snd_mask *fmts = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
+       struct snd_interval *pt = hw_param_interval(params, SNDRV_PCM_HW_PARAM_PERIOD_TIME);
+       unsigned int ptime;
 
        /* check the format */
        if (!snd_mask_test(fmts, fp->format)) {
@@ -1593,6 +1588,14 @@ static int hw_check_valid_format(struct snd_pcm_hw_params *params, struct audiof
                hwc_debug("   > check: rate_max %d < min %d\n", fp->rate_max, it->min);
                return 0;
        }
+       /* check whether the period time is >= the data packet interval */
+       if (snd_usb_get_speed(subs->dev) == USB_SPEED_HIGH) {
+               ptime = 125 * (1 << fp->datainterval);
+               if (ptime > pt->max || (ptime == pt->max && pt->openmax)) {
+                       hwc_debug("   > check: ptime %u > max %u\n", ptime, pt->max);
+                       return 0;
+               }
+       }
        return 1;
 }
 
@@ -1611,7 +1614,7 @@ static int hw_rule_rate(struct snd_pcm_hw_params *params,
        list_for_each(p, &subs->fmt_list) {
                struct audioformat *fp;
                fp = list_entry(p, struct audioformat, list);
-               if (!hw_check_valid_format(params, fp))
+               if (!hw_check_valid_format(subs, params, fp))
                        continue;
                if (changed++) {
                        if (rmin > fp->rate_min)
@@ -1665,7 +1668,7 @@ static int hw_rule_channels(struct snd_pcm_hw_params *params,
        list_for_each(p, &subs->fmt_list) {
                struct audioformat *fp;
                fp = list_entry(p, struct audioformat, list);
-               if (!hw_check_valid_format(params, fp))
+               if (!hw_check_valid_format(subs, params, fp))
                        continue;
                if (changed++) {
                        if (rmin > fp->channels)
@@ -1718,7 +1721,7 @@ static int hw_rule_format(struct snd_pcm_hw_params *params,
        list_for_each(p, &subs->fmt_list) {
                struct audioformat *fp;
                fp = list_entry(p, struct audioformat, list);
-               if (!hw_check_valid_format(params, fp))
+               if (!hw_check_valid_format(subs, params, fp))
                        continue;
                fbits |= (1ULL << fp->format);
        }
@@ -1736,95 +1739,42 @@ static int hw_rule_format(struct snd_pcm_hw_params *params,
        return changed;
 }
 
-#define MAX_MASK       64
-
-/*
- * check whether the registered audio formats need special hw-constraints
- */
-static int check_hw_params_convention(struct snd_usb_substream *subs)
+static int hw_rule_period_time(struct snd_pcm_hw_params *params,
+                              struct snd_pcm_hw_rule *rule)
 {
-       int i;
-       u32 *channels;
-       u32 *rates;
-       u32 cmaster, rmaster;
-       u32 rate_min = 0, rate_max = 0;
-       struct list_head *p;
-       int err = 1;
-
-       channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
-       rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
-       if (!channels || !rates) {
-               err = -ENOMEM;
-               goto __out;
-       }
+       struct snd_usb_substream *subs = rule->private;
+       struct audioformat *fp;
+       struct snd_interval *it;
+       unsigned char min_datainterval;
+       unsigned int pmin;
+       int changed;
 
-       list_for_each(p, &subs->fmt_list) {
-               struct audioformat *f;
-               f = list_entry(p, struct audioformat, list);
-               /* unconventional channels? */
-               if (f->channels > 32)
-                       goto __out;
-               /* continuous rate min/max matches? */
-               if (f->rates & SNDRV_PCM_RATE_CONTINUOUS) {
-                       if (rate_min && f->rate_min != rate_min)
-                               goto __out;
-                       if (rate_max && f->rate_max != rate_max)
-                               goto __out;
-                       rate_min = f->rate_min;
-                       rate_max = f->rate_max;
-               }
-               /* combination of continuous rates and fixed rates? */
-               if (rates[f->format] & SNDRV_PCM_RATE_CONTINUOUS) {
-                       if (f->rates != rates[f->format])
-                               goto __out;
-               }
-               if (f->rates & SNDRV_PCM_RATE_CONTINUOUS) {
-                       if (rates[f->format] && rates[f->format] != f->rates)
-                               goto __out;
-               }
-               channels[f->format] |= 1 << (f->channels - 1);
-               rates[f->format] |= f->rates;
-               /* needs knot? */
-               if (f->rates & SNDRV_PCM_RATE_KNOT)
-                       goto __out;
-       }
-       /* check whether channels and rates match for all formats */
-       cmaster = rmaster = 0;
-       for (i = 0; i < MAX_MASK; i++) {
-               if (cmaster != channels[i] && cmaster && channels[i])
-                       goto __out;
-               if (rmaster != rates[i] && rmaster && rates[i])
-                       goto __out;
-               if (channels[i])
-                       cmaster = channels[i];
-               if (rates[i])
-                       rmaster = rates[i];
-       }
-       /* check whether channels match for all distinct rates */
-       memset(channels, 0, MAX_MASK * sizeof(u32));
-       list_for_each(p, &subs->fmt_list) {
-               struct audioformat *f;
-               f = list_entry(p, struct audioformat, list);
-               if (f->rates & SNDRV_PCM_RATE_CONTINUOUS)
+       it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_PERIOD_TIME);
+       hwc_debug("hw_rule_period_time: (%u,%u)\n", it->min, it->max);
+       min_datainterval = 0xff;
+       list_for_each_entry(fp, &subs->fmt_list, list) {
+               if (!hw_check_valid_format(subs, params, fp))
                        continue;
-               for (i = 0; i < 32; i++) {
-                       if (f->rates & (1 << i))
-                               channels[i] |= 1 << (f->channels - 1);
-               }
+               min_datainterval = min(min_datainterval, fp->datainterval);
        }
-       cmaster = 0;
-       for (i = 0; i < 32; i++) {
-               if (cmaster != channels[i] && cmaster && channels[i])
-                       goto __out;
-               if (channels[i])
-                       cmaster = channels[i];
+       if (min_datainterval == 0xff) {
+               hwc_debug("  --> get emtpy\n");
+               it->empty = 1;
+               return -EINVAL;
        }
-       err = 0;
-
- __out:
-       kfree(channels);
-       kfree(rates);
-       return err;
+       pmin = 125 * (1 << min_datainterval);
+       changed = 0;
+       if (it->min < pmin) {
+               it->min = pmin;
+               it->openmin = 0;
+               changed = 1;
+       }
+       if (snd_interval_checkempty(it)) {
+               it->empty = 1;
+               return -EINVAL;
+       }
+       hwc_debug("  --> (%u,%u) (changed = %d)\n", it->min, it->max, changed);
+       return changed;
 }
 
 /*
@@ -1872,6 +1822,8 @@ static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime,
 static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs)
 {
        struct list_head *p;
+       unsigned int pt, ptmin;
+       int param_period_time_if_needed;
        int err;
 
        runtime->hw.formats = subs->formats;
@@ -1881,6 +1833,7 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre
        runtime->hw.channels_min = 256;
        runtime->hw.channels_max = 0;
        runtime->hw.rates = 0;
+       ptmin = UINT_MAX;
        /* check min/max rates and channels */
        list_for_each(p, &subs->fmt_list) {
                struct audioformat *fp;
@@ -1899,42 +1852,54 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre
                        runtime->hw.period_bytes_min = runtime->hw.period_bytes_max =
                                fp->frame_size;
                }
+               pt = 125 * (1 << fp->datainterval);
+               ptmin = min(ptmin, pt);
        }
 
-       /* set the period time minimum 1ms */
-       /* FIXME: high-speed mode allows 125us minimum period, but many parts
-        * in the current code assume the 1ms period.
-        */
+       param_period_time_if_needed = SNDRV_PCM_HW_PARAM_PERIOD_TIME;
+       if (snd_usb_get_speed(subs->dev) != USB_SPEED_HIGH)
+               /* full speed devices have fixed data packet interval */
+               ptmin = 1000;
+       if (ptmin == 1000)
+               /* if period time doesn't go below 1 ms, no rules needed */
+               param_period_time_if_needed = -1;
        snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME,
-                                    1000,
-                                    /*(nrpacks * MAX_URBS) * 1000*/ UINT_MAX);
-
-       err = check_hw_params_convention(subs);
-       if (err < 0)
+                                    ptmin, UINT_MAX);
+
+       if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
+                                      hw_rule_rate, subs,
+                                      SNDRV_PCM_HW_PARAM_FORMAT,
+                                      SNDRV_PCM_HW_PARAM_CHANNELS,
+                                      param_period_time_if_needed,
+                                      -1)) < 0)
                return err;
-       else if (err) {
-               hwc_debug("setting extra hw constraints...\n");
-               if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
-                                              hw_rule_rate, subs,
-                                              SNDRV_PCM_HW_PARAM_FORMAT,
-                                              SNDRV_PCM_HW_PARAM_CHANNELS,
-                                              -1)) < 0)
-                       return err;
-               if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
-                                              hw_rule_channels, subs,
-                                              SNDRV_PCM_HW_PARAM_FORMAT,
-                                              SNDRV_PCM_HW_PARAM_RATE,
-                                              -1)) < 0)
-                       return err;
-               if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
-                                              hw_rule_format, subs,
-                                              SNDRV_PCM_HW_PARAM_RATE,
-                                              SNDRV_PCM_HW_PARAM_CHANNELS,
-                                              -1)) < 0)
-                       return err;
-               if ((err = snd_usb_pcm_check_knot(runtime, subs)) < 0)
+       if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
+                                      hw_rule_channels, subs,
+                                      SNDRV_PCM_HW_PARAM_FORMAT,
+                                      SNDRV_PCM_HW_PARAM_RATE,
+                                      param_period_time_if_needed,
+                                      -1)) < 0)
+               return err;
+       if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
+                                      hw_rule_format, subs,
+                                      SNDRV_PCM_HW_PARAM_RATE,
+                                      SNDRV_PCM_HW_PARAM_CHANNELS,
+                                      param_period_time_if_needed,
+                                      -1)) < 0)
+               return err;
+       if (param_period_time_if_needed >= 0) {
+               err = snd_pcm_hw_rule_add(runtime, 0,
+                                         SNDRV_PCM_HW_PARAM_PERIOD_TIME,
+                                         hw_rule_period_time, subs,
+                                         SNDRV_PCM_HW_PARAM_FORMAT,
+                                         SNDRV_PCM_HW_PARAM_CHANNELS,
+                                         SNDRV_PCM_HW_PARAM_RATE,
+                                         -1);
+               if (err < 0)
                        return err;
        }
+       if ((err = snd_usb_pcm_check_knot(runtime, subs)) < 0)
+               return err;
        return 0;
 }
 
@@ -2147,7 +2112,8 @@ static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct s
                fp = list_entry(p, struct audioformat, list);
                snd_iprintf(buffer, "  Interface %d\n", fp->iface);
                snd_iprintf(buffer, "    Altset %d\n", fp->altsetting);
-               snd_iprintf(buffer, "    Format: %#x\n", fp->format);
+               snd_iprintf(buffer, "    Format: %#x (%d bits)\n",
+                           fp->format, snd_pcm_format_width(fp->format));
                snd_iprintf(buffer, "    Channels: %d\n", fp->channels);
                snd_iprintf(buffer, "    Endpoint: %d %s (%s)\n",
                            fp->endpoint & USB_ENDPOINT_NUMBER_MASK,
@@ -2166,6 +2132,9 @@ static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct s
                        }
                        snd_iprintf(buffer, "\n");
                }
+               if (snd_usb_get_speed(subs->dev) == USB_SPEED_HIGH)
+                       snd_iprintf(buffer, "    Data packet interval: %d us\n",
+                                   125 * (1 << fp->datainterval));
                // snd_iprintf(buffer, "    Max Packet Size = %d\n", fp->maxpacksize);
                // snd_iprintf(buffer, "    EP Attribute = %#x\n", fp->attributes);
        }
@@ -2659,6 +2628,17 @@ static int parse_audio_format(struct snd_usb_audio *chip, struct audioformat *fp
        return 0;
 }
 
+static unsigned char parse_datainterval(struct snd_usb_audio *chip,
+                                       struct usb_host_interface *alts)
+{
+       if (snd_usb_get_speed(chip->dev) == USB_SPEED_HIGH &&
+           get_endpoint(alts, 0)->bInterval >= 1 &&
+           get_endpoint(alts, 0)->bInterval <= 4)
+               return get_endpoint(alts, 0)->bInterval - 1;
+       else
+               return 0;
+}
+
 static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip,
                                         int iface, int altno);
 static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
@@ -2764,6 +2744,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
                fp->altset_idx = i;
                fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
                fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
+               fp->datainterval = parse_datainterval(chip, alts);
                fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
                if (snd_usb_get_speed(dev) == USB_SPEED_HIGH)
                        fp->maxpacksize = (((fp->maxpacksize >> 11) & 3) + 1)
@@ -2955,6 +2936,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
                return -EINVAL;
        }
        alts = &iface->altsetting[fp->altset_idx];
+       fp->datainterval = parse_datainterval(chip, alts);
        fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
        usb_set_interface(chip->dev, fp->iface, 0);
        init_usb_pitch(chip->dev, fp->iface, alts, fp);
@@ -3049,6 +3031,7 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
        fp->iface = altsd->bInterfaceNumber;
        fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
        fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
+       fp->datainterval = 0;
        fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
 
        switch (fp->maxpacksize) {
@@ -3116,6 +3099,7 @@ static int create_ua1000_quirk(struct snd_usb_audio *chip,
        fp->iface = altsd->bInterfaceNumber;
        fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
        fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
+       fp->datainterval = parse_datainterval(chip, alts);
        fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
        fp->rate_max = fp->rate_min = combine_triple(&alts->extra[8]);
 
@@ -3168,6 +3152,7 @@ static int create_ua101_quirk(struct snd_usb_audio *chip,
        fp->iface = altsd->bInterfaceNumber;
        fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
        fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
+       fp->datainterval = parse_datainterval(chip, alts);
        fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
        fp->rate_max = fp->rate_min = combine_triple(&alts->extra[15]);